@lovelace_lol/embody 0.0.7 → 0.0.9
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 +9197 -13851
- 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 +415 -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/authoring.d.ts +95 -0
- package/dist/three/authoringTypes.d.ts +576 -0
- package/dist/three/character.d.ts +243 -0
- package/dist/three/characterHost.d.ts +48 -0
- package/dist/three/clipBindings.d.ts +6 -0
- package/dist/three/index.d.ts +171 -0
- package/dist/three/model.d.ts +31 -0
- package/dist/three/modelSkinning.d.ts +3 -0
- package/dist/three/nativePlayback.d.ts +121 -0
- package/dist/three/playbackRendering.d.ts +14 -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 +9252 -8844
- 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/compatibility.d.ts +14 -0
- package/dist/wasm/embody_wasm.d.ts +352 -71
- package/dist/wasm/embody_wasm.js +1266 -37
- package/dist/wasm/embody_wasm_bg.wasm +0 -0
- package/dist/wasm/embody_wasm_bg.wasm.d.ts +113 -54
- package/dist/wasm/index.d.ts +131 -0
- package/dist/wasm.d.ts +1 -43
- package/dist/wasm.js +1100 -239
- package/dist/wasm.js.map +1 -1
- package/package.json +35 -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
|
@@ -177,6 +177,197 @@ export class HairPhysicsSolver {
|
|
|
177
177
|
}
|
|
178
178
|
if (Symbol.dispose) HairPhysicsSolver.prototype[Symbol.dispose] = HairPhysicsSolver.prototype.free;
|
|
179
179
|
|
|
180
|
+
/**
|
|
181
|
+
* A command protocol for one bound model/profile, not an animation evaluator.
|
|
182
|
+
* Dispatch each returned batch in order, then feed native events to `notify`.
|
|
183
|
+
* Before `free`, dispatch `dispose` to release engine-owned resources.
|
|
184
|
+
*/
|
|
185
|
+
export class NativePlaybackSession {
|
|
186
|
+
__destroy_into_raw() {
|
|
187
|
+
const ptr = this.__wbg_ptr;
|
|
188
|
+
this.__wbg_ptr = 0;
|
|
189
|
+
NativePlaybackSessionFinalization.unregister(this);
|
|
190
|
+
return ptr;
|
|
191
|
+
}
|
|
192
|
+
free() {
|
|
193
|
+
const ptr = this.__destroy_into_raw();
|
|
194
|
+
wasm.__wbg_nativeplaybacksession_free(ptr, 0);
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* @param {string} handle
|
|
198
|
+
* @param {string} control_json
|
|
199
|
+
* @returns {string}
|
|
200
|
+
*/
|
|
201
|
+
control(handle, control_json) {
|
|
202
|
+
let deferred4_0;
|
|
203
|
+
let deferred4_1;
|
|
204
|
+
try {
|
|
205
|
+
const ptr0 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
206
|
+
const len0 = WASM_VECTOR_LEN;
|
|
207
|
+
const ptr1 = passStringToWasm0(control_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
208
|
+
const len1 = WASM_VECTOR_LEN;
|
|
209
|
+
const ret = wasm.nativeplaybacksession_control(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
210
|
+
var ptr3 = ret[0];
|
|
211
|
+
var len3 = ret[1];
|
|
212
|
+
if (ret[3]) {
|
|
213
|
+
ptr3 = 0; len3 = 0;
|
|
214
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
215
|
+
}
|
|
216
|
+
deferred4_0 = ptr3;
|
|
217
|
+
deferred4_1 = len3;
|
|
218
|
+
return getStringFromWasm0(ptr3, len3);
|
|
219
|
+
} finally {
|
|
220
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* @returns {string}
|
|
225
|
+
*/
|
|
226
|
+
dispose() {
|
|
227
|
+
let deferred2_0;
|
|
228
|
+
let deferred2_1;
|
|
229
|
+
try {
|
|
230
|
+
const ret = wasm.nativeplaybacksession_dispose(this.__wbg_ptr);
|
|
231
|
+
var ptr1 = ret[0];
|
|
232
|
+
var len1 = ret[1];
|
|
233
|
+
if (ret[3]) {
|
|
234
|
+
ptr1 = 0; len1 = 0;
|
|
235
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
236
|
+
}
|
|
237
|
+
deferred2_0 = ptr1;
|
|
238
|
+
deferred2_1 = len1;
|
|
239
|
+
return getStringFromWasm0(ptr1, len1);
|
|
240
|
+
} finally {
|
|
241
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
constructor() {
|
|
245
|
+
const ret = wasm.nativeplaybacksession_new();
|
|
246
|
+
if (ret[2]) {
|
|
247
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
248
|
+
}
|
|
249
|
+
this.__wbg_ptr = ret[0];
|
|
250
|
+
NativePlaybackSessionFinalization.register(this, this.__wbg_ptr, this);
|
|
251
|
+
return this;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Late/duplicate/foreign well-formed notifications return an empty batch.
|
|
255
|
+
* A native error after held completion releases resources without emitting
|
|
256
|
+
* a second terminal event.
|
|
257
|
+
* @param {string} native_event_json
|
|
258
|
+
* @returns {string}
|
|
259
|
+
*/
|
|
260
|
+
notify(native_event_json) {
|
|
261
|
+
let deferred3_0;
|
|
262
|
+
let deferred3_1;
|
|
263
|
+
try {
|
|
264
|
+
const ptr0 = passStringToWasm0(native_event_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
265
|
+
const len0 = WASM_VECTOR_LEN;
|
|
266
|
+
const ret = wasm.nativeplaybacksession_notify(this.__wbg_ptr, ptr0, len0);
|
|
267
|
+
var ptr2 = ret[0];
|
|
268
|
+
var len2 = ret[1];
|
|
269
|
+
if (ret[3]) {
|
|
270
|
+
ptr2 = 0; len2 = 0;
|
|
271
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
272
|
+
}
|
|
273
|
+
deferred3_0 = ptr2;
|
|
274
|
+
deferred3_1 = len2;
|
|
275
|
+
return getStringFromWasm0(ptr2, len2);
|
|
276
|
+
} finally {
|
|
277
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Takes concrete ClipIR from RuntimeCore compilation or baked-clip intake.
|
|
282
|
+
* Semantic strength must already be compiled into the clip; weight is the
|
|
283
|
+
* native action's contribution and never changes compiled samples.
|
|
284
|
+
* @param {string} clip_json
|
|
285
|
+
* @param {string} options_json
|
|
286
|
+
* @returns {string}
|
|
287
|
+
*/
|
|
288
|
+
play(clip_json, options_json) {
|
|
289
|
+
let deferred4_0;
|
|
290
|
+
let deferred4_1;
|
|
291
|
+
try {
|
|
292
|
+
const ptr0 = passStringToWasm0(clip_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
293
|
+
const len0 = WASM_VECTOR_LEN;
|
|
294
|
+
const ptr1 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
295
|
+
const len1 = WASM_VECTOR_LEN;
|
|
296
|
+
const ret = wasm.nativeplaybacksession_play(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
297
|
+
var ptr3 = ret[0];
|
|
298
|
+
var len3 = ret[1];
|
|
299
|
+
if (ret[3]) {
|
|
300
|
+
ptr3 = 0; len3 = 0;
|
|
301
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
302
|
+
}
|
|
303
|
+
deferred4_0 = ptr3;
|
|
304
|
+
deferred4_1 = len3;
|
|
305
|
+
return getStringFromWasm0(ptr3, len3);
|
|
306
|
+
} finally {
|
|
307
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Always starts a new generation, even if the identity labels are reused.
|
|
312
|
+
* Hosts must call this on every model/profile replacement before new play.
|
|
313
|
+
* @param {string} model_key
|
|
314
|
+
* @param {string} profile_key
|
|
315
|
+
* @returns {string}
|
|
316
|
+
*/
|
|
317
|
+
rebind(model_key, profile_key) {
|
|
318
|
+
let deferred4_0;
|
|
319
|
+
let deferred4_1;
|
|
320
|
+
try {
|
|
321
|
+
const ptr0 = passStringToWasm0(model_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
322
|
+
const len0 = WASM_VECTOR_LEN;
|
|
323
|
+
const ptr1 = passStringToWasm0(profile_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
324
|
+
const len1 = WASM_VECTOR_LEN;
|
|
325
|
+
const ret = wasm.nativeplaybacksession_rebind(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
326
|
+
var ptr3 = ret[0];
|
|
327
|
+
var len3 = ret[1];
|
|
328
|
+
if (ret[3]) {
|
|
329
|
+
ptr3 = 0; len3 = 0;
|
|
330
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
331
|
+
}
|
|
332
|
+
deferred4_0 = ptr3;
|
|
333
|
+
deferred4_1 = len3;
|
|
334
|
+
return getStringFromWasm0(ptr3, len3);
|
|
335
|
+
} finally {
|
|
336
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Replace authored samples without resetting native time, loop progress or
|
|
341
|
+
* the request identity. A held request remains terminal after a pose edit.
|
|
342
|
+
* @param {string} handle
|
|
343
|
+
* @param {string} clip_json
|
|
344
|
+
* @returns {string}
|
|
345
|
+
*/
|
|
346
|
+
replace_clip(handle, clip_json) {
|
|
347
|
+
let deferred4_0;
|
|
348
|
+
let deferred4_1;
|
|
349
|
+
try {
|
|
350
|
+
const ptr0 = passStringToWasm0(handle, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
351
|
+
const len0 = WASM_VECTOR_LEN;
|
|
352
|
+
const ptr1 = passStringToWasm0(clip_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
353
|
+
const len1 = WASM_VECTOR_LEN;
|
|
354
|
+
const ret = wasm.nativeplaybacksession_replace_clip(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
355
|
+
var ptr3 = ret[0];
|
|
356
|
+
var len3 = ret[1];
|
|
357
|
+
if (ret[3]) {
|
|
358
|
+
ptr3 = 0; len3 = 0;
|
|
359
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
360
|
+
}
|
|
361
|
+
deferred4_0 = ptr3;
|
|
362
|
+
deferred4_1 = len3;
|
|
363
|
+
return getStringFromWasm0(ptr3, len3);
|
|
364
|
+
} finally {
|
|
365
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
if (Symbol.dispose) NativePlaybackSession.prototype[Symbol.dispose] = NativePlaybackSession.prototype.free;
|
|
370
|
+
|
|
180
371
|
/**
|
|
181
372
|
* Host-neutral live morph runtime. Owns AU/viseme/mix state and emits packed
|
|
182
373
|
* morph frame deltas. Engine objects never enter this struct.
|
|
@@ -193,11 +384,16 @@ export class RuntimeCore {
|
|
|
193
384
|
wasm.__wbg_runtimecore_free(ptr, 0);
|
|
194
385
|
}
|
|
195
386
|
/**
|
|
196
|
-
*
|
|
387
|
+
* Validate every channel before replacing Body state. Other FACS state remains.
|
|
388
|
+
* @param {string} json
|
|
197
389
|
*/
|
|
198
|
-
|
|
199
|
-
const
|
|
200
|
-
|
|
390
|
+
apply_semantic_pose_json(json) {
|
|
391
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
392
|
+
const len0 = WASM_VECTOR_LEN;
|
|
393
|
+
const ret = wasm.runtimecore_apply_semantic_pose_json(this.__wbg_ptr, ptr0, len0);
|
|
394
|
+
if (ret[1]) {
|
|
395
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
396
|
+
}
|
|
201
397
|
}
|
|
202
398
|
/**
|
|
203
399
|
* @returns {number}
|
|
@@ -206,12 +402,222 @@ export class RuntimeCore {
|
|
|
206
402
|
const ret = wasm.runtimecore_au_morph_binding_stride();
|
|
207
403
|
return ret >>> 0;
|
|
208
404
|
}
|
|
405
|
+
/**
|
|
406
|
+
* Begin one host command; its concrete destinations determine which native
|
|
407
|
+
* actions are replaced. Unrelated targets keep their existing playback.
|
|
408
|
+
*/
|
|
409
|
+
begin_live_command() {
|
|
410
|
+
wasm.runtimecore_begin_live_command(this.__wbg_ptr);
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* @param {string} clip_name
|
|
414
|
+
* @param {string} curves_json
|
|
415
|
+
* @param {string} options_json
|
|
416
|
+
* @returns {string}
|
|
417
|
+
*/
|
|
418
|
+
build_clip(clip_name, curves_json, options_json) {
|
|
419
|
+
let deferred5_0;
|
|
420
|
+
let deferred5_1;
|
|
421
|
+
try {
|
|
422
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
423
|
+
const len0 = WASM_VECTOR_LEN;
|
|
424
|
+
const ptr1 = passStringToWasm0(curves_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
425
|
+
const len1 = WASM_VECTOR_LEN;
|
|
426
|
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
427
|
+
const len2 = WASM_VECTOR_LEN;
|
|
428
|
+
const ret = wasm.runtimecore_build_clip(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
429
|
+
var ptr4 = ret[0];
|
|
430
|
+
var len4 = ret[1];
|
|
431
|
+
if (ret[3]) {
|
|
432
|
+
ptr4 = 0; len4 = 0;
|
|
433
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
434
|
+
}
|
|
435
|
+
deferred5_0 = ptr4;
|
|
436
|
+
deferred5_1 = len4;
|
|
437
|
+
return getStringFromWasm0(ptr4, len4);
|
|
438
|
+
} finally {
|
|
439
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Compile the configured gravity response directly to concrete morph
|
|
444
|
+
* tracks. Three owns interpolation from the captured initial scene pose.
|
|
445
|
+
* @param {string} name
|
|
446
|
+
* @param {number} pitch
|
|
447
|
+
* @param {number} duration_seconds
|
|
448
|
+
* @param {string} options_json
|
|
449
|
+
* @returns {string}
|
|
450
|
+
*/
|
|
451
|
+
build_hair_gravity_clip(name, pitch, duration_seconds, options_json) {
|
|
452
|
+
let deferred4_0;
|
|
453
|
+
let deferred4_1;
|
|
454
|
+
try {
|
|
455
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
456
|
+
const len0 = WASM_VECTOR_LEN;
|
|
457
|
+
const ptr1 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
458
|
+
const len1 = WASM_VECTOR_LEN;
|
|
459
|
+
const ret = wasm.runtimecore_build_hair_gravity_clip(this.__wbg_ptr, ptr0, len0, pitch, duration_seconds, ptr1, len1);
|
|
460
|
+
var ptr3 = ret[0];
|
|
461
|
+
var len3 = ret[1];
|
|
462
|
+
if (ret[3]) {
|
|
463
|
+
ptr3 = 0; len3 = 0;
|
|
464
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
465
|
+
}
|
|
466
|
+
deferred4_0 = ptr3;
|
|
467
|
+
deferred4_1 = len3;
|
|
468
|
+
return getStringFromWasm0(ptr3, len3);
|
|
469
|
+
} finally {
|
|
470
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Compile the current live semantic controls into ordinary native tracks.
|
|
475
|
+
* The connector captures inherited starts at play time; Rust never ticks
|
|
476
|
+
* or interpolates these samples. Empty output relinquishes all live tracks.
|
|
477
|
+
* @param {string} name
|
|
478
|
+
* @param {number} duration_seconds
|
|
479
|
+
* @returns {string}
|
|
480
|
+
*/
|
|
481
|
+
build_live_clip(name, duration_seconds) {
|
|
482
|
+
let deferred3_0;
|
|
483
|
+
let deferred3_1;
|
|
484
|
+
try {
|
|
485
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
486
|
+
const len0 = WASM_VECTOR_LEN;
|
|
487
|
+
const ret = wasm.runtimecore_build_live_clip(this.__wbg_ptr, ptr0, len0, duration_seconds);
|
|
488
|
+
var ptr2 = ret[0];
|
|
489
|
+
var len2 = ret[1];
|
|
490
|
+
if (ret[3]) {
|
|
491
|
+
ptr2 = 0; len2 = 0;
|
|
492
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
493
|
+
}
|
|
494
|
+
deferred3_0 = ptr2;
|
|
495
|
+
deferred3_1 = len2;
|
|
496
|
+
return getStringFromWasm0(ptr2, len2);
|
|
497
|
+
} finally {
|
|
498
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Compile relinquished live targets back to their reference values. Run
|
|
503
|
+
* this clip with finalPose=release so native ownership ends at completion.
|
|
504
|
+
* @param {string} name
|
|
505
|
+
* @param {string} previous_clip_json
|
|
506
|
+
* @param {number} duration_seconds
|
|
507
|
+
* @returns {string}
|
|
508
|
+
*/
|
|
509
|
+
build_live_release_clip(name, previous_clip_json, duration_seconds) {
|
|
510
|
+
let deferred4_0;
|
|
511
|
+
let deferred4_1;
|
|
512
|
+
try {
|
|
513
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
514
|
+
const len0 = WASM_VECTOR_LEN;
|
|
515
|
+
const ptr1 = passStringToWasm0(previous_clip_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
516
|
+
const len1 = WASM_VECTOR_LEN;
|
|
517
|
+
const ret = wasm.runtimecore_build_live_release_clip(this.__wbg_ptr, ptr0, len0, ptr1, len1, duration_seconds);
|
|
518
|
+
var ptr3 = ret[0];
|
|
519
|
+
var len3 = ret[1];
|
|
520
|
+
if (ret[3]) {
|
|
521
|
+
ptr3 = 0; len3 = 0;
|
|
522
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
523
|
+
}
|
|
524
|
+
deferred4_0 = ptr3;
|
|
525
|
+
deferred4_1 = len3;
|
|
526
|
+
return getStringFromWasm0(ptr3, len3);
|
|
527
|
+
} finally {
|
|
528
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* Compile semantic motions and optional facial curves together without changing live state.
|
|
533
|
+
* @param {string} name
|
|
534
|
+
* @param {string} json
|
|
535
|
+
* @param {string} options_json
|
|
536
|
+
* @returns {string}
|
|
537
|
+
*/
|
|
538
|
+
build_semantic_clip(name, json, options_json) {
|
|
539
|
+
let deferred5_0;
|
|
540
|
+
let deferred5_1;
|
|
541
|
+
try {
|
|
542
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
543
|
+
const len0 = WASM_VECTOR_LEN;
|
|
544
|
+
const ptr1 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
545
|
+
const len1 = WASM_VECTOR_LEN;
|
|
546
|
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
547
|
+
const len2 = WASM_VECTOR_LEN;
|
|
548
|
+
const ret = wasm.runtimecore_build_semantic_clip(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
549
|
+
var ptr4 = ret[0];
|
|
550
|
+
var len4 = ret[1];
|
|
551
|
+
if (ret[3]) {
|
|
552
|
+
ptr4 = 0; len4 = 0;
|
|
553
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
554
|
+
}
|
|
555
|
+
deferred5_0 = ptr4;
|
|
556
|
+
deferred5_1 = len4;
|
|
557
|
+
return getStringFromWasm0(ptr4, len4);
|
|
558
|
+
} finally {
|
|
559
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* @param {string} clip_name
|
|
564
|
+
* @param {string} channels_json
|
|
565
|
+
* @param {string} options_json
|
|
566
|
+
* @returns {string}
|
|
567
|
+
*/
|
|
568
|
+
build_typed_clip(clip_name, channels_json, options_json) {
|
|
569
|
+
let deferred5_0;
|
|
570
|
+
let deferred5_1;
|
|
571
|
+
try {
|
|
572
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
573
|
+
const len0 = WASM_VECTOR_LEN;
|
|
574
|
+
const ptr1 = passStringToWasm0(channels_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
575
|
+
const len1 = WASM_VECTOR_LEN;
|
|
576
|
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
577
|
+
const len2 = WASM_VECTOR_LEN;
|
|
578
|
+
const ret = wasm.runtimecore_build_typed_clip(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
579
|
+
var ptr4 = ret[0];
|
|
580
|
+
var len4 = ret[1];
|
|
581
|
+
if (ret[3]) {
|
|
582
|
+
ptr4 = 0; len4 = 0;
|
|
583
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
584
|
+
}
|
|
585
|
+
deferred5_0 = ptr4;
|
|
586
|
+
deferred5_1 = len4;
|
|
587
|
+
return getStringFromWasm0(ptr4, len4);
|
|
588
|
+
} finally {
|
|
589
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Captures manual semantic state; does not infer actions from a mixer pose.
|
|
594
|
+
* @returns {string}
|
|
595
|
+
*/
|
|
596
|
+
capture_semantic_pose_json() {
|
|
597
|
+
let deferred1_0;
|
|
598
|
+
let deferred1_1;
|
|
599
|
+
try {
|
|
600
|
+
const ret = wasm.runtimecore_capture_semantic_pose_json(this.__wbg_ptr);
|
|
601
|
+
deferred1_0 = ret[0];
|
|
602
|
+
deferred1_1 = ret[1];
|
|
603
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
604
|
+
} finally {
|
|
605
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* @param {string} clip_name
|
|
610
|
+
* @returns {boolean}
|
|
611
|
+
*/
|
|
612
|
+
cleanup_snippet(clip_name) {
|
|
613
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
614
|
+
const len0 = WASM_VECTOR_LEN;
|
|
615
|
+
const ret = wasm.runtimecore_cleanup_snippet(this.__wbg_ptr, ptr0, len0);
|
|
616
|
+
return ret !== 0;
|
|
617
|
+
}
|
|
209
618
|
clear() {
|
|
210
619
|
wasm.runtimecore_clear(this.__wbg_ptr);
|
|
211
620
|
}
|
|
212
|
-
clear_transitions() {
|
|
213
|
-
wasm.runtimecore_clear_transitions(this.__wbg_ptr);
|
|
214
|
-
}
|
|
215
621
|
/**
|
|
216
622
|
* Configure the core from the profile and model descriptor JSON hosts
|
|
217
623
|
* already have. All binding compilation (mesh/morph/bone name resolution,
|
|
@@ -253,9 +659,9 @@ export class RuntimeCore {
|
|
|
253
659
|
/**
|
|
254
660
|
* Configure from a resolved profile without applying an embedded preset.
|
|
255
661
|
*
|
|
256
|
-
*
|
|
257
|
-
*
|
|
258
|
-
* an
|
|
662
|
+
* Empty profiles and mappings that do not match the current model are
|
|
663
|
+
* non-fatal. Static imports can render before authoring any bindings,
|
|
664
|
+
* without silently substituting an embedded preset.
|
|
259
665
|
* @param {string} profile_json
|
|
260
666
|
* @param {string} model_json
|
|
261
667
|
*/
|
|
@@ -269,6 +675,42 @@ export class RuntimeCore {
|
|
|
269
675
|
throw takeFromExternrefTable0(ret[0]);
|
|
270
676
|
}
|
|
271
677
|
}
|
|
678
|
+
/**
|
|
679
|
+
* Carry canonical controls across a renderer rebind. Model-local IDs and
|
|
680
|
+
* reference values belong to the new binding and are never copied.
|
|
681
|
+
* @param {RuntimeCore} previous
|
|
682
|
+
*/
|
|
683
|
+
copy_live_state_from(previous) {
|
|
684
|
+
_assertClass(previous, RuntimeCore);
|
|
685
|
+
wasm.runtimecore_copy_live_state_from(this.__wbg_ptr, previous.__wbg_ptr);
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Same rows as `evaluate_bone_frame_delta`, but only bones an active AU,
|
|
689
|
+
* translation, or viseme jaw value is currently rotating or moving.
|
|
690
|
+
* Neutral bones are omitted (no rest reset), so hosts can re-apply this
|
|
691
|
+
* after mixer playback without freezing clip-driven bones (Loom3 parity).
|
|
692
|
+
* @returns {Float32Array}
|
|
693
|
+
*/
|
|
694
|
+
evaluate_active_bone_frame() {
|
|
695
|
+
const ret = wasm.runtimecore_evaluate_active_bone_frame(this.__wbg_ptr);
|
|
696
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
697
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
698
|
+
return v1;
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* Same rows as `evaluate_morph_frame_delta`, but only channels with a
|
|
702
|
+
* non-zero live value or an explicit direct override (including zero).
|
|
703
|
+
* Hosts re-apply this after mixer playback so live
|
|
704
|
+
* AU/viseme state wins over clip tracks (Loom3 parity) without resetting
|
|
705
|
+
* channels the mixer owns.
|
|
706
|
+
* @returns {Float32Array}
|
|
707
|
+
*/
|
|
708
|
+
evaluate_active_morph_frame() {
|
|
709
|
+
const ret = wasm.runtimecore_evaluate_active_morph_frame(this.__wbg_ptr);
|
|
710
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
711
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
712
|
+
return v1;
|
|
713
|
+
}
|
|
272
714
|
/**
|
|
273
715
|
* Packed bone FrameDelta rows: `[bone_id, px, py, pz, qx, qy, qz, qw, flags] * N`
|
|
274
716
|
* flags: bit0 = has_position, bit1 = has_rotation. Composite rotations are
|
|
@@ -284,6 +726,7 @@ export class RuntimeCore {
|
|
|
284
726
|
}
|
|
285
727
|
/**
|
|
286
728
|
* Packed morph FrameDelta rows: `[mesh_id, morph_target_id, value, mode] * N`
|
|
729
|
+
* Live AU/viseme/direct morph state only — clip playback is host-owned.
|
|
287
730
|
* @returns {Float32Array}
|
|
288
731
|
*/
|
|
289
732
|
evaluate_morph_frame_delta() {
|
|
@@ -292,6 +735,84 @@ export class RuntimeCore {
|
|
|
292
735
|
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
293
736
|
return v1;
|
|
294
737
|
}
|
|
738
|
+
/**
|
|
739
|
+
* Emit only currently/previously owned bone properties. Position and
|
|
740
|
+
* rotation ownership are separate; inactive properties release once.
|
|
741
|
+
* @returns {Float32Array}
|
|
742
|
+
*/
|
|
743
|
+
evaluate_procedural_bone_frame() {
|
|
744
|
+
const ret = wasm.runtimecore_evaluate_procedural_bone_frame(this.__wbg_ptr);
|
|
745
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
746
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
747
|
+
return v1;
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* Emit active morphs plus one neutral release for previously owned
|
|
751
|
+
* targets. Direct overrides, including explicit zero, retain ownership.
|
|
752
|
+
* Untouched targets are omitted so constant mixer tracks keep their pose.
|
|
753
|
+
* @returns {Float32Array}
|
|
754
|
+
*/
|
|
755
|
+
evaluate_procedural_morph_frame() {
|
|
756
|
+
const ret = wasm.runtimecore_evaluate_procedural_morph_frame(this.__wbg_ptr);
|
|
757
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
758
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
759
|
+
return v1;
|
|
760
|
+
}
|
|
761
|
+
/**
|
|
762
|
+
* Scene extras for live state. Clip-driven scale/visibility/object writes
|
|
763
|
+
* are owned by the host mixer, so this returns an empty frame.
|
|
764
|
+
* @returns {string}
|
|
765
|
+
*/
|
|
766
|
+
evaluate_scene_frame() {
|
|
767
|
+
let deferred2_0;
|
|
768
|
+
let deferred2_1;
|
|
769
|
+
try {
|
|
770
|
+
const ret = wasm.runtimecore_evaluate_scene_frame(this.__wbg_ptr);
|
|
771
|
+
var ptr1 = ret[0];
|
|
772
|
+
var len1 = ret[1];
|
|
773
|
+
if (ret[3]) {
|
|
774
|
+
ptr1 = 0; len1 = 0;
|
|
775
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
776
|
+
}
|
|
777
|
+
deferred2_0 = ptr1;
|
|
778
|
+
deferred2_1 = len1;
|
|
779
|
+
return getStringFromWasm0(ptr1, len1);
|
|
780
|
+
} finally {
|
|
781
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
782
|
+
}
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* Full Body property writes, including neutral reference values. Hosts use
|
|
786
|
+
* this once when an explicit pose replaces direct legacy bone edits.
|
|
787
|
+
* @returns {Float32Array}
|
|
788
|
+
*/
|
|
789
|
+
evaluate_semantic_body_bone_frame() {
|
|
790
|
+
const ret = wasm.runtimecore_evaluate_semantic_body_bone_frame(this.__wbg_ptr);
|
|
791
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
792
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
793
|
+
return v1;
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* @returns {string}
|
|
797
|
+
*/
|
|
798
|
+
get_animation_clips() {
|
|
799
|
+
let deferred2_0;
|
|
800
|
+
let deferred2_1;
|
|
801
|
+
try {
|
|
802
|
+
const ret = wasm.runtimecore_get_animation_clips(this.__wbg_ptr);
|
|
803
|
+
var ptr1 = ret[0];
|
|
804
|
+
var len1 = ret[1];
|
|
805
|
+
if (ret[3]) {
|
|
806
|
+
ptr1 = 0; len1 = 0;
|
|
807
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
808
|
+
}
|
|
809
|
+
deferred2_0 = ptr1;
|
|
810
|
+
deferred2_1 = len1;
|
|
811
|
+
return getStringFromWasm0(ptr1, len1);
|
|
812
|
+
} finally {
|
|
813
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
814
|
+
}
|
|
815
|
+
}
|
|
295
816
|
/**
|
|
296
817
|
* @param {number} id
|
|
297
818
|
* @returns {number}
|
|
@@ -300,6 +821,41 @@ export class RuntimeCore {
|
|
|
300
821
|
const ret = wasm.runtimecore_get_au(this.__wbg_ptr, id);
|
|
301
822
|
return ret;
|
|
302
823
|
}
|
|
824
|
+
/**
|
|
825
|
+
* Stored live AU balance in [-1, 1], or neutral zero when unset or cleared.
|
|
826
|
+
* @param {number} id
|
|
827
|
+
* @returns {number}
|
|
828
|
+
*/
|
|
829
|
+
get_au_balance(id) {
|
|
830
|
+
const ret = wasm.runtimecore_get_au_balance(this.__wbg_ptr, id);
|
|
831
|
+
return ret;
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Current runtime tissue strength, independent of persisted profile defaults.
|
|
835
|
+
* @param {number} id
|
|
836
|
+
* @returns {number}
|
|
837
|
+
*/
|
|
838
|
+
get_au_mix_weight(id) {
|
|
839
|
+
const ret = wasm.runtimecore_get_au_mix_weight(this.__wbg_ptr, id);
|
|
840
|
+
return ret;
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* Resolved Body descriptors for the configured profile/model. Model
|
|
844
|
+
* inspection and descriptor resolution are cached until reconfiguration.
|
|
845
|
+
* @returns {string}
|
|
846
|
+
*/
|
|
847
|
+
get_body_controls_json() {
|
|
848
|
+
let deferred1_0;
|
|
849
|
+
let deferred1_1;
|
|
850
|
+
try {
|
|
851
|
+
const ret = wasm.runtimecore_get_body_controls_json(this.__wbg_ptr);
|
|
852
|
+
deferred1_0 = ret[0];
|
|
853
|
+
deferred1_1 = ret[1];
|
|
854
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
855
|
+
} finally {
|
|
856
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
857
|
+
}
|
|
858
|
+
}
|
|
303
859
|
/**
|
|
304
860
|
* @param {number} neg_au
|
|
305
861
|
* @param {number} pos_au
|
|
@@ -309,6 +865,122 @@ export class RuntimeCore {
|
|
|
309
865
|
const ret = wasm.runtimecore_get_continuum(this.__wbg_ptr, neg_au, pos_au);
|
|
310
866
|
return ret;
|
|
311
867
|
}
|
|
868
|
+
/**
|
|
869
|
+
* Normalized hair configuration belongs to the selected profile, never an
|
|
870
|
+
* adapter fallback. Explicit empty/null mappings remain empty.
|
|
871
|
+
* @returns {string}
|
|
872
|
+
*/
|
|
873
|
+
get_hair_config_json() {
|
|
874
|
+
let deferred2_0;
|
|
875
|
+
let deferred2_1;
|
|
876
|
+
try {
|
|
877
|
+
const ret = wasm.runtimecore_get_hair_config_json(this.__wbg_ptr);
|
|
878
|
+
var ptr1 = ret[0];
|
|
879
|
+
var len1 = ret[1];
|
|
880
|
+
if (ret[3]) {
|
|
881
|
+
ptr1 = 0; len1 = 0;
|
|
882
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
883
|
+
}
|
|
884
|
+
deferred2_0 = ptr1;
|
|
885
|
+
deferred2_1 = len1;
|
|
886
|
+
return getStringFromWasm0(ptr1, len1);
|
|
887
|
+
} finally {
|
|
888
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
/**
|
|
892
|
+
* @param {string} available_json
|
|
893
|
+
* @returns {string}
|
|
894
|
+
*/
|
|
895
|
+
get_missing_hair_morph_targets_json(available_json) {
|
|
896
|
+
let deferred3_0;
|
|
897
|
+
let deferred3_1;
|
|
898
|
+
try {
|
|
899
|
+
const ptr0 = passStringToWasm0(available_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
900
|
+
const len0 = WASM_VECTOR_LEN;
|
|
901
|
+
const ret = wasm.runtimecore_get_missing_hair_morph_targets_json(this.__wbg_ptr, ptr0, len0);
|
|
902
|
+
var ptr2 = ret[0];
|
|
903
|
+
var len2 = ret[1];
|
|
904
|
+
if (ret[3]) {
|
|
905
|
+
ptr2 = 0; len2 = 0;
|
|
906
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
907
|
+
}
|
|
908
|
+
deferred3_0 = ptr2;
|
|
909
|
+
deferred3_1 = len2;
|
|
910
|
+
return getStringFromWasm0(ptr2, len2);
|
|
911
|
+
} finally {
|
|
912
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* Profile-derived motions and resolved model support for prompt/pose editors.
|
|
917
|
+
* @returns {string}
|
|
918
|
+
*/
|
|
919
|
+
get_semantic_pose_catalog_json() {
|
|
920
|
+
let deferred1_0;
|
|
921
|
+
let deferred1_1;
|
|
922
|
+
try {
|
|
923
|
+
const ret = wasm.runtimecore_get_semantic_pose_catalog_json(this.__wbg_ptr);
|
|
924
|
+
deferred1_0 = ret[0];
|
|
925
|
+
deferred1_1 = ret[1];
|
|
926
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
927
|
+
} finally {
|
|
928
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Stored direct viseme value, or zero for an unset or out-of-range slot.
|
|
933
|
+
* Host mixer output is not part of this live control state.
|
|
934
|
+
* @param {number} index
|
|
935
|
+
* @returns {number}
|
|
936
|
+
*/
|
|
937
|
+
get_viseme(index) {
|
|
938
|
+
const ret = wasm.runtimecore_get_viseme(this.__wbg_ptr, index);
|
|
939
|
+
return ret;
|
|
940
|
+
}
|
|
941
|
+
/**
|
|
942
|
+
* Stored direct viseme jaw scale, or one for an unset or out-of-range slot.
|
|
943
|
+
* @param {number} index
|
|
944
|
+
* @returns {number}
|
|
945
|
+
*/
|
|
946
|
+
get_viseme_jaw_scale(index) {
|
|
947
|
+
const ret = wasm.runtimecore_get_viseme_jaw_scale(this.__wbg_ptr, index);
|
|
948
|
+
return ret;
|
|
949
|
+
}
|
|
950
|
+
/**
|
|
951
|
+
* @param {number} au_id
|
|
952
|
+
* @returns {boolean}
|
|
953
|
+
*/
|
|
954
|
+
has_left_right_bones(au_id) {
|
|
955
|
+
const ret = wasm.runtimecore_has_left_right_bones(this.__wbg_ptr, au_id);
|
|
956
|
+
return ret !== 0;
|
|
957
|
+
}
|
|
958
|
+
/**
|
|
959
|
+
* @returns {string}
|
|
960
|
+
*/
|
|
961
|
+
live_command_targets_json() {
|
|
962
|
+
let deferred1_0;
|
|
963
|
+
let deferred1_1;
|
|
964
|
+
try {
|
|
965
|
+
const ret = wasm.runtimecore_live_command_targets_json(this.__wbg_ptr);
|
|
966
|
+
deferred1_0 = ret[0];
|
|
967
|
+
deferred1_1 = ret[1];
|
|
968
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
969
|
+
} finally {
|
|
970
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
/**
|
|
974
|
+
* @param {string} clips_json
|
|
975
|
+
*/
|
|
976
|
+
load_animation_clips(clips_json) {
|
|
977
|
+
const ptr0 = passStringToWasm0(clips_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
978
|
+
const len0 = WASM_VECTOR_LEN;
|
|
979
|
+
const ret = wasm.runtimecore_load_animation_clips(this.__wbg_ptr, ptr0, len0);
|
|
980
|
+
if (ret[1]) {
|
|
981
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
982
|
+
}
|
|
983
|
+
}
|
|
312
984
|
/**
|
|
313
985
|
* Packed rows: `[au_id, side, mesh_id, morph_target_id, weight] * N`
|
|
314
986
|
* side: 0=left, 1=right, 2=center
|
|
@@ -320,7 +992,6 @@ export class RuntimeCore {
|
|
|
320
992
|
wasm.runtimecore_load_au_morph_bindings(this.__wbg_ptr, ptr0, len0);
|
|
321
993
|
}
|
|
322
994
|
/**
|
|
323
|
-
* Packed rows: `[bone_id, px, py, pz, qx, qy, qz, qw] * N`
|
|
324
995
|
* @param {Float32Array} values
|
|
325
996
|
*/
|
|
326
997
|
load_bone_rest_transforms(values) {
|
|
@@ -385,6 +1056,112 @@ export class RuntimeCore {
|
|
|
385
1056
|
RuntimeCoreFinalization.register(this, this.__wbg_ptr, this);
|
|
386
1057
|
return this;
|
|
387
1058
|
}
|
|
1059
|
+
/**
|
|
1060
|
+
* @param {string} clip_json
|
|
1061
|
+
* @param {string} source
|
|
1062
|
+
*/
|
|
1063
|
+
register_animation_clip(clip_json, source) {
|
|
1064
|
+
const ptr0 = passStringToWasm0(clip_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1065
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1066
|
+
const ptr1 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1067
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1068
|
+
const ret = wasm.runtimecore_register_animation_clip(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1069
|
+
if (ret[1]) {
|
|
1070
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
/**
|
|
1074
|
+
* Release a direct morph override so AU/viseme/mixer ownership can resume.
|
|
1075
|
+
* A deliberate `set_morph(..., 0, ...)` still owns and masks the target;
|
|
1076
|
+
* preview cleanup must release instead of installing a permanent zero.
|
|
1077
|
+
* Target selection matches `set_morph`; returns overrides actually removed.
|
|
1078
|
+
* @param {string} morph_name
|
|
1079
|
+
* @param {string} mesh_names_json
|
|
1080
|
+
* @returns {number}
|
|
1081
|
+
*/
|
|
1082
|
+
release_morph(morph_name, mesh_names_json) {
|
|
1083
|
+
const ptr0 = passStringToWasm0(morph_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1084
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1085
|
+
const ptr1 = passStringToWasm0(mesh_names_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1086
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1087
|
+
const ret = wasm.runtimecore_release_morph(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1088
|
+
return ret >>> 0;
|
|
1089
|
+
}
|
|
1090
|
+
/**
|
|
1091
|
+
* Index counterpart to `release_morph`, with `set_morph_index` selection.
|
|
1092
|
+
* @param {number} morph_index
|
|
1093
|
+
* @param {string} mesh_names_json
|
|
1094
|
+
* @returns {number}
|
|
1095
|
+
*/
|
|
1096
|
+
release_morph_index(morph_index, mesh_names_json) {
|
|
1097
|
+
const ptr0 = passStringToWasm0(mesh_names_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1098
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1099
|
+
const ret = wasm.runtimecore_release_morph_index(this.__wbg_ptr, morph_index, ptr0, len0);
|
|
1100
|
+
return ret >>> 0;
|
|
1101
|
+
}
|
|
1102
|
+
/**
|
|
1103
|
+
* Release owned morphs through the old renderer binding IDs before rebind.
|
|
1104
|
+
* @returns {Float32Array}
|
|
1105
|
+
*/
|
|
1106
|
+
release_procedural_morph_frame() {
|
|
1107
|
+
const ret = wasm.runtimecore_release_procedural_morph_frame(this.__wbg_ptr);
|
|
1108
|
+
var v1 = getArrayF32FromWasm0(ret[0], ret[1]).slice();
|
|
1109
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1110
|
+
return v1;
|
|
1111
|
+
}
|
|
1112
|
+
/**
|
|
1113
|
+
* @param {string} clip_name
|
|
1114
|
+
* @returns {boolean}
|
|
1115
|
+
*/
|
|
1116
|
+
remove_animation_clip(clip_name) {
|
|
1117
|
+
const ptr0 = passStringToWasm0(clip_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1118
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1119
|
+
const ret = wasm.runtimecore_remove_animation_clip(this.__wbg_ptr, ptr0, len0);
|
|
1120
|
+
return ret !== 0;
|
|
1121
|
+
}
|
|
1122
|
+
/**
|
|
1123
|
+
* Clear each unique configured Body action and bilateral balance together.
|
|
1124
|
+
* Shared facial aliases are Body actions too. Preserve other actions,
|
|
1125
|
+
* visemes, direct morph overrides, and authored/current morph mix weights.
|
|
1126
|
+
*/
|
|
1127
|
+
reset_body_controls() {
|
|
1128
|
+
wasm.runtimecore_reset_body_controls(this.__wbg_ptr);
|
|
1129
|
+
}
|
|
1130
|
+
/**
|
|
1131
|
+
* Forget ownership when renderer bindings are discarded. Before replacing
|
|
1132
|
+
* bindings, apply release_procedural_morph_frame through the old IDs.
|
|
1133
|
+
* Normal clear/reset deliberately retain tracking for the next frame.
|
|
1134
|
+
*/
|
|
1135
|
+
reset_procedural_frame_tracking() {
|
|
1136
|
+
wasm.runtimecore_reset_procedural_frame_tracking(this.__wbg_ptr);
|
|
1137
|
+
}
|
|
1138
|
+
/**
|
|
1139
|
+
* The adapter supplies native quaternion samples and scene/reference
|
|
1140
|
+
* transforms; the profile resolves which tracks represent head motion.
|
|
1141
|
+
* @param {string} tracks_json
|
|
1142
|
+
* @param {boolean} additive
|
|
1143
|
+
* @returns {string}
|
|
1144
|
+
*/
|
|
1145
|
+
resolve_hair_motion_json(tracks_json, additive) {
|
|
1146
|
+
let deferred3_0;
|
|
1147
|
+
let deferred3_1;
|
|
1148
|
+
try {
|
|
1149
|
+
const ptr0 = passStringToWasm0(tracks_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1150
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1151
|
+
const ret = wasm.runtimecore_resolve_hair_motion_json(this.__wbg_ptr, ptr0, len0, additive);
|
|
1152
|
+
var ptr2 = ret[0];
|
|
1153
|
+
var len2 = ret[1];
|
|
1154
|
+
if (ret[3]) {
|
|
1155
|
+
ptr2 = 0; len2 = 0;
|
|
1156
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1157
|
+
}
|
|
1158
|
+
deferred3_0 = ptr2;
|
|
1159
|
+
deferred3_1 = len2;
|
|
1160
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1161
|
+
} finally {
|
|
1162
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
388
1165
|
/**
|
|
389
1166
|
* @param {number} id
|
|
390
1167
|
* @param {number} value
|
|
@@ -401,8 +1178,9 @@ export class RuntimeCore {
|
|
|
401
1178
|
wasm.runtimecore_set_au_mix_weight(this.__wbg_ptr, id, weight);
|
|
402
1179
|
}
|
|
403
1180
|
/**
|
|
404
|
-
*
|
|
405
|
-
*
|
|
1181
|
+
* Manual directional command: a nonzero value owns its configured pair.
|
|
1182
|
+
* Negative values select the opposite direction. Zero clears only the
|
|
1183
|
+
* named AU, so releasing an inactive slider does not stop its partner.
|
|
406
1184
|
* @param {number} id
|
|
407
1185
|
* @param {number} value
|
|
408
1186
|
* @param {number} balance
|
|
@@ -419,6 +1197,30 @@ export class RuntimeCore {
|
|
|
419
1197
|
set_continuum(neg_au, pos_au, value, balance) {
|
|
420
1198
|
wasm.runtimecore_set_continuum(this.__wbg_ptr, neg_au, pos_au, value, balance);
|
|
421
1199
|
}
|
|
1200
|
+
/**
|
|
1201
|
+
* @param {string} update_json
|
|
1202
|
+
* @returns {string}
|
|
1203
|
+
*/
|
|
1204
|
+
set_hair_config_json(update_json) {
|
|
1205
|
+
let deferred3_0;
|
|
1206
|
+
let deferred3_1;
|
|
1207
|
+
try {
|
|
1208
|
+
const ptr0 = passStringToWasm0(update_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1209
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1210
|
+
const ret = wasm.runtimecore_set_hair_config_json(this.__wbg_ptr, ptr0, len0);
|
|
1211
|
+
var ptr2 = ret[0];
|
|
1212
|
+
var len2 = ret[1];
|
|
1213
|
+
if (ret[3]) {
|
|
1214
|
+
ptr2 = 0; len2 = 0;
|
|
1215
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1216
|
+
}
|
|
1217
|
+
deferred3_0 = ptr2;
|
|
1218
|
+
deferred3_1 = len2;
|
|
1219
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1220
|
+
} finally {
|
|
1221
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
422
1224
|
/**
|
|
423
1225
|
* @param {Uint32Array} ids
|
|
424
1226
|
*/
|
|
@@ -427,6 +1229,32 @@ export class RuntimeCore {
|
|
|
427
1229
|
const len0 = WASM_VECTOR_LEN;
|
|
428
1230
|
wasm.runtimecore_set_mixed_aus(this.__wbg_ptr, ptr0, len0);
|
|
429
1231
|
}
|
|
1232
|
+
/**
|
|
1233
|
+
* @param {string} morph_name
|
|
1234
|
+
* @param {number} value
|
|
1235
|
+
* @param {string} mesh_names_json
|
|
1236
|
+
* @returns {number}
|
|
1237
|
+
*/
|
|
1238
|
+
set_morph(morph_name, value, mesh_names_json) {
|
|
1239
|
+
const ptr0 = passStringToWasm0(morph_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1240
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1241
|
+
const ptr1 = passStringToWasm0(mesh_names_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1242
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1243
|
+
const ret = wasm.runtimecore_set_morph(this.__wbg_ptr, ptr0, len0, value, ptr1, len1);
|
|
1244
|
+
return ret >>> 0;
|
|
1245
|
+
}
|
|
1246
|
+
/**
|
|
1247
|
+
* @param {number} morph_index
|
|
1248
|
+
* @param {number} value
|
|
1249
|
+
* @param {string} mesh_names_json
|
|
1250
|
+
* @returns {number}
|
|
1251
|
+
*/
|
|
1252
|
+
set_morph_index(morph_index, value, mesh_names_json) {
|
|
1253
|
+
const ptr0 = passStringToWasm0(mesh_names_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1254
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1255
|
+
const ret = wasm.runtimecore_set_morph_index(this.__wbg_ptr, morph_index, value, ptr0, len0);
|
|
1256
|
+
return ret >>> 0;
|
|
1257
|
+
}
|
|
430
1258
|
/**
|
|
431
1259
|
* @param {number} index
|
|
432
1260
|
* @param {number} value
|
|
@@ -448,34 +1276,44 @@ export class RuntimeCore {
|
|
|
448
1276
|
wasm.runtimecore_set_viseme_slot_count(this.__wbg_ptr, count);
|
|
449
1277
|
}
|
|
450
1278
|
/**
|
|
451
|
-
*
|
|
452
|
-
* @param {
|
|
453
|
-
* @param {
|
|
454
|
-
* @param {number} duration_ms
|
|
455
|
-
* @param {number} balance
|
|
1279
|
+
* Compile and validate without registering a clip or changing live controls.
|
|
1280
|
+
* @param {string} json
|
|
1281
|
+
* @param {string} options_json
|
|
456
1282
|
*/
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
transition_viseme(index, to, duration_ms, jaw_scale) {
|
|
467
|
-
wasm.runtimecore_transition_viseme(this.__wbg_ptr, index, to, duration_ms, jaw_scale);
|
|
1283
|
+
validate_semantic_animation_json(json, options_json) {
|
|
1284
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1285
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1286
|
+
const ptr1 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1287
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1288
|
+
const ret = wasm.runtimecore_validate_semantic_animation_json(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1289
|
+
if (ret[1]) {
|
|
1290
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1291
|
+
}
|
|
468
1292
|
}
|
|
469
1293
|
/**
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
* @param {number} dt_seconds
|
|
474
|
-
* @returns {number}
|
|
1294
|
+
* Validate and fill optional settings without changing runtime or renderer state.
|
|
1295
|
+
* @param {string} json
|
|
1296
|
+
* @returns {string}
|
|
475
1297
|
*/
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
1298
|
+
validate_semantic_pose_json(json) {
|
|
1299
|
+
let deferred3_0;
|
|
1300
|
+
let deferred3_1;
|
|
1301
|
+
try {
|
|
1302
|
+
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1303
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1304
|
+
const ret = wasm.runtimecore_validate_semantic_pose_json(this.__wbg_ptr, ptr0, len0);
|
|
1305
|
+
var ptr2 = ret[0];
|
|
1306
|
+
var len2 = ret[1];
|
|
1307
|
+
if (ret[3]) {
|
|
1308
|
+
ptr2 = 0; len2 = 0;
|
|
1309
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1310
|
+
}
|
|
1311
|
+
deferred3_0 = ptr2;
|
|
1312
|
+
deferred3_1 = len2;
|
|
1313
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1314
|
+
} finally {
|
|
1315
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1316
|
+
}
|
|
479
1317
|
}
|
|
480
1318
|
/**
|
|
481
1319
|
* @returns {number}
|
|
@@ -522,6 +1360,40 @@ export function analyze_mesh_proportions(vertices, vertical_axis) {
|
|
|
522
1360
|
return v2;
|
|
523
1361
|
}
|
|
524
1362
|
|
|
1363
|
+
/**
|
|
1364
|
+
* @param {string} model_json
|
|
1365
|
+
* @param {string} clips_json
|
|
1366
|
+
* @param {string} profile_json
|
|
1367
|
+
* @param {string} options_json
|
|
1368
|
+
* @returns {string}
|
|
1369
|
+
*/
|
|
1370
|
+
export function analyze_model_descriptor(model_json, clips_json, profile_json, options_json) {
|
|
1371
|
+
let deferred6_0;
|
|
1372
|
+
let deferred6_1;
|
|
1373
|
+
try {
|
|
1374
|
+
const ptr0 = passStringToWasm0(model_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1375
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1376
|
+
const ptr1 = passStringToWasm0(clips_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1377
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1378
|
+
const ptr2 = passStringToWasm0(profile_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1379
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1380
|
+
const ptr3 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1381
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1382
|
+
const ret = wasm.analyze_model_descriptor(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
1383
|
+
var ptr5 = ret[0];
|
|
1384
|
+
var len5 = ret[1];
|
|
1385
|
+
if (ret[3]) {
|
|
1386
|
+
ptr5 = 0; len5 = 0;
|
|
1387
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1388
|
+
}
|
|
1389
|
+
deferred6_0 = ptr5;
|
|
1390
|
+
deferred6_1 = len5;
|
|
1391
|
+
return getStringFromWasm0(ptr5, len5);
|
|
1392
|
+
} finally {
|
|
1393
|
+
wasm.__wbindgen_free(deferred6_0, deferred6_1, 1);
|
|
1394
|
+
}
|
|
1395
|
+
}
|
|
1396
|
+
|
|
525
1397
|
/**
|
|
526
1398
|
* @returns {number}
|
|
527
1399
|
*/
|
|
@@ -711,6 +1583,22 @@ export function compose_template_skeleton_fit_transform(fit_scale, fit_translati
|
|
|
711
1583
|
return v3;
|
|
712
1584
|
}
|
|
713
1585
|
|
|
1586
|
+
/**
|
|
1587
|
+
* @param {string} template_json
|
|
1588
|
+
* @returns {Float64Array}
|
|
1589
|
+
*/
|
|
1590
|
+
export function compute_humanoid_skeleton_template_rest_bounds(template_json) {
|
|
1591
|
+
const ptr0 = passStringToWasm0(template_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1592
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1593
|
+
const ret = wasm.compute_humanoid_skeleton_template_rest_bounds(ptr0, len0);
|
|
1594
|
+
if (ret[3]) {
|
|
1595
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1596
|
+
}
|
|
1597
|
+
var v2 = getArrayF64FromWasm0(ret[0], ret[1]).slice();
|
|
1598
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 8, 8);
|
|
1599
|
+
return v2;
|
|
1600
|
+
}
|
|
1601
|
+
|
|
714
1602
|
/**
|
|
715
1603
|
* @returns {number}
|
|
716
1604
|
*/
|
|
@@ -719,6 +1607,53 @@ export function core_abi_version() {
|
|
|
719
1607
|
return ret >>> 0;
|
|
720
1608
|
}
|
|
721
1609
|
|
|
1610
|
+
/**
|
|
1611
|
+
* @param {string} template_json
|
|
1612
|
+
* @returns {string}
|
|
1613
|
+
*/
|
|
1614
|
+
export function create_validation_skeleton_json(template_json) {
|
|
1615
|
+
let deferred3_0;
|
|
1616
|
+
let deferred3_1;
|
|
1617
|
+
try {
|
|
1618
|
+
const ptr0 = passStringToWasm0(template_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1619
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1620
|
+
const ret = wasm.create_validation_skeleton_json(ptr0, len0);
|
|
1621
|
+
var ptr2 = ret[0];
|
|
1622
|
+
var len2 = ret[1];
|
|
1623
|
+
if (ret[3]) {
|
|
1624
|
+
ptr2 = 0; len2 = 0;
|
|
1625
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1626
|
+
}
|
|
1627
|
+
deferred3_0 = ptr2;
|
|
1628
|
+
deferred3_1 = len2;
|
|
1629
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1630
|
+
} finally {
|
|
1631
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
/**
|
|
1636
|
+
* @returns {string}
|
|
1637
|
+
*/
|
|
1638
|
+
export function default_hair_color_appearance_json() {
|
|
1639
|
+
let deferred2_0;
|
|
1640
|
+
let deferred2_1;
|
|
1641
|
+
try {
|
|
1642
|
+
const ret = wasm.default_hair_color_appearance_json();
|
|
1643
|
+
var ptr1 = ret[0];
|
|
1644
|
+
var len1 = ret[1];
|
|
1645
|
+
if (ret[3]) {
|
|
1646
|
+
ptr1 = 0; len1 = 0;
|
|
1647
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1648
|
+
}
|
|
1649
|
+
deferred2_0 = ptr1;
|
|
1650
|
+
deferred2_1 = len1;
|
|
1651
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1652
|
+
} finally {
|
|
1653
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1654
|
+
}
|
|
1655
|
+
}
|
|
1656
|
+
|
|
722
1657
|
/**
|
|
723
1658
|
* @returns {Float32Array}
|
|
724
1659
|
*/
|
|
@@ -729,6 +1664,90 @@ export function default_hair_physics_config_values() {
|
|
|
729
1664
|
return v1;
|
|
730
1665
|
}
|
|
731
1666
|
|
|
1667
|
+
/**
|
|
1668
|
+
* Execute a host-neutral Embody operation using JSON in and JSON out.
|
|
1669
|
+
* This keeps CLJS and other browser hosts off the Rust data structures while
|
|
1670
|
+
* ensuring all profile semantics execute inside Wasm.
|
|
1671
|
+
* @param {string} request_json
|
|
1672
|
+
* @returns {string}
|
|
1673
|
+
*/
|
|
1674
|
+
export function embody_request(request_json) {
|
|
1675
|
+
let deferred3_0;
|
|
1676
|
+
let deferred3_1;
|
|
1677
|
+
try {
|
|
1678
|
+
const ptr0 = passStringToWasm0(request_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1679
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1680
|
+
const ret = wasm.embody_request(ptr0, len0);
|
|
1681
|
+
var ptr2 = ret[0];
|
|
1682
|
+
var len2 = ret[1];
|
|
1683
|
+
if (ret[3]) {
|
|
1684
|
+
ptr2 = 0; len2 = 0;
|
|
1685
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1686
|
+
}
|
|
1687
|
+
deferred3_0 = ptr2;
|
|
1688
|
+
deferred3_1 = len2;
|
|
1689
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1690
|
+
} finally {
|
|
1691
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1692
|
+
}
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
/**
|
|
1696
|
+
* @param {string} model_json
|
|
1697
|
+
* @param {string} options_json
|
|
1698
|
+
* @returns {string}
|
|
1699
|
+
*/
|
|
1700
|
+
export function extract_humanoid_skeleton_template_json(model_json, options_json) {
|
|
1701
|
+
let deferred4_0;
|
|
1702
|
+
let deferred4_1;
|
|
1703
|
+
try {
|
|
1704
|
+
const ptr0 = passStringToWasm0(model_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1705
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1706
|
+
const ptr1 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1707
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1708
|
+
const ret = wasm.extract_humanoid_skeleton_template_json(ptr0, len0, ptr1, len1);
|
|
1709
|
+
var ptr3 = ret[0];
|
|
1710
|
+
var len3 = ret[1];
|
|
1711
|
+
if (ret[3]) {
|
|
1712
|
+
ptr3 = 0; len3 = 0;
|
|
1713
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1714
|
+
}
|
|
1715
|
+
deferred4_0 = ptr3;
|
|
1716
|
+
deferred4_1 = len3;
|
|
1717
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1718
|
+
} finally {
|
|
1719
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* @param {string} model_json
|
|
1725
|
+
* @param {string} clips_json
|
|
1726
|
+
* @returns {string}
|
|
1727
|
+
*/
|
|
1728
|
+
export function extract_model_data_json(model_json, clips_json) {
|
|
1729
|
+
let deferred4_0;
|
|
1730
|
+
let deferred4_1;
|
|
1731
|
+
try {
|
|
1732
|
+
const ptr0 = passStringToWasm0(model_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1733
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1734
|
+
const ptr1 = passStringToWasm0(clips_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1735
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1736
|
+
const ret = wasm.extract_model_data_json(ptr0, len0, ptr1, len1);
|
|
1737
|
+
var ptr3 = ret[0];
|
|
1738
|
+
var len3 = ret[1];
|
|
1739
|
+
if (ret[3]) {
|
|
1740
|
+
ptr3 = 0; len3 = 0;
|
|
1741
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1742
|
+
}
|
|
1743
|
+
deferred4_0 = ptr3;
|
|
1744
|
+
deferred4_1 = len3;
|
|
1745
|
+
return getStringFromWasm0(ptr3, len3);
|
|
1746
|
+
} finally {
|
|
1747
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
|
|
732
1751
|
/**
|
|
733
1752
|
* Padding factor for a focus target of the given max dimension.
|
|
734
1753
|
* @param {number} size
|
|
@@ -742,6 +1761,31 @@ export function focus_padding_factor(size, close_up_padding, zoom_padding, full_
|
|
|
742
1761
|
return ret;
|
|
743
1762
|
}
|
|
744
1763
|
|
|
1764
|
+
/**
|
|
1765
|
+
* @param {string} id
|
|
1766
|
+
* @returns {string}
|
|
1767
|
+
*/
|
|
1768
|
+
export function get_humanoid_skeleton_template_json(id) {
|
|
1769
|
+
let deferred3_0;
|
|
1770
|
+
let deferred3_1;
|
|
1771
|
+
try {
|
|
1772
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1773
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1774
|
+
const ret = wasm.get_humanoid_skeleton_template_json(ptr0, len0);
|
|
1775
|
+
var ptr2 = ret[0];
|
|
1776
|
+
var len2 = ret[1];
|
|
1777
|
+
if (ret[3]) {
|
|
1778
|
+
ptr2 = 0; len2 = 0;
|
|
1779
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1780
|
+
}
|
|
1781
|
+
deferred3_0 = ptr2;
|
|
1782
|
+
deferred3_1 = len2;
|
|
1783
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1784
|
+
} finally {
|
|
1785
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
|
|
745
1789
|
/**
|
|
746
1790
|
* Return the embedded preset JSON for a preset id (intake source of truth).
|
|
747
1791
|
* @param {string} preset_id
|
|
@@ -768,6 +1812,28 @@ export function get_preset_json(preset_id) {
|
|
|
768
1812
|
}
|
|
769
1813
|
}
|
|
770
1814
|
|
|
1815
|
+
/**
|
|
1816
|
+
* @returns {string}
|
|
1817
|
+
*/
|
|
1818
|
+
export function hair_color_presets_json() {
|
|
1819
|
+
let deferred2_0;
|
|
1820
|
+
let deferred2_1;
|
|
1821
|
+
try {
|
|
1822
|
+
const ret = wasm.hair_color_presets_json();
|
|
1823
|
+
var ptr1 = ret[0];
|
|
1824
|
+
var len1 = ret[1];
|
|
1825
|
+
if (ret[3]) {
|
|
1826
|
+
ptr1 = 0; len1 = 0;
|
|
1827
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1828
|
+
}
|
|
1829
|
+
deferred2_0 = ptr1;
|
|
1830
|
+
deferred2_1 = len1;
|
|
1831
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1832
|
+
} finally {
|
|
1833
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
|
|
771
1837
|
/**
|
|
772
1838
|
* @returns {number}
|
|
773
1839
|
*/
|
|
@@ -812,6 +1878,53 @@ export function has_preset(preset_id) {
|
|
|
812
1878
|
return ret !== 0;
|
|
813
1879
|
}
|
|
814
1880
|
|
|
1881
|
+
/**
|
|
1882
|
+
* @param {string} template_json
|
|
1883
|
+
* @returns {string}
|
|
1884
|
+
*/
|
|
1885
|
+
export function humanoid_skeleton_template_bone_names(template_json) {
|
|
1886
|
+
let deferred3_0;
|
|
1887
|
+
let deferred3_1;
|
|
1888
|
+
try {
|
|
1889
|
+
const ptr0 = passStringToWasm0(template_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1890
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1891
|
+
const ret = wasm.humanoid_skeleton_template_bone_names(ptr0, len0);
|
|
1892
|
+
var ptr2 = ret[0];
|
|
1893
|
+
var len2 = ret[1];
|
|
1894
|
+
if (ret[3]) {
|
|
1895
|
+
ptr2 = 0; len2 = 0;
|
|
1896
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1897
|
+
}
|
|
1898
|
+
deferred3_0 = ptr2;
|
|
1899
|
+
deferred3_1 = len2;
|
|
1900
|
+
return getStringFromWasm0(ptr2, len2);
|
|
1901
|
+
} finally {
|
|
1902
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
/**
|
|
1907
|
+
* @returns {string}
|
|
1908
|
+
*/
|
|
1909
|
+
export function list_humanoid_skeleton_templates_json() {
|
|
1910
|
+
let deferred2_0;
|
|
1911
|
+
let deferred2_1;
|
|
1912
|
+
try {
|
|
1913
|
+
const ret = wasm.list_humanoid_skeleton_templates_json();
|
|
1914
|
+
var ptr1 = ret[0];
|
|
1915
|
+
var len1 = ret[1];
|
|
1916
|
+
if (ret[3]) {
|
|
1917
|
+
ptr1 = 0; len1 = 0;
|
|
1918
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
1919
|
+
}
|
|
1920
|
+
deferred2_0 = ptr1;
|
|
1921
|
+
deferred2_1 = len1;
|
|
1922
|
+
return getStringFromWasm0(ptr1, len1);
|
|
1923
|
+
} finally {
|
|
1924
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
|
|
815
1928
|
/**
|
|
816
1929
|
* Canonical embedded preset ids available inside the Wasm core.
|
|
817
1930
|
* @returns {string[]}
|
|
@@ -931,6 +2044,34 @@ export function normalize_camera_angle_degrees(angle) {
|
|
|
931
2044
|
return ret;
|
|
932
2045
|
}
|
|
933
2046
|
|
|
2047
|
+
/**
|
|
2048
|
+
* @param {string} value_json
|
|
2049
|
+
* @param {string} fallback_json
|
|
2050
|
+
* @returns {string}
|
|
2051
|
+
*/
|
|
2052
|
+
export function normalize_hair_color_appearance_json(value_json, fallback_json) {
|
|
2053
|
+
let deferred4_0;
|
|
2054
|
+
let deferred4_1;
|
|
2055
|
+
try {
|
|
2056
|
+
const ptr0 = passStringToWasm0(value_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2057
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2058
|
+
const ptr1 = passStringToWasm0(fallback_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2059
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2060
|
+
const ret = wasm.normalize_hair_color_appearance_json(ptr0, len0, ptr1, len1);
|
|
2061
|
+
var ptr3 = ret[0];
|
|
2062
|
+
var len3 = ret[1];
|
|
2063
|
+
if (ret[3]) {
|
|
2064
|
+
ptr3 = 0; len3 = 0;
|
|
2065
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2066
|
+
}
|
|
2067
|
+
deferred4_0 = ptr3;
|
|
2068
|
+
deferred4_1 = len3;
|
|
2069
|
+
return getStringFromWasm0(ptr3, len3);
|
|
2070
|
+
} finally {
|
|
2071
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
|
|
934
2075
|
/**
|
|
935
2076
|
* @param {Uint32Array} mesh_ids
|
|
936
2077
|
* @param {Uint32Array} morph_target_ids
|
|
@@ -1386,6 +2527,71 @@ export function validate_generated_template_fit_metadata(template_id, source_cha
|
|
|
1386
2527
|
return ret >>> 0;
|
|
1387
2528
|
}
|
|
1388
2529
|
|
|
2530
|
+
/**
|
|
2531
|
+
* Resolve and validate VRM humanoid roles through profile node keys against a
|
|
2532
|
+
* renderer-neutral model descriptor. This is characterization metadata only;
|
|
2533
|
+
* it does not create or apply pose frame writes.
|
|
2534
|
+
* @param {string} profile_json
|
|
2535
|
+
* @param {string} model_json
|
|
2536
|
+
* @returns {string}
|
|
2537
|
+
*/
|
|
2538
|
+
export function validate_humanoid_characterization(profile_json, model_json) {
|
|
2539
|
+
let deferred4_0;
|
|
2540
|
+
let deferred4_1;
|
|
2541
|
+
try {
|
|
2542
|
+
const ptr0 = passStringToWasm0(profile_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2543
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2544
|
+
const ptr1 = passStringToWasm0(model_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2545
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2546
|
+
const ret = wasm.validate_humanoid_characterization(ptr0, len0, ptr1, len1);
|
|
2547
|
+
var ptr3 = ret[0];
|
|
2548
|
+
var len3 = ret[1];
|
|
2549
|
+
if (ret[3]) {
|
|
2550
|
+
ptr3 = 0; len3 = 0;
|
|
2551
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2552
|
+
}
|
|
2553
|
+
deferred4_0 = ptr3;
|
|
2554
|
+
deferred4_1 = len3;
|
|
2555
|
+
return getStringFromWasm0(ptr3, len3);
|
|
2556
|
+
} finally {
|
|
2557
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
2558
|
+
}
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
/**
|
|
2562
|
+
* Validate an authored profile against a renderer-neutral model descriptor.
|
|
2563
|
+
* Three.js objects are reduced to this descriptor by the thin host adapter;
|
|
2564
|
+
* all mapping analysis and correction generation stays in Rust.
|
|
2565
|
+
* @param {string} profile_json
|
|
2566
|
+
* @param {string} model_json
|
|
2567
|
+
* @param {string} options_json
|
|
2568
|
+
* @returns {string}
|
|
2569
|
+
*/
|
|
2570
|
+
export function validate_profile_model(profile_json, model_json, options_json) {
|
|
2571
|
+
let deferred5_0;
|
|
2572
|
+
let deferred5_1;
|
|
2573
|
+
try {
|
|
2574
|
+
const ptr0 = passStringToWasm0(profile_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2575
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2576
|
+
const ptr1 = passStringToWasm0(model_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2577
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2578
|
+
const ptr2 = passStringToWasm0(options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2579
|
+
const len2 = WASM_VECTOR_LEN;
|
|
2580
|
+
const ret = wasm.validate_profile_model(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
2581
|
+
var ptr4 = ret[0];
|
|
2582
|
+
var len4 = ret[1];
|
|
2583
|
+
if (ret[3]) {
|
|
2584
|
+
ptr4 = 0; len4 = 0;
|
|
2585
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
2586
|
+
}
|
|
2587
|
+
deferred5_0 = ptr4;
|
|
2588
|
+
deferred5_1 = len4;
|
|
2589
|
+
return getStringFromWasm0(ptr4, len4);
|
|
2590
|
+
} finally {
|
|
2591
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
2592
|
+
}
|
|
2593
|
+
}
|
|
2594
|
+
|
|
1389
2595
|
/**
|
|
1390
2596
|
* World-space camera direction for a model-relative camera angle.
|
|
1391
2597
|
* `model_quat` is the model's world quaternion `[x, y, z, w]`
|
|
@@ -1442,15 +2648,29 @@ const CameraOrbitFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
1442
2648
|
const HairPhysicsSolverFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1443
2649
|
? { register: () => {}, unregister: () => {} }
|
|
1444
2650
|
: new FinalizationRegistry(ptr => wasm.__wbg_hairphysicssolver_free(ptr, 1));
|
|
2651
|
+
const NativePlaybackSessionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
2652
|
+
? { register: () => {}, unregister: () => {} }
|
|
2653
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_nativeplaybacksession_free(ptr, 1));
|
|
1445
2654
|
const RuntimeCoreFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1446
2655
|
? { register: () => {}, unregister: () => {} }
|
|
1447
2656
|
: new FinalizationRegistry(ptr => wasm.__wbg_runtimecore_free(ptr, 1));
|
|
1448
2657
|
|
|
2658
|
+
function _assertClass(instance, klass) {
|
|
2659
|
+
if (!(instance instanceof klass)) {
|
|
2660
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
|
|
1449
2664
|
function getArrayF32FromWasm0(ptr, len) {
|
|
1450
2665
|
ptr = ptr >>> 0;
|
|
1451
2666
|
return getFloat32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
|
|
1452
2667
|
}
|
|
1453
2668
|
|
|
2669
|
+
function getArrayF64FromWasm0(ptr, len) {
|
|
2670
|
+
ptr = ptr >>> 0;
|
|
2671
|
+
return getFloat64ArrayMemory0().subarray(ptr / 8, ptr / 8 + len);
|
|
2672
|
+
}
|
|
2673
|
+
|
|
1454
2674
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
1455
2675
|
ptr = ptr >>> 0;
|
|
1456
2676
|
const mem = getDataViewMemory0();
|
|
@@ -1478,6 +2698,14 @@ function getFloat32ArrayMemory0() {
|
|
|
1478
2698
|
return cachedFloat32ArrayMemory0;
|
|
1479
2699
|
}
|
|
1480
2700
|
|
|
2701
|
+
let cachedFloat64ArrayMemory0 = null;
|
|
2702
|
+
function getFloat64ArrayMemory0() {
|
|
2703
|
+
if (cachedFloat64ArrayMemory0 === null || cachedFloat64ArrayMemory0.byteLength === 0) {
|
|
2704
|
+
cachedFloat64ArrayMemory0 = new Float64Array(wasm.memory.buffer);
|
|
2705
|
+
}
|
|
2706
|
+
return cachedFloat64ArrayMemory0;
|
|
2707
|
+
}
|
|
2708
|
+
|
|
1481
2709
|
function getStringFromWasm0(ptr, len) {
|
|
1482
2710
|
return decodeText(ptr >>> 0, len);
|
|
1483
2711
|
}
|
|
@@ -1602,6 +2830,7 @@ function __wbg_finalize_init(instance, module) {
|
|
|
1602
2830
|
wasmModule = module;
|
|
1603
2831
|
cachedDataViewMemory0 = null;
|
|
1604
2832
|
cachedFloat32ArrayMemory0 = null;
|
|
2833
|
+
cachedFloat64ArrayMemory0 = null;
|
|
1605
2834
|
cachedUint32ArrayMemory0 = null;
|
|
1606
2835
|
cachedUint8ArrayMemory0 = null;
|
|
1607
2836
|
wasm.__wbindgen_start();
|