Optionalconfig: SceneManagerConfigCurrently active scene (top of stack), or undefined if empty.
Number of scenes on the stack.
Remove all scenes from the stack.
Pop the top scene from the stack. The popped scene is destroyed (onExit called), the previous scene resumes (onEnter called).
Push a new scene onto the stack. The previous scene is paused (onExit called), the new scene starts (onEnter called).
Render scenes according to renderMode.
'top': renders only the active scene.'stack': renders all scenes bottom-to-top (paused scenes still visible).
Call this from your game loop.Replace the top scene without growing the stack. The old scene is destroyed (onExit called), the new scene starts (onEnter called).
Update the active scene. Call this from your game loop. Always delegates to the topmost scene only, regardless of renderMode.
Stack-based scene manager.
Supports push/pop/replace operations with automatic onEnter/onExit lifecycle. Only the topmost scene receives
update(). callsm.update(dt)from your game loop.render()behaviour depends onrenderMode.