@needle-tools/engine 4.1.0-beta.6 → 4.1.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/gltf-progressive.js +148 -150
  3. package/dist/gltf-progressive.light.js +148 -150
  4. package/dist/gltf-progressive.light.min.js +6 -6
  5. package/dist/gltf-progressive.light.umd.cjs +7 -7
  6. package/dist/gltf-progressive.min.js +6 -6
  7. package/dist/gltf-progressive.umd.cjs +7 -7
  8. package/dist/needle-engine.bundle.js +4782 -4769
  9. package/dist/needle-engine.bundle.light.js +4783 -4770
  10. package/dist/needle-engine.bundle.light.min.js +112 -112
  11. package/dist/needle-engine.bundle.light.umd.cjs +113 -113
  12. package/dist/needle-engine.bundle.min.js +112 -112
  13. package/dist/needle-engine.bundle.umd.cjs +113 -113
  14. package/dist/needle-engine.d.ts +4 -0
  15. package/dist/needle-engine.js +2 -2
  16. package/dist/needle-engine.light.d.ts +13 -9
  17. package/dist/needle-engine.light.js +2 -2
  18. package/dist/needle-engine.light.min.js +1 -1
  19. package/dist/needle-engine.min.js +1 -1
  20. package/dist/postprocessing.js +1 -1
  21. package/dist/postprocessing.light.js +1 -1
  22. package/dist/postprocessing.light.min.js +1 -1
  23. package/dist/postprocessing.min.js +1 -1
  24. package/dist/three-examples.js +1 -1
  25. package/dist/three-examples.light.js +1 -1
  26. package/dist/three-examples.light.min.js +1 -1
  27. package/dist/three-examples.min.js +1 -1
  28. package/dist/three-mesh-ui.js +1 -1
  29. package/dist/three-mesh-ui.light.js +1 -1
  30. package/dist/three-mesh-ui.light.min.js +1 -1
  31. package/dist/three-mesh-ui.min.js +1 -1
  32. package/dist/three.js +14 -14
  33. package/dist/three.light.js +14 -14
  34. package/dist/three.light.min.js +1 -1
  35. package/dist/three.min.js +1 -1
  36. package/dist/vendor.js +174 -174
  37. package/dist/vendor.light.js +174 -174
  38. package/dist/vendor.light.min.js +12 -12
  39. package/dist/vendor.light.umd.cjs +13 -13
  40. package/dist/vendor.min.js +12 -12
  41. package/dist/vendor.umd.cjs +13 -13
  42. package/lib/engine/engine_addressables.d.ts +6 -4
  43. package/lib/engine/engine_addressables.js +8 -1
  44. package/lib/engine/engine_addressables.js.map +1 -1
  45. package/lib/engine/engine_context.js +2 -0
  46. package/lib/engine/engine_context.js.map +1 -1
  47. package/lib/engine/engine_gameobject.d.ts +2 -12
  48. package/lib/engine/engine_gameobject.js +5 -15
  49. package/lib/engine/engine_gameobject.js.map +1 -1
  50. package/lib/engine/engine_input.d.ts +19 -6
  51. package/lib/engine/engine_input.js +0 -10
  52. package/lib/engine/engine_input.js.map +1 -1
  53. package/lib/engine/engine_license.js +1 -1
  54. package/lib/engine/engine_license.js.map +1 -1
  55. package/lib/engine/engine_networking_instantiate.d.ts +1 -1
  56. package/lib/engine/engine_types.d.ts +5 -0
  57. package/lib/engine/engine_types.js +6 -0
  58. package/lib/engine/engine_types.js.map +1 -1
  59. package/lib/engine/export/gltf/Writers.js.map +1 -1
  60. package/lib/engine/export/gltf/index.js +11 -1
  61. package/lib/engine/export/gltf/index.js.map +1 -1
  62. package/lib/engine/export/utils.d.ts +2 -0
  63. package/lib/engine/export/utils.js +8 -0
  64. package/lib/engine/export/utils.js.map +1 -0
  65. package/lib/engine/extensions/NEEDLE_gameobject_data.js +1 -1
  66. package/lib/engine/extensions/NEEDLE_gameobject_data.js.map +1 -1
  67. package/lib/engine/js-extensions/Object3D.d.ts +5 -1
  68. package/lib/engine/js-extensions/Object3D.js.map +1 -1
  69. package/lib/engine/webcomponents/needle menu/needle-menu.js +8 -2
  70. package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
  71. package/lib/engine-components/AvatarLoader.js.map +1 -1
  72. package/lib/engine-components/Component.d.ts +4 -3
  73. package/lib/engine-components/Component.js +6 -7
  74. package/lib/engine-components/Component.js.map +1 -1
  75. package/lib/engine-components/ContactShadows.d.ts +1 -1
  76. package/lib/engine-components/ContactShadows.js +7 -0
  77. package/lib/engine-components/ContactShadows.js.map +1 -1
  78. package/lib/engine-components/SceneSwitcher.d.ts +1 -1
  79. package/lib/engine-components/SceneSwitcher.js +1 -1
  80. package/lib/engine-components/SceneSwitcher.js.map +1 -1
  81. package/lib/engine-components/export/gltf/GltfExport.js +23 -4
  82. package/lib/engine-components/export/gltf/GltfExport.js.map +1 -1
  83. package/lib/engine-components/webxr/Avatar.js +3 -3
  84. package/lib/engine-components/webxr/Avatar.js.map +1 -1
  85. package/lib/engine-components/webxr/WebXRImageTracking.js.map +1 -1
  86. package/lib/engine-components-experimental/networking/PlayerSync.js +2 -1
  87. package/lib/engine-components-experimental/networking/PlayerSync.js.map +1 -1
  88. package/package.json +2 -2
  89. package/plugins/common/config.cjs +22 -6
  90. package/plugins/common/config.js +27 -11
  91. package/plugins/next/next.js +47 -4
  92. package/src/engine/codegen/register_types.ts +2 -2
  93. package/src/engine/engine_addressables.ts +19 -12
  94. package/src/engine/engine_context.ts +2 -0
  95. package/src/engine/engine_gameobject.ts +12 -16
  96. package/src/engine/engine_input.ts +12 -5
  97. package/src/engine/engine_license.ts +2 -1
  98. package/src/engine/engine_networking_instantiate.ts +1 -1
  99. package/src/engine/engine_types.ts +6 -0
  100. package/src/engine/export/gltf/Writers.ts +0 -1
  101. package/src/engine/export/gltf/index.ts +13 -3
  102. package/src/engine/export/index.ts +1 -1
  103. package/src/engine/export/utils.ts +10 -0
  104. package/src/engine/extensions/NEEDLE_gameobject_data.ts +1 -2
  105. package/src/engine/js-extensions/Object3D.ts +6 -1
  106. package/src/engine/webcomponents/needle menu/needle-menu.ts +16 -10
  107. package/src/engine-components/AvatarLoader.ts +1 -1
  108. package/src/engine-components/Component.ts +13 -7
  109. package/src/engine-components/ContactShadows.ts +11 -2
  110. package/src/engine-components/SceneSwitcher.ts +1 -1
  111. package/src/engine-components/export/gltf/GltfExport.ts +26 -6
  112. package/src/engine-components/webxr/Avatar.ts +3 -3
  113. package/src/engine-components/webxr/WebXRImageTracking.ts +5 -4
  114. package/src/engine-components-experimental/networking/PlayerSync.ts +1 -1
@@ -1,4 +1,4 @@
1
- import { P as Or, a9 as fc, bc as wt, V as M, L as _s, q as Bn, D as En, b6 as _r, O as Lo, c0 as Me, cM as ft, cI as Vc, U as Qt, k as jn, B as oi, I as Gt, M as pn, e as Rc, b1 as xc, g as qt, Y as Dr, b5 as he, S as Ar, c as kt, d as Ct, bC as qr, ax as Lc, aq as Jo, r as Sc, X as Wc, b0 as Cc, R as gc, ac as On, al as ii, bB as Ni, cN as Ds, bG as Ii, b2 as Uo, cO as zc, cP as Po, cQ as vc, ad as nn, cR as _n, bP as Kc, bO as Tc, cS as $r, cT as Mc, o as Yc, h as So } from "./three.light.js";
1
+ import { P as Or, a9 as fc, bc as wt, V as M, L as _s, q as En, D as jn, b6 as _r, O as Lo, c0 as Me, cM as ft, cI as Vc, U as Qt, j as On, B as oi, I as Gt, M as mn, d as Rc, b1 as xc, f as qt, Y as Dr, b5 as he, S as Ar, b as kt, c as Ct, bC as qr, ax as Lc, aq as Jo, r as Sc, X as Wc, b0 as Cc, R as gc, ac as _n, al as ii, bB as Ni, cN as Ds, bG as Ii, b2 as Uo, cO as zc, cP as Po, cQ as vc, ad as nn, cR as Dn, bP as Kc, bO as Tc, cS as $r, cT as Mc, o as Yc, g as So } from "./three.light.js";
2
2
  const rt = {
3
3
  Handedness: Object.freeze({
4
4
  NONE: "none",
@@ -208,7 +208,7 @@ class ku {
208
208
  });
209
209
  }
210
210
  }
211
- const Vn = 2, Dt = 4, ae = 4, Uc = 4, Ze = new Int32Array(2), Fo = new Float32Array(Ze.buffer), Qo = new Float64Array(Ze.buffer), Rs = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;
211
+ const Rn = 2, Dt = 4, ae = 4, Uc = 4, Ze = new Int32Array(2), Fo = new Float32Array(Ze.buffer), Qo = new Float64Array(Ze.buffer), Rs = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;
212
212
  class ue {
213
213
  constructor(t, e) {
214
214
  this.low = t | 0, this.high = e | 0;
@@ -224,10 +224,10 @@ class ue {
224
224
  }
225
225
  }
226
226
  ue.ZERO = new ue(0, 0);
227
- var Dn;
227
+ var An;
228
228
  (function(s) {
229
229
  s[s.UTF8_BYTES = 1] = "UTF8_BYTES", s[s.UTF16_STRING = 2] = "UTF16_STRING";
230
- })(Dn || (Dn = {}));
230
+ })(An || (An = {}));
231
231
  class on {
232
232
  /**
233
233
  * Create a new ByteBuffer with a given array of bytes (`Uint8Array`)
@@ -371,7 +371,7 @@ class on {
371
371
  t += this.readInt32(t);
372
372
  const i = this.readInt32(t);
373
373
  let n = "", o = 0;
374
- if (t += Dt, e === Dn.UTF8_BYTES)
374
+ if (t += Dt, e === An.UTF8_BYTES)
375
375
  return this.bytes_.subarray(t, t + i);
376
376
  for (; o < i; ) {
377
377
  let r;
@@ -693,7 +693,7 @@ class el {
693
693
  this.addInt16(this.vtable[e] != 0 ? t - this.vtable[e] : 0);
694
694
  const n = 2;
695
695
  this.addInt16(t - this.object_start);
696
- const o = (i + n) * Vn;
696
+ const o = (i + n) * Rn;
697
697
  this.addInt16(o);
698
698
  let r = 0;
699
699
  const c = this.space;
@@ -701,7 +701,7 @@ class el {
701
701
  for (e = 0; e < this.vtables.length; e++) {
702
702
  const l = this.bb.capacity() - this.vtables[e];
703
703
  if (o == this.bb.readInt16(l)) {
704
- for (let a = Vn; a < o; a += Vn)
704
+ for (let a = Rn; a < o; a += Rn)
705
705
  if (this.bb.readInt16(c + a) != this.bb.readInt16(l + a))
706
706
  continue t;
707
707
  r = this.vtables[e];
@@ -843,7 +843,7 @@ class el {
843
843
  return e(this, t.length), this.createObjectOffsetList(t), this.endVector();
844
844
  }
845
845
  }
846
- function mn(s) {
846
+ function bn(s) {
847
847
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
848
848
  }
849
849
  var il = { exports: {} };
@@ -1191,7 +1191,7 @@ function wc(s) {
1191
1191
  function Bc(s) {
1192
1192
  return s.length > 600 ? new Blob([s]).size : s.replace(/[^\u0000-\u007F]/g, wc).length;
1193
1193
  }
1194
- const Bo = /* @__PURE__ */ mn(Qc);
1194
+ const Bo = /* @__PURE__ */ bn(Qc);
1195
1195
  let nl = !0, ol = !0;
1196
1196
  function Ti(s, t, e) {
1197
1197
  const i = s.match(t);
@@ -1254,7 +1254,7 @@ function Wo() {
1254
1254
  typeof console < "u" && typeof console.log == "function" && console.log.apply(console, arguments);
1255
1255
  }
1256
1256
  }
1257
- function bn(s, t) {
1257
+ function yn(s, t) {
1258
1258
  ol && console.warn(s + " is deprecated, please use " + t + " instead.");
1259
1259
  }
1260
1260
  function Oc(s) {
@@ -1299,10 +1299,10 @@ function rl(s) {
1299
1299
  return n === void 0 || o ? t : Object.assign(t, { [e]: n });
1300
1300
  }, {}) : s;
1301
1301
  }
1302
- function An(s, t, e) {
1302
+ function qn(s, t, e) {
1303
1303
  !t || e.has(t.id) || (e.set(t.id, t), Object.keys(t).forEach((i) => {
1304
- i.endsWith("Id") ? An(s, s.get(t[i]), e) : i.endsWith("Ids") && t[i].forEach((n) => {
1305
- An(s, s.get(n), e);
1304
+ i.endsWith("Id") ? qn(s, s.get(t[i]), e) : i.endsWith("Ids") && t[i].forEach((n) => {
1305
+ qn(s, s.get(n), e);
1306
1306
  });
1307
1307
  }));
1308
1308
  }
@@ -1315,7 +1315,7 @@ function jo(s, t, e) {
1315
1315
  r.type === "track" && r.trackIdentifier === t.id && o.push(r);
1316
1316
  }), o.forEach((r) => {
1317
1317
  s.forEach((c) => {
1318
- c.type === i && c.trackId === r.id && An(s, c, n);
1318
+ c.type === i && c.trackId === r.id && qn(s, c, n);
1319
1319
  });
1320
1320
  }), n;
1321
1321
  }
@@ -1796,7 +1796,7 @@ function ml(s, t) {
1796
1796
  }), u && (u.getTracks().length === 1 ? this.removeStream(this._reverseStreams[u.id]) : u.removeTrack(d.track), this.dispatchEvent(new Event("negotiationneeded")));
1797
1797
  };
