new SceneNode()
- See:
Properties:
Name | Type | Description |
---|---|---|
name |
string | The name of the scene node. |
parent |
SceneNode | The parent of this node in the scene hierarchy. |
numChildren |
number | The amount of children attached to this node. |
isOnRoot |
boolean | Indicates whether this node is added directly to the scene root. |
visible |
boolean | Defines whether or not this and any children attached to this node should be rendered or not. |
raycast |
boolean | Defines whether or not this and any children attached to this node should be tested when raycasting. |
worldMatrix |
Matrix4x4 | The matrix transforming from the node's local space to world space. |
morphPose |
MorphPose | The |
skeleton |
Skeleton | The |
Extends
Members
-
euler
-
The rotation of the object.
- Inherited From:
-
matrix
-
The matrix representing the transform.
- Inherited From:
-
position
-
The position of the object.
- Inherited From:
-
rotation
-
The rotation of the object.
- Inherited From:
-
scale
-
The scale of the object.
- Inherited From:
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)
-
applyFunctionConditional(func)
-
Applies a function recursively to all child nodes while the passed function returns true
Parameters:
Name Type Description func
The function to call (using the traversed node as argument)
-
attach()
-
Attaches a child SceneNode to this node.
-
attachAfter(child, refChild)
-
Attaches a child SceneNode to this node.
Parameters:
Name Type Description child
SceneNode The child to be attached.
refChild
SceneNode The scene node after which to add the new child.
-
clone()
-
Creates a copy of the object.
- Inherited From:
- Overrides:
-
contains()
-
Returns whether or not a child is contained in a parent. This works recursively!
-
copyTransform()
-
Copies the state of another Transform object
- Inherited From:
-
destroy()
-
Removes the scene node from the scene and destroys it and all of its children.
-
detach()
-
Removes a child SceneNode from this node.
-
disableMatrixUpdates()
-
This disables listening to the position, rotation, etc. properties. If you need to change a lot of these properties, at once, it may be worth using this.
- Inherited From:
-
enableMatrixUpdates()
-
This re-enables automatic matrix updates.
- Inherited From:
-
findMaterialByName(name)
-
Queries the scene graph for a material with the given name
Parameters:
Name Type Description name
The name of the Material
-
findNodeByName()
-
Finds a scene node with the given name somewhere in this node's children.
-
getChild()
-
Retrieves a child SceneNode with the given index.
-
getChildIndex(child)
-
Returns the index of a child SceneNode.
Parameters:
Name Type Description child
Returns:
- Type
- *
-
isContainedIn()
-
Returns whether or not this scene node is contained by a parent. This works recursively.
-
lookAt()
-
Orients the object in such a way as to face the target point.
- Inherited From: