Class: Object3D

Object3D()

Base class for all objects that live in a scene graph. Stores position, rotation, scale and parent/children relations.

Constructor

new Object3D()

Source:

Classes

Object3D

Members

children

Source:

parent

Source:

position

Source:

rotation

Source:

scale

Source:

worldMatrix

Source:

Methods

add(child)

Parameters:
Name Type Description
child Object3D Child node to attach to this object (reparented, if it already has a parent).
Source:

remove(child)

Parameters:
Name Type Description
child Object3D Child node to detach from this object (no-op if the child is not attached here).
Source:

traverse(callback)

Parameters:
Name Type Description
callback function Visitor function called for this object and all descendants (depth-first).
Source:

updateWorldMatrix(inputMatrix) → {void}

Updates world matrices.
Parameters:
Name Type Description
inputMatrix Float32Array | null | Object Parent world matrix or options object.
Properties
Name Type Attributes Description
parentWorldMatrix Float32Array | null <optional>
Parent world matrix override (root, when null).
Source:
Throws:
When inputs are invalid.
Type
TypeError
Returns:
Type
void