AnnotationAPI#
Interface AnnotationAPI
Hierarchy
- AnnotationAPI
Methods
change
- changeAnnotation(annotationId, properties): AnnotationProperties 
- 
Changes one or more properties of an Annotation with the specified id. Parameters- 
annotationId: numberThe id of the Annotation you want to change. 
- 
properties: AnnotationPropertiesThe properties of the Annotation you want change. 
 Returns AnnotationPropertiesAn Object with the changed Properties. 
- 
- changeAnnotation(annotationID, label?, visible?, anchorPosition?, labelPosition?, active?, transform?): void 
- 
Parameters- 
annotationID: numberThe ID of the Annotation. 
- 
Optionallabel: stringThe text of the Annotation. 
- 
Optionalvisible: booleanIndicates if the Annotation should be visible or hidden. 
- 
OptionalanchorPosition: number[] | Float32ArrayAnchor position in world space coordinates. 
- 
OptionallabelPosition: number[] | Float32ArrayThe position of the label. 
- 
Optionalactive: booleanDEPRECATED 
- 
Optionaltransform: number[] | Float32ArrayThe transformation of the Annotation. 
 Returns voidDeprecatedChanges an annotation. 
- 
create
- createAnnotation(properties?): number 
- 
Creates a new Annotation. Parameters- 
Optionalproperties: AnnotationPropertiesInitial properties of the created Annotation. 
 Returns numberThe id of the newly created Annotation. 
- 
- createAnnotation(nodeID, label, visible?, anchorPosition?, labelOffset?): number 
- 
Parameters- 
nodeID: numberThe ID of the node that the Annotation belongs to. 
- 
label: stringThe text of the Annotation. 
- 
Optionalvisible: booleanIndicates if the Annotation should be visible or hidden. 
- 
OptionalanchorPosition: number[] | Float32ArrayAnchor position in world space coordinates. 
- 
OptionallabelOffset: number[] | Float32ArrayThe offset between anchorPosition and where the label should be displayed. 
 Returns numberThe ID of the new annotation. DeprecatedCreates a new annotation. 
- 
get
- getAnnotation Data(annotationId): AnnotationData 
- 
Parameters- 
annotationId: numberThe ID of the Annotation. 
 Returns AnnotationDataThe content and properties of an annotation. Deprecated
- 
get
remove
- removeAnnotation(annotationId, safe?): RemoveState 
- 
Removes the Annotation from the scene and all related Snapshots. Parameters- 
annotationId: numberThe ID of the Annotation. 
- 
Optionalsafe: booleanPerforms a safe remove which interrupt the removal process if the Annotation is part of one or more Snapshots. 
 Returns RemoveState
- 
request
- requestAnnotation Data(annotationId): Promise<AnnotationProperties> 
- 
Returns the AnnotationData for the specified Annotation id. Parameters- 
annotationId: numberThe id of the Annotation you want to request the data for. 
 Returns Promise<AnnotationProperties>The requested Annotation data. 
- 
These functions allow the creation and management of Annotations.