@needle-tools/engine 4.4.0-alpha.2 → 4.4.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/needle-engine.bundle.js +826 -770
  3. package/dist/needle-engine.bundle.light.js +564 -508
  4. package/dist/needle-engine.bundle.light.min.js +37 -33
  5. package/dist/needle-engine.bundle.light.umd.cjs +66 -62
  6. package/dist/needle-engine.bundle.min.js +60 -56
  7. package/dist/needle-engine.bundle.umd.cjs +67 -63
  8. package/lib/engine/webcomponents/needle menu/needle-menu.js +4 -0
  9. package/lib/engine/webcomponents/needle menu/needle-menu.js.map +1 -1
  10. package/lib/engine-components/Camera.d.ts +1 -1
  11. package/lib/engine-components/Camera.js +13 -0
  12. package/lib/engine-components/Camera.js.map +1 -1
  13. package/lib/engine-components/CameraUtils.js +2 -1
  14. package/lib/engine-components/CameraUtils.js.map +1 -1
  15. package/lib/engine-components/postprocessing/Effects/Tonemapping.js +1 -1
  16. package/lib/engine-components/postprocessing/Effects/Tonemapping.js.map +1 -1
  17. package/lib/engine-components/postprocessing/PostProcessingHandler.d.ts +2 -0
  18. package/lib/engine-components/postprocessing/PostProcessingHandler.js +68 -4
  19. package/lib/engine-components/postprocessing/PostProcessingHandler.js.map +1 -1
  20. package/package.json +1 -1
  21. package/plugins/common/license.js +14 -5
  22. package/src/engine/webcomponents/needle menu/needle-menu.ts +4 -0
  23. package/src/engine-components/Camera.ts +16 -1
  24. package/src/engine-components/CameraUtils.ts +3 -2
  25. package/src/engine-components/postprocessing/Effects/Tonemapping.ts +2 -2
  26. package/src/engine-components/postprocessing/PostProcessingHandler.ts +77 -4
@@ -10,11 +10,11 @@ var ue = (n, t, e) => (Cf(n, t, "read from private field"), e ? e.call(n) : t.ge
10
10
  t instanceof WeakSet ? t.add(n) : t.set(n, e);
11
11
  }, as = (n, t, e, i) => (Cf(n, t, "write to private field"), i ? i.call(n, e) : t.set(n, e), e);
12
12
  var Uo = (n, t, e) => (Cf(n, t, "access private method"), e);
13
- import { f as oe, V as v, g as me, Q as W, P as qs, h as ye, i as es, j as ys, U as lo, M as X, W as kr, T as Fe, E as Lt, c as Oi, d as hi, k as le, l as Kb, m as Zb, G as sg, n as Se, o as Jb, b as ne, L as bo, O as D, R as vo, p as Cn, A as Mi, q as Te, D as Ri, B as Pn, r as co, s as wu, t as Tc, u as Ax, v as Ex, w as Ix, x as Dx, F as e0, y as Yp, z as t0, H as Ac, I as mt, J as Lx, K as jx, N as i0, X as s0, S as xu, Y as vr, Z as Su, _ as Bx, $ as On, a0 as n0, a1 as Fx, a2 as zx, a3 as Ux, a4 as Nx, a5 as $x, a6 as ho, a as xa, a7 as La, a8 as wr, a9 as Zt, aa as Wx, ab as o0, ac as ng, ad as Cu, ae as Mn, af as bs, C as Vx, ag as ja, ah as Hx, ai as Gx, aj as kn, ak as qx, al as Dd, am as Xx, an as Kp, ao as og, ap as Qx, aq as wo, ar as D_, as as rg, at as Yx, au as Kx, av as Zp, aw as ag, ax as lg, ay as Zx, az as Jx, aA as e1, aB as t1, aC as i1, aD as s1, aE as n1, aF as o1, aG as r1, aH as a1, aI as l1, aJ as c1, aK as h1, aL as d1, aM as u1, aN as f1, aO as p1, aP as m1, aQ as g1, aR as _1, aS as L_, aT as r0, aU as y1, aV as b1, aW as v1, aX as w1, aY as x1, aZ as S1, a_ as C1, a$ as P1, b0 as j_, b1 as Jp, b2 as O1, b3 as B_, b4 as M1, b5 as R1, b6 as a0, b7 as k1, b8 as T1, b9 as A1, ba as E1, bb as I1, bc as D1, bd as L1, be as Ec, bf as Pu, bg as cg, bh as hg, bi as Ou, bj as j1, bk as B1, bl as F1, bm as z1, bn as U1, bo as N1, bp as $1, bq as W1, br as F_, bs as l0, bt as Ld, bu as V1, bv as H1 } from "./three.js";
14
- import { c as dg, g as c0, L as Hr, N as Ze, a as G1, b as q1, s as X1, d as Q1 } from "./gltf-progressive.js";
15
- import { a as Ba, F as Y1, T as K1, b as Z1, G as xr, c as h0, E as jd, R as em, S as J1, n as eS, O as d0, P as tS, H as iS, V as sS, d as u0, s as f0, z as nS, X as oS, e as rS, L as aS, f as lS, g as cS, K as hS, h as dS, I as uS, i as fS, j as pS, k as ug, l as p0, m as mS } from "./three-examples.js";
16
- import { f as gS, M as _S, $ as z_, B as yS, v as U_, m as N_, S as m0, a as fg, c as bS, b as Pf, d as vS, P as wS, R as fn, T as $_, C as xS, V as SS, e as CS, W as PS, g as OS, h as MS } from "./vendor.js";
17
- import { _ as ke, a as g0, b as _0, c as RS, S as kS, d as Of, e as W_, T as V_ } from "./three-mesh-ui.js";
13
+ import { f as oe, V as v, g as me, Q as W, P as qs, h as ye, i as es, j as ys, U as lo, M as X, W as kr, T as Fe, E as Lt, c as Oi, d as hi, k as le, l as Kb, m as Zb, G as sg, n as Se, o as Jb, b as ne, L as bo, O as L, R as vo, p as Cn, A as Mi, q as Te, D as Ri, B as Pn, r as co, s as wu, t as Tc, u as Ax, v as Ex, w as Ix, x as Dx, F as e0, y as Yp, z as t0, H as Ac, I as mt, J as Lx, K as jx, N as i0, X as s0, S as xu, Y as vr, Z as Su, _ as Bx, $ as On, a0 as n0, a1 as Fx, a2 as zx, a3 as Ux, a4 as Nx, a5 as $x, a6 as ho, a as xa, a7 as La, a8 as wr, a9 as Zt, aa as Wx, ab as o0, ac as ng, ad as Cu, ae as Mn, af as bs, C as Vx, ag as ja, ah as Hx, ai as Gx, aj as kn, ak as qx, al as Dd, am as Xx, an as Kp, ao as og, ap as Qx, aq as wo, ar as D_, as as rg, at as Yx, au as Kx, av as Zp, aw as ag, ax as lg, ay as Zx, az as Jx, aA as eS, aB as tS, aC as iS, aD as sS, aE as nS, aF as oS, aG as rS, aH as aS, aI as lS, aJ as cS, aK as hS, aL as dS, aM as uS, aN as fS, aO as pS, aP as mS, aQ as gS, aR as _S, aS as L_, aT as r0, aU as yS, aV as bS, aW as vS, aX as wS, aY as xS, aZ as SS, a_ as CS, a$ as PS, b0 as j_, b1 as Jp, b2 as OS, b3 as B_, b4 as MS, b5 as RS, b6 as a0, b7 as kS, b8 as TS, b9 as AS, ba as ES, bb as IS, bc as DS, bd as LS, be as Ec, bf as Pu, bg as cg, bh as hg, bi as Ou, bj as jS, bk as BS, bl as FS, bm as zS, bn as US, bo as NS, bp as $S, bq as WS, br as F_, bs as l0, bt as Ld, bu as VS, bv as HS } from "./three.js";
14
+ import { c as dg, g as c0, L as Hr, N as Ze, a as GS, b as qS, s as XS, d as QS } from "./gltf-progressive.js";
15
+ import { a as Ba, F as YS, T as KS, b as ZS, G as xr, c as h0, E as jd, R as em, S as JS, n as e1, O as d0, P as t1, H as i1, V as s1, d as u0, s as f0, z as n1, X as o1, e as r1, L as a1, f as l1, g as c1, K as h1, h as d1, I as u1, i as f1, j as p1, k as ug, l as p0, m as m1 } from "./three-examples.js";
16
+ import { f as g1, M as _1, $ as z_, B as y1, v as U_, m as N_, S as m0, a as fg, c as b1, b as Pf, d as v1, P as w1, R as fn, T as $_, C as x1, V as S1, e as C1, W as P1, g as O1, h as M1 } from "./vendor.js";
17
+ import { _ as ke, a as g0, b as _0, c as R1, S as k1, d as Of, e as W_, T as V_ } from "./three-mesh-ui.js";
18
18
  let y0, H_ = null;
