How to split logic into multiple system phases¶ Create a Schedule and register systems by phase name: 1 2 3 4 5 6const sched = new Schedule(); sched .add("input", (w: any) => { /* ... */ }) .add("sim", (w: any, dt: number) => { /* ... */ }) .add("render",(w: any) => { /* ... */ }); Define phase order: 1const phases = ["input", "sim", "render"]; Run it each tick (flush happens after each phase): 1sched.run(world, dt, phases);