tarinai/js/simulation.js

13 lines
463 B
JavaScript
Raw Normal View History

2026-06-26 12:46:32 +09:00
"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;
2026-06-29 16:21:58 +09:00
if (!order?.update) throw new Error("TarinaiSystemOrder is not available");
return order.update(worldRef, dt);
2026-06-26 12:46:32 +09:00
}
2026-06-29 16:21:58 +09:00
global.TarinaiSimulation = Object.freeze({ update });
2026-06-26 12:46:32 +09:00
})(typeof window !== "undefined" ? window : globalThis);