AnnotationAPI#
Interface AnnotationAPI
Hierarchy
- AnnotationAPI
Methods
change Annotation
- change
Annotation(annotationID: number, label?: string, visible?: boolean, anchorPosition?: Float32Array | number[], labelPosition?: Float32Array | number[], active?: boolean, transform?: Float32Array | number[]): void -
Changes an annotation.
Parameters
-
annotationID: number
The ID of the annotation.
-
Optional
label: stringThe text of the annotation.
-
Optional
visible: booleanIndicates 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: booleanDEPRECATED
-
Optional
transform: Float32Array | number[]The transformation of the annotation.
Returns void
-
create Annotation
- create
Annotation(nodeID: number, label: string, visible?: boolean, anchorPosition?: Float32Array | number[], labelOffset?: Float32Array | number[]): number -
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: booleanIndicates 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.
-
get Annotation Data
- get
Annotation Data(annotationID: number): AnnotationData -
Parameters
-
annotationID: number
Returns AnnotationData
The content and properties of an annotation.
-
These functions allow the creation and management of annotations.