AbstractReadonlyonfires when the scene is torn down, for listeners that need to detach
Readonlystageeverything this scene draws hangs off here
Abstractcreatebuilds the scene's contents; assets are already loaded when this runs
Called when the scene above pops, reporting back what it decided.
Called when another scene is pushed on top of this one.
Updating already stops on its own - only the top scene runs - but input listeners do not stand down by themselves. A scene holding windows, music or key handlers pauses or detaches them here; the default does nothing.
the display was resized; the scene may relayout rather than be rebuilt
ProtectedteardownRenderer-owned resources this scene holds, released exactly once as it is destroyed.
The base owns none, because it owns no renderer; two-d.Scene2D destroys its container
here. A subclass overriding it does not need to call super.teardown().
A scene that draws through Pixi:
core.Scene's lifecycle plus the container everything this screen shows hangs off.This is what a 2D game extends. The container is destroyed with the scene, so a scene may add whatever it likes to
stagewithout tracking it for cleanup. The base class holds the lifecycle alone precisely so thatcore.SceneStackcan drive a Babylon scene just as well as this one - the stack callscreate,resize,onSuspend,onResumeanddestroy, and never touchesstage.