@roomle/web-sdk 5.1.0-alpha.3 → 5.1.0-alpha.5
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/lib/{BufferGeometry-Bl5whHAB.mjs → BufferGeometry-CxlpBjLq.mjs} +192 -195
- package/lib/BufferGeometry-CxlpBjLq.mjs.map +1 -0
- package/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/{GLTFExporter-yQ7mMauu.mjs → GLTFExporter-DeNw0qAI.mjs} +86 -80
- package/lib/GLTFExporter-DeNw0qAI.mjs.map +1 -0
- package/lib/GaussianBlurNode-BR1cKBsX.mjs +65 -0
- package/lib/GaussianBlurNode-BR1cKBsX.mjs.map +1 -0
- package/lib/{Object3D-BHdngbxB.mjs → Object3D-CALIQdg1.mjs} +142 -59
- package/lib/Object3D-CALIQdg1.mjs.map +1 -0
- package/lib/{Pass-DLiMLT5k.mjs → Pass-DCljS3Z-.mjs} +4 -4
- package/lib/{Pass-DLiMLT5k.mjs.map → Pass-DCljS3Z-.mjs.map} +1 -1
- package/lib/{PointLightHelper-CuPSBuDU.mjs → PointLightHelper-C_0CYp7R.mjs} +35 -32
- package/lib/PointLightHelper-C_0CYp7R.mjs.map +1 -0
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{SpotLightHelper-m-Rh8vGU.mjs → SpotLightHelper-UUIHn43T.mjs} +22 -19
- package/lib/SpotLightHelper-UUIHn43T.mjs.map +1 -0
- package/lib/{USDZExporter-MdkuT226.mjs → USDZExporter-BBNw7Hey.mjs} +6 -3
- package/lib/USDZExporter-BBNw7Hey.mjs.map +1 -0
- package/lib/{Vector4-C7TlIAyy.mjs → Vector4-BOcWTZJI.mjs} +2 -2
- package/lib/Vector4-BOcWTZJI.mjs.map +1 -0
- package/lib/{api-KWh-ESd5.mjs → api-CwEjmjrn.mjs} +2 -2
- package/lib/{api-KWh-ESd5.mjs.map → api-CwEjmjrn.mjs.map} +1 -1
- package/lib/asset-loader.worker-CzI1oyTY.mjs.map +1 -1
- package/lib/{banana-for-scale-DpKXNBt_.mjs → banana-for-scale-Cf41yXTl.mjs} +3 -3
- package/lib/{banana-for-scale-DpKXNBt_.mjs.map → banana-for-scale-Cf41yXTl.mjs.map} +1 -1
- package/lib/budgeteer.sw-D80jTmYa.mjs.map +1 -1
- package/lib/{common-utils-DbL4tku0.mjs → common-utils-OTJQGohe.mjs} +3 -3
- package/lib/common-utils-OTJQGohe.mjs.map +1 -0
- package/lib/{component-dimensioning-luQ3LgrU.mjs → component-dimensioning-yPK46Y5o.mjs} +26 -26
- package/lib/{component-dimensioning-luQ3LgrU.mjs.map → component-dimensioning-yPK46Y5o.mjs.map} +1 -1
- package/lib/{component-raycast-helper-hj6sm7jw.mjs → component-raycast-helper-CnpnRaFg.mjs} +15 -15
- package/lib/{component-raycast-helper-hj6sm7jw.mjs.map → component-raycast-helper-CnpnRaFg.mjs.map} +1 -1
- package/lib/{configurator-CQ7KsW0O.mjs → configurator-iYlO_buA.mjs} +4 -4
- package/lib/{configurator-CQ7KsW0O.mjs.map → configurator-iYlO_buA.mjs.map} +1 -1
- package/lib/configurator-y7zIaUe_.mjs +2 -0
- package/lib/{continuous-drawing-helper-DqHIR_qF.mjs → continuous-drawing-helper-CTfGRTfH.mjs} +3 -3
- package/lib/{continuous-drawing-helper-DqHIR_qF.mjs.map → continuous-drawing-helper-CTfGRTfH.mjs.map} +1 -1
- package/lib/dimensioning-helper-CQlesi-m.mjs +2 -0
- package/lib/{dimensioning-helper-CGPjS2hW.mjs → dimensioning-helper-DSlkLDmx.mjs} +42 -36
- package/lib/dimensioning-helper-DSlkLDmx.mjs.map +1 -0
- package/lib/{glb-viewer-BWMMzvuG.mjs → glb-viewer-AGV-_xKd.mjs} +33 -33
- package/lib/{glb-viewer-BWMMzvuG.mjs.map → glb-viewer-AGV-_xKd.mjs.map} +1 -1
- package/lib/glb-viewer-DSzNR4CI.mjs +2 -0
- package/lib/{highlight-coordinator-DYjBxYpy.mjs → highlight-coordinator-DU6oFunq.mjs} +6 -6
- package/lib/{highlight-coordinator-DYjBxYpy.mjs.map → highlight-coordinator-DU6oFunq.mjs.map} +1 -1
- package/lib/{homag-intelligence-lbse0Y0v.mjs → homag-intelligence-D_yBv0ig.mjs} +3 -3
- package/lib/{homag-intelligence-lbse0Y0v.mjs.map → homag-intelligence-D_yBv0ig.mjs.map} +1 -1
- package/lib/{hosek-wilkie-sky-iMar2iw-.mjs → hosek-wilkie-sky-DmTvnxMA.mjs} +33 -33
- package/lib/{hosek-wilkie-sky-iMar2iw-.mjs.map → hosek-wilkie-sky-DmTvnxMA.mjs.map} +1 -1
- package/lib/{imos-ix-poc-export-helper-CyGqK7nu.mjs → imos-ix-poc-export-helper-BGN97m8W.mjs} +3 -3
- package/lib/{imos-ix-poc-export-helper-CyGqK7nu.mjs.map → imos-ix-poc-export-helper-BGN97m8W.mjs.map} +1 -1
- package/lib/kernel-BWfRHWkW.mjs.map +1 -1
- package/lib/{kernel-utils-BvatnA7U.mjs → kernel-utils-BYKmP0mf.mjs} +13 -13
- package/lib/{kernel-utils-BvatnA7U.mjs.map → kernel-utils-BYKmP0mf.mjs.map} +1 -1
- package/lib/{material-viewer-BKTxh5Ui.mjs → material-viewer-BuBSXGw6.mjs} +18 -18
- package/lib/{material-viewer-BKTxh5Ui.mjs.map → material-viewer-BuBSXGw6.mjs.map} +1 -1
- package/lib/{packages-B4K6xrdJ.mjs → packages-CduZDHYG.mjs} +5 -5
- package/lib/{packages-B4K6xrdJ.mjs.map → packages-CduZDHYG.mjs.map} +1 -1
- package/lib/planner-B-SWR4R8.mjs +2 -0
- package/lib/{planner-HMMHSMAp.mjs → planner-BuBkFbra.mjs} +3 -3
- package/lib/{planner-HMMHSMAp.mjs.map → planner-BuBkFbra.mjs.map} +1 -1
- package/lib/{plugin-system-CRaC04G5.mjs → plugin-system-CPf99Zkf.mjs} +2 -2
- package/lib/{plugin-system-CRaC04G5.mjs.map → plugin-system-CPf99Zkf.mjs.map} +1 -1
- package/lib/{render-cache-DCPIQbO1.mjs → render-cache-CPppt7Rd.mjs} +5 -5
- package/lib/{render-cache-DCPIQbO1.mjs.map → render-cache-CPppt7Rd.mjs.map} +1 -1
- package/lib/{render-order-BPF2wDMw.mjs → render-order-a0QAbB7Q.mjs} +2 -2
- package/lib/{render-order-BPF2wDMw.mjs.map → render-order-a0QAbB7Q.mjs.map} +1 -1
- package/lib/roomle-headless.d.ts +21 -6
- package/lib/roomle-headless.js +14 -14
- package/lib/{roomle-renderer-Ato6RMrd.mjs → roomle-renderer-UJINLYxS.mjs} +2 -2
- package/lib/roomle-renderer-UJINLYxS.mjs.map +1 -0
- package/lib/{roomle-sdk-5aB4wxLW.mjs → roomle-sdk-CcNdTp_n.mjs} +2109 -2117
- package/lib/roomle-sdk-CcNdTp_n.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +21 -6
- package/lib/roomle-sdk.js +7 -7
- package/lib/{roomle-webgpu-renderer-BfZKcXSz.mjs → roomle-webgpu-renderer-BSvxbopA.mjs} +900 -707
- package/lib/roomle-webgpu-renderer-BSvxbopA.mjs.map +1 -0
- package/lib/{scene-renderer-DXvavD4L.mjs → scene-renderer--DzrpIl_.mjs} +309 -309
- package/lib/{scene-renderer-DXvavD4L.mjs.map → scene-renderer--DzrpIl_.mjs.map} +1 -1
- package/lib/{script-loader-axxcKvph.mjs → script-loader-D6i0wQ_j.mjs} +2 -2
- package/lib/{script-loader-axxcKvph.mjs.map → script-loader-D6i0wQ_j.mjs.map} +1 -1
- package/lib/{shading-settings-BBhR7KcS.mjs → shading-settings-6v-7O_Sz.mjs} +49 -49
- package/lib/{shading-settings-BBhR7KcS.mjs.map → shading-settings-6v-7O_Sz.mjs.map} +1 -1
- package/lib/src-6KtBPZXp.mjs +2 -0
- package/lib/{src-HhklrVDg.mjs → src-Dg0wYIom.mjs} +150 -150
- package/lib/{src-HhklrVDg.mjs.map → src-Dg0wYIom.mjs.map} +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/{stats-helper-BSmoG68E.mjs → stats-helper-DYjPPDnz.mjs} +2 -2
- package/lib/{stats-helper-BSmoG68E.mjs.map → stats-helper-DYjPPDnz.mjs.map} +1 -1
- package/lib/{three.core-0KaTx8dm.mjs → three.core-BTUCraWz.mjs} +976 -884
- package/lib/three.core-BTUCraWz.mjs.map +1 -0
- package/lib/{three.module-dym6j3lO.mjs → three.module-DUSFrLM6.mjs} +1789 -1739
- package/lib/three.module-DUSFrLM6.mjs.map +1 -0
- package/lib/three.tsl-De6A-G56.mjs +158 -0
- package/lib/three.tsl-De6A-G56.mjs.map +1 -0
- package/lib/three.tsl-DtfvggFX.mjs +2 -0
- package/lib/three.webgpu-B1OhMci_.mjs +3 -0
- package/lib/{three.webgpu-D3nSEIjD.mjs → three.webgpu-wPiwbpFM.mjs} +5806 -4926
- package/lib/three.webgpu-wPiwbpFM.mjs.map +1 -0
- package/lib/{threejs-utils-CLdyrCet.mjs → threejs-utils-lVSsgAiQ.mjs} +193 -202
- package/lib/threejs-utils-lVSsgAiQ.mjs.map +1 -0
- package/lib/{tools-core-DusxT3AY.mjs → tools-core-CRGER_KC.mjs} +3 -3
- package/lib/{tools-core-DusxT3AY.mjs.map → tools-core-CRGER_KC.mjs.map} +1 -1
- package/lib/{webgpu-BHAP6BLI.mjs → webgpu-BxYJfBjz.mjs} +555 -555
- package/lib/{webgpu-BHAP6BLI.mjs.map → webgpu-BxYJfBjz.mjs.map} +1 -1
- package/package.json +5 -5
- package/lib/BufferGeometry-Bl5whHAB.mjs.map +0 -1
- package/lib/GLTFExporter-yQ7mMauu.mjs.map +0 -1
- package/lib/GaussianBlurNode-DNBEf5-n.mjs +0 -59
- package/lib/GaussianBlurNode-DNBEf5-n.mjs.map +0 -1
- package/lib/Object3D-BHdngbxB.mjs.map +0 -1
- package/lib/PointLightHelper-CuPSBuDU.mjs.map +0 -1
- package/lib/SpotLightHelper-m-Rh8vGU.mjs.map +0 -1
- package/lib/USDZExporter-MdkuT226.mjs.map +0 -1
- package/lib/Vector4-C7TlIAyy.mjs.map +0 -1
- package/lib/common-utils-DbL4tku0.mjs.map +0 -1
- package/lib/configurator-ymHt9qjg.mjs +0 -2
- package/lib/dimensioning-helper-CGPjS2hW.mjs.map +0 -1
- package/lib/dimensioning-helper-VndKlIXS.mjs +0 -2
- package/lib/glb-viewer-D5QHd6Da.mjs +0 -2
- package/lib/planner-BM825oIz.mjs +0 -2
- package/lib/roomle-renderer-Ato6RMrd.mjs.map +0 -1
- package/lib/roomle-sdk-5aB4wxLW.mjs.map +0 -1
- package/lib/roomle-webgpu-renderer-BfZKcXSz.mjs.map +0 -1
- package/lib/src-Bbq3Hqzn.mjs +0 -2
- package/lib/three.core-0KaTx8dm.mjs.map +0 -1
- package/lib/three.module-dym6j3lO.mjs.map +0 -1
- package/lib/three.tsl-BTc4fg8T.mjs +0 -2
- package/lib/three.tsl-Cf0-sCqB.mjs +0 -152
- package/lib/three.tsl-Cf0-sCqB.mjs.map +0 -1
- package/lib/three.webgpu-ClICiWlK.mjs +0 -3
- package/lib/three.webgpu-D3nSEIjD.mjs.map +0 -1
- package/lib/threejs-utils-CLdyrCet.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { An as e, Dr as t, Ei as n, Ti as r, Vt as i, cn as a, ei as o, f as s, h as c, ln as l, m as u, pi as d } from "./three.core-BTUCraWz.mjs";
|
|
2
2
|
var f = 1.25, p = 65535;
|
|
3
3
|
p << 16;
|
|
4
4
|
var m = 2 ** -24, h = Symbol("SKIP_GENERATION"), g = {
|
|
@@ -278,7 +278,7 @@ var ge = class {
|
|
|
278
278
|
t = null, this.float32Array = null, this.uint16Array = null, this.uint32Array = null, e.length !== 0 && this.setBuffer(e.pop());
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
|
-
}(), P, _e, ve = [], ye = /* @__PURE__ */ new ge(() => new
|
|
281
|
+
}(), P, _e, ve = [], ye = /* @__PURE__ */ new ge(() => new s());
|
|
282
282
|
function be(e, t, n, r, i, a) {
|
|
283
283
|
P = ye.getPrimitive(), _e = ye.getPrimitive(), ve.push(P, _e), N.setBuffer(e._roots[t]);
|
|
284
284
|
let o = xe(0, e.geometry, n, r, i, a);
|
|
@@ -327,19 +327,19 @@ function xe(e, t, n, r, i = null, a = 0, o = 0) {
|
|
|
327
327
|
}
|
|
328
328
|
//#endregion
|
|
329
329
|
//#region ../../node_modules/three-mesh-bvh/src/core/cast/bvhcast.js
|
|
330
|
-
var Se = /* @__PURE__ */ new N.constructor(), Ce = /* @__PURE__ */ new N.constructor(), F = /* @__PURE__ */ new ge(() => new
|
|
330
|
+
var Se = /* @__PURE__ */ new N.constructor(), Ce = /* @__PURE__ */ new N.constructor(), F = /* @__PURE__ */ new ge(() => new s()), we = /* @__PURE__ */ new s(), Te = /* @__PURE__ */ new s(), Ee = /* @__PURE__ */ new s(), De = /* @__PURE__ */ new s(), Oe = !1;
|
|
331
331
|
function ke(e, t, n, r) {
|
|
332
332
|
if (Oe) throw Error("MeshBVH: Recursive calls to bvhcast not supported.");
|
|
333
333
|
Oe = !0;
|
|
334
|
-
let i = e._roots,
|
|
334
|
+
let i = e._roots, o = t._roots, s, c = 0, l = 0, u = new a().copy(n).invert();
|
|
335
335
|
for (let e = 0, t = i.length; e < t; e++) {
|
|
336
|
-
Se.setBuffer(i[e]),
|
|
336
|
+
Se.setBuffer(i[e]), l = 0;
|
|
337
337
|
let t = F.getPrimitive();
|
|
338
|
-
_(k(0), Se.float32Array, t), t.applyMatrix4(
|
|
339
|
-
for (let e = 0, i =
|
|
340
|
-
if (F.releasePrimitive(t), Se.clearBuffer(),
|
|
338
|
+
_(k(0), Se.float32Array, t), t.applyMatrix4(u);
|
|
339
|
+
for (let e = 0, i = o.length; e < i && (Ce.setBuffer(o[e]), s = I(0, 0, n, u, r, c, l, 0, 0, t), Ce.clearBuffer(), l += o[e].byteLength / 32, !s); e++);
|
|
340
|
+
if (F.releasePrimitive(t), Se.clearBuffer(), c += i[e].byteLength / 32, s) break;
|
|
341
341
|
}
|
|
342
|
-
return Oe = !1,
|
|
342
|
+
return Oe = !1, s;
|
|
343
343
|
}
|
|
344
344
|
function I(e, t, n, r, i, a = 0, o = 0, s = 0, c = 0, l = null, u = !1) {
|
|
345
345
|
let d, f;
|
|
@@ -425,7 +425,7 @@ var Ae = new class {
|
|
|
425
425
|
});
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
}(), je = /* @__PURE__ */ new
|
|
428
|
+
}(), je = /* @__PURE__ */ new s(), Me = /* @__PURE__ */ new Float32Array(6), Ne = class {
|
|
429
429
|
constructor() {
|
|
430
430
|
this._roots = null, this.primitiveBuffer = null, this.primitiveBufferStride = null;
|
|
431
431
|
}
|
|
@@ -541,7 +541,7 @@ function Le(e, t = ArrayBuffer) {
|
|
|
541
541
|
function Re(e, t) {
|
|
542
542
|
if (!e.index) {
|
|
543
543
|
let n = e.attributes.position.count, r = Le(n, t.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer);
|
|
544
|
-
e.setIndex(new
|
|
544
|
+
e.setIndex(new u(r, 1));
|
|
545
545
|
for (let e = 0; e < n; e++) r[e] = e;
|
|
546
546
|
}
|
|
547
547
|
}
|
|
@@ -620,7 +620,7 @@ var Ue = class extends Ne {
|
|
|
620
620
|
}
|
|
621
621
|
init(e) {
|
|
622
622
|
let { geometry: t, primitiveStride: n } = this;
|
|
623
|
-
e.indirect ? this._indirectBuffer = He(Ve(t, e.range, n), e.useSharedArrayBuffer) : Re(t, e), super.init(e), !t.boundingBox && e.setBoundingBox && (t.boundingBox = this.getBoundingBox(new
|
|
623
|
+
e.indirect ? this._indirectBuffer = He(Ve(t, e.range, n), e.useSharedArrayBuffer) : Re(t, e), super.init(e), !t.boundingBox && e.setBoundingBox && (t.boundingBox = this.getBoundingBox(new s()));
|
|
624
624
|
}
|
|
625
625
|
getRootRanges(e) {
|
|
626
626
|
return this.indirect ? [{
|
|
@@ -656,7 +656,7 @@ var Ue = class extends Ne {
|
|
|
656
656
|
}
|
|
657
657
|
};
|
|
658
658
|
L.prototype.setFromBox = (function() {
|
|
659
|
-
let e = /* @__PURE__ */ new
|
|
659
|
+
let e = /* @__PURE__ */ new n();
|
|
660
660
|
return function(t, n) {
|
|
661
661
|
let r = n.min, i = n.max, a = Infinity, o = -Infinity;
|
|
662
662
|
for (let n = 0; n <= 1; n++) for (let s = 0; s <= 1; s++) for (let c = 0; c <= 1; c++) {
|
|
@@ -683,34 +683,34 @@ L.prototype.setFromBox = (function() {
|
|
|
683
683
|
//#endregion
|
|
684
684
|
//#region ../../node_modules/three-mesh-bvh/src/math/MathUtilities.js
|
|
685
685
|
var We = (function() {
|
|
686
|
-
let e = /* @__PURE__ */ new
|
|
687
|
-
return function(
|
|
688
|
-
let o =
|
|
689
|
-
r.subVectors(o, c), e.subVectors(
|
|
686
|
+
let e = /* @__PURE__ */ new n(), t = /* @__PURE__ */ new n(), r = /* @__PURE__ */ new n();
|
|
687
|
+
return function(n, i, a) {
|
|
688
|
+
let o = n.start, s = e, c = i.start, l = t;
|
|
689
|
+
r.subVectors(o, c), e.subVectors(n.end, n.start), t.subVectors(i.end, i.start);
|
|
690
690
|
let u = r.dot(l), d = l.dot(s), f = l.dot(l), p = r.dot(s), m = s.dot(s) * f - d * d, h, g;
|
|
691
691
|
h = m === 0 ? 0 : (u * d - p * f) / m, g = (u + h * d) / f, a.x = h, a.y = g;
|
|
692
692
|
};
|
|
693
693
|
})(), Ge = (function() {
|
|
694
|
-
let e = /* @__PURE__ */ new
|
|
695
|
-
return function(
|
|
696
|
-
We(
|
|
694
|
+
let e = /* @__PURE__ */ new r(), t = /* @__PURE__ */ new n(), i = /* @__PURE__ */ new n();
|
|
695
|
+
return function(n, r, a, o) {
|
|
696
|
+
We(n, r, e);
|
|
697
697
|
let s = e.x, c = e.y;
|
|
698
698
|
if (s >= 0 && s <= 1 && c >= 0 && c <= 1) {
|
|
699
|
-
|
|
699
|
+
n.at(s, a), r.at(c, o);
|
|
700
700
|
return;
|
|
701
701
|
} else if (s >= 0 && s <= 1) {
|
|
702
|
-
c < 0 ?
|
|
702
|
+
c < 0 ? r.at(0, o) : r.at(1, o), n.closestPointToPoint(o, !0, a);
|
|
703
703
|
return;
|
|
704
704
|
} else if (c >= 0 && c <= 1) {
|
|
705
|
-
s < 0 ?
|
|
705
|
+
s < 0 ? n.at(0, a) : n.at(1, a), r.closestPointToPoint(a, !0, o);
|
|
706
706
|
return;
|
|
707
707
|
} else {
|
|
708
708
|
let e;
|
|
709
|
-
e = s < 0 ?
|
|
709
|
+
e = s < 0 ? n.start : n.end;
|
|
710
710
|
let l;
|
|
711
|
-
l = c < 0 ?
|
|
712
|
-
let u =
|
|
713
|
-
if (
|
|
711
|
+
l = c < 0 ? r.start : r.end;
|
|
712
|
+
let u = t, d = i;
|
|
713
|
+
if (n.closestPointToPoint(l, !0, t), r.closestPointToPoint(e, !0, i), u.distanceToSquared(l) <= d.distanceToSquared(e)) {
|
|
714
714
|
a.copy(u), o.copy(l);
|
|
715
715
|
return;
|
|
716
716
|
} else {
|
|
@@ -720,14 +720,14 @@ var We = (function() {
|
|
|
720
720
|
}
|
|
721
721
|
};
|
|
722
722
|
})(), Ke = (function() {
|
|
723
|
-
let
|
|
724
|
-
return function(e,
|
|
725
|
-
let { radius:
|
|
726
|
-
if (
|
|
727
|
-
let d =
|
|
728
|
-
if (Math.abs(d.distanceToPoint(s)) <=
|
|
723
|
+
let t = /* @__PURE__ */ new n(), r = /* @__PURE__ */ new n(), a = /* @__PURE__ */ new e(), o = /* @__PURE__ */ new i();
|
|
724
|
+
return function(e, n) {
|
|
725
|
+
let { radius: i, center: s } = e, { a: c, b: l, c: u } = n;
|
|
726
|
+
if (o.start = c, o.end = l, o.closestPointToPoint(s, !0, t).distanceTo(s) <= i || (o.start = c, o.end = u, o.closestPointToPoint(s, !0, t).distanceTo(s) <= i) || (o.start = l, o.end = u, o.closestPointToPoint(s, !0, t).distanceTo(s) <= i)) return !0;
|
|
727
|
+
let d = n.getPlane(a);
|
|
728
|
+
if (Math.abs(d.distanceToPoint(s)) <= i) {
|
|
729
729
|
let e = d.projectPoint(s, r);
|
|
730
|
-
if (
|
|
730
|
+
if (n.containsPoint(e)) return !0;
|
|
731
731
|
}
|
|
732
732
|
return !1;
|
|
733
733
|
};
|
|
@@ -740,13 +740,13 @@ function z(e) {
|
|
|
740
740
|
return Math.abs(e) < R;
|
|
741
741
|
}
|
|
742
742
|
var B = class extends d {
|
|
743
|
-
constructor(...
|
|
744
|
-
super(...
|
|
743
|
+
constructor(...t) {
|
|
744
|
+
super(...t), this.isExtendedTriangle = !0, this.satAxes = [
|
|
745
745
|
,
|
|
746
746
|
,
|
|
747
747
|
,
|
|
748
748
|
,
|
|
749
|
-
].fill().map(() => new
|
|
749
|
+
].fill().map(() => new n()), this.satBounds = [
|
|
750
750
|
,
|
|
751
751
|
,
|
|
752
752
|
,
|
|
@@ -755,7 +755,7 @@ var B = class extends d {
|
|
|
755
755
|
this.a,
|
|
756
756
|
this.b,
|
|
757
757
|
this.c
|
|
758
|
-
], this.plane = new
|
|
758
|
+
], this.plane = new e(), this.isDegenerateIntoSegment = !1, this.isDegenerateIntoPoint = !1, this.degenerateSegment = new i(), this.needsUpdate = !0;
|
|
759
759
|
}
|
|
760
760
|
intersectsSphere(e) {
|
|
761
761
|
return Ke(e, this);
|
|
@@ -774,31 +774,31 @@ var B = class extends d {
|
|
|
774
774
|
}
|
|
775
775
|
};
|
|
776
776
|
B.prototype.closestPointToSegment = (function() {
|
|
777
|
-
let
|
|
778
|
-
return function(
|
|
779
|
-
let { start: o, end: s } =
|
|
777
|
+
let e = /* @__PURE__ */ new n(), t = /* @__PURE__ */ new n(), r = /* @__PURE__ */ new i();
|
|
778
|
+
return function(n, i = null, a = null) {
|
|
779
|
+
let { start: o, end: s } = n, c = this.points, l, u = Infinity;
|
|
780
780
|
for (let o = 0; o < 3; o++) {
|
|
781
781
|
let s = (o + 1) % 3;
|
|
782
|
-
|
|
782
|
+
r.start.copy(c[o]), r.end.copy(c[s]), Ge(r, n, e, t), l = e.distanceToSquared(t), l < u && (u = l, i && i.copy(e), a && a.copy(t));
|
|
783
783
|
}
|
|
784
|
-
return this.closestPointToPoint(o,
|
|
784
|
+
return this.closestPointToPoint(o, e), l = o.distanceToSquared(e), l < u && (u = l, i && i.copy(e), a && a.copy(o)), this.closestPointToPoint(s, e), l = s.distanceToSquared(e), l < u && (u = l, i && i.copy(e), a && a.copy(s)), Math.sqrt(u);
|
|
785
785
|
};
|
|
786
786
|
})(), B.prototype.intersectsTriangle = (function() {
|
|
787
|
-
let
|
|
788
|
-
function h(e,
|
|
787
|
+
let e = /* @__PURE__ */ new B(), t = /* @__PURE__ */ new L(), a = /* @__PURE__ */ new L(), o = /* @__PURE__ */ new n(), s = /* @__PURE__ */ new n(), c = /* @__PURE__ */ new n(), l = /* @__PURE__ */ new n(), u = /* @__PURE__ */ new i(), d = /* @__PURE__ */ new i(), f = /* @__PURE__ */ new n(), p = /* @__PURE__ */ new r(), m = /* @__PURE__ */ new r();
|
|
788
|
+
function h(e, n, r, i) {
|
|
789
789
|
let s = o;
|
|
790
|
-
!e.isDegenerateIntoPoint && !e.isDegenerateIntoSegment ? s.copy(e.plane.normal) : s.copy(
|
|
790
|
+
!e.isDegenerateIntoPoint && !e.isDegenerateIntoSegment ? s.copy(e.plane.normal) : s.copy(n.plane.normal);
|
|
791
791
|
let c = e.satBounds, u = e.satAxes;
|
|
792
|
-
for (let
|
|
793
|
-
let i = c[
|
|
794
|
-
if (
|
|
792
|
+
for (let r = 1; r < 4; r++) {
|
|
793
|
+
let i = c[r], o = u[r];
|
|
794
|
+
if (t.setFromPoints(o, n.points), i.isSeparated(t) || (l.copy(s).cross(o), t.setFromPoints(l, e.points), a.setFromPoints(l, n.points), t.isSeparated(a))) return !1;
|
|
795
795
|
}
|
|
796
|
-
let d =
|
|
797
|
-
for (let
|
|
798
|
-
let i = d[
|
|
799
|
-
if (
|
|
796
|
+
let d = n.satBounds, f = n.satAxes;
|
|
797
|
+
for (let r = 1; r < 4; r++) {
|
|
798
|
+
let i = d[r], o = f[r];
|
|
799
|
+
if (t.setFromPoints(o, e.points), i.isSeparated(t) || (l.crossVectors(s, o), t.setFromPoints(l, e.points), a.setFromPoints(l, n.points), t.isSeparated(a))) return !1;
|
|
800
800
|
}
|
|
801
|
-
return
|
|
801
|
+
return r && (i || console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."), r.start.set(0, 0, 0), r.end.set(0, 0, 0)), !0;
|
|
802
802
|
}
|
|
803
803
|
function g(e, t, n, r, i, a, o, s, c, l, u) {
|
|
804
804
|
let d = o / (o - s);
|
|
@@ -839,23 +839,23 @@ B.prototype.closestPointToSegment = (function() {
|
|
|
839
839
|
else if (t.isDegenerateIntoPoint) return y(e, t, n);
|
|
840
840
|
else if (t.isDegenerateIntoSegment) return v(e, t, n, r);
|
|
841
841
|
}
|
|
842
|
-
return function(
|
|
843
|
-
this.needsUpdate && this.update(),
|
|
844
|
-
let i = x(this,
|
|
842
|
+
return function(t, n = null, r = !1) {
|
|
843
|
+
this.needsUpdate && this.update(), t.isExtendedTriangle ? t.needsUpdate && t.update() : (e.copy(t), e.update(), t = e);
|
|
844
|
+
let i = x(this, t, n, r);
|
|
845
845
|
if (i !== void 0) return i;
|
|
846
|
-
let a = this.plane, o =
|
|
846
|
+
let a = this.plane, o = t.plane, l = o.distanceToPoint(this.a), g = o.distanceToPoint(this.b), v = o.distanceToPoint(this.c);
|
|
847
847
|
z(l) && (l = 0), z(g) && (g = 0), z(v) && (v = 0);
|
|
848
848
|
let y = l * g, b = l * v;
|
|
849
849
|
if (y > 0 && b > 0) return !1;
|
|
850
|
-
let S = a.distanceToPoint(
|
|
850
|
+
let S = a.distanceToPoint(t.a), C = a.distanceToPoint(t.b), w = a.distanceToPoint(t.c);
|
|
851
851
|
z(S) && (S = 0), z(C) && (C = 0), z(w) && (w = 0);
|
|
852
852
|
let T = S * C, E = S * w;
|
|
853
853
|
if (T > 0 && E > 0) return !1;
|
|
854
854
|
s.copy(a.normal), c.copy(o.normal);
|
|
855
855
|
let D = s.cross(c), O = 0, k = Math.abs(D.x), A = Math.abs(D.y);
|
|
856
856
|
A > k && (k = A, O = 1), Math.abs(D.z) > k && (O = 2);
|
|
857
|
-
let j = qe[O], ee = this.a[j], M = this.b[j], te = this.c[j], ne =
|
|
858
|
-
if (_(this, ee, M, te, y, b, l, g, v, p, u) || _(
|
|
857
|
+
let j = qe[O], ee = this.a[j], M = this.b[j], te = this.c[j], ne = t.a[j], re = t.b[j], ie = t.c[j];
|
|
858
|
+
if (_(this, ee, M, te, y, b, l, g, v, p, u) || _(t, ne, re, ie, T, E, S, C, w, m, d)) return h(this, t, n, r);
|
|
859
859
|
if (p.y < p.x) {
|
|
860
860
|
let e = p.y;
|
|
861
861
|
p.y = p.x, p.x = e, f.copy(u.start), u.start.copy(u.end), u.end.copy(f);
|
|
@@ -864,37 +864,37 @@ B.prototype.closestPointToSegment = (function() {
|
|
|
864
864
|
let e = m.y;
|
|
865
865
|
m.y = m.x, m.x = e, f.copy(d.start), d.start.copy(d.end), d.end.copy(f);
|
|
866
866
|
}
|
|
867
|
-
return p.y < m.x || m.y < p.x ? !1 : (
|
|
867
|
+
return p.y < m.x || m.y < p.x ? !1 : (n && (m.x > p.x ? n.start.copy(d.start) : n.start.copy(u.start), m.y < p.y ? n.end.copy(d.end) : n.end.copy(u.end)), !0);
|
|
868
868
|
};
|
|
869
869
|
})(), B.prototype.distanceToPoint = (function() {
|
|
870
|
-
let e = /* @__PURE__ */ new
|
|
870
|
+
let e = /* @__PURE__ */ new n();
|
|
871
871
|
return function(t) {
|
|
872
872
|
return this.closestPointToPoint(t, e), t.distanceTo(e);
|
|
873
873
|
};
|
|
874
874
|
})(), B.prototype.distanceToTriangle = (function() {
|
|
875
|
-
let
|
|
875
|
+
let e = /* @__PURE__ */ new n(), t = /* @__PURE__ */ new n(), r = [
|
|
876
876
|
"a",
|
|
877
877
|
"b",
|
|
878
878
|
"c"
|
|
879
|
-
], a = /* @__PURE__ */ new
|
|
880
|
-
return function(
|
|
881
|
-
let c =
|
|
882
|
-
if (this.intersectsTriangle(
|
|
879
|
+
], a = /* @__PURE__ */ new i(), o = /* @__PURE__ */ new i();
|
|
880
|
+
return function(n, i = null, s = null) {
|
|
881
|
+
let c = i || s ? a : null;
|
|
882
|
+
if (this.intersectsTriangle(n, c, !0)) return (i || s) && (i && c.getCenter(i), s && c.getCenter(s)), 0;
|
|
883
883
|
let l = Infinity;
|
|
884
|
-
for (let
|
|
885
|
-
let a, o =
|
|
886
|
-
this.closestPointToPoint(c,
|
|
884
|
+
for (let t = 0; t < 3; t++) {
|
|
885
|
+
let a, o = r[t], c = n[o];
|
|
886
|
+
this.closestPointToPoint(c, e), a = c.distanceToSquared(e), a < l && (l = a, i && i.copy(e), s && s.copy(c));
|
|
887
887
|
let u = this[o];
|
|
888
|
-
|
|
888
|
+
n.closestPointToPoint(u, e), a = u.distanceToSquared(e), a < l && (l = a, i && i.copy(u), s && s.copy(e));
|
|
889
889
|
}
|
|
890
890
|
for (let c = 0; c < 3; c++) {
|
|
891
|
-
let u =
|
|
891
|
+
let u = r[c], d = r[(c + 1) % 3];
|
|
892
892
|
a.set(this[u], this[d]);
|
|
893
893
|
for (let c = 0; c < 3; c++) {
|
|
894
|
-
let u =
|
|
895
|
-
o.set(
|
|
896
|
-
let f =
|
|
897
|
-
f < l && (l = f,
|
|
894
|
+
let u = r[c], d = r[(c + 1) % 3];
|
|
895
|
+
o.set(n[u], n[d]), Ge(a, o, e, t);
|
|
896
|
+
let f = e.distanceToSquared(t);
|
|
897
|
+
f < l && (l = f, i && i.copy(e), s && s.copy(t));
|
|
898
898
|
}
|
|
899
899
|
}
|
|
900
900
|
return Math.sqrt(l);
|
|
@@ -903,12 +903,12 @@ B.prototype.closestPointToSegment = (function() {
|
|
|
903
903
|
//#endregion
|
|
904
904
|
//#region ../../node_modules/three-mesh-bvh/src/math/OrientedBox.js
|
|
905
905
|
var V = class {
|
|
906
|
-
constructor(e,
|
|
907
|
-
this.isOrientedBox = !0, this.min = new
|
|
906
|
+
constructor(e, t, r) {
|
|
907
|
+
this.isOrientedBox = !0, this.min = new n(), this.max = new n(), this.matrix = new a(), this.invMatrix = new a(), this.points = Array(8).fill().map(() => new n()), this.satAxes = [
|
|
908
908
|
,
|
|
909
909
|
,
|
|
910
910
|
,
|
|
911
|
-
].fill().map(() => new
|
|
911
|
+
].fill().map(() => new n()), this.satBounds = [
|
|
912
912
|
,
|
|
913
913
|
,
|
|
914
914
|
,
|
|
@@ -916,7 +916,7 @@ var V = class {
|
|
|
916
916
|
,
|
|
917
917
|
,
|
|
918
918
|
,
|
|
919
|
-
].fill().map(() => new L()), this.needsUpdate = !1, e && this.min.copy(e),
|
|
919
|
+
].fill().map(() => new L()), this.needsUpdate = !1, e && this.min.copy(e), t && this.max.copy(t), r && this.matrix.copy(r);
|
|
920
920
|
}
|
|
921
921
|
set(e, t, n) {
|
|
922
922
|
this.min.copy(e), this.max.copy(t), this.matrix.copy(n), this.needsUpdate = !0;
|
|
@@ -953,29 +953,29 @@ V.prototype.update = (function() {
|
|
|
953
953
|
return !0;
|
|
954
954
|
};
|
|
955
955
|
})(), V.prototype.intersectsTriangle = (function() {
|
|
956
|
-
let e = /* @__PURE__ */ new B(),
|
|
956
|
+
let e = /* @__PURE__ */ new B(), t = [
|
|
957
957
|
,
|
|
958
958
|
,
|
|
959
959
|
,
|
|
960
|
-
], r = /* @__PURE__ */ new L(), i = /* @__PURE__ */ new L(), a = /* @__PURE__ */ new
|
|
961
|
-
return function(
|
|
962
|
-
this.needsUpdate && this.update(),
|
|
960
|
+
], r = /* @__PURE__ */ new L(), i = /* @__PURE__ */ new L(), a = /* @__PURE__ */ new n();
|
|
961
|
+
return function(n) {
|
|
962
|
+
this.needsUpdate && this.update(), n.isExtendedTriangle ? n.needsUpdate && n.update() : (e.copy(n), e.update(), n = e);
|
|
963
963
|
let o = this.satBounds, s = this.satAxes;
|
|
964
|
-
|
|
964
|
+
t[0] = n.a, t[1] = n.b, t[2] = n.c;
|
|
965
965
|
for (let e = 0; e < 3; e++) {
|
|
966
|
-
let
|
|
967
|
-
if (r.setFromPoints(i,
|
|
966
|
+
let n = o[e], i = s[e];
|
|
967
|
+
if (r.setFromPoints(i, t), n.isSeparated(r)) return !1;
|
|
968
968
|
}
|
|
969
|
-
let c =
|
|
969
|
+
let c = n.satBounds, l = n.satAxes, u = this.points;
|
|
970
970
|
for (let e = 0; e < 3; e++) {
|
|
971
971
|
let t = c[e], n = l[e];
|
|
972
972
|
if (r.setFromPoints(n, u), t.isSeparated(r)) return !1;
|
|
973
973
|
}
|
|
974
974
|
for (let e = 0; e < 3; e++) {
|
|
975
|
-
let
|
|
975
|
+
let n = s[e];
|
|
976
976
|
for (let e = 0; e < 4; e++) {
|
|
977
977
|
let o = l[e];
|
|
978
|
-
if (a.crossVectors(
|
|
978
|
+
if (a.crossVectors(n, o), r.setFromPoints(a, t), i.setFromPoints(a, u), r.isSeparated(i)) return !1;
|
|
979
979
|
}
|
|
980
980
|
}
|
|
981
981
|
return !0;
|
|
@@ -985,19 +985,19 @@ V.prototype.update = (function() {
|
|
|
985
985
|
return this.needsUpdate && this.update(), t.copy(e).applyMatrix4(this.invMatrix).clamp(this.min, this.max).applyMatrix4(this.matrix), t;
|
|
986
986
|
};
|
|
987
987
|
})(), V.prototype.distanceToPoint = (function() {
|
|
988
|
-
let e = new
|
|
988
|
+
let e = new n();
|
|
989
989
|
return function(t) {
|
|
990
990
|
return this.closestPointToPoint(t, e), t.distanceTo(e);
|
|
991
991
|
};
|
|
992
992
|
})(), V.prototype.distanceToBox = (function() {
|
|
993
|
-
let
|
|
993
|
+
let e = [
|
|
994
994
|
"x",
|
|
995
995
|
"y",
|
|
996
996
|
"z"
|
|
997
|
-
],
|
|
998
|
-
return function(
|
|
999
|
-
if (this.needsUpdate && this.update(), this.intersectsBox(
|
|
1000
|
-
let l =
|
|
997
|
+
], t = /* @__PURE__ */ Array(12).fill().map(() => new i()), r = /* @__PURE__ */ Array(12).fill().map(() => new i()), a = /* @__PURE__ */ new n(), o = /* @__PURE__ */ new n();
|
|
998
|
+
return function(n, i = 0, s = null, c = null) {
|
|
999
|
+
if (this.needsUpdate && this.update(), this.intersectsBox(n)) return (s || c) && (n.getCenter(o), this.closestPointToPoint(o, a), n.closestPointToPoint(a, o), s && s.copy(a), c && c.copy(o)), 0;
|
|
1000
|
+
let l = i * i, u = n.min, d = n.max, f = this.points, p = Infinity;
|
|
1001
1001
|
for (let e = 0; e < 8; e++) {
|
|
1002
1002
|
let t = f[e];
|
|
1003
1003
|
o.copy(t).clamp(u, d);
|
|
@@ -1005,11 +1005,11 @@ V.prototype.update = (function() {
|
|
|
1005
1005
|
if (n < p && (p = n, s && s.copy(t), c && c.copy(o), n < l)) return Math.sqrt(n);
|
|
1006
1006
|
}
|
|
1007
1007
|
let m = 0;
|
|
1008
|
-
for (let
|
|
1009
|
-
let o = (
|
|
1010
|
-
|
|
1011
|
-
let g = n
|
|
1012
|
-
b[g] = u[g], b[_] =
|
|
1008
|
+
for (let n = 0; n < 3; n++) for (let i = 0; i <= 1; i++) for (let a = 0; a <= 1; a++) {
|
|
1009
|
+
let o = (n + 1) % 3, s = (n + 2) % 3, c = i << o | a << s, l = 1 << n | i << o | a << s, p = f[c], h = f[l];
|
|
1010
|
+
t[m].set(p, h);
|
|
1011
|
+
let g = e[n], _ = e[o], v = e[s], y = r[m], b = y.start, x = y.end;
|
|
1012
|
+
b[g] = u[g], b[_] = i ? u[_] : d[_], b[v] = a ? u[v] : d[_], x[g] = d[g], x[_] = i ? u[_] : d[_], x[v] = a ? u[v] : d[_], m++;
|
|
1013
1013
|
}
|
|
1014
1014
|
for (let e = 0; e <= 1; e++) for (let t = 0; t <= 1; t++) for (let n = 0; n <= 1; n++) {
|
|
1015
1015
|
o.x = e ? d.x : u.x, o.y = t ? d.y : u.y, o.z = n ? d.z : u.z, this.closestPointToPoint(o, a);
|
|
@@ -1017,12 +1017,12 @@ V.prototype.update = (function() {
|
|
|
1017
1017
|
if (r < p && (p = r, s && s.copy(a), c && c.copy(o), r < l)) return Math.sqrt(r);
|
|
1018
1018
|
}
|
|
1019
1019
|
for (let e = 0; e < 12; e++) {
|
|
1020
|
-
let
|
|
1020
|
+
let n = t[e];
|
|
1021
1021
|
for (let e = 0; e < 12; e++) {
|
|
1022
|
-
let
|
|
1023
|
-
Ge(
|
|
1024
|
-
let
|
|
1025
|
-
if (
|
|
1022
|
+
let t = r[e];
|
|
1023
|
+
Ge(n, t, a, o);
|
|
1024
|
+
let i = a.distanceToSquared(o);
|
|
1025
|
+
if (i < p && (p = i, s && s.copy(a), c && c.copy(o), i < l)) return Math.sqrt(i);
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
1028
|
return Math.sqrt(p);
|
|
@@ -1032,7 +1032,7 @@ var H = /* @__PURE__ */ new class extends ge {
|
|
|
1032
1032
|
constructor() {
|
|
1033
1033
|
super(() => new B());
|
|
1034
1034
|
}
|
|
1035
|
-
}(), Ye = /* @__PURE__ */ new
|
|
1035
|
+
}(), Ye = /* @__PURE__ */ new n(), Xe = /* @__PURE__ */ new n();
|
|
1036
1036
|
function Ze(e, t, n = {}, r = 0, i = Infinity) {
|
|
1037
1037
|
let a = r * r, o = i * i, s = Infinity, c = null;
|
|
1038
1038
|
if (e.shapecast({
|
|
@@ -1049,7 +1049,7 @@ function Ze(e, t, n = {}, r = 0, i = Infinity) {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
//#endregion
|
|
1051
1051
|
//#region ../../node_modules/three-mesh-bvh/src/utils/ThreeRayIntersectUtilities.js
|
|
1052
|
-
var Qe = !0, $e = !1, U = /* @__PURE__ */ new
|
|
1052
|
+
var Qe = !0, $e = !1, U = /* @__PURE__ */ new n(), W = /* @__PURE__ */ new n(), G = /* @__PURE__ */ new n(), et = /* @__PURE__ */ new r(), tt = /* @__PURE__ */ new r(), nt = /* @__PURE__ */ new r(), rt = /* @__PURE__ */ new n(), it = /* @__PURE__ */ new n(), at = /* @__PURE__ */ new n(), ot = /* @__PURE__ */ new n();
|
|
1053
1053
|
function st(e, t, n, r, i, a, o, s) {
|
|
1054
1054
|
let c;
|
|
1055
1055
|
if (c = a === 1 ? e.intersectTriangle(r, n, t, !0, i) : e.intersectTriangle(t, n, r, a !== 2, i), c === null) return null;
|
|
@@ -1059,34 +1059,34 @@ function st(e, t, n, r, i, a, o, s) {
|
|
|
1059
1059
|
point: i.clone()
|
|
1060
1060
|
};
|
|
1061
1061
|
}
|
|
1062
|
-
function ct(e,
|
|
1063
|
-
U.fromBufferAttribute(
|
|
1062
|
+
function ct(e, t, i, a, o, s, c, l, u, f, p) {
|
|
1063
|
+
U.fromBufferAttribute(t, s), W.fromBufferAttribute(t, c), G.fromBufferAttribute(t, l);
|
|
1064
1064
|
let m = st(e, U, W, G, ot, u, f, p);
|
|
1065
1065
|
if (m) {
|
|
1066
1066
|
if (a) {
|
|
1067
|
-
et.fromBufferAttribute(a, s), tt.fromBufferAttribute(a, c), nt.fromBufferAttribute(a, l), m.uv = new
|
|
1067
|
+
et.fromBufferAttribute(a, s), tt.fromBufferAttribute(a, c), nt.fromBufferAttribute(a, l), m.uv = new r();
|
|
1068
1068
|
let e = d.getInterpolation(ot, U, W, G, et, tt, nt, m.uv);
|
|
1069
1069
|
Qe || (m.uv = e);
|
|
1070
1070
|
}
|
|
1071
1071
|
if (o) {
|
|
1072
|
-
et.fromBufferAttribute(o, s), tt.fromBufferAttribute(o, c), nt.fromBufferAttribute(o, l), m.uv1 = new
|
|
1072
|
+
et.fromBufferAttribute(o, s), tt.fromBufferAttribute(o, c), nt.fromBufferAttribute(o, l), m.uv1 = new r();
|
|
1073
1073
|
let e = d.getInterpolation(ot, U, W, G, et, tt, nt, m.uv1);
|
|
1074
1074
|
Qe || (m.uv1 = e), $e && (m.uv2 = m.uv1);
|
|
1075
1075
|
}
|
|
1076
|
-
if (
|
|
1077
|
-
rt.fromBufferAttribute(
|
|
1078
|
-
let
|
|
1079
|
-
m.normal.dot(e.direction) > 0 && m.normal.multiplyScalar(-1), Qe || (m.normal =
|
|
1076
|
+
if (i) {
|
|
1077
|
+
rt.fromBufferAttribute(i, s), it.fromBufferAttribute(i, c), at.fromBufferAttribute(i, l), m.normal = new n();
|
|
1078
|
+
let t = d.getInterpolation(ot, U, W, G, rt, it, at, m.normal);
|
|
1079
|
+
m.normal.dot(e.direction) > 0 && m.normal.multiplyScalar(-1), Qe || (m.normal = t);
|
|
1080
1080
|
}
|
|
1081
|
-
let
|
|
1081
|
+
let t = {
|
|
1082
1082
|
a: s,
|
|
1083
1083
|
b: c,
|
|
1084
1084
|
c: l,
|
|
1085
|
-
normal: new
|
|
1085
|
+
normal: new n(),
|
|
1086
1086
|
materialIndex: 0
|
|
1087
1087
|
};
|
|
1088
|
-
if (d.getNormal(U, W, G,
|
|
1089
|
-
let e = new
|
|
1088
|
+
if (d.getNormal(U, W, G, t.normal), m.face = t, m.faceIndex = s, Qe) {
|
|
1089
|
+
let e = new n();
|
|
1090
1090
|
d.getBarycoord(ot, U, W, G, e), m.barycoord = e;
|
|
1091
1091
|
}
|
|
1092
1092
|
}
|
|
@@ -1252,7 +1252,7 @@ function St(e, t, n, r, i, a) {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
//#endregion
|
|
1254
1254
|
//#region ../../node_modules/three-mesh-bvh/src/core/cast/intersectsGeometry.generated.js
|
|
1255
|
-
var Ct = /* @__PURE__ */ new
|
|
1255
|
+
var Ct = /* @__PURE__ */ new s(), wt = /* @__PURE__ */ new B(), Tt = /* @__PURE__ */ new B(), Et = /* @__PURE__ */ new a(), Dt = /* @__PURE__ */ new V(), Ot = /* @__PURE__ */ new V();
|
|
1256
1256
|
function kt(e, t, n, r) {
|
|
1257
1257
|
N.setBuffer(e._roots[t]);
|
|
1258
1258
|
let i = At(0, e, n, r);
|
|
@@ -1284,7 +1284,7 @@ function At(e, t, n, r, i = null) {
|
|
|
1284
1284
|
}
|
|
1285
1285
|
//#endregion
|
|
1286
1286
|
//#region ../../node_modules/three-mesh-bvh/src/core/cast/closestPointToGeometry.generated.js
|
|
1287
|
-
var jt = /* @__PURE__ */ new
|
|
1287
|
+
var jt = /* @__PURE__ */ new a(), Mt = /* @__PURE__ */ new V(), Nt = /* @__PURE__ */ new V(), Pt = /* @__PURE__ */ new n(), Ft = /* @__PURE__ */ new n(), It = /* @__PURE__ */ new n(), Lt = /* @__PURE__ */ new n();
|
|
1288
1288
|
function Rt(e, t, n, r = {}, i = {}, a = 0, o = Infinity) {
|
|
1289
1289
|
t.boundingBox || t.computeBoundingBox(), Mt.set(t.boundingBox.min, t.boundingBox.max, n), Mt.needsUpdate = !0;
|
|
1290
1290
|
let s = e.geometry, c = s.attributes.position, l = s.index, u = t.attributes.position, d = t.index, f = H.getPrimitive(), p = H.getPrimitive(), m = Pt, h = Ft, g = null, _ = null;
|
|
@@ -1407,7 +1407,7 @@ function Wt(e, t, n, r, i, a) {
|
|
|
1407
1407
|
}
|
|
1408
1408
|
//#endregion
|
|
1409
1409
|
//#region ../../node_modules/three-mesh-bvh/src/core/cast/intersectsGeometry_indirect.generated.js
|
|
1410
|
-
var Gt = /* @__PURE__ */ new
|
|
1410
|
+
var Gt = /* @__PURE__ */ new s(), Kt = /* @__PURE__ */ new B(), qt = /* @__PURE__ */ new B(), Jt = /* @__PURE__ */ new a(), Yt = /* @__PURE__ */ new V(), Xt = /* @__PURE__ */ new V();
|
|
1411
1411
|
function Zt(e, t, n, r) {
|
|
1412
1412
|
N.setBuffer(e._roots[t]);
|
|
1413
1413
|
let i = Qt(0, e, n, r);
|
|
@@ -1439,7 +1439,7 @@ function Qt(e, t, n, r, i = null) {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
//#endregion
|
|
1441
1441
|
//#region ../../node_modules/three-mesh-bvh/src/core/cast/closestPointToGeometry_indirect.generated.js
|
|
1442
|
-
var $t = /* @__PURE__ */ new
|
|
1442
|
+
var $t = /* @__PURE__ */ new a(), en = /* @__PURE__ */ new V(), tn = /* @__PURE__ */ new V(), nn = /* @__PURE__ */ new n(), rn = /* @__PURE__ */ new n(), an = /* @__PURE__ */ new n(), on = /* @__PURE__ */ new n();
|
|
1443
1443
|
function sn(e, t, n, r = {}, i = {}, a = 0, o = Infinity) {
|
|
1444
1444
|
t.boundingBox || t.computeBoundingBox(), en.set(t.boundingBox.min, t.boundingBox.max, n), en.needsUpdate = !0;
|
|
1445
1445
|
let s = e.geometry, c = s.attributes.position, l = s.index, u = t.attributes.position, d = t.index, f = H.getPrimitive(), p = H.getPrimitive(), m = nn, h = rn, g = null, _ = null;
|
|
@@ -1486,7 +1486,7 @@ function cn(e, t, n) {
|
|
|
1486
1486
|
}
|
|
1487
1487
|
//#endregion
|
|
1488
1488
|
//#region ../../node_modules/three-mesh-bvh/src/core/MeshBVH.js
|
|
1489
|
-
var ln = /* @__PURE__ */ new V(), un = /* @__PURE__ */ new
|
|
1489
|
+
var ln = /* @__PURE__ */ new V(), un = /* @__PURE__ */ new t(), dn = /* @__PURE__ */ new n(), fn = /* @__PURE__ */ new a(), pn = /* @__PURE__ */ new n(), mn = [
|
|
1490
1490
|
"getX",
|
|
1491
1491
|
"getY",
|
|
1492
1492
|
"getZ"
|
|
@@ -1519,7 +1519,7 @@ var ln = /* @__PURE__ */ new V(), un = /* @__PURE__ */ new n(), dn = /* @__PURE_
|
|
|
1519
1519
|
if (s._roots = a, s._indirectBuffer = o || null, r.setIndex) {
|
|
1520
1520
|
let e = n.getIndex();
|
|
1521
1521
|
if (e === null) {
|
|
1522
|
-
let e = new
|
|
1522
|
+
let e = new u(t.index, 1, !1);
|
|
1523
1523
|
n.setIndex(e);
|
|
1524
1524
|
} else e.array !== i && (e.array.set(i), e.needsUpdate = !0);
|
|
1525
1525
|
}
|
|
@@ -1679,19 +1679,19 @@ var ln = /* @__PURE__ */ new V(), un = /* @__PURE__ */ new n(), dn = /* @__PURE_
|
|
|
1679
1679
|
closestPointToPoint(e, t = {}, n = 0, r = Infinity) {
|
|
1680
1680
|
return Ze(this, e, t, n, r);
|
|
1681
1681
|
}
|
|
1682
|
-
}, J = /* @__PURE__ */ new
|
|
1682
|
+
}, J = /* @__PURE__ */ new c(), Y = /* @__PURE__ */ new a(), gn = /* @__PURE__ */ new a(), _n = /* @__PURE__ */ new s(), vn = /* @__PURE__ */ new o(), X = /* @__PURE__ */ new n(), yn = /* @__PURE__ */ new t(), Z = /* @__PURE__ */ new l(), bn = {}, xn = class extends Ne {
|
|
1683
1683
|
constructor(e, t = {}) {
|
|
1684
1684
|
t = {
|
|
1685
1685
|
precise: !1,
|
|
1686
1686
|
includeInstances: !0,
|
|
1687
|
-
matrixWorld: Array.isArray(e) ? new
|
|
1687
|
+
matrixWorld: Array.isArray(e) ? new a() : e.matrixWorld,
|
|
1688
1688
|
targetLeafSize: 1,
|
|
1689
1689
|
...t
|
|
1690
1690
|
}, super();
|
|
1691
1691
|
let n = /* @__PURE__ */ new Set();
|
|
1692
1692
|
wn(e, n);
|
|
1693
|
-
let r = Array.from(n), i = Math.ceil(Math.log2(r.length)),
|
|
1694
|
-
this.objects = r, this.idBits = i, this.idMask =
|
|
1693
|
+
let r = Array.from(n), i = Math.ceil(Math.log2(r.length)), o = (1 << i) - 1;
|
|
1694
|
+
this.objects = r, this.idBits = i, this.idMask = o, this.primitiveBuffer = null, this.primitiveBufferStride = 1, this.precise = t.precise, this.includeInstances = t.includeInstances, this.matrixWorld = t.matrixWorld, this.init(t);
|
|
1695
1695
|
}
|
|
1696
1696
|
getObjectFromId(e) {
|
|
1697
1697
|
let { idMask: t, objects: n } = this;
|
|
@@ -1835,11 +1835,11 @@ function Dn(e, t) {
|
|
|
1835
1835
|
}
|
|
1836
1836
|
//#endregion
|
|
1837
1837
|
//#region ../../node_modules/three-mesh-bvh/src/core/SkinnedMeshBVH.js
|
|
1838
|
-
var On = /* @__PURE__ */ new
|
|
1838
|
+
var On = /* @__PURE__ */ new n(), kn = /* @__PURE__ */ new n(), An = /* @__PURE__ */ new n(), Q = /* @__PURE__ */ new t(), jn = /* @__PURE__ */ new a(), $ = /* @__PURE__ */ new n(), Mn = /* @__PURE__ */ new n(), Nn = [
|
|
1839
1839
|
"x",
|
|
1840
1840
|
"y",
|
|
1841
1841
|
"z"
|
|
1842
|
-
], Pn = !0, Fn = !1, In = /* @__PURE__ */ new
|
|
1842
|
+
], Pn = !0, Fn = !1, In = /* @__PURE__ */ new r(), Ln = /* @__PURE__ */ new r(), Rn = /* @__PURE__ */ new r(), zn = /* @__PURE__ */ new n(), Bn = /* @__PURE__ */ new n(), Vn = /* @__PURE__ */ new n(), Hn = class extends Ue {
|
|
1843
1843
|
get primitiveStride() {
|
|
1844
1844
|
return 3;
|
|
1845
1845
|
}
|
|
@@ -1870,29 +1870,29 @@ var On = /* @__PURE__ */ new t(), kn = /* @__PURE__ */ new t(), An = /* @__PURE_
|
|
|
1870
1870
|
iterate: Un
|
|
1871
1871
|
});
|
|
1872
1872
|
}
|
|
1873
|
-
raycastObject3D(e,
|
|
1873
|
+
raycastObject3D(e, t, i = []) {
|
|
1874
1874
|
let { material: a } = e;
|
|
1875
1875
|
if (a === void 0) return;
|
|
1876
|
-
let { matrixWorld: o } = e, { firstHitOnly: s } =
|
|
1877
|
-
jn.copy(o).invert(), Q.copy(
|
|
1876
|
+
let { matrixWorld: o } = e, { firstHitOnly: s } = t;
|
|
1877
|
+
jn.copy(o).invert(), Q.copy(t.ray).applyMatrix4(jn);
|
|
1878
1878
|
let c = null, l = Infinity;
|
|
1879
1879
|
return this.shapecast({
|
|
1880
1880
|
boundsTraverseOrder: (e) => e.distanceToPoint(Q.origin),
|
|
1881
1881
|
intersectsBounds: (e) => {
|
|
1882
1882
|
if (s) {
|
|
1883
1883
|
if (!Q.intersectBox(e, Mn)) return 0;
|
|
1884
|
-
let
|
|
1885
|
-
return e.containsPoint(Q.origin) ?
|
|
1884
|
+
let n;
|
|
1885
|
+
return e.containsPoint(Q.origin) ? n = 0 : (Mn.applyMatrix4(o), n = t.ray.origin.distanceTo(Mn)), n < l ? 1 : 0;
|
|
1886
1886
|
} else return Q.intersectsBox(e) ? 1 : 0;
|
|
1887
1887
|
},
|
|
1888
1888
|
intersectsTriangle: (u, f) => {
|
|
1889
1889
|
let p = null;
|
|
1890
1890
|
if (p = a.side === 0 ? Q.intersectTriangle(u.a, u.b, u.c, !0, $) : a.side === 1 ? Q.intersectTriangle(u.c, u.b, u.a, !0, $) : Q.intersectTriangle(u.a, u.b, u.c, !1, $), !p) return;
|
|
1891
1891
|
p = p.clone().applyMatrix4(o);
|
|
1892
|
-
let m =
|
|
1893
|
-
if (m >=
|
|
1892
|
+
let m = t.ray.origin.distanceTo(p);
|
|
1893
|
+
if (m >= t.near && m <= t.far) {
|
|
1894
1894
|
if (s && m >= l) return;
|
|
1895
|
-
let { geometry:
|
|
1895
|
+
let { geometry: t } = this, { index: a } = t, o = this.resolvePrimitiveIndex(f), h = o * 3, g = h + 0, _ = h + 1, v = h + 2;
|
|
1896
1896
|
a && (g = a.array[g], _ = a.array[_], v = a.array[v]);
|
|
1897
1897
|
let y = {
|
|
1898
1898
|
distance: m,
|
|
@@ -1905,35 +1905,35 @@ var On = /* @__PURE__ */ new t(), kn = /* @__PURE__ */ new t(), An = /* @__PURE_
|
|
|
1905
1905
|
a: g,
|
|
1906
1906
|
b: _,
|
|
1907
1907
|
c: v,
|
|
1908
|
-
normal: d.getNormal(u.a, u.b, u.c, new
|
|
1908
|
+
normal: d.getNormal(u.a, u.b, u.c, new n()),
|
|
1909
1909
|
materialIndex: 0
|
|
1910
1910
|
},
|
|
1911
1911
|
faceIndex: o
|
|
1912
1912
|
};
|
|
1913
1913
|
if (Pn) {
|
|
1914
|
-
let e = new
|
|
1914
|
+
let e = new n();
|
|
1915
1915
|
d.getBarycoord($, u.a, u.b, u.c, e), y.barycoord = e;
|
|
1916
1916
|
}
|
|
1917
|
-
let b =
|
|
1917
|
+
let b = t.attributes.uv, x = t.attributes.uv1, S = t.attributes.normal;
|
|
1918
1918
|
if (b) {
|
|
1919
|
-
In.fromBufferAttribute(b, g), Ln.fromBufferAttribute(b, _), Rn.fromBufferAttribute(b, v), y.uv = new
|
|
1919
|
+
In.fromBufferAttribute(b, g), Ln.fromBufferAttribute(b, _), Rn.fromBufferAttribute(b, v), y.uv = new r();
|
|
1920
1920
|
let e = d.getInterpolation($, u.a, u.b, u.c, In, Ln, Rn, y.uv);
|
|
1921
1921
|
Pn || (y.uv = e);
|
|
1922
1922
|
}
|
|
1923
1923
|
if (x) {
|
|
1924
|
-
In.fromBufferAttribute(x, g), Ln.fromBufferAttribute(x, _), Rn.fromBufferAttribute(x, v), y.uv1 = new
|
|
1924
|
+
In.fromBufferAttribute(x, g), Ln.fromBufferAttribute(x, _), Rn.fromBufferAttribute(x, v), y.uv1 = new r();
|
|
1925
1925
|
let e = d.getInterpolation($, u.a, u.b, u.c, In, Ln, Rn, y.uv1);
|
|
1926
1926
|
Pn || (y.uv1 = e), Fn && (y.uv2 = y.uv1);
|
|
1927
1927
|
}
|
|
1928
1928
|
if (S) {
|
|
1929
|
-
zn.fromBufferAttribute(S, g), Bn.fromBufferAttribute(S, _), Vn.fromBufferAttribute(S, v), y.normal = new
|
|
1929
|
+
zn.fromBufferAttribute(S, g), Bn.fromBufferAttribute(S, _), Vn.fromBufferAttribute(S, v), y.normal = new n();
|
|
1930
1930
|
let e = d.getInterpolation($, u.a, u.b, u.c, zn, Bn, Vn, y.normal);
|
|
1931
1931
|
y.normal.dot(Q.direction) > 0 && y.normal.multiplyScalar(-1), Pn || (y.normal = e);
|
|
1932
1932
|
}
|
|
1933
|
-
l = y.distance, c = y, s ||
|
|
1933
|
+
l = y.distance, c = y, s || i.push(y);
|
|
1934
1934
|
}
|
|
1935
1935
|
}
|
|
1936
|
-
}), s && c &&
|
|
1936
|
+
}), s && c && i.push(c), i;
|
|
1937
1937
|
}
|
|
1938
1938
|
};
|
|
1939
1939
|
function Un(e, t, n, r, i, a, o) {
|
|
@@ -1947,4 +1947,4 @@ function Un(e, t, n, r, i, a, o) {
|
|
|
1947
1947
|
//#endregion
|
|
1948
1948
|
export { B as a, Ne as c, V as i, p as l, xn as n, Ue as o, hn as r, He as s, Hn as t, h as u };
|
|
1949
1949
|
|
|
1950
|
-
//# sourceMappingURL=src-
|
|
1950
|
+
//# sourceMappingURL=src-Dg0wYIom.mjs.map
|