Annotation
class Annotation
Annotation(Hotspot) base class
constructor
new Annotation(view3D, options)
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
view3D | View3D | Instance of the view3D | ||
options | AnnotationOptions | ✔️ | {} | Options |
Properties
position
3D position of the annotation
Type: THREE.Vector3
element
Element of the annotation
Type: HTMLElement
renderable
Whether this annotation is renderable in the screen
Type: boolean
focusing
Whether this annotation is focused
Type: boolean
focusPose
An array of values in order of [yaw, pitch, zoom]
Type: Array<number>
focusDuration
Duration of the focus animation
Type: number
focusOffset
Offset vector from the pivot when focused
Type: Array<number>
baseFov
Base fov value that annotation is referencing
Type: number
baseDistance
Base dsitance value that annotation is referencing
Type: number | null
hidden
Whether the annotation is hidden and not rendered
Type: boolean
Methods
focus
Focus camera to this annotation
This will add a class selected
to this annotation element.
unfocus
Unfocus camera.
This will remove a class selected
to this annotation element.
To reset camera to the original position, use Camera#reset
toJSON
Serialize anntation data to JSON format.
destroy
Destroy annotation and release all resources.
resize
Resize annotation to the current size
render
Render annotation element
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
params | object |
show
Show annotation.
A class "hidden" will be removed from the annotation element.
hide
Hide annotation and prevent it from being rendered.
A class "hidden" will be added to the annotation element.
setOpacity
Set opacity of the annotation
Opacity is automatically controlled with annotationBreakpoints
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
opacity | number | Opacity to apply, number between 0 and 1 |
enableEvents
Add browser event handlers
disableEvents
Remove browser event handlers