@roomle/web-sdk 5.1.0-alpha.4 → 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.
Files changed (132) hide show
  1. package/lib/{BufferGeometry-Bl5whHAB.mjs → BufferGeometry-CxlpBjLq.mjs} +192 -195
  2. package/lib/BufferGeometry-CxlpBjLq.mjs.map +1 -0
  3. package/lib/ConfiguratorKernel.wasm +0 -0
  4. package/lib/{GLTFExporter-yQ7mMauu.mjs → GLTFExporter-DeNw0qAI.mjs} +86 -80
  5. package/lib/GLTFExporter-DeNw0qAI.mjs.map +1 -0
  6. package/lib/GaussianBlurNode-BR1cKBsX.mjs +65 -0
  7. package/lib/GaussianBlurNode-BR1cKBsX.mjs.map +1 -0
  8. package/lib/{Object3D-BHdngbxB.mjs → Object3D-CALIQdg1.mjs} +142 -59
  9. package/lib/Object3D-CALIQdg1.mjs.map +1 -0
  10. package/lib/{Pass-DLiMLT5k.mjs → Pass-DCljS3Z-.mjs} +4 -4
  11. package/lib/{Pass-DLiMLT5k.mjs.map → Pass-DCljS3Z-.mjs.map} +1 -1
  12. package/lib/{PointLightHelper-CuPSBuDU.mjs → PointLightHelper-C_0CYp7R.mjs} +35 -32
  13. package/lib/PointLightHelper-C_0CYp7R.mjs.map +1 -0
  14. package/lib/RoomleCore.wasm +0 -0
  15. package/lib/RoomleToolsCore.wasm +0 -0
  16. package/lib/{SpotLightHelper-m-Rh8vGU.mjs → SpotLightHelper-UUIHn43T.mjs} +22 -19
  17. package/lib/SpotLightHelper-UUIHn43T.mjs.map +1 -0
  18. package/lib/{USDZExporter-MdkuT226.mjs → USDZExporter-BBNw7Hey.mjs} +6 -3
  19. package/lib/USDZExporter-BBNw7Hey.mjs.map +1 -0
  20. package/lib/{Vector4-C7TlIAyy.mjs → Vector4-BOcWTZJI.mjs} +2 -2
  21. package/lib/Vector4-BOcWTZJI.mjs.map +1 -0
  22. package/lib/{api-Bznmr-xZ.mjs → api-CwEjmjrn.mjs} +2 -2
  23. package/lib/{api-Bznmr-xZ.mjs.map → api-CwEjmjrn.mjs.map} +1 -1
  24. package/lib/{banana-for-scale-DpKXNBt_.mjs → banana-for-scale-Cf41yXTl.mjs} +3 -3
  25. package/lib/{banana-for-scale-DpKXNBt_.mjs.map → banana-for-scale-Cf41yXTl.mjs.map} +1 -1
  26. package/lib/{common-utils-DbL4tku0.mjs → common-utils-OTJQGohe.mjs} +3 -3
  27. package/lib/common-utils-OTJQGohe.mjs.map +1 -0
  28. package/lib/{component-dimensioning-BaUqwqYJ.mjs → component-dimensioning-yPK46Y5o.mjs} +26 -26
  29. package/lib/{component-dimensioning-BaUqwqYJ.mjs.map → component-dimensioning-yPK46Y5o.mjs.map} +1 -1
  30. package/lib/{component-raycast-helper-4i8b4E5B.mjs → component-raycast-helper-CnpnRaFg.mjs} +15 -15
  31. package/lib/{component-raycast-helper-4i8b4E5B.mjs.map → component-raycast-helper-CnpnRaFg.mjs.map} +1 -1
  32. package/lib/{configurator-CDw_c6tB.mjs → configurator-iYlO_buA.mjs} +4 -4
  33. package/lib/{configurator-CDw_c6tB.mjs.map → configurator-iYlO_buA.mjs.map} +1 -1
  34. package/lib/configurator-y7zIaUe_.mjs +2 -0
  35. package/lib/{continuous-drawing-helper-DqHIR_qF.mjs → continuous-drawing-helper-CTfGRTfH.mjs} +3 -3
  36. package/lib/{continuous-drawing-helper-DqHIR_qF.mjs.map → continuous-drawing-helper-CTfGRTfH.mjs.map} +1 -1
  37. package/lib/dimensioning-helper-CQlesi-m.mjs +2 -0
  38. package/lib/{dimensioning-helper-CGPjS2hW.mjs → dimensioning-helper-DSlkLDmx.mjs} +42 -36
  39. package/lib/dimensioning-helper-DSlkLDmx.mjs.map +1 -0
  40. package/lib/{glb-viewer-B-Zr743e.mjs → glb-viewer-AGV-_xKd.mjs} +33 -33
  41. package/lib/{glb-viewer-B-Zr743e.mjs.map → glb-viewer-AGV-_xKd.mjs.map} +1 -1
  42. package/lib/glb-viewer-DSzNR4CI.mjs +2 -0
  43. package/lib/{highlight-coordinator-4gkjde82.mjs → highlight-coordinator-DU6oFunq.mjs} +6 -6
  44. package/lib/{highlight-coordinator-4gkjde82.mjs.map → highlight-coordinator-DU6oFunq.mjs.map} +1 -1
  45. package/lib/{homag-intelligence-D7S7r-Gc.mjs → homag-intelligence-D_yBv0ig.mjs} +3 -3
  46. package/lib/{homag-intelligence-D7S7r-Gc.mjs.map → homag-intelligence-D_yBv0ig.mjs.map} +1 -1
  47. package/lib/{hosek-wilkie-sky-iMar2iw-.mjs → hosek-wilkie-sky-DmTvnxMA.mjs} +33 -33
  48. package/lib/{hosek-wilkie-sky-iMar2iw-.mjs.map → hosek-wilkie-sky-DmTvnxMA.mjs.map} +1 -1
  49. package/lib/{imos-ix-poc-export-helper-CyGqK7nu.mjs → imos-ix-poc-export-helper-BGN97m8W.mjs} +3 -3
  50. package/lib/{imos-ix-poc-export-helper-CyGqK7nu.mjs.map → imos-ix-poc-export-helper-BGN97m8W.mjs.map} +1 -1
  51. package/lib/{kernel-utils-BvatnA7U.mjs → kernel-utils-BYKmP0mf.mjs} +13 -13
  52. package/lib/{kernel-utils-BvatnA7U.mjs.map → kernel-utils-BYKmP0mf.mjs.map} +1 -1
  53. package/lib/{material-viewer-CTsSfTfL.mjs → material-viewer-BuBSXGw6.mjs} +18 -18
  54. package/lib/{material-viewer-CTsSfTfL.mjs.map → material-viewer-BuBSXGw6.mjs.map} +1 -1
  55. package/lib/{packages-BXAZEcKa.mjs → packages-CduZDHYG.mjs} +5 -5
  56. package/lib/{packages-BXAZEcKa.mjs.map → packages-CduZDHYG.mjs.map} +1 -1
  57. package/lib/planner-B-SWR4R8.mjs +2 -0
  58. package/lib/{planner-jvLAnYww.mjs → planner-BuBkFbra.mjs} +3 -3
  59. package/lib/{planner-jvLAnYww.mjs.map → planner-BuBkFbra.mjs.map} +1 -1
  60. package/lib/{plugin-system-CRaC04G5.mjs → plugin-system-CPf99Zkf.mjs} +2 -2
  61. package/lib/{plugin-system-CRaC04G5.mjs.map → plugin-system-CPf99Zkf.mjs.map} +1 -1
  62. package/lib/{render-cache-DCPIQbO1.mjs → render-cache-CPppt7Rd.mjs} +5 -5
  63. package/lib/{render-cache-DCPIQbO1.mjs.map → render-cache-CPppt7Rd.mjs.map} +1 -1
  64. package/lib/{render-order-BPF2wDMw.mjs → render-order-a0QAbB7Q.mjs} +2 -2
  65. package/lib/{render-order-BPF2wDMw.mjs.map → render-order-a0QAbB7Q.mjs.map} +1 -1
  66. package/lib/roomle-headless.d.ts +0 -2
  67. package/lib/roomle-headless.js +14 -14
  68. package/lib/{roomle-renderer-Ato6RMrd.mjs → roomle-renderer-UJINLYxS.mjs} +2 -2
  69. package/lib/{roomle-renderer-Ato6RMrd.mjs.map → roomle-renderer-UJINLYxS.mjs.map} +1 -1
  70. package/lib/{roomle-sdk-CBwhwX_e.mjs → roomle-sdk-CcNdTp_n.mjs} +1844 -1889
  71. package/lib/roomle-sdk-CcNdTp_n.mjs.map +1 -0
  72. package/lib/roomle-sdk.d.ts +0 -2
  73. package/lib/roomle-sdk.js +7 -7
  74. package/lib/{roomle-webgpu-renderer-BfZKcXSz.mjs → roomle-webgpu-renderer-BSvxbopA.mjs} +900 -707
  75. package/lib/roomle-webgpu-renderer-BSvxbopA.mjs.map +1 -0
  76. package/lib/{scene-renderer-BHYZac3H.mjs → scene-renderer--DzrpIl_.mjs} +309 -309
  77. package/lib/{scene-renderer-BHYZac3H.mjs.map → scene-renderer--DzrpIl_.mjs.map} +1 -1
  78. package/lib/{script-loader-CvnG6LgL.mjs → script-loader-D6i0wQ_j.mjs} +2 -2
  79. package/lib/{script-loader-CvnG6LgL.mjs.map → script-loader-D6i0wQ_j.mjs.map} +1 -1
  80. package/lib/{shading-settings-BBhR7KcS.mjs → shading-settings-6v-7O_Sz.mjs} +49 -49
  81. package/lib/{shading-settings-BBhR7KcS.mjs.map → shading-settings-6v-7O_Sz.mjs.map} +1 -1
  82. package/lib/src-6KtBPZXp.mjs +2 -0
  83. package/lib/{src-HhklrVDg.mjs → src-Dg0wYIom.mjs} +150 -150
  84. package/lib/{src-HhklrVDg.mjs.map → src-Dg0wYIom.mjs.map} +1 -1
  85. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  86. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  87. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  88. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  89. package/lib/{stats-helper-PndcZCzL.mjs → stats-helper-DYjPPDnz.mjs} +2 -2
  90. package/lib/{stats-helper-PndcZCzL.mjs.map → stats-helper-DYjPPDnz.mjs.map} +1 -1
  91. package/lib/{three.core-0KaTx8dm.mjs → three.core-BTUCraWz.mjs} +976 -884
  92. package/lib/three.core-BTUCraWz.mjs.map +1 -0
  93. package/lib/{three.module-dym6j3lO.mjs → three.module-DUSFrLM6.mjs} +1789 -1739
  94. package/lib/three.module-DUSFrLM6.mjs.map +1 -0
  95. package/lib/three.tsl-De6A-G56.mjs +158 -0
  96. package/lib/three.tsl-De6A-G56.mjs.map +1 -0
  97. package/lib/three.tsl-DtfvggFX.mjs +2 -0
  98. package/lib/three.webgpu-B1OhMci_.mjs +3 -0
  99. package/lib/{three.webgpu-D3nSEIjD.mjs → three.webgpu-wPiwbpFM.mjs} +5806 -4926
  100. package/lib/three.webgpu-wPiwbpFM.mjs.map +1 -0
  101. package/lib/{threejs-utils-v1uOvccg.mjs → threejs-utils-lVSsgAiQ.mjs} +68 -68
  102. package/lib/{threejs-utils-v1uOvccg.mjs.map → threejs-utils-lVSsgAiQ.mjs.map} +1 -1
  103. package/lib/{tools-core-B29U-88K.mjs → tools-core-CRGER_KC.mjs} +3 -3
  104. package/lib/{tools-core-B29U-88K.mjs.map → tools-core-CRGER_KC.mjs.map} +1 -1
  105. package/lib/{webgpu-BHAP6BLI.mjs → webgpu-BxYJfBjz.mjs} +555 -555
  106. package/lib/{webgpu-BHAP6BLI.mjs.map → webgpu-BxYJfBjz.mjs.map} +1 -1
  107. package/package.json +5 -5
  108. package/lib/BufferGeometry-Bl5whHAB.mjs.map +0 -1
  109. package/lib/GLTFExporter-yQ7mMauu.mjs.map +0 -1
  110. package/lib/GaussianBlurNode-DNBEf5-n.mjs +0 -59
  111. package/lib/GaussianBlurNode-DNBEf5-n.mjs.map +0 -1
  112. package/lib/Object3D-BHdngbxB.mjs.map +0 -1
  113. package/lib/PointLightHelper-CuPSBuDU.mjs.map +0 -1
  114. package/lib/SpotLightHelper-m-Rh8vGU.mjs.map +0 -1
  115. package/lib/USDZExporter-MdkuT226.mjs.map +0 -1
  116. package/lib/Vector4-C7TlIAyy.mjs.map +0 -1
  117. package/lib/common-utils-DbL4tku0.mjs.map +0 -1
  118. package/lib/configurator-BYQdWEvf.mjs +0 -2
  119. package/lib/dimensioning-helper-CGPjS2hW.mjs.map +0 -1
  120. package/lib/dimensioning-helper-VndKlIXS.mjs +0 -2
  121. package/lib/glb-viewer-Bd5Xn6Oq.mjs +0 -2
  122. package/lib/planner-DMk3T4ts.mjs +0 -2
  123. package/lib/roomle-sdk-CBwhwX_e.mjs.map +0 -1
  124. package/lib/roomle-webgpu-renderer-BfZKcXSz.mjs.map +0 -1
  125. package/lib/src-Bbq3Hqzn.mjs +0 -2
  126. package/lib/three.core-0KaTx8dm.mjs.map +0 -1
  127. package/lib/three.module-dym6j3lO.mjs.map +0 -1
  128. package/lib/three.tsl-BTc4fg8T.mjs +0 -2
  129. package/lib/three.tsl-Cf0-sCqB.mjs +0 -152
  130. package/lib/three.tsl-Cf0-sCqB.mjs.map +0 -1
  131. package/lib/three.webgpu-ClICiWlK.mjs +0 -3
  132. package/lib/three.webgpu-D3nSEIjD.mjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { Bt as e, Ci as t, Er as n, Qr as r, Si as i, cn as a, f as o, h as s, kn as c, m as l, sn as u, ui as d } from "./three.core-0KaTx8dm.mjs";
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 o());
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 o()), we = /* @__PURE__ */ new o(), Te = /* @__PURE__ */ new o(), Ee = /* @__PURE__ */ new o(), De = /* @__PURE__ */ new o(), Oe = !1;
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, a = t._roots, o, s = 0, c = 0, l = new u().copy(n).invert();
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]), c = 0;
336
+ Se.setBuffer(i[e]), l = 0;
337
337
  let t = F.getPrimitive();
