@needle-tools/engine 4.16.8 → 4.16.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { Vector2 as Z, Vector3 as _, Vector4 as ge, Quaternion as V, PlaneGeometry as Cn, WebGLRenderer as Fr, PerspectiveCamera as de, OrthographicCamera as fu, Scene as Xi, Mesh as H, Texture as xe, Uniform$1 as Hi, Color as re, ShaderMaterial as qn, Box3 as zt, ShadowMaterial as pv, Euler as ct, MeshStandardMaterial as pt, Box3Helper as oS, GridHelper as mv, Object3D as M, Material as be, Matrix3 as gv, Matrix4 as ee, Layers as Co, Ray as Ts, MathUtils as Cs, AxesHelper as Pi, MeshBasicMaterial as Se, DoubleSide as Oi, BufferGeometry as _n, Group as Ps, CylinderGeometry as yv, SphereGeometry as pu, BoxGeometry as Fa, SpriteMaterial as rS, Sprite as aS, Shape as lS, ExtrudeGeometry as cS, Fog as _v, DirectionalLight as Np, PointLight as Ym, TextureLoader as Or, EdgesGeometry as hS, LineSegments as bv, LineBasicMaterial as Km, Line as za, BufferAttribute as mt, Raycaster as mu, Sphere as gu, ArrayCamera as dS, Plane as Mr, SkinnedMesh as _o, InterleavedBufferAttribute as vv, Skeleton as uS, Bone as fS, WebGLCubeRenderTarget as pS, CubeCamera as mS, AnimationClip as ki, FileLoader as Zm, PropertyBinding as Ua, KeyframeTrack as gS, LinearSRGBColorSpace as As, ShaderChunk as Jt, DataTexture as Jm, RGBAFormat as yu, EquirectangularReflectionMapping as ks, SRGBColorSpace as Is, Clock as yS, NeutralToneMapping as Na, AgXToneMapping as _u, ACESFilmicToneMapping as bu, NoToneMapping as Rd, PCFSoftShadowMap$1 as _S, BasicNodeLibrary as bS, WebGLRenderTarget as Xn, DepthTexture as wv, NearestFilter as Td, LoopRepeat as vS, LoopOnce as $p, AnimationMixer as eg, CompressedTexture as wS, FrontSide as Po, Camera as xS, Frustum as Ny, AudioListener as SS, PositionalAudio as CS, AudioLoader as Wp, EventDispatcher as tg, BackSide as vu, MeshDepthMaterial as PS, CustomBlending as kS, MaxEquation as OS, AlwaysStencilFunc as MS, GreaterEqualStencilFunc as ES, NotEqualStencilFunc as RS, GreaterStencilFunc as TS, LessEqualStencilFunc as AS, EqualStencilFunc as IS, LessStencilFunc as LS, NeverStencilFunc as $y, InvertStencilOp as DS, DecrementWrapStencilOp as jS, IncrementWrapStencilOp as BS, DecrementStencilOp as FS, IncrementStencilOp as zS, ReplaceStencilOp as US, ZeroStencilOp as NS, KeepStencilOp as $S, CubeUVReflectionMapping as xv, CubeTexture as Sv, AmbientLight as WS, HemisphereLight as VS, Loader as HS, RawShaderMaterial as Cv, GLSL3 as GS, AlwaysDepth as qS, GreaterEqualDepth as XS, GreaterDepth as QS, LessEqualDepth as YS, LessDepth as KS, NotEqualDepth as ZS, EqualDepth as JS, BatchedMesh as Wy, LinearFilter as Ad, UnsignedByteType as eC, MeshPhysicalMaterial as Vy, RingGeometry as tC, Line3 as iC, AdditiveBlending as Pv, BoxHelper as nC, SpotLight as sC, DirectionalLightHelper as oC, CameraHelper as rC, LOD as aC, Triangle as lC, NormalBlending as cC, ReinhardToneMapping as ig, LinearToneMapping as ng, HalfFloatType as Mf, VideoTexture as hC, CompressedCubeTexture as dC, EquirectangularRefractionMapping as uC, CatmullRomCurve3 as fC, VectorKeyframeTrack as pC, QuaternionKeyframeTrack as mC, Audio as gC, ShaderLib as Id, UniformsUtils as kv, MirroredRepeatWrapping as Hy, MeshNormalMaterial as yC, AudioContext as _C, PMREMGenerator$1 as bC } from "./three.js";
2
- import { createLoaders as sg, getRaycastMesh as Ov, LODsManager as Zo, NEEDLE_progressive as We, addDracoAndKTX2Loaders as vC, configureLoader as wC, setKTX2TranscoderLocation as xC, setDracoDecoderLocation as SC } from "./gltf-progressive-CzxjNmG6.js";
1
+ import { Vector2 as Z, Vector3 as _, Vector4 as ge, Quaternion as V, PlaneGeometry as Cn, WebGLRenderer as Fr, PerspectiveCamera as de, OrthographicCamera as fu, Scene as Xi, Mesh as H, Texture as xe, Uniform$1 as Hi, Color as re, ShaderMaterial as qn, Box3 as zt, ShadowMaterial as pv, Euler as ct, MeshStandardMaterial as pt, Box3Helper as oS, GridHelper as mv, Object3D as M, Material as be, Matrix3 as gv, Matrix4 as ee, Layers as Po, Ray as Ts, MathUtils as Cs, AxesHelper as Pi, MeshBasicMaterial as Se, DoubleSide as Oi, BufferGeometry as _n, Group as Ps, CylinderGeometry as yv, SphereGeometry as pu, BoxGeometry as Fa, SpriteMaterial as rS, Sprite as aS, Shape as lS, ExtrudeGeometry as cS, Fog as _v, DirectionalLight as Np, PointLight as Ym, TextureLoader as Or, EdgesGeometry as hS, LineSegments as bv, LineBasicMaterial as Km, Line as za, BufferAttribute as mt, Raycaster as mu, Sphere as gu, ArrayCamera as dS, Plane as Mr, SkinnedMesh as bo, InterleavedBufferAttribute as vv, Skeleton as uS, Bone as fS, WebGLCubeRenderTarget as pS, CubeCamera as mS, AnimationClip as ki, FileLoader as Zm, PropertyBinding as Ua, KeyframeTrack as gS, LinearSRGBColorSpace as As, ShaderChunk as Jt, DataTexture as Jm, RGBAFormat as yu, EquirectangularReflectionMapping as ks, SRGBColorSpace as Is, Clock as yS, NeutralToneMapping as Na, AgXToneMapping as _u, ACESFilmicToneMapping as bu, NoToneMapping as Rd, PCFSoftShadowMap$1 as _S, BasicNodeLibrary as bS, WebGLRenderTarget as Xn, DepthTexture as wv, NearestFilter as Td, LoopRepeat as vS, LoopOnce as $p, AnimationMixer as eg, CompressedTexture as wS, FrontSide as ko, Camera as xS, Frustum as Ny, AudioListener as SS, PositionalAudio as CS, AudioLoader as Wp, EventDispatcher as tg, BackSide as vu, MeshDepthMaterial as PS, CustomBlending as kS, MaxEquation as OS, AlwaysStencilFunc as MS, GreaterEqualStencilFunc as ES, NotEqualStencilFunc as RS, GreaterStencilFunc as TS, LessEqualStencilFunc as AS, EqualStencilFunc as IS, LessStencilFunc as LS, NeverStencilFunc as $y, InvertStencilOp as DS, DecrementWrapStencilOp as jS, IncrementWrapStencilOp as BS, DecrementStencilOp as FS, IncrementStencilOp as zS, ReplaceStencilOp as US, ZeroStencilOp as NS, KeepStencilOp as $S, CubeUVReflectionMapping as xv, CubeTexture as Sv, AmbientLight as WS, HemisphereLight as VS, Loader as HS, RawShaderMaterial as Cv, GLSL3 as GS, AlwaysDepth as qS, GreaterEqualDepth as XS, GreaterDepth as QS, LessEqualDepth as YS, LessDepth as KS, NotEqualDepth as ZS, EqualDepth as JS, BatchedMesh as Wy, LinearFilter as Ad, UnsignedByteType as eC, MeshPhysicalMaterial as Vy, RingGeometry as tC, Line3 as iC, AdditiveBlending as Pv, BoxHelper as nC, SpotLight as sC, DirectionalLightHelper as oC, CameraHelper as rC, LOD as aC, Triangle as lC, NormalBlending as cC, ReinhardToneMapping as ig, LinearToneMapping as ng, HalfFloatType as Mf, VideoTexture as hC, CompressedCubeTexture as dC, EquirectangularRefractionMapping as uC, CatmullRomCurve3 as fC, VectorKeyframeTrack as pC, QuaternionKeyframeTrack as mC, Audio as gC, ShaderLib as Id, UniformsUtils as kv, MirroredRepeatWrapping as Hy, MeshNormalMaterial as yC, AudioContext as _C, PMREMGenerator$1 as bC } from "./three.js";
2
+ import { createLoaders as sg, getRaycastMesh as Ov, LODsManager as Jo, NEEDLE_progressive as We, addDracoAndKTX2Loaders as vC, configureLoader as wC, setKTX2TranscoderLocation as xC, setDracoDecoderLocation as SC } from "./gltf-progressive-CzxjNmG6.js";
3
3
  import { GroundedSkybox as $a, Font as CC, TextGeometry as PC, FontLoader as kC, GLTFLoader as Ls, TransformControlsGizmo as Mv, EXRLoader as og, RGBELoader as Ev, Stats as OC, nodeFrame as Gy, OrbitControls as MC, PositionalAudioHelper as EC, HorizontalBlurShader as RC, VerticalBlurShader as TC, GLTFExporter as Rv, strToU8 as Tv, zipSync as AC, XRControllerModelFactory as IC, XRHandMeshModel as LC, Line2 as DC, LineGeometry as jC, LineMaterial as BC, TransformControls as FC, InteractiveGroup as zC, HTMLMesh as UC, VertexNormalsHelper as NC, OBJLoader as rg, FBXLoader as Av, mergeVertices as $C } from "./three-examples.js";
4
4
  import { fetchProfile as WC, MotionController as VC, $70d766613f57b014$export$2e2bcd8739ae039 as qy, ByteBuffer as HC, v5 as Xy, md5 as Qy, SIZE_PREFIX_LENGTH as Iv, Builder as ag, createNoise4D as GC, Matrix4 as Ef, BatchedParticleRenderer as qC, ParticleSystem as XC, RenderMode as ps, ConstantColor as QC, Vector4 as YC, ConstantValue as KC, TrailParticle as Yy, WorkerBase as ZC, MeshBVH as JC } from "./vendor-BsRxp-FT.js";
5
5
  import { __webpack_exports__default as Pe, __webpack_exports__Text as Lv, __webpack_exports__Block as Dv, __webpack_exports__update as e1, SimpleStateBehavior as t1, __webpack_exports__Inline as Rf, __webpack_exports__FontLibrary as Ky, ThreeMeshUI as Zy } from "./three-mesh-ui-B-lqrZWj.js";
@@ -203,7 +203,7 @@ function xu(s, e) {
203
203
  }
204
204
  return s;
205
205
  }
