PointAnnotation
class PointAnnotation extends Annotation
Annotation that stays at one point
constructor
new PointAnnotation(view3D, )
PARAMETER | TYPE | OPTIONAL | DEFAULT | DESCRIPTION |
---|---|---|---|---|
view3D | View3D | |||
Partial<PointAnnotationOptions> | ✔️ | {} |
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
focusPose
An array of values in order of [yaw, pitch, zoom]
Type: Array<number>
focusDuration
Duration of the focus animation
Type: number
baseFov
Base fov value that annotation is referencing
Type: number
baseDistance
Base dsitance value that annotation is referencing
Type: number | null
aspect
Base aspect value that annotation is referencing
Type: number
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