@lovelace_lol/embody 0.0.6 → 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.
- package/README.md +541 -2394
- package/dist/index.d.ts +2 -100
- package/dist/index.js +7714 -12951
- package/dist/index.js.map +1 -1
- package/dist/three/annotations/DOMControls.d.ts +73 -0
- package/dist/three/annotations/DPthree.d.ts +113 -0
- package/dist/three/annotations/DPthree3DMarkers.d.ts +319 -0
- package/dist/three/annotations/DPthreeCameraController.d.ts +414 -0
- package/dist/three/annotations/DPthreeHTMLMarkers.d.ts +131 -0
- package/dist/three/annotations/DPthreeMarkers.d.ts +52 -0
- package/dist/three/annotations/adapter.d.ts +157 -0
- package/dist/three/annotations/animationFrameTaskScheduler.d.ts +18 -0
- package/dist/three/annotations/annotationAnchorModel.d.ts +16 -0
- package/dist/three/annotations/annotationCameraCore.d.ts +5 -0
- package/dist/three/annotations/boneResolutionProfile.d.ts +7 -0
- package/dist/three/annotations/index.d.ts +20 -0
- package/dist/three/annotations/loadFrame.d.ts +2 -0
- package/dist/three/annotations/markerSurfaceRaycast.d.ts +11 -0
- package/dist/three/annotations/markerVisibilityLifecycle.d.ts +21 -0
- package/dist/three/annotations/modelRenderPreparation.d.ts +6 -0
- package/dist/three/annotations/runtimeAnnotationPreview.d.ts +15 -0
- package/dist/three/annotations/runtimeAnnotationPreviewSide.d.ts +10 -0
- package/dist/three/annotations/runtimeAnnotationSidePreview.d.ts +5 -0
- package/dist/three/annotations/types.d.ts +262 -0
- package/dist/three/gaze.d.ts +122 -0
- package/dist/three/index.d.ts +147 -0
- package/dist/three/model.d.ts +31 -0
- package/dist/three/modelSkinning.d.ts +3 -0
- package/dist/three/reference-pose.d.ts +73 -0
- package/dist/three/scene.d.ts +253 -0
- package/dist/three/sceneRenderingBinding.d.ts +22 -0
- package/dist/three.js +7696 -8936
- package/dist/three.js.map +1 -1
- package/dist/wasm/README.md +551 -62
- package/dist/wasm/auto.d.ts +1 -0
- package/dist/wasm/embody_wasm.d.ts +388 -52
- package/dist/wasm/embody_wasm.js +1514 -119
- package/dist/wasm/embody_wasm_bg.wasm +0 -0
- package/dist/wasm/embody_wasm_bg.wasm.d.ts +115 -40
- package/dist/wasm/index.d.ts +126 -0
- package/dist/wasm.d.ts +1 -43
- package/dist/wasm.js +1043 -239
- package/dist/wasm.js.map +1 -1
- package/package.json +34 -39
- package/service-worker/character-asset-service-worker.js +295 -0
- package/dist/authoring/boneAuthoring.d.ts +0 -132
- package/dist/camera/annotationCameraAngles.d.ts +0 -28
- package/dist/camera/cameraRelativeGaze.d.ts +0 -15
- package/dist/camera/rustAnnotationCameraCore.d.ts +0 -136
- package/dist/cljs.cjs +0 -362
- package/dist/cljs.cjs.map +0 -1
- package/dist/cljs.d.ts +0 -5
- package/dist/cljs.js +0 -359
- package/dist/cljs.js.map +0 -1
- package/dist/core/TsClipCompiler.d.ts +0 -51
- package/dist/core/WasmRuntimeCore.d.ts +0 -41
- package/dist/core/compositeAxis.d.ts +0 -4
- package/dist/core/contracts/abi.d.ts +0 -70
- package/dist/core/contracts/clip.d.ts +0 -44
- package/dist/core/contracts/frame.d.ts +0 -27
- package/dist/core/contracts/host.d.ts +0 -28
- package/dist/core/contracts/ids.d.ts +0 -15
- package/dist/core/contracts/index.d.ts +0 -10
- package/dist/core/contracts/model.d.ts +0 -31
- package/dist/core/contracts/primitives.d.ts +0 -17
- package/dist/core/contracts/skeletonFit.d.ts +0 -41
- package/dist/core/index.d.ts +0 -6
- package/dist/core/types.d.ts +0 -472
- package/dist/core.cjs +0 -343
- package/dist/core.cjs.map +0 -1
- package/dist/core.js +0 -323
- package/dist/core.js.map +0 -1
- package/dist/engines/three/Embody.d.ts +0 -372
- package/dist/engines/three/ThreeAnimationRuntime.d.ts +0 -203
- package/dist/engines/three/ThreeClipAdapter.d.ts +0 -24
- package/dist/engines/three/ThreeFrameApplier.d.ts +0 -68
- package/dist/engines/three/ThreeModelInspector.d.ts +0 -54
- package/dist/engines/three/bakedClipPartitioning.d.ts +0 -16
- package/dist/engines/three/balanceUtils.d.ts +0 -3
- package/dist/engines/three/characterHost.d.ts +0 -80
- package/dist/engines/three/characterScene.d.ts +0 -98
- package/dist/engines/three/hair/HairPhysicsController.d.ts +0 -124
- package/dist/engines/three/index.d.ts +0 -20
- package/dist/engines/three/modelLoader.d.ts +0 -61
- package/dist/engines/three/profileTestScene.d.ts +0 -52
- package/dist/engines/three/types.d.ts +0 -20
- package/dist/hair/appearance.d.ts +0 -29
- package/dist/index.cjs +0 -14871
- package/dist/index.cjs.map +0 -1
- package/dist/interfaces/Animation.d.ts +0 -315
- package/dist/interfaces/EmbodyRuntime.d.ts +0 -90
- package/dist/interfaces/Hair.d.ts +0 -181
- package/dist/interfaces/HairPhysics.d.ts +0 -90
- package/dist/interfaces/index.d.ts +0 -11
- package/dist/mappings/extendPresetWithProfile.d.ts +0 -17
- package/dist/mappings/types.d.ts +0 -309
- package/dist/mappings/visemeSystem.d.ts +0 -26
- package/dist/physics/HairPhysics.d.ts +0 -86
- package/dist/physics/RustHairPhysics.d.ts +0 -18
- package/dist/physics/index.d.ts +0 -6
- package/dist/preset.cjs +0 -2005
- package/dist/preset.cjs.map +0 -1
- package/dist/preset.js +0 -2003
- package/dist/preset.js.map +0 -1
- package/dist/presets/bettaFish.d.ts +0 -328
- package/dist/presets/cc4.d.ts +0 -145
- package/dist/presets/index.d.ts +0 -30
- package/dist/presets/registry.d.ts +0 -57
- package/dist/profiles/resolveProfileConfig.d.ts +0 -36
- package/dist/profiles/rustResolvedProfile.d.ts +0 -31
- package/dist/profiles/types.d.ts +0 -118
- package/dist/regions/normalizeRegionTree.d.ts +0 -6
- package/dist/regions/regionMapping.d.ts +0 -17
- package/dist/regions/types.d.ts +0 -122
- package/dist/skeletonTemplates/humanoidSkeletonTemplates.d.ts +0 -32
- package/dist/test/setupWasm.d.ts +0 -1
- package/dist/three.cjs +0 -9550
- package/dist/three.cjs.map +0 -1
- package/dist/validation/analyzeModel.d.ts +0 -68
- package/dist/validation/extractModelData.d.ts +0 -90
- package/dist/validation/generateMappingCorrections.d.ts +0 -32
- package/dist/validation/geometryHelpers.d.ts +0 -66
- package/dist/validation/types.d.ts +0 -10
- package/dist/validation/validateMappings.d.ts +0 -77
- package/dist/wasm.cjs +0 -302
- package/dist/wasm.cjs.map +0 -1
- package/dist/wasmTypes.d.ts +0 -123
package/dist/wasm/embody_wasm.js
CHANGED
|
@@ -199,6 +199,18 @@ export class RuntimeCore {
|
|
|
199
199
|
const ret = wasm.runtimecore_active_transition_count(this.__wbg_ptr);
|
|
200
200
|
return ret >>> 0;
|
|
201
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* Validate every channel before replacing Body state. Other FACS state remains.
|
|
204
|
+
* @param {string} json
|
|
205
|
+
*/
|
|
206
|
+
apply_semantic_pose_json(json) {
|
|
207
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
208
|
+
const len0 = WASM_VECTOR_LEN;
|
|
209
|
+
const ret = wasm.runtimecore_apply_semantic_pose_json(this.__wbg_ptr, ptr0, len0);
|
|
210
|
+
if (ret[1]) {
|
|
211
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
202
214
|
/**
|
|
203
215
|
* @returns {number}
|
|
204
216
|
*/
|
|
@@ -206,6 +218,123 @@ export class RuntimeCore {
|
|
|
206
218
|
const ret = wasm.runtimecore_au_morph_binding_stride();
|
|
207
219
|
return ret >>> 0;
|
|
208
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* @param {string} clip_name
|
|
223
|
+
* @param {string} curves_json
|
|
224
|
+
* @param {string} options_json
|
|
225
|
+
* @returns {string}
|
|
226
|
+
*/
|
|
227
|
+
build_clip(clip_name, curves_json, options_json) {
|
|
228
|
+
let deferred5_0;
|
|
229
|
+
let deferred5_1;
|
|
230
|
+
try {
|
|
231
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
232
|
+
const len0 = WASM_VECTOR_LEN;
|
|
233
|
+
const ptr1 = passStringToWasm0(curves_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
234
|
+
const len1 = WASM_VECTOR_LEN;
|
|
235
|
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
236
|
+
const len2 = WASM_VECTOR_LEN;
|
|
237
|
+
const ret = wasm.runtimecore_build_clip(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
238
|
+
var ptr4 = ret[0];
|
|
239
|
+
var len4 = ret[1];
|
|
240
|
+
if (ret[3]) {
|
|
241
|
+
ptr4 = 0; len4 = 0;
|
|
242
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
243
|
+
}
|
|
244
|
+
deferred5_0 = ptr4;
|
|
245
|
+
deferred5_1 = len4;
|
|
246
|
+
return getStringFromWasm0(ptr4, len4);
|
|
247
|
+
} finally {
|
|
248
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Compile semantic motions and optional facial curves together without changing live state.
|
|
253
|
+
* @param {string} name
|
|
254
|
+
* @param {string} json
|
|
255
|
+
* @param {string} options_json
|
|
256
|
+
* @returns {string}
|
|
257
|
+
*/
|
|
258
|
+
build_semantic_clip(name, json, options_json) {
|
|
259
|
+
let deferred5_0;
|
|
260
|
+
let deferred5_1;
|
|
261
|
+
try {
|
|
262
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
263
|
+
const len0 = WASM_VECTOR_LEN;
|
|
264
|
+
const ptr1 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
265
|
+
const len1 = WASM_VECTOR_LEN;
|
|
266
|
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
267
|
+
const len2 = WASM_VECTOR_LEN;
|
|
268
|
+
const ret = wasm.runtimecore_build_semantic_clip(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
269
|
+
var ptr4 = ret[0];
|
|
270
|
+
var len4 = ret[1];
|
|
271
|
+
if (ret[3]) {
|
|
272
|
+
ptr4 = 0; len4 = 0;
|
|
273
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
274
|
+
}
|
|
275
|
+
deferred5_0 = ptr4;
|
|
276
|
+
deferred5_1 = len4;
|
|
277
|
+
return getStringFromWasm0(ptr4, len4);
|
|
278
|
+
} finally {
|
|
279
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* @param {string} clip_name
|
|
284
|
+
* @param {string} channels_json
|
|
285
|
+
* @param {string} options_json
|
|
286
|
+
* @returns {string}
|
|
287
|
+
*/
|
|
288
|
+
build_typed_clip(clip_name, channels_json, options_json) {
|
|
289
|
+
let deferred5_0;
|
|
290
|
+
let deferred5_1;
|
|
291
|
+
try {
|
|
292
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
293
|
+
const len0 = WASM_VECTOR_LEN;
|
|
294
|
+
const ptr1 = passStringToWasm0(channels_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
295
|
+
const len1 = WASM_VECTOR_LEN;
|
|
296
|
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
297
|
+
const len2 = WASM_VECTOR_LEN;
|
|
298
|
+
const ret = wasm.runtimecore_build_typed_clip(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
299
|
+
var ptr4 = ret[0];
|
|
300
|
+
var len4 = ret[1];
|
|
301
|
+
if (ret[3]) {
|
|
302
|
+
ptr4 = 0; len4 = 0;
|
|
303
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
304
|
+
}
|
|
305
|
+
deferred5_0 = ptr4;
|
|
306
|
+
deferred5_1 = len4;
|
|
307
|
+
return getStringFromWasm0(ptr4, len4);
|
|
308
|
+
} finally {
|
|
309
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Captures manual semantic state; does not infer actions from a mixer pose.
|
|
314
|
+
* @returns {string}
|
|
315
|
+
*/
|
|
316
|
+
capture_semantic_pose_json() {
|
|
317
|
+
let deferred1_0;
|
|
318
|
+
let deferred1_1;
|
|
319
|
+
try {
|
|
320
|
+
const ret = wasm.runtimecore_capture_semantic_pose_json(this.__wbg_ptr);
|
|
321
|
+
deferred1_0 = ret[0];
|
|
322
|
+
deferred1_1 = ret[1];
|
|
323
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
324
|
+
} finally {
|
|
325
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* @param {string} clip_name
|
|
330
|
+
* @returns {boolean}
|
|
331
|
+
*/
|
|
332
|
+
cleanup_snippet(clip_name) {
|
|
333
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
334
|
+
const len0 = WASM_VECTOR_LEN;
|
|
335
|
+
const ret = wasm.runtimecore_cleanup_snippet(this.__wbg_ptr, ptr0, len0);
|
|
336
|
+
return ret !== 0;
|
|
337
|
+
}
|
|
209
338
|
clear() {
|
|
210
339
|
wasm.runtimecore_clear(this.__wbg_ptr);
|
|
211
340
|
}
|
|
@@ -253,9 +382,9 @@ export class RuntimeCore {
|
|
|
253
382
|
/**
|
|
254
383
|
* Configure from a resolved profile without applying an embedded preset.
|
|
255
384
|
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
* an
|
|
385
|
+
* Empty profiles and mappings that do not match the current model are
|
|
386
|
+
* non-fatal. Static imports can render before authoring any bindings,
|
|
387
|
+
* without silently substituting an embedded preset.
|
|
259
388
|
* @param {string} profile_json
|
|
260
389
|
* @param {string} model_json
|
|
261
390
|
*/
|
|
@@ -269,6 +398,83 @@ export class RuntimeCore {
|
|
|
269
398
|
throw takeFromExternrefTable0(ret[0]);
|
|
270
399
|
}
|
|
271
400
|
}
|
|
401
|
+
/**
|
|
402
|
+
* Host-owned crossfade marker. Rust does not lerp; the host mixer should fade.
|
|
403
|
+
* @param {string} clip_name
|
|
404
|
+
* @param {number} _duration
|
|
405
|
+
* @param {string} options_json
|
|
406
|
+
* @returns {string}
|
|
407
|
+
*/
|
|
408
|
+
crossfade_to(clip_name, _duration, options_json) {
|
|
409
|
+
let deferred4_0;
|
|
410
|
+
let deferred4_1;
|
|
411
|
+
try {
|
|
412
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
413
|
+
const len0 = WASM_VECTOR_LEN;
|
|
414
|
+
const ptr1 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
415
|
+
const len1 = WASM_VECTOR_LEN;
|
|
416
|
+
const ret = wasm.runtimecore_crossfade_to(this.__wbg_ptr, ptr0, len0, _duration, ptr1, len1);
|
|
417
|
+
var ptr3 = ret[0];
|
|
418
|
+
var len3 = ret[1];
|
|
419
|
+
if (ret[3]) {
|
|
420
|
+
ptr3 = 0; len3 = 0;
|
|
421
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
422
|
+
}
|
|
423
|
+
deferred4_0 = ptr3;
|
|
424
|
+
deferred4_1 = len3;
|
|
425
|
+
return getStringFromWasm0(ptr3, len3);
|
|
426
|
+
} finally {
|
|
427
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* @returns {string}
|
|
432
|
+
*/
|
|
433
|
+
drain_animation_events() {
|
|
434
|
+
let deferred2_0;
|
|
435
|
+
let deferred2_1;
|
|
436
|
+
try {
|
|
437
|
+
const ret = wasm.runtimecore_drain_animation_events(this.__wbg_ptr);
|
|
438
|
+
var ptr1 = ret[0];
|
|
439
|
+
var len1 = ret[1];
|
|
440
|
+
if (ret[3]) {
|
|
441
|
+
ptr1 = 0; len1 = 0;
|
|
442
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
443
|
+
}
|
|
444
|
+
deferred2_0 = ptr1;
|
|
445
|
+
deferred2_1 = len1;
|
|
446
|
+
return getStringFromWasm0(ptr1, len1);
|
|
447
|
+
} finally {
|
|
448
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
/**
|
|
452
|
+
* Same rows as `evaluate_bone_frame_delta`, but only bones an active AU,
|
|
453
|
+
* translation, or viseme jaw value is currently rotating or moving.
|
|
454
|
+
* Neutral bones are omitted (no rest reset), so hosts can re-apply this
|
|
455
|
+
* after mixer playback without freezing clip-driven bones (Loom3 parity).
|
|
456
|
+
* @returns {Float32Array}
|
|
457
|
+
*/
|
|
458
|
+
evaluate_active_bone_frame() {
|
|
459
|
+
const ret = wasm.runtimecore_evaluate_active_bone_frame(this.__wbg_ptr);
|
|
460
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
461
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
462
|
+
return v1;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Same rows as `evaluate_morph_frame_delta`, but only channels with a
|
|
466
|
+
* non-zero live value or an explicit direct override (including zero).
|
|
467
|
+
* Hosts re-apply this after mixer playback so live
|
|
468
|
+
* AU/viseme state wins over clip tracks (Loom3 parity) without resetting
|
|
469
|
+
* channels the mixer owns.
|
|
470
|
+
* @returns {Float32Array}
|
|
471
|
+
*/
|
|
472
|
+
evaluate_active_morph_frame() {
|
|
473
|
+
const ret = wasm.runtimecore_evaluate_active_morph_frame(this.__wbg_ptr);
|
|
474
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
475
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
476
|
+
return v1;
|
|
477
|
+
}
|
|
272
478
|
/**
|
|
273
479
|
* Packed bone FrameDelta rows: `[bone_id, px, py, pz, qx, qy, qz, qw, flags] * N`
|
|
274
480
|
* flags: bit0 = has_position, bit1 = has_rotation. Composite rotations are
|
|
@@ -284,6 +490,7 @@ export class RuntimeCore {
|
|
|
284
490
|
}
|
|
285
491
|
/**
|
|
286
492
|
* Packed morph FrameDelta rows: `[mesh_id, morph_target_id, value, mode] * N`
|
|
493
|
+
* Live AU/viseme/direct morph state only — clip playback is host-owned.
|
|
287
494
|
* @returns {Float32Array}
|
|
288
495
|
*/
|
|
289
496
|
evaluate_morph_frame_delta() {
|
|
@@ -292,6 +499,108 @@ export class RuntimeCore {
|
|
|
292
499
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
293
500
|
return v1;
|
|
294
501
|
}
|
|
502
|
+
/**
|
|
503
|
+
* Emit only currently/previously owned bone properties. Position and
|
|
504
|
+
* rotation ownership are separate; inactive properties release once.
|
|
505
|
+
* @returns {Float32Array}
|
|
506
|
+
*/
|
|
507
|
+
evaluate_procedural_bone_frame() {
|
|
508
|
+
const ret = wasm.runtimecore_evaluate_procedural_bone_frame(this.__wbg_ptr);
|
|
509
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
510
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
511
|
+
return v1;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Emit active morphs plus one neutral release for previously owned
|
|
515
|
+
* targets. Direct overrides, including explicit zero, retain ownership.
|
|
516
|
+
* Untouched targets are omitted so constant mixer tracks keep their pose.
|
|
517
|
+
* @returns {Float32Array}
|
|
518
|
+
*/
|
|
519
|
+
evaluate_procedural_morph_frame() {
|
|
520
|
+
const ret = wasm.runtimecore_evaluate_procedural_morph_frame(this.__wbg_ptr);
|
|
521
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
522
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
523
|
+
return v1;
|
|
524
|
+
}
|
|
525
|
+
/**
|
|
526
|
+
* Scene extras for live state. Clip-driven scale/visibility/object writes
|
|
527
|
+
* are owned by the host mixer, so this returns an empty frame.
|
|
528
|
+
* @returns {string}
|
|
529
|
+
*/
|
|
530
|
+
evaluate_scene_frame() {
|
|
531
|
+
let deferred2_0;
|
|
532
|
+
let deferred2_1;
|
|
533
|
+
try {
|
|
534
|
+
const ret = wasm.runtimecore_evaluate_scene_frame(this.__wbg_ptr);
|
|
535
|
+
var ptr1 = ret[0];
|
|
536
|
+
var len1 = ret[1];
|
|
537
|
+
if (ret[3]) {
|
|
538
|
+
ptr1 = 0; len1 = 0;
|
|
539
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
540
|
+
}
|
|
541
|
+
deferred2_0 = ptr1;
|
|
542
|
+
deferred2_1 = len1;
|
|
543
|
+
return getStringFromWasm0(ptr1, len1);
|
|
544
|
+
} finally {
|
|
545
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Full Body property writes, including neutral reference values. Hosts use
|
|
550
|
+
* this once when an explicit pose replaces direct legacy bone edits.
|
|
551
|
+
* @returns {Float32Array}
|
|
552
|
+
*/
|
|
553
|
+
evaluate_semantic_body_bone_frame() {
|
|
554
|
+
const ret = wasm.runtimecore_evaluate_semantic_body_bone_frame(this.__wbg_ptr);
|
|
555
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
556
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
557
|
+
return v1;
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* @returns {string}
|
|
561
|
+
*/
|
|
562
|
+
get_animation_clips() {
|
|
563
|
+
let deferred2_0;
|
|
564
|
+
let deferred2_1;
|
|
565
|
+
try {
|
|
566
|
+
const ret = wasm.runtimecore_get_animation_clips(this.__wbg_ptr);
|
|
567
|
+
var ptr1 = ret[0];
|
|
568
|
+
var len1 = ret[1];
|
|
569
|
+
if (ret[3]) {
|
|
570
|
+
ptr1 = 0; len1 = 0;
|
|
571
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
572
|
+
}
|
|
573
|
+
deferred2_0 = ptr1;
|
|
574
|
+
deferred2_1 = len1;
|
|
575
|
+
return getStringFromWasm0(ptr1, len1);
|
|
576
|
+
} finally {
|
|
577
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* @param {string} clip_name
|
|
582
|
+
* @returns {string}
|
|
583
|
+
*/
|
|
584
|
+
get_animation_state(clip_name) {
|
|
585
|
+
let deferred3_0;
|
|
586
|
+
let deferred3_1;
|
|
587
|
+
try {
|
|
588
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
589
|
+
const len0 = WASM_VECTOR_LEN;
|
|
590
|
+
const ret = wasm.runtimecore_get_animation_state(this.__wbg_ptr, ptr0, len0);
|
|
591
|
+
var ptr2 = ret[0];
|
|
592
|
+
var len2 = ret[1];
|
|
593
|
+
if (ret[3]) {
|
|
594
|
+
ptr2 = 0; len2 = 0;
|
|
595
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
596
|
+
}
|
|
597
|
+
deferred3_0 = ptr2;
|
|
598
|
+
deferred3_1 = len2;
|
|
599
|
+
return getStringFromWasm0(ptr2, len2);
|
|
600
|
+
} finally {
|
|
601
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
295
604
|
/**
|
|
296
605
|
* @param {number} id
|
|
297
606
|
* @returns {number}
|
|
@@ -300,6 +609,41 @@ export class RuntimeCore {
|
|
|
300
609
|
const ret = wasm.runtimecore_get_au(this.__wbg_ptr, id);
|
|
301
610
|
return ret;
|
|
302
611
|
}
|
|
612
|
+
/**
|
|
613
|
+
* Stored live AU balance in [-1, 1], or neutral zero when unset or cleared.
|
|
614
|
+
* @param {number} id
|
|
615
|
+
* @returns {number}
|
|
616
|
+
*/
|
|
617
|
+
get_au_balance(id) {
|
|
618
|
+
const ret = wasm.runtimecore_get_au_balance(this.__wbg_ptr, id);
|
|
619
|
+
return ret;
|
|
620
|
+
}
|
|
621
|
+
/**
|
|
622
|
+
* Current runtime tissue strength, independent of persisted profile defaults.
|
|
623
|
+
* @param {number} id
|
|
624
|
+
* @returns {number}
|
|
625
|
+
*/
|
|
626
|
+
get_au_mix_weight(id) {
|
|
627
|
+
const ret = wasm.runtimecore_get_au_mix_weight(this.__wbg_ptr, id);
|
|
628
|
+
return ret;
|
|
629
|
+
}
|
|
630
|
+
/**
|
|
631
|
+
* Resolved Body descriptors for the configured profile/model. Model
|
|
632
|
+
* inspection and descriptor resolution are cached until reconfiguration.
|
|
633
|
+
* @returns {string}
|
|
634
|
+
*/
|
|
635
|
+
get_body_controls_json() {
|
|
636
|
+
let deferred1_0;
|
|
637
|
+
let deferred1_1;
|
|
638
|
+
try {
|
|
639
|
+
const ret = wasm.runtimecore_get_body_controls_json(this.__wbg_ptr);
|
|
640
|
+
deferred1_0 = ret[0];
|
|
641
|
+
deferred1_1 = ret[1];
|
|
642
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
643
|
+
} finally {
|
|
644
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
303
647
|
/**
|
|
304
648
|
* @param {number} neg_au
|
|
305
649
|
* @param {number} pos_au
|
|
@@ -309,6 +653,73 @@ export class RuntimeCore {
|
|
|
309
653
|
const ret = wasm.runtimecore_get_continuum(this.__wbg_ptr, neg_au, pos_au);
|
|
310
654
|
return ret;
|
|
311
655
|
}
|
|
656
|
+
/**
|
|
657
|
+
* @returns {string}
|
|
658
|
+
*/
|
|
659
|
+
get_playing_animations() {
|
|
660
|
+
let deferred2_0;
|
|
661
|
+
let deferred2_1;
|
|
662
|
+
try {
|
|
663
|
+
const ret = wasm.runtimecore_get_playing_animations(this.__wbg_ptr);
|
|
664
|
+
var ptr1 = ret[0];
|
|
665
|
+
var len1 = ret[1];
|
|
666
|
+
if (ret[3]) {
|
|
667
|
+
ptr1 = 0; len1 = 0;
|
|
668
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
669
|
+
}
|
|
670
|
+
deferred2_0 = ptr1;
|
|
671
|
+
deferred2_1 = len1;
|
|
672
|
+
return getStringFromWasm0(ptr1, len1);
|
|
673
|
+
} finally {
|
|
674
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Profile-derived motions and resolved model support for prompt/pose editors.
|
|
679
|
+
* @returns {string}
|
|
680
|
+
*/
|
|
681
|
+
get_semantic_pose_catalog_json() {
|
|
682
|
+
let deferred1_0;
|
|
683
|
+
let deferred1_1;
|
|
684
|
+
try {
|
|
685
|
+
const ret = wasm.runtimecore_get_semantic_pose_catalog_json(this.__wbg_ptr);
|
|
686
|
+
deferred1_0 = ret[0];
|
|
687
|
+
deferred1_1 = ret[1];
|
|
688
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
689
|
+
} finally {
|
|
690
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
/**
|
|
694
|
+
* Stored direct viseme value, or zero for an unset or out-of-range slot.
|
|
695
|
+
* Host mixer output is not part of this live control state.
|
|
696
|
+
* @param {number} index
|
|
697
|
+
* @returns {number}
|
|
698
|
+
*/
|
|
699
|
+
get_viseme(index) {
|
|
700
|
+
const ret = wasm.runtimecore_get_viseme(this.__wbg_ptr, index);
|
|
701
|
+
return ret;
|
|
702
|
+
}
|
|
703
|
+
/**
|
|
704
|
+
* Stored direct viseme jaw scale, or one for an unset or out-of-range slot.
|
|
705
|
+
* @param {number} index
|
|
706
|
+
* @returns {number}
|
|
707
|
+
*/
|
|
708
|
+
get_viseme_jaw_scale(index) {
|
|
709
|
+
const ret = wasm.runtimecore_get_viseme_jaw_scale(this.__wbg_ptr, index);
|
|
710
|
+
return ret;
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* @param {string} clips_json
|
|
714
|
+
*/
|
|
715
|
+
load_animation_clips(clips_json) {
|
|
716
|
+
const ptr0 = passStringToWasm0(clips_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
717
|
+
const len0 = WASM_VECTOR_LEN;
|
|
718
|
+
const ret = wasm.runtimecore_load_animation_clips(this.__wbg_ptr, ptr0, len0);
|
|
719
|
+
if (ret[1]) {
|
|
720
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
312
723
|
/**
|
|
313
724
|
* Packed rows: `[au_id, side, mesh_id, morph_target_id, weight] * N`
|
|
314
725
|
* side: 0=left, 1=right, 2=center
|
|
@@ -385,6 +796,289 @@ export class RuntimeCore {
|
|
|
385
796
|
RuntimeCoreFinalization.register(this, this.__wbg_ptr, this);
|
|
386
797
|
return this;
|
|
387
798
|
}
|
|
799
|
+
pause_all_animations() {
|
|
800
|
+
wasm.runtimecore_pause_all_animations(this.__wbg_ptr);
|
|
801
|
+
}
|
|
802
|
+
/**
|
|
803
|
+
* @param {string} clip_name
|
|
804
|
+
*/
|
|
805
|
+
pause_animation(clip_name) {
|
|
806
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
807
|
+
const len0 = WASM_VECTOR_LEN;
|
|
808
|
+
wasm.runtimecore_pause_animation(this.__wbg_ptr, ptr0, len0);
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Registry lookup only. Host animation libraries own play/lerp; this returns
|
|
812
|
+
* a host-owned action id marker when the clip exists in the registry.
|
|
813
|
+
* @param {string} clip_name
|
|
814
|
+
* @param {string} _options_json
|
|
815
|
+
* @returns {string}
|
|
816
|
+
*/
|
|
817
|
+
play_animation(clip_name, _options_json) {
|
|
818
|
+
let deferred4_0;
|
|
819
|
+
let deferred4_1;
|
|
820
|
+
try {
|
|
821
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
822
|
+
const len0 = WASM_VECTOR_LEN;
|
|
823
|
+
const ptr1 = passStringToWasm0(_options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
824
|
+
const len1 = WASM_VECTOR_LEN;
|
|
825
|
+
const ret = wasm.runtimecore_play_animation(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
826
|
+
var ptr3 = ret[0];
|
|
827
|
+
var len3 = ret[1];
|
|
828
|
+
if (ret[3]) {
|
|
829
|
+
ptr3 = 0; len3 = 0;
|
|
830
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
831
|
+
}
|
|
832
|
+
deferred4_0 = ptr3;
|
|
833
|
+
deferred4_1 = len3;
|
|
834
|
+
return getStringFromWasm0(ptr3, len3);
|
|
835
|
+
} finally {
|
|
836
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
/**
|
|
840
|
+
* @param {string} clip_name
|
|
841
|
+
* @param {string} curves_json
|
|
842
|
+
* @param {string} options_json
|
|
843
|
+
* @returns {string}
|
|
844
|
+
*/
|
|
845
|
+
play_snippet(clip_name, curves_json, options_json) {
|
|
846
|
+
let deferred5_0;
|
|
847
|
+
let deferred5_1;
|
|
848
|
+
try {
|
|
849
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
850
|
+
const len0 = WASM_VECTOR_LEN;
|
|
851
|
+
const ptr1 = passStringToWasm0(curves_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
852
|
+
const len1 = WASM_VECTOR_LEN;
|
|
853
|
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
854
|
+
const len2 = WASM_VECTOR_LEN;
|
|
855
|
+
const ret = wasm.runtimecore_play_snippet(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
856
|
+
var ptr4 = ret[0];
|
|
857
|
+
var len4 = ret[1];
|
|
858
|
+
if (ret[3]) {
|
|
859
|
+
ptr4 = 0; len4 = 0;
|
|
860
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
861
|
+
}
|
|
862
|
+
deferred5_0 = ptr4;
|
|
863
|
+
deferred5_1 = len4;
|
|
864
|
+
return getStringFromWasm0(ptr4, len4);
|
|
865
|
+
} finally {
|
|
866
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
/**
|
|
870
|
+
* @param {string} clip_name
|
|
871
|
+
* @param {string} channels_json
|
|
872
|
+
* @param {string} options_json
|
|
873
|
+
* @returns {string}
|
|
874
|
+
*/
|
|
875
|
+
play_typed_snippet(clip_name, channels_json, options_json) {
|
|
876
|
+
let deferred5_0;
|
|
877
|
+
let deferred5_1;
|
|
878
|
+
try {
|
|
879
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
880
|
+
const len0 = WASM_VECTOR_LEN;
|
|
881
|
+
const ptr1 = passStringToWasm0(channels_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
882
|
+
const len1 = WASM_VECTOR_LEN;
|
|
883
|
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
884
|
+
const len2 = WASM_VECTOR_LEN;
|
|
885
|
+
const ret = wasm.runtimecore_play_typed_snippet(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
886
|
+
var ptr4 = ret[0];
|
|
887
|
+
var len4 = ret[1];
|
|
888
|
+
if (ret[3]) {
|
|
889
|
+
ptr4 = 0; len4 = 0;
|
|
890
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
891
|
+
}
|
|
892
|
+
deferred5_0 = ptr4;
|
|
893
|
+
deferred5_1 = len4;
|
|
894
|
+
return getStringFromWasm0(ptr4, len4);
|
|
895
|
+
} finally {
|
|
896
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* @param {string} clip_json
|
|
901
|
+
* @param {string} source
|
|
902
|
+
*/
|
|
903
|
+
register_animation_clip(clip_json, source) {
|
|
904
|
+
const ptr0 = passStringToWasm0(clip_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
905
|
+
const len0 = WASM_VECTOR_LEN;
|
|
906
|
+
const ptr1 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
907
|
+
const len1 = WASM_VECTOR_LEN;
|
|
908
|
+
const ret = wasm.runtimecore_register_animation_clip(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
909
|
+
if (ret[1]) {
|
|
910
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
/**
|
|
914
|
+
* Release a direct morph override so AU/viseme/mixer ownership can resume.
|
|
915
|
+
* A deliberate `set_morph(..., 0, ...)` still owns and masks the target;
|
|
916
|
+
* preview cleanup must release instead of installing a permanent zero.
|
|
917
|
+
* Target selection matches `set_morph`; returns overrides actually removed.
|
|
918
|
+
* @param {string} morph_name
|
|
919
|
+
* @param {string} mesh_names_json
|
|
920
|
+
* @returns {number}
|
|
921
|
+
*/
|
|
922
|
+
release_morph(morph_name, mesh_names_json) {
|
|
923
|
+
const ptr0 = passStringToWasm0(morph_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
924
|
+
const len0 = WASM_VECTOR_LEN;
|
|
925
|
+
const ptr1 = passStringToWasm0(mesh_names_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
926
|
+
const len1 = WASM_VECTOR_LEN;
|
|
927
|
+
const ret = wasm.runtimecore_release_morph(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
928
|
+
return ret >>> 0;
|
|
929
|
+
}
|
|
930
|
+
/**
|
|
931
|
+
* Index counterpart to `release_morph`, with `set_morph_index` selection.
|
|
932
|
+
* @param {number} morph_index
|
|
933
|
+
* @param {string} mesh_names_json
|
|
934
|
+
* @returns {number}
|
|
935
|
+
*/
|
|
936
|
+
release_morph_index(morph_index, mesh_names_json) {
|
|
937
|
+
const ptr0 = passStringToWasm0(mesh_names_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
938
|
+
const len0 = WASM_VECTOR_LEN;
|
|
939
|
+
const ret = wasm.runtimecore_release_morph_index(this.__wbg_ptr, morph_index, ptr0, len0);
|
|
940
|
+
return ret >>> 0;
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* Release owned morphs through the old renderer binding IDs before rebind.
|
|
944
|
+
* @returns {Float32Array}
|
|
945
|
+
*/
|
|
946
|
+
release_procedural_morph_frame() {
|
|
947
|
+
const ret = wasm.runtimecore_release_procedural_morph_frame(this.__wbg_ptr);
|
|
948
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
949
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
950
|
+
return v1;
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* @param {string} clip_name
|
|
954
|
+
* @returns {boolean}
|
|
955
|
+
*/
|
|
956
|
+
remove_animation_clip(clip_name) {
|
|
957
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
958
|
+
const len0 = WASM_VECTOR_LEN;
|
|
959
|
+
const ret = wasm.runtimecore_remove_animation_clip(this.__wbg_ptr, ptr0, len0);
|
|
960
|
+
return ret !== 0;
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* Clear each unique configured Body action and bilateral balance together.
|
|
964
|
+
* Shared facial aliases are Body actions too. Preserve other actions,
|
|
965
|
+
* visemes, direct morph overrides, and authored/current morph mix weights.
|
|
966
|
+
*/
|
|
967
|
+
reset_body_controls() {
|
|
968
|
+
wasm.runtimecore_reset_body_controls(this.__wbg_ptr);
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* Forget ownership when renderer bindings are discarded. Before replacing
|
|
972
|
+
* bindings, apply release_procedural_morph_frame through the old IDs.
|
|
973
|
+
* Normal clear/reset deliberately retain tracking for the next frame.
|
|
974
|
+
*/
|
|
975
|
+
reset_procedural_frame_tracking() {
|
|
976
|
+
wasm.runtimecore_reset_procedural_frame_tracking(this.__wbg_ptr);
|
|
977
|
+
}
|
|
978
|
+
resume_all_animations() {
|
|
979
|
+
wasm.runtimecore_resume_all_animations(this.__wbg_ptr);
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* @param {string} clip_name
|
|
983
|
+
*/
|
|
984
|
+
resume_animation(clip_name) {
|
|
985
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
986
|
+
const len0 = WASM_VECTOR_LEN;
|
|
987
|
+
wasm.runtimecore_resume_animation(this.__wbg_ptr, ptr0, len0);
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* @param {string} clip_name
|
|
991
|
+
* @param {number} time
|
|
992
|
+
*/
|
|
993
|
+
seek_animation(clip_name, time) {
|
|
994
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
995
|
+
const len0 = WASM_VECTOR_LEN;
|
|
996
|
+
wasm.runtimecore_seek_animation(this.__wbg_ptr, ptr0, len0, time);
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* @param {string} clip_name
|
|
1000
|
+
* @param {string} blend_mode
|
|
1001
|
+
*/
|
|
1002
|
+
set_animation_blend_mode(clip_name, blend_mode) {
|
|
1003
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1004
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1005
|
+
const ptr1 = passStringToWasm0(blend_mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1006
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1007
|
+
const ret = wasm.runtimecore_set_animation_blend_mode(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1008
|
+
if (ret[1]) {
|
|
1009
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* @param {string} clip_name
|
|
1014
|
+
* @param {string} easing
|
|
1015
|
+
*/
|
|
1016
|
+
set_animation_easing(clip_name, easing) {
|
|
1017
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1018
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1019
|
+
const ptr1 = passStringToWasm0(easing, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1020
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1021
|
+
const ret = wasm.runtimecore_set_animation_easing(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1022
|
+
if (ret[1]) {
|
|
1023
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
/**
|
|
1027
|
+
* @param {string} clip_name
|
|
1028
|
+
* @param {number} intensity
|
|
1029
|
+
*/
|
|
1030
|
+
set_animation_intensity(clip_name, intensity) {
|
|
1031
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1032
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1033
|
+
wasm.runtimecore_set_animation_intensity(this.__wbg_ptr, ptr0, len0, intensity);
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* @param {string} clip_name
|
|
1037
|
+
* @param {string} loop_mode
|
|
1038
|
+
*/
|
|
1039
|
+
set_animation_loop_mode(clip_name, loop_mode) {
|
|
1040
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1041
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1042
|
+
const ptr1 = passStringToWasm0(loop_mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1043
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1044
|
+
const ret = wasm.runtimecore_set_animation_loop_mode(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1045
|
+
if (ret[1]) {
|
|
1046
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
/**
|
|
1050
|
+
* @param {string} clip_name
|
|
1051
|
+
* @param {number} repeat_count
|
|
1052
|
+
*/
|
|
1053
|
+
set_animation_repeat_count(clip_name, repeat_count) {
|
|
1054
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1055
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1056
|
+
wasm.runtimecore_set_animation_repeat_count(this.__wbg_ptr, ptr0, len0, repeat_count);
|
|
1057
|
+
}
|
|
1058
|
+
/**
|
|
1059
|
+
* @param {string} clip_name
|
|
1060
|
+
* @param {boolean} reverse
|
|
1061
|
+
*/
|
|
1062
|
+
set_animation_reverse(clip_name, reverse) {
|
|
1063
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1064
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1065
|
+
wasm.runtimecore_set_animation_reverse(this.__wbg_ptr, ptr0, len0, reverse);
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* @param {string} clip_name
|
|
1069
|
+
* @param {number} speed
|
|
1070
|
+
*/
|
|
1071
|
+
set_animation_speed(clip_name, speed) {
|
|
1072
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1073
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1074
|
+
wasm.runtimecore_set_animation_speed(this.__wbg_ptr, ptr0, len0, speed);
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* @param {number} time_scale
|
|
1078
|
+
*/
|
|
1079
|
+
set_animation_time_scale(time_scale) {
|
|
1080
|
+
wasm.runtimecore_set_animation_time_scale(this.__wbg_ptr, time_scale);
|
|
1081
|
+
}
|
|
388
1082
|
/**
|
|
389
1083
|
* @param {number} id
|
|
390
1084
|
* @param {number} value
|
|
@@ -401,8 +1095,9 @@ export class RuntimeCore {
|
|
|
401
1095
|
wasm.runtimecore_set_au_mix_weight(this.__wbg_ptr, id, weight);
|
|
402
1096
|
}
|
|
403
1097
|
/**
|
|
404
|
-
*
|
|
405
|
-
*
|
|
1098
|
+
* Manual directional command: a nonzero value owns its configured pair.
|
|
1099
|
+
* Negative values select the opposite direction. Zero clears only the
|
|
1100
|
+
* named AU, so releasing an inactive slider does not stop its partner.
|
|
406
1101
|
* @param {number} id
|
|
407
1102
|
* @param {number} value
|
|
408
1103
|
* @param {number} balance
|
|
@@ -428,17 +1123,43 @@ export class RuntimeCore {
|
|
|
428
1123
|
wasm.runtimecore_set_mixed_aus(this.__wbg_ptr, ptr0, len0);
|
|
429
1124
|
}
|
|
430
1125
|
/**
|
|
431
|
-
* @param {
|
|
1126
|
+
* @param {string} morph_name
|
|
432
1127
|
* @param {number} value
|
|
1128
|
+
* @param {string} mesh_names_json
|
|
1129
|
+
* @returns {number}
|
|
433
1130
|
*/
|
|
434
|
-
|
|
435
|
-
|
|
1131
|
+
set_morph(morph_name, value, mesh_names_json) {
|
|
1132
|
+
const ptr0 = passStringToWasm0(morph_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1133
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1134
|
+
const ptr1 = passStringToWasm0(mesh_names_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1135
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1136
|
+
const ret = wasm.runtimecore_set_morph(this.__wbg_ptr, ptr0, len0, value, ptr1, len1);
|
|
1137
|
+
return ret >>> 0;
|
|
436
1138
|
}
|
|
437
1139
|
/**
|
|
438
|
-
* @param {number}
|
|
439
|
-
* @param {number}
|
|
1140
|
+
* @param {number} morph_index
|
|
1141
|
+
* @param {number} value
|
|
1142
|
+
* @param {string} mesh_names_json
|
|
1143
|
+
* @returns {number}
|
|
440
1144
|
*/
|
|
441
|
-
|
|
1145
|
+
set_morph_index(morph_index, value, mesh_names_json) {
|
|
1146
|
+
const ptr0 = passStringToWasm0(mesh_names_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1147
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1148
|
+
const ret = wasm.runtimecore_set_morph_index(this.__wbg_ptr, morph_index, value, ptr0, len0);
|
|
1149
|
+
return ret >>> 0;
|
|
1150
|
+
}
|
|
1151
|
+
/**
|
|
1152
|
+
* @param {number} index
|
|
1153
|
+
* @param {number} value
|
|
1154
|
+
*/
|
|
1155
|
+
set_viseme(index, value) {
|
|
1156
|
+
wasm.runtimecore_set_viseme(this.__wbg_ptr, index, value);
|
|
1157
|
+
}
|
|
1158
|
+
/**
|
|
1159
|
+
* @param {number} index
|
|
1160
|
+
* @param {number} jaw_scale
|
|
1161
|
+
*/
|
|
1162
|
+
set_viseme_jaw_scale(index, jaw_scale) {
|
|
442
1163
|
wasm.runtimecore_set_viseme_jaw_scale(this.__wbg_ptr, index, jaw_scale);
|
|
443
1164
|
}
|
|
444
1165
|
/**
|
|
@@ -447,36 +1168,133 @@ export class RuntimeCore {
|
|
|
447
1168
|
set_viseme_slot_count(count) {
|
|
448
1169
|
wasm.runtimecore_set_viseme_slot_count(this.__wbg_ptr, count);
|
|
449
1170
|
}
|
|
1171
|
+
stop_all_animations() {
|
|
1172
|
+
wasm.runtimecore_stop_all_animations(this.__wbg_ptr);
|
|
1173
|
+
}
|
|
1174
|
+
/**
|
|
1175
|
+
* @param {string} clip_name
|
|
1176
|
+
*/
|
|
1177
|
+
stop_animation(clip_name) {
|
|
1178
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1179
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1180
|
+
wasm.runtimecore_stop_animation(this.__wbg_ptr, ptr0, len0);
|
|
1181
|
+
}
|
|
450
1182
|
/**
|
|
451
|
-
*
|
|
1183
|
+
* Set an AU immediately. Duration is ignored — host mixers own timed fades.
|
|
452
1184
|
* @param {number} id
|
|
453
1185
|
* @param {number} to
|
|
454
|
-
* @param {number}
|
|
1186
|
+
* @param {number} _duration_ms
|
|
455
1187
|
* @param {number} balance
|
|
456
1188
|
*/
|
|
457
|
-
transition_au(id, to,
|
|
458
|
-
wasm.runtimecore_transition_au(this.__wbg_ptr, id, to,
|
|
1189
|
+
transition_au(id, to, _duration_ms, balance) {
|
|
1190
|
+
wasm.runtimecore_transition_au(this.__wbg_ptr, id, to, _duration_ms, balance);
|
|
1191
|
+
}
|
|
1192
|
+
/**
|
|
1193
|
+
* Set morph(s) immediately. Duration is ignored — host mixers own timed fades.
|
|
1194
|
+
* @param {string} morph_name
|
|
1195
|
+
* @param {number} to
|
|
1196
|
+
* @param {number} _duration_ms
|
|
1197
|
+
* @param {string} mesh_names_json
|
|
1198
|
+
* @returns {number}
|
|
1199
|
+
*/
|
|
1200
|
+
transition_morph(morph_name, to, _duration_ms, mesh_names_json) {
|
|
1201
|
+
const ptr0 = passStringToWasm0(morph_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1202
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1203
|
+
const ptr1 = passStringToWasm0(mesh_names_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1204
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1205
|
+
const ret = wasm.runtimecore_transition_morph(this.__wbg_ptr, ptr0, len0, to, _duration_ms, ptr1, len1);
|
|
1206
|
+
return ret >>> 0;
|
|
459
1207
|
}
|
|
460
1208
|
/**
|
|
1209
|
+
* Set morph index target(s) immediately. Duration is ignored.
|
|
1210
|
+
* @param {number} morph_index
|
|
1211
|
+
* @param {number} to
|
|
1212
|
+
* @param {number} _duration_ms
|
|
1213
|
+
* @param {string} mesh_names_json
|
|
1214
|
+
* @returns {number}
|
|
1215
|
+
*/
|
|
1216
|
+
transition_morph_index(morph_index, to, _duration_ms, mesh_names_json) {
|
|
1217
|
+
const ptr0 = passStringToWasm0(mesh_names_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1218
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1219
|
+
const ret = wasm.runtimecore_transition_morph_index(this.__wbg_ptr, morph_index, to, _duration_ms, ptr0, len0);
|
|
1220
|
+
return ret >>> 0;
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* Set a viseme immediately. Duration is ignored — host mixers own timed fades.
|
|
461
1224
|
* @param {number} index
|
|
462
1225
|
* @param {number} to
|
|
463
|
-
* @param {number}
|
|
1226
|
+
* @param {number} _duration_ms
|
|
464
1227
|
* @param {number} jaw_scale
|
|
465
1228
|
*/
|
|
466
|
-
transition_viseme(index, to,
|
|
467
|
-
wasm.runtimecore_transition_viseme(this.__wbg_ptr, index, to,
|
|
1229
|
+
transition_viseme(index, to, _duration_ms, jaw_scale) {
|
|
1230
|
+
wasm.runtimecore_transition_viseme(this.__wbg_ptr, index, to, _duration_ms, jaw_scale);
|
|
468
1231
|
}
|
|
469
1232
|
/**
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
* @param {number} dt_seconds
|
|
1233
|
+
* Tick hook for hosts. Clip playback/lerp lives in the host animation
|
|
1234
|
+
* library; Rust only exposes live AU/viseme state for packed frames.
|
|
1235
|
+
* @param {number} _dt_seconds
|
|
474
1236
|
* @returns {number}
|
|
475
1237
|
*/
|
|
476
|
-
update(
|
|
477
|
-
const ret = wasm.runtimecore_update(this.__wbg_ptr,
|
|
1238
|
+
update(_dt_seconds) {
|
|
1239
|
+
const ret = wasm.runtimecore_update(this.__wbg_ptr, _dt_seconds);
|
|
478
1240
|
return ret >>> 0;
|
|
479
1241
|
}
|
|
1242
|
+
/**
|
|
1243
|
+
* @param {string} clip_name
|
|
1244
|
+
* @param {string} params_json
|
|
1245
|
+
* @returns {boolean}
|
|
1246
|
+
*/
|
|
1247
|
+
update_clip_params(clip_name, params_json) {
|
|
1248
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1249
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1250
|
+
const ptr1 = passStringToWasm0(params_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1251
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1252
|
+
const ret = wasm.runtimecore_update_clip_params(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1253
|
+
if (ret[2]) {
|
|
1254
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1255
|
+
}
|
|
1256
|
+
return ret[0] !== 0;
|
|
1257
|
+
}
|
|
1258
|
+
/**
|
|
1259
|
+
* Compile and validate without registering a clip or changing live controls.
|
|
1260
|
+
* @param {string} json
|
|
1261
|
+
* @param {string} options_json
|
|
1262
|
+
*/
|
|
1263
|
+
validate_semantic_animation_json(json, options_json) {
|
|
1264
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1265
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1266
|
+
const ptr1 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1267
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1268
|
+
const ret = wasm.runtimecore_validate_semantic_animation_json(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1269
|
+
if (ret[1]) {
|
|
1270
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Validate and fill optional settings without changing runtime or renderer state.
|
|
1275
|
+
* @param {string} json
|
|
1276
|
+
* @returns {string}
|
|
1277
|
+
*/
|
|
1278
|
+
validate_semantic_pose_json(json) {
|
|
1279
|
+
let deferred3_0;
|
|
1280
|
+
let deferred3_1;
|
|
1281
|
+
try {
|
|
1282
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1283
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1284
|
+
const ret = wasm.runtimecore_validate_semantic_pose_json(this.__wbg_ptr, ptr0, len0);
|
|
1285
|
+
var ptr2 = ret[0];
|
|
1286
|
+
var len2 = ret[1];
|
|
1287
|
+
if (ret[3]) {
|
|
1288
|
+
ptr2 = 0; len2 = 0;
|
|
1289
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1290
|
+
}
|
|
1291
|
+
deferred3_0 = ptr2;
|
|
1292
|
+
deferred3_1 = len2;
|
|
1293
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1294
|
+
} finally {
|
|
1295
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
480
1298
|
/**
|
|
481
1299
|
* @returns {number}
|
|
482
1300
|
*/
|
|
@@ -522,6 +1340,40 @@ export function analyze_mesh_proportions(vertices, vertical_axis) {
|
|
|
522
1340
|
return v2;
|
|
523
1341
|
}
|
|
524
1342
|
|
|
1343
|
+
/**
|
|
1344
|
+
* @param {string} model_json
|
|
1345
|
+
* @param {string} clips_json
|
|
1346
|
+
* @param {string} profile_json
|
|
1347
|
+
* @param {string} options_json
|
|
1348
|
+
* @returns {string}
|
|
1349
|
+
*/
|
|
1350
|
+
export function analyze_model_descriptor(model_json, clips_json, profile_json, options_json) {
|
|
1351
|
+
let deferred6_0;
|
|
1352
|
+
let deferred6_1;
|
|
1353
|
+
try {
|
|
1354
|
+
const ptr0 = passStringToWasm0(model_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1355
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1356
|
+
const ptr1 = passStringToWasm0(clips_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1357
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1358
|
+
const ptr2 = passStringToWasm0(profile_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1359
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1360
|
+
const ptr3 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1361
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1362
|
+
const ret = wasm.analyze_model_descriptor(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
1363
|
+
var ptr5 = ret[0];
|
|
1364
|
+
var len5 = ret[1];
|
|
1365
|
+
if (ret[3]) {
|
|
1366
|
+
ptr5 = 0; len5 = 0;
|
|
1367
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1368
|
+
}
|
|
1369
|
+
deferred6_0 = ptr5;
|
|
1370
|
+
deferred6_1 = len5;
|
|
1371
|
+
return getStringFromWasm0(ptr5, len5);
|
|
1372
|
+
} finally {
|
|
1373
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
|
|
525
1377
|
/**
|
|
526
1378
|
* @returns {number}
|
|
527
1379
|
*/
|
|
@@ -621,17 +1473,285 @@ export function camera_flight_sample_stride() {
|
|
|
621
1473
|
}
|
|
622
1474
|
|
|
623
1475
|
/**
|
|
624
|
-
* Compile a clip track input (JSON) into host-neutral ClipIR JSON.
|
|
625
|
-
* @param {string} input_json
|
|
1476
|
+
* Compile a clip track input (JSON) into host-neutral ClipIR JSON.
|
|
1477
|
+
* @param {string} input_json
|
|
1478
|
+
* @returns {string}
|
|
1479
|
+
*/
|
|
1480
|
+
export function compile_clip(input_json) {
|
|
1481
|
+
let deferred3_0;
|
|
1482
|
+
let deferred3_1;
|
|
1483
|
+
try {
|
|
1484
|
+
const ptr0 = passStringToWasm0(input_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1485
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1486
|
+
const ret = wasm.compile_clip(ptr0, len0);
|
|
1487
|
+
var ptr2 = ret[0];
|
|
1488
|
+
var len2 = ret[1];
|
|
1489
|
+
if (ret[3]) {
|
|
1490
|
+
ptr2 = 0; len2 = 0;
|
|
1491
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1492
|
+
}
|
|
1493
|
+
deferred3_0 = ptr2;
|
|
1494
|
+
deferred3_1 = len2;
|
|
1495
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1496
|
+
} finally {
|
|
1497
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
/**
|
|
1502
|
+
* Compile named intensity curves (JSON) into host-neutral ClipIR JSON.
|
|
1503
|
+
* @param {string} input_json
|
|
1504
|
+
* @returns {string}
|
|
1505
|
+
*/
|
|
1506
|
+
export function compile_clip_curves(input_json) {
|
|
1507
|
+
let deferred3_0;
|
|
1508
|
+
let deferred3_1;
|
|
1509
|
+
try {
|
|
1510
|
+
const ptr0 = passStringToWasm0(input_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1511
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1512
|
+
const ret = wasm.compile_clip_curves(ptr0, len0);
|
|
1513
|
+
var ptr2 = ret[0];
|
|
1514
|
+
var len2 = ret[1];
|
|
1515
|
+
if (ret[3]) {
|
|
1516
|
+
ptr2 = 0; len2 = 0;
|
|
1517
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1518
|
+
}
|
|
1519
|
+
deferred3_0 = ptr2;
|
|
1520
|
+
deferred3_1 = len2;
|
|
1521
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1522
|
+
} finally {
|
|
1523
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1527
|
+
/**
|
|
1528
|
+
* Compose user-facing manual adjustments onto a solved skeleton fit.
|
|
1529
|
+
*
|
|
1530
|
+
* `fit` must start with [scale, translate_x, translate_y, translate_z]. The
|
|
1531
|
+
* output preserves those four fields after multiplying scale and adding offsets.
|
|
1532
|
+
* @param {Float32Array} fit
|
|
1533
|
+
* @param {number} scale_multiplier
|
|
1534
|
+
* @param {number} offset_x
|
|
1535
|
+
* @param {number} offset_y
|
|
1536
|
+
* @param {number} offset_z
|
|
1537
|
+
* @returns {Float32Array}
|
|
1538
|
+
*/
|
|
1539
|
+
export function compose_template_fit_adjustment(fit, scale_multiplier, offset_x, offset_y, offset_z) {
|
|
1540
|
+
const ptr0 = passArrayF32ToWasm0(fit, wasm.__wbindgen_malloc);
|
|
1541
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1542
|
+
const ret = wasm.compose_template_fit_adjustment(ptr0, len0, scale_multiplier, offset_x, offset_y, offset_z);
|
|
1543
|
+
var v2 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
1544
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1545
|
+
return v2;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
/**
|
|
1549
|
+
* @param {number} fit_scale
|
|
1550
|
+
* @param {Float32Array} fit_translation
|
|
1551
|
+
* @param {number} manual_scale
|
|
1552
|
+
* @param {Float32Array} manual_translation
|
|
1553
|
+
* @returns {Float32Array}
|
|
1554
|
+
*/
|
|
1555
|
+
export function compose_template_skeleton_fit_transform(fit_scale, fit_translation, manual_scale, manual_translation) {
|
|
1556
|
+
const ptr0 = passArrayF32ToWasm0(fit_translation, wasm.__wbindgen_malloc);
|
|
1557
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1558
|
+
const ptr1 = passArrayF32ToWasm0(manual_translation, wasm.__wbindgen_malloc);
|
|
1559
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1560
|
+
const ret = wasm.compose_template_skeleton_fit_transform(fit_scale, ptr0, len0, manual_scale, ptr1, len1);
|
|
1561
|
+
var v3 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
1562
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1563
|
+
return v3;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
/**
|
|
1567
|
+
* @param {string} template_json
|
|
1568
|
+
* @returns {Float64Array}
|
|
1569
|
+
*/
|
|
1570
|
+
export function compute_humanoid_skeleton_template_rest_bounds(template_json) {
|
|
1571
|
+
const ptr0 = passStringToWasm0(template_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1572
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1573
|
+
const ret = wasm.compute_humanoid_skeleton_template_rest_bounds(ptr0, len0);
|
|
1574
|
+
if (ret[3]) {
|
|
1575
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1576
|
+
}
|
|
1577
|
+
var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
1578
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
1579
|
+
return v2;
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
* @returns {number}
|
|
1584
|
+
*/
|
|
1585
|
+
export function core_abi_version() {
|
|
1586
|
+
const ret = wasm.core_abi_version();
|
|
1587
|
+
return ret >>> 0;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
/**
|
|
1591
|
+
* @param {string} template_json
|
|
1592
|
+
* @returns {string}
|
|
1593
|
+
*/
|
|
1594
|
+
export function create_validation_skeleton_json(template_json) {
|
|
1595
|
+
let deferred3_0;
|
|
1596
|
+
let deferred3_1;
|
|
1597
|
+
try {
|
|
1598
|
+
const ptr0 = passStringToWasm0(template_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1599
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1600
|
+
const ret = wasm.create_validation_skeleton_json(ptr0, len0);
|
|
1601
|
+
var ptr2 = ret[0];
|
|
1602
|
+
var len2 = ret[1];
|
|
1603
|
+
if (ret[3]) {
|
|
1604
|
+
ptr2 = 0; len2 = 0;
|
|
1605
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1606
|
+
}
|
|
1607
|
+
deferred3_0 = ptr2;
|
|
1608
|
+
deferred3_1 = len2;
|
|
1609
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1610
|
+
} finally {
|
|
1611
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
/**
|
|
1616
|
+
* @returns {string}
|
|
1617
|
+
*/
|
|
1618
|
+
export function default_hair_color_appearance_json() {
|
|
1619
|
+
let deferred2_0;
|
|
1620
|
+
let deferred2_1;
|
|
1621
|
+
try {
|
|
1622
|
+
const ret = wasm.default_hair_color_appearance_json();
|
|
1623
|
+
var ptr1 = ret[0];
|
|
1624
|
+
var len1 = ret[1];
|
|
1625
|
+
if (ret[3]) {
|
|
1626
|
+
ptr1 = 0; len1 = 0;
|
|
1627
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1628
|
+
}
|
|
1629
|
+
deferred2_0 = ptr1;
|
|
1630
|
+
deferred2_1 = len1;
|
|
1631
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1632
|
+
} finally {
|
|
1633
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1634
|
+
}
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
/**
|
|
1638
|
+
* @returns {Float32Array}
|
|
1639
|
+
*/
|
|
1640
|
+
export function default_hair_physics_config_values() {
|
|
1641
|
+
const ret = wasm.default_hair_physics_config_values();
|
|
1642
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
1643
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1644
|
+
return v1;
|
|
1645
|
+
}
|
|
1646
|
+
|
|
1647
|
+
/**
|
|
1648
|
+
* Execute a host-neutral Embody operation using JSON in and JSON out.
|
|
1649
|
+
* This keeps CLJS and other browser hosts off the Rust data structures while
|
|
1650
|
+
* ensuring all profile semantics execute inside Wasm.
|
|
1651
|
+
* @param {string} request_json
|
|
1652
|
+
* @returns {string}
|
|
1653
|
+
*/
|
|
1654
|
+
export function embody_request(request_json) {
|
|
1655
|
+
let deferred3_0;
|
|
1656
|
+
let deferred3_1;
|
|
1657
|
+
try {
|
|
1658
|
+
const ptr0 = passStringToWasm0(request_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1659
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1660
|
+
const ret = wasm.embody_request(ptr0, len0);
|
|
1661
|
+
var ptr2 = ret[0];
|
|
1662
|
+
var len2 = ret[1];
|
|
1663
|
+
if (ret[3]) {
|
|
1664
|
+
ptr2 = 0; len2 = 0;
|
|
1665
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1666
|
+
}
|
|
1667
|
+
deferred3_0 = ptr2;
|
|
1668
|
+
deferred3_1 = len2;
|
|
1669
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1670
|
+
} finally {
|
|
1671
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
/**
|
|
1676
|
+
* @param {string} model_json
|
|
1677
|
+
* @param {string} options_json
|
|
1678
|
+
* @returns {string}
|
|
1679
|
+
*/
|
|
1680
|
+
export function extract_humanoid_skeleton_template_json(model_json, options_json) {
|
|
1681
|
+
let deferred4_0;
|
|
1682
|
+
let deferred4_1;
|
|
1683
|
+
try {
|
|
1684
|
+
const ptr0 = passStringToWasm0(model_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1685
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1686
|
+
const ptr1 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1687
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1688
|
+
const ret = wasm.extract_humanoid_skeleton_template_json(ptr0, len0, ptr1, len1);
|
|
1689
|
+
var ptr3 = ret[0];
|
|
1690
|
+
var len3 = ret[1];
|
|
1691
|
+
if (ret[3]) {
|
|
1692
|
+
ptr3 = 0; len3 = 0;
|
|
1693
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1694
|
+
}
|
|
1695
|
+
deferred4_0 = ptr3;
|
|
1696
|
+
deferred4_1 = len3;
|
|
1697
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1698
|
+
} finally {
|
|
1699
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
/**
|
|
1704
|
+
* @param {string} model_json
|
|
1705
|
+
* @param {string} clips_json
|
|
1706
|
+
* @returns {string}
|
|
1707
|
+
*/
|
|
1708
|
+
export function extract_model_data_json(model_json, clips_json) {
|
|
1709
|
+
let deferred4_0;
|
|
1710
|
+
let deferred4_1;
|
|
1711
|
+
try {
|
|
1712
|
+
const ptr0 = passStringToWasm0(model_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1713
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1714
|
+
const ptr1 = passStringToWasm0(clips_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1715
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1716
|
+
const ret = wasm.extract_model_data_json(ptr0, len0, ptr1, len1);
|
|
1717
|
+
var ptr3 = ret[0];
|
|
1718
|
+
var len3 = ret[1];
|
|
1719
|
+
if (ret[3]) {
|
|
1720
|
+
ptr3 = 0; len3 = 0;
|
|
1721
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1722
|
+
}
|
|
1723
|
+
deferred4_0 = ptr3;
|
|
1724
|
+
deferred4_1 = len3;
|
|
1725
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1726
|
+
} finally {
|
|
1727
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
* Padding factor for a focus target of the given max dimension.
|
|
1733
|
+
* @param {number} size
|
|
1734
|
+
* @param {number} close_up_padding
|
|
1735
|
+
* @param {number} zoom_padding
|
|
1736
|
+
* @param {number} full_body_padding
|
|
1737
|
+
* @returns {number}
|
|
1738
|
+
*/
|
|
1739
|
+
export function focus_padding_factor(size, close_up_padding, zoom_padding, full_body_padding) {
|
|
1740
|
+
const ret = wasm.focus_padding_factor(size, close_up_padding, zoom_padding, full_body_padding);
|
|
1741
|
+
return ret;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* @param {string} id
|
|
626
1746
|
* @returns {string}
|
|
627
1747
|
*/
|
|
628
|
-
export function
|
|
1748
|
+
export function get_humanoid_skeleton_template_json(id) {
|
|
629
1749
|
let deferred3_0;
|
|
630
1750
|
let deferred3_1;
|
|
631
1751
|
try {
|
|
632
|
-
const ptr0 = passStringToWasm0(
|
|
1752
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
633
1753
|
const len0 = WASM_VECTOR_LEN;
|
|
634
|
-
const ret = wasm.
|
|
1754
|
+
const ret = wasm.get_humanoid_skeleton_template_json(ptr0, len0);
|
|
635
1755
|
var ptr2 = ret[0];
|
|
636
1756
|
var len2 = ret[1];
|
|
637
1757
|
if (ret[3]) {
|
|
@@ -647,17 +1767,17 @@ export function compile_clip(input_json) {
|
|
|
647
1767
|
}
|
|
648
1768
|
|
|
649
1769
|
/**
|
|
650
|
-
*
|
|
651
|
-
* @param {string}
|
|
1770
|
+
* Return the embedded preset JSON for a preset id (intake source of truth).
|
|
1771
|
+
* @param {string} preset_id
|
|
652
1772
|
* @returns {string}
|
|
653
1773
|
*/
|
|
654
|
-
export function
|
|
1774
|
+
export function get_preset_json(preset_id) {
|
|
655
1775
|
let deferred3_0;
|
|
656
1776
|
let deferred3_1;
|
|
657
1777
|
try {
|
|
658
|
-
const ptr0 = passStringToWasm0(
|
|
1778
|
+
const ptr0 = passStringToWasm0(preset_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
659
1779
|
const len0 = WASM_VECTOR_LEN;
|
|
660
|
-
const ret = wasm.
|
|
1780
|
+
const ret = wasm.get_preset_json(ptr0, len0);
|
|
661
1781
|
var ptr2 = ret[0];
|
|
662
1782
|
var len2 = ret[1];
|
|
663
1783
|
if (ret[3]) {
|
|
@@ -673,98 +1793,24 @@ export function compile_clip_curves(input_json) {
|
|
|
673
1793
|
}
|
|
674
1794
|
|
|
675
1795
|
/**
|
|
676
|
-
* Compose user-facing manual adjustments onto a solved skeleton fit.
|
|
677
|
-
*
|
|
678
|
-
* `fit` must start with [scale, translate_x, translate_y, translate_z]. The
|
|
679
|
-
* output preserves those four fields after multiplying scale and adding offsets.
|
|
680
|
-
* @param {Float32Array} fit
|
|
681
|
-
* @param {number} scale_multiplier
|
|
682
|
-
* @param {number} offset_x
|
|
683
|
-
* @param {number} offset_y
|
|
684
|
-
* @param {number} offset_z
|
|
685
|
-
* @returns {Float32Array}
|
|
686
|
-
*/
|
|
687
|
-
export function compose_template_fit_adjustment(fit, scale_multiplier, offset_x, offset_y, offset_z) {
|
|
688
|
-
const ptr0 = passArrayF32ToWasm0(fit, wasm.__wbindgen_malloc);
|
|
689
|
-
const len0 = WASM_VECTOR_LEN;
|
|
690
|
-
const ret = wasm.compose_template_fit_adjustment(ptr0, len0, scale_multiplier, offset_x, offset_y, offset_z);
|
|
691
|
-
var v2 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
692
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
693
|
-
return v2;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
/**
|
|
697
|
-
* @param {number} fit_scale
|
|
698
|
-
* @param {Float32Array} fit_translation
|
|
699
|
-
* @param {number} manual_scale
|
|
700
|
-
* @param {Float32Array} manual_translation
|
|
701
|
-
* @returns {Float32Array}
|
|
702
|
-
*/
|
|
703
|
-
export function compose_template_skeleton_fit_transform(fit_scale, fit_translation, manual_scale, manual_translation) {
|
|
704
|
-
const ptr0 = passArrayF32ToWasm0(fit_translation, wasm.__wbindgen_malloc);
|
|
705
|
-
const len0 = WASM_VECTOR_LEN;
|
|
706
|
-
const ptr1 = passArrayF32ToWasm0(manual_translation, wasm.__wbindgen_malloc);
|
|
707
|
-
const len1 = WASM_VECTOR_LEN;
|
|
708
|
-
const ret = wasm.compose_template_skeleton_fit_transform(fit_scale, ptr0, len0, manual_scale, ptr1, len1);
|
|
709
|
-
var v3 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
710
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
711
|
-
return v3;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
/**
|
|
715
|
-
* @returns {number}
|
|
716
|
-
*/
|
|
717
|
-
export function core_abi_version() {
|
|
718
|
-
const ret = wasm.core_abi_version();
|
|
719
|
-
return ret >>> 0;
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
/**
|
|
723
|
-
* @returns {Float32Array}
|
|
724
|
-
*/
|
|
725
|
-
export function default_hair_physics_config_values() {
|
|
726
|
-
const ret = wasm.default_hair_physics_config_values();
|
|
727
|
-
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
728
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
729
|
-
return v1;
|
|
730
|
-
}
|
|
731
|
-
|
|
732
|
-
/**
|
|
733
|
-
* Padding factor for a focus target of the given max dimension.
|
|
734
|
-
* @param {number} size
|
|
735
|
-
* @param {number} close_up_padding
|
|
736
|
-
* @param {number} zoom_padding
|
|
737
|
-
* @param {number} full_body_padding
|
|
738
|
-
* @returns {number}
|
|
739
|
-
*/
|
|
740
|
-
export function focus_padding_factor(size, close_up_padding, zoom_padding, full_body_padding) {
|
|
741
|
-
const ret = wasm.focus_padding_factor(size, close_up_padding, zoom_padding, full_body_padding);
|
|
742
|
-
return ret;
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
/**
|
|
746
|
-
* Return the embedded preset JSON for a preset id (intake source of truth).
|
|
747
|
-
* @param {string} preset_id
|
|
748
1796
|
* @returns {string}
|
|
749
1797
|
*/
|
|
750
|
-
export function
|
|
751
|
-
let
|
|
752
|
-
let
|
|
1798
|
+
export function hair_color_presets_json() {
|
|
1799
|
+
let deferred2_0;
|
|
1800
|
+
let deferred2_1;
|
|
753
1801
|
try {
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
var ptr2 = ret[0];
|
|
758
|
-
var len2 = ret[1];
|
|
1802
|
+
const ret = wasm.hair_color_presets_json();
|
|
1803
|
+
var ptr1 = ret[0];
|
|
1804
|
+
var len1 = ret[1];
|
|
759
1805
|
if (ret[3]) {
|
|
760
|
-
|
|
1806
|
+
ptr1 = 0; len1 = 0;
|
|
761
1807
|
throw takeFromExternrefTable0(ret[2]);
|
|
762
1808
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
return getStringFromWasm0(
|
|
1809
|
+
deferred2_0 = ptr1;
|
|
1810
|
+
deferred2_1 = len1;
|
|
1811
|
+
return getStringFromWasm0(ptr1, len1);
|
|
766
1812
|
} finally {
|
|
767
|
-
wasm.__wbindgen_free(
|
|
1813
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
768
1814
|
}
|
|
769
1815
|
}
|
|
770
1816
|
|
|
@@ -812,6 +1858,53 @@ export function has_preset(preset_id) {
|
|
|
812
1858
|
return ret !== 0;
|
|
813
1859
|
}
|
|
814
1860
|
|
|
1861
|
+
/**
|
|
1862
|
+
* @param {string} template_json
|
|
1863
|
+
* @returns {string}
|
|
1864
|
+
*/
|
|
1865
|
+
export function humanoid_skeleton_template_bone_names(template_json) {
|
|
1866
|
+
let deferred3_0;
|
|
1867
|
+
let deferred3_1;
|
|
1868
|
+
try {
|
|
1869
|
+
const ptr0 = passStringToWasm0(template_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1870
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1871
|
+
const ret = wasm.humanoid_skeleton_template_bone_names(ptr0, len0);
|
|
1872
|
+
var ptr2 = ret[0];
|
|
1873
|
+
var len2 = ret[1];
|
|
1874
|
+
if (ret[3]) {
|
|
1875
|
+
ptr2 = 0; len2 = 0;
|
|
1876
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1877
|
+
}
|
|
1878
|
+
deferred3_0 = ptr2;
|
|
1879
|
+
deferred3_1 = len2;
|
|
1880
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1881
|
+
} finally {
|
|
1882
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
/**
|
|
1887
|
+
* @returns {string}
|
|
1888
|
+
*/
|
|
1889
|
+
export function list_humanoid_skeleton_templates_json() {
|
|
1890
|
+
let deferred2_0;
|
|
1891
|
+
let deferred2_1;
|
|
1892
|
+
try {
|
|
1893
|
+
const ret = wasm.list_humanoid_skeleton_templates_json();
|
|
1894
|
+
var ptr1 = ret[0];
|
|
1895
|
+
var len1 = ret[1];
|
|
1896
|
+
if (ret[3]) {
|
|
1897
|
+
ptr1 = 0; len1 = 0;
|
|
1898
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1899
|
+
}
|
|
1900
|
+
deferred2_0 = ptr1;
|
|
1901
|
+
deferred2_1 = len1;
|
|
1902
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1903
|
+
} finally {
|
|
1904
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
|
|
815
1908
|
/**
|
|
816
1909
|
* Canonical embedded preset ids available inside the Wasm core.
|
|
817
1910
|
* @returns {string[]}
|
|
@@ -931,6 +2024,34 @@ export function normalize_camera_angle_degrees(angle) {
|
|
|
931
2024
|
return ret;
|
|
932
2025
|
}
|
|
933
2026
|
|
|
2027
|
+
/**
|
|
2028
|
+
* @param {string} value_json
|
|
2029
|
+
* @param {string} fallback_json
|
|
2030
|
+
* @returns {string}
|
|
2031
|
+
*/
|
|
2032
|
+
export function normalize_hair_color_appearance_json(value_json, fallback_json) {
|
|
2033
|
+
let deferred4_0;
|
|
2034
|
+
let deferred4_1;
|
|
2035
|
+
try {
|
|
2036
|
+
const ptr0 = passStringToWasm0(value_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2037
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2038
|
+
const ptr1 = passStringToWasm0(fallback_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2039
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2040
|
+
const ret = wasm.normalize_hair_color_appearance_json(ptr0, len0, ptr1, len1);
|
|
2041
|
+
var ptr3 = ret[0];
|
|
2042
|
+
var len3 = ret[1];
|
|
2043
|
+
if (ret[3]) {
|
|
2044
|
+
ptr3 = 0; len3 = 0;
|
|
2045
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2046
|
+
}
|
|
2047
|
+
deferred4_0 = ptr3;
|
|
2048
|
+
deferred4_1 = len3;
|
|
2049
|
+
return getStringFromWasm0(ptr3, len3);
|
|
2050
|
+
} finally {
|
|
2051
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
|
|
934
2055
|
/**
|
|
935
2056
|
* @param {Uint32Array} mesh_ids
|
|
936
2057
|
* @param {Uint32Array} morph_target_ids
|
|
@@ -1152,6 +2273,14 @@ export function sample_marker_bezier_curve(start, end, segments) {
|
|
|
1152
2273
|
return v3;
|
|
1153
2274
|
}
|
|
1154
2275
|
|
|
2276
|
+
/**
|
|
2277
|
+
* @returns {number}
|
|
2278
|
+
*/
|
|
2279
|
+
export function screen_space_gaze_solution_stride() {
|
|
2280
|
+
const ret = wasm.screen_space_gaze_solution_stride();
|
|
2281
|
+
return ret >>> 0;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
1155
2284
|
/**
|
|
1156
2285
|
* Separates overlapping marker endpoints while preserving each marker's
|
|
1157
2286
|
* surface anchor and leader-line length.
|
|
@@ -1308,6 +2437,193 @@ export function solve_morph_batch(values, balances, mix_weights) {
|
|
|
1308
2437
|
return v4;
|
|
1309
2438
|
}
|
|
1310
2439
|
|
|
2440
|
+
/**
|
|
2441
|
+
* Solve a screen-space eye target against rendered-camera and character-eye
|
|
2442
|
+
* geometry using the profile's authored AU rotation limits.
|
|
2443
|
+
*
|
|
2444
|
+
* Output layout (14 floats): combined target x/y, eye target x/y, head target
|
|
2445
|
+
* x/y, total yaw/pitch degrees, camera-center yaw/pitch degrees, eye-to-camera
|
|
2446
|
+
* distance, and viewer-target world x/y/z.
|
|
2447
|
+
*
|
|
2448
|
+
* The profile must describe the active rig and calibrated semantic yaw/pitch
|
|
2449
|
+
* axes: neutral forward is model +Z, up is +Y, and head yaw precedes pitch.
|
|
2450
|
+
* Bone availability/rest and optical-axis calibration are not encoded by this
|
|
2451
|
+
* ABI. Missing or morph-only AUs have no inferred angular capacity. Shared eye
|
|
2452
|
+
* outputs cannot represent vergence or independently calibrated eye ranges.
|
|
2453
|
+
* Head follow is participation from model-neutral +Z toward the shared target;
|
|
2454
|
+
* zero prefers neutral, with additional head movement allowed for eye overflow.
|
|
2455
|
+
* @param {string} profile_json
|
|
2456
|
+
* @param {Float32Array} screen_target
|
|
2457
|
+
* @param {Float32Array} camera_position
|
|
2458
|
+
* @param {Float32Array} camera_quaternion
|
|
2459
|
+
* @param {Float32Array} gaze_origin
|
|
2460
|
+
* @param {Float32Array} model_quaternion
|
|
2461
|
+
* @param {number} vertical_fov_degrees
|
|
2462
|
+
* @param {number} aspect
|
|
2463
|
+
* @param {boolean} eyes_enabled
|
|
2464
|
+
* @param {boolean} head_enabled
|
|
2465
|
+
* @param {number} head_follow_fraction
|
|
2466
|
+
* @returns {Float32Array}
|
|
2467
|
+
*/
|
|
2468
|
+
export function solve_profile_screen_space_gaze(profile_json, screen_target, camera_position, camera_quaternion, gaze_origin, model_quaternion, vertical_fov_degrees, aspect, eyes_enabled, head_enabled, head_follow_fraction) {
|
|
2469
|
+
const ptr0 = passStringToWasm0(profile_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2470
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2471
|
+
const ptr1 = passArrayF32ToWasm0(screen_target, wasm.__wbindgen_malloc);
|
|
2472
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2473
|
+
const ptr2 = passArrayF32ToWasm0(camera_position, wasm.__wbindgen_malloc);
|
|
2474
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2475
|
+
const ptr3 = passArrayF32ToWasm0(camera_quaternion, wasm.__wbindgen_malloc);
|
|
2476
|
+
const len3 = WASM_VECTOR_LEN;
|
|
2477
|
+
const ptr4 = passArrayF32ToWasm0(gaze_origin, wasm.__wbindgen_malloc);
|
|
2478
|
+
const len4 = WASM_VECTOR_LEN;
|
|
2479
|
+
const ptr5 = passArrayF32ToWasm0(model_quaternion, wasm.__wbindgen_malloc);
|
|
2480
|
+
const len5 = WASM_VECTOR_LEN;
|
|
2481
|
+
const ret = wasm.solve_profile_screen_space_gaze(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, vertical_fov_degrees, aspect, eyes_enabled, head_enabled, head_follow_fraction);
|
|
2482
|
+
if (ret[3]) {
|
|
2483
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2484
|
+
}
|
|
2485
|
+
var v7 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
2486
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2487
|
+
return v7;
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
/**
|
|
2491
|
+
* Normalized tracking controls span the active profile's signed head AU range
|
|
2492
|
+
* (or eye range with the head disabled). At full head participation, +/-1 on
|
|
2493
|
+
* an aligned display axis reaches the same rotation as its AU at intensity 1.
|
|
2494
|
+
* Zero input retains the camera bearing, bounded by that range. Camera roll
|
|
2495
|
+
* rotates display axes into the model frame. X/Y are clamped to [-1, 1]; Z is
|
|
2496
|
+
* finite-target depth in meters and does not attenuate angular movement.
|
|
2497
|
+
* Pass 1 for full head participation; smaller explicit fractions retain the
|
|
2498
|
+
* existing allocation policy. Output layout matches the physical gaze solvers.
|
|
2499
|
+
* @param {string} profile_json
|
|
2500
|
+
* @param {Float32Array} tracking_target
|
|
2501
|
+
* @param {Float32Array} camera_position
|
|
2502
|
+
* @param {Float32Array} camera_quaternion
|
|
2503
|
+
* @param {Float32Array} gaze_origin
|
|
2504
|
+
* @param {Float32Array} model_quaternion
|
|
2505
|
+
* @param {boolean} eyes_enabled
|
|
2506
|
+
* @param {boolean} head_enabled
|
|
2507
|
+
* @param {number} head_follow_fraction
|
|
2508
|
+
* @param {boolean} lock_head_to_camera
|
|
2509
|
+
* @param {number} world_units_per_meter
|
|
2510
|
+
* @returns {Float32Array}
|
|
2511
|
+
*/
|
|
2512
|
+
export function solve_profile_tracking_gaze(profile_json, tracking_target, camera_position, camera_quaternion, gaze_origin, model_quaternion, eyes_enabled, head_enabled, head_follow_fraction, lock_head_to_camera, world_units_per_meter) {
|
|
2513
|
+
const ptr0 = passStringToWasm0(profile_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2514
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2515
|
+
const ptr1 = passArrayF32ToWasm0(tracking_target, wasm.__wbindgen_malloc);
|
|
2516
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2517
|
+
const ptr2 = passArrayF32ToWasm0(camera_position, wasm.__wbindgen_malloc);
|
|
2518
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2519
|
+
const ptr3 = passArrayF32ToWasm0(camera_quaternion, wasm.__wbindgen_malloc);
|
|
2520
|
+
const len3 = WASM_VECTOR_LEN;
|
|
2521
|
+
const ptr4 = passArrayF32ToWasm0(gaze_origin, wasm.__wbindgen_malloc);
|
|
2522
|
+
const len4 = WASM_VECTOR_LEN;
|
|
2523
|
+
const ptr5 = passArrayF32ToWasm0(model_quaternion, wasm.__wbindgen_malloc);
|
|
2524
|
+
const len5 = WASM_VECTOR_LEN;
|
|
2525
|
+
const ret = wasm.solve_profile_tracking_gaze(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, eyes_enabled, head_enabled, head_follow_fraction, lock_head_to_camera, world_units_per_meter);
|
|
2526
|
+
if (ret[3]) {
|
|
2527
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2528
|
+
}
|
|
2529
|
+
var v7 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
2530
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2531
|
+
return v7;
|
|
2532
|
+
}
|
|
2533
|
+
|
|
2534
|
+
/**
|
|
2535
|
+
* Solve a webcam/user target against the rendered camera. `viewer_target` is
|
|
2536
|
+
* x/y in webcam NDC and z as estimated viewer distance behind the rendered
|
|
2537
|
+
* camera in the same units as `camera_position` and `gaze_origin`. Hosts must
|
|
2538
|
+
* convert estimated meters to scene units before calling. Zero x/y extends the
|
|
2539
|
+
* eye-to-camera bearing; camera-right/up offsets retain the viewer projection
|
|
2540
|
+
* without making eye contact depend on where the eyes sit in the image.
|
|
2541
|
+
* `lock_head_to_camera` prefers the camera bearing while eyes can reach; it
|
|
2542
|
+
* allows head overflow correction and follows the viewer with eyes disabled.
|
|
2543
|
+
* Without that explicit lock, head follow participates from model-neutral +Z
|
|
2544
|
+
* toward the shared target. A zero follow fraction does not imply camera lock.
|
|
2545
|
+
* New consumers with metric viewer depth should use
|
|
2546
|
+
* `solve_profile_viewer_space_gaze_scaled` to supply the scene conversion.
|
|
2547
|
+
* @param {string} profile_json
|
|
2548
|
+
* @param {Float32Array} viewer_target
|
|
2549
|
+
* @param {Float32Array} camera_position
|
|
2550
|
+
* @param {Float32Array} camera_quaternion
|
|
2551
|
+
* @param {Float32Array} gaze_origin
|
|
2552
|
+
* @param {Float32Array} model_quaternion
|
|
2553
|
+
* @param {number} viewer_vertical_fov_degrees
|
|
2554
|
+
* @param {number} viewer_aspect
|
|
2555
|
+
* @param {boolean} eyes_enabled
|
|
2556
|
+
* @param {boolean} head_enabled
|
|
2557
|
+
* @param {number} head_follow_fraction
|
|
2558
|
+
* @param {boolean} lock_head_to_camera
|
|
2559
|
+
* @returns {Float32Array}
|
|
2560
|
+
*/
|
|
2561
|
+
export function solve_profile_viewer_space_gaze(profile_json, viewer_target, camera_position, camera_quaternion, gaze_origin, model_quaternion, viewer_vertical_fov_degrees, viewer_aspect, eyes_enabled, head_enabled, head_follow_fraction, lock_head_to_camera) {
|
|
2562
|
+
const ptr0 = passStringToWasm0(profile_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2563
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2564
|
+
const ptr1 = passArrayF32ToWasm0(viewer_target, wasm.__wbindgen_malloc);
|
|
2565
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2566
|
+
const ptr2 = passArrayF32ToWasm0(camera_position, wasm.__wbindgen_malloc);
|
|
2567
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2568
|
+
const ptr3 = passArrayF32ToWasm0(camera_quaternion, wasm.__wbindgen_malloc);
|
|
2569
|
+
const len3 = WASM_VECTOR_LEN;
|
|
2570
|
+
const ptr4 = passArrayF32ToWasm0(gaze_origin, wasm.__wbindgen_malloc);
|
|
2571
|
+
const len4 = WASM_VECTOR_LEN;
|
|
2572
|
+
const ptr5 = passArrayF32ToWasm0(model_quaternion, wasm.__wbindgen_malloc);
|
|
2573
|
+
const len5 = WASM_VECTOR_LEN;
|
|
2574
|
+
const ret = wasm.solve_profile_viewer_space_gaze(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, viewer_vertical_fov_degrees, viewer_aspect, eyes_enabled, head_enabled, head_follow_fraction, lock_head_to_camera);
|
|
2575
|
+
if (ret[3]) {
|
|
2576
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2577
|
+
}
|
|
2578
|
+
var v7 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
2579
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2580
|
+
return v7;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
/**
|
|
2584
|
+
* Solve a webcam/user target with an explicit scene-unit conversion.
|
|
2585
|
+
* `viewer_target` x/y are normalized webcam coordinates and z is estimated
|
|
2586
|
+
* viewer distance in meters. `world_units_per_meter` converts both that depth
|
|
2587
|
+
* and its projected lateral offsets into the units of `camera_position` and
|
|
2588
|
+
* `gaze_origin`. Positive finite scales are accepted; malformed scales use 1.
|
|
2589
|
+
* The output layout and head/eye allocation match the unscaled export.
|
|
2590
|
+
* @param {string} profile_json
|
|
2591
|
+
* @param {Float32Array} viewer_target
|
|
2592
|
+
* @param {Float32Array} camera_position
|
|
2593
|
+
* @param {Float32Array} camera_quaternion
|
|
2594
|
+
* @param {Float32Array} gaze_origin
|
|
2595
|
+
* @param {Float32Array} model_quaternion
|
|
2596
|
+
* @param {number} viewer_vertical_fov_degrees
|
|
2597
|
+
* @param {number} viewer_aspect
|
|
2598
|
+
* @param {boolean} eyes_enabled
|
|
2599
|
+
* @param {boolean} head_enabled
|
|
2600
|
+
* @param {number} head_follow_fraction
|
|
2601
|
+
* @param {boolean} lock_head_to_camera
|
|
2602
|
+
* @param {number} world_units_per_meter
|
|
2603
|
+
* @returns {Float32Array}
|
|
2604
|
+
*/
|
|
2605
|
+
export function solve_profile_viewer_space_gaze_scaled(profile_json, viewer_target, camera_position, camera_quaternion, gaze_origin, model_quaternion, viewer_vertical_fov_degrees, viewer_aspect, eyes_enabled, head_enabled, head_follow_fraction, lock_head_to_camera, world_units_per_meter) {
|
|
2606
|
+
const ptr0 = passStringToWasm0(profile_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2607
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2608
|
+
const ptr1 = passArrayF32ToWasm0(viewer_target, wasm.__wbindgen_malloc);
|
|
2609
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2610
|
+
const ptr2 = passArrayF32ToWasm0(camera_position, wasm.__wbindgen_malloc);
|
|
2611
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2612
|
+
const ptr3 = passArrayF32ToWasm0(camera_quaternion, wasm.__wbindgen_malloc);
|
|
2613
|
+
const len3 = WASM_VECTOR_LEN;
|
|
2614
|
+
const ptr4 = passArrayF32ToWasm0(gaze_origin, wasm.__wbindgen_malloc);
|
|
2615
|
+
const len4 = WASM_VECTOR_LEN;
|
|
2616
|
+
const ptr5 = passArrayF32ToWasm0(model_quaternion, wasm.__wbindgen_malloc);
|
|
2617
|
+
const len5 = WASM_VECTOR_LEN;
|
|
2618
|
+
const ret = wasm.solve_profile_viewer_space_gaze_scaled(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, viewer_vertical_fov_degrees, viewer_aspect, eyes_enabled, head_enabled, head_follow_fraction, lock_head_to_camera, world_units_per_meter);
|
|
2619
|
+
if (ret[3]) {
|
|
2620
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2621
|
+
}
|
|
2622
|
+
var v7 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
2623
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
2624
|
+
return v7;
|
|
2625
|
+
}
|
|
2626
|
+
|
|
1311
2627
|
/**
|
|
1312
2628
|
* Solve a uniform scale and translation for placing a template skeleton inside a mesh.
|
|
1313
2629
|
*
|
|
@@ -1386,6 +2702,71 @@ export function validate_generated_template_fit_metadata(template_id, source_cha
|
|
|
1386
2702
|
return ret >>> 0;
|
|
1387
2703
|
}
|
|
1388
2704
|
|
|
2705
|
+
/**
|
|
2706
|
+
* Resolve and validate VRM humanoid roles through profile node keys against a
|
|
2707
|
+
* renderer-neutral model descriptor. This is characterization metadata only;
|
|
2708
|
+
* it does not create or apply pose frame writes.
|
|
2709
|
+
* @param {string} profile_json
|
|
2710
|
+
* @param {string} model_json
|
|
2711
|
+
* @returns {string}
|
|
2712
|
+
*/
|
|
2713
|
+
export function validate_humanoid_characterization(profile_json, model_json) {
|
|
2714
|
+
let deferred4_0;
|
|
2715
|
+
let deferred4_1;
|
|
2716
|
+
try {
|
|
2717
|
+
const ptr0 = passStringToWasm0(profile_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2718
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2719
|
+
const ptr1 = passStringToWasm0(model_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2720
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2721
|
+
const ret = wasm.validate_humanoid_characterization(ptr0, len0, ptr1, len1);
|
|
2722
|
+
var ptr3 = ret[0];
|
|
2723
|
+
var len3 = ret[1];
|
|
2724
|
+
if (ret[3]) {
|
|
2725
|
+
ptr3 = 0; len3 = 0;
|
|
2726
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2727
|
+
}
|
|
2728
|
+
deferred4_0 = ptr3;
|
|
2729
|
+
deferred4_1 = len3;
|
|
2730
|
+
return getStringFromWasm0(ptr3, len3);
|
|
2731
|
+
} finally {
|
|
2732
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
/**
|
|
2737
|
+
* Validate an authored profile against a renderer-neutral model descriptor.
|
|
2738
|
+
* Three.js objects are reduced to this descriptor by the thin host adapter;
|
|
2739
|
+
* all mapping analysis and correction generation stays in Rust.
|
|
2740
|
+
* @param {string} profile_json
|
|
2741
|
+
* @param {string} model_json
|
|
2742
|
+
* @param {string} options_json
|
|
2743
|
+
* @returns {string}
|
|
2744
|
+
*/
|
|
2745
|
+
export function validate_profile_model(profile_json, model_json, options_json) {
|
|
2746
|
+
let deferred5_0;
|
|
2747
|
+
let deferred5_1;
|
|
2748
|
+
try {
|
|
2749
|
+
const ptr0 = passStringToWasm0(profile_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2750
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2751
|
+
const ptr1 = passStringToWasm0(model_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2752
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2753
|
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2754
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2755
|
+
const ret = wasm.validate_profile_model(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
2756
|
+
var ptr4 = ret[0];
|
|
2757
|
+
var len4 = ret[1];
|
|
2758
|
+
if (ret[3]) {
|
|
2759
|
+
ptr4 = 0; len4 = 0;
|
|
2760
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2761
|
+
}
|
|
2762
|
+
deferred5_0 = ptr4;
|
|
2763
|
+
deferred5_1 = len4;
|
|
2764
|
+
return getStringFromWasm0(ptr4, len4);
|
|
2765
|
+
} finally {
|
|
2766
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
2767
|
+
}
|
|
2768
|
+
}
|
|
2769
|
+
|
|
1389
2770
|
/**
|
|
1390
2771
|
* World-space camera direction for a model-relative camera angle.
|
|
1391
2772
|
* `model_quat` is the model's world quaternion `[x, y, z, w]`
|
|
@@ -1451,6 +2832,11 @@ function getArrayF32FromWasm0(ptr, len) {
|
|
|
1451
2832
|
return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
1452
2833
|
}
|
|
1453
2834
|
|
|
2835
|
+
function getArrayF64FromWasm0(ptr, len) {
|
|
2836
|
+
ptr = ptr >>> 0;
|
|
2837
|
+
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
2838
|
+
}
|
|
2839
|
+
|
|
1454
2840
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1455
2841
|
ptr = ptr >>> 0;
|
|
1456
2842
|
const mem = getDataViewMemory0();
|
|
@@ -1478,6 +2864,14 @@ function getFloat32ArrayMemory0() {
|
|
|
1478
2864
|
return cachedFloat32ArrayMemory0;
|
|
1479
2865
|
}
|
|
1480
2866
|
|
|
2867
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
2868
|
+
function getFloat64ArrayMemory0() {
|
|
2869
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
2870
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
2871
|
+
}
|
|
2872
|
+
return cachedFloat64ArrayMemory0;
|
|
2873
|
+
}
|
|
2874
|
+
|
|
1481
2875
|
function getStringFromWasm0(ptr, len) {
|
|
1482
2876
|
return decodeText(ptr >>> 0, len);
|
|
1483
2877
|
}
|
|
@@ -1602,6 +2996,7 @@ function __wbg_finalize_init(instance, module) {
|
|
|
1602
2996
|
wasmModule = module;
|
|
1603
2997
|
cachedDataViewMemory0 = null;
|
|
1604
2998
|
cachedFloat32ArrayMemory0 = null;
|
|
2999
|
+
cachedFloat64ArrayMemory0 = null;
|
|
1605
3000
|
cachedUint32ArrayMemory0 = null;
|
|
1606
3001
|
cachedUint8ArrayMemory0 = null;
|
|
1607
3002
|
wasm.__wbindgen_start();
|