1798
1798
  }
1799
- function qn(s, t) {
1799
+ function $n(s, t) {
1800
1800
  !s.RTCPeerConnection && s.webkitRTCPeerConnection && (s.RTCPeerConnection = s.webkitRTCPeerConnection), s.RTCPeerConnection && t.version < 53 && ["setLocalDescription", "setRemoteDescription", "addIceCandidate"].forEach(function(e) {
1801
1801
  const i = s.RTCPeerConnection.prototype[e], n = { [e]() {
1802
1802
  return arguments[0] = new (e === "addIceCandidate" ? s.RTCIceCandidate : s.RTCSessionDescription)(arguments[0]), i.apply(this, arguments);
@@ -1822,7 +1822,7 @@ const _o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1822
1822
  shimGetUserMedia: ll,
1823
1823
  shimMediaStream: cl,
1824
1824
  shimOnTrack: al,
1825
- shimPeerConnection: qn,
1825
+ shimPeerConnection: $n,
1826
1826
  shimSenderReceiverGetStats: ul
1827
1827
  }, Symbol.toStringTag, { value: "Module" }));
1828
1828
  function Dc(s, t) {
@@ -1830,7 +1830,7 @@ function Dc(s, t) {
1830
1830
  return s = JSON.parse(JSON.stringify(s)), s.filter((i) => {
1831
1831
  if (i && (i.urls || i.url)) {
1832
1832
  let n = i.urls || i.url;
1833
- i.url && !i.urls && bn("RTCIceServer.url", "RTCIceServer.urls");
1833
+ i.url && !i.urls && yn("RTCIceServer.url", "RTCIceServer.urls");
1834
1834
  const o = typeof n == "string";
1835
1835
  return o && (n = [n]), n = n.filter((r) => {
1836
1836
  if (r.indexOf("stun:") === 0)
@@ -2254,7 +2254,7 @@ t=0 0\r
2254
2254
  }, s.exports = t;
2255
2255
  })(yl);
2256
2256
  var Gl = yl.exports;
2257
- const As = /* @__PURE__ */ mn(Gl);
2257
+ const As = /* @__PURE__ */ bn(Gl);
2258
2258
  var H = Gl;
2259
2259
  function Ac(s) {
2260
2260
  return {
@@ -2362,7 +2362,7 @@ function Ao(s, t, e) {
2362
2362
  }
2363
2363
  }[t][s].indexOf(e) !== -1;
2364
2364
  }
2365
- function Rn(s, t) {
2365
+ function xn(s, t) {
2366
2366
  var e = s.getRemoteCandidates().find(function(i) {
2367
2367
  return t.foundation === i.foundation && t.ip === i.ip && t.port === i.port && t.priority === i.priority && t.protocol === i.protocol && t.type === i.type;
2368
2368
  });
@@ -2789,7 +2789,7 @@ var $c = function(s, t) {
2789
2789
  Z,
2790
2790
  b
2791
2791
  )), nt.length && L.iceTransport.state === "new" && (Lt && (!b || Z === 0) ? L.iceTransport.setRemoteCandidates(nt) : nt.forEach(function(A) {
2792
- Rn(L.iceTransport, A);
2792
+ xn(L.iceTransport, A);
2793
2793
  })), J = s.RTCRtpReceiver.getCapabilities(V), t < 15019 && (J.codecs = J.codecs.filter(
2794
2794
  function(A) {
2795
2795
  return A.name !== "rtx";
@@ -2825,7 +2825,7 @@ var $c = function(s, t) {
2825
2825
  );
2826
2826
  } else if (l.type === "answer" && !X) {
2827
2827
  L = a.transceivers[Z], g = L.iceGatherer, W = L.iceTransport, z = L.dtlsTransport, v = L.rtpReceiver, k = L.sendEncodingParameters, J = L.localCapabilities, a.transceivers[Z].recvEncodingParameters = N, a.transceivers[Z].remoteCapabilities = D, a.transceivers[Z].rtcpParameters = gt, nt.length && W.state === "new" && ((m || Lt) && (!b || Z === 0) ? W.setRemoteCandidates(nt) : nt.forEach(function(A) {
2828
- Rn(L.iceTransport, A);
2828
+ xn(L.iceTransport, A);
2829
2829
  })), (!b || Z === 0) && (W.state === "new" && W.start(
2830
2830
  g,
2831
2831
  st,
@@ -3089,7 +3089,7 @@ a=mid:` + u.mid + `\r
3089
3089
  var y = Object.keys(l.candidate).length > 0 ? H.parseCandidate(l.candidate) : {};
3090
3090
  if (y.protocol === "tcp" && (y.port === 0 || y.port === 9) || y.component && y.component !== 1)
3091
3091
  return h();
3092
- if ((m === 0 || m > 0 && G.iceTransport !== a.transceivers[0].iceTransport) && !Rn(G.iceTransport, y))
3092
+ if ((m === 0 || m > 0 && G.iceTransport !== a.transceivers[0].iceTransport) && !xn(G.iceTransport, y))
3093
3093
  return u(bt(
3094
3094
  "OperationError",
3095
3095
  "Can not add ICE candidate"
@@ -3191,7 +3191,7 @@ a=mid:` + u.mid + `\r
3191
3191
  };
3192
3192
  }), o;
3193
3193
  };
3194
- const ta = /* @__PURE__ */ mn($c);
3194
+ const ta = /* @__PURE__ */ bn($c);
3195
3195
  function Zl(s) {
3196
3196
  const t = s && s.navigator, e = function(n) {
3197
3197
  return {
@@ -3210,7 +3210,7 @@ function Zl(s) {
3210
3210
  function Xl(s) {
3211
3211
  "getDisplayMedia" in s.navigator && s.navigator.mediaDevices && (s.navigator.mediaDevices && "getDisplayMedia" in s.navigator.mediaDevices || (s.navigator.mediaDevices.getDisplayMedia = s.navigator.getDisplayMedia.bind(s.navigator)));
3212
3212
  }
3213
- function $n(s, t) {
3213
+ function to(s, t) {
3214
3214
  if (s.RTCIceGatherer && (s.RTCIceCandidate || (s.RTCIceCandidate = function(n) {
3215
3215
  return n;
3216
3216
  }), s.RTCSessionDescription || (s.RTCSessionDescription = function(n) {
@@ -3251,13 +3251,13 @@ const qo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3251
3251
  __proto__: null,
3252
3252
  shimGetDisplayMedia: Xl,
3253
3253
  shimGetUserMedia: Zl,
3254
- shimPeerConnection: $n,
3254
+ shimPeerConnection: to,
3255
3255
  shimReplaceTrack: fl
3256
3256
  }, Symbol.toStringTag, { value: "Module" }));
3257
3257
  function Vl(s, t) {
3258
3258
  const e = s && s.navigator, i = s && s.MediaStreamTrack;
3259
3259
  if (e.getUserMedia = function(n, o, r) {
3260
- bn(
3260
+ yn(
3261
3261
  "navigator.getUserMedia",
3262
3262
  "navigator.mediaDevices.getUserMedia"
3263
3263
  ), e.mediaDevices.getUserMedia(n).then(o, r);
@@ -3298,7 +3298,7 @@ function Rl(s) {
3298
3298
  }
3299
3299
  });
3300
3300
  }
3301
- function to(s, t) {
3301
+ function eo(s, t) {
3302
3302
  if (typeof s != "object" || !(s.RTCPeerConnection || s.mozRTCPeerConnection))
3303
3303
  return;
3304
3304
  !s.RTCPeerConnection && s.mozRTCPeerConnection && (s.RTCPeerConnection = s.mozRTCPeerConnection), t.version < 53 && ["setLocalDescription", "setRemoteDescription", "addIceCandidate"].forEach(function(n) {
@@ -3364,7 +3364,7 @@ function Ll(s) {
3364
3364
  }
3365
3365
  function Sl(s) {
3366
3366
  !s.RTCPeerConnection || "removeStream" in s.RTCPeerConnection.prototype || (s.RTCPeerConnection.prototype.removeStream = function(e) {
3367
- bn("removeStream", "removeTrack"), this.getSenders().forEach((i) => {
3367
+ yn("removeStream", "removeTrack"), this.getSenders().forEach((i) => {
3368
3368
  i.track && e.getTracks().includes(i.track) && this.removeTrack(i);
3369
3369
  });
3370
3370
  });
@@ -3440,7 +3440,7 @@ const $o = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3440
3440
  shimGetParameters: gl,
3441
3441
  shimGetUserMedia: Vl,
3442
3442
  shimOnTrack: Rl,
3443
- shimPeerConnection: to,
3443
+ shimPeerConnection: eo,
3444
3444
  shimRTCDataChannel: Wl,
3445
3445
  shimReceiverGetStats: Ll,
3446
3446
  shimRemoveStream: Sl,
@@ -3565,7 +3565,7 @@ function Hl(s) {
3565
3565
  const o = [];
3566
3566
  for (let r = 0; r < i.iceServers.length; r++) {
3567
3567
  let c = i.iceServers[r];
3568
- !c.hasOwnProperty("urls") && c.hasOwnProperty("url") ? (bn("RTCIceServer.url", "RTCIceServer.urls"), c = JSON.parse(JSON.stringify(c)), c.urls = c.url, delete c.url, o.push(c)) : o.push(i.iceServers[r]);
3568
+ !c.hasOwnProperty("urls") && c.hasOwnProperty("url") ? (yn("RTCIceServer.url", "RTCIceServer.urls"), c = JSON.parse(JSON.stringify(c)), c.urls = c.url, delete c.url, o.push(c)) : o.push(i.iceServers[r]);
3569
3569
  }
3570
3570
  i.iceServers = o;
3571
3571
  }
@@ -3713,7 +3713,7 @@ function Yi(s) {
3713
3713
  return t(n, this), n;
3714
3714
  }, di(s, "datachannel", (i) => (t(i.channel, i.target), i));
3715
3715
  }
3716
- function eo(s) {
3716
+ function io(s) {
3717
3717
  if (!s.RTCPeerConnection || "connectionState" in s.RTCPeerConnection.prototype)
3718
3718
  return;
3719
3719
  const t = s.RTCPeerConnection.prototype;
@@ -3759,7 +3759,7 @@ function eo(s) {
3759
3759
  };
3760
3760
  });
3761
3761
  }
3762
- function io(s, t) {
3762
+ function so(s, t) {
3763
3763
  if (!s.RTCPeerConnection || t.browser === "chrome" && t.version >= 71 || t.browser === "safari" && t.version >= 605)
3764
3764
  return;
3765
3765
  const e = s.RTCPeerConnection.prototype.setRemoteDescription;
@@ -3787,9 +3787,9 @@ function $s(s, t) {
3787
3787
  }
3788
3788
  const ia = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3789
3789
  __proto__: null,
3790
- removeExtmapAllowMixed: io,
3790
+ removeExtmapAllowMixed: so,
3791
3791
  shimAddIceCandidateNullOrEmpty: $s,
3792
- shimConnectionState: eo,
3792
+ shimConnectionState: io,
3793
3793
  shimMaxMessageSize: Mi,
3794
3794
  shimRTCIceCandidate: qs,
3795
3795
  shimSendThrowTypeError: Yi
@@ -3809,26 +3809,26 @@ function sa({ window: s } = {}, t = {
3809
3809
  };
3810
3810
  switch (i.browser) {
3811
3811
  case "chrome":
3812
- if (!_o || !qn || !t.shimChrome)
3812
+ if (!_o || !$n || !t.shimChrome)
3813
3813
  return e("Chrome shim is not included in this adapter release."), n;
3814
3814
  if (i.version === null)
3815
3815
  return e("Chrome shim can not determine version, not shimming."), n;
3816
- e("adapter.js shimming chrome."), n.browserShim = _o, $s(s, i), ll(s, i), cl(s), qn(s, i), al(s), ml(s, i), dl(s), hl(s), ul(s), bl(s, i), qs(s), eo(s), Mi(s, i), Yi(s), io(s, i);
3816
+ e("adapter.js shimming chrome."), n.browserShim = _o, $s(s, i), ll(s, i), cl(s), $n(s, i), al(s), ml(s, i), dl(s), hl(s), ul(s), bl(s, i), qs(s), io(s), Mi(s, i), Yi(s), so(s, i);
3817
3817
  break;
3818
3818
  case "firefox":
3819
- if (!$o || !to || !t.shimFirefox)
3819
+ if (!$o || !eo || !t.shimFirefox)
3820
3820
  return e("Firefox shim is not included in this adapter release."), n;
3821
- e("adapter.js shimming firefox."), n.browserShim = $o, $s(s, i), Vl(s, i), to(s, i), Rl(s), Sl(s), xl(s), Ll(s), Wl(s), Cl(s), gl(s), zl(s), vl(s), qs(s), eo(s), Mi(s, i), Yi(s);
3821
+ e("adapter.js shimming firefox."), n.browserShim = $o, $s(s, i), Vl(s, i), eo(s, i), Rl(s), Sl(s), xl(s), Ll(s), Wl(s), Cl(s), gl(s), zl(s), vl(s), qs(s), io(s), Mi(s, i), Yi(s);
3822
3822
  break;
3823
3823
  case "edge":
3824
- if (!qo || !$n || !t.shimEdge)
3824
+ if (!qo || !to || !t.shimEdge)
3825
3825
  return e("MS edge shim is not included in this adapter release."), n;
3826
- e("adapter.js shimming edge."), n.browserShim = qo, Zl(s), Xl(s), $n(s, i), fl(s), Mi(s, i), Yi(s);
3826
+ e("adapter.js shimming edge."), n.browserShim = qo, Zl(s), Xl(s), to(s, i), fl(s), Mi(s, i), Yi(s);
3827
3827
  break;
3828
3828
  case "safari":
3829
3829
  if (!tr || !t.shimSafari)
3830
3830
  return e("Safari shim is not included in this adapter release."), n;
3831
- e("adapter.js shimming safari."), n.browserShim = tr, $s(s, i), Hl(s), Il(s), Ml(s), Kl(s), Tl(s), Nl(s), Yl(s), Jl(s), qs(s), Mi(s, i), Yi(s), io(s, i);
3831
+ e("adapter.js shimming safari."), n.browserShim = tr, $s(s, i), Hl(s), Il(s), Ml(s), Kl(s), Tl(s), Nl(s), Yl(s), Jl(s), qs(s), Mi(s, i), Yi(s), so(s, i);
3832
3832
  break;
3833
3833
  default:
3834
3834
  e("Unsupported browser!");
@@ -3840,7 +3840,7 @@ const er = sa({ window: typeof window > "u" ? void 0 : window });
3840
3840
  function te(s, t, e, i) {
3841
3841
  Object.defineProperty(s, t, { get: e, set: i, enumerable: !0, configurable: !0 });
3842
3842
  }
3843
- var xn = (
3843
+ var Ln = (
3844
3844
  //@ts-ignore
3845
3845
  er.default || er
3846
3846
  ), Gi = new /** @class */
@@ -3862,11 +3862,11 @@ var xn = (
3862
3862
  var t = this.getBrowser(), e = this.getVersion(), i = this.supportedBrowsers.includes(t);
3863
3863
  return i ? t === "chrome" ? e >= this.minChromeVersion : t === "firefox" ? e >= this.minFirefoxVersion : t === "safari" ? !this.isIOS && e >= this.minSafariVersion : !1 : !1;
3864
3864
  }, s.prototype.getBrowser = function() {
3865
- return xn.browserDetails.browser;
3865
+ return Ln.browserDetails.browser;
3866
3866
  }, s.prototype.getVersion = function() {
3867
- return xn.browserDetails.version || 0;
3867
+ return Ln.browserDetails.version || 0;
3868
3868
  }, s.prototype.isUnifiedPlanSupported = function() {
3869
- var t = this.getBrowser(), e = xn.browserDetails.version || 0;
3869
+ var t = this.getBrowser(), e = Ln.browserDetails.version || 0;
3870
3870
  if (t === "chrome" && e < this.minChromeVersion)
3871
3871
  return !1;
3872
3872
  if (t === "firefox" && e >= this.minFirefoxVersion)
@@ -3976,7 +3976,7 @@ var xn = (
3976
3976
  }, s;
3977
3977
  }()
3978
3978
  ), U = new na(), Ul = {};
3979
- te(Ul, "Peer", () => oo, (s) => oo = s);
3979
+ te(Ul, "Peer", () => ro, (s) => ro = s);
3980
3980
  var fs = {}, oa = Object.prototype.hasOwnProperty, xt = "~";
3981
3981
  function Pi() {
3982
3982
  }
@@ -4355,8 +4355,8 @@ var aa = function() {
4355
4355
  this._socket && (this._socket.onopen = this._socket.onmessage = this._socket.onclose = null, this._socket.close(), this._socket = void 0), clearTimeout(this._wsPingTimer);
4356
4356
  }, t;
4357
4357
  }(fs.EventEmitter)
4358
- ), so = {};
4359
- te(so, "MediaConnection", () => lr, (s) => lr = s);
4358
+ ), no = {};
4359
+ te(no, "MediaConnection", () => lr, (s) => lr = s);
4360
4360
  var go = {};
4361
4361
  te(go, "Negotiator", () => or, (s) => or = s);
4362
4362
  var rn = function() {
@@ -4947,8 +4947,8 @@ var pa = function() {
4947
4947
  this._negotiator && (this._negotiator.cleanup(), this._negotiator = null), this._localStream = null, this._remoteStream = null, this.provider && (this.provider._removeConnection(this), this.provider = null), this.options && this.options._stream && (this.options._stream = null), this.open && (this._open = !1, s.prototype.emit.call(this, "close"));
4948
4948
  }, t.ID_PREFIX = "mc_", t;
4949
4949
  }(zo.BaseConnection)
4950
- ), no = {};
4951
- te(no, "DataConnection", () => ar, (s) => ar = s);
4950
+ ), oo = {};
4951
+ te(oo, "DataConnection", () => ar, (s) => ar = s);
4952
4952
  var Ql = {};
4953
4953
  te(Ql, "EncodingQueue", () => cr, (s) => cr = s);
4954
4954
  var ya = function() {
@@ -5454,7 +5454,7 @@ var dr = function(s, t, e, i) {
5454
5454
  }
5455
5455
  }
5456
5456
  return o;
5457
- }, oo = (
5457
+ }, ro = (
5458
5458
  /** @class */
5459
5459
  function(s) {
5460
5460
  Xa(t, s);
@@ -5588,14 +5588,14 @@ var dr = function(s, t, e, i) {
5588
5588
  case ht.Offer:
5589
5589
  var m = r.connectionId, b = this.getConnection(c, m);
5590
5590
  if (b && (b.close(), T.default.warn("Offer received for existing Connection ID:".concat(m))), r.type === Bt.Media) {
5591
- var l = new so.MediaConnection(c, this, {
5591
+ var l = new no.MediaConnection(c, this, {
5592
5592
  connectionId: m,
5593
5593
  _payload: r,
5594
5594
  metadata: r.metadata
5595
5595
  });
5596
5596
  b = l, this._addConnection(c, b), this.emit("call", l);
5597
5597
  } else if (r.type === Bt.Data) {
5598
- var a = new no.DataConnection(c, this, {
5598
+ var a = new oo.DataConnection(c, this, {
5599
5599
  connectionId: m,
5600
5600
  _payload: r,
5601
5601
  metadata: r.metadata,
@@ -5646,7 +5646,7 @@ var dr = function(s, t, e, i) {
5646
5646
  T.default.warn("You cannot connect to a new Peer because you called .disconnect() on this Peer and ended your connection with the server. You can create a new Peer to reconnect, or call reconnect on this peer if you believe its ID to still be available."), this.emitError(q.Disconnected, "Cannot connect to new Peer after disconnecting from server.");
5647
5647
  return;
5648
5648
  }
5649
- var n = new no.DataConnection(e, this, i);
5649
+ var n = new oo.DataConnection(e, this, i);
5650
5650
  return this._addConnection(e, n), n;
5651
5651
  }, t.prototype.call = function(e, i, n) {
5652
5652
  if (n === void 0 && (n = {}), this.disconnected) {
@@ -5657,7 +5657,7 @@ var dr = function(s, t, e, i) {
5657
5657
  T.default.error("To call a peer, you must provide a stream from your browser's `getUserMedia`.");
5658
5658
  return;
5659
5659
  }
5660
- var o = new so.MediaConnection(e, this, Ji(Ji({}, n), {
5660
+ var o = new no.MediaConnection(e, this, Ji(Ji({}, n), {
5661
5661
  _stream: i
5662
5662
  }));
5663
5663
  return this._addConnection(e, o), o;
@@ -5776,7 +5776,7 @@ var dr = function(s, t, e, i) {
5776
5776
  const Hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5777
5777
  __proto__: null,
5778
5778
  get Peer() {
5779
- return oo;
5779
+ return ro;
5780
5780
  },
5781
5781
  default: Va,
5782
5782
  util: U
@@ -5837,7 +5837,7 @@ function va(s, t, e, i) {
5837
5837
  return t ^ e ^ i;
5838
5838
  }
5839
5839
  }
5840
- function Ln(s, t) {
5840
+ function Sn(s, t) {
5841
5841
  return s << t | s >>> 32 - t;
5842
5842
  }
5843
5843
  function Ka(s) {
@@ -5863,11 +5863,11 @@ function Ka(s) {
5863
5863
  for (let p = 0; p < 16; ++p)
5864
5864
  c[p] = o[r][p];
5865
5865
  for (let p = 16; p < 80; ++p)
5866
- c[p] = Ln(c[p - 3] ^ c[p - 8] ^ c[p - 14] ^ c[p - 16], 1);
5866
+ c[p] = Sn(c[p - 3] ^ c[p - 8] ^ c[p - 14] ^ c[p - 16], 1);
5867
5867
  let l = e[0], a = e[1], d = e[2], h = e[3], u = e[4];
5868
5868
  for (let p = 0; p < 80; ++p) {
5869
- const m = Math.floor(p / 20), b = Ln(l, 5) + va(m, a, d, h) + u + t[m] + c[p] >>> 0;
5870
- u = h, h = d, d = Ln(a, 30) >>> 0, a = l, l = b;
5869
+ const m = Math.floor(p / 20), b = Sn(l, 5) + va(m, a, d, h) + u + t[m] + c[p] >>> 0;
5870
+ u = h, h = d, d = Sn(a, 30) >>> 0, a = l, l = b;
5871
5871
  }
5872
5872
  e[0] = e[0] + l >>> 0, e[1] = e[1] + a >>> 0, e[2] = e[2] + d >>> 0, e[3] = e[3] + h >>> 0, e[4] = e[4] + u >>> 0;
5873
5873
  }
@@ -5940,16 +5940,16 @@ var Bl = { exports: {} }, El = { exports: {} };
5940
5940
  };
5941
5941
  El.exports = t;
5942
5942
  })();
5943
- var Ma = El.exports, ro = {
5943
+ var Ma = El.exports, lo = {
5944
5944
  // UTF-8 encoding
5945
5945
  utf8: {
5946
5946
  // Convert a string to a byte array
5947
5947
  stringToBytes: function(s) {
5948
- return ro.bin.stringToBytes(unescape(encodeURIComponent(s)));
5948
+ return lo.bin.stringToBytes(unescape(encodeURIComponent(s)));
5949
5949
  },
5950
5950
  // Convert a byte array to a string
5951
5951
  bytesToString: function(s) {
5952
- return decodeURIComponent(escape(ro.bin.bytesToString(s)));
5952
+ return decodeURIComponent(escape(lo.bin.bytesToString(s)));
5953
5953
  }
5954
5954
  },
5955
5955
  // Binary encoding
@@ -5967,7 +5967,7 @@ var Ma = El.exports, ro = {
5967
5967
  return t.join("");
5968
5968
  }
5969
5969
  }
5970
- }, pr = ro;
5970
+ }, pr = lo;
5971
5971
  /*!
5972
5972
  * Determine if an object is a Buffer
5973
5973
  *
@@ -6015,7 +6015,7 @@ function ka(s) {
6015
6015
  };
6016
6016
  })();
6017
6017
  var Ha = Bl.exports;
6018
- const Iu = /* @__PURE__ */ mn(Ha), yt = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
6018
+ const Iu = /* @__PURE__ */ bn(Ha), yt = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
6019
6019
  let mr = 1234567;
6020
6020
  const Ol = Math.PI / 180, _l = 180 / Math.PI;
6021
6021
  function Na() {
@@ -6558,10 +6558,10 @@ class Y {
6558
6558
  return this.copy(t).multiplyScalar(i);
6559
6559
  }
6560
6560
  projectOnPlane(t) {
6561
- return Sn.copy(this).projectOnVector(t), this.sub(Sn);
6561
+ return Wn.copy(this).projectOnVector(t), this.sub(Wn);
6562
6562
  }
6563
6563
  reflect(t) {
6564
- return this.sub(Sn.copy(t).multiplyScalar(2 * this.dot(t)));
6564
+ return this.sub(Wn.copy(t).multiplyScalar(2 * this.dot(t)));
6565
6565
  }
6566
6566
  angleTo(t) {
6567
6567
  const e = Math.sqrt(this.lengthSq() * t.lengthSq());
@@ -6627,7 +6627,7 @@ class Y {
6627
6627
  yield this.x, yield this.y, yield this.z;
6628
6628
  }
6629
6629
  }
6630
- const Sn = new Y(), br = new w(), Ws = 2e3, yr = 2001;
6630
+ const Wn = new Y(), br = new w(), Ws = 2e3, yr = 2001;
6631
6631
  class $t {
6632
6632
  constructor(t, e, i, n, o, r, c, l, a, d, h, u, p, m, b, G) {
6633
6633
  this.isMatrix4 = !0, $t.prototype.isMatrix4 = !0, this.elements = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], t !== void 0 && this.set(t, e, i, n, o, r, c, l, a, d, h, u, p, m, b, G);
@@ -7366,13 +7366,13 @@ class At {
7366
7366
  return this.set(i * l, i * a, -i * (l * r + a * c) + r + t, -n * a, n * l, -n * (-a * r + l * c) + c + e, 0, 0, 1), this;
7367
7367
  }
7368
7368
  scale(t, e) {
7369
- return this.premultiply(Wn.makeScale(t, e)), this;
7369
+ return this.premultiply(Cn.makeScale(t, e)), this;
7370
7370
  }
7371
7371
  rotate(t) {
7372
- return this.premultiply(Wn.makeRotation(-t)), this;
7372
+ return this.premultiply(Cn.makeRotation(-t)), this;
7373
7373
  }
7374
7374
  translate(t, e) {
7375
- return this.premultiply(Wn.makeTranslation(t, e)), this;
7375
+ return this.premultiply(Cn.makeTranslation(t, e)), this;
7376
7376
  }
7377
7377
  makeTranslation(t, e) {
7378
7378
  return t.isVector2 ? this.set(1, 0, t.x, 0, 1, t.y, 0, 0, 1) : this.set(1, 0, t, 0, 1, e, 0, 0, 1), this;
@@ -7404,7 +7404,7 @@ class At {
7404
7404
  return new At().fromArray(this.elements);
7405
7405
  }
7406
7406
  }
7407
- const Wn = new At();
7407
+ const Cn = new At();
7408
7408
  var Rt;
7409
7409
  (function(s) {
7410
7410
  s[s.Random = 0] = "Random", s[s.Loop = 1] = "Loop", s[s.PingPong = 2] = "PingPong", s[s.Burst = 3] = "Burst";
@@ -7635,7 +7635,7 @@ class Qe {
7635
7635
  startGen(t) {
7636
7636
  }
7637
7637
  }
7638
- const Cn = new Tt();
7638
+ const gn = new Tt();
7639
7639
  class an {
7640
7640
  constructor(t, e) {
7641
7641
  this.indexCount = 0, this.type = "function", this.gradient1 = t, this.gradient2 = e;
@@ -7644,7 +7644,7 @@ class an {
7644
7644
  this.indexCount = t.length, t.push(Math.random());
7645
7645
  }
7646
7646
  genColor(t, e, i) {
7647
- return this.gradient1.genColor(t, e, i), this.gradient2.genColor(t, Cn, i), t && t[this.indexCount] !== void 0 ? e.lerp(Cn, t[this.indexCount]) : e.lerp(Cn, Math.random()), e;
7647
+ return this.gradient1.genColor(t, e, i), this.gradient2.genColor(t, gn, i), t && t[this.indexCount] !== void 0 ? e.lerp(gn, t[this.indexCount]) : e.lerp(gn, Math.random()), e;
7648
7648
  }
7649
7649
  toJSON() {
7650
7650
  return {
@@ -8075,7 +8075,7 @@ class _i {
8075
8075
  function zs(s, t) {
8076
8076
  return Math.floor(Math.random() * (t - s)) + s;
8077
8077
  }
8078
- const yn = new Y(0, 1, 0), Gn = new Y(0, 0, 0), cd = new Y(1, 1, 1), Xr = new Y(0, 0, 1);
8078
+ const Gn = new Y(0, 1, 0), Zn = new Y(0, 0, 0), cd = new Y(1, 1, 1), Xr = new Y(0, 0, 1);
8079
8079
  class Di {
8080
8080
  constructor(t = {}) {
8081
8081
  var e, i, n, o, r, c, l;
@@ -8086,7 +8086,7 @@ class Di {
8086
8086
  }
8087
8087
  initialize(t, e) {
8088
8088
  const i = Vs(this.mode, this.currentValue, this.spread, e), n = Math.random(), o = hi.lerp(1 - this.thickness, 1, Math.random()), r = i * this.arc, c = n * Math.PI * 2, l = Math.sin(r), a = Math.cos(r);
8089
- t.position.x = this.radius * a, t.position.y = this.radius * l, t.position.z = 0, t.velocity.z = this.donutRadius * o * Math.sin(c), t.velocity.x = this.donutRadius * o * Math.cos(c) * a, t.velocity.y = this.donutRadius * o * Math.cos(c) * l, t.position.add(t.velocity), t.velocity.normalize().multiplyScalar(t.startSpeed), t.rotation instanceof w && (this._m1.lookAt(Gn, t.velocity, yn), t.rotation.setFromRotationMatrix(this._m1));
8089
+ t.position.x = this.radius * a, t.position.y = this.radius * l, t.position.z = 0, t.velocity.z = this.donutRadius * o * Math.sin(c), t.velocity.x = this.donutRadius * o * Math.cos(c) * a, t.velocity.y = this.donutRadius * o * Math.cos(c) * l, t.position.add(t.velocity), t.velocity.normalize().multiplyScalar(t.startSpeed), t.rotation instanceof w && (this._m1.lookAt(Zn, t.velocity, Gn), t.rotation.setFromRotationMatrix(this._m1));
8090
8090
  }
8091
8091
  toJSON() {
8092
8092
  return {
@@ -8131,7 +8131,7 @@ class Ai {
8131
8131
  }
8132
8132
  initialize(t) {
8133
8133
  const e = Math.random(), i = Math.random(), n = e * Math.PI * 2, o = Math.acos(2 * i - 1), r = Math.cbrt(Math.random()), c = Math.sin(n), l = Math.cos(n), a = Math.sin(o), d = Math.cos(o);
8134
- t.velocity.x = r * a * l, t.velocity.y = r * a * c, t.velocity.z = r * d, t.velocity.multiplyScalar(t.startSpeed), t.position.setScalar(0), t.rotation instanceof w && (this._m1.lookAt(Gn, t.position, yn), t.rotation.setFromRotationMatrix(this._m1));
8134
+ t.velocity.x = r * a * l, t.velocity.y = r * a * c, t.velocity.z = r * d, t.velocity.multiplyScalar(t.startSpeed), t.position.setScalar(0), t.rotation instanceof w && (this._m1.lookAt(Zn, t.position, Gn), t.rotation.setFromRotationMatrix(this._m1));
8135
8135
  }
8136
8136
  toJSON() {
8137
8137
  return {
@@ -8155,7 +8155,7 @@ class ai {
8155
8155
  }
8156
8156
  initialize(t, e) {
8157
8157
  const i = Vs(this.mode, this.currentValue, this.spread, e), n = Math.random(), o = hi.lerp(1 - this.thickness, 1, Math.random()), r = i * this.arc, c = Math.acos(2 * n - 1), l = Math.sin(r), a = Math.cos(r), d = Math.sin(c), h = Math.cos(c);
8158
- t.position.x = d * a, t.position.y = d * l, t.position.z = h, t.velocity.copy(t.position).multiplyScalar(t.startSpeed), t.position.multiplyScalar(this.radius * o), t.rotation instanceof w && (this._m1.lookAt(Gn, t.position, yn), t.rotation.setFromRotationMatrix(this._m1));
8158
+ t.position.x = d * a, t.position.y = d * l, t.position.z = h, t.velocity.copy(t.position).multiplyScalar(t.startSpeed), t.position.multiplyScalar(this.radius * o), t.rotation instanceof w && (this._m1.lookAt(Zn, t.position, Gn), t.rotation.setFromRotationMatrix(this._m1));
8159
8159
  }
8160
8160
  toJSON() {
8161
8161
  return {
@@ -8199,7 +8199,7 @@ class qi {
8199
8199
  }
8200
8200
  initialize(t, e) {
8201
8201
  const i = Vs(this.mode, this.currentValue, this.spread, e), n = Math.random(), o = hi.lerp(1 - this.thickness, 1, Math.random()), r = i * this.arc, c = Math.acos(n), l = Math.sin(r), a = Math.cos(r), d = Math.sin(c), h = Math.cos(c);
8202
- t.position.x = d * a, t.position.y = d * l, t.position.z = h, t.velocity.copy(t.position).multiplyScalar(t.startSpeed), t.position.multiplyScalar(this.radius * o), t.rotation instanceof w && (this._m1.lookAt(Gn, t.position, yn), t.rotation.setFromRotationMatrix(this._m1));
8202
+ t.position.x = d * a, t.position.y = d * l, t.position.z = h, t.velocity.copy(t.position).multiplyScalar(t.startSpeed), t.position.multiplyScalar(this.radius * o), t.rotation instanceof w && (this._m1.lookAt(Zn, t.position, Gn), t.rotation.setFromRotationMatrix(this._m1));
8203
8203
  }
8204
8204
  toJSON() {
8205
8205
  return {
@@ -8265,7 +8265,7 @@ class $i {
8265
8265
  update(t, e) {
8266
8266
  }
8267
8267
  }
8268
- const lo = {
8268
+ const co = {
8269
8269
  circle: {
8270
8270
  type: "circle",
8271
8271
  params: [
@@ -8349,7 +8349,7 @@ const lo = {
8349
8349
  }
8350
8350
  };
8351
8351
  function ad(s, t) {
8352
- return lo[s.type].loadJSON(s, t);
8352
+ return co[s.type].loadJSON(s, t);
8353
8353
  }
8354
8354
  class ts {
8355
8355
  constructor(t) {
@@ -8574,7 +8574,7 @@ class ls {
8574
8574
  reset() {
8575
8575
  }
8576
8576
  }
8577
- class gn {
8577
+ class zn {
8578
8578
  constructor(t) {
8579
8579
  this.data = t, this.next = null, this.prev = null;
8580
8580
  }
@@ -8614,15 +8614,15 @@ class dd {
8614
8614
  }
8615
8615
  }
8616
8616
  queue(t) {
8617
- const e = new gn(t);
8617
+ const e = new zn(t);
8618
8618
  this.tail || (this.tail = e), this.head && (this.head.prev = e, e.next = this.head), this.head = e, this.length++;
8619
8619
  }
8620
8620
  push(t) {
8621
- const e = new gn(t);
8621
+ const e = new zn(t);
8622
8622
  this.head || (this.head = e), this.tail && (this.tail.next = e, e.prev = this.tail), this.tail = e, this.length++;
8623
8623
  }
8624
8624
  insertBefore(t, e) {
8625
- const i = new gn(e);
8625
+ const i = new zn(e);
8626
8626
  i.next = t, i.prev = t.prev, i.prev !== null && (i.prev.next = i), i.next.prev = i, t == this.head && (this.head = i), this.length++;
8627
8627
  }
8628
8628
  remove(t) {
@@ -8655,7 +8655,7 @@ class ud {
8655
8655
  this.position = t, this.size = e, this.color = i;
8656
8656
  }
8657
8657
  }
8658
- class co {
8658
+ class ao {
8659
8659
  constructor() {
8660
8660
  this.startSpeed = 0, this.startColor = new Tt(), this.startSize = new Y(1, 1, 1), this.position = new Y(), this.velocity = new Y(), this.age = 0, this.life = 1, this.size = new Y(1, 1, 1), this.length = 100, this.speedModifier = 1, this.color = new Tt(), this.previous = new dd(), this.uvTile = 0, this.memory = [];
8661
8661
  }
@@ -8678,7 +8678,7 @@ class cs {
8678
8678
  this.width = t, this.type = "WidthOverLength";
8679
8679
  }
8680
8680
  update(t) {
8681
- if (t instanceof co) {
8681
+ if (t instanceof ao) {
8682
8682
  const e = t.previous.values();
8683
8683
  for (let i = 0; i < t.previous.length; i++) {
8684
8684
  const n = e.next();
@@ -9206,7 +9206,7 @@ class ps {
9206
9206
  reset() {
9207
9207
  }
9208
9208
  }
9209
- const Ot = [], zn = new Y(), vn = new w();
9209
+ const Ot = [], vn = new Y(), Kn = new w();
9210
9210
  class ms {
9211
9211
  constructor(t, e, i = new Q(1), n = new Q(0)) {
9212
9212
  if (this.frequency = t, this.power = e, this.positionAmount = i, this.rotationAmount = n, this.type = "Noise", this.duration = 0, Ot.length === 0)
@@ -9218,7 +9218,7 @@ class ms {
9218
9218
  }
9219
9219
  update(t, e) {
9220
9220
  let i = this.frequency.genValue(t.memory, t.age / t.life), n = this.power.genValue(t.memory, t.age / t.life), o = this.positionAmount.genValue(t.memory, t.age / t.life), r = this.rotationAmount.genValue(t.memory, t.age / t.life);
9221
- o > 0 && t.lastPosNoise !== void 0 && (t.position.sub(t.lastPosNoise), zn.set(Ot[t.generatorIndex[0]].noise2D(0, t.age * i) * n * o, Ot[t.generatorIndex[1]].noise2D(0, t.age * i) * n * o, Ot[t.generatorIndex[2]].noise2D(0, t.age * i) * n * o), t.position.add(zn), t.lastPosNoise.copy(zn)), r > 0 && t.lastRotNoise !== void 0 && (typeof t.rotation == "number" ? (t.rotation -= t.lastRotNoise, t.rotation += Ot[t.generatorIndex[3]].noise2D(0, t.age * i) * Math.PI * n * r) : (t.lastRotNoise.invert(), t.rotation.multiply(t.lastRotNoise), vn.set(Ot[t.generatorIndex[0]].noise2D(0, t.age * i) * n * r, Ot[t.generatorIndex[1]].noise2D(0, t.age * i) * n * r, Ot[t.generatorIndex[2]].noise2D(0, t.age * i) * n * r, Ot[t.generatorIndex[3]].noise2D(0, t.age * i) * n * r).normalize(), t.rotation.multiply(vn), t.lastRotNoise.copy(vn)));
9221
+ o > 0 && t.lastPosNoise !== void 0 && (t.position.sub(t.lastPosNoise), vn.set(Ot[t.generatorIndex[0]].noise2D(0, t.age * i) * n * o, Ot[t.generatorIndex[1]].noise2D(0, t.age * i) * n * o, Ot[t.generatorIndex[2]].noise2D(0, t.age * i) * n * o), t.position.add(vn), t.lastPosNoise.copy(vn)), r > 0 && t.lastRotNoise !== void 0 && (typeof t.rotation == "number" ? (t.rotation -= t.lastRotNoise, t.rotation += Ot[t.generatorIndex[3]].noise2D(0, t.age * i) * Math.PI * n * r) : (t.lastRotNoise.invert(), t.rotation.multiply(t.lastRotNoise), Kn.set(Ot[t.generatorIndex[0]].noise2D(0, t.age * i) * n * r, Ot[t.generatorIndex[1]].noise2D(0, t.age * i) * n * r, Ot[t.generatorIndex[2]].noise2D(0, t.age * i) * n * r, Ot[t.generatorIndex[3]].noise2D(0, t.age * i) * n * r).normalize(), t.rotation.multiply(Kn), t.lastRotNoise.copy(Kn)));
9222
9222
  }
9223
9223
  toJSON() {
9224
9224
  return {
@@ -9362,7 +9362,7 @@ class Zs {
9362
9362
  reset() {
9363
9363
  }
9364
9364
  }
9365
- const ao = {
9365
+ const un = {
9366
9366
  ApplyForce: {
9367
9367
  type: "ApplyForce",
9368
9368
  constructor: as,
@@ -9520,16 +9520,16 @@ const ao = {
9520
9520
  }
9521
9521
  };
9522
9522
  function Xd(s, t) {
9523
- return ao[s.type].loadJSON(s, t);
9523
+ return un[s.type] ? un[s.type].loadJSON(s, t) : null;
9524
9524
  }
9525
9525
  const fd = [];
9526
9526
  function Vd(s) {
9527
9527
  if (!fd.find((e) => e.id === s.id)) {
9528
9528
  s.initialize();
9529
9529
  for (const e of s.emitterShapes)
9530
- lo[e.type] || (lo[e.type] = e);
9530
+ co[e.type] || (co[e.type] = e);
9531
9531
  for (const e of s.behaviors)
9532
- ao[e.type] || (ao[e.type] = e);
9532
+ un[e.type] || (un[e.type] = e);
9533
9533
  }
9534
9534
  }
9535
9535
  var Rd = `
@@ -10087,7 +10087,7 @@ var K;
10087
10087
  (function(s) {
10088
10088
  s[s.BillBoard = 0] = "BillBoard", s[s.StretchedBillBoard = 1] = "StretchedBillBoard", s[s.Mesh = 2] = "Mesh", s[s.Trail = 3] = "Trail", s[s.HorizontalBillBoard = 4] = "HorizontalBillBoard", s[s.VerticalBillBoard = 5] = "VerticalBillBoard";
10089
10089
  })(K || (K = {}));
10090
- class tc extends pn {
10090
+ class tc extends mn {
10091
10091
  constructor(t) {
10092
10092
  super(), this.type = "VFXBatch", this.maxParticles = 1e3, this.systems = /* @__PURE__ */ new Set();
10093
10093
  const e = new _s();
@@ -10118,7 +10118,7 @@ class tc extends pn {
10118
10118
  e && e.value !== t && (e.value = t, this.material.needsUpdate = !0);
10119
10119
  }
10120
10120
  }
10121
- const Td = new Y(0, 0, 1), Kn = new w(), Md = new Y(), Yd = new Y();
10121
+ const Td = new Y(0, 0, 1), Tn = new w(), Md = new Y(), Yd = new Y();
10122
10122
  new Y();
10123
10123
  const fr = 60, kd = new Or(1, 1, 1, 1);
10124
10124
  class ho {
@@ -10264,12 +10264,12 @@ class ho {
10264
10264
  this.restart(), this.pause();
10265
10265
  }
10266
10266
  spawn(t, e, i) {
10267
- Kn.setFromRotationMatrix(i);
10268
- const n = Md, o = Kn, r = Yd;
10267
+ Tn.setFromRotationMatrix(i);
10268
+ const n = Md, o = Tn, r = Yd;
10269
10269
  i.decompose(n, o, r);
10270
10270
  for (let c = 0; c < t; c++) {
10271
10271
  for (e.burstParticleIndex = c, this.particleNum++; this.particles.length < this.particleNum; )
10272
- this.rendererSettings.renderMode === K.Trail ? this.particles.push(new co()) : this.particles.push(new hd());
10272
+ this.rendererSettings.renderMode === K.Trail ? this.particles.push(new ao()) : this.particles.push(new hd());
10273
10273
  const l = this.particles[this.particleNum - 1];
10274
10274
  if (l.reset(), l.speedModifier = 1, this.startColor.startGen(l.memory), this.startColor.genColor(l.memory, l.startColor, this.emissionState.time), l.color.copy(l.startColor), this.startSpeed.startGen(l.memory), l.startSpeed = this.startSpeed.genValue(l.memory, e.time / this.duration), this.startLife.startGen(l.memory), l.life = this.startLife.genValue(l.memory, e.time / this.duration), l.age = 0, this.startSize.startGen(l.memory), this.startSize.type === "vec3function")
10275
10275
  this.startSize.genValue(l.memory, l.startSize, e.time / this.duration);
@@ -10288,7 +10288,7 @@ class ho {
10288
10288
  const a = l;
10289
10289
  a.localPosition = new Y().copy(a.position);
10290
10290
  }
10291
- this.worldSpace ? (l.position.applyMatrix4(i), l.startSize.multiply(r).abs(), l.size.copy(l.startSize), l.velocity.multiply(r).applyMatrix3(this.normalMatrix), l.rotation && l.rotation instanceof w && l.rotation.multiplyQuaternions(Kn, l.rotation)) : this.onlyUsedByOther && (l.parentMatrix = i);
10291
+ this.worldSpace ? (l.position.applyMatrix4(i), l.startSize.multiply(r).abs(), l.size.copy(l.startSize), l.velocity.multiply(r).applyMatrix3(this.normalMatrix), l.rotation && l.rotation instanceof w && l.rotation.multiplyQuaternions(Tn, l.rotation)) : this.onlyUsedByOther && (l.parentMatrix = i);
10292
10292
  for (let a = 0; a < this.behaviors.length; a++)
10293
10293
  this.behaviors[a].initialize(l, this);
10294
10294
  }
@@ -10336,7 +10336,7 @@ class ho {
10336
10336
  this.particles[i].update();
10337
10337
  for (let i = 0; i < this.particleNum; i++) {
10338
10338
  const n = this.particles[i];
10339
- n.died && (!(n instanceof co) || n.previous.length === 0) && (this.particles[i] = this.particles[this.particleNum - 1], this.particles[this.particleNum - 1] = n, this.particleNum--, i--, this.fire({ type: "particleDied", particleSystem: this, particle: n }));
10339
+ n.died && (!(n instanceof ao) || n.previous.length === 0) && (this.particles[i] = this.particles[this.particleNum - 1], this.particles[this.particleNum - 1] = n, this.particleNum--, i--, this.fire({ type: "particleDied", particleSystem: this, particle: n }));
10340
10340
  }
10341
10341
  }
10342
10342
  emit(t, e, i) {
@@ -10470,16 +10470,16 @@ class ho {
10470
10470
  rendererEmitterSettings: c,
10471
10471
  renderOrder: t.renderOrder,
10472
10472
  layers: l,
10473
- material: t.material ? e.materials[t.material] : t.texture ? new Bn({
10473
+ material: t.material ? e.materials[t.material] : t.texture ? new En({
10474
10474
  map: e.textures[t.texture],
10475
10475
  transparent: (o = t.transparent) !== null && o !== void 0 ? o : !0,
10476
10476
  blending: t.blending,
10477
- side: En
10478
- }) : new Bn({
10477
+ side: jn
10478
+ }) : new En({
10479
10479
  color: 16777215,
10480
10480
  transparent: !0,
10481
10481
  blending: _r,
10482
- side: En
10482
+ side: jn
10483
10483
  }),
10484
10484
  startTileIndex: typeof t.startTileIndex == "number" ? new Q(t.startTileIndex) : I(t.startTileIndex),
10485
10485
  uTileCount: t.uTileCount,
@@ -10567,7 +10567,7 @@ class ho {
10567
10567
  });
10568
10568
  }
10569
10569
  }
10570
- var Tn = `
10570
+ var Mn = `
10571
10571
 
10572
10572
  #include <common>
10573
10573
  #include <color_pars_fragment>
@@ -11030,9 +11030,9 @@ class Pd extends tc {
11030
11030
  let r = !1;
11031
11031
  if (this.settings.renderMode === K.BillBoard || this.settings.renderMode === K.VerticalBillBoard || this.settings.renderMode === K.HorizontalBillBoard || this.settings.renderMode === K.Mesh) {
11032
11032
  let c, l;
11033
- this.settings.renderMode === K.Mesh ? this.settings.material.type === "MeshStandardMaterial" || this.settings.material.type === "MeshPhysicalMaterial" ? (e.USE_COLOR = "", c = To, l = Ko, r = !0) : (c = Nd, l = Tn) : (c = Hd, l = Tn), this.settings.renderMode === K.VerticalBillBoard ? e.VERTICAL = "" : this.settings.renderMode === K.HorizontalBillBoard && (e.HORIZONTAL = "");
11033
+ this.settings.renderMode === K.Mesh ? this.settings.material.type === "MeshStandardMaterial" || this.settings.material.type === "MeshPhysicalMaterial" ? (e.USE_COLOR = "", c = To, l = Ko, r = !0) : (c = Nd, l = Mn) : (c = Hd, l = Mn), this.settings.renderMode === K.VerticalBillBoard ? e.VERTICAL = "" : this.settings.renderMode === K.HorizontalBillBoard && (e.HORIZONTAL = "");
11034
11034
  let a = !1;
11035
- this.settings.renderMode === K.Mesh && (this.settings.material.type === "MeshStandardMaterial" ? (this.material = new Jd({}), this.material.copy(this.settings.material), this.material.uniforms = t, this.material.defines = e, a = !0) : this.settings.material.type === "MeshPhysicalMaterial" && (this.material = new Ud({}), this.material.copy(this.settings.material), this.material.uniforms = t, this.material.defines = e, a = !0)), a || (this.material = new jn({
11035
+ this.settings.renderMode === K.Mesh && (this.settings.material.type === "MeshStandardMaterial" ? (this.material = new Jd({}), this.material.copy(this.settings.material), this.material.uniforms = t, this.material.defines = e, a = !0) : this.settings.material.type === "MeshPhysicalMaterial" && (this.material = new Ud({}), this.material.copy(this.settings.material), this.material.uniforms = t, this.material.defines = e, a = !0)), a || (this.material = new On({
11036
11036
  uniforms: t,
11037
11037
  defines: e,
11038
11038
  vertexShader: c,
@@ -11050,11 +11050,11 @@ class Pd extends tc {
11050
11050
  lights: r
11051
11051
  }));
11052
11052
  } else if (this.settings.renderMode === K.StretchedBillBoard)
11053
- t.speedFactor = new Qt(1), this.material = new jn({
11053
+ t.speedFactor = new Qt(1), this.material = new On({
11054
11054
  uniforms: t,
11055
11055
  defines: e,
11056
11056
  vertexShader: Id,
11057
- fragmentShader: Tn,
11057
+ fragmentShader: Mn,
11058
11058
  transparent: this.settings.material.transparent,
11059
11059
  depthWrite: !this.settings.material.transparent,
11060
11060
  blending: this.settings.material.blending,
@@ -11241,7 +11241,7 @@ class wd extends tc {
11241
11241
  alphaTest: { value: 0 }
11242
11242
  }, e = {};
11243
11243
  if (e.USE_UV = "", e.USE_COLOR_ALPHA = "", this.settings.material.map && (e.USE_MAP = "", e.MAP_UV = uo(this.settings.material.map.channel), t.map = new Qt(this.settings.material.map), t.mapTransform = new Qt(new At().copy(this.settings.material.map.matrix))), this.settings.material.defines && this.settings.material.defines.USE_COLOR_AS_ALPHA !== void 0 && (e.USE_COLOR_AS_ALPHA = ""), this.settings.renderMode === K.Trail)
11244
- this.material = new jn({
11244
+ this.material = new On({
11245
11245
  uniforms: t,
11246
11246
  defines: e,
11247
11247
  vertexShader: Qd,
@@ -12223,7 +12223,7 @@ const Pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12223
12223
  get WebsocketEvent() {
12224
12224
  return B;
12225
12225
  }
12226
- }, Symbol.toStringTag, { value: "Module" })), Yo = 0, sc = 1, nc = 2, $d = 0, th = 1, po = 2, en = 1.25, mo = 1, Re = 6 * 4 + 4 + 4, Zn = 65535, eh = Math.pow(2, -24), Mn = Symbol("SKIP_GENERATION");
12226
+ }, Symbol.toStringTag, { value: "Module" })), Yo = 0, sc = 1, nc = 2, $d = 0, th = 1, po = 2, en = 1.25, mo = 1, Re = 6 * 4 + 4 + 4, Xn = 65535, eh = Math.pow(2, -24), Yn = Symbol("SKIP_GENERATION");
12227
12227
  function oc(s) {
12228
12228
  return s.index ? s.index.count : s.attributes.position.count;
12229
12229
  }
@@ -12272,7 +12272,7 @@ function sh(s, t) {
12272
12272
  let o = 0;
12273
12273
  return i.forEach(({ count: r }) => o += r), e !== o;
12274
12274
  }
12275
- function Yn(s, t, e, i, n) {
12275
+ function kn(s, t, e, i, n) {
12276
12276
  let o = 1 / 0, r = 1 / 0, c = 1 / 0, l = -1 / 0, a = -1 / 0, d = -1 / 0, h = 1 / 0, u = 1 / 0, p = 1 / 0, m = -1 / 0, b = -1 / 0, G = -1 / 0;
12277
12277
  for (let y = t * 6, Z = (t + e) * 6; y < Z; y += 6) {
12278
12278
  const f = s[y + 0], V = s[y + 1], X = f - V, R = f + V;
@@ -12441,7 +12441,7 @@ function lh(s, t, e, i) {
12441
12441
  n += s[o * 6 + i * 2];
12442
12442
  return n / e;
12443
12443
  }
12444
- class kn {
12444
+ class Hn {
12445
12445
  constructor() {
12446
12446
  this.boundingData = new Float32Array(6);
12447
12447
  }
@@ -12529,7 +12529,7 @@ function yo(s, t) {
12529
12529
  return s + r.byteLength;
12530
12530
  } else {
12531
12531
  const r = t.offset, c = t.count;
12532
- return ki[e + 6] = r, sn[i + 14] = c, sn[i + 15] = Zn, s + Re;
12532
+ return ki[e + 6] = r, sn[i + 14] = c, sn[i + 15] = Xn, s + Re;
12533
12533
  }
12534
12534
  else {
12535
12535
  const r = t.left, c = t.right, l = t.splitAxis;
@@ -12555,8 +12555,8 @@ function ph(s, t, e, i, n) {
12555
12555
  indirect: d
12556
12556
  } = n, h = s._indirectBuffer, u = s.geometry, p = u.index ? u.index.array : null, m = d ? ah : ch, b = ui(u), G = new Float32Array(6);
12557
12557
  let y = !1;
12558
- const Z = new kn();
12559
- return Yn(t, e, i, Z.boundingData, G), V(Z, e, i, G), Z;
12558
+ const Z = new Hn();
12559
+ return kn(t, e, i, Z.boundingData, G), V(Z, e, i, G), Z;
12560
12560
  function f(X) {
12561
12561
  a && a(X / b);
12562
12562
  }
@@ -12571,10 +12571,10 @@ function ph(s, t, e, i, n) {
12571
12571
  f(R + x), X.offset = R, X.count = x;
12572
12572
  else {
12573
12573
  X.splitAxis = L.axis;
12574
- const W = new kn(), z = R, v = g - R;
12575
- X.left = W, Yn(t, z, v, W.boundingData, G), V(W, z, v, G, C + 1);
12576
- const k = new kn(), N = g, J = x - v;
12577
- X.right = k, Yn(t, N, J, k.boundingData, G), V(k, N, J, G, C + 1);
12574
+ const W = new Hn(), z = R, v = g - R;
12575
+ X.left = W, kn(t, z, v, W.boundingData, G), V(W, z, v, G, C + 1);
12576
+ const k = new Hn(), N = g, J = x - v;
12577
+ X.right = k, kn(t, N, J, k.boundingData, G), V(k, N, J, G, C + 1);
12578
12578
  }
12579
12579
  return X;
12580
12580
  }
@@ -12682,7 +12682,7 @@ const bh = function() {
12682
12682
  return !1;
12683
12683
  };
12684
12684
  }(), Gh = 1e-15;
12685
- function Hn(s) {
12685
+ function Nn(s) {
12686
12686
  return Math.abs(s) < Gh;
12687
12687
  }
12688
12688
  class Ht extends wt {
@@ -12723,13 +12723,13 @@ Ht.prototype.intersectsTriangle = function() {
12723
12723
  for (let X = 0; X < 3; X++) {
12724
12724
  const { start: R, end: x } = d;
12725
12725
  R.copy(Z[X]), x.copy(Z[(X + 1) % 3]), d.delta(r);
12726
- const S = Hn(G.distanceToPoint(R));
12727
- if (Hn(G.normal.dot(r)) && S) {
12726
+ const S = Nn(G.distanceToPoint(R));
12727
+ if (Nn(G.normal.dot(r)) && S) {
12728
12728
  y.copy(d), f = 2;
12729
12729
  break;
12730
12730
  }
12731
12731
  const C = G.intersectLine(d, p);
12732
- if (!C && S && p.copy(R), (C || S) && !Hn(p.distanceTo(x))) {
12732
+ if (!C && S && p.copy(R), (C || S) && !Nn(p.distanceTo(x))) {
12733
12733
  if (f <= 1)
12734
12734
  (f === 1 ? y.start : y.end).copy(p), S && (V = f);
12735
12735
  else if (f >= 2) {
@@ -13053,7 +13053,7 @@ function Go(s, t, e, i, n = null, o = 0, r = 0) {
13053
13053
  return !!C;
13054
13054
  }
13055
13055
  }
13056
- const Vi = /* @__PURE__ */ new M(), Nn = /* @__PURE__ */ new M();
13056
+ const Vi = /* @__PURE__ */ new M(), In = /* @__PURE__ */ new M();
13057
13057
  function Vh(s, t, e = {}, i = 0, n = 1 / 0) {
13058
13058
  const o = i * i, r = n * n;
13059
13059
  let c = 1 / 0, l = null;
@@ -13064,18 +13064,18 @@ function Vh(s, t, e = {}, i = 0, n = 1 / 0) {
13064
13064
  intersectsTriangle: (d, h) => {
13065
13065
  d.closestPointToPoint(t, Vi);
13066
13066
  const u = t.distanceToSquared(Vi);
13067
- return u < c && (Nn.copy(Vi), c = u, l = h), u < o;
13067
+ return u < c && (In.copy(Vi), c = u, l = h), u < o;
13068
13068
  }
13069
13069
  }
13070
13070
  ), c === 1 / 0)
13071
13071
  return null;
13072
13072
  const a = Math.sqrt(c);
13073
- return e.point ? e.point.copy(Nn) : e.point = Nn.clone(), e.distance = a, e.faceIndex = l, e;
13073
+ return e.point ? e.point.copy(In) : e.point = In.clone(), e.distance = a, e.faceIndex = l, e;
13074
13074
  }
13075
13075
  const Rh = parseInt(qr) >= 169, He = /* @__PURE__ */ new M(), Ne = /* @__PURE__ */ new M(), Ie = /* @__PURE__ */ new M(), ks = /* @__PURE__ */ new qt(), Hs = /* @__PURE__ */ new qt(), Ns = /* @__PURE__ */ new qt(), Lr = /* @__PURE__ */ new M(), Sr = /* @__PURE__ */ new M(), Wr = /* @__PURE__ */ new M(), Ri = /* @__PURE__ */ new M();
13076
13076
  function xh(s, t, e, i, n, o, r, c) {
13077
13077
  let l;
13078
- if (o === Lc ? l = s.intersectTriangle(i, e, t, !0, n) : l = s.intersectTriangle(t, e, i, o !== En, n), l === null)
13078
+ if (o === Lc ? l = s.intersectTriangle(i, e, t, !0, n) : l = s.intersectTriangle(t, e, i, o !== jn, n), l === null)
13079
13079
  return null;
13080
13080
  const a = s.origin.distanceTo(n);
13081
13081
  return a < r || a > c ? null : {
@@ -13100,7 +13100,7 @@ function Lh(s, t, e, i, n, o, r, c, l, a, d) {
13100
13100
  }
13101
13101
  return h;
13102
13102
  }
13103
- function Xn(s, t, e, i, n, o, r) {
13103
+ function fn(s, t, e, i, n, o, r) {
13104
13104
  const c = i * 3;
13105
13105
  let l = c + 0, a = c + 1, d = c + 2;
13106
13106
  const h = s.index;
@@ -13144,14 +13144,14 @@ function Sh(s, t, e, i) {
13144
13144
  function Wh(s, t, e, i, n, o, r, c) {
13145
13145
  const { geometry: l, _indirectBuffer: a } = s;
13146
13146
  for (let d = i, h = i + n; d < h; d++)
13147
- Xn(l, t, e, d, o, r, c);
13147
+ fn(l, t, e, d, o, r, c);
13148
13148
  }
13149
13149
  function Ch(s, t, e, i, n, o, r) {
13150
13150
  const { geometry: c, _indirectBuffer: l } = s;
13151
13151
  let a = 1 / 0, d = null;
13152
13152
  for (let h = i, u = i + n; h < u; h++) {
13153
13153
  let p;
13154
- p = Xn(c, t, e, h, null, o, r), p && p.distance < a && (d = p, a = p.distance);
13154
+ p = fn(c, t, e, h, null, o, r), p && p.distance < a && (d = p, a = p.distance);
13155
13155
  }
13156
13156
  return d;
13157
13157
  }
@@ -13173,7 +13173,7 @@ function zh(s, t = null) {
13173
13173
  o = d[u], r = new Uint32Array(o), c = new Uint16Array(o), l = new Float32Array(o), h(0, a), a += o.byteLength;
13174
13174
  function h(u, p, m = !1) {
13175
13175
  const b = u * 2;
13176
- if (c[b + 15] === Zn) {
13176
+ if (c[b + 15] === Xn) {
13177
13177
  const y = r[u + 6], Z = c[b + 14];
13178
13178
  let f = 1 / 0, V = 1 / 0, X = 1 / 0, R = -1 / 0, x = -1 / 0, S = -1 / 0;
13179
13179
  for (let C = 3 * y, L = 3 * (y + Z); C < L; C++) {
@@ -13211,7 +13211,7 @@ function vh(s, t, e, i, n, o, r, c) {
13211
13211
  const { geometry: l, _indirectBuffer: a } = s;
13212
13212
  for (let d = i, h = i + n; d < h; d++) {
13213
13213
  let u = a ? a[d] : d;
13214
- Xn(l, t, e, u, o, r, c);
13214
+ fn(l, t, e, u, o, r, c);
13215
13215
  }
13216
13216
  }
13217
13217
  function Kh(s, t, e, i, n, o, r) {
@@ -13219,7 +13219,7 @@ function Kh(s, t, e, i, n, o, r) {
13219
13219
  let a = 1 / 0, d = null;
13220
13220
  for (let h = i, u = i + n; h < u; h++) {
13221
13221
  let p;
13222
- p = Xn(c, t, e, l ? l[h] : h, null, o, r), p && p.distance < a && (d = p, a = p.distance);
13222
+ p = fn(c, t, e, l ? l[h] : h, null, o, r), p && p.distance < a && (d = p, a = p.distance);
13223
13223
  }
13224
13224
  return d;
13225
13225
  }
@@ -13309,16 +13309,16 @@ function fo(s, t, e, i, n = null) {
13309
13309
  return E(d, o, Is), !!(n.intersectsBox(Is) && fo(d, t, e, i, n) || (E(h, o, Is), n.intersectsBox(Is) && fo(h, t, e, i, n)));
13310
13310
  }
13311
13311
  }
13312
- const Us = /* @__PURE__ */ new kt(), In = /* @__PURE__ */ new Xt(), Ci = /* @__PURE__ */ new Xt(), Nh = /* @__PURE__ */ new M(), Ih = /* @__PURE__ */ new M(), Jh = /* @__PURE__ */ new M(), Uh = /* @__PURE__ */ new M();
13312
+ const Us = /* @__PURE__ */ new kt(), Jn = /* @__PURE__ */ new Xt(), Ci = /* @__PURE__ */ new Xt(), Nh = /* @__PURE__ */ new M(), Ih = /* @__PURE__ */ new M(), Jh = /* @__PURE__ */ new M(), Uh = /* @__PURE__ */ new M();
13313
13313
  function Ph(s, t, e, i = {}, n = {}, o = 0, r = 1 / 0) {
13314
- t.boundingBox || t.computeBoundingBox(), In.set(t.boundingBox.min, t.boundingBox.max, e), In.needsUpdate = !0;
13314
+ t.boundingBox || t.computeBoundingBox(), Jn.set(t.boundingBox.min, t.boundingBox.max, e), Jn.needsUpdate = !0;
13315
13315
  const c = s.geometry, l = c.attributes.position, a = c.index, d = t.attributes.position, h = t.index, u = Yt.getPrimitive(), p = Yt.getPrimitive();
13316
13316
  let m = Nh, b = Ih, G = null, y = null;
13317
13317
  n && (G = Jh, y = Uh);
13318
13318
  let Z = 1 / 0, f = null, V = null;
13319
13319
  return Us.copy(e).invert(), Ci.matrix.copy(Us), s.shapecast(
13320
13320
  {
13321
- boundsTraverseOrder: (X) => In.distanceToBox(X),
13321
+ boundsTraverseOrder: (X) => Jn.distanceToBox(X),
13322
13322
  intersectsBounds: (X, R, x) => x < Z && x < r ? (R && (Ci.min.copy(X.min), Ci.max.copy(X.max), Ci.needsUpdate = !0), !0) : !1,
13323
13323
  intersectsRange: (X, R) => {
13324
13324
  if (t.boundsTree)
@@ -13362,7 +13362,7 @@ function Fh(s, t = null) {
13362
13362
  o = d[u], r = new Uint32Array(o), c = new Uint16Array(o), l = new Float32Array(o), h(0, a), a += o.byteLength;
13363
13363
  function h(u, p, m = !1) {
13364
13364
  const b = u * 2;
13365
- if (c[b + 15] === Zn) {
13365
+ if (c[b + 15] === Xn) {
13366
13366
  const y = r[u + 6], Z = c[b + 14];
13367
13367
  let f = 1 / 0, V = 1 / 0, X = 1 / 0, R = -1 / 0, x = -1 / 0, S = -1 / 0;
13368
13368
  for (let C = y, L = y + Z; C < L; C++) {
@@ -13472,16 +13472,16 @@ function xo(s, t, e, i, n = null) {
13472
13472
  return E(d, o, Ps), !!(n.intersectsBox(Ps) && xo(d, t, e, i, n) || (E(h, o, Ps), n.intersectsBox(Ps) && xo(h, t, e, i, n)));
13473
13473
  }
13474
13474
  }
13475
- const Qs = /* @__PURE__ */ new kt(), Jn = /* @__PURE__ */ new Xt(), zi = /* @__PURE__ */ new Xt(), jh = /* @__PURE__ */ new M(), Oh = /* @__PURE__ */ new M(), _h = /* @__PURE__ */ new M(), Dh = /* @__PURE__ */ new M();
13475
+ const Qs = /* @__PURE__ */ new kt(), Un = /* @__PURE__ */ new Xt(), zi = /* @__PURE__ */ new Xt(), jh = /* @__PURE__ */ new M(), Oh = /* @__PURE__ */ new M(), _h = /* @__PURE__ */ new M(), Dh = /* @__PURE__ */ new M();
13476
13476
  function Ah(s, t, e, i = {}, n = {}, o = 0, r = 1 / 0) {
13477
- t.boundingBox || t.computeBoundingBox(), Jn.set(t.boundingBox.min, t.boundingBox.max, e), Jn.needsUpdate = !0;
13477
+ t.boundingBox || t.computeBoundingBox(), Un.set(t.boundingBox.min, t.boundingBox.max, e), Un.needsUpdate = !0;
13478
13478
  const c = s.geometry, l = c.attributes.position, a = c.index, d = t.attributes.position, h = t.index, u = Yt.getPrimitive(), p = Yt.getPrimitive();
13479
13479
  let m = jh, b = Oh, G = null, y = null;
13480
13480
  n && (G = _h, y = Dh);
13481
13481
  let Z = 1 / 0, f = null, V = null;
13482
13482
  return Qs.copy(e).invert(), zi.matrix.copy(Qs), s.shapecast(
13483
13483
  {
13484
- boundsTraverseOrder: (X) => Jn.distanceToBox(X),
13484
+ boundsTraverseOrder: (X) => Un.distanceToBox(X),
13485
13485
  intersectsBounds: (X, R, x) => x < Z && x < r ? (R && (zi.min.copy(X.min), zi.max.copy(X.max), zi.needsUpdate = !0), !0) : !1,
13486
13486
  intersectsRange: (X, R) => {
13487
13487
  if (t.boundsTree) {
@@ -13523,12 +13523,12 @@ function Ah(s, t, e, i = {}, n = {}, o = 0, r = 1 / 0) {
13523
13523
  function hc() {
13524
13524
  return typeof SharedArrayBuffer < "u";
13525
13525
  }
13526
- const Ui = new j.constructor(), un = new j.constructor(), Xe = new No(() => new Ct()), $e = new Ct(), ti = new Ct(), Un = new Ct(), Pn = new Ct();
13527
- let Fn = !1;
13526
+ const Ui = new j.constructor(), pn = new j.constructor(), Xe = new No(() => new Ct()), $e = new Ct(), ti = new Ct(), Pn = new Ct(), Fn = new Ct();
13527
+ let Qn = !1;
13528
13528
  function qh(s, t, e, i) {
13529
- if (Fn)
13529
+ if (Qn)
13530
13530
  throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");
13531
- Fn = !0;
13531
+ Qn = !0;
13532
13532
  const n = s._roots, o = t._roots;
13533
13533
  let r, c = 0, l = 0;
13534
13534
  const a = new kt().copy(e).invert();
@@ -13536,7 +13536,7 @@ function qh(s, t, e, i) {
13536
13536
  Ui.setBuffer(n[d]), l = 0;
13537
13537
  const u = Xe.getPrimitive();
13538
13538
  E(0, Ui.float32Array, u), u.applyMatrix4(a);
13539
- for (let p = 0, m = o.length; p < m && (un.setBuffer(o[p]), r = Ft(
13539
+ for (let p = 0, m = o.length; p < m && (pn.setBuffer(o[p]), r = Ft(
13540
13540
  0,
13541
13541
  0,
13542
13542
  e,
@@ -13547,16 +13547,16 @@ function qh(s, t, e, i) {
13547
13547
  0,
13548
13548
  0,
13549
13549
  u
13550
- ), un.clearBuffer(), l += o[p].length, !r); p++)
13550
+ ), pn.clearBuffer(), l += o[p].length, !r); p++)
13551
13551
  ;
13552
13552
  if (Xe.releasePrimitive(u), Ui.clearBuffer(), c += n[d].length, r)
13553
13553
  break;
13554
13554
  }
13555
- return Fn = !1, r;
13555
+ return Qn = !1, r;
13556
13556
  }
13557
13557
  function Ft(s, t, e, i, n, o = 0, r = 0, c = 0, l = 0, a = null, d = !1) {
13558
13558
  let h, u;
13559
- d ? (h = un, u = Ui) : (h = Ui, u = un);
13559
+ d ? (h = pn, u = Ui) : (h = Ui, u = pn);
13560
13560
  const p = h.float32Array, m = h.uint32Array, b = h.uint16Array, G = u.float32Array, y = u.uint32Array, Z = u.uint16Array, f = s * 2, V = t * 2, X = Vt(f, b), R = Vt(V, Z);
13561
13561
  let x = !1;
13562
13562
  if (R && X)
@@ -13612,8 +13612,8 @@ function Ft(s, t, e, i, n, o = 0, r = 0, c = 0, l = 0, a = null, d = !1) {
13612
13612
  ), Xe.releasePrimitive(S);
13613
13613
  } else {
13614
13614
  const S = Mt(t), C = Kt(t, y);
13615
- E(S, G, Un), E(C, G, Pn);
13616
- const L = a.intersectsBox(Un), g = a.intersectsBox(Pn);
13615
+ E(S, G, Pn), E(C, G, Fn);
13616
+ const L = a.intersectsBox(Pn), g = a.intersectsBox(Fn);
13617
13617
  if (L && g)
13618
13618
  x = Ft(
13619
13619
  s,
@@ -13657,7 +13657,7 @@ function Ft(s, t, e, i, n, o = 0, r = 0, c = 0, l = 0, a = null, d = !1) {
13657
13657
  );
13658
13658
  else {
13659
13659
  const W = Xe.getPrimitive();
13660
- W.copy(Un).applyMatrix4(e);
13660
+ W.copy(Pn).applyMatrix4(e);
13661
13661
  const z = Mt(s), v = Kt(s, m);
13662
13662
  E(z, p, $e), E(v, p, ti);
13663
13663
  const k = W.intersectsBox($e), N = W.intersectsBox(ti);
@@ -13704,7 +13704,7 @@ function Ft(s, t, e, i, n, o = 0, r = 0, c = 0, l = 0, a = null, d = !1) {
13704
13704
  );
13705
13705
  else {
13706
13706
  const W = Xe.getPrimitive();
13707
- W.copy(Pn).applyMatrix4(e);
13707
+ W.copy(Fn).applyMatrix4(e);
13708
13708
  const z = Mt(s), v = Kt(s, m);
13709
13709
  E(z, p, $e), E(v, p, ti);
13710
13710
  const k = W.intersectsBox($e), N = W.intersectsBox(ti);
@@ -13772,7 +13772,7 @@ class Ee {
13772
13772
  indirect: !!t.indirectBuffer,
13773
13773
  ...i
13774
13774
  };
13775
- const { index: n, roots: o, indirectBuffer: r } = t, c = new Ee(e, { ...i, [Mn]: !0 });
13775
+ const { index: n, roots: o, indirectBuffer: r } = t, c = new Ee(e, { ...i, [Yn]: !0 });
13776
13776
  if (c._roots = o, c._indirectBuffer = r || null, i.setIndex) {
13777
13777
  const l = e.getIndex();
13778
13778
  if (l === null) {
@@ -13796,10 +13796,10 @@ class Ee {
13796
13796
  ...$h,
13797
13797
  // undocumented options
13798
13798
  // Whether to skip generating the tree. Used for deserialization.
13799
- [Mn]: !1
13799
+ [Yn]: !1
13800
13800
  }, e), e.useSharedArrayBuffer && !hc())
13801
13801
  throw new Error("MeshBVH: SharedArrayBuffer is not available.");
13802
- this.geometry = t, this._roots = null, this._indirectBuffer = null, e[Mn] || (mh(this, e), !t.boundingBox && e.setBoundingBox && (t.boundingBox = this.getBoundingBox(new Ct()))), this.resolveTriangleIndex = e.indirect ? (i) => this._indirectBuffer[i] : (i) => i;
13802
+ this.geometry = t, this._roots = null, this._indirectBuffer = null, e[Yn] || (mh(this, e), !t.boundingBox && e.setBoundingBox && (t.boundingBox = this.getBoundingBox(new Ct()))), this.resolveTriangleIndex = e.indirect ? (i) => this._indirectBuffer[i] : (i) => i;
13803
13803
  }
13804
13804
  refit(t = null) {
13805
13805
  return (this.indirect ? Fh : zh)(this, t);
@@ -13808,7 +13808,7 @@ class Ee {
13808
13808
  const i = this._roots[e], n = new Uint32Array(i), o = new Uint16Array(i);
13809
13809
  r(0);
13810
13810
  function r(c, l = 0) {
13811
- const a = c * 2, d = o[a + 15] === Zn;
13811
+ const a = c * 2, d = o[a + 15] === Xn;
13812
13812
  if (d) {
13813
13813
  const h = n[c + 6], u = o[a + 14];
13814
13814
  t(l, d, new Float32Array(i, c * 4, 6), h, u);
@@ -13962,7 +13962,7 @@ class tu extends Lo {
13962
13962
  return this.displayEdges;
13963
13963
  }
13964
13964
  getVertexPosition(...t) {
13965
- return pn.prototype.getVertexPosition.call(this, ...t);
13965
+ return mn.prototype.getVertexPosition.call(this, ...t);
13966
13966
  }
13967
13967
  constructor(t, e, i = 10, n = 0) {
13968
13968
  super(), this.material = e, this.geometry = new oi(), this.name = "MeshBVHRootHelper", this.depth = i, this.displayParents = !1, this.bvh = t, this.displayEdges = !0, this._group = n;
@@ -14101,7 +14101,7 @@ class Io extends Sc {
14101
14101
  transparent: !0,
14102
14102
  opacity: 0.3,
14103
14103
  depthWrite: !1
14104
- }), o = new Bn({
14104
+ }), o = new En({
14105
14105
  color: 65416,
14106
14106
  transparent: !0,
14107
14107
  opacity: 0.3,
@@ -14251,7 +14251,7 @@ function ru(s) {
14251
14251
  function Nr(s, t, e) {
14252
14252
  return s === null ? null : (s.point.applyMatrix4(t.matrixWorld), s.distance = s.point.distanceTo(e.ray.origin), s.object = t, s);
14253
14253
  }
14254
- const lu = parseInt(qr) >= 166, Bs = /* @__PURE__ */ new gc(), Ir = /* @__PURE__ */ new M(), Jr = /* @__PURE__ */ new kt(), cu = pn.prototype.raycast, au = Cc.prototype.raycast, Ur = /* @__PURE__ */ new M(), at = /* @__PURE__ */ new pn(), Es = [];
14254
+ const lu = parseInt(qr) >= 166, Bs = /* @__PURE__ */ new gc(), Ir = /* @__PURE__ */ new M(), Jr = /* @__PURE__ */ new kt(), cu = mn.prototype.raycast, au = Cc.prototype.raycast, Ur = /* @__PURE__ */ new M(), at = /* @__PURE__ */ new mn(), Es = [];
14255
14255
  function du(s, t) {
14256
14256
  this.isBatchedMesh ? hu.call(this, s, t) : uu.call(this, s, t);
14257
14257
  }
@@ -14361,12 +14361,12 @@ function Pr(s) {
14361
14361
  case 2:
14362
14362
  return $r;
14363
14363
  case 3:
14364
- return _n;
14364
+ return Dn;
14365
14365
  case 4:
14366
- return _n;
14366
+ return Dn;
14367
14367
  }
14368
14368
  }
14369
- class fn extends On {
14369
+ class Vn extends _n {
14370
14370
  constructor() {
14371
14371
  super(), this.minFilter = ii, this.magFilter = ii, this.generateMipmaps = !1, this.overrideItemSize = null, this._forcedType = null;
14372
14372
  }
@@ -14407,7 +14407,7 @@ class fn extends On {
14407
14407
  G += a * 8 + "UI", m = c ? Math.pow(2, l.BYTES_PER_ELEMENT * 8 - 1) : 1, p = Pr(o), a === 1 ? (b = Uint8Array, u = Uo) : a === 2 ? (b = Uint16Array, u = zc) : (b = Uint32Array, u = Ni);
14408
14408
  break;
14409
14409
  }
14410
- h === 3 && (p === nn || p === _n) && (h = 4);
14410
+ h === 3 && (p === nn || p === Dn) && (h = 4);
14411
14411
  const y = Math.ceil(Math.sqrt(r)) || 1, Z = h * y * y, f = new b(Z), V = t.normalized;
14412
14412
  t.normalized = !1;
14413
14413
  for (let X = 0; X < r; X++) {
@@ -14417,24 +14417,24 @@ class fn extends On {
14417
14417
  t.normalized = V, this.internalFormat = G, this.format = p, this.type = u, this.image.width = y, this.image.height = y, this.image.data = f, this.needsUpdate = !0, this.dispose(), t.itemSize = i, t.count = n;
14418
14418
  }
14419
14419
  }
14420
- class uc extends fn {
14420
+ class uc extends Vn {
14421
14421
  constructor() {
14422
14422
  super(), this._forcedType = Ni;
14423
14423
  }
14424
14424
  }
14425
- class Xu extends fn {
14425
+ class Xu extends Vn {
14426
14426
  constructor() {
14427
14427
  super(), this._forcedType = Ds;
14428
14428
  }
14429
14429
  }
14430
- class pc extends fn {
14430
+ class pc extends Vn {
14431
14431
  constructor() {
14432
14432
  super(), this._forcedType = Ii;
14433
14433
  }
14434
14434
  }
14435
14435
  class fu {
14436
14436
  constructor() {
14437
- this.index = new uc(), this.position = new pc(), this.bvhBounds = new On(), this.bvhContents = new On(), this._cachedIndexAttr = null, this.index.overrideItemSize = 3;
14437
+ this.index = new uc(), this.position = new pc(), this.bvhBounds = new _n(), this.bvhContents = new _n(), this._cachedIndexAttr = null, this.index.overrideItemSize = 3;
14438
14438
  }
14439
14439
  updateFrom(t) {
14440
14440
  const { geometry: e } = t;
@@ -14483,7 +14483,7 @@ function Ru(s, t, e) {
14483
14483
  }
14484
14484
  t.image.data = d, t.image.width = a, t.image.height = a, t.format = nn, t.type = Ii, t.internalFormat = "RGBA32F", t.minFilter = ii, t.magFilter = ii, t.generateMipmaps = !1, t.needsUpdate = !0, t.dispose(), e.image.data = u, e.image.width = h, e.image.height = h, e.format = $r, e.type = Ni, e.internalFormat = "RG32UI", e.minFilter = ii, e.magFilter = ii, e.generateMipmaps = !1, e.needsUpdate = !0, e.dispose();
14485
14485
  }
14486
- const Je = /* @__PURE__ */ new M(), Ue = /* @__PURE__ */ new M(), Pe = /* @__PURE__ */ new M(), Fr = /* @__PURE__ */ new So(), js = /* @__PURE__ */ new M(), Qn = /* @__PURE__ */ new M(), Qr = /* @__PURE__ */ new So(), wr = /* @__PURE__ */ new So(), Os = /* @__PURE__ */ new kt(), Br = /* @__PURE__ */ new kt();
14486
+ const Je = /* @__PURE__ */ new M(), Ue = /* @__PURE__ */ new M(), Pe = /* @__PURE__ */ new M(), Fr = /* @__PURE__ */ new So(), js = /* @__PURE__ */ new M(), wn = /* @__PURE__ */ new M(), Qr = /* @__PURE__ */ new So(), wr = /* @__PURE__ */ new So(), Os = /* @__PURE__ */ new kt(), Br = /* @__PURE__ */ new kt();
14487
14487
  function Ki(s, t) {
14488
14488
  if (!s && !t)
14489
14489
  return;
@@ -14524,11 +14524,11 @@ function Er(s, t, e) {
14524
14524
  }
14525
14525
  return Os.multiply(s.bindMatrix).premultiply(s.bindMatrixInverse), e.transformDirection(Os), e;
14526
14526
  }
14527
- function wn(s, t, e, i, n) {
14527
+ function Bn(s, t, e, i, n) {
14528
14528
  js.set(0, 0, 0);
14529
14529
  for (let o = 0, r = s.length; o < r; o++) {
14530
14530
  const c = t[o], l = s[o];
14531
- c !== 0 && (Qn.fromBufferAttribute(l, i), e ? js.addScaledVector(Qn, c) : js.addScaledVector(Qn.sub(n), c));
14531
+ c !== 0 && (wn.fromBufferAttribute(l, i), e ? js.addScaledVector(wn, c) : js.addScaledVector(wn.sub(n), c));
14532
14532
  }
14533
14533
  n.add(js);
14534
14534
  }
@@ -14684,7 +14684,7 @@ class gu {
14684
14684
  const a = c.position, d = o ? c.normal : null, h = r ? c.tangent : null, u = i.morphAttributes.position, p = i.morphAttributes.normal, m = i.morphAttributes.tangent, b = i.morphTargetsRelative, G = t.morphTargetInfluences, y = new Yc();
14685
14685
  y.getNormalMatrix(t.matrixWorld), i.index && e.index.array.set(i.index.array);
14686
14686
  for (let Z = 0, f = c.position.count; Z < f; Z++)
14687
- Je.fromBufferAttribute(a, Z), d && Ue.fromBufferAttribute(d, Z), h && (Fr.fromBufferAttribute(h, Z), Pe.fromBufferAttribute(h, Z)), G && (u && wn(u, G, b, Z, Je), p && wn(p, G, b, Z, Ue), m && wn(m, G, b, Z, Pe)), t.isSkinnedMesh && (t.applyBoneTransform(Z, Je), d && Er(t, Z, Ue), h && Er(t, Z, Pe)), n && Je.applyMatrix4(t.matrixWorld), l.position.setXYZ(Z, Je.x, Je.y, Je.z), d && (n && Ue.applyNormalMatrix(y), l.normal.setXYZ(Z, Ue.x, Ue.y, Ue.z)), h && (n && Pe.transformDirection(t.matrixWorld), l.tangent.setXYZW(Z, Pe.x, Pe.y, Pe.z, Fr.w));
14687
+ Je.fromBufferAttribute(a, Z), d && Ue.fromBufferAttribute(d, Z), h && (Fr.fromBufferAttribute(h, Z), Pe.fromBufferAttribute(h, Z)), G && (u && Bn(u, G, b, Z, Je), p && Bn(p, G, b, Z, Ue), m && Bn(m, G, b, Z, Pe)), t.isSkinnedMesh && (t.applyBoneTransform(Z, Je), d && Er(t, Z, Ue), h && Er(t, Z, Pe)), n && Je.applyMatrix4(t.matrixWorld), l.position.setXYZ(Z, Je.x, Je.y, Je.z), d && (n && Ue.applyNormalMatrix(y), l.normal.setXYZ(Z, Ue.x, Ue.y, Ue.z)), h && (n && Pe.transformDirection(t.matrixWorld), l.tangent.setXYZW(Z, Pe.x, Pe.y, Pe.z, Fr.w));
14688
14688
  for (const Z in this.attributes) {
14689
14689
  const f = this.attributes[Z];
14690
14690
  f === "position" || f === "tangent" || f === "normal" || !(f in c) || (l[f] || e.setAttribute(f, Hi(c[f])), Ki(c[f], l[f]), mc(c[f], l[f]));
@@ -15212,7 +15212,7 @@ struct BVH {
15212
15212
  SAH: nc,
15213
15213
  StaticGeometryGenerator: gu,
15214
15214
  UIntVertexAttributeTexture: uc,
15215
- VertexAttributeTexture: fn,
15215
+ VertexAttributeTexture: Vn,
15216
15216
  acceleratedRaycast: du,
15217
15217
  computeBatchedBoundsTree: bu,
15218
15218
  computeBoundsTree: pu,
@@ -15271,7 +15271,7 @@ export {
15271
15271
  ho as P,
15272
15272
  K as R,
15273
15273
  Uc as S,
15274
- co as T,
15274
+ ao as T,
15275
15275
  Tt as V,
15276
15276
  Qu as W,
15277
15277
  el as a,