206
- function ko(s) {
206
+ function Oo(s) {
207
207
  return new Promise((e, t) => {
208
208
  setTimeout(e, s);
209
209
  });
@@ -222,9 +222,9 @@ function lg(s, e) {
222
222
  }
223
223
  const kh = x("debugresolveurl"), l1 = "rel:";
224
224
  function cD(s, e) {
225
- return Eo(s, e);
225
+ return Ro(s, e);
226
226
  }
227
- function Eo(s, e) {
227
+ function Ro(s, e) {
228
228
  if (e === void 0)
229
229
  return kh && console.warn("getPath: uri is undefined, returning uri", e), e;
230
230
  if (e.startsWith("./"))
@@ -293,12 +293,12 @@ class h1 {
293
293
  this.revoke(), this.writeCallbacks.length = 0, this._object = null;
294
294
  }
295
295
  }
296
- class bo {
296
+ class vo {
297
297
  _watches = [];
298
298
  constructor(e, t) {
299
299
  if (Array.isArray(t))
300
300
  for (const i of t)
301
- this._watches.push(new bo(e, i));
301
+ this._watches.push(new vo(e, i));
302
302
  else
303
303
  this._watches.push(new h1(e, t));
304
304
  }
@@ -328,11 +328,11 @@ const ha = /* @__PURE__ */ Symbol("needle:watches");
328
328
  function cg(s, e) {
329
329
  if (!s[ha])
330
330
  if (s instanceof Z)
331
- s[ha] = new bo(s, ["x", "y"]);
331
+ s[ha] = new vo(s, ["x", "y"]);
332
332
  else if (s instanceof _)
333
- s[ha] = new bo(s, ["x", "y", "z"]);
333
+ s[ha] = new vo(s, ["x", "y", "z"]);
334
334
  else if (s instanceof ge || s instanceof V)
335
- s[ha] = new bo(s, ["x", "y", "z", "w"]);
335
+ s[ha] = new vo(s, ["x", "y", "z", "w"]);
336
336
  else
337
337
  return !1;
338
338
  return s[ha].subscribeWrite(e), !0;
@@ -483,31 +483,31 @@ function bD() {
483
483
  async function vD() {
484
484
  return D.microphonePermissionsGranted();
485
485
  }
486
- const fo = /* @__PURE__ */ new WeakMap();
486
+ const po = /* @__PURE__ */ new WeakMap();
487
487
  function Fv(s, e, t) {
488
- if (!fo.get(s)) {
488
+ if (!po.get(s)) {
489
489
  const n = new MutationObserver((o) => {
490
490
  d1(s, o);
491
491
  });
492
- fo.set(s, {
492
+ po.set(s, {
493
493
  observer: n,
494
494
  attributeChangedListeners: /* @__PURE__ */ new Map()
495
495
  }), n.observe(s, { attributes: !0 });
496
496
  }
497
- const i = fo.get(s).attributeChangedListeners;
497
+ const i = po.get(s).attributeChangedListeners;
498
498
  return i.has(e) || i.set(e, []), i.get(e).push(t), () => {
499
499
  zv(s, e, t);
500
500
  };
501
501
  }
502
502
  function zv(s, e, t) {
503
- if (!fo.get(s)) return;
504
- const i = fo.get(s).attributeChangedListeners;
503
+ if (!po.get(s)) return;
504
+ const i = po.get(s).attributeChangedListeners;
505
505
  if (!i.has(e)) return;
506
506
  const n = i.get(e), o = n.indexOf(t);
507
- o !== -1 && (n.splice(o, 1), n.length <= 0 && (i.delete(e), fo.get(s)?.observer.disconnect(), fo.delete(s)));
507
+ o !== -1 && (n.splice(o, 1), n.length <= 0 && (i.delete(e), po.get(s)?.observer.disconnect(), po.delete(s)));
508
508
  }
509
509
  function d1(s, e) {
510
- const t = fo.get(s).attributeChangedListeners;
510
+ const t = po.get(s).attributeChangedListeners;
511
511
  for (const i of e)
512
512
  if (i.type === "attributes") {
513
513
  const n = i.attributeName, o = s.getAttribute(n);
@@ -1571,7 +1571,7 @@ function Zv(s, ...e) {
1571
1571
  if (o instanceof be || o instanceof xe) return o.name;
1572
1572
  if (o instanceof gv) return `[${o.elements.join(", ")}]`;
1573
1573
  if (o instanceof ee) return `[${o.elements.join(", ")}]`;
1574
- if (o instanceof Co) return o.mask.toString();
1574
+ if (o instanceof Po) return o.mask.toString();
1575
1575
  if (typeof o == "object") {
1576
1576
  if (Tl.has(o)) return "*";
1577
1577
  let a = `{
@@ -1621,7 +1621,7 @@ function L() {
1621
1621
  function ED(s) {
1622
1622
  Qp = s;
1623
1623
  }
1624
- let li, Jo = null, Wn = null, Al = !1, p_ = null;
1624
+ let li, er = null, Wn = null, Al = !1, p_ = null;
1625
1625
  const Jv = "terminal", Z1 = x("console");
1626
1626
  Z1 && e0();
1627
1627
  const J1 = /* @__PURE__ */ Symbol("consoleParent");
@@ -1663,7 +1663,7 @@ function oP(s = !1) {
1663
1663
  pluginOrder: ["default", "needle-console"]
1664
1664
  });
1665
1665
  const t = globalThis["needle:codegen_files"];
1666
- if (t && t.length > 0 && li.addPlugin(rP()), li.addPlugin(hP()), li.addPlugin(dP()), Jo = xP(), Jo && (Jo[J1] = Jo.parentElement, Jo.style.position = "absolute", Jo.style.zIndex = Number.MAX_SAFE_INTEGER.toString()), li.setSwitchPosition(20, 30), Wn = wP(), Wn) {
1666
+ if (t && t.length > 0 && li.addPlugin(rP()), li.addPlugin(hP()), li.addPlugin(dP()), er = xP(), er && (er[J1] = er.parentElement, er.style.position = "absolute", er.style.zIndex = Number.MAX_SAFE_INTEGER.toString()), li.setSwitchPosition(20, 30), Wn = wP(), Wn) {
1667
1667
  Wn.innerText = Jv, Wn.addEventListener("click", sP);
1668
1668
  const i = document.createElement("style"), n = 40;
1669
1669
  i.innerHTML = `
@@ -1725,7 +1725,7 @@ function oP(s = !1) {
1725
1725
  #__vconsole .vc-mask {
1726
1726
  overflow: hidden;
1727
1727
  }
1728
- `, Jo?.prepend(i), s === !0 && Nv() <= 0 && eP(), console.log("🌵 Debug console has loaded");
1728
+ `, er?.prepend(i), s === !0 && Nv() <= 0 && eP(), console.log("🌵 Debug console has loaded");
1729
1729
  }
1730
1730
  }, e.onerror = () => {
1731
1731
  console.warn("🌵 Debug console failed to load." + (window.crossOriginIsolated ? "This page is using cross-origin isolation, so external scripts can't be loaded." : "")), Al = !1, li = null;
@@ -1772,7 +1772,7 @@ function rP() {
1772
1772
  }), t(i);
1773
1773
  }), s;
1774
1774
  }
1775
- const Yp = "padding: 10px; font-family: monospace;", g_ = "margin-bottom: 10px;", er = "margin-bottom: 10px; margin-top: 15px;", aP = "width: 100%; border-collapse: collapse; border: 1px solid rgba(0,0,0,0.1); table-layout: fixed;", t0 = "border: 1px solid rgba(0,0,0,0.1); padding: 5px;", lP = t0, cP = t0 + " word-break: break-all;";
1775
+ const Yp = "padding: 10px; font-family: monospace;", g_ = "margin-bottom: 10px;", tr = "margin-bottom: 10px; margin-top: 15px;", aP = "width: 100%; border-collapse: collapse; border: 1px solid rgba(0,0,0,0.1); table-layout: fixed;", t0 = "border: 1px solid rgba(0,0,0,0.1); padding: 5px;", lP = t0, cP = t0 + " word-break: break-all;";
1776
1776
  function Bn(s, e = !1) {
1777
1777
  e && s.sort((i, n) => (n.value ? 1 : 0) - (i.value ? 1 : 0));
1778
1778
  let t = `<table style='${aP}'>`;
@@ -1836,19 +1836,19 @@ function dP() {
1836
1836
  return s.on("renderTab", async function(e) {
1837
1837
  let t = `<div style='${Yp}'>`;
1838
1838
  const i = uP();
1839
- i.length > 0 && (t += `<h3 style='${er}'>General GPU Info</h3>`, t += Bn(i, !1));
1839
+ i.length > 0 && (t += `<h3 style='${tr}'>General GPU Info</h3>`, t += Bn(i, !1));
1840
1840
  const n = pP();
1841
- n.length > 0 && (t += `<h3 style='${er}'>WebGL</h3>`, t += Bn(n, !1));
1841
+ n.length > 0 && (t += `<h3 style='${tr}'>WebGL</h3>`, t += Bn(n, !1));
1842
1842
  const o = mP();
1843
- o.length > 0 && (t += `<h3 style='${er}'>WebGL 2 Features</h3>`, t += Bn(o, !1));
1843
+ o.length > 0 && (t += `<h3 style='${tr}'>WebGL 2 Features</h3>`, t += Bn(o, !1));
1844
1844
  const r = gP();
1845
- r.length > 0 && (t += `<h3 style='${er}'>WebGL Limits</h3>`, t += Bn(r, !1));
1845
+ r.length > 0 && (t += `<h3 style='${tr}'>WebGL Limits</h3>`, t += Bn(r, !1));
1846
1846
  const a = yP();
1847
- a.length > 0 && (t += `<h3 style='${er}'>Texture Formats</h3>`, t += Bn(a, !1));
1847
+ a.length > 0 && (t += `<h3 style='${tr}'>Texture Formats</h3>`, t += Bn(a, !1));
1848
1848
  const l = await _P();
1849
- if (l.length > 0 && (t += `<h3 style='${er}'>WebGPU</h3>`, t += Bn(l, !1)), D.isSafari()) {
1849
+ if (l.length > 0 && (t += `<h3 style='${tr}'>WebGPU</h3>`, t += Bn(l, !1)), D.isSafari()) {
1850
1850
  const c = bP();
1851
- c.length > 0 && (t += `<h3 style='${er}'>Safari GPU Info</h3>`, t += Bn(c, !1));
1851
+ c.length > 0 && (t += `<h3 style='${tr}'>Safari GPU Info</h3>`, t += Bn(c, !1));
1852
1852
  }
1853
1853
  t += "</div>", e(t);
1854
1854
  }), s;
@@ -1982,19 +1982,19 @@ function xP() {
1982
1982
  return s || null;
1983
1983
  }
1984
1984
  const s0 = x("debugdefines");
1985
- Ro('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"] = "0.0.0";');
1986
- Ro('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";');
1987
- Ro('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";');
1988
- Ro('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
1989
- Ro('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.16.8";');
1990
- Ro('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
1991
- Ro('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Tue Apr 28 2026 06:47:45 GMT+0000 (Coordinated Universal Time)";');
1992
- Ro('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
1993
- const qi = "4.16.8", Tc = "undefined", Fd = "Tue Apr 28 2026 06:47:45 GMT+0000 (Coordinated Universal Time)";
1985
+ To('if(!globalThis["NEEDLE_ENGINE_VERSION"]) globalThis["NEEDLE_ENGINE_VERSION"] = "0.0.0";');
1986
+ To('if(!globalThis["NEEDLE_ENGINE_GENERATOR"]) globalThis["NEEDLE_ENGINE_GENERATOR"] = "unknown";');
1987
+ To('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUILD_TIME"] = "unknown";');
1988
+ To('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
1989
+ To('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.16.9";');
1990
+ To('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
1991
+ To('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Wed Apr 29 2026 10:42:45 GMT+0000 (Coordinated Universal Time)";');
1992
+ To('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
1993
+ const qi = "4.16.9", Tc = "undefined", Fd = "Wed Apr 29 2026 10:42:45 GMT+0000 (Coordinated Universal Time)";
1994
1994
  s0 && console.log(`Engine version: ${qi} (generator: ${Tc})
1995
1995
  Project built at ${Fd}`);
1996
1996
  const gr = NEEDLE_PUBLIC_KEY, vs = "needle_isActiveInHierarchy", da = "builtin_components", hd = "needle_editor_guid";
1997
- function Ro(s) {
1997
+ function To(s) {
1998
1998
  try {
1999
1999
  (0, eval)(s);
2000
2000
  } catch (e) {
@@ -2267,7 +2267,7 @@ function AP(s) {
2267
2267
  }
2268
2268
  const Ge = x("debuginput");
2269
2269
  var yg = /* @__PURE__ */ ((s) => (s.Mouse = "mouse", s.Touch = "touch", s.Controller = "controller", s.Hand = "hand", s))(yg || {}), Be = /* @__PURE__ */ ((s) => (s.PointerDown = "pointerdown", s.PointerUp = "pointerup", s.PointerMove = "pointermove", s.KeyDown = "keydown", s.KeyUp = "keyup", s.KeyPressed = "keypress", s))(Be || {});
2270
- class io extends PointerEvent {
2270
+ class no extends PointerEvent {
2271
2271
  /**
2272
2272
  * Spatial input data
2273
2273
  */
@@ -2428,7 +2428,7 @@ class IP {
2428
2428
  r.options.once && (n.listeners.splice(o, 1), o--), r.callback(e);
2429
2429
  }
2430
2430
  }
2431
- if (e instanceof io) {
2431
+ if (e instanceof no) {
2432
2432
  const i = this._eventListeners[e.type];
2433
2433
  if (i)
2434
2434
  for (const n of i) {
@@ -2860,7 +2860,7 @@ class IP {
2860
2860
  e.target instanceof HTMLElement && e.target.setPointerCapture(e.pointerId);
2861
2861
  const t = this.getPointerId(e);
2862
2862
  Ge && Ie(`pointer down #${t}, identifier:${e.pointerId}`);
2863
- const i = this.getAndUpdateSpatialObjectForScreenPosition(t, e.clientX, e.clientY), n = new io("pointerdown", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: t, button: e.button, clientX: e.clientX, clientY: e.clientY, pointerType: e.pointerType, buttonName: this.getButtonName(e), device: i, pressure: e.pressure });
2863
+ const i = this.getAndUpdateSpatialObjectForScreenPosition(t, e.clientX, e.clientY), n = new no("pointerdown", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: t, button: e.button, clientX: e.clientX, clientY: e.clientY, pointerType: e.pointerType, buttonName: this.getButtonName(e), device: i, pressure: e.pressure });
2864
2864
  this.onDown(n);
2865
2865
  };
2866
2866
  onPointerMove = (e) => {
@@ -2870,7 +2870,7 @@ class IP {
2870
2870
  e.pointerType === "mouse" && (t = this.getFirstPressedButtonForPointer(0) ?? 0);
2871
2871
  const i = this.getPointerId(e, t);
2872
2872
  t === -1 && (t = i);
2873
- const n = this.getAndUpdateSpatialObjectForScreenPosition(i, e.clientX, e.clientY), o = new io("pointermove", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: i, button: t, clientX: e.clientX, clientY: e.clientY, pointerType: e.pointerType, buttonName: this.getButtonName(e), device: n, pressure: e.pressure });
2873
+ const n = this.getAndUpdateSpatialObjectForScreenPosition(i, e.clientX, e.clientY), o = new no("pointermove", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: i, button: t, clientX: e.clientX, clientY: e.clientY, pointerType: e.pointerType, buttonName: this.getButtonName(e), device: n, pressure: e.pressure });
2874
2874
  this.onMove(o);
2875
2875
  };
2876
2876
  onPointerCancel = (e) => {
@@ -2879,7 +2879,7 @@ class IP {
2879
2879
  onPointerUp = (e) => {
2880
2880
  if (this.context.isInAR) return;
2881
2881
  e.target instanceof HTMLElement && e.target.releasePointerCapture(e.pointerId);
2882
- const t = this.getPointerId(e), i = new io("pointerup", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: t, button: e.button, clientX: e.clientX, clientY: e.clientY, pointerType: e.pointerType, buttonName: this.getButtonName(e), device: this.getAndUpdateSpatialObjectForScreenPosition(t, e.clientX, e.clientY), pressure: e.pressure });
2882
+ const t = this.getPointerId(e), i = new no("pointerup", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: t, button: e.button, clientX: e.clientX, clientY: e.clientY, pointerType: e.pointerType, buttonName: this.getButtonName(e), device: this.getAndUpdateSpatialObjectForScreenPosition(t, e.clientX, e.clientY), pressure: e.pressure });
2883
2883
  this.onUp(i), this._pointerIds[t] = -1, Ge && console.log("ID=" + t, "PointerId=" + e.pointerId, "ALL:", [...this._pointerIds]);
2884
2884
  };
2885
2885
  getPointerId(e, t) {
@@ -2902,21 +2902,21 @@ class IP {
2902
2902
  onTouchStart = (e) => {
2903
2903
  if (this.context.isInAR)
2904
2904
  for (let t = 0; t < e.changedTouches.length; t++) {
2905
- const i = e.changedTouches[t], n = this.getPointerIndex(i.identifier), o = this.getAndUpdateSpatialObjectForScreenPosition(n, i.clientX, i.clientY), r = new io("pointerdown", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: n, button: 0, clientX: i.clientX, clientY: i.clientY, pointerType: "touch", buttonName: "unknown", device: o, pressure: i.force });
2905
+ const i = e.changedTouches[t], n = this.getPointerIndex(i.identifier), o = this.getAndUpdateSpatialObjectForScreenPosition(n, i.clientX, i.clientY), r = new no("pointerdown", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: n, button: 0, clientX: i.clientX, clientY: i.clientY, pointerType: "touch", buttonName: "unknown", device: o, pressure: i.force });
2906
2906
  this.onDown(r);
2907
2907
  }
2908
2908
  };
2909
2909
  onTouchMove = (e) => {
2910
2910
  if (this.context.isInAR)
2911
2911
  for (let t = 0; t < e.changedTouches.length; t++) {
2912
- const i = e.changedTouches[t], n = this.getPointerIndex(i.identifier), o = this.getAndUpdateSpatialObjectForScreenPosition(n, i.clientX, i.clientY), r = new io("pointermove", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: n, button: 0, clientX: i.clientX, clientY: i.clientY, pointerType: "touch", buttonName: "unknown", device: o, pressure: i.force });
2912
+ const i = e.changedTouches[t], n = this.getPointerIndex(i.identifier), o = this.getAndUpdateSpatialObjectForScreenPosition(n, i.clientX, i.clientY), r = new no("pointermove", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: n, button: 0, clientX: i.clientX, clientY: i.clientY, pointerType: "touch", buttonName: "unknown", device: o, pressure: i.force });
2913
2913
  this.onMove(r);
2914
2914
  }
2915
2915
  };
2916
2916
  onTouchEnd = (e) => {
2917
2917
  if (this.context.isInAR)
2918
2918
  for (let t = 0; t < e.changedTouches.length; t++) {
2919
- const i = e.changedTouches[t], n = this.getPointerIndex(i.identifier), o = new io("pointerup", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: n, button: 0, clientX: i.clientX, clientY: i.clientY, pointerType: "touch", buttonName: "unknown", device: this.getAndUpdateSpatialObjectForScreenPosition(n, i.clientX, i.clientY), pressure: i.force });
2919
+ const i = e.changedTouches[t], n = this.getPointerIndex(i.identifier), o = new no("pointerup", e, { origin: this, mode: "screen", deviceIndex: 0, pointerId: n, button: 0, clientX: i.clientX, clientY: i.clientY, pointerType: "touch", buttonName: "unknown", device: this.getAndUpdateSpatialObjectForScreenPosition(n, i.clientX, i.clientY), pressure: i.force });
2920
2920
  this.onUp(o), this._pointerIds[n] = -1;
2921
2921
  }
2922
2922
  };
@@ -3655,7 +3655,7 @@ Layout: `;
3655
3655
  if (this.xr.mode === "immersive-vr" || this.xr.isPassThrough) {
3656
3656
  this.pointerInit.origin = this, this.pointerInit.pointerId = this.getPointerId(t), this.pointerInit.pointerType = this.hand ? "hand" : "controller", this.pointerInit.button = t, this.pointerInit.buttonName = i, this.pointerInit.isPrimary = n, this.pointerInit.mode = this.inputSource.targetRayMode, this.pointerInit.ray = this.ray, this.pointerInit.device = this.object, this.pointerInit.pressure = r, 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;
3657
3657
  const a = N.Current;
3658
- N.Current = this.xr.context, as && e !== "pointermove" && console.warn("Pointer event", e, t, i, { ...this.pointerInit }), this.xr.context.input.createInputEvent(new io(e, o, this.pointerInit)), N.Current = a;
3658
+ N.Current = this.xr.context, as && e !== "pointermove" && console.warn("Pointer event", e, t, i, { ...this.pointerInit }), this.xr.context.input.createInputEvent(new no(e, o, this.pointerInit)), N.Current = a;
3659
3659
  }
3660
3660
  }
3661
3661
  }
@@ -3790,7 +3790,7 @@ or by using the once option like onStart(()=>{}, { once:true }).
3790
3790
  See https://engine.needle.tools/docs/scripting.html#special-lifecycle-hooks for more information.`));
3791
3791
  }
3792
3792
  }
3793
- function To(s, e) {
3793
+ function Ao(s, e) {
3794
3794
  const t = va.get(e);
3795
3795
  if (t) {
3796
3796
  for (let n = 0; n < t.length; n++)
@@ -4857,7 +4857,7 @@ class qa {
4857
4857
  return this._active ? this._active.handoff() : null;
4858
4858
  }
4859
4859
  static async stop() {
4860
- this._requestInFlight = !1, this._active && (await this._active.end(), await ko(100)), this._active = null;
4860
+ this._requestInFlight = !1, this._active && (await this._active.end(), await Oo(100)), this._active = null;
4861
4861
  }
4862
4862
  _session;
4863
4863
  _mode;
@@ -4923,7 +4923,7 @@ class qa {
4923
4923
  }
4924
4924
  /** can be used to prepare the user or fade to black */
4925
4925
  async onBeforeHandoff() {
4926
- await ko(1e3), this._scene.clear();
4926
+ await Oo(1e3), this._scene.clear();
4927
4927
  }
4928
4928
  setupScene() {
4929
4929
  this._scene.background = new re(0);
@@ -5671,7 +5671,7 @@ class K {
5671
5671
  action: "session_end",
5672
5672
  mode: this.mode,
5673
5673
  source: "NeedleXRSession.onEnd"
5674
- }), ck(), this.onAfterRender(), this.revertCustomForward(), this._didStart = !1, this._previousCameraParent = null, this.requestedCameraNearPlane = null, To(this.onBefore, Ce.LateUpdate);
5674
+ }), ck(), this.onAfterRender(), this.revertCustomForward(), this._didStart = !1, this._previousCameraParent = null, this.requestedCameraNearPlane = null, Ao(this.onBefore, Ce.LateUpdate);
5675
5675
  const t = this.context.pre_render_callbacks.indexOf(this.onBeforeRender);
5676
5676
  t >= 0 && this.context.pre_render_callbacks.splice(t, 1);
5677
5677
  const i = this.context.post_render_callbacks.indexOf(this.onAfterRender);
@@ -6381,7 +6381,7 @@ class Bi {
6381
6381
  }
6382
6382
  }
6383
6383
  }
6384
- const Kt = x("debugphysics"), mk = x("debugworker"), L_ = new Co();
6384
+ const Kt = x("debugphysics"), mk = x("debugworker"), L_ = new Po();
6385
6385
  class Nr {
6386
6386
  static AllLayers = 4294967295;
6387
6387
  ray;
@@ -6408,7 +6408,7 @@ class Nr {
6408
6408
  }
6409
6409
  /** sets the layer.mask value directly, use setLayer if you want to set e.g. an individual layer only active. See https://threejs.org/docs/#api/en/core/Layers for more information about layers */
6410
6410
  setMask(e) {
6411
- this.layerMask || (this.layerMask = new Co());
6411
+ this.layerMask || (this.layerMask = new Po());
6412
6412
  const t = this.layerMask;
6413
6413
  t ? t.mask = e : this.layerMask = e;
6414
6414
  }
@@ -6458,7 +6458,7 @@ class Lc {
6458
6458
  Sprite: {}
6459
6459
  };
6460
6460
  sphereResults = new Array();
6461
- sphereMask = new Co();
6461
+ sphereMask = new Po();
6462
6462
  sphere = new gu();
6463
6463
  /** Test overlapping of a sphere with the threejs geometry. This does not use colliders. This does not return an exact intersection point (intersections returned contain the object and the world position of the object that is being hit)
6464
6464
  * For a more accurate test use the physics engine's collider overlap test (see sphereOverlapPhysics)
@@ -6503,7 +6503,7 @@ class Lc {
6503
6503
  let n = e.targets;
6504
6504
  n || (n = this.targetBuffer, n.length = 1, n[0] = this.context.scene);
6505
6505
  let o = e.results;
6506
- this.defaultRaycastOptions.results && (this.defaultRaycastOptions.results.length = 0), o || (this.defaultRaycastOptions.results || (this.defaultRaycastOptions.results = new Array()), o = this.defaultRaycastOptions.results), e.layerMask !== void 0 ? e.layerMask instanceof Co ? i.layers.mask = e.layerMask.mask : i.layers.mask = e.layerMask : (i.layers.enableAll(), i.layers.disable(2)), Kt && console.time("raycast"), o.length = 0, Lc._raycasting++, this.intersect(this.raycaster, n, o, e), o.sort((a, l) => a.distance - l.distance);
6506
+ this.defaultRaycastOptions.results && (this.defaultRaycastOptions.results.length = 0), o || (this.defaultRaycastOptions.results || (this.defaultRaycastOptions.results = new Array()), o = this.defaultRaycastOptions.results), e.layerMask !== void 0 ? e.layerMask instanceof Po ? i.layers.mask = e.layerMask.mask : i.layers.mask = e.layerMask : (i.layers.enableAll(), i.layers.disable(2)), Kt && console.time("raycast"), o.length = 0, Lc._raycasting++, this.intersect(this.raycaster, n, o, e), o.sort((a, l) => a.distance - l.distance);
6507
6507
  const r = e.ignore;
6508
6508
  return r !== void 0 && r.length > 0 && (o = o.filter((a) => !r.includes(a.object))), Lc._raycasting--, Kt && (console.timeEnd("raycast"), console.warn("#" + this.context.time.frame + ", hits:", o?.length ? [...o] : "nothing"), performance.mark("raycast.end"), performance.measure("raycast", "raycast.start", "raycast.end")), o;
6509
6509
  }
@@ -6572,7 +6572,7 @@ class Lc {
6572
6572
  function D_(s) {
6573
6573
  return !(s.index && s.index.array.length < 3);
6574
6574
  }
6575
- const tr = new gu(), Dh = new Mr(), gk = new gv();
6575
+ const ir = new gu(), Dh = new Mr(), gk = new gv();
6576
6576
  function yk(s, e, t) {
6577
6577
  const i = s._computeIntersections;
6578
6578
  if (!i)
@@ -6585,17 +6585,17 @@ function yk(s, e, t) {
6585
6585
  Dh.setFromNormalAndCoplanarPoint(U(0, 1, 0), U(0, -l.position.y, 0)), Dh.applyMatrix4(l.matrixWorld, gk);
6586
6586
  const d = o.ray.intersectPlane(Dh, U());
6587
6587
  if (d) {
6588
- tr.copy(c), tr.applyMatrix4(l.matrixWorld);
6589
- const p = U(d).sub(o.ray.origin).length(), g = tr.radius * 0.5;
6588
+ ir.copy(c), ir.applyMatrix4(l.matrixWorld);
6589
+ const p = U(d).sub(o.ray.origin).length(), g = ir.radius * 0.5;
6590
6590
  p < g && r.push({ distance: p, point: d, object: l, normal: Dh.normal.clone() });
6591
6591
  }
6592
6592
  return;
6593
6593
  }
6594
- tr.copy(c), tr.applyMatrix4(l.matrixWorld);
6595
- const h = o.ray.intersectSphere(tr, U());
6594
+ ir.copy(c), ir.applyMatrix4(l.matrixWorld);
6595
+ const h = o.ray.intersectSphere(ir, U());
6596
6596
  if (h) {
6597
6597
  const d = U(h).sub(o.ray.origin), f = d.length();
6598
- if (f > tr.radius) {
6598
+ if (f > ir.radius) {
6599
6599
  const p = d.clone().normalize();
6600
6600
  r.push({ distance: f, point: h, object: l, normal: p });
6601
6601
  }
@@ -6783,7 +6783,7 @@ function Ae(s) {
6783
6783
  }
6784
6784
  if (typeof s == "object" && (s[v0] = !0), s instanceof Xi)
6785
6785
  Ae(s.environment), Ae(s.background), Ae(s.customDepthMaterial), Ae(s.customDistanceMaterial);
6786
- else if (s instanceof _o)
6786
+ else if (s instanceof bo)
6787
6787
  Ae(s.geometry), Ae(s.material), Ae(s.skeleton), Ae(s.bindMatrix), Ae(s.bindMatrixInverse), Ae(s.customDepthMaterial), Ae(s.customDistanceMaterial), s.visible = !1;
6788
6788
  else if (s instanceof H)
6789
6789
  Ae(s.geometry), Ae(s.material), Ae(s.customDepthMaterial), Ae(s.customDistanceMaterial), s.visible = !1;
@@ -7842,7 +7842,7 @@ function ys(s, e) {
7842
7842
  }
7843
7843
  const V_ = /* @__PURE__ */ Symbol("DidPatchLayers");
7844
7844
  function tO() {
7845
- const s = Co.prototype;
7845
+ const s = Po.prototype;
7846
7846
  if (s[V_]) return;
7847
7847
  s[V_] = !0;
7848
7848
  const e = s.test;
@@ -8573,7 +8573,7 @@ var Ka;
8573
8573
  if (d?.abort?.aborted)
8574
8574
  return console.debug("Aborted upload"), null;
8575
8575
  const I = await v(b.upload);
8576
- I instanceof Error ? (k = I, await ko(1e3 * E)) : I.ok && (console.debug("File uploaded successfully"), T = !0);
8576
+ I instanceof Error ? (k = I, await Oo(1e3 * E)) : I.ok && (console.debug("File uploaded successfully"), T = !0);
8577
8577
  } catch (I) {
8578
8578
  console.error(I);
8579
8579
  }
@@ -8668,7 +8668,7 @@ class ne {
8668
8668
  throw new Error('Context is required when sourceId is a string. When you call this method from a component you can call it with "getOrCreate(this, url)" where "this" is the component.');
8669
8669
  } else
8670
8670
  i = e.context, e = e.sourceId;
8671
- const n = Eo(e, t);
8671
+ const n = Ro(e, t);
8672
8672
  qs && console.log("GetOrCreate Addressable from", e, t, "FinalPath=", n);
8673
8673
  const o = i.addressables, r = o.findAssetReference(n);
8674
8674
  if (r) return r;
@@ -8918,7 +8918,7 @@ class xO extends nn {
8918
8918
  }
8919
8919
  onDeserialize(e, t) {
8920
8920
  if (typeof e == "string") {
8921
- const i = Eo(t.gltfId, e);
8921
+ const i = Ro(t.gltfId, e);
8922
8922
  return Ta.getOrCreate(i);
8923
8923
  }
8924
8924
  }
@@ -8958,7 +8958,7 @@ class SO extends nn {
8958
8958
  }
8959
8959
  onDeserialize(e, t) {
8960
8960
  if (typeof e == "string") {
8961
- const i = Eo(t.gltfId, e);
8961
+ const i = Ro(t.gltfId, e);
8962
8962
  return Aa.getOrCreate(i);
8963
8963
  }
8964
8964
  }
@@ -9161,7 +9161,7 @@ class kO {
9161
9161
  ta && console.log("Load texture from gltf", c.pointer), h = Cg(this.parser, c.pointer).then((d) => this.resolveTexture(c, d));
9162
9162
  else if (typeof c.pointer == "string") {
9163
9163
  ta && console.log("Load texture from path", c.pointer);
9164
- const d = Eo(this.source, c.pointer);
9164
+ const d = Ro(this.source, c.pointer);
9165
9165
  let f;
9166
9166
  d.endsWith(".exr") ? f = new og(this.parser.options.manager) : d.endsWith(".hdr") ? f = new Ev(this.parser.options.manager) : f = new Or(this.parser.options.manager), h = f.loadAsync(d, void 0).then((p) => this.resolveTexture(c, p));
9167
9167
  } else c.pointer;
@@ -9243,7 +9243,7 @@ irradiance += getLightProbeIrradiance( lightProbe, geometry.normal );
9243
9243
  const Zf = x("debugprogressive"), jh = new zt(), Bh = new gu();
9244
9244
  class MO {
9245
9245
  /** The type of the @needle-tools/gltf-progressive LODsManager - can be used to set static settings */
9246
- static GLTF_PROGRESSIVE_LODSMANAGER_TYPE = Zo;
9246
+ static GLTF_PROGRESSIVE_LODSMANAGER_TYPE = Jo;
9247
9247
  context;
9248
9248
  _lodsManager;
9249
9249
  _settings = {};
@@ -9286,10 +9286,10 @@ class MO {
9286
9286
  }
9287
9287
  /** @internal */
9288
9288
  setRenderer(e) {
9289
- this._lodsManager?.disable(), Zo.removePlugin(this), Zo.addPlugin(this), Zo.debugDrawLine = z.DrawLine, this._lodsManager = Zo.get(e, { engine: "needle-engine" }), this.applySettings(), this._lodsManager.enable();
9289
+ this._lodsManager?.disable(), Jo.removePlugin(this), Jo.addPlugin(this), Jo.debugDrawLine = z.DrawLine, this._lodsManager = Jo.get(e, { engine: "needle-engine" }), this.applySettings(), this._lodsManager.enable();
9290
9290
  }
9291
9291
  disable() {
9292
- this._lodsManager?.disable(), Zo.removePlugin(this);
9292
+ this._lodsManager?.disable(), Jo.removePlugin(this);
9293
9293
  }
9294
9294
  /** @internal */
9295
9295
  onAfterUpdatedLOD(e, t, i, n, o) {
@@ -9297,7 +9297,7 @@ class MO {
9297
9297
  }
9298
9298
  onRenderDebug(e, t, i) {
9299
9299
  if (!t.geometry || !We.hasLODLevelAvailable(t.geometry) && !We.hasLODLevelAvailable(t.material)) return;
9300
- const n = Zo.getObjectLODState(t);
9300
+ const n = Jo.getObjectLODState(t);
9301
9301
  if (!n) return;
9302
9302
  let o = i.mesh_lod;
9303
9303
  const r = i.mesh_lod != n.lastLodLevel_Mesh || i.texture_lod != n.lastLodLevel_Texture;
@@ -9333,7 +9333,7 @@ TEX ` + i.texture_lod;
9333
9333
  }
9334
9334
  }
9335
9335
  const EO = x("debugplayerview");
9336
- var vo = /* @__PURE__ */ ((s) => (s.Browser = "browser", s.Headset = "headset", s.Handheld = "handheld", s))(vo || {});
9336
+ var wo = /* @__PURE__ */ ((s) => (s.Browser = "browser", s.Headset = "headset", s.Handheld = "handheld", s))(wo || {});
9337
9337
  class RO {
9338
9338
  userId;
9339
9339
  context;
@@ -10083,7 +10083,7 @@ class mn {
10083
10083
  if (!document.fullscreenEnabled)
10084
10084
  return L() && console.warn("NeedleMenu: Fullscreen button could not be created, device doesn't support the Fullscreen API"), null;
10085
10085
  const t = document.createElement("button");
10086
- this._fullscreenButton = t, t.classList.add("fullscreen-button"), t.title = "Click to enter fullscreen mode", wo.setElementPriority(t, 3);
10086
+ this._fullscreenButton = t, t.classList.add("fullscreen-button"), t.title = "Click to enter fullscreen mode", xo.setElementPriority(t, 3);
10087
10087
  const i = Ft("fullscreen"), n = Ft("fullscreen_exit");
10088
10088
  return t.appendChild(i), t.onclick = () => {
10089
10089
  document.fullscreenElement ? document.exitFullscreen() : "webkitRequestFullscreen" in e.domElement && typeof e.domElement.webkitRequestFullscreen == "function" ? e.domElement.webkitRequestFullscreen() : "requestFullscreen" in e.domElement && e.domElement.requestFullscreen();
@@ -10107,7 +10107,7 @@ class mn {
10107
10107
  const t = document.createElement("button");
10108
10108
  this._muteButton = t, t.classList.add("mute-button"), t.title = "Click to mute/unmute";
10109
10109
  const i = Ft("volume_off"), n = Ft("volume_up");
10110
- return wo.setElementPriority(t, 1), e.application.muted ? t.appendChild(i) : t.appendChild(n), t.onclick = () => {
10110
+ return xo.setElementPriority(t, 1), e.application.muted ? t.appendChild(i) : t.appendChild(n), t.onclick = () => {
10111
10111
  e.application.muted ? (i.remove(), t.appendChild(n), e.application.muted = !1) : (n.remove(), t.appendChild(i), e.application.muted = !0);
10112
10112
  }, t;
10113
10113
  }
@@ -10138,7 +10138,7 @@ class mn {
10138
10138
  createQRCode(e) {
10139
10139
  if (this._qrButton) return this._qrButton;
10140
10140
  const t = this, i = document.createElement("button");
10141
- this._qrButton = i, i.innerText = "QR Code", i.prepend(Ft("qr_code")), i.title = "Scan this QR code with your phone to open this page", this.hideElementDuringXRSession(i), wo.setElementPriority(this._qrButton, 20);
10141
+ this._qrButton = i, i.innerText = "QR Code", i.prepend(Ft("qr_code")), i.title = "Scan this QR code with your phone to open this page", this.hideElementDuringXRSession(i), xo.setElementPriority(this._qrButton, 20);
10142
10142
  const n = document.createElement("div");
10143
10143
  n.style.cssText = `
10144
10144
  position: fixed;
@@ -10606,7 +10606,7 @@ class eb {
10606
10606
  }
10607
10607
  }
10608
10608
  const wa = "needle-menu", xa = x("debugmenu"), tb = x("debugnoncommercial");
10609
- let wo = class {
10609
+ let xo = class {
10610
10610
  static setElementPriority(e, t) {
10611
10611
  e.setAttribute("priority", String(t));
10612
10612
  }
@@ -11390,7 +11390,7 @@ class Tu extends HTMLElement {
11390
11390
  let e = null, t = -1e7;
11391
11391
  const i = (n) => {
11392
11392
  if (n instanceof HTMLElement) {
11393
- const o = wo.getElementPriority(n);
11393
+ const o = xo.getElementPriority(n);
11394
11394
  if (o !== void 0 && o >= t) {
11395
11395
  const r = window.getComputedStyle(n);
11396
11396
  if (r.display === "none" || r.visibility === "hidden" || r.opacity === "0")
@@ -11815,7 +11815,7 @@ class N {
11815
11815
  _isVisible = !1;
11816
11816
  _stats = XO ? new OC() : null;
11817
11817
  constructor(e) {
11818
- this.name = e?.name || "", this.alias = e?.alias, this.domElement = e?.domElement || document.body, this.hash = e?.hash, e?.renderer && (this.renderer = e.renderer, this.isManagedExternally = !0), e?.runInBackground !== void 0 && (this.runInBackground = e.runInBackground), e?.scene ? this.scene = e.scene : this.scene = new Xi(), e?.camera && (this._mainCamera = e.camera), this.application = new Kn(this), this.time = new UO(), this.input = new IP(this), this.physics = new Lc(this), this.connection = new XP(this), this.assets = new bk(), this.sceneLighting = new FO(this), this.addressables = new bO(this), this.lightmaps = new OO(this), this.players = new TO(this), this.menu = new wo(this), this.lodsManager = new MO(this), this.animations = new CO(this), this.accessibility = new zd(this);
11818
+ this.name = e?.name || "", this.alias = e?.alias, this.domElement = e?.domElement || document.body, this.hash = e?.hash, e?.renderer && (this.renderer = e.renderer, this.isManagedExternally = !0), e?.runInBackground !== void 0 && (this.runInBackground = e.runInBackground), e?.scene ? this.scene = e.scene : this.scene = new Xi(), e?.camera && (this._mainCamera = e.camera), this.application = new Kn(this), this.time = new UO(), this.input = new IP(this), this.physics = new Lc(this), this.connection = new XP(this), this.assets = new bk(), this.sceneLighting = new FO(this), this.addressables = new bO(this), this.lightmaps = new OO(this), this.players = new TO(this), this.menu = new xo(this), this.lodsManager = new MO(this), this.animations = new CO(this), this.accessibility = new zd(this);
11819
11819
  const t = () => this._needsUpdateSize = !0;
11820
11820
  window.addEventListener("resize", t), this._disposeCallbacks.push(() => window.removeEventListener("resize", t));
11821
11821
  const i = new ResizeObserver((n) => this._needsUpdateSize = !0);
@@ -12540,25 +12540,25 @@ Target Framerate: ` + this.targetFrameRate
12540
12540
  }
12541
12541
  }
12542
12542
  function X0(s, e) {
12543
- return Fs(s, ue.ContextCreated, e), () => To(s, ue.ContextCreated);
12543
+ return Fs(s, ue.ContextCreated, e), () => Ao(s, ue.ContextCreated);
12544
12544
  }
12545
12545
  function QD(s, e) {
12546
- return Fs(s, ue.ContextClearing, e), () => To(s, ue.ContextClearing);
12546
+ return Fs(s, ue.ContextClearing, e), () => Ao(s, ue.ContextClearing);
12547
12547
  }
12548
12548
  function YD(s, e) {
12549
- return Fs(s, ue.ContextDestroying, e), () => To(s, ue.ContextDestroying);
12549
+ return Fs(s, ue.ContextDestroying, e), () => Ao(s, ue.ContextDestroying);
12550
12550
  }
12551
12551
  function Ag(s, e) {
12552
- return Fs(s, Ce.Start, e), () => To(s, Ce.Start);
12552
+ return Fs(s, Ce.Start, e), () => Ao(s, Ce.Start);
12553
12553
  }
12554
12554
  function ZO(s, e) {
12555
- return Fs(s, Ce.Update, e), () => To(s, Ce.Update);
12555
+ return Fs(s, Ce.Update, e), () => Ao(s, Ce.Update);
12556
12556
  }
12557
12557
  function KD(s, e) {
12558
- return Fs(s, Ce.OnBeforeRender, e), () => To(s, Ce.OnBeforeRender);
12558
+ return Fs(s, Ce.OnBeforeRender, e), () => Ao(s, Ce.OnBeforeRender);
12559
12559
  }
12560
12560
  function ZD(s, e) {
12561
- return Fs(s, Ce.OnAfterRender, e), () => To(s, Ce.OnAfterRender);
12561
+ return Fs(s, Ce.OnAfterRender, e), () => Ao(s, Ce.OnAfterRender);
12562
12562
  }
12563
12563
  const Mt = x("debuglicense"), Q0 = [];
12564
12564
  let vn = "basic";
@@ -12959,7 +12959,7 @@ function rb(s) {
12959
12959
  }
12960
12960
  return s;
12961
12961
  }
12962
- const xo = x("debughotreload");
12962
+ const So = x("debughotreload");
12963
12963
  let Bc = !1;
12964
12964
  const yc = /* @__PURE__ */ new Map();
12965
12965
  function JD() {
@@ -12970,19 +12970,19 @@ function ab() {
12970
12970
  }
12971
12971
  function rM(s) {
12972
12972
  if (Bc) {
12973
- xo && console.warn("[Needle Engine] Hot reloading is in progress, not registering instance", s);
12973
+ So && console.warn("[Needle Engine] Hot reloading is in progress, not registering instance", s);
12974
12974
  return;
12975
12975
  }
12976
- xo && console.log("[Needle Engine] Registering hot reload instance", s);
12976
+ So && console.log("[Needle Engine] Registering hot reload instance", s);
12977
12977
  const t = s.constructor.name;
12978
12978
  yc.has(t) ? yc.get(t)?.push(s) : yc.set(t, [s]);
12979
12979
  }
12980
12980
  function aM(s) {
12981
12981
  if (Bc) {
12982
- xo && console.warn("[Needle Engine] Hot reloading is in progress, not unregistering instance", s);
12982
+ So && console.warn("[Needle Engine] Hot reloading is in progress, not unregistering instance", s);
12983
12983
  return;
12984
12984
  }
12985
- xo && console.log("[Needle Engine] Unregistering hot reload instance", s);
12985
+ So && console.log("[Needle Engine] Unregistering hot reload instance", s);
12986
12986
  const t = s.constructor.name, i = yc.get(t);
12987
12987
  if (!i) return;
12988
12988
  const n = i.indexOf(s);
@@ -12990,7 +12990,7 @@ function aM(s) {
12990
12990
  }
12991
12991
  let lb = !1;
12992
12992
  function lM() {
12993
- if (xo || lb) return;
12993
+ if (So || lb) return;
12994
12994
  lb = !0;
12995
12995
  const s = console.error;
12996
12996
  console.error = (...e) => {
@@ -13005,13 +13005,13 @@ function lM() {
13005
13005
  };
13006
13006
  }
13007
13007
  function e2(s) {
13008
- xo && console.log("[HMR] Apply changes", s, Object.keys(s)), lM();
13008
+ So && console.log("[HMR] Apply changes", s, Object.keys(s)), lM();
13009
13009
  for (const e of Object.keys(s))
13010
13010
  try {
13011
13011
  Bc = !0;
13012
13012
  const t = P.get(e);
13013
13013
  if (!t) {
13014
- xo && console.log("[HMR] Type not found: " + e);
13014
+ So && console.log("[HMR] Type not found: " + e);
13015
13015
  continue;
13016
13016
  }
13017
13017
  const i = s[e], n = yc.get(i.name);
@@ -13048,7 +13048,7 @@ function e2(s) {
13048
13048
  }
13049
13049
  }
13050
13050
  } catch (t) {
13051
- if (xo) console.error(t);
13051
+ if (So) console.error(t);
13052
13052
  else return !1;
13053
13053
  } finally {
13054
13054
  Bc = !1, mr(Gi.Log, "Script changes applied (HMR)");
@@ -15208,7 +15208,7 @@ class zs extends R {
15208
15208
  }
15209
15209
  /** @internal */
15210
15210
  onEnable() {
15211
- this.context.time.frameCount > 0 && this.applyOnAwake && this.updateAndCreate(), this._watcher || (this._watcher = new bo(this.context.scene, "background"), this._watcher.subscribeWrite((e) => {
15211
+ this.context.time.frameCount > 0 && this.applyOnAwake && this.updateAndCreate(), this._watcher || (this._watcher = new vo(this.context.scene, "background"), this._watcher.subscribeWrite((e) => {
15212
15212
  $h && console.log("Background changed", this.context.scene.background), this._needsTextureUpdate = !0;
15213
15213
  }));
15214
15214
  }
@@ -15745,11 +15745,11 @@ class MM {
15745
15745
  this.context = t, this.obj = e;
15746
15746
  }
15747
15747
  start(e, t) {
15748
- this.reset(), e && (this._positionWatch || (this._positionWatch = new bo(this.obj.position, ["x", "y", "z"])), this._positionWatch.apply(), this.position = {}, this._positionWatch.subscribeWrite((o, r) => {
15748
+ this.reset(), e && (this._positionWatch || (this._positionWatch = new vo(this.obj.position, ["x", "y", "z"])), this._positionWatch.apply(), this.position = {}, this._positionWatch.subscribeWrite((o, r) => {
15749
15749
  if (this.context.physics.engine?.isUpdating || this.mute) return;
15750
15750
  const a = this.position[r];
15751
15751
  Math.abs(a - o) < 1e-5 || (this.position[r] = o, this.positionChanged = !0);
15752
- })), t && (this._rotationWatch || (this._rotationWatch = new bo(this.obj.quaternion, ["_x", "_y", "_z", "_w"])), this._rotationWatch.apply(), this.quaternion = {}, this._rotationWatch.subscribeWrite((o, r) => {
15752
+ })), t && (this._rotationWatch || (this._rotationWatch = new vo(this.obj.quaternion, ["_x", "_y", "_z", "_w"])), this._rotationWatch.apply(), this.quaternion = {}, this._rotationWatch.subscribeWrite((o, r) => {
15753
15753
  if (this.context.physics.engine?.isUpdating || this.mute) return;
15754
15754
  const a = this.quaternion[r];
15755
15755
  Math.abs(a - o) < 1e-5 || (this.quaternion[r] = o, this.rotationChanged = !0);
@@ -16023,7 +16023,7 @@ Ei([
16023
16023
  let Je = fi;
16024
16024
  new _();
16025
16025
  new _();
16026
- const no = x("debugsync"), Fc = "STRS";
16026
+ const so = x("debugsync"), Fc = "STRS";
16027
16027
  p0(Fc, _s.getRootAsSyncedTransformModel);
16028
16028
  const An = new ag();
16029
16029
  function iw(s, e, t = !0) {
@@ -16038,7 +16038,7 @@ function iw(s, e, t = !0) {
16038
16038
  let vm = 0, _c = 0;
16039
16039
  ZO((s) => {
16040
16040
  const t = s.connection.currentServerUrl?.includes("glitch") ? 10 : 40;
16041
- _c = Math.floor(vm / t), vm = 0, no && _c > 0 && console.log("Sync Transform Fast Interval", _c);
16041
+ _c = Math.floor(vm / t), vm = 0, so && _c > 0 && console.log("Sync Transform Fast Interval", _c);
16042
16042
  });
16043
16043
  class Zn extends R {
16044
16044
  // public autoOwnership: boolean = true;
@@ -16076,7 +16076,7 @@ class Zn extends R {
16076
16076
  * @see {@link OwnershipModel.requestOwnership} for more details
16077
16077
  */
16078
16078
  requestOwnership() {
16079
- no && console.log("Request ownership"), this._model ? this._model.requestOwnership() : (this._shouldRequestOwnership = !0, this._needsUpdate = !0);
16079
+ so && console.log("Request ownership"), this._model ? this._model.requestOwnership() : (this._shouldRequestOwnership = !0, this._needsUpdate = !0);
16080
16080
  }
16081
16081
  /**
16082
16082
  * Free ownership of this object on the network.
@@ -16108,7 +16108,7 @@ class Zn extends R {
16108
16108
  receivedDataCallback = null;
16109
16109
  /** @internal */
16110
16110
  awake() {
16111
- no && console.log("new instance", this.guid, this), this._receivedDataBefore = !1, this._targetPosition = new _(), this._targetRotation = new V(), this.lastPosition = new _(), this.lastRotation = new V(), this.lastScale = new _(), this.rb = C.getComponentInChildren(this.gameObject, Je), this.rb && (this._wasKinematic = this.rb.isKinematic), this.receivedUpdate = !0, this._model = new m0(this.context.connection, this.guid), this.context.connection.isConnected && this.tryGetLastState(), this.joinedRoomCallback = this.tryGetLastState.bind(this), this.context.connection.beginListen(ie.JoinedRoom, this.joinedRoomCallback), this.receivedDataCallback = this.onReceivedData.bind(this), this.context.connection.beginListenBinary(Fc, this.receivedDataCallback);
16111
+ so && console.log("new instance", this.guid, this), this._receivedDataBefore = !1, this._targetPosition = new _(), this._targetRotation = new V(), this.lastPosition = new _(), this.lastRotation = new V(), this.lastScale = new _(), this.rb = C.getComponentInChildren(this.gameObject, Je), this.rb && (this._wasKinematic = this.rb.isKinematic), this.receivedUpdate = !0, this._model = new m0(this.context.connection, this.guid), this.context.connection.isConnected && this.tryGetLastState(), this.joinedRoomCallback = this.tryGetLastState.bind(this), this.context.connection.beginListen(ie.JoinedRoom, this.joinedRoomCallback), this.receivedDataCallback = this.onReceivedData.bind(this), this.context.connection.beginListenBinary(Fc, this.receivedDataCallback);
16112
16112
  }
16113
16113
  /** @internal */
16114
16114
  onDestroy() {
@@ -16128,7 +16128,7 @@ class Zn extends R {
16128
16128
  */
16129
16129
  onReceivedData(e) {
16130
16130
  if (!this.destroyed && typeof e.guid == "function" && e.guid() === this.guid) {
16131
- no && console.log("new data", this.context.connection.connectionId, this.context.time.frameCount, this.guid, e), this.receivedUpdate = !0, this._receivedFastUpdate = e.fast();
16131
+ so && console.log("new data", this.context.connection.connectionId, this.context.time.frameCount, this.guid, e), this.receivedUpdate = !0, this._receivedFastUpdate = e.fast();
16132
16132
  const t = e.transform();
16133
16133
  if (t) {
16134
16134
  bn.markDirty(this.gameObject, !0);
@@ -16168,14 +16168,14 @@ class Zn extends R {
16168
16168
  onBeforeRender() {
16169
16169
  if (!this.activeAndEnabled || !this.context.connection.isConnected) return;
16170
16170
  if (!this.context.connection.isInRoom || !this._model) {
16171
- no && console.log("no model or room", this.name, this.guid, this.context.connection.isInRoom);
16171
+ so && console.log("no model or room", this.name, this.guid, this.context.connection.isInRoom);
16172
16172
  return;
16173
16173
  }
16174
16174
  this._shouldRequestOwnership && (this._shouldRequestOwnership = !1, this._model.requestOwnership());
16175
16175
  const e = this.worldPosition, t = this.worldQuaternion, i = this.gameObject.scale;
16176
16176
  if (this._model.isOwned && !this.receivedUpdate) {
16177
16177
  const r = this._model.hasOwnership || this.fastMode ? 1e-4 : 1e-3;
16178
- (e.distanceTo(this.lastPosition) > r || t.angleTo(this.lastRotation) > r || i.distanceTo(this.lastScale) > r) && (this._model.hasOwnership ? this._needsUpdate = !0 : (no && console.log(this.guid, "reset because not owned but", this.gameObject.name, this.lastPosition), this.worldPosition = this.lastPosition, e.copy(this.lastPosition), this.worldQuaternion = this.lastRotation, t.copy(this.lastRotation), this.gameObject.scale.copy(this.lastScale), bn.markDirty(this.gameObject, !0), this._needsUpdate = !1));
16178
+ (e.distanceTo(this.lastPosition) > r || t.angleTo(this.lastRotation) > r || i.distanceTo(this.lastScale) > r) && (this._model.hasOwnership ? this._needsUpdate = !0 : (so && console.log(this.guid, "reset because not owned but", this.gameObject.name, this.lastPosition), this.worldPosition = this.lastPosition, e.copy(this.lastPosition), this.worldQuaternion = this.lastRotation, t.copy(this.lastRotation), this.gameObject.scale.copy(this.lastScale), bn.markDirty(this.gameObject, !0), this._needsUpdate = !1));
16179
16179
  }
16180
16180
  if (this._model && !this._model.hasOwnership && this._model.isOwned && this._receivedDataBefore) {
16181
16181
  const r = this._receivedFastUpdate || this.fastMode ? 0.5 : 0.3;
@@ -16192,11 +16192,11 @@ class Zn extends R {
16192
16192
  }
16193
16193
  if (this.receivedUpdate = !1, this.lastPosition.copy(e), this.lastRotation.copy(t), this.lastScale.copy(i), !this._model || !this._model || this._model.hasOwnership === void 0 || !this._model.hasOwnership)
16194
16194
  return;
16195
- this.rb && this.overridePhysics && this._wasKinematic !== void 0 && (no && console.log("reset kinematic", this.rb.name, this._wasKinematic), this.rb.isKinematic = this._wasKinematic);
16195
+ this.rb && this.overridePhysics && this._wasKinematic !== void 0 && (so && console.log("reset kinematic", this.rb.name, this._wasKinematic), this.rb.isKinematic = this._wasKinematic);
16196
16196
  const n = 10, o = this.rb || this.fastMode;
16197
16197
  if (this._needsUpdate && (this.context.time.frameCount % n === 0 || o)) {
16198
16198
  if (vm++, o && _c > 0 && this.context.time.frameCount % _c !== 0) return;
16199
- no && console.debug("[SyncedTransform] Send update", this.context.connection.connectionId, this.guid, this.gameObject.name, this.gameObject.guid), this._needsUpdate = !1;
16199
+ so && console.debug("[SyncedTransform] Send update", this.context.connection.connectionId, this.guid, this.gameObject.name, this.gameObject.guid), this._needsUpdate = !1;
16200
16200
  const r = iw(this.guid, this, !!o);
16201
16201
  this.context.connection.sendBinary(r);
16202
16202
  }
@@ -16323,7 +16323,7 @@ function wm(s, e) {
16323
16323
  }, !1) === !0;
16324
16324
  }
16325
16325
  const ls = new Array();
16326
- class co {
16326
+ class ho {
16327
16327
  /**
16328
16328
  * When the CallInfo is enabled it will be invoked when the EventList is invoked
16329
16329
  */
@@ -16376,7 +16376,7 @@ class ce {
16376
16376
  const l = e[a];
16377
16377
  if (l) {
16378
16378
  const c = o.arguments?.map((h) => h instanceof Object && h.uuid ? e[h.uuid].clone : h?.isComponent ? e[h.guid].clone : h);
16379
- t.push(new co(l.clone, o.methodName, c, o.enabled));
16379
+ t.push(new ho(l.clone, o.methodName, c, o.enabled));
16380
16380
  } else L() && console.warn("Could not find target for event listener");
16381
16381
  }
16382
16382
  }
@@ -16415,9 +16415,9 @@ class ce {
16415
16415
  constructor(e) {
16416
16416
  if (this.methods = [], Array.isArray(e))
16417
16417
  for (const t of e)
16418
- t instanceof co ? this.methods.push(t) : typeof t == "function" && this.methods.push(new co(t));
16418
+ t instanceof ho ? this.methods.push(t) : typeof t == "function" && this.methods.push(new ho(t));
16419
16419
  else
16420
- typeof e == "function" && this.methods.push(new co(e));
16420
+ typeof e == "function" && this.methods.push(new ho(e));
16421
16421
  }
16422
16422
  /** Invoke all the methods that are subscribed to this event */
16423
16423
  invoke(...e) {
@@ -16443,7 +16443,7 @@ class ce {
16443
16443
  }
16444
16444
  /** Add a new event listener to this event */
16445
16445
  addEventListener(e) {
16446
- return this.methods.push(new co(e)), e;
16446
+ return this.methods.push(new ho(e)), e;
16447
16447
  }
16448
16448
  removeEventListener(e) {
16449
16449
  if (e)
@@ -16577,7 +16577,7 @@ class DM extends nn {
16577
16577
  }
16578
16578
  onDeserialize(e, t) {
16579
16579
  if (typeof e == "function")
16580
- return new ce([new co(e, null, [], !0)]);
16580
+ return new ce([new ho(e, null, [], !0)]);
16581
16581
  if (e && e.type === "EventList") {
16582
16582
  gt && console.log("DESERIALIZE EVENT", e);
16583
16583
  const i = new Array();
@@ -16626,7 +16626,7 @@ Could not find method ${r.method} on object ${l.name}`, l, typeof l[r.method]);
16626
16626
  console.warn(`EventList method not found: "${r.method}" on ${l?.name}`);
16627
16627
  else {
16628
16628
  h !== void 0 && !Array.isArray(h) && (h = [h]);
16629
- const f = new co(l, r.method, h, r.enabled);
16629
+ const f = new ho(l, r.method, h, r.enabled);
16630
16630
  i.push(f);
16631
16631
  }
16632
16632
  } else L() && console.warn(`[Dev] EventList: Could not find event listener in scene (${t.object?.name})`, r);
@@ -16694,7 +16694,7 @@ class FM extends nn {
16694
16694
  }
16695
16695
  onDeserialize(e, t) {
16696
16696
  if (typeof e == "string" && e.length > 0)
16697
- return Eo(t.gltfId, e);
16697
+ return Ro(t.gltfId, e);
16698
16698
  }
16699
16699
  }
16700
16700
  new FM();
@@ -16725,7 +16725,7 @@ class xn extends zc {
16725
16725
  if (!this.targets) return null;
16726
16726
  e ??= new Nr(), e.targets = this.targets, e.results = this.raycastHits, e.useAcceleratedRaycast = !0;
16727
16727
  const t = e.testObject;
16728
- this.ignoreSkinnedMeshes && (e.testObject = (n) => n instanceof _o ? "continue in children" : t ? t(n) : !0);
16728
+ this.ignoreSkinnedMeshes && (e.testObject = (n) => n instanceof bo ? "continue in children" : t ? t(n) : !0);
16729
16729
  const i = this.context.physics.raycast(e);
16730
16730
  return e.testObject = t, i;
16731
16731
  }
@@ -16791,7 +16791,7 @@ function Zd(s, e) {
16791
16791
  const t = s.material;
16792
16792
  if (t?.isMaterial === !0) {
16793
16793
  const i = s.parent;
16794
- i && i.isText, t.side = e.doubleSided ?? !0 ? Oi : Po, t.shadowSide = e.doubleSided ? Oi : Po, s.castShadow = e.castShadows ? e.castShadows : !1, s.receiveShadow = e.receiveShadows ? e.receiveShadows : !1;
16794
+ i && i.isText, t.side = e.doubleSided ?? !0 ? Oi : ko, t.shadowSide = e.doubleSided ? Oi : ko, s.castShadow = e.castShadows ? e.castShadows : !1, s.receiveShadow = e.receiveShadows ? e.receiveShadows : !1;
16795
16795
  }
16796
16796
  for (const i of s.children)
16797
16797
  Zd(i, e);
@@ -16825,7 +16825,7 @@ function $M(s, e, t = Ce.OnBeforeRender) {
16825
16825
  const l = s.startCoroutine(a(), t);
16826
16826
  o[n] = l;
16827
16827
  }
16828
- const so = x("debugeventsystem");
16828
+ const oo = x("debugeventsystem");
16829
16829
  var xm = /* @__PURE__ */ ((s) => (s.BeforeHandleInput = "BeforeHandleInput", s.AfterHandleInput = "AfterHandleInput", s))(xm || {});
16830
16830
  X0((s) => {
16831
16831
  di.createIfNoneExists(s);
@@ -16901,7 +16901,7 @@ class di extends R {
16901
16901
  const i = new Nr();
16902
16902
  e.hasRay ? i.ray = e.ray : i.screenPoint = this.context.input.getPointerPositionRC(e.pointerId), i.allowSlowRaycastFallback = e.isClick || e.isDoubleClick;
16903
16903
  const n = this.performRaycast(i);
16904
- if (so && (t.isDown ? console.log("DOWN", { id: t.pointerId, hits: n.length }) : t.isUp && console.log("UP", { id: t.pointerId, hits: n.length }), t.isClick && console.log("CLICK", { id: t.pointerId, hits: n.length })), n) {
16904
+ if (oo && (t.isDown ? console.log("DOWN", { id: t.pointerId, hits: n.length }) : t.isUp && console.log("UP", { id: t.pointerId, hits: n.length }), t.isClick && console.log("CLICK", { id: t.pointerId, hits: n.length })), n) {
16905
16905
  for (const r of n)
16906
16906
  r.event = e, e.intersections.push(r);
16907
16907
  e.origin.onPointerHits && e.origin.onPointerHits({
@@ -16910,7 +16910,7 @@ class di extends R {
16910
16910
  hits: n
16911
16911
  });
16912
16912
  }
16913
- so && t.isClick && Ie("EventSystem: " + t.pointerId + " - " + this.context.time.frame + " - Up:" + t.isUp + ", Down:" + t.isDown);
16913
+ oo && t.isClick && Ie("EventSystem: " + t.pointerId + " - " + this.context.time.frame + " - Up:" + t.isUp + ", Down:" + t.isDown);
16914
16914
  const o = {
16915
16915
  sender: this,
16916
16916
  args: t,
@@ -17010,9 +17010,9 @@ class di extends R {
17010
17010
  */
17011
17011
  handleEventOnObject(e, t) {
17012
17012
  if (!this.testIsVisible(e))
17013
- return t.isClick && so && console.log("not allowed", e), !1;
17013
+ return t.isClick && oo && console.log("not allowed", e), !1;
17014
17014
  if (t.pointerId === void 0)
17015
- return so && console.error("Event without pointer can't be handled", t), !1;
17015
+ return oo && console.error("Event without pointer can't be handled", t), !1;
17016
17016
  t.object = e;
17017
17017
  const i = e.parent, n = t.isClick ?? !1;
17018
17018
  let o = null;
@@ -17026,7 +17026,7 @@ class di extends R {
17026
17026
  }
17027
17027
  }
17028
17028
  }
17029
- n && so && console.log(this.context.time.frame, e);
17029
+ n && oo && console.log(this.context.time.frame, e);
17030
17030
  const r = this.hoveredByID.get(t.pointerId), a = r?.obj;
17031
17031
  a !== e && a && this.propagatePointerExit(a, r.data, e);
17032
17032
  const c = this.hoveredByID.get(t.pointerId);
@@ -17124,7 +17124,7 @@ class di extends R {
17124
17124
  const i = e.pointerId;
17125
17125
  if (this._capturedPointer[i]) {
17126
17126
  const n = this._capturedPointer[i].indexOf(t);
17127
- n !== -1 && (this._capturedPointer[i].splice(n, 1), so && console.log("released pointer capture", i, t, this._capturedPointer));
17127
+ n !== -1 && (this._capturedPointer[i].splice(n, 1), oo && console.log("released pointer capture", i, t, this._capturedPointer));
17128
17128
  }
17129
17129
  }
17130
17130
  /** invoke the pointerMove event on all captured handlers */
@@ -17132,7 +17132,7 @@ class di extends R {
17132
17132
  if (e.event.type === Be.PointerMove) {
17133
17133
  const t = e.pointerId, i = this._capturedPointer[t];
17134
17134
  if (i) {
17135
- so && console.log("Captured", t, i);
17135
+ oo && console.log("Captured", t, i);
17136
17136
  for (let n = 0; n < i.length; n++) {
17137
17137
  const o = i[n];
17138
17138
  if (o.destroyed) {
@@ -17188,7 +17188,7 @@ class Ll {
17188
17188
  if (n === o.frame) return;
17189
17189
  o.frame = n;
17190
17190
  let r = this.needsUpdate || n < 1;
17191
- o.nextUpdate <= n && (r = !0), r && (so && console.log("Update threemeshui"), this.needsUpdate = !1, o.nextUpdate = n + 60, e.update());
17191
+ o.nextUpdate <= n && (r = !0), r && (oo && console.log("Update threemeshui"), this.needsUpdate = !1, o.nextUpdate = n + 60, e.update());
17192
17192
  return;
17193
17193
  }
17194
17194
  this.lastUpdateFrame = [{ context: t, frame: n, nextUpdate: n + 60 }], e.update(), this.needsUpdate = !1;
@@ -17770,7 +17770,7 @@ var qM = Object.defineProperty, XM = Object.getOwnPropertyDescriptor, ii = (s, e
17770
17770
  (r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
17771
17771
  return i && n && qM(e, t, n), n;
17772
17772
  }, Ia = /* @__PURE__ */ ((s) => (s[s.None = 0] = "None", s[s.Skybox = 1] = "Skybox", s[s.SolidColor = 2] = "SolidColor", s[s.Uninitialized = 4] = "Uninitialized", s))(Ia || {});
17773
- const oo = x("debugcam"), fb = x("debugscreenpointtoray"), Wt = class Jl extends R {
17773
+ const ro = x("debugcam"), fb = x("debugscreenpointtoray"), Wt = class Jl extends R {
17774
17774
  /**
17775
17775
  * Returns whether this component is a camera
17776
17776
  * @returns {boolean} Always returns true
@@ -17992,7 +17992,7 @@ const oo = x("debugcam"), fb = x("debugscreenpointtoray"), Wt = class Jl extends
17992
17992
  }
17993
17993
  /** @internal */
17994
17994
  onEnable() {
17995
- oo && console.log(`Camera enabled: "${this.name}". ClearFlags=${Ia[this._clearFlags]}`, this), this.buildCamera(), (this.tag == "MainCamera" || !this.context.mainCameraComponent) && (this.context.setCurrentCamera(this), YM(this)), this.applyClearFlagsIfIsActiveCamera({ applySkybox: !0 });
17995
+ ro && console.log(`Camera enabled: "${this.name}". ClearFlags=${Ia[this._clearFlags]}`, this), this.buildCamera(), (this.tag == "MainCamera" || !this.context.mainCameraComponent) && (this.context.setCurrentCamera(this), YM(this)), this.applyClearFlagsIfIsActiveCamera({ applySkybox: !0 });
17996
17996
  }
17997
17997
  /** @internal */
17998
17998
  onDisable() {
@@ -18044,10 +18044,10 @@ const oo = x("debugcam"), fb = x("debugscreenpointtoray"), Wt = class Jl extends
18044
18044
  */
18045
18045
  applyClearFlags(e) {
18046
18046
  if (!this._cam) {
18047
- oo && console.log("Camera does not exist (apply clear flags)");
18047
+ ro && console.log("Camera does not exist (apply clear flags)");
18048
18048
  return;
18049
18049
  }
18050
- if (this.fieldOfView = this.fieldOfView, oo) {
18050
+ if (this.fieldOfView = this.fieldOfView, ro) {
18051
18051
  const i = `[Camera] Apply ClearFlags: ${Ia[this._clearFlags]} - "${this.name}"`;
18052
18052
  console.debug(i);
18053
18053
  }
@@ -18060,13 +18060,13 @@ const oo = x("debugcam"), fb = x("debugscreenpointtoray"), Wt = class Jl extends
18060
18060
  this.context.scene.background = null, this.context.renderer.setClearColor(0, 0);
18061
18061
  return;
18062
18062
  }
18063
- (!this.scene.background || !this._skybox || e?.applySkybox === !0) && this.applySceneSkybox(), this._backgroundBlurriness !== void 0 && !this.context.domElement.getAttribute("background-blurriness") ? this.context.scene.backgroundBlurriness = this._backgroundBlurriness : oo && console.warn(`Camera "${this.name}" has no background blurriness`), this._backgroundIntensity !== void 0 && !this.context.domElement.getAttribute("background-intensity") && (this.context.scene.backgroundIntensity = this._backgroundIntensity), this._backgroundRotation !== void 0 && !this.context.domElement.getAttribute("background-rotation") ? this.context.scene.backgroundRotation = this._backgroundRotation : oo && console.warn(`Camera "${this.name}" has no background intensity`);
18063
+ (!this.scene.background || !this._skybox || e?.applySkybox === !0) && this.applySceneSkybox(), this._backgroundBlurriness !== void 0 && !this.context.domElement.getAttribute("background-blurriness") ? this.context.scene.backgroundBlurriness = this._backgroundBlurriness : ro && console.warn(`Camera "${this.name}" has no background blurriness`), this._backgroundIntensity !== void 0 && !this.context.domElement.getAttribute("background-intensity") && (this.context.scene.backgroundIntensity = this._backgroundIntensity), this._backgroundRotation !== void 0 && !this.context.domElement.getAttribute("background-rotation") ? this.context.scene.backgroundRotation = this._backgroundRotation : ro && console.warn(`Camera "${this.name}" has no background intensity`);
18064
18064
  break;
18065
18065
  case 2:
18066
18066
  if (this._backgroundColor && !t) {
18067
18067
  let i = this._backgroundColor.alpha;
18068
18068
  Jl.backgroundShouldBeTransparent(this.context) && (i = this.ARBackgroundAlpha ?? 0), this.context.scene.background = null, this.context.xr?.isVR ? this.context.renderer.setClearColor(A1(this._backgroundColor).convertLinearToSRGB()) : this.context.renderer.setClearColor(this._backgroundColor, i);
18069
- } else this._backgroundColor || oo && console.warn(`[Camera] has no background color "${this.name}" `);
18069
+ } else this._backgroundColor || ro && console.warn(`[Camera] has no background color "${this.name}" `);
18070
18070
  break;
18071
18071
  case 4:
18072
18072
  t || (this.context.scene.background = null, this.context.renderer.setClearColor(0, 0));
@@ -18091,7 +18091,7 @@ const oo = x("debugcam"), fb = x("debugscreenpointtoray"), Wt = class Jl extends
18091
18091
  if (typeof t._transparent == "boolean")
18092
18092
  return t._transparent;
18093
18093
  const i = t.environmentBlendMode;
18094
- oo && Ie("Environment blend mode: " + i + " on " + navigator.userAgent);
18094
+ ro && Ie("Environment blend mode: " + i + " on " + navigator.userAgent);
18095
18095
  let n = i === "additive" || i === "alpha-blend";
18096
18096
  if (e.isInAR && i === "opaque") {
18097
18097
  if (navigator.userAgent?.includes("OculusBrowser"))
@@ -18168,14 +18168,14 @@ class QM {
18168
18168
  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}`));
18169
18169
  else if (this.context.scene.background !== this._skybox) {
18170
18170
  const e = this.context.domElement.getAttribute("background-image") || this.context.domElement.getAttribute("background-color");
18171
- oo && console.debug(`[Camera] Apply Skybox ${this._skybox?.name} ${e} - "${this._camera.name}"`), e?.length || (this._skybox.mapping = ks, this.context.scene.background = this._skybox);
18171
+ ro && console.debug(`[Camera] Apply Skybox ${this._skybox?.name} ${e} - "${this._camera.name}"`), e?.length || (this._skybox.mapping = ks, this.context.scene.background = this._skybox);
18172
18172
  }
18173
18173
  }
18174
18174
  }
18175
18175
  function YM(s) {
18176
18176
  x("freecam") && s.context.mainCameraComponent === s && C.getOrAddComponent(s.gameObject, ye);
18177
18177
  }
18178
- class po extends R {
18178
+ class mo extends R {
18179
18179
  /**
18180
18180
  * Gets the existing Three.js {@link three#AudioListener} instance or creates a new one if it doesn't exist.
18181
18181
  * This listener is responsible for capturing audio in the 3D scene.
@@ -18220,7 +18220,7 @@ var KM = Object.defineProperty, ZM = Object.getOwnPropertyDescriptor, Pn = (s, e
18220
18220
  (r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
18221
18221
  return i && n && KM(e, t, n), n;
18222
18222
  };
18223
- const xt = x("debugaudio"), sn = class ro extends R {
18223
+ const xt = x("debugaudio"), sn = class ao extends R {
18224
18224
  /**
18225
18225
  * Checks if the user has interacted with the page to allow audio playback.
18226
18226
  * Audio playback often requires a user gesture first due to browser autoplay policies.
@@ -18345,9 +18345,9 @@ const xt = x("debugaudio"), sn = class ro extends R {
18345
18345
  * @returns The three.js PositionalAudio object or null if unavailable
18346
18346
  */
18347
18347
  get Sound() {
18348
- if (!this.sound && ro.userInteractionRegistered) {
18349
- let e = this.gameObject.getComponent(po) ?? this.context.mainCamera.getComponent(po) ?? Qc(po, this.context, !1);
18350
- !e && this.context.mainCamera && (e = this.context.mainCamera.addComponent(po)), e?.listener ? (this.sound = new CS(e.listener), this.gameObject?.add(this.sound)) : xt && console.warn("No audio listener found in scene - can not play audio");
18348
+ if (!this.sound && ao.userInteractionRegistered) {
18349
+ let e = this.gameObject.getComponent(mo) ?? this.context.mainCamera.getComponent(mo) ?? Qc(mo, this.context, !1);
18350
+ !e && this.context.mainCamera && (e = this.context.mainCamera.addComponent(mo)), e?.listener ? (this.sound = new CS(e.listener), this.gameObject?.add(this.sound)) : xt && console.warn("No audio listener found in scene - can not play audio");
18351
18351
  }
18352
18352
  return this.sound;
18353
18353
  }
@@ -18403,7 +18403,7 @@ const xt = x("debugaudio"), sn = class ro extends R {
18403
18403
  }
18404
18404
  /** @internal */
18405
18405
  onEnable() {
18406
- this.sound && this.gameObject.add(this.sound), ro.userInteractionRegistered ? this.playOnAwake && this.context.application.isVisible && this.play() : ro.registerWaitForAllowAudio(() => {
18406
+ this.sound && this.gameObject.add(this.sound), ao.userInteractionRegistered ? this.playOnAwake && this.context.application.isVisible && this.play() : ao.registerWaitForAllowAudio(() => {
18407
18407
  this.enabled && !this.destroyed && this.shouldPlay && this.onNewClip(this.clip);
18408
18408
  }), globalThis.addEventListener("visibilitychange", this.onVisibilityChanged), this.context.application.addEventListener(Zp.MuteChanged, this.onApplicationMuteChanged);
18409
18409
  }
@@ -18417,7 +18417,7 @@ const xt = x("debugaudio"), sn = class ro extends R {
18417
18417
  (this.playInBackground === !1 || D.isMobileDevice()) && (this.wasPlaying = this.isPlaying, this.isPlaying && this.pause());
18418
18418
  break;
18419
18419
  case "visible":
18420
- xt && console.log("visible", this.enabled, this.playOnAwake, !this.isPlaying, ro.userInteractionRegistered, this.wasPlaying), this.enabled && this.playOnAwake && !this.isPlaying && ro.userInteractionRegistered && this.wasPlaying && this.play();
18420
+ xt && console.log("visible", this.enabled, this.playOnAwake, !this.isPlaying, ao.userInteractionRegistered, this.wasPlaying), this.enabled && this.playOnAwake && !this.isPlaying && ao.userInteractionRegistered && this.wasPlaying && this.play();
18421
18421
  break;
18422
18422
  }
18423
18423
  };
@@ -18435,7 +18435,7 @@ const xt = x("debugaudio"), sn = class ro extends R {
18435
18435
  xt && console.warn("Failed getting sound?", this.name);
18436
18436
  return;
18437
18437
  }
18438
- t.isPlaying && t.stop(), e && t.setBuffer(e), t.loop = this._loop, this.context.application.muted ? t.setVolume(0) : t.setVolume(this.volume), t.autoplay = this.shouldPlay && ro.userInteractionRegistered, this.applySpatialDistanceSettings(), t.isPlaying && t.stop(), ro.registerWaitForAllowAudio(this.__onAllowAudioCallback);
18438
+ t.isPlaying && t.stop(), e && t.setBuffer(e), t.loop = this._loop, this.context.application.muted ? t.setVolume(0) : t.setVolume(this.volume), t.autoplay = this.shouldPlay && ao.userInteractionRegistered, this.applySpatialDistanceSettings(), t.isPlaying && t.stop(), ao.registerWaitForAllowAudio(this.__onAllowAudioCallback);
18439
18439
  };
18440
18440
  __onAllowAudioCallback = () => {
18441
18441
  this.shouldPlay && this.play();
@@ -18741,13 +18741,13 @@ Video:`, o.getVideoTracks()), this._stream = o, i === "incoming") {
18741
18741
  function pb(s) {
18742
18742
  return s = s.replace("a=fmtp:111 minptime=10;useinbandfec=1", "a=fmtp:111 ptime=5;useinbandfec=1;stereo=1;maxplaybackrate=48000;maxaveragebitrat=128000;sprop-stereo=1"), s;
18743
18743
  }
18744
- class mo extends tg {
18744
+ class go extends tg {
18745
18745
  static instances = /* @__PURE__ */ new Map();
18746
18746
  static getOrCreate(e, t) {
18747
- if (mo.instances.has(t))
18748
- return mo.instances.get(t);
18749
- const i = new mo(e, t);
18750
- return mo.instances.set(t, i), i;
18747
+ if (go.instances.has(t))
18748
+ return go.instances.get(t);
18749
+ const i = new go(e, t);
18750
+ return go.instances.set(t, i), i;
18751
18751
  }
18752
18752
  getMyPeerId() {
18753
18753
  if (this.context.connection.connectionId)
@@ -18913,7 +18913,7 @@ class ju extends tg {
18913
18913
  * Create a new NetworkedStreams instance
18914
18914
  */
18915
18915
  static create(e, t) {
18916
- const i = mo.getOrCreate(e.context, t || e.context.connection.connectionId || e.guid);
18916
+ const i = go.getOrCreate(e.context, t || e.context.connection.connectionId || e.guid);
18917
18917
  return new ju(e.context, i);
18918
18918
  }
18919
18919
  context;
@@ -18927,8 +18927,8 @@ class ju extends tg {
18927
18927
  constructor(e, t) {
18928
18928
  if (super(), a0(e)) {
18929
18929
  const i = e;
18930
- e = i.context, t = mo.getOrCreate(i.context, i.guid);
18931
- } else typeof t == "string" && (t = mo.getOrCreate(e, t));
18930
+ e = i.context, t = go.getOrCreate(i.context, i.guid);
18931
+ } else typeof t == "string" && (t = go.getOrCreate(e, t));
18932
18932
  if (e) {
18933
18933
  if (!(e instanceof N)) throw new Error("Failed to create NetworkedStreams because context is not an instance of Context");
18934
18934
  } else throw new Error("Failed to create NetworkedStreams because context is undefined");
@@ -19176,7 +19176,7 @@ class Vr extends R {
19176
19176
  }
19177
19177
  // we have to wait for the user to connect to a room when "auto connect" is enabled
19178
19178
  onJoinedRoom = async () => {
19179
- this.debug && console.log("VOIP: Joined room"), await ko(300), this.autoConnect && !this.isSending && this._allowSending && this.connect();
19179
+ this.debug && console.log("VOIP: Joined room"), await Oo(300), this.autoConnect && !this.isSending && this._allowSending && this.connect();
19180
19180
  };
19181
19181
  onLeftRoom = () => {
19182
19182
  this.debug && console.log("VOIP: Left room"), this.disconnect();
@@ -19779,7 +19779,7 @@ pi([
19779
19779
  pi([
19780
19780
  u()
19781
19781
  ], Hr.prototype, "convex");
19782
- class Oo extends kn {
19782
+ class Mo extends kn {
19783
19783
  center = new _(0, 0, 0);
19784
19784
  radius = 0.5;
19785
19785
  height = 2;
@@ -19792,13 +19792,13 @@ class Oo extends kn {
19792
19792
  }
19793
19793
  pi([
19794
19794
  u(_)
19795
- ], Oo.prototype, "center");
19795
+ ], Mo.prototype, "center");
19796
19796
  pi([
19797
19797
  u()
19798
- ], Oo.prototype, "radius");
19798
+ ], Mo.prototype, "radius");
19799
19799
  pi([
19800
19800
  u()
19801
- ], Oo.prototype, "height");
19801
+ ], Mo.prototype, "height");
19802
19802
  var _E = Object.defineProperty, Us = (s, e, t, i) => {
19803
19803
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
19804
19804
  (r = s[o]) && (n = r(e, t, n) || n);
@@ -19819,8 +19819,8 @@ class sl extends R {
19819
19819
  }
19820
19820
  onEnable() {
19821
19821
  const e = this.rigidbody;
19822
- let t = this.gameObject.getComponent(Oo);
19823
- t || (t = this.gameObject.addComponent(Oo)), t.center.copy(this.center), t.radius = this.radius, t.height = this.height;
19822
+ let t = this.gameObject.getComponent(Mo);
19823
+ t || (t = this.gameObject.addComponent(Mo)), t.center.copy(this.center), t.radius = this.radius, t.height = this.height;
19824
19824
  const i = new _(0, 0, 1), n = new _(1, 0, 0), o = new _(0, 1, 0), r = this.gameObject.getWorldDirection(new _());
19825
19825
  r.y = 0;
19826
19826
  const a = n.dot(r) < 0 ? -1 : 1, l = i.angleTo(r) * a;
@@ -19867,7 +19867,7 @@ Us([
19867
19867
  Us([
19868
19868
  u()
19869
19869
  ], sl.prototype, "height");
19870
- class Ao extends R {
19870
+ class Io extends R {
19871
19871
  controller;
19872
19872
  movementSpeed = 2;
19873
19873
  rotationSpeed = 2;
@@ -19930,22 +19930,22 @@ class Ao extends R {
19930
19930
  }
19931
19931
  Us([
19932
19932
  u(sl)
19933
- ], Ao.prototype, "controller");
19933
+ ], Io.prototype, "controller");
19934
19934
  Us([
19935
19935
  u()
19936
- ], Ao.prototype, "movementSpeed");
19936
+ ], Io.prototype, "movementSpeed");
19937
19937
  Us([
19938
19938
  u()
19939
- ], Ao.prototype, "rotationSpeed");
19939
+ ], Io.prototype, "rotationSpeed");
19940
19940
  Us([
19941
19941
  u()
19942
- ], Ao.prototype, "jumpForce");
19942
+ ], Io.prototype, "jumpForce");
19943
19943
  Us([
19944
19944
  u()
19945
- ], Ao.prototype, "doubleJumpForce");
19945
+ ], Io.prototype, "doubleJumpForce");
19946
19946
  Us([
19947
19947
  u(Rt)
19948
- ], Ao.prototype, "animator");
19948
+ ], Io.prototype, "animator");
19949
19949
  var bE = Object.defineProperty, ol = (s, e, t, i) => {
19950
19950
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
19951
19951
  (r = s[o]) && (n = r(e, t, n) || n);
@@ -20050,7 +20050,7 @@ const Gr = class ec extends R {
20050
20050
  color: 0,
20051
20051
  transparent: !0,
20052
20052
  depthWrite: !1,
20053
- side: Po
20053
+ side: ko
20054
20054
  });
20055
20055
  this.plane = new H(e, t), this.plane.scale.y = -1, this.plane.layers.set(2), this.shadowsRoot.add(this.plane), this.plane && (this.plane.renderOrder = 1), this.occluderMesh = new H(this.plane.geometry, new Se({
20056
20056
  depthWrite: !0,
@@ -20092,7 +20092,7 @@ const Gr = class ec extends R {
20092
20092
  const o = this.plane.visible;
20093
20093
  this.plane.visible = !1, this.gameObject instanceof H && ys(this.gameObject, !1);
20094
20094
  const r = t.background;
20095
- t.background = null, t.overrideMaterial = this.depthMaterial, this.backfaceShadows ? this.depthMaterial.side = Oi : this.depthMaterial.side = Po;
20095
+ t.background = null, t.overrideMaterial = this.depthMaterial, this.backfaceShadows ? this.depthMaterial.side = Oi : this.depthMaterial.side = ko;
20096
20096
  const a = i.getClearAlpha();
20097
20097
  i.setClearAlpha(0);
20098
20098
  const l = i.xr.enabled;
@@ -20231,7 +20231,7 @@ var SE = Object.defineProperty, qr = (s, e, t, i) => {
20231
20231
  };
20232
20232
  const Vn = x("debugdrag"), lp = [];
20233
20233
  var gw = /* @__PURE__ */ ((s) => (s[s.XZPlane = 0] = "XZPlane", s[s.Attached = 1] = "Attached", s[s.HitNormal = 2] = "HitNormal", s[s.DynamicViewAngle = 3] = "DynamicViewAngle", s[s.SnapToSurfaces = 4] = "SnapToSurfaces", s[s.None = 5] = "None", s))(gw || {});
20234
- const Io = class Ui extends R {
20234
+ const Lo = class Ui extends R {
20235
20235
  /**
20236
20236
  * Checks if any DragControls component is currently active with selected objects
20237
20237
  * @returns True if any DragControls component is currently active
@@ -20459,26 +20459,26 @@ const Io = class Ui extends R {
20459
20459
  };
20460
20460
  qr([
20461
20461
  u()
20462
- ], Io.prototype, "dragMode");
20462
+ ], Lo.prototype, "dragMode");
20463
20463
  qr([
20464
20464
  u()
20465
- ], Io.prototype, "snapGridResolution");
20465
+ ], Lo.prototype, "snapGridResolution");
20466
20466
  qr([
20467
20467
  u()
20468
- ], Io.prototype, "keepRotation");
20468
+ ], Lo.prototype, "keepRotation");
20469
20469
  qr([
20470
20470
  u()
20471
- ], Io.prototype, "xrDragMode");
20471
+ ], Lo.prototype, "xrDragMode");
20472
20472
  qr([
20473
20473
  u()
20474
- ], Io.prototype, "xrKeepRotation");
20474
+ ], Lo.prototype, "xrKeepRotation");
20475
20475
  qr([
20476
20476
  u()
20477
- ], Io.prototype, "xrDistanceDragFactor");
20477
+ ], Lo.prototype, "xrDistanceDragFactor");
20478
20478
  qr([
20479
20479
  u()
20480
- ], Io.prototype, "showGizmo");
20481
- let Sa = Io;
20480
+ ], Lo.prototype, "showGizmo");
20481
+ let Sa = Lo;
20482
20482
  class CE {
20483
20483
  handlerA;
20484
20484
  handlerB;
@@ -21120,7 +21120,7 @@ function EE(s, e) {
21120
21120
  return (s & 1 << e.layer) != 0;
21121
21121
  }
21122
21122
  const RE = /* @__PURE__ */ Symbol("stencils");
21123
- class ho {
21123
+ class uo {
21124
21124
  get name() {
21125
21125
  return "NEEDLE_render_objects";
21126
21126
  }
@@ -21128,8 +21128,8 @@ class ho {
21128
21128
  static applyStencil(e) {
21129
21129
  if (!e) return;
21130
21130
  const t = e.sourceId;
21131
- if (hp && console.log(t, ho.stencils), !t) return;
21132
- const i = ho.stencils[t];
21131
+ if (hp && console.log(t, uo.stencils), !t) return;
21132
+ const i = uo.stencils[t];
21133
21133
  if (i)
21134
21134
  for (let n = i.length - 1; n >= 0; n--) {
21135
21135
  const o = i[n];
@@ -21161,7 +21161,7 @@ class ho {
21161
21161
  if (n && Array.isArray(n))
21162
21162
  for (const o of n) {
21163
21163
  const r = { ...o };
21164
- r.compareFunc = TE(r.compareFunc), r.passOp = dp(r.passOp), r.failOp = dp(r.failOp), r.zFailOp = dp(r.zFailOp), ho.stencils[this.source] || (ho.stencils[this.source] = []), ho.stencils[this.source].push(r);
21164
+ r.compareFunc = TE(r.compareFunc), r.passOp = dp(r.passOp), r.failOp = dp(r.failOp), r.zFailOp = dp(r.zFailOp), uo.stencils[this.source] || (uo.stencils[this.source] = []), uo.stencils[this.source].push(r);
21165
21165
  }
21166
21166
  }
21167
21167
  }
@@ -21259,8 +21259,8 @@ class IE {
21259
21259
  this.meshToOriginalCallbacks.set(e, t);
21260
21260
  }
21261
21261
  }
21262
- const go = new IE();
21263
- class So {
21262
+ const yo = new IE();
21263
+ class Co {
21264
21264
  _overrides = [];
21265
21265
  _defines = {};
21266
21266
  _object = null;
@@ -21290,8 +21290,8 @@ class So {
21290
21290
  * ```
21291
21291
  */
21292
21292
  static get(e) {
21293
- let t = go.getBlock(e);
21294
- return t || (t = new So(e), go.setBlock(e, t), jE(e, t)), t;
21293
+ let t = yo.getBlock(e);
21294
+ return t || (t = new Co(e), yo.setBlock(e, t), jE(e, t)), t;
21295
21295
  }
21296
21296
  /**
21297
21297
  * Checks if an object has any property overrides
@@ -21299,7 +21299,7 @@ class So {
21299
21299
  * @returns True if the object has a property block with overrides
21300
21300
  */
21301
21301
  static hasOverrides(e) {
21302
- const t = go.getBlock(e);
21302
+ const t = yo.getBlock(e);
21303
21303
  return t ? t.hasOverrides() : !1;
21304
21304
  }
21305
21305
  /**
@@ -21307,7 +21307,7 @@ class So {
21307
21307
  * After calling dispose, this property block should not be used.
21308
21308
  */
21309
21309
  dispose() {
21310
- this._object && go.deleteBlock(this._object), this._overrides = [], this._object = null;
21310
+ this._object && yo.deleteBlock(this._object), this._overrides = [], this._object = null;
21311
21311
  }
21312
21312
  setOverride(e, t, i) {
21313
21313
  const n = this._overrides.find((o) => o.name === e);
@@ -21473,9 +21473,9 @@ class So {
21473
21473
  }
21474
21474
  const wd = /* @__PURE__ */ Symbol("originalValues"), xd = /* @__PURE__ */ Symbol("savedTextureTransforms");
21475
21475
  function Gg(s) {
21476
- let e = go.getBlock(s);
21476
+ let e = yo.getBlock(s);
21477
21477
  if (e) return { block: e, owner: s };
21478
- if (s.parent && s.parent.type === "Group" && (e = go.getBlock(s.parent), e))
21478
+ if (s.parent && s.parent.type === "Group" && (e = yo.getBlock(s.parent), e))
21479
21479
  return { block: e, owner: s.parent };
21480
21480
  }
21481
21481
  const Da = /* @__PURE__ */ Symbol("beforeRenderingFlag"), Sm = /* @__PURE__ */ new WeakMap(), Cm = /* @__PURE__ */ new WeakMap(), LE = function(s, e, t, i) {
@@ -21568,8 +21568,8 @@ function jE(s, e) {
21568
21568
  }) : (s.type === "Mesh" || s.type === "SkinnedMesh") && wb(s, s, e);
21569
21569
  }
21570
21570
  function wb(s, e, t) {
21571
- if (!go.isHooked(s, e)) {
21572
- if (go.addHook(s, e), s["needle:materialPropertyBlock"] = t, !s.onBeforeRender)
21571
+ if (!yo.isHooked(s, e)) {
21572
+ if (yo.addHook(s, e), s["needle:materialPropertyBlock"] = t, !s.onBeforeRender)
21573
21573
  s.onBeforeRender = bb;
21574
21574
  else {
21575
21575
  const i = s.onBeforeRender;
@@ -21625,7 +21625,7 @@ var FE = Object.defineProperty, zE = Object.getOwnPropertyDescriptor, $u = (s, e
21625
21625
  return i && n && FE(e, t, n), n;
21626
21626
  };
21627
21627
  const na = x("debugreflectionprobe"), xb = x("noreflectionprobe");
21628
- let ir = null;
21628
+ let nr = null;
21629
21629
  const UE = /* @__PURE__ */ Symbol("reflectionProbeKey"), th = class un extends R {
21630
21630
  static _probes = /* @__PURE__ */ new Map();
21631
21631
  static testBox = new zt();
@@ -21678,7 +21678,7 @@ const UE = /* @__PURE__ */ Symbol("reflectionProbeKey"), th = class un extends R
21678
21678
  if (this._texture !== e) {
21679
21679
  if (typeof e == "string") {
21680
21680
  na && console.debug(`[ReflectionProbe] Loading reflection probe texture from URL: ${e}`), this._textureUrlInFlight = e;
21681
- const t = Eo(this.sourceId, e);
21681
+ const t = Ro(this.sourceId, e);
21682
21682
  _w(t, this.context.renderer).then((i) => {
21683
21683
  this._textureUrlInFlight === e && i && (this._textureUrlInFlight = void 0, na && console.debug(`[ReflectionProbe] Successfully loaded reflection probe texture: ${e}`), this.texture = i);
21684
21684
  });
@@ -21698,7 +21698,7 @@ const UE = /* @__PURE__ */ Symbol("reflectionProbeKey"), th = class un extends R
21698
21698
  */
21699
21699
  __lightmapIntensityScale = !0;
21700
21700
  isInBox(e) {
21701
- return ir ??= new zt(), ir.setFromCenterAndSize(this.gameObject.worldPosition.add(this.center), this.size), Mi([e], void 0, void 0, un.testBox), un.testBox.isEmpty() ? ir.containsPoint(e.worldPosition) : ir?.intersectsBox(un.testBox);
21701
+ return nr ??= new zt(), nr.setFromCenterAndSize(this.gameObject.worldPosition.add(this.center), this.size), Mi([e], void 0, void 0, un.testBox), un.testBox.isEmpty() ? nr.containsPoint(e.worldPosition) : nr?.intersectsBox(un.testBox);
21702
21702
  }
21703
21703
  constructor() {
21704
21704
  super(), un._probes.has(this.context) || un._probes.set(this.context, []), un._probes.get(this.context)?.push(this);
@@ -21709,7 +21709,7 @@ const UE = /* @__PURE__ */ Symbol("reflectionProbeKey"), th = class un extends R
21709
21709
  }
21710
21710
  /** @internal */
21711
21711
  update() {
21712
- na && (ir ??= new zt(), ir.setFromCenterAndSize(this.gameObject.worldPosition.add(this.center), this.size), z.DrawWireBox3(ir, 5592320));
21712
+ na && (nr ??= new zt(), nr.setFromCenterAndSize(this.gameObject.worldPosition.add(this.center), this.size), z.DrawWireBox3(nr, 5592320));
21713
21713
  }
21714
21714
  /** @internal */
21715
21715
  onEnable() {
@@ -21739,7 +21739,7 @@ const UE = /* @__PURE__ */ Symbol("reflectionProbeKey"), th = class un extends R
21739
21739
  */
21740
21740
  apply(e) {
21741
21741
  if (xb || !this.enabled || !this.texture) return;
21742
- const t = So.get(e);
21742
+ const t = Co.get(e);
21743
21743
  t.setOverride("envMap", this.texture), t.setOverride("envMapRotation", this.gameObject.rotation);
21744
21744
  let i = this.intensity;
21745
21745
  this.__lightmapIntensityScale && t.getOverride("lightMap") && (i /= Math.PI), t.setOverride("envMapIntensity", i);
@@ -21751,7 +21751,7 @@ const UE = /* @__PURE__ */ Symbol("reflectionProbeKey"), th = class un extends R
21751
21751
  * @see {@link apply} for the corresponding method to apply the probe's influence to an object.
21752
21752
  */
21753
21753
  unapply(e) {
21754
- const t = So.get(e);
21754
+ const t = Co.get(e);
21755
21755
  t && t.getOverride("envMap")?.value === this.texture && (t.removeOveride("envMap"), t.removeOveride("envMapRotation"), t.removeOveride("envMapIntensity"));
21756
21756
  }
21757
21757
  };
@@ -21767,7 +21767,7 @@ $u([
21767
21767
  $u([
21768
21768
  u(_)
21769
21769
  ], th.prototype, "size", 2);
21770
- let ao = th;
21770
+ let lo = th;
21771
21771
  const up = x("debugexr");
21772
21772
  class NE {
21773
21773
  get name() {
@@ -22394,10 +22394,10 @@ class YE {
22394
22394
  g.side = vu;
22395
22395
  break;
22396
22396
  case 2:
22397
- g.side = Po;
22397
+ g.side = ko;
22398
22398
  break;
22399
22399
  default:
22400
- g.side = Po;
22400
+ g.side = ko;
22401
22401
  break;
22402
22402
  }
22403
22403
  switch (d._ZTest?.value) {
@@ -22480,7 +22480,7 @@ class JE {
22480
22480
  }
22481
22481
  async function Om(s, e, t, i) {
22482
22482
  const n = t.indexOf("?");
22483
- n >= 0 && (t = t.substring(0, n)), i || (i = t), (i.startsWith("blob:") || i.startsWith("data:")) && console.debug("[GLTFLoader] Suspicious sourceId detected"), s.register((o) => new HE(o)), s.register((o) => new Hk(o)), s.register((o) => new kO(o, e.lightmaps, i)), s.register((o) => new GE(o, i, e)), s.register((o) => new YE(o, i)), s.register((o) => new ho(o, i)), s.register((o) => new We(o)), s.register((o) => new NE(o)), s.register((o) => new XE(e, s, t, o)), vk() && s.register((o) => new Ea(o)), await ZE.catch((o) => {
22483
+ n >= 0 && (t = t.substring(0, n)), i || (i = t), (i.startsWith("blob:") || i.startsWith("data:")) && console.debug("[GLTFLoader] Suspicious sourceId detected"), s.register((o) => new HE(o)), s.register((o) => new Hk(o)), s.register((o) => new kO(o, e.lightmaps, i)), s.register((o) => new GE(o, i, e)), s.register((o) => new YE(o, i)), s.register((o) => new uo(o, i)), s.register((o) => new We(o)), s.register((o) => new NE(o)), s.register((o) => new XE(e, s, t, o)), vk() && s.register((o) => new Ea(o)), await ZE.catch((o) => {
22484
22484
  }), s.register((o) => {
22485
22485
  if (tu) {
22486
22486
  const r = new tu(o);
@@ -22945,7 +22945,7 @@ Texture:`, i), this.setLightmapDebugMaterial()) : Gh && console.log("Use debugli
22945
22945
  for (let i = 0; i < this.renderer.sharedMaterials.length; i++) {
22946
22946
  const n = this.renderer.sharedMaterials[i];
22947
22947
  if (!n || n.lightMap === void 0) continue;
22948
- Gh && console.log("Setting lightmap on material", n.name, "for renderer", this.renderer.name), So.get(this.gameObject).setOverride("lightMap", this.lightmapTexture, {
22948
+ Gh && console.log("Setting lightmap on material", n.name, "for renderer", this.renderer.name), Co.get(this.gameObject).setOverride("lightMap", this.lightmapTexture, {
22949
22949
  offset: new Z(t.z, 1 - t.y - t.w),
22950
22950
  repeat: new Z(t.x, t.y)
22951
22951
  }), n[kb] = !0;
@@ -22958,7 +22958,7 @@ Texture:`, i), this.setLightmapDebugMaterial()) : Gh && console.log("Use debugli
22958
22958
  if (!this._isApplied || !this.lightmapTexture) return;
22959
22959
  this.lightmapTexture.channel = 1;
22960
22960
  const e = this.lightmapScaleOffset;
22961
- So.get(this.gameObject).setOverride("lightMap", this.lightmapTexture, {
22961
+ Co.get(this.gameObject).setOverride("lightMap", this.lightmapTexture, {
22962
22962
  offset: new Z(e.z, 1 - e.y - e.w),
22963
22963
  repeat: new Z(e.x, e.y)
22964
22964
  });
@@ -22971,7 +22971,7 @@ Texture:`, i), this.setLightmapDebugMaterial()) : Gh && console.log("Use debugli
22971
22971
  const i = this.renderer.sharedMaterials[t];
22972
22972
  i && delete i[kb];
22973
22973
  }
22974
- const e = So.get(this.gameObject);
22974
+ const e = Co.get(this.gameObject);
22975
22975
  e && e.removeOveride("lightMap");
22976
22976
  }
22977
22977
  ensureLightmapUvs(e) {
@@ -23335,10 +23335,10 @@ const ts = class Sd extends R {
23335
23335
  }
23336
23336
  }
23337
23337
  onEnable() {
23338
- this.sharedMeshes, this.setVisibility(!0), this._isInstancingEnabled || this.enableInstancing == !0 || Array.isArray(this.enableInstancing) && this.enableInstancing.some((t) => t) ? this.__internalDidAwakeAndStart && this.setInstancingEnabled(!0) : this.enabled && this.applyStencil(), this.updateReflectionProbe(), ao.onEnabled.addEventListener(this.onReflectionProbeEnabled), ao.onDisabled.addEventListener(this.onReflectionProbeDisabled);
23338
+ this.sharedMeshes, this.setVisibility(!0), this._isInstancingEnabled || this.enableInstancing == !0 || Array.isArray(this.enableInstancing) && this.enableInstancing.some((t) => t) ? this.__internalDidAwakeAndStart && this.setInstancingEnabled(!0) : this.enabled && this.applyStencil(), this.updateReflectionProbe(), lo.onEnabled.addEventListener(this.onReflectionProbeEnabled), lo.onDisabled.addEventListener(this.onReflectionProbeDisabled);
23339
23339
  }
23340
23340
  onDisable() {
23341
- this.setVisibility(!1), ao.onEnabled.removeEventListener(this.onReflectionProbeEnabled), ao.onDisabled.removeEventListener(this.onReflectionProbeDisabled), this._handles && this._handles.length > 0 && this.setInstancingEnabled(!1);
23341
+ this.setVisibility(!1), lo.onEnabled.removeEventListener(this.onReflectionProbeEnabled), lo.onDisabled.removeEventListener(this.onReflectionProbeDisabled), this._handles && this._handles.length > 0 && this.setInstancingEnabled(!1);
23342
23342
  }
23343
23343
  onDestroy() {
23344
23344
  if (this._handles = null, this.isMultiMaterialObject(this.gameObject))
@@ -23378,7 +23378,7 @@ const ts = class Sd extends R {
23378
23378
  }
23379
23379
  if (this.reflectionProbeUsage !== 0 && this._reflectionProbe ? this._reflectionProbe.apply(this.gameObject) : this.reflectionProbeUsage === 0 && this._reflectionProbe && this._reflectionProbe.unapply(this.gameObject), this._sharedMaterials)
23380
23380
  for (const e of this._sharedMaterials)
23381
- e && "envMap" in e && "envMapIntensity" in e && !ao.isUsingReflectionProbe(e) && (e.envMap = this.context.scene.environment, e.envMapRotation = this.context.scene.environmentRotation);
23381
+ e && "envMap" in e && "envMapIntensity" in e && !lo.isUsingReflectionProbe(e) && (e.envMap = this.context.scene.environment, e.envMapRotation = this.context.scene.environmentRotation);
23382
23382
  else ga && console.warn("[Renderer] sharedMaterials not initialized yet: " + this.name);
23383
23383
  }
23384
23384
  }
@@ -23401,7 +23401,7 @@ const ts = class Sd extends R {
23401
23401
  }
23402
23402
  /** Applies stencil settings for this renderer's objects (if stencil settings are available) */
23403
23403
  applyStencil() {
23404
- ho.applyStencil(this);
23404
+ uo.applyStencil(this);
23405
23405
  }
23406
23406
  /** Apply the settings of this renderer to the given object
23407
23407
  * Settings include shadow casting and receiving (e.g. this.receiveShadows, this.shadowCastingMode)
@@ -23415,7 +23415,7 @@ const ts = class Sd extends R {
23415
23415
  }
23416
23416
  *_updateReflectionProbe() {
23417
23417
  const e = this.probeAnchor || this.gameObject, t = !!this.probeAnchor;
23418
- this._reflectionProbe = ao.get(e, this.context, t, this.probeAnchor);
23418
+ this._reflectionProbe = lo.get(e, this.context, t, this.probeAnchor);
23419
23419
  }
23420
23420
  setVisibility(e) {
23421
23421
  if (!this.isMultiMaterialObject(this.gameObject))
@@ -23472,7 +23472,7 @@ class Pw extends Wu {
23472
23472
  onAfterRender() {
23473
23473
  if (super.onAfterRender(), this._needUpdateBoundingSphere) {
23474
23474
  for (const e of this.sharedMeshes)
23475
- if (e instanceof _o) {
23475
+ if (e instanceof bo) {
23476
23476
  this._needUpdateBoundingSphere = !1;
23477
23477
  try {
23478
23478
  const t = e.geometry, i = Ov(e);
@@ -23484,7 +23484,7 @@ class Pw extends Wu {
23484
23484
  }
23485
23485
  if (Ob) {
23486
23486
  for (const e of this.sharedMeshes)
23487
- if (e instanceof _o && e.boundingSphere) {
23487
+ if (e instanceof bo && e.boundingSphere) {
23488
23488
  const t = U(e.boundingSphere.center).applyMatrix4(e.matrixWorld);
23489
23489
  z.DrawWireSphere(t, e.boundingSphere.radius, "red");
23490
23490
  }
@@ -23510,7 +23510,7 @@ class aR extends CustomEvent {
23510
23510
  }
23511
23511
  }
23512
23512
  const lR = "blob";
23513
- class Lo extends R {
23513
+ class Do extends R {
23514
23514
  dropArea;
23515
23515
  fitIntoVolume = !1;
23516
23516
  fitVolumeSize = new _(1, 1, 1);
@@ -23787,22 +23787,22 @@ class Lo extends R {
23787
23787
  }
23788
23788
  rl([
23789
23789
  u(M)
23790
- ], Lo.prototype, "dropArea");
23790
+ ], Do.prototype, "dropArea");
23791
23791
  rl([
23792
23792
  u()
23793
- ], Lo.prototype, "fitIntoVolume");
23793
+ ], Do.prototype, "fitIntoVolume");
23794
23794
  rl([
23795
23795
  u(_)
23796
- ], Lo.prototype, "fitVolumeSize");
23796
+ ], Do.prototype, "fitVolumeSize");
23797
23797
  rl([
23798
23798
  u()
23799
- ], Lo.prototype, "placeAtHitPosition");
23799
+ ], Do.prototype, "placeAtHitPosition");
23800
23800
  rl([
23801
23801
  u()
23802
- ], Lo.prototype, "useNetworking");
23802
+ ], Do.prototype, "useNetworking");
23803
23803
  rl([
23804
23804
  u(ce)
23805
- ], Lo.prototype, "onDropped");
23805
+ ], Do.prototype, "onDropped");
23806
23806
  function cR(s) {
23807
23807
  if (!s.startsWith("https://polyhaven.com/")) return s;
23808
23808
  const e = "https://dl.polyhaven.org/file/ph-assets/Models/gltf/4k/", n = new URL(s).pathname.split("/").pop(), o = `${e}${n}/${n}_4k.gltf`;
@@ -24843,7 +24843,7 @@ let OR = class {
24843
24843
  he.report("export-usdz", "Invoking onBeforeBuildDocument"), await Cd(i, "onBeforeBuildDocument"), he.report("export-usdz", "Done onBeforeBuildDocument"), he.report("export-usdz", "Reparent bones to common ancestor");
24844
24844
  const a = [], l = /* @__PURE__ */ new Set();
24845
24845
  e?.traverse((w) => {
24846
- if (!(!t.exportInvisible && !w.visible) && w instanceof _o) {
24846
+ if (!(!t.exportInvisible && !w.visible) && w instanceof bo) {
24847
24847
  const b = w.skeleton.bones, v = Dw(b);
24848
24848
  if (v) {
24849
24849
  const T = { object: w, originalParent: w.parent, newParent: v };
@@ -24921,9 +24921,9 @@ function Fw(s, e, t, i) {
24921
24921
  if (!t.exportInvisible && !s.visible) return;
24922
24922
  let n, o, r;
24923
24923
  const a = { position: s.position, quaternion: s.quaternion, scale: s.scale };
24924
- if (s.position.x === 0 && s.position.y === 0 && s.position.z === 0 && (a.position = null), s.quaternion.x === 0 && s.quaternion.y === 0 && s.quaternion.z === 0 && s.quaternion.w === 1 && (a.quaternion = null), s.scale.x === 1 && s.scale.y === 1 && s.scale.z === 1 && (a.scale = null), (s instanceof H || s instanceof _o) && (o = s.geometry, r = s.material), i && !i(s) && (o = void 0, r = void 0), (s instanceof H || s instanceof _o) && r && typeof r == "object" && (r instanceof pt || r instanceof Se || // material instanceof MeshPhysicalNodeMaterial ||
24924
+ if (s.position.x === 0 && s.position.y === 0 && s.position.z === 0 && (a.position = null), s.quaternion.x === 0 && s.quaternion.y === 0 && s.quaternion.z === 0 && s.quaternion.w === 1 && (a.quaternion = null), s.scale.x === 1 && s.scale.y === 1 && s.scale.z === 1 && (a.scale = null), (s instanceof H || s instanceof bo) && (o = s.geometry, r = s.material), i && !i(s) && (o = void 0, r = void 0), (s instanceof H || s instanceof bo) && r && typeof r == "object" && (r instanceof pt || r instanceof Se || // material instanceof MeshPhysicalNodeMaterial ||
24925
24925
  r.isMeshPhysicalNodeMaterial || r instanceof be && r.type === "MeshLineMaterial")) {
24926
- const l = Kh(s), c = s instanceof _o ? s : null;
24926
+ const l = Kh(s), c = s instanceof bo ? s : null;
24927
24927
  n = new lt(s.uuid, l, a, o, r, void 0, c, s.animations);
24928
24928
  } else if (s instanceof de || s instanceof fu) {
24929
24929
  const l = Kh(s);
@@ -27270,7 +27270,7 @@ class kr {
27270
27270
  this._quicklookButton = e, e.dataset.needle = "quicklook-button";
27271
27271
  const t = D.supportsQuickLookAR();
27272
27272
  let i = "View in AR";
27273
- D.isVisionOS() ? i = "View in AR" : (t || D.isiOS()) && (i = "Open in Quicklook"), e.innerText = i, e.prepend(Ft("view_in_ar")), wo.setElementPriority(e, GR);
27273
+ D.isVisionOS() ? i = "View in AR" : (t || D.isiOS()) && (i = "Open in Quicklook"), e.innerText = i, e.prepend(Ft("view_in_ar")), xo.setElementPriority(e, GR);
27274
27274
  let n = !1, o = null;
27275
27275
  return e.addEventListener("click", () => {
27276
27276
  o = Qc(Es), o || (n = !0, o = new Es()), n && (o.objectToExport = N.Current.scene), o ? (e.classList.add("this-mode-is-requested"), o.exportAndOpen().then(() => {
@@ -27290,7 +27290,7 @@ class kr {
27290
27290
  createARButton(e) {
27291
27291
  if (this._arButton) return this._arButton;
27292
27292
  const t = "immersive-ar", i = document.createElement("button");
27293
- return this._arButton = i, i.classList.add("webxr-button"), i.dataset.needle = "webxr-ar-button", i.innerText = "Enter AR", i.prepend(Ft("view_in_ar")), i.title = "Click to start an AR session", i.addEventListener("click", () => K.start(t, e)), wo.setElementPriority(i, qR), this.updateSessionSupported(i, t), this.listenToXRSessionState(i, t), this.hideElementDuringXRSession(i), this.isSecureConnection || (i.disabled = !0, i.title = "WebXR requires a secure connection (HTTPS)"), D.isMozillaXR() || navigator.xr?.addEventListener("devicechange", () => this.updateSessionSupported(i, t)), i;
27293
+ return this._arButton = i, i.classList.add("webxr-button"), i.dataset.needle = "webxr-ar-button", i.innerText = "Enter AR", i.prepend(Ft("view_in_ar")), i.title = "Click to start an AR session", i.addEventListener("click", () => K.start(t, e)), xo.setElementPriority(i, qR), this.updateSessionSupported(i, t), this.listenToXRSessionState(i, t), this.hideElementDuringXRSession(i), this.isSecureConnection || (i.disabled = !0, i.title = "WebXR requires a secure connection (HTTPS)"), D.isMozillaXR() || navigator.xr?.addEventListener("devicechange", () => this.updateSessionSupported(i, t)), i;
27294
27294
  }
27295
27295
  /** get or create the WebXR VR button
27296
27296
  * @param init optional session init options
@@ -27302,7 +27302,7 @@ class kr {
27302
27302
  createVRButton(e) {
27303
27303
  if (this._vrButton) return this._vrButton;
27304
27304
  const t = "immersive-vr", i = document.createElement("button");
27305
- return this._vrButton = i, i.classList.add("webxr-button"), i.dataset.needle = "webxr-vr-button", i.innerText = "Enter VR", i.prepend(Ft("panorama_photosphere")), i.title = "Click to start a VR session", i.addEventListener("click", () => K.start(t, e)), wo.setElementPriority(i, HR), this.updateSessionSupported(i, t), this.listenToXRSessionState(i, t), this.hideElementDuringXRSession(i), this.isSecureConnection || (i.disabled = !0, i.title = "WebXR requires a secure connection (HTTPS)"), D.isMozillaXR() || navigator.xr?.addEventListener("devicechange", () => this.updateSessionSupported(i, t)), i;
27305
+ return this._vrButton = i, i.classList.add("webxr-button"), i.dataset.needle = "webxr-vr-button", i.innerText = "Enter VR", i.prepend(Ft("panorama_photosphere")), i.title = "Click to start a VR session", i.addEventListener("click", () => K.start(t, e)), xo.setElementPriority(i, HR), this.updateSessionSupported(i, t), this.listenToXRSessionState(i, t), this.hideElementDuringXRSession(i), this.isSecureConnection || (i.disabled = !0, i.title = "WebXR requires a secure connection (HTTPS)"), D.isMozillaXR() || navigator.xr?.addEventListener("devicechange", () => this.updateSessionSupported(i, t)), i;
27306
27306
  }
27307
27307
  /** get or create the Send To Quest button
27308
27308
  * Behaviour of the button:
@@ -27381,7 +27381,7 @@ class KR {
27381
27381
  function qw(s) {
27382
27382
  s && (s.colorSpace != Is && (s.colorSpace = Is, s.needsUpdate = !0), s.minFilter == Td && s.magFilter == Td && (s.anisotropy = 1, s.needsUpdate = !0));
27383
27383
  }
27384
- let Do = class {
27384
+ let jo = class {
27385
27385
  constructor(e) {
27386
27386
  e && (this.texture = e, this.triangles = [0, 1, 2, 0, 2, 3], this.uv = [{ x: 0, y: 0 }, { x: 1, y: 0 }, { x: 1, y: 1 }, { x: 0, y: 1 }], this.vertices = [{ x: -0.5, y: -0.5 }, { x: 0.5, y: -0.5 }, { x: 0.5, y: 0.5 }, { x: -0.5, y: 0.5 }]);
27387
27387
  }
@@ -27420,19 +27420,19 @@ let Do = class {
27420
27420
  };
27421
27421
  _t([
27422
27422
  u()
27423
- ], Do.prototype, "guid", 2);
27423
+ ], jo.prototype, "guid", 2);
27424
27424
  _t([
27425
27425
  u(xe)
27426
- ], Do.prototype, "texture", 2);
27426
+ ], jo.prototype, "texture", 2);
27427
27427
  _t([
27428
27428
  et()
27429
- ], Do.prototype, "triangles", 2);
27429
+ ], jo.prototype, "triangles", 2);
27430
27430
  _t([
27431
27431
  et()
27432
- ], Do.prototype, "uv", 2);
27432
+ ], jo.prototype, "uv", 2);
27433
27433
  _t([
27434
27434
  et()
27435
- ], Do.prototype, "vertices", 2);
27435
+ ], jo.prototype, "vertices", 2);
27436
27436
  const yp = /* @__PURE__ */ Symbol("spriteOwner");
27437
27437
  class Uc {
27438
27438
  sprites;
@@ -27441,7 +27441,7 @@ class Uc {
27441
27441
  }
27442
27442
  }
27443
27443
  _t([
27444
- u(Do)
27444
+ u(jo)
27445
27445
  ], Uc.prototype, "sprites", 2);
27446
27446
  const ty = class Am {
27447
27447
  static create() {
@@ -27540,7 +27540,7 @@ class Ri extends R {
27540
27540
  if (typeof e == "number") {
27541
27541
  const t = Math.round(e);
27542
27542
  vc && console.log("[SpriteSheet] Set index to " + t + " (was " + this.spriteIndex + ")", e), this.spriteIndex = t;
27543
- } else e instanceof Do ? (this._spriteSheet || (this._spriteSheet = wc.create()), this._spriteSheet.sprite != e && (this._spriteSheet.sprite = e), this.updateSprite()) : e != this._spriteSheet && (this._spriteSheet = e, this.updateSprite());
27543
+ } else e instanceof jo ? (this._spriteSheet || (this._spriteSheet = wc.create()), this._spriteSheet.sprite != e && (this._spriteSheet.sprite = e), this.updateSprite()) : e != this._spriteSheet && (this._spriteSheet = e, this.updateSprite());
27544
27544
  }
27545
27545
  /**
27546
27546
  * Set the index of the sprite to be rendered in the currently assigned sprite sheet
@@ -28011,7 +28011,7 @@ class su {
28011
28011
  e *= -1, this._tempMatrix.makeRotationY(e), this.offset.premultiply(this._tempMatrix), e !== 0 && (this._hasChanged = !0);
28012
28012
  }
28013
28013
  }
28014
- const uo = x("debugautosync"), _p = /* @__PURE__ */ Symbol("syncerId");
28014
+ const fo = x("debugautosync"), _p = /* @__PURE__ */ Symbol("syncerId");
28015
28015
  class JR {
28016
28016
  _syncers = {};
28017
28017
  getOrCreateSyncer(e) {
@@ -28049,7 +28049,7 @@ class eT {
28049
28049
  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);
28050
28050
  }
28051
28051
  notifyChanged(e, t) {
28052
- this._isReceiving || (uo && console.log("Property changed: " + e, t), this.hasChanges = !0, this.changedProperties[e] = t);
28052
+ this._isReceiving || (fo && console.log("Property changed: " + e, t), this.hasChanges = !0, this.changedProperties[e] = t);
28053
28053
  }
28054
28054
  onHandleSending = () => {
28055
28055
  if (!this.hasChanges) return;
@@ -28062,11 +28062,11 @@ class eT {
28062
28062
  }
28063
28063
  for (const t in this.changedProperties) {
28064
28064
  const i = this.changedProperties[t];
28065
- uo && console.log("SEND", this.comp.guid, this.networkingKey), e.send(this.networkingKey, { guid: this.comp.guid, property: t, data: i }, Fn.Queued), delete this.changedProperties[t];
28065
+ fo && console.log("SEND", this.comp.guid, this.networkingKey), e.send(this.networkingKey, { guid: this.comp.guid, property: t, data: i }, Fn.Queued), delete this.changedProperties[t];
28066
28066
  }
28067
28067
  };
28068
28068
  onHandleReceiving = (e) => {
28069
- if (uo && console.log("SYNCFIELD RECEIVE", this.comp.name, this.comp.guid, e), !!this._isInit && this.comp && e.guid === this.comp.guid)
28069
+ if (fo && console.log("SYNCFIELD RECEIVE", this.comp.name, this.comp.guid, e), !!this._isInit && this.comp && e.guid === this.comp.guid)
28070
28070
  try {
28071
28071
  this._isReceiving = !0, this.comp[e.property] = e.data;
28072
28072
  } catch (t) {
@@ -28096,13 +28096,13 @@ const Xw = function(s = null) {
28096
28096
  let i = "";
28097
28097
  typeof t == "string" ? i = t : i = t.name;
28098
28098
  let n = null, o;
28099
- typeof s == "string" ? o = e[s] : typeof s == "function" && (o = s), o == null && (L() || uo) && s != null && console.warn('syncField: no callback function found for property "' + i + '"', '"' + s + '"');
28099
+ typeof s == "string" ? o = e[s] : typeof s == "function" && (o = s), o == null && (L() || fo) && s != null && console.warn('syncField: no callback function found for property "' + i + '"', '"' + s + '"');
28100
28100
  const r = e, a = r.__internalAwake;
28101
28101
  if (typeof a != "function") {
28102
- (uo || L()) && console.error('@syncField can currently only used on Needle Engine Components, custom object of type "' + e?.constructor?.name + '" is not supported', e);
28102
+ (fo || L()) && console.error('@syncField can currently only used on Needle Engine Components, custom object of type "' + e?.constructor?.name + '" is not supported', e);
28103
28103
  return;
28104
28104
  }
28105
- uo && console.log(i);
28105
+ fo && console.log(i);
28106
28106
  const l = Symbol(i);
28107
28107
  r.__internalAwake = function() {
28108
28108
  if (this[l] !== void 0)
@@ -28113,13 +28113,13 @@ const Xw = function(s = null) {
28113
28113
  set: function(f) {
28114
28114
  const p = this[l];
28115
28115
  if (this[l] = f, d) {
28116
- (L() || uo) && console.warn("Recursive call detected", i);
28116
+ (L() || fo) && console.warn("Recursive call detected", i);
28117
28117
  return;
28118
28118
  }
28119
28119
  d = !0;
28120
28120
  try {
28121
28121
  const g = tT(f, p);
28122
- uo && console.log("SyncField assignment", i, "changed?", g, f, o), g && o?.call(this, f, p) !== !1 && iT(this)?.notifyChanged(i, f);
28122
+ fo && console.log("SyncField assignment", i, "changed?", g, f, o), g && o?.call(this, f, p) !== !1 && iT(this)?.notifyChanged(i, f);
28123
28123
  } finally {
28124
28124
  d = !1;
28125
28125
  }
@@ -28340,7 +28340,7 @@ const Im = class kt extends R {
28340
28340
  }
28341
28341
  /** @internal */
28342
28342
  async start() {
28343
- Yt && console.log("PLAYERSTATE.START, owner: " + this.owner, this.context.connection.usersInRoom([])), this.owner ? (this.context.connection.isInRoom || await ko(300), this.context.connection.userIsInRoom(this.owner) == !1 && (Yt && 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 || (Yt && console.warn("PlayerState.start → owner is undefined!", this.name), setTimeout(() => {
28343
+ Yt && console.log("PLAYERSTATE.START, owner: " + this.owner, this.context.connection.usersInRoom([])), this.owner ? (this.context.connection.isInRoom || await Oo(300), this.context.connection.userIsInRoom(this.owner) == !1 && (Yt && 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 || (Yt && console.warn("PlayerState.start → owner is undefined!", this.name), setTimeout(() => {
28344
28344
  !this.destroyed && !this.owner ? this.dontDestroy ? Yt && console.warn("PlayerState.start → owner is still undefined but dontDestroy is set to true", this.name) : (Yt && console.warn(`PlayerState.start → owner is still undefined: destroying "${this.name}" instance now`), this.doDestroy()) : Yt && console.log("PlayerState.start → owner is assigned", this.owner);
28345
28345
  }, 2e3));
28346
28346
  }
@@ -28433,7 +28433,7 @@ class Lr extends R {
28433
28433
  const t = yn.getFor(this);
28434
28434
  if (t?.owner) {
28435
28435
  const i = this.gameObject.addComponent(Fe);
28436
- i.avatar = this.gameObject, i.connectionId = t.owner, this.context.players.setPlayerView(t.owner, this.head?.asset, vo.Headset);
28436
+ i.avatar = this.gameObject, i.connectionId = t.owner, this.context.players.setPlayerView(t.owner, this.head?.asset, wo.Headset);
28437
28437
  } else this.context.connection.isConnected ? console.error("No player state found for avatar", this) : t && !this.context.connection.isConnected && (t.dontDestroy = !0);
28438
28438
  }
28439
28439
  onLeaveXR(e) {
@@ -28547,7 +28547,7 @@ var lT = Object.defineProperty, Ku = (s, e, t, i) => {
28547
28547
  return n && lT(e, t, n), n;
28548
28548
  };
28549
28549
  const Ys = x("debugwebxr"), Ks = new Array();
28550
- class Mo extends R {
28550
+ class Eo extends R {
28551
28551
  createControllerModel = !0;
28552
28552
  createHandModel = !0;
28553
28553
  customLeftHand;
@@ -28678,19 +28678,19 @@ class Mo extends R {
28678
28678
  }
28679
28679
  Ku([
28680
28680
  u()
28681
- ], Mo.prototype, "createControllerModel");
28681
+ ], Eo.prototype, "createControllerModel");
28682
28682
  Ku([
28683
28683
  u()
28684
- ], Mo.prototype, "createHandModel");
28684
+ ], Eo.prototype, "createHandModel");
28685
28685
  Ku([
28686
28686
  u(ne)
28687
- ], Mo.prototype, "customLeftHand");
28687
+ ], Eo.prototype, "customLeftHand");
28688
28688
  Ku([
28689
28689
  u(ne)
28690
- ], Mo.prototype, "customRightHand");
28690
+ ], Eo.prototype, "customRightHand");
28691
28691
  class sy extends R {
28692
28692
  }
28693
- var cT = Object.defineProperty, jo = (s, e, t, i) => {
28693
+ var cT = Object.defineProperty, Bo = (s, e, t, i) => {
28694
28694
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
28695
28695
  (r = s[o]) && (n = r(e, t, n) || n);
28696
28696
  return n && cT(e, t, n), n;
@@ -28913,28 +28913,28 @@ class en extends R {
28913
28913
  return e.material = o, e;
28914
28914
  }
28915
28915
  }
28916
- jo([
28916
+ Bo([
28917
28917
  u()
28918
28918
  ], en.prototype, "movementSpeed");
28919
- jo([
28919
+ Bo([
28920
28920
  u()
28921
28921
  ], en.prototype, "rotationStep");
28922
- jo([
28922
+ Bo([
28923
28923
  u()
28924
28924
  ], en.prototype, "useTeleport");
28925
- jo([
28925
+ Bo([
28926
28926
  u()
28927
28927
  ], en.prototype, "usePinchToTeleport");
28928
- jo([
28928
+ Bo([
28929
28929
  u()
28930
28930
  ], en.prototype, "useTeleportTarget");
28931
- jo([
28931
+ Bo([
28932
28932
  u()
28933
28933
  ], en.prototype, "useTeleportFade");
28934
- jo([
28934
+ Bo([
28935
28935
  u()
28936
28936
  ], en.prototype, "showRays");
28937
- jo([
28937
+ Bo([
28938
28938
  u()
28939
28939
  ], en.prototype, "showHits");
28940
28940
  const hT = new _(0, 1, 0);
@@ -29118,8 +29118,8 @@ const Bl = x("debugwebxr"), uT = x("debugusdz"), dt = class _a extends R {
29118
29118
  }
29119
29119
  /** Call to enable or disable default controller rendering */
29120
29120
  setDefaultControllerRenderingEnabled(e) {
29121
- let t = this.gameObject.getComponent(Mo);
29122
- return !t && e && (t = this.gameObject.addComponent(Mo), this._createdComponentsInSession.push(t), t.createControllerModel = this.showControllerModels, t.createHandModel == this.showHandModels), t && (t.enabled = e), t;
29121
+ let t = this.gameObject.getComponent(Eo);
29122
+ return !t && e && (t = this.gameObject.addComponent(Eo), this._createdComponentsInSession.push(t), t.createControllerModel = this.showControllerModels, t.createHandModel == this.showHandModels), t && (t.enabled = e), t;
29123
29123
  }
29124
29124
  /**
29125
29125
  * Creates and instantiates the user's avatar representation in the WebXR session.
@@ -29458,7 +29458,7 @@ class Zw {
29458
29458
  } else if (a instanceof Vg) {
29459
29459
  const f = a;
29460
29460
  l.appendLine('token shapeType = "Box"'), l.appendLine(`float3 extent = (${f.size.x}, ${f.size.y}, ${f.size.z})`);
29461
- } else if (a instanceof Oo) {
29461
+ } else if (a instanceof Mo) {
29462
29462
  const f = a;
29463
29463
  l.appendLine('token shapeType = "Capsule"'), l.appendLine(`float radius = ${f.radius}`), l.appendLine(`float height = ${f.height}`);
29464
29464
  } else if (a instanceof Hr && a.sharedMesh?.geometry) {
@@ -29806,7 +29806,7 @@ var bT = Object.defineProperty, vT = Object.getOwnPropertyDescriptor, tx = (s, e
29806
29806
  (r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
29807
29807
  return i && n && bT(e, t, n), n;
29808
29808
  };
29809
- const nr = {
29809
+ const sr = {
29810
29810
  backgroundColor: new re(1, 1, 1),
29811
29811
  backgroundOpacity: 1,
29812
29812
  borderColor: new re(1, 1, 1),
@@ -29831,13 +29831,13 @@ const nr = {
29831
29831
  sRGBColor = new re(1, 0, 1);
29832
29832
  onColorChanged() {
29833
29833
  if (this.uiObject) {
29834
- this.sRGBColor.copy(this._color), this.sRGBColor.convertLinearToSRGB(), nr.backgroundColor = this.sRGBColor, nr.backgroundOpacity = this._color.alpha;
29834
+ this.sRGBColor.copy(this._color), this.sRGBColor.convertLinearToSRGB(), sr.backgroundColor = this.sRGBColor, sr.backgroundOpacity = this._color.alpha;
29835
29835
  const e = this.uiObject._simpleState__activeStates?.[0];
29836
29836
  if (e) {
29837
29837
  const t = this.uiObject._simpleState__states?.[e];
29838
- t && ("backgroundColor" in t && (nr.backgroundColor = t.backgroundColor), "backgroundOpacity" in t && (nr.backgroundOpacity = t.backgroundOpacity));
29838
+ t && ("backgroundColor" in t && (sr.backgroundColor = t.backgroundColor), "backgroundOpacity" in t && (sr.backgroundOpacity = t.backgroundOpacity));
29839
29839
  }
29840
- nr.backgroundOpacity *= this._alphaFactor, this.applyEffects(nr, this._alphaFactor), this.uiObject.set(nr), this.markDirty();
29840
+ sr.backgroundOpacity *= this._alphaFactor, this.applyEffects(sr, this._alphaFactor), this.uiObject.set(sr), this.markDirty();
29841
29841
  }
29842
29842
  }
29843
29843
  // used via animations
@@ -29939,7 +29939,7 @@ var wT = Object.defineProperty, xT = Object.getOwnPropertyDescriptor, Ws = (s, e
29939
29939
  (r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
29940
29940
  return i && n && wT(e, t, n), n;
29941
29941
  };
29942
- const sr = x("debugtext");
29942
+ const Zs = x("debugtext");
29943
29943
  var ot = /* @__PURE__ */ ((s) => (s[s.UpperLeft = 0] = "UpperLeft", s[s.UpperCenter = 1] = "UpperCenter", s[s.UpperRight = 2] = "UpperRight", s[s.MiddleLeft = 3] = "MiddleLeft", s[s.MiddleCenter = 4] = "MiddleCenter", s[s.MiddleRight = 5] = "MiddleRight", s[s.LowerLeft = 6] = "LowerLeft", s[s.LowerCenter = 7] = "LowerCenter", s[s.LowerRight = 8] = "LowerRight", s))(ot || {}), ix = /* @__PURE__ */ ((s) => (s[s.Normal = 0] = "Normal", s[s.Bold = 1] = "Bold", s[s.Italic = 2] = "Italic", s[s.BoldAndItalic = 3] = "BoldAndItalic", s))(ix || {});
29944
29944
  class ni extends Ju {
29945
29945
  alignment = 0;
@@ -29947,7 +29947,14 @@ class ni extends Ju {
29947
29947
  horizontalOverflow = 0;
29948
29948
  lineSpacing = 1;
29949
29949
  supportRichText = !1;
29950
- font;
29950
+ set font(e) {
29951
+ e !== this._font && (this._font = e, this._assignedAtRuntime = this.__didAwake);
29952
+ }
29953
+ get font() {
29954
+ return this._font;
29955
+ }
29956
+ _font = null;
29957
+ _assignedAtRuntime = !0;
29951
29958
  fontStyle = 0;
29952
29959
  // private _alphaFactor : number = 1;
29953
29960
  setAlphaFactor(e) {
@@ -29989,9 +29996,9 @@ class ni extends Ju {
29989
29996
  e && (e._needsUpdate = !0);
29990
29997
  }
29991
29998
  onCreate(e) {
29992
- sr && console.log(this), this.horizontalOverflow == 1 && (e.whiteSpace = "pre"), this.verticalOverflow == 0 && (this.context.renderer.localClippingEnabled = !0, e.overflow = "hidden"), this.horizontalOverflow == 1 && this.verticalOverflow == 0, e.lineHeight = this.lineSpacing, delete e.backgroundOpacity, delete e.backgroundColor, sr && (e.backgroundColor = 16750848, e.backgroundOpacity = 0.5);
29999
+ Zs && console.log(this), this.horizontalOverflow == 1 && (e.whiteSpace = "pre"), this.verticalOverflow == 0 && (this.context.renderer.localClippingEnabled = !0, e.overflow = "hidden"), this.horizontalOverflow == 1 && this.verticalOverflow == 0, e.lineHeight = this.lineSpacing, delete e.backgroundOpacity, delete e.backgroundColor, Zs && (e.backgroundColor = 16750848, e.backgroundOpacity = 0.5);
29993
30000
  const t = this.rectTransform;
29994
- e = { ...e, ...this.getTextOpts() }, this.getAlignment(e), sr && (e.backgroundColor = Math.random() * 16777215, e.backgroundOpacity = 0.1), this.uiObject = t.createNewText(e), this.feedText(this.text, this.supportRichText);
30001
+ e = { ...e, ...this.getTextOpts() }, this.getAlignment(e), Zs && (e.backgroundColor = Math.random() * 16777215, e.backgroundOpacity = 0.1), this.uiObject = t.createNewText(e), this.feedText(this.text, this.supportRichText);
29995
30002
  }
29996
30003
  onAfterAddedToScene() {
29997
30004
  super.onAfterAddedToScene(), this.handleTextRenderOnTop();
@@ -30062,7 +30069,7 @@ class ni extends Ju {
30062
30069
  return e;
30063
30070
  }
30064
30071
  feedText(e, t) {
30065
- if (sr && console.log("feedText", this.uiObject, e, t), !!this.uiObject)
30072
+ if (Zs && console.log("feedText", this.uiObject, e, t), !!this.uiObject)
30066
30073
  if (this._textMeshUi || (this._textMeshUi = []), this.uiObject.children.length = 0, !t || e.length === 0)
30067
30074
  this.uiObject.textContent = e;
30068
30075
  else {
@@ -30179,9 +30186,12 @@ class ni extends Ju {
30179
30186
  * @private
30180
30187
  */
30181
30188
  setFont(e, t) {
30182
- if (!this.font) return;
30189
+ if (!this.font) {
30190
+ Zs && console.warn("No font set for Text component, skipping font setup");
30191
+ return;
30192
+ }
30183
30193
  const i = this.font, n = this.getFamilyNameWithCorrectSuffix(i, t);
30184
- sr && console.log("Selected font family:" + n);
30194
+ Zs && console.log("Selected font family:" + n, this.font);
30185
30195
  let o = Ky.getFontFamily(n);
30186
30196
  switch (o || (o = Ky.addFontFamily(n)), e.fontFamily = o, t) {
30187
30197
  default:
@@ -30208,25 +30218,26 @@ class ni extends Ju {
30208
30218
  }
30209
30219
  }
30210
30220
  getFamilyNameWithCorrectSuffix(e, t) {
30211
- (e.startsWith("https:") || e.startsWith("http:")) && (e = new URL(e).pathname);
30212
- const i = e.lastIndexOf("-");
30213
- if (i < 0) return e;
30214
- const n = e.substring(i + 1)?.toLowerCase();
30215
- if (ST.includes(n))
30216
- return sr && console.warn("Unsupported font style: " + n), e;
30217
- const o = e.lastIndexOf("/");
30218
- let r = e;
30219
- o >= 0 && (r = r.substring(o + 1));
30220
- const a = r[0] === r[0].toUpperCase(), l = e.substring(0, i > o ? i : e.length);
30221
- switch (sr && console.log("Select font: ", e, ix[t], r, a, l), t) {
30221
+ const i = e.startsWith("https:") || e.startsWith("http:"), n = e.lastIndexOf("-");
30222
+ if (n < 0) return e;
30223
+ const o = e.substring(n + 1)?.toLowerCase();
30224
+ if (ST.includes(o))
30225
+ return Zs && console.warn("Unsupported font style: " + o), e;
30226
+ const r = e.lastIndexOf("/");
30227
+ let a = e;
30228
+ r >= 0 && (a = a.substring(r + 1));
30229
+ const l = a[0] === a[0].toUpperCase(), c = e.substring(0, n > r ? n : e.length);
30230
+ if (Zs && console.log("Select font: ", e, ix[t], a, l, c), i && this._assignedAtRuntime && !(e.endsWith("-msdf.json") || e.endsWith(".png")))
30231
+ return c;
30232
+ switch (t) {
30222
30233
  case 0:
30223
- return a ? l + "-Regular" : l + "-regular";
30234
+ return l ? c + "-Regular" : c + "-regular";
30224
30235
  case 1:
30225
- return a ? l + "-Bold" : l + "-bold";
30236
+ return l ? c + "-Bold" : c + "-bold";
30226
30237
  case 2:
30227
- return a ? l + "-Italic" : l + "-italic";
30238
+ return l ? c + "-Italic" : c + "-italic";
30228
30239
  case 3:
30229
- return a ? l + "-BoldItalic" : l + "-bolditalic";
30240
+ return l ? c + "-BoldItalic" : c + "-bolditalic";
30230
30241
  default:
30231
30242
  return e;
30232
30243
  }
@@ -30249,7 +30260,7 @@ Ws([
30249
30260
  ], ni.prototype, "supportRichText", 2);
30250
30261
  Ws([
30251
30262
  u(URL)
30252
- ], ni.prototype, "font", 2);
30263
+ ], ni.prototype, "font", 1);
30253
30264
  Ws([
30254
30265
  u()
30255
30266
  ], ni.prototype, "fontStyle", 2);
@@ -30505,7 +30516,7 @@ tt([
30505
30516
  tt([
30506
30517
  u()
30507
30518
  ], Ti.prototype, "preferredWidth");
30508
- class Bo extends Ti {
30519
+ class Fo extends Ti {
30509
30520
  childControlHeight = !0;
30510
30521
  childControlWidth = !0;
30511
30522
  childForceExpandHeight = !1;
@@ -30556,28 +30567,28 @@ class Bo extends Ti {
30556
30567
  }
30557
30568
  tt([
30558
30569
  u()
30559
- ], Bo.prototype, "childControlHeight");
30570
+ ], Fo.prototype, "childControlHeight");
30560
30571
  tt([
30561
30572
  u()
30562
- ], Bo.prototype, "childControlWidth");
30573
+ ], Fo.prototype, "childControlWidth");
30563
30574
  tt([
30564
30575
  u()
30565
- ], Bo.prototype, "childForceExpandHeight");
30576
+ ], Fo.prototype, "childForceExpandHeight");
30566
30577
  tt([
30567
30578
  u()
30568
- ], Bo.prototype, "childForceExpandWidth");
30579
+ ], Fo.prototype, "childForceExpandWidth");
30569
30580
  tt([
30570
30581
  u()
30571
- ], Bo.prototype, "childScaleHeight");
30582
+ ], Fo.prototype, "childScaleHeight");
30572
30583
  tt([
30573
30584
  u()
30574
- ], Bo.prototype, "childScaleWidth");
30575
- class sx extends Bo {
30585
+ ], Fo.prototype, "childScaleWidth");
30586
+ class sx extends Fo {
30576
30587
  get primaryAxis() {
30577
30588
  return "y";
30578
30589
  }
30579
30590
  }
30580
- class ox extends Bo {
30591
+ class ox extends Fo {
30581
30592
  get primaryAxis() {
30582
30593
  return "x";
30583
30594
  }
@@ -31501,7 +31512,7 @@ var NT = Object.defineProperty, $T = Object.getOwnPropertyDescriptor, Ai = (s, e
31501
31512
  function la(s) {
31502
31513
  return s * Math.PI / 180;
31503
31514
  }
31504
- const $b = 300, Zs = x("debuglights");
31515
+ const $b = 300, Js = x("debuglights");
31505
31516
  class Vt extends R {
31506
31517
  type = 0;
31507
31518
  get range() {
@@ -31570,7 +31581,7 @@ class Vt extends R {
31570
31581
  _shadows = 1;
31571
31582
  lightmapBakeType = 4;
31572
31583
  set intensity(e) {
31573
- this._intensity = e, this.light && (this.light.intensity = e), Zs && console.log("Set light intensity to " + this._intensity, e, this);
31584
+ this._intensity = e, this.light && (this.light.intensity = e), Js && console.log("Set light intensity to " + this._intensity, e, this);
31574
31585
  }
31575
31586
  get intensity() {
31576
31587
  return this._intensity;
@@ -31635,13 +31646,13 @@ class Vt extends R {
31635
31646
  return this.light ? this.type === 1 ? this.light.getWorldPosition(e).multiplyScalar(1) : this.light.getWorldPosition(e) : e;
31636
31647
  }
31637
31648
  awake() {
31638
- this.color = new re(this.color ?? 16777215), Zs && console.log(this.name, this);
31649
+ this.color = new re(this.color ?? 16777215), Js && console.log(this.name, this);
31639
31650
  }
31640
31651
  onEnable() {
31641
- Zs && console.log("ENABLE LIGHT", this.name), this.createLight(), !this.isBaked && (this.light && (this.light.visible = !0, this.light.intensity = this._intensity, Zs && 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));
31652
+ Js && console.log("ENABLE LIGHT", this.name), this.createLight(), !this.isBaked && (this.light && (this.light.visible = !0, this.light.intensity = this._intensity, Js && 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));
31642
31653
  }
31643
31654
  onDisable() {
31644
- Zs && console.log("DISABLE LIGHT", this.name), this.light && (this.selfIsLight ? this.light.intensity = 0 : this.light.visible = !1);
31655
+ Js && console.log("DISABLE LIGHT", this.name), this.light && (this.selfIsLight ? this.light.intensity = 0 : this.light.visible = !1);
31645
31656
  }
31646
31657
  /**
31647
31658
  * Creates the appropriate three.js light based on the configured light type
@@ -31655,7 +31666,7 @@ class Vt extends R {
31655
31666
  switch (this.type) {
31656
31667
  case 1:
31657
31668
  const t = new Np(this.color, this.intensity * Math.PI);
31658
- if (t.position.set(0, 0, -$b * 0.5).applyQuaternion(this.gameObject.quaternion), this.gameObject.add(t.target), Wa(t.target, 0, 0, 0), this.light = t, this.gameObject.position.set(0, 0, 0), this.gameObject.rotation.set(0, 0, 0), Zs) {
31669
+ if (t.position.set(0, 0, -$b * 0.5).applyQuaternion(this.gameObject.quaternion), this.gameObject.add(t.target), Wa(t.target, 0, 0, 0), this.light = t, this.gameObject.position.set(0, 0, 0), this.gameObject.rotation.set(0, 0, 0), Js) {
31659
31670
  const r = new oC(this.light, 0.2, this.color);
31660
31671
  this.context.scene.add(r);
31661
31672
  }
@@ -31673,7 +31684,7 @@ class Vt extends R {
31673
31684
  }
31674
31685
  if (this.light) {
31675
31686
  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) {
31676
- 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), Zs && 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();
31687
+ 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), Js && 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();
31677
31688
  const t = this.light.shadow.camera;
31678
31689
  if (t.near = this.shadowNearPlane, this._shadowDistance !== void 0 && typeof this._shadowDistance == "number" ? t.far = this._shadowDistance : t.far = $b * Math.abs(this.gameObject.scale.z), this.gameObject.scale.set(1, 1, 1), this.shadowWidth !== void 0)
31679
31690
  t.left = -this.shadowWidth / 2, t.right = this.shadowWidth / 2;
@@ -31687,7 +31698,7 @@ class Vt extends R {
31687
31698
  const i = this.gameObject.scale.y;
31688
31699
  t.top *= i, t.bottom *= i;
31689
31700
  }
31690
- this.light.shadow.needsUpdate = !0, Zs && this.context.scene.add(new rC(t));
31701
+ this.light.shadow.needsUpdate = !0, Js && this.context.scene.add(new rC(t));
31691
31702
  }
31692
31703
  this.isBaked ? this.light.removeFromParent() : e || this.gameObject.add(this.light);
31693
31704
  }
@@ -32032,7 +32043,7 @@ of([
32032
32043
  of([
32033
32044
  u(_)
32034
32045
  ], pl.prototype, "rotationOffset");
32035
- var YT = Object.defineProperty, Fo = (s, e, t, i) => {
32046
+ var YT = Object.defineProperty, zo = (s, e, t, i) => {
32036
32047
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
32037
32048
  (r = s[o]) && (n = r(e, t, n) || n);
32038
32049
  return n && YT(e, t, n), n;
@@ -32049,25 +32060,25 @@ class Ci {
32049
32060
  this.time = e, this.value = t;
32050
32061
  }
32051
32062
  }
32052
- Fo([
32063
+ zo([
32053
32064
  u()
32054
32065
  ], Ci.prototype, "time");
32055
- Fo([
32066
+ zo([
32056
32067
  u()
32057
32068
  ], Ci.prototype, "value");
32058
- Fo([
32069
+ zo([
32059
32070
  u()
32060
32071
  ], Ci.prototype, "inTangent");
32061
- Fo([
32072
+ zo([
32062
32073
  u()
32063
32074
  ], Ci.prototype, "inWeight");
32064
- Fo([
32075
+ zo([
32065
32076
  u()
32066
32077
  ], Ci.prototype, "outTangent");
32067
- Fo([
32078
+ zo([
32068
32079
  u()
32069
32080
  ], Ci.prototype, "outWeight");
32070
- Fo([
32081
+ zo([
32071
32082
  u()
32072
32083
  ], Ci.prototype, "weightedMode");
32073
32084
  const ux = class oc {
@@ -32127,7 +32138,7 @@ const ux = class oc {
32127
32138
  return p * v + g * b + y * w + m;
32128
32139
  }
32129
32140
  };
32130
- Fo([
32141
+ zo([
32131
32142
  u(Ci)
32132
32143
  ], ux.prototype, "keys");
32133
32144
  let rf = ux;
@@ -32285,7 +32296,7 @@ S([
32285
32296
  u()
32286
32297
  ], Vs.prototype, "curveMultiplier");
32287
32298
  let Y = Vs;
32288
- const zo = class Ot {
32299
+ const Uo = class Ot {
32289
32300
  static constant(e) {
32290
32301
  const t = new Ot();
32291
32302
  return t.constant(e), t;
@@ -32334,26 +32345,26 @@ const zo = class Ot {
32334
32345
  };
32335
32346
  S([
32336
32347
  u()
32337
- ], zo.prototype, "mode");
32348
+ ], Uo.prototype, "mode");
32338
32349
  S([
32339
32350
  u(ae)
32340
- ], zo.prototype, "color");
32351
+ ], Uo.prototype, "color");
32341
32352
  S([
32342
32353
  u(ae)
32343
- ], zo.prototype, "colorMin");
32354
+ ], Uo.prototype, "colorMin");
32344
32355
  S([
32345
32356
  u(ae)
32346
- ], zo.prototype, "colorMax");
32357
+ ], Uo.prototype, "colorMax");
32347
32358
  S([
32348
32359
  u(ml)
32349
- ], zo.prototype, "gradient");
32360
+ ], Uo.prototype, "gradient");
32350
32361
  S([
32351
32362
  u(ml)
32352
- ], zo.prototype, "gradientMin");
32363
+ ], Uo.prototype, "gradientMin");
32353
32364
  S([
32354
32365
  u(ml)
32355
- ], zo.prototype, "gradientMax");
32356
- let gl = zo;
32366
+ ], Uo.prototype, "gradientMax");
32367
+ let gl = Uo;
32357
32368
  var jm = /* @__PURE__ */ ((s) => (s[s.Hierarchy = 0] = "Hierarchy", s[s.Local = 1] = "Local", s[s.Shape = 2] = "Shape", s))(jm || {});
32358
32369
  class si {
32359
32370
  cullingMode;
@@ -32476,7 +32487,7 @@ class Bm {
32476
32487
  return t;
32477
32488
  }
32478
32489
  }
32479
- class Uo {
32490
+ class No {
32480
32491
  enabled;
32481
32492
  get burstCount() {
32482
32493
  return this.bursts?.length ?? 0;
@@ -32503,22 +32514,22 @@ class Uo {
32503
32514
  }
32504
32515
  S([
32505
32516
  u()
32506
- ], Uo.prototype, "enabled");
32517
+ ], No.prototype, "enabled");
32507
32518
  S([
32508
32519
  u()
32509
- ], Uo.prototype, "bursts");
32520
+ ], No.prototype, "bursts");
32510
32521
  S([
32511
32522
  u(Y)
32512
- ], Uo.prototype, "rateOverTime");
32523
+ ], No.prototype, "rateOverTime");
32513
32524
  S([
32514
32525
  u()
32515
- ], Uo.prototype, "rateOverTimeMultiplier");
32526
+ ], No.prototype, "rateOverTimeMultiplier");
32516
32527
  S([
32517
32528
  u(Y)
32518
- ], Uo.prototype, "rateOverDistance");
32529
+ ], No.prototype, "rateOverDistance");
32519
32530
  S([
32520
32531
  u()
32521
- ], Uo.prototype, "rateOverDistanceMultiplier");
32532
+ ], No.prototype, "rateOverDistanceMultiplier");
32522
32533
  class yy {
32523
32534
  enabled;
32524
32535
  color;
@@ -33585,7 +33596,7 @@ var ZT = Object.defineProperty, Ue = (s, e, t, i) => {
33585
33596
  (r = s[o]) && (n = r(e, t, n) || n);
33586
33597
  return n && ZT(e, t, n), n;
33587
33598
  };
33588
- const lo = x("debugparticles"), JT = x("noprogressive"), eA = x("debugprogressive");
33599
+ const co = x("debugparticles"), JT = x("noprogressive"), eA = x("debugprogressive");
33589
33600
  var Fm = /* @__PURE__ */ ((s) => (s[s.Birth = 0] = "Birth", s[s.Collision = 1] = "Collision", s[s.Death = 2] = "Death", s[s.Trigger = 3] = "Trigger", s[s.Manual = 4] = "Manual", s))(Fm || {});
33590
33601
  class Mn extends R {
33591
33602
  renderMode;
@@ -33611,11 +33622,11 @@ class Mn extends R {
33611
33622
  let t = e === !0 && this.trailMaterial ? this.trailMaterial : this.particleMaterial;
33612
33623
  if (t) {
33613
33624
  if (t.type === "MeshStandardMaterial") {
33614
- lo && console.debug("ParticleSystemRenderer.getMaterial: MeshStandardMaterial detected, converting to MeshBasicMaterial. See https://github.com/Alchemist0823/three.quarks/issues/101"), "map" in t && t.map && (t.map.colorSpace = As, t.map.premultiplyAlpha = !1);
33625
+ co && console.debug("ParticleSystemRenderer.getMaterial: MeshStandardMaterial detected, converting to MeshBasicMaterial. See https://github.com/Alchemist0823/three.quarks/issues/101"), "map" in t && t.map && (t.map.colorSpace = As, t.map.premultiplyAlpha = !1);
33615
33626
  const i = new Se();
33616
33627
  i.copy(t), e ? this.trailMaterial = i : this.particleMaterial = i;
33617
33628
  }
33618
- t.map && (t.map.colorSpace = As, t.map.premultiplyAlpha = !1), e && t.side === Po && (t = t.clone(), t.side = vu, e ? this.trailMaterial = t : this.particleMaterial = t);
33629
+ t.map && (t.map.colorSpace = As, t.map.premultiplyAlpha = !1), e && t.side === ko && (t = t.clone(), t.side = vu, e ? this.trailMaterial = t : this.particleMaterial = t);
33619
33630
  }
33620
33631
  return t && !JT && t._didRequestTextureLOD === void 0 && (t._didRequestTextureLOD = 0, eA && console.log("Load material LOD", t.name), We.assignTextureLOD(t, 0)), t;
33621
33632
  }
@@ -34141,14 +34152,14 @@ const Ht = class kd extends R {
34141
34152
  * ```
34142
34153
  */
34143
34154
  addBehaviour(e) {
34144
- return this._particleSystem ? (e instanceof Xr && (e.system = this), lo && console.debug("Add custom ParticleSystem Behaviour", e), this._particleSystem.addBehavior(e), !0) : !1;
34155
+ return this._particleSystem ? (e instanceof Xr && (e.system = this), co && console.debug("Add custom ParticleSystem Behaviour", e), this._particleSystem.addBehavior(e), !0) : !1;
34145
34156
  }
34146
34157
  /** Remove a custom quarks behaviour from the particle system. **/
34147
34158
  removeBehaviour(e) {
34148
34159
  if (!this._particleSystem)
34149
34160
  return !1;
34150
34161
  const t = this._particleSystem.behaviors, i = t.indexOf(e);
34151
- return i !== -1 && ((L() || lo) && console.debug("Remove custom ParticleSystem Behaviour", i, e), t.splice(i, 1)), !0;
34162
+ return i !== -1 && ((L() || co) && console.debug("Remove custom ParticleSystem Behaviour", i, e), t.splice(i, 1)), !0;
34152
34163
  }
34153
34164
  /** Removes all behaviours from the particle system
34154
34165
  * **Note:** this will also remove the default behaviours like SizeBehaviour, ColorBehaviour etc.
@@ -34199,7 +34210,7 @@ const Ht = class kd extends R {
34199
34210
  Xa(n, i), e[t] = n;
34200
34211
  }
34201
34212
  }
34202
- lo && e.length > 0 && console.log("SubEmitters: ", e, this), this._subEmitterSystems = e;
34213
+ co && e.length > 0 && console.log("SubEmitters: ", e, this), this._subEmitterSystems = e;
34203
34214
  }
34204
34215
  _subEmitterSystems;
34205
34216
  /** @internal */
@@ -34214,7 +34225,7 @@ const Ht = class kd extends R {
34214
34225
  throw new Error("Not Supported: ParticleSystem needs a serialized MainModule. Creating new particle systems at runtime is currently not supported.");
34215
34226
  this._container = new M(), this._container.matrixAutoUpdate = !1, this.context.scene.add(this._container), this._batchSystem = new qC(), this._batchSystem.name = this.gameObject.name, this._container.add(this._batchSystem), this._interface = new dA(this), this._particleSystem = new XC(this._interface), this._particleSystem.addBehavior(new aA(this)), this._particleSystem.addBehavior(new hA(this)), this._particleSystem.addBehavior(new sA(this)), this._particleSystem.addBehavior(new oA(this)), this._particleSystem.addBehavior(new cA(this)), this._particleSystem.addBehavior(new lA(this)), this._batchSystem.addSystem(this._particleSystem);
34216
34227
  const e = this._particleSystem.emitter;
34217
- this.context.scene.add(e), this.inheritVelocity.system && this.inheritVelocity.system !== this && (this.inheritVelocity = this.inheritVelocity.clone()), this.inheritVelocity.awake(this), lo && (console.log(this), this.gameObject.add(new Pi(1)));
34228
+ this.context.scene.add(e), this.inheritVelocity.system && this.inheritVelocity.system !== this && (this.inheritVelocity = this.inheritVelocity.clone()), this.inheritVelocity.awake(this), co && (console.log(this), this.gameObject.add(new Pi(1)));
34218
34229
  }
34219
34230
  /** @internal */
34220
34231
  start() {
@@ -34240,7 +34251,7 @@ const Ht = class kd extends R {
34240
34251
  preWarm() {
34241
34252
  if (!this.emission?.enabled || this.emission.rateOverTime.getMax() <= 0) return;
34242
34253
  const t = 1 / 60, i = this.main.duration, n = this.main.startLifetime.getMax(), r = Math.min(Math.max(i, n) / Math.max(0.01, this.main.simulationSpeed), 1e3), a = Math.ceil(r / t), l = Date.now();
34243
- lo && console.log(`Particles ${this.name} - Prewarm for ${a} frames (${r} sec). Duration: ${i}, Lifetime: ${n}`);
34254
+ co && console.log(`Particles ${this.name} - Prewarm for ${a} frames (${r} sec). Duration: ${i}, Lifetime: ${n}`);
34244
34255
  for (let c = 0; c < a && !(this.currentParticles >= this.maxParticles); c++) {
34245
34256
  const h = Date.now() - l;
34246
34257
  if (h > 2e3) {
@@ -34291,7 +34302,7 @@ const Ht = class kd extends R {
34291
34302
  e.particleSystem._isUsedAsSubsystem = !0;
34292
34303
  const i = new gx(this, this._particleSystem, e.particleSystem, t);
34293
34304
  i.emitterType = e.type, i.emitterProbability = e.emitProbability, this._particleSystem.addBehavior(i);
34294
- } else lo && console.warn("Could not add SubParticleSystem", e, this);
34305
+ } else co && console.warn("Could not add SubParticleSystem", e, this);
34295
34306
  }
34296
34307
  }
34297
34308
  };
@@ -34302,7 +34313,7 @@ Ue([
34302
34313
  u(si)
34303
34314
  ], Ht.prototype, "main");
34304
34315
  Ue([
34305
- u(Uo)
34316
+ u(No)
34306
34317
  ], Ht.prototype, "emission");
34307
34318
  Ue([
34308
34319
  u(yl)
@@ -34350,7 +34361,7 @@ class Um {
34350
34361
  const i = this.particleSystem;
34351
34362
  if (i instanceof ou) return;
34352
34363
  let n = "";
34353
- i && typeof i.guid == "string" && (n = i.guid, this.particleSystem = C.findByGuid(n, t)), lo && !(this.particleSystem instanceof ou) && console.warn("Could not find particle system for sub emitter", n, t, this);
34364
+ i && typeof i.guid == "string" && (n = i.guid, this.particleSystem = C.findByGuid(n, t)), co && !(this.particleSystem instanceof ou) && console.warn("Could not find particle system for sub emitter", n, t, this);
34354
34365
  }
34355
34366
  }
34356
34367
  function yx(s, e) {
@@ -35076,7 +35087,7 @@ var UA = Object.defineProperty, ph = (s, e, t, i) => {
35076
35087
  (r = s[o]) && (n = r(e, t, n) || n);
35077
35088
  return n && UA(e, t, n), n;
35078
35089
  };
35079
- class No extends ht {
35090
+ class $o extends ht {
35080
35091
  get typeName() {
35081
35092
  return "ScreenSpaceAmbientOcclusion";
35082
35093
  }
@@ -35125,20 +35136,20 @@ class No extends ht {
35125
35136
  }
35126
35137
  ph([
35127
35138
  u($)
35128
- ], No.prototype, "intensity");
35139
+ ], $o.prototype, "intensity");
35129
35140
  ph([
35130
35141
  u($)
35131
- ], No.prototype, "falloff");
35142
+ ], $o.prototype, "falloff");
35132
35143
  ph([
35133
35144
  u($)
35134
- ], No.prototype, "samples");
35145
+ ], $o.prototype, "samples");
35135
35146
  ph([
35136
35147
  u($)
35137
- ], No.prototype, "color");
35148
+ ], $o.prototype, "color");
35138
35149
  ph([
35139
35150
  u($)
35140
- ], No.prototype, "luminanceInfluence");
35141
- En("ScreenSpaceAmbientOcclusion", No);
35151
+ ], $o.prototype, "luminanceInfluence");
35152
+ En("ScreenSpaceAmbientOcclusion", $o);
35142
35153
  var NA = Object.defineProperty, Kr = (s, e, t, i) => {
35143
35154
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
35144
35155
  (r = s[o]) && (n = r(e, t, n) || n);
@@ -35843,7 +35854,7 @@ var QA = Object.defineProperty, wt = (s, e, t, i) => {
35843
35854
  };
35844
35855
  const ft = x("debugsceneswitcher"), YA = x("sceneswitcher:clearscene"), Md = "scene";
35845
35856
  Cy(Md);
35846
- const Js = Promise.resolve(!1);
35857
+ const eo = Promise.resolve(!1);
35847
35858
  class nt extends R {
35848
35859
  autoLoadFirstScene = !0;
35849
35860
  scenes = [];
@@ -36038,14 +36049,14 @@ class nt extends R {
36038
36049
  return this.switchScene(n);
36039
36050
  }
36040
36051
  if (i) e = this.scenes?.indexOf(i);
36041
- else return Js;
36052
+ else return eo;
36042
36053
  }
36043
- if (!this.scenes?.length) return Js;
36054
+ if (!this.scenes?.length) return eo;
36044
36055
  if (e < 0) {
36045
- if (this.clamp) return Js;
36056
+ if (this.clamp) return eo;
36046
36057
  e = this.scenes.length - 1;
36047
36058
  } else if (e >= this.scenes.length) {
36048
- if (this.clamp) return Js;
36059
+ if (this.clamp) return eo;
36049
36060
  e = 0;
36050
36061
  }
36051
36062
  const t = this.scenes[e];
@@ -36168,12 +36179,12 @@ class nt extends R {
36168
36179
  if (t instanceof ne)
36169
36180
  return t.preload();
36170
36181
  }
36171
- return Js;
36182
+ return eo;
36172
36183
  }
36173
36184
  tryLoadFromQueryParam() {
36174
- if (!this.queryParameterName?.length) return Js;
36185
+ if (!this.queryParameterName?.length) return eo;
36175
36186
  const e = x(this.queryParameterName);
36176
- return typeof e == "boolean" ? Js : this.trySelectSceneFromValue(e);
36187
+ return typeof e == "boolean" ? eo : this.trySelectSceneFromValue(e);
36177
36188
  }
36178
36189
  /** try to select a scene from a string or index */
36179
36190
  trySelectSceneFromValue(e) {
@@ -36192,7 +36203,7 @@ class nt extends R {
36192
36203
  }
36193
36204
  } else if (typeof e == "number" && e >= 0 && e < this.scenes.length)
36194
36205
  return this.select(e);
36195
- return Qi() && console.warn('[SceneSwitcher] Can not find scene: "' + e + '"', this), Js;
36206
+ return Qi() && console.warn('[SceneSwitcher] Can not find scene: "' + e + '"', this), eo;
36196
36207
  }
36197
36208
  _lastLoadingScene = void 0;
36198
36209
  _loadingScenePromise = void 0;
@@ -37092,14 +37103,14 @@ class Zr extends R {
37092
37103
  }
37093
37104
  /** @internal */
37094
37105
  onEnable() {
37095
- this._net?.enable(), this._net?.addEventListener(xs.StreamReceived, this.onReceiveStream), this._net?.addEventListener(xs.StreamEnded, this.onCallEnded), this.context.connection.beginListen(ie.JoinedRoom, this.onJoinedRoom), this.autoConnect && ko(1e3).then(() => (this.enabled && this.autoConnect && !this.isReceiving && !this.isSending && this.context.connection.isInRoom && this.share(), 0));
37106
+ this._net?.enable(), this._net?.addEventListener(xs.StreamReceived, this.onReceiveStream), this._net?.addEventListener(xs.StreamEnded, this.onCallEnded), this.context.connection.beginListen(ie.JoinedRoom, this.onJoinedRoom), this.autoConnect && Oo(1e3).then(() => (this.enabled && this.autoConnect && !this.isReceiving && !this.isSending && this.context.connection.isInRoom && this.share(), 0));
37096
37107
  }
37097
37108
  /** @internal */
37098
37109
  onDisable() {
37099
37110
  this._net?.removeEventListener(xs.StreamReceived, this.onReceiveStream), this._net?.removeEventListener(xs.StreamEnded, this.onCallEnded), this.context.connection.stopListen(ie.JoinedRoom, this.onJoinedRoom), this._net?.disable(), this.close();
37100
37111
  }
37101
37112
  onJoinedRoom = async () => {
37102
- await ko(1e3), this.autoConnect && !this.isSending && !this.isReceiving && this.context.connection.isInRoom && this.share();
37113
+ await Oo(1e3), this.autoConnect && !this.isSending && !this.isReceiving && this.context.connection.isInRoom && this.share();
37103
37114
  };
37104
37115
  _ensureVideoPlayer() {
37105
37116
  const e = new yt();
@@ -37288,7 +37299,7 @@ var lI = Object.defineProperty, vl = (s, e, t, i) => {
37288
37299
  };
37289
37300
  const cI = x("debugseethrough");
37290
37301
  let hI = 0;
37291
- class $o extends R {
37302
+ class Wo extends R {
37292
37303
  referencePoint = null;
37293
37304
  fadeDuration = 0.05;
37294
37305
  minAlpha = 0;
@@ -37344,7 +37355,7 @@ class $o extends R {
37344
37355
  e < 0.9 ? i.gameObject.raycastAllowed = !1 : i.gameObject.raycastAllowed = !0;
37345
37356
  const n = i.sharedMaterials;
37346
37357
  if (!n) return;
37347
- const o = So.get(i.gameObject), r = o.getOverride("opacity")?.value ?? n[0].opacity ?? 1;
37358
+ const o = Co.get(i.gameObject), r = o.getOverride("opacity")?.value ?? n[0].opacity ?? 1;
37348
37359
  let a = F.lerp(r, e, t <= 0 ? 1 : this.context.time.deltaTime / t);
37349
37360
  a >= 0.99 ? a = 1 : a <= 0.01 && (a = 0), o.setOverride("alphaHash", this.useAlphaHash), o.setOverride("opacity", a), o.setOverride("transparent", a >= 0.99999 ? !1 : !this.useAlphaHash);
37350
37361
  });
@@ -37352,22 +37363,22 @@ class $o extends R {
37352
37363
  }
37353
37364
  vl([
37354
37365
  u(M)
37355
- ], $o.prototype, "referencePoint");
37366
+ ], Wo.prototype, "referencePoint");
37356
37367
  vl([
37357
37368
  u()
37358
- ], $o.prototype, "fadeDuration");
37369
+ ], Wo.prototype, "fadeDuration");
37359
37370
  vl([
37360
37371
  u()
37361
- ], $o.prototype, "minAlpha");
37372
+ ], Wo.prototype, "minAlpha");
37362
37373
  vl([
37363
37374
  u()
37364
- ], $o.prototype, "useAlphaHash");
37375
+ ], Wo.prototype, "useAlphaHash");
37365
37376
  vl([
37366
37377
  u()
37367
- ], $o.prototype, "overrideAlpha");
37378
+ ], Wo.prototype, "overrideAlpha");
37368
37379
  vl([
37369
37380
  u()
37370
- ], $o.prototype, "autoUpdate");
37381
+ ], Wo.prototype, "autoUpdate");
37371
37382
  var dI = Object.defineProperty, Ex = (s, e, t, i) => {
37372
37383
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
37373
37384
  (r = s[o]) && (n = r(e, t, n) || n);
@@ -37722,7 +37733,7 @@ var mI = Object.defineProperty, bh = (s, e, t, i) => {
37722
37733
  (r = s[o]) && (n = r(e, t, n) || n);
37723
37734
  return n && mI(e, t, n), n;
37724
37735
  };
37725
- const Sc = x("debugspatialtrigger"), Jb = new Co(), ev = new Co();
37736
+ const Sc = x("debugspatialtrigger"), Jb = new Po(), ev = new Po();
37726
37737
  function gI(s, e) {
37727
37738
  return Jb.mask = s, ev.mask = e, Jb.test(ev);
37728
37739
  }
@@ -37988,7 +37999,7 @@ class My extends R {
37988
37999
  * Sets the target to follow the local player
37989
38000
  */
37990
38001
  followSelf() {
37991
- this.target = this.context.players.getPlayerView(this.context.connection.connectionId), this.target || (this.context.players.setPlayerView(this.localId, this.context.mainCamera, vo.Headset), this.target = this.context.players.getPlayerView(this.localId)), xi && console.log("Follow self", this.target);
38002
+ this.target = this.context.players.getPlayerView(this.context.connection.connectionId), this.target || (this.context.players.setPlayerView(this.localId, this.context.mainCamera, wo.Headset), this.target = this.context.players.getPlayerView(this.localId)), xi && console.log("Follow self", this.target);
37992
38003
  }
37993
38004
  // TODO: only show Spectator cam for DesktopVR;
37994
38005
  // don't show for AR, don't show on Quest
@@ -38108,13 +38119,13 @@ class bI {
38108
38119
  if (!(!i || !this.follow)) {
38109
38120
  switch (e) {
38110
38121
  case 0:
38111
- this.view?.viewDevice !== vo.Browser ? (this.follow.followFactor = 5, this.follow.rotateFactor = 5) : (this.follow.followFactor = 50, this.follow.rotateFactor = 50), i.position.set(0, 0, 0);
38122
+ this.view?.viewDevice !== wo.Browser ? (this.follow.followFactor = 5, this.follow.rotateFactor = 5) : (this.follow.followFactor = 50, this.follow.rotateFactor = 50), i.position.set(0, 0, 0);
38112
38123
  break;
38113
38124
  case 1:
38114
38125
  this.follow.followFactor = 3, this.follow.rotateFactor = 2, i.position.set(0, 0.5, 1.5);
38115
38126
  break;
38116
38127
  }
38117
- this.follow.flipForward = !1, this.view?.viewDevice !== vo.Browser ? i.quaternion.copy(vI) : i.quaternion.identity();
38128
+ this.follow.flipForward = !1, this.view?.viewDevice !== wo.Browser ? i.quaternion.copy(vI) : i.quaternion.identity();
38118
38129
  }
38119
38130
  }
38120
38131
  }
@@ -38602,7 +38613,7 @@ function OI(s, e) {
38602
38613
  const i = s.reduce((o, r) => o + Math.abs(r.tangentOut.x) + Math.abs(r.tangentOut.y) + Math.abs(r.tangentOut.z), 0) / s.length, n = F.clamp(F.remap(i, 0, 0.3, 0, 0.5), 0, 1);
38603
38614
  return new fC(t, e, "catmullrom", n);
38604
38615
  }
38605
- var MI = Object.defineProperty, EI = Object.getOwnPropertyDescriptor, Wo = (s, e, t, i) => {
38616
+ var MI = Object.defineProperty, EI = Object.getOwnPropertyDescriptor, Vo = (s, e, t, i) => {
38606
38617
  for (var n = i > 1 ? void 0 : i ? EI(e, t) : e, o = s.length - 1, r; o >= 0; o--)
38607
38618
  (r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
38608
38619
  return i && n && MI(e, t, n), n;
@@ -38684,28 +38695,28 @@ class Rn extends R {
38684
38695
  _performedUpdates = 0;
38685
38696
  _lastPositionVector = new _();
38686
38697
  }
38687
- Wo([
38698
+ Vo([
38688
38699
  et(xl)
38689
38700
  ], Rn.prototype, "spline", 2);
38690
- Wo([
38701
+ Vo([
38691
38702
  et(M)
38692
38703
  ], Rn.prototype, "object", 2);
38693
- Wo([
38704
+ Vo([
38694
38705
  et()
38695
38706
  ], Rn.prototype, "useLookAt", 2);
38696
- Wo([
38707
+ Vo([
38697
38708
  et(M)
38698
38709
  ], Rn.prototype, "lookAt", 2);
38699
- Wo([
38710
+ Vo([
38700
38711
  et()
38701
38712
  ], Rn.prototype, "clamp", 2);
38702
- Wo([
38713
+ Vo([
38703
38714
  et()
38704
38715
  ], Rn.prototype, "position01", 1);
38705
- Wo([
38716
+ Vo([
38706
38717
  et()
38707
38718
  ], Rn.prototype, "autoRun", 2);
38708
- Wo([
38719
+ Vo([
38709
38720
  et()
38710
38721
  ], Rn.prototype, "duration", 2);
38711
38722
  class $n {
@@ -38830,7 +38841,7 @@ const Ax = class Vm extends R {
38830
38841
  for (const n in this.remoteCams) {
38831
38842
  const o = this.remoteCams[n], r = this.context.time.realtimeSinceStartup - o.lastUpdate;
38832
38843
  if (!o || r > this._camTimeoutInSeconds) {
38833
- L() && console.log("Remote cam timeout", n), o?.obj && C.destroy(o.obj), delete this.remoteCams[n], o && delete this.userToCamMap[o.userId], Vm.instances.push(o), this.context.players.removePlayerView(o.userId, vo.Browser);
38844
+ L() && console.log("Remote cam timeout", n), o?.obj && C.destroy(o.obj), delete this.remoteCams[n], o && delete this.userToCamMap[o.userId], Vm.instances.push(o), this.context.players.removePlayerView(o.userId, wo.Browser);
38834
38845
  continue;
38835
38846
  }
38836
38847
  }
@@ -38843,7 +38854,7 @@ const Ax = class Vm extends R {
38843
38854
  if (!this.context.connection.isConnected || this.context.connection.connectionId === null) return;
38844
38855
  this._model === null && (this._model = new AI(this.context.connection.connectionId, this.context.connection.connectionId + "_camera"));
38845
38856
  const t = te(e), i = ve(e);
38846
- (t.distanceTo(this._lastWorldPosition) > 1e-3 || i.angleTo(this._lastWorldQuaternion) > 0.01) && (this._needsUpdate = !0), this._lastWorldPosition.copy(t), this._lastWorldQuaternion.copy(i), !((!this._needsUpdate || this.context.time.frameCount % 2 !== 0) && !(this.context.time.realtimeSinceStartup - this._lastUpdateTime > this._camTimeoutInSeconds * 0.5)) && (this._lastUpdateTime = this.context.time.realtimeSinceStartup, this._needsUpdate = !1, this._model.send(e, this.context.connection), this.context.isInXR || this.context.players.setPlayerView(this.context.connection.connectionId, e, vo.Browser));
38857
+ (t.distanceTo(this._lastWorldPosition) > 1e-3 || i.angleTo(this._lastWorldQuaternion) > 0.01) && (this._needsUpdate = !0), this._lastWorldPosition.copy(t), this._lastWorldQuaternion.copy(i), !((!this._needsUpdate || this.context.time.frameCount % 2 !== 0) && !(this.context.time.realtimeSinceStartup - this._lastUpdateTime > this._camTimeoutInSeconds * 0.5)) && (this._lastUpdateTime = this.context.time.realtimeSinceStartup, this._needsUpdate = !1, this._model.send(e, this.context.connection), this.context.isInXR || this.context.players.setPlayerView(this.context.connection.connectionId, e, wo.Browser));
38847
38858
  }
38848
38859
  onReceivedRemoteCameraInfoBin(e) {
38849
38860
  const t = e.guid();
@@ -38862,7 +38873,7 @@ const Ax = class Vm extends R {
38862
38873
  } else
38863
38874
  return;
38864
38875
  const o = n.obj;
38865
- this.context.players.setPlayerView(i, o, vo.Browser), n.lastUpdate = this.context.time.realtimeSinceStartup, bn.markDirty(o);
38876
+ this.context.players.setPlayerView(i, o, wo.Browser), n.lastUpdate = this.context.time.realtimeSinceStartup, bn.markDirty(o);
38866
38877
  const r = e.pos();
38867
38878
  r && Wa(o, r.x(), r.y(), r.z());
38868
38879
  const a = e.rot();
@@ -38873,7 +38884,7 @@ TI([
38873
38884
  u([M, ne])
38874
38885
  ], Ax.prototype, "cameraPrefab");
38875
38886
  let Ix = Ax;
38876
- var II = Object.defineProperty, LI = Object.getOwnPropertyDescriptor, Vo = (s, e, t, i) => {
38887
+ var II = Object.defineProperty, LI = Object.getOwnPropertyDescriptor, Ho = (s, e, t, i) => {
38877
38888
  for (var n = i > 1 ? void 0 : i ? LI(e, t) : e, o = s.length - 1, r; o >= 0; o--)
38878
38889
  (r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
38879
38890
  return i && n && II(e, t, n), n;
@@ -39024,28 +39035,28 @@ C) Set "joinRandomRoom" to true`), !1) : (Ip && console.log("Join " + this.roomN
39024
39035
  this.context.menu.appendChild(this._viewOnlyButton);
39025
39036
  };
39026
39037
  }
39027
- Vo([
39038
+ Ho([
39028
39039
  u()
39029
39040
  ], rs.prototype, "roomName", 2);
39030
- Vo([
39041
+ Ho([
39031
39042
  u()
39032
39043
  ], rs.prototype, "urlParameterName", 2);
39033
- Vo([
39044
+ Ho([
39034
39045
  u()
39035
39046
  ], rs.prototype, "joinRandomRoom", 2);
39036
- Vo([
39047
+ Ho([
39037
39048
  u()
39038
39049
  ], rs.prototype, "requireRoomParameter", 2);
39039
- Vo([
39050
+ Ho([
39040
39051
  u()
39041
39052
  ], rs.prototype, "autoRejoin", 2);
39042
- Vo([
39053
+ Ho([
39043
39054
  u()
39044
39055
  ], rs.prototype, "createJoinButton", 2);
39045
- Vo([
39056
+ Ho([
39046
39057
  u()
39047
39058
  ], rs.prototype, "createViewOnlyButton", 2);
39048
- Vo([
39059
+ Ho([
39049
39060
  u()
39050
39061
  ], rs.prototype, "roomPrefix", 1);
39051
39062
  function DI() {
@@ -39503,7 +39514,7 @@ class cu extends vh {
39503
39514
  }
39504
39515
  }
39505
39516
  const NI = x("mutetimeline");
39506
- class yo extends vh {
39517
+ class _o extends vh {
39507
39518
  models = [];
39508
39519
  listener;
39509
39520
  audio = [];
@@ -39513,7 +39524,7 @@ class yo extends vh {
39513
39524
  _audioLoader = null;
39514
39525
  getAudioFilePath(e) {
39515
39526
  const t = this.director.sourceId;
39516
- return Eo(t, e);
39527
+ return Ro(t, e);
39517
39528
  }
39518
39529
  onAllowAudioChanged(e) {
39519
39530
  for (let t = 0; t < this.models.length; t++) {
@@ -39608,13 +39619,13 @@ class yo extends vh {
39608
39619
  }
39609
39620
  static _audioBuffers = /* @__PURE__ */ new Map();
39610
39621
  static dispose() {
39611
- yo._audioBuffers.clear();
39622
+ _o._audioBuffers.clear();
39612
39623
  }
39613
39624
  handleAudioLoading(e, t) {
39614
39625
  this._audioLoader || (this._audioLoader = new Wp());
39615
39626
  const i = this.getAudioFilePath(e.asset.clip);
39616
- if (yo._audioBuffers.get(i)) {
39617
- const o = yo._audioBuffers.get(i);
39627
+ if (_o._audioBuffers.get(i)) {
39628
+ const o = _o._audioBuffers.get(i);
39618
39629
  return o.then((r) => {
39619
39630
  r && t.setBuffer(r);
39620
39631
  }), o;
@@ -39632,7 +39643,7 @@ class yo extends vh {
39632
39643
  }
39633
39644
  );
39634
39645
  });
39635
- return yo._audioBuffers.set(i, n), n;
39646
+ return _o._audioBuffers.set(i, n), n;
39636
39647
  }
39637
39648
  }
39638
39649
  class Ry extends vh {
@@ -39875,7 +39886,7 @@ const hn = x("debugtimeline"), Ay = class Hm extends R {
39875
39886
  if (t.length > 0 && (await Promise.all(t), !this._isPlaying))
39876
39887
  return;
39877
39888
  for (; this._audioTracks.length > 0 && this._isPlaying && !Zi.userInteractionRegistered && this.waitForAudio; )
39878
- await ko(200);
39889
+ await Oo(200);
39879
39890
  }
39880
39891
  this.invokeStateChangedMethodsOnTracks(), this._internalUpdateRoutine = this.startCoroutine(this.internalUpdate(), Ce.LateUpdate);
39881
39892
  }
@@ -40083,7 +40094,7 @@ const hn = x("debugtimeline"), Ay = class Hm extends R {
40083
40094
  }
40084
40095
  setupAndCreateTrackHandlers() {
40085
40096
  if (this._animationTracks.length = 0, this._audioTracks.length = 0, this._signalTracks.length = 0, !this.playableAsset) return;
40086
- let e = C.findObjectOfType(po, this.context);
40097
+ let e = C.findObjectOfType(mo, this.context);
40087
40098
  for (const t of this.playableAsset.tracks) {
40088
40099
  const i = t.type, n = Hm.createTrackFunctions[i];
40089
40100
  if (n != null) {
@@ -40129,8 +40140,8 @@ const hn = x("debugtimeline"), Ay = class Hm extends R {
40129
40140
  }
40130
40141
  } else if (t.type === $i.Audio) {
40131
40142
  if (!t.clips || t.clips.length <= 0) continue;
40132
- const o = new yo();
40133
- o.director = this, o.track = t, o.audioSource = t.outputs.find((r) => r instanceof Zi), this._audioTracks.push(o), e || (e = this.context.mainCameraComponent?.gameObject.addComponent(po)), o.listener = e.listener;
40143
+ const o = new _o();
40144
+ o.director = this, o.track = t, o.audioSource = t.outputs.find((r) => r instanceof Zi), this._audioTracks.push(o), e || (e = this.context.mainCameraComponent?.gameObject.addComponent(mo)), o.listener = e.listener;
40134
40145
  for (let r = 0; r < t.clips.length; r++) {
40135
40146
  const a = t.clips[r];
40136
40147
  o.addModel(a);
@@ -40399,7 +40410,7 @@ var GI = Object.defineProperty, qI = Object.getOwnPropertyDescriptor, Di = (s, e
40399
40410
  return i && n && GI(e, t, n), n;
40400
40411
  };
40401
40412
  const ar = x("debugbutton");
40402
- class Ho {
40413
+ class Go {
40403
40414
  colorMultiplier;
40404
40415
  disabledColor;
40405
40416
  fadeDuration;
@@ -40410,25 +40421,25 @@ class Ho {
40410
40421
  }
40411
40422
  Di([
40412
40423
  u()
40413
- ], Ho.prototype, "colorMultiplier", 2);
40424
+ ], Go.prototype, "colorMultiplier", 2);
40414
40425
  Di([
40415
40426
  u(ae)
40416
- ], Ho.prototype, "disabledColor", 2);
40427
+ ], Go.prototype, "disabledColor", 2);
40417
40428
  Di([
40418
40429
  u()
40419
- ], Ho.prototype, "fadeDuration", 2);
40430
+ ], Go.prototype, "fadeDuration", 2);
40420
40431
  Di([
40421
40432
  u(ae)
40422
- ], Ho.prototype, "highlightedColor", 2);
40433
+ ], Go.prototype, "highlightedColor", 2);
40423
40434
  Di([
40424
40435
  u(ae)
40425
- ], Ho.prototype, "normalColor", 2);
40436
+ ], Go.prototype, "normalColor", 2);
40426
40437
  Di([
40427
40438
  u(ae)
40428
- ], Ho.prototype, "pressedColor", 2);
40439
+ ], Go.prototype, "pressedColor", 2);
40429
40440
  Di([
40430
40441
  u(ae)
40431
- ], Ho.prototype, "selectedColor", 2);
40442
+ ], Go.prototype, "selectedColor", 2);
40432
40443
  class XI {
40433
40444
  disabledTrigger;
40434
40445
  highlightedTrigger;
@@ -40436,7 +40447,7 @@ class XI {
40436
40447
  pressedTrigger;
40437
40448
  selectedTrigger;
40438
40449
  }
40439
- class Go extends R {
40450
+ class qo extends R {
40440
40451
  /**
40441
40452
  * Invokes the onClick event
40442
40453
  */
@@ -40556,28 +40567,28 @@ class Go extends R {
40556
40567
  }
40557
40568
  Di([
40558
40569
  u(ce)
40559
- ], Go.prototype, "onClick", 2);
40570
+ ], qo.prototype, "onClick", 2);
40560
40571
  Di([
40561
- u(Ho)
40562
- ], Go.prototype, "colors", 2);
40572
+ u(Go)
40573
+ ], qo.prototype, "colors", 2);
40563
40574
  Di([
40564
40575
  u()
40565
- ], Go.prototype, "transition", 2);
40576
+ ], qo.prototype, "transition", 2);
40566
40577
  Di([
40567
40578
  u(XI)
40568
- ], Go.prototype, "animationTriggers", 2);
40579
+ ], qo.prototype, "animationTriggers", 2);
40569
40580
  Di([
40570
40581
  u(Rt)
40571
- ], Go.prototype, "animator", 2);
40582
+ ], qo.prototype, "animator", 2);
40572
40583
  Di([
40573
40584
  u()
40574
- ], Go.prototype, "interactable", 1);
40585
+ ], qo.prototype, "interactable", 1);
40575
40586
  var QI = Object.defineProperty, vf = (s, e, t, i) => {
40576
40587
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
40577
40588
  (r = s[o]) && (n = r(e, t, n) || n);
40578
40589
  return n && QI(e, t, n), n;
40579
40590
  };
40580
- const eo = x("debuginputfield"), xh = class Q extends R {
40591
+ const to = x("debuginputfield"), xh = class Q extends R {
40581
40592
  get text() {
40582
40593
  return this.textComponent?.text ?? "";
40583
40594
  }
@@ -40598,7 +40609,7 @@ const eo = x("debuginputfield"), xh = class Q extends R {
40598
40609
  inputEventFn;
40599
40610
  _iosEventFn;
40600
40611
  start() {
40601
- eo && console.log(this.name, this);
40612
+ to && console.log(this.name, this);
40602
40613
  }
40603
40614
  onEnable() {
40604
40615
  Q.htmlField || (Q.htmlField = document.createElement("input"), Q.htmlField.style.width = "0px", Q.htmlField.style.height = "0px", Q.htmlField.style.padding = "0px", Q.htmlField.style.border = "none", Q.htmlField.style.overflow = "hidden", Q.htmlField.style.caretColor = "transparent", Q.htmlField.style.outline = "none", Q.htmlField.classList.add("ar"), Q.htmlField.onfocus = () => Q.htmlFieldFocused = !0, Q.htmlField.onblur = () => Q.htmlFieldFocused = !1, document.body.append(Q.htmlField)), this.inputEventFn || (this.inputEventFn = this.onInput.bind(this)), Q.htmlField.addEventListener("keyup", this.inputEventFn), this.placeholder && this.textComponent?.text.length && C.setActive(this.placeholder.gameObject, !1), D.isiOS() && (this._iosEventFn = this.processInputOniOS.bind(this), window.addEventListener("click", this._iosEventFn));
@@ -40625,7 +40636,7 @@ const eo = x("debuginputfield"), xh = class Q extends R {
40625
40636
  this.context.input.unsetCursor("text");
40626
40637
  }
40627
40638
  onPointerClick(e) {
40628
- eo && console.log("CLICK", e, Q.active), Q.activeTime = this.context.time.time, Q.active !== this && this.startCoroutine(this.activeLoop(), Ce.LateUpdate), this.selectInputField();
40639
+ to && console.log("CLICK", e, Q.active), Q.activeTime = this.context.time.time, Q.active !== this && this.startCoroutine(this.activeLoop(), Ce.LateUpdate), this.selectInputField();
40629
40640
  }
40630
40641
  *activeLoop() {
40631
40642
  for (this.onSelected(); Q.active === this && !(this.context.input.getPointerClicked(0) && this.context.time.time - Q.activeTime > 0.2); )
@@ -40633,8 +40644,8 @@ const eo = x("debuginputfield"), xh = class Q extends R {
40633
40644
  this.onDeselected();
40634
40645
  }
40635
40646
  onSelected() {
40636
- if (Q.active !== this && (eo && console.log("Select", this.name, this, Q.htmlField, this.context.isInXR, this.context.arOverlayElement, this.textComponent?.text, Q.htmlField?.value), Q.active?.onDeselected(), Q.active = this, this.placeholder && C.setActive(this.placeholder.gameObject, !1), Q.htmlField)) {
40637
- if (Q.htmlField.value = this.textComponent?.text || "", eo && console.log("set input field value", Q.htmlField.value), this.context.isInXR) {
40647
+ if (Q.active !== this && (to && console.log("Select", this.name, this, Q.htmlField, this.context.isInXR, this.context.arOverlayElement, this.textComponent?.text, Q.htmlField?.value), Q.active?.onDeselected(), Q.active = this, this.placeholder && C.setActive(this.placeholder.gameObject, !1), Q.htmlField)) {
40648
+ if (Q.htmlField.value = this.textComponent?.text || "", to && console.log("set input field value", Q.htmlField.value), this.context.isInXR) {
40638
40649
  const e = this.context.arOverlayElement;
40639
40650
  e && e.append(Q.htmlField);
40640
40651
  }
@@ -40642,7 +40653,7 @@ const eo = x("debuginputfield"), xh = class Q extends R {
40642
40653
  }
40643
40654
  }
40644
40655
  onDeselected() {
40645
- Q.active === this && (Q.active = null, eo && console.log("Deselect", this.name, this), Q.htmlField && (Q.htmlField.blur(), document.body.append(Q.htmlField)), this.placeholder && (!this.textComponent || this.textComponent.text.length <= 0) && C.setActive(this.placeholder.gameObject, !0), Q.htmlField && this.onEndEdit?.invoke(Q.htmlField.value));
40656
+ Q.active === this && (Q.active = null, to && console.log("Deselect", this.name, this), Q.htmlField && (Q.htmlField.blur(), document.body.append(Q.htmlField)), this.placeholder && (!this.textComponent || this.textComponent.text.length <= 0) && C.setActive(this.placeholder.gameObject, !0), Q.htmlField && this.onEndEdit?.invoke(Q.htmlField.value));
40646
40657
  }
40647
40658
  // @Marwie, I can provide this fix. But the issue seems to comes from Raycaster+EventSystem
40648
40659
  // As we rollout InputField, and no others elements is behind raycast,
@@ -40652,7 +40663,7 @@ const eo = x("debuginputfield"), xh = class Q extends R {
40652
40663
  }
40653
40664
  onInput(e) {
40654
40665
  if (Q.active === this) {
40655
- if (eo && console.log(e.code, e, Q.htmlField?.value, this.textComponent?.text), e.code === "Escape" || e.code === "Enter") {
40666
+ if (to && console.log(e.code, e, Q.htmlField?.value, this.textComponent?.text), e.code === "Escape" || e.code === "Enter") {
40656
40667
  this.onDeselected();
40657
40668
  return;
40658
40669
  }
@@ -40662,11 +40673,11 @@ const eo = x("debuginputfield"), xh = class Q extends R {
40662
40673
  setTextFromInputField() {
40663
40674
  if (this.textComponent && Q.htmlField) {
40664
40675
  const e = this.textComponent.text, t = Q.htmlField.value, i = this.textComponent.text !== Q.htmlField.value;
40665
- this.textComponent.text = Q.htmlField.value, i && (eo && console.log("[InputField] value changed:", t, e), this.onValueChanged?.invoke(t, e));
40676
+ this.textComponent.text = Q.htmlField.value, i && (to && console.log("[InputField] value changed:", t, e), this.onValueChanged?.invoke(t, e));
40666
40677
  }
40667
40678
  }
40668
40679
  selectInputField() {
40669
- Q.htmlField && (eo && console.log("Focus Inputfield", Q.htmlFieldFocused, Q.htmlField), Q.htmlField.setSelectionRange(Q.htmlField.value.length, Q.htmlField.value.length), D.isiOS() ? (Q.htmlField.style.display = "block", Q.htmlField.focus({ preventScroll: !0 })) : setTimeout(() => Q.htmlField?.focus(), 1));
40680
+ Q.htmlField && (to && console.log("Focus Inputfield", Q.htmlFieldFocused, Q.htmlField), Q.htmlField.setSelectionRange(Q.htmlField.value.length, Q.htmlField.value.length), D.isiOS() ? (Q.htmlField.style.display = "block", Q.htmlField.focus({ preventScroll: !0 })) : setTimeout(() => Q.htmlField?.focus(), 1));
40670
40681
  }
40671
40682
  processInputOniOS() {
40672
40683
  const e = this.context.physics.raycast();
@@ -41269,7 +41280,7 @@ var oL = Object.defineProperty, kl = (s, e, t, i) => {
41269
41280
  return n && oL(e, t, n), n;
41270
41281
  };
41271
41282
  const Nl = x("debugscroll");
41272
- class qo extends R {
41283
+ class Xo extends R {
41273
41284
  target = null;
41274
41285
  damping = 0;
41275
41286
  invert = !1;
@@ -41433,22 +41444,22 @@ class qo extends R {
41433
41444
  }
41434
41445
  kl([
41435
41446
  u([R, M])
41436
- ], qo.prototype, "target");
41447
+ ], Xo.prototype, "target");
41437
41448
  kl([
41438
41449
  u()
41439
- ], qo.prototype, "damping");
41450
+ ], Xo.prototype, "damping");
41440
41451
  kl([
41441
41452
  u()
41442
- ], qo.prototype, "invert");
41453
+ ], Xo.prototype, "invert");
41443
41454
  kl([
41444
41455
  u()
41445
- ], qo.prototype, "htmlSelector");
41456
+ ], Xo.prototype, "htmlSelector");
41446
41457
  kl([
41447
41458
  u()
41448
- ], qo.prototype, "mode");
41459
+ ], Xo.prototype, "mode");
41449
41460
  kl([
41450
41461
  u(ce)
41451
- ], qo.prototype, "changed");
41462
+ ], Xo.prototype, "changed");
41452
41463
  const iv = /* @__PURE__ */ new WeakMap(), Ln = [], Dp = new Array();
41453
41464
  let jp = !0;
41454
41465
  function Wx(s) {
@@ -41467,24 +41478,24 @@ var Vx = Object.defineProperty, aL = Object.getOwnPropertyDescriptor, lL = (s, e
41467
41478
  (r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
41468
41479
  return i && n && Vx(e, t, n), n;
41469
41480
  }, Fy = (s, e, t) => lL(s, typeof e != "symbol" ? e + "" : e, t);
41470
- const to = x("debugviewbox"), cL = new ae(0.5, 0.5, 0.5, 0.5);
41481
+ const io = x("debugviewbox"), cL = new ae(0.5, 0.5, 0.5, 0.5);
41471
41482
  let at = class extends R {
41472
41483
  referenceFieldOfView = -1;
41473
41484
  get mode() {
41474
41485
  return this._mode;
41475
41486
  }
41476
41487
  set mode(s) {
41477
- s !== this._mode && (this._mode = s, s === "once" && (this._applyCount = 0), (to || this.debug) && console.debug("[ViewBox] Set mode:", s));
41488
+ s !== this._mode && (this._mode = s, s === "once" && (this._applyCount = 0), (io || this.debug) && console.debug("[ViewBox] Set mode:", s));
41478
41489
  }
41479
41490
  _mode = "continuous";
41480
41491
  debug = !1;
41481
41492
  /** @internal */
41482
41493
  onEnable() {
41483
- (to || this.debug || L()) && console.debug("[ViewBox] Using camera fov:", this.referenceFieldOfView), at.instances.push(this), this._applyCount = 0, this.removeUpdateCallback(), this.context.pre_render_callbacks.push(this.internalUpdate);
41494
+ (io || this.debug || L()) && console.debug("[ViewBox] Using camera fov:", this.referenceFieldOfView), at.instances.push(this), this._applyCount = 0, this.removeUpdateCallback(), this.context.pre_render_callbacks.push(this.internalUpdate);
41484
41495
  }
41485
41496
  /** @internal */
41486
41497
  onDisable() {
41487
- (to || this.debug) && console.debug("[ViewBox] Disabled");
41498
+ (io || this.debug) && console.debug("[ViewBox] Disabled");
41488
41499
  const s = at.instances.indexOf(this);
41489
41500
  s !== -1 && at.instances.splice(s, 1), this._projectedBoxElement?.remove(), this.removeUpdateCallback();
41490
41501
  }
@@ -41496,15 +41507,15 @@ let at = class extends R {
41496
41507
  internalUpdate = () => {
41497
41508
  if (this.context.isInXR || this.destroyed || !this.activeAndEnabled) return;
41498
41509
  if (!(at.instances[at.instances.length - 1] === this)) {
41499
- (to || this.debug) && z.DrawWireBox(this.gameObject.worldPosition, this.gameObject.worldScale, cL);
41510
+ (io || this.debug) && z.DrawWireBox(this.gameObject.worldPosition, this.gameObject.worldScale, cL);
41500
41511
  return;
41501
41512
  }
41502
- (to || this.debug) && z.DrawWireBox(this.gameObject.worldPosition, this.gameObject.worldScale, 14540032, 0, !0, this.gameObject.worldQuaternion);
41513
+ (io || this.debug) && z.DrawWireBox(this.gameObject.worldPosition, this.gameObject.worldScale, 14540032, 0, !0, this.gameObject.worldQuaternion);
41503
41514
  const e = this.context.mainCamera;
41504
41515
  if (!e || !(e instanceof de))
41505
41516
  return;
41506
41517
  if ((this.referenceFieldOfView === void 0 || this.referenceFieldOfView === -1) && (this.referenceFieldOfView = e.fov, console.debug("[ViewBox] No referenceFieldOfView set, using camera fov:", this.referenceFieldOfView)), this.referenceFieldOfView === void 0 || this.referenceFieldOfView <= 0) {
41507
- (to || this.debug) && console.warn("[ViewBox] No valid referenceFieldOfView set, cannot adjust box size:", this.referenceFieldOfView);
41518
+ (io || this.debug) && console.warn("[ViewBox] No valid referenceFieldOfView set, cannot adjust box size:", this.referenceFieldOfView);
41508
41519
  return;
41509
41520
  }
41510
41521
  if (this._applyCount >= 1 && this.mode === "once")
@@ -41518,7 +41529,7 @@ let at = class extends R {
41518
41529
  e.view = null, e.zoom = 1, e.fov = this.referenceFieldOfView, e.updateProjectionMatrix();
41519
41530
  const p = this.gameObject.worldPosition, g = this.gameObject.worldScale, y = e.worldPosition, m = y.distanceTo(p), w = Math.max(g.x, g.y, g.z), b = U(y).sub(p);
41520
41531
  if (m < w) {
41521
- (this.debug || to) && console.warn("[ViewBox] Moving camera out of bounds", m, "<", w);
41532
+ (this.debug || io) && console.warn("[ViewBox] Moving camera out of bounds", m, "<", w);
41522
41533
  const W = U(b);
41523
41534
  W.y *= 1e-8, W.normalize();
41524
41535
  const q = w - m, se = y.add(W.multiplyScalar(q));
@@ -41557,7 +41568,7 @@ let at = class extends R {
41557
41568
  const c = i[l];
41558
41569
  c.applyMatrix4(this.gameObject.matrixWorld), c.project(s), c.x < n && (n = c.x), c.x > o && (o = c.x), c.y < r && (r = c.y), c.y > a && (a = c.y);
41559
41570
  }
41560
- return to && (this._projectedBoxElement || (this._projectedBoxElement = document.createElement("div")), this._projectedBoxElement.parentElement !== this.context.domElement && this.context.domElement.appendChild(this._projectedBoxElement), this._projectedBoxElement.style.position = "fixed", this._projectedBoxElement.style.outline = "2px dashed rgba(255,0,0,.5)", this._projectedBoxElement.style.left = (n * 0.5 + 0.5) * this.context.domWidth + "px", this._projectedBoxElement.style.top = (-a * 0.5 + 0.5) * this.context.domHeight + "px", this._projectedBoxElement.style.width = (o - n) * 0.5 * this.context.domWidth + "px", this._projectedBoxElement.style.height = (a - r) * 0.5 * this.context.domHeight + "px", this._projectedBoxElement.style.pointerEvents = "none", this._projectedBoxElement.style.zIndex = "1000"), { minX: n, maxX: o, minY: r, maxY: a };
41571
+ return io && (this._projectedBoxElement || (this._projectedBoxElement = document.createElement("div")), this._projectedBoxElement.parentElement !== this.context.domElement && this.context.domElement.appendChild(this._projectedBoxElement), this._projectedBoxElement.style.position = "fixed", this._projectedBoxElement.style.outline = "2px dashed rgba(255,0,0,.5)", this._projectedBoxElement.style.left = (n * 0.5 + 0.5) * this.context.domWidth + "px", this._projectedBoxElement.style.top = (-a * 0.5 + 0.5) * this.context.domHeight + "px", this._projectedBoxElement.style.width = (o - n) * 0.5 * this.context.domWidth + "px", this._projectedBoxElement.style.height = (a - r) * 0.5 * this.context.domHeight + "px", this._projectedBoxElement.style.pointerEvents = "none", this._projectedBoxElement.style.zIndex = "1000"), { minX: n, maxX: o, minY: r, maxY: a };
41561
41572
  }
41562
41573
  _projectedBoxElement = null;
41563
41574
  };
@@ -41581,7 +41592,7 @@ var hL = Object.defineProperty, Ol = (s, e, t, i) => {
41581
41592
  (r = s[o]) && (n = r(e, t, n) || n);
41582
41593
  return n && hL(e, t, n), n;
41583
41594
  };
41584
- class Xo extends R {
41595
+ class Qo extends R {
41585
41596
  // override active and enabled here so that we always receive xr update events
41586
41597
  get activeAndEnabled() {
41587
41598
  return !0;
@@ -41621,22 +41632,22 @@ class Xo extends R {
41621
41632
  }
41622
41633
  Ol([
41623
41634
  u()
41624
- ], Xo.prototype, "side");
41635
+ ], Qo.prototype, "side");
41625
41636
  Ol([
41626
41637
  u()
41627
- ], Xo.prototype, "controller");
41638
+ ], Qo.prototype, "controller");
41628
41639
  Ol([
41629
41640
  u()
41630
- ], Xo.prototype, "hands");
41641
+ ], Qo.prototype, "hands");
41631
41642
  Ol([
41632
41643
  u()
41633
- ], Xo.prototype, "controlVisibility");
41644
+ ], Qo.prototype, "controlVisibility");
41634
41645
  Ol([
41635
41646
  u()
41636
- ], Xo.prototype, "useGripSpace");
41647
+ ], Qo.prototype, "useGripSpace");
41637
41648
  Ol([
41638
41649
  u()
41639
- ], Xo.prototype, "resetTransformAfterXRSession");
41650
+ ], Qo.prototype, "resetTransformAfterXRSession");
41640
41651
  function Hx(s, e) {
41641
41652
  const t = s.xr.getFrame();
41642
41653
  if (!t)
@@ -41872,7 +41883,7 @@ void main() {
41872
41883
  vertexShader: Id.background.vertexShader,
41873
41884
  fragmentShader: a,
41874
41885
  defines: c?.defines,
41875
- side: Po,
41886
+ side: ko,
41876
41887
  depthTest: !1,
41877
41888
  depthWrite: !1,
41878
41889
  fog: !1
@@ -41986,7 +41997,7 @@ void main() {
41986
41997
  }
41987
41998
  `
41988
41999
  );
41989
- var yL = Object.defineProperty, Qo = (s, e, t, i) => {
42000
+ var yL = Object.defineProperty, Yo = (s, e, t, i) => {
41990
42001
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
41991
42002
  (r = s[o]) && (n = r(e, t, n) || n);
41992
42003
  return n && yL(e, t, n), n;
@@ -42067,7 +42078,7 @@ class Vc {
42067
42078
  this._trackingComponent = e, this._trackedImage = t, this._bitmap = i, this.measuredSize = n, this.state = o, this._pose = r;
42068
42079
  }
42069
42080
  }
42070
- class Yo {
42081
+ class Ko {
42071
42082
  /**
42072
42083
  * Creates a new image tracking configuration.
42073
42084
  *
@@ -42105,24 +42116,24 @@ class Yo {
42105
42116
  return null;
42106
42117
  }
42107
42118
  }
42108
- Qo([
42119
+ Yo([
42109
42120
  u(URL)
42110
- ], Yo.prototype, "image");
42111
- Qo([
42121
+ ], Ko.prototype, "image");
42122
+ Yo([
42112
42123
  u()
42113
- ], Yo.prototype, "widthInMeters");
42114
- Qo([
42124
+ ], Ko.prototype, "widthInMeters");
42125
+ Yo([
42115
42126
  u(ne)
42116
- ], Yo.prototype, "object");
42117
- Qo([
42127
+ ], Ko.prototype, "object");
42128
+ Yo([
42118
42129
  u()
42119
- ], Yo.prototype, "createObjectInstance");
42120
- Qo([
42130
+ ], Ko.prototype, "createObjectInstance");
42131
+ Yo([
42121
42132
  u()
42122
- ], Yo.prototype, "imageDoesNotMove");
42123
- Qo([
42133
+ ], Ko.prototype, "imageDoesNotMove");
42134
+ Yo([
42124
42135
  u()
42125
- ], Yo.prototype, "hideWhenTrackingIsLost");
42136
+ ], Ko.prototype, "hideWhenTrackingIsLost");
42126
42137
  class _L {
42127
42138
  constructor(e, t) {
42128
42139
  this.exporter = e, this.component = t, Cc && console.log(this), this.exporter.anchoringType = "image";
@@ -42369,10 +42380,10 @@ class kf extends R {
42369
42380
  }
42370
42381
  };
42371
42382
  }
42372
- Qo([
42373
- u(Yo)
42383
+ Yo([
42384
+ u(Ko)
42374
42385
  ], kf.prototype, "trackedImages");
42375
- Qo([
42386
+ Yo([
42376
42387
  u()
42377
42388
  ], kf.prototype, "smooth");
42378
42389
  const Pc = /* @__PURE__ */ new Map(), ad = /* @__PURE__ */ new Map();
@@ -42397,7 +42408,7 @@ var bL = Object.defineProperty, Ml = (s, e, t, i) => {
42397
42408
  return n && bL(e, t, n), n;
42398
42409
  };
42399
42410
  const lr = x("debugplanetracking");
42400
- class Ko extends R {
42411
+ class Zo extends R {
42401
42412
  dataTemplate;
42402
42413
  occluder = !0;
42403
42414
  initiateRoomCaptureIfNoData = !0;
@@ -42627,22 +42638,22 @@ class Ko extends R {
42627
42638
  }
42628
42639
  Ml([
42629
42640
  u(ne)
42630
- ], Ko.prototype, "dataTemplate");
42641
+ ], Zo.prototype, "dataTemplate");
42631
42642
  Ml([
42632
42643
  u()
42633
- ], Ko.prototype, "occluder");
42644
+ ], Zo.prototype, "occluder");
42634
42645
  Ml([
42635
42646
  u()
42636
- ], Ko.prototype, "initiateRoomCaptureIfNoData");
42647
+ ], Zo.prototype, "initiateRoomCaptureIfNoData");
42637
42648
  Ml([
42638
42649
  u()
42639
- ], Ko.prototype, "usePlaneData");
42650
+ ], Zo.prototype, "usePlaneData");
42640
42651
  Ml([
42641
42652
  u()
42642
- ], Ko.prototype, "useMeshData");
42653
+ ], Zo.prototype, "useMeshData");
42643
42654
  Ml([
42644
42655
  u()
42645
- ], Ko.prototype, "runInVR");
42656
+ ], Zo.prototype, "runInVR");
42646
42657
  var vL = Object.defineProperty, wL = (s, e, t, i) => {
42647
42658
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
42648
42659
  (r = s[o]) && (n = r(e, t, n) || n);
@@ -42706,7 +42717,7 @@ class xL extends R {
42706
42717
  P.add("AlignmentConstraint", Iu);
42707
42718
  P.add("Animation", ti);
42708
42719
  P.add("Animator", Rt);
42709
- P.add("AudioListener", po);
42720
+ P.add("AudioListener", mo);
42710
42721
  P.add("AudioSource", Zi);
42711
42722
  P.add("Avatar_Brain_LookAt", eu);
42712
42723
  P.add("Avatar_MouthShapes", Bu);
@@ -42718,18 +42729,18 @@ P.add("BasicIKConstraint", dw);
42718
42729
  P.add("BoxHelperComponent", Bt);
42719
42730
  P.add("Camera", Si);
42720
42731
  P.add("CharacterController", sl);
42721
- P.add("CharacterControllerInput", Ao);
42732
+ P.add("CharacterControllerInput", Io);
42722
42733
  P.add("SphereCollider", eh);
42723
42734
  P.add("BoxCollider", Vg);
42724
42735
  P.add("MeshCollider", Hr);
42725
- P.add("CapsuleCollider", Oo);
42736
+ P.add("CapsuleCollider", Mo);
42726
42737
  P.add("ContactShadows", Uu);
42727
42738
  P.add("LogStats", fw);
42728
42739
  P.add("DeleteBox", Cr);
42729
42740
  P.add("Deletable", mw);
42730
42741
  P.add("DeviceFlag", Hg);
42731
42742
  P.add("DragControls", Sa);
42732
- P.add("DropListener", Lo);
42743
+ P.add("DropListener", Do);
42733
42744
  P.add("Duplicatable", Ow);
42734
42745
  P.add("EventListEvent", Bg);
42735
42746
  P.add("EventTrigger", Yg);
@@ -42776,21 +42787,21 @@ P.add("ColorAdjustments", Qr);
42776
42787
  P.add("DepthOfField", ss);
42777
42788
  P.add("EffectWrapper", ru);
42778
42789
  P.add("PixelationEffect", df);
42779
- P.add("ScreenSpaceAmbientOcclusion", No);
42790
+ P.add("ScreenSpaceAmbientOcclusion", $o);
42780
42791
  P.add("ScreenSpaceAmbientOcclusionN8", os);
42781
42792
  P.add("SharpeningEffect", uf);
42782
42793
  P.add("TiltShiftEffect", Hs);
42783
42794
  P.add("ToneMappingEffect", jr);
42784
42795
  P.add("Vignette", bl);
42785
42796
  P.add("Volume", mh);
42786
- P.add("ReflectionProbe", ao);
42797
+ P.add("ReflectionProbe", lo);
42787
42798
  P.add("Renderer", ui);
42788
42799
  P.add("MeshRenderer", Wu);
42789
42800
  P.add("SkinnedMeshRenderer", Pw);
42790
42801
  P.add("Rigidbody", Je);
42791
42802
  P.add("SceneSwitcher", nt);
42792
42803
  P.add("ScreenCapture", Zr);
42793
- P.add("SeeThrough", $o);
42804
+ P.add("SeeThrough", Wo);
42794
42805
  P.add("ShadowCatcher", ff);
42795
42806
  P.add("RemoteSkybox", Py);
42796
42807
  P.add("SmoothFollow", ky);
@@ -42808,14 +42819,14 @@ P.add("TestSimulateUserData", Dx);
42808
42819
  P.add("PlayableDirector", el);
42809
42820
  P.add("SignalReceiver", yf);
42810
42821
  P.add("AnimationTrackHandler", cu);
42811
- P.add("AudioTrackHandler", yo);
42822
+ P.add("AudioTrackHandler", _o);
42812
42823
  P.add("MarkerTrackHandler", Ry);
42813
42824
  P.add("SignalTrackHandler", hu);
42814
42825
  P.add("ControlTrackHandler", Ty);
42815
42826
  P.add("TransformGizmo", Sl);
42816
42827
  P.add("BaseUIComponent", Sn);
42817
42828
  P.add("UIRootComponent", Zu);
42818
- P.add("Button", Go);
42829
+ P.add("Button", qo);
42819
42830
  P.add("Canvas", Nc);
42820
42831
  P.add("CanvasGroup", Dr);
42821
42832
  P.add("EventSystem", di);
@@ -42842,11 +42853,11 @@ P.add("Voip", Vr);
42842
42853
  P.add("ClickThrough", By);
42843
42854
  P.add("CursorFollow", Cl);
42844
42855
  P.add("HoverAnimation", Bs);
42845
- P.add("ScrollFollow", qo);
42856
+ P.add("ScrollFollow", Xo);
42846
42857
  P.add("ViewBox", at);
42847
42858
  P.add("Avatar", Lr);
42848
- P.add("XRControllerFollow", Xo);
42849
- P.add("XRControllerModel", Mo);
42859
+ P.add("XRControllerFollow", Qo);
42860
+ P.add("XRControllerModel", Eo);
42850
42861
  P.add("XRControllerMovement", en);
42851
42862
  P.add("TeleportTarget", sy);
42852
42863
  P.add("WebARCameraBackground", Pf);
@@ -42854,7 +42865,7 @@ P.add("WebARSessionRoot", gn);
42854
42865
  P.add("WebXR", oy);
42855
42866
  P.add("AvatarMarker", Fe);
42856
42867
  P.add("WebXRImageTracking", kf);
42857
- P.add("WebXRPlaneTracking", Ko);
42868
+ P.add("WebXRPlaneTracking", Zo);
42858
42869
  P.add("XRRig", zy);
42859
42870
  P.add("XRFlag", pn);
42860
42871
  P.add("PlayerSync", Yw);
@@ -45149,9 +45160,9 @@ const x2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45149
45160
  Antialiasing: af,
45150
45161
  Attractor: fh,
45151
45162
  AudioExtension: al,
45152
- AudioListener: po,
45163
+ AudioListener: mo,
45153
45164
  AudioSource: Zi,
45154
- AudioTrackHandler: yo,
45165
+ AudioTrackHandler: _o,
45155
45166
  Avatar: Lr,
45156
45167
  AvatarBlink_Simple: nl,
45157
45168
  AvatarEyeLook_Rotation: hw,
@@ -45171,17 +45182,17 @@ const x2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45171
45182
  BoxCollider: Vg,
45172
45183
  BoxGizmo: fl,
45173
45184
  BoxHelperComponent: Bt,
45174
- Button: Go,
45175
- CallInfo: co,
45185
+ Button: qo,
45186
+ CallInfo: ho,
45176
45187
  Camera: Si,
45177
45188
  CameraTargetReachedEvent: Jd,
45178
45189
  Canvas: Nc,
45179
45190
  CanvasGroup: Dr,
45180
- CapsuleCollider: Oo,
45191
+ CapsuleCollider: Mo,
45181
45192
  ChangeMaterialOnClick: Vw,
45182
45193
  ChangeTransformOnClick: ll,
45183
45194
  CharacterController: sl,
45184
- CharacterControllerInput: Ao,
45195
+ CharacterControllerInput: Io,
45185
45196
  ChromaticAberration: cf,
45186
45197
  ClickThrough: By,
45187
45198
  ColorAdjustments: Qr,
@@ -45197,10 +45208,10 @@ const x2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45197
45208
  DeviceFlag: Hg,
45198
45209
  DocumentExtension: XL,
45199
45210
  DragControls: Sa,
45200
- DropListener: Lo,
45211
+ DropListener: Do,
45201
45212
  Duplicatable: Ow,
45202
45213
  EffectWrapper: ru,
45203
- EmissionModule: Uo,
45214
+ EmissionModule: No,
45204
45215
  EmphasizeOnClick: nh,
45205
45216
  EnvironmentScene: Dy,
45206
45217
  EventList: ce,
@@ -45273,7 +45284,7 @@ const x2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45273
45284
  RawImage: Ly,
45274
45285
  Rect: yT,
45275
45286
  RectTransform: Jn,
45276
- ReflectionProbe: ao,
45287
+ ReflectionProbe: lo,
45277
45288
  RegisteredAnimationInfo: _r,
45278
45289
  RemoteSkybox: Py,
45279
45290
  Renderer: ui,
@@ -45283,10 +45294,10 @@ const x2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45283
45294
  RotationOverLifetimeModule: ns,
45284
45295
  SceneSwitcher: nt,
45285
45296
  ScreenCapture: Zr,
45286
- ScreenSpaceAmbientOcclusion: No,
45297
+ ScreenSpaceAmbientOcclusion: $o,
45287
45298
  ScreenSpaceAmbientOcclusionN8: os,
45288
- ScrollFollow: qo,
45289
- SeeThrough: $o,
45299
+ ScrollFollow: Xo,
45300
+ SeeThrough: Wo,
45290
45301
  SetActiveOnClick: Hw,
45291
45302
  ShadowCatcher: ff,
45292
45303
  ShapeModule: fx,
@@ -45309,7 +45320,7 @@ const x2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45309
45320
  SplineContainer: xl,
45310
45321
  SplineData: js,
45311
45322
  SplineWalker: Rn,
45312
- Sprite: Do,
45323
+ Sprite: jo,
45313
45324
  SpriteData: wc,
45314
45325
  SpriteRenderer: Ri,
45315
45326
  SpriteSheet: Uc,
@@ -45355,11 +45366,11 @@ const x2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
45355
45366
  WebARSessionRoot: gn,
45356
45367
  WebXR: oy,
45357
45368
  WebXRImageTracking: kf,
45358
- WebXRImageTrackingModel: Yo,
45359
- WebXRPlaneTracking: Ko,
45369
+ WebXRImageTrackingModel: Ko,
45370
+ WebXRPlaneTracking: Zo,
45360
45371
  WebXRTrackedImage: Vc,
45361
- XRControllerFollow: Xo,
45362
- XRControllerModel: Mo,
45372
+ XRControllerFollow: Qo,
45373
+ XRControllerModel: Eo,
45363
45374
  XRControllerMovement: en,
45364
45375
  XRFlag: pn,
45365
45376
  XRRig: zy,
@@ -45515,9 +45526,9 @@ export {
45515
45526
  ne as AssetReference,
45516
45527
  fh as Attractor,
45517
45528
  al as AudioExtension,
45518
- po as AudioListener,
45529
+ mo as AudioListener,
45519
45530
  Zi as AudioSource,
45520
- yo as AudioTrackHandler,
45531
+ _o as AudioTrackHandler,
45521
45532
  Lr as Avatar,
45522
45533
  nl as AvatarBlink_Simple,
45523
45534
  hw as AvatarEyeLook_Rotation,
@@ -45540,19 +45551,19 @@ export {
45540
45551
  Vg as BoxCollider,
45541
45552
  fl as BoxGizmo,
45542
45553
  Bt as BoxHelperComponent,
45543
- Go as Button,
45554
+ qo as Button,
45544
45555
  mn as ButtonsFactory,
45545
45556
  nE as CallDirection,
45546
- co as CallInfo,
45557
+ ho as CallInfo,
45547
45558
  Si as Camera,
45548
45559
  Jd as CameraTargetReachedEvent,
45549
45560
  Nc as Canvas,
45550
45561
  Dr as CanvasGroup,
45551
- Oo as CapsuleCollider,
45562
+ Mo as CapsuleCollider,
45552
45563
  Vw as ChangeMaterialOnClick,
45553
45564
  ll as ChangeTransformOnClick,
45554
45565
  sl as CharacterController,
45555
- Ao as CharacterControllerInput,
45566
+ Io as CharacterControllerInput,
45556
45567
  cf as ChromaticAberration,
45557
45568
  Yi as CircularBuffer,
45558
45569
  Ia as ClearFlags,
@@ -45588,10 +45599,10 @@ export {
45588
45599
  XL as DocumentExtension,
45589
45600
  Sa as DragControls,
45590
45601
  gw as DragMode,
45591
- Lo as DropListener,
45602
+ Do as DropListener,
45592
45603
  Ow as Duplicatable,
45593
45604
  ru as EffectWrapper,
45594
- Uo as EmissionModule,
45605
+ No as EmissionModule,
45595
45606
  nh as EmphasizeOnClick,
45596
45607
  uu as EngineLoadingView,
45597
45608
  Dy as EnvironmentScene,
@@ -45661,7 +45672,7 @@ export {
45661
45672
  Ry as MarkerTrackHandler,
45662
45673
  Bx as MarkerType,
45663
45674
  ef as MaskableGraphic,
45664
- So as MaterialPropertyBlock,
45675
+ Co as MaterialPropertyBlock,
45665
45676
  km as MaterialX,
45666
45677
  F as Mathf,
45667
45678
  Hr as MeshCollider,
@@ -45670,7 +45681,7 @@ export {
45670
45681
  gl as MinMaxGradient,
45671
45682
  $d as NEEDLE_ENGINE_FEATURE_FLAGS,
45672
45683
  Mh as NEKeyboardEvent,
45673
- io as NEPointerEvent,
45684
+ no as NEPointerEvent,
45674
45685
  GL as NeedleButtonElement,
45675
45686
  _b as NeedleEngineModelLoader,
45676
45687
  iS as NeedleEngineWebComponent,
@@ -45705,7 +45716,7 @@ export {
45705
45716
  Xr as ParticleSystemBaseBehaviour,
45706
45717
  Mn as ParticleSystemRenderer,
45707
45718
  Dm as ParticleSystemShapeType,
45708
- mo as PeerHandle,
45719
+ go as PeerHandle,
45709
45720
  WP as PeerNetworking,
45710
45721
  Lc as Physics,
45711
45722
  Zw as PhysicsExtension,
@@ -45738,7 +45749,7 @@ export {
45738
45749
  Nr as RaycastOptions,
45739
45750
  yT as Rect,
45740
45751
  Jn as RectTransform,
45741
- ao as ReflectionProbe,
45752
+ lo as ReflectionProbe,
45742
45753
  _r as RegisteredAnimationInfo,
45743
45754
  Py as RemoteSkybox,
45744
45755
  ws as RenderTexture,
@@ -45754,10 +45765,10 @@ export {
45754
45765
  Pm as SceneLightSettings,
45755
45766
  nt as SceneSwitcher,
45756
45767
  Zr as ScreenCapture,
45757
- No as ScreenSpaceAmbientOcclusion,
45768
+ $o as ScreenSpaceAmbientOcclusion,
45758
45769
  os as ScreenSpaceAmbientOcclusionN8,
45759
- qo as ScrollFollow,
45760
- $o as SeeThrough,
45770
+ Xo as ScrollFollow,
45771
+ Wo as SeeThrough,
45761
45772
  Fn as SendQueue,
45762
45773
  A0 as SerializationContext,
45763
45774
  Hw as SetActiveOnClick,
@@ -45785,7 +45796,7 @@ export {
45785
45796
  js as SplineData,
45786
45797
  fv as SplineUtils,
45787
45798
  Rn as SplineWalker,
45788
- Do as Sprite,
45799
+ jo as Sprite,
45789
45800
  wc as SpriteData,
45790
45801
  Ri as SpriteRenderer,
45791
45802
  Uc as SpriteSheet,
@@ -45833,7 +45844,7 @@ export {
45833
45844
  sx as VerticalLayoutGroup,
45834
45845
  yt as VideoPlayer,
45835
45846
  at as ViewBox,
45836
- vo as ViewDevice,
45847
+ wo as ViewDevice,
45837
45848
  bl as Vignette,
45838
45849
  Xu as VisibilityAction,
45839
45850
  Vr as Voip,
@@ -45843,17 +45854,17 @@ export {
45843
45854
  HD as WaitForFrames,
45844
45855
  PO as WaitForPromise,
45845
45856
  W0 as WaitForSeconds,
45846
- bo as Watch,
45857
+ vo as Watch,
45847
45858
  Pf as WebARCameraBackground,
45848
45859
  gn as WebARSessionRoot,
45849
45860
  oy as WebXR,
45850
45861
  kr as WebXRButtonFactory,
45851
45862
  kf as WebXRImageTracking,
45852
- Yo as WebXRImageTrackingModel,
45853
- Ko as WebXRPlaneTracking,
45863
+ Ko as WebXRImageTrackingModel,
45864
+ Zo as WebXRPlaneTracking,
45854
45865
  Vc as WebXRTrackedImage,
45855
- Xo as XRControllerFollow,
45856
- Mo as XRControllerModel,
45866
+ Qo as XRControllerFollow,
45867
+ Eo as XRControllerModel,
45857
45868
  en as XRControllerMovement,
45858
45869
  pn as XRFlag,
45859
45870
  zy as XRRig,
@@ -45886,7 +45897,7 @@ export {
45886
45897
  Th as debugOwner,
45887
45898
  ER as decompressGpuTexture,
45888
45899
  xu as deepClone,
45889
- ko as delay,
45900
+ Oo as delay,
45890
45901
  lg as delayForFrames,
45891
45902
  lm as deserializeObject,
45892
45903
  Ki as destroy,
@@ -46025,7 +46036,7 @@ export {
46025
46036
  j0 as removeComponent,
46026
46037
  d2 as removeCustomImportExtensionType,
46027
46038
  TD as removePatch,
46028
- Eo as resolveUrl,
46039
+ Ro as resolveUrl,
46029
46040
  a1 as sanitizeString,
46030
46041
  fL as saveImage,
46031
46042
  y2 as screenshot,