"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);