How to integrate ECS into a game loop¶
Option A — Use world.update(dt)¶
- Register systems with
addSystem(...) - In your loop call:
Option B — Use Schedule phases (recommended for games)¶
- Build a schedule (
input,sim,render) - In
requestAnimationFrame:
1 2 3 4 5 6 7 8 9 10 11 12 13 |