@lovelace_lol/embody 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +541 -2394
  2. package/dist/index.d.ts +2 -100
  3. package/dist/index.js +7714 -12951
  4. package/dist/index.js.map +1 -1
  5. package/dist/three/annotations/DOMControls.d.ts +73 -0
  6. package/dist/three/annotations/DPthree.d.ts +113 -0
  7. package/dist/three/annotations/DPthree3DMarkers.d.ts +319 -0
  8. package/dist/three/annotations/DPthreeCameraController.d.ts +414 -0
  9. package/dist/three/annotations/DPthreeHTMLMarkers.d.ts +131 -0
  10. package/dist/three/annotations/DPthreeMarkers.d.ts +52 -0
  11. package/dist/three/annotations/adapter.d.ts +157 -0
  12. package/dist/three/annotations/animationFrameTaskScheduler.d.ts +18 -0
  13. package/dist/three/annotations/annotationAnchorModel.d.ts +16 -0
  14. package/dist/three/annotations/annotationCameraCore.d.ts +5 -0
  15. package/dist/three/annotations/boneResolutionProfile.d.ts +7 -0
  16. package/dist/three/annotations/index.d.ts +20 -0
  17. package/dist/three/annotations/loadFrame.d.ts +2 -0
  18. package/dist/three/annotations/markerSurfaceRaycast.d.ts +11 -0
  19. package/dist/three/annotations/markerVisibilityLifecycle.d.ts +21 -0
  20. package/dist/three/annotations/modelRenderPreparation.d.ts +6 -0
  21. package/dist/three/annotations/runtimeAnnotationPreview.d.ts +15 -0
  22. package/dist/three/annotations/runtimeAnnotationPreviewSide.d.ts +10 -0
  23. package/dist/three/annotations/runtimeAnnotationSidePreview.d.ts +5 -0
  24. package/dist/three/annotations/types.d.ts +262 -0
  25. package/dist/three/gaze.d.ts +122 -0
  26. package/dist/three/index.d.ts +147 -0
  27. package/dist/three/model.d.ts +31 -0
  28. package/dist/three/modelSkinning.d.ts +3 -0
  29. package/dist/three/reference-pose.d.ts +73 -0
  30. package/dist/three/scene.d.ts +253 -0
  31. package/dist/three/sceneRenderingBinding.d.ts +22 -0
  32. package/dist/three.js +7696 -8936
  33. package/dist/three.js.map +1 -1
  34. package/dist/wasm/README.md +551 -62
  35. package/dist/wasm/auto.d.ts +1 -0
  36. package/dist/wasm/embody_wasm.d.ts +388 -52
  37. package/dist/wasm/embody_wasm.js +1514 -119
  38. package/dist/wasm/embody_wasm_bg.wasm +0 -0
  39. package/dist/wasm/embody_wasm_bg.wasm.d.ts +115 -40
  40. package/dist/wasm/index.d.ts +126 -0
  41. package/dist/wasm.d.ts +1 -43
  42. package/dist/wasm.js +1043 -239
  43. package/dist/wasm.js.map +1 -1
  44. package/package.json +34 -39
  45. package/service-worker/character-asset-service-worker.js +295 -0
  46. package/dist/authoring/boneAuthoring.d.ts +0 -132
  47. package/dist/camera/annotationCameraAngles.d.ts +0 -28
  48. package/dist/camera/cameraRelativeGaze.d.ts +0 -15
  49. package/dist/camera/rustAnnotationCameraCore.d.ts +0 -136
  50. package/dist/cljs.cjs +0 -362
  51. package/dist/cljs.cjs.map +0 -1
  52. package/dist/cljs.d.ts +0 -5
  53. package/dist/cljs.js +0 -359
  54. package/dist/cljs.js.map +0 -1
  55. package/dist/core/TsClipCompiler.d.ts +0 -51
  56. package/dist/core/WasmRuntimeCore.d.ts +0 -41
  57. package/dist/core/compositeAxis.d.ts +0 -4
  58. package/dist/core/contracts/abi.d.ts +0 -70
  59. package/dist/core/contracts/clip.d.ts +0 -44
  60. package/dist/core/contracts/frame.d.ts +0 -27
  61. package/dist/core/contracts/host.d.ts +0 -28
  62. package/dist/core/contracts/ids.d.ts +0 -15
  63. package/dist/core/contracts/index.d.ts +0 -10
  64. package/dist/core/contracts/model.d.ts +0 -31
  65. package/dist/core/contracts/primitives.d.ts +0 -17
  66. package/dist/core/contracts/skeletonFit.d.ts +0 -41
  67. package/dist/core/index.d.ts +0 -6
  68. package/dist/core/types.d.ts +0 -472
  69. package/dist/core.cjs +0 -343
  70. package/dist/core.cjs.map +0 -1
  71. package/dist/core.js +0 -323
  72. package/dist/core.js.map +0 -1
  73. package/dist/engines/three/Embody.d.ts +0 -372
  74. package/dist/engines/three/ThreeAnimationRuntime.d.ts +0 -203
  75. package/dist/engines/three/ThreeClipAdapter.d.ts +0 -24
  76. package/dist/engines/three/ThreeFrameApplier.d.ts +0 -68
  77. package/dist/engines/three/ThreeModelInspector.d.ts +0 -54
  78. package/dist/engines/three/bakedClipPartitioning.d.ts +0 -16
  79. package/dist/engines/three/balanceUtils.d.ts +0 -3
  80. package/dist/engines/three/characterHost.d.ts +0 -80
  81. package/dist/engines/three/characterScene.d.ts +0 -98
  82. package/dist/engines/three/hair/HairPhysicsController.d.ts +0 -124
  83. package/dist/engines/three/index.d.ts +0 -20
  84. package/dist/engines/three/modelLoader.d.ts +0 -61
  85. package/dist/engines/three/profileTestScene.d.ts +0 -52
  86. package/dist/engines/three/types.d.ts +0 -20
  87. package/dist/hair/appearance.d.ts +0 -29
  88. package/dist/index.cjs +0 -14871
  89. package/dist/index.cjs.map +0 -1
  90. package/dist/interfaces/Animation.d.ts +0 -315
  91. package/dist/interfaces/EmbodyRuntime.d.ts +0 -90
  92. package/dist/interfaces/Hair.d.ts +0 -181
  93. package/dist/interfaces/HairPhysics.d.ts +0 -90
  94. package/dist/interfaces/index.d.ts +0 -11
  95. package/dist/mappings/extendPresetWithProfile.d.ts +0 -17
  96. package/dist/mappings/types.d.ts +0 -309
  97. package/dist/mappings/visemeSystem.d.ts +0 -26
  98. package/dist/physics/HairPhysics.d.ts +0 -86
  99. package/dist/physics/RustHairPhysics.d.ts +0 -18
  100. package/dist/physics/index.d.ts +0 -6
  101. package/dist/preset.cjs +0 -2005
  102. package/dist/preset.cjs.map +0 -1
  103. package/dist/preset.js +0 -2003
  104. package/dist/preset.js.map +0 -1
  105. package/dist/presets/bettaFish.d.ts +0 -328
  106. package/dist/presets/cc4.d.ts +0 -145
  107. package/dist/presets/index.d.ts +0 -30
  108. package/dist/presets/registry.d.ts +0 -57
  109. package/dist/profiles/resolveProfileConfig.d.ts +0 -36
  110. package/dist/profiles/rustResolvedProfile.d.ts +0 -31
  111. package/dist/profiles/types.d.ts +0 -118
  112. package/dist/regions/normalizeRegionTree.d.ts +0 -6
  113. package/dist/regions/regionMapping.d.ts +0 -17
  114. package/dist/regions/types.d.ts +0 -122
  115. package/dist/skeletonTemplates/humanoidSkeletonTemplates.d.ts +0 -32
  116. package/dist/test/setupWasm.d.ts +0 -1
  117. package/dist/three.cjs +0 -9550
  118. package/dist/three.cjs.map +0 -1
  119. package/dist/validation/analyzeModel.d.ts +0 -68
  120. package/dist/validation/extractModelData.d.ts +0 -90
  121. package/dist/validation/generateMappingCorrections.d.ts +0 -32
  122. package/dist/validation/geometryHelpers.d.ts +0 -66
  123. package/dist/validation/types.d.ts +0 -10
  124. package/dist/validation/validateMappings.d.ts +0 -77
  125. package/dist/wasm.cjs +0 -302
  126. package/dist/wasm.cjs.map +0 -1
  127. package/dist/wasmTypes.d.ts +0 -123
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Self-contained DOM controls for DPthreeCameraController
3
+ * No React dependencies - vanilla DOM manipulation
4
+ */
5
+ export interface DOMControlRegion {
6
+ name: string;
7
+ parent?: string;
8
+ children?: string[];
9
+ }
10
+ export interface DOMControlsConfig {
11
+ /** Container element to append controls to */
12
+ container: HTMLElement;
13
+ /** Callback when user selects a region */
14
+ onRegionSelect: (name: string) => void;
15
+ /** Initial list of regions */
16
+ regions: DOMControlRegion[];
17
+ /** Currently selected region */
18
+ currentRegion?: string;
19
+ /** Initial annotation-marker visibility */
20
+ markersVisible?: boolean;
21
+ /** Callback when the Markers checkbox is toggled */
22
+ onMarkersVisibleChange?: (visible: boolean) => void;
23
+ }
24
+ /** Temporary AU preview regions must never appear in the View dropdown. */
25
+ export declare const RUNTIME_ANNOTATION_REGION_PREFIX = "runtime:annotation:";
26
+ export declare function isRuntimeAnnotationRegionName(name: string): boolean;
27
+ export declare function filterCameraViewRegions<T extends {
28
+ name: string;
29
+ }>(regions: T[]): T[];
30
+ export declare function buildRegionDisplayOptions(regions: DOMControlRegion[]): Array<{
31
+ name: string;
32
+ label: string;
33
+ }>;
34
+ /**
35
+ * CameraDOMControls - Self-contained DOM UI for region selection
36
+ */
37
+ export declare class CameraDOMControls {
38
+ private container;
39
+ private wrapper;
40
+ private select;
41
+ private markersCheckbox;
42
+ private onRegionSelect;
43
+ private onMarkersVisibleChange?;
44
+ constructor(config: DOMControlsConfig);
45
+ /**
46
+ * Populate select options
47
+ */
48
+ private populateSelect;
49
+ /**
50
+ * Update available regions
51
+ */
52
+ updateRegions(regions: DOMControlRegion[], current?: string): void;
53
+ /**
54
+ * Sync Markers checkbox with controller visibility state.
55
+ */
56
+ setMarkersVisible(visible: boolean): void;
57
+ /**
58
+ * Set current region (updates select value)
59
+ */
60
+ setCurrentRegion(name: string): void;
61
+ /**
62
+ * Show/hide controls
63
+ */
64
+ setVisible(visible: boolean): void;
65
+ /**
66
+ * Check if controls are visible
67
+ */
68
+ isVisible(): boolean;
69
+ /**
70
+ * Cleanup and remove from DOM
71
+ */
72
+ dispose(): void;
73
+ }
@@ -0,0 +1,113 @@
1
+ import * as THREE from 'three';
2
+ import { DPthreeCameraController } from './DPthreeCameraController';
3
+ import type { CharacterConfig, DPthreeCameraControllerConfig, MarkerStyle, LineConfig, MarkerStyleOverrides, ExpandAnimation, ExpandedRegionState } from './types';
4
+ /**
5
+ * DPthree Configuration
6
+ */
7
+ export interface DPthreeConfig {
8
+ /** Three.js scene */
9
+ scene: THREE.Scene;
10
+ /** Three.js camera */
11
+ camera: THREE.PerspectiveCamera;
12
+ /** Canvas or container element */
13
+ domElement: HTMLElement;
14
+ /** Marker style: '3d' (default) or 'html' */
15
+ markerStyle?: MarkerStyle;
16
+ /** Show DOM controls dropdown. Default: false */
17
+ showControls?: boolean;
18
+ /** Callback when a region is selected */
19
+ onRegionSelect?: (name: string) => void;
20
+ /** Camera controller options */
21
+ cameraOptions?: Partial<DPthreeCameraControllerConfig>;
22
+ }
23
+ /**
24
+ * DPthree - Camera & Marker System for Three.js
25
+ *
26
+ * Factory class that creates and manages camera controller and markers.
27
+ *
28
+ * @example
29
+ * ```typescript
30
+ * const dp = new DPthree({
31
+ * scene,
32
+ * camera,
33
+ * domElement: canvas,
34
+ * markerStyle: '3d',
35
+ * });
36
+ *
37
+ * dp.setModel(model);
38
+ * await dp.loadCharacter(config);
39
+ * dp.focus('head');
40
+ *
41
+ * // In render loop
42
+ * dp.update();
43
+ * ```
44
+ */
45
+ export declare class DPthree {
46
+ private readonly cameraController;
47
+ private markerStyle;
48
+ private model;
49
+ constructor(options: DPthreeConfig);
50
+ setModel(model: THREE.Object3D): this;
51
+ loadCharacter(config: CharacterConfig): Promise<this>;
52
+ focus(regionName: string, duration?: number): Promise<void>;
53
+ getRegions(): string[];
54
+ getCurrentRegion(): string | null;
55
+ setMarkerStyle(style: MarkerStyle): this;
56
+ setMarkersVisible(visible: boolean): this;
57
+ setControlsVisible(visible: boolean): this;
58
+ getCameraState(): import("./types").CameraState;
59
+ setCameraState(position: [number, number, number], target: [number, number, number], _animate?: boolean): this;
60
+ get controller(): DPthreeCameraController;
61
+ update(): void;
62
+ expandRegion(name: string, duration?: number): this;
63
+ collapseRegion(name: string, duration?: number): this;
64
+ toggleRegion(name: string, animation?: ExpandAnimation, duration?: number): this;
65
+ getExpandedRegions(): ExpandedRegionState[];
66
+ soloMarker(name: string | null): this;
67
+ getSoloedMarker(): string | null;
68
+ setRegionLineStyle(name: string, line: Partial<LineConfig>): this;
69
+ setRegionStyle(name: string, style: Partial<MarkerStyleOverrides>): this;
70
+ dispose(): void;
71
+ /**
72
+ * Validate a loaded character model against expected bone/morph mappings
73
+ * @param expectedBones - Map of semantic bone names to actual bone names
74
+ * @param expectedMorphs - List of expected morph target names
75
+ * @returns Validation result with found/missing bones and morphs
76
+ */
77
+ validateCharacter(expectedBones?: Record<string, string>, expectedMorphs?: string[]): CharacterValidationResult;
78
+ /**
79
+ * Get all bone names in the loaded model
80
+ */
81
+ getBoneNames(): string[];
82
+ /**
83
+ * Get all morph target names in the loaded model
84
+ */
85
+ getMorphNames(): string[];
86
+ /**
87
+ * Get all mesh names in the loaded model
88
+ */
89
+ getMeshNames(): string[];
90
+ }
91
+ export interface ValidationItem {
92
+ name: string;
93
+ semantic?: string;
94
+ }
95
+ export interface ValidationCategory {
96
+ found: ValidationItem[];
97
+ missing: ValidationItem[];
98
+ unexpected: ValidationItem[];
99
+ }
100
+ export interface CharacterValidationResult {
101
+ valid: boolean;
102
+ bones: ValidationCategory;
103
+ morphs: ValidationCategory;
104
+ meshes: {
105
+ found: string[];
106
+ total: number;
107
+ };
108
+ summary: string;
109
+ }
110
+ export { DPthreeCameraController as CameraController } from './DPthreeCameraController';
111
+ export { DPthree3DMarkers as Markers3D } from './DPthree3DMarkers';
112
+ export { DPthreeHTMLMarkers as MarkersHTML } from './DPthreeHTMLMarkers';
113
+ export { CameraDOMControls as Controls } from './DOMControls';
@@ -0,0 +1,319 @@
1
+ import * as THREE from 'three';
2
+ import type { Region, CharacterConfig, MarkerStyleOverrides, LineConfig, ExpandAnimation, ExpandedRegionState } from './types';
3
+ interface MarkerConfig {
4
+ markerRadius?: number;
5
+ markerColor?: number;
6
+ lineColor?: number;
7
+ lineLength?: number;
8
+ labelColor?: string;
9
+ labelBackground?: string;
10
+ labelFontSize?: number;
11
+ labelScale?: number;
12
+ }
13
+ export declare function shouldShow3DMarker(params: {
14
+ name: string;
15
+ hiddenChildren: Set<string>;
16
+ soloedMarker: string | null;
17
+ markerAngle?: number;
18
+ currentCameraAngle?: number;
19
+ }): boolean;
20
+ export declare function resolveViewportConstrainedLineScale(params: {
21
+ startClip: THREE.Vector4;
22
+ endClip: THREE.Vector4;
23
+ safeX: number;
24
+ safeY: number;
25
+ minLengthRatio?: number;
26
+ }): {
27
+ visible: boolean;
28
+ lineScale: number;
29
+ };
30
+ export declare function resolveViewportSafeBounds(params: {
31
+ labelScaleX: number;
32
+ labelScaleY: number;
33
+ projectionXScale: number;
34
+ projectionYScale: number;
35
+ viewportWidth: number;
36
+ viewportHeight: number;
37
+ edgePaddingPx?: number;
38
+ }): {
39
+ safeX: number;
40
+ safeY: number;
41
+ };
42
+ /**
43
+ * Pure 3D visual markers for annotations.
44
+ *
45
+ * SIMPLE RULE: Lines always point AWAY from model center.
46
+ * - Horizontal: left annotations go left, right go right
47
+ * - Vertical: high annotations go up, low go down
48
+ */
49
+ export declare class DPthree3DMarkers {
50
+ private scene;
51
+ private camera;
52
+ private domElement;
53
+ private model;
54
+ private regions;
55
+ private currentRegion;
56
+ private onSelect;
57
+ private config;
58
+ private markerGroup;
59
+ private markerMeshes;
60
+ private lineMeshes;
61
+ private lineEndpoints;
62
+ private labelSprites;
63
+ private labelScales;
64
+ private originalLineLengths;
65
+ private boneRefs;
66
+ private localOffsets;
67
+ private modelCenter;
68
+ private modelSize;
69
+ private modelMeshes;
70
+ private regionLoadHasFreshMatrices;
71
+ private isZoomedIn;
72
+ private zoomThreshold;
73
+ private autoCollapseThreshold;
74
+ private lastCameraDistance;
75
+ private visibilityAnimationActive;
76
+ private readonly visibilityAnimationScheduler;
77
+ private visibilityAnimationStates;
78
+ private activeMarkerVisibilityAnimations;
79
+ private markerVisibilityAnimationStates;
80
+ private markerTargetVisibility;
81
+ private markerAngleGateVisibility;
82
+ private markerViewportVisibility;
83
+ private hasCameraAngleUpdateSnapshot;
84
+ private lastCameraAngleUpdatePosition;
85
+ private lastCameraAngleUpdateQuaternion;
86
+ private raycaster;
87
+ private mouse;
88
+ private scratchClipStart;
89
+ private scratchClipEnd;
90
+ private readonly scratchClipStartValues;
91
+ private readonly scratchClipEndValues;
92
+ private scratchWorldEnd;
93
+ private scratchConstrainedEnd;
94
+ private tempSurfacePoint;
95
+ private scratchArrowDirection;
96
+ private scratchArrowQuaternion;
97
+ private arrowUp;
98
+ private charLineDefaults;
99
+ private charMarkerDefaults;
100
+ private resolvedStyles;
101
+ private expandedRegions;
102
+ private parentChildIndex;
103
+ private childParentIndex;
104
+ private hiddenChildren;
105
+ private soloedMarker;
106
+ private markerGroups;
107
+ private groupVisibility;
108
+ private arrowMeshes;
109
+ private characterConfig;
110
+ private laterality;
111
+ private regionLoadGeneration;
112
+ constructor(inputConfig: {
113
+ scene: THREE.Scene;
114
+ camera: THREE.PerspectiveCamera;
115
+ domElement: HTMLElement;
116
+ onSelect: (name: string) => void;
117
+ markerConfig?: MarkerConfig;
118
+ });
119
+ /** Preserve marker state while a scene replaces its renderer canvas. */
120
+ setDomElement(element: HTMLElement): void;
121
+ setModel(model: THREE.Object3D): void;
122
+ loadRegions(config: CharacterConfig, options?: {
123
+ sliceSurfaceQueries?: boolean;
124
+ }): Promise<void>;
125
+ /**
126
+ * Update a region's configuration and recreate its marker.
127
+ * This is the general method for updating any region properties.
128
+ *
129
+ * @param regionName - Name of the region to update
130
+ * @param update - Partial region config to merge with existing config
131
+ */
132
+ updateRegion(regionName: string, update: Partial<Region>): void;
133
+ removeRegion(regionName: string): void;
134
+ /**
135
+ * Remove all marker components for a region (marker, line, label, bone refs)
136
+ */
137
+ private removeMarkerComponents;
138
+ updateRegionMeshes(regionName: string, meshNames: string[]): void;
139
+ /**
140
+ * Reposition an existing marker to a new position.
141
+ * This moves the marker, line, and label without recreating them.
142
+ *
143
+ * @param regionName - Name of the region to reposition
144
+ * @param newPosition - New world position for the marker
145
+ */
146
+ repositionMarker(regionName: string, newPosition: THREE.Vector3): void;
147
+ /**
148
+ * Get the current position of a marker
149
+ */
150
+ getMarkerPosition(regionName: string): THREE.Vector3 | null;
151
+ /**
152
+ * Resolve the effective style for a region by merging:
153
+ * global defaults -> character defaults -> region style
154
+ */
155
+ private resolveRegionStyle;
156
+ /**
157
+ * Resolve a named direction or custom vector to a THREE.Vector3.
158
+ * For 'camera' direction, returns direction from position toward current camera.
159
+ */
160
+ private resolveLineDirection;
161
+ /**
162
+ * Create a bezier curve between two points.
163
+ */
164
+ private createBezierCurve;
165
+ /**
166
+ * Create an arc curve between two points.
167
+ */
168
+ private createArcCurve;
169
+ private unpackCurvePoints;
170
+ /**
171
+ * Create a styled line with support for dashed/dotted, curves, and arrow heads.
172
+ */
173
+ private createStyledLine;
174
+ /**
175
+ * Create an arrow head cone mesh.
176
+ */
177
+ private createArrowHead;
178
+ setCurrentRegion(name: string | null): void;
179
+ /**
180
+ * Create a marker for an annotation.
181
+ *
182
+ * Algorithm:
183
+ * 1. Find annotation center from bones/meshes
184
+ * 2. Determine best outward direction based on annotation type, cameraAngle, or style.lineDirection
185
+ * 3. Raycast from outside toward annotation center to find surface point
186
+ * 4. Line extends outward from surface with configured styling
187
+ *
188
+ */
189
+ private resolveMarkerPlacement;
190
+ private createMarker;
191
+ private createMarkerInSlices;
192
+ private renderMarker;
193
+ /**
194
+ * Embody Rust owns endpoint layout; the Three adapter applies the returned positions
195
+ * to its Three.js marker geometry and labels.
196
+ */
197
+ private separateOverlappingMarkers;
198
+ /**
199
+ * Determine the outward direction for marker placement based on annotation type.
200
+ *
201
+ * This uses semantic knowledge about body parts:
202
+ * - Face/eyes/mouth: forward (positive Z)
203
+ * - Back: backward (negative Z)
204
+ * - Left/right parts: semantic side, resolved against model laterality
205
+ * - Feet: down (negative Y)
206
+ * - If cameraAngle is specified, use that angle
207
+ * - Default: direction from model center to annotation center
208
+ */
209
+ private getOutwardDirection;
210
+ /**
211
+ * Find surface point by raycasting from OUTSIDE toward the annotation center.
212
+ * This ensures we hit the outer surface facing the outward direction.
213
+ */
214
+ private findSurfacePoint;
215
+ private findSurfacePointInSlices;
216
+ private getSuffixPattern;
217
+ /**
218
+ * Get center point and bounding box of annotation's bones/meshes.
219
+ * Uses fuzzy matching to handle bone names with numeric suffixes.
220
+ */
221
+ private getRegionCenterAndBox;
222
+ private formatLabelText;
223
+ private buildLabelTexture;
224
+ private createLabelSprite;
225
+ private updateLabelSprite;
226
+ private updateMarkerStyles;
227
+ private getResolvedLineConfig;
228
+ private getViewportSafeBounds;
229
+ private updateMarkerGeometry;
230
+ private updateMarkerLineLayout;
231
+ private onClick;
232
+ /**
233
+ * Update marker positions to follow animated bones.
234
+ * Uses stored bone references and local offsets for efficiency.
235
+ */
236
+ private updateMarkerPositions;
237
+ /**
238
+ * Find the primary bone for a region (for animation tracking).
239
+ */
240
+ private findPrimaryBone;
241
+ /**
242
+ * Per-frame update: distance-based scaling + explicit cameraAngle visibility.
243
+ * Markers scale continuously with camera distance to maintain consistent screen size.
244
+ * Occlusion is handled by the GPU via depth testing (depthTest: true).
245
+ */
246
+ update(): void;
247
+ private refreshLaterality;
248
+ /**
249
+ * Apply zoom-based scaling to all markers, lines, and labels.
250
+ * Only called when crossing the zoom threshold (not every frame).
251
+ */
252
+ private applyZoomScale;
253
+ setVisible(visible: boolean): void;
254
+ private readObjectOpacity;
255
+ private setObjectOpacity;
256
+ private captureVisibilityAnimationStates;
257
+ private getVisibilityAnimationFactors;
258
+ private applyVisibilityAnimationStates;
259
+ private restoreVisibilityAnimationStates;
260
+ private stopAllMarkerVisibilityAnimations;
261
+ private stopMarkerVisibilityAnimation;
262
+ private getMarkerTargetVisibility;
263
+ private setMarkerObjectsVisible;
264
+ private getMarkerFallbackOpacity;
265
+ private getMarkerBaseLabelScale;
266
+ private captureMarkerVisibilityAnimationState;
267
+ private animateMarkerVisibility;
268
+ private stopVisibilityAnimation;
269
+ private animateVisibility;
270
+ clear(): void;
271
+ /**
272
+ * Solo a specific marker - hide all others.
273
+ * Pass null to unsolo.
274
+ */
275
+ setSoloMarker(regionName: string | null): void;
276
+ /**
277
+ * Get currently soloed marker name.
278
+ */
279
+ getSoloedMarker(): string | null;
280
+ /**
281
+ * Expand a parent region to show its children.
282
+ */
283
+ expandRegion(regionName: string, animation?: ExpandAnimation, duration?: number): Promise<void>;
284
+ /**
285
+ * Collapse a parent region to hide its children.
286
+ */
287
+ collapseRegion(regionName: string, duration?: number): Promise<void>;
288
+ /**
289
+ * Toggle expand/collapse state.
290
+ */
291
+ toggleRegion(regionName: string, animation?: ExpandAnimation, duration?: number): void;
292
+ /**
293
+ * Get expanded state of all regions.
294
+ */
295
+ getExpandedRegions(): ExpandedRegionState[];
296
+ /**
297
+ * Collapse all currently expanded regions.
298
+ * Called automatically when zooming out past threshold.
299
+ */
300
+ private collapseAllRegions;
301
+ /**
302
+ * Animate a child marker in place using the same visibility curve as regular markers.
303
+ */
304
+ private animateMarkerIn;
305
+ /**
306
+ * Animate a child marker out in place using the same visibility curve as regular markers.
307
+ */
308
+ private animateMarkerOut;
309
+ /**
310
+ * Update line style for a specific region at runtime.
311
+ */
312
+ updateLineStyle(regionName: string, lineConfig: Partial<LineConfig>): void;
313
+ /**
314
+ * Update marker style for a specific region at runtime.
315
+ */
316
+ updateMarkerStyle(regionName: string, styleOverrides: Partial<MarkerStyleOverrides>): void;
317
+ dispose(): void;
318
+ }
319
+ export {};