@lovelace_lol/embody 0.0.10 → 0.0.12
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.
- package/README.md +30 -40
- package/dist/index.js +38 -40
- package/dist/index.js.map +1 -1
- package/dist/three/annotations/DPthree3DMarkers.d.ts +2 -1
- package/dist/three/authoring.d.ts +2 -2
- package/dist/three/authoringTypes.d.ts +0 -91
- package/dist/three/character.d.ts +2 -8
- package/dist/three.js +38 -40
- package/dist/three.js.map +1 -1
- package/dist/wasm/README.md +30 -40
- package/dist/wasm/auDescriptors.d.ts +35 -0
- package/dist/wasm/embody_wasm.d.ts +52 -96
- package/dist/wasm/embody_wasm.js +12 -147
- package/dist/wasm/embody_wasm_bg.wasm +0 -0
- package/dist/wasm/embody_wasm_bg.wasm.d.ts +48 -56
- package/dist/wasm/index.d.ts +2 -0
- package/dist/wasm.js +288 -1
- package/dist/wasm.js.map +1 -1
- package/package.json +2 -2
|
@@ -72,6 +72,7 @@ export declare class DPthree3DMarkers {
|
|
|
72
72
|
private zoomThreshold;
|
|
73
73
|
private autoCollapseThreshold;
|
|
74
74
|
private lastCameraDistance;
|
|
75
|
+
private markerLayoutDirty;
|
|
75
76
|
private visibilityAnimationActive;
|
|
76
77
|
private readonly visibilityAnimationScheduler;
|
|
77
78
|
private visibilityAnimationStates;
|
|
@@ -247,7 +248,7 @@ export declare class DPthree3DMarkers {
|
|
|
247
248
|
private refreshLaterality;
|
|
248
249
|
/**
|
|
249
250
|
* Apply zoom-based scaling to all markers, lines, and labels.
|
|
250
|
-
*
|
|
251
|
+
* Runs on zoom threshold crossings and when marker geometry changes.
|
|
251
252
|
*/
|
|
252
253
|
private applyZoomScale;
|
|
253
254
|
setVisible(visible: boolean): void;
|
|
@@ -4,7 +4,7 @@ import type { Region } from './annotations/types';
|
|
|
4
4
|
import type * as Types from './authoringTypes';
|
|
5
5
|
export * from './authoringTypes';
|
|
6
6
|
export { resolveBoneNames, fuzzyNameMatch } from './annotations/adapter';
|
|
7
|
-
export { DEFAULT_AXIS_TO_CHANNEL, DEFAULT_BONE_MAX_DEGREES, JOINT_CONTROL_SECTION, VISEME_KEYS, HAIR_COLOR_PRESETS, DEFAULT_HAIR_COLOR_APPEARANCE, HUMANOID_SKELETON_TEMPLATES, CC4_HUMANOID_SKELETON_TEMPLATE, } from '@lovelace_lol/embody/wasm';
|
|
7
|
+
export { DEFAULT_AXIS_TO_CHANNEL, DEFAULT_BONE_MAX_DEGREES, JOINT_CONTROL_SECTION, VISEME_KEYS, HAIR_COLOR_PRESETS, DEFAULT_HAIR_COLOR_APPEARANCE, getAUDescriptors, LEGACY_BODY_CONTROL_AUS, HUMANOID_SKELETON_TEMPLATES, CC4_HUMANOID_SKELETON_TEMPLATE, } from '@lovelace_lol/embody/wasm';
|
|
8
8
|
export declare const getPreset: (id: Types.PresetType) => Types.Profile;
|
|
9
9
|
export declare const extendCharacterConfigWithPreset: <T extends Types.ProfileRuntimeConfig>(config: T) => T;
|
|
10
10
|
export declare const extractProfileOverrides: (config: Types.ProfileRuntimeConfig) => Partial<Types.Profile>;
|
|
@@ -61,7 +61,6 @@ export declare const classifyAuAsJointControl: (profile: Types.Profile, auId: nu
|
|
|
61
61
|
nodeKey?: string | null;
|
|
62
62
|
}) => Types.Profile;
|
|
63
63
|
export declare const resolveContinuumDisplayLabel: (profile: Pick<Types.Profile, "continuumPairs" | "continuumLabels" | "auInfo" | "boneNodes" | "bonePrefix" | "boneSuffix">, negativeAuId: number, positiveAuId: number) => string;
|
|
64
|
-
export declare function getBodyControls(profile: Types.Profile, model?: Object3D): Types.BodyControlDescriptor[];
|
|
65
64
|
export declare function extractModelData(model: Object3D, meshes?: Mesh[], animations?: AnimationClip[]): Types.ModelData;
|
|
66
65
|
export declare function analyzeModel(options: {
|
|
67
66
|
source: {
|
|
@@ -93,3 +92,4 @@ export declare function extractHumanoidSkeletonTemplateFromModel(model: Object3D
|
|
|
93
92
|
sourceAsset?: string;
|
|
94
93
|
sourceSkinName?: string;
|
|
95
94
|
}): Types.HumanoidSkeletonTemplate;
|
|
95
|
+
export type { AUDescriptor } from '@lovelace_lol/embody/wasm';
|
|
@@ -207,95 +207,6 @@ export interface HumanoidCharacterizationResolution {
|
|
|
207
207
|
warnings: string[];
|
|
208
208
|
valid: boolean;
|
|
209
209
|
}
|
|
210
|
-
/** Semantic body actions reuse the AU bone/morph evaluator. VRM names identify targets. */
|
|
211
|
-
export interface BodyControlDefinition {
|
|
212
|
-
label: string;
|
|
213
|
-
section: string;
|
|
214
|
-
auId: number;
|
|
215
|
-
negativeAuId?: number | null;
|
|
216
|
-
bilateral: boolean;
|
|
217
|
-
roles: VRMHumanoidRole[];
|
|
218
|
-
order?: number;
|
|
219
|
-
}
|
|
220
|
-
export interface BodyControlDescriptor {
|
|
221
|
-
id: string;
|
|
222
|
-
label: string;
|
|
223
|
-
section: string;
|
|
224
|
-
auId: number;
|
|
225
|
-
negativeAuId: number | null;
|
|
226
|
-
auIds: number[];
|
|
227
|
-
bilateral: boolean;
|
|
228
|
-
roles: VRMHumanoidRole[];
|
|
229
|
-
order: number;
|
|
230
|
-
boneBindings: Array<BoneBinding & {
|
|
231
|
-
auId: number;
|
|
232
|
-
boneName: string;
|
|
233
|
-
}>;
|
|
234
|
-
morphBindings: MorphTargetsBySide;
|
|
235
|
-
meshNames: string[];
|
|
236
|
-
hasBones: boolean;
|
|
237
|
-
hasMorphs: boolean;
|
|
238
|
-
isMixed: boolean;
|
|
239
|
-
available: boolean;
|
|
240
|
-
diagnostics: string[];
|
|
241
|
-
}
|
|
242
|
-
/** Pose values are normalized authored action amounts, never world Euler angles. */
|
|
243
|
-
export interface SemanticPoseChannel {
|
|
244
|
-
intensity: number;
|
|
245
|
-
/** -1 = character's left, 0 = both, +1 = character's right. */
|
|
246
|
-
balance?: number;
|
|
247
|
-
/** Morph contribution only; bone activation remains intensity. Defaults to profile. */
|
|
248
|
-
morphStrength?: number;
|
|
249
|
-
}
|
|
250
|
-
export interface SemanticPose {
|
|
251
|
-
version: 1;
|
|
252
|
-
controls: Array<{
|
|
253
|
-
controlId: string;
|
|
254
|
-
positive?: SemanticPoseChannel;
|
|
255
|
-
negative?: SemanticPoseChannel;
|
|
256
|
-
}>;
|
|
257
|
-
}
|
|
258
|
-
export interface SemanticPoseDirection {
|
|
259
|
-
auId: number;
|
|
260
|
-
label: string;
|
|
261
|
-
available: boolean;
|
|
262
|
-
availableSides?: Array<'left' | 'right' | 'center'>;
|
|
263
|
-
hasBones: boolean;
|
|
264
|
-
hasMorphs: boolean;
|
|
265
|
-
morphStrength: number;
|
|
266
|
-
}
|
|
267
|
-
export interface SemanticPoseControl {
|
|
268
|
-
id: string;
|
|
269
|
-
label: string;
|
|
270
|
-
section: string;
|
|
271
|
-
roles: string[];
|
|
272
|
-
bilateral: boolean;
|
|
273
|
-
boneNames: string[];
|
|
274
|
-
morphNames: string[];
|
|
275
|
-
positive: SemanticPoseDirection;
|
|
276
|
-
negative?: SemanticPoseDirection;
|
|
277
|
-
}
|
|
278
|
-
export interface SemanticAnimation {
|
|
279
|
-
version: 1;
|
|
280
|
-
durationSeconds: number;
|
|
281
|
-
tracks: Array<{
|
|
282
|
-
controlId: string;
|
|
283
|
-
direction: 'positive' | 'negative';
|
|
284
|
-
balance?: number;
|
|
285
|
-
morphStrength?: number;
|
|
286
|
-
keyframes: Array<{
|
|
287
|
-
time: number;
|
|
288
|
-
intensity: number;
|
|
289
|
-
}>;
|
|
290
|
-
}>;
|
|
291
|
-
}
|
|
292
|
-
export interface SemanticAnimationOptions extends Record<string, unknown> {
|
|
293
|
-
faceCurves?: Record<string, Array<{
|
|
294
|
-
time: number;
|
|
295
|
-
intensity: number;
|
|
296
|
-
inherit?: boolean;
|
|
297
|
-
}>>;
|
|
298
|
-
}
|
|
299
210
|
export interface Profile {
|
|
300
211
|
name?: string;
|
|
301
212
|
animalType?: string;
|
|
@@ -340,8 +251,6 @@ export interface Profile {
|
|
|
340
251
|
disabledRegions?: string[];
|
|
341
252
|
hairPhysics?: HairPhysicsProfileConfig;
|
|
342
253
|
humanoidCharacterization?: HumanoidCharacterization;
|
|
343
|
-
/** Authored overrides may patch individual fields; null removes a preset control. */
|
|
344
|
-
bodyControls?: Record<string, Partial<BodyControlDefinition> | null>;
|
|
345
254
|
}
|
|
346
255
|
export interface ProfileRuntimeConfig extends Partial<Profile> {
|
|
347
256
|
profilePresetId?: PresetType;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AnimationClip } from 'three';
|
|
2
2
|
import type { Mesh, Object3D } from 'three';
|
|
3
|
+
import type { AUDescriptor } from '@lovelace_lol/embody/wasm';
|
|
3
4
|
import { ThreeFrameApplier } from './index';
|
|
4
5
|
import type { ThreeModelInspection } from './index';
|
|
5
6
|
import type { ThreeModelReferencePose } from './reference-pose';
|
|
@@ -122,7 +123,6 @@ export declare class Embody {
|
|
|
122
123
|
snippetToClip(name: string, curves: JsonObject, options?: CharacterPlaybackOptions): CharacterPlaybackHandle;
|
|
123
124
|
buildTypedClip(name: string, channels: any[], options?: CharacterPlaybackOptions): CharacterPlaybackHandle;
|
|
124
125
|
typedSnippetToClip(name: string, channels: any[], options?: CharacterPlaybackOptions): CharacterPlaybackHandle;
|
|
125
|
-
semanticAnimationToClip(name: string, animation: JsonObject, options?: CharacterPlaybackOptions): CharacterPlaybackHandle;
|
|
126
126
|
playSnippet(snippet: string | {
|
|
127
127
|
name: string;
|
|
128
128
|
curves: JsonObject;
|
|
@@ -164,13 +164,7 @@ export declare class Embody {
|
|
|
164
164
|
setAU(id: number, value: number, balance?: number): void;
|
|
165
165
|
getAU(id: number): number;
|
|
166
166
|
getAUBalance(id: number): number;
|
|
167
|
-
|
|
168
|
-
getSemanticPoseCatalog(): any[];
|
|
169
|
-
captureSemanticPose(): JsonObject;
|
|
170
|
-
validateSemanticPose(pose: JsonObject): JsonObject;
|
|
171
|
-
applySemanticPose(pose: JsonObject): void;
|
|
172
|
-
validateSemanticAnimation(animation: JsonObject, options?: JsonObject): void;
|
|
173
|
-
resetBodyControls(): void;
|
|
167
|
+
getAUDescriptors(): AUDescriptor[];
|
|
174
168
|
setContinuum(negative: number, positive: number, value: number, balance?: number): void;
|
|
175
169
|
getContinuum(negative: number, positive: number): number;
|
|
176
170
|
transitionAU(id: number, value: number, durationMs?: number, balance?: number): CharacterTransitionHandle;
|
package/dist/three.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as THREE3 from 'three';
|
|
2
2
|
import { NoBlending, MultiplyBlending, SubtractiveBlending, AdditiveBlending, NormalBlending, Vector3, Box3, Timer, Matrix4, AnimationMixer, AdditiveAnimationBlendMode, NormalAnimationBlendMode, LoopOnce, LoopRepeat, LoopPingPong, PropertyBinding, Euler, Quaternion, AnimationUtils, InterpolateDiscrete, InterpolateLinear, MathUtils, Mesh, PlaneGeometry, ShadowMaterial, HemisphereLight, DirectionalLight, SRGBColorSpace, ACESFilmicToneMapping, WebGLRenderer, Scene, Color, PerspectiveCamera, PCFShadowMap, PCFSoftShadowMap, NumberKeyframeTrack, QuaternionKeyframeTrack, VectorKeyframeTrack, AnimationClip, PMREMGenerator, FloatType, Float32BufferAttribute, BufferAttribute, WebGPUCoordinateSystem, WebGLCoordinateSystem } from 'three';
|
|
3
3
|
import { CC4_HUMANOID_SKELETON_TEMPLATE, HUMANOID_SKELETON_TEMPLATES, DEFAULT_HAIR_COLOR_APPEARANCE, initEmbodyCore, requireInitializedEmbodyCore } from '@lovelace_lol/embody/wasm';
|
|
4
|
-
export { CC4_HUMANOID_SKELETON_TEMPLATE, DEFAULT_AXIS_TO_CHANNEL, DEFAULT_BONE_MAX_DEGREES, DEFAULT_HAIR_COLOR_APPEARANCE, HAIR_COLOR_PRESETS, HUMANOID_SKELETON_TEMPLATES, JOINT_CONTROL_SECTION, VISEME_KEYS } from '@lovelace_lol/embody/wasm';
|
|
4
|
+
export { CC4_HUMANOID_SKELETON_TEMPLATE, DEFAULT_AXIS_TO_CHANNEL, DEFAULT_BONE_MAX_DEGREES, DEFAULT_HAIR_COLOR_APPEARANCE, HAIR_COLOR_PRESETS, HUMANOID_SKELETON_TEMPLATES, JOINT_CONTROL_SECTION, LEGACY_BODY_CONTROL_AUS, VISEME_KEYS, getAUDescriptors } from '@lovelace_lol/embody/wasm';
|
|
5
5
|
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
6
6
|
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
|
|
7
7
|
import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js';
|
|
@@ -1206,6 +1206,7 @@ var DPthree3DMarkers = class {
|
|
|
1206
1206
|
// Calculated from model size - collapse expanded regions when zoomed out
|
|
1207
1207
|
__publicField(this, "lastCameraDistance", -1);
|
|
1208
1208
|
// Cache to avoid unnecessary checks
|
|
1209
|
+
__publicField(this, "markerLayoutDirty", false);
|
|
1209
1210
|
__publicField(this, "visibilityAnimationActive", false);
|
|
1210
1211
|
__publicField(this, "visibilityAnimationScheduler", new AnimationFrameTaskScheduler());
|
|
1211
1212
|
__publicField(this, "visibilityAnimationStates", []);
|
|
@@ -1369,6 +1370,8 @@ var DPthree3DMarkers = class {
|
|
|
1369
1370
|
return;
|
|
1370
1371
|
}
|
|
1371
1372
|
this.separateOverlappingMarkers(annotationCameraCore);
|
|
1373
|
+
this.markerLayoutDirty = true;
|
|
1374
|
+
this.update();
|
|
1372
1375
|
console.log(`[3DMarkers] loadRegions complete. Created markers for:`, Array.from(this.markerMeshes.keys()));
|
|
1373
1376
|
console.log(`[3DMarkers] lineEndpoints:`, Array.from(this.lineEndpoints.keys()));
|
|
1374
1377
|
console.log(`[3DMarkers] resolvedStyles:`, Array.from(this.resolvedStyles.keys()));
|
|
@@ -1840,6 +1843,12 @@ var DPthree3DMarkers = class {
|
|
|
1840
1843
|
this.markerTargetVisibility.set(region.name, !startHidden && !region.isFallback);
|
|
1841
1844
|
this.markerAngleGateVisibility.delete(region.name);
|
|
1842
1845
|
this.markerViewportVisibility.set(region.name, true);
|
|
1846
|
+
this.markerLayoutDirty = true;
|
|
1847
|
+
if (this.visibilityAnimationActive) {
|
|
1848
|
+
this.setMarkerObjectsVisible(region.name, false, false);
|
|
1849
|
+
} else {
|
|
1850
|
+
this.update();
|
|
1851
|
+
}
|
|
1843
1852
|
}
|
|
1844
1853
|
/**
|
|
1845
1854
|
* Embody Rust owns endpoint layout; the Three adapter applies the returned positions
|
|
@@ -2455,7 +2464,7 @@ var DPthree3DMarkers = class {
|
|
|
2455
2464
|
const dy = this.camera.position.y - this.modelCenter.y;
|
|
2456
2465
|
const dz = this.camera.position.z - this.modelCenter.z;
|
|
2457
2466
|
const cameraDistance = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
2458
|
-
const distanceChanged = this.lastCameraDistance < 0 || Math.abs(cameraDistance - this.lastCameraDistance) > this.lastCameraDistance * 0.02;
|
|
2467
|
+
const distanceChanged = this.markerLayoutDirty || this.lastCameraDistance < 0 || Math.abs(cameraDistance - this.lastCameraDistance) > this.lastCameraDistance * 0.02;
|
|
2459
2468
|
if (distanceChanged) {
|
|
2460
2469
|
const previousDistance = this.lastCameraDistance;
|
|
2461
2470
|
this.lastCameraDistance = cameraDistance;
|
|
@@ -2466,22 +2475,27 @@ var DPthree3DMarkers = class {
|
|
|
2466
2475
|
sphere.scale.setScalar(clampedScale);
|
|
2467
2476
|
}
|
|
2468
2477
|
const shouldBeZoomedIn = cameraDistance < this.zoomThreshold;
|
|
2469
|
-
|
|
2478
|
+
const zoomChanged = shouldBeZoomedIn !== this.isZoomedIn;
|
|
2479
|
+
if (this.markerLayoutDirty || zoomChanged) {
|
|
2470
2480
|
this.isZoomedIn = shouldBeZoomedIn;
|
|
2471
|
-
this.applyZoomScale(
|
|
2481
|
+
this.applyZoomScale(
|
|
2482
|
+
shouldBeZoomedIn ? ZOOMED_IN_LINE_SCALE : 1,
|
|
2483
|
+
zoomChanged || shouldBeZoomedIn
|
|
2484
|
+
);
|
|
2472
2485
|
}
|
|
2473
2486
|
const crossedAutoCollapseThreshold = previousDistance >= 0 && previousDistance <= this.autoCollapseThreshold && cameraDistance > this.autoCollapseThreshold;
|
|
2474
2487
|
if (crossedAutoCollapseThreshold) {
|
|
2475
2488
|
this.collapseAllRegions();
|
|
2476
2489
|
}
|
|
2477
2490
|
}
|
|
2478
|
-
const cameraMoved = !this.hasCameraAngleUpdateSnapshot || this.lastCameraAngleUpdatePosition.distanceToSquared(this.camera.position) > 1e-4 || 1 - Math.abs(this.lastCameraAngleUpdateQuaternion.dot(this.camera.quaternion)) > 1e-5;
|
|
2491
|
+
const cameraMoved = this.markerLayoutDirty || !this.hasCameraAngleUpdateSnapshot || this.lastCameraAngleUpdatePosition.distanceToSquared(this.camera.position) > 1e-4 || 1 - Math.abs(this.lastCameraAngleUpdateQuaternion.dot(this.camera.quaternion)) > 1e-5;
|
|
2479
2492
|
if (!cameraMoved) {
|
|
2480
2493
|
return;
|
|
2481
2494
|
}
|
|
2482
2495
|
this.lastCameraAngleUpdatePosition.copy(this.camera.position);
|
|
2483
2496
|
this.lastCameraAngleUpdateQuaternion.copy(this.camera.quaternion);
|
|
2484
2497
|
this.hasCameraAngleUpdateSnapshot = true;
|
|
2498
|
+
this.markerLayoutDirty = false;
|
|
2485
2499
|
const cameraAngle = getModelLocalOrbitAngle(this.model, this.modelCenter, this.camera.position);
|
|
2486
2500
|
for (const [name, sphere] of this.markerMeshes) {
|
|
2487
2501
|
const markerAngle = sphere.userData.cameraAngle;
|
|
@@ -2519,14 +2533,16 @@ var DPthree3DMarkers = class {
|
|
|
2519
2533
|
}
|
|
2520
2534
|
/**
|
|
2521
2535
|
* Apply zoom-based scaling to all markers, lines, and labels.
|
|
2522
|
-
*
|
|
2536
|
+
* Runs on zoom threshold crossings and when marker geometry changes.
|
|
2523
2537
|
*/
|
|
2524
|
-
applyZoomScale(scaleFactor) {
|
|
2538
|
+
applyZoomScale(scaleFactor, scaleSpheres = true) {
|
|
2525
2539
|
const isZoomed = scaleFactor < 1;
|
|
2526
2540
|
const sphereScaleFactor = isZoomed ? ZOOMED_IN_SPHERE_SCALE : 1;
|
|
2527
2541
|
const labelScaleFactor = isZoomed ? ZOOMED_IN_LABEL_SCALE : 1;
|
|
2528
|
-
|
|
2529
|
-
sphere.
|
|
2542
|
+
if (scaleSpheres) {
|
|
2543
|
+
for (const sphere of this.markerMeshes.values()) {
|
|
2544
|
+
sphere.scale.setScalar(sphereScaleFactor);
|
|
2545
|
+
}
|
|
2530
2546
|
}
|
|
2531
2547
|
for (const line of this.lineMeshes.values()) {
|
|
2532
2548
|
const material = line.material;
|
|
@@ -2630,6 +2646,10 @@ var DPthree3DMarkers = class {
|
|
|
2630
2646
|
object.visible = true;
|
|
2631
2647
|
this.setObjectOpacity(object, opacity * itemOpacityFactor);
|
|
2632
2648
|
}
|
|
2649
|
+
const name = state.label?.object.userData.annotation;
|
|
2650
|
+
if (typeof name === "string" && !this.updateMarkerLineLayout(name)) {
|
|
2651
|
+
this.setMarkerObjectsVisible(name, false, false);
|
|
2652
|
+
}
|
|
2633
2653
|
}
|
|
2634
2654
|
}
|
|
2635
2655
|
restoreVisibilityAnimationStates(states) {
|
|
@@ -2815,6 +2835,8 @@ var DPthree3DMarkers = class {
|
|
|
2815
2835
|
this.stopVisibilityAnimation(true);
|
|
2816
2836
|
if (visible) {
|
|
2817
2837
|
this.markerGroup.visible = true;
|
|
2838
|
+
this.markerLayoutDirty = true;
|
|
2839
|
+
this.update();
|
|
2818
2840
|
}
|
|
2819
2841
|
this.visibilityAnimationStates = this.captureVisibilityAnimationStates();
|
|
2820
2842
|
if (this.visibilityAnimationStates.length === 0) {
|
|
@@ -2877,6 +2899,7 @@ var DPthree3DMarkers = class {
|
|
|
2877
2899
|
this.markerAngleGateVisibility.clear();
|
|
2878
2900
|
this.markerViewportVisibility.clear();
|
|
2879
2901
|
this.soloedMarker = null;
|
|
2902
|
+
this.markerLayoutDirty = false;
|
|
2880
2903
|
this.hasCameraAngleUpdateSnapshot = false;
|
|
2881
2904
|
}
|
|
2882
2905
|
// ============ SOLO MODE ============
|
|
@@ -6559,9 +6582,6 @@ var resolveContinuumDisplayLabel = (profile, negativeAuId, positiveAuId) => requ
|
|
|
6559
6582
|
function inspectModel(model, meshes, profile) {
|
|
6560
6583
|
return new ThreeModelInspector().inspectModel(model, { meshes, profile });
|
|
6561
6584
|
}
|
|
6562
|
-
function getBodyControls(profile, model) {
|
|
6563
|
-
return request2("profile.getBodyControls", { profile, ...model ? { model: inspectModel(model, void 0, profile).descriptor } : {} });
|
|
6564
|
-
}
|
|
6565
6585
|
function extractModelData(model, meshes, animations = []) {
|
|
6566
6586
|
const inspection = inspectModel(model, meshes);
|
|
6567
6587
|
return JSON.parse(requireInitializedEmbodyCore().extract_model_data_json(json(inspection.descriptor), json(serializeAnimationClips(model, animations, inspection))));
|
|
@@ -7413,12 +7433,10 @@ var Embody = class _Embody {
|
|
|
7413
7433
|
return parse(this.core.build_clip(source.name, json2(source.input), json2(buildOptions)));
|
|
7414
7434
|
case "typed":
|
|
7415
7435
|
return parse(this.core.build_typed_clip(source.name, json2(source.input), json2(buildOptions)));
|
|
7416
|
-
case "semantic":
|
|
7417
|
-
return parse(this.core.build_semantic_clip(source.name, json2(source.input), json2(buildOptions)));
|
|
7418
7436
|
case "compiled":
|
|
7419
7437
|
return source.clip;
|
|
7420
7438
|
case "native":
|
|
7421
|
-
throw new Error("Native animation sources do not require
|
|
7439
|
+
throw new Error("Native animation sources do not require AU compilation.");
|
|
7422
7440
|
}
|
|
7423
7441
|
}
|
|
7424
7442
|
restValues(track) {
|
|
@@ -7857,7 +7875,8 @@ var Embody = class _Embody {
|
|
|
7857
7875
|
return this.handle(source, options, play);
|
|
7858
7876
|
}
|
|
7859
7877
|
buildClip(name, curves, options = {}) {
|
|
7860
|
-
|
|
7878
|
+
if (options.semanticAnimation) throw new Error("Decode legacy named animation tracks to numeric AU curves before building a clip.");
|
|
7879
|
+
return this.build({ name, kind: "curves", input: copy(curves), options: copy(options) }, options, false);
|
|
7861
7880
|
}
|
|
7862
7881
|
snippetToClip(name, curves, options = {}) {
|
|
7863
7882
|
return this.buildClip(name, curves, options);
|
|
@@ -7868,9 +7887,6 @@ var Embody = class _Embody {
|
|
|
7868
7887
|
typedSnippetToClip(name, channels, options = {}) {
|
|
7869
7888
|
return this.buildTypedClip(name, channels, options);
|
|
7870
7889
|
}
|
|
7871
|
-
semanticAnimationToClip(name, animation, options = {}) {
|
|
7872
|
-
return this.build({ name, kind: "semantic", input: copy(animation), options: copy(options) }, options, false);
|
|
7873
|
-
}
|
|
7874
7890
|
playSnippet(snippet, curvesOrOptions = {}, options = {}) {
|
|
7875
7891
|
return typeof snippet === "string" ? this.buildClip(snippet, curvesOrOptions, options).play() : this.buildClip(snippet.name, snippet.curves, curvesOrOptions).play();
|
|
7876
7892
|
}
|
|
@@ -8080,26 +8096,8 @@ var Embody = class _Embody {
|
|
|
8080
8096
|
getAUBalance(id) {
|
|
8081
8097
|
return this.core.get_au_balance(id);
|
|
8082
8098
|
}
|
|
8083
|
-
|
|
8084
|
-
return parse(this.core.
|
|
8085
|
-
}
|
|
8086
|
-
getSemanticPoseCatalog() {
|
|
8087
|
-
return parse(this.core.get_semantic_pose_catalog_json());
|
|
8088
|
-
}
|
|
8089
|
-
captureSemanticPose() {
|
|
8090
|
-
return parse(this.core.capture_semantic_pose_json());
|
|
8091
|
-
}
|
|
8092
|
-
validateSemanticPose(pose) {
|
|
8093
|
-
return parse(this.core.validate_semantic_pose_json(json2(pose)));
|
|
8094
|
-
}
|
|
8095
|
-
applySemanticPose(pose) {
|
|
8096
|
-
this.mutateLive(() => this.core.apply_semantic_pose_json(json2(pose)));
|
|
8097
|
-
}
|
|
8098
|
-
validateSemanticAnimation(animation, options = {}) {
|
|
8099
|
-
this.core.validate_semantic_animation_json(json2(animation), json2(options));
|
|
8100
|
-
}
|
|
8101
|
-
resetBodyControls() {
|
|
8102
|
-
this.mutateLive(() => this.core.reset_body_controls());
|
|
8099
|
+
getAUDescriptors() {
|
|
8100
|
+
return parse(this.core.get_au_descriptors_json());
|
|
8103
8101
|
}
|
|
8104
8102
|
setContinuum(negative, positive, value, balance = NaN) {
|
|
8105
8103
|
this.mutateLive(() => this.core.set_continuum(negative, positive, value, balance));
|
|
@@ -9960,6 +9958,6 @@ var collectMorphMeshes = (root) => {
|
|
|
9960
9958
|
return meshes;
|
|
9961
9959
|
};
|
|
9962
9960
|
|
|
9963
|
-
export { BLENDING_MODES, CHARACTER_SCENE_TYPES, CHARACTER_SCENE_TYPE_IDS, DPthreeCameraController as CameraController, CameraDOMControls, CameraDOMControls as Controls, DEFAULT_CHARACTER_LIGHTING_PRESETS, DEFAULT_CHARACTER_LIGHTING_PRESET_ID, DEFAULT_CHARACTER_LIGHTING_PRESET_IDS, DEFAULT_CHARACTER_LIGHTING_SETTINGS, DEFAULT_CHARACTER_SCENE_TYPE_ID, DEFAULT_MARKER_AUTO_HIDE_MS, DEFAULT_PREVIEW_AUTO_CLEAR_MS, DPthree, DPthree3DMarkers, DPthreeCameraController, DPthreeHTMLMarkers, DPthreeMarkers, Embody, DPthree3DMarkers as Markers3D, DPthreeHTMLMarkers as MarkersHTML, RUNTIME_ANNOTATION_REGION_PREFIX, RustAnnotationCameraCore, THREE_BLENDING_MODES, ThreeFrameApplier, ThreeModelInspector, ThreeNativePlaybackConnector, analyzeModel, applyAUBoneBindingUpdate, applyBilateralAxisBindingUpdate, applyBoneAxisBindingUpdate, applyCharacterModelTransform, bindModelReferencePose, boneResolutionProfile, buildBoneAuOptions, buildRegionDisplayOptions, captureModelReferencePose, classifyAuAsJointControl, collectMorphMeshes, computeHumanoidSkeletonTemplateRestBounds, createAnimationClipFromClipIR, createBilateralBoneAxisAu, createBoneAxisAu, createCharacterHost, createDefaultCharacterLighting, createDefaultCharacterScene, createDefaultCharacterSceneAsync, createDefaultCharacterSceneRuntime, createMarkerLifecycleRevealOptions, createMarkerVisibilityLifecycle, createRuntimeAnnotationPreviewLifecycle, createRustAnnotationCameraCore, createRustEmbodyHost, createRustEmbodyHostUnbound, createScenePlaybackFrame, createShadowPlane, createValidationSkeletonFromHumanoidTemplate, detectAnnotationLaterality, disposeCharacterModel, ensureBilateralBoneNodeKeys, ensureBoneNodeKey, extendCharacterConfigWithPreset, extendModelReferencePose, extractHumanoidSkeletonTemplateFromModel, extractModelData, extractProfileOverrides, filterCameraViewRegions, findNodeKeyForBone, formatAxisDirectionLabel, formatAxisLabel, fuzzyNameMatch, getAUBoneBindingState, getAxisFromChannel, getBilateralAxisBindingState,
|
|
9961
|
+
export { BLENDING_MODES, CHARACTER_SCENE_TYPES, CHARACTER_SCENE_TYPE_IDS, DPthreeCameraController as CameraController, CameraDOMControls, CameraDOMControls as Controls, DEFAULT_CHARACTER_LIGHTING_PRESETS, DEFAULT_CHARACTER_LIGHTING_PRESET_ID, DEFAULT_CHARACTER_LIGHTING_PRESET_IDS, DEFAULT_CHARACTER_LIGHTING_SETTINGS, DEFAULT_CHARACTER_SCENE_TYPE_ID, DEFAULT_MARKER_AUTO_HIDE_MS, DEFAULT_PREVIEW_AUTO_CLEAR_MS, DPthree, DPthree3DMarkers, DPthreeCameraController, DPthreeHTMLMarkers, DPthreeMarkers, Embody, DPthree3DMarkers as Markers3D, DPthreeHTMLMarkers as MarkersHTML, RUNTIME_ANNOTATION_REGION_PREFIX, RustAnnotationCameraCore, THREE_BLENDING_MODES, ThreeFrameApplier, ThreeModelInspector, ThreeNativePlaybackConnector, analyzeModel, applyAUBoneBindingUpdate, applyBilateralAxisBindingUpdate, applyBoneAxisBindingUpdate, applyCharacterModelTransform, bindModelReferencePose, boneResolutionProfile, buildBoneAuOptions, buildRegionDisplayOptions, captureModelReferencePose, classifyAuAsJointControl, collectMorphMeshes, computeHumanoidSkeletonTemplateRestBounds, createAnimationClipFromClipIR, createBilateralBoneAxisAu, createBoneAxisAu, createCharacterHost, createDefaultCharacterLighting, createDefaultCharacterScene, createDefaultCharacterSceneAsync, createDefaultCharacterSceneRuntime, createMarkerLifecycleRevealOptions, createMarkerVisibilityLifecycle, createRuntimeAnnotationPreviewLifecycle, createRustAnnotationCameraCore, createRustEmbodyHost, createRustEmbodyHostUnbound, createScenePlaybackFrame, createShadowPlane, createValidationSkeletonFromHumanoidTemplate, detectAnnotationLaterality, disposeCharacterModel, ensureBilateralBoneNodeKeys, ensureBoneNodeKey, extendCharacterConfigWithPreset, extendModelReferencePose, extractHumanoidSkeletonTemplateFromModel, extractModelData, extractProfileOverrides, filterCameraViewRegions, findNodeKeyForBone, formatAxisDirectionLabel, formatAxisLabel, fuzzyNameMatch, getAUBoneBindingState, getAxisFromChannel, getBilateralAxisBindingState, getBoneAxisBindingState, getDefaultAnnotationLaterality, getHumanoidSkeletonTemplate, getHumanoidSkeletonTemplateBoneNames, getHumanoidSpecification, getMeshNamesForAUProfile, getModelLocalOrbitAngle, getPreset, getRuntimeAUMeshSideOffset, getRuntimeAUMorphAnchorPoint, getRuntimeAnnotationSide, getSemanticHorizontalSign, getSemanticHorizontalSignForSide, getWorldDirectionForCameraAngle, hasLeftRightMorphs, inferChiralBoneNamePair, inferEyeControlFamily, inferEyeControlScope, inferRuntimeAnnotationPreviewSide, isJointControlAuInfo, isMaxDegreesOnlyAxisBindingUpdate, isMixedAU, isRuntimeAnnotationRegionName, loadCharacterModel, mergeCharacterRegionsByName, normalizeDefaultCharacterLightingSettings, normalizeHairColorAppearance, parseCharacterModel, passesMarkerCameraAngleGate, pickContinuumAnnotationAuId, renderScenePlayback, resolveAnnotationCharacterConfig, resolveBoneAxisChannel, resolveBoneNameForNodeKey, resolveBoneNames, resolveContinuumDisplayLabel, resolveFaceCenter, resolveHumanoidCharacterization, resolveMarkerAnchorRegion, resolveRegionCameraAngle, resolveRegionVisibilityCameraAngle, resolveVisemeProfile, serializeAnimationClips, setAUMorphTargets, setHumanoidRoleBinding, shouldProjectMarkerAnchorToSurface, shouldUseFaceCenterForMarkerAnchor, stripConfiguredBoneAffixes, supportsRustEmbodyPreset, toWorldDirection, validateHumanoidCharacterization, validateMappings };
|
|
9964
9962
|
//# sourceMappingURL=three.js.map
|
|
9965
9963
|
//# sourceMappingURL=three.js.map
|