AnnotationAPI

Interface AnnotationAPI

These functions allow the creation and management of annotations.

Hierarchy

Methods

  • Changes an annotation.

    Parameters

    • annotationID: number

      The ID of the annotation.

    • Optional label: string

      The text of the annotation.

    • Optional visible: boolean

      Indicates if the annotation should be visible or hidden.

    • Optional anchorPosition: Float32Array | number[]

      Anchor position in world space coordinates.

    • Optional labelPosition: Float32Array | number[]

      The position of the label.

    • Optional active: boolean

      DEPRECATED

    • Optional transform: Float32Array | number[]

      The transformation of the annotation.

    Returns void

  • Creates a new annotation.

    Parameters

    • nodeID: number

      The ID of the node that the annotation belongs to.

    • label: string

      The text of the annotation.

    • Optional visible: boolean

      Indicates if the annotation should be visible or hidden.

    • Optional anchorPosition: Float32Array | number[]

      Anchor position in world space coordinates.

    • Optional labelOffset: Float32Array | number[]

      The offset between anchorPosition and where the label should be displayed.

    Returns number

    The ID of the new annotation.

  • Parameters

    • annotationID: number

    Returns AnnotationData

    The content and properties of an annotation.

  • Returns number[]

    The ids of all available annotations

  • Removes an annotation.

    Parameters

    • annontationID: number

      The ID of the annotation.

    Returns void