Class Index | File Index

Classes


Class twodee.Scene

A scene.
Defined in: Scene.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructs a new scene.
Method Summary
Method Attributes Method Name and Description
 
Returns the current root node.
 
Pause the scene.
 
render(g, width, height)
Renders the scene.
 
Resumes the scene.
 
setRootNode(rootNode)
Sets the root node.
 
update(delta)
Updates the scene with the specified time delta (milliseconds);
Class Detail
twodee.Scene()
Constructs a new scene.
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.

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Dec 29 2011 20:19:03 GMT+0100 (CET)