@splinetool/viewer 2.0.7 → 2.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/build/hana-ui.js +82 -32
- package/build/hana-ui.wasm +0 -0
- package/build/spline-viewer.cjs +141 -141
- package/build/spline-viewer.js +141 -141
- package/build/spline-viewer.webgl.js +108 -108
- package/build/spline-viewer.webgpu.js +72 -72
- package/package.json +1 -1
package/build/hana-ui.js
CHANGED
|
@@ -331,6 +331,12 @@ export class SceneController {
|
|
|
331
331
|
const ret = wasm.scenecontroller_centerVectorData(this.__wbg_ptr);
|
|
332
332
|
return takeObject(ret);
|
|
333
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Drop every export-time video frame override (see `setVideoExportFrame`).
|
|
336
|
+
*/
|
|
337
|
+
clearVideoExportFrames() {
|
|
338
|
+
wasm.scenecontroller_clearVideoExportFrames(this.__wbg_ptr);
|
|
339
|
+
}
|
|
334
340
|
/**
|
|
335
341
|
* @param {any} network
|
|
336
342
|
* @param {Float2} size
|
|
@@ -898,8 +904,11 @@ export class SceneController {
|
|
|
898
904
|
return takeObject(ret);
|
|
899
905
|
}
|
|
900
906
|
/**
|
|
907
|
+
* Resolves to whether any video seeked backward (wrapped across its
|
|
908
|
+
* loop point) — the export loop renders throwaway frames after a wrap
|
|
909
|
+
* to keep cold-path video→RGB conversion transients off captured frames.
|
|
901
910
|
* @param {number} dt
|
|
902
|
-
* @returns {Promise<
|
|
911
|
+
* @returns {Promise<boolean>}
|
|
903
912
|
*/
|
|
904
913
|
seekVideos(dt) {
|
|
905
914
|
const ret = wasm.scenecontroller_seekVideos(this.__wbg_ptr, dt);
|
|
@@ -983,6 +992,20 @@ export class SceneController {
|
|
|
983
992
|
setVectorTool(tool) {
|
|
984
993
|
wasm.scenecontroller_setVectorTool(this.__wbg_ptr, addHeapObject(tool));
|
|
985
994
|
}
|
|
995
|
+
/**
|
|
996
|
+
* Register an export-time frame override for a video asset: the renderer
|
|
997
|
+
* uploads this WebCodecs frame instead of sampling the `<video>` element,
|
|
998
|
+
* and `seekVideos` leaves the element alone. The caller keeps ownership
|
|
999
|
+
* of the frame — it must stay unclosed until the override is replaced or
|
|
1000
|
+
* cleared, and `clearVideoExportFrames` must run before anything renders
|
|
1001
|
+
* outside the export loop. WebGPU backend only (`isWebgpu`); the WebGL
|
|
1002
|
+
* path still samples the element.
|
|
1003
|
+
* @param {ID} id
|
|
1004
|
+
* @param {VideoFrame} frame
|
|
1005
|
+
*/
|
|
1006
|
+
setVideoExportFrame(id, frame) {
|
|
1007
|
+
wasm.scenecontroller_setVideoExportFrame(this.__wbg_ptr, addHeapObject(id), addHeapObject(frame));
|
|
1008
|
+
}
|
|
986
1009
|
/**
|
|
987
1010
|
* Snap a world-space resize handle position against other (non-selected) vertices.
|
|
988
1011
|
* `snap_x`/`snap_y` indicate which axes may snap. Returns the snapped world position.
|
|
@@ -1191,6 +1214,26 @@ export class SceneController {
|
|
|
1191
1214
|
vectorStopContinueSubpath() {
|
|
1192
1215
|
wasm.scenecontroller_vectorStopContinueSubpath(this.__wbg_ptr);
|
|
1193
1216
|
}
|
|
1217
|
+
/**
|
|
1218
|
+
* The video fills the export loop should decode with WebCodecs, as
|
|
1219
|
+
* `{ id, src }` objects (`src` is the loaded `<video>` element's object
|
|
1220
|
+
* URL). Enumerated from the start events' video actions — the exact set
|
|
1221
|
+
* `seekVideos` drives — so the WebCodecs path animates precisely the
|
|
1222
|
+
* fills the element path would: a fill without a play action stays a
|
|
1223
|
+
* static frame on both paths and both backends. Scoped to actions
|
|
1224
|
+
* targeting `frame_id`'s subtree on purpose: enumerating the whole
|
|
1225
|
+
* document put a live decoder behind every video in the file (74 in one
|
|
1226
|
+
* real doc), turning a 5s export into 74 decode streams. Videos still
|
|
1227
|
+
* loading are omitted, and videos outside the subtree stay on the
|
|
1228
|
+
* seek-driven element path — both remain correct, just less
|
|
1229
|
+
* stable/deterministic.
|
|
1230
|
+
* @param {ID} frame_id
|
|
1231
|
+
* @returns {Array<any>}
|
|
1232
|
+
*/
|
|
1233
|
+
videoFillSources(frame_id) {
|
|
1234
|
+
const ret = wasm.scenecontroller_videoFillSources(this.__wbg_ptr, addHeapObject(frame_id));
|
|
1235
|
+
return takeObject(ret);
|
|
1236
|
+
}
|
|
1194
1237
|
/**
|
|
1195
1238
|
* @param {Float2} pos
|
|
1196
1239
|
* @returns {Float2}
|
|
@@ -2410,7 +2453,7 @@ function __wbg_get_imports() {
|
|
|
2410
2453
|
const a = state0.a;
|
|
2411
2454
|
state0.a = 0;
|
|
2412
2455
|
try {
|
|
2413
|
-
return
|
|
2456
|
+
return __wasm_bindgen_func_elem_14150(a, state0.b, arg0, arg1);
|
|
2414
2457
|
} finally {
|
|
2415
2458
|
state0.a = a;
|
|
2416
2459
|
}
|
|
@@ -2456,7 +2499,7 @@ function __wbg_get_imports() {
|
|
|
2456
2499
|
const a = state0.a;
|
|
2457
2500
|
state0.a = 0;
|
|
2458
2501
|
try {
|
|
2459
|
-
return
|
|
2502
|
+
return __wasm_bindgen_func_elem_14150(a, state0.b, arg0, arg1);
|
|
2460
2503
|
} finally {
|
|
2461
2504
|
state0.a = a;
|
|
2462
2505
|
}
|
|
@@ -3313,6 +3356,13 @@ function __wbg_get_imports() {
|
|
|
3313
3356
|
const ret = getObject(arg0).size;
|
|
3314
3357
|
return ret;
|
|
3315
3358
|
},
|
|
3359
|
+
__wbg_src_f0e9281991fbd919: function(arg0, arg1) {
|
|
3360
|
+
const ret = getObject(arg1).src;
|
|
3361
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3362
|
+
const len1 = WASM_VECTOR_LEN;
|
|
3363
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
3364
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
3365
|
+
},
|
|
3316
3366
|
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
3317
3367
|
const ret = getObject(arg1).stack;
|
|
3318
3368
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -3557,47 +3607,47 @@ function __wbg_get_imports() {
|
|
|
3557
3607
|
}, arguments); },
|
|
3558
3608
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
3559
3609
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1052, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3560
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3610
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_14148);
|
|
3561
3611
|
return addHeapObject(ret);
|
|
3562
3612
|
},
|
|
3563
3613
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
3564
3614
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 32, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3565
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3615
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_5101);
|
|
3566
3616
|
return addHeapObject(ret);
|
|
3567
3617
|
},
|
|
3568
3618
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
3569
3619
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUComputePipeline")], shim_idx: 927, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3570
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3620
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11107);
|
|
3571
3621
|
return addHeapObject(ret);
|
|
3572
3622
|
},
|
|
3573
3623
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
3574
3624
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 927, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3575
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3625
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11107_3);
|
|
3576
3626
|
return addHeapObject(ret);
|
|
3577
3627
|
},
|
|
3578
3628
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
3579
3629
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 928, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3580
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3630
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11108);
|
|
3581
3631
|
return addHeapObject(ret);
|
|
3582
3632
|
},
|
|
3583
3633
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
3584
3634
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPURenderPipeline")], shim_idx: 927, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3585
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3635
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11107_5);
|
|
3586
3636
|
return addHeapObject(ret);
|
|
3587
3637
|
},
|
|
3588
3638
|
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
3589
3639
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 927, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3590
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3640
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11107_6);
|
|
3591
3641
|
return addHeapObject(ret);
|
|
3592
3642
|
},
|
|
3593
3643
|
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
3594
3644
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 927, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3595
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3645
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11107_7);
|
|
3596
3646
|
return addHeapObject(ret);
|
|
3597
3647
|
},
|
|
3598
3648
|
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
3599
3649
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1035, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3600
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3650
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12514);
|
|
3601
3651
|
return addHeapObject(ret);
|
|
3602
3652
|
},
|
|
3603
3653
|
__wbindgen_cast_000000000000000a: function(arg0) {
|
|
@@ -3671,22 +3721,22 @@ function __wbg_get_imports() {
|
|
|
3671
3721
|
};
|
|
3672
3722
|
}
|
|
3673
3723
|
|
|
3674
|
-
function
|
|
3675
|
-
wasm.
|
|
3724
|
+
function __wasm_bindgen_func_elem_12514(arg0, arg1) {
|
|
3725
|
+
wasm.__wasm_bindgen_func_elem_12514(arg0, arg1);
|
|
3676
3726
|
}
|
|
3677
3727
|
|
|
3678
|
-
function
|
|
3679
|
-
wasm.
|
|
3728
|
+
function __wasm_bindgen_func_elem_5101(arg0, arg1, arg2) {
|
|
3729
|
+
wasm.__wasm_bindgen_func_elem_5101(arg0, arg1, addHeapObject(arg2));
|
|
3680
3730
|
}
|
|
3681
3731
|
|
|
3682
|
-
function
|
|
3683
|
-
wasm.
|
|
3732
|
+
function __wasm_bindgen_func_elem_11108(arg0, arg1, arg2) {
|
|
3733
|
+
wasm.__wasm_bindgen_func_elem_11108(arg0, arg1, addHeapObject(arg2));
|
|
3684
3734
|
}
|
|
3685
3735
|
|
|
3686
|
-
function
|
|
3736
|
+
function __wasm_bindgen_func_elem_14148(arg0, arg1, arg2) {
|
|
3687
3737
|
try {
|
|
3688
3738
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3689
|
-
wasm.
|
|
3739
|
+
wasm.__wasm_bindgen_func_elem_14148(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3690
3740
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3691
3741
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3692
3742
|
if (r1) {
|
|
@@ -3697,10 +3747,10 @@ function __wasm_bindgen_func_elem_14110(arg0, arg1, arg2) {
|
|
|
3697
3747
|
}
|
|
3698
3748
|
}
|
|
3699
3749
|
|
|
3700
|
-
function
|
|
3750
|
+
function __wasm_bindgen_func_elem_11107(arg0, arg1, arg2) {
|
|
3701
3751
|
try {
|
|
3702
3752
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3703
|
-
wasm.
|
|
3753
|
+
wasm.__wasm_bindgen_func_elem_11107(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3704
3754
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3705
3755
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3706
3756
|
if (r1) {
|
|
@@ -3711,10 +3761,10 @@ function __wasm_bindgen_func_elem_11070(arg0, arg1, arg2) {
|
|
|
3711
3761
|
}
|
|
3712
3762
|
}
|
|
3713
3763
|
|
|
3714
|
-
function
|
|
3764
|
+
function __wasm_bindgen_func_elem_11107_3(arg0, arg1, arg2) {
|
|
3715
3765
|
try {
|
|
3716
3766
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3717
|
-
wasm.
|
|
3767
|
+
wasm.__wasm_bindgen_func_elem_11107_3(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3718
3768
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3719
3769
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3720
3770
|
if (r1) {
|
|
@@ -3725,10 +3775,10 @@ function __wasm_bindgen_func_elem_11070_3(arg0, arg1, arg2) {
|
|
|
3725
3775
|
}
|
|
3726
3776
|
}
|
|
3727
3777
|
|
|
3728
|
-
function
|
|
3778
|
+
function __wasm_bindgen_func_elem_11107_5(arg0, arg1, arg2) {
|
|
3729
3779
|
try {
|
|
3730
3780
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3731
|
-
wasm.
|
|
3781
|
+
wasm.__wasm_bindgen_func_elem_11107_5(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3732
3782
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3733
3783
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3734
3784
|
if (r1) {
|
|
@@ -3739,10 +3789,10 @@ function __wasm_bindgen_func_elem_11070_5(arg0, arg1, arg2) {
|
|
|
3739
3789
|
}
|
|
3740
3790
|
}
|
|
3741
3791
|
|
|
3742
|
-
function
|
|
3792
|
+
function __wasm_bindgen_func_elem_11107_6(arg0, arg1, arg2) {
|
|
3743
3793
|
try {
|
|
3744
3794
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3745
|
-
wasm.
|
|
3795
|
+
wasm.__wasm_bindgen_func_elem_11107_6(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3746
3796
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3747
3797
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3748
3798
|
if (r1) {
|
|
@@ -3753,10 +3803,10 @@ function __wasm_bindgen_func_elem_11070_6(arg0, arg1, arg2) {
|
|
|
3753
3803
|
}
|
|
3754
3804
|
}
|
|
3755
3805
|
|
|
3756
|
-
function
|
|
3806
|
+
function __wasm_bindgen_func_elem_11107_7(arg0, arg1, arg2) {
|
|
3757
3807
|
try {
|
|
3758
3808
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3759
|
-
wasm.
|
|
3809
|
+
wasm.__wasm_bindgen_func_elem_11107_7(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3760
3810
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3761
3811
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3762
3812
|
if (r1) {
|
|
@@ -3767,8 +3817,8 @@ function __wasm_bindgen_func_elem_11070_7(arg0, arg1, arg2) {
|
|
|
3767
3817
|
}
|
|
3768
3818
|
}
|
|
3769
3819
|
|
|
3770
|
-
function
|
|
3771
|
-
wasm.
|
|
3820
|
+
function __wasm_bindgen_func_elem_14150(arg0, arg1, arg2, arg3) {
|
|
3821
|
+
wasm.__wasm_bindgen_func_elem_14150(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
3772
3822
|
}
|
|
3773
3823
|
|
|
3774
3824
|
|
package/build/hana-ui.wasm
CHANGED
|
Binary file
|