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

    The sprite showing the total length of a measure line, near its last anchor: always its label, in the line's colour (or the colour it is given, e.g. hovered).

    Hierarchy (View Summary)

    Index

    Constructors

    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.

    distance: number = 0

    The distance shown, in metres.

    isMeasureLineGlobalSprite: true
    isMeasureLineSprite: true
    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
    measureLine: MeasureLine

    The line it belongs to.

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

    Unique identifier of the object

    Accessors

    • get active(): boolean

      Returns boolean

    • get anchorIndex(): number

      The index of the anchor whose segment it measures.

      Returns number

    • get hidden(): boolean

      Returns boolean

    • set hidden(value: boolean): void

      Hides it, or shows it again (while it shows a distance).

      Parameters

      • value: boolean

      Returns void

    • 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

    • set overrideColor(value: string | null): void

      The colour of its label in place of the default one; null: the default.

      Parameters

      • value: string | null

      Returns void

    • get proxy(): SpriteProxy | null

      Its engine sprite, while in the scene; null out of it.

      Returns SpriteProxy | null

    • 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 shownByController(): boolean

      Returns boolean

    • set shownByController(value: boolean): void

      Whether its controller shows the measure lines: hidden with them.

      Parameters

      • value: boolean

      Returns void

    • get spriteType(): SpriteType

      Returns SpriteType

    • get type(): string

      Returns string

    • get visible(): boolean

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

      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 size in world units: a dot, or its label.

      Returns { height: number; width: number }

    • 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>

    • Moves it to position, world frame.

      Parameters

      Returns void

    • Gives its engine sprite its image, drawn only when it changes (it is placed at each pointer move while an anchor is dragged), and its size.

      Returns void

    • Always its label.

      Returns void

    • Adds its engine sprite to sprites, over every object; nothing when it has one.

      Parameters

      Returns void

    • Returns void

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

      Parameters

      Returns Box3

    • 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>

    • Places it before startPosition (the last anchor), towards endPosition (the one before), and shows the sum of the line's segments.

      Parameters

      Returns void

    • Gives it its sizes from the camera, in world units: as a dot, and its width as a label (its height a third of it); the camera's distance to the scene (or its zoom), below which its label is read whole (else a dot).

      Parameters

      • dotSize: number
      • labelWidth: number

        Its label's width; per unit of its distance to cameraPosition when given, that distance read wherever it is placed.

      • cameraDistance: number
      • OptionalcameraPosition: Vector3

        The position of a perspective camera, world frame; none for an orthographic one, its label as wide wherever it is.

      Returns void

    • Shows it as a dot, as its label, or as its label while hovered.

      Parameters

      Returns void