Readonlyappseconds elapsed in the previous frame, clamped by maxDelta
Readonlyonfires after every frame's update, for systems that are not scene-owned
multiplies elapsed time; 0 pauses the game without stopping the renderer
total seconds since the current scene was created
the scene currently updating: the top of the stack
the viewport width in css pixels, which is what scenes lay out against
Staticcurrentthe running game, for the few places that genuinely need a global
Briefly dips timeScale toward scale for duration real seconds, then restores it
to 1 - a heavy hit's momentary freeze-frame, distinct from render.Camera.shake (which
moves the view, not the clock) and from ui.FloatingText (a damage number, not a time
effect). A second call while one is still running simply replaces it, the same way
Camera.shake restarts rather than stacking.
Queues the top scene's removal; it happens at the start of the next frame.
Optionalresult: unknown
reported back to the resumed scene's onResume
Queues a scene on top of the current one; it starts at the next frame.
The scene underneath suspends but is not destroyed: it stops updating and
keeps rendering, so the new scene can layer over it or replace it
outright, and popScene resumes exactly where play left off.
Advances the game by one frame and draws it, without waiting for the browser.
The loop normally runs on requestAnimationFrame, which browsers suspend while a tab is not visible. That is right for a game and wrong for a test or a screenshot, so this drives a frame directly.
seconds to advance by
Queues a scene change; it happens at the start of the next frame.
The whole stack goes: every scene is destroyed, suspended or not, and the new one starts alone. For a scene that returns, push it instead.
The application: owns the renderer, the loop, and the current scene.
Construct it,
await start(FirstScene), and the rest is scenes.