@needle-tools/engine 4.1.0-beta.2 → 4.1.0-beta.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.
@@ -4,13 +4,13 @@ var r = (n, t, e) => (kx(n, typeof t != "symbol" ? t + "" : t, e), e), Of = (n,
4
4
  if (!t.has(n))
5
5
  throw TypeError("Cannot " + e);
6
6
  };
7
- var de = (n, t, e) => (Of(n, t, "read from private field"), e ? e.call(n) : t.get(n)), ui = (n, t, e) => {
7
+ var de = (n, t, e) => (Of(n, t, "read from private field"), e ? e.call(n) : t.get(n)), fi = (n, t, e) => {
8
8
  if (t.has(n))
9
9
  throw TypeError("Cannot add the same private member more than once");
10
10
  t instanceof WeakSet ? t.add(n) : t.set(n, e);
11
11
  }, rs = (n, t, e, i) => (Of(n, t, "write to private field"), i ? i.call(n, e) : t.set(n, e), e);
12
12
  var Uo = (n, t, e) => (Of(n, t, "access private method"), e);
13
- import { g as oe, V as v, h as pe, Q as W, P as Xs, i as ge, j as Ki, k as ms, U as ho, M as X, W as Mr, T as We, E as Lt, d as Ci, e as ri, l as ae, m as Zb, n as Jb, G as Jm, a as Se, o as e0, c as ne, L as vo, O as L, R as Rr, p as On, A as Pi, q as De, D as Oi, B as uo, r as fo, s as _u, t as Sc, u as Tx, v as Ax, w as Ex, x as Ix, F as t0, y as Kp, z as i0, H as Cc, I as yt, J as Dx, K as Lx, N as s0, X as n0, S as bu, Y as _r, Z as vu, _ as jx, $ as Mn, a0 as o0, a1 as Bx, a2 as Fx, a3 as zx, a4 as Ux, a5 as Nx, a6 as rr, b as xa, a7 as ja, a8 as Nc, a9 as Yt, aa as $x, ab as r0, ac as eg, ad as wu, ae as Rn, af as gs, C as Wx, ag as Ba, ah as Vx, ai as Hx, aj as wo, ak as Gx, al as kd, am as qx, an as Zp, ao as tg, ap as Xx, aq as xo, ar as Ly, as as ig, at as Qx, au as Yx, av as Jp, aw as sg, ax as ng, ay as Kx, az as Zx, aA as Jx, aB as eS, aC as tS, aD as iS, aE as sS, aF as nS, aG as oS, aH as rS, aI as aS, aJ as lS, aK as cS, aL as hS, aM as dS, aN as uS, aO as fS, aP as pS, aQ as mS, aR as gS, aS as jy, aT as a0, aU as yS, aV as _S, aW as bS, aX as vS, aY as wS, aZ as xS, a_ as SS, a$ as CS, b0 as By, b1 as em, b2 as PS, b3 as Fy, b4 as OS, b5 as MS, b6 as l0, b7 as RS, b8 as kS, b9 as TS, ba as AS, bb as ES, bc as IS, bd as DS, be as Pc, bf as xu, bg as og, bh as rg, bi as Su, bj as LS, bk as jS, bl as BS, bm as FS, bn as zS, bo as US, bp as NS, bq as $S, br as zy, bs as c0, bt as Td, bu as WS, bv as VS } from "./three.js";
13
+ import { g as oe, V as v, h as pe, Q as W, P as Xs, i as ge, j as Ki, k as ms, U as ho, M as X, W as Mr, T as We, E as Lt, d as Ci, e as ai, l as ae, m as Zb, n as Jb, G as Jm, a as Se, o as e0, c as ne, L as vo, O as L, R as Rr, p as Pn, A as Pi, q as De, D as Oi, B as uo, r as fo, s as _u, t as Sc, u as Tx, v as Ax, w as Ex, x as Ix, F as t0, y as Kp, z as i0, H as Cc, I as yt, J as Dx, K as Lx, N as s0, X as n0, S as bu, Y as _r, Z as vu, _ as jx, $ as On, a0 as o0, a1 as Bx, a2 as Fx, a3 as zx, a4 as Ux, a5 as Nx, a6 as rr, b as xa, a7 as ja, a8 as Nc, a9 as Kt, aa as $x, ab as r0, ac as eg, ad as wu, ae as Mn, af as gs, C as Wx, ag as Ba, ah as Vx, ai as Hx, aj as wo, ak as Gx, al as kd, am as qx, an as Zp, ao as tg, ap as Xx, aq as xo, ar as Ly, as as ig, at as Qx, au as Yx, av as Jp, aw as sg, ax as ng, ay as Kx, az as Zx, aA as Jx, aB as eS, aC as tS, aD as iS, aE as sS, aF as nS, aG as oS, aH as rS, aI as aS, aJ as lS, aK as cS, aL as hS, aM as dS, aN as uS, aO as fS, aP as pS, aQ as mS, aR as gS, aS as jy, aT as a0, aU as yS, aV as _S, aW as bS, aX as vS, aY as wS, aZ as xS, a_ as SS, a$ as CS, b0 as By, b1 as em, b2 as PS, b3 as Fy, b4 as OS, b5 as MS, b6 as l0, b7 as RS, b8 as kS, b9 as TS, ba as AS, bb as ES, bc as IS, bd as DS, be as Pc, bf as xu, bg as og, bh as rg, bi as Su, bj as LS, bk as jS, bl as BS, bm as FS, bn as zS, bo as US, bp as NS, bq as $S, br as zy, bs as c0, bt as Td, bu as WS, bv as VS } from "./three.js";
14
14
  import { c as ag, g as h0, L as Qr, N as Je, a as HS, b as GS, s as qS, d as XS } from "./gltf-progressive.js";
15
15
  import { a as Fa, F as QS, T as YS, b as KS, G as br, c as d0, E as Ad, R as tm, S as ZS, n as JS, O as u0, P as e1, H as t1, V as i1, d as f0, s as p0, z as s1, X as n1, e as o1, L as r1, f as a1, g as l1, K as c1, h as h1, I as d1, i as u1, j as f1, k as lg, l as m0, m as p1 } from "./three-examples.js";
16
16
  import { f as m1, M as g1, $ as Uy, B as y1, v as Ny, m as $y, S as g0, a as cg, c as _1, b as Mf, d as b1, P as v1, R as pn, T as Wy, C as w1, V as x1, e as S1, W as C1, g as P1, h as O1 } from "./vendor.js";
@@ -27,7 +27,7 @@ function v0(n) {
27
27
  Gy !== n && (Gy = n, b0 = new n());
28
28
  }
29
29
  const kf = /* @__PURE__ */ new Map();
30
- function li(n = ((t) => (t = globalThis.location) == null ? void 0 : t.hostname)()) {
30
+ function ci(n = ((t) => (t = globalThis.location) == null ? void 0 : t.hostname)()) {
31
31
  if (kf.has(n))
32
32
  return kf.get(n);
33
33
  const e = /(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})|localhost/.test(n);
@@ -634,7 +634,7 @@ function V1() {
634
634
  return;
635
635
  const t = n.error;
636
636
  if (t === void 0) {
637
- li() && console.warn("Received unknown error", n, n.target);
637
+ ci() && console.warn("Received unknown error", n, n.target);
638
638
  return;
639
639
  }
640
640
  Bs(2, t, n.filename, n.lineno), nm(n);
@@ -1273,7 +1273,7 @@ function j0(n, t, e, i) {
1273
1273
  return !1;
1274
1274
  if (t["material:fbx"] != null)
1275
1275
  return !0;
1276
- const s = new ri();
1276
+ const s = new ai();
1277
1277
  s["material:fbx"] = t;
1278
1278
  const o = t;
1279
1279
  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, o.shininess && (s.roughness = 1 - Math.sqrt(o.shininess) / 10), s.needsUpdate = !0), e === void 0 ? n.material = s : i[e] = s, !0;
@@ -1427,9 +1427,9 @@ class gC {
1427
1427
  return this.root = new Oe.Block(e), this.root;
1428
1428
  }
1429
1429
  }
1430
- let Xt = null;
1430
+ let Qt = null;
1431
1431
  function yC() {
1432
- Xt || (Xt = new gC()), Xt.onEnable();
1432
+ Qt || (Qt = new gC()), Qt.onEnable();
1433
1433
  for (const n in ec) {
1434
1434
  ec[n] = console[n];
1435
1435
  let t = !1;
@@ -1445,7 +1445,7 @@ function yC() {
1445
1445
  }
1446
1446
  }
1447
1447
  function _C() {
1448
- Xt == null || Xt.onDisable();
1448
+ Qt == null || Qt.onDisable();
1449
1449
  for (const n in ec)
1450
1450
  console[n] = ec[n];
1451
1451
  }
@@ -1454,13 +1454,13 @@ function B0(n, ...t) {
1454
1454
  try {
1455
1455
  switch (vl.clear(), n) {
1456
1456
  case "log":
1457
- Xt == null || Xt.addLog("log", e());
1457
+ Qt == null || Qt.addLog("log", e());
1458
1458
  break;
1459
1459
  case "warn":
1460
- Xt == null || Xt.addLog("warn", e());
1460
+ Qt == null || Qt.addLog("warn", e());
1461
1461
  break;
1462
1462
  case "error":
1463
- Xt == null || Xt.addLog("error", e());
1463
+ Qt == null || Qt.addLog("error", e());
1464
1464
  break;
1465
1465
  }
1466
1466
  } catch (o) {
@@ -1566,17 +1566,17 @@ function U() {
1566
1566
  return am;
1567
1567
  if (Lf !== void 0)
1568
1568
  return Lf;
1569
- let n = li();
1569
+ let n = ci();
1570
1570
  return n || (n = window.location.hostname.endsWith(".local-credentialless.webcontainer.io")), Lf = n, n;
1571
1571
  }
1572
1572
  function lD(n) {
1573
1573
  am = n;
1574
1574
  }
1575
- let Qt, _i = null, Fs = null, wl = !1, r_ = null;
1575
+ let Yt, _i = null, Fs = null, wl = !1, r_ = null;
1576
1576
  const F0 = "terminal", Fl = S("console"), vC = S("noerrors") || S("noconsole") || window.crossOriginIsolated;
1577
1577
  Fl && z0();
1578
- if (!vC && (Fl || li())) {
1579
- if (li() && !Fl) {
1578
+ if (!vC && (Fl || ci())) {
1579
+ if (ci() && !Fl) {
1580
1580
  const t = new URL(window.location.href);
1581
1581
  t.searchParams.set("console", "1"), console.log('🌵 Tip: You can add the "?console" query parameter to the url to show the debug console (on mobile it will automatically open in the bottom right corner when your get errors during development. In VR a spatial console will appear.)', `
1582
1582
  Open this page to get the console: ` + t.toString());
@@ -1585,7 +1585,7 @@ Open this page to get the console: ` + t.toString());
1585
1585
  if ((n || Fl) && (V1(), U0(), N0(!0), n)) {
1586
1586
  const t = document.querySelector("needle-engine");
1587
1587
  t == null || t.addEventListener("enter-ar", () => {
1588
- (Fl || Qt || ug() > 0) && S("noerrors");
1588
+ (Fl || Yt || ug() > 0) && S("noerrors");
1589
1589
  }), t == null || t.addEventListener("exit-ar", () => {
1590
1590
  PC();
1591
1591
  });
@@ -1593,14 +1593,14 @@ Open this page to get the console: ` + t.toString());
1593
1593
  }
1594
1594
  const lm = Symbol("consoleParent");
1595
1595
  function z0() {
1596
- if (Qt) {
1597
- Qt.showSwitch();
1596
+ if (Yt) {
1597
+ Yt.showSwitch();
1598
1598
  return;
1599
1599
  }
1600
1600
  N0();
1601
1601
  }
1602
1602
  function wC() {
1603
- Qt && (Qt.hide(), Qt.hideSwitch());
1603
+ Yt && (Yt.hide(), Yt.hideSwitch());
1604
1604
  }
1605
1605
  function U0() {
1606
1606
  r_ || (r_ = setInterval(xC, 500));
@@ -1620,21 +1620,21 @@ function PC() {
1620
1620
  _i && _i[lm] && _i[lm].appendChild(_i);
1621
1621
  }
1622
1622
  function N0(n = !1) {
1623
- if (Qt !== void 0 || wl)
1623
+ if (Yt !== void 0 || wl)
1624
1624
  return;
1625
1625
  wl = !0;
1626
1626
  const t = document.createElement("script");
1627
1627
  t.onload = () => {
1628
1628
  if (!globalThis.VConsole) {
1629
- console.warn("🌵 Debug console failed to load."), wl = !1, Qt = null;
1629
+ console.warn("🌵 Debug console failed to load."), wl = !1, Yt = null;
1630
1630
  return;
1631
1631
  }
1632
- wl = !1, U0(), Qt = new VConsole({
1632
+ wl = !1, U0(), Yt = new VConsole({
1633
1633
  // defaultPlugins: ['system', 'network'],
1634
1634
  pluginOrder: ["default", "needle-console"]
1635
1635
  });
1636
1636
  const e = globalThis["needle:codegen_files"];
1637
- if (e && e.length > 0 && Qt.addPlugin(OC()), _i = RC(), _i && (_i[lm] = _i.parentElement, _i.style.position = "absolute", _i.style.zIndex = Number.MAX_SAFE_INTEGER.toString()), Qt.setSwitchPosition(20, 30), Fs = MC(), Fs) {
1637
+ if (e && e.length > 0 && Yt.addPlugin(OC()), _i = RC(), _i && (_i[lm] = _i.parentElement, _i.style.position = "absolute", _i.style.zIndex = Number.MAX_SAFE_INTEGER.toString()), Yt.setSwitchPosition(20, 30), Fs = MC(), Fs) {
1638
1638
  Fs.innerText = F0, Fs.addEventListener("click", CC);
1639
1639
  const i = document.createElement("style"), s = 40;
1640
1640
  i.innerHTML = `
@@ -1699,7 +1699,7 @@ function N0(n = !1) {
1699
1699
  `, _i == null || _i.prepend(i), n === !0 && ug() <= 0 && wC(), console.log("🌵 Debug console has loaded");
1700
1700
  }
1701
1701
  }, t.onerror = () => {
1702
- console.warn("🌵 Debug console failed to load." + (window.crossOriginIsolated ? "This page is using cross-origin isolation, so external scripts can't be loaded." : "")), wl = !1, Qt = null;
1702
+ console.warn("🌵 Debug console failed to load." + (window.crossOriginIsolated ? "This page is using cross-origin isolation, so external scripts can't be loaded." : "")), wl = !1, Yt = null;
1703
1703
  }, t.src = "https://unpkg.com/vconsole@latest/dist/vconsole.min.js", document.body.appendChild(t);
1704
1704
  }
1705
1705
  function OC() {
@@ -1728,7 +1728,7 @@ function OC() {
1728
1728
  i.push({
1729
1729
  name: "Open in new window ↗",
1730
1730
  onClick: function(s) {
1731
- window.open(n.fullUrl, "_blank"), Qt == null || Qt.hide();
1731
+ window.open(n.fullUrl, "_blank"), Yt == null || Yt.hide();
1732
1732
  }
1733
1733
  }), i.push({
1734
1734
  name: "Reload",
@@ -1754,15 +1754,15 @@ function RC() {
1754
1754
  return n || null;
1755
1755
  }
1756
1756
  const $0 = S("debugdefines");
1757
- Po('if(!globalThis[""4.1.0-beta.2""]) globalThis[""4.1.0-beta.2""] = "0.0.0";');
1757
+ Po('if(!globalThis[""4.1.0-beta.3""]) globalThis[""4.1.0-beta.3""] = "0.0.0";');
1758
1758
  Po('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
1759
- Po('if(!globalThis[""Wed Jan 29 2025 17:57:39 GMT+0100 (Central European Standard Time)""]) globalThis[""Wed Jan 29 2025 17:57:39 GMT+0100 (Central European Standard Time)""] = "unknown";');
1759
+ Po('if(!globalThis[""Thu Jan 30 2025 13:38:09 GMT+0100 (Central European Standard Time)""]) globalThis[""Thu Jan 30 2025 13:38:09 GMT+0100 (Central European Standard Time)""] = "unknown";');
1760
1760
  Po('if(!globalThis[""npk_0b7230d0d7c94c5ef23003726b2e2ccfc5ec0f20d26de8f0bda29e63698f9006""]) globalThis[""npk_0b7230d0d7c94c5ef23003726b2e2ccfc5ec0f20d26de8f0bda29e63698f9006""] = "unknown";');
1761
- Po('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.1.0-beta.2";');
1761
+ Po('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.1.0-beta.3";');
1762
1762
  Po('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
1763
- Po('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Wed Jan 29 2025 17:57:39 GMT+0100 (Central European Standard Time)";');
1763
+ Po('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Thu Jan 30 2025 13:38:09 GMT+0100 (Central European Standard Time)";');
1764
1764
  Po('globalThis["__NEEDLE_PUBLIC_KEY__"] = "npk_0b7230d0d7c94c5ef23003726b2e2ccfc5ec0f20d26de8f0bda29e63698f9006";');
1765
- const $s = "4.1.0-beta.2", pg = "undefined", W0 = "Wed Jan 29 2025 17:57:39 GMT+0100 (Central European Standard Time)";
1765
+ const $s = "4.1.0-beta.3", pg = "undefined", W0 = "Thu Jan 30 2025 13:38:09 GMT+0100 (Central European Standard Time)";
1766
1766
  $0 && console.log(`Engine version: ${$s} (generator: ${pg})
1767
1767
  Project built at ${W0}`);
1768
1768
  const cd = "npk_0b7230d0d7c94c5ef23003726b2e2ccfc5ec0f20d26de8f0bda29e63698f9006", mo = "needle_isActiveInHierarchy", ra = "builtin_components", hd = "needle_editor_guid";
@@ -1880,7 +1880,7 @@ function NC(n) {
1880
1880
  }
1881
1881
  const at = S("debuginput");
1882
1882
  var _g = /* @__PURE__ */ ((n) => (n.Mouse = "mouse", n.Touch = "touch", n.Controller = "controller", n.Hand = "hand", n))(_g || {}), Ne = /* @__PURE__ */ ((n) => (n.PointerDown = "pointerdown", n.PointerUp = "pointerup", n.PointerMove = "pointermove", n.KeyDown = "keydown", n.KeyUp = "keyup", n.KeyPressed = "keypress", n))(Ne || {});
1883
- class Jn extends PointerEvent {
1883
+ class Zn extends PointerEvent {
1884
1884
  constructor(e, i, s) {
1885
1885
  super(e, s);
1886
1886
  /**
@@ -2099,7 +2099,7 @@ class $C {
2099
2099
  t.target instanceof HTMLElement && t.target.setPointerCapture(t.pointerId);
2100
2100
  const e = this.getPointerId(t);
2101
2101
  at && $e(`pointer down #${e}, identifier:${t.pointerId}`);
2102
- const i = this.getAndUpdateSpatialObjectForScreenPosition(e, t.clientX, t.clientY), s = new Jn("pointerdown", t, { origin: this, mode: "screen", deviceIndex: 0, pointerId: e, button: t.button, clientX: t.clientX, clientY: t.clientY, pointerType: t.pointerType, buttonName: this.getButtonName(t), device: i, pressure: t.pressure });
2102
+ const i = this.getAndUpdateSpatialObjectForScreenPosition(e, t.clientX, t.clientY), s = new Zn("pointerdown", t, { origin: this, mode: "screen", deviceIndex: 0, pointerId: e, button: t.button, clientX: t.clientX, clientY: t.clientY, pointerType: t.pointerType, buttonName: this.getButtonName(t), device: i, pressure: t.pressure });
2103
2103
  this.onDown(s);
2104
2104
  });
2105
2105
  r(this, "onPointerMove", (t) => {
@@ -2109,7 +2109,7 @@ class $C {
2109
2109
  t.pointerType === "mouse" && (e = this.getFirstPressedButtonForPointer(0) ?? 0);
2110
2110
  const i = this.getPointerId(t, e);
2111
2111
  e === -1 && (e = i);
2112
- const s = this.getAndUpdateSpatialObjectForScreenPosition(i, t.clientX, t.clientY), o = new Jn("pointermove", t, { origin: this, mode: "screen", deviceIndex: 0, pointerId: i, button: e, clientX: t.clientX, clientY: t.clientY, pointerType: t.pointerType, buttonName: this.getButtonName(t), device: s, pressure: t.pressure });
2112
+ const s = this.getAndUpdateSpatialObjectForScreenPosition(i, t.clientX, t.clientY), o = new Zn("pointermove", t, { origin: this, mode: "screen", deviceIndex: 0, pointerId: i, button: e, clientX: t.clientX, clientY: t.clientY, pointerType: t.pointerType, buttonName: this.getButtonName(t), device: s, pressure: t.pressure });
2113
2113
  this.onMove(o);
2114
2114
  });
2115
2115
  r(this, "onPointerCancel", (t) => {
@@ -2119,28 +2119,28 @@ class $C {
2119
2119
  if (this.context.isInAR)
2120
2120
  return;
2121
2121
  t.target instanceof HTMLElement && t.target.releasePointerCapture(t.pointerId);
2122
- const e = this.getPointerId(t), i = new Jn("pointerup", t, { origin: this, mode: "screen", deviceIndex: 0, pointerId: e, button: t.button, clientX: t.clientX, clientY: t.clientY, pointerType: t.pointerType, buttonName: this.getButtonName(t), device: this.getAndUpdateSpatialObjectForScreenPosition(e, t.clientX, t.clientY), pressure: t.pressure });
2122
+ const e = this.getPointerId(t), i = new Zn("pointerup", t, { origin: this, mode: "screen", deviceIndex: 0, pointerId: e, button: t.button, clientX: t.clientX, clientY: t.clientY, pointerType: t.pointerType, buttonName: this.getButtonName(t), device: this.getAndUpdateSpatialObjectForScreenPosition(e, t.clientX, t.clientY), pressure: t.pressure });
2123
2123
  this.onUp(i), this._pointerIds[e] = -1, at && console.log("ID=" + e, "PointerId=" + t.pointerId, "ALL:", [...this._pointerIds]);
2124
2124
  });
2125
2125
  // the touch events are currently only used for AR support on android
2126
2126
  r(this, "onTouchStart", (t) => {
2127
2127
  if (this.context.isInAR)
2128
2128
  for (let e = 0; e < t.changedTouches.length; e++) {
2129
- const i = t.changedTouches[e], s = this.getPointerIndex(i.identifier), o = this.getAndUpdateSpatialObjectForScreenPosition(s, i.clientX, i.clientY), a = new Jn("pointerdown", t, { origin: this, mode: "screen", deviceIndex: 0, pointerId: s, button: 0, clientX: i.clientX, clientY: i.clientY, pointerType: "touch", buttonName: "unknown", device: o, pressure: i.force });
2129
+ const i = t.changedTouches[e], s = this.getPointerIndex(i.identifier), o = this.getAndUpdateSpatialObjectForScreenPosition(s, i.clientX, i.clientY), a = new Zn("pointerdown", t, { origin: this, mode: "screen", deviceIndex: 0, pointerId: s, button: 0, clientX: i.clientX, clientY: i.clientY, pointerType: "touch", buttonName: "unknown", device: o, pressure: i.force });
2130
2130
  this.onDown(a);
2131
2131
  }
2132
2132
  });
2133
2133
  r(this, "onTouchMove", (t) => {
2134
2134
  if (this.context.isInAR)
2135
2135
  for (let e = 0; e < t.changedTouches.length; e++) {
2136
- const i = t.changedTouches[e], s = this.getPointerIndex(i.identifier), o = this.getAndUpdateSpatialObjectForScreenPosition(s, i.clientX, i.clientY), a = new Jn("pointermove", t, { origin: this, mode: "screen", deviceIndex: 0, pointerId: s, button: 0, clientX: i.clientX, clientY: i.clientY, pointerType: "touch", buttonName: "unknown", device: o, pressure: i.force });
2136
+ const i = t.changedTouches[e], s = this.getPointerIndex(i.identifier), o = this.getAndUpdateSpatialObjectForScreenPosition(s, i.clientX, i.clientY), a = new Zn("pointermove", t, { origin: this, mode: "screen", deviceIndex: 0, pointerId: s, button: 0, clientX: i.clientX, clientY: i.clientY, pointerType: "touch", buttonName: "unknown", device: o, pressure: i.force });
2137
2137
  this.onMove(a);
2138
2138
  }
2139
2139
  });
2140
2140
  r(this, "onTouchEnd", (t) => {
2141
2141
  if (this.context.isInAR)
2142
2142
  for (let e = 0; e < t.changedTouches.length; e++) {
2143
- const i = t.changedTouches[e], s = this.getPointerIndex(i.identifier), o = new Jn("pointerup", t, { origin: this, mode: "screen", deviceIndex: 0, pointerId: s, button: 0, clientX: i.clientX, clientY: i.clientY, pointerType: "touch", buttonName: "unknown", device: this.getAndUpdateSpatialObjectForScreenPosition(s, i.clientX, i.clientY), pressure: i.force });
2143
+ const i = t.changedTouches[e], s = this.getPointerIndex(i.identifier), o = new Zn("pointerup", t, { origin: this, mode: "screen", deviceIndex: 0, pointerId: s, button: 0, clientX: i.clientX, clientY: i.clientY, pointerType: "touch", buttonName: "unknown", device: this.getAndUpdateSpatialObjectForScreenPosition(s, i.clientX, i.clientY), pressure: i.force });
2144
2144
  this.onUp(o), this._pointerIds[s] = -1;
2145
2145
  }
2146
2146
  });
@@ -2202,7 +2202,7 @@ class $C {
2202
2202
  d.options.once && (c.listeners.splice(h, 1), h--), d.callback(t);
2203
2203
  }
2204
2204
  }
2205
- if (t instanceof Jn) {
2205
+ if (t instanceof Zn) {
2206
2206
  const l = this._eventListeners[t.type];
2207
2207
  if (l)
2208
2208
  for (const c of l) {
@@ -2654,7 +2654,7 @@ class VC {
2654
2654
  return this.gameObject.visible;
2655
2655
  }
2656
2656
  }
2657
- const Cs = S("debugwebxr"), Ch = S("debugcustomgesture"), HC = "https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles", GC = "generic-trigger", qC = new W().setFromEuler(new Lt(On.degToRad(0), On.degToRad(-90), On.degToRad(-90))), XC = new v(0.04, -0.04, 0);
2657
+ const Cs = S("debugwebxr"), Ch = S("debugcustomgesture"), HC = "https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles", GC = "generic-trigger", qC = new W().setFromEuler(new Lt(Pn.degToRad(0), Pn.degToRad(-90), Pn.degToRad(-90))), XC = new v(0.04, -0.04, 0);
2658
2658
  class q0 {
2659
2659
  constructor(t, e, i) {
2660
2660
  /** the Needle XR Session */
@@ -3262,7 +3262,7 @@ Pinch: ${(o = this.getGesture("pinch")) == null ? void 0 : o.value.toFixed(3)}`)
3262
3262
  if (this.xr.mode === "immersive-vr" || this.xr.isPassThrough) {
3263
3263
  this.pointerInit.origin = this, this.pointerInit.pointerId = this.getPointerId(e), this.pointerInit.pointerType = this.hand ? "hand" : "controller", this.pointerInit.button = e, this.pointerInit.buttonName = i, this.pointerInit.isPrimary = s, this.pointerInit.mode = this.inputSource.targetRayMode, this.pointerInit.ray = this.ray, this.pointerInit.device = this.object, this.pointerInit.pressure = a, this.pointerInit.clientX = this._rayPosition.x / this.xr.rigScale, this.pointerInit.clientY = this._rayPosition.y / this.xr.rigScale, this.pointerInit.clientZ = this._rayPosition.z / this.xr.rigScale;
3264
3264
  const l = J.Current;
3265
- J.Current = this.xr.context, Cs && t !== "pointermove" && console.warn("Pointer event", t, e, i, { ...this.pointerInit }), this.xr.context.input.createInputEvent(new Jn(t, o, this.pointerInit)), J.Current = l;
3265
+ J.Current = this.xr.context, Cs && t !== "pointermove" && console.warn("Pointer event", t, e, i, { ...this.pointerInit }), this.xr.context.input.createInputEvent(new Zn(t, o, this.pointerInit)), J.Current = l;
3266
3266
  }
3267
3267
  }
3268
3268
  }
@@ -3293,7 +3293,7 @@ class d_ {
3293
3293
  }
3294
3294
  const Pa = /* @__PURE__ */ new Map(), ma = /* @__PURE__ */ new Map();
3295
3295
  let u_ = 0;
3296
- function jn(n, t, e) {
3296
+ function Ln(n, t, e) {
3297
3297
  if (Pa.has(t) || Pa.set(t, new Array()), Pa.get(t).push({
3298
3298
  method: n,
3299
3299
  options: { once: !1, ...e }
@@ -3482,8 +3482,8 @@ class eP extends JC {
3482
3482
  }
3483
3483
  var Is = /* @__PURE__ */ ((n) => (n[n.OnConnection = 0] = "OnConnection", n[n.OnRoomJoin = 1] = "OnRoomJoin", n[n.Queued = 2] = "Queued", n[n.Immediate = 3] = "Immediate", n))(Is || {});
3484
3484
  const g_ = "https://urls.needle.tools/default-networking-backend/index";
3485
- let ti = "wss://networking.needle.tools/socket";
3486
- const mi = !!S("debugnet"), Oh = !!(mi || S("debugowner")), Bf = S("debugnetbin");
3485
+ let ii = "wss://networking.needle.tools/socket";
3486
+ const gi = !!S("debugnet"), Oh = !!(gi || S("debugowner")), Bf = S("debugnetbin");
3487
3487
  var tP = /* @__PURE__ */ ((n) => (n.ConnectionInfo = "connection-start-info", n))(tP || {}), 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 || {});
3488
3488
  class mD {
3489
3489
  constructor() {
@@ -3616,7 +3616,7 @@ class sP {
3616
3616
  * To see all networking messages in the console use `?debugnet` in the url
3617
3617
  */
3618
3618
  get isDebugEnabled() {
3619
- return mi;
3619
+ return gi;
3620
3620
  }
3621
3621
  /** True when connected to the networking backend */
3622
3622
  get isConnected() {
@@ -3679,7 +3679,7 @@ class sP {
3679
3679
  }
3680
3680
  /** Joins a networked room. If you don't want to manage a connection yourself you can use a `SyncedRoom` component as well */
3681
3681
  joinRoom(t, e = !1) {
3682
- return t ? t.length > 1024 ? (console.error('Room name too long, can not join: "' + t + '". Max length is 1024 characters.'), !1) : (this.connect(), mi && console.log("join: " + t), this.send("join-room", { room: t, viewOnly: e }, Is.OnConnection), !0) : (console.error('Missing room name, can not join: "' + t + '"'), !1);
3682
+ return t ? t.length > 1024 ? (console.error('Room name too long, can not join: "' + t + '". Max length is 1024 characters.'), !1) : (this.connect(), gi && console.log("join: " + t), this.send("join-room", { room: t, viewOnly: e }, Is.OnConnection), !0) : (console.error('Missing room name, can not join: "' + t + '"'), !1);
3683
3683
  }
3684
3684
  /** Use to leave a room that you are currently connected to (use `leaveRoom()` to disconnect from the currently active room but you can also specify a room name) */
3685
3685
  leaveRoom(t = null) {
@@ -3721,7 +3721,7 @@ class sP {
3721
3721
  const a = this.toMessage(o.key, o.value);
3722
3722
  this._defaultMessagesBufferArray.push(a);
3723
3723
  }
3724
- if (this._defaultMessagesBuffer.length = 0, this._defaultMessagesBufferArray.length > 0 && mi && console.log("SEND BUFFERED", this._defaultMessagesBufferArray.length), this._defaultMessagesBufferArray.length <= 0)
3724
+ if (this._defaultMessagesBuffer.length = 0, this._defaultMessagesBufferArray.length > 0 && gi && console.log("SEND BUFFERED", this._defaultMessagesBufferArray.length), this._defaultMessagesBufferArray.length <= 0)
3725
3725
  return;
3726
3726
  const e = JSON.stringify(this._defaultMessagesBufferArray);
3727
3727
  (i = this._ws) == null || i.send(e);
@@ -3799,18 +3799,18 @@ class sP {
3799
3799
  /** Used to connect to the networking server */
3800
3800
  async connect(t) {
3801
3801
  var i;
3802
- if (this.connected && t && t !== ti)
3802
+ if (this.connected && t && t !== ii)
3803
3803
  return Promise.reject("Can not connect to different server url. Please disconnect first.");
3804
3804
  if (this.connected)
3805
3805
  return Promise.resolve(!0);
3806
3806
  t && console.debug("Connecting to user provided url " + t);
3807
3807
  const e = t || ((i = this.netWebSocketUrlProvider) == null ? void 0 : i.getWebsocketUrl());
3808
- return e ? ti = e : k1() && (ti = "wss://" + window.location.host + "/socket"), this.connectWebsocket();
3808
+ return e ? ii = e : k1() && (ii = "wss://" + window.location.host + "/socket"), this.connectWebsocket();
3809
3809
  }
3810
3810
  /** Used to disconnect from the networking server */
3811
3811
  disconnect() {
3812
3812
  var t;
3813
- (t = this._ws) == null || t.close(), this._ws = void 0, ti = void 0;
3813
+ (t = this._ws) == null || t.close(), this._ws = void 0, ii = void 0;
3814
3814
  }
3815
3815
  connectWebsocket() {
3816
3816
  return this._connectingToWebsocketPromise ? this._connectingToWebsocketPromise : this._connectingToWebsocketPromise = new Promise(async (t, e) => {
@@ -3819,19 +3819,19 @@ class sP {
3819
3819
  const s = (u) => {
3820
3820
  i || (i = !0, t(u));
3821
3821
  };
3822
- if (ti === void 0 && (console.log("Fetch default backend url: " + g_), ti = await (await fetch(g_)).text()), ti === void 0) {
3822
+ if (ii === void 0 && (console.log("Fetch default backend url: " + g_), ii = await (await fetch(g_)).text()), ii === void 0) {
3823
3823
  s(!1);
3824
3824
  return;
3825
3825
  }
3826
3826
  console.debug(`⊡ Connecting to networking backend on
3827
- ` + ti);
3828
- const o = await import("./vendor.js").then((u) => u.j), a = ((h = o.default) == null ? void 0 : h.WebsocketBuilder) ?? o.WebsocketBuilder, l = ((d = o.default) == null ? void 0 : d.ExponentialBackoff) ?? o.ExponentialBackoff, c = new a(ti).withMaxRetries(10).withBackoff(new l(2e3, 4)).onOpen(() => {
3829
- this._connectingToWebsocketPromise = null, this._ws = c, this.connected = !0, U() || mi ? console.log(`⊞ Connected to networking backend
3830
- ` + ti) : console.debug("⊞ Connected to networking backend", ti), s(!0), this.onSendQueued(Is.OnConnection);
3827
+ ` + ii);
3828
+ const o = await import("./vendor.js").then((u) => u.j), a = ((h = o.default) == null ? void 0 : h.WebsocketBuilder) ?? o.WebsocketBuilder, l = ((d = o.default) == null ? void 0 : d.ExponentialBackoff) ?? o.ExponentialBackoff, c = new a(ii).withMaxRetries(10).withBackoff(new l(2e3, 4)).onOpen(() => {
3829
+ this._connectingToWebsocketPromise = null, this._ws = c, this.connected = !0, U() || gi ? console.log(`⊞ Connected to networking backend
3830
+ ` + ii) : console.debug("⊞ Connected to networking backend", ii), s(!0), this.onSendQueued(Is.OnConnection);
3831
3831
  }).onClose((u) => {
3832
3832
  this._connectingToWebsocketPromise = null, this.connected = !1, this._isInRoom = !1, s(!1);
3833
3833
  let p = "Websocket connection closed...";
3834
- ti != null && ti.includes("/socket") || (p += ' Do you perhaps mean to connect to "/socket"?'), console.error(p);
3834
+ ii != null && ii.includes("/socket") || (p += ' Do you perhaps mean to connect to "/socket"?'), console.error(p);
3835
3835
  }).onError((u) => {
3836
3836
  console.error("⊠ Websocket connection failed..."), s(!1);
3837
3837
  }).onRetry(() => {
@@ -3857,7 +3857,7 @@ class sP {
3857
3857
  this.handleIncomingStringMessage(s);
3858
3858
  return;
3859
3859
  } catch (s) {
3860
- mi && i === "pong" ? console.log("<<", i) : U() && console.error("Failed to parse message", s);
3860
+ gi && i === "pong" ? console.log("<<", i) : U() && console.error("Failed to parse message", s);
3861
3861
  }
3862
3862
  }
3863
3863
  async handleIncomingBinaryMessage(t) {
@@ -3873,7 +3873,7 @@ class sP {
3873
3873
  }
3874
3874
  handleIncomingStringMessage(t) {
3875
3875
  var s, o;
3876
- if (mi && console.log("<<", t.key ?? t), t.key)
3876
+ if (gi && console.log("<<", t.key ?? t), t.key)
3877
3877
  switch (t.key) {
3878
3878
  case "connection-start-info":
3879
3879
  if (t.data) {
@@ -3887,7 +3887,7 @@ class sP {
3887
3887
  console.warn("Expected connection id in " + t.key);
3888
3888
  break;
3889
3889
  case "joined-room":
3890
- if (mi && console.log(t), t) {
3890
+ if (gi && console.log(t), t) {
3891
3891
  this._isInRoom = !0;
3892
3892
  const c = t;
3893
3893
  this._currentRoomName = c.room, this._currentRoomViewId = c.viewId, this._currentRoomAllowEditing = c.allowEditing ?? !0, this._currentInRoom.length = 0, this._currentInRoom.push(...c.inRoom), (Bf || U()) && console.debug("Joined Needle Engine Room: " + c.room);
@@ -3903,22 +3903,22 @@ ${h.href}`);
3903
3903
  case "user-joined-room":
3904
3904
  if (t.data) {
3905
3905
  const c = t.data;
3906
- this._currentInRoom.push(c.userId), mi && console.log(c.userId + " joined", "now in room:", this._currentInRoom);
3906
+ this._currentInRoom.push(c.userId), gi && console.log(c.userId + " joined", "now in room:", this._currentInRoom);
3907
3907
  }
3908
3908
  break;
3909
3909
  case "user-left-room":
3910
3910
  if (t.data) {
3911
3911
  const c = t.data, h = this._currentInRoom.indexOf(c.userId);
3912
- h >= 0 && (mi && console.log(c.userId + " left", "now in room:", this._currentInRoom), this._currentInRoom.splice(h, 1)), c.userId === this.connectionId && console.log("you left the room");
3912
+ h >= 0 && (gi && console.log(c.userId + " left", "now in room:", this._currentInRoom), this._currentInRoom.splice(h, 1)), c.userId === this.connectionId && console.log("you left the room");
3913
3913
  }
3914
3914
  break;
3915
3915
  case "all-room-state-deleted":
3916
- mi && console.log("RECEIVED all-room-state-deleted"), this._state = {};
3916
+ gi && console.log("RECEIVED all-room-state-deleted"), this._state = {};
3917
3917
  break;
3918
3918
  case "ping":
3919
3919
  case "pong":
3920
3920
  const l = (s = t.data) == null ? void 0 : s.time;
3921
- l && (this._currentDelay = this.context.time.time - l), mi && console.log("Current latency: " + this._currentDelay.toFixed(4) + " sec", "Clients in room: " + ((o = this._currentInRoom) == null ? void 0 : o.length));
3921
+ l && (this._currentDelay = this.context.time.time - l), gi && console.log("Current latency: " + this._currentDelay.toFixed(4) + " sec", "Clients in room: " + ((o = this._currentInRoom) == null ? void 0 : o.length));
3922
3922
  break;
3923
3923
  }
3924
3924
  const e = t.data;
@@ -3947,7 +3947,7 @@ ${h.href}`);
3947
3947
  return;
3948
3948
  }
3949
3949
  const s = JSON.stringify(this.toMessage(t, e));
3950
- mi && console.log(">>", t), this._ws.send(s);
3950
+ gi && console.log(">>", t), this._ws.send(s);
3951
3951
  }
3952
3952
  onSendQueued(t) {
3953
3953
  const e = this._waitingForSocket[t];
@@ -4140,7 +4140,7 @@ class Tr {
4140
4140
  let i = null;
4141
4141
  const s = (e == null ? void 0 : e.font) || rP((e == null ? void 0 : e.familyFamily) || null);
4142
4142
  s instanceof QS ? i = Uo(this, Bc, dm).call(this, t, s, e) : i == null && (i = new uo());
4143
- const o = (e == null ? void 0 : e.color) || 16777215, a = new X(i, (e == null ? void 0 : e.material) ?? new ri({ color: o }));
4143
+ const o = (e == null ? void 0 : e.color) || 16777215, a = new X(i, (e == null ? void 0 : e.material) ?? new ai({ color: o }));
4144
4144
  return this.applyDefaultObjectOptions(a, e), s instanceof Promise ? s.then((l) => {
4145
4145
  a.geometry = Uo(this, Bc, dm).call(this, t, l, e), e != null && e.onGeometry && e.onGeometry(a);
4146
4146
  }) : e != null && e.onGeometry && e.onGeometry(a), a;
@@ -4161,28 +4161,28 @@ class Tr {
4161
4161
  case "Quad":
4162
4162
  case 0:
4163
4163
  {
4164
- const o = new Xs(1, 1, 1, 1), a = (e == null ? void 0 : e.material) ?? new ri({ color: s });
4164
+ const o = new Xs(1, 1, 1, 1), a = (e == null ? void 0 : e.material) ?? new ai({ color: s });
4165
4165
  e != null && e.texture && "map" in a && (a.map = e.texture), i = new X(o, a), i.name = "Quad";
4166
4166
  }
4167
4167
  break;
4168
4168
  case "Cube":
4169
4169
  case 1:
4170
4170
  {
4171
- const o = new Sc(1, 1, 1), a = (e == null ? void 0 : e.material) ?? new ri({ color: s });
4171
+ const o = new Sc(1, 1, 1), a = (e == null ? void 0 : e.material) ?? new ai({ color: s });
4172
4172
  e != null && e.texture && "map" in a && (a.map = e.texture), i = new X(o, a), i.name = "Cube";
4173
4173
  }
4174
4174
  break;
4175
4175
  case 10:
4176
4176
  case "RoundedCube":
4177
4177
  {
4178
- const o = oP(1, 1, 1, 0.1, 2), a = (e == null ? void 0 : e.material) ?? new ri({ color: s });
4178
+ const o = oP(1, 1, 1, 0.1, 2), a = (e == null ? void 0 : e.material) ?? new ai({ color: s });
4179
4179
  e != null && e.texture && "map" in a && (a.map = e.texture), i = new X(o, a), i.name = "RoundedCube";
4180
4180
  }
4181
4181
  break;
4182
4182
  case "Sphere":
4183
4183
  case 2:
4184
4184
  {
4185
- const o = new _u(0.5, 16, 16), a = (e == null ? void 0 : e.material) ?? new ri({ color: s });
4185
+ const o = new _u(0.5, 16, 16), a = (e == null ? void 0 : e.material) ?? new ai({ color: s });
4186
4186
  e != null && e.texture && "map" in a && (a.map = e.texture), i = new X(o, a), i.name = "Sphere";
4187
4187
  }
4188
4188
  break;
@@ -4219,7 +4219,7 @@ Bc = new WeakSet(), dm = function(t, e, i) {
4219
4219
  bevelOffset: 0.01,
4220
4220
  bevelSize: 0.01
4221
4221
  });
4222
- }, ui(Tr, Bc);
4222
+ }, fi(Tr, Bc);
4223
4223
  function oP(n, t, e, i, s) {
4224
4224
  const o = new Ex(), a = 1e-5, l = i - a;
4225
4225
  o.absarc(a, a, a, -Math.PI / 2, -Math.PI, !0), o.absarc(a, t - l * 2, a, Math.PI, Math.PI / 2, !0), o.absarc(n - l * 2, t - l * 2, a, Math.PI / 2, 0, !0), o.absarc(n - l * 2, a, a, 0, -Math.PI / 2, !0);
@@ -4285,7 +4285,7 @@ function aP(n, t) {
4285
4285
  function __(n, t) {
4286
4286
  var i;
4287
4287
  if ((t == null ? void 0 : t.color) || (t == null ? void 0 : t.material) || (t == null ? void 0 : t.texture)) {
4288
- const s = (t == null ? void 0 : t.material) ?? ((i = n.material) == null ? void 0 : i.clone()) ?? new ri();
4288
+ const s = (t == null ? void 0 : t.material) ?? ((i = n.material) == null ? void 0 : i.clone()) ?? new ai();
4289
4289
  t.color && "color" in s && s.color instanceof ae && s.color.set(t.color), t != null && t.texture && "map" in s && (s.map = t.texture), n.material = s;
4290
4290
  }
4291
4291
  }
@@ -4368,7 +4368,7 @@ const Py = class {
4368
4368
  i.position.set(0, 2, 0), i.castShadow = !1, i.distance = 200, this._scene.add(i);
4369
4369
  const s = 50;
4370
4370
  for (let o = 0; o < 100; o++) {
4371
- const a = new ri({
4371
+ const a = new ai({
4372
4372
  color: 2236962,
4373
4373
  metalness: 1,
4374
4374
  roughness: 0.8
@@ -4699,7 +4699,7 @@ const mn = class {
4699
4699
  // TODO: for scene transitions (e.g. SceneSwitcher) where creating the scene might take a few moments we might want more control over when/how this fading occurs and how long the scene stays black
4700
4700
  r(this, "_transition");
4701
4701
  var o, a;
4702
- performance.mark(v_), hP(t, s.init), this.session = e, this.mode = t, this.context = i, (mt || S("console")) && Sa(!0), this._xr_scripts = [...s.scripts], this._xr_update_scripts = this._xr_scripts.filter((l) => typeof l.onUpdateXR == "function"), this._controllerAdded = s.controller_added, this._controllerRemoved = s.controller_removed, jn(this.onBefore, Ce.LateUpdate), this.context.pre_render_callbacks.push(this.onBeforeRender), this.context.post_render_callbacks.push(this.onAfterRender), ((o = s.init.optionalFeatures) != null && o.includes("hit-test") || (a = s.init.requiredFeatures) != null && a.includes("hit-test")) && e.requestReferenceSpace("viewer").then((l) => {
4702
+ performance.mark(v_), hP(t, s.init), this.session = e, this.mode = t, this.context = i, (mt || S("console")) && Sa(!0), this._xr_scripts = [...s.scripts], this._xr_update_scripts = this._xr_scripts.filter((l) => typeof l.onUpdateXR == "function"), this._controllerAdded = s.controller_added, this._controllerRemoved = s.controller_removed, Ln(this.onBefore, Ce.LateUpdate), this.context.pre_render_callbacks.push(this.onBeforeRender), this.context.post_render_callbacks.push(this.onAfterRender), ((o = s.init.optionalFeatures) != null && o.includes("hit-test") || (a = s.init.requiredFeatures) != null && a.includes("hit-test")) && e.requestReferenceSpace("viewer").then((l) => {
4703
4703
  var c, h;
4704
4704
  return (h = (c = e.requestHitTestSource) == null ? void 0 : c.call(e, { space: l })) == null ? void 0 : h.then((d) => this._viewerHitTestSource = d).catch((d) => console.error(d));
4705
4705
  }).catch((l) => console.error(l)), this.context.mainCamera && (this._originalCameraWorldPosition = ee(this.context.mainCamera, new v()), this._originalCameraWorldRotation = xe(this.context.mainCamera, new W()), this._originalCameraWorldScale = Ie(this.context.mainCamera, new v()), this._originalCameraParent = this.context.mainCamera.parent), this._defaultRig = new VC(), this.context.scene.add(this._defaultRig.gameObject), this.addRig(this._defaultRig);
@@ -5588,7 +5588,7 @@ class Ae {
5588
5588
  // private static createdLines: number = 0;
5589
5589
  r(Ae, "familyName", "needle-gizmos"), r(Ae, "linesCache", []), r(Ae, "circlesCache", []), r(Ae, "spheresCache", []), r(Ae, "boxesCache", []), r(Ae, "arrowHeadsCache", []), r(Ae, "mesh", []), r(Ae, "textLabelCache", []), r(Ae, "timedObjectsBuffer", new Array()), r(Ae, "timesBuffer", new Array()), r(Ae, "contextPostRenderCallbacks", /* @__PURE__ */ new Map()), r(Ae, "contextBeforeRenderCallbacks", /* @__PURE__ */ new Map()), r(Ae, "tmuiNeedsUpdate", !1);
5590
5590
  const bi = S("debugphysics"), P_ = new vo();
5591
- class En {
5591
+ class An {
5592
5592
  constructor() {
5593
5593
  r(this, "ray");
5594
5594
  r(this, "cam");
@@ -5619,7 +5619,7 @@ class En {
5619
5619
  e ? e.mask = t : this.layerMask = t;
5620
5620
  }
5621
5621
  }
5622
- r(En, "AllLayers", 4294967295);
5622
+ r(An, "AllLayers", 4294967295);
5623
5623
  class J0 {
5624
5624
  constructor(t, e, i) {
5625
5625
  r(this, "distance");
@@ -5634,7 +5634,7 @@ const lu = class {
5634
5634
  r(this, "engine");
5635
5635
  // raycasting
5636
5636
  r(this, "raycaster", new vu());
5637
- r(this, "defaultRaycastOptions", new En());
5637
+ r(this, "defaultRaycastOptions", new An());
5638
5638
  r(this, "targetBuffer", new Array(1));
5639
5639
  r(this, "defaultThresholds", {
5640
5640
  Mesh: {},
@@ -5992,7 +5992,7 @@ function Te(n) {
5992
5992
  }
5993
5993
  if (n[sv] = !0, n instanceof Ki)
5994
5994
  Te(n.environment), Te(n.background), Te(n.customDepthMaterial), Te(n.customDistanceMaterial);
5995
- else if (n instanceof Mn)
5995
+ else if (n instanceof On)
5996
5996
  Te(n.geometry), Te(n.material), Te(n.skeleton), Te(n.bindMatrix), Te(n.bindMatrixInverse), Te(n.customDepthMaterial), Te(n.customDistanceMaterial), n.geometry = null, n.material = null, n.visible = !1;
5997
5997
  else if (n instanceof X)
5998
5998
  Te(n.geometry), Te(n.material), Te(n.customDepthMaterial), Te(n.customDistanceMaterial), n.geometry = null, n.material = null, n.visible = !1;
@@ -6027,7 +6027,7 @@ function Yr(n) {
6027
6027
  n && ((lr || ev() || Au) && console.warn("🧨 FREE", n), n instanceof ImageBitmap ? n.close() : n instanceof zx ? n.data = null : n.dispose());
6028
6028
  }
6029
6029
  function wP(n) {
6030
- (n instanceof X || n instanceof Mn) && (n.material = null, n.geometry = null);
6030
+ (n instanceof X || n instanceof On) && (n.material = null, n.geometry = null);
6031
6031
  }
6032
6032
  const xP = /* @__PURE__ */ new Set();
6033
6033
  function nv(n, t, e = null, i) {
@@ -6761,7 +6761,7 @@ class ss {
6761
6761
  }
6762
6762
  class XP {
6763
6763
  constructor() {
6764
- r(this, "isDevMode", li());
6764
+ r(this, "isDevMode", ci());
6765
6765
  r(this, "cache", {});
6766
6766
  }
6767
6767
  /** only call when assigning values for the very first time */
@@ -6873,7 +6873,7 @@ function _m(n, t, e) {
6873
6873
  const YP = S("noerrors");
6874
6874
  function KP(n, t, e) {
6875
6875
  var o, a;
6876
- if (YP || !t || !li() || !n || n.constructor && n.constructor[UP] === !0)
6876
+ if (YP || !t || !ci() || !n || n.constructor && n.constructor[UP] === !0)
6877
6877
  return;
6878
6878
  const i = (o = n.constructor) == null ? void 0 : o.name, s = Object.getOwnPropertyNames(t);
6879
6879
  for (const l of s) {
@@ -7830,7 +7830,7 @@ var Ga;
7830
7830
  }
7831
7831
  n.download = h;
7832
7832
  })(Ga || (Ga = {}));
7833
- const Gn = S("debugaddressables");
7833
+ const Hn = S("debugaddressables");
7834
7834
  class yO {
7835
7835
  /** @internal */
7836
7836
  constructor(t) {
@@ -7909,7 +7909,7 @@ const qf = Symbol("assetReference"), Zo = class {
7909
7909
  } else
7910
7910
  i = t.context, t = t.sourceId;
7911
7911
  const s = kr(t, e);
7912
- Gn && console.log("GetOrCreate Addressable from", t, e, "FinalPath=", s);
7912
+ Hn && console.log("GetOrCreate Addressable from", t, e, "FinalPath=", s);
7913
7913
  const o = i.addressables, a = o.findAssetReference(s);
7914
7914
  if (a)
7915
7915
  return a;
@@ -7957,7 +7957,7 @@ const qf = Symbol("assetReference"), Zo = class {
7957
7957
  }
7958
7958
  /** frees previously allocated memory and destroys the current `asset` instance (if any) */
7959
7959
  unload() {
7960
- this.asset && (Gn && console.log("Unload", this.asset), this.asset.scene && es(this.asset.scene, !0, !0), es(this.asset, !0, !0)), this.asset = null, this._rawBinary = void 0, this._glbRoot = null, this._loading = void 0, J.Current && J.Current.addressables.unregisterAssetReference(this);
7960
+ this.asset && (Hn && console.log("Unload", this.asset), this.asset.scene && es(this.asset.scene, !0, !0), es(this.asset, !0, !0)), this.asset = null, this._rawBinary = void 0, this._glbRoot = null, this._loading = void 0, J.Current && J.Current.addressables.unregisterAssetReference(this);
7961
7961
  }
7962
7962
  /** loads the asset binary without creating an instance */
7963
7963
  async preload() {
@@ -7965,7 +7965,7 @@ const qf = Symbol("assetReference"), Zo = class {
7965
7965
  return null;
7966
7966
  if (this._rawBinary !== void 0)
7967
7967
  return this._rawBinary;
7968
- this._isLoadingRawBinary = !0, Gn && console.log("Preload", this._hashedUri);
7968
+ this._isLoadingRawBinary = !0, Hn && console.log("Preload", this._hashedUri);
7969
7969
  const t = await Ga.download(this._hashedUri, (e) => {
7970
7970
  this.raiseProgressEvent(e);
7971
7971
  });
@@ -7976,12 +7976,12 @@ const qf = Symbol("assetReference"), Zo = class {
7976
7976
  * @returns the loaded asset
7977
7977
  */
7978
7978
  async loadAssetAsync(t) {
7979
- if (Gn && console.log("loadAssetAsync", this.url), !this.mustLoad)
7979
+ if (Hn && console.log("loadAssetAsync", this.url), !this.mustLoad)
7980
7980
  return this.asset;
7981
7981
  if (t && this._progressListeners.push(t), this._loading !== void 0)
7982
7982
  return this._loading.then((s) => this.asset);
7983
7983
  const e = J.Current;
7984
- this._rawBinary ? (this._loading = Hs().parseSync(e, this._rawBinary, this.url, null), this.raiseProgressEvent(new ProgressEvent("progress", { loaded: this._rawBinary.byteLength, total: this._rawBinary.byteLength }))) : (Gn && console.log("Load async", this.url), this._loading = Hs().loadSync(e, this._hashedUri, this.url, null, (s) => {
7984
+ this._rawBinary ? (this._loading = Hs().parseSync(e, this._rawBinary, this.url, null), this.raiseProgressEvent(new ProgressEvent("progress", { loaded: this._rawBinary.byteLength, total: this._rawBinary.byteLength }))) : (Hn && console.log("Load async", this.url), this._loading = Hs().loadSync(e, this._hashedUri, this.url, null, (s) => {
7985
7985
  this.raiseProgressEvent(s);
7986
7986
  }));
7987
7987
  const i = await this._loading;
@@ -8009,8 +8009,8 @@ const qf = Symbol("assetReference"), Zo = class {
8009
8009
  }
8010
8010
  async onInstantiate(t, e = !1, i) {
8011
8011
  const s = J.Current, o = new Qs();
8012
- 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(), Gn && console.log("Instantiate", this.url, "parent:", t), this.asset) {
8013
- Gn && console.log("Add to scene", this.asset);
8012
+ 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(), Hn && console.log("Instantiate", this.url, "parent:", t), this.asset) {
8013
+ Hn && console.log("Add to scene", this.asset);
8014
8014
  let a = Zo.currentlyInstantiating.get(this.url);
8015
8015
  if (a !== void 0 && a >= 1e4)
8016
8016
  return console.error("Recursive or too many instantiations of " + this.url + " in the same frame (" + a + ")"), null;
@@ -8033,7 +8033,7 @@ const qf = Symbol("assetReference"), Zo = class {
8033
8033
  });
8034
8034
  }
8035
8035
  } else
8036
- Gn && console.warn("Failed to load asset", this.url);
8036
+ Hn && console.warn("Failed to load asset", this.url);
8037
8037
  return null;
8038
8038
  }
8039
8039
  /**
@@ -8459,7 +8459,7 @@ class OO {
8459
8459
  return o === void 0 || !(o != null && o.length) || o.length <= i ? null : o[i];
8460
8460
  }
8461
8461
  }
8462
- Yt.lights_fragment_maps = Yt.lights_fragment_maps.replace("vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );", `
8462
+ Kt.lights_fragment_maps = Kt.lights_fragment_maps.replace("vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );", `
8463
8463
  vec2 lUv = vLightMapUv.xy * lightmapScaleOffset.xy + vec2(lightmapScaleOffset.z, (1. - (lightmapScaleOffset.y + lightmapScaleOffset.w)));
8464
8464
  vec4 lightMapTexel = texture2D( lightMap, lUv);
8465
8465
  // The range of RGBM lightmaps goes from 0 to 34.49 (5^2.2) in linear space, and from 0 to 5 in gamma space.
@@ -8467,7 +8467,7 @@ Yt.lights_fragment_maps = Yt.lights_fragment_maps.replace("vec4 lightMapTexel =
8467
8467
  lightMapTexel.a = 1.;
8468
8468
  lightMapTexel = conv_sRGBToLinear(lightMapTexel);
8469
8469
  `);
8470
- Yt.lightmap_pars_fragment = `
8470
+ Kt.lightmap_pars_fragment = `
8471
8471
  #ifdef USE_LIGHTMAP
8472
8472
  uniform sampler2D lightMap;
8473
8473
  uniform float lightMapIntensity;
@@ -8479,7 +8479,7 @@ Yt.lightmap_pars_fragment = `
8479
8479
  }
8480
8480
  #endif
8481
8481
  `;
8482
- Yt.lights_fragment_begin = Yt.lights_fragment_begin.replace(
8482
+ Kt.lights_fragment_begin = Kt.lights_fragment_begin.replace(
8483
8483
  "irradiance += getLightProbeIrradiance( lightProbe, geometry.normal );",
8484
8484
  `
8485
8485
  #if defined(USE_LIGHTMAP)
@@ -8798,7 +8798,7 @@ class BO {
8798
8798
  if (s && s.Source) {
8799
8799
  ls && console.log("Setting environment reflection", s);
8800
8800
  const o = this.context.scene, a = s.Source;
8801
- a.mapping = Rn, o.environment = a;
8801
+ a.mapping = Mn, o.environment = a;
8802
8802
  return;
8803
8803
  } else
8804
8804
  ls && console.warn("Could not find reflection for source", t);
@@ -8809,14 +8809,14 @@ class BO {
8809
8809
  case 1:
8810
8810
  if (e.ambientTrilight) {
8811
8811
  const s = e.ambientTrilight, o = EO(s[0], s[1], s[2], 64, 64);
8812
- o.colorSpace = gs, o.mapping = Rn, this.context.scene.environment = o;
8812
+ o.colorSpace = gs, o.mapping = Mn, this.context.scene.environment = o;
8813
8813
  } else
8814
8814
  console.error("Missing ambient trilight", e.sourceId);
8815
8815
  return;
8816
8816
  case 3:
8817
8817
  if (e.ambientLight) {
8818
8818
  const s = Tg(e.ambientLight, 64);
8819
- s.colorSpace = gs, s.mapping = Rn, this.context.scene.environment = s;
8819
+ s.colorSpace = gs, s.mapping = Mn, this.context.scene.environment = s;
8820
8820
  } else
8821
8821
  console.error("Missing ambientlight", e.sourceId);
8822
8822
  return;
@@ -8844,7 +8844,7 @@ class FO {
8844
8844
  constructor(t, e, i = 1) {
8845
8845
  // get Array(): number[] | undefined { return this._sphericalHarmonicsArray; }
8846
8846
  r(this, "_source");
8847
- this._source = e, e.mapping = Rn;
8847
+ this._source = e, e.mapping = Mn;
8848
8848
  }
8849
8849
  get Source() {
8850
8850
  return this._source;
@@ -8991,10 +8991,10 @@ vec3 NeutralToneMapping( vec3 color ) {
8991
8991
  return mix(color, vec3(1, 1, 1), g);
8992
8992
  }
8993
8993
  `, t = "vec3 NeutralToneMapping( vec3 color ) {", e = `return mix( color, vec3( newPeak ), g );
8994
- }`, i = Yt.tonemapping_pars_fragment.indexOf(t), s = Yt.tonemapping_pars_fragment.indexOf(e, i);
8994
+ }`, i = Kt.tonemapping_pars_fragment.indexOf(t), s = Kt.tonemapping_pars_fragment.indexOf(e, i);
8995
8995
  if (i >= 0 && s >= 0) {
8996
- const o = Yt.tonemapping_pars_fragment.substring(i, s + e.length);
8997
- Yt.tonemapping_pars_fragment = Yt.tonemapping_pars_fragment.replace(o, n);
8996
+ const o = Kt.tonemapping_pars_fragment.substring(i, s + e.length);
8997
+ Kt.tonemapping_pars_fragment = Kt.tonemapping_pars_fragment.replace(o, n);
8998
8998
  } else
8999
8999
  U() && console.error("Couldn't find NeutralToneMapping in ShaderChunk.tonemapping_pars_fragment");
9000
9000
  }
@@ -9109,10 +9109,10 @@ vec3 AgXToneMapping( vec3 color ) {
9109
9109
  color = _agxLook(color); // Optional
9110
9110
  color = _agxEotf(color);
9111
9111
  return color;
9112
- `, t = "vec3 AgXToneMapping( vec3 color ) {", e = "return color;", i = Yt.tonemapping_pars_fragment.indexOf(t), s = Yt.tonemapping_pars_fragment.indexOf(e, i);
9112
+ `, t = "vec3 AgXToneMapping( vec3 color ) {", e = "return color;", i = Kt.tonemapping_pars_fragment.indexOf(t), s = Kt.tonemapping_pars_fragment.indexOf(e, i);
9113
9113
  if (i >= 0 && s >= 0) {
9114
- const o = Yt.tonemapping_pars_fragment.substring(i, s + e.length);
9115
- Yt.tonemapping_pars_fragment = Yt.tonemapping_pars_fragment.replace(o, n);
9114
+ const o = Kt.tonemapping_pars_fragment.substring(i, s + e.length);
9115
+ Kt.tonemapping_pars_fragment = Kt.tonemapping_pars_fragment.replace(o, n);
9116
9116
  } else
9117
9117
  U() && console.error("Couldn't find AgXToneMapping in ShaderChunk.tonemapping_pars_fragment");
9118
9118
  }
@@ -9783,11 +9783,11 @@ const My = class extends HTMLElement {
9783
9783
  constructor() {
9784
9784
  var u, p, m, g, y, _;
9785
9785
  super();
9786
- ui(this, zc);
9786
+ fi(this, zc);
9787
9787
  r(this, "_domElement", null);
9788
9788
  r(this, "_context", null);
9789
9789
  r(this, "_sizeChangeInterval");
9790
- ui(this, Fc, (e) => {
9790
+ fi(this, Fc, (e) => {
9791
9791
  if (!e.defaultPrevented && e.target == this._domElement && e instanceof PointerEvent && e.button === 0 && this.root.classList.contains("open")) {
9792
9792
  const i = this.foldout.getBoundingClientRect(), s = e;
9793
9793
  s.clientX > i.left && s.clientX < i.right && s.clientY > i.top && s.clientY < i.bottom || this.root.classList.toggle("open", !1);
@@ -10240,7 +10240,7 @@ const My = class extends HTMLElement {
10240
10240
  const M = this == null ? void 0 : this.parentNode;
10241
10241
  if ((this.style.display != "flex" || this.style.visibility != "visible" || this.style.opacity != "1" || M != ((x = this._domElement) == null ? void 0 : x.shadowRoot)) && !Vs()) {
10242
10242
  const k = l++;
10243
- li() && this._userRequestedMenuVisible === !1 ? (k === 0 && c(M, this._userRequestedMenuVisible), k === 1 && console.warn("Needle Menu Warning: You need a PRO license to hide the Needle Engine menu → The menu will be visible in your deployed website if you don't have a PRO license. See https://needle.tools/pricing for details.")) : k === 0 ? c(M, !0) : setTimeout(() => c(M, !0), 5);
10243
+ ci() && this._userRequestedMenuVisible === !1 ? (k === 0 && c(M, this._userRequestedMenuVisible), k === 1 && console.warn("Needle Menu Warning: You need a PRO license to hide the Needle Engine menu → The menu will be visible in your deployed website if you don't have a PRO license. See https://needle.tools/pricing for details.")) : k === 0 ? c(M, !0) : setTimeout(() => c(M, !0), 5);
10244
10244
  }
10245
10245
  } finally {
10246
10246
  h = !1;
@@ -10265,7 +10265,7 @@ const My = class extends HTMLElement {
10265
10265
  window.removeEventListener("resize", this.handleSizeChange), clearInterval(this._sizeChangeInterval), (e = this._domElement) == null || e.removeEventListener("resize", this.handleSizeChange), (i = this._context) == null || i.domElement.removeEventListener("click", de(this, Fc));
10266
10266
  }
10267
10267
  showNeedleLogo(e) {
10268
- this._userRequestedLogoVisible = e, !(!e && (!Vs() || q_) && (console.warn("Needle Menu: You need a PRO license to hide the Needle Engine logo."), !li())) && Uo(this, zc, Mm).call(this, e);
10268
+ this._userRequestedLogoVisible = e, !(!e && (!Vs() || q_) && (console.warn("Needle Menu: You need a PRO license to hide the Needle Engine logo."), !ci())) && Uo(this, zc, Mm).call(this, e);
10269
10269
  }
10270
10270
  setPosition(e) {
10271
10271
  if (e !== "top" && e !== "bottom")
@@ -12233,14 +12233,14 @@ var aM = Object.defineProperty, lM = Object.getOwnPropertyDescriptor, Ir = (n, t
12233
12233
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
12234
12234
  return i && s && aM(t, e, s), s;
12235
12235
  };
12236
- const qn = S("debuganimation");
12236
+ const Gn = S("debuganimation");
12237
12237
  let Dv = class {
12238
12238
  constructor() {
12239
12239
  r(this, "x");
12240
12240
  r(this, "y");
12241
12241
  }
12242
12242
  };
12243
- class Kt extends D {
12243
+ class Zt extends D {
12244
12244
  constructor() {
12245
12245
  super(...arguments);
12246
12246
  r(this, "playAutomatically", !0);
@@ -12290,7 +12290,7 @@ class Kt extends D {
12290
12290
  */
12291
12291
  set clip(e) {
12292
12292
  if (!this.__didAwake) {
12293
- qn && console.warn("Assign clip during serialization", e), this._tempAnimationClipBeforeGameObjectExisted = e;
12293
+ Gn && console.warn("Assign clip during serialization", e), this._tempAnimationClipBeforeGameObjectExisted = e;
12294
12294
  return;
12295
12295
  }
12296
12296
  e && (this.gameObject.animations || (this.gameObject.animations = []), !this.animations.includes(e) && (this.animations.length > 0 ? this.animations.splice(0, 0, e) : this.animations.push(e)));
@@ -12315,7 +12315,7 @@ class Kt extends D {
12315
12315
  }
12316
12316
  /** @internal */
12317
12317
  awake() {
12318
- this.mixer = void 0, qn && console.log("Animation Awake", this.name, this), this._tempAnimationsArray && (this.animations = this._tempAnimationsArray, this._tempAnimationsArray = void 0), this._tempAnimationClipBeforeGameObjectExisted && (this.clip = this._tempAnimationClipBeforeGameObjectExisted, this._tempAnimationClipBeforeGameObjectExisted = null), this.actions = [], this._handles = [];
12318
+ this.mixer = void 0, Gn && console.log("Animation Awake", this.name, this), this._tempAnimationsArray && (this.animations = this._tempAnimationsArray, this._tempAnimationsArray = void 0), this._tempAnimationClipBeforeGameObjectExisted && (this.clip = this._tempAnimationClipBeforeGameObjectExisted, this._tempAnimationClipBeforeGameObjectExisted = null), this.actions = [], this._handles = [];
12319
12319
  }
12320
12320
  /** @internal */
12321
12321
  onEnable() {
@@ -12372,7 +12372,7 @@ class Kt extends D {
12372
12372
  return;
12373
12373
  } else if (typeof e == "number") {
12374
12374
  if (e >= this.animations.length) {
12375
- qn && console.log("No animation at index", e);
12375
+ Gn && console.log("No animation at index", e);
12376
12376
  return;
12377
12377
  }
12378
12378
  e = this.animations[e];
@@ -12401,7 +12401,7 @@ class Kt extends D {
12401
12401
  return;
12402
12402
  } else if (typeof e == "number") {
12403
12403
  if (e >= this.animations.length) {
12404
- qn && console.log("No animation at index", e);
12404
+ Gn && console.log("No animation at index", e);
12405
12405
  return;
12406
12406
  }
12407
12407
  e = this.animations[e];
@@ -12433,15 +12433,15 @@ class Kt extends D {
12433
12433
  * @returns a promise that resolves when the animation is finished (note that it will not resolve if the animation is looping)
12434
12434
  */
12435
12435
  play(e = 0, i) {
12436
- if (qn && console.log("PLAY", e), this.ensureMixer(), !this.mixer) {
12437
- qn && console.warn("Missing mixer", this);
12436
+ if (Gn && console.log("PLAY", e), this.ensureMixer(), !this.mixer) {
12437
+ Gn && console.warn("Missing mixer", this);
12438
12438
  return;
12439
12439
  }
12440
12440
  e === void 0 && (e = 0);
12441
12441
  let s = e;
12442
12442
  if (typeof e == "number") {
12443
12443
  if (e >= this.animations.length) {
12444
- qn && console.log("No animation at index", e);
12444
+ Gn && console.log("No animation at index", e);
12445
12445
  return;
12446
12446
  }
12447
12447
  s = this.animations[e];
@@ -12479,7 +12479,7 @@ class Kt extends D {
12479
12479
  e.time = $.lerp(i.minMaxOffsetNormalized.x, i.minMaxOffsetNormalized.y, Math.random()) * l.duration;
12480
12480
  } else
12481
12481
  e.time >= e.getClip().duration && (e.time = 0);
12482
- i != null && i.minMaxSpeed ? e.timeScale = $.lerp(i.minMaxSpeed.x, i.minMaxSpeed.y, Math.random()) : e.timeScale = (i == null ? void 0 : i.speed) ?? 1, (i == null ? void 0 : i.loop) != null ? e.loop = i.loop ? qx : Zp : e.loop = Zp, i != null && i.clampWhenFinished && (e.clampWhenFinished = !0), e.paused = !1, e.play(), qn && console.log("PLAY", e.getClip().name, e);
12482
+ i != null && i.minMaxSpeed ? e.timeScale = $.lerp(i.minMaxSpeed.x, i.minMaxSpeed.y, Math.random()) : e.timeScale = (i == null ? void 0 : i.speed) ?? 1, (i == null ? void 0 : i.loop) != null ? e.loop = i.loop ? qx : Zp : e.loop = Zp, i != null && i.clampWhenFinished && (e.clampWhenFinished = !0), e.paused = !1, e.play(), Gn && console.log("PLAY", e.getClip().name, e);
12483
12483
  const a = new cM(e, this.mixer, i, (l) => {
12484
12484
  this._handles.splice(this._handles.indexOf(a), 1);
12485
12485
  });
@@ -12500,25 +12500,25 @@ class Kt extends D {
12500
12500
  }
12501
12501
  Ir([
12502
12502
  f()
12503
- ], Kt.prototype, "playAutomatically", 2);
12503
+ ], Zt.prototype, "playAutomatically", 2);
12504
12504
  Ir([
12505
12505
  f()
12506
- ], Kt.prototype, "randomStartTime", 2);
12506
+ ], Zt.prototype, "randomStartTime", 2);
12507
12507
  Ir([
12508
12508
  f(Dv)
12509
- ], Kt.prototype, "minMaxSpeed", 2);
12509
+ ], Zt.prototype, "minMaxSpeed", 2);
12510
12510
  Ir([
12511
12511
  f(Dv)
12512
- ], Kt.prototype, "minMaxOffsetNormalized", 2);
12512
+ ], Zt.prototype, "minMaxOffsetNormalized", 2);
12513
12513
  Ir([
12514
12514
  f()
12515
- ], Kt.prototype, "loop", 2);
12515
+ ], Zt.prototype, "loop", 2);
12516
12516
  Ir([
12517
12517
  f()
12518
- ], Kt.prototype, "clampWhenFinished", 2);
12518
+ ], Zt.prototype, "clampWhenFinished", 2);
12519
12519
  Ir([
12520
12520
  f(rr)
12521
- ], Kt.prototype, "clips", 1);
12521
+ ], Zt.prototype, "clips", 1);
12522
12522
  class cM {
12523
12523
  constructor(t, e, i, s) {
12524
12524
  r(this, "mixer");
@@ -12555,7 +12555,7 @@ var hM = Object.defineProperty, dM = Object.getOwnPropertyDescriptor, Mo = (n, t
12555
12555
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
12556
12556
  return i && s && hM(t, e, s), s;
12557
12557
  };
12558
- class ai {
12558
+ class li {
12559
12559
  constructor(t = 0, e = 0) {
12560
12560
  r(this, "time", 0);
12561
12561
  r(this, "value", 0);
@@ -12569,25 +12569,25 @@ class ai {
12569
12569
  }
12570
12570
  Mo([
12571
12571
  f()
12572
- ], ai.prototype, "time", 2);
12572
+ ], li.prototype, "time", 2);
12573
12573
  Mo([
12574
12574
  f()
12575
- ], ai.prototype, "value", 2);
12575
+ ], li.prototype, "value", 2);
12576
12576
  Mo([
12577
12577
  f()
12578
- ], ai.prototype, "inTangent", 2);
12578
+ ], li.prototype, "inTangent", 2);
12579
12579
  Mo([
12580
12580
  f()
12581
- ], ai.prototype, "inWeight", 2);
12581
+ ], li.prototype, "inWeight", 2);
12582
12582
  Mo([
12583
12583
  f()
12584
- ], ai.prototype, "outTangent", 2);
12584
+ ], li.prototype, "outTangent", 2);
12585
12585
  Mo([
12586
12586
  f()
12587
- ], ai.prototype, "outWeight", 2);
12587
+ ], li.prototype, "outWeight", 2);
12588
12588
  Mo([
12589
12589
  f()
12590
- ], ai.prototype, "weightedMode", 2);
12590
+ ], li.prototype, "weightedMode", 2);
12591
12591
  const $l = class {
12592
12592
  constructor() {
12593
12593
  r(this, "keys", []);
@@ -12596,14 +12596,14 @@ const $l = class {
12596
12596
  * Creates an animation curve that goes from the `from` value to the `to` value over the given `duration`.
12597
12597
  */
12598
12598
  static linearFromTo(n, t, e) {
12599
- const i = new $l(), s = new ai();
12599
+ const i = new $l(), s = new li();
12600
12600
  s.time = 0, s.value = n;
12601
- const o = new ai();
12601
+ const o = new li();
12602
12602
  return o.time = e, o.value = t, i.keys.push(s, o), i;
12603
12603
  }
12604
12604
  /** Creates an animation curve with just one keyframe */
12605
12605
  static constant(n) {
12606
- const t = new $l(), e = new ai();
12606
+ const t = new $l(), e = new li();
12607
12607
  return e.time = 0, e.value = n, t.keys.push(e), t;
12608
12608
  }
12609
12609
  /**
@@ -12613,7 +12613,7 @@ const $l = class {
12613
12613
  var t;
12614
12614
  const n = new $l();
12615
12615
  return n.keys = ((t = this.keys) == null ? void 0 : t.map((e) => {
12616
- const i = new ai();
12616
+ const i = new li();
12617
12617
  return i.time = e.time, i.value = e.value, i.inTangent = e.inTangent, i.inWeight = e.inWeight, i.outTangent = e.outTangent, i.outWeight = e.outWeight, i.weightedMode = e.weightedMode, i;
12618
12618
  })) || [], n;
12619
12619
  }
@@ -12652,7 +12652,7 @@ const $l = class {
12652
12652
  };
12653
12653
  let Ya = $l;
12654
12654
  Mo([
12655
- f(ai)
12655
+ f(li)
12656
12656
  ], Ya.prototype, "keys", 2);
12657
12657
  const vd = Symbol("objectIsAnimatedData");
12658
12658
  function tb(n, t, e) {
@@ -12709,7 +12709,7 @@ function fM(n, t) {
12709
12709
  return {
12710
12710
  name: "Empty",
12711
12711
  isLooping: !1,
12712
- guid: (t == null ? void 0 : t.generateUUID()) ?? On.generateUUID(),
12712
+ guid: (t == null ? void 0 : t.generateUUID()) ?? Pn.generateUUID(),
12713
12713
  index: -1,
12714
12714
  clip: new rr(n, 0, [])
12715
12715
  };
@@ -13571,7 +13571,7 @@ var _M = Object.defineProperty, bM = Object.getOwnPropertyDescriptor, Xc = (n, t
13571
13571
  return i && s && _M(t, e, s), s;
13572
13572
  };
13573
13573
  const Dh = S("debuggroundprojection");
13574
- class Bn extends D {
13574
+ class jn extends D {
13575
13575
  constructor() {
13576
13576
  super(...arguments);
13577
13577
  r(this, "applyOnAwake", !1);
@@ -13707,19 +13707,19 @@ class Bn extends D {
13707
13707
  }
13708
13708
  Xc([
13709
13709
  f()
13710
- ], Bn.prototype, "applyOnAwake", 2);
13710
+ ], jn.prototype, "applyOnAwake", 2);
13711
13711
  Xc([
13712
13712
  f()
13713
- ], Bn.prototype, "autoFit", 2);
13713
+ ], jn.prototype, "autoFit", 2);
13714
13714
  Xc([
13715
13715
  f()
13716
- ], Bn.prototype, "radius", 1);
13716
+ ], jn.prototype, "radius", 1);
13717
13717
  Xc([
13718
13718
  f()
13719
- ], Bn.prototype, "height", 1);
13719
+ ], jn.prototype, "height", 1);
13720
13720
  Xc([
13721
13721
  f()
13722
- ], Bn.prototype, "arBlending", 1);
13722
+ ], jn.prototype, "arBlending", 1);
13723
13723
  const vM = `
13724
13724
  varying vec2 vUv;
13725
13725
 
@@ -13813,25 +13813,25 @@ Ig([
13813
13813
  f(L)
13814
13814
  ], Ka.prototype, "sources", 2);
13815
13815
  function AD(n, t) {
13816
- return jn(n, me.ContextCreated, t), () => Oo(n, me.ContextCreated);
13816
+ return Ln(n, me.ContextCreated, t), () => Oo(n, me.ContextCreated);
13817
13817
  }
13818
13818
  function ED(n, t) {
13819
- return jn(n, me.ContextClearing, t), () => Oo(n, me.ContextClearing);
13819
+ return Ln(n, me.ContextClearing, t), () => Oo(n, me.ContextClearing);
13820
13820
  }
13821
13821
  function ID(n, t) {
13822
- return jn(n, me.ContextDestroying, t), () => Oo(n, me.ContextDestroying);
13822
+ return Ln(n, me.ContextDestroying, t), () => Oo(n, me.ContextDestroying);
13823
13823
  }
13824
13824
  function CM(n, t) {
13825
- return jn(n, Ce.Start, t), () => Oo(n, Ce.Start);
13825
+ return Ln(n, Ce.Start, t), () => Oo(n, Ce.Start);
13826
13826
  }
13827
13827
  function PM(n, t) {
13828
- return jn(n, Ce.Update, t), () => Oo(n, Ce.Update);
13828
+ return Ln(n, Ce.Update, t), () => Oo(n, Ce.Update);
13829
13829
  }
13830
13830
  function DD(n, t) {
13831
- return jn(n, Ce.OnBeforeRender, t), () => Oo(n, Ce.OnBeforeRender);
13831
+ return Ln(n, Ce.OnBeforeRender, t), () => Oo(n, Ce.OnBeforeRender);
13832
13832
  }
13833
13833
  function LD(n, t) {
13834
- return jn(n, Ce.OnAfterRender, t), () => Oo(n, Ce.OnAfterRender);
13834
+ return Ln(n, Ce.OnAfterRender, t), () => Oo(n, Ce.OnAfterRender);
13835
13835
  }
13836
13836
  let fr = class {
13837
13837
  constructor() {
@@ -14427,7 +14427,7 @@ Mi([
14427
14427
  zt()
14428
14428
  ], ye.prototype, "dominanceGroup", 2);
14429
14429
  new v();
14430
- const TM = new W(), AM = new v(), eo = S("debugsync"), Ic = "STRS";
14430
+ const TM = new W(), AM = new v(), Jn = S("debugsync"), Ic = "STRS";
14431
14431
  Y0(Ic, vn.getRootAsSyncedTransformModel);
14432
14432
  const Os = new cg();
14433
14433
  function Bv(n, t, e = !0) {
@@ -14443,9 +14443,9 @@ let Tm = 0, cc = 0;
14443
14443
  PM((n) => {
14444
14444
  var i;
14445
14445
  const e = ((i = n.connection.currentServerUrl) == null ? void 0 : i.includes("glitch")) ? 10 : 40;
14446
- cc = Math.floor(Tm / e), Tm = 0, eo && cc > 0 && console.log("Sync Transform Fast Interval", cc);
14446
+ cc = Math.floor(Tm / e), Tm = 0, Jn && cc > 0 && console.log("Sync Transform Fast Interval", cc);
14447
14447
  });
14448
- class In extends D {
14448
+ class En extends D {
14449
14449
  constructor() {
14450
14450
  super(...arguments);
14451
14451
  // public autoOwnership: boolean = true;
@@ -14473,7 +14473,7 @@ class In extends D {
14473
14473
  }
14474
14474
  /** Request ownership of an object - you need to be connected to a room */
14475
14475
  requestOwnership() {
14476
- eo && console.log("Request ownership"), this._model ? this._model.requestOwnership() : (this._shouldRequestOwnership = !0, this._needsUpdate = !0);
14476
+ Jn && console.log("Request ownership"), this._model ? this._model.requestOwnership() : (this._shouldRequestOwnership = !0, this._needsUpdate = !0);
14477
14477
  }
14478
14478
  hasOwnership() {
14479
14479
  var e;
@@ -14485,7 +14485,7 @@ class In extends D {
14485
14485
  }
14486
14486
  /** @internal */
14487
14487
  awake() {
14488
- eo && console.log("new instance", this.guid, this), this._receivedDataBefore = !1, this._targetPosition = new v(), this._targetRotation = new W(), this.lastWorldPos = new v(), this.lastWorldRotation = new W(), this.rb = C.getComponentInChildren(this.gameObject, ye), this.rb && (this._wasKinematic = this.rb.isKinematic), this.receivedUpdate = !0, this._model = new K0(this.context.connection, this.guid), this.context.connection.isConnected && this.tryGetLastState(), this.joinedRoomCallback = this.tryGetLastState.bind(this), this.context.connection.beginListen(se.JoinedRoom, this.joinedRoomCallback), this.receivedDataCallback = this.onReceivedData.bind(this), this.context.connection.beginListenBinary(Ic, this.receivedDataCallback);
14488
+ Jn && console.log("new instance", this.guid, this), this._receivedDataBefore = !1, this._targetPosition = new v(), this._targetRotation = new W(), this.lastWorldPos = new v(), this.lastWorldRotation = new W(), this.rb = C.getComponentInChildren(this.gameObject, ye), this.rb && (this._wasKinematic = this.rb.isKinematic), this.receivedUpdate = !0, this._model = new K0(this.context.connection, this.guid), this.context.connection.isConnected && this.tryGetLastState(), this.joinedRoomCallback = this.tryGetLastState.bind(this), this.context.connection.beginListen(se.JoinedRoom, this.joinedRoomCallback), this.receivedDataCallback = this.onReceivedData.bind(this), this.context.connection.beginListenBinary(Ic, this.receivedDataCallback);
14489
14489
  }
14490
14490
  /** @internal */
14491
14491
  onDestroy() {
@@ -14498,7 +14498,7 @@ class In extends D {
14498
14498
  onReceivedData(e) {
14499
14499
  var i;
14500
14500
  if (!this.destroyed && typeof e.guid == "function" && e.guid() === this.guid) {
14501
- eo && console.log("new data", this.context.connection.connectionId, this.context.time.frameCount, this.guid, e), this.receivedUpdate = !0, this._receivedFastUpdate = e.fast();
14501
+ Jn && console.log("new data", this.context.connection.connectionId, this.context.time.frameCount, this.guid, e), this.receivedUpdate = !0, this._receivedFastUpdate = e.fast();
14502
14502
  const s = e.transform();
14503
14503
  if (s) {
14504
14504
  ps.markDirty(this.gameObject, !0);
@@ -14523,14 +14523,14 @@ class In extends D {
14523
14523
  if (!this.activeAndEnabled || !this.context.connection.isConnected)
14524
14524
  return;
14525
14525
  if (!this.context.connection.isInRoom || !this._model) {
14526
- eo && console.log("no model or room", this.name, this.guid, this.context.connection.isInRoom);
14526
+ Jn && console.log("no model or room", this.name, this.guid, this.context.connection.isInRoom);
14527
14527
  return;
14528
14528
  }
14529
14529
  this._shouldRequestOwnership && (this._shouldRequestOwnership = !1, this._model.requestOwnership());
14530
14530
  const e = this.worldPosition, i = this.worldQuaternion;
14531
14531
  if (this._model.isOwned && !this.receivedUpdate) {
14532
14532
  const a = e.distanceTo(this.lastWorldPos), l = i.angleTo(this.lastWorldRotation), c = this._model.hasOwnership || this.fastMode ? 1e-4 : 1e-3;
14533
- (a > c || l > c) && (this._model.hasOwnership ? this._needsUpdate = !0 : (eo && console.log(this.guid, "reset because not owned but", this.gameObject.name, this.lastWorldPos), this.worldPosition = this.lastWorldPos, e.copy(this.lastWorldPos), this.worldQuaternion = this.lastWorldRotation, i.copy(this.lastWorldRotation), ps.markDirty(this.gameObject, !0), this._needsUpdate = !1));
14533
+ (a > c || l > c) && (this._model.hasOwnership ? this._needsUpdate = !0 : (Jn && console.log(this.guid, "reset because not owned but", this.gameObject.name, this.lastWorldPos), this.worldPosition = this.lastWorldPos, e.copy(this.lastWorldPos), this.worldQuaternion = this.lastWorldRotation, i.copy(this.lastWorldRotation), ps.markDirty(this.gameObject, !0), this._needsUpdate = !1));
14534
14534
  }
14535
14535
  if (this._model && !this._model.hasOwnership && this._model.isOwned && this._receivedDataBefore) {
14536
14536
  const l = this._receivedFastUpdate || this.fastMode ? 0.5 : 0.3;
@@ -14547,12 +14547,12 @@ class In extends D {
14547
14547
  }
14548
14548
  if (this.receivedUpdate = !1, this.lastWorldPos.copy(e), this.lastWorldRotation.copy(i), !this._model || !this._model || this._model.hasOwnership === void 0 || !this._model.hasOwnership)
14549
14549
  return;
14550
- this.rb && this.overridePhysics && this._wasKinematic !== void 0 && (eo && console.log("reset kinematic", this.rb.name, this._wasKinematic), this.rb.isKinematic = this._wasKinematic);
14550
+ this.rb && this.overridePhysics && this._wasKinematic !== void 0 && (Jn && console.log("reset kinematic", this.rb.name, this._wasKinematic), this.rb.isKinematic = this._wasKinematic);
14551
14551
  const s = 10, o = this.rb || this.fastMode;
14552
14552
  if (this._needsUpdate && (this.context.time.frameCount % s === 0 || o)) {
14553
14553
  if (Tm++, o && cc > 0 && this.context.time.frameCount % cc !== 0)
14554
14554
  return;
14555
- eo && console.log("send update", this.context.connection.connectionId, this.guid, this.gameObject.name, this.gameObject.guid), this._needsUpdate = !1;
14555
+ Jn && console.log("send update", this.context.connection.connectionId, this.guid, this.gameObject.name, this.gameObject.guid), this._needsUpdate = !1;
14556
14556
  const a = Bv(this.guid, this, !!o);
14557
14557
  this.context.connection.sendBinary(a);
14558
14558
  }
@@ -15215,9 +15215,9 @@ class ts extends Yc {
15215
15215
  performRaycast(e = null) {
15216
15216
  if (!this.targets)
15217
15217
  return null;
15218
- e ?? (e = new En()), e.targets = this.targets, e.results = this.raycastHits, e.useAcceleratedRaycast = !0;
15218
+ e ?? (e = new An()), e.targets = this.targets, e.results = this.raycastHits, e.useAcceleratedRaycast = !0;
15219
15219
  const i = e.testObject;
15220
- this.ignoreSkinnedMeshes && (e.testObject = (o) => o instanceof Mn ? "continue in children" : i ? i(o) : !0);
15220
+ this.ignoreSkinnedMeshes && (e.testObject = (o) => o instanceof On ? "continue in children" : i ? i(o) : !0);
15221
15221
  const s = this.context.physics.raycast(e);
15222
15222
  return e.testObject = i, s;
15223
15223
  }
@@ -15351,7 +15351,7 @@ const As = class extends D {
15351
15351
  return;
15352
15352
  const i = new Qc(this.context.input, e);
15353
15353
  this._currentPointerEventName = e.type, i.inputSource = this.context.input, i.isClick = e.isClick, i.isDoubleClick = e.isDoubleClick, i.isDown = e.type == Ne.PointerDown, i.isUp = e.type == Ne.PointerUp, i.isPressed = this.context.input.getPointerPressed(e.pointerId), cn && (i.isDown ? console.log("DOWN", i.pointerId) : i.isUp && console.log("UP", i.pointerId), i.isClick && console.log("CLICK", i.pointerId));
15354
- const s = new En();
15354
+ const s = new An();
15355
15355
  e.hasRay ? s.ray = e.ray : s.screenPoint = this.context.input.getPointerPositionRC(e.pointerId);
15356
15356
  const o = this.performRaycast(s);
15357
15357
  if (o) {
@@ -15436,10 +15436,10 @@ const As = class extends D {
15436
15436
  }
15437
15437
  //@ts-ignore
15438
15438
  static ensureUpdateMeshUI(e, i, s = !1) {
15439
- so.update(e, i, s);
15439
+ io.update(e, i, s);
15440
15440
  }
15441
15441
  static markUIDirty(e) {
15442
- so.markDirty();
15442
+ io.markDirty();
15443
15443
  }
15444
15444
  get hasActiveUI() {
15445
15445
  return this.currentActiveMeshUIComponents.length > 0;
@@ -15483,7 +15483,7 @@ const As = class extends D {
15483
15483
  performRaycast(e) {
15484
15484
  if (!this.raycaster)
15485
15485
  return null;
15486
- this._testObjectsCache.clear(), this._sortedHits.length = 0, e || (e = new En()), e.testObject = this.shouldRaycastObject;
15486
+ this._testObjectsCache.clear(), this._sortedHits.length = 0, e || (e = new An()), e.testObject = this.shouldRaycastObject;
15487
15487
  for (const i of this.raycaster) {
15488
15488
  if (!i.activeAndEnabled)
15489
15489
  continue;
@@ -15677,14 +15677,14 @@ const As = class extends D {
15677
15677
  return !e || !e.isUI ? !0 : this.handleMeshUIIntersection(e, i);
15678
15678
  }
15679
15679
  handleMeshUIIntersection(e, i) {
15680
- const s = so.updateState(e, i);
15680
+ const s = io.updateState(e, i);
15681
15681
  return s && this.currentActiveMeshUIComponents.push(s), s !== null;
15682
15682
  }
15683
15683
  resetMeshUIStates() {
15684
- if (this.context.input.getPointerPressedCount() > 0 && so.resetLastSelected(), !(!this.currentActiveMeshUIComponents || this.currentActiveMeshUIComponents.length <= 0)) {
15684
+ if (this.context.input.getPointerPressedCount() > 0 && io.resetLastSelected(), !(!this.currentActiveMeshUIComponents || this.currentActiveMeshUIComponents.length <= 0)) {
15685
15685
  for (let e = 0; e < this.currentActiveMeshUIComponents.length; e++) {
15686
15686
  const i = this.currentActiveMeshUIComponents[e];
15687
- so.resetState(i);
15687
+ io.resetState(i);
15688
15688
  }
15689
15689
  this.currentActiveMeshUIComponents.length = 0;
15690
15690
  }
@@ -15695,7 +15695,7 @@ const As = class extends D {
15695
15695
  };
15696
15696
  let xi = As;
15697
15697
  r(xi, "_eventSystemMap", /* @__PURE__ */ new Map()), r(xi, "didSearchEventSystem", !1);
15698
- class so {
15698
+ class io {
15699
15699
  static markDirty() {
15700
15700
  this.needsUpdate = !0;
15701
15701
  }
@@ -15736,7 +15736,7 @@ class so {
15736
15736
  return t ? t.isBlock ? t : this.findBlockInParent(t.parent) : null;
15737
15737
  }
15738
15738
  }
15739
- r(so, "lastSelected", null), r(so, "lastUpdateFrame", []), r(so, "needsUpdate", !1);
15739
+ r(io, "lastSelected", null), r(io, "lastUpdateFrame", []), r(io, "needsUpdate", !1);
15740
15740
  var XM = Object.defineProperty, QM = Object.getOwnPropertyDescriptor, ze = (n, t, e, i) => {
15741
15741
  for (var s = i > 1 ? void 0 : i ? QM(t, e) : t, o = n.length - 1, a; o >= 0; o--)
15742
15742
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
@@ -15928,7 +15928,7 @@ class _e extends D {
15928
15928
  this._controls.stopListenToKeyEvents();
15929
15929
  } catch {
15930
15930
  }
15931
- this._syncedTransform = C.getComponent(this.gameObject, In) ?? void 0, this.context.pre_render_callbacks.push(this.__onPreRender), this._activePointerEvents = [], this.context.input.addEventListener("pointerdown", this._onPointerDown, { queue: $i.Early }), this.context.input.addEventListener("pointerup", this._onPointerUp, { queue: $i.Early }), this.context.input.addEventListener("pointerup", this._onPointerUpLate, { queue: $i.Late });
15931
+ this._syncedTransform = C.getComponent(this.gameObject, En) ?? void 0, this.context.pre_render_callbacks.push(this.__onPreRender), this._activePointerEvents = [], this.context.input.addEventListener("pointerdown", this._onPointerDown, { queue: $i.Early }), this.context.input.addEventListener("pointerup", this._onPointerUp, { queue: $i.Early }), this.context.input.addEventListener("pointerup", this._onPointerUpLate, { queue: $i.Late });
15932
15932
  }
15933
15933
  /** @internal */
15934
15934
  onDisable() {
@@ -15963,7 +15963,7 @@ class _e extends D {
15963
15963
  this.setLookTargetPosition(d, !0);
15964
15964
  }
15965
15965
  if (!this.setLookTargetFromConstraint()) {
15966
- const c = new En();
15966
+ const c = new An();
15967
15967
  c.screenPoint = new oe(0, 0), c.lineThreshold = 0.1;
15968
15968
  const h = this.context.physics.raycast(c);
15969
15969
  h.length > 0 && this.setLookTargetPosition(h[0].point, !0), jh && console.log("OrbitControls hits", ...h);
@@ -16120,7 +16120,7 @@ class _e extends D {
16120
16120
  jh && console.log("Fit camera to objects", { fitHeightDistance: M, fitWidthDistance: k, distance: O, verticalFov: b, horizontalFov: x }), this.maxZoom = O * 10, this.minZoom = O * 0.01;
16121
16121
  const R = 0.05, E = m.clone();
16122
16122
  if (E.y -= p.y * R, this.setLookTargetPosition(E, l), this.setFieldOfView(i.fov, l), this.autoTarget = !1, h == null || h == "auto") {
16123
- const V = C.findObjectOfType(Bn), te = V ? V.radius : 0, K = Math.max(_.x, _.y, _.z, te);
16123
+ const V = C.findObjectOfType(jn), te = V ? V.radius : 0, K = Math.max(_.x, _.y, _.z, te);
16124
16124
  o.near = O / 100, o.far = K + O * 10, V && (this.maxZoom = Math.max(Math.min(this.maxZoom, te * 0.5), O));
16125
16125
  }
16126
16126
  const j = a.getDistance();
@@ -16215,12 +16215,12 @@ ze([
16215
16215
  ze([
16216
16216
  f()
16217
16217
  ], _e.prototype, "targetLerpDuration", 2);
16218
- var KM = Object.defineProperty, ZM = Object.getOwnPropertyDescriptor, Jt = (n, t, e, i) => {
16218
+ var KM = Object.defineProperty, ZM = Object.getOwnPropertyDescriptor, ei = (n, t, e, i) => {
16219
16219
  for (var s = i > 1 ? void 0 : i ? ZM(t, e) : t, o = n.length - 1, a; o >= 0; o--)
16220
16220
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
16221
16221
  return i && s && KM(t, e, s), s;
16222
16222
  }, mr = /* @__PURE__ */ ((n) => (n[n.None = 0] = "None", n[n.Skybox = 1] = "Skybox", n[n.SolidColor = 2] = "SolidColor", n[n.Uninitialized = 4] = "Uninitialized", n))(mr || {});
16223
- const to = S("debugcam"), ob = S("debugscreenpointtoray");
16223
+ const eo = S("debugcam"), ob = S("debugscreenpointtoray");
16224
16224
  var td;
16225
16225
  const Vl = (td = class extends D {
16226
16226
  constructor() {
@@ -16399,7 +16399,7 @@ const Vl = (td = class extends D {
16399
16399
  }
16400
16400
  /** @internal */
16401
16401
  onEnable() {
16402
- to && console.log(`Camera enabled: "${this.name}". ClearFlags=${mr[this._clearFlags]}`, this), this.buildCamera(), (this.tag == "MainCamera" || !this.context.mainCameraComponent) && (this.context.setCurrentCamera(this), eR(this)), this.applyClearFlagsIfIsActiveCamera({ applySkybox: !0 });
16402
+ eo && console.log(`Camera enabled: "${this.name}". ClearFlags=${mr[this._clearFlags]}`, this), this.buildCamera(), (this.tag == "MainCamera" || !this.context.mainCameraComponent) && (this.context.setCurrentCamera(this), eR(this)), this.applyClearFlagsIfIsActiveCamera({ applySkybox: !0 });
16403
16403
  }
16404
16404
  /** @internal */
16405
16405
  onDisable() {
@@ -16441,10 +16441,10 @@ const Vl = (td = class extends D {
16441
16441
  applyClearFlags(t) {
16442
16442
  var e;
16443
16443
  if (!this._cam) {
16444
- to && console.log("Camera does not exist (apply clear flags)");
16444
+ eo && console.log("Camera does not exist (apply clear flags)");
16445
16445
  return;
16446
16446
  }
16447
- if (this.fieldOfView = this._fov, to) {
16447
+ if (this.fieldOfView = this._fov, eo) {
16448
16448
  const i = `Camera "${this.name}" clear flags: ${mr[this._clearFlags]}`;
16449
16449
  console.debug(i);
16450
16450
  }
@@ -16456,14 +16456,14 @@ const Vl = (td = class extends D {
16456
16456
  this.context.scene.background = null, this.context.renderer.setClearColor(0, 0);
16457
16457
  return;
16458
16458
  }
16459
- (!this.scene.background || !this._skybox || (t == null ? void 0 : t.applySkybox) === !0) && this.applySceneSkybox(), this._backgroundBlurriness !== void 0 ? this.context.scene.backgroundBlurriness = this._backgroundBlurriness : to && console.warn(`Camera "${this.name}" has no background blurriness`), this._backgroundIntensity !== void 0 && (this.context.scene.backgroundIntensity = this._backgroundIntensity), this._backgroundRotation !== void 0 ? this.context.scene.backgroundRotation = this._backgroundRotation : to && console.warn(`Camera "${this.name}" has no background intensity`);
16459
+ (!this.scene.background || !this._skybox || (t == null ? void 0 : t.applySkybox) === !0) && this.applySceneSkybox(), this._backgroundBlurriness !== void 0 ? this.context.scene.backgroundBlurriness = this._backgroundBlurriness : eo && console.warn(`Camera "${this.name}" has no background blurriness`), this._backgroundIntensity !== void 0 && (this.context.scene.backgroundIntensity = this._backgroundIntensity), this._backgroundRotation !== void 0 ? this.context.scene.backgroundRotation = this._backgroundRotation : eo && console.warn(`Camera "${this.name}" has no background intensity`);
16460
16460
  break;
16461
16461
  case 2:
16462
16462
  if (this._backgroundColor) {
16463
16463
  let i = this._backgroundColor.alpha;
16464
16464
  Vl.backgroundShouldBeTransparent(this.context) && (i = this.ARBackgroundAlpha ?? 0), this.context.scene.background = null, (e = this.context.xr) != null && e.isVR ? this.context.renderer.setClearColor(iC(this._backgroundColor).convertLinearToSRGB()) : this.context.renderer.setClearColor(this._backgroundColor, i);
16465
16465
  } else
16466
- to && console.warn(`Camera "${this.name}" has no background color`, this);
16466
+ eo && console.warn(`Camera "${this.name}" has no background color`, this);
16467
16467
  break;
16468
16468
  case 4:
16469
16469
  this.context.scene.background = null, this.context.renderer.setClearColor(0, 0);
@@ -16487,55 +16487,55 @@ const Vl = (td = class extends D {
16487
16487
  if (typeof e._transparent == "boolean")
16488
16488
  return e._transparent;
16489
16489
  const i = e.environmentBlendMode;
16490
- to && $e("Environment blend mode: " + i + " on " + navigator.userAgent);
16490
+ eo && $e("Environment blend mode: " + i + " on " + navigator.userAgent);
16491
16491
  let s = i === "additive" || i === "alpha-blend";
16492
16492
  return t.isInAR && i === "opaque" && ((a = navigator.userAgent) != null && a.includes("OculusBrowser") || (l = navigator.userAgent) != null && l.includes("Mozilla") && ((c = navigator.userAgent) != null && c.includes("Mobile WebXRViewer/v2"))) && (s = !0), e._transparent = s, s;
16493
16493
  }
16494
16494
  }, r(td, "_origin", new v()), r(td, "_direction", new v()), td);
16495
16495
  let Re = Vl;
16496
- Jt([
16496
+ ei([
16497
16497
  f()
16498
16498
  ], Re.prototype, "aspect", 1);
16499
- Jt([
16499
+ ei([
16500
16500
  f()
16501
16501
  ], Re.prototype, "fieldOfView", 1);
16502
- Jt([
16502
+ ei([
16503
16503
  f()
16504
16504
  ], Re.prototype, "nearClipPlane", 1);
16505
- Jt([
16505
+ ei([
16506
16506
  f()
16507
16507
  ], Re.prototype, "farClipPlane", 1);
16508
- Jt([
16508
+ ei([
16509
16509
  f()
16510
16510
  ], Re.prototype, "clearFlags", 1);
16511
- Jt([
16511
+ ei([
16512
16512
  f()
16513
16513
  ], Re.prototype, "orthographic", 2);
16514
- Jt([
16514
+ ei([
16515
16515
  f()
16516
16516
  ], Re.prototype, "orthographicSize", 2);
16517
- Jt([
16517
+ ei([
16518
16518
  f()
16519
16519
  ], Re.prototype, "ARBackgroundAlpha", 2);
16520
- Jt([
16520
+ ei([
16521
16521
  f()
16522
16522
  ], Re.prototype, "cullingMask", 1);
16523
- Jt([
16523
+ ei([
16524
16524
  f()
16525
16525
  ], Re.prototype, "backgroundBlurriness", 1);
16526
- Jt([
16526
+ ei([
16527
16527
  f()
16528
16528
  ], Re.prototype, "backgroundIntensity", 1);
16529
- Jt([
16529
+ ei([
16530
16530
  f(Lt)
16531
16531
  ], Re.prototype, "backgroundRotation", 1);
16532
- Jt([
16532
+ ei([
16533
16533
  f()
16534
16534
  ], Re.prototype, "environmentIntensity", 1);
16535
- Jt([
16535
+ ei([
16536
16536
  f(ve)
16537
16537
  ], Re.prototype, "backgroundColor", 1);
16538
- Jt([
16538
+ ei([
16539
16539
  f(ur)
16540
16540
  ], Re.prototype, "targetTexture", 1);
16541
16541
  class JM {
@@ -16549,7 +16549,7 @@ class JM {
16549
16549
  return (t = this._camera) == null ? void 0 : t.context;
16550
16550
  }
16551
16551
  apply() {
16552
- this._skybox = this.context.lightmaps.tryGetSkybox(this._camera.sourceId), this._skybox ? this.context.scene.background !== this._skybox && (to && console.log(`Camera "${this._camera.name}" set skybox`, this._camera, this._skybox), this._skybox.mapping = Rn, this.context.scene.background = this._skybox) : this._did_log_failed_to_find_skybox || (this._did_log_failed_to_find_skybox = !0, console.warn(`Camera "${this._camera.name}" has no skybox texture. ${this._camera.sourceId}`));
16552
+ this._skybox = this.context.lightmaps.tryGetSkybox(this._camera.sourceId), this._skybox ? this.context.scene.background !== this._skybox && (eo && console.log(`Camera "${this._camera.name}" set skybox`, this._camera, this._skybox), this._skybox.mapping = Mn, this.context.scene.background = this._skybox) : this._did_log_failed_to_find_skybox || (this._did_log_failed_to_find_skybox = !0, console.warn(`Camera "${this._camera.name}" has no skybox texture. ${this._camera.sourceId}`));
16553
16553
  }
16554
16554
  }
16555
16555
  function eR(n) {
@@ -16595,7 +16595,7 @@ var tR = Object.defineProperty, iR = Object.getOwnPropertyDescriptor, bs = (n, t
16595
16595
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
16596
16596
  return i && s && tR(t, e, s), s;
16597
16597
  };
16598
- const At = S("debugaudio"), io = class extends D {
16598
+ const At = S("debugaudio"), to = class extends D {
16599
16599
  constructor() {
16600
16600
  super(...arguments);
16601
16601
  r(this, "clip", "");
@@ -16623,7 +16623,7 @@ const At = S("debugaudio"), io = class extends D {
16623
16623
  (this.playInBackground === !1 || Q.isMobileDevice()) && (this.wasPlaying = this.isPlaying, this.isPlaying && this.pause());
16624
16624
  break;
16625
16625
  case "visible":
16626
- At && console.log("visible", this.enabled, this.playOnAwake, !this.isPlaying, io.userInteractionRegistered, this.wasPlaying), this.enabled && this.playOnAwake && !this.isPlaying && io.userInteractionRegistered && this.wasPlaying && this.play();
16626
+ At && console.log("visible", this.enabled, this.playOnAwake, !this.isPlaying, to.userInteractionRegistered, this.wasPlaying), this.enabled && this.playOnAwake && !this.isPlaying && to.userInteractionRegistered && this.wasPlaying && this.play();
16627
16627
  break;
16628
16628
  }
16629
16629
  });
@@ -16638,7 +16638,7 @@ const At = S("debugaudio"), io = class extends D {
16638
16638
  At && console.warn("Failed getting sound?", this.name);
16639
16639
  return;
16640
16640
  }
16641
- e.isPlaying && e.stop(), t && e.setBuffer(t), e.loop = this._loop, this.context.application.muted ? e.setVolume(0) : e.setVolume(this.volume), e.autoplay = this.shouldPlay && io.userInteractionRegistered, this.applySpatialDistanceSettings(), e.isPlaying && e.stop(), io.registerWaitForAllowAudio(this.__onAllowAudioCallback);
16641
+ e.isPlaying && e.stop(), t && e.setBuffer(t), e.loop = this._loop, this.context.application.muted ? e.setVolume(0) : e.setVolume(this.volume), e.autoplay = this.shouldPlay && to.userInteractionRegistered, this.applySpatialDistanceSettings(), e.isPlaying && e.stop(), to.registerWaitForAllowAudio(this.__onAllowAudioCallback);
16642
16642
  });
16643
16643
  r(this, "__onAllowAudioCallback", () => {
16644
16644
  this.shouldPlay && this.play();
@@ -16734,7 +16734,7 @@ const At = S("debugaudio"), io = class extends D {
16734
16734
  }
16735
16735
  get Sound() {
16736
16736
  var t;
16737
- if (!this.sound && io.userInteractionRegistered) {
16737
+ if (!this.sound && to.userInteractionRegistered) {
16738
16738
  let e = C.getComponent(this.context.mainCamera, gr) ?? C.findObjectOfType(gr, this.context);
16739
16739
  !e && this.context.mainCamera && (e = C.addComponent(this.context.mainCamera, gr)), e != null && e.listener ? (this.sound = new Yx(e.listener), (t = this.gameObject) == null || t.add(this.sound)) : At && console.warn("No audio listener found in scene - can not play audio");
16740
16740
  }
@@ -16783,7 +16783,7 @@ const At = S("debugaudio"), io = class extends D {
16783
16783
  }
16784
16784
  /** @internal */
16785
16785
  onEnable() {
16786
- this.sound && this.gameObject.add(this.sound), io.userInteractionRegistered ? this.playOnAwake && this.context.application.isVisible && this.play() : io.registerWaitForAllowAudio(() => {
16786
+ this.sound && this.gameObject.add(this.sound), to.userInteractionRegistered ? this.playOnAwake && this.context.application.isVisible && this.play() : to.registerWaitForAllowAudio(() => {
16787
16787
  this.enabled && !this.destroyed && this.shouldPlay && this.onNewClip(this.clip);
16788
16788
  }), globalThis.addEventListener("visibilitychange", this.onVisibilityChanged), this.context.application.addEventListener(Sm.MuteChanged, this.onApplicationMuteChanged);
16789
16789
  }
@@ -16859,7 +16859,7 @@ Using the assigned clip instead:`, this.clip), t = this.clip);
16859
16859
  this.helper && (this.isPlaying && this.helper.update(), this.helper.visible = this.isPlaying), this._needUpdateSpatialDistanceSettings && this.applySpatialDistanceSettings(), this.sound && !this.sound.isPlaying && this.shouldPlay && !this._hasEnded && (this._hasEnded = !0, At && console.log("Audio clip ended", this.clip), this.dispatchEvent(new CustomEvent("ended", { detail: this })));
16860
16860
  }
16861
16861
  };
16862
- let Xe = io;
16862
+ let Xe = to;
16863
16863
  bs([
16864
16864
  f(URL)
16865
16865
  ], Xe.prototype, "clip", 2);
@@ -16924,7 +16924,7 @@ const sR = S("debugavatar"), hs = class extends D {
16924
16924
  };
16925
16925
  let bt = hs;
16926
16926
  r(bt, "instances", []), r(bt, "_onNewAvatarMarkerAdded", []), r(bt, "_onAvatarMarkerDestroyed", []);
16927
- class kn {
16927
+ class Rn {
16928
16928
  static Add(t, e, i = null) {
16929
16929
  if (e) {
16930
16930
  for (const s of this.Pois)
@@ -16944,7 +16944,7 @@ class kn {
16944
16944
  }
16945
16945
  }
16946
16946
  }
16947
- r(kn, "Pois", []), r(kn, "LastChangeTime", 0);
16947
+ r(Rn, "Pois", []), r(Rn, "LastChangeTime", 0);
16948
16948
  class nR {
16949
16949
  constructor() {
16950
16950
  r(this, "guid");
@@ -16984,7 +16984,7 @@ class Qd extends D {
16984
16984
  }
16985
16985
  update() {
16986
16986
  var i;
16987
- if ((!this.context.connection.isConnected || (i = this._model) != null && i.hasOwnership) && (kn.LastChangeTime !== this._lastPoiChangedTime && (this._lastPoiChangedTime = kn.LastChangeTime, this._lookDuration = 0), this.selectTarget(), this._currentTargetObject && this.context.time.frameCount % 10 === 0 && this.target)) {
16987
+ if ((!this.context.connection.isConnected || (i = this._model) != null && i.hasOwnership) && (Rn.LastChangeTime !== this._lastPoiChangedTime && (this._lastPoiChangedTime = Rn.LastChangeTime, this._lookDuration = 0), this.selectTarget(), this._currentTargetObject && this.context.time.frameCount % 10 === 0 && this.target)) {
16988
16988
  const s = ee(this._currentTargetObject);
16989
16989
  vt(this.target, s), this.context.connection.isConnected && this.avatar && (this.context.connection.send("avatar-look-target-changed", this._targetModel), this._targetModel.guid = this.avatar.guid, this._targetModel.position.copy(s));
16990
16990
  }
@@ -16992,7 +16992,7 @@ class Qd extends D {
16992
16992
  selectTarget() {
16993
16993
  if (this.context.time.time - this._lastUpdateTime > this._lookDuration) {
16994
16994
  this._lastUpdateTime = this.context.time.time, this._lookDuration = Math.random() * 0.5 + 0.2;
16995
- const i = kn.Pois;
16995
+ const i = Rn.Pois;
16996
16996
  if (i.length > 0) {
16997
16997
  const s = i[Math.floor(Math.random() * i.length)];
16998
16998
  if (s && s.obj) {
@@ -17067,7 +17067,7 @@ class lR {
17067
17067
  }
17068
17068
  }
17069
17069
  const Ze = S("debugnetworkingstreams");
17070
- var Cn = /* @__PURE__ */ ((n) => (n.Connected = "peer-user-connected", n.StreamReceived = "receive-stream", n.StreamEnded = "call-ended", n.Disconnected = "peer-user-disconnected", n.UserJoined = "user-joined", n))(Cn || {});
17070
+ var Sn = /* @__PURE__ */ ((n) => (n.Connected = "peer-user-connected", n.StreamReceived = "receive-stream", n.StreamEnded = "call-ended", n.Disconnected = "peer-user-disconnected", n.UserJoined = "user-joined", n))(Sn || {});
17071
17071
  class Fv {
17072
17072
  constructor(t, e) {
17073
17073
  r(this, "type", "call-ended");
@@ -17120,7 +17120,7 @@ Video:`, a.getVideoTracks()), this._stream = a, s === "incoming") {
17120
17120
  return this._stream;
17121
17121
  }
17122
17122
  close() {
17123
- this._isDisposed || (this._isDisposed = !0, this.call.close(), Pn(this._stream));
17123
+ this._isDisposed || (this._isDisposed = !0, this.call.close(), Cn(this._stream));
17124
17124
  }
17125
17125
  get isOpen() {
17126
17126
  var e;
@@ -17453,7 +17453,7 @@ class $u extends sg {
17453
17453
  }
17454
17454
  // const call = peer.call(peerId, stream);
17455
17455
  }
17456
- function Pn(n) {
17456
+ function Cn(n) {
17457
17457
  if (n && n instanceof MediaStream)
17458
17458
  for (const t of n.getTracks())
17459
17459
  t.stop();
@@ -17486,7 +17486,7 @@ class Dr extends D {
17486
17486
  r(this, "onLeftRoom", () => {
17487
17487
  this.debug && console.log("VOIP: Left room"), this.disconnect();
17488
17488
  for (const e of this._incomingStreams.values())
17489
- Pn(e.srcObject);
17489
+ Cn(e.srcObject);
17490
17490
  this._incomingStreams.clear();
17491
17491
  });
17492
17492
  r(this, "_incomingStreams", /* @__PURE__ */ new Map());
@@ -17501,7 +17501,7 @@ class Dr extends D {
17501
17501
  });
17502
17502
  r(this, "onStreamEnded", (e) => {
17503
17503
  const i = this._incomingStreams.get(e.userId);
17504
- Pn(i == null ? void 0 : i.srcObject), this._incomingStreams.delete(e.userId);
17504
+ Cn(i == null ? void 0 : i.srcObject), this._incomingStreams.delete(e.userId);
17505
17505
  });
17506
17506
  r(this, "onEnabledChanged", () => {
17507
17507
  for (const e of this._incomingStreams) {
@@ -17539,12 +17539,12 @@ class Dr extends D {
17539
17539
  }
17540
17540
  /** @internal */
17541
17541
  onEnable() {
17542
- this._net || (this._net = $u.create(this)), this.debug && (this._net.debug = !0), this._net.addEventListener(Cn.StreamReceived, this.onReceiveStream), this._net.addEventListener(Cn.StreamEnded, this.onStreamEnded), this._net.enable(), this.autoConnect && this.context.connection.isConnected && this.connect(), this.context.connection.beginListen(se.JoinedRoom, this.onJoinedRoom), this.context.connection.beginListen(se.LeftRoom, this.onLeftRoom), this.onEnabledChanged(), this.updateButton(), window.addEventListener("visibilitychange", this.onVisibilityChanged);
17542
+ this._net || (this._net = $u.create(this)), this.debug && (this._net.debug = !0), this._net.addEventListener(Sn.StreamReceived, this.onReceiveStream), this._net.addEventListener(Sn.StreamEnded, this.onStreamEnded), this._net.enable(), this.autoConnect && this.context.connection.isConnected && this.connect(), this.context.connection.beginListen(se.JoinedRoom, this.onJoinedRoom), this.context.connection.beginListen(se.LeftRoom, this.onLeftRoom), this.onEnabledChanged(), this.updateButton(), window.addEventListener("visibilitychange", this.onVisibilityChanged);
17543
17543
  }
17544
17544
  /** @internal */
17545
17545
  onDisable() {
17546
17546
  var e;
17547
- this._net && (this._net.stopSendingStream(this._outputStream), this._net.removeEventListener(Cn.StreamReceived, this.onReceiveStream), this._net.removeEventListener(Cn.StreamEnded, this.onStreamEnded), (e = this._net) == null || e.disable()), this.context.connection.stopListen(se.JoinedRoom, this.onJoinedRoom), this.context.connection.stopListen(se.LeftRoom, this.onLeftRoom), this.onEnabledChanged(), this.updateButton(), window.removeEventListener("visibilitychange", this.onVisibilityChanged);
17547
+ this._net && (this._net.stopSendingStream(this._outputStream), this._net.removeEventListener(Sn.StreamReceived, this.onReceiveStream), this._net.removeEventListener(Sn.StreamEnded, this.onStreamEnded), (e = this._net) == null || e.disable()), this.context.connection.stopListen(se.JoinedRoom, this.onJoinedRoom), this.context.connection.stopListen(se.LeftRoom, this.onLeftRoom), this.onEnabledChanged(), this.updateButton(), window.removeEventListener("visibilitychange", this.onVisibilityChanged);
17548
17548
  }
17549
17549
  /** @internal */
17550
17550
  onDestroy() {
@@ -17567,12 +17567,12 @@ class Dr extends D {
17567
17567
  return console.error("Cannot connect to voice chat - microphone permissions not granted"), this.updateButton(), !1;
17568
17568
  } else
17569
17569
  return console.error("Cannot connect to voice chat - not connected to server"), this.updateButton(), !1;
17570
- return this._allowSending = !0, (i = this._net) == null || i.stopSendingStream(this._outputStream), Pn(this._outputStream), this._outputStream = await this.getAudioStream(e), this._outputStream ? (this.debug && console.log("VOIP: Got audio stream"), (s = this._net) == null || s.startSendingStream(this._outputStream), this.updateButton(), !0) : (this.updateButton(), await Q.microphonePermissionsGranted() ? console.error("VOIP: Could not get audio stream - please make sure to connect an audio device and grant microphone permissions") : Tu("Microphone permissions not granted: Please grant microphone permissions to use voice chat"), (this.debug || U()) && console.log("VOIP: Failed to get audio stream"), !1);
17570
+ return this._allowSending = !0, (i = this._net) == null || i.stopSendingStream(this._outputStream), Cn(this._outputStream), this._outputStream = await this.getAudioStream(e), this._outputStream ? (this.debug && console.log("VOIP: Got audio stream"), (s = this._net) == null || s.startSendingStream(this._outputStream), this.updateButton(), !0) : (this.updateButton(), await Q.microphonePermissionsGranted() ? console.error("VOIP: Could not get audio stream - please make sure to connect an audio device and grant microphone permissions") : Tu("Microphone permissions not granted: Please grant microphone permissions to use voice chat"), (this.debug || U()) && console.log("VOIP: Failed to get audio stream"), !1);
17571
17571
  }
17572
17572
  /** Stop sending audio (muting your own microphone) */
17573
17573
  disconnect(e) {
17574
17574
  var i;
17575
- e != null && e.remember && (this._allowSending = !1), (i = this._net) == null || i.stopSendingStream(this._outputStream), Pn(this._outputStream), this._outputStream = null, this.updateButton();
17575
+ e != null && e.remember && (this._allowSending = !1), (i = this._net) == null || i.stopSendingStream(this._outputStream), Cn(this._outputStream), this._outputStream = null, this.updateButton();
17576
17576
  }
17577
17577
  /**
17578
17578
  * Mute or unmute the audio stream (this will only mute incoming streams and not mute your own microphone. Use disconnect() to mute your own microphone)
@@ -18119,7 +18119,7 @@ const kR = S("gizmos"), TR = S("debugboxhelper"), ds = class extends D {
18119
18119
  };
18120
18120
  let vi = ds;
18121
18121
  r(vi, "testBox", new Ci()), r(vi, "_position", new v()), r(vi, "_size", new v(0.01, 0.01, 0.01)), r(vi, "_emptyObjectSize", new v(0.01, 0.01, 0.01));
18122
- var AR = Object.defineProperty, ER = Object.getOwnPropertyDescriptor, ci = (n, t, e, i) => {
18122
+ var AR = Object.defineProperty, ER = Object.getOwnPropertyDescriptor, hi = (n, t, e, i) => {
18123
18123
  for (var s = i > 1 ? void 0 : i ? ER(t, e) : t, o = n.length - 1, a; o >= 0; o--)
18124
18124
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
18125
18125
  return i && s && AR(t, e, s), s;
@@ -18172,19 +18172,19 @@ class Ri extends D {
18172
18172
  (e = this.context.physics.engine) == null || e.updatePhysicsMaterial(this);
18173
18173
  }
18174
18174
  }
18175
- ci([
18175
+ hi([
18176
18176
  f(ye)
18177
18177
  ], Ri.prototype, "attachedRigidbody", 2);
18178
- ci([
18178
+ hi([
18179
18179
  f()
18180
18180
  ], Ri.prototype, "isTrigger", 2);
18181
- ci([
18181
+ hi([
18182
18182
  f()
18183
18183
  ], Ri.prototype, "sharedMaterial", 2);
18184
- ci([
18184
+ hi([
18185
18185
  f()
18186
18186
  ], Ri.prototype, "membership", 2);
18187
- ci([
18187
+ hi([
18188
18188
  f()
18189
18189
  ], Ri.prototype, "filter", 2);
18190
18190
  class Jc extends Ri {
@@ -18204,11 +18204,11 @@ class Jc extends Ri {
18204
18204
  this.updateProperties();
18205
18205
  }
18206
18206
  }
18207
- ci([
18207
+ hi([
18208
18208
  zt(),
18209
18209
  f()
18210
18210
  ], Jc.prototype, "radius", 2);
18211
- ci([
18211
+ hi([
18212
18212
  f(v)
18213
18213
  ], Jc.prototype, "center", 2);
18214
18214
  const Hv = class extends Ri {
@@ -18235,11 +18235,11 @@ const Hv = class extends Ri {
18235
18235
  }
18236
18236
  };
18237
18237
  let eh = Hv;
18238
- ci([
18238
+ hi([
18239
18239
  zt(),
18240
18240
  f(v)
18241
18241
  ], eh.prototype, "size", 2);
18242
- ci([
18242
+ hi([
18243
18243
  f(v)
18244
18244
  ], eh.prototype, "center", 2);
18245
18245
  class Lr extends Ri {
@@ -18281,10 +18281,10 @@ class Lr extends Ri {
18281
18281
  }
18282
18282
  }
18283
18283
  }
18284
- ci([
18284
+ hi([
18285
18285
  f(X)
18286
18286
  ], Lr.prototype, "sharedMesh", 2);
18287
- ci([
18287
+ hi([
18288
18288
  f()
18289
18289
  ], Lr.prototype, "convex", 2);
18290
18290
  class So extends Ri {
@@ -18299,16 +18299,16 @@ class So extends Ri {
18299
18299
  super.onEnable(), (e = this.context.physics.engine) == null || e.addCapsuleCollider(this, this.height, this.radius);
18300
18300
  }
18301
18301
  }
18302
- ci([
18302
+ hi([
18303
18303
  f(v)
18304
18304
  ], So.prototype, "center", 2);
18305
- ci([
18305
+ hi([
18306
18306
  f()
18307
18307
  ], So.prototype, "radius", 2);
18308
- ci([
18308
+ hi([
18309
18309
  f()
18310
18310
  ], So.prototype, "height", 2);
18311
- var IR = Object.defineProperty, DR = Object.getOwnPropertyDescriptor, Fn = (n, t, e, i) => {
18311
+ var IR = Object.defineProperty, DR = Object.getOwnPropertyDescriptor, Bn = (n, t, e, i) => {
18312
18312
  for (var s = i > 1 ? void 0 : i ? DR(t, e) : t, o = n.length - 1, a; o >= 0; o--)
18313
18313
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
18314
18314
  return i && s && IR(t, e, s), s;
@@ -18361,13 +18361,13 @@ class Ja extends D {
18361
18361
  return this._contactVelocity;
18362
18362
  }
18363
18363
  }
18364
- Fn([
18364
+ Bn([
18365
18365
  f(v)
18366
18366
  ], Ja.prototype, "center", 2);
18367
- Fn([
18367
+ Bn([
18368
18368
  f()
18369
18369
  ], Ja.prototype, "radius", 2);
18370
- Fn([
18370
+ Bn([
18371
18371
  f()
18372
18372
  ], Ja.prototype, "height", 2);
18373
18373
  class Ro extends D {
@@ -18388,7 +18388,7 @@ class Ro extends D {
18388
18388
  r(this, "_temp", new v(0, 0, 0));
18389
18389
  r(this, "_jumpCount", 0);
18390
18390
  r(this, "_currentRotation");
18391
- r(this, "_raycastOptions", new En());
18391
+ r(this, "_raycastOptions", new An());
18392
18392
  }
18393
18393
  awake() {
18394
18394
  this._currentRotation = new W();
@@ -18436,22 +18436,22 @@ class Ro extends D {
18436
18436
  }
18437
18437
  }
18438
18438
  }
18439
- Fn([
18439
+ Bn([
18440
18440
  f(Ja)
18441
18441
  ], Ro.prototype, "controller", 2);
18442
- Fn([
18442
+ Bn([
18443
18443
  f()
18444
18444
  ], Ro.prototype, "movementSpeed", 2);
18445
- Fn([
18445
+ Bn([
18446
18446
  f()
18447
18447
  ], Ro.prototype, "rotationSpeed", 2);
18448
- Fn([
18448
+ Bn([
18449
18449
  f()
18450
18450
  ], Ro.prototype, "jumpForce", 2);
18451
- Fn([
18451
+ Bn([
18452
18452
  f()
18453
18453
  ], Ro.prototype, "doubleJumpForce", 2);
18454
- Fn([
18454
+ Bn([
18455
18455
  f(Bt)
18456
18456
  ], Ro.prototype, "animator", 2);
18457
18457
  var LR = Object.defineProperty, jR = Object.getOwnPropertyDescriptor, el = (n, t, e, i) => {
@@ -18857,7 +18857,7 @@ const ji = (jl = class extends D {
18857
18857
  if (!i)
18858
18858
  return;
18859
18859
  this._isDragging = !0;
18860
- const s = C.getComponentInChildren(i, In);
18860
+ const s = C.getComponentInChildren(i, En);
18861
18861
  Us && console.log("DRAG START", s, i), s && (s.fastMode = !0, s == null || s.requestOwnership()), this._marker = C.addComponent(i, Hu), this._draggingRigidbodies.length = 0;
18862
18862
  const o = C.getComponentsInChildren(i, ye);
18863
18863
  o && this._draggingRigidbodies.push(...o);
@@ -18880,7 +18880,7 @@ const ji = (jl = class extends D {
18880
18880
  for (const i of this._draggingRigidbodies)
18881
18881
  i.setVelocity(i.smoothedVelocity);
18882
18882
  if (this._draggingRigidbodies.length = 0, this._targetObject = null, t != null && t.object) {
18883
- const i = C.getComponentInChildren(t.object, In);
18883
+ const i = C.getComponentInChildren(t.object, En);
18884
18884
  i && (i.fastMode = !1);
18885
18885
  }
18886
18886
  if (this._marker && this._marker.destroy(), !this._dragHelper)
@@ -19260,12 +19260,12 @@ const Ty = class {
19260
19260
  if (this._selected && e)
19261
19261
  for (const i of this._rbs)
19262
19262
  i.wakeUp(), i.setVelocity(0, 0, 0);
19263
- if (this._selected && kn.Remove(e, this._selected), this._selected = t, this._context = e, this._rbs.length = 0, t ? (e.scene.add(this._groundLine), e.scene.add(this._groundMarker)) : (this._groundLine.removeFromParent(), this._groundMarker.removeFromParent()), this._selected) {
19263
+ if (this._selected && Rn.Remove(e, this._selected), this._selected = t, this._context = e, this._rbs.length = 0, t ? (e.scene.add(this._groundLine), e.scene.add(this._groundMarker)) : (this._groundLine.removeFromParent(), this._groundMarker.removeFromParent()), this._selected) {
19264
19264
  if (!e) {
19265
19265
  console.error("DragHelper: no context");
19266
19266
  return;
19267
19267
  }
19268
- kn.Add(e, this._selected, null), this._groundOffsetFactor = 0, this._hasGroundPlane = !0, this._groundOffset.set(0, 0, 0), this._requireUpdateGroundPlane = !0, this.onUpdateScreenSpacePlane();
19268
+ Rn.Add(e, this._selected, null), this._groundOffsetFactor = 0, this._hasGroundPlane = !0, this._groundOffset.set(0, 0, 0), this._requireUpdateGroundPlane = !0, this.onUpdateScreenSpacePlane();
19269
19269
  }
19270
19270
  }
19271
19271
  onUpdate(t) {
@@ -19292,7 +19292,7 @@ const Ty = class {
19292
19292
  onUpdateGroundPlane() {
19293
19293
  if (!this._selected || !this._context)
19294
19294
  return;
19295
- const t = ee(this._selected), e = new Rr(H(0, 0.1, 0).add(t), H(0, -1, 0)), i = new En();
19295
+ const t = ee(this._selected), e = new Rr(H(0, 0.1, 0).add(t), H(0, -1, 0)), i = new An();
19296
19296
  i.testObject = (o) => o !== this._selected;
19297
19297
  const s = this._context.physics.raycastFromRay(e, i);
19298
19298
  for (let o = 0; o < s.length; o++) {
@@ -19560,7 +19560,7 @@ class ko extends D {
19560
19560
  }
19561
19561
  }
19562
19562
  Ec.assignAnimationsFromFile(o, {
19563
- createAnimationComponent: (p) => Qi(p, Kt)
19563
+ createAnimationComponent: (p) => Qi(p, Zt)
19564
19564
  });
19565
19565
  const h = new Vg({
19566
19566
  sender: this,
@@ -19697,8 +19697,8 @@ const Kv = class extends D {
19697
19697
  a || (a = this.object.addComponent(Si, {
19698
19698
  dragMode: Yv.SnapToSurfaces
19699
19699
  }), a.guid = s.generateUUID());
19700
- let l = C.getComponent(a.gameObject, In);
19701
- l || (l = a.gameObject.addComponent(In), l.guid = s.generateUUID());
19700
+ let l = C.getComponent(a.gameObject, En);
19701
+ l || (l = a.gameObject.addComponent(En), l.guid = s.generateUUID());
19702
19702
  }
19703
19703
  this.object.visible = !1;
19704
19704
  const i = this.gameObject.getComponent(Si);
@@ -20166,7 +20166,7 @@ const ak = Symbol("stencils"), Jo = class {
20166
20166
  const o = i[s];
20167
20167
  if (rk(o.layer, t)) {
20168
20168
  ap && console.log(o), setTimeout(() => {
20169
- li() && Rg(t.gameObject) && (be("Stencil not supported on instanced objects"), console.warn("Stencil not supported on instanced objects", t));
20169
+ ci() && Rg(t.gameObject) && (be("Stencil not supported on instanced objects"), console.warn("Stencil not supported on instanced objects", t));
20170
20170
  }, 500);
20171
20171
  for (let a = 0; a < t.sharedMaterials.length; a++) {
20172
20172
  let l = t.sharedMaterials[a];
@@ -20651,7 +20651,7 @@ const dn = (id = class extends D {
20651
20651
  console.error("ReflectionProbe.texture must be a Texture", t);
20652
20652
  return;
20653
20653
  }
20654
- this._texture = t, t && (t.mapping = Rn, t.colorSpace = gs, t.needsUpdate = !0);
20654
+ this._texture = t, t && (t.mapping = Mn, t.colorSpace = gs, t.needsUpdate = !0);
20655
20655
  }
20656
20656
  get texture() {
20657
20657
  return this._texture;
@@ -20661,7 +20661,7 @@ const dn = (id = class extends D {
20661
20661
  return (e = this._boxHelper) == null ? void 0 : e.isInBox(t);
20662
20662
  }
20663
20663
  awake() {
20664
- this._boxHelper = this.gameObject.addComponent(vi), this._boxHelper.updateBox(!0), zh && this._boxHelper.showHelper(5592320, !0), this.texture && (this.texture.mapping = Rn, this.texture.colorSpace = gs, this.texture.needsUpdate = !0);
20664
+ this._boxHelper = this.gameObject.addComponent(vi), this._boxHelper.updateBox(!0), zh && this._boxHelper.showHelper(5592320, !0), this.texture && (this.texture.mapping = Mn, this.texture.colorSpace = gs, this.texture.needsUpdate = !0);
20665
20665
  }
20666
20666
  onDestroy() {
20667
20667
  const t = dn._probes.get(this.context);
@@ -20720,7 +20720,7 @@ nw([
20720
20720
  nw([
20721
20721
  f(v)
20722
20722
  ], th.prototype, "size", 2);
20723
- const ii = S("debuginstancing"), du = class {
20723
+ const si = S("debuginstancing"), du = class {
20724
20724
  constructor() {
20725
20725
  r(this, "objs", []);
20726
20726
  }
@@ -20749,7 +20749,7 @@ const ii = S("debuginstancing"), du = class {
20749
20749
  return null;
20750
20750
  if (i.rend.enableInstancing !== !0) {
20751
20751
  if (s >= i.rend.enableInstancing.length)
20752
- return ii && console.error("Something is wrong with instance setup", t, i.rend.enableInstancing, s), null;
20752
+ return si && console.error("Something is wrong with instance setup", t, i.rend.enableInstancing, s), null;
20753
20753
  if (!i.rend.enableInstancing[s])
20754
20754
  return null;
20755
20755
  }
@@ -20853,7 +20853,7 @@ const vc = class {
20853
20853
  return i(`Instancing: Can not update geometry (${this.name}), reserved index range is too small: ${this.__reservedIndexRange.toLocaleString()} < ${this.indexCount.toLocaleString()} indices for ${this.name}`);
20854
20854
  return this.renderer.updateGeometry(t, this.__geometryIndex);
20855
20855
  function i(s) {
20856
- return e.updateMeshInformation() && (e.renderer.remove(e, !0), e.renderer.add(e)) ? !0 : ((U() || ii) && console.error(s), !1);
20856
+ return e.updateMeshInformation() && (e.renderer.remove(e, !0), e.renderer.add(e)) ? !0 : ((U() || si) && console.error(s), !1);
20857
20857
  }
20858
20858
  }
20859
20859
  /** Adds this object to the instancing renderer (effectively activating instancing) */
@@ -20895,16 +20895,16 @@ class ow {
20895
20895
  r(this, "_needUpdateBounds", !1);
20896
20896
  r(this, "_debugMaterial", null);
20897
20897
  r(this, "onBeforeRender", () => {
20898
- this._batchedMesh.layers.enableAll(), this._needUpdateBounds && this._batchedMesh[Ul] === !0 && (ii && console.log("Update instancing bounds", this.name, this._batchedMesh.matrixWorldNeedsUpdate), this.updateBounds());
20898
+ this._batchedMesh.layers.enableAll(), this._needUpdateBounds && this._batchedMesh[Ul] === !0 && (si && console.log("Update instancing bounds", this.name, this._batchedMesh.matrixWorldNeedsUpdate), this.updateBounds());
20899
20899
  });
20900
20900
  r(this, "onAfterRender", () => {
20901
20901
  this._batchedMesh.layers.disableAll();
20902
20902
  });
20903
20903
  r(this, "_availableBuckets", new Array());
20904
20904
  r(this, "_usedBuckets", new Array());
20905
- this.name = t, this.geometry = e, this.material = i, this._context = o, this._maxInstanceCount = Math.max(2, s), ii && (this._debugMaterial = fb());
20905
+ this.name = t, this.geometry = e, this.material = i, this._context = o, this._maxInstanceCount = Math.max(2, s), si && (this._debugMaterial = fb());
20906
20906
  const a = this.tryEstimateVertexCountSize(this._maxInstanceCount, [e], s);
20907
- this._maxVertexCount = a.vertexCount, this._maxIndexCount = a.indexCount, this._batchedMesh = new By(this._maxInstanceCount, this._maxVertexCount, this._maxIndexCount, this._debugMaterial ?? this.material), this._batchedMesh[Ul] = !0, this._batchedMesh.visible = !0, this._context.scene.add(this._batchedMesh), i instanceof a0 && (i.defines.USE_INSTANCING = !0, i.needsUpdate = !0), o.pre_render_callbacks.push(this.onBeforeRender), o.post_render_callbacks.push(this.onAfterRender), ii && console.log(`Instanced renderer created with ${this._maxInstanceCount} instances, ${this._maxVertexCount} max vertices and ${this._maxIndexCount} max indices for "${t}"`);
20907
+ this._maxVertexCount = a.vertexCount, this._maxIndexCount = a.indexCount, this._batchedMesh = new By(this._maxInstanceCount, this._maxVertexCount, this._maxIndexCount, this._debugMaterial ?? this.material), this._batchedMesh[Ul] = !0, this._batchedMesh.visible = !0, this._context.scene.add(this._batchedMesh), i instanceof a0 && (i.defines.USE_INSTANCING = !0, i.needsUpdate = !0), o.pre_render_callbacks.push(this.onBeforeRender), o.post_render_callbacks.push(this.onAfterRender), si && console.log(`Instanced renderer created with ${this._maxInstanceCount} instances, ${this._maxVertexCount} max vertices and ${this._maxIndexCount} max indices for "${t}"`);
20908
20908
  }
20909
20909
  /** The three instanced mesh
20910
20910
  * @link https://threejs.org/docs/#api/en/objects/InstancedMesh
@@ -20947,7 +20947,7 @@ class ow {
20947
20947
  return this._maxVertexCount > 1e7 || e !== this.material || !this.validateGeometry(t) ? !1 : !!(!this.mustGrow(t) || this.allowResize);
20948
20948
  }
20949
20949
  dispose() {
20950
- ii && console.warn("Dispose instanced renderer", this.name), this._context.scene.remove(this._batchedMesh), this._batchedMesh.dispose(), this._batchedMesh = null, this._handles = [];
20950
+ si && console.warn("Dispose instanced renderer", this.name), this._context.scene.remove(this._batchedMesh), this._batchedMesh.dispose(), this._batchedMesh = null, this._handles = [];
20951
20951
  }
20952
20952
  addInstance(t) {
20953
20953
  const e = new Ta(t, this);
@@ -20982,7 +20982,7 @@ class ow {
20982
20982
  this._batchedMesh.setMatrixAt(e, t), this.markNeedsUpdate();
20983
20983
  }
20984
20984
  updateGeometry(t, e) {
20985
- return this.validateGeometry(t) ? (this.mustGrow() && this.grow(t), ii && console.debug("UPDATE MESH", e, this._batchedMesh._geometryCount, t.name, Ko(t), t.attributes.position.count, t.index ? t.index.count : 0), this._batchedMesh.setGeometryAt(e, t), this.markNeedsUpdate(), !0) : !1;
20985
+ return this.validateGeometry(t) ? (this.mustGrow() && this.grow(t), si && console.debug("UPDATE MESH", e, this._batchedMesh._geometryCount, t.name, Ko(t), t.attributes.position.count, t.index ? t.index.count : 0), this._batchedMesh.setGeometryAt(e, t), this.markNeedsUpdate(), !0) : !1;
20986
20986
  }
20987
20987
  validateGeometry(t) {
20988
20988
  const e = this.geometry;
@@ -20992,7 +20992,7 @@ class ow {
20992
20992
  return !0;
20993
20993
  }
20994
20994
  markNeedsUpdate() {
20995
- ii && console.warn("Marking instanced mesh dirty", this.name), this._needUpdateBounds = !0;
20995
+ si && console.warn("Marking instanced mesh dirty", this.name), this._needUpdateBounds = !0;
20996
20996
  }
20997
20997
  /**
20998
20998
  * @param geo The geometry to add (if none is provided it means the geometry is already added and just updated)
@@ -21007,7 +21007,7 @@ class ow {
21007
21007
  }
21008
21008
  grow(t) {
21009
21009
  const e = this._maxInstanceCount * 2, i = this.tryEstimateVertexCountSize(e, [t]), s = Math.max(this._maxVertexCount, i.vertexCount), o = Math.max(this._maxIndexCount, i.indexCount, this._maxVertexCount * 2);
21010
- if (ii) {
21010
+ if (si) {
21011
21011
  const c = Ko(t);
21012
21012
  console.warn(`Growing batched mesh for "${this.name}/${t.name}" ${c.vertexCount} vertices, ${c.indexCount} indices
21013
21013
  Max count ${this._maxInstanceCount} → ${e}
@@ -21056,22 +21056,22 @@ Max index count ${this._maxIndexCount} -> ${o}`), this._debugMaterial = fb();
21056
21056
  }
21057
21057
  if (i != null) {
21058
21058
  const l = i;
21059
- ii && console.debug(`RE-USE SPACE #${l.geometryIndex}, ${t.maxVertexCount} vertices, ${t.maxIndexCount} indices, ${t.name}`);
21059
+ si && console.debug(`RE-USE SPACE #${l.geometryIndex}, ${t.maxVertexCount} vertices, ${t.maxIndexCount} indices, ${t.name}`);
21060
21060
  try {
21061
21061
  this._batchedMesh.setGeometryAt(l.geometryIndex, t.object.geometry);
21062
21062
  const c = this._batchedMesh.addInstance(l.geometryIndex);
21063
21063
  this._batchedMesh.setMatrixAt(c, t.object.matrixWorld), this._batchedMesh.setVisibleAt(c, !0), t.__instanceIndex = c, this._usedBuckets[l.geometryIndex] = l, this._availableBuckets.splice(s, 1);
21064
21064
  return;
21065
21065
  } catch (c) {
21066
- ii ? console.error("Failed to re-use space", c) : U() && console.warn(`Failed to re-use space "${c instanceof Error ? c.message : c}" in bucket ${l.geometryIndex} (${l.vertexCount}) - will add new geometry instead`);
21066
+ si ? console.error("Failed to re-use space", c) : U() && console.warn(`Failed to re-use space "${c instanceof Error ? c.message : c}" in bucket ${l.geometryIndex} (${l.vertexCount}) - will add new geometry instead`);
21067
21067
  }
21068
21068
  }
21069
21069
  let o = this._geometryIds.get(e);
21070
- o == null ? (ii && console.debug("ADD GEOMETRY & INSTANCE", e.name, `
21070
+ o == null ? (si && console.debug("ADD GEOMETRY & INSTANCE", e.name, `
21071
21071
  vertex:`, `${this._currentVertexCount} + ${t.maxVertexCount} < ${this._maxVertexCount}?`, `
21072
- index:`, t.maxIndexCount, this._currentIndexCount, this._maxIndexCount), o = this._batchedMesh.addGeometry(e, t.maxVertexCount, t.maxIndexCount), this._geometryIds.set(e, o)) : ii && console.log("ADD INSTANCE", o, e.name), this._currentVertexCount += t.maxVertexCount, this._currentIndexCount += t.maxIndexCount;
21072
+ index:`, t.maxIndexCount, this._currentIndexCount, this._maxIndexCount), o = this._batchedMesh.addGeometry(e, t.maxVertexCount, t.maxIndexCount), this._geometryIds.set(e, o)) : si && console.log("ADD INSTANCE", o, e.name), this._currentVertexCount += t.maxVertexCount, this._currentIndexCount += t.maxIndexCount;
21073
21073
  const a = this._batchedMesh.addInstance(o);
21074
- t.__geometryIndex = o, t.__instanceIndex = a, t.__reservedVertexRange = t.maxVertexCount, t.__reservedIndexRange = t.maxIndexCount, this._usedBuckets[a] = { geometryIndex: o, vertexCount: t.maxVertexCount, indexCount: t.maxIndexCount }, this._batchedMesh.setMatrixAt(a, t.object.matrixWorld), ii && console.debug(`ADD MESH & RESERVE SPACE #${a}, ${t.maxVertexCount} vertices, ${t.maxIndexCount} indices, ${t.name} ${t.object.uuid}`);
21074
+ t.__geometryIndex = o, t.__instanceIndex = a, t.__reservedVertexRange = t.maxVertexCount, t.__reservedIndexRange = t.maxIndexCount, this._usedBuckets[a] = { geometryIndex: o, vertexCount: t.maxVertexCount, indexCount: t.maxIndexCount }, this._batchedMesh.setMatrixAt(a, t.object.matrixWorld), si && console.debug(`ADD MESH & RESERVE SPACE #${a}, ${t.maxVertexCount} vertices, ${t.maxIndexCount} indices, ${t.name} ${t.object.uuid}`);
21075
21075
  }
21076
21076
  removeGeometry(t, e) {
21077
21077
  if (t.__instanceIndex < 0) {
@@ -21101,7 +21101,7 @@ function Ko(n) {
21101
21101
  return t = Math.ceil(t), e = Math.ceil(e), { vertexCount: t, indexCount: e };
21102
21102
  }
21103
21103
  function fb() {
21104
- const n = new ri({ color: new ae(Math.random(), Math.random(), Math.random()) });
21104
+ const n = new ai({ color: new ae(Math.random(), Math.random(), Math.random()) });
21105
21105
  return n.emissive = n.color, n.emissiveIntensity = 0.3, S("wireframe") && (n.wireframe = !0), n;
21106
21106
  }
21107
21107
  const Zr = S("debuglightmaps");
@@ -21208,7 +21208,7 @@ Texture:`, i), this.setLightmapDebugMaterial()) : Zr && console.log("Use debugli
21208
21208
  });
21209
21209
  }
21210
21210
  }
21211
- var bk = Object.defineProperty, vk = Object.getOwnPropertyDescriptor, zn = (n, t, e, i) => {
21211
+ var bk = Object.defineProperty, vk = Object.getOwnPropertyDescriptor, Fn = (n, t, e, i) => {
21212
21212
  for (var s = i > 1 ? void 0 : i ? vk(t, e) : t, o = n.length - 1, a; o >= 0; o--)
21213
21213
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
21214
21214
  return i && s && bk(t, e, s), s;
@@ -21264,7 +21264,7 @@ class xk {
21264
21264
  if (a) {
21265
21265
  this._indexMapMaxIndex = c, this._indexMap = l;
21266
21266
  const h = `Renderer ${t.name} was initialized with missing materials - this may lead to unexpected behaviour when trying to access sharedMaterials by index.`;
21267
- console.warn(h), li() && be("Found renderer with missing materials: please check the console for details.");
21267
+ console.warn(h), ci() && be("Found renderer with missing materials: please check the console for details.");
21268
21268
  }
21269
21269
  return new Proxy(this, {
21270
21270
  get(h, d) {
@@ -21644,31 +21644,31 @@ const wd = class extends D {
21644
21644
  }
21645
21645
  };
21646
21646
  let et = wd;
21647
- zn([
21647
+ Fn([
21648
21648
  f()
21649
21649
  ], et.prototype, "receiveShadows", 2);
21650
- zn([
21650
+ Fn([
21651
21651
  f()
21652
21652
  ], et.prototype, "shadowCastingMode", 2);
21653
- zn([
21653
+ Fn([
21654
21654
  f()
21655
21655
  ], et.prototype, "lightmapIndex", 2);
21656
- zn([
21656
+ Fn([
21657
21657
  f(pe)
21658
21658
  ], et.prototype, "lightmapScaleOffset", 2);
21659
- zn([
21659
+ Fn([
21660
21660
  f()
21661
21661
  ], et.prototype, "enableInstancing", 2);
21662
- zn([
21662
+ Fn([
21663
21663
  f()
21664
21664
  ], et.prototype, "renderOrder", 2);
21665
- zn([
21665
+ Fn([
21666
21666
  f()
21667
21667
  ], et.prototype, "allowOcclusionWhenDynamic", 2);
21668
- zn([
21668
+ Fn([
21669
21669
  f(L)
21670
21670
  ], et.prototype, "probeAnchor", 2);
21671
- zn([
21671
+ Fn([
21672
21672
  f()
21673
21673
  ], et.prototype, "reflectionProbeUsage", 2);
21674
21674
  class qu extends et {
@@ -21688,7 +21688,7 @@ class aw extends qu {
21688
21688
  onAfterRender() {
21689
21689
  if (super.onAfterRender(), this._needUpdateBoundingSphere) {
21690
21690
  for (const e of this.sharedMeshes)
21691
- if (e instanceof Mn) {
21691
+ if (e instanceof On) {
21692
21692
  this._needUpdateBoundingSphere = !1;
21693
21693
  const i = e.geometry, s = h0(e);
21694
21694
  s && (e.geometry = s), e.computeBoundingSphere(), e.geometry = i;
@@ -21696,7 +21696,7 @@ class aw extends qu {
21696
21696
  }
21697
21697
  if (pb) {
21698
21698
  for (const e of this.sharedMeshes)
21699
- if (e instanceof Mn && e.boundingSphere) {
21699
+ if (e instanceof On && e.boundingSphere) {
21700
21700
  const i = H(e.boundingSphere.center).applyMatrix4(e.matrixWorld);
21701
21701
  G.DrawWireSphere(i, e.boundingSphere.radius, "red");
21702
21702
  }
@@ -22073,11 +22073,11 @@ const Rk = new v(), kk = new W(), Tk = new v(1, 1, 1), er = class {
22073
22073
  this._isDynamic = t;
22074
22074
  }
22075
22075
  static createEmptyParent(t) {
22076
- const e = new er(On.generateUUID(), t.name + "_empty_" + er.USDObject_export_id++, t.transform), i = t.parent;
22076
+ const e = new er(Pn.generateUUID(), t.name + "_empty_" + er.USDObject_export_id++, t.transform), i = t.parent;
22077
22077
  return i && i.add(e), e.add(t), e.isDynamic = !0, t.transform = null, e;
22078
22078
  }
22079
22079
  static createEmpty() {
22080
- const t = new er(On.generateUUID(), "Empty_" + er.USDObject_export_id++);
22080
+ const t = new er(Pn.generateUUID(), "Empty_" + er.USDObject_export_id++);
22081
22081
  return t.isDynamic = !0, t;
22082
22082
  }
22083
22083
  is(t) {
@@ -22087,7 +22087,7 @@ const Rk = new v(), kk = new W(), Tk = new v(1, 1, 1), er = class {
22087
22087
  return !this.geometry;
22088
22088
  }
22089
22089
  clone() {
22090
- const t = new er(On.generateUUID(), this.name, this.transform, this.geometry, this.material);
22090
+ const t = new er(Pn.generateUUID(), this.name, this.transform, this.geometry, this.material);
22091
22091
  return t.isDynamic = this.isDynamic, t;
22092
22092
  }
22093
22093
  deepClone() {
@@ -22286,7 +22286,7 @@ let Ik = class {
22286
22286
  he.report("export-usdz", "Invoking onBeforeBuildDocument"), await xd(i, "onBeforeBuildDocument"), he.report("export-usdz", "Done onBeforeBuildDocument"), he.report("export-usdz", "Reparent bones to common ancestor");
22287
22287
  const c = [], h = /* @__PURE__ */ new Set();
22288
22288
  t == null || t.traverse((k) => {
22289
- if (!(!e.exportInvisible && !k.visible) && k instanceof Mn) {
22289
+ if (!(!e.exportInvisible && !k.visible) && k instanceof On) {
22290
22290
  const O = k.skeleton.bones, R = dw(O);
22291
22291
  if (R) {
22292
22292
  const E = { object: k, originalParent: k.parent, newParent: R };
@@ -22367,8 +22367,8 @@ function pw(n, t, e, i) {
22367
22367
  return;
22368
22368
  let s, o, a;
22369
22369
  const l = { position: n.position, quaternion: n.quaternion, scale: n.scale };
22370
- if (n.position.x === 0 && n.position.y === 0 && n.position.z === 0 && (l.position = null), n.quaternion.x === 0 && n.quaternion.y === 0 && n.quaternion.z === 0 && n.quaternion.w === 1 && (l.quaternion = null), n.scale.x === 1 && n.scale.y === 1 && n.scale.z === 1 && (l.scale = null), (n instanceof X || n instanceof Mn) && (o = n.geometry, a = n.material), i && !i(n) && (o = void 0, a = void 0), (n instanceof X || n instanceof Mn) && a && (a instanceof ri || a instanceof De || a instanceof Se && a.type === "MeshLineMaterial")) {
22371
- const h = Wh(n), d = n instanceof Mn ? n : null;
22370
+ if (n.position.x === 0 && n.position.y === 0 && n.position.z === 0 && (l.position = null), n.quaternion.x === 0 && n.quaternion.y === 0 && n.quaternion.z === 0 && n.quaternion.w === 1 && (l.quaternion = null), n.scale.x === 1 && n.scale.y === 1 && n.scale.z === 1 && (l.scale = null), (n instanceof X || n instanceof On) && (o = n.geometry, a = n.material), i && !i(n) && (o = void 0, a = void 0), (n instanceof X || n instanceof On) && a && (a instanceof ai || a instanceof De || a instanceof Se && a.type === "MeshLineMaterial")) {
22371
+ const h = Wh(n), d = n instanceof On ? n : null;
22372
22372
  s = new Dt(n.uuid, h, l, o, a, void 0, d, n.animations);
22373
22373
  } else if (n instanceof ge || n instanceof ig) {
22374
22374
  const h = Wh(n);
@@ -22856,7 +22856,7 @@ function Hk(n, t, e = !1) {
22856
22856
  // MirroredRepeatWrapping
22857
22857
  }, I = b.repeat.clone(), A = b.offset.clone(), V = b.rotation, te = Math.sin(V), K = Math.cos(V);
22858
22858
  A.y = 1 - A.y - I.y, e ? (I.x === 0 && (I.x = 1e-4), I.y === 0 && (I.y = 1e-4), A.x = A.x / I.x, A.y = A.y / I.y, A.x += te / I.x, A.y += K - 1) : (A.x += te * I.x, A.y += (1 - K) * I.y);
22859
- const ie = I.x != 1 || I.y != 1 || A.x != 0 || A.y != 0 || V != 0, le = `${Vt}/${i}/${"uvReader_" + T}.outputs:result>`, ke = `${Vt}/${i}/Transform2d_${x}.outputs:result>`, ot = x !== "normal" && M && (M.r !== 1 || M.g !== 1 || M.b !== 1 || k !== 1) || !1, sn = x === "normal", pt = n instanceof ri && n.normalScale ? n.normalScale.x * 2 : 2, Ss = pt.toFixed(Ee), nn = (-1 * (pt / 2)).toFixed(Ee), zo = (1 - pt).toFixed(Ee);
22859
+ const ie = I.x != 1 || I.y != 1 || A.x != 0 || A.y != 0 || V != 0, le = `${Vt}/${i}/${"uvReader_" + T}.outputs:result>`, ke = `${Vt}/${i}/Transform2d_${x}.outputs:result>`, ot = x !== "normal" && M && (M.r !== 1 || M.g !== 1 || M.b !== 1 || k !== 1) || !1, sn = x === "normal", pt = n instanceof ai && n.normalScale ? n.normalScale.x * 2 : 2, Ss = pt.toFixed(Ee), nn = (-1 * (pt / 2)).toFixed(Ee), zo = (1 - pt).toFixed(Ee);
22860
22860
  return `
22861
22861
  ${ie ? `def Shader "Transform2d_${x}" (
22862
22862
  sdrMetadata = {
@@ -22895,7 +22895,7 @@ function Hk(n, t, e = !1) {
22895
22895
  }`;
22896
22896
  }
22897
22897
  let u = n.transparent || n.alphaTest ? n.opacity : 1, p = !1, m = !1;
22898
- if (n instanceof em && n.transmission !== void 0 && (u *= 1 - n.transmission * (1 - n.roughness * 0.5)), n.map ? (a.push(`${o}color3f inputs:diffuseColor.connect = ${Vt}/${i}/${h(n.map)}_diffuse.outputs:rgb>`), n instanceof De && n.transparent && n.alphaTest == 0 && e ? (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(n.map)}_diffuse.outputs:a>`), p = !0, a.push(`${o}float inputs:opacityThreshold = ${1e-10}`), m = !0) : n.transparent ? (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(n.map)}_diffuse.outputs:a>`), p = !0) : n.alphaTest > 0 && (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(n.map)}_diffuse.outputs:a>`), p = !0, a.push(`${o}float inputs:opacityThreshold = ${n.alphaTest}`), m = !0), l.push(d(n.map, "diffuse", n.color, u))) : a.push(`${o}color3f inputs:diffuseColor = ${vb(n.color)}`), n.alphaHash && e && (m ? console.warn("Opacity threshold for " + n.name + " was already connected. Skipping alphaHash opacity threshold.") : (a.push(`${o}float inputs:opacityThreshold = 0.0000000001`), m = !0)), n.aoMap && (a.push(`${o}float inputs:occlusion.connect = ${Vt}/${i}/${h(n.aoMap)}_occlusion.outputs:r>`), l.push(d(n.aoMap, "occlusion"))), n.alphaMap ? (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(n.alphaMap)}_opacity.outputs:r>`), a.push(`${o}float inputs:opacityThreshold = 0.0000000001`), p = !0, m = !0, l.push(d(n.alphaMap, "opacity", new ae(1, 1, 1), u))) : (p ? console.warn("Opacity for " + n.name + " was already connected. Skipping default opacity.") : (a.push(`${o}float inputs:opacity = ${u}`), p = !0), n.alphaTest > 0 && (m ? console.warn("Opacity threshold for " + n.name + " was already connected. Skipping default opacity threshold.") : (a.push(`${o}float inputs:opacityThreshold = ${n.alphaTest}`), m = !0))), n instanceof ri) {
22898
+ if (n instanceof em && n.transmission !== void 0 && (u *= 1 - n.transmission * (1 - n.roughness * 0.5)), n.map ? (a.push(`${o}color3f inputs:diffuseColor.connect = ${Vt}/${i}/${h(n.map)}_diffuse.outputs:rgb>`), n instanceof De && n.transparent && n.alphaTest == 0 && e ? (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(n.map)}_diffuse.outputs:a>`), p = !0, a.push(`${o}float inputs:opacityThreshold = ${1e-10}`), m = !0) : n.transparent ? (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(n.map)}_diffuse.outputs:a>`), p = !0) : n.alphaTest > 0 && (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(n.map)}_diffuse.outputs:a>`), p = !0, a.push(`${o}float inputs:opacityThreshold = ${n.alphaTest}`), m = !0), l.push(d(n.map, "diffuse", n.color, u))) : a.push(`${o}color3f inputs:diffuseColor = ${vb(n.color)}`), n.alphaHash && e && (m ? console.warn("Opacity threshold for " + n.name + " was already connected. Skipping alphaHash opacity threshold.") : (a.push(`${o}float inputs:opacityThreshold = 0.0000000001`), m = !0)), n.aoMap && (a.push(`${o}float inputs:occlusion.connect = ${Vt}/${i}/${h(n.aoMap)}_occlusion.outputs:r>`), l.push(d(n.aoMap, "occlusion"))), n.alphaMap ? (a.push(`${o}float inputs:opacity.connect = ${Vt}/${i}/${h(n.alphaMap)}_opacity.outputs:r>`), a.push(`${o}float inputs:opacityThreshold = 0.0000000001`), p = !0, m = !0, l.push(d(n.alphaMap, "opacity", new ae(1, 1, 1), u))) : (p ? console.warn("Opacity for " + n.name + " was already connected. Skipping default opacity.") : (a.push(`${o}float inputs:opacity = ${u}`), p = !0), n.alphaTest > 0 && (m ? console.warn("Opacity threshold for " + n.name + " was already connected. Skipping default opacity threshold.") : (a.push(`${o}float inputs:opacityThreshold = ${n.alphaTest}`), m = !0))), n instanceof ai) {
22899
22899
  if (n.emissiveMap) {
22900
22900
  a.push(`${o}color3f inputs:emissiveColor.connect = ${Vt}/${i}/${h(n.emissiveMap)}_emissive.outputs:rgb>`);
22901
22901
  const b = n.emissive.clone();
@@ -23701,8 +23701,8 @@ const Ey = class {
23701
23701
  e.beginBlock(`def Preliminary_Trigger "${this.id}"`), this.targetId && (typeof this.targetId != "string" && (this.targetId = Bm(this.targetId, t)), e.appendLine("rel affectedObjects = " + this.targetId)), this.tokenId && e.appendLine(`token info:id = "${this.tokenId}"`), this.type && e.appendLine(`token type = "${this.type}"`), typeof this.distance == "number" && e.appendLine(`double distance = ${this.distance}`), e.closeBlock();
23702
23702
  }
23703
23703
  };
23704
- let Tn = Ey;
23705
- r(Tn, "global_id", 0);
23704
+ let kn = Ey;
23705
+ r(kn, "global_id", 0);
23706
23706
  function xb(n, t = { direct: !0, indirect: !0 }) {
23707
23707
  const e = Dt.createEmpty();
23708
23708
  e.name = "InputTarget_" + e.name, e.displayName = void 0, e.type = "RealityKitComponent", e.onSerialize = (i) => {
@@ -23711,14 +23711,14 @@ function xb(n, t = { direct: !0, indirect: !0 }) {
23711
23711
  }
23712
23712
  class Rt {
23713
23713
  static sceneStartTrigger() {
23714
- const t = new Tn();
23714
+ const t = new kn();
23715
23715
  return t.targetId = void 0, t.tokenId = "SceneTransition", t.type = "enter", t;
23716
23716
  }
23717
23717
  /** Trigger that fires when an object has been tapped/clicked.
23718
23718
  * @param targetObject The object or list of objects that can be interacted with.
23719
23719
  * @param inputMode Input Mode (direct and/or indirect). Only available for USDObject targets. Only supported on Vision OS at the moment. */
23720
23720
  static tapTrigger(t, e = { direct: !0, indirect: !0 }) {
23721
- const i = new Tn(t);
23721
+ const i = new kn(t);
23722
23722
  if (Array.isArray(t) && t.length > 1)
23723
23723
  for (const s of t)
23724
23724
  s instanceof Dt && xb(s, e);
@@ -23730,7 +23730,7 @@ class Rt {
23730
23730
  return (t == null ? void 0 : t.tokenId) === "TapGesture";
23731
23731
  }
23732
23732
  static proximityToCameraTrigger(t, e) {
23733
- const i = new Tn(t);
23733
+ const i = new kn(t);
23734
23734
  return i.tokenId = "ProximityToCamera", i.distance = e, i;
23735
23735
  }
23736
23736
  }
@@ -23814,8 +23814,8 @@ const uu = class {
23814
23814
  e.beginBlock(`def Preliminary_Action "${this.id}"`), this.comment && e.appendLine(`# ${this.comment}`), this.affectedObjects && (typeof this.affectedObjects != "string" && (this.affectedObjects = Bm(this.affectedObjects, t)), e.appendLine("rel affectedObjects = " + this.affectedObjects)), typeof this.duration == "number" && (typeof this.animationSpeed == "number" && this.animationSpeed !== 1 ? e.appendLine(`double duration = ${this.duration / this.animationSpeed} `) : e.appendLine(`double duration = ${this.duration} `)), this.easeType && e.appendLine(`token easeType = "${this.easeType}"`), this.tokenId && e.appendLine(`token info:id = "${this.tokenId}"`), this.tokenId === "ChangeScene" && e.appendLine("rel scene = </StageRoot/Scenes/Scene>"), this.motionType !== void 0 && e.appendLine(`token motionType = "${this.motionType}"`), typeof this.moveDistance == "number" && e.appendLine(`double moveDistance = ${this.moveDistance} `), this.style && e.appendLine(`token style = "${this.style}"`), this.type && e.appendLine(`token type = "${this.type}"`), this.front && e.appendLine(`vector3d front = (${this.front.x}, ${this.front.y}, ${this.front.z})`), this.up && e.appendLine(`vector3d upVector = (${this.up.x}, ${this.up.y}, ${this.up.z})`), typeof this.start == "number" && e.appendLine(`double start = ${this.start} `), typeof this.animationSpeed == "number" && e.appendLine(`double animationSpeed = ${this.animationSpeed.toFixed(2)} `), typeof this.reversed == "boolean" && e.appendLine(`bool reversed = ${this.reversed}`), typeof this.pingPong == "boolean" && e.appendLine(`bool reverses = ${this.pingPong}`), this.xFormTarget && (typeof this.xFormTarget != "string" && (this.xFormTarget = Bm(this.xFormTarget, t)), e.appendLine(`rel xformTarget = ${this.xFormTarget}`)), typeof this.audio == "string" && e.appendLine(`asset audio = @${this.audio}@`), typeof this.gain == "number" && e.appendLine(`double gain = ${this.gain}`), typeof this.auralMode == "string" && e.appendLine(`token auralMode = "${this.auralMode}"`), typeof this.multiplePerformOperation == "string" && e.appendLine(`token multiplePerformOperation = "${this.multiplePerformOperation}"`), typeof this.velocity == "object" && e.appendLine(`vector3d velocity = (${this.velocity.x}, ${this.velocity.y}, ${this.velocity.z})`), e.closeBlock();
23815
23815
  }
23816
23816
  };
23817
- let oi = uu;
23818
- r(oi, "global_id", 0);
23817
+ let ri = uu;
23818
+ r(ri, "global_id", 0);
23819
23819
  class Gi {
23820
23820
  constructor(t, e, i) {
23821
23821
  r(this, "x", 0);
@@ -23847,7 +23847,7 @@ class ue {
23847
23847
  return new co("Group_" + co.getId(), t).makeParallel();
23848
23848
  }
23849
23849
  static fadeAction(t, e, i) {
23850
- const s = new oi(t);
23850
+ const s = new ri(t);
23851
23851
  return s.tokenId = "Visibility", s.type = i ? "show" : "hide", s.duration = e, s.style = "basic", s.motionType = "none", s.moveDistance = 0, s.easeType = "none", s;
23852
23852
  }
23853
23853
  /**
@@ -23856,7 +23856,7 @@ class ue {
23856
23856
  * @param duration in seconds! 0 means play to end
23857
23857
  */
23858
23858
  static startAnimationAction(t, e, i = !1, s = !1) {
23859
- const o = new oi(t);
23859
+ const o = new ri(t);
23860
23860
  o.tokenId = "StartAnimation";
23861
23861
  const a = e.start, l = e.duration, c = e.speed, h = e.clipName;
23862
23862
  if (o.comment = `Animation: ${h}, start=${a * 60}, length=${l * 60}, end=${(a + l) * 60}`, o.animationName = h, o.start = a, o.duration = l, o.animationSpeed = c, o.reversed = i, o.pingPong = s, o.multiplePerformOperation = "allow", i && (o.start -= l), s) {
@@ -23867,28 +23867,28 @@ class ue {
23867
23867
  return o;
23868
23868
  }
23869
23869
  static waitAction(t) {
23870
- const e = new oi();
23870
+ const e = new ri();
23871
23871
  return e.tokenId = "Wait", e.duration = t, e.motionType = void 0, e;
23872
23872
  }
23873
23873
  static lookAtCameraAction(t, e, i, s) {
23874
- const o = new oi(t);
23874
+ const o = new ri(t);
23875
23875
  return o.tokenId = "LookAtCamera", o.duration = e === void 0 ? 9999999999999 : e, o.front = i ?? Gi.forward, o.up = s ?? Gi.up, o;
23876
23876
  }
23877
23877
  static emphasize(t, e, i = "bounce", s = 1, o = "basic") {
23878
- const a = new oi(t);
23878
+ const a = new ri(t);
23879
23879
  return a.tokenId = "Emphasize", a.duration = e, a.style = o ?? "basic", a.motionType = i, a.moveDistance = s, a;
23880
23880
  }
23881
23881
  static transformAction(t, e, i, s, o = "inout") {
23882
- const a = new oi(t);
23882
+ const a = new ri(t);
23883
23883
  return a.tokenId = "Transform", a.duration = i, a.duration = Math.max(1e-6, i), a.type = s, a.easeType = i > 0 ? o : "none", Array.isArray(e) && console.error("Transform target must not be an array", e), a.xFormTarget = e, a;
23884
23884
  }
23885
23885
  static playAudioAction(t, e, i = "play", s = 1, o = "spatial") {
23886
- const a = new oi(t);
23886
+ const a = new ri(t);
23887
23887
  return a.tokenId = "Audio", a.type = i, a.audio = e, a.gain = s, a.auralMode = o, a.multiplePerformOperation = "allow", a;
23888
23888
  }
23889
23889
  // Supported only on VisionOS, Preliminary Behaviours can affect RealityKit physics as well
23890
23890
  static impulseAction(t, e) {
23891
- const i = new oi(t);
23891
+ const i = new ri(t);
23892
23892
  return i.tokenId = "Impulse", i.velocity = e, i;
23893
23893
  }
23894
23894
  // Currently doesn't work on VisionOS, see FB13761990
@@ -24070,7 +24070,7 @@ class Yg {
24070
24070
  `), h(p);
24071
24071
  a && (l += `end
24072
24072
  `);
24073
- } else if (u instanceof oi) {
24073
+ } else if (u instanceof ri) {
24074
24074
  u.tokenId === "StartAnimation" && o.add(u);
24075
24075
  const p = u.affectedObjects;
24076
24076
  if (p)
@@ -24091,7 +24091,7 @@ class Yg {
24091
24091
  for (const m of u)
24092
24092
  d(m, p);
24093
24093
  else
24094
- u instanceof Tn && (typeof u.targetId == "object" && (e.add(u.targetId), a && (c += `${u.targetId.uuid}(("${u.targetId.displayName}")) --> ${u.id}[${u.id}]
24094
+ u instanceof kn && (typeof u.targetId == "object" && (e.add(u.targetId), a && (c += `${u.targetId.uuid}(("${u.targetId.displayName}")) --> ${u.id}[${u.id}]
24095
24095
  `)), a && (l += `${u.id}((${u.id})) -- ${u.tokenId}${u.type ? ":" + u.type : ""} --> ${p.id}[${p.tokenId || p.id}]
24096
24096
  `));
24097
24097
  }
@@ -24656,7 +24656,7 @@ const ks = (nd = class extends D {
24656
24656
  var g, y, _, b, x, M, k, O;
24657
24657
  if (!e)
24658
24658
  return;
24659
- const s = e.getComponent(Bt), o = e.getComponent(Kt);
24659
+ const s = e.getComponent(Bt), o = e.getComponent(Zt);
24660
24660
  if (!s && !o)
24661
24661
  return;
24662
24662
  if (s && !i)
@@ -25099,22 +25099,22 @@ const cs = new v(), kl = new ne(), Gh = new W(), Mw = class extends _s {
25099
25099
  return this._createdTextBlocks.push(e), e;
25100
25100
  }
25101
25101
  };
25102
- let Zt = Mw;
25102
+ let Jt = Mw;
25103
25103
  rh([
25104
25104
  f(oe)
25105
- ], Zt.prototype, "anchoredPosition", 1);
25105
+ ], Jt.prototype, "anchoredPosition", 1);
25106
25106
  rh([
25107
25107
  f(oe)
25108
- ], Zt.prototype, "sizeDelta", 2);
25108
+ ], Jt.prototype, "sizeDelta", 2);
25109
25109
  rh([
25110
25110
  f(oe)
25111
- ], Zt.prototype, "pivot", 2);
25111
+ ], Jt.prototype, "pivot", 2);
25112
25112
  rh([
25113
25113
  f(oe)
25114
- ], Zt.prototype, "anchorMin", 2);
25114
+ ], Jt.prototype, "anchorMin", 2);
25115
25115
  rh([
25116
25116
  f(oe)
25117
- ], Zt.prototype, "anchorMax", 2);
25117
+ ], Jt.prototype, "anchorMax", 2);
25118
25118
  var Jk = Object.defineProperty, eT = Object.getOwnPropertyDescriptor, Rw = (n, t, e, i) => {
25119
25119
  for (var s = i > 1 ? void 0 : i ? eT(t, e) : t, o = n.length - 1, a; o >= 0; o--)
25120
25120
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
@@ -25180,7 +25180,7 @@ const ql = (Np = class extends _s {
25180
25180
  return this._color;
25181
25181
  }
25182
25182
  get rectTransform() {
25183
- if (this._rect || (this._rect = C.getComponent(this.gameObject, Zt)), !this._rect)
25183
+ if (this._rect || (this._rect = C.getComponent(this.gameObject, Jt)), !this._rect)
25184
25184
  throw new Error("Not Supported: Make sure to add a RectTransform component before adding a UI Graphic component.");
25185
25185
  return this._rect;
25186
25186
  }
@@ -25270,14 +25270,14 @@ class Zu extends ol {
25270
25270
  this.uiObject && !this._flippedObject && (this._flippedObject = !0, this.uiObject.scale.y *= -1);
25271
25271
  }
25272
25272
  }
25273
- var sT = Object.defineProperty, nT = Object.getOwnPropertyDescriptor, Un = (n, t, e, i) => {
25273
+ var sT = Object.defineProperty, nT = Object.getOwnPropertyDescriptor, zn = (n, t, e, i) => {
25274
25274
  for (var s = i > 1 ? void 0 : i ? nT(t, e) : t, o = n.length - 1, a; o >= 0; o--)
25275
25275
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
25276
25276
  return i && s && sT(t, e, s), s;
25277
25277
  };
25278
25278
  const $o = S("debugtext");
25279
25279
  var lt = /* @__PURE__ */ ((n) => (n[n.UpperLeft = 0] = "UpperLeft", n[n.UpperCenter = 1] = "UpperCenter", n[n.UpperRight = 2] = "UpperRight", n[n.MiddleLeft = 3] = "MiddleLeft", n[n.MiddleCenter = 4] = "MiddleCenter", n[n.MiddleRight = 5] = "MiddleRight", n[n.LowerLeft = 6] = "LowerLeft", n[n.LowerCenter = 7] = "LowerCenter", n[n.LowerRight = 8] = "LowerRight", n))(lt || {}), Tw = /* @__PURE__ */ ((n) => (n[n.Normal = 0] = "Normal", n[n.Bold = 1] = "Bold", n[n.Italic = 2] = "Italic", n[n.BoldAndItalic = 3] = "BoldAndItalic", n))(Tw || {});
25280
- class ei extends ol {
25280
+ class ti extends ol {
25281
25281
  constructor() {
25282
25282
  super(...arguments);
25283
25283
  r(this, "alignment", 0);
@@ -25576,33 +25576,33 @@ class ei extends ol {
25576
25576
  }
25577
25577
  }
25578
25578
  }
25579
- Un([
25579
+ zn([
25580
25580
  f()
25581
- ], ei.prototype, "alignment", 2);
25582
- Un([
25581
+ ], ti.prototype, "alignment", 2);
25582
+ zn([
25583
25583
  f()
25584
- ], ei.prototype, "verticalOverflow", 2);
25585
- Un([
25584
+ ], ti.prototype, "verticalOverflow", 2);
25585
+ zn([
25586
25586
  f()
25587
- ], ei.prototype, "horizontalOverflow", 2);
25588
- Un([
25587
+ ], ti.prototype, "horizontalOverflow", 2);
25588
+ zn([
25589
25589
  f()
25590
- ], ei.prototype, "lineSpacing", 2);
25591
- Un([
25590
+ ], ti.prototype, "lineSpacing", 2);
25591
+ zn([
25592
25592
  f()
25593
- ], ei.prototype, "supportRichText", 2);
25594
- Un([
25593
+ ], ti.prototype, "supportRichText", 2);
25594
+ zn([
25595
25595
  f(URL)
25596
- ], ei.prototype, "font", 2);
25597
- Un([
25596
+ ], ti.prototype, "font", 2);
25597
+ zn([
25598
25598
  f()
25599
- ], ei.prototype, "fontStyle", 2);
25600
- Un([
25599
+ ], ti.prototype, "fontStyle", 2);
25600
+ zn([
25601
25601
  f()
25602
- ], ei.prototype, "text", 1);
25603
- Un([
25602
+ ], ti.prototype, "text", 1);
25603
+ zn([
25604
25604
  f()
25605
- ], ei.prototype, "fontSize", 1);
25605
+ ], ti.prototype, "fontSize", 1);
25606
25606
  class gp {
25607
25607
  constructor(t, e) {
25608
25608
  r(this, "tag");
@@ -25676,16 +25676,16 @@ class Ju {
25676
25676
  return "text";
25677
25677
  }
25678
25678
  exportText(t, e, i) {
25679
- const s = C.getComponent(t, ei);
25679
+ const s = C.getComponent(t, ti);
25680
25680
  if (!s)
25681
25681
  return;
25682
- const o = C.getComponent(t, Zt);
25682
+ const o = C.getComponent(t, Jt);
25683
25683
  let a = 100, l = 100;
25684
25684
  o && (a = o.width, l = o.height);
25685
25685
  const c = rT.clone();
25686
25686
  o && c.premultiply(aT), e.setMatrix(c);
25687
25687
  const h = s.color.clone();
25688
- e.material = new ri({ color: h, emissive: h }), e.addEventListener("serialize", (d, u) => {
25688
+ e.material = new ai({ color: h, emissive: h }), e.addEventListener("serialize", (d, u) => {
25689
25689
  let p = s.text;
25690
25690
  p = p.replace(/\r/g, ""), p = p.replace(/\n/g, "\\n");
25691
25691
  const m = Zg.multiLine(
@@ -25810,7 +25810,7 @@ class ki extends D {
25810
25810
  this._needsUpdate = !0;
25811
25811
  }
25812
25812
  onEnable() {
25813
- Cb && console.log(this.name, this), this._rectTransform = this.gameObject.getComponent(Zt);
25813
+ Cb && console.log(this.name, this), this._rectTransform = this.gameObject.getComponent(Jt);
25814
25814
  const e = this.gameObject.getComponentInParent(Ft);
25815
25815
  e && e.registerLayoutGroup(this), this._needsUpdate = !0;
25816
25816
  }
@@ -25878,7 +25878,7 @@ class To extends ki {
25878
25878
  c ? b += this.padding.left : b += this.padding.top;
25879
25879
  let x = 0, M = 0;
25880
25880
  for (let T = 0; T < this.gameObject.children.length; T++) {
25881
- const z = this.gameObject.children[T], F = C.getComponent(z, Zt);
25881
+ const z = this.gameObject.children[T], F = C.getComponent(z, Jt);
25882
25882
  F != null && F.activeAndEnabled && (M += 1, c ? x += F.width : x += F.height);
25883
25883
  }
25884
25884
  let k = 0;
@@ -25891,7 +25891,7 @@ class To extends ki {
25891
25891
  R += this.padding.left, R -= this.padding.right, _ !== 0 && (b = y - x, b *= _, b -= O * _, c ? (b -= this.padding.right * _, b += this.padding.left * (1 - _), b < this.padding.left && (b = this.padding.left)) : (b -= this.padding.bottom * _, b += this.padding.top * (1 - _), b < this.padding.top && (b = this.padding.top)));
25892
25892
  let E = 1;
25893
25893
  for (let T = 0; T < this.gameObject.children.length; T++) {
25894
- const z = this.gameObject.children[T], F = C.getComponent(z, Zt);
25894
+ const z = this.gameObject.children[T], F = C.getComponent(z, Jt);
25895
25895
  if (F != null && F.activeAndEnabled) {
25896
25896
  (j = F.pivot) == null || j.set(0.5, 0.5), F.anchorMin.set(0, 1), F.anchorMax.set(0, 1);
25897
25897
  const I = s * 0.5 + R * 0.5;
@@ -26137,7 +26137,7 @@ const yp = S("debuguilayout"), Lw = class extends Nu {
26137
26137
  return;
26138
26138
  const s = i + 0.01;
26139
26139
  this.gameObject.position.x = 0, this.gameObject.position.y = 0, this.gameObject.position.z = -s, this.gameObject.quaternion.identity();
26140
- const o = this.gameObject.getComponent(Zt);
26140
+ const o = this.gameObject.getComponent(Jt);
26141
26141
  let a = !1;
26142
26142
  o.sizeDelta.x !== this.context.domWidth && (a = !0), o.sizeDelta.y !== this.context.domHeight && (a = !0);
26143
26143
  const l = e.fieldOfView * Math.PI / 180, c = 2 * Math.tan(l / 2) * Math.abs(s);
@@ -26235,7 +26235,7 @@ class ey {
26235
26235
  onExportObject(t, e, i) {
26236
26236
  const s = C.getComponent(t, Ft);
26237
26237
  if (s && s.enabled && s.renderMode === Dw.WorldSpace) {
26238
- const o = new Ju(), a = C.getComponent(t, Zt), l = C.getComponent(t, xr), c = new Array();
26238
+ const o = new Ju(), a = C.getComponent(t, Jt), l = C.getComponent(t, xr), c = new Array();
26239
26239
  if (a) {
26240
26240
  if (!C.isActiveSelf(t)) {
26241
26241
  const u = C.isActiveSelf(t);
@@ -26251,11 +26251,11 @@ class ey {
26251
26251
  m && (m.onEnable(), c.push(() => {
26252
26252
  m.onDisable();
26253
26253
  }));
26254
- const g = C.getComponent(u, Zt);
26254
+ const g = C.getComponent(u, Jt);
26255
26255
  g && (g.onEnable(), g.updateTransform(), g.onApplyTransform(), c.push(() => {
26256
26256
  g.onDisable();
26257
26257
  }));
26258
- const y = C.getComponent(u, ei);
26258
+ const y = C.getComponent(u, ti);
26259
26259
  y && (y.onEnable(), c.push(() => {
26260
26260
  y.onDisable();
26261
26261
  })), c.push(() => {
@@ -26476,7 +26476,7 @@ class yT {
26476
26476
  function jw(n) {
26477
26477
  n && (n.colorSpace != gs && (n.colorSpace = gs, n.needsUpdate = !0), n.minFilter == kd && n.magFilter == kd && (n.anisotropy = 1, n.needsUpdate = !0));
26478
26478
  }
26479
- let Nn = class {
26479
+ let Un = class {
26480
26480
  constructor(t) {
26481
26481
  r(this, "guid");
26482
26482
  r(this, "texture");
@@ -26515,19 +26515,19 @@ let Nn = class {
26515
26515
  };
26516
26516
  xt([
26517
26517
  f()
26518
- ], Nn.prototype, "guid", 2);
26518
+ ], Un.prototype, "guid", 2);
26519
26519
  xt([
26520
26520
  f(We)
26521
- ], Nn.prototype, "texture", 2);
26521
+ ], Un.prototype, "texture", 2);
26522
26522
  xt([
26523
26523
  qc()
26524
- ], Nn.prototype, "triangles", 2);
26524
+ ], Un.prototype, "triangles", 2);
26525
26525
  xt([
26526
26526
  qc()
26527
- ], Nn.prototype, "uv", 2);
26527
+ ], Un.prototype, "uv", 2);
26528
26528
  xt([
26529
26529
  qc()
26530
- ], Nn.prototype, "vertices", 2);
26530
+ ], Un.prototype, "vertices", 2);
26531
26531
  const _p = Symbol("spriteOwner");
26532
26532
  class Sr {
26533
26533
  constructor() {
@@ -26535,7 +26535,7 @@ class Sr {
26535
26535
  }
26536
26536
  }
26537
26537
  xt([
26538
- f(Nn)
26538
+ f(Un)
26539
26539
  ], Sr.prototype, "sprites", 2);
26540
26540
  const Bw = class {
26541
26541
  // we don't assign anything here because it's used by the serialization system.
@@ -26642,7 +26642,7 @@ class Ti extends D {
26642
26642
  this.spriteIndex = i;
26643
26643
  return;
26644
26644
  } else
26645
- e instanceof Nn ? (this._spriteSheet || (this._spriteSheet = _o.create()), this._spriteSheet.sprite != e && (this._spriteSheet.sprite = e, this.updateSprite())) : e != this._spriteSheet && (this._spriteSheet = e, this.updateSprite());
26645
+ e instanceof Un ? (this._spriteSheet || (this._spriteSheet = _o.create()), this._spriteSheet.sprite != e && (this._spriteSheet.sprite = e, this.updateSprite())) : e != this._spriteSheet && (this._spriteSheet = e, this.updateSprite());
26646
26646
  }
26647
26647
  /**
26648
26648
  * Set the index of the sprite to be rendered in the currently assigned sprite sheet
@@ -27111,7 +27111,7 @@ const pu = class {
27111
27111
  };
27112
27112
  let fa = pu;
27113
27113
  r(fa, "up", new v(0, 1, 0)), r(fa, "zero", new v(0, 0, 0)), r(fa, "one", new v(1, 1, 1));
27114
- const Sn = S("debugautosync"), bp = Symbol("syncerId");
27114
+ const so = S("debugautosync"), bp = Symbol("syncerId");
27115
27115
  class bT {
27116
27116
  constructor() {
27117
27117
  r(this, "_syncers", {});
@@ -27149,26 +27149,22 @@ class vT {
27149
27149
  return;
27150
27150
  }
27151
27151
  for (const e in this.changedProperties) {
27152
- const i = this.comp.guid + "/" + e, s = this.changedProperties[e];
27153
- Sn && console.log("SEND", this.comp.name, this.networkingKey), t.send(this.networkingKey, { guid: i, data: s }, Is.Queued);
27152
+ const i = this.changedProperties[e];
27153
+ so && console.log("SEND", this.comp.guid, this.networkingKey), t.send(this.networkingKey, { guid: this.comp.guid, property: e, data: i }, Is.Queued), delete this.changedProperties[e];
27154
27154
  }
27155
27155
  });
27156
27156
  r(this, "onHandleReceiving", (t) => {
27157
- if (Sn && console.log("RECEIVE", this.comp.name, this.comp.guid, t), !this._isInit || !this.comp || t.guid.startsWith(this.comp.guid) === !1)
27158
- return;
27159
- const [e, i] = t.guid.split("/");
27160
- Sn && console.log("RECEIVED", this.comp.name, this.comp.guid, t);
27161
- try {
27162
- this._isReceiving = !0, this.comp[i] = t.data;
27163
- } catch (s) {
27164
- console.error(s);
27165
- } finally {
27166
- this._isReceiving = !1;
27167
- }
27157
+ if (so && console.log("SYNCFIELD RECEIVE", this.comp.name, this.comp.guid, t), !!this._isInit && this.comp && t.guid === this.comp.guid)
27158
+ try {
27159
+ this._isReceiving = !0, this.comp[t.property] = t.data;
27160
+ } catch (e) {
27161
+ console.error(e);
27162
+ } finally {
27163
+ this._isReceiving = !1;
27164
+ }
27168
27165
  });
27169
27166
  this.comp = t;
27170
27167
  }
27171
- // private data = {};
27172
27168
  get networkingKey() {
27173
27169
  return this.comp.guid;
27174
27170
  }
@@ -27183,16 +27179,8 @@ class vT {
27183
27179
  this._isInit && (this.comp.context.post_render_callbacks.splice(this.comp.context.post_render_callbacks.indexOf(this.onHandleSending), 1), this.comp.context.connection.stopListen(this.networkingKey, this.onHandleReceiving), this.comp = null, this._isInit = !1);
27184
27180
  }
27185
27181
  notifyChanged(t, e) {
27186
- this._isReceiving || (Sn && console.log("Property changed: " + t, e), this.hasChanges = !0, this.changedProperties[t] = e);
27187
- }
27188
- // private _seen: Set<any> = new Set();
27189
- // private uniqBy(a, key) {
27190
- // this._seen.clear();
27191
- // return a.filter(item => {
27192
- // let k = key(item);
27193
- // return this._seen.has(k) ? false : this._seen.add(k);
27194
- // });
27195
- // }
27182
+ this._isReceiving || (so && console.log("Property changed: " + t, e), this.hasChanges = !0, this.changedProperties[t] = e);
27183
+ }
27196
27184
  }
27197
27185
  function wT(n, t) {
27198
27186
  let e = t !== n;
@@ -27215,13 +27203,13 @@ const Fw = function(n = null) {
27215
27203
  let i = "";
27216
27204
  typeof e == "string" ? i = e : i = e.name;
27217
27205
  let s = null, o;
27218
- typeof n == "string" ? o = t[n] : typeof n == "function" && (o = n), o == null && (U() || Sn) && n != null && console.warn('syncField: no callback function found for property "' + i + '"', '"' + n + '"');
27206
+ typeof n == "string" ? o = t[n] : typeof n == "function" && (o = n), o == null && (U() || so) && n != null && console.warn('syncField: no callback function found for property "' + i + '"', '"' + n + '"');
27219
27207
  const a = t, l = a.__internalAwake;
27220
27208
  if (typeof l != "function") {
27221
- (Sn || U()) && console.error('@syncField can currently only used on Needle Engine Components, custom object of type "' + ((d = t == null ? void 0 : t.constructor) == null ? void 0 : d.name) + '" is not supported', t);
27209
+ (so || U()) && console.error('@syncField can currently only used on Needle Engine Components, custom object of type "' + ((d = t == null ? void 0 : t.constructor) == null ? void 0 : d.name) + '" is not supported', t);
27222
27210
  return;
27223
27211
  }
27224
- Sn && console.log(i);
27212
+ so && console.log(i);
27225
27213
  const c = Symbol(i);
27226
27214
  a.__internalAwake = function() {
27227
27215
  if (this[c] !== void 0)
@@ -27235,13 +27223,13 @@ const Fw = function(n = null) {
27235
27223
  var y;
27236
27224
  const g = this[c];
27237
27225
  if (this[c] = m, p) {
27238
- (U() || Sn) && console.warn("Recursive call detected", i);
27226
+ (U() || so) && console.warn("Recursive call detected", i);
27239
27227
  return;
27240
27228
  }
27241
27229
  p = !0;
27242
27230
  try {
27243
27231
  const _ = wT(m, g);
27244
- Sn && console.log("SyncField assignment", i, "changed?", _, m, o), _ && (o == null ? void 0 : o.call(this, m, g)) !== !1 && ((y = xT(this)) == null || y.notifyChanged(i, m));
27232
+ so && console.log("SyncField assignment", i, "changed?", _, m, o), _ && (o == null ? void 0 : o.call(this, m, g)) !== !1 && ((y = xT(this)) == null || y.notifyChanged(i, m));
27245
27233
  } finally {
27246
27234
  p = !1;
27247
27235
  }
@@ -27266,7 +27254,7 @@ var CT = Object.defineProperty, PT = Object.getOwnPropertyDescriptor, ef = (n, t
27266
27254
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
27267
27255
  return i && s && CT(t, e, s), s;
27268
27256
  };
27269
- const yi = S("debugplayersync"), zw = class extends D {
27257
+ const Xt = S("debugplayersync"), zw = class extends D {
27270
27258
  constructor() {
27271
27259
  super(...arguments);
27272
27260
  r(this, "autoSync", !0);
@@ -27274,12 +27262,12 @@ const yi = S("debugplayersync"), zw = class extends D {
27274
27262
  r(this, "onPlayerSpawned");
27275
27263
  r(this, "_localInstance");
27276
27264
  r(this, "onJoinedRoom", () => {
27277
- yi && console.log("PlayerSync.joinedRoom. autoSync is set to " + this.autoSync), this.autoSync && this.getInstance();
27265
+ Xt && console.log("PlayerSync.joinedRoom. autoSync is set to " + this.autoSync), this.autoSync && this.getInstance();
27278
27266
  });
27279
27267
  r(this, "destroyInstance", () => {
27280
27268
  var t;
27281
27269
  (t = this._localInstance) == null || t.then((e) => {
27282
- yi && console.log("PlayerSync.destroyInstance", e), Iu(e, this.context.connection, !0, { saveInRoom: !1 });
27270
+ Xt && console.log("PlayerSync.destroyInstance", e), Iu(e, this.context.connection, !0, { saveInRoom: !1 });
27283
27271
  }), this._localInstance = void 0;
27284
27272
  });
27285
27273
  }
@@ -27318,13 +27306,13 @@ const yi = S("debugplayersync"), zw = class extends D {
27318
27306
  var e, i, s, o, a, l;
27319
27307
  if (this._localInstance)
27320
27308
  return this._localInstance;
27321
- if (yi && console.log("PlayerSync.createInstance", (e = this.asset) == null ? void 0 : e.url), !((i = this.asset) != null && i.asset) && !((s = this.asset) != null && s.url))
27309
+ if (Xt && console.log("PlayerSync.createInstance", (e = this.asset) == null ? void 0 : e.url), !((i = this.asset) != null && i.asset) && !((s = this.asset) != null && s.url))
27322
27310
  return console.error('PlayerSync: can not create an instance because "asset" is not set and or has no URL!'), null;
27323
27311
  this.gameObject.guid || console.warn("PlayerSync: gameObject has no guid! This might cause issues with syncing the player state."), this._localInstance = (o = this.asset) == null ? void 0 : o.instantiateSynced({ parent: this.gameObject, deleteOnDisconnect: !0 }, !0);
27324
27312
  const t = await this._localInstance;
27325
27313
  if (t) {
27326
27314
  const c = C.getComponentsInChildren(t, Xi);
27327
- if (c != null && c.length) {
27315
+ if (Xt && console.log(`PlayerSync.createInstance: found ${c == null ? void 0 : c.length} PlayerState components. Owner: ${this.context.connection.connectionId}`), c != null && c.length) {
27328
27316
  for (const h of c)
27329
27317
  h.owner = this.context.connection.connectionId;
27330
27318
  (a = this.onPlayerSpawned) == null || a.invoke(t);
@@ -27366,7 +27354,7 @@ const Mt = (Bl = class extends D {
27366
27354
  r(this, "dontDestroy", !1);
27367
27355
  r(this, "onUserLeftRoom", (t) => {
27368
27356
  if (t.userId === this.owner) {
27369
- yi && console.log("PLAYERSYNC LEFT", this.owner), this.doDestroy();
27357
+ Xt && console.log("PLAYERSYNC LEFT", this.owner), this.doDestroy();
27370
27358
  return;
27371
27359
  }
27372
27360
  });
@@ -27412,7 +27400,7 @@ const Mt = (Bl = class extends D {
27412
27400
  }
27413
27401
  onOwnerChange(t, e) {
27414
27402
  var a, l;
27415
- yi && console.log("PlayerSync.onOwnerChange", this, "newOwner", t, "oldOwner", e);
27403
+ Xt && console.log(`PlayerSync.onOwnerChange: ${e} ${t} (me: ${this.context.connection.connectionId})`);
27416
27404
  const i = Mt._local.indexOf(this);
27417
27405
  i >= 0 && Mt._local.splice(i, 1);
27418
27406
  const s = {
@@ -27428,29 +27416,23 @@ const Mt = (Bl = class extends D {
27428
27416
  const o = new CustomEvent("owner-changed", { detail: s });
27429
27417
  this.dispatchEvent(o), Mt.dispatchEvent("ownerChanged", o);
27430
27418
  }
27419
+ /** @internal */
27431
27420
  awake() {
27432
- Mt.all.push(this), yi && console.log("Registered new PlayerState", this.guid, Mt.all.length - 1, Mt.all), this.context.connection.beginListen(se.UserLeftRoom, this.onUserLeftRoom);
27421
+ Mt.all.push(this), Xt && console.log("Registered new PlayerState", this.guid, Mt.all.length - 1, Mt.all), this.context.connection.beginListen(se.UserLeftRoom, this.onUserLeftRoom);
27433
27422
  }
27423
+ /** @internal */
27434
27424
  async start() {
27435
- yi && console.log("PLAYERSTATE.START, owner: " + this.owner, this.context.connection.usersInRoom([])), this.owner ? (this.context.connection.isInRoom || await Gs(300), this.context.connection.userIsInRoom(this.owner) == !1 && (yi && console.log(`PlayerSync.start → doDestroy "${this.name}" because user "${this.owner}" is not in room anymore...`, "Currently in room:", ...this.context.connection.usersInRoom()), this.doDestroy())) : this.owner || (yi && console.warn("PlayerState.start → owner is undefined!", this.name), setTimeout(() => {
27436
- !this.destroyed && !this.owner ? this.dontDestroy ? yi && console.warn("PlayerState.start → owner is still undefined but dontDestroy is set to true", this.name) : (yi && console.warn(`PlayerState.start → owner is still undefined: destroying "${this.name}" instance now`), this.doDestroy()) : yi && console.log("PlayerState.start → owner is assigned", this.owner);
27425
+ Xt && console.log("PLAYERSTATE.START, owner: " + this.owner, this.context.connection.usersInRoom([])), this.owner ? (this.context.connection.isInRoom || await Gs(300), this.context.connection.userIsInRoom(this.owner) == !1 && (Xt && console.log(`PlayerSync.start → doDestroy "${this.name}" because user "${this.owner}" is not in room anymore...`, "Currently in room:", ...this.context.connection.usersInRoom()), this.doDestroy())) : this.owner || (Xt && console.warn("PlayerState.start → owner is undefined!", this.name), setTimeout(() => {
27426
+ !this.destroyed && !this.owner ? this.dontDestroy ? Xt && console.warn("PlayerState.start → owner is still undefined but dontDestroy is set to true", this.name) : (Xt && console.warn(`PlayerState.start → owner is still undefined: destroying "${this.name}" instance now`), this.doDestroy()) : Xt && console.log("PlayerState.start → owner is assigned", this.owner);
27437
27427
  }, 2e3));
27438
27428
  }
27439
- // onEnable() {
27440
- // if (debug) this.startCoroutine(this.debugRoutine());
27441
- // }
27442
- // *debugRoutine() {
27443
- // while (!this.destroyed && this.activeAndEnabled) {
27444
- // Gizmos.DrawLabel(this.gameObject.worldPosition, this.owner ?? "no owner");
27445
- // yield;
27446
- // }
27447
- // }
27448
27429
  /** this tells the server that this client has been destroyed and the networking message for the instantiate will be removed */
27449
27430
  doDestroy() {
27450
- yi && console.log("PlayerSync.doDestroy → syncDestroy", this.name), Iu(this.gameObject, this.context.connection, !0, { saveInRoom: !1 });
27431
+ Xt && console.log("PlayerSync.doDestroy → syncDestroy", this.name), Iu(this.gameObject, this.context.connection, !0, { saveInRoom: !1 });
27451
27432
  }
27433
+ /** @internal */
27452
27434
  onDestroy() {
27453
- if (this.context.connection.stopListen(se.UserLeftRoom, this.onUserLeftRoom), Mt.all.splice(Mt.all.indexOf(this), 1), this.isLocalPlayer) {
27435
+ if (Xt && console.warn("PlayerState.onDestroy", this.owner), this.context.connection.stopListen(se.UserLeftRoom, this.onUserLeftRoom), Mt.all.splice(Mt.all.indexOf(this), 1), this.isLocalPlayer) {
27454
27436
  const t = Mt._local.indexOf(this);
27455
27437
  t >= 0 && Mt._local.splice(t, 1);
27456
27438
  }
@@ -27466,7 +27448,7 @@ var MT = Object.defineProperty, RT = Object.getOwnPropertyDescriptor, rl = (n, t
27466
27448
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
27467
27449
  return i && s && MT(t, e, s), s;
27468
27450
  };
27469
- class $n extends D {
27451
+ class Nn extends D {
27470
27452
  constructor() {
27471
27453
  super(...arguments);
27472
27454
  r(this, "position", "bottom");
@@ -27487,22 +27469,22 @@ class $n extends D {
27487
27469
  }
27488
27470
  rl([
27489
27471
  f()
27490
- ], $n.prototype, "position", 2);
27472
+ ], Nn.prototype, "position", 2);
27491
27473
  rl([
27492
27474
  f()
27493
- ], $n.prototype, "showNeedleLogo", 2);
27475
+ ], Nn.prototype, "showNeedleLogo", 2);
27494
27476
  rl([
27495
27477
  f()
27496
- ], $n.prototype, "showSpatialMenu", 2);
27478
+ ], Nn.prototype, "showSpatialMenu", 2);
27497
27479
  rl([
27498
27480
  f()
27499
- ], $n.prototype, "createFullscreenButton", 2);
27481
+ ], Nn.prototype, "createFullscreenButton", 2);
27500
27482
  rl([
27501
27483
  f()
27502
- ], $n.prototype, "createMuteButton", 2);
27484
+ ], Nn.prototype, "createMuteButton", 2);
27503
27485
  rl([
27504
27486
  f()
27505
- ], $n.prototype, "createQRCodeButton", 2);
27487
+ ], Nn.prototype, "createQRCodeButton", 2);
27506
27488
  var kT = Object.defineProperty, TT = Object.getOwnPropertyDescriptor, iy = (n, t, e, i) => {
27507
27489
  for (var s = i > 1 ? void 0 : i ? TT(t, e) : t, o = n.length - 1, a; o >= 0; o--)
27508
27490
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
@@ -27621,7 +27603,7 @@ class Cr extends D {
27621
27603
  e != null && e.isMesh && this._leftHandMeshes.push(e);
27622
27604
  }), this._rightHandMeshes = [], this.rightHand.asset.traverse((e) => {
27623
27605
  e != null && e.isMesh && this._rightHandMeshes.push(e);
27624
- }), Xi.isLocalPlayer(this.gameObject) && (this._syncTransforms = C.getComponentsInChildren(this.gameObject, In));
27606
+ }), Xi.isLocalPlayer(this.gameObject) && (this._syncTransforms = C.getComponentsInChildren(this.gameObject, En));
27625
27607
  }
27626
27608
  async loadAvatarObjects(e, i, s) {
27627
27609
  const o = e.loadAssetAsync(), a = i.loadAssetAsync(), l = s.loadAssetAsync(), c = new Array();
@@ -27644,8 +27626,8 @@ var AT = Object.defineProperty, ET = Object.getOwnPropertyDescriptor, tf = (n, t
27644
27626
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
27645
27627
  return i && s && AT(t, e, s), s;
27646
27628
  };
27647
- const an = S("debugwebxr"), Xn = new Array();
27648
- class Dn extends D {
27629
+ const an = S("debugwebxr"), qn = new Array();
27630
+ class In extends D {
27649
27631
  constructor() {
27650
27632
  super(...arguments);
27651
27633
  r(this, "createControllerModel", !0);
@@ -27697,9 +27679,9 @@ class Dn extends D {
27697
27679
  this._models.length = 0;
27698
27680
  }
27699
27681
  onBeforeRender() {
27700
- if (Z.active && (an && (Xn[0] = Date.now()), this.updateRendering(Z.active), an)) {
27701
- const e = Date.now() - Xn[0];
27702
- Xn.push(e), Xn.length >= 30 && (Xn[0] = 0, Xn.reduce((i, s) => i + s, 0) / Xn.length, Xn.length = 0);
27682
+ if (Z.active && (an && (qn[0] = Date.now()), this.updateRendering(Z.active), an)) {
27683
+ const e = Date.now() - qn[0];
27684
+ qn.push(e), qn.length >= 30 && (qn[0] = 0, qn.reduce((i, s) => i + s, 0) / qn.length, qn.length = 0);
27703
27685
  }
27704
27686
  }
27705
27687
  updateRendering(e) {
@@ -27780,19 +27762,19 @@ class Dn extends D {
27780
27762
  }
27781
27763
  }
27782
27764
  }
27783
- r(Dn, "factory", new n1());
27765
+ r(In, "factory", new n1());
27784
27766
  tf([
27785
27767
  f()
27786
- ], Dn.prototype, "createControllerModel", 2);
27768
+ ], In.prototype, "createControllerModel", 2);
27787
27769
  tf([
27788
27770
  f()
27789
- ], Dn.prototype, "createHandModel", 2);
27771
+ ], In.prototype, "createHandModel", 2);
27790
27772
  tf([
27791
27773
  f(re)
27792
- ], Dn.prototype, "customLeftHand", 2);
27774
+ ], In.prototype, "customLeftHand", 2);
27793
27775
  tf([
27794
27776
  f(re)
27795
- ], Dn.prototype, "customRightHand", 2);
27777
+ ], In.prototype, "customRightHand", 2);
27796
27778
  class sy extends D {
27797
27779
  }
27798
27780
  var IT = Object.defineProperty, DT = Object.getOwnPropertyDescriptor, Ao = (n, t, e, i) => {
@@ -28181,8 +28163,8 @@ const pa = ($p = class extends D {
28181
28163
  }
28182
28164
  /** Call to enable or disable default controller rendering */
28183
28165
  setDefaultControllerRenderingEnabled(t) {
28184
- let e = this.gameObject.getComponent(Dn);
28185
- return !e && t && (e = this.gameObject.addComponent(Dn), this._createdComponentsInSession.push(e), e.createControllerModel = this.showControllerModels, e.createHandModel == this.showHandModels), e && (e.enabled = t), e;
28166
+ let e = this.gameObject.getComponent(In);
28167
+ return !e && t && (e = this.gameObject.addComponent(In), this._createdComponentsInSession.push(e), e.createControllerModel = this.showControllerModels, e.createHandModel == this.showHandModels), e && (e.enabled = t), e;
28186
28168
  }
28187
28169
  async createLocalAvatar(t) {
28188
28170
  this._playerSync && t.running && typeof this.defaultAvatar != "boolean" && (this._playerSync.asset = this.defaultAvatar, await this._playerSync.getInstance());
@@ -28221,7 +28203,7 @@ const pa = ($p = class extends D {
28221
28203
  this.addButton(i, 50);
28222
28204
  }
28223
28205
  }), this.createQRCode) {
28224
- const e = Og($n);
28206
+ const e = Og(Nn);
28225
28207
  if (e && e.createQRCodeButton === !1)
28226
28208
  U() && console.warn("WebXR: QRCode button is disabled in the Needle Menu component");
28227
28209
  else if (!Q.isMobileDevice()) {
@@ -28297,7 +28279,7 @@ St([
28297
28279
  const Xl = S("debugusdz");
28298
28280
  function zT(n, t) {
28299
28281
  var l;
28300
- const e = [], i = C.getComponentsInChildren(n, Bt), s = C.getComponentsInChildren(n, Kt), o = new Array(), a = new Array();
28282
+ const e = [], i = C.getComponentsInChildren(n, Bt), s = C.getComponentsInChildren(n, Zt), o = new Array(), a = new Array();
28301
28283
  if (t.injectImplicitBehaviours)
28302
28284
  for (const c of i) {
28303
28285
  if (!c || !c.runtimeAnimatorController || !c.enabled)
@@ -28390,7 +28372,7 @@ var $T = Object.defineProperty, WT = Object.getOwnPropertyDescriptor, kt = (n, t
28390
28372
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
28391
28373
  return i && s && $T(t, e, s), s;
28392
28374
  };
28393
- const fi = S("debugusdz"), VT = S("debugusdzpruning");
28375
+ const pi = S("debugusdz"), VT = S("debugusdzpruning");
28394
28376
  class zr {
28395
28377
  constructor() {
28396
28378
  r(this, "callToAction");
@@ -28449,7 +28431,7 @@ const Fm = (od = class extends D {
28449
28431
  /** @internal */
28450
28432
  start() {
28451
28433
  var t, e, i;
28452
- fi && (console.log("USDZExporter", this), console.log("Debug USDZ Mode. Press 'T' to export"), window.addEventListener("keydown", (s) => {
28434
+ pi && (console.log("USDZExporter", this), console.log("Debug USDZ Mode. Press 'T' to export"), window.addEventListener("keydown", (s) => {
28453
28435
  switch (s.key) {
28454
28436
  case "t":
28455
28437
  this.exportAndOpen();
@@ -28461,12 +28443,12 @@ const Fm = (od = class extends D {
28461
28443
  onEnable() {
28462
28444
  var i;
28463
28445
  const t = Q.supportsQuickLookAR(), e = Q.isiOS() || Q.isiPad();
28464
- !this.button && (fi || t || e) && (this.allowCreateQuicklookButton && (this.button = this.createQuicklookButton()), this.lastCallback = this.quicklookCallback.bind(this), this.link = Mb(this.context, t), this.link.addEventListener("message", this.lastCallback)), fi && $e("USDZ Exporter enabled: " + this.name), (i = document.getElementById("open-in-ar")) == null || i.addEventListener("click", this.onClickedOpenInARElement), kc.registerExporter(this);
28446
+ !this.button && (pi || t || e) && (this.allowCreateQuicklookButton && (this.button = this.createQuicklookButton()), this.lastCallback = this.quicklookCallback.bind(this), this.link = Mb(this.context, t), this.link.addEventListener("message", this.lastCallback)), pi && $e("USDZ Exporter enabled: " + this.name), (i = document.getElementById("open-in-ar")) == null || i.addEventListener("click", this.onClickedOpenInARElement), kc.registerExporter(this);
28465
28447
  }
28466
28448
  /** @internal */
28467
28449
  onDisable() {
28468
28450
  var t, e, i;
28469
- (t = this.button) == null || t.remove(), (e = this.link) == null || e.removeEventListener("message", this.lastCallback), fi && $e("USDZ Exporter disabled: " + this.name), (i = document.getElementById("open-in-ar")) == null || i.removeEventListener("click", this.onClickedOpenInARElement), kc.unregisterExporter(this);
28451
+ (t = this.button) == null || t.remove(), (e = this.link) == null || e.removeEventListener("message", this.lastCallback), pi && $e("USDZ Exporter disabled: " + this.name), (i = document.getElementById("open-in-ar")) == null || i.removeEventListener("click", this.onClickedOpenInARElement), kc.unregisterExporter(this);
28470
28452
  }
28471
28453
  /**
28472
28454
  * Creates an USDZ file from the current scene or assigned objectToExport and opens it in QuickLook.
@@ -28484,11 +28466,11 @@ const Fm = (od = class extends D {
28484
28466
  var i;
28485
28467
  let t = this.exportFileName ?? ((i = this.objectToExport) == null ? void 0 : i.name) ?? this.name;
28486
28468
  if (t += "-" + Ok(), dr() || (t !== "" && (t += "-"), t += "MadeWithNeedle"), this.link || (this.link = Mb(this.context, Q.supportsQuickLookAR())), this.customUsdzFile)
28487
- return fi && console.log("Exporting custom usdz", this.customUsdzFile), this.openInQuickLook(this.customUsdzFile, t), null;
28469
+ return pi && console.log("Exporting custom usdz", this.customUsdzFile), this.openInQuickLook(this.customUsdzFile, t), null;
28488
28470
  if (!this.objectToExport)
28489
28471
  return console.warn("No object to export", this), null;
28490
28472
  const e = await this.export(this.objectToExport);
28491
- return e ? (fi && console.log("USDZ generation done. Downloading as " + t), this.openInQuickLook(e, t), e) : (console.error("USDZ generation failed. Please report a bug", this), null);
28473
+ return e ? (pi && console.log("USDZ generation done. Downloading as " + t), this.openInQuickLook(e, t), e) : (console.error("USDZ generation failed. Please report a bug", this), null);
28492
28474
  }
28493
28475
  /**
28494
28476
  * Creates an USDZ file from the current scene or assigned objectToExport and opens it in QuickLook.
@@ -28534,7 +28516,7 @@ const Fm = (od = class extends D {
28534
28516
  }));
28535
28517
  }
28536
28518
  }
28537
- fi && $e("Progressive Loading: " + s.length), await Promise.all(s), fi && $e("Progressive Loading: done"), he.end("export-usdz-textures");
28519
+ pi && $e("Progressive Loading: " + s.length), await Promise.all(s), pi && $e("Progressive Loading: done"), he.end("export-usdz-textures");
28538
28520
  const a = It.Global.Mask;
28539
28521
  It.Global.Set(xn.AR);
28540
28522
  const l = new Ik(), c = new Qu(this.quickLookCompatible);
@@ -28544,12 +28526,12 @@ const Fm = (od = class extends D {
28544
28526
  const u = [c, ...d, ...this.extensions], p = { self: this, exporter: l, extensions: u, object: t };
28545
28527
  he.report("export-usdz", "Invoking before-export"), this.dispatchEvent(new CustomEvent("before-export", { detail: p })), this.applyWebARSessionRoot(), this._previousTimeScale = this.context.time.timeScale, this.context.time.timeScale = 0, he.report("export-usdz", "auto export animations and audio sources");
28546
28528
  const m = new Array();
28547
- this.autoExportAnimations && m.push(...zT(t, c)), this.extensions.find((O) => O.extensionName === "Audio") && this.autoExportAudioSources && m.push(...UT(t)), l.debug = fi, l.pruneUnusedNodes = !VT;
28529
+ this.autoExportAnimations && m.push(...zT(t, c)), this.extensions.find((O) => O.extensionName === "Audio") && this.autoExportAudioSources && m.push(...UT(t)), l.debug = pi, l.pruneUnusedNodes = !VT;
28548
28530
  const y = ao.instance.objs.map((O) => O.batchedMesh);
28549
28531
  l.keepObject = (O) => {
28550
28532
  let R = !0;
28551
28533
  const E = C.getComponent(O, et);
28552
- return E && !E.enabled && (R = !1), R && y.includes(O) && (R = !1), R && C.getComponentInParent(O, Ys) && (R = !1), R && C.getComponentInParent(O, Bn) && (R = !1), fi && !R && console.log("USDZExporter: Discarding object", O), R;
28534
+ return E && !E.enabled && (R = !1), R && y.includes(O) && (R = !1), R && C.getComponentInParent(O, Ys) && (R = !1), R && C.getComponentInParent(O, jn) && (R = !1), pi && !R && console.log("USDZExporter: Discarding object", O), R;
28553
28535
  }, l.beforeWritingDocument = () => {
28554
28536
  if (U() && c && h) {
28555
28537
  const O = c.animatedRoots;
@@ -28593,7 +28575,7 @@ const Fm = (od = class extends D {
28593
28575
  */
28594
28576
  openInQuickLook(t, e) {
28595
28577
  const i = t instanceof Blob ? URL.createObjectURL(t) : t, s = this.buildQuicklookOverlay();
28596
- fi && console.log("QuickLook Overlay", s);
28578
+ pi && console.log("QuickLook Overlay", s);
28597
28579
  const o = s.callToAction ? encodeURIComponent(s.callToAction) : "", a = s.checkoutTitle ? encodeURIComponent(s.checkoutTitle) : "", l = s.checkoutSubtitle ? encodeURIComponent(s.checkoutSubtitle) : "";
28598
28580
  this.link.href = i + `#callToAction=${o}&checkoutTitle=${a}&checkoutSubtitle=${l}&callToActionURL=${s.callToActionURL}`, this.lastCallback || (this.lastCallback = this.quicklookCallback.bind(this), this.link.addEventListener("message", this.lastCallback)), this.link.download = e + ".usdz", this.link.click();
28599
28581
  }
@@ -28610,13 +28592,13 @@ const Fm = (od = class extends D {
28610
28592
  }
28611
28593
  quicklookCallback(t) {
28612
28594
  if ((t == null ? void 0 : t.data) == "_apple_ar_quicklook_button_tapped") {
28613
- fi && be("Quicklook closed via call to action button");
28595
+ pi && be("Quicklook closed via call to action button");
28614
28596
  var e = new CustomEvent("quicklook-button-tapped", { detail: this });
28615
28597
  if (this.dispatchEvent(e), !e.defaultPrevented) {
28616
28598
  const i = new URLSearchParams(this.link.href);
28617
28599
  if (i) {
28618
28600
  const s = i.get("callToActionURL");
28619
- fi && $e("Quicklook url: " + s), s && (dr() ? globalThis.open(s, "_blank") : console.warn("Quicklook closed: custom redirects require a Needle Engine Pro license: https://needle.tools/pricing", s));
28601
+ pi && $e("Quicklook url: " + s), s && (dr() ? globalThis.open(s, "_blank") : console.warn("Quicklook closed: custom redirects require a Needle Engine Pro license: https://needle.tools/pricing", s));
28620
28602
  }
28621
28603
  }
28622
28604
  }
@@ -28870,7 +28852,7 @@ var JT = Object.defineProperty, e2 = Object.getOwnPropertyDescriptor, Zs = (n, t
28870
28852
  function wp(n) {
28871
28853
  return n * Math.PI / 180;
28872
28854
  }
28873
- const Rb = 300, Qn = S("debuglights");
28855
+ const Rb = 300, Xn = S("debuglights");
28874
28856
  class Ai extends D {
28875
28857
  constructor() {
28876
28858
  super(...arguments);
@@ -28943,7 +28925,7 @@ class Ai extends D {
28943
28925
  }
28944
28926
  this.light.intensity = e * s;
28945
28927
  }
28946
- Qn && console.log("Set light intensity to " + this._intensity, e, this);
28928
+ Xn && console.log("Set light intensity to " + this._intensity, e, this);
28947
28929
  }
28948
28930
  get intensity() {
28949
28931
  return this._intensity;
@@ -28992,13 +28974,13 @@ class Ai extends D {
28992
28974
  // this.intensity = this._intensity;
28993
28975
  // }
28994
28976
  awake() {
28995
- this.color = new ae(this.color ?? 16777215), Qn && console.log(this.name, this);
28977
+ this.color = new ae(this.color ?? 16777215), Xn && console.log(this.name, this);
28996
28978
  }
28997
28979
  onEnable() {
28998
- Qn && console.log("ENABLE LIGHT", this.name), this.createLight(), !this.isBaked && (this.light && (this.light.visible = !0, this.light.intensity = this._intensity, Qn && console.log("Set light intensity to " + this.light.intensity, this.name), this.selfIsLight || this.light.parent !== this.gameObject && this.gameObject.add(this.light)), this.type === 1 && this.startCoroutine(this.updateMainLightRoutine(), Ce.LateUpdate));
28980
+ Xn && console.log("ENABLE LIGHT", this.name), this.createLight(), !this.isBaked && (this.light && (this.light.visible = !0, this.light.intensity = this._intensity, Xn && console.log("Set light intensity to " + this.light.intensity, this.name), this.selfIsLight || this.light.parent !== this.gameObject && this.gameObject.add(this.light)), this.type === 1 && this.startCoroutine(this.updateMainLightRoutine(), Ce.LateUpdate));
28999
28981
  }
29000
28982
  onDisable() {
29001
- Qn && console.log("DISABLE LIGHT", this.name), this.light && (this.selfIsLight ? this.light.intensity = 0 : this.light.visible = !1);
28983
+ Xn && console.log("DISABLE LIGHT", this.name), this.light && (this.selfIsLight ? this.light.intensity = 0 : this.light.visible = !1);
29002
28984
  }
29003
28985
  onEnterXR(e) {
29004
28986
  this._webARRoot = C.getComponentInParent(this.gameObject, Co) ?? void 0;
@@ -29024,7 +29006,7 @@ class Ai extends D {
29024
29006
  switch (this.type) {
29025
29007
  case 1:
29026
29008
  const i = new Kp(this.color, this.intensity * Math.PI);
29027
- if (i.position.set(0, 0, -Rb * 0.5).applyQuaternion(this.gameObject.quaternion), this.gameObject.add(i.target), za(i.target, 0, 0, 0), this.light = i, this.gameObject.position.set(0, 0, 0), this.gameObject.rotation.set(0, 0, 0), Qn) {
29009
+ if (i.position.set(0, 0, -Rb * 0.5).applyQuaternion(this.gameObject.quaternion), this.gameObject.add(i.target), za(i.target, 0, 0, 0), this.light = i, this.gameObject.position.set(0, 0, 0), this.gameObject.rotation.set(0, 0, 0), Xn) {
29028
29010
  const l = new TS(this.light, 0.2, this.color);
29029
29011
  this.context.scene.add(l);
29030
29012
  }
@@ -29042,7 +29024,7 @@ class Ai extends D {
29042
29024
  }
29043
29025
  if (this.light) {
29044
29026
  if (this._intensity >= 0 ? this.light.intensity = this._intensity : this._intensity = this.light.intensity, this.shadows !== 0 ? this.light.castShadow = !0 : this.light.castShadow = !1, this.light.shadow) {
29045
- this._shadowResolution !== void 0 && this._shadowResolution > 4 ? (this.light.shadow.mapSize.width = this._shadowResolution, this.light.shadow.mapSize.height = this._shadowResolution) : (this.light.shadow.mapSize.width = 2048, this.light.shadow.mapSize.height = 2048), Qn && console.log("Override shadow bias?", this._overrideShadowBiasSettings, this.shadowBias, this.shadowNormalBias), this.light.shadow.bias = this.shadowBias, this.light.shadow.normalBias = this.shadowNormalBias, this.updateShadowSoftHard();
29027
+ this._shadowResolution !== void 0 && this._shadowResolution > 4 ? (this.light.shadow.mapSize.width = this._shadowResolution, this.light.shadow.mapSize.height = this._shadowResolution) : (this.light.shadow.mapSize.width = 2048, this.light.shadow.mapSize.height = 2048), Xn && console.log("Override shadow bias?", this._overrideShadowBiasSettings, this.shadowBias, this.shadowNormalBias), this.light.shadow.bias = this.shadowBias, this.light.shadow.normalBias = this.shadowNormalBias, this.updateShadowSoftHard();
29046
29028
  const i = this.light.shadow.camera;
29047
29029
  if (i.near = this.shadowNearPlane, this._shadowDistance !== void 0 && typeof this._shadowDistance == "number" ? i.far = this._shadowDistance : i.far = Rb * Math.abs(this.gameObject.scale.z), this.gameObject.scale.set(1, 1, 1), this.shadowWidth !== void 0)
29048
29030
  i.left = -this.shadowWidth / 2, i.right = this.shadowWidth / 2;
@@ -29056,7 +29038,7 @@ class Ai extends D {
29056
29038
  const s = this.gameObject.scale.y;
29057
29039
  i.top *= s, i.bottom *= s;
29058
29040
  }
29059
- this.light.shadow.needsUpdate = !0, Qn && this.context.scene.add(new AS(i));
29041
+ this.light.shadow.needsUpdate = !0, Xn && this.context.scene.add(new AS(i));
29060
29042
  }
29061
29043
  this.isBaked ? this.light.removeFromParent() : e || this.gameObject.add(this.light);
29062
29044
  }
@@ -29315,7 +29297,7 @@ const h2 = S("debugnet"), zm = class extends D {
29315
29297
  return i;
29316
29298
  }
29317
29299
  static IsLocalNetwork(t = window.location.hostname) {
29318
- return li(t);
29300
+ return ci(t);
29319
29301
  }
29320
29302
  };
29321
29303
  let uh = zm;
@@ -29539,7 +29521,7 @@ P([
29539
29521
  f()
29540
29522
  ], q.prototype, "curveMultiplier", 2);
29541
29523
  var rd;
29542
- const gi = (rd = class {
29524
+ const yi = (rd = class {
29543
29525
  constructor() {
29544
29526
  r(this, "mode", 0);
29545
29527
  r(this, "color");
@@ -29550,11 +29532,11 @@ const gi = (rd = class {
29550
29532
  r(this, "gradientMax");
29551
29533
  }
29552
29534
  static constant(n) {
29553
- const t = new gi();
29535
+ const t = new yi();
29554
29536
  return t.constant(n), t;
29555
29537
  }
29556
29538
  static betweenTwoColors(n, t) {
29557
- const e = new gi();
29539
+ const e = new yi();
29558
29540
  return e.betweenTwoColors(n, t), e;
29559
29541
  }
29560
29542
  constant(n) {
@@ -29571,39 +29553,39 @@ const gi = (rd = class {
29571
29553
  return this.color;
29572
29554
  case 1:
29573
29555
  case "Gradient":
29574
- return this.gradient.evaluate(n, gi._temp), gi._temp;
29556
+ return this.gradient.evaluate(n, yi._temp), yi._temp;
29575
29557
  case 2:
29576
29558
  case "TwoColors":
29577
- return gi._temp.lerpColors(this.colorMin, this.colorMax, e);
29559
+ return yi._temp.lerpColors(this.colorMin, this.colorMax, e);
29578
29560
  case 3:
29579
29561
  case "TwoGradients":
29580
- return this.gradientMin.evaluate(n, gi._temp), this.gradientMax.evaluate(n, gi._temp2), gi._temp.lerp(gi._temp2, e);
29562
+ return this.gradientMin.evaluate(n, yi._temp), this.gradientMax.evaluate(n, yi._temp2), yi._temp.lerp(yi._temp2, e);
29581
29563
  }
29582
- return gi._temp.set(16711935), gi._temp.alpha = 1, gi._temp;
29564
+ return yi._temp.set(16711935), yi._temp.alpha = 1, yi._temp;
29583
29565
  }
29584
29566
  }, r(rd, "_temp", new ve(0, 0, 0, 1)), r(rd, "_temp2", new ve(0, 0, 0, 1)), rd);
29585
- let hi = gi;
29567
+ let di = yi;
29586
29568
  P([
29587
29569
  f()
29588
- ], hi.prototype, "mode", 2);
29570
+ ], di.prototype, "mode", 2);
29589
29571
  P([
29590
29572
  f(ve)
29591
- ], hi.prototype, "color", 2);
29573
+ ], di.prototype, "color", 2);
29592
29574
  P([
29593
29575
  f(ve)
29594
- ], hi.prototype, "colorMin", 2);
29576
+ ], di.prototype, "colorMin", 2);
29595
29577
  P([
29596
29578
  f(ve)
29597
- ], hi.prototype, "colorMax", 2);
29579
+ ], di.prototype, "colorMax", 2);
29598
29580
  P([
29599
29581
  f(Ur)
29600
- ], hi.prototype, "gradient", 2);
29582
+ ], di.prototype, "gradient", 2);
29601
29583
  P([
29602
29584
  f(Ur)
29603
- ], hi.prototype, "gradientMin", 2);
29585
+ ], di.prototype, "gradientMin", 2);
29604
29586
  P([
29605
29587
  f(Ur)
29606
- ], hi.prototype, "gradientMax", 2);
29588
+ ], di.prototype, "gradientMax", 2);
29607
29589
  var Nm = /* @__PURE__ */ ((n) => (n[n.Hierarchy = 0] = "Hierarchy", n[n.Local = 1] = "Local", n[n.Shape = 2] = "Shape", n))(Nm || {});
29608
29590
  class Ut {
29609
29591
  constructor() {
@@ -29655,7 +29637,7 @@ P([
29655
29637
  f(q)
29656
29638
  ], Ut.prototype, "gravityModifier", 2);
29657
29639
  P([
29658
- f(hi)
29640
+ f(di)
29659
29641
  ], Ut.prototype, "startColor", 2);
29660
29642
  P([
29661
29643
  f(q)
@@ -29730,7 +29712,7 @@ class eu {
29730
29712
  return e;
29731
29713
  }
29732
29714
  }
29733
- class Wn {
29715
+ class $n {
29734
29716
  constructor() {
29735
29717
  r(this, "enabled");
29736
29718
  r(this, "bursts");
@@ -29761,22 +29743,22 @@ class Wn {
29761
29743
  }
29762
29744
  P([
29763
29745
  f()
29764
- ], Wn.prototype, "enabled", 2);
29746
+ ], $n.prototype, "enabled", 2);
29765
29747
  P([
29766
29748
  f()
29767
- ], Wn.prototype, "bursts", 2);
29749
+ ], $n.prototype, "bursts", 2);
29768
29750
  P([
29769
29751
  f(q)
29770
- ], Wn.prototype, "rateOverTime", 2);
29752
+ ], $n.prototype, "rateOverTime", 2);
29771
29753
  P([
29772
29754
  f()
29773
- ], Wn.prototype, "rateOverTimeMultiplier", 2);
29755
+ ], $n.prototype, "rateOverTimeMultiplier", 2);
29774
29756
  P([
29775
29757
  f(q)
29776
- ], Wn.prototype, "rateOverDistance", 2);
29758
+ ], $n.prototype, "rateOverDistance", 2);
29777
29759
  P([
29778
29760
  f()
29779
- ], Wn.prototype, "rateOverDistanceMultiplier", 2);
29761
+ ], $n.prototype, "rateOverDistanceMultiplier", 2);
29780
29762
  class rf {
29781
29763
  constructor() {
29782
29764
  r(this, "enabled");
@@ -29784,7 +29766,7 @@ class rf {
29784
29766
  }
29785
29767
  }
29786
29768
  P([
29787
- f(hi)
29769
+ f(di)
29788
29770
  ], rf.prototype, "color", 2);
29789
29771
  class Nr {
29790
29772
  constructor() {
@@ -30264,10 +30246,10 @@ P([
30264
30246
  f()
30265
30247
  ], He.prototype, "attachRibbonToTransform", 2);
30266
30248
  P([
30267
- f(hi)
30249
+ f(di)
30268
30250
  ], He.prototype, "colorOverLifetime", 2);
30269
30251
  P([
30270
- f(hi)
30252
+ f(di)
30271
30253
  ], He.prototype, "colorOverTrail", 2);
30272
30254
  P([
30273
30255
  f()
@@ -30728,7 +30710,7 @@ P([
30728
30710
  P([
30729
30711
  f()
30730
30712
  ], $r.prototype, "mode", 2);
30731
- class di {
30713
+ class ui {
30732
30714
  constructor() {
30733
30715
  r(this, "enabled");
30734
30716
  r(this, "range");
@@ -30749,37 +30731,37 @@ class di {
30749
30731
  }
30750
30732
  P([
30751
30733
  f()
30752
- ], di.prototype, "enabled", 2);
30734
+ ], ui.prototype, "enabled", 2);
30753
30735
  P([
30754
30736
  f(oe)
30755
- ], di.prototype, "range", 2);
30737
+ ], ui.prototype, "range", 2);
30756
30738
  P([
30757
30739
  f()
30758
- ], di.prototype, "separateAxes", 2);
30740
+ ], ui.prototype, "separateAxes", 2);
30759
30741
  P([
30760
30742
  f(q)
30761
- ], di.prototype, "size", 2);
30743
+ ], ui.prototype, "size", 2);
30762
30744
  P([
30763
30745
  f()
30764
- ], di.prototype, "sizeMultiplier", 2);
30746
+ ], ui.prototype, "sizeMultiplier", 2);
30765
30747
  P([
30766
30748
  f(q)
30767
- ], di.prototype, "x", 2);
30749
+ ], ui.prototype, "x", 2);
30768
30750
  P([
30769
30751
  f()
30770
- ], di.prototype, "xMultiplier", 2);
30752
+ ], ui.prototype, "xMultiplier", 2);
30771
30753
  P([
30772
30754
  f(q)
30773
- ], di.prototype, "y", 2);
30755
+ ], ui.prototype, "y", 2);
30774
30756
  P([
30775
30757
  f()
30776
- ], di.prototype, "yMultiplier", 2);
30758
+ ], ui.prototype, "yMultiplier", 2);
30777
30759
  P([
30778
30760
  f(q)
30779
- ], di.prototype, "z", 2);
30761
+ ], ui.prototype, "z", 2);
30780
30762
  P([
30781
30763
  f()
30782
- ], di.prototype, "zMultiplier", 2);
30764
+ ], ui.prototype, "zMultiplier", 2);
30783
30765
  class hl {
30784
30766
  constructor() {
30785
30767
  r(this, "enabled");
@@ -30798,7 +30780,7 @@ P([
30798
30780
  f(oe)
30799
30781
  ], hl.prototype, "range", 2);
30800
30782
  P([
30801
- f(hi)
30783
+ f(di)
30802
30784
  ], hl.prototype, "color", 2);
30803
30785
  new v(1, 1, 1);
30804
30786
  new v(0, 0, 1);
@@ -31629,7 +31611,7 @@ Ge([
31629
31611
  f(Ut)
31630
31612
  ], ut.prototype, "main", 2);
31631
31613
  Ge([
31632
- f(Wn)
31614
+ f($n)
31633
31615
  ], ut.prototype, "emission", 2);
31634
31616
  Ge([
31635
31617
  f(Nr)
@@ -31665,7 +31647,7 @@ Ge([
31665
31647
  f(ns)
31666
31648
  ], ut.prototype, "rotationBySpeed", 2);
31667
31649
  Ge([
31668
- f(di)
31650
+ f(ui)
31669
31651
  ], ut.prototype, "sizeBySpeed", 2);
31670
31652
  class tu {
31671
31653
  constructor() {
@@ -32043,7 +32025,7 @@ const Hw = (Wp = class extends dt {
32043
32025
  }, this.threshold.onValueChanged = (e) => {
32044
32026
  t.luminanceMaterial.threshold = Math.pow(e, 2.2);
32045
32027
  }, this.scatter.onValueChanged = (e) => {
32046
- t.luminancePass.enabled = !0, t.luminanceMaterial.smoothing = e, t.mipmapBlurPass && (t.mipmapBlurPass.radius = On.lerp(0.1, 0.9, e));
32028
+ t.luminancePass.enabled = !0, t.luminanceMaterial.smoothing = e, t.mipmapBlurPass && (t.mipmapBlurPass.radius = Pn.lerp(0.1, 0.9, e));
32047
32029
  }, t;
32048
32030
  }
32049
32031
  }, /** Whether to use selective bloom by default */
@@ -32604,7 +32586,7 @@ var bA = Object.defineProperty, vA = Object.getOwnPropertyDescriptor, ul = (n, t
32604
32586
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
32605
32587
  return i && s && bA(t, e, s), s;
32606
32588
  };
32607
- class Vn extends dt {
32589
+ class Wn extends dt {
32608
32590
  constructor() {
32609
32591
  super(...arguments);
32610
32592
  r(this, "offset", new N(0));
@@ -32633,23 +32615,23 @@ class Vn extends dt {
32633
32615
  }
32634
32616
  ul([
32635
32617
  f(N)
32636
- ], Vn.prototype, "offset", 2);
32618
+ ], Wn.prototype, "offset", 2);
32637
32619
  ul([
32638
32620
  f(N)
32639
- ], Vn.prototype, "rotation", 2);
32621
+ ], Wn.prototype, "rotation", 2);
32640
32622
  ul([
32641
32623
  f(N)
32642
- ], Vn.prototype, "focusArea", 2);
32624
+ ], Wn.prototype, "focusArea", 2);
32643
32625
  ul([
32644
32626
  f(N)
32645
- ], Vn.prototype, "feather", 2);
32627
+ ], Wn.prototype, "feather", 2);
32646
32628
  ul([
32647
32629
  f(N)
32648
- ], Vn.prototype, "kernelSize", 2);
32630
+ ], Wn.prototype, "kernelSize", 2);
32649
32631
  ul([
32650
32632
  f(N)
32651
- ], Vn.prototype, "resolutionScale", 2);
32652
- xs("TiltShiftEffect", Vn);
32633
+ ], Wn.prototype, "resolutionScale", 2);
32634
+ xs("TiltShiftEffect", Wn);
32653
32635
  var wA = Object.defineProperty, xA = Object.getOwnPropertyDescriptor, py = (n, t, e, i) => {
32654
32636
  for (var s = i > 1 ? void 0 : i ? xA(t, e) : t, o = n.length - 1, a; o >= 0; o--)
32655
32637
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
@@ -32692,7 +32674,7 @@ py([
32692
32674
  ], fl.prototype, "center", 2);
32693
32675
  xs("Vignette", fl);
32694
32676
  globalThis.true = globalThis.true !== void 0 ? globalThis.true : !0;
32695
- const Yn = S("debugpost"), Mp = Symbol("needle:postprocessing-handler"), Rp = Symbol("needle:previous-autoclear-state");
32677
+ const Qn = S("debugpost"), Mp = Symbol("needle:postprocessing-handler"), Rp = Symbol("needle:previous-autoclear-state");
32696
32678
  class my {
32697
32679
  constructor(t) {
32698
32680
  r(this, "_composer", null);
@@ -32710,14 +32692,14 @@ class my {
32710
32692
  }
32711
32693
  apply(t) {
32712
32694
  if ("env" in import.meta && {}.VITE_NEEDLE_USE_POSTPROCESSING === "false") {
32713
- Yn ? console.warn("Postprocessing is disabled via vite env setting") : console.debug("Postprocessing is disabled via vite env setting");
32695
+ Qn ? console.warn("Postprocessing is disabled via vite env setting") : console.debug("Postprocessing is disabled via vite env setting");
32714
32696
  return;
32715
32697
  }
32716
32698
  this._isActive = !0, this.onApply(this.context, t);
32717
32699
  }
32718
32700
  unapply() {
32719
32701
  var i;
32720
- if (Yn && console.log("Unapplying postprocessing effects"), this._isActive = !1, this._lastVolumeComponents) {
32702
+ if (Qn && console.log("Unapplying postprocessing effects"), this._isActive = !1, this._lastVolumeComponents) {
32721
32703
  for (const s of this._lastVolumeComponents)
32722
32704
  s.unapply();
32723
32705
  this._lastVolumeComponents.length = 0;
@@ -32738,7 +32720,7 @@ class my {
32738
32720
  B.POSTPROCESSING.load(),
32739
32721
  B.POSTPROCESSING_AO.load()
32740
32722
  // import("./Effects/Sharpening.effect")
32741
- ]), t[Mp] = this, Yn && console.log("Apply Postprocessing Effects", e), this._lastVolumeComponents = [...e], this._effects.length = 0;
32723
+ ]), t[Mp] = this, Qn && console.log("Apply Postprocessing Effects", e), this._lastVolumeComponents = [...e], this._effects.length = 0;
32742
32724
  const i = {
32743
32725
  handler: this,
32744
32726
  components: this._lastVolumeComponents
@@ -32802,11 +32784,11 @@ class my {
32802
32784
  } catch (d) {
32803
32785
  console.error("Error while applying postprocessing effects", d), c.removeAllPasses();
32804
32786
  }
32805
- Yn && console.log("PostProcessing Passes", e, "->", c.passes);
32787
+ Qn && console.log("PostProcessing Passes", e, "->", c.passes);
32806
32788
  }
32807
32789
  orderEffects() {
32808
32790
  var e;
32809
- Yn && console.log("Before ordering effects", [...this._effects]), kp ?? (kp = [
32791
+ Qn && console.log("Before ordering effects", [...this._effects]), kp ?? (kp = [
32810
32792
  B.POSTPROCESSING.MODULE.NormalPass,
32811
32793
  B.POSTPROCESSING.MODULE.DepthDownsamplingPass,
32812
32794
  B.POSTPROCESSING.MODULE.SMAAEffect,
@@ -32827,8 +32809,8 @@ class my {
32827
32809
  const t = this._effects;
32828
32810
  t.sort((i, s) => {
32829
32811
  const o = kp.findIndex((l) => i.constructor.name.endsWith(l.name)), a = kp.findIndex((l) => s.constructor.name.endsWith(l.name));
32830
- return o < 0 ? (Yn && console.warn("Unknown effect found: ", i.constructor.name), -1) : a < 0 ? (Yn && console.warn("Unknown effect found: ", s.constructor.name), 1) : o < 0 ? 1 : a < 0 ? -1 : o - a;
32831
- }), Yn && console.log("After ordering effects", [...this._effects]);
32812
+ return o < 0 ? (Qn && console.warn("Unknown effect found: ", i.constructor.name), -1) : a < 0 ? (Qn && console.warn("Unknown effect found: ", s.constructor.name), 1) : o < 0 ? 1 : a < 0 ? -1 : o - a;
32813
+ }), Qn && console.log("After ordering effects", [...this._effects]);
32832
32814
  for (let i = 0; i < t.length; i++) {
32833
32815
  const s = t[i];
32834
32816
  if (((e = s == null ? void 0 : s.configuration) == null ? void 0 : e.gammaCorrection) !== void 0) {
@@ -33005,9 +32987,9 @@ var OA = Object.defineProperty, MA = Object.getOwnPropertyDescriptor, $t = (n, t
33005
32987
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
33006
32988
  return i && s && OA(t, e, s), s;
33007
32989
  };
33008
- const ni = S("debugsceneswitcher"), RA = S("sceneswitcher:clearscene"), Od = "scene";
32990
+ const oi = S("debugsceneswitcher"), RA = S("sceneswitcher:clearscene"), Od = "scene";
33009
32991
  gy(Od);
33010
- const Kn = Promise.resolve(!1);
32992
+ const Yn = Promise.resolve(!1);
33011
32993
  class Ct extends D {
33012
32994
  constructor() {
33013
32995
  super(...arguments);
@@ -33043,7 +33025,7 @@ class Ct extends D {
33043
33025
  const o = e == null ? void 0 : e.state;
33044
33026
  if (o && o.startsWith(this.guid)) {
33045
33027
  const a = o.substr(this.guid.length + 2);
33046
- ni && console.log("PopState", a), await this.trySelectSceneFromValue(a);
33028
+ oi && console.log("PopState", a), await this.trySelectSceneFromValue(a);
33047
33029
  }
33048
33030
  }
33049
33031
  } finally {
@@ -33121,7 +33103,7 @@ class Ct extends D {
33121
33103
  this.scenes === void 0 && (this.scenes = []);
33122
33104
  for (const e of this.scenes)
33123
33105
  e && !e.hasUrl && e.asset instanceof L && e.asset.removeFromParent();
33124
- ni && console.log("SceneSwitcher", this);
33106
+ oi && console.log("SceneSwitcher", this);
33125
33107
  }
33126
33108
  /** @internal */
33127
33109
  async onEnable() {
@@ -33208,7 +33190,7 @@ class Ct extends D {
33208
33190
  */
33209
33191
  select(e) {
33210
33192
  var s, o, a;
33211
- if (ni && console.log("select", e), typeof e == "object" && console.warn('Switching to "' + e + '" might not work. Please either use an index or a AssetReference (not a scene reference)'), typeof e == "string") {
33193
+ if (oi && console.log("select", e), typeof e == "object" && console.warn('Switching to "' + e + '" might not work. Please either use an index or a AssetReference (not a scene reference)'), typeof e == "string") {
33212
33194
  const l = (s = this.scenes) == null ? void 0 : s.find((c) => c.url === e);
33213
33195
  if (!l) {
33214
33196
  const c = re.getOrCreate(this.sourceId ?? "", e, this.context);
@@ -33217,17 +33199,17 @@ class Ct extends D {
33217
33199
  if (l)
33218
33200
  e = (o = this.scenes) == null ? void 0 : o.indexOf(l);
33219
33201
  else
33220
- return Kn;
33202
+ return Yn;
33221
33203
  }
33222
33204
  if (!((a = this.scenes) != null && a.length))
33223
- return Kn;
33205
+ return Yn;
33224
33206
  if (e < 0) {
33225
33207
  if (this.clamp)
33226
- return Kn;
33208
+ return Yn;
33227
33209
  e = this.scenes.length - 1;
33228
33210
  } else if (e >= this.scenes.length) {
33229
33211
  if (this.clamp)
33230
- return Kn;
33212
+ return Yn;
33231
33213
  e = 0;
33232
33214
  }
33233
33215
  const i = this.scenes[e];
@@ -33273,7 +33255,7 @@ class Ct extends D {
33273
33255
  async __unloadCurrentScene() {
33274
33256
  const e = this._currentScene;
33275
33257
  if (this._currentScene = void 0, e) {
33276
- ni && console.log("UNLOAD", e.url, "HasURL?: " + e.hasUrl);
33258
+ oi && console.log("UNLOAD", e.url, "HasURL?: " + e.hasUrl);
33277
33259
  const i = this.tryGetSceneEventListener(e.asset);
33278
33260
  if (i != null && i.sceneClosing) {
33279
33261
  const s = i.sceneClosing();
@@ -33295,11 +33277,11 @@ class Ct extends D {
33295
33277
  }).catch(console.error), await this.onEndLoading();
33296
33278
  const h = new CustomEvent("loadscene-finished", { detail: { scene: e, switcher: this, index: i } });
33297
33279
  if (this.dispatchEvent(h), this._currentLoadingProgress = void 0, this._currentlyLoadingScene = void 0, h.defaultPrevented)
33298
- return ni && console.warn("Adding loaded scene prevented:", e, h), !1;
33280
+ return oi && console.warn("Adding loaded scene prevented:", e, h), !1;
33299
33281
  if (!e.asset)
33300
- return ni && console.warn("Failed loading scene:", e), !1;
33282
+ return oi && console.warn("Failed loading scene:", e), !1;
33301
33283
  if (this._currentIndex === i) {
33302
- if (ni && console.log("ADD", e.url), this._currentScene = e, RA) {
33284
+ if (oi && console.log("ADD", e.url), this._currentScene = e, RA) {
33303
33285
  const p = ((o = this.context.mainCameraComponent) == null ? void 0 : o.gameObject) || this.context.mainCamera;
33304
33286
  p == null || p.removeFromParent();
33305
33287
  const m = this.gameObject.removeFromParent();
@@ -33307,7 +33289,7 @@ class Ct extends D {
33307
33289
  }
33308
33290
  if (C.add(e.asset, this.gameObject), this.useSceneLighting && this.context.sceneLighting.enable(e), this.useSceneBackground) {
33309
33291
  const p = this.context.lightmaps.tryGetSkybox(e.url);
33310
- p ? (p.mapping = Rn, this.context.scene.background = p) : ni && console.warn("SceneSwitcher: Can't find skybox for scene " + e.url);
33292
+ p ? (p.mapping = Mn, this.context.scene.background = p) : oi && console.warn("SceneSwitcher: Can't find skybox for scene " + e.url);
33311
33293
  }
33312
33294
  if (this.useHistory && i >= 0) {
33313
33295
  let p = i.toString();
@@ -33337,14 +33319,14 @@ class Ct extends D {
33337
33319
  if (i instanceof re)
33338
33320
  return i.preload();
33339
33321
  }
33340
- return Kn;
33322
+ return Yn;
33341
33323
  }
33342
33324
  tryLoadFromQueryParam() {
33343
33325
  var i;
33344
33326
  if (!((i = this.queryParameterName) != null && i.length))
33345
- return Kn;
33327
+ return Yn;
33346
33328
  const e = S(this.queryParameterName);
33347
- return typeof e == "boolean" ? Kn : this.trySelectSceneFromValue(e);
33329
+ return typeof e == "boolean" ? Yn : this.trySelectSceneFromValue(e);
33348
33330
  }
33349
33331
  /** try to select a scene from a string or index */
33350
33332
  trySelectSceneFromValue(e) {
@@ -33362,12 +33344,12 @@ class Ct extends D {
33362
33344
  }
33363
33345
  } else if (typeof e == "number" && e >= 0 && e < this.scenes.length)
33364
33346
  return this.select(e);
33365
- return li() && console.warn('Can not find scene: "' + e + '"', this), Kn;
33347
+ return ci() && console.warn('Can not find scene: "' + e + '"', this), Yn;
33366
33348
  }
33367
33349
  async onStartLoading() {
33368
33350
  var e, i;
33369
33351
  if (this._isCurrentlyLoading = !0, this.loadingScene && (this._lastLoadingScene !== this.loadingScene && (this._loadingScenePromise = void 0), this._lastLoadingScene = this.loadingScene, this._loadingScenePromise || (this._loadingScenePromise = (e = this.loadingScene) == null ? void 0 : e.loadAssetAsync()), await this._loadingScenePromise, this._isCurrentlyLoading && ((i = this.loadingScene) != null && i.asset))) {
33370
- ni && console.log("Add loading scene", this.loadingScene.url, this.loadingScene.asset);
33352
+ oi && console.log("Add loading scene", this.loadingScene.url, this.loadingScene.asset);
33371
33353
  const s = this.loadingScene.asset;
33372
33354
  C.add(s, this.gameObject);
33373
33355
  const o = this.tryGetSceneEventListener(s);
@@ -33387,7 +33369,7 @@ class Ct extends D {
33387
33369
  async onEndLoading() {
33388
33370
  var e;
33389
33371
  if (this._isCurrentlyLoading = !1, (e = this.loadingScene) != null && e.asset) {
33390
- ni && console.log("Remove loading scene", this.loadingScene.url);
33372
+ oi && console.log("Remove loading scene", this.loadingScene.url);
33391
33373
  const i = this.loadingScene.asset, s = this.tryGetSceneEventListener(i);
33392
33374
  if (typeof (s == null ? void 0 : s.sceneClosing) == "function") {
33393
33375
  const o = s.sceneClosing();
@@ -33486,10 +33468,10 @@ class kA {
33486
33468
  begin() {
33487
33469
  if (this._isRunning)
33488
33470
  return;
33489
- ni && console.log("Preload begin"), this._isRunning = !0;
33471
+ oi && console.log("Preload begin"), this._isRunning = !0;
33490
33472
  let t = -1, e, i;
33491
33473
  const s = this._switcher.scenes, o = setInterval(() => {
33492
- if (this.allLoaded() && (ni && console.log("All scenes loaded"), this.stop()), !this._isRunning) {
33474
+ if (this.allLoaded() && (oi && console.log("All scenes loaded"), this.stop()), !this._isRunning) {
33493
33475
  clearInterval(o);
33494
33476
  return;
33495
33477
  }
@@ -33531,7 +33513,7 @@ class TA {
33531
33513
  this.index = t, this.asset = e, this.tasks = i, i.push(this), this.awaitLoading();
33532
33514
  }
33533
33515
  async awaitLoading() {
33534
- this.asset && !this.asset.isLoaded() && (ni && console.log("Preload start: " + this.asset.url, this.index), await this.asset.preload(), ni && console.log("Preload finished: " + this.asset.url, this.index));
33516
+ this.asset && !this.asset.isLoaded() && (oi && console.log("Preload start: " + this.asset.url, this.index), await this.asset.preload(), oi && console.log("Preload finished: " + this.asset.url, this.index));
33535
33517
  const t = this.tasks.indexOf(this);
33536
33518
  t >= 0 && this.tasks.splice(t, 1);
33537
33519
  }
@@ -34276,12 +34258,12 @@ class qr extends D {
34276
34258
  /** @internal */
34277
34259
  onEnable() {
34278
34260
  var e, i, s;
34279
- (e = this._net) == null || e.enable(), (i = this._net) == null || i.addEventListener(Cn.StreamReceived, this.onReceiveStream), (s = this._net) == null || s.addEventListener(Cn.StreamEnded, this.onCallEnded), this.context.connection.beginListen(se.JoinedRoom, this.onJoinedRoom), this.autoConnect && Gs(1e3).then(() => (this.enabled && this.autoConnect && !this.isReceiving && !this.isSending && this.context.connection.isInRoom && this.share(), 0));
34261
+ (e = this._net) == null || e.enable(), (i = this._net) == null || i.addEventListener(Sn.StreamReceived, this.onReceiveStream), (s = this._net) == null || s.addEventListener(Sn.StreamEnded, this.onCallEnded), this.context.connection.beginListen(se.JoinedRoom, this.onJoinedRoom), this.autoConnect && Gs(1e3).then(() => (this.enabled && this.autoConnect && !this.isReceiving && !this.isSending && this.context.connection.isInRoom && this.share(), 0));
34280
34262
  }
34281
34263
  /** @internal */
34282
34264
  onDisable() {
34283
34265
  var e, i, s;
34284
- (e = this._net) == null || e.removeEventListener(Cn.StreamReceived, this.onReceiveStream), (i = this._net) == null || i.removeEventListener(Cn.StreamEnded, this.onCallEnded), this.context.connection.stopListen(se.JoinedRoom, this.onJoinedRoom), (s = this._net) == null || s.disable(), this.close();
34266
+ (e = this._net) == null || e.removeEventListener(Sn.StreamReceived, this.onReceiveStream), (i = this._net) == null || i.removeEventListener(Sn.StreamEnded, this.onCallEnded), this.context.connection.stopListen(se.JoinedRoom, this.onJoinedRoom), (s = this._net) == null || s.disable(), this.close();
34285
34267
  }
34286
34268
  _ensureVideoPlayer() {
34287
34269
  const e = new wt();
@@ -34324,7 +34306,7 @@ class qr extends D {
34324
34306
  c,
34325
34307
  1
34326
34308
  /* Sending */
34327
- ) : Pn(c);
34309
+ ) : Cn(c);
34328
34310
  }
34329
34311
  break;
34330
34312
  case "Canvas":
@@ -34347,7 +34329,7 @@ class qr extends D {
34347
34329
  c,
34348
34330
  1
34349
34331
  /* Sending */
34350
- ) : Pn(c);
34332
+ ) : Cn(c);
34351
34333
  }
34352
34334
  break;
34353
34335
  default:
@@ -34363,7 +34345,7 @@ class qr extends D {
34363
34345
  }
34364
34346
  close() {
34365
34347
  var e;
34366
- this._requestOpen = !1, this._currentStream && (Pt && console.warn("Close current stream / disposing resources, stream was active?", this._currentStream.active), (e = this._net) == null || e.stopSendingStream(this._currentStream), Pn(this._currentStream), this._currentMode = 0, this._currentStream = null);
34348
+ this._requestOpen = !1, this._currentStream && (Pt && console.warn("Close current stream / disposing resources, stream was active?", this._currentStream.active), (e = this._net) == null || e.stopSendingStream(this._currentStream), Cn(this._currentStream), this._currentMode = 0, this._currentStream = null);
34367
34349
  }
34368
34350
  setStream(e, i) {
34369
34351
  var a, l, c;
@@ -34424,7 +34406,7 @@ class qr extends D {
34424
34406
  h,
34425
34407
  1
34426
34408
  /* Sending */
34427
- ), Pt && console.log("Selected camera", a)) : (Pn(h), Pt && console.log("Camera selection cancelled"));
34409
+ ), Pt && console.log("Selected camera", a)) : (Cn(h), Pt && console.log("Camera selection cancelled"));
34428
34410
  break;
34429
34411
  } catch (l) {
34430
34412
  if (l.message === "Failed to allocate videosource" || l.message === "Could not start video source") {
@@ -34473,7 +34455,7 @@ class pf extends D {
34473
34455
  else {
34474
34456
  const e = Tr.createPrimitive($a.Quad, {
34475
34457
  name: "ShadowCatcher",
34476
- material: new ri({
34458
+ material: new ai({
34477
34459
  // HACK heuristic to get approx. the same colors out as with the current default ShadowCatcher material
34478
34460
  // not clear why this is needed; assumption is that the Renderer component does something we're not respecting here
34479
34461
  color: 10066329,
@@ -34568,7 +34550,7 @@ const Ni = S("debugskybox");
34568
34550
  gy("skybox-image");
34569
34551
  gy("environment-image");
34570
34552
  function Fb(n, t, e, i, s) {
34571
- const o = new Ln();
34553
+ const o = new Dn();
34572
34554
  o.allowDrop = !1, o.allowNetworking = !1, o.background = e, o.environment = i, C.addComponent(n.scene, o);
34573
34555
  const a = (l) => {
34574
34556
  typeof l == "string" && (Ni && console.log(s, "CHANGED TO", l), o.setSkybox(l));
@@ -34611,7 +34593,7 @@ function HA(n, t) {
34611
34593
  }
34612
34594
  t.then((i) => iv(i, !1)), e.push({ src: n, texture: t });
34613
34595
  }
34614
- class Ln extends D {
34596
+ class Dn extends D {
34615
34597
  constructor() {
34616
34598
  super(...arguments);
34617
34599
  r(this, "url");
@@ -34758,21 +34740,21 @@ class Ln extends D {
34758
34740
  }
34759
34741
  }
34760
34742
  mh([
34761
- Fw(Ln.prototype.urlChangedSyncField),
34743
+ Fw(Dn.prototype.urlChangedSyncField),
34762
34744
  f(URL)
34763
- ], Ln.prototype, "url", 2);
34745
+ ], Dn.prototype, "url", 2);
34764
34746
  mh([
34765
34747
  f()
34766
- ], Ln.prototype, "allowDrop", 2);
34748
+ ], Dn.prototype, "allowDrop", 2);
34767
34749
  mh([
34768
34750
  f()
34769
- ], Ln.prototype, "background", 2);
34751
+ ], Dn.prototype, "background", 2);
34770
34752
  mh([
34771
34753
  f()
34772
- ], Ln.prototype, "environment", 2);
34754
+ ], Dn.prototype, "environment", 2);
34773
34755
  mh([
34774
34756
  f()
34775
- ], Ln.prototype, "allowNetworking", 2);
34757
+ ], Dn.prototype, "allowNetworking", 2);
34776
34758
  function GA(n, t, e) {
34777
34759
  const i = t && !e;
34778
34760
  switch (n == null ? void 0 : n.toLowerCase()) {
@@ -34846,7 +34828,7 @@ const uc = S("debugspatialtrigger"), Ub = new vo(), Nb = new vo();
34846
34828
  function KA(n, t) {
34847
34829
  return Ub.mask = n, Nb.mask = t, Ub.test(Nb);
34848
34830
  }
34849
- class An extends D {
34831
+ class Tn extends D {
34850
34832
  constructor() {
34851
34833
  super(...arguments);
34852
34834
  r(this, "triggerMask", 0);
@@ -34886,16 +34868,16 @@ class An extends D {
34886
34868
  }
34887
34869
  gh([
34888
34870
  f()
34889
- ], An.prototype, "triggerMask", 2);
34871
+ ], Tn.prototype, "triggerMask", 2);
34890
34872
  gh([
34891
34873
  f(Me)
34892
- ], An.prototype, "onEnter", 2);
34874
+ ], Tn.prototype, "onEnter", 2);
34893
34875
  gh([
34894
34876
  f(Me)
34895
- ], An.prototype, "onStay", 2);
34877
+ ], Tn.prototype, "onStay", 2);
34896
34878
  gh([
34897
34879
  f(Me)
34898
- ], An.prototype, "onExit", 2);
34880
+ ], Tn.prototype, "onExit", 2);
34899
34881
  var Hp;
34900
34882
  const Md = (Hp = class extends D {
34901
34883
  constructor() {
@@ -34919,17 +34901,17 @@ const Md = (Hp = class extends D {
34919
34901
  // private args: SpatialTriggerEventArgs = new SpatialTriggerEventArgs();
34920
34902
  raiseOnEnterEvent(t) {
34921
34903
  C.foreachComponent(this.gameObject, (e) => {
34922
- e !== t && e instanceof An && e.onEnterTrigger(this);
34904
+ e !== t && e instanceof Tn && e.onEnterTrigger(this);
34923
34905
  }, !1);
34924
34906
  }
34925
34907
  raiseOnStayEvent(t) {
34926
34908
  C.foreachComponent(this.gameObject, (e) => {
34927
- e !== t && e instanceof An && e.onStayTrigger(this);
34909
+ e !== t && e instanceof Tn && e.onStayTrigger(this);
34928
34910
  }, !1);
34929
34911
  }
34930
34912
  raiseOnExitEvent(t) {
34931
34913
  C.foreachComponent(this.gameObject, (e) => {
34932
- e !== t && e instanceof An && e.onExitTrigger(this);
34914
+ e !== t && e instanceof Tn && e.onExitTrigger(this);
34933
34915
  }, !1);
34934
34916
  }
34935
34917
  }, r(Hp, "triggers", []), Hp);
@@ -35174,7 +35156,7 @@ class sE {
35174
35156
  });
35175
35157
  }
35176
35158
  trySelectObject() {
35177
- const t = new En();
35159
+ const t = new An();
35178
35160
  t.setMask(16777215);
35179
35161
  const e = this.context.physics.raycast(t);
35180
35162
  if (wi && console.log(...e), e != null && e.length)
@@ -35348,7 +35330,7 @@ var aE = Object.defineProperty, lE = Object.getOwnPropertyDescriptor, cE = (n, t
35348
35330
  };
35349
35331
  const su = "SCAM";
35350
35332
  Y0(su, js.getRootAsSyncedCameraModel);
35351
- const pi = new cg();
35333
+ const mi = new cg();
35352
35334
  class hE {
35353
35335
  // dontSave: boolean = true;
35354
35336
  // pos: { x: number, y: number, z: number } = { x: 0, y: 0, z: 0 };
@@ -35360,13 +35342,13 @@ class hE {
35360
35342
  }
35361
35343
  send(t, e) {
35362
35344
  if (t) {
35363
- pi.clear();
35364
- const i = pi.createString(this.guid), s = pi.createString(this.userId);
35365
- js.startSyncedCameraModel(pi), js.addGuid(pi, i), js.addUserId(pi, s);
35345
+ mi.clear();
35346
+ const i = mi.createString(this.guid), s = mi.createString(this.userId);
35347
+ js.startSyncedCameraModel(mi), js.addGuid(mi, i), js.addUserId(mi, s);
35366
35348
  const o = ee(t), a = Ru(t);
35367
- js.addPos(pi, fr.createVec3(pi, o.x, o.y, o.z)), js.addRot(pi, fr.createVec3(pi, a.x, a.y, a.z));
35368
- const l = js.endSyncedCameraModel(pi);
35369
- pi.finish(l, su), e.sendBinary(pi.asUint8Array());
35349
+ js.addPos(mi, fr.createVec3(mi, o.x, o.y, o.z)), js.addRot(mi, fr.createVec3(mi, a.x, a.y, a.z));
35350
+ const l = js.endSyncedCameraModel(mi);
35351
+ mi.finish(l, su), e.sendBinary(mi.asUint8Array());
35370
35352
  }
35371
35353
  }
35372
35354
  }
@@ -36400,7 +36382,7 @@ const Xm = (Xp = class extends D {
36400
36382
  return this._time;
36401
36383
  }
36402
36384
  set time(t) {
36403
- typeof t == "number" && !Number.isNaN(t) ? this._time = t : (ln || li()) && console.error("INVALID TIMELINE.TIME VALUE", t, this.name);
36385
+ typeof t == "number" && !Number.isNaN(t) ? this._time = t : (ln || ci()) && console.error("INVALID TIMELINE.TIME VALUE", t, this.name);
36404
36386
  }
36405
36387
  /** the duration of the timeline */
36406
36388
  get duration() {
@@ -36785,7 +36767,7 @@ class pl extends D {
36785
36767
  r(this, "onControlChangedEvent", (e) => {
36786
36768
  const i = this.orbit;
36787
36769
  if (i && (i.enabled = !e.value), e.value) {
36788
- const s = C.getComponentInParent(this.gameObject, In);
36770
+ const s = C.getComponentInParent(this.gameObject, En);
36789
36771
  s && s.requestOwnership();
36790
36772
  }
36791
36773
  });
@@ -36865,7 +36847,7 @@ class pl extends D {
36865
36847
  (i = (e = this._control) == null ? void 0 : e.getHelper()) == null || i.removeFromParent(), (s = this._control) == null || s.removeEventListener("dragging-changed", this.onControlChangedEvent), window.removeEventListener("keydown", this.windowKeyDownListener), window.removeEventListener("keyup", this.windowKeyUpListener);
36866
36848
  }
36867
36849
  enableSnapping() {
36868
- this._control && (this._control.setTranslationSnap(this.translationSnap), this._control.setRotationSnap(On.degToRad(this.rotationSnapAngle)), this._control.setScaleSnap(this.scaleSnap));
36850
+ this._control && (this._control.setTranslationSnap(this.translationSnap), this._control.setRotationSnap(Pn.degToRad(this.rotationSnapAngle)), this._control.setScaleSnap(this.scaleSnap));
36869
36851
  }
36870
36852
  disableSnapping() {
36871
36853
  this._control && (this._control.setTranslationSnap(null), this._control.setRotationSnap(null), this._control.setScaleSnap(null));
@@ -37152,7 +37134,7 @@ var kE = Object.defineProperty, TE = Object.getOwnPropertyDescriptor, xf = (n, t
37152
37134
  (a = n[o]) && (s = (i ? a(t, e, s) : a(s)) || s);
37153
37135
  return i && s && kE(t, e, s), s;
37154
37136
  };
37155
- const Zn = S("debuginputfield");
37137
+ const Kn = S("debuginputfield");
37156
37138
  var na;
37157
37139
  const Y = (na = class extends D {
37158
37140
  constructor() {
@@ -37172,7 +37154,7 @@ const Y = (na = class extends D {
37172
37154
  return Y.active === this;
37173
37155
  }
37174
37156
  start() {
37175
- Zn && console.log(this.name, this);
37157
+ Kn && console.log(this.name, this);
37176
37158
  }
37177
37159
  onEnable() {
37178
37160
  var t;
@@ -37195,7 +37177,7 @@ const Y = (na = class extends D {
37195
37177
  this.onDeselected();
37196
37178
  }
37197
37179
  onPointerClick(t) {
37198
- Zn && console.log("CLICK", t, Y.active), Y.activeTime = this.context.time.time, Y.active !== this && this.startCoroutine(this.activeLoop(), Ce.LateUpdate), this.selectInputField();
37180
+ Kn && console.log("CLICK", t, Y.active), Y.activeTime = this.context.time.time, Y.active !== this && this.startCoroutine(this.activeLoop(), Ce.LateUpdate), this.selectInputField();
37199
37181
  }
37200
37182
  *activeLoop() {
37201
37183
  for (this.onSelected(); Y.active === this && !(this.context.input.getPointerClicked(0) && this.context.time.time - Y.activeTime > 0.2); )
@@ -37204,8 +37186,8 @@ const Y = (na = class extends D {
37204
37186
  }
37205
37187
  onSelected() {
37206
37188
  var t, e, i, s;
37207
- if (Y.active !== this && (Zn && console.log("Select", this.name, this, Y.htmlField, this.context.isInXR, this.context.arOverlayElement, (t = this.textComponent) == null ? void 0 : t.text, (e = Y.htmlField) == null ? void 0 : e.value), (i = Y.active) == null || i.onDeselected(), Y.active = this, this.placeholder && C.setActive(this.placeholder.gameObject, !1), Y.htmlField)) {
37208
- if (Y.htmlField.value = ((s = this.textComponent) == null ? void 0 : s.text) || "", Zn && console.log("set input field value", Y.htmlField.value), this.context.isInXR) {
37189
+ if (Y.active !== this && (Kn && console.log("Select", this.name, this, Y.htmlField, this.context.isInXR, this.context.arOverlayElement, (t = this.textComponent) == null ? void 0 : t.text, (e = Y.htmlField) == null ? void 0 : e.value), (i = Y.active) == null || i.onDeselected(), Y.active = this, this.placeholder && C.setActive(this.placeholder.gameObject, !1), Y.htmlField)) {
37190
+ if (Y.htmlField.value = ((s = this.textComponent) == null ? void 0 : s.text) || "", Kn && console.log("set input field value", Y.htmlField.value), this.context.isInXR) {
37209
37191
  const o = this.context.arOverlayElement;
37210
37192
  o && o.append(Y.htmlField);
37211
37193
  }
@@ -37214,7 +37196,7 @@ const Y = (na = class extends D {
37214
37196
  }
37215
37197
  onDeselected() {
37216
37198
  var t;
37217
- Y.active === this && (Y.active = null, Zn && console.log("Deselect", this.name, this), Y.htmlField && (Y.htmlField.blur(), document.body.append(Y.htmlField)), this.placeholder && (!this.textComponent || this.textComponent.text.length <= 0) && C.setActive(this.placeholder.gameObject, !0), Y.htmlField && ((t = this.onEndEdit) == null || t.invoke(Y.htmlField.value)));
37199
+ Y.active === this && (Y.active = null, Kn && console.log("Deselect", this.name, this), Y.htmlField && (Y.htmlField.blur(), document.body.append(Y.htmlField)), this.placeholder && (!this.textComponent || this.textComponent.text.length <= 0) && C.setActive(this.placeholder.gameObject, !0), Y.htmlField && ((t = this.onEndEdit) == null || t.invoke(Y.htmlField.value)));
37218
37200
  }
37219
37201
  // @Marwie, I can provide this fix. But the issue seems to comes from Raycaster+EventSystem
37220
37202
  // As we rollout InputField, and no others elements is behind raycast,
@@ -37226,7 +37208,7 @@ const Y = (na = class extends D {
37226
37208
  onInput(t) {
37227
37209
  var e, i;
37228
37210
  if (Y.active === this) {
37229
- if (Zn && console.log(t.code, t, (e = Y.htmlField) == null ? void 0 : e.value, (i = this.textComponent) == null ? void 0 : i.text), t.code === "Escape" || t.code === "Enter") {
37211
+ if (Kn && console.log(t.code, t, (e = Y.htmlField) == null ? void 0 : e.value, (i = this.textComponent) == null ? void 0 : i.text), t.code === "Escape" || t.code === "Enter") {
37230
37212
  this.onDeselected();
37231
37213
  return;
37232
37214
  }
@@ -37237,7 +37219,7 @@ const Y = (na = class extends D {
37237
37219
  var t;
37238
37220
  if (this.textComponent && Y.htmlField) {
37239
37221
  if (this.textComponent.text !== Y.htmlField.value) {
37240
- Zn && console.log("VALUE CHANGED");
37222
+ Kn && console.log("VALUE CHANGED");
37241
37223
  const e = this.textComponent.text, i = Y.htmlField.value;
37242
37224
  (t = this.onValueChanged) == null || t.invoke(i, e);
37243
37225
  }
@@ -37245,7 +37227,7 @@ const Y = (na = class extends D {
37245
37227
  }
37246
37228
  }
37247
37229
  selectInputField() {
37248
- Y.htmlField && (Zn && console.log("Focus Inputfield", Y.htmlFieldFocused), Y.htmlField.setSelectionRange(Y.htmlField.value.length, Y.htmlField.value.length), Q.isiOS() ? Y.htmlField.focus({ preventScroll: !0 }) : setTimeout(() => {
37230
+ Y.htmlField && (Kn && console.log("Focus Inputfield", Y.htmlFieldFocused), Y.htmlField.setSelectionRange(Y.htmlField.value.length, Y.htmlField.value.length), Q.isiOS() ? Y.htmlField.focus({ preventScroll: !0 }) : setTimeout(() => {
37249
37231
  var t;
37250
37232
  return (t = Y.htmlField) == null ? void 0 : t.focus();
37251
37233
  }, 1));
@@ -37297,10 +37279,10 @@ const Y = (na = class extends D {
37297
37279
  }, r(na, "active", null), r(na, "activeTime", -1), r(na, "htmlField", null), r(na, "htmlFieldFocused", !1), na);
37298
37280
  let ml = Y;
37299
37281
  xf([
37300
- f(ei)
37282
+ f(ti)
37301
37283
  ], ml.prototype, "textComponent", 2);
37302
37284
  xf([
37303
- f(ei)
37285
+ f(ti)
37304
37286
  ], ml.prototype, "placeholder", 2);
37305
37287
  xf([
37306
37288
  f(Me)
@@ -37612,7 +37594,7 @@ function hx(n) {
37612
37594
  const l = i.renderer, c = l.xr.enabled;
37613
37595
  if (c && i.currentFrameEvent != Ce.EarlyUpdate)
37614
37596
  return console.warn("Screenshot: defer to access XR frame"), new Promise((j) => {
37615
- jn((T) => {
37597
+ Ln((T) => {
37616
37598
  const z = hx(n);
37617
37599
  j(z);
37618
37600
  }, Ce.EarlyUpdate, { once: !0 });
@@ -37955,7 +37937,7 @@ const Vb = S("debugimagetracking"), mu = class {
37955
37937
  };
37956
37938
  let ir = mu;
37957
37939
  r(ir, "_positionBuffer", new Zi(() => new v(), 20)), r(ir, "_rotationBuffer", new Zi(() => new W(), 20));
37958
- class Hn {
37940
+ class Vn {
37959
37941
  constructor() {
37960
37942
  r(this, "image");
37961
37943
  r(this, "widthInMeters", 0.25);
@@ -37967,22 +37949,22 @@ class Hn {
37967
37949
  }
37968
37950
  Bo([
37969
37951
  f(URL)
37970
- ], Hn.prototype, "image", 2);
37952
+ ], Vn.prototype, "image", 2);
37971
37953
  Bo([
37972
37954
  f()
37973
- ], Hn.prototype, "widthInMeters", 2);
37955
+ ], Vn.prototype, "widthInMeters", 2);
37974
37956
  Bo([
37975
37957
  f(re)
37976
- ], Hn.prototype, "object", 2);
37958
+ ], Vn.prototype, "object", 2);
37977
37959
  Bo([
37978
37960
  f()
37979
- ], Hn.prototype, "createObjectInstance", 2);
37961
+ ], Vn.prototype, "createObjectInstance", 2);
37980
37962
  Bo([
37981
37963
  f()
37982
- ], Hn.prototype, "imageDoesNotMove", 2);
37964
+ ], Vn.prototype, "imageDoesNotMove", 2);
37983
37965
  Bo([
37984
37966
  f()
37985
- ], Hn.prototype, "hideWhenTrackingIsLost", 2);
37967
+ ], Vn.prototype, "hideWhenTrackingIsLost", 2);
37986
37968
  class XE {
37987
37969
  constructor(t, e, i) {
37988
37970
  r(this, "filename");
@@ -38185,7 +38167,7 @@ const Zl = (Yp = class extends D {
38185
38167
  }, r(Yp, "_imageElements", /* @__PURE__ */ new Map()), Yp);
38186
38168
  let Xa = Zl;
38187
38169
  Bo([
38188
- f(Hn)
38170
+ f(Vn)
38189
38171
  ], Xa.prototype, "trackedImages", 2);
38190
38172
  Bo([
38191
38173
  f()
@@ -38515,9 +38497,9 @@ const YD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38515
38497
  __proto__: null,
38516
38498
  ActionBuilder: ue,
38517
38499
  ActionCollection: ww,
38518
- ActionModel: oi,
38500
+ ActionModel: ri,
38519
38501
  AlignmentConstraint: zu,
38520
- Animation: Kt,
38502
+ Animation: Zt,
38521
38503
  AnimationCurve: Ya,
38522
38504
  AnimationExtension: Qu,
38523
38505
  AnimationTrackHandler: by,
@@ -38537,7 +38519,7 @@ const YD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38537
38519
  Avatar_Brain_LookAt: Qd,
38538
38520
  Avatar_MouthShapes: Wu,
38539
38521
  Avatar_MustacheShake: Uv,
38540
- Avatar_POI: kn,
38522
+ Avatar_POI: Rn,
38541
38523
  AxesHelper: Zc,
38542
38524
  BaseUIComponent: _s,
38543
38525
  BasicIKConstraint: Vv,
@@ -38576,7 +38558,7 @@ const YD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38576
38558
  DropListenerAddedEvent: Vg,
38577
38559
  Duplicatable: il,
38578
38560
  EffectWrapper: iu,
38579
- EmissionModule: Wn,
38561
+ EmissionModule: $n,
38580
38562
  EmphasizeOnClick: nh,
38581
38563
  EventList: Me,
38582
38564
  EventListEvent: Lg,
@@ -38592,7 +38574,7 @@ const YD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38592
38574
  GraphicRaycaster: jg,
38593
38575
  GridHelper: hh,
38594
38576
  GridLayoutGroup: Iw,
38595
- GroundProjectedEnv: Bn,
38577
+ GroundProjectedEnv: jn,
38596
38578
  GroupActionModel: co,
38597
38579
  HideOnStart: xw,
38598
38580
  HingeJoint: sf,
@@ -38603,7 +38585,7 @@ const YD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38603
38585
  InstanceHandle: Ta,
38604
38586
  InstancingHandler: ao,
38605
38587
  Interactable: Xv,
38606
- Keyframe: ai,
38588
+ Keyframe: li,
38607
38589
  LODGroup: nf,
38608
38590
  LODModel: ll,
38609
38591
  Light: Ai,
@@ -38616,8 +38598,8 @@ const YD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38616
38598
  MeshCollider: Lr,
38617
38599
  MeshRenderer: qu,
38618
38600
  MinMaxCurve: q,
38619
- MinMaxGradient: hi,
38620
- NeedleMenu: $n,
38601
+ MinMaxGradient: di,
38602
+ NeedleMenu: Nn,
38621
38603
  NestedGltf: cy,
38622
38604
  Networking: uh,
38623
38605
  NoiseModule: we,
@@ -38643,10 +38625,10 @@ const YD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38643
38625
  PreliminaryTrigger: Yu,
38644
38626
  RawImage: xy,
38645
38627
  Rect: Ow,
38646
- RectTransform: Zt,
38628
+ RectTransform: Jt,
38647
38629
  ReflectionProbe: th,
38648
38630
  RegisteredAnimationInfo: lo,
38649
- RemoteSkybox: Ln,
38631
+ RemoteSkybox: Dn,
38650
38632
  Renderer: et,
38651
38633
  RendererLightmap: Zd,
38652
38634
  Rigidbody: ye,
@@ -38665,39 +38647,39 @@ const YD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38665
38647
  SignalReceiverEvent: yh,
38666
38648
  SignalTrackHandler: nu,
38667
38649
  Size: Pw,
38668
- SizeBySpeedModule: di,
38650
+ SizeBySpeedModule: ui,
38669
38651
  SizeOverLifetimeModule: Nr,
38670
38652
  SkinnedMeshRenderer: aw,
38671
38653
  SmoothFollow: Xr,
38672
38654
  SpatialGrabRaycaster: pr,
38673
38655
  SpatialHtml: Sf,
38674
38656
  SpatialTrigger: gf,
38675
- SpatialTriggerReceiver: An,
38657
+ SpatialTriggerReceiver: Tn,
38676
38658
  SpectatorCamera: yy,
38677
38659
  SphereCollider: Jc,
38678
- Sprite: Nn,
38660
+ Sprite: Un,
38679
38661
  SpriteData: _o,
38680
38662
  SpriteRenderer: Ti,
38681
38663
  SpriteSheet: Sr,
38682
38664
  SubEmitterSystem: tu,
38683
38665
  SyncedCamera: _y,
38684
38666
  SyncedRoom: tn,
38685
- SyncedTransform: In,
38667
+ SyncedTransform: En,
38686
38668
  TapGestureTrigger: Sw,
38687
38669
  TeleportTarget: sy,
38688
38670
  TestRunner: ix,
38689
38671
  TestSimulateUserData: sx,
38690
- Text: ei,
38672
+ Text: ti,
38691
38673
  TextBuilder: Zg,
38692
38674
  TextExtension: Ju,
38693
38675
  TextureSheetAnimationModule: Nt,
38694
- TiltShiftEffect: Vn,
38676
+ TiltShiftEffect: Wn,
38695
38677
  ToneMappingEffect: Pr,
38696
38678
  TrailModule: He,
38697
38679
  TransformData: Fe,
38698
38680
  TransformGizmo: pl,
38699
38681
  TriggerBuilder: Rt,
38700
- TriggerModel: Tn,
38682
+ TriggerModel: kn,
38701
38683
  UIRaycastUtils: Bg,
38702
38684
  UIRootComponent: Nu,
38703
38685
  USDZExporter: qe,
@@ -38718,11 +38700,11 @@ const YD = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
38718
38700
  WebARSessionRoot: Co,
38719
38701
  WebXR: tt,
38720
38702
  WebXRImageTracking: Xa,
38721
- WebXRImageTrackingModel: Hn,
38703
+ WebXRImageTrackingModel: Vn,
38722
38704
  WebXRPlaneTracking: Fo,
38723
38705
  WebXRTrackedImage: ir,
38724
38706
  XRControllerFollow: jo,
38725
- XRControllerModel: Dn,
38707
+ XRControllerModel: In,
38726
38708
  XRControllerMovement: is,
38727
38709
  XRFlag: Wi,
38728
38710
  XRRig: Cy,
@@ -38739,14 +38721,14 @@ class eI extends D {
38739
38721
  }
38740
38722
  }
38741
38723
  w.add("AlignmentConstraint", zu);
38742
- w.add("Animation", Kt);
38743
- w.add("Keyframe", ai);
38724
+ w.add("Animation", Zt);
38725
+ w.add("Keyframe", li);
38744
38726
  w.add("AnimationCurve", Ya);
38745
38727
  w.add("Animator", Bt);
38746
38728
  w.add("AnimatorController", Yi);
38747
38729
  w.add("AudioListener", gr);
38748
38730
  w.add("AudioSource", Xe);
38749
- w.add("Avatar_POI", kn);
38731
+ w.add("Avatar_POI", Rn);
38750
38732
  w.add("Avatar_Brain_LookAt", Qd);
38751
38733
  w.add("Avatar_MouthShapes", Wu);
38752
38734
  w.add("Avatar_MustacheShake", Uv);
@@ -38800,10 +38782,10 @@ w.add("PreliminaryTrigger", Yu);
38800
38782
  w.add("VisibilityAction", Ku);
38801
38783
  w.add("TapGestureTrigger", Sw);
38802
38784
  w.add("BehaviorModel", ht);
38803
- w.add("TriggerModel", Tn);
38785
+ w.add("TriggerModel", kn);
38804
38786
  w.add("TriggerBuilder", Rt);
38805
38787
  w.add("GroupActionModel", co);
38806
- w.add("ActionModel", oi);
38788
+ w.add("ActionModel", ri);
38807
38789
  w.add("ActionBuilder", ue);
38808
38790
  w.add("PhysicsExtension", Kg);
38809
38791
  w.add("DocumentExtension", Cw);
@@ -38816,7 +38798,7 @@ w.add("USDZExporter", qe);
38816
38798
  w.add("Fog", ch);
38817
38799
  w.add("BoxGizmo", al);
38818
38800
  w.add("GridHelper", hh);
38819
- w.add("GroundProjectedEnv", Bn);
38801
+ w.add("GroundProjectedEnv", jn);
38820
38802
  w.add("UsageMarker", Hu);
38821
38803
  w.add("Interactable", Xv);
38822
38804
  w.add("FixedJoint", Uw);
@@ -38825,7 +38807,7 @@ w.add("Light", Ai);
38825
38807
  w.add("LODModel", ll);
38826
38808
  w.add("LODGroup", nf);
38827
38809
  w.add("LookAtConstraint", Ka);
38828
- w.add("NeedleMenu", $n);
38810
+ w.add("NeedleMenu", Nn);
38829
38811
  w.add("NestedGltf", cy);
38830
38812
  w.add("Networking", uh);
38831
38813
  w.add("OffsetConstraint", cl);
@@ -38836,10 +38818,10 @@ w.add("ParticleSystem", ut);
38836
38818
  w.add("SubEmitterSystem", tu);
38837
38819
  w.add("Gradient", Ur);
38838
38820
  w.add("MinMaxCurve", q);
38839
- w.add("MinMaxGradient", hi);
38821
+ w.add("MinMaxGradient", di);
38840
38822
  w.add("MainModule", Ut);
38841
38823
  w.add("ParticleBurst", eu);
38842
- w.add("EmissionModule", Wn);
38824
+ w.add("EmissionModule", $n);
38843
38825
  w.add("ColorOverLifetimeModule", rf);
38844
38826
  w.add("SizeOverLifetimeModule", Nr);
38845
38827
  w.add("ShapeModule", Qe);
@@ -38851,7 +38833,7 @@ w.add("RotationOverLifetimeModule", vs);
38851
38833
  w.add("RotationBySpeedModule", ns);
38852
38834
  w.add("LimitVelocityOverLifetimeModule", ft);
38853
38835
  w.add("InheritVelocityModule", $r);
38854
- w.add("SizeBySpeedModule", di);
38836
+ w.add("SizeBySpeedModule", ui);
38855
38837
  w.add("ColorBySpeedModule", hl);
38856
38838
  w.add("ParticleSubEmitter", dy);
38857
38839
  w.add("PlayerColor", Lc);
@@ -38865,7 +38847,7 @@ w.add("PixelationEffect", df);
38865
38847
  w.add("ScreenSpaceAmbientOcclusion", Eo);
38866
38848
  w.add("ScreenSpaceAmbientOcclusionN8", en);
38867
38849
  w.add("SharpeningEffect", uf);
38868
- w.add("TiltShiftEffect", Vn);
38850
+ w.add("TiltShiftEffect", Wn);
38869
38851
  w.add("ToneMappingEffect", Pr);
38870
38852
  w.add("Vignette", fl);
38871
38853
  w.add("PostProcessingHandler", my);
@@ -38884,18 +38866,18 @@ w.add("Rigidbody", ye);
38884
38866
  w.add("SceneSwitcher", Ct);
38885
38867
  w.add("ScreenCapture", qr);
38886
38868
  w.add("ShadowCatcher", pf);
38887
- w.add("RemoteSkybox", Ln);
38869
+ w.add("RemoteSkybox", Dn);
38888
38870
  w.add("SmoothFollow", Xr);
38889
- w.add("SpatialTriggerReceiver", An);
38871
+ w.add("SpatialTriggerReceiver", Tn);
38890
38872
  w.add("SpatialTrigger", gf);
38891
38873
  w.add("SpectatorCamera", yy);
38892
- w.add("Sprite", Nn);
38874
+ w.add("Sprite", Un);
38893
38875
  w.add("SpriteSheet", Sr);
38894
38876
  w.add("SpriteData", _o);
38895
38877
  w.add("SpriteRenderer", Ti);
38896
38878
  w.add("SyncedCamera", _y);
38897
38879
  w.add("SyncedRoom", tn);
38898
- w.add("SyncedTransform", In);
38880
+ w.add("SyncedTransform", En);
38899
38881
  w.add("TestRunner", ix);
38900
38882
  w.add("TestSimulateUserData", sx);
38901
38883
  w.add("PlayableDirector", Or);
@@ -38930,16 +38912,16 @@ w.add("SpatialGrabRaycaster", pr);
38930
38912
  w.add("UIRaycastUtils", Bg);
38931
38913
  w.add("Size", Pw);
38932
38914
  w.add("Rect", Ow);
38933
- w.add("RectTransform", Zt);
38915
+ w.add("RectTransform", Jt);
38934
38916
  w.add("SpatialHtml", Sf);
38935
- w.add("Text", ei);
38917
+ w.add("Text", ti);
38936
38918
  w.add("LookAt", gl);
38937
38919
  w.add("OpenURL", vh);
38938
38920
  w.add("VideoPlayer", wt);
38939
38921
  w.add("Voip", Dr);
38940
38922
  w.add("Avatar", Cr);
38941
38923
  w.add("XRControllerFollow", jo);
38942
- w.add("XRControllerModel", Dn);
38924
+ w.add("XRControllerModel", In);
38943
38925
  w.add("XRControllerMovement", is);
38944
38926
  w.add("TeleportTarget", sy);
38945
38927
  w.add("WebARCameraBackground", Pf);
@@ -38947,7 +38929,7 @@ w.add("WebARSessionRoot", Co);
38947
38929
  w.add("WebXR", tt);
38948
38930
  w.add("AvatarMarker", bt);
38949
38931
  w.add("WebXRTrackedImage", ir);
38950
- w.add("WebXRImageTrackingModel", Hn);
38932
+ w.add("WebXRImageTrackingModel", Vn);
38951
38933
  w.add("WebXRImageTracking", Xa);
38952
38934
  w.add("WebXRPlaneTracking", Fo);
38953
38935
  w.add("XRRig", Cy);
@@ -39042,7 +39024,7 @@ async function Km(n, t, e, i) {
39042
39024
  }
39043
39025
  if (El.length > 0) {
39044
39026
  const u = El.join(", ");
39045
- console.warn("unknown components: " + u), El.length = 0, li() && $e(`<strong>Unknown components in scene</strong>:
39027
+ console.warn("unknown components: " + u), El.length = 0, ci() && $e(`<strong>Unknown components in scene</strong>:
39046
39028
 
39047
39029
  ${u}
39048
39030
 
@@ -39966,7 +39948,7 @@ function iL(n) {
39966
39948
  }
39967
39949
  return !0;
39968
39950
  }
39969
- const Ke = S("debugphysics"), Dp = S("debugcolliderplacement"), Lp = S("debugcollisions"), bI = S("showcolliders"), jp = S("debugraycasts"), si = Symbol("needle component"), Gt = Symbol("physics body"), Xb = Symbol("rigidbody");
39951
+ const Ke = S("debugphysics"), Dp = S("debugcolliderplacement"), Lp = S("debugcollisions"), bI = S("showcolliders"), jp = S("debugraycasts"), ni = Symbol("needle component"), Gt = Symbol("physics body"), Xb = Symbol("rigidbody");
39970
39952
  globalThis.true = globalThis.true !== void 0 ? globalThis.true : !0;
39971
39953
  Ke && console.log("Use Rapier", !0, globalThis.true);
39972
39954
  fe.registerCallback(me.ContextCreationStart, (n) => {
@@ -40021,7 +40003,7 @@ const xc = class {
40021
40003
  const c = l;
40022
40004
  (i = this.world) == null || i.removeCollider(c, !0);
40023
40005
  const h = c.parent();
40024
- h && h.numColliders() <= 0 && (h[si] || (s = this.world) == null || s.removeRigidBody(h));
40006
+ h && h.numColliders() <= 0 && (h[ni] || (s = this.world) == null || s.removeRigidBody(h));
40025
40007
  } else
40026
40008
  l instanceof B.RAPIER_PHYSICS.MODULE.RigidBody && (l.numColliders() <= 0 ? (o = this.world) == null || o.removeRigidBody(l) : U() && (l.did_log_removing || setTimeout(() => {
40027
40009
  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"));
@@ -40126,12 +40108,12 @@ const xc = class {
40126
40108
  return null;
40127
40109
  (this.debugRenderRaycasts || jp) && G.DrawRay(a.origin, a.dir, 255, 1);
40128
40110
  const l = (c = this.world) == null ? void 0 : c.castRay(a, s, o, i == null ? void 0 : i.queryFilterFlags, i == null ? void 0 : i.filterGroups, void 0, void 0, (h) => {
40129
- const d = h[si];
40111
+ const d = h[ni];
40130
40112
  return i != null && i.filterPredicate ? i.filterPredicate(d) : (i == null ? void 0 : i.useIgnoreRaycastLayer) !== !1 ? !(d != null && d.gameObject.layers.isEnabled(2)) : !0;
40131
40113
  });
40132
40114
  if (l) {
40133
40115
  const h = a.pointAt(l.timeOfImpact), d = this.raycastVectorsBuffer.get();
40134
- return d.set(h.x, h.y, h.z), { point: d, collider: l.collider[si] };
40116
+ return d.set(h.x, h.y, h.z), { point: d, collider: l.collider[ni] };
40135
40117
  }
40136
40118
  return null;
40137
40119
  }
@@ -40146,12 +40128,12 @@ const xc = class {
40146
40128
  return null;
40147
40129
  (this.debugRenderRaycasts || jp) && G.DrawRay(a.origin, a.dir, 255, 1);
40148
40130
  const l = (c = this.world) == null ? void 0 : c.castRayAndGetNormal(a, s, o, i == null ? void 0 : i.queryFilterFlags, i == null ? void 0 : i.filterGroups, void 0, void 0, (h) => {
40149
- const d = h[si];
40131
+ const d = h[ni];
40150
40132
  return i != null && i.filterPredicate ? i.filterPredicate(d) : (i == null ? void 0 : i.useIgnoreRaycastLayer) !== !1 ? !(d != null && d.gameObject.layers.isEnabled(2)) : !0;
40151
40133
  });
40152
40134
  if (l) {
40153
40135
  const h = a.pointAt(l.timeOfImpact), d = l.normal, u = this.raycastVectorsBuffer.get(), p = this.raycastVectorsBuffer.get();
40154
- return u.set(h.x, h.y, h.z), p.set(d.x, d.y, d.z), { point: u, normal: p, collider: l.collider[si] };
40136
+ return u.set(h.x, h.y, h.z), p.set(d.x, d.y, d.z), { point: u, normal: p, collider: l.collider[ni] };
40155
40137
  }
40156
40138
  return null;
40157
40139
  }
@@ -40196,7 +40178,7 @@ const xc = class {
40196
40178
  this.rapierIdentityRotation,
40197
40179
  this.rapierSphere,
40198
40180
  (i) => {
40199
- const s = i[si], o = new lR(s.gameObject, s);
40181
+ const s = i[ni], o = new lR(s.gameObject, s);
40200
40182
  return this.rapierColliderArray.push(o), !0;
40201
40183
  },
40202
40184
  // TODO: it seems as QueryFilterFlags.EXCLUDE_SENSORS also excludes DYNAMIC Rigidbodies (only if they're set to kinematic)
@@ -40205,7 +40187,7 @@ const xc = class {
40205
40187
  void 0,
40206
40188
  void 0,
40207
40189
  void 0,
40208
- (i) => i.isSensor() ? !1 : i[si].gameObject.layers.isEnabled(2) == !1
40190
+ (i) => i.isSensor() ? !1 : i[ni].gameObject.layers.isEnabled(2) == !1
40209
40191
  ), this.rapierColliderArray) : this.rapierColliderArray : this.rapierColliderArray;
40210
40192
  }
40211
40193
  /** Get access to the rapier world */
@@ -40346,7 +40328,7 @@ const xc = class {
40346
40328
  }
40347
40329
  /** Get the Needle Engine component for a rapier object */
40348
40330
  getComponent(t) {
40349
- return t ? t[si] : null;
40331
+ return t ? t[ni] : null;
40350
40332
  }
40351
40333
  createCollider(t, e) {
40352
40334
  var a;
@@ -40391,7 +40373,7 @@ const xc = class {
40391
40373
  ((a = t.attachedRigidbody) == null ? void 0 : a.autoMass) === !1 && (e.setDensity(1e-6), e.setMass(1e-6));
40392
40374
  try {
40393
40375
  const l = this.world.createCollider(e, s);
40394
- return l[si] = t, t[Gt] = l, l.setActiveEvents(B.RAPIER_PHYSICS.MODULE.ActiveEvents.COLLISION_EVENTS), l.setActiveCollisionTypes(B.RAPIER_PHYSICS.MODULE.ActiveCollisionTypes.ALL), this.objects.push(t), this.bodies.push(l), this.updateColliderCollisionGroups(t), l;
40376
+ return l[ni] = t, t[Gt] = l, l.setActiveEvents(B.RAPIER_PHYSICS.MODULE.ActiveEvents.COLLISION_EVENTS), l.setActiveCollisionTypes(B.RAPIER_PHYSICS.MODULE.ActiveCollisionTypes.ALL), this.objects.push(t), this.bodies.push(l), this.updateColliderCollisionGroups(t), l;
40395
40377
  } catch (l) {
40396
40378
  return console.error('Error creating collider "' + t.name + `"
40397
40379
  Error:`, l), null;
@@ -40435,10 +40417,10 @@ Error:`, l), null;
40435
40417
  const a = o ? B.RAPIER_PHYSICS.MODULE.RigidBodyDesc.kinematicPositionBased() : B.RAPIER_PHYSICS.MODULE.RigidBodyDesc.dynamic(), l = ee(t.attachedRigidbody.gameObject);
40436
40418
  a.setTranslation(l.x, l.y, l.z), a.setRotation(xe(t.attachedRigidbody.gameObject)), a.centerOfMass = new B.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);
40437
40419
  }
40438
- i[si] = s, s[Gt] = i, this.internalUpdateRigidbodyProperties(s, i), this.getRigidbodyRelativeMatrix(t.gameObject, s.gameObject, e), t[Xb] = i;
40420
+ i[ni] = s, s[Gt] = i, this.internalUpdateRigidbodyProperties(s, i), this.getRigidbodyRelativeMatrix(t.gameObject, s.gameObject, e), t[Xb] = i;
40439
40421
  } else {
40440
40422
  const s = B.RAPIER_PHYSICS.MODULE.RigidBodyDesc.kinematicPositionBased(), o = ee(t.gameObject);
40441
- s.setTranslation(o.x, o.y, o.z), s.setRotation(xe(t.gameObject)), i = this.world.createRigidBody(s), e.identity(), i[si] = null;
40423
+ s.setTranslation(o.x, o.y, o.z), s.setRotation(xe(t.gameObject)), i = this.world.createRigidBody(s), e.identity(), i[ni] = null;
40442
40424
  }
40443
40425
  return i;
40444
40426
  }
@@ -40556,7 +40538,7 @@ Error:`, l), null;
40556
40538
  }
40557
40539
  } else if (e instanceof B.RAPIER_PHYSICS.MODULE.Collider) {
40558
40540
  t.matrixWorldNeedsUpdate && t.updateWorldMatrix(!0, !1), t.matrixWorld.decompose(this._tempPosition, this._tempQuaternion, this._tempScale);
40559
- const o = this._tempPosition, a = this._tempQuaternion, l = e[si];
40541
+ const o = this._tempPosition, a = this._tempQuaternion, l = e[ni];
40560
40542
  if (this.tryApplyCenter(l, o), i) {
40561
40543
  const c = e.translation();
40562
40544
  (c.x !== o.x || c.y !== o.y || c.z !== o.z) && e.setTranslation(o);
@@ -40629,7 +40611,7 @@ class vI {
40629
40611
  const s = this.world.getCollider(t), o = this.world.getCollider(e);
40630
40612
  if (!s || !o)
40631
40613
  return;
40632
- const a = s[si], l = o[si];
40614
+ const a = s[ni], l = o[ni];
40633
40615
  Lp && console.log("EVT", a.name, l.name, i, s, o), a && l && (i ? (this.onCollisionStarted(a, s, l, o), this.onCollisionStarted(l, o, a, s)) : (this.onCollisionEnded(a, l), this.onCollisionEnded(l, a)));
40634
40616
  });
40635
40617
  }
@@ -40777,7 +40759,7 @@ class sL {
40777
40759
  }
40778
40760
  if (_) {
40779
40761
  const b = await _.loadAsync(c).catch((x) => (console.error(x), null));
40780
- b && (b.mapping = Rn, b.needsUpdate = !0, o.background = b, o.environment = b, o.backgroundBlurriness = 0.75);
40762
+ b && (b.mapping = Mn, b.needsUpdate = !0, o.background = b, o.environment = b, o.backgroundBlurriness = 0.75);
40781
40763
  } else
40782
40764
  console.warn("Unsupported environment map format", c);
40783
40765
  }
@@ -40890,18 +40872,18 @@ var sr, nr, or, qt, yn, La, gu, Px, yu, Ox, Uc;
40890
40872
  class Cx extends HTMLElement {
40891
40873
  constructor() {
40892
40874
  super();
40893
- ui(this, gu);
40894
- ui(this, yu);
40895
- ui(this, sr, void 0);
40896
- ui(this, nr, void 0);
40875
+ fi(this, gu);
40876
+ fi(this, yu);
40877
+ fi(this, sr, void 0);
40878
+ fi(this, nr, void 0);
40897
40879
  /** These are the default styles that can be overridden by the user from the outside by styling <needle-button> */
40898
- ui(this, or, void 0);
40880
+ fi(this, or, void 0);
40899
40881
  /** This is the button that was generated using one of the factories */
40900
- ui(this, qt, void 0);
40882
+ fi(this, qt, void 0);
40901
40883
  /** If AR or VR is requested we create and use the webxr button factory to create a button with default behaviour */
40902
- ui(this, yn, void 0);
40903
- ui(this, La, void 0);
40904
- ui(this, Uc, (e) => {
40884
+ fi(this, yn, void 0);
40885
+ fi(this, La, void 0);
40886
+ fi(this, Uc, (e) => {
40905
40887
  Bp && console.log("Needle Button clicked"), !e.defaultPrevented && de(this, qt) && de(this, qt).click();
40906
40888
  });
40907
40889
  this.removeEventListener("click", de(this, Uc)), this.addEventListener("click", de(this, Uc));
@@ -41009,15 +40991,15 @@ fe.registerCallback(me.ContextCreated, (n) => {
41009
40991
  for (const e of n.files)
41010
40992
  C.foreachComponent(e.file.scene, (s) => {
41011
40993
  if (s.enabled !== !1) {
41012
- if (s instanceof Kt && s.playAutomatically || s instanceof Bt || s instanceof Or && s.playOnAwake === !0)
40994
+ if (s instanceof Zt && s.playAutomatically || s instanceof Bt || s instanceof Or && s.playOnAwake === !0)
41013
40995
  return !0;
41014
- if (s instanceof Kt)
40996
+ if (s instanceof Zt)
41015
40997
  return s.playAutomatically = !0, !0;
41016
40998
  if (s instanceof Or)
41017
40999
  return s.playOnAwake = !0, !0;
41018
41000
  }
41019
41001
  }, !0) !== !0 && Ec.assignAnimationsFromFile(e.file, {
41020
- createAnimationComponent: (s, o) => Qi(s, Kt)
41002
+ createAnimationComponent: (s, o) => Qi(s, Zt)
41021
41003
  });
41022
41004
  });
41023
41005
  class OI extends C1 {
@@ -41131,7 +41113,7 @@ export {
41131
41113
  iL as aU,
41132
41114
  _g as aV,
41133
41115
  Ne as aW,
41134
- Jn as aX,
41116
+ Zn as aX,
41135
41117
  Sh as aY,
41136
41118
  uD as aZ,
41137
41119
  $i as a_,
@@ -41170,23 +41152,23 @@ export {
41170
41152
  $ as b4,
41171
41153
  Ef as b5,
41172
41154
  R0 as b6,
41173
- mi as b7,
41155
+ gi as b7,
41174
41156
  Oh as b8,
41175
41157
  tP as b9,
41176
- Cn as bA,
41158
+ Sn as bA,
41177
41159
  Fv as bB,
41178
41160
  cR as bC,
41179
41161
  dR as bD,
41180
41162
  Ra as bE,
41181
41163
  $u as bF,
41182
- Pn as bG,
41164
+ Cn as bG,
41183
41165
  Is as bH,
41184
- li as bI,
41166
+ ci as bI,
41185
41167
  k1 as bJ,
41186
41168
  mg as bK,
41187
41169
  cD as bL,
41188
41170
  jf as bM,
41189
- En as bN,
41171
+ An as bN,
41190
41172
  J0 as bO,
41191
41173
  ic as bP,
41192
41174
  Ot as bQ,
@@ -41410,14 +41392,14 @@ export {
41410
41392
  Yv as en,
41411
41393
  dx as eo,
41412
41394
  zu as ep,
41413
- Kt as eq,
41414
- ai as er,
41395
+ Zt as eq,
41396
+ li as er,
41415
41397
  Ya as es,
41416
41398
  Bt as et,
41417
41399
  Yi as eu,
41418
41400
  gr as ev,
41419
41401
  Xe as ew,
41420
- kn as ex,
41402
+ Rn as ex,
41421
41403
  Qd as ey,
41422
41404
  Wu as ez,
41423
41405
  G as f,
@@ -41434,7 +41416,7 @@ export {
41434
41416
  Yg as f9,
41435
41417
  al as fA,
41436
41418
  hh as fB,
41437
- Bn as fC,
41419
+ jn as fC,
41438
41420
  Hu as fD,
41439
41421
  Xv as fE,
41440
41422
  Uw as fF,
@@ -41443,7 +41425,7 @@ export {
41443
41425
  ll as fI,
41444
41426
  nf as fJ,
41445
41427
  Ka as fK,
41446
- $n as fL,
41428
+ Nn as fL,
41447
41429
  cy as fM,
41448
41430
  uh as fN,
41449
41431
  cl as fO,
@@ -41454,10 +41436,10 @@ export {
41454
41436
  tu as fT,
41455
41437
  Ur as fU,
41456
41438
  q as fV,
41457
- hi as fW,
41439
+ di as fW,
41458
41440
  Ut as fX,
41459
41441
  eu as fY,
41460
- Wn as fZ,
41442
+ $n as fZ,
41461
41443
  rf as f_,
41462
41444
  sl as fa,
41463
41445
  sh as fb,
@@ -41471,10 +41453,10 @@ export {
41471
41453
  Ku as fj,
41472
41454
  Sw as fk,
41473
41455
  ht as fl,
41474
- Tn as fm,
41456
+ kn as fm,
41475
41457
  Rt as fn,
41476
41458
  co as fo,
41477
- oi as fp,
41459
+ ri as fp,
41478
41460
  ue as fq,
41479
41461
  Kg as fr,
41480
41462
  Cw as fs,
@@ -41496,25 +41478,25 @@ export {
41496
41478
  ns as g6,
41497
41479
  ft as g7,
41498
41480
  $r as g8,
41499
- di as g9,
41481
+ ui as g9,
41500
41482
  Ta as gA,
41501
41483
  Zd as gB,
41502
41484
  ye as gC,
41503
41485
  Ct as gD,
41504
41486
  qr as gE,
41505
41487
  pf as gF,
41506
- Ln as gG,
41488
+ Dn as gG,
41507
41489
  Xr as gH,
41508
- An as gI,
41490
+ Tn as gI,
41509
41491
  gf as gJ,
41510
41492
  yy as gK,
41511
- Nn as gL,
41493
+ Un as gL,
41512
41494
  Sr as gM,
41513
41495
  _o as gN,
41514
41496
  Ti as gO,
41515
41497
  _y as gP,
41516
41498
  tn as gQ,
41517
- In as gR,
41499
+ En as gR,
41518
41500
  ix as gS,
41519
41501
  sx as gT,
41520
41502
  Or as gU,
@@ -41537,7 +41519,7 @@ export {
41537
41519
  Eo as gk,
41538
41520
  en as gl,
41539
41521
  uf as gm,
41540
- Vn as gn,
41522
+ Wn as gn,
41541
41523
  Pr as go,
41542
41524
  fl as gp,
41543
41525
  my as gq,
@@ -41567,7 +41549,7 @@ export {
41567
41549
  tt as hC,
41568
41550
  bt as hD,
41569
41551
  ir as hE,
41570
- Hn as hF,
41552
+ Vn as hF,
41571
41553
  Xa as hG,
41572
41554
  Fo as hH,
41573
41555
  Cy as hI,
@@ -41603,16 +41585,16 @@ export {
41603
41585
  Bg as hl,
41604
41586
  Pw as hm,
41605
41587
  Ow as hn,
41606
- Zt as ho,
41588
+ Jt as ho,
41607
41589
  Sf as hp,
41608
- ei as hq,
41590
+ ti as hq,
41609
41591
  gl as hr,
41610
41592
  vh as hs,
41611
41593
  wt as ht,
41612
41594
  Dr as hu,
41613
41595
  Cr as hv,
41614
41596
  jo as hw,
41615
- Dn as hx,
41597
+ In as hx,
41616
41598
  is as hy,
41617
41599
  sy as hz,
41618
41600
  kv as i,