Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / Object3DRef

Class: Object3DRef ​

Defined in: components/Object3DRef.ts:16

Wraps the live THREE.Object3D for an entity. Almost every entity that renders to the scene carries an Object3DRef so transform sync, selection, and parenting systems can manipulate the underlying object.

Remarks ​

The object reference may be replaced when assets finish loading. Read it fresh inside system/script hooks rather than caching it across frames.

Extends ​

Constructors ​

Constructor ​

ts
new Object3DRef(object, visibility?): Object3DRef;

Defined in: components/Object3DRef.ts:22

Parameters ​

ParameterType
objectObject3D
visibility?boolean

Returns ​

Object3DRef

Overrides ​

Component.constructor

Properties ​

PropertyTypeDescriptionDefined in
objectObject3DLive three.js object placed in the scene graph. May be replaced when assets finish loading.components/Object3DRef.ts:18
visibilitybooleanWhether the object is currently visible. Mirrors object.visible and is preserved across reloads.components/Object3DRef.ts:20