Node
The base class for all other nodes.
Properties
Section titled “Properties”.id
: String
Section titled “.id: String”The ID of the node. This is auto generated when creating nodes via script. For GLTF models converted to nodes, it uses the same object name you would see in blender.
NOTE: Blender GLTF exporter does rename objects in some cases, eg by removing spaces. Best practice is to simply name everything in UpperCamelCase with no other characters.
.position
: Vector3
Section titled “.position: Vector3”The local position of the node.
.quaternion
: Quaternion
Section titled “.quaternion: Quaternion”The local quaternion rotation of the node. Updating this automatically updates the rotation
property.
.rotation
: Euler
Section titled “.rotation: Euler”The local euler rotation of the node. Updating this automatically updates the quaternion
property.
.scale
: Vector3
Section titled “.scale: Vector3”The local scale of the node.
.matrixWorld
: Matrix4
Section titled “.matrixWorld: Matrix4”The world matrix of this node in global space.
.parent
: Node
Section titled “.parent: Node”The parent node, if any.
.children
: [Node]
Section titled “.children: [Node]”The child nodes.
Methods
Section titled “Methods”.add(otherNode)
: Self
Section titled “.add(otherNode): Self”Adds otherNode
as a child of this node.
.remove(otherNode)
: Self
Section titled “.remove(otherNode): Self”Removes otherNode
if it is a child of this node.
.traverse(callback)
Section titled “.traverse(callback)”Traverses this and all descendents calling callback
with the node in the first argument.