Simulation time in milliseconds. Advances by Settings.fps * 1000 per update step, so it reflects simulated time, not wall-clock — paused/dropped frames don't add. Use this for time-driven spawning, animations, etc.
true while the rAF callback is registered. Goes false only after the final frame fires the "gameloopStopped" event.
Begin the rAF loop. Throws if stopLoop was called but teardown hasn't completed yet — wait for the "gameloopStopped" event before restarting.
Request that the loop stop on its next tick. Asynchronous — the loop tears down on the following frame and dispatches "gameloopStopped" when done.
Fixed-step game loop. Owned by
Game(game.gameloop) — usually started automatically bypreInit()whenSettings.autoloopistrue. Each rendered frame:game.update(Settings.fps)zero-or-more times until the accumulator is drained (bounded by MAX_STEPS_PER_FRAME to avoid runaway catch-up)Settings.doNotClear/Settings.useClearRect) and callsgame.draw(context)Fires the EventSystem
"gameloopStopped"event when teardown completes (not when stopLoop is called).