338
- _(k(0), Se.float32Array, t), t.applyMatrix4(l);
339
- for (let e = 0, i = a.length; e < i && (Ce.setBuffer(a[e]), o = I(0, 0, n, l, r, s, c, 0, 0, t), Ce.clearBuffer(), c += a[e].byteLength / 32, !o); e++);
340
- if (F.releasePrimitive(t), Se.clearBuffer(), s += i[e].byteLength / 32, o) break;
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, o;
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 o(), Me = /* @__PURE__ */ new Float32Array(6), Ne = class {
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 l(r, 1));
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 o()));
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 t();
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 t(), n = /* @__PURE__ */ new t(), r = /* @__PURE__ */ new t();
687
- return function(t, i, a) {
688
- let o = t.start, s = e, c = i.start, l = n;
689
- r.subVectors(o, c), e.subVectors(t.end, t.start), n.subVectors(i.end, i.start);
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 i(), n = /* @__PURE__ */ new t(), r = /* @__PURE__ */ new t();
695
- return function(t, i, a, o) {
696
- We(t, i, e);
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
- t.at(s, a), i.at(c, o);
699
+ n.at(s, a), r.at(c, o);
700
700
  return;
701
701
  } else if (s >= 0 && s <= 1) {
702
- c < 0 ? i.at(0, o) : i.at(1, o), t.closestPointToPoint(o, !0, a);
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 ? t.at(0, a) : t.at(1, a), i.closestPointToPoint(a, !0, o);
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 ? t.start : t.end;
709
+ e = s < 0 ? n.start : n.end;
710
710
  let l;
711
- l = c < 0 ? i.start : i.end;
712
- let u = n, d = r;
713
- if (t.closestPointToPoint(l, !0, n), i.closestPointToPoint(e, !0, r), u.distanceToSquared(l) <= d.distanceToSquared(e)) {
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 n = /* @__PURE__ */ new t(), r = /* @__PURE__ */ new t(), i = /* @__PURE__ */ new c(), a = /* @__PURE__ */ new e();
724
- return function(e, t) {
725
- let { radius: o, center: s } = e, { a: c, b: l, c: u } = t;
726
- if (a.start = c, a.end = l, a.closestPointToPoint(s, !0, n).distanceTo(s) <= o || (a.start = c, a.end = u, a.closestPointToPoint(s, !0, n).distanceTo(s) <= o) || (a.start = l, a.end = u, a.closestPointToPoint(s, !0, n).distanceTo(s) <= o)) return !0;
727
- let d = t.getPlane(i);
728
- if (Math.abs(d.distanceToPoint(s)) <= o) {
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 (t.containsPoint(e)) return !0;
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(...n) {
744
- super(...n), this.isExtendedTriangle = !0, this.satAxes = [
743
+ constructor(...t) {
744
+ super(...t), this.isExtendedTriangle = !0, this.satAxes = [
745
745
  ,
746
746
  ,
747
747
  ,
748
748
  ,
749
- ].fill().map(() => new t()), this.satBounds = [
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 c(), this.isDegenerateIntoSegment = !1, this.isDegenerateIntoPoint = !1, this.degenerateSegment = new e(), this.needsUpdate = !0;
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 n = /* @__PURE__ */ new t(), r = /* @__PURE__ */ new t(), i = /* @__PURE__ */ new e();
778
- return function(e, t = null, a = null) {
779
- let { start: o, end: s } = e, c = this.points, l, u = Infinity;
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
- i.start.copy(c[o]), i.end.copy(c[s]), Ge(i, e, n, r), l = n.distanceToSquared(r), l < u && (u = l, t && t.copy(n), a && a.copy(r));
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, n), l = o.distanceToSquared(n), l < u && (u = l, t && t.copy(n), a && a.copy(o)), this.closestPointToPoint(s, n), l = s.distanceToSquared(n), l < u && (u = l, t && t.copy(n), a && a.copy(s)), Math.sqrt(u);
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 n = /* @__PURE__ */ new B(), r = /* @__PURE__ */ new L(), a = /* @__PURE__ */ new L(), o = /* @__PURE__ */ new t(), s = /* @__PURE__ */ new t(), c = /* @__PURE__ */ new t(), l = /* @__PURE__ */ new t(), u = /* @__PURE__ */ new e(), d = /* @__PURE__ */ new e(), f = /* @__PURE__ */ new t(), p = /* @__PURE__ */ new i(), m = /* @__PURE__ */ new i();
788
- function h(e, t, n, i) {
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(t.plane.normal);
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 n = 1; n < 4; n++) {
793
- let i = c[n], o = u[n];
794
- if (r.setFromPoints(o, t.points), i.isSeparated(r) || (l.copy(s).cross(o), r.setFromPoints(l, e.points), a.setFromPoints(l, t.points), r.isSeparated(a))) return !1;
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 = t.satBounds, f = t.satAxes;
797
- for (let n = 1; n < 4; n++) {
798
- let i = d[n], o = f[n];
799
- if (r.setFromPoints(o, e.points), i.isSeparated(r) || (l.crossVectors(s, o), r.setFromPoints(l, e.points), a.setFromPoints(l, t.points), r.isSeparated(a))) return !1;
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 n && (i || console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."), n.start.set(0, 0, 0), n.end.set(0, 0, 0)), !0;
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(e, t = null, r = !1) {
843
- this.needsUpdate && this.update(), e.isExtendedTriangle ? e.needsUpdate && e.update() : (n.copy(e), n.update(), e = n);
844
- let i = x(this, e, t, r);
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 = e.plane, l = o.distanceToPoint(this.a), g = o.distanceToPoint(this.b), v = o.distanceToPoint(this.c);
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(e.a), C = a.distanceToPoint(e.b), w = a.distanceToPoint(e.c);
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 = e.a[j], re = e.b[j], ie = e.c[j];
858
- if (_(this, ee, M, te, y, b, l, g, v, p, u) || _(e, ne, re, ie, T, E, S, C, w, m, d)) return h(this, e, t, r);
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 : (t && (m.x > p.x ? t.start.copy(d.start) : t.start.copy(u.start), m.y < p.y ? t.end.copy(d.end) : t.end.copy(u.end)), !0);
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 t();
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 n = /* @__PURE__ */ new t(), r = /* @__PURE__ */ new t(), i = [
875
+ let e = /* @__PURE__ */ new n(), t = /* @__PURE__ */ new n(), r = [
876
876
  "a",
877
877
  "b",
878
878
  "c"
879
- ], a = /* @__PURE__ */ new e(), o = /* @__PURE__ */ new e();
880
- return function(e, t = null, s = null) {
881
- let c = t || s ? a : null;
882
- if (this.intersectsTriangle(e, c, !0)) return (t || s) && (t && c.getCenter(t), s && c.getCenter(s)), 0;
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 r = 0; r < 3; r++) {
885
- let a, o = i[r], c = e[o];
886
- this.closestPointToPoint(c, n), a = c.distanceToSquared(n), a < l && (l = a, t && t.copy(n), s && s.copy(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
- e.closestPointToPoint(u, n), a = u.distanceToSquared(n), a < l && (l = a, t && t.copy(u), s && s.copy(n));
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 = i[c], d = i[(c + 1) % 3];
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 = i[c], d = i[(c + 1) % 3];
895
- o.set(e[u], e[d]), Ge(a, o, n, r);
896
- let f = n.distanceToSquared(r);
897
- f < l && (l = f, t && t.copy(n), s && s.copy(r));
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, n, r) {
907
- this.isOrientedBox = !0, this.min = new t(), this.max = new t(), this.matrix = new u(), this.invMatrix = new u(), this.points = Array(8).fill().map(() => new t()), this.satAxes = [
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 t()), this.satBounds = [
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), n && this.max.copy(n), r && this.matrix.copy(r);
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(), n = [
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 t();
961
- return function(t) {
962
- this.needsUpdate && this.update(), t.isExtendedTriangle ? t.needsUpdate && t.update() : (e.copy(t), e.update(), t = e);
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
- n[0] = t.a, n[1] = t.b, n[2] = t.c;
964
+ t[0] = n.a, t[1] = n.b, t[2] = n.c;
965
965
  for (let e = 0; e < 3; e++) {
966
- let t = o[e], i = s[e];
967
- if (r.setFromPoints(i, n), t.isSeparated(r)) return !1;
966
+ let n = o[e], i = s[e];
967
+ if (r.setFromPoints(i, t), n.isSeparated(r)) return !1;
968
968
  }
969
- let c = t.satBounds, l = t.satAxes, u = this.points;
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 t = s[e];
975
+ let n = s[e];
976
976
  for (let e = 0; e < 4; e++) {
977
977
  let o = l[e];
978
- if (a.crossVectors(t, o), r.setFromPoints(a, n), i.setFromPoints(a, u), r.isSeparated(i)) return !1;
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 t();
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 n = [
993
+ let e = [
994
994
  "x",
995
995
  "y",
996
996
  "z"
997
- ], r = /* @__PURE__ */ Array(12).fill().map(() => new e()), i = /* @__PURE__ */ Array(12).fill().map(() => new e()), a = /* @__PURE__ */ new t(), o = /* @__PURE__ */ new t();
998
- return function(e, t = 0, s = null, c = null) {
999
- if (this.needsUpdate && this.update(), this.intersectsBox(e)) return (s || c) && (e.getCenter(o), this.closestPointToPoint(o, a), e.closestPointToPoint(a, o), s && s.copy(a), c && c.copy(o)), 0;
1000
- let l = t * t, u = e.min, d = e.max, f = this.points, p = Infinity;
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 e = 0; e < 3; e++) for (let t = 0; t <= 1; t++) for (let a = 0; a <= 1; a++) {
1009
- let o = (e + 1) % 3, s = (e + 2) % 3, c = t << o | a << s, l = 1 << e | t << o | a << s, p = f[c], h = f[l];
1010
- r[m].set(p, h);
1011
- let g = n[e], _ = n[o], v = n[s], y = i[m], b = y.start, x = y.end;
1012
- b[g] = u[g], b[_] = t ? u[_] : d[_], b[v] = a ? u[v] : d[_], x[g] = d[g], x[_] = t ? u[_] : d[_], x[v] = a ? u[v] : d[_], m++;
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 t = r[e];
1020
+ let n = t[e];
1021
1021
  for (let e = 0; e < 12; e++) {
1022
- let n = i[e];
1023
- Ge(t, n, a, o);
1024
- let r = a.distanceToSquared(o);
1025
- if (r < p && (p = r, s && s.copy(a), c && c.copy(o), r < l)) return Math.sqrt(r);
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 t(), Xe = /* @__PURE__ */ new t();
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 t(), W = /* @__PURE__ */ new t(), G = /* @__PURE__ */ new t(), et = /* @__PURE__ */ new i(), tt = /* @__PURE__ */ new i(), nt = /* @__PURE__ */ new i(), rt = /* @__PURE__ */ new t(), it = /* @__PURE__ */ new t(), at = /* @__PURE__ */ new t(), ot = /* @__PURE__ */ new t();
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, n, r, a, o, s, c, l, u, f, p) {
1063
- U.fromBufferAttribute(n, s), W.fromBufferAttribute(n, c), G.fromBufferAttribute(n, l);
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 i();
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 i();
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 (r) {
1077
- rt.fromBufferAttribute(r, s), it.fromBufferAttribute(r, c), at.fromBufferAttribute(r, l), m.normal = new t();
1078
- let n = 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 = n);
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 n = {
1081
+ let t = {
1082
1082
  a: s,
1083
1083
  b: c,
1084
1084
  c: l,
1085
- normal: new t(),
1085
+ normal: new n(),
1086
1086
  materialIndex: 0
1087
1087
  };
1088
- if (d.getNormal(U, W, G, n.normal), m.face = n, m.faceIndex = s, Qe) {
1089
- let e = new t();
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 o(), wt = /* @__PURE__ */ new B(), Tt = /* @__PURE__ */ new B(), Et = /* @__PURE__ */ new u(), Dt = /* @__PURE__ */ new V(), Ot = /* @__PURE__ */ new V();
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 u(), Mt = /* @__PURE__ */ new V(), Nt = /* @__PURE__ */ new V(), Pt = /* @__PURE__ */ new t(), Ft = /* @__PURE__ */ new t(), It = /* @__PURE__ */ new t(), Lt = /* @__PURE__ */ new t();
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 o(), Kt = /* @__PURE__ */ new B(), qt = /* @__PURE__ */ new B(), Jt = /* @__PURE__ */ new u(), Yt = /* @__PURE__ */ new V(), Xt = /* @__PURE__ */ new V();
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 u(), en = /* @__PURE__ */ new V(), tn = /* @__PURE__ */ new V(), nn = /* @__PURE__ */ new t(), rn = /* @__PURE__ */ new t(), an = /* @__PURE__ */ new t(), on = /* @__PURE__ */ new t();
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 n(), dn = /* @__PURE__ */ new t(), fn = /* @__PURE__ */ new u(), pn = /* @__PURE__ */ new t(), mn = [
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 l(t.index, 1, !1);
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 s(), Y = /* @__PURE__ */ new u(), gn = /* @__PURE__ */ new u(), _n = /* @__PURE__ */ new o(), vn = /* @__PURE__ */ new r(), X = /* @__PURE__ */ new t(), yn = /* @__PURE__ */ new n(), Z = /* @__PURE__ */ new a(), bn = {}, xn = class extends Ne {
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 u() : e.matrixWorld,
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)), a = (1 << i) - 1;
1694
- this.objects = r, this.idBits = i, this.idMask = a, this.primitiveBuffer = null, this.primitiveBufferStride = 1, this.precise = t.precise, this.includeInstances = t.includeInstances, this.matrixWorld = t.matrixWorld, this.init(t);
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 t(), kn = /* @__PURE__ */ new t(), An = /* @__PURE__ */ new t(), Q = /* @__PURE__ */ new n(), jn = /* @__PURE__ */ new u(), $ = /* @__PURE__ */ new t(), Mn = /* @__PURE__ */ new t(), Nn = [
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 i(), Ln = /* @__PURE__ */ new i(), Rn = /* @__PURE__ */ new i(), zn = /* @__PURE__ */ new t(), Bn = /* @__PURE__ */ new t(), Vn = /* @__PURE__ */ new t(), Hn = class extends Ue {
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, n, r = []) {
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 } = n;
1877
- jn.copy(o).invert(), Q.copy(n.ray).applyMatrix4(jn);
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 t;
1885
- return e.containsPoint(Q.origin) ? t = 0 : (Mn.applyMatrix4(o), t = n.ray.origin.distanceTo(Mn)), t < l ? 1 : 0;
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 = n.ray.origin.distanceTo(p);
1893
- if (m >= n.near && m <= n.far) {
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: n } = this, { index: a } = n, o = this.resolvePrimitiveIndex(f), h = o * 3, g = h + 0, _ = h + 1, v = h + 2;
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 t()),
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 t();
1914
+ let e = new n();
1915
1915
  d.getBarycoord($, u.a, u.b, u.c, e), y.barycoord = e;
1916
1916
  }
1917
- let b = n.attributes.uv, x = n.attributes.uv1, S = n.attributes.normal;
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 i();
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 i();
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 t();
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 || r.push(y);
1933
+ l = y.distance, c = y, s || i.push(y);
1934
1934
  }
1935
1935
  }
1936
- }), s && c && r.push(c), r;
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-HhklrVDg.mjs.map
1950
+ //# sourceMappingURL=src-Dg0wYIom.mjs.map