Interface SceneObjectParams

Parameters for a SceneObject.

See @xeokit/sdk/model/scene for usage.

interface SceneObjectParams {
    clippable?: boolean;
    id: string;
    layerId?: string;
    meshIds: string[];
    originalSystemId?: string;
}

Properties

clippable?: boolean

Initial value of the corresponding ViewObject.clippable flag in every View that picks this SceneObject up.

Defaults to true — the ViewObject participates in section- plane clipping like every other scene object.

Pass false for objects that should remain visible (and pickable) regardless of any active section planes — drawings, annotations, tool overlays, or other "out-of-band" content that isn't part of the model being cut. The flag is wired through to the renderer's per-mesh clippable bit at the point the ViewObject is constructed, so this is a per- creation default rather than a runtime API; callers can still flip the flag later via view.objects[id].clippable.

id: string

Unique ID for the SceneObject.

layerId?: string

Causes each View to put the corresponding ViewObject into a ViewLayer with this ID.

When you create an object in a model, each View will automatically create a ViewObject to represent it. When the object has a SceneObjectParams.layerId property, then each View will first ensure that it has a ViewLayer with this ID, and will register the ViewObject in that ViewLayer.

Overridden by SceneObjectParams.layerId.

meshIds: string[]

IDs of meshes previously created with SceneModel.addMesh.

originalSystemId?: string

ID of this SceneObject within the originating system, is any. Defaults to the value of SceneObjectParams.id.