@splinetool/viewer 2.0.1 → 2.0.3
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/boolean.js +24 -0
- package/build/boolean.wasm +0 -0
- package/build/hana-ui.js +63 -46
- package/build/hana-ui.wasm +0 -0
- package/build/spline-viewer.cjs +262 -262
- package/build/spline-viewer.js +262 -262
- package/package.json +1 -1
package/build/boolean.js
CHANGED
|
@@ -174,6 +174,30 @@ export function clone_mesh(mesh) {
|
|
|
174
174
|
return CsgMesh.__wrap(ret);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
/**
|
|
178
|
+
* Folds a shape's cloner copies into a single mesh set. `transforms` is a
|
|
179
|
+
* flat run of column-major 4x4 matrices (three.js `Matrix4.elements`
|
|
180
|
+
* layout), one per copy — the geometry crosses the boundary once no matter
|
|
181
|
+
* how many copies there are.
|
|
182
|
+
*
|
|
183
|
+
* Copies whose boxes don't touch are merged by concatenating their
|
|
184
|
+
* triangles, with no boolean run at all. Classification already reads that
|
|
185
|
+
* pile as one solid: a parity ray crosses each closed copy an even number of
|
|
186
|
+
* times, and welding never joins copies that are apart, so the island fill
|
|
187
|
+
* keeps them separate. Copies that do touch are unioned for real, and only
|
|
188
|
+
* against the ones they touch.
|
|
189
|
+
* @param {CsgMesh} mesh
|
|
190
|
+
* @param {Float32Array} transforms
|
|
191
|
+
* @returns {CsgMesh}
|
|
192
|
+
*/
|
|
193
|
+
export function instanced_union(mesh, transforms) {
|
|
194
|
+
_assertClass(mesh, CsgMesh);
|
|
195
|
+
const ptr0 = passArrayF32ToWasm0(transforms, wasm.__wbindgen_malloc);
|
|
196
|
+
const len0 = WASM_VECTOR_LEN;
|
|
197
|
+
const ret = wasm.instanced_union(mesh.__wbg_ptr, ptr0, len0);
|
|
198
|
+
return CsgMesh.__wrap(ret);
|
|
199
|
+
}
|
|
200
|
+
|
|
177
201
|
/**
|
|
178
202
|
* Non-indexed render output. A mesh with carried normals hands them out
|
|
179
203
|
* as-is (inherited shading; `phong_angle_deg` doesn't apply); one without
|
package/build/boolean.wasm
CHANGED
|
Binary file
|
package/build/hana-ui.js
CHANGED
|
@@ -1678,6 +1678,10 @@ function __wbg_get_imports() {
|
|
|
1678
1678
|
__wbg_cullFace_c6b39a55ccade015: function(arg0, arg1) {
|
|
1679
1679
|
getObject(arg0).cullFace(arg1 >>> 0);
|
|
1680
1680
|
},
|
|
1681
|
+
__wbg_currentTime_0b40b60bc76843cb: function(arg0) {
|
|
1682
|
+
const ret = getObject(arg0).currentTime;
|
|
1683
|
+
return ret;
|
|
1684
|
+
},
|
|
1681
1685
|
__wbg_debug_78b457f1effb3792: function(arg0) {
|
|
1682
1686
|
console.debug(getObject(arg0));
|
|
1683
1687
|
},
|
|
@@ -2387,7 +2391,7 @@ function __wbg_get_imports() {
|
|
|
2387
2391
|
const a = state0.a;
|
|
2388
2392
|
state0.a = 0;
|
|
2389
2393
|
try {
|
|
2390
|
-
return
|
|
2394
|
+
return __wasm_bindgen_func_elem_12882(a, state0.b, arg0, arg1);
|
|
2391
2395
|
} finally {
|
|
2392
2396
|
state0.a = a;
|
|
2393
2397
|
}
|
|
@@ -2433,7 +2437,7 @@ function __wbg_get_imports() {
|
|
|
2433
2437
|
const a = state0.a;
|
|
2434
2438
|
state0.a = 0;
|
|
2435
2439
|
try {
|
|
2436
|
-
return
|
|
2440
|
+
return __wasm_bindgen_func_elem_12882(a, state0.b, arg0, arg1);
|
|
2437
2441
|
} finally {
|
|
2438
2442
|
state0.a = a;
|
|
2439
2443
|
}
|
|
@@ -2621,6 +2625,10 @@ function __wbg_get_imports() {
|
|
|
2621
2625
|
__wbg_setStencilReference_66c74be6232bb9da: function(arg0, arg1) {
|
|
2622
2626
|
getObject(arg0).setStencilReference(arg1 >>> 0);
|
|
2623
2627
|
},
|
|
2628
|
+
__wbg_setTimeout_b5f25e402b6e8ff9: function() { return handleError(function (arg0, arg1, arg2) {
|
|
2629
|
+
const ret = getObject(arg0).setTimeout(getObject(arg1), arg2);
|
|
2630
|
+
return ret;
|
|
2631
|
+
}, arguments); },
|
|
2624
2632
|
__wbg_setVertexBuffer_1e448859663dd400: function(arg0, arg1, arg2, arg3) {
|
|
2625
2633
|
getObject(arg0).setVertexBuffer(arg1 >>> 0, getObject(arg2), arg3);
|
|
2626
2634
|
},
|
|
@@ -3529,96 +3537,101 @@ function __wbg_get_imports() {
|
|
|
3529
3537
|
getObject(arg0).writeTexture(getObject(arg1), getArrayU8FromWasm0(arg2, arg3), getObject(arg4), getObject(arg5));
|
|
3530
3538
|
}, arguments); },
|
|
3531
3539
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
3532
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
3533
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3540
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 800, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3541
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_12874);
|
|
3534
3542
|
return addHeapObject(ret);
|
|
3535
3543
|
},
|
|
3536
3544
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
3537
3545
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3538
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3546
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_2919);
|
|
3539
3547
|
return addHeapObject(ret);
|
|
3540
3548
|
},
|
|
3541
3549
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
3542
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUComputePipeline")], shim_idx:
|
|
3543
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3550
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUComputePipeline")], shim_idx: 679, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3551
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9850);
|
|
3544
3552
|
return addHeapObject(ret);
|
|
3545
3553
|
},
|
|
3546
3554
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
3547
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx:
|
|
3548
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3555
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDevice")], shim_idx: 679, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3556
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9850_3);
|
|
3549
3557
|
return addHeapObject(ret);
|
|
3550
3558
|
},
|
|
3551
3559
|
__wbindgen_cast_0000000000000005: function(arg0, arg1) {
|
|
3552
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx:
|
|
3553
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3560
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPUDeviceLostInfo")], shim_idx: 680, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3561
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9852);
|
|
3554
3562
|
return addHeapObject(ret);
|
|
3555
3563
|
},
|
|
3556
3564
|
__wbindgen_cast_0000000000000006: function(arg0, arg1) {
|
|
3557
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPURenderPipeline")], shim_idx:
|
|
3558
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3565
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("GPURenderPipeline")], shim_idx: 679, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3566
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9850_5);
|
|
3559
3567
|
return addHeapObject(ret);
|
|
3560
3568
|
},
|
|
3561
3569
|
__wbindgen_cast_0000000000000007: function(arg0, arg1) {
|
|
3562
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx:
|
|
3563
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3570
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("any")], shim_idx: 679, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3571
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9850_6);
|
|
3564
3572
|
return addHeapObject(ret);
|
|
3565
3573
|
},
|
|
3566
3574
|
__wbindgen_cast_0000000000000008: function(arg0, arg1) {
|
|
3567
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx:
|
|
3568
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3575
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("undefined")], shim_idx: 679, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
3576
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_9850_7);
|
|
3577
|
+
return addHeapObject(ret);
|
|
3578
|
+
},
|
|
3579
|
+
__wbindgen_cast_0000000000000009: function(arg0, arg1) {
|
|
3580
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 795, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3581
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_11260);
|
|
3569
3582
|
return addHeapObject(ret);
|
|
3570
3583
|
},
|
|
3571
|
-
|
|
3584
|
+
__wbindgen_cast_000000000000000a: function(arg0) {
|
|
3572
3585
|
// Cast intrinsic for `F64 -> Externref`.
|
|
3573
3586
|
const ret = arg0;
|
|
3574
3587
|
return addHeapObject(ret);
|
|
3575
3588
|
},
|
|
3576
|
-
|
|
3589
|
+
__wbindgen_cast_000000000000000b: function(arg0, arg1) {
|
|
3577
3590
|
// Cast intrinsic for `Ref(Slice(F32)) -> NamedExternref("Float32Array")`.
|
|
3578
3591
|
const ret = getArrayF32FromWasm0(arg0, arg1);
|
|
3579
3592
|
return addHeapObject(ret);
|
|
3580
3593
|
},
|
|
3581
|
-
|
|
3594
|
+
__wbindgen_cast_000000000000000c: function(arg0, arg1) {
|
|
3582
3595
|
// Cast intrinsic for `Ref(Slice(I16)) -> NamedExternref("Int16Array")`.
|
|
3583
3596
|
const ret = getArrayI16FromWasm0(arg0, arg1);
|
|
3584
3597
|
return addHeapObject(ret);
|
|
3585
3598
|
},
|
|
3586
|
-
|
|
3599
|
+
__wbindgen_cast_000000000000000d: function(arg0, arg1) {
|
|
3587
3600
|
// Cast intrinsic for `Ref(Slice(I32)) -> NamedExternref("Int32Array")`.
|
|
3588
3601
|
const ret = getArrayI32FromWasm0(arg0, arg1);
|
|
3589
3602
|
return addHeapObject(ret);
|
|
3590
3603
|
},
|
|
3591
|
-
|
|
3604
|
+
__wbindgen_cast_000000000000000e: function(arg0, arg1) {
|
|
3592
3605
|
// Cast intrinsic for `Ref(Slice(I8)) -> NamedExternref("Int8Array")`.
|
|
3593
3606
|
const ret = getArrayI8FromWasm0(arg0, arg1);
|
|
3594
3607
|
return addHeapObject(ret);
|
|
3595
3608
|
},
|
|
3596
|
-
|
|
3609
|
+
__wbindgen_cast_000000000000000f: function(arg0, arg1) {
|
|
3597
3610
|
// Cast intrinsic for `Ref(Slice(U16)) -> NamedExternref("Uint16Array")`.
|
|
3598
3611
|
const ret = getArrayU16FromWasm0(arg0, arg1);
|
|
3599
3612
|
return addHeapObject(ret);
|
|
3600
3613
|
},
|
|
3601
|
-
|
|
3614
|
+
__wbindgen_cast_0000000000000010: function(arg0, arg1) {
|
|
3602
3615
|
// Cast intrinsic for `Ref(Slice(U32)) -> NamedExternref("Uint32Array")`.
|
|
3603
3616
|
const ret = getArrayU32FromWasm0(arg0, arg1);
|
|
3604
3617
|
return addHeapObject(ret);
|
|
3605
3618
|
},
|
|
3606
|
-
|
|
3619
|
+
__wbindgen_cast_0000000000000011: function(arg0, arg1) {
|
|
3607
3620
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
3608
3621
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
3609
3622
|
return addHeapObject(ret);
|
|
3610
3623
|
},
|
|
3611
|
-
|
|
3624
|
+
__wbindgen_cast_0000000000000012: function(arg0, arg1) {
|
|
3612
3625
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
3613
3626
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
3614
3627
|
return addHeapObject(ret);
|
|
3615
3628
|
},
|
|
3616
|
-
|
|
3629
|
+
__wbindgen_cast_0000000000000013: function(arg0) {
|
|
3617
3630
|
// Cast intrinsic for `U64 -> Externref`.
|
|
3618
3631
|
const ret = BigInt.asUintN(64, arg0);
|
|
3619
3632
|
return addHeapObject(ret);
|
|
3620
3633
|
},
|
|
3621
|
-
|
|
3634
|
+
__wbindgen_cast_0000000000000014: function(arg0, arg1) {
|
|
3622
3635
|
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
3623
3636
|
wasm.__wbindgen_export4(arg0, arg1 * 1, 1);
|
|
3624
3637
|
// Cast intrinsic for `Vector(U8) -> Externref`.
|
|
@@ -3639,18 +3652,22 @@ function __wbg_get_imports() {
|
|
|
3639
3652
|
};
|
|
3640
3653
|
}
|
|
3641
3654
|
|
|
3642
|
-
function
|
|
3643
|
-
wasm.
|
|
3655
|
+
function __wasm_bindgen_func_elem_11260(arg0, arg1) {
|
|
3656
|
+
wasm.__wasm_bindgen_func_elem_11260(arg0, arg1);
|
|
3657
|
+
}
|
|
3658
|
+
|
|
3659
|
+
function __wasm_bindgen_func_elem_2919(arg0, arg1, arg2) {
|
|
3660
|
+
wasm.__wasm_bindgen_func_elem_2919(arg0, arg1, addHeapObject(arg2));
|
|
3644
3661
|
}
|
|
3645
3662
|
|
|
3646
|
-
function
|
|
3647
|
-
wasm.
|
|
3663
|
+
function __wasm_bindgen_func_elem_9852(arg0, arg1, arg2) {
|
|
3664
|
+
wasm.__wasm_bindgen_func_elem_9852(arg0, arg1, addHeapObject(arg2));
|
|
3648
3665
|
}
|
|
3649
3666
|
|
|
3650
|
-
function
|
|
3667
|
+
function __wasm_bindgen_func_elem_12874(arg0, arg1, arg2) {
|
|
3651
3668
|
try {
|
|
3652
3669
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3653
|
-
wasm.
|
|
3670
|
+
wasm.__wasm_bindgen_func_elem_12874(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3654
3671
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3655
3672
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3656
3673
|
if (r1) {
|
|
@@ -3661,10 +3678,10 @@ function __wasm_bindgen_func_elem_12861(arg0, arg1, arg2) {
|
|
|
3661
3678
|
}
|
|
3662
3679
|
}
|
|
3663
3680
|
|
|
3664
|
-
function
|
|
3681
|
+
function __wasm_bindgen_func_elem_9850(arg0, arg1, arg2) {
|
|
3665
3682
|
try {
|
|
3666
3683
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3667
|
-
wasm.
|
|
3684
|
+
wasm.__wasm_bindgen_func_elem_9850(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3668
3685
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3669
3686
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3670
3687
|
if (r1) {
|
|
@@ -3675,10 +3692,10 @@ function __wasm_bindgen_func_elem_9846(arg0, arg1, arg2) {
|
|
|
3675
3692
|
}
|
|
3676
3693
|
}
|
|
3677
3694
|
|
|
3678
|
-
function
|
|
3695
|
+
function __wasm_bindgen_func_elem_9850_3(arg0, arg1, arg2) {
|
|
3679
3696
|
try {
|
|
3680
3697
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3681
|
-
wasm.
|
|
3698
|
+
wasm.__wasm_bindgen_func_elem_9850_3(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3682
3699
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3683
3700
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3684
3701
|
if (r1) {
|
|
@@ -3689,10 +3706,10 @@ function __wasm_bindgen_func_elem_9846_3(arg0, arg1, arg2) {
|
|
|
3689
3706
|
}
|
|
3690
3707
|
}
|
|
3691
3708
|
|
|
3692
|
-
function
|
|
3709
|
+
function __wasm_bindgen_func_elem_9850_5(arg0, arg1, arg2) {
|
|
3693
3710
|
try {
|
|
3694
3711
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3695
|
-
wasm.
|
|
3712
|
+
wasm.__wasm_bindgen_func_elem_9850_5(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3696
3713
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3697
3714
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3698
3715
|
if (r1) {
|
|
@@ -3703,10 +3720,10 @@ function __wasm_bindgen_func_elem_9846_5(arg0, arg1, arg2) {
|
|
|
3703
3720
|
}
|
|
3704
3721
|
}
|
|
3705
3722
|
|
|
3706
|
-
function
|
|
3723
|
+
function __wasm_bindgen_func_elem_9850_6(arg0, arg1, arg2) {
|
|
3707
3724
|
try {
|
|
3708
3725
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3709
|
-
wasm.
|
|
3726
|
+
wasm.__wasm_bindgen_func_elem_9850_6(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3710
3727
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3711
3728
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3712
3729
|
if (r1) {
|
|
@@ -3717,10 +3734,10 @@ function __wasm_bindgen_func_elem_9846_6(arg0, arg1, arg2) {
|
|
|
3717
3734
|
}
|
|
3718
3735
|
}
|
|
3719
3736
|
|
|
3720
|
-
function
|
|
3737
|
+
function __wasm_bindgen_func_elem_9850_7(arg0, arg1, arg2) {
|
|
3721
3738
|
try {
|
|
3722
3739
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3723
|
-
wasm.
|
|
3740
|
+
wasm.__wasm_bindgen_func_elem_9850_7(retptr, arg0, arg1, addHeapObject(arg2));
|
|
3724
3741
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3725
3742
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3726
3743
|
if (r1) {
|
|
@@ -3731,8 +3748,8 @@ function __wasm_bindgen_func_elem_9846_7(arg0, arg1, arg2) {
|
|
|
3731
3748
|
}
|
|
3732
3749
|
}
|
|
3733
3750
|
|
|
3734
|
-
function
|
|
3735
|
-
wasm.
|
|
3751
|
+
function __wasm_bindgen_func_elem_12882(arg0, arg1, arg2, arg3) {
|
|
3752
|
+
wasm.__wasm_bindgen_func_elem_12882(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
3736
3753
|
}
|
|
3737
3754
|
|
|
3738
3755
|
|
package/build/hana-ui.wasm
CHANGED
|
Binary file
|