Class twodee.Scene
A scene.
Defined in: Scene.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Constructs a new scene.
|
Method Attributes | Method Name and Description |
---|---|
Returns the current root node.
|
|
pause()
Pause the scene.
|
|
render(g, width, height)
Renders the scene.
|
|
resume()
Resumes the scene.
|
|
setRootNode(rootNode)
Sets the root node.
|
|
update(delta)
Updates the scene with the specified time delta (milliseconds);
|
Method Detail
{twodee.SceneNode}
getRootNode()
Returns the current root node.
- Returns:
- {twodee.SceneNode} The current root node
pause()
Pause the scene. No more updates are done, but rendering continues.
render(g, width, height)
Renders the scene.
- Parameters:
- {CanvasRenderingContext2D} g
- The graphics context
- {number} width
- The output width in pixels
- {number} height
- The output height in pixels
resume()
Resumes the scene.
setRootNode(rootNode)
Sets the root node.
- Parameters:
- {twodee.SceneNode} rootNode
- The root node to set
update(delta)
Updates the scene with the specified time delta (milliseconds);
- Parameters:
- {number} delta
- The time elapsed since the last call to this method measured in milliseconds. This is optional. If not specified then it is calculated automatically. If negative then the absolute value is used as the maximum time delta. This means that a automatically calculated time delta which is larger then this maximum value is trimmed down to the maximum time delta. The default maximum value is 1000.