new Scene( [rootNode])
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
rootNode |
Entity |
<optional> |
An optional scene node to use as a root. Useful if an entire scene hierarchy was already loaded. |
Properties:
Name | Type | Description |
---|---|---|
name |
The name of the scene. |
|
skybox |
The |
Members
-
numChildren
-
The amount of children in the scene root node.
-
partitioning
-
Set the spatial partitioning for the current scene. Defaults to
FlatPartitioning
-
rootNode
-
The rootnode of the scene.
Methods
-
applyFunction(func)
-
Applies a function recursively to all child nodes.
Parameters:
Name Type Description func
The function to call (using the traversed node as argument)
-
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.
-
getEntitySet(components)
-
Returns the set of all entities with the given components. All components must be present in an Entity to be in the set.
Parameters:
Name Type Description components
An Array of components.
-
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
.