AnnotationAPI#

Interface AnnotationAPI

These functions allow the creation and management of Annotations.

Hierarchy

Methods

  • Changes one or more properties of an Annotation with the specified id.

    Parameters

    • annotationId: number

      The id of the Annotation you want to change.

    • properties: AnnotationProperties

      The properties of the Annotation you want change.

    Returns AnnotationProperties

    An Object with the changed Properties.

  • 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

    Deprecated

    Changes an annotation.

  • Creates a new Annotation.

    Parameters

    Returns number

    The id of the newly created 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.

    Deprecated

    Creates a new annotation.

  • Parameters

    • annotationId: number

      The ID of the Annotation.

    Returns AnnotationData

    The content and properties of an annotation.

    Deprecated

  • Returns number[]

    The ids of all available Annotations

  • Removes an Annotation.

    Parameters

    • annontationId: number

      The ID of the Annotation.

    Returns void

  • Returns the AnnotationData for the specified Annotation id.

    Parameters

    • annotationId: number

      The id of the Annotation you want to request the data for.

    Returns Promise<AnnotationProperties>

    The requested Annotation data.


Did you find this page useful? Please give it a rating:
Thank you for rating this page!
Any issues or feedback?
What kind of problem would you like to report?
Please tell us more about what's wrong: