Documentation - v20.0.0-dev
    Preparing search index...

    Class SceneObjectAbstract

    Base class of the scene graph: every object placed in a ViewerScene extends this. It is not a three.js Object3D — it has its own uuid, parent/children hierarchy, visibility/selection state and an abstract transform (getMatrix / setMatrix) instead of position/quaternion/scale.

    Hierarchy (View Summary)

    Index

    Constructors

    • Parameters

      • uuid: string = ...

      Returns SceneObject

    Properties

    children: SceneObject[] = ...
    controller: SceneObjectController<SceneObject> | null = null

    The controller handling it while it is in the scene, set when that controller adds it (see SceneObjectController.addObject); null out of the scene.

    isRaycastable: boolean = true

    Whether the viewport's picking may hit it.

    isSceneObject: true
    isSelectable: boolean = true

    Indicates whether the object is selectable in the scene

    isTransformable: boolean = true
    name: string = ''
    parent: SceneObject | null = null
    userData: Record<string, any> = {}
    uuid: string

    Unique identifier of the object

    Accessors

    • get active(): boolean

      Returns boolean

    • get layer(): MeshLayer

      The layer it is drawn in (the engine's MeshLayer, Layer1 by default): a layer is drawn over the layers below it, whatever their depth. Given to its engine objects; kept only by an object without.

      Returns MeshLayer

    • set layer(value: MeshLayer): void

      Parameters

      Returns void

    • get selected(): boolean

      Returns boolean

    • set selected(value: boolean): void

      Whether it is selected; its controller's onObjectSelectedChanged tells a change.

      Parameters

      • value: boolean

      Returns void

    • get type(): string

      Returns string

    • get visible(): boolean

      Returns boolean

    • set visible(value: boolean): void

      Whether it is shown; its controller's onObjectVisibilityChanged tells a change.

      Parameters

      • value: boolean

      Returns void

    Methods

    • Its state for toJson: a subclass adds its own after these.

      Returns Record<string, unknown>

    • The sections of its type for toJson, after its transform: none here.

      Returns Record<string, unknown>

    • Parameters

      Returns void

    • Parameters

      Returns void

    • Returns void

    • Its bounds in the world, written to target; empty when it has none.

      Parameters

      Returns Box3

    • The sphere around its bounds (getBoundingBox), written to target.

      Parameters

      Returns Sphere

    • Parameters

      Returns Vector3

    • Returns Generator<SceneObject, void, unknown>

    • Returns void

    • Parameters

      Returns void

    • Parameters

      Returns void

    • Everything about it for a debug view (the infobox's 3D data), in sections and in this order: identity, state, transform, its type's own sections (_getTypeJson: a mesh's material, edges and engine objects), userData, and its children by name, uuid and type. Not a persistence format.

      Returns Record<string, any>