This commit is contained in:
33333-33333 2026-06-26 12:46:32 +09:00
commit 86226ccc94
97 changed files with 5790 additions and 2307 deletions

23
js/simulation.js Normal file
View file

@ -0,0 +1,23 @@
"use strict";
// Layer: simulation
// Single update entrypoint. World owns state; phase modules own the ordered update work.
(function (global) {
function update(worldRef, dt) {
const order = global.TarinaiSystemOrder;
if (order?.update) return order.update(worldRef, dt);
const phases = global.TarinaiWorldUpdatePhases;
if (!phases?.update) throw new Error("TarinaiWorldUpdatePhases is not available");
return phases.update(worldRef, dt);
}
function phases() {
return global.TarinaiWorldUpdatePhases?.phases || null;
}
function systemOrder() {
return global.TarinaiSystemOrder?.names || null;
}
global.TarinaiSimulation = Object.freeze({ update, phases, systemOrder });
})(typeof window !== "undefined" ? window : globalThis);