new Scene( [rootNode])
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
rootNode |
SceneNode |
<optional> |
An optional scene node to use as a root. Useful if an entire scene hierarchy was already loaded. |
Members
-
name
-
The name of the scene.
-
numChildren
-
The amount of children in the scene root node.
-
rootNode
-
The rootnode of the scene.
-
skybox
-
The
Skybox
to use when rendering the scene. -
worldBounds
-
The bounding volume for the entire scene in world coordinates.
Methods
-
applyFunction(func [, thisRef])
-
Applies a function recursively to all child nodes.
Parameters:
Name Type Argument Description func
The function to call (using the traversed node as argument)
thisRef
<optional>
Optional reference to "this" in the calling function, to keep the scope of "this" in the called method.
-
attach()
-
Attaches a child to the root node.
-
contains()
-
Returns whether or not the child object is attached to the root node.
-
destroy()
-
Destroys the scene and all its children
-
detach()
-
Removes a child from the root node.
-
findMaterialByName()
-
Finds a material with the given name somewhere in the Scene.
-
findNodeByName()
-
Finds a scene node with the given name somewhere in the Scene.
-
getChild()
-
Gets the child object at the given index.
-
startSystem()
-
Starts a
EntitySystem
. These are systems that allow adding more complex behaviours using components. The order of updates happen in the order they're added. -
stopSystem()
-
Stops a
EntitySystem
.