@needle-tools/engine 4.7.2-next.35f7370 → 4.7.2-next.37cf642

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.
@@ -5,8 +5,8 @@ var t_ = (o) => {
5
5
  var aS = (o, t, e) => t in o ? rS(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
6
6
  var r = (o, t, e) => aS(o, typeof t != "symbol" ? t + "" : t, e), Xf = (o, t, e) => t.has(o) || t_("Cannot " + e);
7
7
  var ue = (o, t, e) => (Xf(o, t, "read from private field"), e ? e.call(o) : t.get(o)), mn = (o, t, e) => t.has(o) ? t_("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(o) : t.set(o, e), gn = (o, t, e, i) => (Xf(o, t, "write to private field"), i ? i.call(o, e) : t.set(o, e), e), $l = (o, t, e) => (Xf(o, t, "access private method"), e);
8
- import { Vector2 as ae, Vector3 as w, Vector4 as ye, Quaternion as W, PlaneGeometry as ls, WebGLRenderer as Zr, PerspectiveCamera as ve, OrthographicCamera as Lu, Scene as ji, Mesh as G, Texture as Fe, Uniform$1 as tn, Color as re, ShaderMaterial as ns, Box3 as Li, ShadowMaterial as b0, Euler as Ft, MeshStandardMaterial as yt, Box3Helper as lS, GridHelper as gg, Object3D as L, Material as Pe, Matrix3 as v0, Matrix4 as oe, Layers as Wo, Ray as Vo, MathUtils as zs, AxesHelper as Di, MeshBasicMaterial as Me, DoubleSide as Bi, BufferGeometry as es, Group as jo, CylinderGeometry as w0, SphereGeometry as Du, BoxGeometry as Za, SpriteMaterial as cS, Sprite as hS, Shape as dS, ExtrudeGeometry as uS, Fog as x0, DirectionalLight as rm, PointLight as yg, EdgesGeometry as fS, LineSegments as S0, LineBasicMaterial as C0, Line as Wc, BufferAttribute as _t, Raycaster as ju, Sphere as Bu, ArrayCamera as pS, Plane as Hr, SkinnedMesh as Us, InterleavedBufferAttribute as P0, Skeleton as mS, Bone as gS, Source as yS, WebGLCubeRenderTarget as _S, CubeCamera as bS, AnimationClip as Bo, FileLoader as _g, TextureLoader as Wa, PropertyBinding as Ja, LinearSRGBColorSpace as Gs, ShaderChunk as ii, UniformsLib as vS, DataTexture as bg, RGBAFormat as Fu, EquirectangularReflectionMapping as Ns, SRGBColorSpace as qs, Clock as wS, NeutralToneMapping as el, AgXToneMapping as zu, ACESFilmicToneMapping as Uu, NoToneMapping as jd, PCFSoftShadowMap$1 as xS, BasicNodeLibrary as SS, WebGLRenderTarget as ss, DepthTexture as O0, NearestFilter as Bd, LoopRepeat as CS, LoopOnce as am, AnimationMixer as vg, CompressedTexture as PS, FrontSide as Ho, Camera as OS, Frustum as i_, AudioListener as kS, PositionalAudio as MS, AudioLoader as lm, EventDispatcher as wg, BackSide as Nu, MeshDepthMaterial as RS, CustomBlending as TS, MaxEquation as ES, AmbientLight as AS, HemisphereLight as IS, AlwaysStencilFunc as LS, GreaterEqualStencilFunc as DS, NotEqualStencilFunc as jS, GreaterStencilFunc as BS, LessEqualStencilFunc as FS, EqualStencilFunc as zS, LessStencilFunc as US, NeverStencilFunc as n_, InvertStencilOp as NS, DecrementWrapStencilOp as $S, IncrementWrapStencilOp as WS, DecrementStencilOp as VS, IncrementStencilOp as HS, ReplaceStencilOp as GS, ZeroStencilOp as qS, KeepStencilOp as XS, RawShaderMaterial as k0, GLSL3 as QS, AlwaysDepth as YS, GreaterEqualDepth as KS, GreaterDepth as ZS, LessEqualDepth as JS, LessDepth as eC, NotEqualDepth as tC, EqualDepth as iC, BatchedMesh as s_, MeshPhysicalMaterial as cm, LinearFilter as Fd, UnsignedByteType as nC, RingGeometry as sC, Line3 as oC, AdditiveBlending as M0, BoxHelper as rC, SpotLight as aC, DirectionalLightHelper as lC, CameraHelper as cC, LOD as hC, Triangle as dC, NormalBlending as uC, ReinhardToneMapping as xg, LinearToneMapping as Sg, HalfFloatType as Qf, VideoTexture as fC, CubeTexture as pC, CompressedCubeTexture as mC, EquirectangularRefractionMapping as gC, VectorKeyframeTrack as yC, QuaternionKeyframeTrack as _C, Audio as bC, ShaderLib as zd, UniformsUtils as R0, MirroredRepeatWrapping as o_, MeshNormalMaterial as vC, AudioContext as wC, PMREMGenerator$1 as xC } from "./three-DrqIzZTH.js";
9
- import { createLoaders as Cg, getRaycastMesh as T0, LODsManager as pa, NEEDLE_progressive as Ze, addDracoAndKTX2Loaders as SC, configureLoader as CC, setKTX2TranscoderLocation as PC, setDracoDecoderLocation as OC } from "./gltf-progressive-CNdBjvz6.js";
8
+ import { Vector2 as ae, Vector3 as w, Vector4 as ye, Quaternion as W, PlaneGeometry as ls, WebGLRenderer as Kr, PerspectiveCamera as ve, OrthographicCamera as Lu, Scene as ji, Mesh as G, Texture as Fe, Uniform$1 as tn, Color as re, ShaderMaterial as ns, Box3 as Li, ShadowMaterial as b0, Euler as Ft, MeshStandardMaterial as yt, Box3Helper as lS, GridHelper as gg, Object3D as L, Material as Pe, Matrix3 as v0, Matrix4 as oe, Layers as Wo, Ray as Vo, MathUtils as zs, AxesHelper as Di, MeshBasicMaterial as Me, DoubleSide as Bi, BufferGeometry as es, Group as jo, CylinderGeometry as w0, SphereGeometry as Du, BoxGeometry as Za, SpriteMaterial as cS, Sprite as hS, Shape as dS, ExtrudeGeometry as uS, Fog as x0, DirectionalLight as rm, PointLight as yg, EdgesGeometry as fS, LineSegments as S0, LineBasicMaterial as C0, Line as Wc, BufferAttribute as _t, Raycaster as ju, Sphere as Bu, ArrayCamera as pS, Plane as Vr, SkinnedMesh as Us, InterleavedBufferAttribute as P0, Skeleton as mS, Bone as gS, Source as yS, WebGLCubeRenderTarget as _S, CubeCamera as bS, AnimationClip as Bo, FileLoader as _g, TextureLoader as $a, PropertyBinding as Ja, LinearSRGBColorSpace as Gs, ShaderChunk as ii, UniformsLib as vS, DataTexture as bg, RGBAFormat as Fu, EquirectangularReflectionMapping as Ns, SRGBColorSpace as qs, Clock as wS, NeutralToneMapping as el, AgXToneMapping as zu, ACESFilmicToneMapping as Uu, NoToneMapping as jd, PCFSoftShadowMap$1 as xS, BasicNodeLibrary as SS, WebGLRenderTarget as ss, DepthTexture as O0, NearestFilter as Bd, LoopRepeat as CS, LoopOnce as am, AnimationMixer as vg, CompressedTexture as PS, FrontSide as Ho, Camera as OS, Frustum as i_, AudioListener as kS, PositionalAudio as MS, AudioLoader as lm, EventDispatcher as wg, BackSide as Nu, MeshDepthMaterial as RS, CustomBlending as TS, MaxEquation as ES, AmbientLight as AS, HemisphereLight as IS, AlwaysStencilFunc as LS, GreaterEqualStencilFunc as DS, NotEqualStencilFunc as jS, GreaterStencilFunc as BS, LessEqualStencilFunc as FS, EqualStencilFunc as zS, LessStencilFunc as US, NeverStencilFunc as n_, InvertStencilOp as NS, DecrementWrapStencilOp as $S, IncrementWrapStencilOp as WS, DecrementStencilOp as VS, IncrementStencilOp as HS, ReplaceStencilOp as GS, ZeroStencilOp as qS, KeepStencilOp as XS, RawShaderMaterial as k0, GLSL3 as QS, AlwaysDepth as YS, GreaterEqualDepth as KS, GreaterDepth as ZS, LessEqualDepth as JS, LessDepth as eC, NotEqualDepth as tC, EqualDepth as iC, BatchedMesh as s_, MeshPhysicalMaterial as cm, LinearFilter as Fd, UnsignedByteType as nC, RingGeometry as sC, Line3 as oC, AdditiveBlending as M0, BoxHelper as rC, SpotLight as aC, DirectionalLightHelper as lC, CameraHelper as cC, LOD as hC, Triangle as dC, NormalBlending as uC, ReinhardToneMapping as xg, LinearToneMapping as Sg, HalfFloatType as Qf, VideoTexture as fC, CubeTexture as pC, CompressedCubeTexture as mC, EquirectangularRefractionMapping as gC, VectorKeyframeTrack as yC, QuaternionKeyframeTrack as _C, Audio as bC, ShaderLib as zd, UniformsUtils as R0, MirroredRepeatWrapping as o_, MeshNormalMaterial as vC, AudioContext as wC, PMREMGenerator$1 as xC } from "./three-DrqIzZTH.js";
9
+ import { createLoaders as Cg, getRaycastMesh as T0, LODsManager as fa, NEEDLE_progressive as Ze, addDracoAndKTX2Loaders as SC, configureLoader as CC, setKTX2TranscoderLocation as PC, setDracoDecoderLocation as OC } from "./gltf-progressive-BiLgh4_q.js";
10
10
  import { GroundedSkybox as tl, Font as kC, TextGeometry as MC, FontLoader as RC, GLTFLoader as Xs, TransformControlsGizmo as E0, EXRLoader as Ud, RGBELoader as hm, Stats as TC, nodeFrame as EC, OrbitControls as A0, PositionalAudioHelper as AC, HorizontalBlurShader as IC, VerticalBlurShader as LC, GLTFExporter as I0, strToU8 as L0, zipSync as DC, XRControllerModelFactory as jC, XRHandMeshModel as BC, Line2 as FC, LineGeometry as zC, LineMaterial as UC, KTX2Loader as NC, TransformControls as $C, InteractiveGroup as WC, HTMLMesh as VC, VertexNormalsHelper as HC, OBJLoader as Pg, FBXLoader as D0, mergeVertices as GC } from "./three-examples-B50TT3Iu.js";
11
11
  import { fetchProfile as qC, MotionController as XC, $70d766613f57b014$export$2e2bcd8739ae039 as r_, ByteBuffer as QC, v5 as a_, md5 as l_, SIZE_PREFIX_LENGTH as j0, Builder as Og, createNoise4D as YC, Matrix4 as Yf, BatchedParticleRenderer as KC, ParticleSystem as ZC, RenderMode as Ps, ConstantColor as JC, Vector4 as e1, ConstantValue as t1, TrailParticle as c_, WorkerBase as i1, MeshBVH as n1 } from "./vendor-BmYIgaS1.js";
12
12
  import { __webpack_exports__default as Ee, __webpack_exports__Text as B0, __webpack_exports__Block as F0, __webpack_exports__update as s1, SimpleStateBehavior as o1, __webpack_exports__Inline as Kf, __webpack_exports__FontLibrary as h_, ThreeMeshUI as d_ } from "./three-mesh-ui-CxuWt7m-.js";
@@ -232,9 +232,9 @@ function Vu(o, t) {
232
232
  }
233
233
  const Uh = S("debugresolveurl"), v1 = "rel:";
234
234
  function fL(o, t) {
235
- return Jr(o, t);
235
+ return Zr(o, t);
236
236
  }
237
- function Jr(o, t) {
237
+ function Zr(o, t) {
238
238
  if (t === void 0)
239
239
  return Uh && console.warn("getPath: uri is undefined, returning uri", t), t;
240
240
  if (t.startsWith("./"))
@@ -330,22 +330,22 @@ class Fo {
330
330
  this._watches.length = 0;
331
331
  }
332
332
  }
333
- const Sa = Symbol("needle:watches");
333
+ const xa = Symbol("needle:watches");
334
334
  function kg(o, t) {
335
- if (!o[Sa])
335
+ if (!o[xa])
336
336
  if (o instanceof ae)
337
- o[Sa] = new Fo(o, ["x", "y"]);
337
+ o[xa] = new Fo(o, ["x", "y"]);
338
338
  else if (o instanceof w)
339
- o[Sa] = new Fo(o, ["x", "y", "z"]);
339
+ o[xa] = new Fo(o, ["x", "y", "z"]);
340
340
  else if (o instanceof ye || o instanceof W)
341
- o[Sa] = new Fo(o, ["x", "y", "z", "w"]);
341
+ o[xa] = new Fo(o, ["x", "y", "z", "w"]);
342
342
  else
343
343
  return !1;
344
- return o[Sa].subscribeWrite(t), !0;
344
+ return o[xa].subscribeWrite(t), !0;
345
345
  }
346
346
  function N0(o, t) {
347
347
  if (!o) return;
348
- const e = o[Sa];
348
+ const e = o[xa];
349
349
  e && e.unsubscribeWrite(t);
350
350
  }
351
351
  var Q;
@@ -1231,7 +1231,7 @@ const vn = class vn {
1231
1231
  return null;
1232
1232
  }
1233
1233
  };
1234
- r(vn, "planeGeometry", new ls(2, 2, 1, 1)), r(vn, "renderer", new Zr({ antialias: !1, alpha: !0 })), r(vn, "perspectiveCam", new ve()), r(vn, "orthographicCam", new Lu()), r(vn, "scene", new ji()), r(vn, "blitMaterial", new Vd()), r(vn, "mesh", new G(vn.planeGeometry, vn.blitMaterial));
1234
+ r(vn, "planeGeometry", new ls(2, 2, 1, 1)), r(vn, "renderer", new Kr({ antialias: !1, alpha: !0 })), r(vn, "perspectiveCam", new ve()), r(vn, "orthographicCam", new Lu()), r(vn, "scene", new ji()), r(vn, "blitMaterial", new Vd()), r(vn, "mesh", new G(vn.planeGeometry, vn.blitMaterial));
1235
1235
  let nl = vn;
1236
1236
  function Z1(o) {
1237
1237
  return nl.copyTexture(o);
@@ -1345,9 +1345,9 @@ function ev(o, t, e, i) {
1345
1345
  let Nh = !1;
1346
1346
  k1((...o) => {
1347
1347
  var t;
1348
- z() && ((t = fe.Current) != null && t.isInXR) && (Va(!0), tv("error", ...o));
1348
+ z() && ((t = fe.Current) != null && t.isInXR) && (Wa(!0), tv("error", ...o));
1349
1349
  });
1350
- function Va(o) {
1350
+ function Wa(o) {
1351
1351
  if (o) {
1352
1352
  if (Nh) return;
1353
1353
  Nh = !0, oP();
@@ -1806,12 +1806,12 @@ qo('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUIL
1806
1806
  qo('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
1807
1807
  qo('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.7.2-alpha";');
1808
1808
  qo('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
1809
- qo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Fri Aug 01 2025 13:40:33 GMT+0000 (Coordinated Universal Time)";');
1809
+ qo('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Fri Aug 01 2025 15:29:25 GMT+0000 (Coordinated Universal Time)";');
1810
1810
  qo('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
1811
- const ts = "4.7.2-alpha", Eg = "undefined", av = "Fri Aug 01 2025 13:40:33 GMT+0000 (Coordinated Universal Time)";
1811
+ const ts = "4.7.2-alpha", Eg = "undefined", av = "Fri Aug 01 2025 15:29:25 GMT+0000 (Coordinated Universal Time)";
1812
1812
  rv && console.log(`Engine version: ${ts} (generator: ${Eg})
1813
1813
  Project built at ${av}`);
1814
- const hc = NEEDLE_PUBLIC_KEY, zo = "needle_isActiveInHierarchy", Ca = "builtin_components", vd = "needle_editor_guid";
1814
+ const hc = NEEDLE_PUBLIC_KEY, zo = "needle_isActiveInHierarchy", Sa = "builtin_components", vd = "needle_editor_guid";
1815
1815
  function qo(o) {
1816
1816
  try {
1817
1817
  (0, eval)(o);
@@ -2562,6 +2562,8 @@ class wP {
2562
2562
  }
2563
2563
  unbindEvents() {
2564
2564
  var t, e;
2565
+ for (const i in this._eventListeners)
2566
+ this._eventListeners[i].length = 0;
2565
2567
  window.removeEventListener("contextmenu", this.onContextMenu), (t = this._htmlEventSource) == null || t.removeEventListener("pointerdown", this.onPointerDown), window.removeEventListener("pointermove", this.onPointerMove), window.removeEventListener("pointerup", this.onPointerUp), window.removeEventListener("pointercancel", this.onPointerCancel), window.removeEventListener("touchstart", this.onTouchStart), window.removeEventListener("touchmove", this.onTouchMove), window.removeEventListener("touchend", this.onTouchEnd), (e = this._htmlEventSource) == null || e.removeEventListener("wheel", this.onMouseWheel, !1), window.removeEventListener("wheel", this.onWheelWindow, !1), window.removeEventListener("keydown", this.onKeyDown, !1), window.removeEventListener("keypress", this.onKeyPressed, !1), window.removeEventListener("keyup", this.onKeyUp, !1), window.removeEventListener("blur", this.onLostFocus);
2566
2568
  }
2567
2569
  dispose() {
@@ -2698,7 +2700,7 @@ class wP {
2698
2700
  }
2699
2701
  }
2700
2702
  }
2701
- const Ha = new oe().makeRotationY(Math.PI), Zi = new W().setFromAxisAngle(new w(0, 1, 0), Math.PI), xP = S("debugwebxr");
2703
+ const Va = new oe().makeRotationY(Math.PI), Zi = new W().setFromAxisAngle(new w(0, 1, 0), Math.PI), xP = S("debugwebxr");
2702
2704
  class SP {
2703
2705
  constructor() {
2704
2706
  r(this, "priority", -1e5);
@@ -3086,13 +3088,13 @@ Pinch: ${(s = this.getGesture("pinch")) == null ? void 0 : s.value.toFixed(3)}`)
3086
3088
  let i = null, n = null, s = null, a = null;
3087
3089
  if (e) {
3088
3090
  const O = e.transform;
3089
- this._rayMatrix.fromArray(O.matrix).premultiply(Ha), this._rayMatrix.decompose(this._rayPosition, this._rayQuaternion, q(1, 1, 1)), s = q(O.position), a = Un(O.orientation), this._rayPositionRaw.copy(s), this._rayRotationRaw.copy(a);
3091
+ this._rayMatrix.fromArray(O.matrix).premultiply(Va), this._rayMatrix.decompose(this._rayPosition, this._rayQuaternion, q(1, 1, 1)), s = q(O.position), a = Un(O.orientation), this._rayPositionRaw.copy(s), this._rayRotationRaw.copy(a);
3090
3092
  }
3091
3093
  if (this.inputSource.gripSpace) {
3092
3094
  const O = t.getPose(this.inputSource.gripSpace, this.xr.referenceSpace);
3093
3095
  if (O) {
3094
3096
  const R = O.transform;
3095
- if (i = q(R.position), n = Un(R.orientation), this._gripMatrix.fromArray(R.matrix).premultiply(Ha), this._gripMatrix.decompose(this._gripPosition, this._gripQuaternion, q(1, 1, 1)), "linearVelocity" in O && O.linearVelocity) {
3097
+ if (i = q(R.position), n = Un(R.orientation), this._gripMatrix.fromArray(R.matrix).premultiply(Va), this._gripMatrix.decompose(this._gripPosition, this._gripQuaternion, q(1, 1, 1)), "linearVelocity" in O && O.linearVelocity) {
3096
3098
  const T = O.linearVelocity;
3097
3099
  this._linearVelocity.set(T.x, T.y, T.z);
3098
3100
  }
@@ -3110,7 +3112,7 @@ Pinch: ${(s = this.getGesture("pinch")) == null ? void 0 : s.value.toFixed(3)}`)
3110
3112
  }
3111
3113
  O || (this._object.position.copy(this._rayPosition), this._object.quaternion.copy(this._rayQuaternion).multiply(Zi));
3112
3114
  const U = l.get("middle-finger-metacarpal"), E = U && this.getHandJointPose(U, t);
3113
- E && (this._gripMatrix.fromArray(E.transform.matrix).premultiply(Ha), this._gripMatrix.decompose(this._gripPosition, this._gripQuaternion, q(1, 1, 1)), i = q().copy(E.transform.position), n = Un().copy(E.transform.orientation), n.multiply(OP), i.add(q(kP).applyQuaternion(n)));
3115
+ E && (this._gripMatrix.fromArray(E.transform.matrix).premultiply(Va), this._gripMatrix.decompose(this._gripPosition, this._gripQuaternion, q(1, 1, 1)), i = q().copy(E.transform.position), n = Un().copy(E.transform.orientation), n.multiply(OP), i.add(q(kP).applyQuaternion(n)));
3114
3116
  } else this.inputSource.gripSpace && this.targetRayMode === "transient-pointer" && i && n ? (this._object.position.copy(i), this._object.quaternion.copy(n).multiply(Zi)) : s && a && (this._object.position.copy(s), this._object.quaternion.copy(a).multiply(Zi));
3115
3117
  ys && (s && a && ((y = this._raySpaceObject) == null || y.position.copy(s), (b = this._raySpaceObject) == null || b.quaternion.copy(a).multiply(Zi)), i && n && ((v = this._gripSpaceObject) == null || v.position.copy(i), (x = this._gripSpaceObject) == null || x.quaternion.copy(n).multiply(Zi)));
3116
3118
  const c = (k = this.xr.context.mainCamera) == null ? void 0 : k.parent, h = c ? Oe(c) : void 0;
@@ -3335,19 +3337,19 @@ class E_ {
3335
3337
  }
3336
3338
  var vm = /* @__PURE__ */ ((o) => (o.Visible = "application-visible", o.Hidden = "application-hidden", o.MuteChanged = "application-mutechanged", o))(vm || {});
3337
3339
  let Hd = !1;
3338
- const Ta = [];
3339
- function ea() {
3340
+ const Ra = [];
3341
+ function Jr() {
3340
3342
  if (Hd) return;
3341
3343
  z() && console.debug("User interaction registered: audio can now be played"), Hd = !0;
3342
- const o = [...Ta];
3343
- Ta.length = 0, o.forEach((t) => t());
3344
- }
3345
- document.addEventListener("mousedown", ea);
3346
- document.addEventListener("pointerup", ea);
3347
- document.addEventListener("click", ea);
3348
- document.addEventListener("dragstart", ea);
3349
- document.addEventListener("touchend", ea);
3350
- document.addEventListener("keydown", ea);
3344
+ const o = [...Ra];
3345
+ Ra.length = 0, o.forEach((t) => t());
3346
+ }
3347
+ document.addEventListener("mousedown", Jr);
3348
+ document.addEventListener("pointerup", Jr);
3349
+ document.addEventListener("click", Jr);
3350
+ document.addEventListener("dragstart", Jr);
3351
+ document.addEventListener("touchend", Jr);
3352
+ document.addEventListener("keydown", Jr);
3351
3353
  const ku = class ku extends EventTarget {
3352
3354
  /** @internal */
3353
3355
  constructor(e) {
@@ -3371,15 +3373,15 @@ const ku = class ku extends EventTarget {
3371
3373
  e();
3372
3374
  return;
3373
3375
  }
3374
- Ta.indexOf(e) === -1 && Ta.push(e);
3376
+ Ra.indexOf(e) === -1 && Ra.push(e);
3375
3377
  }
3376
3378
  }
3377
3379
  /**
3378
3380
  * Unregister a callback that was previously registered with registerWaitForInteraction.
3379
3381
  */
3380
3382
  static unregisterWaitForInteraction(e) {
3381
- const i = Ta.indexOf(e);
3382
- i !== -1 && Ta.splice(i, 1);
3383
+ const i = Ra.indexOf(e);
3384
+ i !== -1 && Ra.splice(i, 1);
3383
3385
  }
3384
3386
  /** audio muted? */
3385
3387
  get muted() {
@@ -3422,14 +3424,14 @@ const ku = class ku extends EventTarget {
3422
3424
  /** @deprecated use Application.registerWaitForInteraction instead */
3423
3425
  r(ku, "registerWaitForAllowAudio", ku.registerWaitForInteraction);
3424
3426
  let rs = ku;
3425
- const Ga = /* @__PURE__ */ new Map(), Ea = /* @__PURE__ */ new Map();
3427
+ const Ha = /* @__PURE__ */ new Map(), Ta = /* @__PURE__ */ new Map();
3426
3428
  let A_ = 0;
3427
3429
  function to(o, t, e) {
3428
- if (Ga.has(t) || Ga.set(t, new Array()), Ga.get(t).push({
3430
+ if (Ha.has(t) || Ha.set(t, new Array()), Ha.get(t).push({
3429
3431
  method: o,
3430
3432
  options: { once: !1, ...e }
3431
3433
  }), A_ < 30) {
3432
- const i = Ea.get(t);
3434
+ const i = Ta.get(t);
3433
3435
  i && (i == null ? void 0 : i.length) > 100 && (A_ += 1, console.warn(`You have ${i.length} methods registered for Event ${t}.
3434
3436
 
3435
3437
  This might be a performance issue!
@@ -3443,7 +3445,7 @@ See https://engine.needle.tools/docs/scripting.html#special-lifecycle-hooks for
3443
3445
  }
3444
3446
  }
3445
3447
  function Xo(o, t) {
3446
- const e = Ea.get(t);
3448
+ const e = Ta.get(t);
3447
3449
  if (e) {
3448
3450
  for (let n = 0; n < e.length; n++)
3449
3451
  if (e[n].method === o) {
@@ -3451,7 +3453,7 @@ function Xo(o, t) {
3451
3453
  return;
3452
3454
  }
3453
3455
  }
3454
- const i = Ga.get(t);
3456
+ const i = Ha.get(t);
3455
3457
  if (i) {
3456
3458
  for (let n = 0; n < i.length; n++)
3457
3459
  if (i[n].method === o) {
@@ -3464,13 +3466,13 @@ function Bn(o, t) {
3464
3466
  t === me.ContextCreated && wm.delete(o), pv(o, t);
3465
3467
  }
3466
3468
  function pv(o, t) {
3467
- t === Re.Start && Ga.get(me.ContextCreated) && pv(o, me.ContextCreated);
3468
- const e = t === Re.Start || t === me.ContextCreated, i = Ea.get(t);
3469
+ t === Re.Start && Ha.get(me.ContextCreated) && pv(o, me.ContextCreated);
3470
+ const e = t === Re.Start || t === me.ContextCreated, i = Ta.get(t);
3469
3471
  i && i.length > 0 && L_(o, i, e);
3470
- const n = Ga.get(t);
3472
+ const n = Ha.get(t);
3471
3473
  if (n && n.length > 0) {
3472
3474
  const s = [...n];
3473
- n.length = 0, L_(o, s, e), s.length > 0 && (Ea.has(t) || Ea.set(t, new Array()), Ea.get(t).push(...s));
3475
+ n.length = 0, L_(o, s, e), s.length > 0 && (Ta.has(t) || Ta.set(t, new Array()), Ta.get(t).push(...s));
3474
3476
  }
3475
3477
  }
3476
3478
  const Vh = new Array(), I_ = {
@@ -4253,7 +4255,7 @@ class B_ {
4253
4255
  }
4254
4256
  }
4255
4257
  var rl = /* @__PURE__ */ ((o) => (o[o.Quad = 0] = "Quad", o[o.Cube = 1] = "Cube", o[o.Sphere = 2] = "Sphere", o[o.Cylinder = 3] = "Cylinder", o[o.RoundedCube = 10] = "RoundedCube", o))(rl || {}), lh, xm;
4256
- class ta {
4258
+ class ea {
4257
4259
  /**
4258
4260
  * Creates a 3D text object
4259
4261
  * @param text The text to display
@@ -4349,7 +4351,7 @@ lh = new WeakSet(), xm = function(t, e, i) {
4349
4351
  bevelOffset: 0.01,
4350
4352
  bevelSize: 0.01
4351
4353
  });
4352
- }, mn(ta, lh);
4354
+ }, mn(ea, lh);
4353
4355
  function FP(o, t, e, i, n) {
4354
4356
  const s = new dS(), a = 1e-5, l = i - a;
4355
4357
  s.absarc(a, a, a, -Math.PI / 2, -Math.PI, !0), s.absarc(a, t - l * 2, a, Math.PI, Math.PI / 2, !0), s.absarc(o - l * 2, t - l * 2, a, Math.PI / 2, 0, !0), s.absarc(o - l * 2, a, a, 0, -Math.PI / 2, !0);
@@ -4419,7 +4421,7 @@ function F_(o, t) {
4419
4421
  }
4420
4422
  }
4421
4423
  function z_() {
4422
- return new jo().add(ta.createPrimitive("Sphere", { material: new Me({ transparent: !0, opacity: 0.1 }) }));
4424
+ return new jo().add(ea.createPrimitive("Sphere", { material: new Me({ transparent: !0, opacity: 0.1 }) }));
4423
4425
  }
4424
4426
  const Bc = class Bc {
4425
4427
  constructor(t, e, i) {
@@ -4439,7 +4441,7 @@ const Bc = class Bc {
4439
4441
  this.update(t, i), this._camera.parent !== this._scene && this._scene.add(this._camera), this._renderer.render(this._scene, this._camera);
4440
4442
  });
4441
4443
  r(this, "_objects", []);
4442
- this._mode = t, this._init = e, this._session = i, this._session.addEventListener("end", this.onEnd), this._renderer = new Zr({ alpha: !0 }), this._renderer.setAnimationLoop(this.onFrame), this._renderer.xr.setSession(i), this._renderer.xr.enabled = !0, this._camera = new ve(), this._scene = new ji(), this._scene.fog = new x0(4473924, 10, 250), this._scene.add(this._camera), this.setupScene();
4444
+ this._mode = t, this._init = e, this._session = i, this._session.addEventListener("end", this.onEnd), this._renderer = new Kr({ alpha: !0 }), this._renderer.setAnimationLoop(this.onFrame), this._renderer.xr.setSession(i), this._renderer.xr.enabled = !0, this._camera = new ve(), this._scene = new ji(), this._scene.fog = new x0(4473924, 10, 250), this._scene.add(this._camera), this.setupScene();
4443
4445
  }
4444
4446
  static get active() {
4445
4447
  return this._active;
@@ -4502,7 +4504,7 @@ const Bc = class Bc {
4502
4504
  roughness: 0.8
4503
4505
  });
4504
4506
  this.isAR && (a.emissive = new re(Math.random(), Math.random(), Math.random()), a.emissiveIntensity = Math.random());
4505
- const l = $.random(0, 1) > 0.5 ? rl.Sphere : rl.Cube, c = ta.createPrimitive(l, {
4507
+ const l = $.random(0, 1) > 0.5 ? rl.Sphere : rl.Cube, c = ea.createPrimitive(l, {
4506
4508
  material: a
4507
4509
  });
4508
4510
  c.position.x = $.random(-n, n), c.position.y = $.random(-2, n), c.position.z = $.random(-n, n), c.rotation.x = $.random(0, Math.PI * 2), c.rotation.y = $.random(0, Math.PI * 2), c.rotation.z = $.random(0, Math.PI * 2), c.scale.multiplyScalar(0.5 + Math.random() * 10);
@@ -4556,7 +4558,7 @@ async function $P() {
4556
4558
  if (t instanceof Promise) {
4557
4559
  delete globalThis["needle:XRSession"], fe.addContextCreatedCallback(async (e) => {
4558
4560
  if (!t) return;
4559
- Va(!0);
4561
+ Wa(!0);
4560
4562
  const i = await t;
4561
4563
  if (i) {
4562
4564
  const n = ne.getDefaultSessionInit("immersive-vr");
@@ -4574,7 +4576,7 @@ async function $P() {
4574
4576
  return;
4575
4577
  }
4576
4578
  (o = navigator.xr) == null || o.addEventListener("sessiongranted", async () => {
4577
- Va(!0), console.log("Received Session Granted..."), await Qs(100);
4579
+ Wa(!0), console.log("Received Session Granted..."), await Qs(100);
4578
4580
  const t = sessionStorage.getItem("needle_xr_session_mode"), e = sessionStorage.getItem("needle_xr_session_init") ?? null, i = e ? JSON.parse(e) : null;
4579
4581
  let n = null;
4580
4582
  if (_v() && (await al.start(t || "immersive-vr", i || ne.getDefaultSessionInit("immersive-vr")), await HP(), n = await al.handoff()), n)
@@ -4706,7 +4708,7 @@ const Qe = class Qe {
4706
4708
  this._newControllers.length = 0, this.controllers.length = 0;
4707
4709
  for (const c of this._xr_scripts)
4708
4710
  (s = c == null ? void 0 : c.onLeaveXR) == null || s.call(c, { xr: this });
4709
- (a = this.sync) == null || a.onExitXR(this), this.context.mainCamera && ((l = this._originalCameraParent) == null || l.add(this.context.mainCamera), this._originalCameraWorldPosition && vt(this.context.mainCamera, this._originalCameraWorldPosition), this._originalCameraWorldRotation && Mn(this.context.mainCamera, this._originalCameraWorldRotation), this._originalCameraWorldScale && Gc(this.context.mainCamera, this._originalCameraWorldScale)), this.context.requestSizeUpdate(), this._defaultRig.gameObject.removeFromParent(), Va(!1);
4711
+ (a = this.sync) == null || a.onExitXR(this), this.context.mainCamera && ((l = this._originalCameraParent) == null || l.add(this.context.mainCamera), this._originalCameraWorldPosition && vt(this.context.mainCamera, this._originalCameraWorldPosition), this._originalCameraWorldRotation && Mn(this.context.mainCamera, this._originalCameraWorldRotation), this._originalCameraWorldScale && Gc(this.context.mainCamera, this._originalCameraWorldScale)), this.context.requestSizeUpdate(), this._defaultRig.gameObject.removeFromParent(), Wa(!1);
4710
4712
  });
4711
4713
  r(this, "_didStart", !1);
4712
4714
  /** Called every frame by the engine */
@@ -4749,7 +4751,7 @@ const Qe = class Qe {
4749
4751
  }
4750
4752
  }
4751
4753
  }
4752
- bP({ session: this }), ea();
4754
+ bP({ session: this }), Jr();
4753
4755
  for (const m of Qe._xrStartListeners)
4754
4756
  m(i);
4755
4757
  const f = [...this._xr_scripts];
@@ -4790,7 +4792,7 @@ const Qe = class Qe {
4790
4792
  }
4791
4793
  this.controllers.sort((m, g) => m.index - g.index);
4792
4794
  }
4793
- et && this.context.time.frame % 30 === 0 && this.controllers.length <= 0 && this.session.inputSources.length > 0 && (Va(!0), console.error("XRControllers are not added but inputSources are present"));
4795
+ et && this.context.time.frame % 30 === 0 && this.controllers.length <= 0 && this.session.inputSources.length > 0 && (Wa(!0), console.error("XRControllers are not added but inputSources are present"));
4794
4796
  for (const f of this._xr_update_scripts) {
4795
4797
  if (f.destroyed === !0) {
4796
4798
  this._script_to_remove.push(f);
@@ -4835,7 +4837,7 @@ const Qe = class Qe {
4835
4837
  // TODO: for scene transitions (e.g. SceneSwitcher) where creating the scene might take a few moments we might want more control over when/how this fading occurs and how long the scene stays black
4836
4838
  r(this, "_transition");
4837
4839
  var s, a;
4838
- WP(t, n.init), this.session = e, this.mode = t, this.context = i, (et || S("console")) && Va(!0), this._xr_scripts = [...n.scripts], this._xr_update_scripts = this._xr_scripts.filter((l) => typeof l.onUpdateXR == "function"), this._controllerAdded = n.controller_added, this._controllerRemoved = n.controller_removed, to(this.onBefore, Re.LateUpdate), this.context.pre_render_callbacks.push(this.onBeforeRender), this.context.post_render_callbacks.push(this.onAfterRender), ((s = n.init.optionalFeatures) != null && s.includes("hit-test") || (a = n.init.requiredFeatures) != null && a.includes("hit-test")) && e.requestReferenceSpace("viewer").then((l) => {
4840
+ WP(t, n.init), this.session = e, this.mode = t, this.context = i, (et || S("console")) && Wa(!0), this._xr_scripts = [...n.scripts], this._xr_update_scripts = this._xr_scripts.filter((l) => typeof l.onUpdateXR == "function"), this._controllerAdded = n.controller_added, this._controllerRemoved = n.controller_removed, to(this.onBefore, Re.LateUpdate), this.context.pre_render_callbacks.push(this.onBeforeRender), this.context.post_render_callbacks.push(this.onAfterRender), ((s = n.init.optionalFeatures) != null && s.includes("hit-test") || (a = n.init.requiredFeatures) != null && a.includes("hit-test")) && e.requestReferenceSpace("viewer").then((l) => {
4839
4841
  var c, h;
4840
4842
  return (h = (c = e.requestHitTestSource) == null ? void 0 : c.call(e, { space: l })) == null ? void 0 : h.then((d) => this._viewerHitTestSource = d).catch((d) => console.error(d));
4841
4843
  }).catch((l) => console.error(l)), this.context.mainCamera && (this._originalCameraWorldPosition = te(this.context.mainCamera, new w()), this._originalCameraWorldRotation = Oe(this.context.mainCamera, new W()), this._originalCameraWorldScale = Ke(this.context.mainCamera, new w()), this._originalCameraParent = this.context.mainCamera.parent), this._defaultRig = new SP(), this.context.scene.add(this._defaultRig.gameObject), this.addRig(this._defaultRig);
@@ -5265,7 +5267,7 @@ const Qe = class Qe {
5265
5267
  const e = this.context.renderer.xr.getReferenceSpace(), i = e && t.getPose(e);
5266
5268
  if (i) {
5267
5269
  const n = q(i.transform.position), s = Un(i.transform.orientation), a = this.context.mainCamera;
5268
- if ((a == null ? void 0 : a.parent) !== this._cameraRenderParent && n.applyMatrix4(Ha), a != null && a.parent) {
5270
+ if ((a == null ? void 0 : a.parent) !== this._cameraRenderParent && n.applyMatrix4(Va), a != null && a.parent) {
5269
5271
  n.applyMatrix4(a.parent.matrixWorld), s.multiply(Zi);
5270
5272
  const l = Oe(a.parent);
5271
5273
  l.premultiply(Zi), s.premultiply(l);
@@ -5277,7 +5279,7 @@ const Qe = class Qe {
5277
5279
  /** convert a XRRigidTransform from XR session space to threejs / Needle Engine XR space */
5278
5280
  convertSpace(t) {
5279
5281
  const e = q(t.position);
5280
- e.applyMatrix4(Ha);
5282
+ e.applyMatrix4(Va);
5281
5283
  const i = Un(t.orientation);
5282
5284
  return i.premultiply(Zi), { position: e, quaternion: i };
5283
5285
  }
@@ -5463,7 +5465,7 @@ class qP {
5463
5465
  }
5464
5466
  }
5465
5467
  }
5466
- const At = new w(), N_ = new w(), $_ = new W(), XP = S("debuggizmos"), yn = 8947848, dp = 32, fi = class fi {
5468
+ const It = new w(), N_ = new w(), $_ = new W(), XP = S("debuggizmos"), yn = 8947848, dp = 32, fi = class fi {
5467
5469
  constructor() {
5468
5470
  }
5469
5471
  /**
@@ -5506,7 +5508,7 @@ const At = new w(), N_ = new w(), $_ = new W(), XP = S("debuggizmos"), yn = 8947
5506
5508
  static DrawRay(t, e, i = yn, n = 0, s = !0) {
5507
5509
  if (!fi.enabled) return;
5508
5510
  const a = Le.getLine(n), l = a.geometry.getAttribute("position");
5509
- l.setXYZ(0, t.x, t.y, t.z), At.set(e.x, e.y, e.z).multiplyScalar(999999999), l.setXYZ(1, t.x + At.x, t.y + At.y, t.z + At.z), l.needsUpdate = !0, a.material.color.set(i), a.material.depthTest = s, a.material.depthWrite = !1;
5511
+ l.setXYZ(0, t.x, t.y, t.z), It.set(e.x, e.y, e.z).multiplyScalar(999999999), l.setXYZ(1, t.x + It.x, t.y + It.y, t.z + It.z), l.needsUpdate = !0, a.material.color.set(i), a.material.depthTest = s, a.material.depthWrite = !1;
5510
5512
  }
5511
5513
  /**
5512
5514
  * Draw a line gizmo in the scene
@@ -5520,7 +5522,7 @@ const At = new w(), N_ = new w(), $_ = new W(), XP = S("debuggizmos"), yn = 8947
5520
5522
  static DrawDirection(t, e, i = yn, n = 0, s = !0, a = 1) {
5521
5523
  if (!fi.enabled) return;
5522
5524
  const l = Le.getLine(n), c = l.geometry.getAttribute("position");
5523
- c.setXYZ(0, t.x, t.y, t.z), e.w !== void 0 ? (At.set(0, 0, -a), $_.set(e.x, e.y, e.z, e.w), At.applyQuaternion($_)) : (At.set(e.x, e.y, e.z), At.multiplyScalar(a)), c.setXYZ(1, t.x + At.x, t.y + At.y, t.z + At.z), c.needsUpdate = !0, l.material.color.set(i), l.material.depthTest = s, l.material.depthWrite = !1;
5525
+ c.setXYZ(0, t.x, t.y, t.z), e.w !== void 0 ? (It.set(0, 0, -a), $_.set(e.x, e.y, e.z, e.w), It.applyQuaternion($_)) : (It.set(e.x, e.y, e.z), It.multiplyScalar(a)), c.setXYZ(1, t.x + It.x, t.y + It.y, t.z + It.z), c.needsUpdate = !0, l.material.color.set(i), l.material.depthTest = s, l.material.depthWrite = !1;
5524
5526
  }
5525
5527
  /**
5526
5528
  * Draw a line gizmo in the scene
@@ -5547,7 +5549,7 @@ const At = new w(), N_ = new w(), $_ = new W(), XP = S("debuggizmos"), yn = 8947
5547
5549
  static DrawCircle(t, e, i, n = yn, s = 0, a = !0) {
5548
5550
  if (!fi.enabled) return;
5549
5551
  const l = Le.getCircle(s);
5550
- l.position.set(t.x, t.y, t.z), l.scale.set(i, i, i), l.quaternion.setFromUnitVectors(this._up, At.set(e.x, e.y, e.z).normalize()), l.material.color.set(n), l.material.depthTest = a, l.material.depthWrite = !1, l.material.fog = !1;
5552
+ l.position.set(t.x, t.y, t.z), l.scale.set(i, i, i), l.quaternion.setFromUnitVectors(this._up, It.set(e.x, e.y, e.z).normalize()), l.material.color.set(n), l.material.depthTest = a, l.material.depthWrite = !1, l.material.fog = !1;
5551
5553
  }
5552
5554
  /**
5553
5555
  * Draw a 3D wiremesh sphere gizmo in the scene
@@ -5598,7 +5600,7 @@ const At = new w(), N_ = new w(), $_ = new W(), XP = S("debuggizmos"), yn = 8947
5598
5600
  static DrawWireBox3(t, e = yn, i = 0, n = !0) {
5599
5601
  if (!fi.enabled) return;
5600
5602
  const s = Le.getBox(i);
5601
- s.position.copy(t.getCenter(At)), s.scale.copy(t.getSize(At)), s.material.color.set(e), s.material.depthTest = n, s.material.wireframe = !0, s.material.depthWrite = !1, s.material.fog = !1;
5603
+ s.position.copy(t.getCenter(It)), s.scale.copy(t.getSize(It)), s.material.color.set(e), s.material.depthTest = n, s.material.wireframe = !0, s.material.depthWrite = !1, s.material.fog = !1;
5602
5604
  }
5603
5605
  /**
5604
5606
  * Draw an arrow gizmo in the scene
@@ -5612,8 +5614,8 @@ const At = new w(), N_ = new w(), $_ = new W(), XP = S("debuggizmos"), yn = 8947
5612
5614
  static DrawArrow(t, e, i = yn, n = 0, s = !0, a = !1) {
5613
5615
  if (!fi.enabled) return;
5614
5616
  const l = Le.getArrowHead(n);
5615
- l.position.set(e.x, e.y, e.z), l.quaternion.setFromUnitVectors(this._up.set(0, 1, 0), At.set(e.x, e.y, e.z).sub(N_.set(t.x, t.y, t.z)).normalize());
5616
- const h = At.set(e.x, e.y, e.z).sub(N_.set(t.x, t.y, t.z)).length() * 0.1;
5617
+ l.position.set(e.x, e.y, e.z), l.quaternion.setFromUnitVectors(this._up.set(0, 1, 0), It.set(e.x, e.y, e.z).sub(N_.set(t.x, t.y, t.z)).normalize());
5618
+ const h = It.set(e.x, e.y, e.z).sub(N_.set(t.x, t.y, t.z)).length() * 0.1;
5617
5619
  l.scale.set(h, h, h), l.material.color.set(i), l.material.depthTest = s, l.material.wireframe = a, this.DrawLine(t, e, i, n, s);
5618
5620
  }
5619
5621
  /**
@@ -5988,7 +5990,7 @@ let Gd = Fc;
5988
5990
  function V_(o) {
5989
5991
  return !(o.index && o.index.array.length < 3);
5990
5992
  }
5991
- const ur = new Bu(), Xh = new Hr(), YP = new v0();
5993
+ const ur = new Bu(), Xh = new Vr(), YP = new v0();
5992
5994
  function KP(o, t, e) {
5993
5995
  const i = o._computeIntersections;
5994
5996
  if (!i)
@@ -6104,7 +6106,7 @@ var qd;
6104
6106
  });
6105
6107
  }
6106
6108
  })(qd || (qd = {}));
6107
- const H_ = Symbol("gltf-loader-internal-usage-tracker"), ZP = S("debugusers"), ja = class ja {
6109
+ const H_ = Symbol("gltf-loader-internal-usage-tracker"), ZP = S("debugusers"), Da = class Da {
6108
6110
  constructor(t) {
6109
6111
  r(this, "parser");
6110
6112
  r(this, "_getDependency");
@@ -6116,10 +6118,10 @@ const H_ = Symbol("gltf-loader-internal-usage-tracker"), ZP = S("debugusers"), j
6116
6118
  return "NEEDLE_internal_usage_tracker";
6117
6119
  }
6118
6120
  static isLoading(t) {
6119
- return ja._loadingProcesses > 0;
6121
+ return Da._loadingProcesses > 0;
6120
6122
  }
6121
6123
  beforeRoot() {
6122
- ja._loadingProcesses++;
6124
+ Da._loadingProcesses++;
6123
6125
  const t = this, e = this._getDependency;
6124
6126
  return this.parser.getDependency = function(i, n) {
6125
6127
  const s = e.call(this, i, n);
@@ -6127,7 +6129,7 @@ const H_ = Symbol("gltf-loader-internal-usage-tracker"), ZP = S("debugusers"), j
6127
6129
  }, null;
6128
6130
  }
6129
6131
  afterRoot(t) {
6130
- ja._loadingProcesses--, this.parser.getDependency = this._getDependency;
6132
+ Da._loadingProcesses--, this.parser.getDependency = this._getDependency;
6131
6133
  for (const e of this._loadedObjects)
6132
6134
  delete e[H_], e instanceof L && (e.parent || e instanceof G && setTimeout(() => {
6133
6135
  ZP && console.warn("> GLTF LOADER: Mesh not used in scene!", e), e.material = null, e.geometry = null;
@@ -6147,8 +6149,8 @@ const H_ = Symbol("gltf-loader-internal-usage-tracker"), ZP = S("debugusers"), j
6147
6149
  // // return process;
6148
6150
  // }
6149
6151
  };
6150
- r(ja, "_loadingProcesses", 0);
6151
- let Xd = ja;
6152
+ r(Da, "_loadingProcesses", 0);
6153
+ let Xd = Da;
6152
6154
  class JP {
6153
6155
  constructor() {
6154
6156
  window.addEventListener("unhandledrejection", (t) => {
@@ -6167,13 +6169,13 @@ const Xu = S("trackresources");
6167
6169
  function vv() {
6168
6170
  return Xu === "dispose";
6169
6171
  }
6170
- let ia = !0;
6171
- Xu === 0 && (ia = !1);
6172
+ let ta = !0;
6173
+ Xu === 0 && (ta = !1);
6172
6174
  function WL(o) {
6173
- ia = o;
6175
+ ta = o;
6174
6176
  }
6175
6177
  function eO() {
6176
- return ia;
6178
+ return ta;
6177
6179
  }
6178
6180
  const wv = Symbol("disposable");
6179
6181
  function xv(o, t) {
@@ -6197,7 +6199,7 @@ function Ie(o) {
6197
6199
  else if (o instanceof G)
6198
6200
  Ie(o.geometry), Ie(o.material), Ie(o.customDepthMaterial), Ie(o.customDistanceMaterial), o.geometry = null, o.material = null, o.visible = !1;
6199
6201
  else if (o instanceof es) {
6200
- ma(o);
6202
+ pa(o);
6201
6203
  for (const e of Object.keys(o.attributes)) {
6202
6204
  const i = o.attributes[e];
6203
6205
  Ie(i);
@@ -6208,7 +6210,7 @@ function Ie(o) {
6208
6210
  for (const e of o)
6209
6211
  e instanceof Pe && Ie(e);
6210
6212
  else if (o instanceof Pe) {
6211
- ma(o);
6213
+ pa(o);
6212
6214
  for (const i of Object.keys(o)) {
6213
6215
  const n = o[i];
6214
6216
  n instanceof Fe && (Ie(n), o[i] = null);
@@ -6219,10 +6221,10 @@ function Ie(o) {
6219
6221
  const n = e[i];
6220
6222
  n instanceof Fe ? (Ie(n), e[i] = null) : n instanceof tn && (Ie(n.value), n.value = null);
6221
6223
  }
6222
- } else o instanceof Fe ? (ma(o), ma(o.source), ((t = o.source) == null ? void 0 : t.data) instanceof ImageBitmap && ma(o.source.data)) : o instanceof mS ? (ma(o.boneTexture), o.boneTexture = null) : o instanceof gS || !(o instanceof L) && Fr && console.warn("Unknown object type", o);
6224
+ } else o instanceof Fe ? (pa(o), pa(o.source), ((t = o.source) == null ? void 0 : t.data) instanceof ImageBitmap && pa(o.source.data)) : o instanceof mS ? (pa(o.boneTexture), o.boneTexture = null) : o instanceof gS || !(o instanceof L) && Fr && console.warn("Unknown object type", o);
6223
6225
  }
6224
6226
  }
6225
- function ma(o) {
6227
+ function pa(o) {
6226
6228
  o && ((Fr || vv() || Xu) && console.warn("🧨 FREE", o), o instanceof ImageBitmap ? o.close() : o instanceof yS ? o.data = null : o.dispose());
6227
6229
  }
6228
6230
  function tO(o) {
@@ -6243,18 +6245,18 @@ function HL(o) {
6243
6245
  const Fr = S("debugresourceusers") || S("debugmemory"), Xc = Symbol("needle-resource-users"), dc = Symbol("needle-resource-users-count");
6244
6246
  function Gt(o, t) {
6245
6247
  Ag(o, t, function(e, i) {
6246
- ia && !Gd.raycasting && (Qd(Xc, this, e, !1), Qd(Xc, this, i, !0));
6248
+ ta && !Gd.raycasting && (Qd(Xc, this, e, !1), Qd(Xc, this, i, !0));
6247
6249
  });
6248
6250
  }
6249
- ia && (Gt(G.prototype, "material"), Gt(G.prototype, "geometry"), Gt(Pe.prototype, "map"), Gt(Pe.prototype, "bumpMap"), Gt(Pe.prototype, "alphaMap"), Gt(Pe.prototype, "normalMap"), Gt(Pe.prototype, "displacementMap"), Gt(Pe.prototype, "roughnessMap"), Gt(Pe.prototype, "metalnessMap"), Gt(Pe.prototype, "emissiveMap"), Gt(Pe.prototype, "specularMap"), Gt(Pe.prototype, "envMap"), Gt(Pe.prototype, "lightMap"), Gt(Pe.prototype, "aoMap"), Gt(Pe.prototype, "gradientMap"));
6251
+ ta && (Gt(G.prototype, "material"), Gt(G.prototype, "geometry"), Gt(Pe.prototype, "map"), Gt(Pe.prototype, "bumpMap"), Gt(Pe.prototype, "alphaMap"), Gt(Pe.prototype, "normalMap"), Gt(Pe.prototype, "displacementMap"), Gt(Pe.prototype, "roughnessMap"), Gt(Pe.prototype, "metalnessMap"), Gt(Pe.prototype, "emissiveMap"), Gt(Pe.prototype, "specularMap"), Gt(Pe.prototype, "envMap"), Gt(Pe.prototype, "lightMap"), Gt(Pe.prototype, "aoMap"), Gt(Pe.prototype, "gradientMap"));
6250
6252
  function nO(o) {
6251
- if (ia === !1) return;
6253
+ if (ta === !1) return;
6252
6254
  const t = o[Xc];
6253
6255
  if (t)
6254
6256
  for (const e of t)
6255
6257
  Qd(Xc, e, o, !1);
6256
6258
  }
6257
- ia && Ag(Pe.prototype, "dispose", function() {
6259
+ ta && Ag(Pe.prototype, "dispose", function() {
6258
6260
  nO(this);
6259
6261
  });
6260
6262
  let Cm = 0;
@@ -6282,7 +6284,7 @@ function Qd(o, t, e, i) {
6282
6284
  }
6283
6285
  try {
6284
6286
  Ag(
6285
- Zr.prototype,
6287
+ Kr.prototype,
6286
6288
  "render",
6287
6289
  function() {
6288
6290
  Cm++;
@@ -6339,7 +6341,7 @@ class On {
6339
6341
  On.markDirty(i, !0);
6340
6342
  }
6341
6343
  }
6342
- function qa(o, t) {
6344
+ function Ga(o, t) {
6343
6345
  try {
6344
6346
  t || o();
6345
6347
  } catch (e) {
@@ -6391,7 +6393,7 @@ Did you add and remove a component in the same frame?`), je.splice(t, 1), t--;
6391
6393
  } catch (i) {
6392
6394
  console.error(i);
6393
6395
  }
6394
- e.__internalAwake !== void 0 && (e.gameObject || console.error("Calling awake for a component without a GameObject", e, e.gameObject), Pc(e.gameObject), e.activeAndEnabled && qa(e.__internalAwake.bind(e)));
6396
+ e.__internalAwake !== void 0 && (e.gameObject || console.error("Calling awake for a component without a GameObject", e, e.gameObject), Pc(e.gameObject), e.activeAndEnabled && Ga(e.__internalAwake.bind(e)));
6395
6397
  } catch (e) {
6396
6398
  console.error(e), Rs(je[t], o), je.splice(t, 1), t--;
6397
6399
  }
@@ -6399,7 +6401,7 @@ Did you add and remove a component in the same frame?`), je.splice(t, 1), t--;
6399
6401
  try {
6400
6402
  const e = je[t];
6401
6403
  if (e.destroyed || e.enabled === !1 || (Pc(e.gameObject), e.activeAndEnabled === !1)) continue;
6402
- e.__internalEnable !== void 0 && (e.enabled = !0, qa(e.__internalEnable.bind(e)));
6404
+ e.__internalEnable !== void 0 && (e.enabled = !0, Ga(e.__internalEnable.bind(e)));
6403
6405
  } catch (e) {
6404
6406
  console.error(e), Rs(je[t], o), je.splice(t, 1), t--;
6405
6407
  }
@@ -6426,7 +6428,7 @@ function kv(o, t) {
6426
6428
  const i = o.new_script_start[e];
6427
6429
  if (t !== void 0 && i.gameObject !== t || i.destroyed || i.activeAndEnabled === !1)
6428
6430
  continue;
6429
- qa(i.__internalAwake.bind(i)), i.enabled && (qa(i.__internalEnable.bind(i)), qa(i.__internalStart.bind(i)), o.new_script_start.splice(e, 1), e--);
6431
+ Ga(i.__internalAwake.bind(i)), i.enabled && (Ga(i.__internalEnable.bind(i)), Ga(i.__internalStart.bind(i)), o.new_script_start.splice(e, 1), e--);
6430
6432
  } catch (i) {
6431
6433
  console.error(i), Rs(o.new_script_start[e], o), o.new_script_start.splice(e, 1), e--;
6432
6434
  }
@@ -6469,7 +6471,7 @@ function Mv(o, t, e, i = 0) {
6469
6471
  }
6470
6472
  const a = o[zo] !== t;
6471
6473
  o[zo] = t, a && (sO && console.warn("ACTIVE CHANGE", o.name, n, o.visible, t, "changed?" + a, o), aO(o, (c) => {
6472
- t ? c.enabled && (qa(c.__internalAwake.bind(c)), c.enabled && c.__internalEnable()) : c.__didAwake && c.enabled && (c.__didEnable = !1, c.onDisable());
6474
+ t ? c.enabled && (Ga(c.__internalAwake.bind(c)), c.enabled && c.__internalEnable()) : c.__didAwake && c.enabled && (c.__didEnable = !1, c.onDisable());
6473
6475
  }));
6474
6476
  let l = !0;
6475
6477
  if (o.children)
@@ -6642,7 +6644,7 @@ function Ev(o, t, e, i) {
6642
6644
  if (d.guid) {
6643
6645
  Kd && console.log("[Local] new instance", "gameobject:", a == null ? void 0 : a.guid);
6644
6646
  const u = new fO(n.guid, d.guid);
6645
- u.seed = l, t.deleteOnDisconnect === !0 && (u.deleteStateOnDisconnect = !0), s && (s.position && (u.position = { x: s.position.x, y: s.position.y, z: s.position.z }), s.rotation && (u.rotation = { x: s.rotation.x, y: s.rotation.y, z: s.rotation.z, w: s.rotation.w }), s.scale && (u.scale = { x: s.scale.x, y: s.scale.y, z: s.scale.z })), u.position || (u.position = { x: d.position.x, y: d.position.y, z: d.position.z }), u.rotation || (u.rotation = { x: d.quaternion.x, y: d.quaternion.y, z: d.quaternion.z, w: d.quaternion.w }), u.scale || (u.scale = { x: d.scale.x, y: d.scale.y, z: d.scale.z }), u.visible = n.visible, s != null && s.parent && (typeof s.parent == "string" ? u.parent = s.parent : u.parent = s.parent.guid), u.hostData = e, i === !1 && (u.dontSave = !0), !((c = t == null ? void 0 : t.context) == null ? void 0 : c.connection) && z() && console.debug("Object will be instantiated but it will not be synced: not connected", n.guid), t.context.connection.isInRoom && Pa.push(new WeakRef(d)), (h = t == null ? void 0 : t.context) == null || h.connection.send("new-instance-created", u);
6647
+ u.seed = l, t.deleteOnDisconnect === !0 && (u.deleteStateOnDisconnect = !0), s && (s.position && (u.position = { x: s.position.x, y: s.position.y, z: s.position.z }), s.rotation && (u.rotation = { x: s.rotation.x, y: s.rotation.y, z: s.rotation.z, w: s.rotation.w }), s.scale && (u.scale = { x: s.scale.x, y: s.scale.y, z: s.scale.z })), u.position || (u.position = { x: d.position.x, y: d.position.y, z: d.position.z }), u.rotation || (u.rotation = { x: d.quaternion.x, y: d.quaternion.y, z: d.quaternion.z, w: d.quaternion.w }), u.scale || (u.scale = { x: d.scale.x, y: d.scale.y, z: d.scale.z }), u.visible = n.visible, s != null && s.parent && (typeof s.parent == "string" ? u.parent = s.parent : u.parent = s.parent.guid), u.hostData = e, i === !1 && (u.dontSave = !0), !((c = t == null ? void 0 : t.context) == null ? void 0 : c.connection) && z() && console.debug("Object will be instantiated but it will not be synced: not connected", n.guid), t.context.connection.isInRoom && Ca.push(new WeakRef(d)), (h = t == null ? void 0 : t.context) == null || h.connection.send("new-instance-created", u);
6646
6648
  } else console.warn("Missing guid, can not send new instance event", d);
6647
6649
  }
6648
6650
  return a;
@@ -6650,7 +6652,7 @@ function Ev(o, t, e, i) {
6650
6652
  function pO() {
6651
6653
  return Math.random() * 9999999;
6652
6654
  }
6653
- const Pa = new Array();
6655
+ const Ca = new Array();
6654
6656
  function mO(o) {
6655
6657
  o.connection.beginListen("new-instance-created", async (t) => {
6656
6658
  const e = await _O(t.originalGuid, o.scene);
@@ -6663,14 +6665,14 @@ function mO(o) {
6663
6665
  const i = new cs();
6664
6666
  t.position && (i.position = new w(t.position.x, t.position.y, t.position.z)), t.rotation && (i.rotation = new W(t.rotation.x, t.rotation.y, t.rotation.z, t.rotation.w)), t.scale && (i.scale = new w(t.scale.x, t.scale.y, t.scale.z)), i.parent = t.parent, t.seed && (i.idProvider = new zt(t.seed)), i.visible = t.visible, i.context = o, Kd && o.alias && console.log("[Remote] instantiate in: " + o.alias);
6665
6667
  const n = dl(e, i);
6666
- Pa.push(new WeakRef(n)), n && (t.parent === "scene" && o.scene.add(n), Kd && console.log("[Remote] new instance", "gameobject:", n == null ? void 0 : n.guid, e));
6668
+ Ca.push(new WeakRef(n)), n && (t.parent === "scene" && o.scene.add(n), Kd && console.log("[Remote] new instance", "gameobject:", n == null ? void 0 : n.guid, e));
6667
6669
  }), o.connection.beginListen("left-room", () => {
6668
- Pa.length > 0 && console.debug(`Left networking room, cleaning up ${Pa.length} instantiated objects`);
6669
- for (const t of Pa) {
6670
+ Ca.length > 0 && console.debug(`Left networking room, cleaning up ${Ca.length} instantiated objects`);
6671
+ for (const t of Ca) {
6670
6672
  const e = t.deref();
6671
6673
  e && e.destroy();
6672
6674
  }
6673
- Pa.length = 0;
6675
+ Ca.length = 0;
6674
6676
  });
6675
6677
  }
6676
6678
  function gO(o, t) {
@@ -7320,7 +7322,7 @@ function Ku(o, t, e) {
7320
7322
  return i || sn(o, t, e);
7321
7323
  }
7322
7324
  const Uv = new zt("addComponentIdProvider");
7323
- function Xa(o, t, e = !0) {
7325
+ function qa(o, t, e = !0) {
7324
7326
  o.userData || (o.userData = {}), o.userData.components || (o.userData.components = []), o.userData.components.push(t), t.gameObject = o, (t.guid === void 0 || t.guid === "invalid") && (t.guid = Uv.generateUUID()), Wg(o), qg(t, t.context);
7325
7327
  try {
7326
7328
  e && t.__internalAwake && (Pc(o), t.activeAndEnabled && t.__internalAwake()), Qu.dispatchComponentLifecycleEvent("component-added", t);
@@ -7335,7 +7337,7 @@ function sn(o, t, e, i) {
7335
7337
  const s = new t();
7336
7338
  e && s.__internalNewInstanceCreated(e);
7337
7339
  let a = !0;
7338
- return (i == null ? void 0 : i.callAwake) != null && (a = i.callAwake), Xa(o, s, a);
7340
+ return (i == null ? void 0 : i.callAwake) != null && (a = i.callAwake), qa(o, s, a);
7339
7341
  }
7340
7342
  if (t.destroyed)
7341
7343
  return console.warn("Can not move/add a destroyed component", t), t;
@@ -8077,7 +8079,7 @@ const mp = Symbol("assetReference"), So = class So {
8077
8079
  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.');
8078
8080
  } else
8079
8081
  i = t.context, t = t.sourceId;
8080
- const n = Jr(t, e);
8082
+ const n = Zr(t, e);
8081
8083
  co && console.log("GetOrCreate Addressable from", t, e, "FinalPath=", n);
8082
8084
  const s = i.addressables, a = s.findAssetReference(n);
8083
8085
  if (a) return a;
@@ -8253,7 +8255,7 @@ class KO extends dn {
8253
8255
  }
8254
8256
  }
8255
8257
  new KO();
8256
- const ZO = Promise.resolve(null), Ba = class Ba {
8258
+ const ZO = Promise.resolve(null), ja = class ja {
8257
8259
  constructor(t) {
8258
8260
  r(this, "url");
8259
8261
  r(this, "_bitmap");
@@ -8262,8 +8264,8 @@ const ZO = Promise.resolve(null), Ba = class Ba {
8262
8264
  this.url = t;
8263
8265
  }
8264
8266
  static getOrCreate(t) {
8265
- let e = Ba.imageReferences.get(t);
8266
- return e || (e = new Ba(t), Ba.imageReferences.set(t, e)), e;
8267
+ let e = ja.imageReferences.get(t);
8268
+ return e || (e = new ja(t), ja.imageReferences.set(t, e)), e;
8267
8269
  }
8268
8270
  dispose() {
8269
8271
  this._bitmapObject && this._bitmapObject.close(), this._bitmap = void 0;
@@ -8273,7 +8275,7 @@ const ZO = Promise.resolve(null), Ba = class Ba {
8273
8275
  return t.src = this.url, t;
8274
8276
  }
8275
8277
  createTexture() {
8276
- return this.url ? (this.loader || (this.loader = new Wa()), this.loader.setCrossOrigin("anonymous"), this.loader.loadAsync(this.url).then((t) => {
8278
+ return this.url ? (this.loader || (this.loader = new $a()), this.loader.setCrossOrigin("anonymous"), this.loader.loadAsync(this.url).then((t) => {
8277
8279
  var e;
8278
8280
  return t && !((e = t.name) != null && e.length) && (t.name = this.url.split("/").pop() ?? this.url), t;
8279
8281
  })) : (console.error("Can not load texture without url"), ZO);
@@ -8290,8 +8292,8 @@ const ZO = Promise.resolve(null), Ba = class Ba {
8290
8292
  }), this._bitmap);
8291
8293
  }
8292
8294
  };
8293
- r(Ba, "imageReferences", /* @__PURE__ */ new Map());
8294
- let eu = Ba;
8295
+ r(ja, "imageReferences", /* @__PURE__ */ new Map());
8296
+ let eu = ja;
8295
8297
  class JO extends dn {
8296
8298
  constructor() {
8297
8299
  super([eu], "ImageReferenceSerializer");
@@ -8301,13 +8303,13 @@ class JO extends dn {
8301
8303
  }
8302
8304
  onDeserialize(t, e) {
8303
8305
  if (typeof t == "string") {
8304
- const i = Jr(e.gltfId, t);
8306
+ const i = Zr(e.gltfId, t);
8305
8307
  return eu.getOrCreate(i);
8306
8308
  }
8307
8309
  }
8308
8310
  }
8309
8311
  new JO();
8310
- const Fa = class Fa {
8312
+ const Ba = class Ba {
8311
8313
  constructor(t) {
8312
8314
  /** The resolved url to the file */
8313
8315
  r(this, "url");
@@ -8315,8 +8317,8 @@ const Fa = class Fa {
8315
8317
  this.url = t;
8316
8318
  }
8317
8319
  static getOrCreate(t) {
8318
- let e = Fa.cache.get(t);
8319
- return e || (e = new Fa(t), Fa.cache.set(t, e)), e;
8320
+ let e = Ba.cache.get(t);
8321
+ return e || (e = new Ba(t), Ba.cache.set(t, e)), e;
8320
8322
  }
8321
8323
  /** Load the file binary data
8322
8324
  * @returns a promise that resolves to the binary data of the file. Make sure to await this request or use `.then(res => {...})` to get the result.
@@ -8331,8 +8333,8 @@ const Fa = class Fa {
8331
8333
  return this.res || (this.res = fetch(this.url)), this.res.then((t) => t.text());
8332
8334
  }
8333
8335
  };
8334
- r(Fa, "cache", /* @__PURE__ */ new Map());
8335
- let tu = Fa;
8336
+ r(Ba, "cache", /* @__PURE__ */ new Map());
8337
+ let tu = Ba;
8336
8338
  class ek extends dn {
8337
8339
  constructor() {
8338
8340
  super([tu], "FileReferenceSerializer");
@@ -8342,7 +8344,7 @@ class ek extends dn {
8342
8344
  }
8343
8345
  onDeserialize(t, e) {
8344
8346
  if (typeof t == "string") {
8345
- const i = Jr(e.gltfId, t);
8347
+ const i = Zr(e.gltfId, t);
8346
8348
  return tu.getOrCreate(i);
8347
8349
  }
8348
8350
  }
@@ -8489,9 +8491,9 @@ class nk {
8489
8491
  Gl && console.log("Load texture from gltf", h.pointer), d = Ng(this.parser, h.pointer).then((u) => this.resolveTexture(h, u));
8490
8492
  else if (typeof h.pointer == "string") {
8491
8493
  Gl && console.log("Load texture from path", h.pointer);
8492
- const u = Jr(this.source, h.pointer);
8494
+ const u = Zr(this.source, h.pointer);
8493
8495
  let f;
8494
- u.endsWith(".exr") ? f = new Ud(this.parser.options.manager) : u.endsWith(".hdr") ? f = new hm(this.parser.options.manager) : f = new Wa(this.parser.options.manager), d = f.loadAsync(u, void 0).then((m) => this.resolveTexture(h, m));
8496
+ u.endsWith(".exr") ? f = new Ud(this.parser.options.manager) : u.endsWith(".hdr") ? f = new hm(this.parser.options.manager) : f = new $a(this.parser.options.manager), d = f.loadAsync(u, void 0).then((m) => this.resolveTexture(h, m));
8495
8497
  } else h.pointer;
8496
8498
  d && l.push(d);
8497
8499
  }
@@ -8507,7 +8509,7 @@ class nk {
8507
8509
  Gl && console.log("Lightmap loaded:", i), i != null && i.isTexture && (this.registry ? (i.colorSpace = Gs, this.registry.registerTexture(this.source, t.type, i, t.index)) : console.log(Wn[t.type], t.pointer, i));
8508
8510
  }
8509
8511
  }
8510
- const ga = !!S("debuglightmaps");
8512
+ const ma = !!S("debuglightmaps");
8511
8513
  class sk {
8512
8514
  constructor(t) {
8513
8515
  r(this, "_context");
@@ -8518,7 +8520,7 @@ class sk {
8518
8520
  this._lightmaps.clear();
8519
8521
  }
8520
8522
  registerTexture(t, e, i, n) {
8521
- ga && console.log("Registering ", Wn[e] + ' "' + t + '"', i), this._lightmaps.has(t) || this._lightmaps.set(t, /* @__PURE__ */ new Map());
8523
+ ma && console.log("Registering ", Wn[e] + ' "' + t + '"', i), this._lightmaps.has(t) || this._lightmaps.set(t, /* @__PURE__ */ new Map());
8522
8524
  const s = this._lightmaps.get(t), a = (s == null ? void 0 : s.get(e)) ?? [];
8523
8525
  a.length < n && (a.length = n + 1), a[n] = i, s == null || s.set(e, a);
8524
8526
  }
@@ -8526,19 +8528,19 @@ class sk {
8526
8528
  return this.tryGet(t, Wn.Lightmap, e);
8527
8529
  }
8528
8530
  tryGetSkybox(t) {
8529
- return ga && console.log("[Get Skybox]", t, this._lightmaps), this.tryGet(t, Wn.Skybox, 0);
8531
+ return ma && console.log("[Get Skybox]", t, this._lightmaps), this.tryGet(t, Wn.Skybox, 0);
8530
8532
  }
8531
8533
  tryGetReflection(t) {
8532
- return ga && console.log("[Get Reflection]", t, this._lightmaps), this.tryGet(t, Wn.Reflection, 0);
8534
+ return ma && console.log("[Get Reflection]", t, this._lightmaps), this.tryGet(t, Wn.Reflection, 0);
8533
8535
  }
8534
8536
  tryGet(t, e, i) {
8535
8537
  if (!t)
8536
- return ga && console.warn("Missing source id"), null;
8538
+ return ma && console.warn("Missing source id"), null;
8537
8539
  const n = this._lightmaps.get(t);
8538
8540
  if (!n)
8539
- return ga && console.warn(`[Lighting] No ${Wn[e]} texture entry for`, t), null;
8541
+ return ma && console.warn(`[Lighting] No ${Wn[e]} texture entry for`, t), null;
8540
8542
  const s = n.get(e);
8541
- return s === void 0 ? (ga && console.warn(`[Lighting] No ${Wn[e]} texture for`, t, "index", i), null) : !(s != null && s.length) || s.length <= i ? null : s[i];
8543
+ return s === void 0 ? (ma && console.warn(`[Lighting] No ${Wn[e]} texture for`, t, "index", i), null) : !(s != null && s.length) || s.length <= i ? null : s[i];
8542
8544
  }
8543
8545
  }
8544
8546
  ii.lights_fragment_maps = ii.lights_fragment_maps.replace("vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );", `
@@ -8612,11 +8614,11 @@ class ok {
8612
8614
  /** @internal */
8613
8615
  setRenderer(t) {
8614
8616
  var e;
8615
- (e = this._lodsManager) == null || e.disable(), pa.removePlugin(this), pa.addPlugin(this), pa.debugDrawLine = H.DrawLine, this._lodsManager = pa.get(t), this.applySettings(), this._lodsManager.enable();
8617
+ (e = this._lodsManager) == null || e.disable(), fa.removePlugin(this), fa.addPlugin(this), fa.debugDrawLine = H.DrawLine, this._lodsManager = fa.get(t), this.applySettings(), this._lodsManager.enable();
8616
8618
  }
8617
8619
  disable() {
8618
8620
  var t;
8619
- (t = this._lodsManager) == null || t.disable(), pa.removePlugin(this);
8621
+ (t = this._lodsManager) == null || t.disable(), fa.removePlugin(this);
8620
8622
  }
8621
8623
  /** @internal */
8622
8624
  onAfterUpdatedLOD(t, e, i, n, s) {
@@ -8625,7 +8627,7 @@ class ok {
8625
8627
  onRenderDebug(t, e, i) {
8626
8628
  var l, c, h;
8627
8629
  if (!e.geometry || !Ze.hasLODLevelAvailable(e.geometry) && !Ze.hasLODLevelAvailable(e.material)) return;
8628
- const n = pa.getObjectLODState(e);
8630
+ const n = fa.getObjectLODState(e);
8629
8631
  if (!n) return;
8630
8632
  let s = i.mesh_lod;
8631
8633
  const a = i.mesh_lod != n.lastLodLevel_Mesh || i.texture_lod != n.lastLodLevel_Texture;
@@ -9600,7 +9602,7 @@ class wk {
9600
9602
  borderWidth: 5e-3
9601
9603
  });
9602
9604
  const t = M.get("ObjectRaycaster");
9603
- return t && Xa(this.menu, new t()), this.menu;
9605
+ return t && qa(this.menu, new t()), this.menu;
9604
9606
  }
9605
9607
  handleNeedleWatermark() {
9606
9608
  var t;
@@ -9620,7 +9622,7 @@ class wk {
9620
9622
  backgroundOpacity: 1
9621
9623
  }), this._poweredByNeedleElement["needle:use_eventsystem"] = !0;
9622
9624
  const e = new cb(this._context, () => globalThis.open("https://needle.tools", "_self"));
9623
- Xa(this._poweredByNeedleElement, e);
9625
+ qa(this._poweredByNeedleElement, e);
9624
9626
  const i = new Ee.Text({
9625
9627
  textContent: "Powered by",
9626
9628
  width: "auto",
@@ -9632,7 +9634,7 @@ class wk {
9632
9634
  fontSize: 0.07,
9633
9635
  margin: new ye(0, 0, 0, 0.02)
9634
9636
  });
9635
- this._poweredByNeedleElement.add(i), this._poweredByNeedleElement.add(n), (t = this.menu) == null || t.add(this._poweredByNeedleElement), this.markDirty(), new Wa().load("./include/needle/poweredbyneedle.webp", (a) => {
9637
+ this._poweredByNeedleElement.add(i), this._poweredByNeedleElement.add(n), (t = this.menu) == null || t.add(this._poweredByNeedleElement), this.markDirty(), new $a().load("./include/needle/poweredbyneedle.webp", (a) => {
9636
9638
  var c;
9637
9639
  e.allowModifyUI = !1, i.removeFromParent(), n.removeFromParent();
9638
9640
  const l = a.image.width / a.image.height;
@@ -9694,7 +9696,7 @@ class wk {
9694
9696
  });
9695
9697
  i.add(n), i["needle:use_eventsystem"] = !0;
9696
9698
  const s = new cb(this._context, () => e.click());
9697
- return Xa(i, s), new xk(this, t, e, i, n);
9699
+ return qa(i, s), new xk(this, t, e, i, n);
9698
9700
  }
9699
9701
  }
9700
9702
  class xk {
@@ -10930,7 +10932,7 @@ const Ce = class Ce {
10930
10932
  const s = (n = (i = this.domElement) == null ? void 0 : i.shadowRoot) == null ? void 0 : n.querySelector("canvas");
10931
10933
  s && (t.canvas = s, nt && console.log("Using canvas from shadow root", s));
10932
10934
  }
10933
- return nt && console.log("Using Renderer Parameters:", t, this.domElement), this.renderer = new Zr(t), this.renderer.debug.checkShaderErrors = z() || S("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = jd, this.renderer.setClearColor(new re("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = xS, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = qs, this.renderer.nodes = {
10935
+ return nt && console.log("Using Renderer Parameters:", t, this.domElement), this.renderer = new Kr(t), this.renderer.debug.checkShaderErrors = z() || S("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = jd, this.renderer.setClearColor(new re("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = xS, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = qs, this.renderer.nodes = {
10934
10936
  library: new SS(),
10935
10937
  modelViewMatrix: null,
10936
10938
  modelNormalViewMatrix: null
@@ -11287,7 +11289,7 @@ Possible solutions:
11287
11289
  if (!Array.isArray(m.file.parser.json.materials)) continue;
11288
11290
  for (let _ = 0; _ < m.file.parser.json.materials.length; _++) {
11289
11291
  const y = await m.file.parser.getDependency("material", _), b = new L();
11290
- b.position.x = _ * 1.1, b.position.y = g, this.scene.add(b), ta.createPrimitive("ShaderBall", {
11292
+ b.position.x = _ * 1.1, b.position.y = g, this.scene.add(b), ea.createPrimitive("ShaderBall", {
11291
11293
  parent: b,
11292
11294
  material: y
11293
11295
  });
@@ -12703,7 +12705,7 @@ tw([
12703
12705
  tw([
12704
12706
  p(C)
12705
12707
  ], nf.prototype, "to");
12706
- var Nk = Object.defineProperty, $k = Object.getOwnPropertyDescriptor, na = (o, t, e, i) => {
12708
+ var Nk = Object.defineProperty, $k = Object.getOwnPropertyDescriptor, ia = (o, t, e, i) => {
12707
12709
  for (var n = i > 1 ? void 0 : i ? $k(t, e) : t, s = o.length - 1, a; s >= 0; s--)
12708
12710
  (a = o[s]) && (n = (i ? a(t, e, n) : a(n)) || n);
12709
12711
  return i && n && Nk(t, e, n), n;
@@ -12967,25 +12969,25 @@ class si extends j {
12967
12969
  this.context.animations.registerAnimationMixer(this.mixer);
12968
12970
  }
12969
12971
  }
12970
- na([
12972
+ ia([
12971
12973
  p()
12972
12974
  ], si.prototype, "playAutomatically", 2);
12973
- na([
12975
+ ia([
12974
12976
  p()
12975
12977
  ], si.prototype, "randomStartTime", 2);
12976
- na([
12978
+ ia([
12977
12979
  p(iw)
12978
12980
  ], si.prototype, "minMaxSpeed", 2);
12979
- na([
12981
+ ia([
12980
12982
  p(iw)
12981
12983
  ], si.prototype, "minMaxOffsetNormalized", 2);
12982
- na([
12984
+ ia([
12983
12985
  p()
12984
12986
  ], si.prototype, "loop", 2);
12985
- na([
12987
+ ia([
12986
12988
  p()
12987
12989
  ], si.prototype, "clampWhenFinished", 2);
12988
- na([
12990
+ ia([
12989
12991
  p(Bo)
12990
12992
  ], si.prototype, "clips", 1);
12991
12993
  class Wk {
@@ -14089,7 +14091,7 @@ const vb = Symbol("previous-visibility"), Cr = class Cr extends ss {
14089
14091
  render(t, e, i) {
14090
14092
  if ("addPass" in i)
14091
14093
  this._unsupported_effectcomposer_warning || (console.warn("RenderTexture.render() does not yet support EffectComposer"), this._unsupported_effectcomposer_warning = !0);
14092
- else if (i instanceof Zr) {
14094
+ else if (i instanceof Kr) {
14093
14095
  this.onBeforeRender();
14094
14096
  const s = i.getRenderTarget(), a = i.xr.enabled;
14095
14097
  i.xr.enabled = !1, i.setRenderTarget(this), i.clear(!0, !0, !0), i.render(t, e), i.setRenderTarget(s), i.xr.enabled = a, this.onAfterRender();
@@ -14108,7 +14110,7 @@ const vb = Symbol("previous-visibility"), Cr = class Cr extends ss {
14108
14110
  }
14109
14111
  };
14110
14112
  r(Cr, "_userSet", /* @__PURE__ */ new Set());
14111
- let Qa = Cr;
14113
+ let Xa = Cr;
14112
14114
  var Yk = Object.defineProperty, Kk = Object.getOwnPropertyDescriptor, mh = (o, t, e, i) => {
14113
14115
  for (var n = i > 1 ? void 0 : i ? Kk(t, e) : t, s = o.length - 1, a; s >= 0; s--)
14114
14116
  (a = o[s]) && (n = (i ? a(t, e, n) : a(n)) || n);
@@ -15596,15 +15598,15 @@ Fe.prototype.clone = function() {
15596
15598
  };
15597
15599
  class fM extends dn {
15598
15600
  constructor() {
15599
- super([Qa, ss]);
15601
+ super([Xa, ss]);
15600
15602
  }
15601
15603
  onSerialize(t, e) {
15602
15604
  }
15603
15605
  onDeserialize(t, e) {
15604
- if (t instanceof Fe && e.type === Qa) {
15606
+ if (t instanceof Fe && e.type === Xa) {
15605
15607
  let i = t;
15606
15608
  ru.has(i) && (i = ru.get(i)), i.isRenderTargetTexture = !0, i.flipY = !0, i.offset.y = 1, i.repeat.y = -1, i.needsUpdate = !0, i.mipmaps = [], i instanceof PS && (i.isCompressedTexture = !1, i.format = Fu);
15607
- const n = new Qa(i.image.width, i.image.height, {
15609
+ const n = new Xa(i.image.width, i.image.height, {
15608
15610
  colorSpace: Gs
15609
15611
  });
15610
15612
  return n.texture = i, n;
@@ -15621,7 +15623,7 @@ class pM extends dn {
15621
15623
  }
15622
15624
  onDeserialize(t, e) {
15623
15625
  if (typeof t == "string" && t.length > 0)
15624
- return Jr(e.gltfId, t);
15626
+ return Zr(e.gltfId, t);
15625
15627
  }
15626
15628
  }
15627
15629
  new pM();
@@ -15727,7 +15729,7 @@ function au(o, t) {
15727
15729
  for (const i of o.children)
15728
15730
  au(i, t);
15729
15731
  }
15730
- function Oa(o, t, e) {
15732
+ function Pa(o, t, e) {
15731
15733
  o[t] === void 0 && console.warn("Field", t, "is undefined on", o);
15732
15734
  const i = Proxy.revocable(o[t], {
15733
15735
  // get(target, prop, receiver) {
@@ -16673,7 +16675,7 @@ var wM = Object.defineProperty, xM = Object.getOwnPropertyDescriptor, ri = (o, t
16673
16675
  for (var n = i > 1 ? void 0 : i ? xM(t, e) : t, s = o.length - 1, a; s >= 0; s--)
16674
16676
  (a = o[s]) && (n = (i ? a(t, e, n) : a(n)) || n);
16675
16677
  return i && n && wM(t, e, n), n;
16676
- }, $r = /* @__PURE__ */ ((o) => (o[o.None = 0] = "None", o[o.Skybox = 1] = "Skybox", o[o.SolidColor = 2] = "SolidColor", o[o.Uninitialized = 4] = "Uninitialized", o))($r || {});
16678
+ }, Qa = /* @__PURE__ */ ((o) => (o[o.None = 0] = "None", o[o.Skybox = 1] = "Skybox", o[o.SolidColor = 2] = "SolidColor", o[o.Uninitialized = 4] = "Uninitialized", o))(Qa || {});
16677
16679
  const vo = S("debugcam"), xb = S("debugscreenpointtoray");
16678
16680
  var Sn;
16679
16681
  const Vt = (Sn = class extends j {
@@ -16899,7 +16901,7 @@ const Vt = (Sn = class extends j {
16899
16901
  }
16900
16902
  /** @internal */
16901
16903
  onEnable() {
16902
- vo && console.log(`Camera enabled: "${this.name}". ClearFlags=${$r[this._clearFlags]}`, this), this.buildCamera(), (this.tag == "MainCamera" || !this.context.mainCameraComponent) && (this.context.setCurrentCamera(this), CM(this)), this.applyClearFlagsIfIsActiveCamera({ applySkybox: !0 });
16904
+ vo && console.log(`Camera enabled: "${this.name}". ClearFlags=${Qa[this._clearFlags]}`, this), this.buildCamera(), (this.tag == "MainCamera" || !this.context.mainCameraComponent) && (this.context.setCurrentCamera(this), CM(this)), this.applyClearFlagsIfIsActiveCamera({ applySkybox: !0 });
16903
16905
  }
16904
16906
  /** @internal */
16905
16907
  onDisable() {
@@ -16953,7 +16955,7 @@ const Vt = (Sn = class extends j {
16953
16955
  return;
16954
16956
  }
16955
16957
  if (this.fieldOfView = this._fov, vo) {
16956
- const s = `[Camera] Apply ClearFlags: ${$r[this._clearFlags]} - "${this.name}"`;
16958
+ const s = `[Camera] Apply ClearFlags: ${Qa[this._clearFlags]} - "${this.name}"`;
16957
16959
  console.debug(s);
16958
16960
  }
16959
16961
  const i = this.context.domElement.getAttribute("background-image") || this.context.domElement.getAttribute("background-color");
@@ -17045,7 +17047,7 @@ ri([
17045
17047
  p(ce)
17046
17048
  ], Vt.prototype, "backgroundColor", 1);
17047
17049
  ri([
17048
- p(Qa)
17050
+ p(Xa)
17049
17051
  ], Vt.prototype, "targetTexture", 1);
17050
17052
  let Ai = Vt;
17051
17053
  class SM {
@@ -18032,7 +18034,7 @@ var FM = Object.defineProperty, iy = (o, t, e, i) => {
18032
18034
  return n && FM(t, e, n), n;
18033
18035
  };
18034
18036
  const zM = "noVoip", UM = S("debugvoip");
18035
- class sa extends j {
18037
+ class na extends j {
18036
18038
  constructor() {
18037
18039
  super(...arguments);
18038
18040
  r(this, "autoConnect", !0);
@@ -18197,13 +18199,13 @@ class sa extends j {
18197
18199
  }
18198
18200
  iy([
18199
18201
  p()
18200
- ], sa.prototype, "autoConnect");
18202
+ ], na.prototype, "autoConnect");
18201
18203
  iy([
18202
18204
  p()
18203
- ], sa.prototype, "runInBackground");
18205
+ ], na.prototype, "runInBackground");
18204
18206
  iy([
18205
18207
  p()
18206
- ], sa.prototype, "createMenuButton");
18208
+ ], na.prototype, "createMenuButton");
18207
18209
  var NM = Object.defineProperty, lw = (o, t, e, i) => {
18208
18210
  for (var n = void 0, s = o.length - 1, a; s >= 0; s--)
18209
18211
  (a = o[s]) && (n = a(t, e, n) || n);
@@ -18222,7 +18224,7 @@ class af extends j {
18222
18224
  }
18223
18225
  awake() {
18224
18226
  setTimeout(() => {
18225
- this.voip = C.findObjectOfType(sa, this.context), this.marker || (this.marker = C.getComponentInParent(this.gameObject, oi));
18227
+ this.voip = C.findObjectOfType(na, this.context), this.marker || (this.marker = C.getComponentInParent(this.gameObject, oi));
18226
18228
  }, 3e3);
18227
18229
  }
18228
18230
  update() {
@@ -18284,7 +18286,7 @@ class cw extends j {
18284
18286
  r(this, "_startPosition", null);
18285
18287
  }
18286
18288
  awake() {
18287
- this.voip = C.findObjectOfType(sa, this.context), this.marker = C.getComponentInParent(this.gameObject, oi);
18289
+ this.voip = C.findObjectOfType(na, this.context), this.marker = C.getComponentInParent(this.gameObject, oi);
18288
18290
  }
18289
18291
  update() {
18290
18292
  if (!this.voip || !this.marker || this.context.time.frameCount % 10 !== 0) return;
@@ -18300,7 +18302,7 @@ var WM = Object.defineProperty, VM = (o, t, e, i) => {
18300
18302
  (a = o[s]) && (n = a(t, e, n) || n);
18301
18303
  return n && WM(t, e, n), n;
18302
18304
  };
18303
- const ka = S("debugxrflags"), hw = S("disablexrflags");
18305
+ const Oa = S("debugxrflags"), hw = S("disablexrflags");
18304
18306
  hw && console.warn("XRFlags are disabled");
18305
18307
  var As = /* @__PURE__ */ ((o) => (o[o.Never = 0] = "Never", o[o.Browser = 1] = "Browser", o[o.AR = 2] = "AR", o[o.VR = 4] = "VR", o[o.FirstPerson = 8] = "FirstPerson", o[o.ThirdPerson = 16] = "ThirdPerson", o[o.All = 4294967295] = "All", o))(As || {});
18306
18308
  const Ru = class Ru {
@@ -18311,7 +18313,7 @@ const Ru = class Ru {
18311
18313
  return (this.Mask & t) !== 0;
18312
18314
  }
18313
18315
  Set(t) {
18314
- ka && console.warn("Set XR flag state to", t), this.Mask = t, xn.Apply();
18316
+ Oa && console.warn("Set XR flag state to", t), this.Mask = t, xn.Apply();
18315
18317
  }
18316
18318
  Enable(t) {
18317
18319
  this.Mask |= t, xn.Apply();
@@ -18358,11 +18360,11 @@ const dw = (jt = class extends j {
18358
18360
  return;
18359
18361
  let i;
18360
18362
  const n = e;
18361
- if (n && typeof n == "number" && (console.assert(typeof n == "number", "XRFlag.UpdateVisible: state must be a number", n), ka && console.log(n), jt.buffer.Mask = n, e = jt.buffer), e instanceof gi ? (ka && console.warn(this.name, "use passed in mask", e.Mask, this.visibleIn), i = e.Has(this.visibleIn)) : (ka && console.log(this.name, "use global mask"), gi.Global.Has(this.visibleIn)), i !== void 0)
18363
+ if (n && typeof n == "number" && (console.assert(typeof n == "number", "XRFlag.UpdateVisible: state must be a number", n), Oa && console.log(n), jt.buffer.Mask = n, e = jt.buffer), e instanceof gi ? (Oa && console.warn(this.name, "use passed in mask", e.Mask, this.visibleIn), i = e.Has(this.visibleIn)) : (Oa && console.log(this.name, "use global mask"), gi.Global.Has(this.visibleIn)), i !== void 0)
18362
18364
  if (i)
18363
- ka && console.log(this.name, "is visible", this.gameObject.uuid), C.setActive(this.gameObject, !0);
18365
+ Oa && console.log(this.name, "is visible", this.gameObject.uuid), C.setActive(this.gameObject, !0);
18364
18366
  else {
18365
- if (ka && console.log(this.name, "is not visible", this.gameObject.uuid), !this.gameObject.visible) return;
18367
+ if (Oa && console.log(this.name, "is not visible", this.gameObject.uuid), !this.gameObject.visible) return;
18366
18368
  this.gameObject.visible = !1;
18367
18369
  }
18368
18370
  }
@@ -18757,7 +18759,7 @@ vi([
18757
18759
  p(w)
18758
18760
  ], oy.prototype, "center");
18759
18761
  let ry = oy;
18760
- class oa extends Ui {
18762
+ class sa extends Ui {
18761
18763
  constructor() {
18762
18764
  super(...arguments);
18763
18765
  r(this, "sharedMesh");
@@ -18800,10 +18802,10 @@ class oa extends Ui {
18800
18802
  }
18801
18803
  vi([
18802
18804
  p(G)
18803
- ], oa.prototype, "sharedMesh");
18805
+ ], sa.prototype, "sharedMesh");
18804
18806
  vi([
18805
18807
  p()
18806
- ], oa.prototype, "convex");
18808
+ ], sa.prototype, "convex");
18807
18809
  class Go extends Ui {
18808
18810
  constructor() {
18809
18811
  super(...arguments);
@@ -18988,7 +18990,7 @@ Jv((o) => {
18988
18990
  }
18989
18991
  });
18990
18992
  var Kn;
18991
- const ra = (Kn = class extends j {
18993
+ const oa = (Kn = class extends j {
18992
18994
  constructor() {
18993
18995
  super(...arguments);
18994
18996
  r(this, "autoFit", !1);
@@ -19161,23 +19163,23 @@ const ra = (Kn = class extends j {
19161
19163
  }, r(Kn, "_instances", /* @__PURE__ */ new Map()), Kn);
19162
19164
  xl([
19163
19165
  p()
19164
- ], ra.prototype, "autoFit");
19166
+ ], oa.prototype, "autoFit");
19165
19167
  xl([
19166
19168
  p()
19167
- ], ra.prototype, "darkness");
19169
+ ], oa.prototype, "darkness");
19168
19170
  xl([
19169
19171
  p()
19170
- ], ra.prototype, "opacity");
19172
+ ], oa.prototype, "opacity");
19171
19173
  xl([
19172
19174
  p()
19173
- ], ra.prototype, "blur");
19175
+ ], oa.prototype, "blur");
19174
19176
  xl([
19175
19177
  p()
19176
- ], ra.prototype, "occludeBelowGround");
19178
+ ], oa.prototype, "occludeBelowGround");
19177
19179
  xl([
19178
19180
  p()
19179
- ], ra.prototype, "backfaceShadows");
19180
- let hf = ra;
19181
+ ], oa.prototype, "backfaceShadows");
19182
+ let hf = oa;
19181
19183
  const Pb = [], Pp = new Array(), JM = S("logstats");
19182
19184
  class mw extends j {
19183
19185
  onEnable() {
@@ -19199,17 +19201,17 @@ class df extends j {
19199
19201
  }
19200
19202
  class gw extends j {
19201
19203
  }
19202
- const Ob = S("debugdeletable"), za = class za extends Zs {
19204
+ const Ob = S("debugdeletable"), Fa = class Fa extends Zs {
19203
19205
  onEnable() {
19204
- za._instances.push(this);
19206
+ Fa._instances.push(this);
19205
19207
  }
19206
19208
  onDisable() {
19207
- const t = za._instances.indexOf(this);
19208
- t >= 0 && za._instances.splice(t, 1);
19209
+ const t = Fa._instances.indexOf(this);
19210
+ t >= 0 && Fa._instances.splice(t, 1);
19209
19211
  }
19210
19212
  };
19211
- r(za, "_instances", []);
19212
- let Jc = za;
19213
+ r(Fa, "_instances", []);
19214
+ let Jc = Fa;
19213
19215
  class yw extends j {
19214
19216
  update() {
19215
19217
  for (const t of Jc._instances) {
@@ -19257,7 +19259,7 @@ class ay extends j {
19257
19259
  tR([
19258
19260
  p()
19259
19261
  ], ay.prototype, "visibleOn");
19260
- var iR = Object.defineProperty, aa = (o, t, e, i) => {
19262
+ var iR = Object.defineProperty, ra = (o, t, e, i) => {
19261
19263
  for (var n = void 0, s = o.length - 1, a; s >= 0; s--)
19262
19264
  (a = o[s]) && (n = a(t, e, n) || n);
19263
19265
  return n && iR(t, e, n), n;
@@ -19477,28 +19479,28 @@ const Yo = (ut = class extends j {
19477
19479
  }
19478
19480
  }, r(ut, "_active", 0), /** Registry of currently active and enabled DragControls components */
19479
19481
  r(ut, "_instances", []), r(ut, "lastHovered"), ut);
19480
- aa([
19482
+ ra([
19481
19483
  p()
19482
19484
  ], Yo.prototype, "dragMode");
19483
- aa([
19485
+ ra([
19484
19486
  p()
19485
19487
  ], Yo.prototype, "snapGridResolution");
19486
- aa([
19488
+ ra([
19487
19489
  p()
19488
19490
  ], Yo.prototype, "keepRotation");
19489
- aa([
19491
+ ra([
19490
19492
  p()
19491
19493
  ], Yo.prototype, "xrDragMode");
19492
- aa([
19494
+ ra([
19493
19495
  p()
19494
19496
  ], Yo.prototype, "xrKeepRotation");
19495
- aa([
19497
+ ra([
19496
19498
  p()
19497
19499
  ], Yo.prototype, "xrDistanceDragFactor");
19498
- aa([
19500
+ ra([
19499
19501
  p()
19500
19502
  ], Yo.prototype, "showGizmo");
19501
- let Aa = Yo;
19503
+ let Ea = Yo;
19502
19504
  class nR {
19503
19505
  constructor(t, e, i, n) {
19504
19506
  r(this, "handlerA");
@@ -19615,7 +19617,7 @@ class kp {
19615
19617
  r(this, "_backCenter", new w());
19616
19618
  r(this, "_backBottomCenter", new w());
19617
19619
  r(this, "_bounds", new Li());
19618
- r(this, "_dragPlane", new Hr(new w(0, 1, 0)));
19620
+ r(this, "_dragPlane", new Vr(new w(0, 1, 0)));
19619
19621
  r(this, "_draggedOverObject", null);
19620
19622
  r(this, "_draggedOverObjectLastSetUp", null);
19621
19623
  r(this, "_draggedOverObjectLastNormal", new w());
@@ -19822,9 +19824,9 @@ const Tu = class Tu {
19822
19824
  r(this, "_selected", null);
19823
19825
  r(this, "_context", null);
19824
19826
  r(this, "_camera");
19825
- r(this, "_cameraPlane", new Hr());
19827
+ r(this, "_cameraPlane", new Vr());
19826
19828
  r(this, "_hasGroundPlane", !1);
19827
- r(this, "_groundPlane", new Hr());
19829
+ r(this, "_groundPlane", new Vr());
19828
19830
  r(this, "_groundOffset", new w());
19829
19831
  r(this, "_groundOffsetFactor", 0);
19830
19832
  r(this, "_groundDistance", 0);
@@ -19976,14 +19978,14 @@ var wr;
19976
19978
  }
19977
19979
  o.removePreview = i;
19978
19980
  })(wr || (wr = {}));
19979
- const Ia = [], Rd = [];
19981
+ const Aa = [], Rd = [];
19980
19982
  var Mb;
19981
19983
  ((o) => {
19982
19984
  function t(i, n) {
19983
19985
  const s = { name: n == null ? void 0 : n.name, priority: (n == null ? void 0 : n.priority) ?? 0, callback: i };
19984
- return Ia.push(s), Ia.sort((a, l) => a.priority === l.priority ? 0 : a.priority > l.priority ? -1 : 1), () => {
19985
- const a = Ia.indexOf(s);
19986
- a >= 0 && Ia.splice(a, 1);
19986
+ return Aa.push(s), Aa.sort((a, l) => a.priority === l.priority ? 0 : a.priority > l.priority ? -1 : 1), () => {
19987
+ const a = Aa.indexOf(s);
19988
+ a >= 0 && Aa.splice(a, 1);
19987
19989
  };
19988
19990
  }
19989
19991
  o.onCreateCustomModelLoader = t;
@@ -20505,15 +20507,15 @@ const uf = class bw extends j {
20505
20507
  this.object = C.instantiate(this.object, { idProvider: s, keepWorldPosition: !1 });
20506
20508
  const a = C.getComponent(this.object, bw);
20507
20509
  a == null || a.destroy();
20508
- let l = this.object.getComponentInChildren(Aa);
20509
- l || (l = this.object.addComponent(Aa, {
20510
+ let l = this.object.getComponentInChildren(Ea);
20511
+ l || (l = this.object.addComponent(Ea, {
20510
20512
  dragMode: _w.SnapToSurfaces
20511
20513
  }), l.guid = s.generateUUID());
20512
20514
  let c = C.getComponent(l.gameObject, Ks);
20513
20515
  c || (c = l.gameObject.addComponent(Ks), c.guid = s.generateUUID());
20514
20516
  }
20515
20517
  this.object.visible = !1;
20516
- const n = this.gameObject.getComponent(Aa);
20518
+ const n = this.gameObject.getComponent(Ea);
20517
20519
  n && (n.enabled = !1), this._startPosition = ((e = this.object.position) == null ? void 0 : e.clone()) ?? new w(0, 0, 0), this._startQuaternion = ((i = this.object.quaternion) == null ? void 0 : i.clone()) ?? new W(0, 0, 0, 1);
20518
20520
  }
20519
20521
  this.gameObject.getComponentInParent(an) || this.gameObject.addComponent(an);
@@ -20532,7 +20534,7 @@ const uf = class bw extends j {
20532
20534
  if (e.used || !this.object || !this.context.connection.allowEditing || e.button !== 0) return;
20533
20535
  const i = this.handleDuplication();
20534
20536
  if (i) {
20535
- const n = C.getComponent(i, Aa);
20537
+ const n = C.getComponent(i, Ea);
20536
20538
  n ? (n.onPointerDown(e), this._forwardPointerEvents.set(e.event.space, n)) : console.warn("Duplicated object does not have DragControls", i);
20537
20539
  } else
20538
20540
  this._currentCount >= this.limitCount ? console.warn(`[Duplicatable] Limit of ${this.limitCount} objects created within a few seconds reached. Please wait a moment before creating more objects.`) : console.warn("[Duplicatable] Could not duplicate object.");
@@ -20672,7 +20674,7 @@ typeof window < "u" && window.addEventListener("unhandledrejection", (o) => {
20672
20674
  });
20673
20675
  const bs = bt, nd = "$___Export_Components", gR = "NEEDLE_components";
20674
20676
  var _0;
20675
- _0 = Ca;
20677
+ _0 = Sa;
20676
20678
  class yR {
20677
20679
  constructor() {
20678
20680
  r(this, _0);
@@ -20751,7 +20753,7 @@ class Sw {
20751
20753
  const f = os().writeBuiltinComponentData(u, this.context);
20752
20754
  f !== null && d.push(f);
20753
20755
  }
20754
- d.length > 0 && (h[Ca] = d, bs && console.log("DID WRITE", s, "nodeIndex", l, d));
20756
+ d.length > 0 && (h[Sa] = d, bs && console.log("DID WRITE", s, "nodeIndex", l, d));
20755
20757
  }
20756
20758
  }
20757
20759
  // -------------------------------------
@@ -20801,7 +20803,7 @@ class Sw {
20801
20803
  }
20802
20804
  async createComponents(t, e) {
20803
20805
  if (!e) return;
20804
- const i = e[Ca];
20806
+ const i = e[Sa];
20805
20807
  if (i) {
20806
20808
  const n = new Array();
20807
20809
  bs && console.log(t.name, i);
@@ -20810,7 +20812,7 @@ class Sw {
20810
20812
  bs && console.log("Serialized data", JSON.parse(JSON.stringify(a))), a && this.parser && n.push(
20811
20813
  Ng(this.parser, a).catch((l) => console.error(`Error while resolving references (see console for details)
20812
20814
  `, l, t, a))
20813
- ), t.userData = t.userData || {}, t.userData[Ca] = t.userData[Ca] || [], t.userData[Ca].push(a);
20815
+ ), t.userData = t.userData || {}, t.userData[Sa] = t.userData[Sa] || [], t.userData[Sa].push(a);
20814
20816
  }
20815
20817
  await Promise.all(n).catch((s) => {
20816
20818
  console.error("Error while loading components", s);
@@ -20878,7 +20880,7 @@ class bR {
20878
20880
  e.layers === void 0 && (e.layers = 0), t.userData.layer = e.layers, t.layers.disableAll(), t.layers.set(e.layers), t.userData.tag = e.tag ?? "none", t.hideFlags = 0, t.userData.static = e.static ?? !1, t.visible = e.activeSelf ?? !0, t.guid = e.guid;
20879
20881
  }
20880
20882
  }
20881
- const Tb = "NEEDLE_lighting_settings", Ma = S("debugenvlight");
20883
+ const Tb = "NEEDLE_lighting_settings", ka = S("debugenvlight");
20882
20884
  class vR {
20883
20885
  constructor(t, e, i) {
20884
20886
  r(this, "parser");
@@ -20894,7 +20896,7 @@ class vR {
20894
20896
  if (e) {
20895
20897
  const i = e[Tb];
20896
20898
  if (i) {
20897
- Ma && console.log('Loaded "' + this.name + '", src: "' + this.sourceId + '"', i);
20899
+ ka && console.log('Loaded "' + this.name + '", src: "' + this.sourceId + '"', i);
20898
20900
  let n;
20899
20901
  if (t.scene.children.length === 1) {
20900
20902
  const s = t.scene.children[0];
@@ -20931,7 +20933,7 @@ class Vm extends j {
20931
20933
  const n = this.environmentReflectionSource === Lm.Skybox ? Wn.Skybox : Wn.Reflection, s = this.context.lightmaps.tryGet(this.sourceId, n, 0);
20932
20934
  this._hasReflection = s != null, s && this.context.sceneLighting.internalRegisterReflection(this.sourceId, s);
20933
20935
  }
20934
- this.enabled = !1, this.context.sceneLighting.internalRegisterSceneLightSettings(this), Ma && window.addEventListener("keydown", (n) => {
20936
+ this.enabled = !1, this.context.sceneLighting.internalRegisterSceneLightSettings(this), ka && window.addEventListener("keydown", (n) => {
20935
20937
  if (!this.destroyed)
20936
20938
  switch (n.key) {
20937
20939
  case "l":
@@ -20953,23 +20955,23 @@ class Vm extends j {
20953
20955
  return 2.2 * $.lerp(0, 1.33, i);
20954
20956
  }
20955
20957
  onEnable() {
20956
- if (Ma && console.warn("💡🟡 >>> Enable lighting", this.sourceId, this.enabled, this), this.ambientMode == Oc.Flat) {
20958
+ if (ka && console.warn("💡🟡 >>> Enable lighting", this.sourceId, this.enabled, this), this.ambientMode == Oc.Flat) {
20957
20959
  if (this.ambientLight && !this._ambientLightObj) {
20958
20960
  const e = this.calculateIntensityFactor(this.ambientLight);
20959
- this._ambientLightObj = new AS(this.ambientLight, this.ambientIntensity * e), Ma && console.log("Created ambient light", this.sourceId, this._ambientLightObj, this.ambientIntensity, e);
20961
+ this._ambientLightObj = new AS(this.ambientLight, this.ambientIntensity * e), ka && console.log("Created ambient light", this.sourceId, this._ambientLightObj, this.ambientIntensity, e);
20960
20962
  }
20961
20963
  this._ambientLightObj && this.gameObject.add(this._ambientLightObj);
20962
20964
  } else if (this.ambientMode === Oc.Trilight) {
20963
20965
  if (this.ambientTrilight) {
20964
20966
  const e = this.ambientTrilight[0], i = this.ambientTrilight[this.ambientTrilight.length - 1], n = this.calculateIntensityFactor(i);
20965
- this._hemisphereLightObj = new IS(i, e, this.ambientIntensity * n), this.gameObject.add(this._hemisphereLightObj), Ma && console.log("Created hemisphere ambient light", this.sourceId, this._hemisphereLightObj, this.ambientIntensity, n);
20967
+ this._hemisphereLightObj = new IS(i, e, this.ambientIntensity * n), this.gameObject.add(this._hemisphereLightObj), ka && console.log("Created hemisphere ambient light", this.sourceId, this._hemisphereLightObj, this.ambientIntensity, n);
20966
20968
  }
20967
20969
  } else
20968
20970
  this._ambientLightObj && this._ambientLightObj.removeFromParent(), this._hemisphereLightObj && this._hemisphereLightObj.removeFromParent();
20969
20971
  this.sourceId && this.context.sceneLighting.internalEnableReflection(this.sourceId);
20970
20972
  }
20971
20973
  onDisable() {
20972
- Ma && console.warn("💡⚫ <<< Disable lighting:", this.sourceId, this), this._ambientLightObj && this._ambientLightObj.removeFromParent(), this._hemisphereLightObj && this._hemisphereLightObj.removeFromParent(), this.sourceId && this.context.sceneLighting.internalDisableReflection(this.sourceId);
20974
+ ka && console.warn("💡⚫ <<< Disable lighting:", this.sourceId, this), this._ambientLightObj && this._ambientLightObj.removeFromParent(), this._hemisphereLightObj && this._hemisphereLightObj.removeFromParent(), this.sourceId && this.context.sceneLighting.internalDisableReflection(this.sourceId);
20973
20975
  }
20974
20976
  }
20975
20977
  const Rp = S("debugstencil");
@@ -21069,7 +21071,7 @@ function SR(o) {
21069
21071
  }
21070
21072
  const CR = "NEEDLE_render_objects";
21071
21073
  var Cw = /* @__PURE__ */ ((o) => (o[o.INT = 5124] = "INT", o[o.FLOAT = 5126] = "FLOAT", o[o.FLOAT_VEC2 = 35664] = "FLOAT_VEC2", o[o.FLOAT_VEC3 = 35665] = "FLOAT_VEC3", o[o.FLOAT_VEC4 = 35666] = "FLOAT_VEC4", o[o.INT_VEC2 = 35667] = "INT_VEC2", o[o.INT_VEC3 = 35668] = "INT_VEC3", o[o.INT_VEC4 = 35669] = "INT_VEC4", o[o.BOOL = 35670] = "BOOL", o[o.BOOL_VEC2 = 35671] = "BOOL_VEC2", o[o.BOOL_VEC3 = 35672] = "BOOL_VEC3", o[o.BOOL_VEC4 = 35673] = "BOOL_VEC4", o[o.FLOAT_MAT2 = 35674] = "FLOAT_MAT2", o[o.FLOAT_MAT3 = 35675] = "FLOAT_MAT3", o[o.FLOAT_MAT4 = 35676] = "FLOAT_MAT4", o[o.SAMPLER_2D = 35678] = "SAMPLER_2D", o[o.SAMPLER_3D = 35680] = "SAMPLER_3D", o[o.SAMPLER_CUBE = 35681] = "SAMPLER_CUBE", o[o.UNKNOWN = 0] = "UNKNOWN", o))(Cw || {});
21072
- const zn = S("debugcustomshader"), ya = "NEEDLE_techniques_webgl";
21074
+ const zn = S("debugcustomshader"), ga = "NEEDLE_techniques_webgl";
21073
21075
  class PR {
21074
21076
  constructor() {
21075
21077
  r(this, "objectToWorldMatrix", new oe());
@@ -21205,19 +21207,19 @@ class OR {
21205
21207
  this.parser = t, this.identifier = e;
21206
21208
  }
21207
21209
  get name() {
21208
- return ya;
21210
+ return ga;
21209
21211
  }
21210
21212
  loadMaterial(t) {
21211
21213
  const e = this.parser.json.materials[t];
21212
21214
  if (!e)
21213
21215
  return zn && console.log(t, this.parser.json.materials), null;
21214
- if (!e.extensions || !e.extensions[ya])
21216
+ if (!e.extensions || !e.extensions[ga])
21215
21217
  return zn && console.log(`Material ${t} does not use NEEDLE_techniques_webgl`), null;
21216
21218
  zn && console.log(`Material ${t} uses NEEDLE_techniques_webgl`, e);
21217
- const i = e.extensions[ya].technique;
21219
+ const i = e.extensions[ga].technique;
21218
21220
  if (i < 0)
21219
21221
  return console.debug(`Material ${t} does not have a valid technique index`), null;
21220
- const n = this.parser.json.extensions[ya];
21222
+ const n = this.parser.json.extensions[ga];
21221
21223
  if (!n)
21222
21224
  return zn ? console.error("Missing shader data", this.parser.json.extensions) : console.debug("Missing custom shader data in parser.json.extensions"), null;
21223
21225
  zn && console.log(n);
@@ -21263,8 +21265,8 @@ class OR {
21263
21265
  }
21264
21266
  }
21265
21267
  let m = !1;
21266
- if (e.extensions && e.extensions[ya]) {
21267
- const k = e.extensions[ya];
21268
+ if (e.extensions && e.extensions[ga]) {
21269
+ const k = e.extensions[ga];
21268
21270
  if (k.technique === i) {
21269
21271
  zn && console.log(e.name, "Material Properties", k);
21270
21272
  for (const O in k.values) {
@@ -21382,13 +21384,13 @@ const kR = S("debugextensions");
21382
21384
  let uu;
21383
21385
  const MR = import("./three-examples-B50TT3Iu.js").then((o) => o.GLTFLoaderAnimationPointer).then(async (o) => (uu = o.GLTFAnimationPointerExtension, uu)).catch((o) => {
21384
21386
  console.warn("Failed to import GLTFLoaderAnimationPointer. Please use @needle-tools/three for full KHR_animation support", o);
21385
- }), Gr = new Array();
21387
+ }), Hr = new Array();
21386
21388
  function p2(o) {
21387
- Gr.includes(o) || Gr.push(o);
21389
+ Hr.includes(o) || Hr.push(o);
21388
21390
  }
21389
21391
  function m2(o) {
21390
- const t = Gr.indexOf(o);
21391
- t >= 0 && Gr.splice(t, 1);
21392
+ const t = Hr.indexOf(o);
21393
+ t >= 0 && Hr.splice(t, 1);
21392
21394
  }
21393
21395
  function Ow(o) {
21394
21396
  if (o instanceof Xs) {
@@ -21414,15 +21416,15 @@ async function Gm(o, t, e) {
21414
21416
  name: "KHR_animation_pointer_NOT_AVAILABLE"
21415
21417
  };
21416
21418
  });
21417
- for (const n of Gr)
21419
+ for (const n of Hr)
21418
21420
  n.onImport && n.onImport(o, e, t);
21419
21421
  }
21420
21422
  function kw(o, t) {
21421
- for (const e of Gr)
21423
+ for (const e of Hr)
21422
21424
  e.onExport && e.onExport(o, t);
21423
21425
  }
21424
21426
  function TR(o, t, e) {
21425
- for (const i of Gr)
21427
+ for (const i of Hr)
21426
21428
  i.onLoaded && i.onLoaded(o, t, e);
21427
21429
  }
21428
21430
  class Mw {
@@ -21561,7 +21563,7 @@ Rw([
21561
21563
  p(w)
21562
21564
  ], uy.prototype, "size");
21563
21565
  let fu = uy;
21564
- const di = S("debuginstancing"), Ua = class Ua {
21566
+ const di = S("debuginstancing"), za = class za {
21565
21567
  constructor() {
21566
21568
  r(this, "objs", []);
21567
21569
  }
@@ -21598,7 +21600,7 @@ const di = S("debuginstancing"), Ua = class Ua {
21598
21600
  if (!u.canAdd(s.geometry, a)) continue;
21599
21601
  return u.addInstance(s);
21600
21602
  }
21601
- let l = Ua.getStartInstanceCount(t);
21603
+ let l = za.getStartInstanceCount(t);
21602
21604
  (!l || l < 0) && (l = 4);
21603
21605
  let c = t.name;
21604
21606
  c != null && c.length || (c = _1());
@@ -21615,16 +21617,16 @@ const di = S("debuginstancing"), Ua = class Ua {
21615
21617
  t.matrixWorld.multiplyMatrices = n;
21616
21618
  }
21617
21619
  };
21618
- r(Ua, "instance", new Ua()), /** This is the initial instance count when creating a new instancing structure.
21620
+ r(za, "instance", new za()), /** This is the initial instance count when creating a new instancing structure.
21619
21621
  * Override this and the number of max instances that you expect for a given object.
21620
21622
  * The larger the value the more objects can be added without having to resize but it will also consume more memory.
21621
21623
  * (The instancing mesh renderer will grow x2 if the max instance count is reached)
21622
21624
  * @default 4
21623
21625
  * @returns The initial instance count
21624
21626
  * */
21625
- r(Ua, "getStartInstanceCount", (t) => 4);
21626
- let eh = Ua;
21627
- const Na = class Na {
21627
+ r(za, "getStartInstanceCount", (t) => 4);
21628
+ let eh = za;
21629
+ const Ua = class Ua {
21628
21630
  constructor(t, e) {
21629
21631
  /** The object that is being instanced */
21630
21632
  r(this, "object");
@@ -21639,7 +21641,7 @@ const Na = class Na {
21639
21641
  r(this, "__geometryIndex", -1);
21640
21642
  /** The mesh information of the object - this tries to also calculate the LOD info */
21641
21643
  r(this, "meshInformation");
21642
- this.__instanceIndex = -1, this.object = t, this.renderer = e, t[Ov] = e, this.meshInformation = xr(t.geometry), Na.all.push(this);
21644
+ this.__instanceIndex = -1, this.object = t, this.renderer = e, t[Ov] = e, this.meshInformation = xr(t.geometry), Ua.all.push(this);
21643
21645
  }
21644
21646
  /** The name of the object */
21645
21647
  get name() {
@@ -21703,13 +21705,13 @@ const Na = class Na {
21703
21705
  */
21704
21706
  remove(t) {
21705
21707
  if (!(this.__instanceIndex < 0) && (this.renderer.remove(this, t), C.markAsInstancedRendered(this.object, !1), t)) {
21706
- const e = Na.all.indexOf(this);
21707
- e >= 0 && Na.all.splice(e, 1);
21708
+ const e = Ua.all.indexOf(this);
21709
+ e >= 0 && Ua.all.splice(e, 1);
21708
21710
  }
21709
21711
  }
21710
21712
  };
21711
- r(Na, "all", []);
21712
- let pu = Na;
21713
+ r(Ua, "all", []);
21714
+ let pu = Ua;
21713
21715
  class Tw {
21714
21716
  constructor(t, e, i, n, s) {
21715
21717
  /** If true, the instancer is allowed to grow when the max instance count is reached */
@@ -21934,7 +21936,7 @@ function Ib() {
21934
21936
  const o = new yt({ color: new re(Math.random(), Math.random(), Math.random()) });
21935
21937
  return o.emissive = o.color, o.emissiveIntensity = 0.3, S("wireframe") && (o.wireframe = !0), o;
21936
21938
  }
21937
- const _a = S("debuglightmaps");
21939
+ const ya = S("debuglightmaps");
21938
21940
  class qm {
21939
21941
  constructor(t, e) {
21940
21942
  r(this, "lightmapIndex", -1);
@@ -21945,7 +21947,7 @@ class qm {
21945
21947
  r(this, "lightmapScaleOffsetUniform", { value: new ye(1, 1, 0, 0) });
21946
21948
  r(this, "lightmapUniform", { value: null });
21947
21949
  r(this, "onBeforeCompile", (t, e) => {
21948
- _a && console.log(`Lightmaps, before compile
21950
+ ya && console.log(`Lightmaps, before compile
21949
21951
  `, t), this.lightmapScaleOffsetUniform.value = this.lightmapScaleOffset, this.lightmapUniform.value = this.lightmapTexture, t.uniforms.lightmapScaleOffset = this.lightmapScaleOffsetUniform;
21950
21952
  });
21951
21953
  this.gameObject = t, this.context = e;
@@ -21961,9 +21963,9 @@ class qm {
21961
21963
  init(t, e, i) {
21962
21964
  console.assert(this.gameObject !== void 0 && this.gameObject !== null, "Missing gameobject", this), this.lightmapIndex = t, !(this.lightmapIndex < 0) && (this.lightmapScaleOffset = e, this.lightmapTexture = i, Ze.assignTextureLOD(i, 0).then((n) => {
21963
21965
  n != null && n.isTexture && (this.lightmapTexture = n);
21964
- }), _a == "show" ? (console.log("Lightmap:", this.gameObject.name, t, `
21966
+ }), ya == "show" ? (console.log("Lightmap:", this.gameObject.name, t, `
21965
21967
  ScaleOffset:`, e, `
21966
- Texture:`, i), this.setLightmapDebugMaterial()) : _a && console.log("Use debuglightmaps=show to render lightmaps only in the scene."), this.applyLightmap());
21968
+ Texture:`, i), this.setLightmapDebugMaterial()) : ya && console.log("Use debuglightmaps=show to render lightmaps only in the scene."), this.applyLightmap());
21967
21969
  }
21968
21970
  updateLightmapUniforms(t) {
21969
21971
  const e = t.uniforms;
@@ -21974,7 +21976,7 @@ Texture:`, i), this.setLightmapDebugMaterial()) : _a && console.log("Use debugli
21974
21976
  */
21975
21977
  applyLightmap() {
21976
21978
  if (this.gameObject.type === "Object3D") {
21977
- _a && console.warn("Can not add lightmap. Is this object missing a renderer?", this.gameObject.name);
21979
+ ya && console.warn("Can not add lightmap. Is this object missing a renderer?", this.gameObject.name);
21978
21980
  return;
21979
21981
  }
21980
21982
  if (this.gameObject.type === "Group") {
@@ -21999,10 +22001,10 @@ Texture:`, i), this.setLightmapDebugMaterial()) : _a && console.log("Use debugli
21999
22001
  }
22000
22002
  }
22001
22003
  ensureLightmapMaterial(t) {
22002
- return t.userData || (t.userData = {}), t["NEEDLE:lightmap-material-version"] != t.version && t["NEEDLE:lightmap-material-version"] == null && (_a && console.warn("Cloning material for lightmap " + t.name), t = t.clone(), t.onBeforeCompile = this.onBeforeCompile), t;
22004
+ return t.userData || (t.userData = {}), t["NEEDLE:lightmap-material-version"] != t.version && t["NEEDLE:lightmap-material-version"] == null && (ya && console.warn("Cloning material for lightmap " + t.name), t = t.clone(), t.onBeforeCompile = this.onBeforeCompile), t;
22003
22005
  }
22004
22006
  assignLightmapTexture(t) {
22005
- !t || t instanceof cm && t.transmission > 0 || !(t.lightMap !== this.lightmapTexture || t["NEEDLE:lightmap-material-version"] !== t.version) || (_a && console.log("Assigning lightmap", t.name, t.version), t.lightMap = this.lightmapTexture, t["NEEDLE:lightmap-material-version"] = t.version);
22007
+ !t || t instanceof cm && t.transmission > 0 || !(t.lightMap !== this.lightmapTexture || t["NEEDLE:lightmap-material-version"] !== t.version) || (ya && console.log("Assigning lightmap", t.name, t.version), t.lightMap = this.lightmapTexture, t["NEEDLE:lightmap-material-version"] = t.version);
22006
22008
  }
22007
22009
  setLightmapDebugMaterial() {
22008
22010
  this.gameObject.material = new ns({
@@ -22545,7 +22547,7 @@ class Iw extends Zs {
22545
22547
  r(this, "sceneRoot");
22546
22548
  }
22547
22549
  }
22548
- const fy = class Ra extends j {
22550
+ const fy = class Ma extends j {
22549
22551
  constructor() {
22550
22552
  super(...arguments);
22551
22553
  r(this, "binary", !0);
@@ -22556,10 +22558,10 @@ const fy = class Ra extends j {
22556
22558
  sd && console.log("Exporting objects as glTF", this.objects), e || (e = "scene"), (!this.objects || this.objects.length <= 0) && (this.objects = [this.context.scene]);
22557
22559
  const n = {
22558
22560
  binary: this.binary,
22559
- pivot: Ra.calculateCenter(this.objects),
22561
+ pivot: Ma.calculateCenter(this.objects),
22560
22562
  ...i
22561
22563
  }, s = await this.export(this.objects, n).catch((a) => (console.error(a), !1));
22562
- return s === !1 ? !1 : (this.binary ? e.endsWith(".glb") || (e += ".glb") : e.endsWith(".gltf") || (e += ".gltf"), this.binary ? Ra.saveArrayBuffer(s, e) : Ra.saveJson(s, e), !0);
22564
+ return s === !1 ? !1 : (this.binary ? e.endsWith(".glb") || (e += ".glb") : e.endsWith(".gltf") || (e += ".gltf"), this.binary ? Ma.saveArrayBuffer(s, e) : Ma.saveJson(s, e), !0);
22563
22565
  }
22564
22566
  async export(e, i) {
22565
22567
  if (!e || e.length <= 0) {
@@ -22567,7 +22569,7 @@ const fy = class Ra extends j {
22567
22569
  return;
22568
22570
  }
22569
22571
  const n = new I0();
22570
- n.register((d) => new Mw(d)), n.register((d) => new xw(d)), kw(n, this.context), Ra.filterTopmostParent(e);
22572
+ n.register((d) => new Mw(d)), n.register((d) => new xw(d)), kw(n, this.context), Ma.filterTopmostParent(e);
22571
22573
  const s = {
22572
22574
  trs: !1,
22573
22575
  onlyVisible: !0,
@@ -22577,7 +22579,7 @@ const fy = class Ra extends j {
22577
22579
  // To prevent NaN value,
22578
22580
  embedImages: !0,
22579
22581
  includeCustomExtensions: !0,
22580
- animations: (i == null ? void 0 : i.animations) || Ra.collectAnimations(e),
22582
+ animations: (i == null ? void 0 : i.animations) || Ma.collectAnimations(e),
22581
22583
  ...i
22582
22584
  }, a = new Array(), l = new L();
22583
22585
  i != null && i.pivot && l.position.sub(i.pivot), sd && console.log("EXPORT", e), e.forEach((d) => {
@@ -23282,7 +23284,7 @@ ${d}
23282
23284
  `;
23283
23285
  }
23284
23286
  }
23285
- const ba = `
23287
+ const _a = `
23286
23288
  `, Qt = "</StageRoot/Materials";
23287
23289
  class XR {
23288
23290
  constructor() {
@@ -23294,19 +23296,19 @@ class XR {
23294
23296
  this.str = "", this.indent = 0;
23295
23297
  }
23296
23298
  beginBlock(t = void 0, e = "{", i = !0) {
23297
- t !== void 0 ? (t = this.applyIndent(t), this.str += t, i ? (this.str += ba, this.str += this.applyIndent(e)) : this.str += " " + e) : this.str += this.applyIndent(e), this.str += ba, this.indent += 1;
23299
+ t !== void 0 ? (t = this.applyIndent(t), this.str += t, i ? (this.str += _a, this.str += this.applyIndent(e)) : this.str += " " + e) : this.str += this.applyIndent(e), this.str += _a, this.indent += 1;
23298
23300
  }
23299
23301
  closeBlock(t = "}") {
23300
- this.indent -= 1, this.str += this.applyIndent(t) + ba;
23302
+ this.indent -= 1, this.str += this.applyIndent(t) + _a;
23301
23303
  }
23302
23304
  beginArray(t) {
23303
- t = this.applyIndent(t + " = ["), this.str += t, this.str += ba, this.indent += 1;
23305
+ t = this.applyIndent(t + " = ["), this.str += t, this.str += _a, this.indent += 1;
23304
23306
  }
23305
23307
  closeArray() {
23306
- this.indent -= 1, this.str += this.applyIndent("]") + ba;
23308
+ this.indent -= 1, this.str += this.applyIndent("]") + _a;
23307
23309
  }
23308
23310
  appendLine(t = "") {
23309
- t = this.applyIndent(t), this.str += t, this.str += ba;
23311
+ t = this.applyIndent(t), this.str += t, this.str += _a;
23310
23312
  }
23311
23313
  toString() {
23312
23314
  return this.str;
@@ -23398,7 +23400,7 @@ let YR = class {
23398
23400
  const m = i.document.buildHeader(i) + `
23399
23401
  ` + i.output;
23400
23402
  this.debug && console.log(m), n[s] = L0(m), i.output = "", de.report("export-usdz", { message: "Exporting textures", autoStep: 10 }), de.start("export-usdz-textures", { parentScope: "export-usdz", logTimings: !1 });
23401
- const g = new Zr({
23403
+ const g = new Kr({
23402
23404
  antialias: !1,
23403
23405
  alpha: !0,
23404
23406
  premultipliedAlpha: !1,
@@ -23569,9 +23571,9 @@ async function Ed(o, t, e = null) {
23569
23571
  }
23570
23572
  }
23571
23573
  }
23572
- let rd = null, qt = null, Ip, va, ad;
23574
+ let rd = null, qt = null, Ip, ba, ad;
23573
23575
  async function ZR(o, t = 1 / 0, e = null, i = void 0) {
23574
- Ip || (Ip = new ls(2, 2, 1, 1)), va || (va = new ns({
23576
+ Ip || (Ip = new ls(2, 2, 1, 1)), ba || (ba = new ns({
23575
23577
  uniforms: {
23576
23578
  blitTexture: new tn(o),
23577
23579
  flipY: new tn(!1),
@@ -23603,10 +23605,10 @@ async function ZR(o, t = 1 / 0, e = null, i = void 0) {
23603
23605
  gl_FragColor.rgba *= scale.rgba;
23604
23606
  }`
23605
23607
  }));
23606
- const n = va.uniforms;
23607
- n.blitTexture.value = o, n.flipY.value = !1, n.scale.value = new ye(1, 1, 1, 1), i !== void 0 && n.scale.value.copy(i), va.defines.IS_SRGB = o.colorSpace == qs, va.needsUpdate = !0, ad || (ad = new G(Ip, va), ad.frustumCulled = !1);
23608
+ const n = ba.uniforms;
23609
+ n.blitTexture.value = o, n.flipY.value = !1, n.scale.value = new ye(1, 1, 1, 1), i !== void 0 && n.scale.value.copy(i), ba.defines.IS_SRGB = o.colorSpace == qs, ba.needsUpdate = !0, ad || (ad = new G(Ip, ba), ad.frustumCulled = !1);
23608
23610
  const s = new ve(), a = new ji();
23609
- a.add(ad), e || (e = rd = new Zr({ antialias: !1, alpha: !0, premultipliedAlpha: !1, preserveDrawingBuffer: !0 }));
23611
+ a.add(ad), e || (e = rd = new Kr({ antialias: !1, alpha: !0, premultipliedAlpha: !1, preserveDrawingBuffer: !0 }));
23610
23612
  const l = Math.min(o.image.width, t), c = Math.min(o.image.height, t);
23611
23613
  qt && (qt.width !== l || qt.height !== c) && (qt.dispose(), qt = null), qt || (qt = new ss(l, c, { format: Fu, type: nC, minFilter: Fd, magFilter: Fd })), e.setRenderTarget(qt), e.setSize(l, c), e.clear(), e.render(a, s), rd && (rd.dispose(), rd = null);
23612
23614
  const h = new Uint8ClampedArray(qt.width * qt.height * 4);
@@ -24113,12 +24115,12 @@ const Eu = class Eu {
24113
24115
  };
24114
24116
  r(Eu, "global_id", 0);
24115
24117
  let Ut = Eu;
24116
- const wa = /* @__PURE__ */ new Set();
24118
+ const va = /* @__PURE__ */ new Set();
24117
24119
  function Qm(o, t) {
24118
24120
  var i, n;
24119
24121
  let e = "";
24120
24122
  if (Array.isArray(o)) {
24121
- wa.clear();
24123
+ va.clear();
24122
24124
  let s = "[ ";
24123
24125
  for (let a = 0; a < o.length; a++) {
24124
24126
  let l = o[a];
@@ -24127,20 +24129,20 @@ function Qm(o, t) {
24127
24129
  continue;
24128
24130
  }
24129
24131
  if (typeof l == "string") {
24130
- if (wa.has(l)) continue;
24131
- s += l, wa.add(l);
24132
+ if (va.has(l)) continue;
24133
+ s += l, va.add(l);
24132
24134
  } else if (typeof l == "object") {
24133
24135
  if (l.isObject3D && (l = t.findById(l.uuid), !l)) {
24134
24136
  console.warn("Invalid target object in behavior", o + ". Is the object exported?");
24135
24137
  continue;
24136
24138
  }
24137
24139
  const c = (i = l.getPath) == null ? void 0 : i.call(l);
24138
- if (wa.has(c)) continue;
24139
- s += c, wa.add(c);
24140
+ if (va.has(c)) continue;
24141
+ s += c, va.add(c);
24140
24142
  }
24141
24143
  a + 1 < o.length && (s += ", ");
24142
24144
  }
24143
- s += " ]", e = s, wa.clear();
24145
+ s += " ]", e = s, va.clear();
24144
24146
  } else if (typeof o == "object") {
24145
24147
  const s = o;
24146
24148
  if (s.isObject3D && (o = t.findById(s.uuid)), !o)
@@ -24163,7 +24165,7 @@ const Au = class Au {
24163
24165
  }
24164
24166
  };
24165
24167
  r(Au, "global_id", 0);
24166
- let Wr = Au;
24168
+ let $r = Au;
24167
24169
  function $b(o, t = { direct: !0, indirect: !0 }) {
24168
24170
  const e = ni.createEmpty();
24169
24171
  e.name = "InputTarget_" + e.name, e.displayName = void 0, e.type = "RealityKitComponent", e.onSerialize = (i) => {
@@ -24173,14 +24175,14 @@ function $b(o, t = { direct: !0, indirect: !0 }) {
24173
24175
  class Nt {
24174
24176
  static sceneStartTrigger() {
24175
24177
  if (this.__sceneStartTrigger !== void 0) return this.__sceneStartTrigger;
24176
- const t = new Wr(void 0, "SceneStart");
24178
+ const t = new $r(void 0, "SceneStart");
24177
24179
  return t.tokenId = "SceneTransition", t.type = "enter", this.__sceneStartTrigger = t, t;
24178
24180
  }
24179
24181
  /** Trigger that fires when an object has been tapped/clicked.
24180
24182
  * @param targetObject The object or list of objects that can be interacted with.
24181
24183
  * @param inputMode Input Mode (direct and/or indirect). Only available for USDObject targets. Only supported on Vision OS at the moment. */
24182
24184
  static tapTrigger(t, e = { direct: !0, indirect: !0 }) {
24183
- const i = new Wr(t);
24185
+ const i = new $r(t);
24184
24186
  if (Array.isArray(t) && t.length > 1)
24185
24187
  for (const n of t)
24186
24188
  n instanceof ni && $b(n, e);
@@ -24192,7 +24194,7 @@ class Nt {
24192
24194
  return (t == null ? void 0 : t.tokenId) === "TapGesture";
24193
24195
  }
24194
24196
  static proximityToCameraTrigger(t, e) {
24195
- const i = new Wr(t);
24197
+ const i = new $r(t);
24196
24198
  return i.tokenId = "ProximityToCamera", i.distance = e, i;
24197
24199
  }
24198
24200
  }
@@ -24838,17 +24840,17 @@ class dT {
24838
24840
  let jn;
24839
24841
  kt ? console.assert(kt.length === pe, "We should have the same number of TransformData entries for each bone", kt, B) : jn = new ot(null, qe, null);
24840
24842
  for (let fn = 0; fn < pe; fn++) {
24841
- const qf = kt ? kt[fn] : jn, fa = B[fn];
24842
- for (const { time: Ul, translation: Nl } of qf.getValues(fa.pos, !0, !1, !1)) {
24843
- const pn = (Ul + fa.timeOffset) * 60;
24843
+ const qf = kt ? kt[fn] : jn, ua = B[fn];
24844
+ for (const { time: Ul, translation: Nl } of qf.getValues(ua.pos, !0, !1, !1)) {
24845
+ const pn = (Ul + ua.timeOffset) * 60;
24844
24846
  J.has(pn) || J.set(pn, new Array()), J.get(pn).push(Nl.clone());
24845
24847
  }
24846
- for (const { time: Ul, rotation: Nl } of qf.getValues(fa.rot, !1, !0, !1)) {
24847
- const pn = (Ul + fa.timeOffset) * 60;
24848
+ for (const { time: Ul, rotation: Nl } of qf.getValues(ua.rot, !1, !0, !1)) {
24849
+ const pn = (Ul + ua.timeOffset) * 60;
24848
24850
  ie.has(pn) || ie.set(pn, new Array()), ie.get(pn).push(Nl.clone());
24849
24851
  }
24850
- for (const { time: Ul, scale: Nl } of qf.getValues(fa.scale, !1, !1, !0)) {
24851
- const pn = (Ul + fa.timeOffset) * 60;
24852
+ for (const { time: Ul, scale: Nl } of qf.getValues(ua.scale, !1, !1, !0)) {
24853
+ const pn = (Ul + ua.timeOffset) * 60;
24852
24854
  ee.has(pn) || ee.set(pn, new Array()), ee.get(pn).push(Nl.clone());
24853
24855
  }
24854
24856
  }
@@ -25392,7 +25394,7 @@ He([
25392
25394
  He([
25393
25395
  p()
25394
25396
  ], vh.prototype, "motionType");
25395
- class qr extends j {
25397
+ class Gr extends j {
25396
25398
  constructor() {
25397
25399
  super(...arguments);
25398
25400
  r(this, "target");
@@ -25454,13 +25456,13 @@ class qr extends j {
25454
25456
  }
25455
25457
  He([
25456
25458
  p(Rn)
25457
- ], qr.prototype, "target");
25459
+ ], Gr.prototype, "target");
25458
25460
  He([
25459
25461
  p(URL)
25460
- ], qr.prototype, "clip");
25462
+ ], Gr.prototype, "clip");
25461
25463
  He([
25462
25464
  p()
25463
- ], qr.prototype, "toggleOnClick");
25465
+ ], Gr.prototype, "toggleOnClick");
25464
25466
  var Dt;
25465
25467
  const gy = (Dt = class extends j {
25466
25468
  constructor() {
@@ -25850,7 +25852,7 @@ const Iu = class Iu {
25850
25852
  }
25851
25853
  };
25852
25854
  r(Iu, "_instance");
25853
- let Vr = Iu;
25855
+ let Wr = Iu;
25854
25856
  var pT = Object.defineProperty, mT = Object.getOwnPropertyDescriptor, St = (o, t, e, i) => {
25855
25857
  for (var n = i > 1 ? void 0 : i ? mT(t, e) : t, s = o.length - 1, a; s >= 0; s--)
25856
25858
  (a = o[s]) && (n = (i ? a(t, e, n) : a(n)) || n);
@@ -26485,7 +26487,7 @@ const Or = class Or {
26485
26487
  r(this, "_intersection", new w());
26486
26488
  r(this, "_screenPos", new w());
26487
26489
  r(this, "_tempMatrix", new oe());
26488
- this.context = t, this.offset = new oe(), this.plane = new Hr(), this.plane.setFromNormalAndCoplanarPoint(Or.up, Or.zero);
26490
+ this.context = t, this.offset = new oe(), this.plane = new Vr(), this.plane.setFromNormalAndCoplanarPoint(Or.up, Or.zero);
26489
26491
  }
26490
26492
  get scale() {
26491
26493
  return this._scale;
@@ -26954,7 +26956,7 @@ var kT = Object.defineProperty, by = (o, t, e, i) => {
26954
26956
  return n && kT(t, e, n), n;
26955
26957
  };
26956
26958
  const Yl = S("debugwebxr"), Hb = new W().setFromAxisAngle(new w(0, 1, 0), Math.PI);
26957
- class Xr extends j {
26959
+ class qr extends j {
26958
26960
  constructor() {
26959
26961
  super(...arguments);
26960
26962
  r(this, "head");
@@ -27044,7 +27046,7 @@ class Xr extends j {
27044
27046
  else {
27045
27047
  const n = new L();
27046
27048
  n.name = "Head";
27047
- const s = ta.createPrimitive(rl.Cube);
27049
+ const s = ea.createPrimitive(rl.Cube);
27048
27050
  n.add(s), this.gameObject.add(n), this.head = new le("", this.sourceId, n), Yl && console.log("Create head", n);
27049
27051
  }
27050
27052
  if (this.rightHand)
@@ -27074,13 +27076,13 @@ class Xr extends j {
27074
27076
  }
27075
27077
  by([
27076
27078
  p(le)
27077
- ], Xr.prototype, "head");
27079
+ ], qr.prototype, "head");
27078
27080
  by([
27079
27081
  p(le)
27080
- ], Xr.prototype, "leftHand");
27082
+ ], qr.prototype, "leftHand");
27081
27083
  by([
27082
27084
  p(le)
27083
- ], Xr.prototype, "rightHand");
27085
+ ], qr.prototype, "rightHand");
27084
27086
  var MT = Object.defineProperty, vf = (o, t, e, i) => {
27085
27087
  for (var n = void 0, s = o.length - 1, a; s >= 0; s--)
27086
27088
  (a = o[s]) && (n = a(t, e, n) || n);
@@ -27171,7 +27173,7 @@ class eo extends j {
27171
27173
  g.visible = _ != null;
27172
27174
  }
27173
27175
  }
27174
- h.model && (h.model.visible = d.isTracking, h.model.visible && h.model.parent !== ((n = e.rig) == null ? void 0 : n.gameObject) && ((s = e.rig) == null || s.gameObject.add(h.model))), (a = h.model) != null && a.visible && ((l = h.handmesh) == null || l.updateMesh(), h.model.matrixAutoUpdate = !1, h.model.matrix.identity(), h.model.applyMatrix4(Ha));
27176
+ h.model && (h.model.visible = d.isTracking, h.model.visible && h.model.parent !== ((n = e.rig) == null ? void 0 : n.gameObject) && ((s = e.rig) == null || s.gameObject.add(h.model))), (a = h.model) != null && a.visible && ((l = h.handmesh) == null || l.updateMesh(), h.model.matrixAutoUpdate = !1, h.model.matrix.identity(), h.model.applyMatrix4(Va));
27175
27177
  }
27176
27178
  }
27177
27179
  }
@@ -27329,7 +27331,7 @@ class cn extends j {
27329
27331
  }
27330
27332
  let u = d == null ? void 0 : d.point;
27331
27333
  if (!u && !this.useTeleportTarget) {
27332
- this._plane || (this._plane = new Hr(new w(0, 1, 0), 0));
27334
+ this._plane || (this._plane = new Vr(new w(0, 1, 0), 0));
27333
27335
  const f = i.worldPosition;
27334
27336
  this._plane.setFromNormalAndCoplanarPoint(new w(0, 1, 0), f);
27335
27337
  const m = e.ray;
@@ -27534,7 +27536,7 @@ const pt = (Cn = class extends j {
27534
27536
  * @param instance The spawned avatar 3D object
27535
27537
  */
27536
27538
  r(this, "onAvatarSpawned", (e) => {
27537
- Kl && console.log("WebXR.onAvatarSpawned", e), C.getComponentInChildren(e, Xr) ?? (i = C.addComponent(e, Xr));
27539
+ Kl && console.log("WebXR.onAvatarSpawned", e), C.getComponentInChildren(e, qr) ?? (i = C.addComponent(e, qr));
27538
27540
  });
27539
27541
  /**
27540
27542
  * Reference to the WebXR button factory used by this component.
@@ -27710,7 +27712,7 @@ const pt = (Cn = class extends j {
27710
27712
  * @returns The WebXRButtonFactory instance
27711
27713
  */
27712
27714
  getButtonsFactory() {
27713
- return this._buttonFactory || (this._buttonFactory = Vr.getOrCreate()), this._buttonFactory;
27715
+ return this._buttonFactory || (this._buttonFactory = Wr.getOrCreate()), this._buttonFactory;
27714
27716
  }
27715
27717
  /**
27716
27718
  * Creates and sets up UI elements for WebXR interaction based on component settings
@@ -27906,7 +27908,7 @@ ${f}] -- ${f} --> ${g.uuid}(("${g.displayName || g.name || g.uuid}"))
27906
27908
  if (Array.isArray(u))
27907
27909
  for (const m of u)
27908
27910
  d(m, f);
27909
- else if (u instanceof Wr) {
27911
+ else if (u instanceof $r) {
27910
27912
  let m = u.tokenId;
27911
27913
  u.type !== void 0 && (m += ":" + u.type), typeof u.targetId == "object" && (e.add(u.targetId), a && (c += `${u.targetId.uuid}(("${u.targetId.displayName}")) --> ${u.id}[${u.id}
27912
27914
  ${m}]
@@ -28021,7 +28023,7 @@ class Jw {
28021
28023
  } else if (l instanceof Go) {
28022
28024
  const m = l;
28023
28025
  c.appendLine('token shapeType = "Capsule"'), c.appendLine(`float radius = ${m.radius}`), c.appendLine(`float height = ${m.height}`);
28024
- } else if (l instanceof oa && ((f = l.sharedMesh) != null && f.geometry)) {
28026
+ } else if (l instanceof sa && ((f = l.sharedMesh) != null && f.geometry)) {
28025
28027
  const m = l.sharedMesh.geometry;
28026
28028
  m.boundingBox || m.computeBoundingBox();
28027
28029
  const g = l.sharedMesh.geometry.boundingBox;
@@ -28230,15 +28232,15 @@ const bn = new w(), Zl = new oe(), dd = new W(), kl = class ex extends En {
28230
28232
  return this.minHeight !== void 0 && e < this.minHeight ? this.minHeight : e;
28231
28233
  }
28232
28234
  awake() {
28233
- super.awake(), this._lastUpdateFrame = -1, this._parentRectTransform = void 0, this.rectBlock = new L(), this.rectBlock.name = this.name, this.lastMatrix = new oe(), this._lastAnchoring = null, this._initialPosition = this.gameObject.position.clone(), this._initialPosition.z = 0, this._anchoredPosition || (this._anchoredPosition = new ae()), Oa(this, "_anchoredPosition", () => {
28235
+ super.awake(), this._lastUpdateFrame = -1, this._parentRectTransform = void 0, this.rectBlock = new L(), this.rectBlock.name = this.name, this.lastMatrix = new oe(), this._lastAnchoring = null, this._initialPosition = this.gameObject.position.clone(), this._initialPosition.z = 0, this._anchoredPosition || (this._anchoredPosition = new ae()), Pa(this, "_anchoredPosition", () => {
28234
28236
  this.markDirty();
28235
- }), Oa(this, "sizeDelta", () => {
28237
+ }), Pa(this, "sizeDelta", () => {
28236
28238
  this.markDirty();
28237
- }), Oa(this, "pivot", () => {
28239
+ }), Pa(this, "pivot", () => {
28238
28240
  this.markDirty();
28239
- }), Oa(this, "anchorMin", () => {
28241
+ }), Pa(this, "anchorMin", () => {
28240
28242
  this.markDirty();
28241
- }), Oa(this, "anchorMax", () => {
28243
+ }), Pa(this, "anchorMax", () => {
28242
28244
  this.markDirty();
28243
28245
  });
28244
28246
  }
@@ -28446,7 +28448,7 @@ const xy = (Zn = class extends En {
28446
28448
  this.makePanel(), this.uiObject && this.uiObject.set(e);
28447
28449
  }
28448
28450
  awake() {
28449
- super.awake(), this.makePanel(), Oa(this, "_color", () => _M(this, this.onColorChanged));
28451
+ super.awake(), this.makePanel(), Pa(this, "_color", () => _M(this, this.onColorChanged));
28450
28452
  }
28451
28453
  onEnable() {
28452
28454
  var e;
@@ -28861,7 +28863,7 @@ const WT = [
28861
28863
  "lightitalic",
28862
28864
  "semibold"
28863
28865
  ];
28864
- class La {
28866
+ class Ia {
28865
28867
  constructor(t) {
28866
28868
  r(this, "id");
28867
28869
  r(this, "content", "");
@@ -28898,14 +28900,14 @@ class La {
28898
28900
  e.appendLine(`string[] font = [ ${i} ]`), e.appendLine(`double pointSize = ${this.pointSize}`), typeof this.width == "number" && e.appendLine(`double width = ${this.width}`), typeof this.height == "number" && e.appendLine(`double height = ${this.height}`), typeof this.depth == "number" && e.appendLine(`double depth = ${this.depth}`), this.wrapMode && e.appendLine(`token wrapMode = "${this.wrapMode}"`), this.horizontalAlignment && e.appendLine(`token horizontalAlignment = "${this.horizontalAlignment}"`), this.verticalAlignment && e.appendLine(`token verticalAlignment = "${this.verticalAlignment}"`), this.material !== void 0 && e.appendLine(`rel material:binding = </StageRoot/Materials/${pf(this.material)}>`), e.closeBlock();
28899
28901
  }
28900
28902
  }
28901
- r(La, "global_id", 0);
28903
+ r(Ia, "global_id", 0);
28902
28904
  class sx {
28903
28905
  static singleLine(t, e, i) {
28904
- const n = new La("text_" + La.getId());
28906
+ const n = new Ia("text_" + Ia.getId());
28905
28907
  return n.content = t, e && (n.pointSize = e), i && (n.depth = i), n;
28906
28908
  }
28907
28909
  static multiLine(t, e, i, n, s, a) {
28908
- const l = new La("text_" + La.getId());
28910
+ const l = new Ia("text_" + Ia.getId());
28909
28911
  return l.content = t, l.width = e, l.height = i, l.horizontalAlignment = n, l.verticalAlignment = s, a !== void 0 && (l.wrapMode = a), l;
28910
28912
  }
28911
28913
  }
@@ -29421,7 +29423,7 @@ var QT = Object.defineProperty, YT = Object.getOwnPropertyDescriptor, Cy = (o, t
29421
29423
  (a = o[s]) && (n = (i ? a(t, e, n) : a(n)) || n);
29422
29424
  return i && n && QT(t, e, n), n;
29423
29425
  };
29424
- class Qr extends j {
29426
+ class Xr extends j {
29425
29427
  constructor() {
29426
29428
  super(...arguments);
29427
29429
  r(this, "_alpha", 1);
@@ -29455,13 +29457,13 @@ class Qr extends j {
29455
29457
  }
29456
29458
  Cy([
29457
29459
  p()
29458
- ], Qr.prototype, "alpha", 1);
29460
+ ], Xr.prototype, "alpha", 1);
29459
29461
  Cy([
29460
29462
  p()
29461
- ], Qr.prototype, "interactable", 2);
29463
+ ], Xr.prototype, "interactable", 2);
29462
29464
  Cy([
29463
29465
  p()
29464
- ], Qr.prototype, "blocksRaycasts", 2);
29466
+ ], Xr.prototype, "blocksRaycasts", 2);
29465
29467
  class hx {
29466
29468
  get extensionName() {
29467
29469
  return "tmui";
@@ -29471,7 +29473,7 @@ class hx {
29471
29473
  onExportObject(t, e, i) {
29472
29474
  const n = C.getComponent(t, nh);
29473
29475
  if (n && n.enabled && n.renderMode === lx.WorldSpace) {
29474
- const s = new Sy(), a = C.getComponent(t, as), l = C.getComponent(t, Qr), c = new Array();
29476
+ const s = new Sy(), a = C.getComponent(t, as), l = C.getComponent(t, Xr), c = new Array();
29475
29477
  if (a) {
29476
29478
  if (!C.isActiveSelf(t)) {
29477
29479
  const u = C.isActiveSelf(t);
@@ -29510,7 +29512,7 @@ class hx {
29510
29512
  _.setMatrix(g.matrix);
29511
29513
  const y = g.parent, b = !!y && typeof y.textContent == "string" && y.textContent.length > 0;
29512
29514
  let v = m.get(y) || 1;
29513
- const x = C.getComponent(g, Qr);
29515
+ const x = C.getComponent(g, Xr);
29514
29516
  if (x && (v *= x.alpha), g instanceof G && b) {
29515
29517
  const O = g[Ri];
29516
29518
  O ? s.exportText(O.gameObject, _, i) : console.error("Error when exporting UI: shadow component owner not found. This is likely a bug.", g);
@@ -29598,7 +29600,7 @@ function KT(o, t) {
29598
29600
  return a;
29599
29601
  }
29600
29602
  function ZT(o, t) {
29601
- const e = C.getComponentsInChildren(o, Rn), i = C.getComponentsInChildren(o, qr), n = new Array(), s = new Array();
29603
+ const e = C.getComponentsInChildren(o, Rn), i = C.getComponentsInChildren(o, Gr), n = new Array(), s = new Array();
29602
29604
  yc && console.log({ audioSources: e, playAudioOnClicks: i });
29603
29605
  for (const a of i) {
29604
29606
  if (!a.target) continue;
@@ -29607,7 +29609,7 @@ function ZT(o, t) {
29607
29609
  }
29608
29610
  for (const a of e) {
29609
29611
  if (!a || !a.clip || a.volume <= 0 || n.includes(a)) continue;
29610
- const l = new qr();
29612
+ const l = new Gr();
29611
29613
  l.target = a, l.name = "PlayAudioOnClick_implicitAtStart_", l.trigger = "start";
29612
29614
  const c = new L();
29613
29615
  C.addComponent(c, l), console.log("implicit PlayAudioOnStart", c, l), s.push(c), n.push(a), o.add(c);
@@ -29633,7 +29635,7 @@ function qb(o, t) {
29633
29635
  const a = document.createElement("img");
29634
29636
  return a.id = "button", s.appendChild(a), o.domElement.shadowRoot.appendChild(i), s;
29635
29637
  }
29636
- var eE = Object.defineProperty, Et = (o, t, e, i) => {
29638
+ var eE = Object.defineProperty, At = (o, t, e, i) => {
29637
29639
  for (var n = void 0, s = o.length - 1, a; s >= 0; s--)
29638
29640
  (a = o[s]) && (n = a(t, e, n) || n);
29639
29641
  return n && eE(t, e, n), n;
@@ -29647,16 +29649,16 @@ class Rl {
29647
29649
  r(this, "callToActionURL");
29648
29650
  }
29649
29651
  }
29650
- Et([
29652
+ At([
29651
29653
  p()
29652
29654
  ], Rl.prototype, "callToAction");
29653
- Et([
29655
+ At([
29654
29656
  p()
29655
29657
  ], Rl.prototype, "checkoutTitle");
29656
- Et([
29658
+ At([
29657
29659
  p()
29658
29660
  ], Rl.prototype, "checkoutSubtitle");
29659
- Et([
29661
+ At([
29660
29662
  p()
29661
29663
  ], Rl.prototype, "callToActionURL");
29662
29664
  var Is;
@@ -29894,47 +29896,47 @@ const wi = (Is = class extends j {
29894
29896
  e.position.copy(this._rootPositionBeforeExport), e.quaternion.copy(this._rootRotationBeforeExport), e.scale.copy(this._rootScaleBeforeExport), e.updateMatrix(), e.updateMatrixWorld(!0), this._rootSessionRootWasAppliedTo = null;
29895
29897
  }
29896
29898
  createQuicklookButton() {
29897
- const i = Vr.getOrCreate().createQuicklookButton();
29899
+ const i = Wr.getOrCreate().createQuicklookButton();
29898
29900
  return i.parentNode || this.context.menu.appendChild(i), i;
29899
29901
  }
29900
29902
  }, r(Is, "invertForwardMatrix", new oe().makeRotationY(Math.PI)), r(Is, "invertForwardQuaternion", new W().setFromEuler(new Ft(0, Math.PI, 0))), Is);
29901
- Et([
29903
+ At([
29902
29904
  p(L)
29903
29905
  ], wi.prototype, "objectToExport");
29904
- Et([
29906
+ At([
29905
29907
  p()
29906
29908
  ], wi.prototype, "autoExportAnimations");
29907
- Et([
29909
+ At([
29908
29910
  p()
29909
29911
  ], wi.prototype, "autoExportAudioSources");
29910
- Et([
29912
+ At([
29911
29913
  p()
29912
29914
  ], wi.prototype, "exportFileName");
29913
- Et([
29915
+ At([
29914
29916
  p(URL)
29915
29917
  ], wi.prototype, "customUsdzFile");
29916
- Et([
29918
+ At([
29917
29919
  p(Rl)
29918
29920
  ], wi.prototype, "customBranding");
29919
- Et([
29921
+ At([
29920
29922
  p()
29921
29923
  ], wi.prototype, "anchoringType");
29922
- Et([
29924
+ At([
29923
29925
  p()
29924
29926
  ], wi.prototype, "maxTextureSize");
29925
- Et([
29927
+ At([
29926
29928
  p()
29927
29929
  ], wi.prototype, "planeAnchoringAlignment");
29928
- Et([
29930
+ At([
29929
29931
  p()
29930
29932
  ], wi.prototype, "interactive");
29931
- Et([
29933
+ At([
29932
29934
  p()
29933
29935
  ], wi.prototype, "physics");
29934
- Et([
29936
+ At([
29935
29937
  p()
29936
29938
  ], wi.prototype, "allowCreateQuicklookButton");
29937
- Et([
29939
+ At([
29938
29940
  p()
29939
29941
  ], wi.prototype, "quickLookCompatible");
29940
29942
  let Vs = wi;
@@ -30653,7 +30655,7 @@ class El extends j {
30653
30655
  this.offset.copy(this.positionOffset);
30654
30656
  const n = this.offset.length();
30655
30657
  if (this.referenceSpace && this.offset.transformDirection(this.referenceSpace.matrixWorld).multiplyScalar(n), e.add(this.offset), this.levelPosition && this.referenceSpace) {
30656
- const c = new Hr(this.gameObject.up, 0), h = te(this.referenceSpace);
30658
+ const c = new Vr(this.gameObject.up, 0), h = te(this.referenceSpace);
30657
30659
  c.setFromNormalAndCoplanarPoint(this.gameObject.up, h);
30658
30660
  const d = new w(0, 0, 0);
30659
30661
  c.projectPoint(e, d), e.copy(d);
@@ -32243,7 +32245,7 @@ class yx {
32243
32245
  const e = this.system.deltaTime;
32244
32246
  if (this.emitterType === sg.Death) {
32245
32247
  let n = t.life;
32246
- if (t[Da] !== void 0 && (n = t[Da]), !(t.age + e * 1.2 >= n)) return;
32248
+ if (t[La] !== void 0 && (n = t[La]), !(t.age + e * 1.2 >= n)) return;
32247
32249
  const a = this.subSystem.main.maxParticles - this.subSystem.currentParticles;
32248
32250
  t.emissionState.waitEmiting = a;
32249
32251
  }
@@ -32414,7 +32416,7 @@ class CE extends Iy {
32414
32416
  return this.system.isPlaying, 0;
32415
32417
  }
32416
32418
  }
32417
- class la {
32419
+ class aa {
32418
32420
  constructor(t) {
32419
32421
  r(this, "system");
32420
32422
  r(this, "type");
@@ -32438,7 +32440,7 @@ class la {
32438
32440
  reset() {
32439
32441
  }
32440
32442
  }
32441
- class PE extends la {
32443
+ class PE extends aa {
32442
32444
  constructor() {
32443
32445
  super(...arguments);
32444
32446
  r(this, "type", "NeedleTextureSheet");
@@ -32455,7 +32457,7 @@ class PE extends la {
32455
32457
  }
32456
32458
  }
32457
32459
  const Qb = Symbol("particleRotation");
32458
- class OE extends la {
32460
+ class OE extends aa {
32459
32461
  constructor() {
32460
32462
  super(...arguments);
32461
32463
  r(this, "type", "NeedleRotation");
@@ -32473,7 +32475,7 @@ class OE extends la {
32473
32475
  }
32474
32476
  }
32475
32477
  const Yb = Symbol("sizeLerpFactor"), kE = new w();
32476
- class ME extends la {
32478
+ class ME extends aa {
32477
32479
  constructor() {
32478
32480
  super(...arguments);
32479
32481
  r(this, "type", "NeedleSize");
@@ -32496,19 +32498,19 @@ class ME extends la {
32496
32498
  }
32497
32499
  }
32498
32500
  }
32499
- const Da = Symbol("particleLife"), Gp = Symbol("trailLifetime"), Kb = Symbol("trailStartLength"), qp = Symbol("trailWidthRandom");
32500
- class RE extends la {
32501
+ const La = Symbol("particleLife"), Gp = Symbol("trailLifetime"), Kb = Symbol("trailStartLength"), qp = Symbol("trailWidthRandom");
32502
+ class RE extends aa {
32501
32503
  constructor() {
32502
32504
  super(...arguments);
32503
32505
  r(this, "type", "NeedleTrail");
32504
32506
  }
32505
32507
  initialize(e) {
32506
- e instanceof c_ && (e[Da] = e.life, this.system.trails.enabled && this.system.trails.dieWithParticles === !1 && (e[Gp] = this.system.trails.lifetime.evaluate(Math.random(), Math.random()), e.life += e[Gp]), e[Kb] = e.length, e[qp] = Math.random());
32508
+ e instanceof c_ && (e[La] = e.life, this.system.trails.enabled && this.system.trails.dieWithParticles === !1 && (e[Gp] = this.system.trails.lifetime.evaluate(Math.random(), Math.random()), e.life += e[Gp]), e[Kb] = e.length, e[qp] = Math.random());
32507
32509
  }
32508
32510
  update(e) {
32509
32511
  var i;
32510
32512
  if ((i = this.system.trails) != null && i.enabled && e instanceof c_) {
32511
- const n = e, s = e.age / e[Da], a = e.previous.values(), l = e.previous.length;
32513
+ const n = e, s = e.age / e[La], a = e.previous.values(), l = e.previous.length;
32512
32514
  for (let c = 0; c < l; c++) {
32513
32515
  const d = a.next().value, u = 1 - c / (l - 1), f = e.size;
32514
32516
  if (f.x <= 0 && !this.system.trails.sizeAffectsWidth) {
@@ -32517,16 +32519,16 @@ class RE extends la {
32517
32519
  }
32518
32520
  d.size = this.system.trails.getWidth(f.x, s, u, n[qp]), d.color.copy(e.color), this.system.trails.getColor(d.color, s, u);
32519
32521
  }
32520
- if (e.age > e[Da]) {
32522
+ if (e.age > e[La]) {
32521
32523
  e.velocity.set(0, 0, 0);
32522
- const c = (e.age - e[Da]) / e[Gp];
32524
+ const c = (e.age - e[La]) / e[Gp];
32523
32525
  n.length = $.lerp(e[Kb], 0, c);
32524
32526
  }
32525
32527
  }
32526
32528
  }
32527
32529
  }
32528
32530
  const gd = Symbol("startVelocity"), Zb = Symbol("gravityModifier"), Xp = Symbol("gravitySpeed"), yd = Symbol("velocity lerp factor"), og = new w();
32529
- class TE extends la {
32531
+ class TE extends aa {
32530
32532
  constructor() {
32531
32533
  super(...arguments);
32532
32534
  r(this, "type", "NeedleVelocity");
@@ -32567,7 +32569,7 @@ class TE extends la {
32567
32569
  }
32568
32570
  }
32569
32571
  const Jb = Symbol("colorLerpFactor"), e0 = new ce(1, 1, 1, 1), pr = new ce(1, 1, 1, 1);
32570
- class EE extends la {
32572
+ class EE extends aa {
32571
32573
  constructor() {
32572
32574
  super(...arguments);
32573
32575
  r(this, "type", "NeedleColor");
@@ -32877,7 +32879,7 @@ const Ht = class Id extends j {
32877
32879
  * ```
32878
32880
  */
32879
32881
  addBehaviour(e) {
32880
- return this._particleSystem ? (e instanceof la && (e.system = this), xo && console.debug("Add custom ParticleSystem Behaviour", e), this._particleSystem.addBehavior(e), !0) : !1;
32882
+ return this._particleSystem ? (e instanceof aa && (e.system = this), xo && console.debug("Add custom ParticleSystem Behaviour", e), this._particleSystem.addBehavior(e), !0) : !1;
32881
32883
  }
32882
32884
  /** Remove a custom quarks behaviour from the particle system. **/
32883
32885
  removeBehaviour(e) {
@@ -33586,7 +33588,7 @@ var eA = Object.defineProperty, wx = (o, t, e, i) => {
33586
33588
  return n && eA(t, e, n), n;
33587
33589
  };
33588
33590
  const Kp = S("debugpost");
33589
- class Yr extends ft {
33591
+ class Qr extends ft {
33590
33592
  constructor() {
33591
33593
  super(...arguments);
33592
33594
  r(this, "mode", new N(void 0));
@@ -33638,17 +33640,17 @@ class Yr extends ft {
33638
33640
  }
33639
33641
  wx([
33640
33642
  p(N)
33641
- ], Yr.prototype, "mode");
33643
+ ], Qr.prototype, "mode");
33642
33644
  wx([
33643
33645
  p(N)
33644
- ], Yr.prototype, "exposure");
33645
- Dn("Tonemapping", Yr);
33646
+ ], Qr.prototype, "exposure");
33647
+ Dn("Tonemapping", Qr);
33646
33648
  var tA = Object.defineProperty, Af = (o, t, e, i) => {
33647
33649
  for (var n = void 0, s = o.length - 1, a; s >= 0; s--)
33648
33650
  (a = o[s]) && (n = a(t, e, n) || n);
33649
33651
  return n && tA(t, e, n), n;
33650
33652
  };
33651
- class ca extends ft {
33653
+ class la extends ft {
33652
33654
  constructor() {
33653
33655
  super(...arguments);
33654
33656
  /**
@@ -33673,8 +33675,8 @@ class ca extends ft {
33673
33675
  onCreateEffect() {
33674
33676
  var a, l;
33675
33677
  const e = [];
33676
- let i = (a = this.postprocessingContext) == null ? void 0 : a.components.find((c) => c instanceof Yr);
33677
- i || (i = new Yr(), (l = this.postprocessingContext) == null || l.components.push(i)), this.postExposure.onValueChanged = (c) => {
33678
+ let i = (a = this.postprocessingContext) == null ? void 0 : a.components.find((c) => c instanceof Qr);
33679
+ i || (i = new Qr(), (l = this.postprocessingContext) == null || l.components.push(i)), this.postExposure.onValueChanged = (c) => {
33678
33680
  this.postExposure.overrideState && i ? i.exposure.value = c : console.warn("[PostProcessing] PostExposure is set to override but no ToneMappingEffect found in the postprocessing stack. Please add a ToneMappingEffect to your postprocessing stack to use PostExposure.");
33679
33681
  };
33680
33682
  const n = new D.POSTPROCESSING.MODULE.BrightnessContrastEffect();
@@ -33685,18 +33687,18 @@ class ca extends ft {
33685
33687
  }
33686
33688
  Af([
33687
33689
  p(N)
33688
- ], ca.prototype, "postExposure");
33690
+ ], la.prototype, "postExposure");
33689
33691
  Af([
33690
33692
  p(N)
33691
- ], ca.prototype, "contrast");
33693
+ ], la.prototype, "contrast");
33692
33694
  Af([
33693
33695
  p(N)
33694
- ], ca.prototype, "hueShift");
33696
+ ], la.prototype, "hueShift");
33695
33697
  Af([
33696
33698
  p(N)
33697
- ], ca.prototype, "saturation");
33698
- Dn("ColorAdjustments", ca);
33699
- var iA = Object.defineProperty, ha = (o, t, e, i) => {
33699
+ ], la.prototype, "saturation");
33700
+ Dn("ColorAdjustments", la);
33701
+ var iA = Object.defineProperty, ca = (o, t, e, i) => {
33700
33702
  for (var n = void 0, s = o.length - 1, a; s >= 0; s--)
33701
33703
  (a = o[s]) && (n = a(t, e, n) || n);
33702
33704
  return n && iA(t, e, n), n;
@@ -33745,25 +33747,25 @@ class ps extends ft {
33745
33747
  unapply() {
33746
33748
  }
33747
33749
  }
33748
- ha([
33750
+ ca([
33749
33751
  p()
33750
33752
  ], ps.prototype, "mode");
33751
- ha([
33753
+ ca([
33752
33754
  p(N)
33753
33755
  ], ps.prototype, "focusDistance");
33754
- ha([
33756
+ ca([
33755
33757
  p(N)
33756
33758
  ], ps.prototype, "focalLength");
33757
- ha([
33759
+ ca([
33758
33760
  p(N)
33759
33761
  ], ps.prototype, "aperture");
33760
- ha([
33762
+ ca([
33761
33763
  p(N)
33762
33764
  ], ps.prototype, "gaussianMaxRadius");
33763
- ha([
33765
+ ca([
33764
33766
  p(N)
33765
33767
  ], ps.prototype, "resolutionScale");
33766
- ha([
33768
+ ca([
33767
33769
  p(N)
33768
33770
  ], ps.prototype, "bokehScale");
33769
33771
  Dn("DepthOfField", ps);
@@ -33875,7 +33877,7 @@ Th([
33875
33877
  p(N)
33876
33878
  ], sr.prototype, "luminanceInfluence");
33877
33879
  Dn("ScreenSpaceAmbientOcclusion", sr);
33878
- var aA = Object.defineProperty, da = (o, t, e, i) => {
33880
+ var aA = Object.defineProperty, ha = (o, t, e, i) => {
33879
33881
  for (var n = void 0, s = o.length - 1, a; s >= 0; s--)
33880
33882
  (a = o[s]) && (n = a(t, e, n) || n);
33881
33883
  return n && aA(t, e, n), n;
@@ -33929,27 +33931,27 @@ class ms extends ft {
33929
33931
  }, s;
33930
33932
  }
33931
33933
  }
33932
- da([
33934
+ ha([
33933
33935
  Wt(),
33934
33936
  p()
33935
33937
  ], ms.prototype, "gammaCorrection");
33936
- da([
33938
+ ha([
33937
33939
  p(N)
33938
33940
  ], ms.prototype, "aoRadius");
33939
- da([
33941
+ ha([
33940
33942
  p(N)
33941
33943
  ], ms.prototype, "falloff");
33942
- da([
33944
+ ha([
33943
33945
  p(N)
33944
33946
  ], ms.prototype, "intensity");
33945
- da([
33947
+ ha([
33946
33948
  p(N)
33947
33949
  ], ms.prototype, "color");
33948
- da([
33950
+ ha([
33949
33951
  Wt(),
33950
33952
  p()
33951
33953
  ], ms.prototype, "screenspaceRadius");
33952
- da([
33954
+ ha([
33953
33955
  Wt(),
33954
33956
  p()
33955
33957
  ], ms.prototype, "quality");
@@ -34598,7 +34600,7 @@ var mA = Object.defineProperty, Ot = (o, t, e, i) => {
34598
34600
  (a = o[s]) && (n = a(t, e, n) || n);
34599
34601
  return n && mA(t, e, n), n;
34600
34602
  };
34601
- const It = S("debugsceneswitcher"), gA = S("sceneswitcher:clearscene"), Dd = "scene";
34603
+ const Lt = S("debugsceneswitcher"), gA = S("sceneswitcher:clearscene"), Dd = "scene";
34602
34604
  Fy(Dd);
34603
34605
  const mo = Promise.resolve(!1);
34604
34606
  class lt extends j {
@@ -34637,7 +34639,7 @@ class lt extends j {
34637
34639
  const s = e == null ? void 0 : e.state;
34638
34640
  if (s && s.startsWith(this.guid)) {
34639
34641
  const a = s.substr(this.guid.length + 2);
34640
- It && console.log("PopState", a), await this.trySelectSceneFromValue(a);
34642
+ Lt && console.log("PopState", a), await this.trySelectSceneFromValue(a);
34641
34643
  }
34642
34644
  }
34643
34645
  } finally {
@@ -34713,7 +34715,7 @@ class lt extends j {
34713
34715
  this.scenes === void 0 && (this.scenes = []);
34714
34716
  for (const e of this.scenes)
34715
34717
  e && !e.hasUrl && e.asset instanceof L ? C.remove(e.asset) : e instanceof L && C.remove(e);
34716
- It && console.log("SceneSwitcher", this);
34718
+ Lt && console.log("SceneSwitcher", this);
34717
34719
  }
34718
34720
  /** @internal */
34719
34721
  async onEnable() {
@@ -34800,7 +34802,7 @@ class lt extends j {
34800
34802
  */
34801
34803
  select(e) {
34802
34804
  var n, s, a;
34803
- if (It && console.log("select", e), typeof e == "object" && console.warn('Switching to "' + e + '" might not work. Please either use an index or a AssetReference (not a scene reference)'), typeof e == "string") {
34805
+ if (Lt && console.log("select", e), typeof e == "object" && console.warn('Switching to "' + e + '" might not work. Please either use an index or a AssetReference (not a scene reference)'), typeof e == "string") {
34804
34806
  const l = (n = this.scenes) == null ? void 0 : n.find((c) => c.url === e);
34805
34807
  if (!l) {
34806
34808
  const c = le.getOrCreate(this.sourceId ?? "", e, this.context);
@@ -34869,7 +34871,7 @@ class lt extends j {
34869
34871
  async __unloadCurrentScene() {
34870
34872
  const e = this._currentScene;
34871
34873
  if (this._currentScene = void 0, e) {
34872
- It && console.log("UNLOAD", e.url, "HasURL?: " + e.hasUrl);
34874
+ Lt && console.log("UNLOAD", e.url, "HasURL?: " + e.hasUrl);
34873
34875
  const i = this.tryGetSceneEventListener(e.asset);
34874
34876
  if (i != null && i.sceneClosing) {
34875
34877
  const n = i.sceneClosing();
@@ -34888,7 +34890,7 @@ class lt extends j {
34888
34890
  const h = new CustomEvent("loadscene-start", { detail: { scene: e, switcher: this, index: i } });
34889
34891
  this.dispatchEvent(h), (s = this.sceneLoadingStart) == null || s.invoke(h.detail), await this.onStartLoading(), await e.loadAssetAsync((u, f) => {
34890
34892
  var m;
34891
- if (It) {
34893
+ if (Lt) {
34892
34894
  const g = f.loaded / f.total, _ = "[" + "=".repeat(Math.floor(g * 20)) + "-".repeat(20 - Math.floor(g * 20)) + "]";
34893
34895
  console.debug(`[SceneSwitcher] Download ${(g * 100).toFixed(1)} % ${_}`, e.url);
34894
34896
  }
@@ -34896,11 +34898,11 @@ class lt extends j {
34896
34898
  }).catch(console.error), await this.onEndLoading();
34897
34899
  const d = new CustomEvent("loadscene-finished", { detail: { scene: e, switcher: this, index: i } });
34898
34900
  if (this.dispatchEvent(d), this._currentLoadingProgress = void 0, this._currentlyLoadingScene = void 0, d.defaultPrevented)
34899
- return It && console.warn("Adding loaded scene prevented:", e, d), !1;
34901
+ return Lt && console.warn("Adding loaded scene prevented:", e, d), !1;
34900
34902
  if (!e.asset)
34901
- return It && console.warn("Failed loading scene:", e), !1;
34903
+ return Lt && console.warn("Failed loading scene:", e), !1;
34902
34904
  if (this._currentIndex === i) {
34903
- if (It && console.log("ADD", e.url), this._currentScene = e, gA) {
34905
+ if (Lt && console.log("ADD", e.url), this._currentScene = e, gA) {
34904
34906
  const m = ((a = this.context.mainCameraComponent) == null ? void 0 : a.gameObject) || this.context.mainCamera;
34905
34907
  m == null || m.removeFromParent();
34906
34908
  const g = this.gameObject.removeFromParent();
@@ -34908,7 +34910,7 @@ class lt extends j {
34908
34910
  }
34909
34911
  if (C.add(e.asset, this.gameObject), this.useSceneLighting && this.context.sceneLighting.enable(e), this.useSceneBackground) {
34910
34912
  const m = this.context.lightmaps.tryGetSkybox(e.url);
34911
- m ? (m.mapping = Ns, this.context.scene.background = m) : It && console.warn("SceneSwitcher: Can't find skybox for scene " + e.url);
34913
+ m ? (m.mapping = Ns, this.context.scene.background = m) : Lt && console.warn("SceneSwitcher: Can't find skybox for scene " + e.url);
34912
34914
  }
34913
34915
  if (this.useHistory && i >= 0) {
34914
34916
  let m = i.toString();
@@ -34968,7 +34970,7 @@ class lt extends j {
34968
34970
  async onStartLoading() {
34969
34971
  var e, i;
34970
34972
  if (this._isCurrentlyLoading = !0, this.loadingScene && (this._lastLoadingScene !== this.loadingScene && (this._loadingScenePromise = void 0), this._lastLoadingScene = this.loadingScene, this._loadingScenePromise || (this._loadingScenePromise = (e = this.loadingScene) == null ? void 0 : e.loadAssetAsync().then((n) => n != null)), await this._loadingScenePromise, this._isCurrentlyLoading && ((i = this.loadingScene) != null && i.asset))) {
34971
- It && console.log("Add loading scene", this.loadingScene.url, this.loadingScene.asset);
34973
+ Lt && console.log("Add loading scene", this.loadingScene.url, this.loadingScene.asset);
34972
34974
  const n = this.loadingScene.asset;
34973
34975
  C.add(n, this.gameObject);
34974
34976
  const s = this.tryGetSceneEventListener(n);
@@ -34988,7 +34990,7 @@ class lt extends j {
34988
34990
  async onEndLoading() {
34989
34991
  var e;
34990
34992
  if (this._isCurrentlyLoading = !1, (e = this.loadingScene) != null && e.asset) {
34991
- It && console.log("Remove loading scene", this.loadingScene.url);
34993
+ Lt && console.log("Remove loading scene", this.loadingScene.url);
34992
34994
  const i = this.loadingScene.asset, n = this.tryGetSceneEventListener(i);
34993
34995
  if (typeof (n == null ? void 0 : n.sceneClosing) == "function") {
34994
34996
  const s = n.sceneClosing();
@@ -35104,10 +35106,10 @@ class yA {
35104
35106
  */
35105
35107
  begin(t) {
35106
35108
  if (this._isRunning) return;
35107
- It && console.log("Preload begin", { delay: t }), this._isRunning = !0;
35109
+ Lt && console.log("Preload begin", { delay: t }), this._isRunning = !0;
35108
35110
  let e = -10, i, n;
35109
35111
  const s = this._switcher.scenes, a = Date.now() + t, l = setInterval(() => {
35110
- if (this.allLoaded() && (It && console.log("All scenes (pre-)loaded"), this.stop()), !this._isRunning) {
35112
+ if (this.allLoaded() && (Lt && console.log("All scenes (pre-)loaded"), this.stop()), !this._isRunning) {
35111
35113
  clearInterval(l);
35112
35114
  return;
35113
35115
  }
@@ -35120,7 +35122,7 @@ class yA {
35120
35122
  const d = c ? e + i : e - i;
35121
35123
  if (!(d < 0) && !(d < 0 || d >= s.length) && !this._loadTasks.some((u) => u.index === d)) {
35122
35124
  const u = s[d];
35123
- It && console.log("Preload scene", { roomIndex: d, searchForward: c, lastRoom: e, currentIndex: this._switcher.currentIndex, tasks: this._loadTasks.length }, u == null ? void 0 : u.url), new _A(d, u, this._loadTasks);
35125
+ Lt && console.log("Preload scene", { roomIndex: d, searchForward: c, lastRoom: e, currentIndex: this._switcher.currentIndex, tasks: this._loadTasks.length }, u == null ? void 0 : u.url), new _A(d, u, this._loadTasks);
35124
35126
  }
35125
35127
  }, 200);
35126
35128
  }
@@ -35170,7 +35172,7 @@ class _A {
35170
35172
  * Asynchronously loads the asset and removes this task from the active tasks list when complete
35171
35173
  */
35172
35174
  async awaitLoading() {
35173
- this.asset && !this.asset.isLoaded() && (It && console.log("Preload start: " + this.asset.url, this.index), await this.asset.preload(), It && console.log("Preload finished: " + this.asset.url, this.index));
35175
+ this.asset && !this.asset.isLoaded() && (Lt && console.log("Preload start: " + this.asset.url, this.index), await this.asset.preload(), Lt && console.log("Preload finished: " + this.asset.url, this.index));
35174
35176
  const t = this.tasks.indexOf(this);
35175
35177
  t >= 0 && this.tasks.splice(t, 1);
35176
35178
  }
@@ -35623,7 +35625,7 @@ class SA {
35623
35625
  const t = this._videos[this._videos.length - 1];
35624
35626
  if (!t) return;
35625
35627
  if (this._isInScreenspaceMode = !0, !this._screenspaceModeQuad) {
35626
- if (this._screenspaceModeQuad = ta.createPrimitive(rl.Quad, {
35628
+ if (this._screenspaceModeQuad = ea.createPrimitive(rl.Quad, {
35627
35629
  material: new PA(t)
35628
35630
  }), !this._screenspaceModeQuad) return;
35629
35631
  this._screenspaceModeQuad.geometry.scale(2, 2, 2);
@@ -35788,7 +35790,7 @@ var OA = Object.defineProperty, kA = Object.getOwnPropertyDescriptor, Ah = (o, t
35788
35790
  };
35789
35791
  const Rt = S("debugscreensharing");
35790
35792
  var Mx = /* @__PURE__ */ ((o) => (o[o.Screen = 0] = "Screen", o[o.Camera = 1] = "Camera", o[o.Canvas = 2] = "Canvas", o[o.Microphone = 3] = "Microphone", o))(Mx || {});
35791
- class ua extends j {
35793
+ class da extends j {
35792
35794
  constructor() {
35793
35795
  super(...arguments);
35794
35796
  r(this, "allowStartOnClick", !0);
@@ -36067,19 +36069,19 @@ class ua extends j {
36067
36069
  }
36068
36070
  Ah([
36069
36071
  p()
36070
- ], ua.prototype, "allowStartOnClick", 2);
36072
+ ], da.prototype, "allowStartOnClick", 2);
36071
36073
  Ah([
36072
36074
  p()
36073
- ], ua.prototype, "autoConnect", 2);
36075
+ ], da.prototype, "autoConnect", 2);
36074
36076
  Ah([
36075
36077
  p(xt)
36076
- ], ua.prototype, "videoPlayer", 1);
36078
+ ], da.prototype, "videoPlayer", 1);
36077
36079
  Ah([
36078
36080
  p()
36079
- ], ua.prototype, "device", 2);
36081
+ ], da.prototype, "device", 2);
36080
36082
  Ah([
36081
36083
  p()
36082
- ], ua.prototype, "deviceName", 2);
36084
+ ], da.prototype, "deviceName", 2);
36083
36085
  var MA = Object.defineProperty, Rx = (o, t, e, i) => {
36084
36086
  for (var n = void 0, s = o.length - 1, a; s >= 0; s--)
36085
36087
  (a = o[s]) && (n = a(t, e, n) || n);
@@ -36097,7 +36099,7 @@ class Df extends j {
36097
36099
  if (this.gameObject instanceof G)
36098
36100
  this.gameObject instanceof G && this.gameObject.material && (this.gameObject.material = this.gameObject.material.clone(), this.targetMesh = this.gameObject, this.targetMesh.receiveShadow = !0);
36099
36101
  else {
36100
- const e = ta.createPrimitive(rl.Quad, {
36102
+ const e = ea.createPrimitive(rl.Quad, {
36101
36103
  name: "ShadowCatcher",
36102
36104
  material: new yt({
36103
36105
  // HACK heuristic to get approx. the same colors out as with the current default ShadowCatcher material
@@ -36189,32 +36191,33 @@ var RA = Object.defineProperty, Ih = (o, t, e, i) => {
36189
36191
  (a = o[s]) && (n = a(t, e, n) || n);
36190
36192
  return n && RA(t, e, n), n;
36191
36193
  };
36192
- const Lt = S("debugskybox");
36194
+ const Et = S("debugskybox");
36193
36195
  Fy("background-image");
36194
36196
  Fy("environment-image");
36195
36197
  function n0(o, t, e, i, n) {
36198
+ if (t === "transparent" || t != null && t.startsWith("rgb") || t != null && t.startsWith("#"))
36199
+ return console.warn(`Needle Engine: Invalid ${n} value (${t}). Did you mean to set background-color instead?`), null;
36196
36200
  const s = new zy();
36197
36201
  s.allowDrop = !1, s.allowNetworking = !1, s.background = e, s.environment = i, C.addComponent(o.scene, s);
36198
36202
  const a = (l) => {
36199
- typeof l == "string" && (Lt && console.log(n, "CHANGED TO", l), s.setSkybox(l));
36203
+ typeof l == "string" && (Et && console.log(n, "CHANGED TO", l), s.setSkybox(l));
36200
36204
  };
36201
36205
  return x1(o.domElement, n, a), s.addEventListener("destroy", () => {
36202
- Lt && console.log("Destroyed attribute remote skybox", n), S1(o.domElement, n, a);
36206
+ Et && console.log("Destroyed attribute remote skybox", n), S1(o.domElement, n, a);
36203
36207
  }), s.setSkybox(t);
36204
36208
  }
36205
36209
  const bu = new Array();
36206
36210
  fe.registerCallback(me.ContextCreationStart, (o) => {
36207
- var n;
36208
36211
  const t = o.context, e = t.domElement.getAttribute("background-image"), i = t.domElement.getAttribute("environment-image");
36209
36212
  if (e) {
36210
- Lt && console.log("Creating remote skybox to load " + e), ((n = t.mainCameraComponent) == null ? void 0 : n.clearFlags) !== $r.Skybox && console.warn('"background-image" attribute has no effect: camera clear flags are not set to "Skybox"');
36211
- const s = n0(t, e, !0, !1, "background-image");
36212
- bu.push(s);
36213
+ Et && console.log("Creating remote skybox to load " + e);
36214
+ const n = n0(t, e, !0, !1, "background-image");
36215
+ n && bu.push(n);
36213
36216
  }
36214
36217
  if (i) {
36215
- Lt && console.log("Creating remote environment to load " + i);
36216
- const s = n0(t, i, !1, !0, "environment-image");
36217
- bu.push(s);
36218
+ Et && console.log("Creating remote environment to load " + i);
36219
+ const n = n0(t, i, !1, !0, "environment-image");
36220
+ n && bu.push(n);
36218
36221
  }
36219
36222
  });
36220
36223
  fe.registerCallback(me.ContextCreationStart, () => Promise.all(bu).finally(() => {
@@ -36225,7 +36228,7 @@ function Tx() {
36225
36228
  }
36226
36229
  function s0(o) {
36227
36230
  const e = Tx().find((i) => i.src === o);
36228
- return e ? (Lt && console.log("Skybox: Found previously loaded texture for " + o), e.texture) : null;
36231
+ return e ? (Et && console.log("Skybox: Found previously loaded texture for " + o), e.texture) : null;
36229
36232
  }
36230
36233
  async function TA(o) {
36231
36234
  const t = await o;
@@ -36239,7 +36242,7 @@ function EA(o, t) {
36239
36242
  }
36240
36243
  t.then((i) => xv(i, !1)), e.push({ src: o, texture: t });
36241
36244
  }
36242
- const Kr = class extends j {
36245
+ const Yr = class extends j {
36243
36246
  constructor() {
36244
36247
  super(...arguments);
36245
36248
  r(this, "url");
@@ -36262,11 +36265,11 @@ const Kr = class extends j {
36262
36265
  var i, n, s, a;
36263
36266
  if (this.allowDrop && e.dataTransfer) {
36264
36267
  for (const l of e.dataTransfer.types)
36265
- if (Lt && console.log(l), l === "text/uri-list") {
36268
+ if (Et && console.log(l), l === "text/uri-list") {
36266
36269
  const c = e.dataTransfer.getData(l);
36267
- Lt && console.log(l, c);
36270
+ Et && console.log(l, c);
36268
36271
  let h = (n = (i = new RegExp(/polyhaven.com\/asset_img\/.+?\/(?<name>.+)\.png/).exec(c)) == null ? void 0 : i.groups) == null ? void 0 : n.name;
36269
- if (h || (h = (a = (s = new RegExp(/polyhaven\.com\/a\/(?<name>.+)/).exec(c)) == null ? void 0 : s.groups) == null ? void 0 : a.name), Lt && console.log(h), h) {
36272
+ if (h || (h = (a = (s = new RegExp(/polyhaven\.com\/a\/(?<name>.+)/).exec(c)) == null ? void 0 : s.groups) == null ? void 0 : a.name), Et && console.log(h), h) {
36270
36273
  const d = "https://dl.polyhaven.org/file/ph-assets/HDRIs/exr/1k/" + h + "_1k.exr";
36271
36274
  console.log(`[Remote Skybox] Setting skybox from url: ${d}`), e.preventDefault(), this.setSkybox(d);
36272
36275
  break;
@@ -36289,7 +36292,7 @@ const Kr = class extends j {
36289
36292
  }
36290
36293
  } else if (l == "Files") {
36291
36294
  const c = e.dataTransfer.files.item(0);
36292
- if (Lt && console.log(l, c), !c) continue;
36295
+ if (Et && console.log(l, c), !c) continue;
36293
36296
  if (!this.isValidTextureType(c.name)) {
36294
36297
  console.warn(`[RemoteSkybox]: File "${c.name}" is not supported. Supported files are ${this.validTextureTypes.join(", ")}`);
36295
36298
  return;
@@ -36314,7 +36317,7 @@ const Kr = class extends j {
36314
36317
  this.context.scene.environment === this._prevLoadedEnvironment && (this.context.scene.environment = this._prevEnvironment, Ai.backgroundShouldBeTransparent(this.context) || (this.context.scene.background = this._prevBackground), this._prevLoadedEnvironment = void 0), this.unregisterDropEvents(), (e = this.context.mainCameraComponent) == null || e.applyClearFlags();
36315
36318
  }
36316
36319
  urlChangedSyncField() {
36317
- this.allowNetworking && this.url && (this.isRemoteTexture(this.url) ? this.setSkybox(this.url) : Lt && console.warn(`RemoteSkybox: Not setting skybox: ${this.url} is not a remote texture. If you want to set a local texture, set allowNetworking to false.`));
36320
+ this.allowNetworking && this.url && (this.isRemoteTexture(this.url) ? this.setSkybox(this.url) : Et && console.warn(`RemoteSkybox: Not setting skybox: ${this.url} is not a remote texture. If you want to set a local texture, set allowNetworking to false.`));
36318
36321
  }
36319
36322
  /**
36320
36323
  * Set the skybox from a given url
@@ -36325,19 +36328,24 @@ const Kr = class extends j {
36325
36328
  async setSkybox(e, i) {
36326
36329
  var a;
36327
36330
  if (!this.activeAndEnabled || (e = AA(e, this.environment, this.background), !e)) return !1;
36328
- if (i ?? (i = e), this.isValidTextureType(i) || console.warn("Potentially invalid skybox url", i, "on", this.name), Lt && console.log("Set remote skybox url: " + e), this._prevUrl === e && this._prevLoadedEnvironment)
36331
+ try {
36332
+ e.startsWith("/") || e.startsWith(".") ? new URL(e, window.location.href) : new URL(e);
36333
+ } catch {
36334
+ return Et && console.warn("RemoteSkybox: Invalid URL", e, this.name), !1;
36335
+ }
36336
+ if (i ?? (i = e), this.isValidTextureType(i) || console.warn("Potentially invalid skybox url", i, "on", this.name), Et && console.log("Set remote skybox url: " + e), this._prevUrl === e && this._prevLoadedEnvironment)
36329
36337
  return this.apply(), !0;
36330
36338
  (a = this._prevLoadedEnvironment) == null || a.dispose(), this._prevLoadedEnvironment = void 0, this._prevUrl = e;
36331
36339
  const n = await this.loadTexture(e, i);
36332
36340
  if (!n)
36333
- return Lt && console.warn("RemoteSkybox: Failed to load texture from url", e), !1;
36341
+ return Et && console.warn("RemoteSkybox: Failed to load texture from url", e), !1;
36334
36342
  if (!this.enabled)
36335
- return Lt && console.warn("RemoteSkybox: Component is not enabled, aborting setSkybox"), !1;
36343
+ return Et && console.warn("RemoteSkybox: Component is not enabled, aborting setSkybox"), !1;
36336
36344
  if (this._prevUrl !== e)
36337
- return Lt && console.warn("RemoteSkybox: URL changed while loading texture, aborting setSkybox"), !1;
36345
+ return Et && console.warn("RemoteSkybox: URL changed while loading texture, aborting setSkybox"), !1;
36338
36346
  this.url = e;
36339
36347
  const s = e.lastIndexOf("/");
36340
- return n.name = e.substring(s >= 0 ? s + 1 : 0), this._loader instanceof Wa && (n.colorSpace = qs), this._prevLoadedEnvironment = n, this.apply(), !0;
36348
+ return n.name = e.substring(s >= 0 ? s + 1 : 0), this._loader instanceof $a && (n.colorSpace = qs), this._prevLoadedEnvironment = n, this.apply(), !0;
36341
36349
  }
36342
36350
  async loadTexture(e, i) {
36343
36351
  var d, u, f, m, g;
@@ -36359,15 +36367,15 @@ const Kr = class extends j {
36359
36367
  this._loader = _;
36360
36368
  }
36361
36369
  } else
36362
- this._loader instanceof Wa || (this._loader = new Wa());
36363
- Lt && console.log("Loading skybox: " + e);
36370
+ this._loader instanceof $a || (this._loader = new $a());
36371
+ Et && console.log("Loading skybox: " + e);
36364
36372
  const c = this._loader.loadAsync(e);
36365
36373
  return EA(i, c), await c;
36366
36374
  }
36367
36375
  apply() {
36368
36376
  var i;
36369
36377
  const e = this._prevLoadedEnvironment;
36370
- e && (e instanceof pC || e instanceof mC || (e.mapping = gC, e.needsUpdate = !0), this.context.scene.background !== e && (this._prevBackground = this.context.scene.background), this.context.scene.environment !== e && (this._prevEnvironment = this.context.scene.environment), Lt && console.log("Set remote skybox", this.url, !Ai.backgroundShouldBeTransparent(this.context)), this.environment && (this.context.scene.environment = e), this.background && !Ai.backgroundShouldBeTransparent(this.context) && (this.context.scene.background = e), ((i = this.context.mainCameraComponent) == null ? void 0 : i.backgroundBlurriness) !== void 0 && (this.context.scene.backgroundBlurriness = this.context.mainCameraComponent.backgroundBlurriness));
36378
+ e && (e instanceof pC || e instanceof mC || (e.mapping = gC, e.needsUpdate = !0), this.context.scene.background !== e && (this._prevBackground = this.context.scene.background), this.context.scene.environment !== e && (this._prevEnvironment = this.context.scene.environment), Et && console.log("Set remote skybox", this.url, !Ai.backgroundShouldBeTransparent(this.context)), this.environment && (this.context.scene.environment = e), this.background && !Ai.backgroundShouldBeTransparent(this.context) && (this.context.scene.background = e), ((i = this.context.mainCameraComponent) == null ? void 0 : i.backgroundBlurriness) !== void 0 && (this.context.scene.backgroundBlurriness = this.context.mainCameraComponent.backgroundBlurriness));
36371
36379
  }
36372
36380
  isRemoteTexture(e) {
36373
36381
  return e.startsWith("http://") || e.startsWith("https://");
@@ -36385,22 +36393,22 @@ const Kr = class extends j {
36385
36393
  }
36386
36394
  };
36387
36395
  Ih([
36388
- Qw(Kr.prototype.urlChangedSyncField),
36396
+ Qw(Yr.prototype.urlChangedSyncField),
36389
36397
  p(URL)
36390
- ], Kr.prototype, "url");
36398
+ ], Yr.prototype, "url");
36391
36399
  Ih([
36392
36400
  p()
36393
- ], Kr.prototype, "allowDrop");
36401
+ ], Yr.prototype, "allowDrop");
36394
36402
  Ih([
36395
36403
  p()
36396
- ], Kr.prototype, "background");
36404
+ ], Yr.prototype, "background");
36397
36405
  Ih([
36398
36406
  p()
36399
- ], Kr.prototype, "environment");
36407
+ ], Yr.prototype, "environment");
36400
36408
  Ih([
36401
36409
  p()
36402
- ], Kr.prototype, "allowNetworking");
36403
- let zy = Kr;
36410
+ ], Yr.prototype, "allowNetworking");
36411
+ let zy = Yr;
36404
36412
  function AA(o, t, e) {
36405
36413
  const i = t && !e;
36406
36414
  switch (o == null ? void 0 : o.toLowerCase()) {
@@ -37893,7 +37901,7 @@ const eI = S("mutetimeline"), kr = class kr extends Uf {
37893
37901
  }
37894
37902
  getAudioFilePath(e) {
37895
37903
  const i = this.director.sourceId;
37896
- return Jr(i, e);
37904
+ return Zr(i, e);
37897
37905
  }
37898
37906
  onAllowAudioChanged(e) {
37899
37907
  for (let i = 0; i < this.models.length; i++) {
@@ -39883,7 +39891,7 @@ var wI = Object.defineProperty, cr = (o, t, e, i) => {
39883
39891
  (a = o[s]) && (n = a(t, e, n) || n);
39884
39892
  return n && wI(t, e, n), n;
39885
39893
  };
39886
- const c0 = S("debugimagetracking"), $a = class $a {
39894
+ const c0 = S("debugimagetracking"), Na = class Na {
39887
39895
  constructor(t, e, i, n, s, a) {
39888
39896
  r(this, "measuredSize");
39889
39897
  r(this, "state");
@@ -39922,14 +39930,14 @@ const c0 = S("debugimagetracking"), $a = class $a {
39922
39930
  }
39923
39931
  ensureTransformData() {
39924
39932
  if (!this._position) {
39925
- this._position = $a._positionBuffer.get(), this._rotation = $a._rotationBuffer.get();
39933
+ this._position = Na._positionBuffer.get(), this._rotation = Na._rotationBuffer.get();
39926
39934
  const t = this._pose.transform, e = ne.active.convertSpace(t);
39927
39935
  this._position.copy(e == null ? void 0 : e.position), this._rotation.copy(e == null ? void 0 : e.quaternion);
39928
39936
  }
39929
39937
  }
39930
39938
  };
39931
- r($a, "_positionBuffer", new on(() => new w(), 20)), r($a, "_rotationBuffer", new on(() => new W(), 20));
39932
- let Su = $a;
39939
+ r(Na, "_positionBuffer", new on(() => new w(), 20)), r(Na, "_rotationBuffer", new on(() => new W(), 20));
39940
+ let Su = Na;
39933
39941
  class hr {
39934
39942
  constructor() {
39935
39943
  r(this, "image");
@@ -40315,7 +40323,7 @@ class dr extends j {
40315
40323
  else if (m instanceof jo)
40316
40324
  for (const y of m.children)
40317
40325
  y instanceof G && (Ie(y.geometry), y.geometry = this.createGeometry(h), this.makeOccluder(y, y.material, this.occluder && !this.dataTemplate));
40318
- const g = m.getComponent(oa);
40326
+ const g = m.getComponent(sa);
40319
40327
  if (g) {
40320
40328
  const y = m;
40321
40329
  g.sharedMesh = y, g.convex = this.checkIfContextShouldBeConvex(y, h), g.onDisable(), g.onEnable();
@@ -40502,14 +40510,14 @@ M.add("CharacterControllerInput", Qo);
40502
40510
  M.add("Collider", Ui);
40503
40511
  M.add("SphereCollider", yh);
40504
40512
  M.add("BoxCollider", ry);
40505
- M.add("MeshCollider", oa);
40513
+ M.add("MeshCollider", sa);
40506
40514
  M.add("CapsuleCollider", Go);
40507
40515
  M.add("ContactShadows", hf);
40508
40516
  M.add("LogStats", mw);
40509
40517
  M.add("DeleteBox", Jc);
40510
40518
  M.add("Deletable", yw);
40511
40519
  M.add("DeviceFlag", ay);
40512
- M.add("DragControls", Aa);
40520
+ M.add("DragControls", Ea);
40513
40521
  M.add("DropListener", Ko);
40514
40522
  M.add("Duplicatable", vw);
40515
40523
  M.add("EventListEvent", Zg);
@@ -40522,7 +40530,7 @@ M.add("ChangeMaterialOnClick", Hw);
40522
40530
  M.add("SetActiveOnClick", Gw);
40523
40531
  M.add("HideOnStart", th);
40524
40532
  M.add("EmphasizeOnClick", vh);
40525
- M.add("PlayAudioOnClick", qr);
40533
+ M.add("PlayAudioOnClick", Gr);
40526
40534
  M.add("PlayAnimationOnClick", mu);
40527
40535
  M.add("PreliminaryAction", wh);
40528
40536
  M.add("PreliminaryTrigger", gf);
@@ -40552,7 +40560,7 @@ M.add("PlayerColor", oh);
40552
40560
  M.add("Antialiasing", Rf);
40553
40561
  M.add("BloomEffect", jy);
40554
40562
  M.add("ChromaticAberration", Ef);
40555
- M.add("ColorAdjustments", ca);
40563
+ M.add("ColorAdjustments", la);
40556
40564
  M.add("DepthOfField", ps);
40557
40565
  M.add("EffectWrapper", _u);
40558
40566
  M.add("PixelationEffect", If);
@@ -40560,7 +40568,7 @@ M.add("ScreenSpaceAmbientOcclusion", sr);
40560
40568
  M.add("ScreenSpaceAmbientOcclusionN8", ms);
40561
40569
  M.add("SharpeningEffect", Lf);
40562
40570
  M.add("TiltShiftEffect", lo);
40563
- M.add("ToneMappingEffect", Yr);
40571
+ M.add("ToneMappingEffect", Qr);
40564
40572
  M.add("Vignette", jl);
40565
40573
  M.add("Volume", Eh);
40566
40574
  M.add("ReflectionProbe", fu);
@@ -40569,7 +40577,7 @@ M.add("MeshRenderer", ff);
40569
40577
  M.add("SkinnedMeshRenderer", Ew);
40570
40578
  M.add("Rigidbody", wt);
40571
40579
  M.add("SceneSwitcher", lt);
40572
- M.add("ScreenCapture", ua);
40580
+ M.add("ScreenCapture", da);
40573
40581
  M.add("ShadowCatcher", Df);
40574
40582
  M.add("RemoteSkybox", zy);
40575
40583
  M.add("SmoothFollow", Uy);
@@ -40593,7 +40601,7 @@ M.add("BaseUIComponent", En);
40593
40601
  M.add("UIRootComponent", wf);
40594
40602
  M.add("Button", ar);
40595
40603
  M.add("Canvas", nh);
40596
- M.add("CanvasGroup", Qr);
40604
+ M.add("CanvasGroup", Xr);
40597
40605
  M.add("EventSystem", yi);
40598
40606
  M.add("Graphic", xf);
40599
40607
  M.add("MaskableGraphic", Sf);
@@ -40614,8 +40622,8 @@ M.add("EnvironmentScene", Qy);
40614
40622
  M.add("LookAt", $x);
40615
40623
  M.add("OpenURL", zh);
40616
40624
  M.add("VideoPlayer", xt);
40617
- M.add("Voip", sa);
40618
- M.add("Avatar", Xr);
40625
+ M.add("Voip", na);
40626
+ M.add("Avatar", qr);
40619
40627
  M.add("XRControllerFollow", lr);
40620
40628
  M.add("XRControllerModel", eo);
40621
40629
  M.add("XRControllerMovement", cn);
@@ -40673,18 +40681,18 @@ async function TI(o, t, e, i = null, n) {
40673
40681
  }
40674
40682
  });
40675
40683
  }
40676
- const hg = Symbol("original-component-name"), xa = /* @__PURE__ */ new Map();
40684
+ const hg = Symbol("original-component-name"), wa = /* @__PURE__ */ new Map();
40677
40685
  function dg(o, t, e, i) {
40678
40686
  if (t === null || !o) return;
40679
40687
  const n = o.guid, s = o.guid;
40680
- s != null && s.length && (xa.has(s) || (Dc && console.log('Creating InstanceIdProvider with key "' + s + '" for object ' + o.name), xa.set(s, new zt(s))));
40681
- const a = s && xa.get(s) || t;
40688
+ s != null && s.length && (wa.has(s) || (Dc && console.log('Creating InstanceIdProvider with key "' + s + '" for object ' + o.name), wa.set(s, new zt(s))));
40689
+ const a = s && wa.get(s) || t;
40682
40690
  if (o.guid = a.generateUUID(), n && n !== "invalid" && (e[n] = o.guid), o && o.userData && o.userData.components)
40683
40691
  for (const l of o.userData.components) {
40684
40692
  if (l === null) continue;
40685
40693
  const c = l.guid;
40686
- c ? xa.has(c) || (Dc && console.log('Creating InstanceIdProvider with key "' + c + '" for component ' + l[hg]), xa.set(c, new zt(c))) : Dc && console.warn("Can not create IdProvider: component " + l[hg] + " has no guid", l.guid);
40687
- const h = xa.get(c) || t, d = l.guid;
40694
+ c ? wa.has(c) || (Dc && console.log('Creating InstanceIdProvider with key "' + c + '" for component ' + l[hg]), wa.set(c, new zt(c))) : Dc && console.warn("Can not create IdProvider: component " + l[hg] + " has no guid", l.guid);
40695
+ const h = wa.get(c) || t, d = l.guid;
40688
40696
  l.guid = h.generateUUID(), d && d !== "invalid" && (e[d] = l.guid), l.resolveGuids && i.push(l);
40689
40697
  }
40690
40698
  if (o.children)
@@ -40705,7 +40713,7 @@ async function ug(o, t, e, i) {
40705
40713
  const f = M.get(u.name);
40706
40714
  if (f != null) {
40707
40715
  const m = new f();
40708
- m.sourceId = o.gltfId, ll(m, u, o.implementationInformation), m.context = o.context, "guid" in u && (m[vd] = u.guid), m[hg] = u.name, Xa(t, m, !1), e.push({ instance: m, compData: u, obj: t }), m.isCamera && o.context && o.context.mainCamera === null && m.tag === "MainCamera" && o.context.setCurrentCamera(m), ((l = (a = (s = o.context) == null ? void 0 : s.physics) == null ? void 0 : a.engine) == null ? void 0 : l.isInitialized) === !1 && (m.isCollider || m.isRigidbody) && ((h = (c = o.context) == null ? void 0 : c.physics.engine) == null || h.initialize());
40716
+ m.sourceId = o.gltfId, ll(m, u, o.implementationInformation), m.context = o.context, "guid" in u && (m[vd] = u.guid), m[hg] = u.name, qa(t, m, !1), e.push({ instance: m, compData: u, obj: t }), m.isCamera && o.context && o.context.mainCamera === null && m.tag === "MainCamera" && o.context.setCurrentCamera(m), ((l = (a = (s = o.context) == null ? void 0 : s.physics) == null ? void 0 : a.engine) == null ? void 0 : l.isInitialized) === !1 && (m.isCollider || m.isRigidbody) && ((h = (c = o.context) == null ? void 0 : c.physics.engine) == null || h.initialize());
40709
40717
  } else
40710
40718
  Dc && console.debug("unknown component: " + u.name), ic.includes(u.name) || ic.push(u.name);
40711
40719
  } catch (f) {
@@ -40747,8 +40755,8 @@ cv(Hx);
40747
40755
  const Gx = S("printGltf") || S("printgltf"), AI = S("debugfileformat");
40748
40756
  async function qx(o, t) {
40749
40757
  const e = await rR(o, { useExtension: !0 }) || "unknown";
40750
- AI && console.debug(`Determined file type: '${e}' for url '${o}'`, { registeredModelLoaderCallbacks: Ia });
40751
- for (const i of Ia) {
40758
+ AI && console.debug(`Determined file type: '${e}' for url '${o}'`, { registeredModelLoaderCallbacks: Aa });
40759
+ for (const i of Aa) {
40752
40760
  const { callback: n } = i, s = n({ context: t, url: o, mimetype: e });
40753
40761
  if (s instanceof Promise && await s, s)
40754
40762
  return console.debug(`Using custom loader (${i.name || "unnamed"}) for ${e} at '${o}'`), s;
@@ -41654,27 +41662,46 @@ function NI(o) {
41654
41662
  return z() && console.debug("Loading: use default name", e), e;
41655
41663
  }
41656
41664
  function $I(o) {
41657
- const t = o.getAttribute("loading-blur");
41658
- t !== null && t !== "0" && Jv((e) => {
41665
+ Jv((t) => {
41659
41666
  var i;
41660
- if (e.domElement === o) {
41661
- const n = document.createElement("div");
41662
- let s = "30px";
41663
- t.endsWith("px") && (s = t), n.style.cssText = `position: absolute; top: 0; left: 0; width: 100%; height: 100%; backdrop-filter: blur(${s}); z-index: 10; pointer-events: none;`, e.domElement.prepend(n), (i = e.lodsManager.manager) == null || i.awaitLoading({
41664
- signal: AbortSignal.timeout(1e4)
41667
+ const e = o.getAttribute("loading-blur");
41668
+ if (e !== null && e !== "0" && t.domElement === o) {
41669
+ const n = (i = t.lodsManager.manager) == null ? void 0 : i.awaitLoading({
41670
+ frames: 5,
41671
+ signal: AbortSignal.timeout(1e4),
41665
41672
  // Limit how long the page can be blurred
41666
- }).catch((a) => {
41667
- }).then(() => {
41668
- const a = n.animate([
41669
- {
41670
- backdropFilter: "blur(0px)",
41671
- opacity: 0
41672
- }
41673
- ], { duration: 400, easing: "ease-out" });
41674
- a.onfinish = () => {
41675
- n.remove();
41676
- };
41673
+ maxPromisesPerObject: 1
41674
+ }).catch((l) => {
41677
41675
  });
41676
+ let s = "20px";
41677
+ e.endsWith("px") && (s = e);
41678
+ const a = 170;
41679
+ if (t.scene.background === null) {
41680
+ const l = o, c = t.renderer.domElement, h = c.style.filter, d = c.style.overflow;
41681
+ c.style.filter += `blur(${s})`, l.style.overflow = "hidden", n == null || n.then(() => {
41682
+ const u = c.animate([
41683
+ {
41684
+ filter: "blur(0px)"
41685
+ }
41686
+ ], { duration: a, easing: "ease-in" });
41687
+ u.onfinish = () => {
41688
+ c.style.filter = h, l.style.overflow = d;
41689
+ };
41690
+ });
41691
+ } else {
41692
+ const l = document.createElement("div");
41693
+ t.domElement.prepend(l), l.style.cssText = "position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; pointer-events: none", l.style.backdropFilter = `blur(${s})`, n == null || n.then(() => {
41694
+ const c = l.animate([
41695
+ {
41696
+ backdropFilter: "blur(0px)",
41697
+ opacity: 0
41698
+ }
41699
+ ], { duration: a, easing: "ease-in" });
41700
+ c.onfinish = () => {
41701
+ l.remove();
41702
+ };
41703
+ });
41704
+ }
41678
41705
  }
41679
41706
  }, { once: !0 });
41680
41707
  }
@@ -42372,7 +42399,7 @@ class GI {
42372
42399
  if (d || nm) {
42373
42400
  if (!s) {
42374
42401
  const f = [], m = l.normal();
42375
- i instanceof oa && i.convex && (m.x = -m.x, m.y = -m.y, m.z = -m.z);
42402
+ i instanceof sa && i.convex && (m.x = -m.x, m.y = -m.y, m.z = -m.z);
42376
42403
  for (let g = 0; g < l.numSolverContacts(); g++) {
42377
42404
  const _ = l.solverContactPoint(g), y = l.contactImpulse(g);
42378
42405
  if (_) {
@@ -42615,11 +42642,11 @@ class tS extends HTMLElement {
42615
42642
  Lr = new WeakMap(), Dr = new WeakMap(), jr = new WeakMap(), Kt = new WeakMap(), Ms = new WeakMap(), Ka = new WeakMap(), gl = new WeakSet(), iS = function() {
42616
42643
  var i, n;
42617
42644
  if ((i = ue(this, Kt)) == null || i.remove(), this.getAttribute("ar") != null)
42618
- ue(this, Ms) ?? gn(this, Ms, new Vr()), gn(this, Kt, ue(this, Ms).createARButton());
42645
+ ue(this, Ms) ?? gn(this, Ms, new Wr()), gn(this, Kt, ue(this, Ms).createARButton());
42619
42646
  else if (this.getAttribute("vr") != null)
42620
- ue(this, Ms) ?? gn(this, Ms, new Vr()), gn(this, Kt, ue(this, Ms).createVRButton());
42647
+ ue(this, Ms) ?? gn(this, Ms, new Wr()), gn(this, Kt, ue(this, Ms).createVRButton());
42621
42648
  else if (this.getAttribute("quicklook") != null)
42622
- ue(this, Ms) ?? gn(this, Ms, new Vr()), gn(this, Kt, ue(this, Ms).createQuicklookButton());
42649
+ ue(this, Ms) ?? gn(this, Ms, new Wr()), gn(this, Kt, ue(this, Ms).createQuicklookButton());
42623
42650
  else {
42624
42651
  om ? console.warn("No button type specified for <needle-button>. Use either ar, vr or quicklook attribute.") : console.debug("No button type specified for <needle-button>. Use either ar, vr or quicklook attribute.");
42625
42652
  return;
@@ -42843,7 +42870,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42843
42870
  AudioListener: Io,
42844
42871
  AudioSource: Rn,
42845
42872
  AudioTrackHandler: rh,
42846
- Avatar: Xr,
42873
+ Avatar: qr,
42847
42874
  AvatarBlink_Simple: vl,
42848
42875
  AvatarEyeLook_Rotation: uw,
42849
42876
  AvatarLoader: YI,
@@ -42867,7 +42894,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42867
42894
  Camera: Ai,
42868
42895
  CameraTargetReachedEvent: lu,
42869
42896
  Canvas: nh,
42870
- CanvasGroup: Qr,
42897
+ CanvasGroup: Xr,
42871
42898
  CapsuleCollider: Go,
42872
42899
  ChangeMaterialOnClick: Hw,
42873
42900
  ChangeTransformOnClick: Pl,
@@ -42875,7 +42902,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42875
42902
  CharacterControllerInput: Qo,
42876
42903
  ChromaticAberration: Ef,
42877
42904
  Collider: Ui,
42878
- ColorAdjustments: ca,
42905
+ ColorAdjustments: la,
42879
42906
  ColorBySpeedModule: Rh,
42880
42907
  ColorOverLifetimeModule: Ay,
42881
42908
  ContactShadows: hf,
@@ -42886,7 +42913,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42886
42913
  DepthOfField: ps,
42887
42914
  DeviceFlag: ay,
42888
42915
  DocumentExtension: KI,
42889
- DragControls: Aa,
42916
+ DragControls: Ea,
42890
42917
  DropListener: Ko,
42891
42918
  Duplicatable: vw,
42892
42919
  EffectWrapper: _u,
@@ -42928,7 +42955,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42928
42955
  LookAtConstraint: bl,
42929
42956
  MainModule: li,
42930
42957
  MaskableGraphic: Sf,
42931
- MeshCollider: oa,
42958
+ MeshCollider: sa,
42932
42959
  MeshRenderer: ff,
42933
42960
  MinMaxCurve: K,
42934
42961
  MinMaxGradient: Il,
@@ -42949,7 +42976,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42949
42976
  PhysicsExtension: Jw,
42950
42977
  PixelationEffect: If,
42951
42978
  PlayAnimationOnClick: mu,
42952
- PlayAudioOnClick: qr,
42979
+ PlayAudioOnClick: Gr,
42953
42980
  PlayableDirector: ah,
42954
42981
  PlayerColor: oh,
42955
42982
  PointerEventData: of,
@@ -42968,7 +42995,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
42968
42995
  RotationBySpeedModule: In,
42969
42996
  RotationOverLifetimeModule: fs,
42970
42997
  SceneSwitcher: lt,
42971
- ScreenCapture: ua,
42998
+ ScreenCapture: da,
42972
42999
  ScreenSpaceAmbientOcclusion: sr,
42973
43000
  ScreenSpaceAmbientOcclusionN8: ms,
42974
43001
  SetActiveOnClick: Gw,
@@ -43007,16 +43034,16 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
43007
43034
  TextExtension: Sy,
43008
43035
  TextureSheetAnimationModule: ci,
43009
43036
  TiltShiftEffect: lo,
43010
- ToneMappingEffect: Yr,
43037
+ ToneMappingEffect: Qr,
43011
43038
  TrailModule: Xe,
43012
43039
  TransformData: ot,
43013
43040
  TransformGizmo: Bl,
43014
43041
  TriggerBuilder: Nt,
43015
- TriggerModel: Wr,
43042
+ TriggerModel: $r,
43016
43043
  UIRaycastUtils: rw,
43017
43044
  UIRootComponent: wf,
43018
43045
  USDZExporter: Vs,
43019
- USDZText: La,
43046
+ USDZText: Ia,
43020
43047
  USDZUIExtension: hx,
43021
43048
  UsageMarker: df,
43022
43049
  VariantAction: Vw,
@@ -43025,7 +43052,7 @@ const k2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
43025
43052
  VideoPlayer: xt,
43026
43053
  Vignette: jl,
43027
43054
  VisibilityAction: yf,
43028
- Voip: sa,
43055
+ Voip: na,
43029
43056
  Volume: Eh,
43030
43057
  VolumeParameter: N,
43031
43058
  VolumeProfile: Ly,
@@ -43051,11 +43078,11 @@ fe.registerCallback(me.MissingCamera, (o) => {
43051
43078
  e.name = "Default Fallback Camera", t.add(e);
43052
43079
  const i = new Ai();
43053
43080
  if (i.sourceId = ((c = (l = o.files) == null ? void 0 : l[0]) == null ? void 0 : c.src) ?? "unknown", i.fieldOfView = 35, o.context.domElement.getAttribute("transparent") != null)
43054
- i.clearFlags = $r.Uninitialized;
43081
+ i.clearFlags = Qa.Uninitialized;
43055
43082
  else if ((h = o.context.domElement.getAttribute("background-image")) != null && h.length || o.context.lightmaps.tryGetSkybox(i.sourceId))
43056
- i.clearFlags = $r.Skybox, o.context.domElement.getAttribute("background-blurriness") === null && (o.context.scene.backgroundBlurriness = 0.2);
43083
+ i.clearFlags = Qa.Skybox, o.context.domElement.getAttribute("background-blurriness") === null && (o.context.scene.backgroundBlurriness = 0.2);
43057
43084
  else {
43058
- if (i.clearFlags = $r.SolidColor, !o.context.domElement.getAttribute("background-color")) {
43085
+ if (i.clearFlags = Qa.SolidColor, !o.context.domElement.getAttribute("background-color")) {
43059
43086
  let d = "#efefef";
43060
43087
  typeof window !== void 0 && window.matchMedia("(prefers-color-scheme: dark)").matches && (d = "#1f1f1f"), t.background = new re(d);
43061
43088
  }
@@ -43064,7 +43091,7 @@ fe.registerCallback(me.MissingCamera, (o) => {
43064
43091
  t.environment = d.fromScene(u, 0.025).texture;
43065
43092
  }
43066
43093
  }
43067
- const s = Xa(e, i, !0);
43094
+ const s = qa(e, i, !0);
43068
43095
  e.position.x = 0, e.position.y = 1, e.position.z = 2;
43069
43096
  const a = o.context.domElement;
43070
43097
  return (a == null ? void 0 : a.cameraControls) != !1 && oS(o.context, s), s;
@@ -43191,7 +43218,7 @@ export {
43191
43218
  Io as AudioListener,
43192
43219
  Rn as AudioSource,
43193
43220
  rh as AudioTrackHandler,
43194
- Xr as Avatar,
43221
+ qr as Avatar,
43195
43222
  vl as AvatarBlink_Simple,
43196
43223
  uw as AvatarEyeLook_Rotation,
43197
43224
  YI as AvatarLoader,
@@ -43220,7 +43247,7 @@ export {
43220
43247
  Ai as Camera,
43221
43248
  lu as CameraTargetReachedEvent,
43222
43249
  nh as Canvas,
43223
- Qr as CanvasGroup,
43250
+ Xr as CanvasGroup,
43224
43251
  Go as CapsuleCollider,
43225
43252
  Hw as ChangeMaterialOnClick,
43226
43253
  Pl as ChangeTransformOnClick,
@@ -43228,12 +43255,12 @@ export {
43228
43255
  Qo as CharacterControllerInput,
43229
43256
  Ef as ChromaticAberration,
43230
43257
  on as CircularBuffer,
43231
- $r as ClearFlags,
43258
+ Qa as ClearFlags,
43232
43259
  Cs as ClipExtrapolation,
43233
43260
  Ui as Collider,
43234
43261
  AM as Collision,
43235
43262
  Kg as CollisionDetectionMode,
43236
- ca as ColorAdjustments,
43263
+ la as ColorAdjustments,
43237
43264
  Rh as ColorBySpeedModule,
43238
43265
  Ay as ColorOverLifetimeModule,
43239
43266
  s2 as Component,
@@ -43257,7 +43284,7 @@ export {
43257
43284
  ay as DeviceFlag,
43258
43285
  Q as DeviceUtilities,
43259
43286
  KI as DocumentExtension,
43260
- Aa as DragControls,
43287
+ Ea as DragControls,
43261
43288
  _w as DragMode,
43262
43289
  Ko as DropListener,
43263
43290
  vw as Duplicatable,
@@ -43331,7 +43358,7 @@ export {
43331
43358
  Fx as MarkerType,
43332
43359
  Sf as MaskableGraphic,
43333
43360
  $ as Mathf,
43334
- oa as MeshCollider,
43361
+ sa as MeshCollider,
43335
43362
  ff as MeshRenderer,
43336
43363
  K as MinMaxCurve,
43337
43364
  Il as MinMaxGradient,
@@ -43354,7 +43381,7 @@ export {
43354
43381
  fO as NewInstanceModel,
43355
43382
  ke as NoiseModule,
43356
43383
  an as ObjectRaycaster,
43357
- ta as ObjectUtils,
43384
+ ea as ObjectUtils,
43358
43385
  El as OffsetConstraint,
43359
43386
  tp as OneEuroFilter,
43360
43387
  X0 as OneEuroFilterXYZ,
@@ -43368,7 +43395,7 @@ export {
43368
43395
  ng as ParticleBurst,
43369
43396
  yx as ParticleSubEmitter,
43370
43397
  yu as ParticleSystem,
43371
- la as ParticleSystemBaseBehaviour,
43398
+ aa as ParticleSystemBaseBehaviour,
43372
43399
  Ln as ParticleSystemRenderer,
43373
43400
  tg as ParticleSystemShapeType,
43374
43401
  Tc as PeerHandle,
@@ -43378,7 +43405,7 @@ export {
43378
43405
  Tt as PhysicsMaterialCombine,
43379
43406
  If as PixelationEffect,
43380
43407
  mu as PlayAnimationOnClick,
43381
- qr as PlayAudioOnClick,
43408
+ Gr as PlayAudioOnClick,
43382
43409
  ah as PlayableDirector,
43383
43410
  oh as PlayerColor,
43384
43411
  Qn as PlayerState,
@@ -43407,7 +43434,7 @@ export {
43407
43434
  fu as ReflectionProbe,
43408
43435
  Rr as RegisteredAnimationInfo,
43409
43436
  zy as RemoteSkybox,
43410
- Qa as RenderTexture,
43437
+ Xa as RenderTexture,
43411
43438
  fM as RenderTextureSerializer,
43412
43439
  ln as Renderer,
43413
43440
  mk as RendererData,
@@ -43419,7 +43446,7 @@ export {
43419
43446
  fs as RotationOverLifetimeModule,
43420
43447
  Vm as SceneLightSettings,
43421
43448
  lt as SceneSwitcher,
43422
- ua as ScreenCapture,
43449
+ da as ScreenCapture,
43423
43450
  sr as ScreenSpaceAmbientOcclusion,
43424
43451
  ms as ScreenSpaceAmbientOcclusionN8,
43425
43452
  Nn as SendQueue,
@@ -43467,14 +43494,14 @@ export {
43467
43494
  ci as TextureSheetAnimationModule,
43468
43495
  lo as TiltShiftEffect,
43469
43496
  yk as Time,
43470
- Yr as ToneMappingEffect,
43497
+ Qr as ToneMappingEffect,
43471
43498
  Uf as TrackHandler,
43472
43499
  Ki as TrackType,
43473
43500
  Xe as TrailModule,
43474
43501
  ot as TransformData,
43475
43502
  Bl as TransformGizmo,
43476
43503
  Nt as TriggerBuilder,
43477
- Wr as TriggerModel,
43504
+ $r as TriggerModel,
43478
43505
  M as TypeStore,
43479
43506
  rw as UIRaycastUtils,
43480
43507
  wf as UIRootComponent,
@@ -43483,7 +43510,7 @@ export {
43483
43510
  XR as USDWriter,
43484
43511
  Vs as USDZExporter,
43485
43512
  YR as USDZExporter$1,
43486
- La as USDZText,
43513
+ Ia as USDZText,
43487
43514
  hx as USDZUIExtension,
43488
43515
  pM as UriSerializer,
43489
43516
  df as UsageMarker,
@@ -43496,7 +43523,7 @@ export {
43496
43523
  Ur as ViewDevice,
43497
43524
  jl as Vignette,
43498
43525
  yf as VisibilityAction,
43499
- sa as Voip,
43526
+ na as Voip,
43500
43527
  Eh as Volume,
43501
43528
  N as VolumeParameter,
43502
43529
  Ly as VolumeProfile,
@@ -43507,7 +43534,7 @@ export {
43507
43534
  Gf as WebARCameraBackground,
43508
43535
  Js as WebARSessionRoot,
43509
43536
  wy as WebXR,
43510
- Vr as WebXRButtonFactory,
43537
+ Wr as WebXRButtonFactory,
43511
43538
  Cu as WebXRImageTracking,
43512
43539
  hr as WebXRImageTrackingModel,
43513
43540
  dr as WebXRPlaneTracking,
@@ -43525,7 +43552,7 @@ export {
43525
43552
  x1 as addAttributeChangeCallback,
43526
43553
  sn as addComponent,
43527
43554
  p2 as addCustomExtensionPlugin,
43528
- Xa as addNewComponent,
43555
+ qa as addNewComponent,
43529
43556
  Ag as addPatch,
43530
43557
  Wg as apply,
43531
43558
  n2 as applyHMRChanges,
@@ -43534,7 +43561,7 @@ export {
43534
43561
  mO as beginListenInstantiate,
43535
43562
  mv as binaryIdentifierCasts,
43536
43563
  YL as build_scene_functions,
43537
- Ca as builtinComponentKeyName,
43564
+ Sa as builtinComponentKeyName,
43538
43565
  Kx as calculateProgress01,
43539
43566
  OL as clearMessages,
43540
43567
  c2 as colorSerializer,
@@ -43555,7 +43582,7 @@ export {
43555
43582
  Ie as disposeObjectResources,
43556
43583
  js as disposeStream,
43557
43584
  vd as editorGuidKeyName,
43558
- Va as enableSpatialConsole,
43585
+ Wa as enableSpatialConsole,
43559
43586
  h2 as euler,
43560
43587
  d2 as eventListSerializer,
43561
43588
  O2 as exportAsGLTF,
@@ -43683,7 +43710,7 @@ export {
43683
43710
  zv as removeComponent,
43684
43711
  m2 as removeCustomImportExtensionType,
43685
43712
  LL as removePatch,
43686
- Jr as resolveUrl,
43713
+ Zr as resolveUrl,
43687
43714
  b1 as sanitizeString,
43688
43715
  yI as saveImage,
43689
43716
  w2 as screenshot,