Scene
Extends:
Direct Subclass:
Baseclass for all scenes. When creating a new scene, it should inherit this class. Scenes keep track of their scene objects and viewports. The scene baseclass has functions for registering these with the scene.
Constructor Summary
Public Constructor | ||
public |
Builds the SceneObjects and Viewports list. |
Member Summary
Public Members | ||
public |
sceneObjects: *[] |
|
public |
|
|
public |
viewports: *[] |
Method Summary
Public Methods | ||
public |
registerRenderableComponent(renderable: Renderable, viewportIndex: number): * Registers a Renderable component with the viewport, by index. |
|
public |
registerSceneObject(sceneObject: SceneObject): * When a SceneObject is created, it is routed through the SceneManager to the current active scene to this function. |
|
public |
registerViewport(viewport: Viewport): * When a Viewport is created, it is routed through the SceneManager to the current active scene to this function. |
Inherited Summary
From class Updateable | ||
public |
deregister: * |
|
public |
|
|
public |
|
|
public |
id: * |
|
public |
Cleanup code for when destroying an Updateable. |
|
public |
end() Base call function for when this Updateable is to be ended. |
|
public |
onEnd() Called when the object is being removed or cleaned up from usage. |
|
public |
onPause() Called when the object is intended to be paused. |
|
public |
onStart() Called when the the object is first introduced. |
|
public |
Called when the object is to be unpaused from paused state. |
|
public |
onUpdate() Called on every update within the game, once the object has had onStart called. |
|
public |
pause() Base call function for when this Updateable is to be paused. |
|
public |
start() Base call function for when this Updateable is to be started. |
|
public |
unpause() Base call function for when this Updateable is to be unpaused. |
|
public |
update() Base call function for when this Updateable is to be updated. |
Public Constructors
public constructor() source
Builds the SceneObjects and Viewports list.
Override:
Updateable#constructorPublic Methods
public registerRenderableComponent(renderable: Renderable, viewportIndex: number): * source
Registers a Renderable component with the viewport, by index.
Params:
Name | Type | Attribute | Description |
renderable | Renderable | A Renderable to register to the viewport. |
|
viewportIndex | number | The index of the viewport. |
Return:
* |
public registerSceneObject(sceneObject: SceneObject): * source
When a SceneObject is created, it is routed through the SceneManager to the current active scene to this function. The SceneObject will register with the scene to be referenced on update/pause/destruct calls on a scene specific basis.
Params:
Name | Type | Attribute | Description |
sceneObject | SceneObject | A SceneObject to register. |
Return:
* |
public registerViewport(viewport: Viewport): * source
When a Viewport is created, it is routed through the SceneManager to the current active scene to this function. The Viewport will register with the scene to be referenced by the RenderManager and assigned to by Renderables.
Params:
Name | Type | Attribute | Description |
viewport | Viewport | A Viewport to register. |
Return:
* |