19
19
  function Vs() {
20
20
  return y0;
@@ -33,7 +33,7 @@ function ui(n = ((t) => (t = globalThis.location) == null ? void 0 : t.hostname)
33
33
  const e = /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|localhost/.test(n);
34
34
  return Mf.set(n, e), e === !0;
35
35
  }
36
- function TS() {
36
+ function T1() {
37
37
  return window.location.hostname.includes("glitch.me");
38
38
  }
39
39
  const G_ = typeof window !== void 0 ? window.location.search.includes("debugcontext") : !1;
@@ -102,11 +102,11 @@ class fe {
102
102
  }
103
103
  /** All currently registered Needle Engine contexts. Do not modify */
104
104
  r(fe, "Registered", []), r(fe, "_callbacks", {});
105
- const AS = () => (n) => n;
106
- function UI(n) {
107
- return AS()(n);
105
+ const A1 = () => (n) => n;
106
+ function NI(n) {
107
+ return A1()(n);
108
108
  }
109
- function NI() {
109
+ function $I() {
110
110
  return !!x("debug");
111
111
  }
112
112
  class ts {
@@ -163,37 +163,37 @@ function x(n) {
163
163
  return !1;
164
164
  }
165
165
  Xo = x("help");
166
- function $I(n, t) {
166
+ function WI(n, t) {
167
167
  const e = Mu();
168
168
  e.has(n) ? e.set(n, t) : e.append(n, t), document.location.search = e.toString();
169
169
  }
170
170
  function Bd(n, t, e = !0) {
171
171
  const i = Mu();
172
- i.has(n) ? t === null ? i.delete(n) : i.set(n, t) : t !== null && i.append(n, t), e ? ES(n, i) : v0(n, i);
172
+ i.has(n) ? t === null ? i.delete(n) : i.set(n, t) : t !== null && i.append(n, t), e ? E1(n, i) : v0(n, i);
173
173
  }
174
174
  function q_(n, t, e) {
175
175
  n.has(t) ? n.set(t, e.toString()) : n.append(t, e.toString());
176
176
  }
177
- function ES(n, t, e) {
177
+ function E1(n, t, e) {
178
178
  window.history.pushState(e, n, "?" + t.toString());
179
179
  }
180
180
  function v0(n, t, e) {
181
181
  window.history.replaceState(e, n, "?" + t.toString());
182
182
  }
183
- function WI(n) {
183
+ function VI(n) {
184
184
  for (var t = "", e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = e.length, s = 0; s < n; s++)
185
185
  t += e.charAt(Math.floor(Math.random() * i));
186
186
  return t;
187
187
  }
188
- function VI(n, t) {
188
+ function HI(n, t) {
189
189
  return Math.floor(Math.random() * (t - n + 1)) + n;
190
190
  }
191
191
  const X_ = ["smol", "tiny", "giant", "interesting", "smart", "bright", "dull", "extreme", "beautiful", "pretty", "dark", "epic", "salty", "silly", "funny", "lame", "lazy", "loud", "lucky", "mad", "mean", "mighty", "mysterious", "nasty", "odd", "old", "powerful", "quiet", "rapid", "scary", "shiny", "shy", "silly", "smooth", "sour", "spicy", "stupid", "sweet", "tasty", "terrible", "ugly", "unusual", "vast", "wet", "wild", "witty", "wrong", "zany", "zealous", "zippy", "zombie", "zorro"], Q_ = ["cat", "dog", "mouse", "pig", "cow", "horse", "sheep", "chicken", "duck", "goat", "panda", "tiger", "lion", "elephant", "monkey", "bird", "fish", "snake", "frog", "turtle", "hamster", "penguin", "kangaroo", "whale", "dolphin", "crocodile", "snail", "ant", "bee", "beetle", "butterfly", "dragon", "eagle", "fish", "giraffe", "lizard", "panda", "penguin", "rabbit", "snake", "spider", "tiger", "zebra"];
192
- function IS() {
192
+ function I1() {
193
193
  const n = X_[Math.floor(Math.random() * X_.length)], t = Q_[Math.floor(Math.random() * Q_.length)];
194
194
  return n + "_" + t;
195
195
  }
196
- function DS(n) {
196
+ function D1(n) {
197
197
  return n = n.replace(/[^a-z0-9áéíóúñü \.,_-]/gim, ""), n.trim();
198
198
  }
199
199
  function Ic(n, t, e = !0, i = !1) {
@@ -256,8 +256,8 @@ function ku(n, t) {
256
256
  t.pre_update_callbacks.push(o);
257
257
  });
258
258
  }
259
- const Rh = x("debugresolveurl"), LS = "rel:";
260
- function HI(n, t) {
259
+ const Rh = x("debugresolveurl"), L1 = "rel:";
260
+ function GI(n, t) {
261
261
  return Tr(n, t);
262
262
  }
263
263
  function Tr(n, t) {
@@ -269,7 +269,7 @@ function Tr(n, t) {
269
269
  return Rh && console.warn("getPath: uri is absolute, returning uri", t), t;
270
270
  if (n === void 0)
271
271
  return Rh && console.warn("getPath: source is undefined, returning uri", t), t;
272
- t.startsWith(LS) && (t = t.substring(4));
272
+ t.startsWith(L1) && (t = t.substring(4));
273
273
  const e = n.lastIndexOf("/");
274
274
  if (e >= 0) {
275
275
  const i = n.substring(0, e + 1);
@@ -283,7 +283,7 @@ basePath: ` + i), s;
283
283
  }
284
284
  return t;
285
285
  }
286
- class jS {
286
+ class j1 {
287
287
  constructor(t, e) {
288
288
  r(this, "writeCallbacks", []);
289
289
  r(this, "_applied", !1);
@@ -336,7 +336,7 @@ class uo {
336
336
  for (const i of e)
337
337
  this._watches.push(new uo(t, i));
338
338
  else
339
- this._watches.push(new jS(t, e));
339
+ this._watches.push(new j1(t, e));
340
340
  }
341
341
  subscribeWrite(t) {
342
342
  for (const e of this._watches)
@@ -385,7 +385,7 @@ var q;
385
385
  function e() {
386
386
  if (t !== void 0)
387
387
  return t;
388
- const L = window.navigator.userAgent, H = /Windows|MacOS|Mac OS/.test(L), Y = /Windows NT/.test(L) && /Edg/.test(L) && !/Win64/.test(L);
388
+ const j = window.navigator.userAgent, H = /Windows|MacOS|Mac OS/.test(j), Y = /Windows NT/.test(j) && /Edg/.test(j) && !/Win64/.test(j);
389
389
  return t = H && !Y && !w();
390
390
  }
391
391
  n.isDesktop = e;
@@ -420,8 +420,8 @@ var q;
420
420
  if (navigator.userAgentData)
421
421
  return p = navigator.userAgentData.platform === "macOS";
422
422
  {
423
- const L = navigator.userAgent.toLowerCase();
424
- return p = L.includes("mac os x") || L.includes("macintosh");
423
+ const j = navigator.userAgent.toLowerCase();
424
+ return p = j.includes("mac os x") || j.includes("macintosh");
425
425
  }
426
426
  }
427
427
  n.isMacOS = m;
@@ -454,8 +454,8 @@ var q;
454
454
  async function A() {
455
455
  try {
456
456
  return (await navigator.permissions.query({ name: "microphone" })).state !== "denied";
457
- } catch (L) {
458
- return console.error("Error querying `microphone` permissions.", L), !1;
457
+ } catch (j) {
458
+ return console.error("Error querying `microphone` permissions.", j), !1;
459
459
  }
460
460
  }
461
461
  n.microphonePermissionsGranted = A;
@@ -463,8 +463,8 @@ var q;
463
463
  function U() {
464
464
  if (F !== void 0)
465
465
  return F;
466
- const L = navigator.userAgent.match(/iPhone OS (\d+_\d+)/);
467
- if (L && (F = L[1].replace("_", ".")), !F) {
466
+ const j = navigator.userAgent.match(/iPhone OS (\d+_\d+)/);
467
+ if (j && (F = j[1].replace("_", ".")), !F) {
468
468
  const H = navigator.userAgent.match(/(?:\(Macintosh;|iPhone;|iPad;).*Version\/(\d+\.\d+)/);
469
469
  H && (F = H[1]);
470
470
  }
@@ -475,62 +475,62 @@ var q;
475
475
  function T() {
476
476
  if (Z !== void 0)
477
477
  return Z;
478
- const L = navigator.userAgent.match(/(?:CriOS|Chrome)\/(\d+\.\d+\.\d+\.\d+)/);
479
- return L ? Z = L[1].replace("_", ".") : Z = null, Z;
478
+ const j = navigator.userAgent.match(/(?:CriOS|Chrome)\/(\d+\.\d+\.\d+\.\d+)/);
479
+ return j ? Z = j[1].replace("_", ".") : Z = null, Z;
480
480
  }
481
481
  n.getChromeVersion = T;
482
482
  })(q || (q = {}));
483
- function GI() {
484
- return q.isDesktop();
485
- }
486
483
  function qI() {
487
- return q.isMobileDevice();
484
+ return q.isDesktop();
488
485
  }
489
486
  function XI() {
490
- return q.isiPad();
487
+ return q.isMobileDevice();
491
488
  }
492
489
  function QI() {
493
490
  return q.isiPad();
494
491
  }
495
492
  function YI() {
496
- return q.isAndroidDevice();
493
+ return q.isiPad();
497
494
  }
498
495
  function KI() {
499
- return q.isMozillaXR();
496
+ return q.isAndroidDevice();
500
497
  }
501
498
  function ZI() {
502
- return q.isMacOS();
499
+ return q.isMozillaXR();
503
500
  }
504
501
  function JI() {
505
- return q.isiOS();
502
+ return q.isMacOS();
506
503
  }
507
504
  function eD() {
508
- return q.isSafari();
505
+ return q.isiOS();
509
506
  }
510
507
  function tD() {
508
+ return q.isSafari();
509
+ }
510
+ function iD() {
511
511
  return q.isQuest();
512
512
  }
513
- async function iD() {
513
+ async function sD() {
514
514
  return q.microphonePermissionsGranted();
515
515
  }
516
- const BS = /ip=(?<ip>.+?)\n/s;
517
- async function sD() {
518
- const t = await (await fetch("https://www.cloudflare.com/cdn-cgi/trace")).text(), e = BS.exec(t);
516
+ const B1 = /ip=(?<ip>.+?)\n/s;
517
+ async function nD() {
518
+ const t = await (await fetch("https://www.cloudflare.com/cdn-cgi/trace")).text(), e = B1.exec(t);
519
519
  return e ? e[1] : null;
520
520
  }
521
- async function nD() {
521
+ async function oD() {
522
522
  const n = await fetch("https://api.db-ip.com/v2/free/self").catch(() => null);
523
523
  return n ? (await n.json()).ipAddress : void 0;
524
524
  }
525
- async function oD() {
525
+ async function rD() {
526
526
  const n = await fetch("https://api.db-ip.com/v2/free/self").catch(() => null);
527
527
  return n ? await n.json() : void 0;
528
528
  }
529
529
  const no = /* @__PURE__ */ new WeakMap();
530
- function FS(n, t, e) {
530
+ function F1(n, t, e) {
531
531
  if (!no.get(n)) {
532
532
  const s = new MutationObserver((o) => {
533
- US(n, o);
533
+ U1(n, o);
534
534
  });
535
535
  no.set(n, {
536
536
  observer: s,
@@ -540,7 +540,7 @@ function FS(n, t, e) {
540
540
  const i = no.get(n).attributeChangedListeners;
541
541
  i.has(t) || i.set(t, []), i.get(t).push(e);
542
542
  }
543
- function zS(n, t, e) {
543
+ function z1(n, t, e) {
544
544
  if (!no.get(n))
545
545
  return;
546
546
  const i = no.get(n).attributeChangedListeners;
@@ -553,7 +553,7 @@ function zS(n, t, e) {
553
553
  a == null || a.observer.disconnect(), no.delete(n);
554
554
  }
555
555
  }
556
- function US(n, t) {
556
+ function U1(n, t) {
557
557
  const e = no.get(n).attributeChangedListeners;
558
558
  for (const i of t)
559
559
  if (i.type === "attributes") {
@@ -580,7 +580,7 @@ async function x0(n) {
580
580
  results: i
581
581
  };
582
582
  }
583
- async function NS(n) {
583
+ async function N1(n) {
584
584
  if (!globalThis.QRCode) {
585
585
  const i = "https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js";
586
586
  let s = document.head.querySelector(`script[src="${i}"]`);
@@ -609,11 +609,11 @@ function mg() {
609
609
  return O0;
610
610
  }
611
611
  const im = new Array();
612
- function $S(n) {
612
+ function $1(n) {
613
613
  im.push(n);
614
614
  }
615
615
  let kf = !1;
616
- function WS(...n) {
616
+ function W1(...n) {
617
617
  if (!kf) {
618
618
  kf = !0;
619
619
  try {
@@ -626,15 +626,15 @@ function WS(...n) {
626
626
  }
627
627
  }
628
628
  const C0 = console.error, P0 = function(...n) {
629
- C0.apply(console, n), GS(n), js(2, n), sm(...n);
629
+ C0.apply(console, n), G1(n), js(2, n), sm(...n);
630
630
  };
631
- function VS(n) {
631
+ function V1(n) {
632
632
  Dc = !n, n ? console.error = P0 : console.error = C0;
633
633
  }
634
- function rD(n) {
635
- return VS(n);
634
+ function aD(n) {
635
+ return V1(n);
636
636
  }
637
- function HS() {
637
+ function H1() {
638
638
  Dc || (S0 && console.warn("Patch console", window.location.hostname), console.error = P0, window.addEventListener("error", (n) => {
639
639
  if (!n)
640
640
  return;
@@ -650,9 +650,9 @@ function HS() {
650
650
  }
651
651
  let O0 = 0;
652
652
  function sm(...n) {
653
- O0 += 1, WS(...n);
653
+ O0 += 1, W1(...n);
654
654
  }
655
- function GS(n) {
655
+ function G1(n) {
656
656
  if (Array.isArray(n))
657
657
  for (let t = 0; t < n.length; t++) {
658
658
  const e = n[t];
@@ -672,14 +672,14 @@ function js(n, t, e, i) {
672
672
  }
673
673
  t = a;
674
674
  }
675
- !t || t.length <= 0 || qS(n, o, t);
675
+ !t || t.length <= 0 || q1(n, o, t);
676
676
  }
677
677
  }
678
678
  const oc = /* @__PURE__ */ new Map();
679
- function qS(n, t, e) {
679
+ function q1(n, t, e) {
680
680
  if (e == null)
681
681
  return;
682
- const i = QS(t);
682
+ const i = Q1(t);
683
683
  if (i.childElementCount >= 20) {
684
684
  const l = i.lastElementChild;
685
685
  K_(l);
@@ -688,20 +688,20 @@ function qS(n, t, e) {
688
688
  const s = e;
689
689
  if (oc.has(s))
690
690
  return;
691
- const o = YS(n, e);
691
+ const o = Y1(n, e);
692
692
  i.prepend(o);
693
693
  const a = () => {
694
694
  oc.delete(s), K_(o);
695
695
  };
696
696
  oc.set(s, a), setTimeout(a, 1e4);
697
697
  }
698
- function aD() {
698
+ function lD() {
699
699
  S0 && console.log("Clearing messages");
700
700
  for (const n of oc.values())
701
701
  n == null || n.call(n);
702
702
  oc.clear();
703
703
  }
704
- const XS = `
704
+ const X1 = `
705
705
 
706
706
  @import url('https://fonts.googleapis.com/css2?family=Roboto+Flex:opsz,wght@8..144,100..1000&display=swap');
707
707
 
@@ -738,7 +738,7 @@ div[data-needle_engine_debug_overlay] .error strong {
738
738
  color: rgba(255,100,120, 1);
739
739
  }
740
740
  `;
741
- function QS(n) {
741
+ function Q1(n) {
742
742
  globalThis[Rf] || (globalThis[Rf] = /* @__PURE__ */ new Map());
743
743
  const t = globalThis[Rf];
744
744
  if (t.has(n))
@@ -762,7 +762,7 @@ function QS(n) {
762
762
  word-break: break-word;
763
763
  `, n.shadowRoot ? n.shadowRoot.appendChild(e) : n.appendChild(e);
764
764
  const i = document.createElement("style");
765
- return i.innerHTML = XS, e.appendChild(i), e;
765
+ return i.innerHTML = X1, e.appendChild(i), e;
766
766
  }
767
767
  }
768
768
  const M0 = Symbol("logtype"), Fd = /* @__PURE__ */ new Map();
@@ -771,7 +771,7 @@ function K_(n) {
771
771
  const t = n[M0], e = Fd.get(t) ?? [];
772
772
  e.push(n), Fd.set(t, e);
773
773
  }
774
- function YS(n, t) {
774
+ function Y1(n, t) {
775
775
  if (Fd.has(n)) {
776
776
  const i = Fd.get(n);
777
777
  if (i.length > 0) {
@@ -793,7 +793,7 @@ function YS(n, t) {
793
793
  }
794
794
  return e.title = "Open the browser console (F12) for more information", e.innerHTML = t, e;
795
795
  }
796
- class KS {
796
+ class K1 {
797
797
  constructor() {
798
798
  r(this, "Rad2Deg", 180 / Math.PI);
799
799
  r(this, "Deg2Rad", Math.PI / 180);
@@ -859,7 +859,7 @@ class KS {
859
859
  return Math.pow(t, 1 / 2.2);
860
860
  }
861
861
  approximately(t, e, i = Number.EPSILON) {
862
- for (const s of ZS) {
862
+ for (const s of Z1) {
863
863
  const o = t[s], a = e[s];
864
864
  if (o === void 0 || a === void 0)
865
865
  break;
@@ -872,7 +872,7 @@ class KS {
872
872
  return t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;
873
873
  }
874
874
  }
875
- const ZS = ["x", "y", "z", "w"], $ = new KS();
875
+ const Z1 = ["x", "y", "z", "w"], $ = new K1();
876
876
  class Z_ {
877
877
  constructor(t) {
878
878
  r(this, "y");
@@ -972,7 +972,7 @@ class R0 {
972
972
  }
973
973
  }
974
974
  const ud = "needle:cameraController";
975
- function JS(n) {
975
+ function J1(n) {
976
976
  return n[ud];
977
977
  }
978
978
  function J_(n, t, e) {
@@ -985,12 +985,12 @@ function eC(n) {
985
985
  function om(n, t) {
986
986
  n[nm] = t;
987
987
  }
988
- function lD(n, t, e) {
988
+ function cD(n, t, e) {
989
989
  const i = n.length(), s = t.length(), o = $.lerp(i, s, e);
990
990
  return n.lerp(t, e).normalize().multiplyScalar(o);
991
991
  }
992
992
  const Af = new W(), k0 = new W().setFromAxisAngle(new v(0, 1, 0), Math.PI);
993
- function cD(n, t) {
993
+ function hD(n, t) {
994
994
  n.lookAt(t), n.quaternion.multiply(k0);
995
995
  }
996
996
  function Tu(n, t, e = !0, i = !1) {
@@ -1072,7 +1072,7 @@ function Lc(n, t) {
1072
1072
  n.parent.getWorldScale(e), n.scale.copy(t), n.scale.divide(e);
1073
1073
  }
1074
1074
  const aC = new v(), ty = new W();
1075
- function hD(n) {
1075
+ function dD(n) {
1076
1076
  return Ce(n, ty), aC.set(0, 0, 1).applyQuaternion(ty);
1077
1077
  }
1078
1078
  const lC = new ts(() => new v(), 100), iy = new W();
@@ -1107,7 +1107,7 @@ function rm(n, t = !0) {
1107
1107
  console.log(i + e.name + " <" + e.type + ">");
1108
1108
  }));
1109
1109
  }
1110
- function dD(n) {
1110
+ function uD(n) {
1111
1111
  let t = (n == null ? void 0 : n.name) || "";
1112
1112
  if (!n)
1113
1113
  return t;
@@ -1205,7 +1205,7 @@ r(fs, "planeGeometry", new qs(2, 2, 1, 1)), r(fs, "renderer"), r(fs, "perspectiv
1205
1205
  function uC(n) {
1206
1206
  return fs.copyTexture(n);
1207
1207
  }
1208
- function uD(n, t = !1) {
1208
+ function fD(n, t = !1) {
1209
1209
  return fs.textureToCanvas(n, t);
1210
1210
  }
1211
1211
  function fC(n) {
@@ -1313,7 +1313,7 @@ function L0(n, t, e, i) {
1313
1313
  return o && (o.map ? s.color.set(1, 1, 1) : s.color.copyLinearToSRGB(o.color), s.emissive.copyLinearToSRGB(o.emissive), s.emissiveIntensity = o.emissiveIntensity, s.opacity = o.opacity, s.displacementScale = o.displacementScale, s.transparent = o.transparent, s.bumpMap = o.bumpMap, s.aoMap = o.aoMap, s.map = o.map, s.displacementMap = o.displacementMap, s.emissiveMap = o.emissiveMap, s.normalMap = o.normalMap, s.envMap = o.envMap, s.alphaMap = o.alphaMap, s.metalness = o.reflectivity, s.vertexColors = o.vertexColors, o.shininess && (s.roughness = 1 - Math.sqrt(o.shininess) / 10), s.needsUpdate = !0), e === void 0 ? n.material = s : i[e] = s, !0;
1314
1314
  }
1315
1315
  let kh = !1;
1316
- $S((...n) => {
1316
+ $1((...n) => {
1317
1317
  var t;
1318
1318
  z() && ((t = fe.Current) != null && t.isInXR) && (Sa(!0), j0("error", ...n));
1319
1319
  });
@@ -1339,7 +1339,7 @@ class yC {
1339
1339
  r(this, "root", null);
1340
1340
  r(this, "context", null);
1341
1341
  r(this, "defaultFontSize", 0.06);
1342
- r(this, "targetObject", new D());
1342
+ r(this, "targetObject", new L());
1343
1343
  /** this is a point in forward view of the user */
1344
1344
  r(this, "userForwardViewPoint", new v());
1345
1345
  r(this, "oneEuroFilter", new R0(90, 0.8));
@@ -1433,7 +1433,7 @@ class yC {
1433
1433
  disableDepthTestRecursive(t, e = 0) {
1434
1434
  for (let s = 0; s < t.children.length; s++) {
1435
1435
  const o = t.children[s];
1436
- o instanceof D && this.disableDepthTestRecursive(o, e + 1);
1436
+ o instanceof L && this.disableDepthTestRecursive(o, e + 1);
1437
1437
  }
1438
1438
  t.renderOrder = 10 * e, t.layers.set(2);
1439
1439
  const i = t.material;
@@ -1603,7 +1603,7 @@ function z() {
1603
1603
  let n = ui();
1604
1604
  return n || (n = window.location.hostname.endsWith(".local-credentialless.webcontainer.io")), If = n, n;
1605
1605
  }
1606
- function fD(n) {
1606
+ function pD(n) {
1607
1607
  am = n;
1608
1608
  }
1609
1609
  let Kt, yi = null, Bs = null, Ol = !1, oy = null;
@@ -1616,7 +1616,7 @@ if (!xC && (Vl || ui())) {
1616
1616
  Open this page to get the console: ` + t.toString());
1617
1617
  }
1618
1618
  const n = q.isMobileDevice() || q.isQuest() && z();
1619
- if ((n || Vl) && (HS(), z0(), U0(!0), n)) {
1619
+ if ((n || Vl) && (H1(), z0(), U0(!0), n)) {
1620
1620
  const t = document.querySelector("needle-engine");
1621
1621
  t == null || t.addEventListener("enter-ar", () => {
1622
1622
  (Vl || Kt || mg() > 0) && x("noerrors");
@@ -1788,15 +1788,15 @@ function TC() {
1788
1788
  return n || null;
1789
1789
  }
1790
1790
  const N0 = x("debugdefines");
1791
- So('if(!globalThis[""4.4.0-alpha.2""]) globalThis[""4.4.0-alpha.2""] = "0.0.0";');
1791
+ So('if(!globalThis[""4.4.0-alpha.3""]) globalThis[""4.4.0-alpha.3""] = "0.0.0";');
1792
1792
  So('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
1793
- So('if(!globalThis[""Fri Mar 21 2025 18:58:50 GMT+0100 (Central European Standard Time)""]) globalThis[""Fri Mar 21 2025 18:58:50 GMT+0100 (Central European Standard Time)""] = "unknown";');
1793
+ So('if(!globalThis[""Tue Mar 25 2025 17:29:47 GMT+0100 (Central European Standard Time)""]) globalThis[""Tue Mar 25 2025 17:29:47 GMT+0100 (Central European Standard Time)""] = "unknown";');
1794
1794
  So('if(!globalThis[""npk_0b7230d0d7c94c5ef23003726b2e2ccfc5ec0f20d26de8f0bda29e63698f9006""]) globalThis[""npk_0b7230d0d7c94c5ef23003726b2e2ccfc5ec0f20d26de8f0bda29e63698f9006""] = "unknown";');
1795
- So('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.4.0-alpha.2";');
1795
+ So('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.4.0-alpha.3";');
1796
1796
  So('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
1797
- So('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Fri Mar 21 2025 18:58:50 GMT+0100 (Central European Standard Time)";');
1797
+ So('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Tue Mar 25 2025 17:29:47 GMT+0100 (Central European Standard Time)";');
1798
1798
  So('globalThis["__NEEDLE_PUBLIC_KEY__"] = "npk_0b7230d0d7c94c5ef23003726b2e2ccfc5ec0f20d26de8f0bda29e63698f9006";');
1799
- const Ns = "4.4.0-alpha.2", _g = "undefined", $0 = "Fri Mar 21 2025 18:58:50 GMT+0100 (Central European Standard Time)";
1799
+ const Ns = "4.4.0-alpha.3", _g = "undefined", $0 = "Tue Mar 25 2025 17:29:47 GMT+0100 (Central European Standard Time)";
1800
1800
  N0 && console.log(`Engine version: ${Ns} (generator: ${_g})
1801
1801
  Project built at ${$0}`);
1802
1802
  const fd = "npk_0b7230d0d7c94c5ef23003726b2e2ccfc5ec0f20d26de8f0bda29e63698f9006", fo = "needle_isActiveInHierarchy", oa = "builtin_components", pd = "needle_editor_guid";
@@ -1832,7 +1832,7 @@ function yg(n, t, e, i) {
1832
1832
  }
1833
1833
  }));
1834
1834
  }
1835
- function pD(n, t, e) {
1835
+ function mD(n, t, e) {
1836
1836
  const i = bg(n, t);
1837
1837
  if (i)
1838
1838
  for (let s = i.length - 1; s >= 0; s--) {
@@ -1890,7 +1890,7 @@ const za = [];
1890
1890
  function vg(n) {
1891
1891
  za.indexOf(n) === -1 && za.push(n);
1892
1892
  }
1893
- function mD(n) {
1893
+ function gD(n) {
1894
1894
  const t = za.indexOf(n);
1895
1895
  t !== -1 && za.splice(t, 1);
1896
1896
  }
@@ -1898,7 +1898,7 @@ const Ua = [];
1898
1898
  function H0(n) {
1899
1899
  Ua.indexOf(n) === -1 && Ua.push(n);
1900
1900
  }
1901
- function gD(n) {
1901
+ function _D(n) {
1902
1902
  const t = Ua.indexOf(n);
1903
1903
  t !== -1 && Ua.splice(t, 1);
1904
1904
  }
@@ -2017,7 +2017,7 @@ class Th extends KeyboardEvent {
2017
2017
  super.stopImmediatePropagation(), (e = this.source) == null || e.stopImmediatePropagation();
2018
2018
  }
2019
2019
  }
2020
- class _D {
2020
+ class yD {
2021
2021
  constructor(t) {
2022
2022
  r(this, "key");
2023
2023
  r(this, "keyType");
@@ -2573,7 +2573,7 @@ class VC {
2573
2573
  }
2574
2574
  getAndUpdateSpatialObjectForScreenPosition(t, e, i) {
2575
2575
  let s = this._pointerSpace[t];
2576
- s || (s = new D(), this._pointerSpace[t] = s), this._pointerSpace[t] = s;
2576
+ s || (s = new L(), this._pointerSpace[t] = s), this._pointerSpace[t] = s;
2577
2577
  const o = this.context.mainCamera;
2578
2578
  if (o) {
2579
2579
  const a = this.tempNearPlaneVector.set(e, i, -1);
@@ -2695,7 +2695,7 @@ class GC {
2695
2695
  constructor() {
2696
2696
  r(this, "priority", -1e5);
2697
2697
  r(this, "gameObject");
2698
- if (this.gameObject = new D(), this.gameObject.name = "Implicit XR Rig", HC) {
2698
+ if (this.gameObject = new L(), this.gameObject.name = "Implicit XR Rig", HC) {
2699
2699
  const t = Cg(16733661);
2700
2700
  t.position.y += 0.5, this.gameObject.add(t);
2701
2701
  }
@@ -2825,7 +2825,7 @@ class G0 {
2825
2825
  r(this, "_lastPointerMoveQuaternion", new W());
2826
2826
  /** cached spatial pointer init object. We re-use it to not have */
2827
2827
  r(this, "pointerInit");
2828
- this.xr = t, this.inputSource = e, this.index = i, this._object = new D(), this._object.name = `NeedleXRController_${i}`, sn && (this._object.add(this._debugAxesHelper), this._gripSpaceObject = new D(), this._raySpaceObject = new D(), this._gripSpaceObject.name = `NeedleXRController_${i}_gripSpace`, this._raySpaceObject.name = `NeedleXRController_${i}_raySpace`, this._gripSpaceObject.add(this._debugGripAxesHelper), this._raySpaceObject.add(this._debugRayAxesHelper), this.xr.context.scene.add(this._gripSpaceObject), this.xr.context.scene.add(this._raySpaceObject)), this.xr.context.scene.add(this._object), this._ray = new vo(), this.pointerInit = {
2828
+ this.xr = t, this.inputSource = e, this.index = i, this._object = new L(), this._object.name = `NeedleXRController_${i}`, sn && (this._object.add(this._debugAxesHelper), this._gripSpaceObject = new L(), this._raySpaceObject = new L(), this._gripSpaceObject.name = `NeedleXRController_${i}_gripSpace`, this._raySpaceObject.name = `NeedleXRController_${i}_raySpace`, this._gripSpaceObject.add(this._debugGripAxesHelper), this._raySpaceObject.add(this._debugRayAxesHelper), this.xr.context.scene.add(this._gripSpaceObject), this.xr.context.scene.add(this._raySpaceObject)), this.xr.context.scene.add(this._object), this._ray = new vo(), this.pointerInit = {
2829
2829
  origin: this,
2830
2830
  pointerType: this.hand ? "hand" : "controller",
2831
2831
  deviceIndex: this.index,
@@ -3217,12 +3217,12 @@ Pinch: ${(o = this.getGesture("pinch")) == null ? void 0 : o.value.toFixed(3)}`)
3217
3217
  if (this._hasSelectEvent = this.profiles.includes("generic-hand-select") || this.profiles.some((t) => t.startsWith("generic-trigger")), this._isMetaQuestTouchController = this.profiles.includes("meta-quest-touch-plus") || this.profiles.includes("oculus-touch-v3"), this._isMxInk = this.profiles.includes("logitech-mx-ink"), !this._layout) {
3218
3218
  if (this.inputSource.targetRayMode === "transient-pointer")
3219
3219
  return;
3220
- const t = gS(this.inputSource, qC, XC);
3220
+ const t = g1(this.inputSource, qC, XC);
3221
3221
  this.getMotionController = t.then((e) => {
3222
3222
  var o;
3223
3223
  if (!this.connected)
3224
3224
  return null;
3225
- this._motioncontroller = new _S(
3225
+ this._motioncontroller = new _1(
3226
3226
  this.inputSource,
3227
3227
  e.profile,
3228
3228
  e.assetPath || ""
@@ -3430,10 +3430,10 @@ function ZC(n) {
3430
3430
  return typeof n.guid == "function" ? n.guid() : null;
3431
3431
  }
3432
3432
  let xg;
3433
- function yD() {
3433
+ function bD() {
3434
3434
  return xg;
3435
3435
  }
3436
- function bD(n) {
3436
+ function vD(n) {
3437
3437
  xg = n;
3438
3438
  }
3439
3439
  function JC(n, t) {
@@ -3533,7 +3533,7 @@ const my = "https://urls.needle.tools/default-networking-backend/index";
3533
3533
  let ai = "wss://networking.needle.tools/socket";
3534
3534
  const _i = !!x("debugnet"), Ih = !!(_i || x("debugowner")), Lf = x("debugnetbin");
3535
3535
  var sP = /* @__PURE__ */ ((n) => (n.ConnectionInfo = "connection-start-info", n))(sP || {}), se = /* @__PURE__ */ ((n) => (n.Join = "join-room", n.Leave = "leave-room", n.JoinedRoom = "joined-room", n.LeftRoom = "left-room", n.UserJoinedRoom = "user-joined-room", n.UserLeftRoom = "user-left-room", n.RoomStateSent = "room-state-sent", n))(se || {});
3536
- class vD {
3536
+ class wD {
3537
3537
  constructor() {
3538
3538
  r(this, "room");
3539
3539
  // room name
@@ -3543,13 +3543,13 @@ class vD {
3543
3543
  }
3544
3544
  // connection ids
3545
3545
  }
3546
- class wD {
3546
+ class xD {
3547
3547
  constructor() {
3548
3548
  r(this, "room");
3549
3549
  }
3550
3550
  // room name
3551
3551
  }
3552
- class xD {
3552
+ class SD {
3553
3553
  constructor() {
3554
3554
  r(this, "userId");
3555
3555
  }
@@ -3853,7 +3853,7 @@ class oP {
3853
3853
  return Promise.resolve(!0);
3854
3854
  t && console.debug("Connecting to user provided url " + t);
3855
3855
  const e = t || ((i = this.netWebSocketUrlProvider) == null ? void 0 : i.getWebsocketUrl());
3856
- return e ? ai = e : TS() && (ai = "wss://" + window.location.host + "/socket"), this.connectWebsocket();
3856
+ return e ? ai = e : T1() && (ai = "wss://" + window.location.host + "/socket"), this.connectWebsocket();
3857
3857
  }
3858
3858
  /** Used to disconnect from the networking server */
3859
3859
  disconnect() {
@@ -3912,7 +3912,7 @@ class oP {
3912
3912
  Lf && console.log("<< bin", this.context.time.frame);
3913
3913
  const e = await t.arrayBuffer();
3914
3914
  var i = new Uint8Array(e);
3915
- const s = new yS(i), o = s.getBufferIdentifier(), a = this._listenersBinary[o], l = KC(s), c = ZC(l);
3915
+ const s = new y1(i), o = s.getBufferIdentifier(), a = this._listenersBinary[o], l = KC(s), c = ZC(l);
3916
3916
  if (c && typeof c == "string" && (this._state[c] = l), !a)
3917
3917
  return;
3918
3918
  const h = l ?? s;
@@ -4187,7 +4187,7 @@ class Ar {
4187
4187
  static createText(t, e) {
4188
4188
  let i = null;
4189
4189
  const s = (e == null ? void 0 : e.font) || lP((e == null ? void 0 : e.familyFamily) || null);
4190
- s instanceof Y1 ? i = Uo(this, Hc, dm).call(this, t, s, e) : i == null && (i = new Pn());
4190
+ s instanceof YS ? i = Uo(this, Hc, dm).call(this, t, s, e) : i == null && (i = new Pn());
4191
4191
  const o = (e == null ? void 0 : e.color) || 16777215, a = new X(i, (e == null ? void 0 : e.material) ?? new hi({ color: o }));
4192
4192
  return this.applyDefaultObjectOptions(a, e), s instanceof Promise ? s.then((l) => {
4193
4193
  a.geometry = Uo(this, Hc, dm).call(this, t, l, e), e != null && e.onGeometry && e.onGeometry(a);
@@ -4257,7 +4257,7 @@ class Ar {
4257
4257
  }
4258
4258
  Hc = new WeakSet(), dm = function(t, e, i) {
4259
4259
  const s = (i == null ? void 0 : i.depth) || 0.1;
4260
- return new K1(t, {
4260
+ return new KS(t, {
4261
4261
  font: e,
4262
4262
  size: 1,
4263
4263
  depth: s,
@@ -4298,7 +4298,7 @@ function lP(n) {
4298
4298
  if (s)
4299
4299
  return s;
4300
4300
  }
4301
- const e = new Z1(), i = new Promise((s, o) => {
4301
+ const e = new ZS(), i = new Promise((s, o) => {
4302
4302
  e.load(t, (a) => {
4303
4303
  Dh.set(t, a), s(a);
4304
4304
  }, void 0, o);
@@ -4737,7 +4737,7 @@ const pn = class {
4737
4737
  });
4738
4738
  r(this, "_script_to_remove", []);
4739
4739
  r(this, "_camera");
4740
- r(this, "_cameraRenderParent", new D().rotateY(Math.PI));
4740
+ r(this, "_cameraRenderParent", new L().rotateY(Math.PI));
4741
4741
  r(this, "_previousCameraParent");
4742
4742
  r(this, "_customforward", !0);
4743
4743
  r(this, "originalCameraNearPlane");
@@ -5415,7 +5415,7 @@ const At = new v(), xy = new v(), Sy = new W(), gP = x("debuggizmos"), ls = 8947
5415
5415
  return null;
5416
5416
  o || (o = ls);
5417
5417
  const c = ((d = J.active) == null ? void 0 : d.rigScale) ?? 1, h = Ee.getTextLabel(s, e, i * c, o, a);
5418
- return l instanceof D && l.add(h), h.position.x = t.x, h.position.y = t.y, h.position.z = t.z, h;
5418
+ return l instanceof L && l.add(h), h.position.x = t.x, h.position.y = t.y, h.position.z = t.z, h;
5419
5419
  }
5420
5420
  /**
5421
5421
  * Draw a ray gizmo in the scene
@@ -6009,8 +6009,8 @@ var Ud;
6009
6009
  if (A) {
6010
6010
  const F = b;
6011
6011
  if (c.copy(w.matrixWorld).invert(), F.applyMatrix4(c), A.intersectsSphere(F)) {
6012
- const Z = ie(w), T = Z.distanceTo(F.center), L = new Z0(w, T, Z);
6013
- P.push(L);
6012
+ const Z = ie(w), T = Z.distanceTo(F.center), j = new Z0(w, T, Z);
6013
+ P.push(j);
6014
6014
  }
6015
6015
  }
6016
6016
  return !0;
@@ -6030,7 +6030,7 @@ var Ud;
6030
6030
  let h = !1, d = !1, u = null;
6031
6031
  const p = Symbol("Needle:MeshBVH-Worker"), m = Symbol("Needle:MeshBVH-CanUseWorker"), g = [], _ = [];
6032
6032
  function y() {
6033
- h = !0, d = !0, Promise.resolve().then(() => EI).then((b) => {
6033
+ h = !0, d = !0, Promise.resolve().then(() => II).then((b) => {
6034
6034
  u = b.GenerateMeshBVHWorker;
6035
6035
  }).catch((b) => {
6036
6036
  (bi || z()) && console.warn("Failed to setup mesh bvh worker");
@@ -6064,7 +6064,7 @@ const Oy = Symbol("gltf-loader-internal-usage-tracker"), vP = x("debugusers"), x
6064
6064
  afterRoot(t) {
6065
6065
  xc._loadingProcesses--, this.parser.getDependency = this._getDependency;
6066
6066
  for (const e of this._loadedObjects)
6067
- delete e[Oy], e instanceof D && (e.parent || e instanceof X && setTimeout(() => {
6067
+ delete e[Oy], e instanceof L && (e.parent || e instanceof X && setTimeout(() => {
6068
6068
  vP && console.warn("> GLTF LOADER: Mesh not used in scene!", e), e.material = null, e.geometry = null;
6069
6069
  }, 1e3));
6070
6070
  return null;
@@ -6105,7 +6105,7 @@ function J0() {
6105
6105
  }
6106
6106
  let Er = !0;
6107
6107
  Du === 0 && (Er = !1);
6108
- function SD(n) {
6108
+ function CD(n) {
6109
6109
  Er = n;
6110
6110
  }
6111
6111
  function xP() {
@@ -6116,7 +6116,7 @@ function tv(n, t) {
6116
6116
  n && (n[ev] = t, hr && console.warn("Set disposable", t, n));
6117
6117
  }
6118
6118
  const iv = Symbol("disposed");
6119
- function CD(n) {
6119
+ function PD(n) {
6120
6120
  return n[iv] === !0;
6121
6121
  }
6122
6122
  function Ae(n) {
@@ -6156,7 +6156,7 @@ function Ae(n) {
6156
6156
  s instanceof Fe ? (Ae(s), e[i] = null) : s instanceof lo && (Ae(s.value), s.value = null);
6157
6157
  }
6158
6158
  } else
6159
- n instanceof Fe ? (Gr(n), Gr(n.source), ((t = n.source) == null ? void 0 : t.data) instanceof ImageBitmap && Gr(n.source.data)) : n instanceof Fx ? (Gr(n.boneTexture), n.boneTexture = null) : n instanceof zx || !(n instanceof D) && hr && console.warn("Unknown object type", n);
6159
+ n instanceof Fe ? (Gr(n), Gr(n.source), ((t = n.source) == null ? void 0 : t.data) instanceof ImageBitmap && Gr(n.source.data)) : n instanceof Fx ? (Gr(n.boneTexture), n.boneTexture = null) : n instanceof zx || !(n instanceof L) && hr && console.warn("Unknown object type", n);
6160
6160
  }
6161
6161
  }
6162
6162
  function Gr(n) {
@@ -6175,7 +6175,7 @@ function sv(n, t, e = null, i) {
6175
6175
  i.has(o) || (e == null ? void 0 : e.call(null, o)) !== !1 && (i.add(o), t && sv(o, !0, e, i));
6176
6176
  return i;
6177
6177
  }
6178
- function PD(n) {
6178
+ function OD(n) {
6179
6179
  return n[Hl];
6180
6180
  }
6181
6181
  const hr = x("debugresourceusers") || x("debugmemory"), Bc = Symbol("needle-resource-users"), Hl = Symbol("needle-resource-users-count");
@@ -6546,7 +6546,7 @@ function DP(n) {
6546
6546
  e && is(e);
6547
6547
  });
6548
6548
  }
6549
- class OD {
6549
+ class MD {
6550
6550
  constructor(t, e, i) {
6551
6551
  /** File to download */
6552
6552
  r(this, "filename");
@@ -6685,7 +6685,7 @@ class NP {
6685
6685
  return null;
6686
6686
  }
6687
6687
  }
6688
- const $P = Symbol("BuiltInType"), R = new NP(), MD = function(n) {
6688
+ const $P = Symbol("BuiltInType"), R = new NP(), RD = function(n) {
6689
6689
  R.get(n.name) || R.add(n.name, n);
6690
6690
  }, Og = x("debugresolvedependencies"), WP = ["/extensions/", "extensions/"], VP = [
6691
6691
  { prefix: "/nodes/", dependencyName: "node" },
@@ -7426,48 +7426,48 @@ function uO(n, t, e = void 0) {
7426
7426
  return t;
7427
7427
  }
7428
7428
  function kg(n) {
7429
- n && n.isObject3D === !0 && oO(n, D);
7429
+ n && n.isObject3D === !0 && oO(n, L);
7430
7430
  }
7431
- D.prototype.SetActive = function(n) {
7431
+ L.prototype.SetActive = function(n) {
7432
7432
  this.visible = n;
7433
7433
  };
7434
- D.prototype.setActive = function(n) {
7434
+ L.prototype.setActive = function(n) {
7435
7435
  this.visible = n;
7436
7436
  };
7437
- D.prototype.destroy = function() {
7437
+ L.prototype.destroy = function() {
7438
7438
  is(this);
7439
7439
  };
7440
- D.prototype.addComponent = function(n, t) {
7440
+ L.prototype.addComponent = function(n, t) {
7441
7441
  return Ji(this, n, t);
7442
7442
  };
7443
- D.prototype.addNewComponent = function(n, t) {
7443
+ L.prototype.addNewComponent = function(n, t) {
7444
7444
  return Ji(this, n, t);
7445
7445
  };
7446
- D.prototype.removeComponent = function(n) {
7446
+ L.prototype.removeComponent = function(n) {
7447
7447
  return yv(this, n);
7448
7448
  };
7449
- D.prototype.getOrAddComponent = function(n, t) {
7449
+ L.prototype.getOrAddComponent = function(n, t) {
7450
7450
  return Bu(this, n, t);
7451
7451
  };
7452
- D.prototype.getComponent = function(n) {
7452
+ L.prototype.getComponent = function(n) {
7453
7453
  return Ya(this, n);
7454
7454
  };
7455
- D.prototype.getComponents = function(n, t) {
7455
+ L.prototype.getComponents = function(n, t) {
7456
7456
  return Fu(this, n, t);
7457
7457
  };
7458
- D.prototype.getComponentInChildren = function(n) {
7458
+ L.prototype.getComponentInChildren = function(n) {
7459
7459
  return zu(this, n);
7460
7460
  };
7461
- D.prototype.getComponentsInChildren = function(n, t) {
7461
+ L.prototype.getComponentsInChildren = function(n, t) {
7462
7462
  return Yc(this, n, t);
7463
7463
  };
7464
- D.prototype.getComponentInParent = function(n) {
7464
+ L.prototype.getComponentInParent = function(n) {
7465
7465
  return Hd(this, n);
7466
7466
  };
7467
- D.prototype.getComponentsInParent = function(n, t) {
7467
+ L.prototype.getComponentsInParent = function(n, t) {
7468
7468
  return Rg(this, n, t);
7469
7469
  };
7470
- Object.getOwnPropertyDescriptor(D.prototype, "activeSelf") || Object.defineProperty(D.prototype, "activeSelf", {
7470
+ Object.getOwnPropertyDescriptor(L.prototype, "activeSelf") || Object.defineProperty(L.prototype, "activeSelf", {
7471
7471
  get: function() {
7472
7472
  return Kc(this);
7473
7473
  },
@@ -7475,7 +7475,7 @@ Object.getOwnPropertyDescriptor(D.prototype, "activeSelf") || Object.definePrope
7475
7475
  vd(this, n);
7476
7476
  }
7477
7477
  });
7478
- Object.getOwnPropertyDescriptor(D.prototype, "worldPosition") || Object.defineProperty(D.prototype, "worldPosition", {
7478
+ Object.getOwnPropertyDescriptor(L.prototype, "worldPosition") || Object.defineProperty(L.prototype, "worldPosition", {
7479
7479
  get: function() {
7480
7480
  return this instanceof h0 ? ie(this.object) : ie(this);
7481
7481
  },
@@ -7483,7 +7483,7 @@ Object.getOwnPropertyDescriptor(D.prototype, "worldPosition") || Object.definePr
7483
7483
  yt(this, n);
7484
7484
  }
7485
7485
  });
7486
- Object.getOwnPropertyDescriptor(D.prototype, "worldQuaternion") || Object.defineProperty(D.prototype, "worldQuaternion", {
7486
+ Object.getOwnPropertyDescriptor(L.prototype, "worldQuaternion") || Object.defineProperty(L.prototype, "worldQuaternion", {
7487
7487
  get: function() {
7488
7488
  return this instanceof h0 ? Ce(this.object) : Ce(this);
7489
7489
  },
@@ -7491,7 +7491,7 @@ Object.getOwnPropertyDescriptor(D.prototype, "worldQuaternion") || Object.define
7491
7491
  vs(this, n);
7492
7492
  }
7493
7493
  });
7494
- Object.getOwnPropertyDescriptor(D.prototype, "worldRotation") || Object.defineProperty(D.prototype, "worldRotation", {
7494
+ Object.getOwnPropertyDescriptor(L.prototype, "worldRotation") || Object.defineProperty(L.prototype, "worldRotation", {
7495
7495
  get: function() {
7496
7496
  return Au(this);
7497
7497
  },
@@ -7499,7 +7499,7 @@ Object.getOwnPropertyDescriptor(D.prototype, "worldRotation") || Object.definePr
7499
7499
  I0(this, n);
7500
7500
  }
7501
7501
  });
7502
- Object.getOwnPropertyDescriptor(D.prototype, "worldScale") || Object.defineProperty(D.prototype, "worldScale", {
7502
+ Object.getOwnPropertyDescriptor(L.prototype, "worldScale") || Object.defineProperty(L.prototype, "worldScale", {
7503
7503
  get: function() {
7504
7504
  return Ke(this);
7505
7505
  },
@@ -7507,22 +7507,22 @@ Object.getOwnPropertyDescriptor(D.prototype, "worldScale") || Object.definePrope
7507
7507
  Lc(this, n);
7508
7508
  }
7509
7509
  });
7510
- Object.getOwnPropertyDescriptor(D.prototype, "worldForward") || Object.defineProperty(D.prototype, "worldForward", {
7510
+ Object.getOwnPropertyDescriptor(L.prototype, "worldForward") || Object.defineProperty(L.prototype, "worldForward", {
7511
7511
  get: function() {
7512
7512
  return G().set(0, 0, 1).applyQuaternion(Ce(this));
7513
7513
  }
7514
7514
  });
7515
- Object.getOwnPropertyDescriptor(D.prototype, "worldRight") || Object.defineProperty(D.prototype, "worldRight", {
7515
+ Object.getOwnPropertyDescriptor(L.prototype, "worldRight") || Object.defineProperty(L.prototype, "worldRight", {
7516
7516
  get: function() {
7517
7517
  return G().set(1, 0, 0).applyQuaternion(Ce(this));
7518
7518
  }
7519
7519
  });
7520
- Object.getOwnPropertyDescriptor(D.prototype, "worldUp") || Object.defineProperty(D.prototype, "worldUp", {
7520
+ Object.getOwnPropertyDescriptor(L.prototype, "worldUp") || Object.defineProperty(L.prototype, "worldUp", {
7521
7521
  get: function() {
7522
7522
  return G().set(0, 1, 0).applyQuaternion(Ce(this));
7523
7523
  }
7524
7524
  });
7525
- rO(D);
7525
+ rO(L);
7526
7526
  class we extends le {
7527
7527
  constructor(e, i, s, o) {
7528
7528
  var t = (...args) => {
@@ -8165,7 +8165,7 @@ const Hf = Symbol("assetReference"), Jo = class {
8165
8165
  }
8166
8166
  async onInstantiate(t, e = !1, i) {
8167
8167
  const s = ee.Current, o = new Xs();
8168
- if (t instanceof D ? o.parent = t : t && (Object.assign(o, t), o.cloneAssign(t)), o.parent || (o.parent = s.scene), this.mustLoad && await this.loadAssetAsync(), $n && console.log("Instantiate", this.url, "parent:", t), this.asset) {
8168
+ if (t instanceof L ? o.parent = t : t && (Object.assign(o, t), o.cloneAssign(t)), o.parent || (o.parent = s.scene), this.mustLoad && await this.loadAssetAsync(), $n && console.log("Instantiate", this.url, "parent:", t), this.asset) {
8169
8169
  $n && console.log("Add to scene", this.asset);
8170
8170
  let a = Jo.currentlyInstantiating.get(this.url);
8171
8171
  if (a !== void 0 && a >= 1e4)
@@ -8219,7 +8219,7 @@ class bO extends os {
8219
8219
  onDeserialize(t, e) {
8220
8220
  if (typeof t == "string")
8221
8221
  return e.context ? e.gltfId ? re.getOrCreate(e.gltfId, t, e.context) : (console.error("Missing source id"), null) : (console.error("Missing context"), null);
8222
- if (t instanceof D) {
8222
+ if (t instanceof L) {
8223
8223
  if (!e.context)
8224
8224
  return console.error("Missing context"), null;
8225
8225
  if (!e.gltfId)
@@ -8528,7 +8528,7 @@ function* Pv(n, t = null) {
8528
8528
  for (; e.time - i < n; )
8529
8529
  yield;
8530
8530
  }
8531
- function* RD(n) {
8531
+ function* kD(n) {
8532
8532
  for (let t = 0; t < n; t++)
8533
8533
  yield;
8534
8534
  }
@@ -9413,7 +9413,7 @@ const uu = class {
9413
9413
  }, 500), window.removeEventListener("click", o), window.removeEventListener("resize", o), window.removeEventListener("scroll", o);
9414
9414
  }
9415
9415
  async function a() {
9416
- const c = await NS({
9416
+ const c = await N1({
9417
9417
  text: window.location.href,
9418
9418
  width: 200,
9419
9419
  height: 200
@@ -9528,7 +9528,7 @@ class WO {
9528
9528
  }
9529
9529
  this._wasInXR || (this._wasInXR = !0, this.onEnterXR()), this.updateMenu();
9530
9530
  });
9531
- r(this, "_menuTarget", new D());
9531
+ r(this, "_menuTarget", new L());
9532
9532
  r(this, "positionFilter", new R0(90, 0.5));
9533
9533
  r(this, "familyName", "Needle Spatial Menu");
9534
9534
  r(this, "menu");
@@ -10059,6 +10059,10 @@ const O_ = class extends HTMLElement {
10059
10059
  color: rgb(20,20,20);
10060
10060
  }
10061
10061
 
10062
+ .options > select[multiple]:hover {
10063
+ max-height: 300px;
10064
+ }
10065
+
10062
10066
  .floating-panel-style {
10063
10067
  background: rgba(255, 255, 255, .4);
10064
10068
  outline: rgb(0 0 0 / 5%) 1px solid;
@@ -10562,8 +10566,8 @@ Gc = new WeakMap(), qc = new WeakSet(), Mm = function(e) {
10562
10566
  this.logoContainer.style.display = "", this.logoContainer.style.opacity = "1", this.logoContainer.style.visibility = "visible", e ? (this.root.classList.remove("logo-hidden"), this.root.classList.add("logo-visible")) : (this.root.classList.remove("logo-visible"), this.root.classList.add("logo-hidden"));
10563
10567
  };
10564
10568
  customElements.get(Qo) || customElements.define(Qo, Yd);
10565
- const nt = x("debugcontext"), GO = x("stats"), qO = x("debugactive"), XO = x("debugframerate"), QO = x("debugcoroutine"), TD = {};
10566
- class AD {
10569
+ const nt = x("debugcontext"), GO = x("stats"), qO = x("debugactive"), XO = x("debugframerate"), QO = x("debugcoroutine"), AD = {};
10570
+ class ED {
10567
10571
  constructor() {
10568
10572
  r(this, "name");
10569
10573
  /** for debugging only */
@@ -10700,7 +10704,7 @@ const Re = class {
10700
10704
  r(this, "_isCreated", !1);
10701
10705
  r(this, "_isCreating", !1);
10702
10706
  r(this, "_isVisible", !1);
10703
- r(this, "_stats", GO ? new J1() : null);
10707
+ r(this, "_stats", GO ? new JS() : null);
10704
10708
  r(this, "_intersectionObserver", null);
10705
10709
  r(this, "_disposeCallbacks", []);
10706
10710
  /** Clamps the renderer max resolution. If undefined the max resolution is not clamped. Default is undefined */
@@ -11185,7 +11189,7 @@ Possible solutions:
11185
11189
  if (!Array.isArray(m.file.parser.json.materials))
11186
11190
  continue;
11187
11191
  for (let _ = 0; _ < m.file.parser.json.materials.length; _++) {
11188
- const y = await m.file.parser.getDependency("material", _), b = new D();
11192
+ const y = await m.file.parser.getDependency("material", _), b = new L();
11189
11193
  b.position.x = _ * 1.1, b.position.y = g, this.scene.add(b), Ar.createPrimitive("ShaderBall", {
11190
11194
  parent: b,
11191
11195
  material: y
@@ -11334,7 +11338,7 @@ Possible solutions:
11334
11338
  return this.physics.engine.postStep(), !0;
11335
11339
  }
11336
11340
  internalOnRender() {
11337
- this.isManagedExternally || (AP(this), this._currentFrameEvent = -1, eS.update(), this.renderNow(), this._currentFrameEvent = 4);
11341
+ this.isManagedExternally || (AP(this), this._currentFrameEvent = -1, e1.update(), this.renderNow(), this._currentFrameEvent = 4);
11338
11342
  }
11339
11343
  internalOnAfterRender() {
11340
11344
  if (this.isVisibleToUser || this.runInBackground) {
@@ -11620,7 +11624,7 @@ async function iM() {
11620
11624
  }
11621
11625
  }
11622
11626
  const Yo = x("debugloading"), kl = x("debugloadingrendering"), Xy = x("debuglicense");
11623
- class ED {
11627
+ class ID {
11624
11628
  constructor() {
11625
11629
  r(this, "className");
11626
11630
  r(this, "additionalClasses");
@@ -11877,7 +11881,7 @@ function Iv() {
11877
11881
  return Yf;
11878
11882
  }
11879
11883
  function Yy(n) {
11880
- n !== void 0 && typeof n == "string" && X1(n);
11884
+ n !== void 0 && typeof n == "string" && XS(n);
11881
11885
  }
11882
11886
  function Ky(n) {
11883
11887
  if (n !== void 0 && typeof n == "string" && n !== "js") {
@@ -11886,11 +11890,11 @@ function Ky(n) {
11886
11890
  }
11887
11891
  }
11888
11892
  function Zy(n) {
11889
- n !== void 0 && typeof n == "string" && Q1(n);
11893
+ n !== void 0 && typeof n == "string" && QS(n);
11890
11894
  }
11891
11895
  function Nu(n, t) {
11892
11896
  const e = Iv();
11893
- return t.renderer ? e.ktx2Loader.detectSupport(t.renderer) : console.warn("No renderer provided to detect ktx2 support - loading KTX2 textures will probably fail"), G1(n), n.dracoLoader || n.setDRACOLoader(e.dracoLoader), n.ktx2Loader || n.setKTX2Loader(e.ktx2Loader), n.meshoptDecoder || n.setMeshoptDecoder(e.meshoptDecoder), q1(n, {
11897
+ return t.renderer ? e.ktx2Loader.detectSupport(t.renderer) : console.warn("No renderer provided to detect ktx2 support - loading KTX2 textures will probably fail"), GS(n), n.dracoLoader || n.setDRACOLoader(e.dracoLoader), n.ktx2Loader || n.setKTX2Loader(e.ktx2Loader), n.meshoptDecoder || n.setMeshoptDecoder(e.meshoptDecoder), qS(n, {
11894
11898
  progressive: !0
11895
11899
  }), n;
11896
11900
  }
@@ -11920,7 +11924,7 @@ function Jy(n) {
11920
11924
  }
11921
11925
  return n;
11922
11926
  }
11923
- class S extends D {
11927
+ class S extends L {
11924
11928
  constructor() {
11925
11929
  super(...arguments);
11926
11930
  /**
@@ -12626,7 +12630,7 @@ const Pc = class {
12626
12630
  };
12627
12631
  let I = Pc;
12628
12632
  r(I, "_forward", new v()), r(I, "_right", new v()), r(I, "_up", new v());
12629
- const ID = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12633
+ const DD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12630
12634
  __proto__: null,
12631
12635
  Behaviour: I,
12632
12636
  Component: I,
@@ -13002,7 +13006,7 @@ function dM(n) {
13002
13006
  const t = n[Cd];
13003
13007
  return t !== void 0 && t.size > 0;
13004
13008
  }
13005
- class LD {
13009
+ class jD {
13006
13010
  constructor() {
13007
13011
  r(this, "_context");
13008
13012
  }
@@ -14338,15 +14342,15 @@ Dg([
14338
14342
  f()
14339
14343
  ], Za.prototype, "locked", 2);
14340
14344
  Dg([
14341
- f(D)
14345
+ f(L)
14342
14346
  ], Za.prototype, "sources", 2);
14343
14347
  function SM(n, t) {
14344
14348
  return Dn(n, pe.ContextCreated, t), () => Co(n, pe.ContextCreated);
14345
14349
  }
14346
- function jD(n, t) {
14350
+ function BD(n, t) {
14347
14351
  return Dn(n, pe.ContextClearing, t), () => Co(n, pe.ContextClearing);
14348
14352
  }
14349
- function BD(n, t) {
14353
+ function FD(n, t) {
14350
14354
  return Dn(n, pe.ContextDestroying, t), () => Co(n, pe.ContextDestroying);
14351
14355
  }
14352
14356
  function CM(n, t) {
@@ -14355,10 +14359,10 @@ function CM(n, t) {
14355
14359
  function PM(n, t) {
14356
14360
  return Dn(n, Me.Update, t), () => Co(n, Me.Update);
14357
14361
  }
14358
- function FD(n, t) {
14362
+ function zD(n, t) {
14359
14363
  return Dn(n, Me.OnBeforeRender, t), () => Co(n, Me.OnBeforeRender);
14360
14364
  }
14361
- function zD(n, t) {
14365
+ function UD(n, t) {
14362
14366
  return Dn(n, Me.OnAfterRender, t), () => Co(n, Me.OnAfterRender);
14363
14367
  }
14364
14368
  let mr = class {
@@ -14470,7 +14474,7 @@ class vn {
14470
14474
  t.finish(e, void 0, !0);
14471
14475
  }
14472
14476
  }
14473
- var j;
14477
+ var D;
14474
14478
  ((n) => {
14475
14479
  ((t) => {
14476
14480
  t.MAYBEMODULE = null;
@@ -14521,7 +14525,7 @@ var j;
14521
14525
  }
14522
14526
  t.load = s;
14523
14527
  })(n.POSTPROCESSING_AO || (n.POSTPROCESSING_AO = {}));
14524
- })(j || (j = {}));
14528
+ })(D || (D = {}));
14525
14529
  var Ot = /* @__PURE__ */ ((n) => (n[n.Average = 0] = "Average", n[n.Multiply = 1] = "Multiply", n[n.Minimum = 2] = "Minimum", n[n.Maximum = 3] = "Maximum", n))(Ot || {}), Lg = /* @__PURE__ */ ((n) => (n[n.Discrete = 0] = "Discrete", n[n.Continuous = 1] = "Continuous", n))(Lg || {}), st = /* @__PURE__ */ ((n) => (n[n.None = 0] = "None", n[n.FreezePositionX = 2] = "FreezePositionX", n[n.FreezePositionY = 4] = "FreezePositionY", n[n.FreezePositionZ = 8] = "FreezePositionZ", n[n.FreezePosition = 14] = "FreezePosition", n[n.FreezeRotationX = 16] = "FreezeRotationX", n[n.FreezeRotationY = 32] = "FreezeRotationY", n[n.FreezeRotationZ = 64] = "FreezeRotationZ", n[n.FreezeRotation = 112] = "FreezeRotation", n[n.FreezeAll = 126] = "FreezeAll", n))(st || {}), Xl = /* @__PURE__ */ ((n) => (n[n.None = 0] = "None", n[n.X = 2] = "X", n[n.Y = 4] = "Y", n[n.Z = 8] = "Z", n[n.All = -1] = "All", n))(Xl || {});
14526
14530
  const Ut = function(n, t) {
14527
14531
  return function(e, i, s) {
@@ -14573,7 +14577,7 @@ function OM(n, t, e, i, s) {
14573
14577
  };
14574
14578
  }
14575
14579
  }
14576
- const ND = function(n) {
14580
+ const $D = function(n) {
14577
14581
  return function(t, e, i) {
14578
14582
  let s = "";
14579
14583
  typeof e == "string" ? s = e : s = e.name;
@@ -14772,7 +14776,7 @@ const Pd = (Bp = class extends I {
14772
14776
  this._watch = void 0, this._propertiesChanged = !1;
14773
14777
  }
14774
14778
  onEnable() {
14775
- this._watch || (this._watch = new kM(this.gameObject, this.context)), this._watch.start(!0, !0), this.startCoroutine(this.beforePhysics(), Me.LateUpdate), z() && (globalThis.true ? j.RAPIER_PHYSICS.ready().then(async () => {
14779
+ this._watch || (this._watch = new kM(this.gameObject, this.context)), this._watch.start(!0, !0), this.startCoroutine(this.beforePhysics(), Me.LateUpdate), z() && (globalThis.true ? D.RAPIER_PHYSICS.ready().then(async () => {
14776
14780
  var t;
14777
14781
  await ku(3), (t = this.context.physics.engine) != null && t.getBody(this) || console.warn(`Rigidbody could not be created. Ensure "${this.name}" has a Collider component.`);
14778
14782
  }) : console.warn("Rigidbody could not be created: Rapier physics are explicitly disabled."));
@@ -15203,7 +15207,7 @@ class ws extends I {
15203
15207
  const l = this._parentComponent.shadowComponent;
15204
15208
  l && (l == null || l.add(e), o = !0);
15205
15209
  }
15206
- this.shadowComponent = e, i && i.shadowComponent && this.shadowComponent && i.shadowComponent.add(this.shadowComponent), Qc && e.add(new Mi(0.5)), this.onAfterAddedToScene(), o && RS(), TM && console.warn("Added shadow component", this.shadowComponent);
15210
+ this.shadowComponent = e, i && i.shadowComponent && this.shadowComponent && i.shadowComponent.add(this.shadowComponent), Qc && e.add(new Mi(0.5)), this.onAfterAddedToScene(), o && R1(), TM && console.warn("Added shadow component", this.shadowComponent);
15207
15211
  }
15208
15212
  setShadowComponentOwner(e) {
15209
15213
  if (e && (e[Qi] === void 0 || e[Qi] === this) && (e[Qi] = this, e.children))
@@ -15509,7 +15513,7 @@ class EM extends os {
15509
15513
  return t.a !== void 0 ? { r: t.r, g: t.g, b: t.b, a: t.a } : { r: t.r, g: t.g, b: t.b };
15510
15514
  }
15511
15515
  }
15512
- const $D = new EM();
15516
+ const WD = new EM();
15513
15517
  class IM extends os {
15514
15518
  constructor() {
15515
15519
  super([Lt], "EulerSerializer");
@@ -15526,10 +15530,10 @@ class IM extends os {
15526
15530
  return { x: t.x, y: t.y, z: t.z, order: t.order };
15527
15531
  }
15528
15532
  }
15529
- const WD = new IM();
15533
+ const VD = new IM();
15530
15534
  class DM extends os {
15531
15535
  constructor() {
15532
- super(D, "ObjectSerializer");
15536
+ super(L, "ObjectSerializer");
15533
15537
  }
15534
15538
  onSerialize(t, e) {
15535
15539
  if (e.objectToNode !== void 0 && t.uuid) {
@@ -15712,7 +15716,7 @@ Could not find method ${h.method} on object ${u.name}`, u, typeof u[h.method]);
15712
15716
  // };
15713
15717
  // }
15714
15718
  }
15715
- const VD = new BM(), Kd = /* @__PURE__ */ new WeakMap(), FM = Fe.prototype.clone;
15719
+ const HD = new BM(), Kd = /* @__PURE__ */ new WeakMap(), FM = Fe.prototype.clone;
15716
15720
  Fe.prototype.clone = function() {
15717
15721
  const n = FM.call(this);
15718
15722
  return Kd.has(n) || Kd.set(n, this), n;
@@ -16477,7 +16481,7 @@ class be extends I {
16477
16481
  const e = S.getComponent(this.gameObject, Pe);
16478
16482
  this._camera = e;
16479
16483
  let i = e == null ? void 0 : e.threeCamera;
16480
- if (!i && this.gameObject instanceof ye && (i = this.gameObject), i && J_(i, this, !0), !this._controls && i instanceof D) {
16484
+ if (!i && this.gameObject instanceof ye && (i = this.gameObject), i && J_(i, this, !0), !this._controls && i instanceof L) {
16481
16485
  this._cameraObject = i;
16482
16486
  const s = this.targetElement ?? this.context.renderer.domElement, o = i == null ? void 0 : i.quaternion.clone();
16483
16487
  this._controls = new d0(i, s), i == null || i.quaternion.copy(o), Jf === void 0 && (Jf = { ...this._controls.keys });
@@ -16580,7 +16584,7 @@ class be extends I {
16580
16584
  setCameraAndLookTarget(e, i = !1) {
16581
16585
  if (!e)
16582
16586
  return z() && console.warn("[OrbitControls] setCameraAndLookTarget target is null"), !1;
16583
- if (!(e instanceof D) && !(e instanceof Pe))
16587
+ if (!(e instanceof L) && !(e instanceof Pe))
16584
16588
  return z() && console.warn("[OrbitControls] setCameraAndLookTarget target is not an Object3D or Camera"), !1;
16585
16589
  e instanceof Pe && (e = e.gameObject);
16586
16590
  const s = e.worldPosition, o = e.worldForward, a = new vo(s, o.multiplyScalar(-1));
@@ -16592,7 +16596,7 @@ class be extends I {
16592
16596
  */
16593
16597
  setCameraTargetPosition(e, i = !1) {
16594
16598
  var s;
16595
- e && (e instanceof D && (e = ie(e)), this._cameraEndPosition || (this._cameraEndPosition = new v()), this._cameraEndPosition.copy(e), i === !0 ? (this._cameraLerpActive = !1, this._cameraObject && this._cameraObject.position.copy(this._cameraEndPosition)) : this._cameraObject && (this._cameraLerpActive = !0, this._cameraLerp01 = 0, this._cameraStartPosition.copy((s = this._cameraObject) == null ? void 0 : s.position), typeof i == "number" ? this._cameraLerpDuration = i : this._cameraLerpDuration = this.targetLerpDuration));
16599
+ e && (e instanceof L && (e = ie(e)), this._cameraEndPosition || (this._cameraEndPosition = new v()), this._cameraEndPosition.copy(e), i === !0 ? (this._cameraLerpActive = !1, this._cameraObject && this._cameraObject.position.copy(this._cameraEndPosition)) : this._cameraObject && (this._cameraLerpActive = !0, this._cameraLerp01 = 0, this._cameraStartPosition.copy((s = this._cameraObject) == null ? void 0 : s.position), typeof i == "number" ? this._cameraLerpDuration = i : this._cameraLerpDuration = this.targetLerpDuration));
16596
16600
  }
16597
16601
  // public setCameraTargetRotation(rotation: Vector3 | Euler | Quaternion, immediateOrDuration: boolean | number = false): void {
16598
16602
  // if (!this._cameraObject) return;
@@ -16638,7 +16642,7 @@ class be extends I {
16638
16642
  * @param immediateOrDuration If true the camera target will move immediately to the new position, otherwise it will lerp. If a number is passed in it will be used as the duration of the lerp.
16639
16643
  */
16640
16644
  setLookTargetPosition(e = null, i = !1) {
16641
- this._controls && e && (e instanceof D && (e = ie(e)), this._lookTargetEndPosition.copy(e), this._didSetTarget++, qr && (console.warn("OrbitControls: setLookTargetPosition", e, i), V.DrawWireSphere(this._lookTargetEndPosition, 0.2, 16711680, 2)), i === !0 ? this._controls.target.copy(this._lookTargetEndPosition) : (this._lookTargetLerpActive = !0, this._lookTargetLerp01 = 0, this._lookTargetStartPosition.copy(this._controls.target), typeof i == "number" ? this._lookTargetLerpDuration = i : this._lookTargetLerpDuration = this.targetLerpDuration));
16645
+ this._controls && e && (e instanceof L && (e = ie(e)), this._lookTargetEndPosition.copy(e), this._didSetTarget++, qr && (console.warn("OrbitControls: setLookTargetPosition", e, i), V.DrawWireSphere(this._lookTargetEndPosition, 0.2, 16711680, 2)), i === !0 ? this._controls.target.copy(this._lookTargetEndPosition) : (this._lookTargetLerpActive = !0, this._lookTargetLerp01 = 0, this._lookTargetStartPosition.copy(this._controls.target), typeof i == "number" ? this._lookTargetLerpDuration = i : this._lookTargetLerpDuration = this.targetLerpDuration));
16642
16646
  }
16643
16647
  /** True while the camera look target is being lerped */
16644
16648
  get lookTargetLerpActive() {
@@ -16717,8 +16721,8 @@ class be extends I {
16717
16721
  $h && console.log("Fit camera to objects", { fitHeightDistance: P, fitWidthDistance: k, distance: O, verticalFov: b, horizontalFov: w }), this.maxZoom = O * 10, this.minZoom = O * 0.01;
16718
16722
  const M = 0.05, E = m.clone();
16719
16723
  if (E.y -= p.y * M, this.setLookTargetPosition(E, l), this.setFieldOfView(i.fov, l), h == null || h == "auto") {
16720
- const L = S.findObjectOfType(Ln), H = L ? L.radius : 0, Y = Math.max(y.x, y.y, y.z, H);
16721
- o.near = O / 100, o.far = Y + O * 10, L && (this.maxZoom = Math.max(Math.min(this.maxZoom, H * 0.5), O));
16724
+ const j = S.findObjectOfType(Ln), H = j ? j.radius : 0, Y = Math.max(y.x, y.y, y.z, H);
16725
+ o.near = O / 100, o.far = Y + O * 10, j && (this.maxZoom = Math.max(Math.min(this.maxZoom, H * 0.5), O));
16722
16726
  }
16723
16727
  const B = a.getDistance();
16724
16728
  B < this.minZoom && (this.minZoom = B * 0.9), B > this.maxZoom && (this.maxZoom = B * 1.1), o.updateMatrixWorld(), o.updateProjectionMatrix();
@@ -16726,9 +16730,9 @@ class be extends I {
16726
16730
  F.sub(A), c === "y" && (F.y = 0), F.normalize(), F.multiplyScalar(O), c === "y" && (F.y += -M * 4 * O);
16727
16731
  let U = m.clone().sub(F);
16728
16732
  if (o.parent && (U = o.parent.worldToLocal(U)), this.setCameraTargetPosition(U, l), $h) {
16729
- const L = new Zb(g);
16730
- this.context.scene.add(L), I0(L, Au(o)), setTimeout(() => {
16731
- this.context.scene.remove(L);
16733
+ const j = new Zb(g);
16734
+ this.context.scene.add(j), I0(j, Au(o)), setTimeout(() => {
16735
+ this.context.scene.remove(j);
16732
16736
  }, 1e4), V.DrawWireBox3(_, 65280, 10), this._haveAttachedKeyboardEvents || (this._haveAttachedKeyboardEvents = !0, document.body.addEventListener("keydown", (H) => {
16733
16737
  if (H.code === "KeyF") {
16734
16738
  let Y;
@@ -16911,6 +16915,18 @@ const Ql = (rd = class extends I {
16911
16915
  return this._clearFlags;
16912
16916
  }
16913
16917
  set clearFlags(t) {
16918
+ if (typeof t == "string")
16919
+ switch (t) {
16920
+ case "skybox":
16921
+ t = 1;
16922
+ break;
16923
+ case "solidcolor":
16924
+ t = 2;
16925
+ break;
16926
+ default:
16927
+ t = 0;
16928
+ break;
16929
+ }
16914
16930
  t !== this._clearFlags && (this._clearFlags = t, this.applyClearFlagsIfIsActiveCamera());
16915
16931
  }
16916
16932
  set cullingMask(t) {
@@ -17507,7 +17523,7 @@ const Et = x("debugaudio"), Jn = class extends I {
17507
17523
  console.warn("Custom rolloff for AudioSource is not supported: " + this.name);
17508
17524
  break;
17509
17525
  }
17510
- this.spatialBlend > 0 ? Et && !this.helper && (this.helper = new tS(t, t.getRefDistance()), t.add(this.helper)) : this.helper && this.helper.parent && this.helper.removeFromParent();
17526
+ this.spatialBlend > 0 ? Et && !this.helper && (this.helper = new t1(t, t.getRefDistance()), t.add(this.helper)) : this.helper && this.helper.parent && this.helper.removeFromParent();
17511
17527
  }
17512
17528
  async onNewClip(t) {
17513
17529
  if (t && (this.clip = t), typeof t == "string")
@@ -17714,7 +17730,7 @@ var zg = /* @__PURE__ */ ((n) => (n[n.None = 0] = "None", n[n.DontExport = 1] =
17714
17730
  function sR(n) {
17715
17731
  return n && n.isComponent;
17716
17732
  }
17717
- const HD = Symbol("object"), ep = new ts(() => new v(), 20);
17733
+ const GD = Symbol("object"), ep = new ts(() => new v(), 20);
17718
17734
  class nR {
17719
17735
  /** @internal */
17720
17736
  constructor(t, e, i, s, o, a) {
@@ -18417,10 +18433,10 @@ class qu extends I {
18417
18433
  // }
18418
18434
  }
18419
18435
  Nv([
18420
- f(D)
18436
+ f(L)
18421
18437
  ], qu.prototype, "idle", 2);
18422
18438
  Nv([
18423
- f(D)
18439
+ f(L)
18424
18440
  ], qu.prototype, "talking", 2);
18425
18441
  class $v extends I {
18426
18442
  constructor() {
@@ -18551,7 +18567,7 @@ class Ja extends I {
18551
18567
  }
18552
18568
  }
18553
18569
  Xu([
18554
- f(D)
18570
+ f(L)
18555
18571
  ], Ja.prototype, "eyes", 2);
18556
18572
  Xu([
18557
18573
  f()
@@ -18600,13 +18616,13 @@ const Vv = (Fp = class extends I {
18600
18616
  }, r(Fp, "forward", new v(0, 0, 1)), Fp);
18601
18617
  let eh = Vv;
18602
18618
  Ng([
18603
- f(D)
18619
+ f(L)
18604
18620
  ], eh.prototype, "head", 2);
18605
18621
  Ng([
18606
- f(D)
18622
+ f(L)
18607
18623
  ], eh.prototype, "eyes", 2);
18608
18624
  Ng([
18609
- f(D)
18625
+ f(L)
18610
18626
  ], eh.prototype, "target", 2);
18611
18627
  var PR = Object.defineProperty, OR = Object.getOwnPropertyDescriptor, $g = (n, t, e, i) => {
18612
18628
  for (var s = i > 1 ? void 0 : i ? OR(t, e) : t, o = n.length - 1, a; o >= 0; o--)
@@ -19160,7 +19176,7 @@ const Yl = (zp = class extends I {
19160
19176
  * The gameObject itself should not be transformed because we want the ContactShadows object e.g. also have a GroundProjectedEnv component
19161
19177
  * in which case ContactShadows scale would affect the projection
19162
19178
  **/
19163
- r(this, "shadowsRoot", new D());
19179
+ r(this, "shadowsRoot", new L());
19164
19180
  r(this, "shadowCamera");
19165
19181
  r(this, "shadowGroup", new co());
19166
19182
  r(this, "renderTarget");
@@ -19184,7 +19200,7 @@ const Yl = (zp = class extends I {
19184
19200
  throw new Error("No context provided and no current context set.");
19185
19201
  let e = this._instances.get(t);
19186
19202
  if (!e || e.destroyed) {
19187
- const i = new D();
19203
+ const i = new L();
19188
19204
  e = Ji(i, Yl, {
19189
19205
  autoFit: !1,
19190
19206
  occludeBelowGround: !1
@@ -19226,7 +19242,7 @@ const Yl = (zp = class extends I {
19226
19242
  side: lg
19227
19243
  })).translateY(-1e-4), this.occluderMesh.renderOrder = -100, this.occluderMesh.layers.set(2), this.shadowsRoot.add(this.occluderMesh), this.blurPlane = new X(t), this.blurPlane.visible = !1, this.shadowGroup.add(this.blurPlane);
19228
19244
  const i = 0, s = 1;
19229
- this.shadowCamera = new rg(-1 / 2, 1 / 2, 1 / 2, -1 / 2, i, s), this.shadowCamera.layers.enableAll(), this.shadowCamera.rotation.x = Math.PI / 2, this.shadowGroup.add(this.shadowCamera), this.depthMaterial = new Zx(), this.depthMaterial.userData.darkness = { value: this.darkness }, this.depthMaterial.blending = Jx, this.depthMaterial.blendEquation = e1, this.depthMaterial.onBeforeCompile = (o) => {
19245
+ this.shadowCamera = new rg(-1 / 2, 1 / 2, 1 / 2, -1 / 2, i, s), this.shadowCamera.layers.enableAll(), this.shadowCamera.rotation.x = Math.PI / 2, this.shadowGroup.add(this.shadowCamera), this.depthMaterial = new Zx(), this.depthMaterial.userData.darkness = { value: this.darkness }, this.depthMaterial.blending = Jx, this.depthMaterial.blendEquation = eS, this.depthMaterial.onBeforeCompile = (o) => {
19230
19246
  this.depthMaterial && (o.uniforms.darkness = this.depthMaterial.userData.darkness, o.fragmentShader = /* glsl */
19231
19247
  `
19232
19248
  uniform float darkness;
@@ -19236,7 +19252,7 @@ const Yl = (zp = class extends I {
19236
19252
  "gl_FragColor = vec4( vec3( 1.0 ), ( 1.0 - fragCoordZ ) * darkness * opacity * (gl_FrontFacing ? 1.0 : 0.66) );"
19237
19253
  )}
19238
19254
  `);
19239
- }, this.depthMaterial.depthTest = !1, this.depthMaterial.depthWrite = !1, this.horizontalBlurMaterial = new ys(iS), this.horizontalBlurMaterial.depthTest = !1, this.verticalBlurMaterial = new ys(sS), this.verticalBlurMaterial.depthTest = !1, this.shadowGroup.visible = !1, this.autoFit ? this.fitShadows() : this.applyMinSize();
19255
+ }, this.depthMaterial.depthTest = !1, this.depthMaterial.depthWrite = !1, this.horizontalBlurMaterial = new ys(i1), this.horizontalBlurMaterial.depthTest = !1, this.verticalBlurMaterial = new ys(s1), this.verticalBlurMaterial.depthTest = !1, this.shadowGroup.visible = !1, this.autoFit ? this.fitShadows() : this.applyMinSize();
19240
19256
  }
19241
19257
  /** @internal */
19242
19258
  onDestroy() {
@@ -19667,7 +19683,7 @@ class NR {
19667
19683
  r(this, "_initialScale", new v());
19668
19684
  r(this, "_initialDistance", 0);
19669
19685
  var a, l;
19670
- this.context = t.context, this.settings = t, this.gameObject = e, this.handlerA = i, this.handlerB = s, this._followObject = new D(), this._manipulatorObject = new D(), this.context.scene.add(this._manipulatorObject);
19686
+ this.context = t.context, this.settings = t, this.gameObject = e, this.handlerA = i, this.handlerB = s, this._followObject = new L(), this._manipulatorObject = new L(), this.context.scene.add(this._manipulatorObject);
19671
19687
  const o = (l = (a = J.active) == null ? void 0 : a.rig) == null ? void 0 : l.gameObject;
19672
19688
  if (!this.handlerA || !this.handlerB || !this.handlerA.hitPointInLocalSpace || !this.handlerB.hitPointInLocalSpace) {
19673
19689
  console.error("Invalid: MultiTouchDragHandler needs two valid DragPointerHandlers with hitPointInLocalSpace set.");
@@ -19767,7 +19783,7 @@ class sp {
19767
19783
  r(this, "_draggedOverObjectDuration", 0);
19768
19784
  r(this, "_hasLastSurfaceHitPoint", !1);
19769
19785
  r(this, "_lastSurfaceHitPoint", new v());
19770
- this.settings = t, this.context = t.context, this.gameObject = e, this._followObject = new D();
19786
+ this.settings = t, this.context = t.context, this.gameObject = e, this._followObject = new L();
19771
19787
  }
19772
19788
  /**
19773
19789
  * Returns the accumulated movement of the pointer in world units.
@@ -20071,7 +20087,7 @@ const k_ = class {
20071
20087
  let np = k_;
20072
20088
  r(np, "geometry", new Pn().setFromPoints([new v(0, 0, 0), new v(0, -1, 0)]));
20073
20089
  var $R = /* @__PURE__ */ ((n) => (n.File_Spawned = "file-spawned", n))($R || {});
20074
- class GD {
20090
+ class qD {
20075
20091
  constructor(t, e, i, s, o, a, l, c, h) {
20076
20092
  r(this, "guid");
20077
20093
  r(this, "file_name");
@@ -20094,15 +20110,15 @@ var Ko;
20094
20110
  function e(s) {
20095
20111
  var u;
20096
20112
  t.has(s.guid) && i(s.guid);
20097
- const o = new D();
20113
+ const o = new L();
20098
20114
  t.set(s.guid, o);
20099
- const a = new D();
20115
+ const a = new L();
20100
20116
  a.position.y = -0.5, o.add(a);
20101
20117
  const l = new X(new Tc(1, 1, 1, 1, 1, 1), new Te(
20102
20118
  { color: 14540253, wireframe: !0, transparent: !0, opacity: 0.3 }
20103
20119
  ));
20104
20120
  l.position.y = 0.5, a.add(l);
20105
- const c = new D();
20121
+ const c = new L();
20106
20122
  a.add(c);
20107
20123
  const h = new X(new Tc(1, 1, 1, 1, 1, 1), new Te({
20108
20124
  color: 12307660,
@@ -20119,7 +20135,7 @@ var Ko;
20119
20135
  return d.rotateX(-Math.PI / 2), d.position.y = 0.51, h.add(d), s.parent.add(o), o.rotateY(Math.PI / 2), s.position && ((u = o.position) == null || u.copy(s.position)), s.size && (o.worldScale = new v().copy(s.size)), o.position.y = o.scale.y / 2, {
20120
20136
  object: o,
20121
20137
  onProgress: (p) => {
20122
- c instanceof D && c.scale.set(1, p, 1);
20138
+ c instanceof L && c.scale.set(1, p, 1);
20123
20139
  }
20124
20140
  };
20125
20141
  }
@@ -20425,7 +20441,7 @@ il([
20425
20441
  f()
20426
20442
  ], Oo.prototype, "useNetworking", 2);
20427
20443
  il([
20428
- f(D)
20444
+ f(L)
20429
20445
  ], Oo.prototype, "dropArea", 2);
20430
20446
  il([
20431
20447
  f()
@@ -20565,10 +20581,10 @@ const Kv = class extends I {
20565
20581
  };
20566
20582
  let nh = Kv;
20567
20583
  Vg([
20568
- f(D)
20584
+ f(L)
20569
20585
  ], nh.prototype, "parent", 2);
20570
20586
  Vg([
20571
- f(D)
20587
+ f(L)
20572
20588
  ], nh.prototype, "object", 2);
20573
20589
  Vg([
20574
20590
  f()
@@ -20675,13 +20691,13 @@ class JR {
20675
20691
  typeof window < "u" && window.addEventListener("unhandledrejection", (n) => {
20676
20692
  });
20677
20693
  const on = gt, Vh = "$___Export_Components", ek = "NEEDLE_components";
20678
- var II;
20694
+ var DI;
20679
20695
  class tk {
20680
20696
  constructor() {
20681
- r(this, II);
20697
+ r(this, DI);
20682
20698
  }
20683
20699
  }
20684
- II = oa;
20700
+ DI = oa;
20685
20701
  class ik {
20686
20702
  constructor(t, e, i) {
20687
20703
  r(this, "node");
@@ -20910,7 +20926,7 @@ class nk {
20910
20926
  const o = t.scene.children[0];
20911
20927
  s = S.addComponent(o, Im, {}, { callAwake: !1 });
20912
20928
  } else {
20913
- const o = new D();
20929
+ const o = new L();
20914
20930
  o.name = "LightSettings " + this.sourceId, t.scene.add(o), s = S.addComponent(o, Im, {}, { callAwake: !1 });
20915
20931
  }
20916
20932
  s.sourceId = this.sourceId, s.ambientIntensity = i.ambientIntensity, s.ambientLight = new le().fromArray(i.ambientLight), Array.isArray(i.ambientTrilight) && (s.ambientTrilight = i.ambientTrilight.map((o) => new le().fromArray(o))), s.ambientMode = i.ambientMode, s.environmentReflectionSource = i.environmentReflectionSource;
@@ -20966,13 +20982,13 @@ class Im extends I {
20966
20982
  if (ca && console.warn("💡🟡 >>> Enable lighting", this.sourceId, this.enabled, this), this.ambientMode == fc.Flat) {
20967
20983
  if (this.ambientLight && !this._ambientLightObj) {
20968
20984
  const e = this.calculateIntensityFactor(this.ambientLight);
20969
- this._ambientLightObj = new t1(this.ambientLight, this.ambientIntensity * e), ca && console.log("Created ambient light", this.sourceId, this._ambientLightObj, this.ambientIntensity, e);
20985
+ this._ambientLightObj = new tS(this.ambientLight, this.ambientIntensity * e), ca && console.log("Created ambient light", this.sourceId, this._ambientLightObj, this.ambientIntensity, e);
20970
20986
  }
20971
20987
  this._ambientLightObj && this.gameObject.add(this._ambientLightObj);
20972
20988
  } else if (this.ambientMode === fc.Trilight) {
20973
20989
  if (this.ambientTrilight) {
20974
20990
  const e = this.ambientTrilight[0], i = this.ambientTrilight[this.ambientTrilight.length - 1], s = this.calculateIntensityFactor(i);
20975
- this._hemisphereLightObj = new i1(i, e, this.ambientIntensity * s), this.gameObject.add(this._hemisphereLightObj), ca && console.log("Created hemisphere ambient light", this.sourceId, this._hemisphereLightObj, this.ambientIntensity, s);
20991
+ this._hemisphereLightObj = new iS(i, e, this.ambientIntensity * s), this.gameObject.add(this._hemisphereLightObj), ca && console.log("Created hemisphere ambient light", this.sourceId, this._hemisphereLightObj, this.ambientIntensity, s);
20976
20992
  }
20977
20993
  } else
20978
20994
  this._ambientLightObj && this._ambientLightObj.removeFromParent(), this._hemisphereLightObj && this._hemisphereLightObj.removeFromParent();
@@ -21040,21 +21056,21 @@ r(gc, "stencils", {});
21040
21056
  function ap(n) {
21041
21057
  switch (n) {
21042
21058
  case 0:
21043
- return h1;
21059
+ return hS;
21044
21060
  case 1:
21045
- return c1;
21061
+ return cS;
21046
21062
  case 2:
21047
- return l1;
21063
+ return lS;
21048
21064
  case 3:
21049
- return a1;
21065
+ return aS;
21050
21066
  case 4:
21051
- return r1;
21067
+ return rS;
21052
21068
  case 6:
21053
- return o1;
21069
+ return oS;
21054
21070
  case 7:
21055
- return n1;
21071
+ return nS;
21056
21072
  case 5:
21057
- return s1;
21073
+ return sS;
21058
21074
  }
21059
21075
  return 0;
21060
21076
  }
@@ -21063,19 +21079,19 @@ function ak(n) {
21063
21079
  case 1:
21064
21080
  return L_;
21065
21081
  case 2:
21066
- return _1;
21082
+ return _S;
21067
21083
  case 3:
21068
- return g1;
21084
+ return gS;
21069
21085
  case 4:
21070
- return m1;
21086
+ return mS;
21071
21087
  case 5:
21072
- return p1;
21088
+ return pS;
21073
21089
  case 6:
21074
- return f1;
21090
+ return fS;
21075
21091
  case 7:
21076
- return u1;
21092
+ return uS;
21077
21093
  case 8:
21078
- return d1;
21094
+ return dS;
21079
21095
  }
21080
21096
  return L_;
21081
21097
  }
@@ -21318,7 +21334,7 @@ class hk {
21318
21334
  // },
21319
21335
  }
21320
21336
  );
21321
- switch (g.glslVersion = y1, g.vertexShader = g.vertexShader.replace("#version 300 es", ""), g.fragmentShader = g.fragmentShader.replace("#version 300 es", ""), (b = u._Cull) == null ? void 0 : b.value) {
21337
+ switch (g.glslVersion = yS, g.vertexShader = g.vertexShader.replace("#version 300 es", ""), g.fragmentShader = g.fragmentShader.replace("#version 300 es", ""), (b = u._Cull) == null ? void 0 : b.value) {
21322
21338
  case 0:
21323
21339
  g.side = Ri;
21324
21340
  break;
@@ -21334,25 +21350,25 @@ class hk {
21334
21350
  }
21335
21351
  switch ((w = u._ZTest) == null ? void 0 : w.value) {
21336
21352
  case 3:
21337
- g.depthTest = !0, g.depthFunc = P1;
21353
+ g.depthTest = !0, g.depthFunc = PS;
21338
21354
  break;
21339
21355
  case 6:
21340
- g.depthTest = !0, g.depthFunc = C1;
21356
+ g.depthTest = !0, g.depthFunc = CS;
21341
21357
  break;
21342
21358
  case 2:
21343
- g.depthTest = !0, g.depthFunc = S1;
21359
+ g.depthTest = !0, g.depthFunc = SS;
21344
21360
  break;
21345
21361
  case 4:
21346
- g.depthTest = !0, g.depthFunc = x1;
21362
+ g.depthTest = !0, g.depthFunc = xS;
21347
21363
  break;
21348
21364
  case 5:
21349
- g.depthTest = !0, g.depthFunc = w1;
21365
+ g.depthTest = !0, g.depthFunc = wS;
21350
21366
  break;
21351
21367
  case 7:
21352
- g.depthTest = !0, g.depthFunc = v1;
21368
+ g.depthTest = !0, g.depthFunc = vS;
21353
21369
  break;
21354
21370
  case 8:
21355
- g.depthTest = !1, g.depthFunc = b1;
21371
+ g.depthTest = !1, g.depthFunc = bS;
21356
21372
  break;
21357
21373
  }
21358
21374
  g.transparent = m, m && (g.depthWrite = !1), IO(u), g.onUpdateUniforms();
@@ -21396,10 +21412,10 @@ let iu;
21396
21412
  const uk = import("./three-examples.js").then((n) => n.r).then(async (n) => (iu = n.GLTFAnimationPointerExtension, iu)).catch((n) => {
21397
21413
  console.warn("Failed to import GLTFLoaderAnimationPointer. Please use @needle-tools/three for full KHR_animation support", n);
21398
21414
  }), Sr = new Array();
21399
- function qD(n) {
21415
+ function XD(n) {
21400
21416
  Sr.includes(n) || Sr.push(n);
21401
21417
  }
21402
- function XD(n) {
21418
+ function QD(n) {
21403
21419
  const t = Sr.indexOf(n);
21404
21420
  t >= 0 && Sr.splice(t, 1);
21405
21421
  }
@@ -21603,7 +21619,7 @@ const li = x("debuginstancing"), pu = class {
21603
21619
  let l = pu.getStartInstanceCount(t);
21604
21620
  (!l || l < 0) && (l = 4);
21605
21621
  let c = t.name;
21606
- c != null && c.length || (c = IS());
21622
+ c != null && c.length || (c = I1());
21607
21623
  const h = new aw(c, o.geometry, a, l, e);
21608
21624
  return this.objs.push(h), h.addInstance(o);
21609
21625
  }
@@ -22502,7 +22518,7 @@ Bn([
22502
22518
  f()
22503
22519
  ], Je.prototype, "allowOcclusionWhenDynamic", 2);
22504
22520
  Bn([
22505
- f(D)
22521
+ f(L)
22506
22522
  ], Je.prototype, "probeAnchor", 2);
22507
22523
  Bn([
22508
22524
  f()
@@ -22592,7 +22608,7 @@ const ha = class extends I {
22592
22608
  includeCustomExtensions: !0,
22593
22609
  animations: (e == null ? void 0 : e.animations) || ha.collectAnimations(t),
22594
22610
  ...e
22595
- }, o = new Array(), a = new D();
22611
+ }, o = new Array(), a = new L();
22596
22612
  e != null && e.pivot && a.position.sub(e.pivot), Gh && console.log("EXPORT", t), t.forEach((h) => {
22597
22613
  h && Em(h) && (a.children.push(h), h.matrixAutoUpdate = !1, h.matrix.copy(h.matrixWorld), S.getComponentsInChildren(h, Je).forEach((d) => {
22598
22614
  S.isActiveInHierarchy(d.gameObject) && d.setInstancingEnabled(!1);
@@ -22682,7 +22698,7 @@ cw([
22682
22698
  f()
22683
22699
  ], Ku.prototype, "binary", 2);
22684
22700
  cw([
22685
- f(D)
22701
+ f(L)
22686
22702
  ], Ku.prototype, "objects", 2);
22687
22703
  typeof globalThis !== void 0 && !("OffscreenCanvas" in globalThis) && (globalThis.OffscreenCanvas = class {
22688
22704
  constructor(t, e) {
@@ -23205,7 +23221,7 @@ let Ik = class {
23205
23221
  }
23206
23222
  b = O.length;
23207
23223
  }
23208
- return he.report("export-usdz", "zip archive"), nS(s, { level: 0 });
23224
+ return he.report("export-usdz", "zip archive"), n1(s, { level: 0 });
23209
23225
  }
23210
23226
  };
23211
23227
  function mw(n, t, e, i) {
@@ -23379,7 +23395,7 @@ async function Lk(n, t = 1 / 0, e = null, i = void 0) {
23379
23395
  const o = new ye(), a = new es();
23380
23396
  a.add(Xh), e || (e = qh = new kr({ antialias: !1, alpha: !0, premultipliedAlpha: !1, preserveDrawingBuffer: !0 }));
23381
23397
  const l = Math.min(n.image.width, t), c = Math.min(n.image.height, t);
23382
- Vt && (Vt.width !== l || Vt.height !== c) && (Vt.dispose(), Vt = null), Vt || (Vt = new kn(l, c, { format: Cu, type: O1, minFilter: B_, magFilter: B_ })), e.setRenderTarget(Vt), e.setSize(l, c), e.clear(), e.render(a, o), qh && (qh.dispose(), qh = null);
23398
+ Vt && (Vt.width !== l || Vt.height !== c) && (Vt.dispose(), Vt = null), Vt || (Vt = new kn(l, c, { format: Cu, type: OS, minFilter: B_, magFilter: B_ })), e.setRenderTarget(Vt), e.setSize(l, c), e.clear(), e.render(a, o), qh && (qh.dispose(), qh = null);
23383
23399
  const h = new Uint8ClampedArray(Vt.width * Vt.height * 4);
23384
23400
  e.readRenderTargetPixels(Vt, 0, 0, Vt.width, Vt.height, h);
23385
23401
  const d = new ImageData(h, Vt.width, Vt.height, void 0), u = await createImageBitmap(d, { premultiplyAlpha: "none" });
@@ -23703,9 +23719,9 @@ function Hk(n, t, e = !1) {
23703
23719
  // ClampToEdgeWrapping
23704
23720
  1002: "mirror"
23705
23721
  // MirroredRepeatWrapping
23706
- }, Z = b.repeat.clone(), T = b.offset.clone(), L = b.rotation, H = Math.sin(L), Y = Math.cos(L);
23722
+ }, Z = b.repeat.clone(), T = b.offset.clone(), j = b.rotation, H = Math.sin(j), Y = Math.cos(j);
23707
23723
  T.y = 1 - T.y - Z.y, e ? (Z.x === 0 && (Z.x = 1e-4), Z.y === 0 && (Z.y = 1e-4), T.x = T.x / Z.x, T.y = T.y / Z.y, T.x += H / Z.x, T.y += Y - 1) : (T.x += H * Z.x, T.y += (1 - Y) * Z.y);
23708
- const te = Z.x != 1 || Z.y != 1 || T.x != 0 || T.y != 0 || L != 0, ae = `${Wt}/${i}/${"uvReader_" + A}.outputs:result>`, de = `${Wt}/${i}/Transform2d_${w}.outputs:result>`, De = w !== "normal" && P && (P.r !== 1 || P.g !== 1 || P.b !== 1 || k !== 1) || !1, Ct = w === "normal", ri = n instanceof hi && n.normalScale ? n.normalScale.x * 2 : 2, Nt = ri.toFixed(Ie), Vr = (-1 * (ri / 2)).toFixed(Ie), Nn = (1 - ri).toFixed(Ie);
23724
+ const te = Z.x != 1 || Z.y != 1 || T.x != 0 || T.y != 0 || j != 0, ae = `${Wt}/${i}/${"uvReader_" + A}.outputs:result>`, de = `${Wt}/${i}/Transform2d_${w}.outputs:result>`, De = w !== "normal" && P && (P.r !== 1 || P.g !== 1 || P.b !== 1 || k !== 1) || !1, Ct = w === "normal", ri = n instanceof hi && n.normalScale ? n.normalScale.x * 2 : 2, Nt = ri.toFixed(Ie), Vr = (-1 * (ri / 2)).toFixed(Ie), Nn = (1 - ri).toFixed(Ie);
23709
23725
  return `
23710
23726
  ${te ? `def Shader "Transform2d_${w}" (
23711
23727
  sdrMetadata = {
@@ -23717,7 +23733,7 @@ function Hk(n, t, e = !1) {
23717
23733
  float2 inputs:in.connect = ${ae}
23718
23734
  float2 inputs:scale = ${vb(Z)}
23719
23735
  float2 inputs:translation = ${vb(T)}
23720
- float inputs:rotation = ${(L / Math.PI * 180).toFixed(Ie)}
23736
+ float inputs:rotation = ${(j / Math.PI * 180).toFixed(Ie)}
23721
23737
  float2 outputs:result
23722
23738
  }
23723
23739
  ` : ""}
@@ -24583,35 +24599,35 @@ class Xk {
24583
24599
  const s = this.model, o = this.animationData;
24584
24600
  if (s && s.skinnedMesh) {
24585
24601
  let l = function(T) {
24586
- const L = [];
24602
+ const j = [];
24587
24603
  for (const [H, Y] of T) {
24588
24604
  let te = `${H} : [`;
24589
24605
  const ae = [];
24590
24606
  for (const de of Y)
24591
24607
  ae.push(`(${ce(de.x)}, ${ce(de.y)}, ${ce(de.z)})`);
24592
- te = te.concat(ae.join(", ")), te = te.concat("],"), L.push(te);
24608
+ te = te.concat(ae.join(", ")), te = te.concat("],"), j.push(te);
24593
24609
  }
24594
- return L;
24610
+ return j;
24595
24611
  }, c = function(T) {
24596
- const L = [];
24612
+ const j = [];
24597
24613
  for (const [H, Y] of T) {
24598
24614
  let te = `${H} : [`;
24599
24615
  const ae = [];
24600
24616
  for (const de of Y)
24601
24617
  ae.push(`(${ce(de.w)}, ${ce(de.x)}, ${ce(de.y)}, ${ce(de.z)})`);
24602
- te = te.concat(ae.join(", ")), te = te.concat("],"), L.push(te);
24618
+ te = te.concat(ae.join(", ")), te = te.concat("],"), j.push(te);
24603
24619
  }
24604
- return L;
24620
+ return j;
24605
24621
  }, h = function(T) {
24606
- let L, H = !0;
24622
+ let j, H = !0;
24607
24623
  const Y = /* @__PURE__ */ new Map();
24608
24624
  for (const [ae, de] of T) {
24609
- L === void 0 && (L = de.length), L !== de.length && (H = !1);
24625
+ j === void 0 && (j = de.length), j !== de.length && (H = !1);
24610
24626
  let De = 0;
24611
24627
  for (const Ct of de)
24612
24628
  De++, Ct || (Y.has(ae) || Y.set(ae, []), Y.get(ae).push(De));
24613
24629
  }
24614
- Ds && console.log("Bone count: ", T.size, "TransformData entries per bone: ", L, "Undefined bone entries: ", Y), console.assert(H, "All bones should have the same number of TransformData entries", T), console.assert(Y.size === 0, "All TransformData entries should be set", Y);
24630
+ Ds && console.log("Bone count: ", T.size, "TransformData entries per bone: ", j, "Undefined bone entries: ", Y), console.assert(H, "All bones should have the same number of TransformData entries", T), console.assert(Y.size === 0, "All TransformData entries should be set", Y);
24615
24631
  const te = [];
24616
24632
  for (const [ae, de] of T)
24617
24633
  for (let De = 0; De < de.length; De++) {
@@ -24623,14 +24639,14 @@ class Xk {
24623
24639
  for (const ae of te)
24624
24640
  ae.pos.sort((de, De) => de - De), ae.rot.sort((de, De) => de - De), ae.scale.sort((de, De) => de - De), ae.pos = [...new Set(ae.pos)], ae.rot = [...new Set(ae.rot)], ae.scale = [...new Set(ae.scale)];
24625
24641
  return te;
24626
- }, d = function(T, L, H) {
24627
- const Y = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map(), de = L.length;
24642
+ }, d = function(T, j, H) {
24643
+ const Y = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ new Map(), ae = /* @__PURE__ */ new Map(), de = j.length;
24628
24644
  for (const De of H) {
24629
24645
  const Ct = T.get(De);
24630
24646
  let ri;
24631
- Ct ? console.assert(Ct.length === de, "We should have the same number of TransformData entries for each bone", Ct, L) : ri = new $e(null, De, null);
24647
+ Ct ? console.assert(Ct.length === de, "We should have the same number of TransformData entries for each bone", Ct, j) : ri = new $e(null, De, null);
24632
24648
  for (let Nt = 0; Nt < de; Nt++) {
24633
- const Vr = Ct ? Ct[Nt] : ri, Nn = L[Nt];
24649
+ const Vr = Ct ? Ct[Nt] : ri, Nn = j[Nt];
24634
24650
  for (const { time: Sl, translation: Cl } of Vr.getValues(Nn.pos, !0, !1, !1)) {
24635
24651
  const rs = (Sl + Nn.timeOffset) * 60;
24636
24652
  Y.has(rs) || Y.set(rs, new Array()), Y.get(rs).push(Cl.clone());
@@ -24651,17 +24667,17 @@ class Xk {
24651
24667
  scale: ae.size == 0 ? void 0 : ae
24652
24668
  };
24653
24669
  }, u = function(T) {
24654
- const L = [];
24670
+ const j = [];
24655
24671
  for (const H of T)
24656
- L.push(`(${ce(H.x)}, ${ce(H.y)}, ${ce(H.z)})`);
24657
- return L.join(", ");
24672
+ j.push(`(${ce(H.x)}, ${ce(H.y)}, ${ce(H.z)})`);
24673
+ return j.join(", ");
24658
24674
  }, p = function(T) {
24659
- const L = [];
24675
+ const j = [];
24660
24676
  for (const H of T)
24661
- L.push(`(${ce(H.w)}, ${ce(H.x)}, ${ce(H.y)}, ${ce(H.z)})`);
24662
- return L.join(", ");
24677
+ j.push(`(${ce(H.w)}, ${ce(H.x)}, ${ce(H.y)}, ${ce(H.z)})`);
24678
+ return j.join(", ");
24663
24679
  }, m = function(T) {
24664
- const L = /* @__PURE__ */ new Map();
24680
+ const j = /* @__PURE__ */ new Map();
24665
24681
  if (Ds) {
24666
24682
  const H = new Array();
24667
24683
  for (const [Y, te] of o)
@@ -24675,24 +24691,24 @@ class Xk {
24675
24691
  }
24676
24692
  for (const H of T) {
24677
24693
  const Y = o.get(H);
24678
- Y && L.set(H, Y);
24694
+ Y && j.set(H, Y);
24679
24695
  }
24680
- return L;
24696
+ return j;
24681
24697
  }, g = function(T) {
24682
- const L = m(T), H = h(L);
24683
- return d(L, H, T);
24698
+ const j = m(T), H = h(j);
24699
+ return d(j, H, T);
24684
24700
  };
24685
24701
  const _ = s.skinnedMesh.skeleton, y = new Array(), b = [], w = [];
24686
24702
  for (const T of _.bones) {
24687
24703
  b.push(T), w.push(T.uuid);
24688
- const L = _.boneInverses[_.bones.indexOf(T)];
24689
- y.push({ bone: T, inverse: L });
24704
+ const j = _.boneInverses[_.bones.indexOf(T)];
24705
+ y.push({ bone: T, inverse: j });
24690
24706
  }
24691
24707
  let P = 1e4;
24692
24708
  for (; w.length < _.bones.length && P-- > 0; )
24693
24709
  for (const T of b) {
24694
- const L = T.children;
24695
- for (const H of L)
24710
+ const j = T.children;
24711
+ for (const H of j)
24696
24712
  if (w.indexOf(H.uuid) === -1 && _.bones.indexOf(H) !== -1) {
24697
24713
  b.push(H), w.push(H.uuid);
24698
24714
  const Y = _.boneInverses[_.bones.indexOf(H)];
@@ -24703,12 +24719,12 @@ class Xk {
24703
24719
  for (const T of fw(_.bones))
24704
24720
  y.push({ bone: T, inverse: T.matrixWorld.clone().invert() });
24705
24721
  const k = y[0].bone.parent;
24706
- k || console.error("No bone parent found for skinned mesh during USDZ export", s.skinnedMesh), y.sort((T, L) => Ta(T.bone, k) > Ta(L.bone, k) ? 1 : -1);
24722
+ k || console.error("No bone parent found for skinned mesh during USDZ export", s.skinnedMesh), y.sort((T, j) => Ta(T.bone, k) > Ta(j.bone, k) ? 1 : -1);
24707
24723
  const O = e.quickLookCompatible, M = [], E = [], B = [], A = [];
24708
24724
  for (const { bone: T } of y) {
24709
24725
  if (O) {
24710
- const L = T.scale;
24711
- L.x == 0 && (L.x = 1e-5), L.y == 0 && (L.y = 1e-5), L.z == 0 && (L.z = 1e-5), M.push(new ne().compose(T.position, T.quaternion, T.scale));
24726
+ const j = T.scale;
24727
+ j.x == 0 && (j.x = 1e-5), j.y == 0 && (j.y = 1e-5), j.z == 0 && (j.z = 1e-5), M.push(new ne().compose(T.position, T.quaternion, T.scale));
24712
24728
  } else
24713
24729
  M.push(T.matrix.clone());
24714
24730
  E.push(T.position), B.push(T.quaternion), A.push(T.scale);
@@ -24717,30 +24733,30 @@ class Xk {
24717
24733
  t.beginBlock('def Skeleton "Rig"'), t.appendLine(`uniform matrix4d[] bindTransforms = [${U}]`), t.appendLine(`uniform token[] joints = [${F}]`), t.appendLine('uniform token purpose = "guide"'), t.appendLine(`uniform matrix4d[] restTransforms = [${M.map((T) => _b(T)).join(", ")}]`);
24718
24734
  const Z = g(y.map((T) => T.bone));
24719
24735
  if (Ds) {
24720
- let T = 1e7, L = 0;
24736
+ let T = 1e7, j = 0;
24721
24737
  for (const H of ((a = Z.position) == null ? void 0 : a.keys()) ?? [])
24722
- T = Math.min(T, H), L = Math.max(L, H);
24723
- console.log("Time samples", T, L, Z);
24738
+ T = Math.min(T, H), j = Math.max(j, H);
24739
+ console.log("Time samples", T, j, Z);
24724
24740
  }
24725
24741
  if (t.beginBlock('def SkelAnimation "_anim"'), t.appendLine(`uniform token[] joints = [${F}]`), t.appendLine(`quatf[] rotations = [${p(B)}]`), Z && Z.quaternion) {
24726
24742
  t.beginBlock("quatf[] rotations.timeSamples = {", "");
24727
24743
  const T = c(Z.quaternion);
24728
- for (const L of T)
24729
- t.appendLine(L);
24744
+ for (const j of T)
24745
+ t.appendLine(j);
24730
24746
  t.closeBlock();
24731
24747
  }
24732
24748
  if (t.appendLine(`half3[] scales = [${u(A)}]`), Z && Z.scale) {
24733
24749
  t.beginBlock("half3[] scales.timeSamples = {", "");
24734
24750
  const T = l(Z.scale);
24735
- for (const L of T)
24736
- t.appendLine(L);
24751
+ for (const j of T)
24752
+ t.appendLine(j);
24737
24753
  t.closeBlock();
24738
24754
  }
24739
24755
  if (t.appendLine(`float3[] translations = [${u(E)}]`), Z && Z.position) {
24740
24756
  t.beginBlock("float3[] translations.timeSamples = {", "");
24741
24757
  const T = l(Z.position);
24742
- for (const L of T)
24743
- t.appendLine(L);
24758
+ for (const j of T)
24759
+ t.appendLine(j);
24744
24760
  t.closeBlock();
24745
24761
  }
24746
24762
  t.closeBlock(), t.closeBlock();
@@ -24924,10 +24940,10 @@ class nl extends I {
24924
24940
  }
24925
24941
  }
24926
24942
  Ve([
24927
- f(D)
24943
+ f(L)
24928
24944
  ], nl.prototype, "object", 2);
24929
24945
  Ve([
24930
- f(D)
24946
+ f(L)
24931
24947
  ], nl.prototype, "target", 2);
24932
24948
  Ve([
24933
24949
  f()
@@ -25122,7 +25138,7 @@ const Ue = (ia = class extends I {
25122
25138
  }, r(ia, "clonedToggleIndex", 0), r(ia, "wasVisible", Symbol("usdz_SetActiveOnClick_wasVisible")), r(ia, "toggleClone", Symbol("clone for toggling")), r(ia, "reverseToggleClone", Symbol("clone for reverse toggling")), ia);
25123
25139
  let ol = Ue;
25124
25140
  Ve([
25125
- f(D)
25141
+ f(L)
25126
25142
  ], ol.prototype, "target", 2);
25127
25143
  Ve([
25128
25144
  f()
@@ -25409,10 +25425,10 @@ const ks = (ld = class extends I {
25409
25425
  F = A.clone(), F.duration = 1, F.name = U;
25410
25426
  const Z = A.duration;
25411
25427
  F.tracks = A.tracks.map((T) => {
25412
- const L = T.clone();
25413
- L.times = new Float32Array([0, Z]);
25428
+ const j = T.clone();
25429
+ j.times = new Float32Array([0, Z]);
25414
25430
  const H = T.values.length, Y = T.getValueSize(), te = T.values.slice(H - Y, H);
25415
- return L.values = new Float32Array(2 * Y), L.values.set(te, 0), L.values.set(te, Y), L;
25431
+ return j.values = new Float32Array(2 * Y), j.values.set(te, 0), j.values.set(te, Y), j;
25416
25432
  }), F.name = U, t.holdClipMap.set(A, F);
25417
25433
  }
25418
25434
  if (F) {
@@ -25497,7 +25513,7 @@ class ch extends I {
25497
25513
  }
25498
25514
  }
25499
25515
  Ve([
25500
- f(D)
25516
+ f(L)
25501
25517
  ], ch.prototype, "target", 2);
25502
25518
  class Zu extends I {
25503
25519
  constructor() {
@@ -26068,7 +26084,7 @@ const Sb = x("debugwebxr"), iT = new ne().makeRotationY(Math.PI), va = class ext
26068
26084
  }
26069
26085
  onEnterXR(e) {
26070
26086
  Sb && console.log("ENTER WEBXR: SessionRoot start..."), this._anchor = null, va._hasPlaced = !1, this.gameObject.updateMatrixWorld(), this._startOffset.copy(this.gameObject.matrixWorld);
26071
- const i = new D();
26087
+ const i = new L();
26072
26088
  this._createdPlacementObject = i, i.name = "AR Session Root", this._placementScene.name = "AR Placement Scene", this._placementScene.children.length = 0;
26073
26089
  for (let s = this.context.scene.children.length - 1; s >= 0; s--) {
26074
26090
  const o = this.context.scene.children[s];
@@ -26136,7 +26152,7 @@ const Sb = x("debugwebxr"), iT = new ne().makeRotationY(Math.PI), va = class ext
26136
26152
  }
26137
26153
  else
26138
26154
  a = new X(
26139
- new M1(0.07, 0.09, 32).rotateX(-Math.PI / 2),
26155
+ new MS(0.07, 0.09, 32).rotateX(-Math.PI / 2),
26140
26156
  new Te({ side: Ri, depthTest: !1, depthWrite: !1, transparent: !0, opacity: 1, color: 15658734 })
26141
26157
  ), a.name = "AR Placement Reticle";
26142
26158
  if (Sb) {
@@ -26536,7 +26552,7 @@ const Xt = x("debugplayersync"), Pw = class extends I {
26536
26552
  }
26537
26553
  const s = new Pw();
26538
26554
  s._internalInit(e), s.asset = i;
26539
- const o = new D();
26555
+ const o = new L();
26540
26556
  return o.guid = t, S.addComponent(o, s), s;
26541
26557
  }
26542
26558
  awake() {
@@ -26635,7 +26651,7 @@ const Mt = (Wl = class extends I {
26635
26651
  * @returns The PlayerState component if found, undefined otherwise
26636
26652
  */
26637
26653
  static getFor(t) {
26638
- if (t instanceof D)
26654
+ if (t instanceof L)
26639
26655
  return S.getComponentInParent(t, Mt);
26640
26656
  if (t instanceof I)
26641
26657
  return S.getComponentInParent(t.gameObject, Mt);
@@ -26872,23 +26888,23 @@ class Pr extends I {
26872
26888
  async prepareAvatar() {
26873
26889
  var e, i;
26874
26890
  if (this.tryFindAvatarObjectsIfMissing(), this.head)
26875
- this.head instanceof D && (this.head = new re("", this.sourceId, this.head));
26891
+ this.head instanceof L && (this.head = new re("", this.sourceId, this.head));
26876
26892
  else {
26877
- const s = new D();
26893
+ const s = new L();
26878
26894
  s.name = "Head";
26879
26895
  const o = Ar.createPrimitive(Na.Cube);
26880
26896
  s.add(o), this.gameObject.add(s), this.head = new re("", this.sourceId, s), Il && console.log("Create head", s);
26881
26897
  }
26882
26898
  if (this.rightHand)
26883
- this.rightHand instanceof D && (this.rightHand = new re("", this.sourceId, this.rightHand));
26899
+ this.rightHand instanceof L && (this.rightHand = new re("", this.sourceId, this.rightHand));
26884
26900
  else {
26885
- const s = new D();
26901
+ const s = new L();
26886
26902
  s.name = "Right Hand", this.gameObject.add(s), this.rightHand = new re("", this.sourceId, s), Il && console.log("Create right hand", s);
26887
26903
  }
26888
26904
  if (this.leftHand)
26889
- this.leftHand instanceof D && (this.leftHand = new re("", this.sourceId, this.leftHand));
26905
+ this.leftHand instanceof L && (this.leftHand = new re("", this.sourceId, this.leftHand));
26890
26906
  else {
26891
- const s = new D();
26907
+ const s = new L();
26892
26908
  s.name = "Left Hand", this.gameObject.add(s), this.leftHand = new re("", this.sourceId, s), Il && console.log("Create left hand", s);
26893
26909
  }
26894
26910
  await this.loadAvatarObjects(this.head, this.leftHand, this.rightHand), this._leftHandMeshes = [], (e = this.leftHand.asset) == null || e.traverse((s) => {
@@ -27029,9 +27045,9 @@ class En extends I {
27029
27045
  let c = "";
27030
27046
  const h = i.side === "left" ? this.customLeftHand : this.customRightHand;
27031
27047
  h ? (c = h.url.split(".").slice(0, -1).join("."), a.setPath("")) : (c = i.inputSource.handedness === "left" ? "left" : "right", a.setPath("https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles/generic-hand/"));
27032
- const d = new D();
27048
+ const d = new L();
27033
27049
  Ml(d);
27034
- const u = new rS(d, o, a.path, c, a, (p) => {
27050
+ const u = new r1(d, o, a.path, c, a, (p) => {
27035
27051
  var g;
27036
27052
  const m = l.gltf;
27037
27053
  ((g = m == null ? void 0 : m.scene.children) == null ? void 0 : g.length) === 0 && (m.scene.children[0] = p), Vs().createBuiltinComponents(e.context, e.sourceId || c, l.gltf, null, l), p.traverse((_) => {
@@ -27057,7 +27073,7 @@ class En extends I {
27057
27073
  }
27058
27074
  }
27059
27075
  }
27060
- r(En, "factory", new oS());
27076
+ r(En, "factory", new o1());
27061
27077
  tf([
27062
27078
  f()
27063
27079
  ], En.prototype, "createControllerModel", 2);
@@ -27170,7 +27186,7 @@ class ns extends I {
27170
27186
  const p = i.worldPosition;
27171
27187
  this._plane.setFromNormalAndCoplanarPoint(new v(0, 1, 0), p);
27172
27188
  const m = e.ray;
27173
- u = p.clone(), this._plane.intersectLine(new R1(m.origin, G(m.direction).multiplyScalar(1e4).add(m.origin)), u), u.distanceTo(p) > i.scale.x * 10 && (u = null);
27189
+ u = p.clone(), this._plane.intersectLine(new RS(m.origin, G(m.direction).multiplyScalar(1e4).add(m.origin)), u), u.distanceTo(p) > i.scale.x * 10 && (u = null);
27174
27190
  }
27175
27191
  if (u) {
27176
27192
  if (this.useTeleportTarget && !S.getComponentInParent(d.object, Jg))
@@ -27283,15 +27299,15 @@ class ns extends I {
27283
27299
  }
27284
27300
  /** create an object to visualize controller rays */
27285
27301
  createRayLineObject() {
27286
- const e = new aS();
27302
+ const e = new a1();
27287
27303
  e.layers.disableAll(), e.layers.enable(2);
27288
- const i = new lS();
27304
+ const i = new l1();
27289
27305
  e.geometry = i;
27290
27306
  const s = new Float32Array(9);
27291
27307
  s.set([0, 0, 0.02, 0, 0, 0.4, 0, 0, 1]), i.setPositions(s);
27292
27308
  const o = new Float32Array(9);
27293
27309
  o.set([1, 1, 1, 0.1, 0.1, 0.1, 0, 0, 0]), i.setColors(o);
27294
- const a = new cS({
27310
+ const a = new c1({
27295
27311
  color: 16777215,
27296
27312
  vertexColors: !0,
27297
27313
  worldUnits: !0,
@@ -27484,7 +27500,7 @@ const ua = (Up = class extends I {
27484
27500
  let i = S.findObjectOfType(ms);
27485
27501
  if (!i)
27486
27502
  if (this.usePlacementReticle) {
27487
- const s = new D();
27503
+ const s = new L();
27488
27504
  for (const o of this.context.scene.children)
27489
27505
  s.add(o);
27490
27506
  this.context.scene.add(s), i = S.addComponent(s, ms), this._createdComponentsInSession.push(i);
@@ -27967,7 +27983,7 @@ const hs = new v(), Ll = new ne(), Zh = new W(), Rw = class extends ws {
27967
27983
  return this.minHeight !== void 0 && t < this.minHeight ? this.minHeight : t;
27968
27984
  }
27969
27985
  awake() {
27970
- super.awake(), this._anchoredPosition || (this._anchoredPosition = new oe()), this.lastMatrix = new ne(), this.rectBlock = new D(), this.rectBlock.name = this.name, this._initialPosition = this.gameObject.position.clone(), this._initialPosition.z = 0, aa(this, "_anchoredPosition", () => {
27986
+ super.awake(), this._anchoredPosition || (this._anchoredPosition = new oe()), this.lastMatrix = new ne(), this.rectBlock = new L(), this.rectBlock.name = this.name, this._initialPosition = this.gameObject.position.clone(), this._initialPosition.z = 0, aa(this, "_anchoredPosition", () => {
27971
27987
  this.markDirty();
27972
27988
  }), aa(this, "sizeDelta", () => {
27973
27989
  this.markDirty();
@@ -27981,7 +27997,7 @@ const hs = new v(), Ll = new ne(), Zh = new W(), Rw = class extends ws {
27981
27997
  }
27982
27998
  onEnable() {
27983
27999
  var t;
27984
- super.onEnable(), this.rectBlock || (this.rectBlock = new D()), this.lastMatrix || (this.lastMatrix = new ne()), this._lastAnchoring || (this._lastAnchoring = new oe()), this._initialPosition || (this._initialPosition = new v()), this._anchoredPosition || (this._anchoredPosition = new oe()), this.addShadowComponent(this.rectBlock), this._transformNeedsUpdate = !0, (t = this.canvas) == null || t.registerTransform(this);
28000
+ super.onEnable(), this.rectBlock || (this.rectBlock = new L()), this.lastMatrix || (this.lastMatrix = new ne()), this._lastAnchoring || (this._lastAnchoring = new oe()), this._initialPosition || (this._initialPosition = new v()), this._anchoredPosition || (this._anchoredPosition = new oe()), this.addShadowComponent(this.rectBlock), this._transformNeedsUpdate = !0, (t = this.canvas) == null || t.registerTransform(this);
27985
28001
  }
27986
28002
  onDisable() {
27987
28003
  var t;
@@ -28181,7 +28197,7 @@ const Jl = (Np = class extends ws {
28181
28197
  this.makePanel(), this.uiObject && (this.uiObject.setState(t), this == null || this.markDirty());
28182
28198
  }
28183
28199
  setupState(t) {
28184
- this.makePanel(), this.uiObject && (this._stateManager || (this._stateManager = new kS(this.uiObject)), this.uiObject.setupState(t.state, t.attributes));
28200
+ this.makePanel(), this.uiObject && (this._stateManager || (this._stateManager = new k1(this.uiObject)), this.uiObject.setupState(t.state, t.attributes));
28185
28201
  }
28186
28202
  setOptions(t) {
28187
28203
  this.makePanel(), this.uiObject && this.uiObject.set(t);
@@ -28884,10 +28900,10 @@ class ko extends Ii {
28884
28900
  U.anchoredPosition.x !== Z && (U.anchoredPosition.x = Z);
28885
28901
  const T = a * -0.5;
28886
28902
  U.anchoredPosition.y !== T && (U.anchoredPosition.y = T), m && u && U.sizeDelta[h] !== g && (U.sizeDelta[h] = g), p && d && U.sizeDelta[i] !== k && (U.sizeDelta[i] = k);
28887
- const L = c ? U.width : U.height, H = L * 0.5;
28903
+ const j = c ? U.width : U.height, H = j * 0.5;
28888
28904
  if (b += H, p) {
28889
28905
  const te = k * E - k * 0.5;
28890
- te > b && (b = te - k * 0.5 + L + this.padding.left, b -= H);
28906
+ te > b && (b = te - k * 0.5 + j + this.padding.left, b -= H);
28891
28907
  }
28892
28908
  let Y = b;
28893
28909
  i === "y" && (Y = -Y), U.anchoredPosition[i] !== Y && (U.anchoredPosition[i] = Y), b += H, b += this.spacing, E += 1;
@@ -29313,7 +29329,7 @@ function $T(n, t) {
29313
29329
  continue;
29314
29330
  const d = new Xa();
29315
29331
  d.animator = c, d.stateName = h.name, d.trigger = "start", d.name = "PlayAnimationOnClick_implicitAtStart_" + d.stateName;
29316
- const u = new D();
29332
+ const u = new L();
29317
29333
  S.addComponent(u, d), a.push(u), o.push(c), n.add(u);
29318
29334
  }
29319
29335
  else
@@ -29335,7 +29351,7 @@ function $T(n, t) {
29335
29351
  continue;
29336
29352
  const h = new Xa();
29337
29353
  h.animation = c, h.stateName = c.clip.name, h.trigger = "start", h.name = "PlayAnimationOnClick_implicitAtStart_" + h.stateName;
29338
- const d = new D();
29354
+ const d = new L();
29339
29355
  S.addComponent(d, h), a.push(d), o.push(c), n.add(d);
29340
29356
  }
29341
29357
  else
@@ -29366,7 +29382,7 @@ function WT(n, t) {
29366
29382
  continue;
29367
29383
  const l = new Cr();
29368
29384
  l.target = a, l.name = "PlayAudioOnClick_implicitAtStart_", l.trigger = "start";
29369
- const c = new D();
29385
+ const c = new L();
29370
29386
  S.addComponent(c, l), console.log("implicit PlayAudioOnStart", c, l), o.push(c), s.push(a), n.add(c);
29371
29387
  }
29372
29388
  return o;
@@ -29661,7 +29677,7 @@ const Um = (cd = class extends I {
29661
29677
  }, r(cd, "invertForwardMatrix", new ne().makeRotationY(Math.PI)), r(cd, "invertForwardQuaternion", new W().setFromEuler(new Lt(0, Math.PI, 0))), cd);
29662
29678
  let Ge = Um;
29663
29679
  Tt([
29664
- f(D)
29680
+ f(L)
29665
29681
  ], Ge.prototype, "objectToExport", 2);
29666
29682
  Tt([
29667
29683
  f()
@@ -29764,7 +29780,7 @@ class hl extends I {
29764
29780
  r(this, "_boxHelper", null);
29765
29781
  }
29766
29782
  onEnable() {
29767
- this.isGizmo && !Qc || (this._gizmoObject || (this.objectBounds ? this._gizmoObject = new k1(this.gameObject, this.color ?? 16776960) : (this.objectBounds = !1, this._gizmoObject = Cg(this.color ?? 16776960))), this.objectBounds ? (this.scene.add(this._gizmoObject), this._boxHelper = this._gizmoObject, this.startCoroutine(this.syncObjectBounds(), Me.OnBeforeRender)) : this.gameObject.add(this._gizmoObject));
29783
+ this.isGizmo && !Qc || (this._gizmoObject || (this.objectBounds ? this._gizmoObject = new kS(this.gameObject, this.color ?? 16776960) : (this.objectBounds = !1, this._gizmoObject = Cg(this.color ?? 16776960))), this.objectBounds ? (this.scene.add(this._gizmoObject), this._boxHelper = this._gizmoObject, this.startCoroutine(this.syncObjectBounds(), Me.OnBeforeRender)) : this.gameObject.add(this._gizmoObject));
29768
29784
  }
29769
29785
  onDisable() {
29770
29786
  this._gizmoObject && this.gameObject.remove(this._gizmoObject);
@@ -30058,12 +30074,12 @@ class Di extends I {
30058
30074
  case 1:
30059
30075
  const i = new Yp(this.color, this.intensity * Math.PI);
30060
30076
  if (i.position.set(0, 0, -Mb * 0.5).applyQuaternion(this.gameObject.quaternion), this.gameObject.add(i.target), Fa(i.target, 0, 0, 0), this.light = i, this.gameObject.position.set(0, 0, 0), this.gameObject.rotation.set(0, 0, 0), Hn) {
30061
- const l = new A1(this.light, 0.2, this.color);
30077
+ const l = new AS(this.light, 0.2, this.color);
30062
30078
  this.context.scene.add(l);
30063
30079
  }
30064
30080
  break;
30065
30081
  case 0:
30066
- const s = new T1(this.color, this.intensity * Math.PI, this.range, vp(this.spotAngle / 2), 1 - vp(this.innerSpotAngle / 2) / vp(this.spotAngle / 2), 2);
30082
+ const s = new TS(this.color, this.intensity * Math.PI, this.range, vp(this.spotAngle / 2), 1 - vp(this.innerSpotAngle / 2) / vp(this.spotAngle / 2), 2);
30067
30083
  s.position.set(0, 0, 0), s.rotation.set(0, 0, 0), this.light = s;
30068
30084
  const o = s.target;
30069
30085
  s.add(o), o.position.set(0, 0, this.range), o.rotation.set(0, 0, 0);
@@ -30089,7 +30105,7 @@ class Di extends I {
30089
30105
  const s = this.gameObject.scale.y;
30090
30106
  i.top *= s, i.bottom *= s;
30091
30107
  }
30092
- this.light.shadow.needsUpdate = !0, Hn && this.context.scene.add(new E1(i));
30108
+ this.light.shadow.needsUpdate = !0, Hn && this.context.scene.add(new ES(i));
30093
30109
  }
30094
30110
  this.isBaked ? this.light.removeFromParent() : e || this.gameObject.add(this.light);
30095
30111
  }
@@ -30210,10 +30226,10 @@ class of extends I {
30210
30226
  }
30211
30227
  this._lodsHandler = new Array();
30212
30228
  for (let s = 0; s < e.length; s++) {
30213
- const o = new I1();
30229
+ const o = new IS();
30214
30230
  this._lodsHandler.push(o), this.gameObject.add(o);
30215
30231
  }
30216
- const i = new D();
30232
+ const i = new L();
30217
30233
  i.name = "Cull " + this.name;
30218
30234
  for (let s = 0; s < e.length; s++) {
30219
30235
  const o = e[s], a = this._lodsHandler[s], l = o.gameObject;
@@ -31033,7 +31049,7 @@ const sc = (dd = class {
31033
31049
  /** initializer implementation */
31034
31050
  r(this, "_vector", new v(0, 0, 0));
31035
31051
  r(this, "_temp", new v(0, 0, 0));
31036
- r(this, "_triangle", new D1());
31052
+ r(this, "_triangle", new DS());
31037
31053
  r(this, "_dir", new v());
31038
31054
  r(this, "_loopTime", 0);
31039
31055
  r(this, "_loopDirection", 1);
@@ -31314,7 +31330,7 @@ class Oe {
31314
31330
  apply(t, e, i, s, o, a) {
31315
31331
  if (!this.enabled)
31316
31332
  return;
31317
- this._noise || (this._noise = bS(() => 0));
31333
+ this._noise || (this._noise = b1(() => 0));
31318
31334
  const l = this._temp.set(e.x, e.y, e.z).multiplyScalar(this.frequency), c = this._noise(l.x, l.y, l.z, this._time), h = this._noise(l.x, l.y, l.z, this._time + 1e3 * this.frequency), d = this._noise(l.x, l.y, l.z, this._time + 2e3 * this.frequency);
31319
31335
  this._temp.set(c, h, d).normalize();
31320
31336
  const u = o / a;
@@ -32376,7 +32392,7 @@ class D2 {
32376
32392
  r(this, "onlyUsedByOther");
32377
32393
  r(this, "behaviors", []);
32378
32394
  r(this, "rendererEmitterSettings", {
32379
- startLength: new CS(220),
32395
+ startLength: new C1(220),
32380
32396
  followLocalOrigin: !1
32381
32397
  });
32382
32398
  r(this, "flatWhiteTexture");
@@ -32422,7 +32438,7 @@ class D2 {
32422
32438
  }
32423
32439
  /** start length is for trails */
32424
32440
  get startColor() {
32425
- return new xS(new SS(1, 1, 1, 1));
32441
+ return new x1(new S1(1, 1, 1, 1));
32426
32442
  }
32427
32443
  get emissionOverTime() {
32428
32444
  return this.emission;
@@ -32484,7 +32500,7 @@ class D2 {
32484
32500
  }
32485
32501
  get blending() {
32486
32502
  var t;
32487
- return ((t = this.system.renderer.particleMaterial) == null ? void 0 : t.blending) ?? L1;
32503
+ return ((t = this.system.renderer.particleMaterial) == null ? void 0 : t.blending) ?? LS;
32488
32504
  }
32489
32505
  get transparent() {
32490
32506
  return this.system.renderer.transparent;
@@ -32713,7 +32729,7 @@ const kd = class extends I {
32713
32729
  awake() {
32714
32730
  if (this._worldPositionFrame = -1, this._renderer = this.gameObject.getComponent(Cs), !this.main)
32715
32731
  throw new Error("Not Supported: ParticleSystem needs a serialized MainModule. Creating new particle systems at runtime is currently not supported.");
32716
- this._container = new D(), this._container.matrixAutoUpdate = !1, this.context.scene.add(this._container), this._batchSystem = new vS(), this._batchSystem.name = this.gameObject.name, this._container.add(this._batchSystem), this._interface = new D2(this), this._particleSystem = new wS(this._interface), this._particleSystem.addBehavior(new T2(this)), this._particleSystem.addBehavior(new I2(this)), this._particleSystem.addBehavior(new M2(this)), this._particleSystem.addBehavior(new R2(this)), this._particleSystem.addBehavior(new E2(this)), this._particleSystem.addBehavior(new A2(this)), this._batchSystem.addSystem(this._particleSystem);
32732
+ this._container = new L(), this._container.matrixAutoUpdate = !1, this.context.scene.add(this._container), this._batchSystem = new v1(), this._batchSystem.name = this.gameObject.name, this._container.add(this._batchSystem), this._interface = new D2(this), this._particleSystem = new w1(this._interface), this._particleSystem.addBehavior(new T2(this)), this._particleSystem.addBehavior(new I2(this)), this._particleSystem.addBehavior(new M2(this)), this._particleSystem.addBehavior(new R2(this)), this._particleSystem.addBehavior(new E2(this)), this._particleSystem.addBehavior(new A2(this)), this._batchSystem.addSystem(this._particleSystem);
32717
32733
  const t = this._particleSystem.emitter;
32718
32734
  this.context.scene.add(t), this.inheritVelocity.system && this.inheritVelocity.system !== this && (this.inheritVelocity = this.inheritVelocity.clone()), this.inheritVelocity.awake(this), eo && (console.log(this), this.gameObject.add(new Mi(1)));
32719
32735
  }
@@ -33163,9 +33179,9 @@ class af extends dt {
33163
33179
  }
33164
33180
  // 2 is HIGH: https://github.com/pmndrs/postprocessing/blob/main/src/enums/SMAAPreset.js#L14
33165
33181
  onCreateEffect() {
33166
- const e = new j.POSTPROCESSING.MODULE.SMAAEffect({
33167
- preset: j.POSTPROCESSING.MODULE.SMAAPreset.HIGH,
33168
- edgeDetectionMode: j.POSTPROCESSING.MODULE.EdgeDetectionMode.DEPTH
33182
+ const e = new D.POSTPROCESSING.MODULE.SMAAEffect({
33183
+ preset: D.POSTPROCESSING.MODULE.SMAAPreset.HIGH,
33184
+ edgeDetectionMode: D.POSTPROCESSING.MODULE.EdgeDetectionMode.DEPTH
33169
33185
  });
33170
33186
  return this.preset.onValueChanged = (i) => {
33171
33187
  e.applyPreset(i);
@@ -33202,8 +33218,8 @@ const Hw = ($p = class extends dt {
33202
33218
  onCreateEffect() {
33203
33219
  let t;
33204
33220
  if (this.selectiveBloom == null && (this.selectiveBloom = Hw.useSelectiveBloom), this.selectiveBloom) {
33205
- const e = t = new j.POSTPROCESSING.MODULE.SelectiveBloomEffect(this.context.scene, this.context.mainCamera, {
33206
- blendFunction: j.POSTPROCESSING.MODULE.BlendFunction.ADD,
33221
+ const e = t = new D.POSTPROCESSING.MODULE.SelectiveBloomEffect(this.context.scene, this.context.mainCamera, {
33222
+ blendFunction: D.POSTPROCESSING.MODULE.BlendFunction.ADD,
33207
33223
  mipmapBlur: !0,
33208
33224
  luminanceThreshold: this.threshold.value,
33209
33225
  luminanceSmoothing: this.scatter.value,
@@ -33213,8 +33229,8 @@ const Hw = ($p = class extends dt {
33213
33229
  });
33214
33230
  e.inverted = !0;
33215
33231
  } else
33216
- t = new j.POSTPROCESSING.MODULE.BloomEffect({
33217
- blendFunction: j.POSTPROCESSING.MODULE.BlendFunction.ADD,
33232
+ t = new D.POSTPROCESSING.MODULE.BloomEffect({
33233
+ blendFunction: D.POSTPROCESSING.MODULE.BlendFunction.ADD,
33218
33234
  mipmapBlur: !0,
33219
33235
  luminanceThreshold: this.threshold.value,
33220
33236
  luminanceSmoothing: this.scatter.value,
@@ -33257,7 +33273,7 @@ class lf extends dt {
33257
33273
  return "ChromaticAberration";
33258
33274
  }
33259
33275
  onCreateEffect() {
33260
- const e = new j.POSTPROCESSING.MODULE.ChromaticAberrationEffect();
33276
+ const e = new D.POSTPROCESSING.MODULE.ChromaticAberrationEffect();
33261
33277
  return e.offset = new oe(0, 0), e.radialModulation = !0, e.modulationOffset = 0.15, this.intensity.valueProcessor = (i) => i * 0.02, this.intensity.onValueChanged = (i) => {
33262
33278
  e.offset.x = -i, e.offset.y = i;
33263
33279
  }, e;
@@ -33309,17 +33325,17 @@ function aA(n) {
33309
33325
  function Lb(n) {
33310
33326
  switch (n) {
33311
33327
  case Ou:
33312
- return j.POSTPROCESSING.MODULE.ToneMappingMode.LINEAR;
33328
+ return D.POSTPROCESSING.MODULE.ToneMappingMode.LINEAR;
33313
33329
  case cg:
33314
- return j.POSTPROCESSING.MODULE.ToneMappingMode.ACES_FILMIC;
33330
+ return D.POSTPROCESSING.MODULE.ToneMappingMode.ACES_FILMIC;
33315
33331
  case Pu:
33316
- return j.POSTPROCESSING.MODULE.ToneMappingMode.AGX;
33332
+ return D.POSTPROCESSING.MODULE.ToneMappingMode.AGX;
33317
33333
  case Ec:
33318
- return j.POSTPROCESSING.MODULE.ToneMappingMode.NEUTRAL;
33334
+ return D.POSTPROCESSING.MODULE.ToneMappingMode.NEUTRAL;
33319
33335
  case hg:
33320
- return j.POSTPROCESSING.MODULE.ToneMappingMode.REINHARD;
33336
+ return D.POSTPROCESSING.MODULE.ToneMappingMode.REINHARD;
33321
33337
  default:
33322
- return j.POSTPROCESSING.MODULE.ToneMappingMode.LINEAR;
33338
+ return D.POSTPROCESSING.MODULE.ToneMappingMode.LINEAR;
33323
33339
  }
33324
33340
  }
33325
33341
  const qw = class extends dt {
@@ -33357,7 +33373,7 @@ const qw = class extends dt {
33357
33373
  const i = aA(this.context.renderer.toneMapping);
33358
33374
  this.mode.initialize(i);
33359
33375
  }
33360
- const t = Op(this.mode.value), e = new j.POSTPROCESSING.MODULE.ToneMappingEffect({
33376
+ const t = Op(this.mode.value), e = new D.POSTPROCESSING.MODULE.ToneMappingEffect({
33361
33377
  mode: Lb(t)
33362
33378
  });
33363
33379
  return this.mode.onValueChanged = (i) => {
@@ -33368,7 +33384,7 @@ const qw = class extends dt {
33368
33384
  }, e;
33369
33385
  }
33370
33386
  onBeforeRender() {
33371
- this.mode.overrideState && (this.context.renderer.toneMapping = Op(this.mode.value)), this.exposure.overrideState && (this.context.renderer.toneMappingExposure = this.exposure.value);
33387
+ this.mode.overrideState && (this.context.renderer.toneMapping = Op(this.mode.value)), this.exposure.overrideState && this.exposure.value !== void 0 && (this.context.renderer.toneMappingExposure = this.exposure.value);
33372
33388
  }
33373
33389
  };
33374
33390
  let Mr = qw;
@@ -33409,9 +33425,9 @@ class zr extends dt {
33409
33425
  i || (i = new Mr(), (l = this.postprocessingContext) == null || l.components.push(i)), this.postExposure.onValueChanged = (c) => {
33410
33426
  this.postExposure.overrideState && (i.exposure.value = c);
33411
33427
  };
33412
- const s = new j.POSTPROCESSING.MODULE.BrightnessContrastEffect();
33428
+ const s = new D.POSTPROCESSING.MODULE.BrightnessContrastEffect();
33413
33429
  this.contrast.onValueChanged = (c) => s.contrast = c;
33414
- const o = new j.POSTPROCESSING.MODULE.HueSaturationEffect();
33430
+ const o = new D.POSTPROCESSING.MODULE.HueSaturationEffect();
33415
33431
  return e.push(s), e.push(o), this.hueShift.onValueChanged = (c) => o.hue = c, this.saturation.onValueChanged = (c) => o.saturation = c, e;
33416
33432
  }
33417
33433
  }
@@ -33464,7 +33480,7 @@ class Js extends dt {
33464
33480
  uA && console.warn("DepthOfField: Mode is set to Off");
33465
33481
  return;
33466
33482
  }
33467
- const e = new j.POSTPROCESSING.MODULE.DepthOfFieldEffect(this.context.mainCamera, {
33483
+ const e = new D.POSTPROCESSING.MODULE.DepthOfFieldEffect(this.context.mainCamera, {
33468
33484
  worldFocusRange: 0.2,
33469
33485
  focalLength: 1,
33470
33486
  bokehScale: 20,
@@ -33526,7 +33542,7 @@ class hf extends dt {
33526
33542
  return "PixelationEffect";
33527
33543
  }
33528
33544
  onCreateEffect() {
33529
- const e = new j.POSTPROCESSING.MODULE.PixelationEffect();
33545
+ const e = new D.POSTPROCESSING.MODULE.PixelationEffect();
33530
33546
  return this.granularity.onValueChanged = (i) => {
33531
33547
  e.granularity = i;
33532
33548
  }, e;
@@ -33561,10 +33577,10 @@ class Eo extends dt {
33561
33577
  }
33562
33578
  }
33563
33579
  onCreateEffect() {
33564
- const e = this.context.mainCamera, i = new j.POSTPROCESSING.MODULE.NormalPass(this.context.scene, e), s = new j.POSTPROCESSING.MODULE.DepthDownsamplingPass({
33580
+ const e = this.context.mainCamera, i = new D.POSTPROCESSING.MODULE.NormalPass(this.context.scene, e), s = new D.POSTPROCESSING.MODULE.DepthDownsamplingPass({
33565
33581
  normalBuffer: i.texture,
33566
33582
  resolutionScale: 0.5
33567
- }), o = this._ssao = new j.POSTPROCESSING.MODULE.SSAOEffect(e, i.texture, {
33583
+ }), o = this._ssao = new D.POSTPROCESSING.MODULE.SSAOEffect(e, i.texture, {
33568
33584
  normalDepthBuffer: s.texture,
33569
33585
  worldDistanceThreshold: 1,
33570
33586
  // when it starts to fade out
@@ -33573,7 +33589,7 @@ class Eo extends dt {
33573
33589
  worldProximityThreshold: 0.1,
33574
33590
  worldProximityFalloff: 2,
33575
33591
  intensity: 1,
33576
- blendFunction: j.POSTPROCESSING.MODULE.BlendFunction.MULTIPLY,
33592
+ blendFunction: D.POSTPROCESSING.MODULE.BlendFunction.MULTIPLY,
33577
33593
  luminanceInfluence: 0.5
33578
33594
  });
33579
33595
  this.intensity.onValueChanged = (l) => {
@@ -33636,7 +33652,7 @@ class en extends dt {
33636
33652
  this._ssao && (this._ssao.setQualityMode(Ym[this.quality]), this._ssao.configuration.gammaCorrection = this.gammaCorrection, this._ssao.configuration.screenSpaceRadius = this.screenspaceRadius);
33637
33653
  }
33638
33654
  onCreateEffect() {
33639
- const e = this.context.mainCamera, i = this.context.domWidth, s = this.context.domHeight, o = this._ssao = new j.POSTPROCESSING_AO.MODULE.N8AOPostPass(
33655
+ const e = this.context.mainCamera, i = this.context.domWidth, s = this.context.domHeight, o = this._ssao = new D.POSTPROCESSING_AO.MODULE.N8AOPostPass(
33640
33656
  this.context.scene,
33641
33657
  e,
33642
33658
  i,
@@ -33777,11 +33793,11 @@ function SA() {
33777
33793
  }
33778
33794
 
33779
33795
  `;
33780
- class e extends j.POSTPROCESSING.MODULE.Effect {
33796
+ class e extends D.POSTPROCESSING.MODULE.Effect {
33781
33797
  constructor() {
33782
33798
  super("Sharpening", t, {
33783
33799
  vertexShader: n,
33784
- blendFunction: j.POSTPROCESSING.MODULE.BlendFunction.NORMAL,
33800
+ blendFunction: D.POSTPROCESSING.MODULE.BlendFunction.NORMAL,
33785
33801
  uniforms: /* @__PURE__ */ new Map([
33786
33802
  ["amount", new lo(1)],
33787
33803
  ["radius", new lo(1)]
@@ -33811,11 +33827,11 @@ class Un extends dt {
33811
33827
  return "TiltShiftEffect";
33812
33828
  }
33813
33829
  init() {
33814
- this.offset.defaultValue = 0, this.rotation.defaultValue = 0, this.focusArea.defaultValue = 0.4, this.feather.defaultValue = 0.3, this.kernelSize.defaultValue = j.POSTPROCESSING.MODULE.KernelSize.MEDIUM, this.resolutionScale.defaultValue = 1 / window.devicePixelRatio;
33830
+ this.offset.defaultValue = 0, this.rotation.defaultValue = 0, this.focusArea.defaultValue = 0.4, this.feather.defaultValue = 0.3, this.kernelSize.defaultValue = D.POSTPROCESSING.MODULE.KernelSize.MEDIUM, this.resolutionScale.defaultValue = 1 / window.devicePixelRatio;
33815
33831
  }
33816
33832
  onCreateEffect() {
33817
- const e = new j.POSTPROCESSING.MODULE.TiltShiftEffect({
33818
- kernelSize: j.POSTPROCESSING.MODULE.KernelSize.VERY_LARGE,
33833
+ const e = new D.POSTPROCESSING.MODULE.TiltShiftEffect({
33834
+ kernelSize: D.POSTPROCESSING.MODULE.KernelSize.VERY_LARGE,
33819
33835
  offset: this.offset.value,
33820
33836
  rotation: this.rotation.value,
33821
33837
  focusArea: this.focusArea.value,
@@ -33862,7 +33878,7 @@ class _l extends dt {
33862
33878
  this.color.defaultValue = { r: 0, g: 0, b: 0, a: 1 }, this.intensity.defaultValue = 0, this.center.defaultValue = { x: 0.5, y: 0.5 };
33863
33879
  }
33864
33880
  onCreateEffect() {
33865
- const e = new j.POSTPROCESSING.MODULE.VignetteEffect();
33881
+ const e = new D.POSTPROCESSING.MODULE.VignetteEffect();
33866
33882
  return this.intensity.onValueChanged = (i) => {
33867
33883
  e.offset = i, this.updateDarkness(e);
33868
33884
  }, this.color.onValueChanged = (i) => {
@@ -33885,7 +33901,7 @@ f_([
33885
33901
  ], _l.prototype, "center", 2);
33886
33902
  Ps("Vignette", _l);
33887
33903
  globalThis.true = globalThis.true !== void 0 ? globalThis.true : !0;
33888
- const Gn = x("debugpost"), Mp = Symbol("needle:postprocessing-handler"), Rp = Symbol("needle:previous-autoclear-state");
33904
+ const Gn = x("debugpost"), RA = x("debugpostpasses"), Mp = Symbol("needle:postprocessing-handler"), Rp = Symbol("needle:previous-autoclear-state");
33889
33905
  class Qw {
33890
33906
  constructor(t) {
33891
33907
  r(this, "_composer", null);
@@ -33893,6 +33909,8 @@ class Qw {
33893
33909
  r(this, "_effects", []);
33894
33910
  r(this, "_isActive", !1);
33895
33911
  r(this, "context");
33912
+ r(this, "_menuEntry", null);
33913
+ r(this, "_passIndices", null);
33896
33914
  this.context = t;
33897
33915
  }
33898
33916
  get isActive() {
@@ -33924,8 +33942,8 @@ class Qw {
33924
33942
  if (!e)
33925
33943
  return;
33926
33944
  await Promise.all([
33927
- j.POSTPROCESSING.load(),
33928
- j.POSTPROCESSING_AO.load()
33945
+ D.POSTPROCESSING.load(),
33946
+ D.POSTPROCESSING_AO.load()
33929
33947
  // import("./Effects/Sharpening.effect")
33930
33948
  ]), t[Mp] = this, Gn && console.log("Apply Postprocessing Effects", e), this._lastVolumeComponents = [...e], this._effects.length = 0;
33931
33949
  const i = {
@@ -33948,8 +33966,8 @@ class Qw {
33948
33966
  } else
33949
33967
  o.active && ve("Volume component is not a VolumeComponent: " + o.__type);
33950
33968
  }
33951
- if (this.context.renderer.toneMapping != ja && !this._effects.find((s) => s instanceof j.POSTPROCESSING.MODULE.ToneMappingEffect)) {
33952
- const s = new j.POSTPROCESSING.MODULE.ToneMappingEffect();
33969
+ if (this.context.renderer.toneMapping != ja && !this._effects.find((s) => s instanceof D.POSTPROCESSING.MODULE.ToneMappingEffect)) {
33970
+ const s = new D.POSTPROCESSING.MODULE.ToneMappingEffect();
33953
33971
  this._effects.push(s);
33954
33972
  }
33955
33973
  this.applyEffects(t);
@@ -33960,8 +33978,8 @@ class Qw {
33960
33978
  if (e.length <= 0)
33961
33979
  return;
33962
33980
  const i = t.mainCameraComponent, s = t.renderer, o = t.scene, a = i.threeCamera;
33963
- s[Rp] = s.autoClear, this._composer || (this._composer = new j.POSTPROCESSING.MODULE.EffectComposer(s, {
33964
- frameBufferType: j1,
33981
+ s[Rp] = s.autoClear, this._composer || (this._composer = new D.POSTPROCESSING.MODULE.EffectComposer(s, {
33982
+ frameBufferType: jS,
33965
33983
  stencilBuffer: !0
33966
33984
  })), t.composer && t.composer !== this._composer && console.warn("There's already an active EffectComposer in your scene: replacing it with a new one. This might cause unexpected behaviour. Make sure to only use one PostprocessingManager/Volume in your scene."), t.composer = this._composer;
33967
33985
  const l = t.composer;
@@ -33969,40 +33987,78 @@ class Qw {
33969
33987
  for (const h of l.passes)
33970
33988
  h.dispose();
33971
33989
  l.removeAllPasses();
33972
- const c = new j.POSTPROCESSING.MODULE.RenderPass(o, a);
33973
- c.name = "Render To Screen", c.mainScene = o, l.addPass(c);
33974
- try {
33990
+ const c = new D.POSTPROCESSING.MODULE.RenderPass(o, a);
33991
+ if (c.name = "Render To Screen", c.mainScene = o, l.addPass(c), RA) {
33975
33992
  this.orderEffects();
33976
- const h = [];
33977
- for (const d of e)
33978
- d instanceof j.POSTPROCESSING.MODULE.Effect ? h.push(d) : (d instanceof j.POSTPROCESSING.MODULE.Pass, l.addPass(d));
33979
- if (h.length > 0) {
33980
- const d = new j.POSTPROCESSING.MODULE.EffectPass(a, ...h);
33981
- d.name = h.map((u) => u.name).join(" "), d.mainScene = o, d.enabled = !0, l.addPass(d);
33993
+ for (const h of e)
33994
+ if (h instanceof D.POSTPROCESSING.MODULE.Effect) {
33995
+ const d = new D.POSTPROCESSING.MODULE.EffectPass(a, h);
33996
+ d.name = h.name, l.addPass(d);
33997
+ } else
33998
+ h instanceof D.POSTPROCESSING.MODULE.Pass, l.addPass(h);
33999
+ } else
34000
+ try {
34001
+ this.orderEffects();
34002
+ const h = [];
34003
+ for (const d of e)
34004
+ d instanceof D.POSTPROCESSING.MODULE.Effect ? h.push(d) : (d instanceof D.POSTPROCESSING.MODULE.Pass, l.addPass(d));
34005
+ if (h.length > 0) {
34006
+ const d = new D.POSTPROCESSING.MODULE.EffectPass(a, ...h);
34007
+ d.name = h.map((u) => u.name).join(" "), d.mainScene = o, d.enabled = !0, l.addPass(d);
34008
+ }
34009
+ } catch (h) {
34010
+ console.error("Error while applying postprocessing effects", h), l.removeAllPasses();
34011
+ }
34012
+ if (Gn) {
34013
+ console.log("[PostProcessing] Passes →", l.passes);
34014
+ const h = new D.POSTPROCESSING.MODULE.DepthEffect({
34015
+ blendFunction: D.POSTPROCESSING.MODULE.BlendFunction.NORMAL,
34016
+ inverted: !0
34017
+ });
34018
+ h.name = "Depth Effect";
34019
+ const d = new D.POSTPROCESSING.MODULE.EffectPass(a, h);
34020
+ if (d.name = "Depth Effect Pass", d.enabled = !1, l.passes.push(d), this._passIndices !== null) {
34021
+ const p = [l.passes[0]];
34022
+ this._passIndices.length > 0 && this._passIndices[0] !== 0 && p.push(...this._passIndices.map((m) => l.passes[m]).filter((m) => m)), p.length > 0 && console.log("[PostProcessing] Passes (selected) →", p), l.passes.length = 0;
34023
+ for (const m of p)
34024
+ m.enabled = !0, l.addPass(m);
34025
+ }
34026
+ const u = this.context.menu;
34027
+ if (u && this._passIndices === null) {
34028
+ this._menuEntry && this._menuEntry.remove();
34029
+ const p = document.createElement("select");
34030
+ p.multiple = !0;
34031
+ const m = document.createElement("option");
34032
+ m.innerText = "Final Output", m.value = "-1", p.appendChild(m);
34033
+ for (const g of l.passes) {
34034
+ const _ = document.createElement("option");
34035
+ _.innerText = g.name, _.value = `${l.passes.indexOf(g)}`, _.title = g.name, p.appendChild(_);
34036
+ }
34037
+ u.appendChild(p), this._menuEntry = p, p.addEventListener("change", () => {
34038
+ const g = Array.from(p.selectedOptions).map((_) => parseInt(_.value));
34039
+ g.length === 1 && g[0] === -1 ? this._passIndices = null : this._passIndices = g, this.applyEffects(t);
34040
+ });
33982
34041
  }
33983
- } catch (h) {
33984
- console.error("Error while applying postprocessing effects", h), l.removeAllPasses();
33985
34042
  }
33986
- Gn && console.log("[PostProcessing] Passes →", l.passes);
33987
34043
  }
33988
34044
  orderEffects() {
33989
34045
  var e;
33990
34046
  Gn && console.log("Before ordering effects", [...this._effects]), kp ?? (kp = [
33991
- j.POSTPROCESSING.MODULE.NormalPass,
33992
- j.POSTPROCESSING.MODULE.DepthDownsamplingPass,
33993
- j.POSTPROCESSING.MODULE.SMAAEffect,
33994
- j.POSTPROCESSING.MODULE.SSAOEffect,
33995
- j.POSTPROCESSING_AO.MODULE.N8AOPostPass,
33996
- j.POSTPROCESSING.MODULE.TiltShiftEffect,
33997
- j.POSTPROCESSING.MODULE.DepthOfFieldEffect,
33998
- j.POSTPROCESSING.MODULE.ChromaticAberrationEffect,
33999
- j.POSTPROCESSING.MODULE.BloomEffect,
34000
- j.POSTPROCESSING.MODULE.SelectiveBloomEffect,
34001
- j.POSTPROCESSING.MODULE.VignetteEffect,
34002
- j.POSTPROCESSING.MODULE.PixelationEffect,
34003
- j.POSTPROCESSING.MODULE.ToneMappingEffect,
34004
- j.POSTPROCESSING.MODULE.HueSaturationEffect,
34005
- j.POSTPROCESSING.MODULE.BrightnessContrastEffect
34047
+ D.POSTPROCESSING.MODULE.NormalPass,
34048
+ D.POSTPROCESSING.MODULE.DepthDownsamplingPass,
34049
+ D.POSTPROCESSING.MODULE.SMAAEffect,
34050
+ D.POSTPROCESSING.MODULE.SSAOEffect,
34051
+ D.POSTPROCESSING_AO.MODULE.N8AOPostPass,
34052
+ D.POSTPROCESSING.MODULE.TiltShiftEffect,
34053
+ D.POSTPROCESSING.MODULE.DepthOfFieldEffect,
34054
+ D.POSTPROCESSING.MODULE.ChromaticAberrationEffect,
34055
+ D.POSTPROCESSING.MODULE.BloomEffect,
34056
+ D.POSTPROCESSING.MODULE.SelectiveBloomEffect,
34057
+ D.POSTPROCESSING.MODULE.VignetteEffect,
34058
+ D.POSTPROCESSING.MODULE.PixelationEffect,
34059
+ D.POSTPROCESSING.MODULE.ToneMappingEffect,
34060
+ D.POSTPROCESSING.MODULE.HueSaturationEffect,
34061
+ D.POSTPROCESSING.MODULE.BrightnessContrastEffect
34006
34062
  // __SHARPENING_MODULE._SharpeningEffect,
34007
34063
  ]);
34008
34064
  const t = this._effects;
@@ -34020,10 +34076,10 @@ class Qw {
34020
34076
  }
34021
34077
  }
34022
34078
  let kp = null;
34023
- var RA = Object.defineProperty, kA = Object.getOwnPropertyDescriptor, Yw = (n, t, e, i) => {
34024
- for (var s = i > 1 ? void 0 : i ? kA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
34079
+ var kA = Object.defineProperty, TA = Object.getOwnPropertyDescriptor, Yw = (n, t, e, i) => {
34080
+ for (var s = i > 1 ? void 0 : i ? TA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
34025
34081
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
34026
- return i && s && RA(t, e, s), s;
34082
+ return i && s && kA(t, e, s), s;
34027
34083
  };
34028
34084
  const Jr = x("debugpost");
34029
34085
  class wh extends I {
@@ -34207,15 +34263,15 @@ Yw([
34207
34263
  const od = /* @__PURE__ */ new Map();
34208
34264
  B2(wh);
34209
34265
  async function p_(n) {
34210
- const { NeedleEngineHTMLElement: t } = await Promise.resolve().then(() => vI);
34266
+ const { NeedleEngineHTMLElement: t } = await Promise.resolve().then(() => wI);
34211
34267
  t.observedAttributes.includes(n) || t.observedAttributes.push(n);
34212
34268
  }
34213
- var TA = Object.defineProperty, AA = Object.getOwnPropertyDescriptor, St = (n, t, e, i) => {
34214
- for (var s = i > 1 ? void 0 : i ? AA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
34269
+ var AA = Object.defineProperty, EA = Object.getOwnPropertyDescriptor, St = (n, t, e, i) => {
34270
+ for (var s = i > 1 ? void 0 : i ? EA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
34215
34271
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
34216
- return i && s && TA(t, e, s), s;
34272
+ return i && s && AA(t, e, s), s;
34217
34273
  };
34218
- const Qt = x("debugsceneswitcher"), EA = x("sceneswitcher:clearscene"), Ad = "scene";
34274
+ const Qt = x("debugsceneswitcher"), IA = x("sceneswitcher:clearscene"), Ad = "scene";
34219
34275
  p_(Ad);
34220
34276
  const qn = Promise.resolve(!1);
34221
34277
  class rt extends I {
@@ -34332,7 +34388,7 @@ class rt extends I {
34332
34388
  awake() {
34333
34389
  this.scenes === void 0 && (this.scenes = []);
34334
34390
  for (const e of this.scenes)
34335
- e && !e.hasUrl && e.asset instanceof D && e.asset.removeFromParent();
34391
+ e && !e.hasUrl && e.asset instanceof L && e.asset.removeFromParent();
34336
34392
  Qt && console.log("SceneSwitcher", this);
34337
34393
  }
34338
34394
  /** @internal */
@@ -34345,7 +34401,7 @@ class rt extends I {
34345
34401
  }
34346
34402
  })), this._engineElementOverserver.observe(this.context.domElement, {
34347
34403
  attributes: !0
34348
- }), this._preloadScheduler || (this._preloadScheduler = new IA(this)), this._preloadScheduler.maxLoadAhead = this.preloadNext, this._preloadScheduler.maxLoadBehind = this.preloadPrevious, this._preloadScheduler.maxConcurrent = this.preloadConcurrent, this._preloadScheduler.begin(2e3), this.autoLoadFirstScene && this._currentIndex === -1 && !await this.tryLoadFromQueryParam()) {
34404
+ }), this._preloadScheduler || (this._preloadScheduler = new DA(this)), this._preloadScheduler.maxLoadAhead = this.preloadNext, this._preloadScheduler.maxLoadBehind = this.preloadPrevious, this._preloadScheduler.maxConcurrent = this.preloadConcurrent, this._preloadScheduler.begin(2e3), this.autoLoadFirstScene && this._currentIndex === -1 && !await this.tryLoadFromQueryParam()) {
34349
34405
  const e = this.context.domElement.getAttribute(Ad);
34350
34406
  try {
34351
34407
  (e === null || !await this.trySelectSceneFromValue(e)) && this._currentIndex === -1 && this.select(0);
@@ -34491,7 +34547,7 @@ class rt extends I {
34491
34547
  const s = i.sceneClosing();
34492
34548
  s instanceof Promise && await s;
34493
34549
  }
34494
- e.hasUrl ? e.unload() : e.asset instanceof D && e.asset.removeFromParent();
34550
+ e.hasUrl ? e.unload() : e.asset instanceof L && e.asset.removeFromParent();
34495
34551
  }
34496
34552
  }
34497
34553
  /** @internal */
@@ -34512,7 +34568,7 @@ class rt extends I {
34512
34568
  if (!e.asset)
34513
34569
  return Qt && console.warn("Failed loading scene:", e), !1;
34514
34570
  if (this._currentIndex === i) {
34515
- if (Qt && console.log("ADD", e.url), this._currentScene = e, EA) {
34571
+ if (Qt && console.log("ADD", e.url), this._currentScene = e, IA) {
34516
34572
  const m = ((a = this.context.mainCameraComponent) == null ? void 0 : a.gameObject) || this.context.mainCamera;
34517
34573
  m == null || m.removeFromParent();
34518
34574
  const g = this.gameObject.removeFromParent();
@@ -34691,7 +34747,7 @@ function jb(n) {
34691
34747
  const t = n.split("/").pop(), e = t == null ? void 0 : t.split(".").shift();
34692
34748
  return e != null && e.length ? e : n;
34693
34749
  }
34694
- class IA {
34750
+ class DA {
34695
34751
  /**
34696
34752
  * Creates a new PreLoadScheduler instance
34697
34753
  * @param rooms The SceneSwitcher that this scheduler belongs to
@@ -34737,7 +34793,7 @@ class IA {
34737
34793
  const d = c ? e + i : e - i;
34738
34794
  if (!(d < 0) && !(d < 0 || d >= o.length) && !this._loadTasks.some((u) => u.index === d)) {
34739
34795
  const u = o[d];
34740
- Qt && console.log("Preload scene", { roomIndex: d, searchForward: c, lastRoom: e, currentIndex: this._switcher.currentIndex, tasks: this._loadTasks.length }, u == null ? void 0 : u.url), new DA(d, u, this._loadTasks);
34796
+ Qt && console.log("Preload scene", { roomIndex: d, searchForward: c, lastRoom: e, currentIndex: this._switcher.currentIndex, tasks: this._loadTasks.length }, u == null ? void 0 : u.url), new LA(d, u, this._loadTasks);
34741
34797
  }
34742
34798
  }, 200);
34743
34799
  }
@@ -34767,7 +34823,7 @@ class IA {
34767
34823
  return !0;
34768
34824
  }
34769
34825
  }
34770
- class DA {
34826
+ class LA {
34771
34827
  /**
34772
34828
  * Creates a new LoadTask and begins loading immediately
34773
34829
  * @param index The index of the scene in the scenes array
@@ -34792,7 +34848,7 @@ class DA {
34792
34848
  t >= 0 && this.tasks.splice(t, 1);
34793
34849
  }
34794
34850
  }
34795
- function LA() {
34851
+ function jA() {
34796
34852
  return new Promise((n, t) => {
34797
34853
  const i = () => {
34798
34854
  i != null && (document.removeEventListener("pointerdown", i), document.removeEventListener("click", i), document.removeEventListener("dragstart", i), document.removeEventListener("touchstart", i), n());
@@ -34800,13 +34856,13 @@ function LA() {
34800
34856
  document.addEventListener("pointerdown", i), document.addEventListener("click", i), document.addEventListener("dragstart", i), document.addEventListener("touchstart", i);
34801
34857
  });
34802
34858
  }
34803
- async function jA(n) {
34804
- await LA(), n();
34859
+ async function BA(n) {
34860
+ await jA(), n();
34805
34861
  }
34806
- var BA = Object.defineProperty, FA = Object.getOwnPropertyDescriptor, Bi = (n, t, e, i) => {
34807
- for (var s = i > 1 ? void 0 : i ? FA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
34862
+ var FA = Object.defineProperty, zA = Object.getOwnPropertyDescriptor, Bi = (n, t, e, i) => {
34863
+ for (var s = i > 1 ? void 0 : i ? zA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
34808
34864
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
34809
- return i && s && BA(t, e, s), s;
34865
+ return i && s && FA(t, e, s), s;
34810
34866
  };
34811
34867
  const pt = x("debugvideo");
34812
34868
  var Kw = /* @__PURE__ */ ((n) => (n[n.None = 0] = "None", n[n.AdjustHeight = 1] = "AdjustHeight", n[n.AdjustWidth = 2] = "AdjustWidth", n))(Kw || {}), Zw = /* @__PURE__ */ ((n) => (n[n.VideoClip = 0] = "VideoClip", n[n.Url = 1] = "Url", n))(Zw || {}), Jw = /* @__PURE__ */ ((n) => (n[n.CameraFarPlane = 0] = "CameraFarPlane", n[n.CameraNearPlane = 1] = "CameraNearPlane", n[n.RenderTexture = 2] = "RenderTexture", n[n.MaterialOverride = 3] = "MaterialOverride", n))(Jw || {});
@@ -34859,7 +34915,7 @@ class bt extends I {
34859
34915
  var e;
34860
34916
  pt && console.log("HLS: available", this.clip), !(!this.shouldUseM3U || !this.url) && (this._hls || (this._hls = new Hls()), this.videoElement.autoplay = !0, this._hls.loadSource(this.url), this._hls.attachMedia(this.videoElement), (e = this._videoElement) == null || e.play(), pt && console.log("HLS: loaded", this.clip));
34861
34917
  });
34862
- jA(() => {
34918
+ BA(() => {
34863
34919
  this._receivedInput = !0, this.updateVideoElementSettings();
34864
34920
  }), this._targetObjects = [], x("videoscreenspace") && window.addEventListener("keydown", (e) => {
34865
34921
  e.key === "f" && (this.screenspace = !this.screenspace);
@@ -35051,7 +35107,7 @@ class bt extends I {
35051
35107
  i = this.url, !(i != null && i.length) && typeof this.clip == "string" && (i = this.clip);
35052
35108
  break;
35053
35109
  }
35054
- return i ? (this._videoElement || (pt && console.warn("Create VideoElement", this), this._videoElement = this.createVideoElement(), this.context.domElement.shadowRoot.prepend(this._videoElement), this.updateVideoElementStyles()), typeof i == "string" ? (pt && console.log("Set Video src", i), this._videoElement.src = i) : (pt && console.log("Set Video srcObject", i), this._videoElement.srcObject = i), this._videoTexture || (this._videoTexture = new B1(this._videoElement)), this._videoTexture.flipY = !1, this._videoTexture.colorSpace = bs, e && this.handleBeginPlaying(e), pt && console.log("Video: handle playing done...", i, e), !0) : (pt && console.warn("No video source set", this), !1);
35110
+ return i ? (this._videoElement || (pt && console.warn("Create VideoElement", this), this._videoElement = this.createVideoElement(), this.context.domElement.shadowRoot.prepend(this._videoElement), this.updateVideoElementStyles()), typeof i == "string" ? (pt && console.log("Set Video src", i), this._videoElement.src = i) : (pt && console.log("Set Video srcObject", i), this._videoElement.srcObject = i), this._videoTexture || (this._videoTexture = new BS(this._videoElement)), this._videoTexture.flipY = !1, this._videoTexture.colorSpace = bs, e && this.handleBeginPlaying(e), pt && console.log("Video: handle playing done...", i, e), !0) : (pt && console.warn("No video source set", this), !1);
35055
35111
  }
35056
35112
  updateAspect() {
35057
35113
  this.aspectMode !== 0 && this.startCoroutine(this.updateAspectImpl());
@@ -35069,7 +35125,7 @@ class bt extends I {
35069
35125
  if (e) {
35070
35126
  if (!this._videoTexture)
35071
35127
  return;
35072
- this._overlay || (this._overlay = new zA(this.context)), this._overlay.add(this._videoTexture);
35128
+ this._overlay || (this._overlay = new UA(this.context)), this._overlay.add(this._videoTexture);
35073
35129
  } else
35074
35130
  (i = this._overlay) == null || i.remove(this._videoTexture);
35075
35131
  this._overlay && (this._overlay.enabled = e);
@@ -35217,14 +35273,14 @@ Bi([
35217
35273
  Bi([
35218
35274
  f()
35219
35275
  ], bt.prototype, "audioOutputMode", 1);
35220
- class zA {
35276
+ class UA {
35221
35277
  constructor(t) {
35222
35278
  r(this, "context");
35223
35279
  r(this, "_videos", []);
35224
35280
  r(this, "_screenspaceModeQuad");
35225
35281
  r(this, "_isInScreenspaceMode", !1);
35226
35282
  r(this, "_input");
35227
- this.context = t, this._input = new UA(this);
35283
+ this.context = t, this._input = new NA(this);
35228
35284
  }
35229
35285
  get enabled() {
35230
35286
  return this._isInScreenspaceMode;
@@ -35250,7 +35306,7 @@ class zA {
35250
35306
  return;
35251
35307
  if (this._isInScreenspaceMode = !0, !this._screenspaceModeQuad) {
35252
35308
  if (this._screenspaceModeQuad = Ar.createPrimitive(Na.Quad, {
35253
- material: new NA(t)
35309
+ material: new $A(t)
35254
35310
  }), !this._screenspaceModeQuad)
35255
35311
  return;
35256
35312
  this._screenspaceModeQuad.geometry.scale(2, 2, 2);
@@ -35270,7 +35326,7 @@ class zA {
35270
35326
  t && (t.screenAspect = this.context.domElement.clientWidth / this.context.domElement.clientHeight);
35271
35327
  }
35272
35328
  }
35273
- class UA {
35329
+ class NA {
35274
35330
  constructor(t) {
35275
35331
  r(this, "_onResizeScreenFn");
35276
35332
  r(this, "_onKeyUpFn");
@@ -35323,7 +35379,7 @@ class UA {
35323
35379
  this._onResizeScreenFn && (window.removeEventListener("resize", this._onResizeScreenFn), this._onResizeScreenFn = void 0), this._onKeyUpFn && (window.removeEventListener("keyup", this._onKeyUpFn), this._onKeyUpFn = void 0), this._onMouseWheelFn && (window.removeEventListener("wheel", this._onMouseWheelFn), this._onMouseWheelFn = void 0);
35324
35380
  }
35325
35381
  }
35326
- class NA extends ys {
35382
+ class $A extends ys {
35327
35383
  // maxZoom : number = 10
35328
35384
  constructor(e) {
35329
35385
  super();
@@ -35409,10 +35465,10 @@ class NA extends ys {
35409
35465
  this.offset = this.offset.set(0, 0), this.zoom = 1, this.needsUpdate = !0;
35410
35466
  }
35411
35467
  }
35412
- var $A = Object.defineProperty, WA = Object.getOwnPropertyDescriptor, xh = (n, t, e, i) => {
35413
- for (var s = i > 1 ? void 0 : i ? WA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
35468
+ var WA = Object.defineProperty, VA = Object.getOwnPropertyDescriptor, xh = (n, t, e, i) => {
35469
+ for (var s = i > 1 ? void 0 : i ? VA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
35414
35470
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
35415
- return i && s && $A(t, e, s), s;
35471
+ return i && s && WA(t, e, s), s;
35416
35472
  };
35417
35473
  const Pt = x("debugscreensharing");
35418
35474
  var ex = /* @__PURE__ */ ((n) => (n[n.Screen = 0] = "Screen", n[n.Camera = 1] = "Camera", n[n.Canvas = 2] = "Canvas", n[n.Microphone = 3] = "Microphone", n))(ex || {});
@@ -35710,10 +35766,10 @@ xh([
35710
35766
  xh([
35711
35767
  f()
35712
35768
  ], $r.prototype, "deviceName", 2);
35713
- var VA = Object.defineProperty, HA = Object.getOwnPropertyDescriptor, tx = (n, t, e, i) => {
35714
- for (var s = i > 1 ? void 0 : i ? HA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
35769
+ var HA = Object.defineProperty, GA = Object.getOwnPropertyDescriptor, tx = (n, t, e, i) => {
35770
+ for (var s = i > 1 ? void 0 : i ? GA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
35715
35771
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
35716
- return i && s && VA(t, e, s), s;
35772
+ return i && s && HA(t, e, s), s;
35717
35773
  };
35718
35774
  class uf extends I {
35719
35775
  constructor() {
@@ -35815,10 +35871,10 @@ tx([
35815
35871
  tx([
35816
35872
  f(we)
35817
35873
  ], uf.prototype, "shadowColor", 2);
35818
- var GA = Object.defineProperty, qA = Object.getOwnPropertyDescriptor, Sh = (n, t, e, i) => {
35819
- for (var s = i > 1 ? void 0 : i ? qA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
35874
+ var qA = Object.defineProperty, XA = Object.getOwnPropertyDescriptor, Sh = (n, t, e, i) => {
35875
+ for (var s = i > 1 ? void 0 : i ? XA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
35820
35876
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
35821
- return i && s && GA(t, e, s), s;
35877
+ return i && s && qA(t, e, s), s;
35822
35878
  };
35823
35879
  const Gi = x("debugskybox");
35824
35880
  p_("skybox-image");
@@ -35829,8 +35885,8 @@ function Bb(n, t, e, i, s) {
35829
35885
  const a = (l) => {
35830
35886
  typeof l == "string" && (Gi && console.log(s, "CHANGED TO", l), o.setSkybox(l));
35831
35887
  };
35832
- return FS(n.domElement, s, a), o.addEventListener("destroy", () => {
35833
- Gi && console.log("Destroyed attribute remote skybox", s), zS(n.domElement, s, a);
35888
+ return F1(n.domElement, s, a), o.addEventListener("destroy", () => {
35889
+ Gi && console.log("Destroyed attribute remote skybox", s), z1(n.domElement, s, a);
35834
35890
  }), o.setSkybox(t);
35835
35891
  }
35836
35892
  const ou = new Array();
@@ -35858,15 +35914,15 @@ function Fb(n) {
35858
35914
  const e = ix().find((i) => i.src === n);
35859
35915
  return e ? (Gi && console.log("Skybox: Found previously loaded texture for " + n), e.texture) : null;
35860
35916
  }
35861
- async function XA(n) {
35917
+ async function QA(n) {
35862
35918
  const t = await n;
35863
35919
  tv(t, !0), Ae(t);
35864
35920
  }
35865
- function QA(n, t) {
35921
+ function YA(n, t) {
35866
35922
  const e = ix();
35867
35923
  for (; e.length > 5; ) {
35868
35924
  const i = e.shift();
35869
- i && XA(i.texture);
35925
+ i && QA(i.texture);
35870
35926
  }
35871
35927
  t.then((i) => tv(i, !1)), e.push({ src: n, texture: t });
35872
35928
  }
@@ -35956,7 +36012,7 @@ class In extends I {
35956
36012
  */
35957
36013
  async setSkybox(e, i) {
35958
36014
  var a;
35959
- if (!this.activeAndEnabled || (e = YA(e, this.environment, this.background), !e))
36015
+ if (!this.activeAndEnabled || (e = KA(e, this.environment, this.background), !e))
35960
36016
  return !1;
35961
36017
  if (i ?? (i = e), this.isValidTextureType(i) || console.warn("Potentially invalid skybox url", i, "on", this.name), Gi && console.log("Set remote skybox url: " + e), this._prevUrl === e && this._prevLoadedEnvironment)
35962
36018
  return this.applySkybox(), !0;
@@ -35985,7 +36041,7 @@ class In extends I {
35985
36041
  else if (a)
35986
36042
  this._loader instanceof em || (this._loader = new em());
35987
36043
  else if (l) {
35988
- if (!(this._loader instanceof hS)) {
36044
+ if (!(this._loader instanceof h1)) {
35989
36045
  const { ktx2Loader: _ } = dg(this.context.renderer);
35990
36046
  this._loader = _;
35991
36047
  }
@@ -35993,12 +36049,12 @@ class In extends I {
35993
36049
  this._loader instanceof xa || (this._loader = new xa());
35994
36050
  Gi && console.log("Loading skybox: " + e);
35995
36051
  const c = this._loader.loadAsync(e);
35996
- return QA(i, c), await c;
36052
+ return YA(i, c), await c;
35997
36053
  }
35998
36054
  applySkybox() {
35999
36055
  var i;
36000
36056
  const e = this._prevLoadedEnvironment;
36001
- e && (e instanceof F1 || e instanceof z1 || (e.mapping = U1, e.needsUpdate = !0), this.context.scene.background !== e && (this._prevBackground = this.context.scene.background), this.context.scene.environment !== e && (this._prevEnvironment = this.context.scene.environment), Gi && console.log("Set remote skybox", this.url, !Pe.backgroundShouldBeTransparent(this.context)), this.environment && (this.context.scene.environment = e), this.background && !Pe.backgroundShouldBeTransparent(this.context) && (this.context.scene.background = e), ((i = this.context.mainCameraComponent) == null ? void 0 : i.backgroundBlurriness) !== void 0 && (this.context.scene.backgroundBlurriness = this.context.mainCameraComponent.backgroundBlurriness));
36057
+ e && (e instanceof FS || e instanceof zS || (e.mapping = US, e.needsUpdate = !0), this.context.scene.background !== e && (this._prevBackground = this.context.scene.background), this.context.scene.environment !== e && (this._prevEnvironment = this.context.scene.environment), Gi && console.log("Set remote skybox", this.url, !Pe.backgroundShouldBeTransparent(this.context)), this.environment && (this.context.scene.environment = e), this.background && !Pe.backgroundShouldBeTransparent(this.context) && (this.context.scene.background = e), ((i = this.context.mainCameraComponent) == null ? void 0 : i.backgroundBlurriness) !== void 0 && (this.context.scene.backgroundBlurriness = this.context.mainCameraComponent.backgroundBlurriness));
36002
36058
  }
36003
36059
  isRemoteTexture(e) {
36004
36060
  return e.startsWith("http://") || e.startsWith("https://");
@@ -36032,7 +36088,7 @@ Sh([
36032
36088
  Sh([
36033
36089
  f()
36034
36090
  ], In.prototype, "allowNetworking", 2);
36035
- function YA(n, t, e) {
36091
+ function KA(n, t, e) {
36036
36092
  const i = t && !e;
36037
36093
  switch (n == null ? void 0 : n.toLowerCase()) {
36038
36094
  case "studio":
@@ -36046,10 +36102,10 @@ function YA(n, t, e) {
36046
36102
  }
36047
36103
  return n === void 0 ? null : n;
36048
36104
  }
36049
- var KA = Object.defineProperty, ZA = Object.getOwnPropertyDescriptor, ff = (n, t, e, i) => {
36050
- for (var s = i > 1 ? void 0 : i ? ZA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
36105
+ var ZA = Object.defineProperty, JA = Object.getOwnPropertyDescriptor, ff = (n, t, e, i) => {
36106
+ for (var s = i > 1 ? void 0 : i ? JA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
36051
36107
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
36052
- return i && s && KA(t, e, s), s;
36108
+ return i && s && ZA(t, e, s), s;
36053
36109
  }, Wp;
36054
36110
  const sx = (Wp = class extends I {
36055
36111
  constructor() {
@@ -36085,7 +36141,7 @@ const sx = (Wp = class extends I {
36085
36141
  }, r(Wp, "_invertForward", new W().setFromAxisAngle(new v(0, 1, 0), Math.PI)), Wp);
36086
36142
  let Wr = sx;
36087
36143
  ff([
36088
- f(D)
36144
+ f(L)
36089
36145
  ], Wr.prototype, "target", 2);
36090
36146
  ff([
36091
36147
  f()
@@ -36096,13 +36152,13 @@ ff([
36096
36152
  ff([
36097
36153
  f()
36098
36154
  ], Wr.prototype, "positionAxes", 2);
36099
- var JA = Object.defineProperty, eE = Object.getOwnPropertyDescriptor, Ch = (n, t, e, i) => {
36100
- for (var s = i > 1 ? void 0 : i ? eE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
36155
+ var eE = Object.defineProperty, tE = Object.getOwnPropertyDescriptor, Ch = (n, t, e, i) => {
36156
+ for (var s = i > 1 ? void 0 : i ? tE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
36101
36157
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
36102
- return i && s && JA(t, e, s), s;
36158
+ return i && s && eE(t, e, s), s;
36103
36159
  };
36104
36160
  const bc = x("debugspatialtrigger"), zb = new bo(), Ub = new bo();
36105
- function tE(n, t) {
36161
+ function iE(n, t) {
36106
36162
  return zb.mask = n, Ub.mask = t, zb.test(Ub);
36107
36163
  }
36108
36164
  class Rn extends I {
@@ -36132,7 +36188,7 @@ class Rn extends I {
36132
36188
  update() {
36133
36189
  this.currentIntersected.length = 0;
36134
36190
  for (const e of pf.triggers)
36135
- tE(e.triggerMask, this.triggerMask) && e.test(this.gameObject) && this.currentIntersected.push(e);
36191
+ iE(e.triggerMask, this.triggerMask) && e.test(this.gameObject) && this.currentIntersected.push(e);
36136
36192
  for (let e = this.lastIntersected.length - 1; e >= 0; e--) {
36137
36193
  const i = this.lastIntersected[e];
36138
36194
  this.currentIntersected.indexOf(i) < 0 && (this.onExitTrigger(i), this.lastIntersected.splice(e, 1));
@@ -36247,10 +36303,10 @@ let pf = Ed;
36247
36303
  Ch([
36248
36304
  f()
36249
36305
  ], pf.prototype, "triggerMask", 2);
36250
- var iE = Object.defineProperty, sE = Object.getOwnPropertyDescriptor, nE = (n, t, e, i) => {
36251
- for (var s = i > 1 ? void 0 : i ? sE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
36306
+ var sE = Object.defineProperty, nE = Object.getOwnPropertyDescriptor, oE = (n, t, e, i) => {
36307
+ for (var s = i > 1 ? void 0 : i ? nE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
36252
36308
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
36253
- return i && s && iE(t, e, s), s;
36309
+ return i && s && sE(t, e, s), s;
36254
36310
  };
36255
36311
  const Si = x("debugspectator");
36256
36312
  class m_ extends I {
@@ -36344,11 +36400,11 @@ class m_ extends I {
36344
36400
  return this.isSpectating && ((e = this.target) == null ? void 0 : e.currentObject) === ((i = this.context.players.getPlayerView(this.localId)) == null ? void 0 : i.currentObject);
36345
36401
  }
36346
36402
  awake() {
36347
- if (this._debug = new aE(this.context, this), this._networking = new hE(this.context, this), this._networking.awake(), S.setActive(this.gameObject, !1), this.cam = S.getComponent(this.gameObject, Pe), !this.cam) {
36403
+ if (this._debug = new lE(this.context, this), this._networking = new dE(this.context, this), this._networking.awake(), S.setActive(this.gameObject, !1), this.cam = S.getComponent(this.gameObject, Pe), !this.cam) {
36348
36404
  console.warn("SpectatorCamera: Spectator camera needs camera component on the same object.", this);
36349
36405
  return;
36350
36406
  }
36351
- !this._handler && this.cam && (this._handler = new oE(this.context, this.cam, this)), this.orbit = S.getComponent(this.context.mainCamera, be);
36407
+ !this._handler && this.cam && (this._handler = new rE(this.context, this.cam, this)), this.orbit = S.getComponent(this.context.mainCamera, be);
36352
36408
  }
36353
36409
  onDestroy() {
36354
36410
  var e, i;
@@ -36456,10 +36512,10 @@ class m_ extends I {
36456
36512
  }
36457
36513
  }
36458
36514
  }
36459
- nE([
36515
+ oE([
36460
36516
  f()
36461
36517
  ], m_.prototype, "useKeys", 2);
36462
- class oE {
36518
+ class rE {
36463
36519
  constructor(t, e, i) {
36464
36520
  r(this, "context");
36465
36521
  r(this, "cam");
@@ -36484,7 +36540,7 @@ class oE {
36484
36540
  this.spectator.stopSpectating();
36485
36541
  return;
36486
36542
  }
36487
- e !== this.currentObject && (this.currentObject = e, this.view = t, this.follow || (this.follow = S.addComponent(this.cam.gameObject, Wr)), this.target || (this.target = new D()), e.add(this.target), this.follow.enabled = !0, this.follow.target = this.target, Si && console.log("FOLLOW", e), this.context.isInXR ? this.context.removeCamera(this.cam) : this.context.setCurrentCamera(this.cam));
36543
+ e !== this.currentObject && (this.currentObject = e, this.view = t, this.follow || (this.follow = S.addComponent(this.cam.gameObject, Wr)), this.target || (this.target = new L()), e.add(this.target), this.follow.enabled = !0, this.follow.target = this.target, Si && console.log("FOLLOW", e), this.context.isInXR ? this.context.removeCamera(this.cam) : this.context.setCurrentCamera(this.cam));
36488
36544
  }
36489
36545
  /** Disables the spectator following behavior */
36490
36546
  disable() {
@@ -36521,12 +36577,12 @@ class oE {
36521
36577
  this.follow.followFactor = 3, this.follow.rotateFactor = 2, i.position.set(0, 0.5, 1.5);
36522
36578
  break;
36523
36579
  }
36524
- this.follow.flipForward = !1, ((h = this.view) == null ? void 0 : h.viewDevice) !== dr.Browser ? i.quaternion.copy(rE) : i.quaternion.identity();
36580
+ this.follow.flipForward = !1, ((h = this.view) == null ? void 0 : h.viewDevice) !== dr.Browser ? i.quaternion.copy(aE) : i.quaternion.identity();
36525
36581
  }
36526
36582
  }
36527
36583
  }
36528
- const rE = new W().setFromAxisAngle(new v(0, 1, 0), Math.PI);
36529
- class aE {
36584
+ const aE = new W().setFromAxisAngle(new v(0, 1, 0), Math.PI);
36585
+ class lE {
36530
36586
  constructor(t, e) {
36531
36587
  r(this, "context");
36532
36588
  r(this, "spectator");
@@ -36563,7 +36619,7 @@ class aE {
36563
36619
  }
36564
36620
  }
36565
36621
  }
36566
- class lE {
36622
+ class cE {
36567
36623
  constructor(t, e, i) {
36568
36624
  /** The user ID that is following */
36569
36625
  r(this, "guid");
@@ -36575,14 +36631,14 @@ class lE {
36575
36631
  this.guid = t, this.targetUserId = e, this.stoppedFollowing = i;
36576
36632
  }
36577
36633
  }
36578
- class cE {
36634
+ class hE {
36579
36635
  constructor(t, e) {
36580
36636
  r(this, "guid");
36581
36637
  r(this, "userId");
36582
36638
  this.guid = t.guid, this.userId = e;
36583
36639
  }
36584
36640
  }
36585
- class hE {
36641
+ class dE {
36586
36642
  constructor(t, e) {
36587
36643
  /** List of user IDs currently following this player */
36588
36644
  r(this, "followers", []);
@@ -36616,7 +36672,7 @@ class hE {
36616
36672
  */
36617
36673
  onSpectatedObjectChanged(t, e) {
36618
36674
  if (Si && console.log(this.context.connection.connectionId, "onSpectatedObjectChanged", t, e), this.context.connection.connectionId) {
36619
- const i = (t == null ? void 0 : t.userId) === void 0, s = i ? e : t == null ? void 0 : t.userId, o = new lE(this.context.connection.connectionId, s, i);
36675
+ const i = (t == null ? void 0 : t.userId) === void 0, s = i ? e : t == null ? void 0 : t.userId, o = new cE(this.context.connection.connectionId, s, i);
36620
36676
  this.context.connection.send("spectator-follower-changed", o);
36621
36677
  }
36622
36678
  }
@@ -36627,7 +36683,7 @@ class hE {
36627
36683
  onRequestFollowMe(t = !1) {
36628
36684
  if (Si && console.log("Request follow", this.context.connection.connectionId), this.context.connection.connectionId) {
36629
36685
  this.spectator.stopSpectating();
36630
- const e = t ? void 0 : this.context.connection.connectionId, i = new cE(this.spectator, e);
36686
+ const e = t ? void 0 : this.context.connection.connectionId, i = new hE(this.spectator, e);
36631
36687
  this.context.connection.send("spectator-request-follow", i);
36632
36688
  }
36633
36689
  }
@@ -36749,15 +36805,15 @@ class Ls {
36749
36805
  t.finish(e, void 0, !0);
36750
36806
  }
36751
36807
  }
36752
- var dE = Object.defineProperty, uE = Object.getOwnPropertyDescriptor, fE = (n, t, e, i) => {
36753
- for (var s = i > 1 ? void 0 : i ? uE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
36808
+ var uE = Object.defineProperty, fE = Object.getOwnPropertyDescriptor, pE = (n, t, e, i) => {
36809
+ for (var s = i > 1 ? void 0 : i ? fE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
36754
36810
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
36755
- return i && s && dE(t, e, s), s;
36811
+ return i && s && uE(t, e, s), s;
36756
36812
  };
36757
36813
  const ru = "SCAM";
36758
36814
  Q0(ru, Ls.getRootAsSyncedCameraModel);
36759
36815
  const gi = new fg();
36760
- class pE {
36816
+ class mE {
36761
36817
  // dontSave: boolean = true;
36762
36818
  // pos: { x: number, y: number, z: number } = { x: 0, y: 0, z: 0 };
36763
36819
  // rot: { x: number, y: number, z: number } = { x: 0, y: 0, z: 0 };
@@ -36827,7 +36883,7 @@ const Km = (Hp = class extends I {
36827
36883
  }
36828
36884
  if (!this.context.connection.isConnected || this.context.connection.connectionId === null)
36829
36885
  return;
36830
- this._model === null && (this._model = new pE(this.context.connection.connectionId, this.context.connection.connectionId + "_camera"));
36886
+ this._model === null && (this._model = new mE(this.context.connection.connectionId, this.context.connection.connectionId + "_camera"));
36831
36887
  const e = ie(t), i = Ce(t);
36832
36888
  (e.distanceTo(this._lastWorldPosition) > 1e-3 || i.angleTo(this._lastWorldQuaternion) > 0.01) && (this._needsUpdate = !0), this._lastWorldPosition.copy(e), this._lastWorldQuaternion.copy(i), !((!this._needsUpdate || this.context.time.frameCount % 2 !== 0) && !(this.context.time.realtimeSinceStartup - this._lastUpdateTime > this._camTimeoutInSeconds * 0.5)) && (this._lastUpdateTime = this.context.time.realtimeSinceStartup, this._needsUpdate = !1, this._model.send(t, this.context.connection), this.context.isInXR || this.context.players.setPlayerView(this.context.connection.connectionId, t, dr.Browser));
36833
36889
  }
@@ -36858,13 +36914,13 @@ const Km = (Hp = class extends I {
36858
36914
  }
36859
36915
  }, r(Hp, "instances", []), Hp);
36860
36916
  let g_ = Km;
36861
- fE([
36862
- f([D, re])
36917
+ pE([
36918
+ f([L, re])
36863
36919
  ], g_.prototype, "cameraPrefab", 2);
36864
- var mE = Object.defineProperty, gE = Object.getOwnPropertyDescriptor, Io = (n, t, e, i) => {
36865
- for (var s = i > 1 ? void 0 : i ? gE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
36920
+ var gE = Object.defineProperty, _E = Object.getOwnPropertyDescriptor, Io = (n, t, e, i) => {
36921
+ for (var s = i > 1 ? void 0 : i ? _E(t, e) : t, o = n.length - 1, a; o >= 0; o--)
36866
36922
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
36867
- return i && s && mE(t, e, s), s;
36923
+ return i && s && gE(t, e, s), s;
36868
36924
  };
36869
36925
  const Tp = "view", Ap = x("debugsyncedroom");
36870
36926
  class tn extends I {
@@ -36957,7 +37013,7 @@ class tn extends I {
36957
37013
  const o = x(this.urlParameterName);
36958
37014
  if (o && (typeof o == "string" || typeof o == "number")) {
36959
37015
  i = !0;
36960
- const a = DS(o.toString());
37016
+ const a = D1(o.toString());
36961
37017
  this.roomName = a;
36962
37018
  } else if (this.joinRandomRoom && (console.log("No room name found in url, generating random one"), this.setRandomRoomUrlParameter(), e < 1))
36963
37019
  return this.tryJoinRoom(e + 1);
@@ -37045,11 +37101,11 @@ Io([
37045
37101
  Io([
37046
37102
  f()
37047
37103
  ], tn.prototype, "roomPrefix", 1);
37048
- function _E() {
37104
+ function yE() {
37049
37105
  const n = x("testwindowcount") || 0;
37050
- n && n > 0 && yE(n);
37106
+ n && n > 0 && bE(n);
37051
37107
  }
37052
- function yE(n) {
37108
+ function bE(n) {
37053
37109
  if (x("testwindow"))
37054
37110
  return null;
37055
37111
  const t = new URL(window.location.href);
@@ -37084,7 +37140,7 @@ function yE(n) {
37084
37140
  }
37085
37141
  class nx extends I {
37086
37142
  awake() {
37087
- _E();
37143
+ yE();
37088
37144
  }
37089
37145
  }
37090
37146
  class ox extends I {
@@ -37151,12 +37207,12 @@ class rx {
37151
37207
  }
37152
37208
  }
37153
37209
  r(rx, "temp", new v());
37154
- var bE = Object.defineProperty, vE = Object.getOwnPropertyDescriptor, mf = (n, t, e, i) => {
37155
- for (var s = i > 1 ? void 0 : i ? vE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
37210
+ var vE = Object.defineProperty, wE = Object.getOwnPropertyDescriptor, mf = (n, t, e, i) => {
37211
+ for (var s = i > 1 ? void 0 : i ? wE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
37156
37212
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
37157
- return i && s && bE(t, e, s), s;
37213
+ return i && s && vE(t, e, s), s;
37158
37214
  };
37159
- const wE = x("debugsignals");
37215
+ const xE = x("debugsignals");
37160
37216
  class __ {
37161
37217
  constructor() {
37162
37218
  r(this, "guid");
@@ -37194,7 +37250,7 @@ const dn = (Gp = class extends I {
37194
37250
  }
37195
37251
  /** @internal */
37196
37252
  awake() {
37197
- wE && console.log("SignalReceiver awake", this);
37253
+ xE && console.log("SignalReceiver awake", this);
37198
37254
  }
37199
37255
  /** @internal */
37200
37256
  onEnable() {
@@ -37299,7 +37355,7 @@ class _f {
37299
37355
  return 0;
37300
37356
  }
37301
37357
  }
37302
- class xE {
37358
+ class SE {
37303
37359
  constructor(t) {
37304
37360
  r(this, "clip");
37305
37361
  r(this, "rootPositionOffset");
@@ -37392,13 +37448,13 @@ class y_ extends _f {
37392
37448
  if (!h) {
37393
37449
  const w = i.tracks[0].name.substring(0, g) + ".quaternion";
37394
37450
  Us && console.warn("Create quaternion track", y, b);
37395
- const P = b.quaternion, k = new $1(w, [0, i.duration], [P.x, P.y, P.z, P.w, P.x, P.y, P.z, P.w]);
37451
+ const P = b.quaternion, k = new $S(w, [0, i.duration], [P.x, P.y, P.z, P.w, P.x, P.y, P.z, P.w]);
37396
37452
  i.tracks.push(k), this.createRotationInterpolant(i, e, k);
37397
37453
  }
37398
37454
  } else {
37399
37455
  const w = _ + ".position";
37400
37456
  Us && console.warn("Create position track", y, b);
37401
- const P = b.position, k = new N1(w, [0, i.duration], [P.x, P.y, P.z, P.x, P.y, P.z]);
37457
+ const P = b.position, k = new NS(w, [0, i.duration], [P.x, P.y, P.z, P.x, P.y, P.z]);
37402
37458
  i.tracks.push(k), this.createPositionInterpolant(i, e, k);
37403
37459
  }
37404
37460
  }
@@ -37407,7 +37463,7 @@ class y_ extends _f {
37407
37463
  if (!this._didBind) {
37408
37464
  this._didBind = !0, Us && console.log(this.models), this.mixer ? this.target = this.mixer.getRoot() : console.warn("No mixer was assigned to animation track");
37409
37465
  for (const e of this.actions) {
37410
- const i = new xE(e);
37466
+ const i = new SE(e);
37411
37467
  this._actionOffsets.push(i);
37412
37468
  }
37413
37469
  this.target && (this._animator = S.getComponent(this.target, Ft) ?? null, this._animator && eb(this._animator.gameObject, this, !0));
@@ -37472,8 +37528,8 @@ class y_ extends _f {
37472
37528
  break;
37473
37529
  }
37474
37530
  y.reversed === !0 ? b.time = b.getClip().duration - U : b.time = U, b.timeScale = 0;
37475
- const L = Math.max(0, A);
37476
- if (b.weight = L, l += L, b.clampWhenFinished = !1, b.isRunning() || b.play(), this._useclipOffsets) {
37531
+ const j = Math.max(0, A);
37532
+ if (b.weight = j, l += j, b.clampWhenFinished = !1, b.isRunning() || b.play(), this._useclipOffsets) {
37477
37533
  const H = i == 0 ? this._totalOffsetPosition : this._totalOffsetPosition2, Y = i == 0 ? this._totalOffsetRotation : this._totalOffsetRotation2;
37478
37534
  i < 1 && (s = 1 - A), i += 1;
37479
37535
  const te = this._summedPos.set(0, 0, 0), ae = this._tempPos.set(0, 0, 0), de = this._summedRot.identity(), De = this._tempRot.identity(), Ct = w.rotation;
@@ -37528,7 +37584,7 @@ class y_ extends _f {
37528
37584
  };
37529
37585
  }
37530
37586
  }
37531
- const SE = x("mutetimeline"), wa = class extends _f {
37587
+ const CE = x("mutetimeline"), wa = class extends _f {
37532
37588
  constructor() {
37533
37589
  super(...arguments);
37534
37590
  r(this, "models", []);
@@ -37551,7 +37607,7 @@ const SE = x("mutetimeline"), wa = class extends _f {
37551
37607
  }
37552
37608
  }
37553
37609
  addModel(e) {
37554
- const i = new W1(this.listener);
37610
+ const i = new WS(this.listener);
37555
37611
  this.audio.push(i);
37556
37612
  const s = e;
37557
37613
  s._didTriggerPlay = !1, this.models.push(s);
@@ -37590,7 +37646,7 @@ const SE = x("mutetimeline"), wa = class extends _f {
37590
37646
  this._playableDirectorResumed = this.director.isPlaying;
37591
37647
  }
37592
37648
  evaluate(e) {
37593
- if (SE || this.track.muted || this.director.speed < 0)
37649
+ if (CE || this.track.muted || this.director.speed < 0)
37594
37650
  return;
37595
37651
  const i = this.director.context.application.muted, s = this._playableDirectorResumed;
37596
37652
  this._playableDirectorResumed = !1;
@@ -37749,10 +37805,10 @@ class b_ extends _f {
37749
37805
  }
37750
37806
  }
37751
37807
  }
37752
- var CE = Object.defineProperty, PE = Object.getOwnPropertyDescriptor, lx = (n, t, e, i) => {
37753
- for (var s = i > 1 ? void 0 : i ? PE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
37808
+ var PE = Object.defineProperty, OE = Object.getOwnPropertyDescriptor, lx = (n, t, e, i) => {
37809
+ for (var s = i > 1 ? void 0 : i ? OE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
37754
37810
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
37755
- return i && s && CE(t, e, s), s;
37811
+ return i && s && PE(t, e, s), s;
37756
37812
  };
37757
37813
  const an = x("debugtimeline");
37758
37814
  var qp;
@@ -38089,7 +38145,7 @@ const Zm = (qp = class extends I {
38089
38145
  }
38090
38146
  for (let c = o.outputs.length - 1; c >= 0; c--) {
38091
38147
  let h = o.outputs[c];
38092
- if (h instanceof D) {
38148
+ if (h instanceof L) {
38093
38149
  const u = S.getOrAddComponent(h, Ft);
38094
38150
  u && (h = u);
38095
38151
  }
@@ -38176,10 +38232,10 @@ lx([
38176
38232
  lx([
38177
38233
  f()
38178
38234
  ], Rr.prototype, "extrapolationMode", 2);
38179
- var OE = Object.defineProperty, ME = Object.getOwnPropertyDescriptor, yf = (n, t, e, i) => {
38180
- for (var s = i > 1 ? void 0 : i ? ME(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38235
+ var ME = Object.defineProperty, RE = Object.getOwnPropertyDescriptor, yf = (n, t, e, i) => {
38236
+ for (var s = i > 1 ? void 0 : i ? RE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38181
38237
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
38182
- return i && s && OE(t, e, s), s;
38238
+ return i && s && ME(t, e, s), s;
38183
38239
  };
38184
38240
  class yl extends I {
38185
38241
  constructor() {
@@ -38278,7 +38334,7 @@ class yl extends I {
38278
38334
  /** @internal */
38279
38335
  onEnable() {
38280
38336
  var e;
38281
- if (!(this.isGizmo && !Qc) && this.context.mainCamera && (this._control || (this._control = new dS(this.context.mainCamera, this.context.renderer.domElement), this._control.enabled = !0, this._control.getRaycaster().layers.set(2), this._control.size = 1, ("_root" in this._control ? this._control._root : this._control).traverse((s) => {
38337
+ if (!(this.isGizmo && !Qc) && this.context.mainCamera && (this._control || (this._control = new d1(this.context.mainCamera, this.context.renderer.domElement), this._control.enabled = !0, this._control.getRaycaster().layers.set(2), this._control.size = 1, ("_root" in this._control ? this._control._root : this._control).traverse((s) => {
38282
38338
  const o = s;
38283
38339
  if (o.layers.set(2), o) {
38284
38340
  const a = o.material;
@@ -38321,10 +38377,10 @@ yf([
38321
38377
  yf([
38322
38378
  f()
38323
38379
  ], yl.prototype, "scaleSnap", 2);
38324
- var RE = Object.defineProperty, kE = Object.getOwnPropertyDescriptor, bf = (n, t, e, i) => {
38325
- for (var s = i > 1 ? void 0 : i ? kE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38380
+ var kE = Object.defineProperty, TE = Object.getOwnPropertyDescriptor, bf = (n, t, e, i) => {
38381
+ for (var s = i > 1 ? void 0 : i ? TE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38326
38382
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
38327
- return i && s && RE(t, e, s), s;
38383
+ return i && s && kE(t, e, s), s;
38328
38384
  };
38329
38385
  class v_ {
38330
38386
  constructor() {
@@ -38398,10 +38454,10 @@ class w_ extends sf {
38398
38454
  bf([
38399
38455
  f(Fe)
38400
38456
  ], w_.prototype, "mainTexture", 1);
38401
- var TE = Object.defineProperty, AE = Object.getOwnPropertyDescriptor, Fi = (n, t, e, i) => {
38402
- for (var s = i > 1 ? void 0 : i ? AE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38457
+ var AE = Object.defineProperty, EE = Object.getOwnPropertyDescriptor, Fi = (n, t, e, i) => {
38458
+ for (var s = i > 1 ? void 0 : i ? EE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38403
38459
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
38404
- return i && s && TE(t, e, s), s;
38460
+ return i && s && AE(t, e, s), s;
38405
38461
  };
38406
38462
  const Vo = x("debugbutton");
38407
38463
  class Do {
@@ -38436,7 +38492,7 @@ Fi([
38436
38492
  Fi([
38437
38493
  f(we)
38438
38494
  ], Do.prototype, "selectedColor", 2);
38439
- class EE {
38495
+ class IE {
38440
38496
  constructor() {
38441
38497
  r(this, "disabledTrigger");
38442
38498
  r(this, "highlightedTrigger");
@@ -38577,7 +38633,7 @@ Fi([
38577
38633
  f()
38578
38634
  ], Lo.prototype, "transition", 2);
38579
38635
  Fi([
38580
- f(EE)
38636
+ f(IE)
38581
38637
  ], Lo.prototype, "animationTriggers", 2);
38582
38638
  Fi([
38583
38639
  f(Ft)
@@ -38585,10 +38641,10 @@ Fi([
38585
38641
  Fi([
38586
38642
  f()
38587
38643
  ], Lo.prototype, "interactable", 1);
38588
- var IE = Object.defineProperty, DE = Object.getOwnPropertyDescriptor, vf = (n, t, e, i) => {
38589
- for (var s = i > 1 ? void 0 : i ? DE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38644
+ var DE = Object.defineProperty, LE = Object.getOwnPropertyDescriptor, vf = (n, t, e, i) => {
38645
+ for (var s = i > 1 ? void 0 : i ? LE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38590
38646
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
38591
- return i && s && IE(t, e, s), s;
38647
+ return i && s && DE(t, e, s), s;
38592
38648
  };
38593
38649
  const Xn = x("debuginputfield");
38594
38650
  var sa;
@@ -38751,10 +38807,10 @@ vf([
38751
38807
  vf([
38752
38808
  f(xe)
38753
38809
  ], bl.prototype, "onEndEdit", 2);
38754
- var LE = Object.defineProperty, jE = Object.getOwnPropertyDescriptor, cx = (n, t, e, i) => {
38755
- for (var s = i > 1 ? void 0 : i ? jE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38810
+ var jE = Object.defineProperty, BE = Object.getOwnPropertyDescriptor, cx = (n, t, e, i) => {
38811
+ for (var s = i > 1 ? void 0 : i ? BE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38756
38812
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
38757
- return i && s && LE(t, e, s), s;
38813
+ return i && s && jE(t, e, s), s;
38758
38814
  };
38759
38815
  class wf extends I {
38760
38816
  constructor() {
@@ -38776,9 +38832,9 @@ class wf extends I {
38776
38832
  return;
38777
38833
  }
38778
38834
  e.style.display = "block", e.style.visibility = "hidden";
38779
- const i = new uS();
38835
+ const i = new u1();
38780
38836
  i.listenToPointerEvents(this.context.renderer, this.context.mainCamera), this.gameObject.add(i);
38781
- const s = new fS(e);
38837
+ const s = new f1(e);
38782
38838
  i.add(s), s.visible = !1;
38783
38839
  const o = s.material;
38784
38840
  o.transparent = !0, setTimeout(() => {
@@ -38808,10 +38864,10 @@ cx([
38808
38864
  cx([
38809
38865
  f()
38810
38866
  ], wf.prototype, "keepAspect", 2);
38811
- var BE = Object.defineProperty, FE = Object.getOwnPropertyDescriptor, xf = (n, t, e, i) => {
38812
- for (var s = i > 1 ? void 0 : i ? FE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38867
+ var FE = Object.defineProperty, zE = Object.getOwnPropertyDescriptor, xf = (n, t, e, i) => {
38868
+ for (var s = i > 1 ? void 0 : i ? zE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38813
38869
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
38814
- return i && s && BE(t, e, s), s;
38870
+ return i && s && FE(t, e, s), s;
38815
38871
  }, Xp;
38816
38872
  const hx = (Xp = class extends I {
38817
38873
  constructor() {
@@ -38855,7 +38911,7 @@ const hx = (Xp = class extends I {
38855
38911
  }, r(Xp, "flipYQuat", new W().setFromAxisAngle(new v(0, 1, 0), Math.PI)), Xp);
38856
38912
  let vl = hx;
38857
38913
  xf([
38858
- f(D)
38914
+ f(L)
38859
38915
  ], vl.prototype, "target", 2);
38860
38916
  xf([
38861
38917
  f()
@@ -38866,10 +38922,10 @@ xf([
38866
38922
  xf([
38867
38923
  f()
38868
38924
  ], vl.prototype, "copyTargetRotation", 2);
38869
- var zE = Object.defineProperty, UE = Object.getOwnPropertyDescriptor, x_ = (n, t, e, i) => {
38870
- for (var s = i > 1 ? void 0 : i ? UE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38925
+ var UE = Object.defineProperty, NE = Object.getOwnPropertyDescriptor, x_ = (n, t, e, i) => {
38926
+ for (var s = i > 1 ? void 0 : i ? NE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38871
38927
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
38872
- return i && s && zE(t, e, s), s;
38928
+ return i && s && UE(t, e, s), s;
38873
38929
  };
38874
38930
  class Mh extends I {
38875
38931
  constructor() {
@@ -38930,10 +38986,10 @@ x_([
38930
38986
  x_([
38931
38987
  f()
38932
38988
  ], Mh.prototype, "clickable", 2);
38933
- var NE = Object.defineProperty, $E = Object.getOwnPropertyDescriptor, wl = (n, t, e, i) => {
38934
- for (var s = i > 1 ? void 0 : i ? $E(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38989
+ var $E = Object.defineProperty, WE = Object.getOwnPropertyDescriptor, wl = (n, t, e, i) => {
38990
+ for (var s = i > 1 ? void 0 : i ? WE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
38935
38991
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
38936
- return i && s && NE(t, e, s), s;
38992
+ return i && s && $E(t, e, s), s;
38937
38993
  };
38938
38994
  class jo extends I {
38939
38995
  constructor() {
@@ -39017,7 +39073,7 @@ NeedleXRSession.onSessionRequestStart(evt => {
39017
39073
  if (a || (a = new XRWebGLBinding(e.session, n.getContext())), a) {
39018
39074
  let l = null;
39019
39075
  if ("getCameraImage" in a) {
39020
- WE(n, t);
39076
+ VE(n, t);
39021
39077
  const c = n.properties.get(t);
39022
39078
  if (c)
39023
39079
  return l = a.getCameraImage(o.camera), c.__webglTexture = l, !0;
@@ -39032,7 +39088,7 @@ NeedleXRSession.onSessionRequestStart(evt => {
39032
39088
  return !1;
39033
39089
  }
39034
39090
  const Nb = /* @__PURE__ */ new WeakMap();
39035
- function WE(n, t) {
39091
+ function VE(n, t) {
39036
39092
  const e = Nb.get(t) || /* @__PURE__ */ new WeakSet();
39037
39093
  if (e.has(n))
39038
39094
  return;
@@ -39042,7 +39098,7 @@ function WE(n, t) {
39042
39098
  const a = new ye();
39043
39099
  i.map = t, n.render(o, a);
39044
39100
  }
39045
- function JD(n, t, e, i = "image/webp", s) {
39101
+ function eL(n, t, e, i = "image/webp", s) {
39046
39102
  return ux({ context: n, width: t, height: e, mimeType: i, camera: s });
39047
39103
  }
39048
39104
  function ux(n) {
@@ -39072,9 +39128,9 @@ function ux(n) {
39072
39128
  try {
39073
39129
  const E = n.render_events !== !1, B = new Array();
39074
39130
  E && (Yc(i.scene, Je, B), B.forEach((T) => {
39075
- var L;
39131
+ var j;
39076
39132
  if (T == null || T.onBeforeRender(), T.isInstancingActive && T.instances)
39077
- for (let H = 0; H < ((L = T.instances) == null ? void 0 : L.length); H++) {
39133
+ for (let H = 0; H < ((j = T.instances) == null ? void 0 : j.length); H++) {
39078
39134
  const Y = T.instances[H];
39079
39135
  bn(Y.object, !0);
39080
39136
  }
@@ -39107,20 +39163,20 @@ function ux(n) {
39107
39163
  break;
39108
39164
  }
39109
39165
  if (t && n.trim === !0) {
39110
- const T = VE(U);
39166
+ const T = HE(U);
39111
39167
  T && (U = T);
39112
39168
  }
39113
39169
  if ("type" in n) {
39114
39170
  if (n.type === "texture")
39115
39171
  return F ? (n.target && (n.target.image = F == null ? void 0 : F.texture.image, n.target.needsUpdate = !0), F.texture.offset.set(0, -1), F.texture.needsUpdate = !0, F.texture) : (console.error("No target texture found"), null);
39116
39172
  if (n.type === "blob")
39117
- return new Promise((L, H) => {
39173
+ return new Promise((j, H) => {
39118
39174
  U.toBlob((Y) => {
39119
- L(Y);
39175
+ j(Y);
39120
39176
  }, e);
39121
39177
  });
39122
39178
  if (n.type === "share")
39123
- return new Promise((L, H) => {
39179
+ return new Promise((j, H) => {
39124
39180
  U.toBlob((Y) => {
39125
39181
  if (Y && "share" in navigator) {
39126
39182
  let te = "file_type" in n && n.file_type || e;
@@ -39134,7 +39190,7 @@ function ux(n) {
39134
39190
  }).catch((De) => {
39135
39191
  console.warn("User cancelled share", De.message);
39136
39192
  }).finally(() => {
39137
- L({ blob: Y, shared: !0 });
39193
+ j({ blob: Y, shared: !0 });
39138
39194
  });
39139
39195
  }
39140
39196
  return {
@@ -39148,11 +39204,11 @@ function ux(n) {
39148
39204
  if ("download_filename" in n && n.download_filename) {
39149
39205
  let T = n.download_filename;
39150
39206
  if (q.isMobileDevice() && typeof window < "u") {
39151
- const L = T + "_screenshots", H = T.split("."), Y = (M = H.pop()) == null ? void 0 : M.toLowerCase();
39207
+ const j = T + "_screenshots", H = T.split("."), Y = (M = H.pop()) == null ? void 0 : M.toLowerCase();
39152
39208
  let te = 0;
39153
- localStorage.getItem(L) && (te = parseInt(sessionStorage.getItem(L) || "0")), te > 0 && (T = `${H.join()}-${te}.${Y}`), te += 1, sessionStorage.setItem(L, te.toString());
39209
+ localStorage.getItem(j) && (te = parseInt(sessionStorage.getItem(j) || "0")), te > 0 && (T = `${H.join()}-${te}.${Y}`), te += 1, sessionStorage.setItem(j, te.toString());
39154
39210
  }
39155
- HE(Z, T);
39211
+ GE(Z, T);
39156
39212
  }
39157
39213
  return Z;
39158
39214
  } finally {
@@ -39160,7 +39216,7 @@ function ux(n) {
39160
39216
  }
39161
39217
  return null;
39162
39218
  }
39163
- function VE(n) {
39219
+ function HE(n) {
39164
39220
  if (!("document" in globalThis))
39165
39221
  return null;
39166
39222
  const t = document.createElement("canvas");
@@ -39180,7 +39236,7 @@ function VE(n) {
39180
39236
  return g ? (m.width = u, m.height = p, g.drawImage(t, c, l, u, p, 0, 0, u, p), m) : null;
39181
39237
  }
39182
39238
  let jl = null;
39183
- function HE(n, t) {
39239
+ function GE(n, t) {
39184
39240
  if (n) {
39185
39241
  if (!n.startsWith("data:image")) {
39186
39242
  console.error("Can not save image: Data url is not an image", n);
@@ -39250,10 +39306,10 @@ void main() {
39250
39306
  }
39251
39307
  n.makeFullscreenPlane = c;
39252
39308
  })(lu || (lu = {}));
39253
- var GE = Object.defineProperty, qE = Object.getOwnPropertyDescriptor, XE = (n, t, e, i) => {
39254
- for (var s = i > 1 ? void 0 : i ? qE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
39309
+ var qE = Object.defineProperty, XE = Object.getOwnPropertyDescriptor, QE = (n, t, e, i) => {
39310
+ for (var s = i > 1 ? void 0 : i ? XE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
39255
39311
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
39256
- return i && s && GE(t, e, s), s;
39312
+ return i && s && qE(t, e, s), s;
39257
39313
  };
39258
39314
  const $b = x("debugarcamera");
39259
39315
  class Sf extends I {
@@ -39285,7 +39341,7 @@ class Sf extends I {
39285
39341
  tint: { value: new me(s.r, s.g, s.b, s.a) }
39286
39342
  },
39287
39343
  vertexShader: Ld.background.vertexShader,
39288
- fragmentShader: QE,
39344
+ fragmentShader: YE,
39289
39345
  side: Ri,
39290
39346
  depthTest: !1,
39291
39347
  depthWrite: !1,
@@ -39326,10 +39382,10 @@ class Sf extends I {
39326
39382
  this.backgroundPlane && (this.threeTexture = e, this.backgroundPlane.setTexture(this.threeTexture), this.backgroundPlane.visible = !0);
39327
39383
  }
39328
39384
  }
39329
- XE([
39385
+ QE([
39330
39386
  f(we)
39331
39387
  ], Sf.prototype, "backgroundTint", 2);
39332
- const QE = (
39388
+ const YE = (
39333
39389
  /* glsl */
39334
39390
  `
39335
39391
  uniform sampler2D t2D;
@@ -39352,10 +39408,10 @@ void main() {
39352
39408
  }
39353
39409
  `
39354
39410
  );
39355
- var YE = Object.defineProperty, KE = Object.getOwnPropertyDescriptor, Bo = (n, t, e, i) => {
39356
- for (var s = i > 1 ? void 0 : i ? KE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
39411
+ var KE = Object.defineProperty, ZE = Object.getOwnPropertyDescriptor, Bo = (n, t, e, i) => {
39412
+ for (var s = i > 1 ? void 0 : i ? ZE(t, e) : t, o = n.length - 1, a; o >= 0; o--)
39357
39413
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
39358
- return i && s && YE(t, e, s), s;
39414
+ return i && s && KE(t, e, s), s;
39359
39415
  };
39360
39416
  const Wb = x("debugimagetracking"), yu = class {
39361
39417
  constructor(t, e, i, s, o, a) {
@@ -39432,7 +39488,7 @@ Bo([
39432
39488
  Bo([
39433
39489
  f()
39434
39490
  ], Fo.prototype, "hideWhenTrackingIsLost", 2);
39435
- class ZE {
39491
+ class JE {
39436
39492
  constructor(t, e, i) {
39437
39493
  r(this, "filename");
39438
39494
  r(this, "widthInMeters");
@@ -39529,7 +39585,7 @@ const nc = (Qp = class extends I {
39529
39585
  if (o) {
39530
39586
  const l = await (await o.convertToBlob({ type: "image/png" })).arrayBuffer(), c = S.findObjectOfType(Ge);
39531
39587
  c && this.trackedImages && (c.extensions.push(
39532
- new ZE("marker.png", new Uint8Array(l), this.trackedImages[0].widthInMeters)
39588
+ new JE("marker.png", new Uint8Array(l), this.trackedImages[0].widthInMeters)
39533
39589
  ), c.anchoringType = "image");
39534
39590
  }
39535
39591
  });
@@ -39640,10 +39696,10 @@ Bo([
39640
39696
  Bo([
39641
39697
  f()
39642
39698
  ], Qa.prototype, "smooth", 2);
39643
- var JE = Object.defineProperty, eI = Object.getOwnPropertyDescriptor, xl = (n, t, e, i) => {
39644
- for (var s = i > 1 ? void 0 : i ? eI(t, e) : t, o = n.length - 1, a; o >= 0; o--)
39699
+ var eI = Object.defineProperty, tI = Object.getOwnPropertyDescriptor, xl = (n, t, e, i) => {
39700
+ for (var s = i > 1 ? void 0 : i ? tI(t, e) : t, o = n.length - 1, a; o >= 0; o--)
39645
39701
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
39646
- return i && s && JE(t, e, s), s;
39702
+ return i && s && eI(t, e, s), s;
39647
39703
  };
39648
39704
  const Ho = x("debugplanetracking");
39649
39705
  class zo extends I {
@@ -39788,7 +39844,7 @@ class zo extends I {
39788
39844
  } else {
39789
39845
  if (!this.dataTemplate) {
39790
39846
  const m = new X();
39791
- Ho ? m.material = new V1() : this.occluder ? (m.material = new Te(), this.makeOccluder(m, m.material, !0)) : m.material = new Te({ wireframe: !0, opacity: 0.5, transparent: !0, color: 3355443 }), this.dataTemplate = new re("", "", m);
39847
+ Ho ? m.material = new VS() : this.occluder ? (m.material = new Te(), this.makeOccluder(m, m.material, !0)) : m.material = new Te({ wireframe: !0, opacity: 0.5, transparent: !0, color: 3355443 }), this.dataTemplate = new re("", "", m);
39792
39848
  }
39793
39849
  if (!this.dataTemplate.asset)
39794
39850
  this.dataTemplate.loadAssetAsync();
@@ -39831,7 +39887,7 @@ class zo extends I {
39831
39887
  if (m.userData.normalsHelper)
39832
39888
  m.userData.normalsHelper.update();
39833
39889
  else {
39834
- const g = new pS(m, 0.05, 255);
39890
+ const g = new p1(m, 0.05, 255);
39835
39891
  g.layers.disableAll(), g.layers.set(2), this.context.scene.add(g), m.userData.normalsHelper = g;
39836
39892
  }
39837
39893
  }));
@@ -39901,10 +39957,10 @@ xl([
39901
39957
  xl([
39902
39958
  f()
39903
39959
  ], zo.prototype, "runInVR", 2);
39904
- var tI = Object.defineProperty, iI = Object.getOwnPropertyDescriptor, sI = (n, t, e, i) => {
39905
- for (var s = i > 1 ? void 0 : i ? iI(t, e) : t, o = n.length - 1, a; o >= 0; o--)
39960
+ var iI = Object.defineProperty, sI = Object.getOwnPropertyDescriptor, nI = (n, t, e, i) => {
39961
+ for (var s = i > 1 ? void 0 : i ? sI(t, e) : t, o = n.length - 1, a; o >= 0; o--)
39906
39962
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
39907
- return i && s && tI(t, e, s), s;
39963
+ return i && s && iI(t, e, s), s;
39908
39964
  };
39909
39965
  const Vb = x("debugwebxr");
39910
39966
  class S_ extends I {
@@ -39933,7 +39989,7 @@ class S_ extends I {
39933
39989
  /** @internal */
39934
39990
  awake() {
39935
39991
  if (Vb) {
39936
- const e = new D();
39992
+ const e = new L();
39937
39993
  e.position.y += 0.5, this.gameObject.add(e);
39938
39994
  const i = e.addNewComponent(hl);
39939
39995
  i && (i.isGizmo = !1);
@@ -39956,10 +40012,10 @@ class S_ extends I {
39956
40012
  e.xr.removeRig(this), this._startScale && this.gameObject && this.gameObject.scale.copy(this._startScale);
39957
40013
  }
39958
40014
  }
39959
- sI([
40015
+ nI([
39960
40016
  f()
39961
40017
  ], S_.prototype, "priority", 2);
39962
- class nI extends I {
40018
+ class oI extends I {
39963
40019
  constructor() {
39964
40020
  super(...arguments);
39965
40021
  r(this, "toggleKey", "KeyP");
@@ -40114,15 +40170,15 @@ R.add("XRRig", S_);
40114
40170
  R.add("XRFlag", qi);
40115
40171
  R.add("PlayerSync", hh);
40116
40172
  R.add("PlayerState", Zi);
40117
- R.add("PresentationMode", nI);
40118
- const vc = gt, oI = x("debugtypestore");
40119
- oI && console.log(R);
40120
- function rI(n, t) {
40173
+ R.add("PresentationMode", oI);
40174
+ const vc = gt, rI = x("debugtypestore");
40175
+ rI && console.log(R);
40176
+ function aI(n, t) {
40121
40177
  const i = KP(n, t);
40122
40178
  return i !== void 0 ? i : null;
40123
40179
  }
40124
- const aI = new YP(), Ep = Symbol("deserialize-queue");
40125
- async function lI(n, t, e, i = null, s) {
40180
+ const lI = new YP(), Ep = Symbol("deserialize-queue");
40181
+ async function cI(n, t, e, i = null, s) {
40126
40182
  if (!e) {
40127
40183
  console.debug("Can not create component instances: gltf is null");
40128
40184
  return;
@@ -40132,7 +40188,7 @@ async function lI(n, t, e, i = null, s) {
40132
40188
  const a = t.indexOf("?");
40133
40189
  t = a === -1 ? t : t.substring(0, a);
40134
40190
  const l = new pv(e.scene);
40135
- l.gltfId = t, l.context = n, l.gltf = e, l.nodeToObject = s == null ? void 0 : s.nodeToObjectMap, l.implementationInformation = aI;
40191
+ l.gltfId = t, l.context = n, l.gltf = e, l.nodeToObject = s == null ? void 0 : s.nodeToObjectMap, l.implementationInformation = lI;
40136
40192
  let c = n[Ep];
40137
40193
  if (c || (c = n[Ep] = []), e.scenes)
40138
40194
  for (const h of e.scenes)
@@ -40144,7 +40200,7 @@ async function lI(n, t, e, i = null, s) {
40144
40200
  const h = n[Ep];
40145
40201
  if (h) {
40146
40202
  for (const d of h)
40147
- cI(d, l);
40203
+ hI(d, l);
40148
40204
  h.length = 0;
40149
40205
  }
40150
40206
  if (o) {
@@ -40213,12 +40269,12 @@ This could mean you forgot to add a npmdef to your ExportInfo
40213
40269
  for (const d of t.children)
40214
40270
  await tg(n, d, e);
40215
40271
  }
40216
- function cI(n, t) {
40272
+ function hI(n, t) {
40217
40273
  const { instance: e, compData: i, obj: s } = n;
40218
40274
  t.object = s, t.target = e, ym(e, i, t), vc && console.debug("add " + i.name, i, e);
40219
40275
  }
40220
40276
  const cu = x("debugfileformat");
40221
- async function hI(n, t = !0) {
40277
+ async function dI(n, t = !0) {
40222
40278
  var s;
40223
40279
  if (t) {
40224
40280
  const o = n, a = new URL(o, globalThis.location.origin);
@@ -40252,12 +40308,12 @@ async function hI(n, t = !0) {
40252
40308
  }
40253
40309
  }).catch((o) => null);
40254
40310
  if (i != null && i.ok) {
40255
- const o = await i.arrayBuffer(), a = dI(o, i);
40311
+ const o = await i.arrayBuffer(), a = uI(o, i);
40256
40312
  return cu && console.log("Determined file type from header: " + a), a;
40257
40313
  }
40258
40314
  return "unknown";
40259
40315
  }
40260
- function dI(n, t) {
40316
+ function uI(n, t) {
40261
40317
  if (n.byteLength < 4)
40262
40318
  return "unknown";
40263
40319
  const e = new Uint8Array(n);
@@ -40316,21 +40372,21 @@ function dI(n, t) {
40316
40372
  }
40317
40373
  class fx {
40318
40374
  createBuiltinComponents(t, e, i, s, o) {
40319
- return lI(t, e, i, s, o);
40375
+ return cI(t, e, i, s, o);
40320
40376
  }
40321
40377
  writeBuiltinComponentData(t, e) {
40322
- return rI(t, e);
40378
+ return aI(t, e);
40323
40379
  }
40324
40380
  parseSync(t, e, i, s) {
40325
- return pI(t, e, i, s);
40381
+ return mI(t, e, i, s);
40326
40382
  }
40327
40383
  loadSync(t, e, i, s, o) {
40328
- return mI(t, e, i, s, o);
40384
+ return gI(t, e, i, s, o);
40329
40385
  }
40330
40386
  }
40331
40387
  b0(fx);
40332
- const px = x("printGltf") || x("printgltf"), mx = x("downloadgltf"), uI = x("debugfileformat");
40333
- var fI = /* @__PURE__ */ ((n) => (n[n.BeforeLoad = 0] = "BeforeLoad", n[n.AfterLoaded = 1] = "AfterLoaded", n[n.FinishedSetup = 10] = "FinishedSetup", n))(fI || {});
40388
+ const px = x("printGltf") || x("printgltf"), mx = x("downloadgltf"), fI = x("debugfileformat");
40389
+ var pI = /* @__PURE__ */ ((n) => (n[n.BeforeLoad = 0] = "BeforeLoad", n[n.AfterLoaded = 1] = "AfterLoaded", n[n.FinishedSetup = 10] = "FinishedSetup", n))(pI || {});
40334
40390
  class Ea {
40335
40391
  constructor(t, e, i, s) {
40336
40392
  r(this, "context");
@@ -40341,10 +40397,10 @@ class Ea {
40341
40397
  }
40342
40398
  }
40343
40399
  const yo = {};
40344
- function eL(n, t) {
40400
+ function tL(n, t) {
40345
40401
  yo[n] = yo[n] || [], yo[n].push(t);
40346
40402
  }
40347
- function tL(n, t) {
40403
+ function iL(n, t) {
40348
40404
  if (yo[n]) {
40349
40405
  const e = yo[n].indexOf(t);
40350
40406
  e >= 0 && yo[n].splice(e, 1);
@@ -40359,8 +40415,8 @@ async function gx(n, t, e, i, s) {
40359
40415
  px && console.warn("glTF", t, e), t.includes("?") && (t = t.split("?")[0]), await Vs().createBuiltinComponents(n, t, e, i, s);
40360
40416
  }
40361
40417
  async function _x(n, t) {
40362
- const e = await hI(n) || "unknown";
40363
- switch (uI && console.debug("Determined file type: " + e + " for url", n), e) {
40418
+ const e = await dI(n) || "unknown";
40419
+ switch (fI && console.debug("Determined file type: " + e + " for url", n), e) {
40364
40420
  case "unknown": {
40365
40421
  console.warn("Unknown file type. Assuming glTF:", n);
40366
40422
  const i = new xr();
@@ -40384,7 +40440,7 @@ async function _x(n, t) {
40384
40440
  }
40385
40441
  }
40386
40442
  }
40387
- async function pI(n, t, e, i) {
40443
+ async function mI(n, t, e, i) {
40388
40444
  typeof e != "string" && (console.warn("Parse gltf binary without path, this might lead to errors in resolving extensions. Please provide the source path of the gltf/glb file", e, typeof e), e = ""), px && console.log("Parse glTF", e);
40389
40445
  const s = await _x(e, n);
40390
40446
  if (!s)
@@ -40427,8 +40483,8 @@ async function pI(n, t, e, i) {
40427
40483
  }
40428
40484
  });
40429
40485
  }
40430
- async function mI(n, t, e, i, s) {
40431
- gI(t);
40486
+ async function gI(n, t, e, i, s) {
40487
+ _I(t);
40432
40488
  const o = await _x(t, n);
40433
40489
  if (!o)
40434
40490
  return;
@@ -40468,7 +40524,7 @@ async function yx(n, t, e) {
40468
40524
  console.warn((i == null ? void 0 : i.message) || i);
40469
40525
  }
40470
40526
  }
40471
- function gI(n) {
40527
+ function _I(n) {
40472
40528
  if (new URL(n, window.location.href).href.startsWith("file://")) {
40473
40529
  const e = `Hi - it looks like you are trying to load a local file which will not work. You need to use a webserver to serve your files.
40474
40530
  Please refer to the documentation on <a href="https://fwd.needle.tools/needle-engine/docs/local-server">https://docs.needle.tools</a> or ask for help in our <a href="https://discord.needle.tools">discord community</a>`;
@@ -40494,7 +40550,7 @@ function vx(n, t) {
40494
40550
  }
40495
40551
  }
40496
40552
  b0(fx);
40497
- const Le = x("debugwebcomponent"), Hb = "needle-engine", wx = "vr", xx = "desktop", _I = [Ev, wx, xx], Fl = "ar-session-active", zl = "desktop-session-active", yI = [
40553
+ const Le = x("debugwebcomponent"), Hb = "needle-engine", wx = "vr", xx = "desktop", yI = [Ev, wx, xx], Fl = "ar-session-active", zl = "desktop-session-active", bI = [
40498
40554
  "public-key",
40499
40555
  "version",
40500
40556
  "hash",
@@ -40621,7 +40677,7 @@ class Sx extends HTMLElement {
40621
40677
  `, this.shadowRoot && this.shadowRoot.appendChild(e.content.cloneNode(!0)), this._context = new ee({ domElement: this }), this.addEventListener("error", this.onError);
40622
40678
  }
40623
40679
  static get observedAttributes() {
40624
- return yI;
40680
+ return bI;
40625
40681
  }
40626
40682
  get loadingProgress01() {
40627
40683
  return this._loadingProgress01;
@@ -40798,7 +40854,7 @@ Needle Engine: Begin loading ` + i + `
40798
40854
  if (Le && console.debug("Loading progress: ", b), u.signal.aborted)
40799
40855
  return;
40800
40856
  const w = b.index;
40801
- !d[w] && b.name && (d[w] = bI(b.name)), b.name = d[w], a && ((P = this._loadingView) == null || P.onLoadingUpdate(b)), c.name = b.name, c.progress = b.progress, this._loadingProgress01 = Av(b), c.totalProgress01 = this._loadingProgress01, this.dispatchEvent(h);
40857
+ !d[w] && b.name && (d[w] = vI(b.name)), b.name = d[w], a && ((P = this._loadingView) == null || P.onLoadingUpdate(b)), c.name = b.name, c.progress = b.progress, this._loadingProgress01 = Av(b), c.totalProgress01 = this._loadingProgress01, this.dispatchEvent(h);
40802
40858
  },
40803
40859
  onLoadingFinished: (b, w, P) => {
40804
40860
  Le && console.debug(`Finished loading "${w}" (aborted? ${u.signal.aborted})`), !u.signal.aborted && P && l.push({
@@ -40975,7 +41031,7 @@ Needle Engine: finished loading ` + i + `
40975
41031
  if (e.classList.contains(i))
40976
41032
  e.style.visibility = "visible", e.style.display === "none" && (e.style.display = "block");
40977
41033
  else
40978
- for (const c of _I)
41034
+ for (const c of yI)
40979
41035
  e.classList.contains(c) && (e.style.visibility = "hidden", e.style.display = "none");
40980
41036
  }
40981
41037
  foreachHtmlElement(e) {
@@ -40994,7 +41050,7 @@ Needle Engine: finished loading ` + i + `
40994
41050
  }
40995
41051
  }
40996
41052
  typeof window < "u" && !window.customElements.get(Hb) && window.customElements.define(Hb, Sx);
40997
- function bI(n) {
41053
+ function vI(n) {
40998
41054
  if (n.startsWith("blob:"))
40999
41055
  return "blob";
41000
41056
  const t = n.split("/");
@@ -41015,13 +41071,13 @@ function bI(n) {
41015
41071
  }
41016
41072
  return z() && console.debug("Loading: use default name", e), e;
41017
41073
  }
41018
- const vI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
41074
+ const wI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
41019
41075
  __proto__: null,
41020
41076
  NeedleEngineHTMLElement: Sx
41021
41077
  }, Symbol.toStringTag, { value: "Module" }));
41022
- function wI() {
41078
+ function xI() {
41023
41079
  $s.registerWaitForInteraction(() => {
41024
- const n = H1.getContext();
41080
+ const n = HS.getContext();
41025
41081
  n.addEventListener("statechange", () => {
41026
41082
  setTimeout(() => {
41027
41083
  const t = n.state;
@@ -41034,21 +41090,21 @@ function wI() {
41034
41090
  });
41035
41091
  });
41036
41092
  }
41037
- setTimeout(wI, 1e3);
41093
+ setTimeout(xI, 1e3);
41038
41094
  const Id = x("debughotreload");
41039
41095
  let Vc = !1;
41040
41096
  const wc = /* @__PURE__ */ new Map();
41041
- function iL() {
41097
+ function sL() {
41042
41098
  return Vc;
41043
41099
  }
41044
- function sL(n) {
41100
+ function nL(n) {
41045
41101
  var i;
41046
41102
  if (Vc)
41047
41103
  return;
41048
41104
  const e = n.constructor.name;
41049
41105
  wc.has(e) ? (i = wc.get(e)) == null || i.push(n) : wc.set(e, [n]);
41050
41106
  }
41051
- function nL(n) {
41107
+ function oL(n) {
41052
41108
  if (Vc)
41053
41109
  return;
41054
41110
  const e = n.constructor.name, i = wc.get(e);
@@ -41058,7 +41114,7 @@ function nL(n) {
41058
41114
  s !== -1 && i.splice(s, 1);
41059
41115
  }
41060
41116
  let Gb = !1;
41061
- function xI() {
41117
+ function SI() {
41062
41118
  if (Id || Gb)
41063
41119
  return;
41064
41120
  Gb = !0;
@@ -41074,8 +41130,8 @@ function xI() {
41074
41130
  n.apply(console, t);
41075
41131
  };
41076
41132
  }
41077
- function oL(n) {
41078
- Id && console.log("[HMR] Apply changes", n, Object.keys(n)), xI();
41133
+ function rL(n) {
41134
+ Id && console.log("[HMR] Apply changes", n, Object.keys(n)), SI();
41079
41135
  for (const t of Object.keys(n))
41080
41136
  try {
41081
41137
  Vc = !0;
@@ -41128,7 +41184,7 @@ function oL(n) {
41128
41184
  }
41129
41185
  return !0;
41130
41186
  }
41131
- const Qe = x("debugphysics"), Ip = x("debugcolliderplacement"), Dp = x("debugcollisions"), SI = x("showcolliders"), Lp = x("debugraycasts"), ci = Symbol("needle component"), Ht = Symbol("physics body"), qb = Symbol("rigidbody");
41187
+ const Qe = x("debugphysics"), Ip = x("debugcolliderplacement"), Dp = x("debugcollisions"), CI = x("showcolliders"), Lp = x("debugraycasts"), ci = Symbol("needle component"), Ht = Symbol("physics body"), qb = Symbol("rigidbody");
41132
41188
  globalThis.true = globalThis.true !== void 0 ? globalThis.true : !0;
41133
41189
  Qe && console.log("Use Rapier", !0, globalThis.true);
41134
41190
  fe.registerCallback(pe.ContextCreationStart, (n) => {
@@ -41179,13 +41235,13 @@ const kc = class {
41179
41235
  const a = this.objects.findIndex((l) => l === t);
41180
41236
  if (a >= 0) {
41181
41237
  const l = this.bodies[a];
41182
- if (this.bodies.splice(a, 1), this.objects.splice(a, 1), l instanceof j.RAPIER_PHYSICS.MODULE.Collider) {
41238
+ if (this.bodies.splice(a, 1), this.objects.splice(a, 1), l instanceof D.RAPIER_PHYSICS.MODULE.Collider) {
41183
41239
  const c = l;
41184
41240
  (i = this.world) == null || i.removeCollider(c, !0);
41185
41241
  const h = c.parent();
41186
41242
  h && h.numColliders() <= 0 && (h[ci] || (s = this.world) == null || s.removeRigidBody(h));
41187
41243
  } else
41188
- l instanceof j.RAPIER_PHYSICS.MODULE.RigidBody && (l.numColliders() <= 0 ? (o = this.world) == null || o.removeRigidBody(l) : z() && (l.did_log_removing || setTimeout(() => {
41244
+ l instanceof D.RAPIER_PHYSICS.MODULE.RigidBody && (l.numColliders() <= 0 ? (o = this.world) == null || o.removeRigidBody(l) : z() && (l.did_log_removing || setTimeout(() => {
41189
41245
  l.numColliders() > 0 && (l.did_log_removing = !0, console.warn("RapierPhysics: removing rigidbody with colliders from the physics world is not possible right now, please remove the colliders first"));
41190
41246
  }, 1)));
41191
41247
  }
@@ -41271,7 +41327,7 @@ const kc = class {
41271
41327
  return this._initializePromise || (this._initializePromise = this.internalInitialization()), this._initializePromise;
41272
41328
  }
41273
41329
  async internalInitialization() {
41274
- return x("__nophysics") ? (console.warn("Physics are disabled"), !1) : (Qe && console.log("Initialize rapier physics engine"), "env" in import.meta && {}.VITE_NEEDLE_USE_RAPIER === "false" ? (Qe && console.log("Rapier disabled"), !1) : this._hasCreatedWorld ? (console.error("Invalid call to create physics world: world is already created"), !0) : (this._hasCreatedWorld = !0, j.RAPIER_PHYSICS.MAYBEMODULE == null && (Qe && console.trace("Loading rapier physics engine"), await (await j.RAPIER_PHYSICS.load()).init()), Qe && console.log("Physics engine initialized, creating world..."), this._world = new j.RAPIER_PHYSICS.MODULE.World(this._gravity), this.rapierRay = new j.RAPIER_PHYSICS.MODULE.Ray({ x: 0, y: 0, z: 0 }, { x: 0, y: 0, z: 1 }), this.enabled = !0, this._isInitialized = !0, Qe && console.log("Physics world created"), !0));
41330
+ return x("__nophysics") ? (console.warn("Physics are disabled"), !1) : (Qe && console.log("Initialize rapier physics engine"), "env" in import.meta && {}.VITE_NEEDLE_USE_RAPIER === "false" ? (Qe && console.log("Rapier disabled"), !1) : this._hasCreatedWorld ? (console.error("Invalid call to create physics world: world is already created"), !0) : (this._hasCreatedWorld = !0, D.RAPIER_PHYSICS.MAYBEMODULE == null && (Qe && console.trace("Loading rapier physics engine"), await (await D.RAPIER_PHYSICS.load()).init()), Qe && console.log("Physics engine initialized, creating world..."), this._world = new D.RAPIER_PHYSICS.MODULE.World(this._gravity), this.rapierRay = new D.RAPIER_PHYSICS.MODULE.Ray({ x: 0, y: 0, z: 0 }, { x: 0, y: 0, z: 1 }), this.enabled = !0, this._isInitialized = !0, Qe && console.log("Physics world created"), !0));
41275
41331
  }
41276
41332
  /** Check is the physics engine has been initialized and the call can be made */
41277
41333
  validate() {
@@ -41353,7 +41409,7 @@ const kc = class {
41353
41409
  * @returns array of colliders that overlap with the sphere. Note: they currently only contain the collider and the gameobject
41354
41410
  */
41355
41411
  sphereOverlap(t, e) {
41356
- return this.rapierColliderArray.length = 0, this._isInitialized ? this.world ? (this.rapierSphere ?? (this.rapierSphere = new j.RAPIER_PHYSICS.MODULE.Ball(e)), this.rapierSphere.radius = e, (this.debugRenderRaycasts || Lp) && V.DrawWireSphere(t, e, 3359999, 1), this.world.intersectionsWithShape(
41412
+ return this.rapierColliderArray.length = 0, this._isInitialized ? this.world ? (this.rapierSphere ?? (this.rapierSphere = new D.RAPIER_PHYSICS.MODULE.Ball(e)), this.rapierSphere.radius = e, (this.debugRenderRaycasts || Lp) && V.DrawWireSphere(t, e, 3359999, 1), this.world.intersectionsWithShape(
41357
41413
  t,
41358
41414
  this.rapierIdentityRotation,
41359
41415
  this.rapierSphere,
@@ -41397,7 +41453,7 @@ const kc = class {
41397
41453
  }
41398
41454
  const i = t.gameObject, s = Ke(i, this._tempPosition).multiply(e);
41399
41455
  s.multiplyScalar(0.5), s.x < 0 && (s.x = Math.abs(s.x)), s.y < 0 && (s.y = Math.abs(s.y)), s.z < 0 && (s.z = Math.abs(s.z)), s.x == 0 && (s.x = 1e-7), s.y == 0 && (s.y = 1e-7), s.z == 0 && (s.z = 1e-7);
41400
- const o = j.RAPIER_PHYSICS.MODULE.ColliderDesc.cuboid(s.x, s.y, s.z);
41456
+ const o = D.RAPIER_PHYSICS.MODULE.ColliderDesc.cuboid(s.x, s.y, s.z);
41401
41457
  this.createCollider(t, o);
41402
41458
  }
41403
41459
  async addSphereCollider(t) {
@@ -41407,7 +41463,7 @@ const kc = class {
41407
41463
  Qe && console.warn("Physics are disabled");
41408
41464
  return;
41409
41465
  }
41410
- const e = j.RAPIER_PHYSICS.MODULE.ColliderDesc.ball(0.5);
41466
+ const e = D.RAPIER_PHYSICS.MODULE.ColliderDesc.ball(0.5);
41411
41467
  this.createCollider(t, e), this.updateProperties(t);
41412
41468
  }
41413
41469
  async addCapsuleCollider(t, e, i) {
@@ -41421,7 +41477,7 @@ const kc = class {
41421
41477
  o.x = Math.abs(o.x), o.y = Math.abs(o.y);
41422
41478
  const a = i * o.x;
41423
41479
  e = Math.max(e, a * 2);
41424
- const l = $.clamp(e * 0.5 * o.y - i * o.x, 0, Number.MAX_SAFE_INTEGER), c = j.RAPIER_PHYSICS.MODULE.ColliderDesc.capsule(l, a);
41480
+ const l = $.clamp(e * 0.5 * o.y - i * o.x, 0, Number.MAX_SAFE_INTEGER), c = D.RAPIER_PHYSICS.MODULE.ColliderDesc.capsule(l, a);
41425
41481
  this.createCollider(t, c);
41426
41482
  }
41427
41483
  async addMeshCollider(t, e, i, s) {
@@ -41431,7 +41487,7 @@ const kc = class {
41431
41487
  Qe && console.warn("Missing mesh geometry", e.name);
41432
41488
  return;
41433
41489
  }
41434
- (p = (u = o.index) == null ? void 0 : u.array) != null && p.length || (console.warn(`Your MeshCollider is missing vertices or indices in the assined mesh "${e.name}". Consider providing an indexed geometry.`), o = mS(o));
41490
+ (p = (u = o.index) == null ? void 0 : u.array) != null && p.length || (console.warn(`Your MeshCollider is missing vertices or indices in the assined mesh "${e.name}". Consider providing an indexed geometry.`), o = m1(o));
41435
41491
  let a = null;
41436
41492
  const l = o.getAttribute("position");
41437
41493
  if (l instanceof n0) {
@@ -41462,7 +41518,7 @@ const kc = class {
41462
41518
  a = _, this._meshCache.set(g, _);
41463
41519
  }
41464
41520
  }
41465
- const d = i ? j.RAPIER_PHYSICS.MODULE.ColliderDesc.convexHull(a) : j.RAPIER_PHYSICS.MODULE.ColliderDesc.trimesh(a, c);
41521
+ const d = i ? D.RAPIER_PHYSICS.MODULE.ColliderDesc.convexHull(a) : D.RAPIER_PHYSICS.MODULE.ColliderDesc.trimesh(a, c);
41466
41522
  d && this.createCollider(t, d);
41467
41523
  }
41468
41524
  updatePhysicsMaterial(t) {
@@ -41473,31 +41529,31 @@ const kc = class {
41473
41529
  if (e.bounciness !== void 0 && i.setRestitution(e.bounciness), e.bounceCombine !== void 0)
41474
41530
  switch (e.bounceCombine) {
41475
41531
  case Ot.Average:
41476
- i.setRestitutionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Average);
41532
+ i.setRestitutionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Average);
41477
41533
  break;
41478
41534
  case Ot.Maximum:
41479
- i.setRestitutionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Max);
41535
+ i.setRestitutionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Max);
41480
41536
  break;
41481
41537
  case Ot.Minimum:
41482
- i.setRestitutionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Min);
41538
+ i.setRestitutionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Min);
41483
41539
  break;
41484
41540
  case Ot.Multiply:
41485
- i.setRestitutionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Multiply);
41541
+ i.setRestitutionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Multiply);
41486
41542
  break;
41487
41543
  }
41488
41544
  if (e.dynamicFriction !== void 0 && i.setFriction(e.dynamicFriction), e.frictionCombine !== void 0)
41489
41545
  switch (e.frictionCombine) {
41490
41546
  case Ot.Average:
41491
- i.setFrictionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Average);
41547
+ i.setFrictionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Average);
41492
41548
  break;
41493
41549
  case Ot.Maximum:
41494
- i.setFrictionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Max);
41550
+ i.setFrictionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Max);
41495
41551
  break;
41496
41552
  case Ot.Minimum:
41497
- i.setFrictionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Min);
41553
+ i.setFrictionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Min);
41498
41554
  break;
41499
41555
  case Ot.Multiply:
41500
- i.setFrictionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Multiply);
41556
+ i.setFrictionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Multiply);
41501
41557
  break;
41502
41558
  }
41503
41559
  }
@@ -41522,38 +41578,38 @@ const kc = class {
41522
41578
  if (o.bounciness !== void 0 && e.setRestitution(o.bounciness), o.bounceCombine !== void 0)
41523
41579
  switch (o.bounceCombine) {
41524
41580
  case Ot.Average:
41525
- e.setRestitutionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Average);
41581
+ e.setRestitutionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Average);
41526
41582
  break;
41527
41583
  case Ot.Maximum:
41528
- e.setRestitutionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Max);
41584
+ e.setRestitutionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Max);
41529
41585
  break;
41530
41586
  case Ot.Minimum:
41531
- e.setRestitutionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Min);
41587
+ e.setRestitutionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Min);
41532
41588
  break;
41533
41589
  case Ot.Multiply:
41534
- e.setRestitutionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Multiply);
41590
+ e.setRestitutionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Multiply);
41535
41591
  break;
41536
41592
  }
41537
41593
  if (o.dynamicFriction !== void 0 && e.setFriction(o.dynamicFriction), o.frictionCombine !== void 0)
41538
41594
  switch (o.frictionCombine) {
41539
41595
  case Ot.Average:
41540
- e.setFrictionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Average);
41596
+ e.setFrictionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Average);
41541
41597
  break;
41542
41598
  case Ot.Maximum:
41543
- e.setFrictionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Max);
41599
+ e.setFrictionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Max);
41544
41600
  break;
41545
41601
  case Ot.Minimum:
41546
- e.setFrictionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Min);
41602
+ e.setFrictionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Min);
41547
41603
  break;
41548
41604
  case Ot.Multiply:
41549
- e.setFrictionCombineRule(j.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Multiply);
41605
+ e.setFrictionCombineRule(D.RAPIER_PHYSICS.MODULE.CoefficientCombineRule.Multiply);
41550
41606
  break;
41551
41607
  }
41552
41608
  }
41553
41609
  ((a = t.attachedRigidbody) == null ? void 0 : a.autoMass) === !1 && (e.setDensity(1e-6), e.setMass(1e-6));
41554
41610
  try {
41555
41611
  const l = this.world.createCollider(e, s);
41556
- return l[ci] = t, t[Ht] = l, l.setActiveEvents(j.RAPIER_PHYSICS.MODULE.ActiveEvents.COLLISION_EVENTS), l.setActiveCollisionTypes(j.RAPIER_PHYSICS.MODULE.ActiveCollisionTypes.ALL), this.objects.push(t), this.bodies.push(l), this.updateColliderCollisionGroups(t), l;
41612
+ return l[ci] = t, t[Ht] = l, l.setActiveEvents(D.RAPIER_PHYSICS.MODULE.ActiveEvents.COLLISION_EVENTS), l.setActiveCollisionTypes(D.RAPIER_PHYSICS.MODULE.ActiveCollisionTypes.ALL), this.objects.push(t), this.bodies.push(l), this.updateColliderCollisionGroups(t), l;
41557
41613
  } catch (l) {
41558
41614
  return console.error('Error creating collider "' + t.name + `"
41559
41615
  Error:`, l), null;
@@ -41594,12 +41650,12 @@ Error:`, l), null;
41594
41650
  if (i = s[Ht], !i) {
41595
41651
  const o = s.isKinematic && !Ip;
41596
41652
  Qe && console.log("Create rigidbody", o);
41597
- const a = o ? j.RAPIER_PHYSICS.MODULE.RigidBodyDesc.kinematicPositionBased() : j.RAPIER_PHYSICS.MODULE.RigidBodyDesc.dynamic(), l = ie(t.attachedRigidbody.gameObject);
41598
- a.setTranslation(l.x, l.y, l.z), a.setRotation(Ce(t.attachedRigidbody.gameObject)), a.centerOfMass = new j.RAPIER_PHYSICS.MODULE.Vector3(s.centerOfMass.x, s.centerOfMass.y, s.centerOfMass.z), i = this.world.createRigidBody(a), this.bodies.push(i), this.objects.push(s);
41653
+ const a = o ? D.RAPIER_PHYSICS.MODULE.RigidBodyDesc.kinematicPositionBased() : D.RAPIER_PHYSICS.MODULE.RigidBodyDesc.dynamic(), l = ie(t.attachedRigidbody.gameObject);
41654
+ a.setTranslation(l.x, l.y, l.z), a.setRotation(Ce(t.attachedRigidbody.gameObject)), a.centerOfMass = new D.RAPIER_PHYSICS.MODULE.Vector3(s.centerOfMass.x, s.centerOfMass.y, s.centerOfMass.z), i = this.world.createRigidBody(a), this.bodies.push(i), this.objects.push(s);
41599
41655
  }
41600
41656
  i[ci] = s, s[Ht] = i, this.internalUpdateRigidbodyProperties(s, i), this.getRigidbodyRelativeMatrix(t.gameObject, s.gameObject, e), t[qb] = i;
41601
41657
  } else {
41602
- const s = j.RAPIER_PHYSICS.MODULE.RigidBodyDesc.kinematicPositionBased(), o = ie(t.gameObject);
41658
+ const s = D.RAPIER_PHYSICS.MODULE.RigidBodyDesc.kinematicPositionBased(), o = ie(t.gameObject);
41603
41659
  s.setTranslation(o.x, o.y, o.z), s.setRotation(Ce(t.gameObject)), i = this.world.createRigidBody(s), e.identity(), i[ci] = null;
41604
41660
  }
41605
41661
  return i;
@@ -41611,12 +41667,12 @@ Error:`, l), null;
41611
41667
  const i = e.shape;
41612
41668
  let s = !1;
41613
41669
  switch (i.type) {
41614
- case j.RAPIER_PHYSICS.MODULE.ShapeType.Ball: {
41670
+ case D.RAPIER_PHYSICS.MODULE.ShapeType.Ball: {
41615
41671
  const p = i, m = t, g = t.gameObject, _ = Ke(g, this._tempPosition), y = Math.abs(m.radius * _.x);
41616
41672
  s = p.radius !== y, p.radius = y, s && e.setShape(p);
41617
41673
  break;
41618
41674
  }
41619
- case j.RAPIER_PHYSICS.MODULE.ShapeType.Cuboid:
41675
+ case D.RAPIER_PHYSICS.MODULE.ShapeType.Cuboid:
41620
41676
  const o = i, a = t, l = t.gameObject, c = Ke(l, this._tempPosition), h = a.size.x * 0.5 * c.x, d = a.size.y * 0.5 * c.y, u = a.size.z * 0.5 * c.z;
41621
41677
  s = o.halfExtents.x !== h || o.halfExtents.y !== d || o.halfExtents.z !== u, o.halfExtents.x = h, o.halfExtents.y = d, o.halfExtents.z = u, s && e.setShape(o);
41622
41678
  break;
@@ -41642,11 +41698,11 @@ Error:`, l), null;
41642
41698
  e.collider(i).setDensity(1e-7);
41643
41699
  e.recomputeMassPropertiesFromColliders();
41644
41700
  }
41645
- e.setEnabledRotations(!t.lockRotationX, !t.lockRotationY, !t.lockRotationZ, !1), e.setEnabledTranslations(!t.lockPositionX, !t.lockPositionY, !t.lockPositionZ, !1), t.isKinematic ? e.setBodyType(j.RAPIER_PHYSICS.MODULE.RigidBodyType.KinematicPositionBased, !1) : e.setBodyType(j.RAPIER_PHYSICS.MODULE.RigidBodyType.Dynamic, !1);
41701
+ e.setEnabledRotations(!t.lockRotationX, !t.lockRotationY, !t.lockRotationZ, !1), e.setEnabledTranslations(!t.lockPositionX, !t.lockPositionY, !t.lockPositionZ, !1), t.isKinematic ? e.setBodyType(D.RAPIER_PHYSICS.MODULE.RigidBodyType.KinematicPositionBased, !1) : e.setBodyType(D.RAPIER_PHYSICS.MODULE.RigidBodyType.Dynamic, !1);
41646
41702
  }
41647
41703
  step(t) {
41648
41704
  if (this.world && this.enabled) {
41649
- if (this._isUpdatingPhysicsWorld = !0, this.eventQueue || (this.eventQueue = new j.RAPIER_PHYSICS.MODULE.EventQueue(!1)), t === void 0 || t <= 0) {
41705
+ if (this._isUpdatingPhysicsWorld = !0, this.eventQueue || (this.eventQueue = new D.RAPIER_PHYSICS.MODULE.EventQueue(!1)), t === void 0 || t <= 0) {
41650
41706
  this._isUpdatingPhysicsWorld = !1;
41651
41707
  return;
41652
41708
  } else
@@ -41660,11 +41716,11 @@ Error:`, l), null;
41660
41716
  }
41661
41717
  }
41662
41718
  postStep() {
41663
- this.world && this.enabled && (this._isUpdatingPhysicsWorld = !0, this.syncObjects(), this._isUpdatingPhysicsWorld = !1, this.eventQueue && !this.collisionHandler && (this.collisionHandler = new CI(this.world, this.eventQueue)), this.collisionHandler && (this.collisionHandler.handleCollisionEvents(), this.collisionHandler.update()), this.updateDebugRendering(this.world));
41719
+ this.world && this.enabled && (this._isUpdatingPhysicsWorld = !0, this.syncObjects(), this._isUpdatingPhysicsWorld = !1, this.eventQueue && !this.collisionHandler && (this.collisionHandler = new PI(this.world, this.eventQueue)), this.collisionHandler && (this.collisionHandler.handleCollisionEvents(), this.collisionHandler.update()), this.updateDebugRendering(this.world));
41664
41720
  }
41665
41721
  updateDebugRendering(t) {
41666
41722
  var e, i, s, o;
41667
- if (Qe || Ip || SI || this.debugRenderColliders === !0) {
41723
+ if (Qe || Ip || CI || this.debugRenderColliders === !0) {
41668
41724
  if (!this.lines) {
41669
41725
  const l = new s0({
41670
41726
  color: 7855479,
@@ -41704,19 +41760,19 @@ Error:`, l), null;
41704
41760
  }
41705
41761
  }
41706
41762
  syncPhysicsBody(t, e, i, s) {
41707
- if (e instanceof j.RAPIER_PHYSICS.MODULE.RigidBody) {
41763
+ if (e instanceof D.RAPIER_PHYSICS.MODULE.RigidBody) {
41708
41764
  const o = ie(t, this._tempPosition), a = Ce(t, this._tempQuaternion);
41709
41765
  switch (e.bodyType()) {
41710
- case j.RAPIER_PHYSICS.MODULE.RigidBodyType.Fixed:
41711
- case j.RAPIER_PHYSICS.MODULE.RigidBodyType.KinematicPositionBased:
41712
- case j.RAPIER_PHYSICS.MODULE.RigidBodyType.KinematicVelocityBased:
41766
+ case D.RAPIER_PHYSICS.MODULE.RigidBodyType.Fixed:
41767
+ case D.RAPIER_PHYSICS.MODULE.RigidBodyType.KinematicPositionBased:
41768
+ case D.RAPIER_PHYSICS.MODULE.RigidBodyType.KinematicVelocityBased:
41713
41769
  i && e.setNextKinematicTranslation(o), s && e.setNextKinematicRotation(a);
41714
41770
  break;
41715
41771
  default:
41716
41772
  i && e.setTranslation(o, !1), s && e.setRotation(a, !1);
41717
41773
  break;
41718
41774
  }
41719
- } else if (e instanceof j.RAPIER_PHYSICS.MODULE.Collider) {
41775
+ } else if (e instanceof D.RAPIER_PHYSICS.MODULE.Collider) {
41720
41776
  t.matrixWorldNeedsUpdate && t.updateWorldMatrix(!0, !1), t.matrixWorld.decompose(this._tempPosition, this._tempQuaternion, this._tempScale);
41721
41777
  const o = this._tempPosition, a = this._tempQuaternion, l = e[ci];
41722
41778
  if (this.tryApplyCenter(l, o), i) {
@@ -41750,7 +41806,7 @@ Error:`, l), null;
41750
41806
  }
41751
41807
  const i = t[Ht], s = e[Ht];
41752
41808
  this.calculateJointRelativeMatrices(t.gameObject, e.gameObject, this._tempMatrix), this._tempMatrix.decompose(this._tempPosition, this._tempQuaternion, this._tempScale);
41753
- const o = j.RAPIER_PHYSICS.MODULE.JointData.fixed(
41809
+ const o = D.RAPIER_PHYSICS.MODULE.JointData.fixed(
41754
41810
  kc.centerConnectionPos,
41755
41811
  kc.centerConnectionRot,
41756
41812
  this._tempPosition,
@@ -41766,7 +41822,7 @@ Error:`, l), null;
41766
41822
  }
41767
41823
  const o = t[Ht], a = e[Ht];
41768
41824
  this.calculateJointRelativeMatrices(t.gameObject, e.gameObject, this._tempMatrix), this._tempMatrix.decompose(this._tempPosition, this._tempQuaternion, this._tempScale);
41769
- const l = j.RAPIER_PHYSICS.MODULE.JointData.revolute(i, this._tempPosition, s), c = this.world.createImpulseJoint(l, o, a, !0);
41825
+ const l = D.RAPIER_PHYSICS.MODULE.JointData.revolute(i, this._tempPosition, s), c = this.world.createImpulseJoint(l, o, a, !0);
41770
41826
  Qe && console.log("ADD HINGE JOINT", c);
41771
41827
  }
41772
41828
  calculateJointRelativeMatrices(t, e, i) {
@@ -41777,7 +41833,7 @@ Error:`, l), null;
41777
41833
  };
41778
41834
  let qo = kc;
41779
41835
  r(qo, "_didLoadPhysicsEngine", !1), r(qo, "_matricesBuffer", []), r(qo, "centerConnectionPos", { x: 0, y: 0, z: 0 }), r(qo, "centerConnectionRot", { x: 0, y: 0, z: 0, w: 1 });
41780
- class CI {
41836
+ class PI {
41781
41837
  constructor(t, e) {
41782
41838
  r(this, "world");
41783
41839
  r(this, "eventQueue");
@@ -41901,7 +41957,7 @@ class CI {
41901
41957
  }
41902
41958
  }
41903
41959
  }
41904
- class rL {
41960
+ class aL {
41905
41961
  /**
41906
41962
  * Use this method to quickly setup a scene to compare multiple models.
41907
41963
  * @example
@@ -41920,7 +41976,7 @@ class rL {
41920
41976
  const { files: e } = t, s = await Promise.all(e.map((y) => new re(y).loadAssetAsync())), o = new es();
41921
41977
  let a = 0;
41922
41978
  for (const y of s)
41923
- if (y instanceof D) {
41979
+ if (y instanceof L) {
41924
41980
  y.position.y = a, o.add(y);
41925
41981
  const b = ki([y]);
41926
41982
  a += b.getSize(new v()).y, a += 0.1;
@@ -41958,26 +42014,26 @@ let ig = 0;
41958
42014
  function Xb(n) {
41959
42015
  n ? ig++ : ig--;
41960
42016
  }
41961
- function aL() {
42017
+ function lL() {
41962
42018
  return ig > 0;
41963
42019
  }
41964
- const PI = {
42020
+ const OI = {
41965
42021
  binary: !0,
41966
42022
  animations: !0
41967
42023
  };
41968
- async function lL(n) {
42024
+ async function cL(n) {
41969
42025
  if (!n.context)
41970
42026
  throw new Error("No context provided to exportAsGLTF");
41971
42027
  n.scene || (n.scene = n.context.scene);
41972
42028
  const t = {
41973
- ...PI,
42029
+ ...OI,
41974
42030
  ...n
41975
42031
  }, { context: e } = t, i = new u0();
41976
42032
  i.register((l) => new ow(l)), i.register((l) => new ZR(l)), i.register((l) => new Jv(l)), sw(i, t.context);
41977
42033
  const s = {
41978
42034
  binary: t.binary,
41979
- animations: MI(e, t.scene, [])
41980
- }, o = new OI();
42035
+ animations: RI(e, t.scene, [])
42036
+ }, o = new MI();
41981
42037
  console.debug("Exporting GLTF", s), o.onBeforeExport(t), Xb(!0);
41982
42038
  const a = await i.parseAsync(t.scene, s).catch((l) => (console.error(l), null));
41983
42039
  if (Xb(!1), o.onAfterExport(t), !a)
@@ -41994,7 +42050,7 @@ async function lL(n) {
41994
42050
  return a;
41995
42051
  }
41996
42052
  const Qb = Symbol("needle:weight");
41997
- class OI {
42053
+ class MI {
41998
42054
  constructor() {
41999
42055
  r(this, "_undo", []);
42000
42056
  }
@@ -42020,7 +42076,7 @@ class OI {
42020
42076
  this._undo.forEach((e) => e()), this._undo.length = 0;
42021
42077
  }
42022
42078
  }
42023
- function MI(n, t, e) {
42079
+ function RI(n, t, e) {
42024
42080
  n.animations.mixers.forEach((s) => {
42025
42081
  const o = zc.tryGetActionsFromMixer(s);
42026
42082
  if (o)
@@ -42140,7 +42196,7 @@ class Mx {
42140
42196
  return this.head !== null && this.head !== void 0;
42141
42197
  }
42142
42198
  }
42143
- class RI {
42199
+ class kI {
42144
42200
  constructor() {
42145
42201
  r(this, "avatarRegistryUrl", null);
42146
42202
  }
@@ -42269,16 +42325,16 @@ class RI {
42269
42325
  return t;
42270
42326
  }
42271
42327
  }
42272
- class kI {
42328
+ class TI {
42273
42329
  get extensionName() {
42274
42330
  return "DocumentExtension";
42275
42331
  }
42276
42332
  onAfterBuildDocument(t) {
42277
42333
  }
42278
42334
  }
42279
- class TI {
42335
+ class AI {
42280
42336
  }
42281
- const cL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42337
+ const hL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42282
42338
  __proto__: null,
42283
42339
  ActionBuilder: ge,
42284
42340
  ActionCollection: qk,
@@ -42298,7 +42354,7 @@ const cL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42298
42354
  Avatar: Pr,
42299
42355
  AvatarBlink_Simple: Ja,
42300
42356
  AvatarEyeLook_Rotation: eh,
42301
- AvatarLoader: RI,
42357
+ AvatarLoader: kI,
42302
42358
  AvatarMarker: _t,
42303
42359
  AvatarModel: Mx,
42304
42360
  Avatar_Brain_LookAt: eu,
@@ -42337,7 +42393,7 @@ const cL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42337
42393
  DeleteBox: ka,
42338
42394
  DepthOfField: Js,
42339
42395
  DeviceFlag: Wg,
42340
- DocumentExtension: kI,
42396
+ DocumentExtension: TI,
42341
42397
  DragControls: Ci,
42342
42398
  DropListener: Oo,
42343
42399
  Duplicatable: nh,
@@ -42493,15 +42549,15 @@ const cL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42493
42549
  XRFlag: qi,
42494
42550
  XRRig: S_,
42495
42551
  XRState: Jt,
42496
- __Ignore: TI
42552
+ __Ignore: AI
42497
42553
  }, Symbol.toStringTag, { value: "Module" })), hu = x("debugmissingcamera");
42498
42554
  fe.registerCallback(pe.MissingCamera, (n) => {
42499
- var l, c, h;
42555
+ var l, c, h, d;
42500
42556
  hu && console.warn("Creating missing camera");
42501
42557
  const t = n.context.scene, e = new ye();
42502
42558
  e.name = "Default Fallback Camera", t.add(e);
42503
42559
  const i = new Pe();
42504
- i.sourceId = ((c = (l = n.files) == null ? void 0 : l[0]) == null ? void 0 : c.src) ?? "unknown", (h = n.context.domElement.getAttribute("skybox-image")) != null && h.length || 0 > 0 || n.context.lightmaps.tryGetSkybox(i.sourceId) ? i.clearFlags = _r.Skybox : i.clearFlags = _r.SolidColor, i.backgroundColor = new we(0.5, 0.5, 0.5, 1), i.fieldOfView = 35, n.context.domElement.getAttribute("transparent") != null && (i.clearFlags = _r.Uninitialized), i.backgroundBlurriness = 0.2;
42560
+ i.sourceId = ((c = (l = n.files) == null ? void 0 : l[0]) == null ? void 0 : c.src) ?? "unknown", (h = n.context.domElement.getAttribute("skybox-image")) != null && h.length || (d = n.context.domElement.getAttribute("background-image")) != null && d.length || n.context.lightmaps.tryGetSkybox(i.sourceId) ? i.clearFlags = _r.Skybox : i.clearFlags = _r.SolidColor, i.backgroundColor = new we(0.5, 0.5, 0.5, 1), i.fieldOfView = 35, n.context.domElement.getAttribute("transparent") != null && (i.clearFlags = _r.Uninitialized), i.backgroundBlurriness = 0.2;
42505
42561
  const o = Ma(e, i, !0);
42506
42562
  e.position.x = 0, e.position.y = 1, e.position.z = 2;
42507
42563
  const a = n.context.domElement;
@@ -42514,7 +42570,7 @@ fe.registerCallback(pe.ContextCreated, (n) => {
42514
42570
  }
42515
42571
  const t = n.context.domElement;
42516
42572
  if ((t == null ? void 0 : t.cameraControls) == !0) {
42517
- const e = JS(n.context.mainCamera);
42573
+ const e = J1(n.context.mainCamera);
42518
42574
  if ((e == null ? void 0 : e.isCameraController) == !0) {
42519
42575
  hu && console.log("Will not auto-fit because a camera controller exists");
42520
42576
  return;
@@ -42553,9 +42609,9 @@ fe.registerCallback(pe.ContextCreated, (n) => {
42553
42609
  createAnimationComponent: (s, o) => Ji(s, ei)
42554
42610
  });
42555
42611
  });
42556
- class AI extends PS {
42612
+ class EI extends P1 {
42557
42613
  constructor() {
42558
- super(new OS()), this.name = "GenerateMeshBVHWorker";
42614
+ super(new O1()), this.name = "GenerateMeshBVHWorker";
42559
42615
  }
42560
42616
  runTask(t, e, i = {}) {
42561
42617
  return new Promise((s, o) => {
@@ -42568,7 +42624,7 @@ class AI extends PS {
42568
42624
  if (d.error)
42569
42625
  o(new Error(d.error)), t.onmessage = null;
42570
42626
  else if (d.serialized) {
42571
- const { serialized: u, position: p } = d, m = MS.deserialize(u, e, { setIndex: !1 }), g = Object.assign({
42627
+ const { serialized: u, position: p } = d, m = M1.deserialize(u, e, { setIndex: !1 }), g = Object.assign({
42572
42628
  setBoundingBox: !0
42573
42629
  }, i);
42574
42630
  if (e.attributes.position.array = p, u.index)
@@ -42596,9 +42652,9 @@ class AI extends PS {
42596
42652
  });
42597
42653
  }
42598
42654
  }
42599
- const EI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42655
+ const II = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42600
42656
  __proto__: null,
42601
- GenerateMeshBVHWorker: AI
42657
+ GenerateMeshBVHWorker: EI
42602
42658
  }, Symbol.toStringTag, { value: "Module" }));
42603
42659
  export {
42604
42660
  tv as $,
@@ -42607,14 +42663,14 @@ export {
42607
42663
  ee as C,
42608
42664
  Iu as D,
42609
42665
  z as E,
42610
- fD as F,
42666
+ pD as F,
42611
42667
  S as G,
42612
42668
  Sa as H,
42613
42669
  gs as I,
42614
42670
  F0 as J,
42615
42671
  SC as K,
42616
42672
  Ki as L,
42617
- j as M,
42673
+ D as M,
42618
42674
  J as N,
42619
42675
  yO as O,
42620
42676
  re as P,
@@ -42627,22 +42683,22 @@ export {
42627
42683
  Sm as W,
42628
42684
  $s as X,
42629
42685
  wP as Y,
42630
- SD as Z,
42686
+ CD as Z,
42631
42687
  xP as _,
42632
42688
  PM as a,
42633
42689
  Th as a$,
42634
- CD as a0,
42690
+ PD as a0,
42635
42691
  Ae as a1,
42636
42692
  SP as a2,
42637
42693
  sv as a3,
42638
- PD as a4,
42694
+ OD as a4,
42639
42695
  yv as a5,
42640
42696
  Bu as a6,
42641
42697
  Ma as a7,
42642
42698
  Ji as a8,
42643
42699
  dO as a9,
42644
42700
  Sx as aA,
42645
- ED as aB,
42701
+ ID as aB,
42646
42702
  Av as aC,
42647
42703
  Sd as aD,
42648
42704
  Xs as aE,
@@ -42661,10 +42717,10 @@ export {
42661
42717
  Ha as aR,
42662
42718
  Vs as aS,
42663
42719
  b0 as aT,
42664
- iL as aU,
42665
- sL as aV,
42666
- nL as aW,
42667
- oL as aX,
42720
+ sL as aU,
42721
+ nL as aV,
42722
+ oL as aW,
42723
+ rL as aX,
42668
42724
  wg as aY,
42669
42725
  Ne as aZ,
42670
42726
  Qn as a_,
@@ -42683,20 +42739,20 @@ export {
42683
42739
  fo as am,
42684
42740
  oa as an,
42685
42741
  pd as ao,
42686
- TD as ap,
42687
- AD as aq,
42742
+ AD as ap,
42743
+ ED as aq,
42688
42744
  Me as ar,
42689
42745
  Ig as as,
42690
42746
  pe as at,
42691
42747
  fe as au,
42692
42748
  Pv as av,
42693
- RD as aw,
42749
+ kD as aw,
42694
42750
  CO as ax,
42695
42751
  Na as ay,
42696
42752
  Ar as az,
42697
- FD as b,
42753
+ zD as b,
42698
42754
  fx as b$,
42699
- _D as b0,
42755
+ yD as b0,
42700
42756
  wi as b1,
42701
42757
  VC as b2,
42702
42758
  $ as b3,
@@ -42714,9 +42770,9 @@ export {
42714
42770
  Sn as bF,
42715
42771
  Es as bG,
42716
42772
  ui as bH,
42717
- TS as bI,
42773
+ T1 as bI,
42718
42774
  yg as bJ,
42719
- pD as bK,
42775
+ mD as bK,
42720
42776
  Df as bL,
42721
42777
  Tn as bM,
42722
42778
  Z0 as bN,
@@ -42733,40 +42789,40 @@ export {
42733
42789
  Cm as bY,
42734
42790
  BO as bZ,
42735
42791
  FO as b_,
42736
- vD as ba,
42737
- wD as bb,
42738
- xD as bc,
42792
+ wD as ba,
42793
+ xD as bb,
42794
+ SD as bc,
42739
42795
  nP as bd,
42740
42796
  Y0 as be,
42741
42797
  oP as bf,
42742
42798
  Ga as bg,
42743
42799
  $R as bh,
42744
- GD as bi,
42800
+ qD as bi,
42745
42801
  Ko as bj,
42746
42802
  jt as bk,
42747
42803
  EP as bl,
42748
42804
  ju as bm,
42749
42805
  cv as bn,
42750
42806
  DP as bo,
42751
- OD as bp,
42807
+ MD as bp,
42752
42808
  LP as bq,
42753
42809
  hv as br,
42754
42810
  jP as bs,
42755
42811
  BP as bt,
42756
42812
  zP as bu,
42757
- yD as bv,
42758
- bD as bw,
42813
+ bD as bv,
42814
+ vD as bw,
42759
42815
  JC as bx,
42760
42816
  eP as by,
42761
42817
  xn as bz,
42762
- zD as c,
42763
- UI as c$,
42764
- fI as c0,
42818
+ UD as c,
42819
+ NI as c$,
42820
+ pI as c0,
42765
42821
  Ea as c1,
42766
- eL as c2,
42767
- tL as c3,
42822
+ tL as c2,
42823
+ iL as c3,
42768
42824
  _x as c4,
42769
- pI as c5,
42825
+ mI as c5,
42770
42826
  ym as c6,
42771
42827
  pv as c7,
42772
42828
  KP as c8,
@@ -42777,11 +42833,11 @@ export {
42777
42833
  I0 as cD,
42778
42834
  Eu as cE,
42779
42835
  rm as cF,
42780
- dD as cG,
42836
+ uD as cG,
42781
42837
  dC as cH,
42782
42838
  fs as cI,
42783
42839
  uC as cJ,
42784
- uD as cK,
42840
+ fD as cK,
42785
42841
  D0 as cL,
42786
42842
  mC as cM,
42787
42843
  ki as cN,
@@ -42793,23 +42849,23 @@ export {
42793
42849
  he as cT,
42794
42850
  zg as cU,
42795
42851
  sR as cV,
42796
- HD as cW,
42852
+ GD as cW,
42797
42853
  nR as cX,
42798
42854
  oR as cY,
42799
42855
  rR as cZ,
42800
- AS as c_,
42856
+ A1 as c_,
42801
42857
  Ka as ca,
42802
- $D as cb,
42803
- WD as cc,
42858
+ WD as cb,
42859
+ VD as cc,
42804
42860
  LM as cd,
42805
42861
  Kf as ce,
42806
- VD as cf,
42862
+ HD as cf,
42807
42863
  zM as cg,
42808
42864
  UM as ch,
42809
- rL as ci,
42865
+ aL as ci,
42810
42866
  pr as cj,
42811
- lD as ck,
42812
- cD as cl,
42867
+ cD as ck,
42868
+ hD as cl,
42813
42869
  Tu as cm,
42814
42870
  G as cn,
42815
42871
  sC as co,
@@ -42822,73 +42878,73 @@ export {
42822
42878
  T0 as cv,
42823
42879
  Ke as cw,
42824
42880
  Lc as cx,
42825
- hD as cy,
42881
+ dD as cy,
42826
42882
  cC as cz,
42827
42883
  SM as d,
42828
42884
  uM as d$,
42829
- NI as d0,
42885
+ $I as d0,
42830
42886
  ts as d1,
42831
42887
  Mu as d2,
42832
42888
  x as d3,
42833
- $I as d4,
42889
+ WI as d4,
42834
42890
  Bd as d5,
42835
42891
  q_ as d6,
42836
- ES as d7,
42892
+ E1 as d7,
42837
42893
  v0 as d8,
42838
- WI as d9,
42839
- sD as dA,
42840
- nD as dB,
42841
- oD as dC,
42842
- FS as dD,
42843
- zS as dE,
42894
+ VI as d9,
42895
+ nD as dA,
42896
+ oD as dB,
42897
+ rD as dC,
42898
+ F1 as dD,
42899
+ z1 as dE,
42844
42900
  Y_ as dF,
42845
42901
  x0 as dG,
42846
- NS as dH,
42847
- hI as dI,
42848
- dI as dJ,
42849
- JD as dK,
42902
+ N1 as dH,
42903
+ dI,
42904
+ uI as dJ,
42905
+ eL as dK,
42850
42906
  ux as dL,
42851
- HE as dM,
42907
+ GE as dM,
42852
42908
  lu as dN,
42853
- aL as dO,
42854
- lL as dP,
42909
+ lL as dO,
42910
+ cL as dP,
42855
42911
  HP as dQ,
42856
42912
  Im as dR,
42857
42913
  $i as dS,
42858
- qD as dT,
42859
- XD as dU,
42914
+ XD as dT,
42915
+ QD as dU,
42860
42916
  Xg as dV,
42861
42917
  Dm as dW,
42862
42918
  sw as dX,
42863
42919
  nw as dY,
42864
- LD as dZ,
42920
+ jD as dZ,
42865
42921
  zh as d_,
42866
- VI as da,
42867
- IS as db,
42868
- DS as dc,
42922
+ HI as da,
42923
+ I1 as db,
42924
+ D1 as dc,
42869
42925
  Ic as dd,
42870
42926
  Ru as de,
42871
42927
  Hs as df,
42872
42928
  ku as dg,
42873
- LS as dh,
42874
- HI as di,
42929
+ L1 as dh,
42930
+ GI as di,
42875
42931
  Tr as dj,
42876
42932
  uo as dk,
42877
42933
  pg as dl,
42878
42934
  w0 as dm,
42879
42935
  q as dn,
42880
- GI as dp,
42881
- qI as dq,
42882
- XI as dr,
42883
- QI as ds,
42884
- YI as dt,
42885
- KI as du,
42886
- ZI as dv,
42887
- JI as dw,
42888
- eD as dx,
42889
- tD as dy,
42890
- iD as dz,
42891
- BD as e,
42936
+ qI as dp,
42937
+ XI as dq,
42938
+ QI as dr,
42939
+ YI as ds,
42940
+ KI as dt,
42941
+ ZI as du,
42942
+ JI as dv,
42943
+ eD as dw,
42944
+ tD as dx,
42945
+ iD as dy,
42946
+ sD as dz,
42947
+ FD as e,
42892
42948
  qg as e$,
42893
42949
  Go as e0,
42894
42950
  jv as e1,
@@ -42904,7 +42960,7 @@ export {
42904
42960
  Ja as eB,
42905
42961
  eh as eC,
42906
42962
  Mx as eD,
42907
- RI as eE,
42963
+ kI as eE,
42908
42964
  th as eF,
42909
42965
  Hv as eG,
42910
42966
  xi as eH,
@@ -42930,9 +42986,9 @@ export {
42930
42986
  $O as ea,
42931
42987
  Vy as eb,
42932
42988
  vg as ec,
42933
- mD as ed,
42989
+ gD as ed,
42934
42990
  H0 as ee,
42935
- gD as ef,
42991
+ _D as ef,
42936
42992
  $C as eg,
42937
42993
  WC as eh,
42938
42994
  G0 as ei,
@@ -42941,7 +42997,7 @@ export {
42941
42997
  I as el,
42942
42998
  _r as em,
42943
42999
  Yv as en,
42944
- TI as eo,
43000
+ AI as eo,
42945
43001
  $u as ep,
42946
43002
  ei as eq,
42947
43003
  Pi as er,
@@ -42953,7 +43009,7 @@ export {
42953
43009
  mo as ex,
42954
43010
  eu as ey,
42955
43011
  qu as ez,
42956
- jD as f,
43012
+ BD as f,
42957
43013
  tt as f$,
42958
43014
  hw as f0,
42959
43015
  Ku as f1,
@@ -43009,7 +43065,7 @@ export {
43009
43065
  vi as fo,
43010
43066
  ge as fp,
43011
43067
  Mw as fq,
43012
- kI as fr,
43068
+ TI as fr,
43013
43069
  ma as fs,
43014
43070
  Ew as ft,
43015
43071
  e_ as fu,
@@ -43018,7 +43074,7 @@ export {
43018
43074
  Ge as fx,
43019
43075
  fh as fy,
43020
43076
  hl as fz,
43021
- ID as g,
43077
+ DD as g,
43022
43078
  yl as g$,
43023
43079
  Oe as g0,
43024
43080
  Xe as g1,
@@ -43083,7 +43139,7 @@ export {
43083
43139
  lw as gx,
43084
43140
  ir as gy,
43085
43141
  _c as gz,
43086
- cL as h,
43142
+ hL as h,
43087
43143
  hh as h$,
43088
43144
  ws as h0,
43089
43145
  Vu as h1,
@@ -43148,7 +43204,7 @@ export {
43148
43204
  ns as hx,
43149
43205
  Jg as hy,
43150
43206
  Sf as hz,
43151
- JS as i,
43207
+ J1 as i,
43152
43208
  hT as i0,
43153
43209
  Zi as i1,
43154
43210
  X0 as i2,
@@ -43157,19 +43213,19 @@ export {
43157
43213
  ZC as i5,
43158
43214
  J_ as j,
43159
43215
  V as k,
43160
- mI as l,
43216
+ gI as l,
43161
43217
  Ws as m,
43162
43218
  Tv as n,
43163
43219
  CM as o,
43164
43220
  fr as p,
43165
43221
  Cw as q,
43166
- MD as r,
43222
+ RD as r,
43167
43223
  om as s,
43168
- ND as t,
43224
+ $D as t,
43169
43225
  eC as u,
43170
43226
  Ut as v,
43171
- aD as w,
43172
- VS as x,
43173
- rD as y,
43227
+ lD as w,
43228
+ V1 as x,
43229
+ aD as y,
43174
43230
  We as z
43175
43231
  };