An object within a SceneModel.

See @xeokit/sdk/scene for usage.

Properties

destroyed: boolean = false

True if this SceneObject has been destroyed.

id: string

Unique ID of this SceneObject.

SceneObjects are stored by ID in Scene.objects and SceneModel.objects.

layerId?: string

Optional layer ID for this SceneObject.

When the Scene is attached to a Viewer, this will identify an optional ViewLayer to assign the object to. ViewLayers allow users to group and segregate object based on their roles or aspects in a scene, simplifying interaction and focusing operations on specific object groups.

When the Scene is attached to a Viewer, if this property is defined, then you could find the ViewObject corresponding to this SceneObject in the ViewLayer with the same ID, like so:

const view = viewer.views["myViewId"];
const viewLayer = view.layers[this.layerId || "default"];
const viewObject = viewLayer.objects[this.id];
const sceneObject = viewObject.sceneObject;
meshes: SceneMesh[]

The Meshes belonging to this SceneObject.

model: SceneModel

The SceneModel that contains this SceneObject.

originalSystemId: string

ID of this SceneObject within the originating system.

Methods