Invokes the action on every child display object, no matter how deep they are nested.
Parameters
action: ((d: Container<ContainerChild>) => void)
(d): void
Parameters
d: Container<ContainerChild>
Returns void
Returns void
isPaused
isPaused(): boolean
Returns true if the scene is paused.
Returns boolean
onActivate
onActivate(): void
Fired every time the scene is to be activated.
Returns void
Remarks
If a new scene is activated, currentScene.onDeactivate() is fired first followed by newScene.onActivate()
onDeactivate
onDeactivate(): void
Fired every time the scene is deactivated.
Note: this function has no implementation, override in derived class to add functionality.
Returns void
onDestroy
onDestroy(): void
Fired when the scene is destroyed.
Note: this function has no implementation, override in derived class to add functionality.
Returns void
onResize
onResize(): void
Fired every time the window resizes, the scene is about to be activated (before onActivate()) and after a MasterHudOverlay is set.
Note: this function has no implementation, override in derived class to add functionality.
Returns void
Remarks
Note that this function is fired only for the current (active) scene!
onUpdate
onUpdate(dt, timestamp): void
Fired on each animation frame.
Note: this function has no implementation, override in derived class to add functionality.
Parameters
dt: number
elapsed time delta
timestamp: number
total time, useful for TWEEN.update and other libs depending on total time
Returns void
pause
pause(): void
Pauses the scene. A paused scene is not rendered and its onUpdate() events are not fired.
Returns void
resume
resume(): void
Resumes the scene.
Returns void
StaticenumerateChildren
enumerateChildren(container, action): void
Invokes the action on every child display object, no matter how deep they are nested.
Represents a scene instance. Only one scene at a time is rendered.