Node
new Node()
Scene-graph node. Holds transform (position, rotation, scale), parent/child hierarchy, and world-matrix bookkeeping.
Differs from THREE.js
No layers.enable/disable helpers - assign the Layers bitmask directly.
Properties
| Name | Type | Description |
|---|---|---|
id | number | Auto-incrementing unique identifier. |
name | string | Optional display name. |
type | string | Class tag, e.g. "Node", "Mesh". |
parent | Node|undefined | Parent node in the scene graph. |
children | Node[] | Direct child nodes. |
position | Vector3 | Local position. |
rotation | Euler | Local Euler rotation (XYZ order). |
quaternion | Quaternion | Local quaternion. Synced with rotation. |
scale | Vector3 | Local scale, defaults to (1, 1, 1). |
matrix | Matrix4 | Local transform matrix. |
matrixWorld | Matrix4 | World-space transform matrix. |
autoUpdateMatrix | boolean | When true, matrix is rebuilt from TRS on each updateMatrixWorld call. |
visible | boolean | Whether this node and its descendants are rendered. |
frustumCulled | boolean | When true, the renderer skips this node if its bounding sphere falls outside the camera frustum. Evaluated during SceneTraversal. |
layers | Layers | Layer bitmask used for raycasting visibility. |
userData | Record<string, *> | Arbitrary user data. Not used by the renderer. |
Methods
| Method | Description |
|---|---|
add(object: Node): this | Appends a child node, reparenting it if necessary. |
remove(object: Node): this | Removes a child node. |
traverse(callback: (node: Node) => void): void | Depth-first traversal of this node and all descendants. |
traverseVisible(callback: (node: Node) => void): void | Like traverse, but skips invisible subtrees. |
lookAt(target: Vector3 | number, y?: number, z?: number): this | Rotates this node to face a world-space point. |
updateMatrix(): void | Rebuilds the local matrix from position, quaternion, and scale. |
updateMatrixWorld(updateParents?: boolean, updateChildren?: boolean): void | Propagates world-matrix updates through the hierarchy. |
clone(): Node | Returns a deep copy of this node and its subtree. |