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

    The sprite showing the distance of one segment of a MeasureLine: an engine sprite (always drawn over the objects, in MeshLayer.Layer4), its label drawn on a canvas, shrinking to a dot when the camera is too far to read it. Sized in world units from the camera its controller gives (updateScale), as its label keeps its size on the screen wherever it is placed.

    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.

    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

    • 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

    • The colours of its label: its outline in the colour of the axis its segment mostly follows.

      Returns MeasureLineSpriteColors

    • 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

    • A dot when the camera is too far to read the label, unless hovered.

      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

    • Removes its engine sprite from sprites; nothing without one.

      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>

    • Places it between startPosition and endPosition, measuring the distance between distanceStart and distanceEnd (the segment without its arrows).

      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