Skip to content

Object3D

Defined in: radiance/src/core/Object3D.ts:12

Anything placed in a scene: a position, a rotation and a scale relative to its parent, and children placed relative to it. matrixWorld is where it ends up, after updateMatrixWorld(), which the renderer calls on the scene before every frame.

new Object3D(): Object3D

Object3D

readonly children: Object3D[] = []

Defined in: radiance/src/core/Object3D.ts:21


readonly id: number

Defined in: radiance/src/core/Object3D.ts:13


readonly matrix: Matrix4

Defined in: radiance/src/core/Object3D.ts:18


readonly matrixWorld: Matrix4

Defined in: radiance/src/core/Object3D.ts:19


name: string = ''

Defined in: radiance/src/core/Object3D.ts:14


parent: Object3D | null = null

Defined in: radiance/src/core/Object3D.ts:20


readonly position: Vector3

Defined in: radiance/src/core/Object3D.ts:15


readonly rotation: Euler

Defined in: radiance/src/core/Object3D.ts:16


readonly scale: Vector3

Defined in: radiance/src/core/Object3D.ts:17


visible: boolean = true

Defined in: radiance/src/core/Object3D.ts:23

Hidden objects and their children are left out of the render.

add(…objects): this

Defined in: radiance/src/core/Object3D.ts:25

…Object3D[]

this


lookAt(target): this

Defined in: radiance/src/core/Object3D.ts:71

Turn so that the object’s -z axis points at target (in its parent’s space), with no roll: how a camera is aimed. Straight up or down keeps the current yaw.

Vector3

this


remove(…objects): this

Defined in: radiance/src/core/Object3D.ts:35

…Object3D[]

this


traverse(fn): void

Defined in: radiance/src/core/Object3D.ts:47

Call fn on this object and every descendant, parents first.

(o) => void

void


traverseVisible(fn): void

Defined in: radiance/src/core/Object3D.ts:53

Like traverse, but skipping hidden objects and what is under them.

(o) => void

void


updateMatrixWorld(): void

Defined in: radiance/src/core/Object3D.ts:60

Recompute matrix from position, rotation and scale, and matrixWorld down the tree.

void