Class: AnnotationManager
Defined in: annotations.ts:37
Lightweight per-vertex annotations rendered as small markers attached to surfaces. Designed to be efficient (shared geometry) and easy to control (activate/deactivate).
Constructors
Constructor
new AnnotationManager(viewer, defaults?): AnnotationManager;Defined in: annotations.ts:59
Parameters
viewer
defaults?
radius?
number
colorOn?
number
colorOff?
number
Returns
AnnotationManager
Methods
add()
add(
surfaceId,
vertexIndex,
data?,
options?
): string | null;Defined in: annotations.ts:71
Parameters
surfaceId
string
vertexIndex
number
data?
any
options?
AnnotationOptions = {}
Returns
string | null
addAnchor()
addAnchor(
surfaceId,
anchor,
data?,
options?
): string | null;Defined in: annotations.ts:151
Add an exact triangle attachment after explicit domain binding on the surface mesh.
Parameters
surfaceId
string
anchor
data?
unknown
options?
AnnotationOptions = {}
Returns
string | null
moveAnchor()
moveAnchor(id, anchor): boolean;Defined in: annotations.ts:159
Parameters
id
string
anchor
Returns
boolean
updatePositions()
updatePositions(): void;Defined in: annotations.ts:171
Called once before a viewer paint. Camera-only changes do no local-coordinate work.
Returns
void
list()
list(surfaceId?): AnnotationRecord[];Defined in: annotations.ts:198
Parameters
surfaceId?
string
Returns
removeBySurface()
removeBySurface(surfaceId): void;Defined in: annotations.ts:203
Parameters
surfaceId
string
Returns
void
move()
move(id, vertexIndex): boolean;Defined in: annotations.ts:211
Parameters
id
string
vertexIndex
number
Returns
boolean
get()
get(id): AnnotationRecord | undefined;Defined in: annotations.ts:238
Parameters
id
string
Returns
AnnotationRecord | undefined
remove()
remove(id): void;Defined in: annotations.ts:242
Parameters
id
string
Returns
void
reset()
reset(): void;Defined in: annotations.ts:258
Returns
void
dispose()
dispose(): void;Defined in: annotations.ts:279
Returns
void
activate()
activate(id, options?): void;Defined in: annotations.ts:290
Parameters
id
string
options?
exclusive?
boolean
Returns
void
forEach()
forEach(callback): void;Defined in: annotations.ts:305
Parameters
callback
(annotation) => void
Returns
void
setDefaults()
setDefaults(defaults): void;Defined in: annotations.ts:309
Parameters
defaults
radius?
number
colorOn?
number
colorOff?
number
Returns
void