Class JSC3D.Scene
Scene
This class implements scene that contains a group of meshes that forms the world.
Defined in: jsc3d.js.
Constructor Attributes | Constructor Name and Description |
---|---|
JSC3D.Scene(name)
|
Method Attributes | Method Name and Description |
---|---|
addChild(mesh)
Add a mesh to the scene.
|
|
forEachChild(operator)
Traverse meshes in the scene, calling a given function on each of them.
|
|
Get all meshes in the scene.
|
|
init()
Initialize the scene.
|
|
isEmpty()
See if the scene is empty.
|
|
removeChild(mesh)
Remove a mesh from the scene.
|
Method Detail
addChild(mesh)
Add a mesh to the scene.
- Parameters:
- {JSC3D.Mesh} mesh
- the mesh to be added.
forEachChild(operator)
Traverse meshes in the scene, calling a given function on each of them.
- Parameters:
- {Function} operator
- a function that will be called on each mesh.
{Array}
getChildren()
Get all meshes in the scene.
- Returns:
- {Array} meshes as an array.
init()
Initialize the scene.
{Boolean}
isEmpty()
See if the scene is empty.
- Returns:
- {Boolean} true if it does not contain meshes; false if it has any.
removeChild(mesh)
Remove a mesh from the scene.
- Parameters:
- {JSC3D.Mesh} mesh
- the mesh to be removed.