WasmGPU.createAnnotation.toolkit().setMode¶
Summary¶
WasmGPU.createAnnotation.toolkit().setMode changes annotation interaction mode. Changing mode clears current staging anchors before applying the new mode.
Syntax¶
Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
mode |
AnnotationMode |
Yes | Target interaction mode: idle, marker, distance, or angle. |
Returns¶
this - Returns the same toolkit.
Type Details¶
Example¶
const canvas = document.querySelector("canvas");
const wgpu = await WasmGPU.create(canvas);
const toolkit = wgpu.createAnnotation.toolkit({ canvas });
toolkit.setMode("distance");