@needle-tools/engine 4.8.4-next.5c03fe1 → 4.8.4-next.68d6468

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { Vector2 as J, Vector3 as b, Vector4 as de, Quaternion as $, PlaneGeometry as Nn, WebGLRenderer as dr, PerspectiveCamera as pe, OrthographicCamera as Md, Scene as bi, Mesh as H, Texture as Te, Uniform$1 as Ui, Color as se, ShaderMaterial as jn, Box3 as yi, ShadowMaterial as ab, Euler as Tt, MeshStandardMaterial as ct, Box3Helper as qw, GridHelper as rm, Object3D as M, Material as _e, Matrix3 as lb, Matrix4 as te, Layers as lo, Ray as co, MathUtils as gs, AxesHelper as _i, MeshBasicMaterial as we, DoubleSide as vi, BufferGeometry as In, Group as no, CylinderGeometry as cb, SphereGeometry as Rd, BoxGeometry as la, SpriteMaterial as Xw, Sprite as Qw, Shape as Yw, ExtrudeGeometry as Kw, Fog as hb, DirectionalLight as Zf, PointLight as am, EdgesGeometry as Zw, LineSegments as db, LineBasicMaterial as ub, Line as Zl, BufferAttribute as ht, Raycaster as Td, Sphere as Ed, ArrayCamera as Jw, Plane as ir, SkinnedMesh as ys, InterleavedBufferAttribute as fb, Skeleton as ex, Bone as tx, Source as ix, WebGLCubeRenderTarget as nx, CubeCamera as sx, AnimationClip as so, FileLoader as lm, TextureLoader as Qr, PropertyBinding as ca, LinearSRGBColorSpace as Ss, ShaderChunk as Vt, UniformsLib as ox, DataTexture as cm, RGBAFormat as Ad, EquirectangularReflectionMapping as _s, SRGBColorSpace as Cs, Clock as rx, NeutralToneMapping as ha, AgXToneMapping as Id, ACESFilmicToneMapping as Ld, NoToneMapping as Vh, PCFSoftShadowMap$1 as ax, BasicNodeLibrary as lx, WebGLRenderTarget as Bn, DepthTexture as pb, NearestFilter as Hh, LoopRepeat as cx, LoopOnce as Jf, AnimationMixer as hm, CompressedTexture as hx, FrontSide as ho, Camera as dx, Frustum as Gg, AudioListener as ux, PositionalAudio as fx, AudioLoader as ep, EventDispatcher as dm, BackSide as Dd, MeshDepthMaterial as px, CustomBlending as mx, MaxEquation as gx, AmbientLight as yx, HemisphereLight as _x, AlwaysStencilFunc as bx, GreaterEqualStencilFunc as vx, NotEqualStencilFunc as wx, GreaterStencilFunc as xx, LessEqualStencilFunc as Sx, EqualStencilFunc as Cx, LessStencilFunc as Px, NeverStencilFunc as qg, InvertStencilOp as Ox, DecrementWrapStencilOp as kx, IncrementWrapStencilOp as Mx, DecrementStencilOp as Rx, IncrementStencilOp as Tx, ReplaceStencilOp as Ex, ZeroStencilOp as Ax, KeepStencilOp as Ix, RawShaderMaterial as mb, GLSL3 as Lx, AlwaysDepth as Dx, GreaterEqualDepth as jx, GreaterDepth as Bx, LessEqualDepth as Fx, LessDepth as zx, NotEqualDepth as Ux, EqualDepth as Nx, BatchedMesh as Xg, MeshPhysicalMaterial as tp, LinearFilter as Gh, UnsignedByteType as $x, RingGeometry as Wx, Line3 as Vx, AdditiveBlending as gb, BoxHelper as Hx, SpotLight as Gx, DirectionalLightHelper as qx, CameraHelper as Xx, LOD as Qx, Triangle as Yx, NormalBlending as Kx, ReinhardToneMapping as um, LinearToneMapping as fm, HalfFloatType as Nu, VideoTexture as Zx, CubeTexture as Jx, CompressedCubeTexture as eS, EquirectangularRefractionMapping as tS, VectorKeyframeTrack as iS, QuaternionKeyframeTrack as nS, Audio as sS, ShaderLib as qh, UniformsUtils as yb, MirroredRepeatWrapping as Qg, MeshNormalMaterial as oS, AudioContext as rS, PMREMGenerator$1 as aS } from "./three-DrqIzZTH.js";
1
+ import { Vector2 as J, Vector3 as b, Vector4 as de, Quaternion as $, PlaneGeometry as $n, WebGLRenderer as dr, PerspectiveCamera as pe, OrthographicCamera as Md, Scene as bi, Mesh as H, Texture as Te, Uniform$1 as Ui, Color as se, ShaderMaterial as jn, Box3 as yi, ShadowMaterial as ab, Euler as Tt, MeshStandardMaterial as ct, Box3Helper as qw, GridHelper as rm, Object3D as M, Material as _e, Matrix3 as lb, Matrix4 as te, Layers as lo, Ray as co, MathUtils as ys, AxesHelper as _i, MeshBasicMaterial as we, DoubleSide as vi, BufferGeometry as In, Group as no, CylinderGeometry as cb, SphereGeometry as Rd, BoxGeometry as la, SpriteMaterial as Xw, Sprite as Qw, Shape as Yw, ExtrudeGeometry as Kw, Fog as hb, DirectionalLight as Zf, PointLight as am, EdgesGeometry as Zw, LineSegments as db, LineBasicMaterial as ub, Line as Zl, BufferAttribute as ht, Raycaster as Td, Sphere as Ed, ArrayCamera as Jw, Plane as ir, SkinnedMesh as _s, InterleavedBufferAttribute as fb, Skeleton as ex, Bone as tx, Source as ix, WebGLCubeRenderTarget as nx, CubeCamera as sx, AnimationClip as so, FileLoader as lm, TextureLoader as Qr, PropertyBinding as ca, LinearSRGBColorSpace as Cs, ShaderChunk as Vt, UniformsLib as ox, DataTexture as cm, RGBAFormat as Ad, EquirectangularReflectionMapping as bs, SRGBColorSpace as Ps, Clock as rx, NeutralToneMapping as ha, AgXToneMapping as Id, ACESFilmicToneMapping as Ld, NoToneMapping as Vh, PCFSoftShadowMap$1 as ax, BasicNodeLibrary as lx, WebGLRenderTarget as Bn, DepthTexture as pb, NearestFilter as Hh, LoopRepeat as cx, LoopOnce as Jf, AnimationMixer as hm, CompressedTexture as hx, FrontSide as ho, Camera as dx, Frustum as Gg, AudioListener as ux, PositionalAudio as fx, AudioLoader as ep, EventDispatcher as dm, BackSide as Dd, MeshDepthMaterial as px, CustomBlending as mx, MaxEquation as gx, AmbientLight as yx, HemisphereLight as _x, AlwaysStencilFunc as bx, GreaterEqualStencilFunc as vx, NotEqualStencilFunc as wx, GreaterStencilFunc as xx, LessEqualStencilFunc as Sx, EqualStencilFunc as Cx, LessStencilFunc as Px, NeverStencilFunc as qg, InvertStencilOp as Ox, DecrementWrapStencilOp as kx, IncrementWrapStencilOp as Mx, DecrementStencilOp as Rx, IncrementStencilOp as Tx, ReplaceStencilOp as Ex, ZeroStencilOp as Ax, KeepStencilOp as Ix, RawShaderMaterial as mb, GLSL3 as Lx, AlwaysDepth as Dx, GreaterEqualDepth as jx, GreaterDepth as Bx, LessEqualDepth as Fx, LessDepth as zx, NotEqualDepth as Ux, EqualDepth as Nx, BatchedMesh as Xg, MeshPhysicalMaterial as tp, LinearFilter as Gh, UnsignedByteType as $x, RingGeometry as Wx, Line3 as Vx, AdditiveBlending as gb, BoxHelper as Hx, SpotLight as Gx, DirectionalLightHelper as qx, CameraHelper as Xx, LOD as Qx, Triangle as Yx, NormalBlending as Kx, ReinhardToneMapping as um, LinearToneMapping as fm, HalfFloatType as Nu, VideoTexture as Zx, CubeTexture as Jx, CompressedCubeTexture as eS, EquirectangularRefractionMapping as tS, VectorKeyframeTrack as iS, QuaternionKeyframeTrack as nS, Audio as sS, ShaderLib as qh, UniformsUtils as yb, MirroredRepeatWrapping as Qg, MeshNormalMaterial as oS, AudioContext as rS, PMREMGenerator$1 as aS } from "./three-DrqIzZTH.js";
2
2
  import { createLoaders as pm, getRaycastMesh as _b, LODsManager as Io, NEEDLE_progressive as We, addDracoAndKTX2Loaders as lS, configureLoader as cS, setKTX2TranscoderLocation as hS, setDracoDecoderLocation as dS } from "./gltf-progressive-B3JW4cAu.js";
3
- import { GroundedSkybox as da, Font as uS, TextGeometry as fS, FontLoader as pS, GLTFLoader as Ps, TransformControlsGizmo as bb, EXRLoader as Xh, RGBELoader as ip, Stats as mS, nodeFrame as gS, OrbitControls as vb, PositionalAudioHelper as yS, HorizontalBlurShader as _S, VerticalBlurShader as bS, GLTFExporter as wb, strToU8 as xb, zipSync as vS, XRControllerModelFactory as wS, XRHandMeshModel as xS, Line2 as SS, LineGeometry as CS, LineMaterial as PS, KTX2Loader as OS, TransformControls as kS, InteractiveGroup as MS, HTMLMesh as RS, VertexNormalsHelper as TS, OBJLoader as mm, FBXLoader as Sb, mergeVertices as ES } from "./three-examples-BIuXQPSf.js";
4
- import { fetchProfile as AS, MotionController as IS, $70d766613f57b014$export$2e2bcd8739ae039 as Yg, ByteBuffer as LS, v5 as Kg, md5 as Zg, SIZE_PREFIX_LENGTH as Cb, Builder as gm, createNoise4D as DS, Matrix4 as $u, BatchedParticleRenderer as jS, ParticleSystem as BS, RenderMode as as, ConstantColor as FS, Vector4 as zS, ConstantValue as US, TrailParticle as Jg, WorkerBase as NS, MeshBVH as $S } from "./vendor-B_ytQUuR.js";
3
+ import { GroundedSkybox as da, Font as uS, TextGeometry as fS, FontLoader as pS, GLTFLoader as Os, TransformControlsGizmo as bb, EXRLoader as Xh, RGBELoader as ip, Stats as mS, nodeFrame as gS, OrbitControls as vb, PositionalAudioHelper as yS, HorizontalBlurShader as _S, VerticalBlurShader as bS, GLTFExporter as wb, strToU8 as xb, zipSync as vS, XRControllerModelFactory as wS, XRHandMeshModel as xS, Line2 as SS, LineGeometry as CS, LineMaterial as PS, KTX2Loader as OS, TransformControls as kS, InteractiveGroup as MS, HTMLMesh as RS, VertexNormalsHelper as TS, OBJLoader as mm, FBXLoader as Sb, mergeVertices as ES } from "./three-examples-BIuXQPSf.js";
4
+ import { fetchProfile as AS, MotionController as IS, $70d766613f57b014$export$2e2bcd8739ae039 as Yg, ByteBuffer as LS, v5 as Kg, md5 as Zg, SIZE_PREFIX_LENGTH as Cb, Builder as gm, createNoise4D as DS, Matrix4 as $u, BatchedParticleRenderer as jS, ParticleSystem as BS, RenderMode as ls, ConstantColor as FS, Vector4 as zS, ConstantValue as US, TrailParticle as Jg, WorkerBase as NS, MeshBVH as $S } from "./vendor-B_ytQUuR.js";
5
5
  import { __webpack_exports__default as Ce, __webpack_exports__Text as Pb, __webpack_exports__Block as Ob, __webpack_exports__update as WS, SimpleStateBehavior as VS, __webpack_exports__Inline as Wu, __webpack_exports__FontLibrary as ey, ThreeMeshUI as ty } from "./three-mesh-ui-D6Mz5Yl7.js";
6
6
  import { EffectAttribute as HS } from "./postprocessing-DddlM3CK.js";
7
7
  const Vu = /* @__PURE__ */ new Map();
@@ -205,7 +205,7 @@ function Bd(s, e) {
205
205
  }
206
206
  return s;
207
207
  }
208
- function Os(s) {
208
+ function ks(s) {
209
209
  return new Promise((e, t) => {
210
210
  setTimeout(e, s);
211
211
  });
@@ -1161,7 +1161,7 @@ void main(){
1161
1161
  }
1162
1162
  }
1163
1163
  class nr {
1164
- static planeGeometry = new Nn(2, 2, 1, 1);
1164
+ static planeGeometry = new $n(2, 2, 1, 1);
1165
1165
  static renderer = new dr({ antialias: !1, alpha: !0 });
1166
1166
  static perspectiveCam = new pe();
1167
1167
  static orthographicCam = new Md();
@@ -1787,9 +1787,9 @@ po('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUIL
1787
1787
  po('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
1788
1788
  po('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.8.4";');
1789
1789
  po('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
1790
- po('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Aug 18 2025 16:33:04 GMT+0000 (Coordinated Universal Time)";');
1790
+ po('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Tue Aug 19 2025 17:08:13 GMT+0000 (Coordinated Universal Time)";');
1791
1791
  po('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
1792
- const Ln = "4.8.4", wm = "undefined", Qb = "Mon Aug 18 2025 16:33:04 GMT+0000 (Coordinated Universal Time)";
1792
+ const Ln = "4.8.4", wm = "undefined", Qb = "Tue Aug 19 2025 17:08:13 GMT+0000 (Coordinated Universal Time)";
1793
1793
  Xb && console.log(`Engine version: ${Ln} (generator: ${wm})
1794
1794
  Project built at ${Qb}`);
1795
1795
  const vl = NEEDLE_PUBLIC_KEY, ro = "needle_isActiveInHierarchy", jr = "builtin_components", Oh = "needle_editor_guid";
@@ -2687,7 +2687,7 @@ class l1 {
2687
2687
  }
2688
2688
  }
2689
2689
  }
2690
- const Yn = w("debugwebxr"), Xc = w("debugcustomgesture"), c1 = "https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles", h1 = "generic-trigger", d1 = new $().setFromEuler(new Tt(gs.degToRad(0), gs.degToRad(-90), gs.degToRad(-90))), u1 = new b(0.04, -0.04, 0);
2690
+ const Kn = w("debugwebxr"), Xc = w("debugcustomgesture"), c1 = "https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles", h1 = "generic-trigger", d1 = new $().setFromEuler(new Tt(ys.degToRad(0), ys.degToRad(-90), ys.degToRad(-90))), u1 = new b(0.04, -0.04, 0);
2691
2691
  class t0 {
2692
2692
  /** the Needle XR Session */
2693
2693
  xr;
@@ -2940,7 +2940,7 @@ class t0 {
2940
2940
  return this.getMotionController?.then((e) => e?.assetUrl || null);
2941
2941
  }
2942
2942
  constructor(e, t, i) {
2943
- this.xr = e, this.inputSource = t, this.index = i, this._object = new M(), this._object.name = `NeedleXRController_${i}`, Yn && (this._object.add(this._debugAxesHelper), this._gripSpaceObject = new M(), this._raySpaceObject = new M(), this._gripSpaceObject.name = `NeedleXRController_${i}_gripSpace`, this._raySpaceObject.name = `NeedleXRController_${i}_raySpace`, this._gripSpaceObject.add(this._debugGripAxesHelper), this._raySpaceObject.add(this._debugRayAxesHelper), this.xr.context.scene.add(this._gripSpaceObject), this.xr.context.scene.add(this._raySpaceObject)), this.xr.context.scene.add(this._object), this._ray = new co(), this.pointerInit = {
2943
+ this.xr = e, this.inputSource = t, this.index = i, this._object = new M(), this._object.name = `NeedleXRController_${i}`, Kn && (this._object.add(this._debugAxesHelper), this._gripSpaceObject = new M(), this._raySpaceObject = new M(), this._gripSpaceObject.name = `NeedleXRController_${i}_gripSpace`, this._raySpaceObject.name = `NeedleXRController_${i}_raySpace`, this._gripSpaceObject.add(this._debugGripAxesHelper), this._raySpaceObject.add(this._debugRayAxesHelper), this.xr.context.scene.add(this._gripSpaceObject), this.xr.context.scene.add(this._raySpaceObject)), this.xr.context.scene.add(this._object), this._ray = new co(), this.pointerInit = {
2944
2944
  origin: this,
2945
2945
  pointerType: this.hand ? "hand" : "controller",
2946
2946
  deviceIndex: this.index,
@@ -3018,13 +3018,13 @@ Pinch: ${this.getGesture("pinch")?.value.toFixed(3)}`), n += `
3018
3018
  const p = a.get("middle-finger-metacarpal"), g = p && this.getHandJointPose(p, e);
3019
3019
  g && (this._gripMatrix.fromArray(g.transform.matrix).premultiply(Kr), this._gripMatrix.decompose(this._gripPosition, this._gripQuaternion, G(1, 1, 1)), i = G().copy(g.transform.position), n = wn().copy(g.transform.orientation), n.multiply(d1), i.add(G(u1).applyQuaternion(n)));
3020
3020
  } else this.inputSource.gripSpace && this.targetRayMode === "transient-pointer" && i && n ? (this._object.position.copy(i), this._object.quaternion.copy(n).multiply(Fi)) : o && r && (this._object.position.copy(o), this._object.quaternion.copy(r).multiply(Fi));
3021
- Yn && (o && r && (this._raySpaceObject?.position.copy(o), this._raySpaceObject?.quaternion.copy(r).multiply(Fi)), i && n && (this._gripSpaceObject?.position.copy(i), this._gripSpaceObject?.quaternion.copy(n).multiply(Fi)));
3021
+ Kn && (o && r && (this._raySpaceObject?.position.copy(o), this._raySpaceObject?.quaternion.copy(r).multiply(Fi)), i && n && (this._gripSpaceObject?.position.copy(i), this._gripSpaceObject?.quaternion.copy(n).multiply(Fi)));
3022
3022
  const l = this.xr.context.mainCamera?.parent, c = l ? be(l) : void 0;
3023
3023
  i && n && (this._gripWorldPosition.copy(i), l && this._gripWorldPosition.applyMatrix4(l.matrixWorld), this._gripWorldQuaternion.copy(n), this._gripWorldQuaternion.multiply(Fi), c && this._gripWorldQuaternion.premultiply(c)), this.updateRayWorldPosition(), this.updateRayWorldQuaternion();
3024
3024
  }
3025
3025
  /** Called when the input source disconnects */
3026
3026
  onDisconnected() {
3027
- this._connected = !1, Yn && console.warn("Controller disconnected", this.index);
3027
+ this._connected = !1, Kn && console.warn("Controller disconnected", this.index);
3028
3028
  for (const e of this._object.children)
3029
3029
  this.xr.context.scene.attach(e);
3030
3030
  this._object?.removeFromParent(), this._debugAxesHelper?.removeFromParent(), this._debugGripAxesHelper?.removeFromParent(), this._debugRayAxesHelper?.removeFromParent(), this._gripSpaceObject?.removeFromParent(), this._raySpaceObject?.removeFromParent(), this.unsubscribeEvents(), this._hitTestSource && (this._hitTestSource.cancel(), this._hitTestSource = void 0);
@@ -3178,13 +3178,13 @@ Pinch: ${this.getGesture("pinch")?.value.toFixed(3)}`), n += `
3178
3178
  if (!this.emitPointerDownEvent || this.inputSource !== e.inputSource) return;
3179
3179
  this.onUpdateFrame(e.frame), this._hasSelectEvent = !0;
3180
3180
  const t = this._layout?.selectComponentId, i = this._layout?.components[t]?.gamepadIndices?.button;
3181
- i !== void 0 && (this._selectButtonIndex = i), !Xc && (Yn && F.DrawDirection(this.rayWorldPosition, G(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 16711680, 10), this.emitPointerEvent(De.PointerDown, this._selectButtonIndex || 0, "xr-standard-trigger", !0, e));
3181
+ i !== void 0 && (this._selectButtonIndex = i), !Xc && (Kn && F.DrawDirection(this.rayWorldPosition, G(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 16711680, 10), this.emitPointerEvent(De.PointerDown, this._selectButtonIndex || 0, "xr-standard-trigger", !0, e));
3182
3182
  };
3183
3183
  onSelectEnd = (e) => {
3184
3184
  this.emitPointerUpEvent && (Xc || this.inputSource === e.inputSource && this.emitPointerEvent(De.PointerUp, this._selectButtonIndex || 0, "xr-standard-trigger", !0, e));
3185
3185
  };
3186
3186
  onSequeezeStart = (e) => {
3187
- this.emitPointerDownEvent && this.inputSource === e.inputSource && (this._squeezeButtonIndex = this._layout?.components["xr-standard-squeeze"]?.gamepadIndices?.button, this._squeezeButtonIndex !== void 0 && (Yn && F.DrawDirection(this.rayWorldPosition, G(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 255, 10), this.emitPointerEvent(De.PointerDown, this._squeezeButtonIndex || 0, "xr-standard-squeeze", !0, e)));
3187
+ this.emitPointerDownEvent && this.inputSource === e.inputSource && (this._squeezeButtonIndex = this._layout?.components["xr-standard-squeeze"]?.gamepadIndices?.button, this._squeezeButtonIndex !== void 0 && (Kn && F.DrawDirection(this.rayWorldPosition, G(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 255, 10), this.emitPointerEvent(De.PointerDown, this._squeezeButtonIndex || 0, "xr-standard-squeeze", !0, e)));
3188
3188
  };
3189
3189
  onSequeezeEnd = (e) => {
3190
3190
  this.emitPointerUpEvent && this.inputSource === e.inputSource && this._squeezeButtonIndex !== void 0 && this.emitPointerEvent(De.PointerUp, this._squeezeButtonIndex || 0, "xr-standard-squeeze", !0, e);
@@ -3204,7 +3204,7 @@ Pinch: ${this.getGesture("pinch")?.value.toFixed(3)}`), n += `
3204
3204
  const o = e !== this._selectButtonIndex && e !== this._squeezeButtonIndex;
3205
3205
  if (n != null && o) {
3206
3206
  let r = this._layout?.gamepad[e];
3207
- this._isMxInk && e === 4 && (r = "stylus-touch"), this._isMxInk && e === 5 && (r = "stylus-tip"), (Yn || Xc) && console.log("Emitting pointer event", n, e, r, t.value, this.gamepad, this._layout), this.emitPointerEvent(n, e, r ?? "none", !1, null, t.value);
3207
+ this._isMxInk && e === 4 && (r = "stylus-touch"), this._isMxInk && e === 5 && (r = "stylus-tip"), (Kn || Xc) && console.log("Emitting pointer event", n, e, r, t.value, this.gamepad, this._layout), this.emitPointerEvent(n, e, r ?? "none", !1, null, t.value);
3208
3208
  }
3209
3209
  }
3210
3210
  if (this._isMetaQuestTouchController) {
@@ -3240,7 +3240,7 @@ Pinch: ${this.getGesture("pinch")?.value.toFixed(3)}`), n += `
3240
3240
  if (!this.emitPointerMoveEvent) return;
3241
3241
  let e = !1;
3242
3242
  if (this._lastPointerMovePosition.distanceTo(this.gripWorldPosition) > this.pointerMoveDistanceThreshold * this.xr.rigScale && (e = !0), e || this._lastPointerMoveQuaternion.angleTo(this.gripWorldQuaternion) > this.pointerMoveAngleThreshold && (e = !0), e) {
3243
- this._didMoveLastFrame = !0, this._lastPointerMovePosition.copy(this.gripWorldPosition), this._lastPointerMoveQuaternion.copy(this.gripWorldQuaternion), Yn && F.DrawLabel(this.rayWorldPosition.add(this.object.worldForward.multiplyScalar(0.1)), "move", 0.01);
3243
+ this._didMoveLastFrame = !0, this._lastPointerMovePosition.copy(this.gripWorldPosition), this._lastPointerMoveQuaternion.copy(this.gripWorldQuaternion), Kn && F.DrawLabel(this.rayWorldPosition.add(this.object.worldForward.multiplyScalar(0.1)), "move", 0.01);
3244
3244
  let i = this.xr.context.input.getFirstPressedButtonForPointer(this.index);
3245
3245
  i === void 0 && (i = 0);
3246
3246
  const n = this.gamepad?.buttons[i]?.value;
@@ -3252,13 +3252,13 @@ Pinch: ${this.getGesture("pinch")?.value.toFixed(3)}`), n += `
3252
3252
  pointerInit;
3253
3253
  emitPointerEvent(e, t, i, n, o = null, r) {
3254
3254
  if (!this.emitEvents) {
3255
- Yn && e !== De.PointerMove && console.warn("Pointer events are disabled for this controller", this.index, e, t);
3255
+ Kn && e !== De.PointerMove && console.warn("Pointer events are disabled for this controller", this.index, e, t);
3256
3256
  return;
3257
3257
  }
3258
3258
  if (this.xr.mode === "immersive-vr" || this.xr.isPassThrough) {
3259
3259
  this.pointerInit.origin = this, this.pointerInit.pointerId = this.getPointerId(t), this.pointerInit.pointerType = this.hand ? "hand" : "controller", this.pointerInit.button = t, this.pointerInit.buttonName = i, this.pointerInit.isPrimary = n, this.pointerInit.mode = this.inputSource.targetRayMode, this.pointerInit.ray = this.ray, this.pointerInit.device = this.object, this.pointerInit.pressure = r, this.pointerInit.clientX = this._rayPosition.x / this.xr.rigScale, this.pointerInit.clientY = this._rayPosition.y / this.xr.rigScale, this.pointerInit.clientZ = this._rayPosition.z / this.xr.rigScale;
3260
3260
  const a = N.Current;
3261
- N.Current = this.xr.context, Yn && e !== "pointermove" && console.warn("Pointer event", e, t, i, { ...this.pointerInit }), this.xr.context.input.createInputEvent(new Vs(e, o, this.pointerInit)), N.Current = a;
3261
+ N.Current = this.xr.context, Kn && e !== "pointermove" && console.warn("Pointer event", e, t, i, { ...this.pointerInit }), this.xr.context.input.createInputEvent(new Vs(e, o, this.pointerInit)), N.Current = a;
3262
3262
  }
3263
3263
  }
3264
3264
  }
@@ -4136,7 +4136,7 @@ class ky {
4136
4136
  depthTest: !1,
4137
4137
  fog: !1,
4138
4138
  side: vi
4139
- }), this._fadeToColorQuad = new H(new Nn(10, 10), this._fadeToColorMaterial);
4139
+ }), this._fadeToColorQuad = new H(new $n(10, 10), this._fadeToColorMaterial);
4140
4140
  }
4141
4141
  dispose() {
4142
4142
  this._fadeToColorQuad.geometry.dispose(), this._fadeToColorMaterial.dispose();
@@ -4212,7 +4212,7 @@ class Oa {
4212
4212
  case "Quad":
4213
4213
  case 0:
4214
4214
  {
4215
- const o = new Nn(1, 1, 1, 1), r = t?.material ?? new ct({ color: n });
4215
+ const o = new $n(1, 1, 1, 1), r = t?.material ?? new ct({ color: n });
4216
4216
  t?.texture && "map" in r && (r.map = t.texture), i = new H(o, r), i.name = "Quad";
4217
4217
  }
4218
4218
  break;
@@ -4316,7 +4316,7 @@ function C1(s) {
4316
4316
  let Ju = !1, ef = null;
4317
4317
  function P1(s, e) {
4318
4318
  if (ef === null) {
4319
- const t = "https://cdn.needle.tools/static/models/shaderball.glb", i = new Ps(), n = pm(null);
4319
+ const t = "https://cdn.needle.tools/static/models/shaderball.glb", i = new Os(), n = pm(null);
4320
4320
  i.setDRACOLoader(n.dracoLoader), i.setKTX2Loader(n.ktx2Loader), Ju = !0, ef = i.loadAsync(t).then((o) => {
4321
4321
  const r = o.scene;
4322
4322
  return r.position.y -= 0.5, r;
@@ -4373,7 +4373,7 @@ class ga {
4373
4373
  return this._active ? this._active.handoff() : null;
4374
4374
  }
4375
4375
  static async stop() {
4376
- this._requestInFlight = !1, this._active && (await this._active.end(), await Os(100)), this._active = null;
4376
+ this._requestInFlight = !1, this._active && (await this._active.end(), await ks(100)), this._active = null;
4377
4377
  }
4378
4378
  _session;
4379
4379
  _mode;
@@ -4410,7 +4410,7 @@ class ga {
4410
4410
  };
4411
4411
  /** can be used to prepare the user or fade to black */
4412
4412
  async onBeforeHandoff() {
4413
- await Os(1e3), this._scene.clear();
4413
+ await ks(1e3), this._scene.clear();
4414
4414
  }
4415
4415
  _objects = [];
4416
4416
  setupScene() {
@@ -4498,7 +4498,7 @@ async function k1() {
4498
4498
  return;
4499
4499
  }
4500
4500
  navigator.xr?.addEventListener("sessiongranted", async () => {
4501
- Yr(!0), console.log("Received Session Granted..."), await Os(100);
4501
+ Yr(!0), console.log("Received Session Granted..."), await ks(100);
4502
4502
  const s = sessionStorage.getItem("needle_xr_session_mode"), e = sessionStorage.getItem("needle_xr_session_init") ?? null, t = e ? JSON.parse(e) : null;
4503
4503
  let i = null;
4504
4504
  if (r0() && (await ga.start(s || "immersive-vr", t || K.getDefaultSessionInit("immersive-vr")), await T1(), i = await ga.handoff()), i)
@@ -6113,7 +6113,7 @@ function Oe(s) {
6113
6113
  }
6114
6114
  if (typeof s == "object" && (s[h0] = !0), s instanceof bi)
6115
6115
  Oe(s.environment), Oe(s.background), Oe(s.customDepthMaterial), Oe(s.customDistanceMaterial);
6116
- else if (s instanceof ys)
6116
+ else if (s instanceof _s)
6117
6117
  Oe(s.geometry), Oe(s.material), Oe(s.skeleton), Oe(s.bindMatrix), Oe(s.bindMatrixInverse), Oe(s.customDepthMaterial), Oe(s.customDistanceMaterial), s.geometry = null, s.material = null, s.visible = !1;
6118
6118
  else if (s instanceof H)
6119
6119
  Oe(s.geometry), Oe(s.material), Oe(s.customDepthMaterial), Oe(s.customDistanceMaterial), s.geometry = null, s.material = null, s.visible = !1;
@@ -6147,7 +6147,7 @@ function kr(s) {
6147
6147
  s && ((Qo || l0() || $d) && console.warn("🧨 FREE", s), s instanceof ImageBitmap ? s.close() : s instanceof ix ? s.data = null : s.dispose());
6148
6148
  }
6149
6149
  function U1(s) {
6150
- (s instanceof H || s instanceof ys) && (s.material = null, s.geometry = null);
6150
+ (s instanceof H || s instanceof _s) && (s.material = null, s.geometry = null);
6151
6151
  }
6152
6152
  const N1 = /* @__PURE__ */ new Set();
6153
6153
  function d0(s, e, t = null, i) {
@@ -6297,13 +6297,13 @@ Did you add and remove a component in the same frame?`), Me.splice(e, 1), e--;
6297
6297
  }
6298
6298
  t.context = s, Ul(t.gameObject), Em(t, s);
6299
6299
  } catch (t) {
6300
- console.error(t), cs(Me[e], s), Me.splice(e, 1), e--;
6300
+ console.error(t), hs(Me[e], s), Me.splice(e, 1), e--;
6301
6301
  }
6302
6302
  for (let e = 0; e < Me.length; e++)
6303
6303
  try {
6304
6304
  const t = Me[e];
6305
6305
  if (t.destroyed) {
6306
- cs(Me[e], s), Me.splice(e, 1), e--;
6306
+ hs(Me[e], s), Me.splice(e, 1), e--;
6307
6307
  continue;
6308
6308
  }
6309
6309
  if (t.registering)
@@ -6314,7 +6314,7 @@ Did you add and remove a component in the same frame?`), Me.splice(e, 1), e--;
6314
6314
  }
6315
6315
  t.__internalAwake !== void 0 && (t.gameObject || console.error("Calling awake for a component without a GameObject", t, t.gameObject), Ul(t.gameObject), t.activeAndEnabled && ea(t.__internalAwake.bind(t)));
6316
6316
  } catch (t) {
6317
- console.error(t), cs(Me[e], s), Me.splice(e, 1), e--;
6317
+ console.error(t), hs(Me[e], s), Me.splice(e, 1), e--;
6318
6318
  }
6319
6319
  for (let e = 0; e < Me.length; e++)
6320
6320
  try {
@@ -6322,7 +6322,7 @@ Did you add and remove a component in the same frame?`), Me.splice(e, 1), e--;
6322
6322
  if (t.destroyed || t.enabled === !1 || (Ul(t.gameObject), t.activeAndEnabled === !1)) continue;
6323
6323
  t.__internalEnable !== void 0 && (t.enabled = !0, ea(t.__internalEnable.bind(t)));
6324
6324
  } catch (t) {
6325
- console.error(t), cs(Me[e], s), Me.splice(e, 1), e--;
6325
+ console.error(t), hs(Me[e], s), Me.splice(e, 1), e--;
6326
6326
  }
6327
6327
  for (let e = 0; e < Me.length; e++)
6328
6328
  try {
@@ -6330,7 +6330,7 @@ Did you add and remove a component in the same frame?`), Me.splice(e, 1), e--;
6330
6330
  if (t.destroyed || !t.gameObject) continue;
6331
6331
  s.new_script_start.push(t);
6332
6332
  } catch (t) {
6333
- console.error(t), cs(Me[e], s), Me.splice(e, 1), e--;
6333
+ console.error(t), hs(Me[e], s), Me.splice(e, 1), e--;
6334
6334
  }
6335
6335
  Me.length = 0;
6336
6336
  for (const e of s.new_scripts_post_setup_callbacks)
@@ -6339,7 +6339,7 @@ Did you add and remove a component in the same frame?`), Me.splice(e, 1), e--;
6339
6339
  }
6340
6340
  }
6341
6341
  function H1(s) {
6342
- s && (s.__internalDisable(!0), cs(s, s.context));
6342
+ s && (s.__internalDisable(!0), hs(s, s.context));
6343
6343
  }
6344
6344
  function p0(s, e) {
6345
6345
  for (let t = 0; t < s.new_script_start.length; t++)
@@ -6349,13 +6349,13 @@ function p0(s, e) {
6349
6349
  continue;
6350
6350
  ea(i.__internalAwake.bind(i)), i.enabled && (ea(i.__internalEnable.bind(i)), ea(i.__internalStart.bind(i)), s.new_script_start.splice(t, 1), t--);
6351
6351
  } catch (i) {
6352
- console.error(i), cs(s.new_script_start[t], s), s.new_script_start.splice(t, 1), t--;
6352
+ console.error(i), hs(s.new_script_start[t], s), s.new_script_start.splice(t, 1), t--;
6353
6353
  }
6354
6354
  }
6355
6355
  function Em(s, e) {
6356
6356
  e.scripts.indexOf(s) === -1 && (e.scripts.push(s), s.earlyUpdate && e.scripts_earlyUpdate.push(s), s.update && e.scripts_update.push(s), s.lateUpdate && e.scripts_lateUpdate.push(s), s.onBeforeRender && e.scripts_onBeforeRender.push(s), s.onAfterRender && e.scripts_onAfterRender.push(s), s.onPausedChanged && e.scripts_pausedChanged.push(s), of(s, null) && e.new_scripts_xr.push(s), of(s, "immersive-vr") && e.scripts_immersive_vr.push(s), of(s, "immersive-ar") && e.scripts_immersive_ar.push(s));
6357
6357
  }
6358
- function cs(s, e) {
6358
+ function hs(s, e) {
6359
6359
  Ai(s, e.new_scripts), Ai(s, e.new_script_start), Ai(s, e.scripts), Ai(s, e.scripts_earlyUpdate), Ai(s, e.scripts_update), Ai(s, e.scripts_lateUpdate), Ai(s, e.scripts_onBeforeRender), Ai(s, e.scripts_onAfterRender), Ai(s, e.scripts_pausedChanged), Ai(s, e.new_scripts_xr), Ai(s, e.scripts_immersive_vr), Ai(s, e.scripts_immersive_ar), e.stopAllCoroutinesFrom(s);
6360
6360
  }
6361
6361
  function Ai(s, e) {
@@ -6578,7 +6578,7 @@ function eP(s) {
6578
6578
  console.warn("could not find object that was instantiated: " + e.guid);
6579
6579
  return;
6580
6580
  }
6581
- const i = new $n();
6581
+ const i = new Wn();
6582
6582
  e.position && (i.position = new b(e.position.x, e.position.y, e.position.z)), e.rotation && (i.rotation = new $(e.rotation.x, e.rotation.y, e.rotation.z, e.rotation.w)), e.scale && (i.scale = new b(e.scale.x, e.scale.y, e.scale.z)), i.parent = e.parent, e.seed && (i.idProvider = new Et(e.seed)), i.visible = e.visible, i.context = s, nd && s.alias && console.log("[Remote] instantiate in: " + s.alias);
6583
6583
  const n = va(t, i);
6584
6584
  Br.push(new WeakRef(n)), n && (e.parent === "scene" && s.scene.add(n), nd && console.log("[Remote] new instance", "gameobject:", n?.guid, t));
@@ -6592,7 +6592,7 @@ function eP(s) {
6592
6592
  });
6593
6593
  }
6594
6594
  function tP(s, e) {
6595
- const t = J1(), i = e ?? new $n();
6595
+ const t = J1(), i = e ?? new Wn();
6596
6596
  i.idProvider = new Et(t);
6597
6597
  const n = va(s, i);
6598
6598
  return { seed: t, instance: n };
@@ -7135,7 +7135,7 @@ function vP(s, e) {
7135
7135
  return t;
7136
7136
  }
7137
7137
  const C0 = Symbol("customVisibilityFlag");
7138
- function hs(s, e) {
7138
+ function ds(s, e) {
7139
7139
  s.layers[C0] = e;
7140
7140
  }
7141
7141
  const Wy = Symbol("DidPatchLayers");
@@ -7263,7 +7263,7 @@ function MP(s) {
7263
7263
  const e = s.gameObject.userData.components.indexOf(s);
7264
7264
  s.gameObject.userData.components.splice(e, 1);
7265
7265
  }
7266
- s.__internalDisable && s.__internalDisable(), cs(s, s.context ?? N.Current), s.destroy(), s.gameObject = null;
7266
+ s.__internalDisable && s.__internalDisable(), hs(s, s.context ?? N.Current), s.destroy(), s.gameObject = null;
7267
7267
  }
7268
7268
  let Hy = !1;
7269
7269
  function M0(s, e, t) {
@@ -7507,7 +7507,7 @@ class oe extends se {
7507
7507
  }
7508
7508
  }
7509
7509
  const Th = w("debuggetcomponent"), Yo = w("debuginstantiate");
7510
- class $n {
7510
+ class Wn {
7511
7511
  idProvider;
7512
7512
  parent;
7513
7513
  keepWorldPosition;
@@ -7518,7 +7518,7 @@ class $n {
7518
7518
  context;
7519
7519
  components;
7520
7520
  clone() {
7521
- const e = new $n();
7521
+ const e = new Wn();
7522
7522
  return e.idProvider = this.idProvider, e.parent = this.parent, e.keepWorldPosition = this.keepWorldPosition, e.position = this.position?.clone(), e.rotation = this.rotation?.clone(), e.scale = this.scale?.clone(), e.visible = this.visible, e.context = this.context, e.components = this.components, e;
7523
7523
  }
7524
7524
  /** Copy fields from another object, clone field references */
@@ -7632,7 +7632,7 @@ function va(s, e) {
7632
7632
  if ("isAssetReference" in s)
7633
7633
  return s.instantiate(e ?? void 0);
7634
7634
  let t = null;
7635
- e != null && (e.x !== void 0 ? (t = new $n(), t.position = e) : t = e);
7635
+ e != null && (e.x !== void 0 ? (t = new Wn(), t.position = e) : t = e);
7636
7636
  let i = N.Current;
7637
7637
  t?.context && (i = t.context), Th && i.alias && console.log("context", i.alias), t && !t.idProvider && (t.idProvider = new Et(Date.now()));
7638
7638
  const n = [], o = {}, r = {}, a = A0(i, s, t, n, o, r);
@@ -7798,7 +7798,7 @@ var wa;
7798
7798
  s.hashSha256 = o;
7799
7799
  function r(h) {
7800
7800
  const d = h.filesize / 1024 / 1024;
7801
- return vs() ? d < 50 : d < 5;
7801
+ return ws() ? d < 50 : d < 5;
7802
7802
  }
7803
7803
  s.canUpload = r;
7804
7804
  async function a(h, d) {
@@ -7812,7 +7812,7 @@ var wa;
7812
7812
  const g = p.byteLength, _ = g / 1024 / 1024;
7813
7813
  if (_ > 50)
7814
7814
  return d?.silent !== !0 && me(`File (${_.toFixed(1)}MB) is too large for uploading (see console for details)`), console.warn(`Your file is too large for uploading (${_.toFixed(1)}MB). Max allowed size is 50MB`), null;
7815
- if (!vs() && _ > 5)
7815
+ if (!ws() && _ > 5)
7816
7816
  return d?.silent !== !0 && me('File is too large for uploading. Please get a <a href="https://needle.tools/pricing" target="_blank">commercial license</a> to upload files larger than 5MB'), console.warn(`Your file is too large for uploading (${_.toFixed(1)}MB). Max size is 5MB for non-commercial users. Please get a commercial license at https://needle.tools/pricing for larger files (up to 50MB)`), null;
7817
7817
  if (g < 1)
7818
7818
  return console.warn(`Your file is too small for uploading (${_.toFixed(1)}MB). Min size is 1 byte`), null;
@@ -7853,7 +7853,7 @@ var wa;
7853
7853
  if (d?.abort?.aborted)
7854
7854
  return console.debug("Aborted upload"), null;
7855
7855
  const E = await S(y.upload);
7856
- E instanceof Error ? (O = E, await Os(1e3 * k)) : E.ok && (console.debug("File uploaded successfully"), I = !0);
7856
+ E instanceof Error ? (O = E, await ks(1e3 * k)) : E.ok && (console.debug("File uploaded successfully"), I = !0);
7857
7857
  } catch (E) {
7858
7858
  console.error(E);
7859
7859
  }
@@ -8077,7 +8077,7 @@ class ie {
8077
8077
  t(this, e);
8078
8078
  }
8079
8079
  async onInstantiate(e, t = !1, i) {
8080
- const n = N.Current, o = new $n();
8080
+ const n = N.Current, o = new Wn();
8081
8081
  if (e instanceof M ? o.parent = e : e && (Object.assign(o, e), o.cloneAssign(e)), o.parent === void 0 && (o.parent = n.scene), this.mustLoad && await this.loadAssetAsync(), Bs && console.log("Instantiate", this.url, "parent:", e), this.asset) {
8082
8082
  Bs && console.log("Add to scene", this.asset);
8083
8083
  let r = ie.currentlyInstantiating.get(this.url);
@@ -8389,7 +8389,7 @@ class $P {
8389
8389
  }
8390
8390
  resolveTexture(e, t) {
8391
8391
  const i = t;
8392
- tl && console.log("Lightmap loaded:", i), i?.isTexture && (this.registry ? (i.colorSpace = Ss, this.registry.registerTexture(this.source, e.type, i, e.index)) : console.log(Cn[e.type], e.pointer, i));
8392
+ tl && console.log("Lightmap loaded:", i), i?.isTexture && (this.registry ? (i.colorSpace = Cs, this.registry.registerTexture(this.source, e.type, i, e.index)) : console.log(Cn[e.type], e.pointer, i));
8393
8393
  }
8394
8394
  }
8395
8395
  const Mr = !!w("debuglightmaps");
@@ -8763,7 +8763,7 @@ class eO {
8763
8763
  if (i && i.Source) {
8764
8764
  tn && console.log("Setting environment reflection", i);
8765
8765
  const n = this.context.scene, o = i.Source;
8766
- o.mapping = _s, n.environment = o;
8766
+ o.mapping = bs, n.environment = o;
8767
8767
  return;
8768
8768
  } else tn && console.warn("Could not find reflection for source", e);
8769
8769
  break;
@@ -8773,13 +8773,13 @@ class eO {
8773
8773
  case 1:
8774
8774
  if (t.ambientTrilight) {
8775
8775
  const i = t.ambientTrilight, n = QP(i[0], i[1], i[2], 64, 64);
8776
- n.colorSpace = Cs, n.mapping = _s, this.context.scene.environment = n;
8776
+ n.colorSpace = Ps, n.mapping = bs, this.context.scene.environment = n;
8777
8777
  } else console.error("Missing ambient trilight", t.sourceId);
8778
8778
  return;
8779
8779
  case 3:
8780
8780
  if (t.ambientLight) {
8781
8781
  const i = Fm(t.ambientLight, 64);
8782
- i.colorSpace = Cs, i.mapping = _s, this.context.scene.environment = i;
8782
+ i.colorSpace = Ps, i.mapping = bs, this.context.scene.environment = i;
8783
8783
  } else console.error("Missing ambientlight", t.sourceId);
8784
8784
  return;
8785
8785
  default:
@@ -8810,7 +8810,7 @@ class tO {
8810
8810
  // private _ambientScale: number = 1;
8811
8811
  // private _lightProbe?: LightProbe;
8812
8812
  constructor(e, t, i = 1) {
8813
- this._source = t, t.mapping = _s;
8813
+ this._source = t, t.mapping = bs;
8814
8814
  }
8815
8815
  /* REMOVED, no LightProbe / custom shader lighting support for now
8816
8816
  getSphericalHarmonicsArray(intensityFactor: number = 1): SphericalHarmonicsData | null {
@@ -9507,7 +9507,7 @@ class rO {
9507
9507
  }
9508
9508
  if (this.menu) {
9509
9509
  const e = this.menu.children.indexOf(this._poweredByNeedleElement);
9510
- if (!this._showNeedleLogo && bs())
9510
+ if (!this._showNeedleLogo && vs())
9511
9511
  e >= 0 && (this._poweredByNeedleElement.removeFromParent(), this.markDirty());
9512
9512
  else {
9513
9513
  this._poweredByNeedleElement.visible = !0, this.menu.add(this._poweredByNeedleElement);
@@ -10174,7 +10174,7 @@ class Xd extends HTMLElement {
10174
10174
  });
10175
10175
  try {
10176
10176
  window.requestAnimationFrame(() => fO((h) => {
10177
- if (h == !0 && vs() && !e_) {
10177
+ if (h == !0 && ws() && !e_) {
10178
10178
  let d = this._userRequestedLogoVisible;
10179
10179
  d === void 0 && (d = !1), this.___onSetLogoVisible(d);
10180
10180
  } else
@@ -10198,7 +10198,7 @@ class Xd extends HTMLElement {
10198
10198
  try {
10199
10199
  l = !0, this.onChangeDetected(h);
10200
10200
  const d = this?.parentNode;
10201
- if ((this.style.display != "flex" || this.style.visibility != "visible" || this.style.opacity != "1" || d != this._domElement?.shadowRoot) && !vs()) {
10201
+ if ((this.style.display != "flex" || this.style.visibility != "visible" || this.style.opacity != "1" || d != this._domElement?.shadowRoot) && !ws()) {
10202
10202
  const f = r++;
10203
10203
  ti() && this._userRequestedMenuVisible === !1 ? (f === 0 && a(d, this._userRequestedMenuVisible), f === 1 && console.warn("Needle Menu Warning: You need a PRO license to hide the Needle Engine menu → The menu will be visible in your deployed website if you don't have a PRO license. See https://needle.tools/pricing for details.")) : f === 0 ? a(d, !0) : setTimeout(() => a(d, !0), 5);
10204
10204
  }
@@ -10224,7 +10224,7 @@ class Xd extends HTMLElement {
10224
10224
  };
10225
10225
  _userRequestedLogoVisible = void 0;
10226
10226
  showNeedleLogo(e) {
10227
- this._userRequestedLogoVisible = e, !(!e && (!vs() || e_) && (console.warn("[Needle Engine] You need a PRO license to hide the Needle Engine logo in production."), !ti())) && this.___onSetLogoVisible(e);
10227
+ this._userRequestedLogoVisible = e, !(!e && (!ws() || e_) && (console.warn("[Needle Engine] You need a PRO license to hide the Needle Engine logo in production."), !ti())) && this.___onSetLogoVisible(e);
10228
10228
  }
10229
10229
  /** @returns true if the logo is visible */
10230
10230
  get logoIsVisible() {
@@ -10760,7 +10760,7 @@ class N {
10760
10760
  const t = this.domElement?.shadowRoot?.querySelector("canvas");
10761
10761
  t && (e.canvas = t, Xe && console.log("Using canvas from shadow root", t));
10762
10762
  }
10763
- return Xe && console.log("Using Renderer Parameters:", e, this.domElement), this.renderer = new dr(e), this.renderer.debug.checkShaderErrors = L() || w("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = Vh, this.renderer.setClearColor(new se("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = ax, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = Cs, this.renderer.nodes = {
10763
+ return Xe && console.log("Using Renderer Parameters:", e, this.domElement), this.renderer = new dr(e), this.renderer.debug.checkShaderErrors = L() || w("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = Vh, this.renderer.setClearColor(new se("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = ax, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = Ps, this.renderer.nodes = {
10764
10764
  library: new lx(),
10765
10765
  modelViewMatrix: null,
10766
10766
  modelNormalViewMatrix: null
@@ -11383,7 +11383,7 @@ Target Framerate: ` + this.targetFrameRate)), this._dispatchReadyAfterFrame && (
11383
11383
  const fi = w("debuglicense"), F0 = [];
11384
11384
  let Dn = "basic";
11385
11385
  fi && console.log("License Type: " + Dn);
11386
- function bs() {
11386
+ function vs() {
11387
11387
  switch (Dn) {
11388
11388
  case "pro":
11389
11389
  case "enterprise":
@@ -11405,11 +11405,11 @@ function Um() {
11405
11405
  }
11406
11406
  return !1;
11407
11407
  }
11408
- function vs() {
11409
- return bs() || Qd() || Um();
11408
+ function ws() {
11409
+ return vs() || Qd() || Um();
11410
11410
  }
11411
11411
  function fO(s) {
11412
- if (bs() || Qd() || Um())
11412
+ if (vs() || Qd() || Um())
11413
11413
  return s(!0);
11414
11414
  F0.push(s);
11415
11415
  }
@@ -11487,7 +11487,7 @@ async function mO(s) {
11487
11487
  }
11488
11488
  async function gO(s) {
11489
11489
  try {
11490
- if (!bs() && !Qd())
11490
+ if (!vs() && !Qd())
11491
11491
  return uf(s);
11492
11492
  } catch (e) {
11493
11493
  return fi && console.log("License check failed", e), uf(s);
@@ -11497,7 +11497,7 @@ async function gO(s) {
11497
11497
  async function uf(s) {
11498
11498
  let e = !1;
11499
11499
  s.domElement.addEventListener("ready", () => e = !0), await xa?.catch(() => {
11500
- }), !(bs() || Qd()) && (vs() === !1 && yO(), e ? Tp(s) : s.domElement.addEventListener("ready", () => {
11500
+ }), !(vs() || Qd()) && (ws() === !1 && yO(), e ? Tp(s) : s.domElement.addEventListener("ready", () => {
11501
11501
  Tp(s);
11502
11502
  }));
11503
11503
  }
@@ -11761,7 +11761,7 @@ function VI(s) {
11761
11761
  for (const d of n) {
11762
11762
  const f = d, p = f.isComponent === !0, g = p ? f.activeAndEnabled : !0, _ = p ? f.context : void 0;
11763
11763
  try {
11764
- if (p && _ && cs(f, _), p && g && (f.enabled = !1), d.onBeforeHotReloadFields && d.onBeforeHotReloadFields() === !1)
11764
+ if (p && _ && hs(f, _), p && g && (f.enabled = !1), d.onBeforeHotReloadFields && d.onBeforeHotReloadFields() === !1)
11765
11765
  continue;
11766
11766
  for (const m in h)
11767
11767
  if (h[m].writable) {
@@ -12871,7 +12871,7 @@ function TO(s, e) {
12871
12871
  return {
12872
12872
  name: "Empty",
12873
12873
  isLooping: !1,
12874
- guid: e?.generateUUID() ?? gs.generateUUID(),
12874
+ guid: e?.generateUUID() ?? ys.generateUUID(),
12875
12875
  index: -1,
12876
12876
  clip: new so(s, 0, [])
12877
12877
  };
@@ -13842,7 +13842,7 @@ Kd([
13842
13842
  u()
13843
13843
  ], It.prototype, "runtimeAnimatorController", 1);
13844
13844
  const h_ = Symbol("previous-visibility");
13845
- class fs extends Bn {
13845
+ class ps extends Bn {
13846
13846
  /**
13847
13847
  * Render the scene to the texture
13848
13848
  * @param scene The scene to render
@@ -13860,15 +13860,15 @@ class fs extends Bn {
13860
13860
  }
13861
13861
  static _userSet = /* @__PURE__ */ new Set();
13862
13862
  onBeforeRender() {
13863
- fs._userSet.clear();
13864
- const e = d0(this.texture, !0, null, fs._userSet);
13863
+ ps._userSet.clear();
13864
+ const e = d0(this.texture, !0, null, ps._userSet);
13865
13865
  for (const t of e)
13866
13866
  t instanceof H && (t[h_] = t.visible, t.visible = !1);
13867
13867
  }
13868
13868
  onAfterRender() {
13869
- for (const e of fs._userSet)
13869
+ for (const e of ps._userSet)
13870
13870
  e instanceof H && (e.visible = e[h_]);
13871
- fs._userSet.clear();
13871
+ ps._userSet.clear();
13872
13872
  }
13873
13873
  }
13874
13874
  var DO = Object.defineProperty, jO = Object.getOwnPropertyDescriptor, bc = (s, e, t, i) => {
@@ -14151,17 +14151,17 @@ class H0 {
14151
14151
  return e.prep(4, 36), e.prep(4, 12), e.writeFloat32(h), e.writeFloat32(c), e.writeFloat32(l), e.prep(4, 12), e.writeFloat32(a), e.writeFloat32(r), e.writeFloat32(o), e.prep(4, 12), e.writeFloat32(n), e.writeFloat32(i), e.writeFloat32(t), e.offset();
14152
14152
  }
14153
14153
  }
14154
- class ds {
14154
+ class us {
14155
14155
  bb = null;
14156
14156
  bb_pos = 0;
14157
14157
  __init(e, t) {
14158
14158
  return this.bb_pos = e, this.bb = t, this;
14159
14159
  }
14160
14160
  static getRootAsSyncedTransformModel(e, t) {
14161
- return (t || new ds()).__init(e.readInt32(e.position()) + e.position(), e);
14161
+ return (t || new us()).__init(e.readInt32(e.position()) + e.position(), e);
14162
14162
  }
14163
14163
  static getSizePrefixedRootAsSyncedTransformModel(e, t) {
14164
- return e.setPosition(e.position() + Cb), (t || new ds()).__init(e.readInt32(e.position()) + e.position(), e);
14164
+ return e.setPosition(e.position() + Cb), (t || new us()).__init(e.readInt32(e.position()) + e.position(), e);
14165
14165
  }
14166
14166
  guid(e) {
14167
14167
  const t = this.bb.__offset(this.bb_pos, 4);
@@ -14664,15 +14664,15 @@ let ft = ii;
14664
14664
  new b();
14665
14665
  new b();
14666
14666
  const Hs = w("debugsync"), lc = "STRS";
14667
- s0(lc, ds.getRootAsSyncedTransformModel);
14667
+ s0(lc, us.getRootAsSyncedTransformModel);
14668
14668
  const _n = new gm();
14669
14669
  function G0(s, e, t = !0) {
14670
14670
  _n.clear();
14671
14671
  const i = _n.createString(s);
14672
- ds.startSyncedTransformModel(_n), ds.addGuid(_n, i), ds.addFast(_n, t);
14672
+ us.startSyncedTransformModel(_n), us.addGuid(_n, i), us.addFast(_n, t);
14673
14673
  const n = e.worldPosition, o = e.worldEuler, r = e.gameObject.scale;
14674
- ds.addTransform(_n, H0.createTransform(_n, n.x, n.y, n.z, o.x, o.y, o.z, r.x, r.y, r.z));
14675
- const a = ds.endSyncedTransformModel(_n);
14674
+ us.addTransform(_n, H0.createTransform(_n, n.x, n.y, n.z, o.x, o.y, o.z, r.x, r.y, r.z));
14675
+ const a = us.endSyncedTransformModel(_n);
14676
14676
  return _n.finish(a, lc), _n.asUint8Array();
14677
14677
  }
14678
14678
  let Ep = 0, Vl = 0;
@@ -14680,7 +14680,7 @@ vO((s) => {
14680
14680
  const t = s.connection.currentServerUrl?.includes("glitch") ? 10 : 40;
14681
14681
  Vl = Math.floor(Ep / t), Ep = 0, Hs && Vl > 0 && console.log("Sync Transform Fast Interval", Vl);
14682
14682
  });
14683
- class ks extends T {
14683
+ class Un extends T {
14684
14684
  // public autoOwnership: boolean = true;
14685
14685
  /** When true, overrides physics behavior when this object is owned by the local user */
14686
14686
  overridePhysics = !0;
@@ -14949,7 +14949,7 @@ function Ap(s, e) {
14949
14949
  return !0;
14950
14950
  }, !1) === !0;
14951
14951
  }
14952
- const Kn = new Array();
14952
+ const Zn = new Array();
14953
14953
  class Ys {
14954
14954
  /**
14955
14955
  * When the CallInfo is enabled it will be invoked when the EventList is invoked
@@ -14973,10 +14973,10 @@ class Ys {
14973
14973
  invoke(...e) {
14974
14974
  if (this.enabled !== !1) {
14975
14975
  if (typeof this.target == "function")
14976
- this.arguments ? (Kn.length = 0, e !== void 0 && e.length > 0 && Kn.push(...e), Kn.push(...this.arguments), this.target(...this.arguments), Kn.length = 0) : this.target(...e);
14976
+ this.arguments ? (Zn.length = 0, e !== void 0 && e.length > 0 && Zn.push(...e), Zn.push(...this.arguments), this.target(...this.arguments), Zn.length = 0) : this.target(...e);
14977
14977
  else if (this.methodName != null) {
14978
14978
  const t = this.target[this.methodName];
14979
- typeof t == "function" ? this.arguments ? (Kn.length = 0, e !== void 0 && e.length > 0 && Kn.push(...e), Kn.push(...this.arguments), t.call(this.target, ...Kn), Kn.length = 0) : t.call(this.target, ...e) : this.arguments ? this.target[this.methodName] = this.arguments[0] || e[0] : this.target[this.methodName] = e[0];
14979
+ typeof t == "function" ? this.arguments ? (Zn.length = 0, e !== void 0 && e.length > 0 && Zn.push(...e), Zn.push(...this.arguments), t.call(this.target, ...Zn), Zn.length = 0) : t.call(this.target, ...e) : this.arguments ? this.target[this.methodName] = this.arguments[0] || e[0] : this.target[this.methodName] = e[0];
14980
14980
  }
14981
14981
  }
14982
14982
  }
@@ -15296,16 +15296,16 @@ Te.prototype.clone = function() {
15296
15296
  };
15297
15297
  class ZO extends Yi {
15298
15298
  constructor() {
15299
- super([fs, Bn]);
15299
+ super([ps, Bn]);
15300
15300
  }
15301
15301
  onSerialize(e, t) {
15302
15302
  }
15303
15303
  onDeserialize(e, t) {
15304
- if (e instanceof Te && t.type === fs) {
15304
+ if (e instanceof Te && t.type === ps) {
15305
15305
  let i = e;
15306
15306
  cd.has(i) && (i = cd.get(i)), i.isRenderTargetTexture = !0, i.flipY = !0, i.offset.y = 1, i.repeat.y = -1, i.needsUpdate = !0, i.mipmaps = [], i instanceof hx && (i.isCompressedTexture = !1, i.format = Ad);
15307
- const n = new fs(i.image.width, i.image.height, {
15308
- colorSpace: Ss
15307
+ const n = new ps(i.image.width, i.image.height, {
15308
+ colorSpace: Cs
15309
15309
  });
15310
15310
  return n.texture = i, n;
15311
15311
  }
@@ -15352,7 +15352,7 @@ class Gi extends Sa {
15352
15352
  if (!this.targets) return null;
15353
15353
  e ??= new pr(), e.targets = this.targets, e.results = this.raycastHits, e.useAcceleratedRaycast = !0;
15354
15354
  const t = e.testObject;
15355
- this.ignoreSkinnedMeshes && (e.testObject = (n) => n instanceof ys ? "continue in children" : t ? t(n) : !0);
15355
+ this.ignoreSkinnedMeshes && (e.testObject = (n) => n instanceof _s ? "continue in children" : t ? t(n) : !0);
15356
15356
  const i = this.context.physics.raycast(e);
15357
15357
  return e.testObject = t, i;
15358
15358
  }
@@ -16044,7 +16044,7 @@ class ge extends T {
16044
16044
  this._controls.stopListenToKeyEvents();
16045
16045
  } catch {
16046
16046
  }
16047
- this._syncedTransform = x.getComponent(this.gameObject, ks) ?? void 0, this.context.pre_render_callbacks.push(this.__onPreRender), this._activePointerEvents = [], this.context.input.addEventListener("pointerdown", this._onPointerDown, { queue: di.Early }), this.context.input.addEventListener("pointerdown", this._onPointerDownLate, { queue: di.Late }), this.context.input.addEventListener("pointerup", this._onPointerUp, { queue: di.Early }), this.context.input.addEventListener("pointerup", this._onPointerUpLate, { queue: di.Late });
16047
+ this._syncedTransform = x.getComponent(this.gameObject, Un) ?? void 0, this.context.pre_render_callbacks.push(this.__onPreRender), this._activePointerEvents = [], this.context.input.addEventListener("pointerdown", this._onPointerDown, { queue: di.Early }), this.context.input.addEventListener("pointerdown", this._onPointerDownLate, { queue: di.Late }), this.context.input.addEventListener("pointerup", this._onPointerUp, { queue: di.Early }), this.context.input.addEventListener("pointerup", this._onPointerUpLate, { queue: di.Late });
16048
16048
  }
16049
16049
  /** @internal */
16050
16050
  onDisable() {
@@ -16776,7 +16776,7 @@ qt([
16776
16776
  u(oe)
16777
16777
  ], Dt.prototype, "backgroundColor", 1);
16778
16778
  qt([
16779
- u(fs)
16779
+ u(ps)
16780
16780
  ], Dt.prototype, "targetTexture", 1);
16781
16781
  let mi = Dt;
16782
16782
  class lk {
@@ -16797,7 +16797,7 @@ class lk {
16797
16797
  this._did_log_failed_to_find_skybox || (this._did_log_failed_to_find_skybox = !0, console.warn(`Camera "${this._camera.name}" has no skybox texture. ${this._camera.sourceId}`));
16798
16798
  else if (this.context.scene.background !== this._skybox) {
16799
16799
  const e = this.context.domElement.getAttribute("background-image") || this.context.domElement.getAttribute("background-color") || this.context.domElement.getAttribute("skybox-image");
16800
- qs && console.debug(`[Camera] Apply Skybox ${this._skybox?.name} ${e} - "${this._camera.name}"`), e?.length || (this._skybox.mapping = _s, this.context.scene.background = this._skybox);
16800
+ qs && console.debug(`[Camera] Apply Skybox ${this._skybox?.name} ${e} - "${this._camera.name}"`), e?.length || (this._skybox.mapping = bs, this.context.scene.background = this._skybox);
16801
16801
  }
16802
16802
  }
16803
16803
  }
@@ -17345,7 +17345,7 @@ class _k {
17345
17345
  }
17346
17346
  }
17347
17347
  const Le = w("debugnetworkingstreams");
17348
- var ps = /* @__PURE__ */ ((s) => (s.Connected = "peer-user-connected", s.StreamReceived = "receive-stream", s.StreamEnded = "call-ended", s.Disconnected = "peer-user-disconnected", s.UserJoined = "user-joined", s))(ps || {});
17348
+ var ms = /* @__PURE__ */ ((s) => (s.Connected = "peer-user-connected", s.StreamReceived = "receive-stream", s.StreamEnded = "call-ended", s.Disconnected = "peer-user-disconnected", s.UserJoined = "user-joined", s))(ms || {});
17349
17349
  class X0 {
17350
17350
  type = "call-ended";
17351
17351
  userId;
@@ -17385,7 +17385,7 @@ class xk extends dm {
17385
17385
  _stream = null;
17386
17386
  _isDisposed = !1;
17387
17387
  close() {
17388
- this._isDisposed || (this._isDisposed = !0, this.call.close(), ms(this._stream));
17388
+ this._isDisposed || (this._isDisposed = !0, this.call.close(), gs(this._stream));
17389
17389
  }
17390
17390
  get isOpen() {
17391
17391
  return this.call.peerConnection?.connectionState === "connected";
@@ -17720,7 +17720,7 @@ class Jd extends dm {
17720
17720
  }
17721
17721
  // const call = peer.call(peerId, stream);
17722
17722
  }
17723
- function ms(s) {
17723
+ function gs(s) {
17724
17724
  if (s && s instanceof MediaStream)
17725
17725
  for (const e of s.getTracks())
17726
17726
  e.stop();
@@ -17760,11 +17760,11 @@ class yr extends T {
17760
17760
  }
17761
17761
  /** @internal */
17762
17762
  onEnable() {
17763
- this._net || (this._net = Jd.create(this)), this.debug && (this._net.debug = !0), this._net.addEventListener(ps.StreamReceived, this.onReceiveStream), this._net.addEventListener(ps.StreamEnded, this.onStreamEnded), this._net.enable(), this.autoConnect && this.context.connection.isConnected && this.connect(), this.context.connection.beginListen(ee.JoinedRoom, this.onJoinedRoom), this.context.connection.beginListen(ee.LeftRoom, this.onLeftRoom), this.onEnabledChanged(), this.updateButton(), window.addEventListener("visibilitychange", this.onVisibilityChanged);
17763
+ this._net || (this._net = Jd.create(this)), this.debug && (this._net.debug = !0), this._net.addEventListener(ms.StreamReceived, this.onReceiveStream), this._net.addEventListener(ms.StreamEnded, this.onStreamEnded), this._net.enable(), this.autoConnect && this.context.connection.isConnected && this.connect(), this.context.connection.beginListen(ee.JoinedRoom, this.onJoinedRoom), this.context.connection.beginListen(ee.LeftRoom, this.onLeftRoom), this.onEnabledChanged(), this.updateButton(), window.addEventListener("visibilitychange", this.onVisibilityChanged);
17764
17764
  }
17765
17765
  /** @internal */
17766
17766
  onDisable() {
17767
- this._net && (this._net.stopSendingStream(this._outputStream), this._net.removeEventListener(ps.StreamReceived, this.onReceiveStream), this._net.removeEventListener(ps.StreamEnded, this.onStreamEnded), this._net?.disable()), this.context.connection.stopListen(ee.JoinedRoom, this.onJoinedRoom), this.context.connection.stopListen(ee.LeftRoom, this.onLeftRoom), this.onEnabledChanged(), this.updateButton(), window.removeEventListener("visibilitychange", this.onVisibilityChanged);
17767
+ this._net && (this._net.stopSendingStream(this._outputStream), this._net.removeEventListener(ms.StreamReceived, this.onReceiveStream), this._net.removeEventListener(ms.StreamEnded, this.onStreamEnded), this._net?.disable()), this.context.connection.stopListen(ee.JoinedRoom, this.onJoinedRoom), this.context.connection.stopListen(ee.LeftRoom, this.onLeftRoom), this.onEnabledChanged(), this.updateButton(), window.removeEventListener("visibilitychange", this.onVisibilityChanged);
17768
17768
  }
17769
17769
  /** @internal */
17770
17770
  onDestroy() {
@@ -17787,11 +17787,11 @@ class yr extends T {
17787
17787
  if (!await q.microphonePermissionsGranted())
17788
17788
  return console.error("Cannot connect to voice chat - microphone permissions not granted"), this.updateButton(), !1;
17789
17789
  } else return console.error("Cannot connect to voice chat - not connected to server"), this.updateButton(), !1;
17790
- return this._allowSending = !0, this._net?.stopSendingStream(this._outputStream), ms(this._outputStream), this._outputStream = await this.getAudioStream(e), this._outputStream ? (this.debug && console.log("VOIP: Got audio stream"), this._net?.startSendingStream(this._outputStream), this.updateButton(), !0) : (this.updateButton(), await q.microphonePermissionsGranted() ? console.error("VOIP: Could not get audio stream - please make sure to connect an audio device and grant microphone permissions") : Nd("Microphone permissions not granted: Please grant microphone permissions to use voice chat"), (this.debug || L()) && console.log("VOIP: Failed to get audio stream"), !1);
17790
+ return this._allowSending = !0, this._net?.stopSendingStream(this._outputStream), gs(this._outputStream), this._outputStream = await this.getAudioStream(e), this._outputStream ? (this.debug && console.log("VOIP: Got audio stream"), this._net?.startSendingStream(this._outputStream), this.updateButton(), !0) : (this.updateButton(), await q.microphonePermissionsGranted() ? console.error("VOIP: Could not get audio stream - please make sure to connect an audio device and grant microphone permissions") : Nd("Microphone permissions not granted: Please grant microphone permissions to use voice chat"), (this.debug || L()) && console.log("VOIP: Failed to get audio stream"), !1);
17791
17791
  }
17792
17792
  /** Stop sending audio (muting your own microphone) */
17793
17793
  disconnect(e) {
17794
- e?.remember && (this._allowSending = !1), this._net?.stopSendingStream(this._outputStream), ms(this._outputStream), this._outputStream = null, this.updateButton();
17794
+ e?.remember && (this._allowSending = !1), this._net?.stopSendingStream(this._outputStream), gs(this._outputStream), this._outputStream = null, this.updateButton();
17795
17795
  }
17796
17796
  /**
17797
17797
  * Mute or unmute the audio stream (this will only mute incoming streams and not mute your own microphone. Use disconnect() to mute your own microphone)
@@ -17846,12 +17846,12 @@ class yr extends T {
17846
17846
  }
17847
17847
  // we have to wait for the user to connect to a room when "auto connect" is enabled
17848
17848
  onJoinedRoom = async () => {
17849
- this.debug && console.log("VOIP: Joined room"), await Os(300), this.autoConnect && !this.isSending && this._allowSending && this.connect();
17849
+ this.debug && console.log("VOIP: Joined room"), await ks(300), this.autoConnect && !this.isSending && this._allowSending && this.connect();
17850
17850
  };
17851
17851
  onLeftRoom = () => {
17852
17852
  this.debug && console.log("VOIP: Left room"), this.disconnect();
17853
17853
  for (const e of this._incomingStreams.values())
17854
- ms(e.srcObject);
17854
+ gs(e.srcObject);
17855
17855
  this._incomingStreams.clear();
17856
17856
  };
17857
17857
  _incomingStreams = /* @__PURE__ */ new Map();
@@ -17866,7 +17866,7 @@ class yr extends T {
17866
17866
  };
17867
17867
  onStreamEnded = (e) => {
17868
17868
  const t = this._incomingStreams.get(e.userId);
17869
- ms(t?.srcObject), this._incomingStreams.delete(e.userId);
17869
+ gs(t?.srcObject), this._incomingStreams.delete(e.userId);
17870
17870
  };
17871
17871
  onEnabledChanged = () => {
17872
17872
  for (const e of this._incomingStreams) {
@@ -17984,7 +17984,7 @@ var Mk = Object.defineProperty, Rk = (s, e, t, i) => {
17984
17984
  };
17985
17985
  const zr = w("debugxrflags"), K0 = w("disablexrflags");
17986
17986
  K0 && console.warn("XRFlags are disabled");
17987
- var us = /* @__PURE__ */ ((s) => (s[s.Never = 0] = "Never", s[s.Browser = 1] = "Browser", s[s.AR = 2] = "AR", s[s.VR = 4] = "VR", s[s.FirstPerson = 8] = "FirstPerson", s[s.ThirdPerson = 16] = "ThirdPerson", s[s.All = 4294967295] = "All", s))(us || {});
17987
+ var fs = /* @__PURE__ */ ((s) => (s[s.Never = 0] = "Never", s[s.Browser = 1] = "Browser", s[s.AR = 2] = "AR", s[s.VR = 4] = "VR", s[s.FirstPerson = 8] = "FirstPerson", s[s.ThirdPerson = 16] = "ThirdPerson", s[s.All = 4294967295] = "All", s))(fs || {});
17988
17988
  class Jt {
17989
17989
  static Global = new Jt();
17990
17990
  Mask = 17;
@@ -18010,7 +18010,7 @@ class Jt {
18010
18010
  this.Mask = 0, rn.Apply();
18011
18011
  }
18012
18012
  }
18013
- const Z0 = class is extends T {
18013
+ const Z0 = class ns extends T {
18014
18014
  static registry = [];
18015
18015
  static Apply() {
18016
18016
  for (const e of this.registry) e.UpdateVisible(Jt.Global);
@@ -18019,14 +18019,14 @@ const Z0 = class is extends T {
18019
18019
  static buffer = new Jt();
18020
18020
  visibleIn;
18021
18021
  awake() {
18022
- is.registry.push(this);
18022
+ ns.registry.push(this);
18023
18023
  }
18024
18024
  onEnable() {
18025
- is.firstApply ? this.UpdateVisible(Jt.Global) : (is.firstApply = !0, is.Apply());
18025
+ ns.firstApply ? this.UpdateVisible(Jt.Global) : (ns.firstApply = !0, ns.Apply());
18026
18026
  }
18027
18027
  onDestroy() {
18028
- const e = is.registry.indexOf(this);
18029
- e >= 0 && is.registry.splice(e, 1);
18028
+ const e = ns.registry.indexOf(this);
18029
+ e >= 0 && ns.registry.splice(e, 1);
18030
18030
  }
18031
18031
  get isOn() {
18032
18032
  return this.gameObject.visible;
@@ -18036,7 +18036,7 @@ const Z0 = class is extends T {
18036
18036
  return;
18037
18037
  let t;
18038
18038
  const i = e;
18039
- if (i && typeof i == "number" && (console.assert(typeof i == "number", "XRFlag.UpdateVisible: state must be a number", i), zr && console.log(i), is.buffer.Mask = i, e = is.buffer), e instanceof Jt ? (zr && console.warn(this.name, "use passed in mask", e.Mask, this.visibleIn), t = e.Has(this.visibleIn)) : (zr && console.log(this.name, "use global mask"), Jt.Global.Has(this.visibleIn)), t !== void 0)
18039
+ if (i && typeof i == "number" && (console.assert(typeof i == "number", "XRFlag.UpdateVisible: state must be a number", i), zr && console.log(i), ns.buffer.Mask = i, e = ns.buffer), e instanceof Jt ? (zr && console.warn(this.name, "use passed in mask", e.Mask, this.visibleIn), t = e.Has(this.visibleIn)) : (zr && console.log(this.name, "use global mask"), Jt.Global.Has(this.visibleIn)), t !== void 0)
18040
18040
  if (t)
18041
18041
  zr && console.log(this.name, "is visible", this.gameObject.uuid), x.setActive(this.gameObject, !0);
18042
18042
  else {
@@ -18699,8 +18699,8 @@ const br = class Pl extends T {
18699
18699
  /** @internal */
18700
18700
  start() {
18701
18701
  sl && console.log("Create ContactShadows on " + this.gameObject.name, this), this.gameObject.add(this.shadowsRoot), this.shadowsRoot.add(this.shadowGroup), this.renderTarget = new Bn(this.textureSize, this.textureSize), this.renderTarget.texture.generateMipmaps = !1, this.renderTargetBlur = new Bn(this.textureSize, this.textureSize), this.renderTargetBlur.texture.generateMipmaps = !1;
18702
- const e = new Nn(1, 1).rotateX(Math.PI / 2);
18703
- this.gameObject instanceof H && (console.warn("ContactShadows can not be added to a Mesh. Please add it to a Group or an empty Object"), hs(this.gameObject, !1));
18702
+ const e = new $n(1, 1).rotateX(Math.PI / 2);
18703
+ this.gameObject instanceof H && (console.warn("ContactShadows can not be added to a Mesh. Please add it to a Group or an empty Object"), ds(this.gameObject, !1));
18704
18704
  const t = new we({
18705
18705
  map: this.renderTarget.texture,
18706
18706
  opacity: this.opacity,
@@ -18746,7 +18746,7 @@ const br = class Pl extends T {
18746
18746
  const t = this.context.scene, i = this.context.renderer, n = i.getRenderTarget();
18747
18747
  this.shadowGroup.visible = !0, this.occluderMesh && (this.occluderMesh.visible = !1);
18748
18748
  const o = this.plane.visible;
18749
- this.plane.visible = !1, this.gameObject instanceof H && hs(this.gameObject, !1);
18749
+ this.plane.visible = !1, this.gameObject instanceof H && ds(this.gameObject, !1);
18750
18750
  const r = t.background;
18751
18751
  t.background = null, t.overrideMaterial = this.depthMaterial, this.backfaceShadows ? this.depthMaterial.side = vi : this.depthMaterial.side = ho;
18752
18752
  const a = i.getClearAlpha();
@@ -19063,7 +19063,7 @@ const yo = class Di extends T {
19063
19063
  const i = this._targetObject || this.gameObject;
19064
19064
  if (!i) return;
19065
19065
  this._isDragging = !0;
19066
- const n = x.getComponentInChildren(i, ks);
19066
+ const n = x.getComponentInChildren(i, Un);
19067
19067
  Tn && console.log("DRAG START", n, i), n && (n.fastMode = !0, n?.requestOwnership()), this._marker = x.addComponent(i, su), this._draggingRigidbodies.length = 0;
19068
19068
  const o = x.getComponentsInChildren(i, ft);
19069
19069
  o && this._draggingRigidbodies.push(...o);
@@ -19091,7 +19091,7 @@ const yo = class Di extends T {
19091
19091
  for (const i of this._draggingRigidbodies)
19092
19092
  i.setVelocity(i.smoothedVelocity);
19093
19093
  if (this._draggingRigidbodies.length = 0, this._targetObject = null, e?.object) {
19094
- const i = x.getComponentInChildren(e.object, ks);
19094
+ const i = x.getComponentInChildren(e.object, Un);
19095
19095
  i && (i.fastMode = !1);
19096
19096
  }
19097
19097
  if (this._marker && this._marker.destroy(), !this._dragHelper) return;
@@ -19573,7 +19573,7 @@ var Wo;
19573
19573
  opacity: 0.4
19574
19574
  }));
19575
19575
  c.position.y = 0.5, l.scale.y = 0.01, l.add(c);
19576
- const h = new H(new Nn(1, 1, 1, 1), new we({
19576
+ const h = new H(new $n(1, 1, 1, 1), new we({
19577
19577
  color: 34,
19578
19578
  transparent: !0,
19579
19579
  opacity: 0.05,
@@ -20116,8 +20116,8 @@ const ou = class lv extends T {
20116
20116
  n || (n = this.object.addComponent(Hr, {
20117
20117
  dragMode: rv.SnapToSurfaces
20118
20118
  }), n.guid = t.generateUUID());
20119
- let o = x.getComponent(n.gameObject, ks);
20120
- o || (o = n.gameObject.addComponent(ks), o.guid = t.generateUUID());
20119
+ let o = x.getComponent(n.gameObject, Un);
20120
+ o || (o = n.gameObject.addComponent(Un), o.guid = t.generateUUID());
20121
20121
  }
20122
20122
  this.object.visible = !1;
20123
20123
  const e = this.gameObject.getComponent(Hr);
@@ -20160,7 +20160,7 @@ const ou = class lv extends T {
20160
20160
  if (x.isDestroyed(this.object))
20161
20161
  return this.object = null, null;
20162
20162
  this.object.visible = !0, this._startPosition && this.object.position.copy(this._startPosition), this._startQuaternion && this.object.quaternion.copy(this._startQuaternion);
20163
- const e = new $n();
20163
+ const e = new Wn();
20164
20164
  this.parent || (this.parent = this.gameObject.parent), this.parent && (e.parent = this.parent.guid ?? this.parent.userData?.guid, e.keepWorldPosition = !0), e.position = this.worldPosition, e.rotation = this.worldQuaternion, e.context = this.context, this._currentCount += 1;
20165
20165
  const t = x.instantiateSynced(this.object, e);
20166
20166
  return console.assert(t !== this.object, "Duplicated object is original"), this.object.visible = !1, this._startPosition && this.object.position.clone().copy(this._startPosition), this._startQuaternion && this.object.quaternion.clone().copy(this._startQuaternion), t;
@@ -20176,7 +20176,7 @@ eg([
20176
20176
  u()
20177
20177
  ], ou.prototype, "limitCount");
20178
20178
  let cv = ou;
20179
- var ns = /* @__PURE__ */ ((s) => (s[s.PointerEnter = 0] = "PointerEnter", s[s.PointerExit = 1] = "PointerExit", s[s.PointerDown = 2] = "PointerDown", s[s.PointerUp = 3] = "PointerUp", s[s.PointerClick = 4] = "PointerClick", s[s.Drag = 5] = "Drag", s[s.Drop = 6] = "Drop", s[s.Scroll = 7] = "Scroll", s[s.UpdateSelected = 8] = "UpdateSelected", s[s.Select = 9] = "Select", s[s.Deselect = 10] = "Deselect", s[s.Move = 11] = "Move", s[s.InitializePotentialDrag = 12] = "InitializePotentialDrag", s[s.BeginDrag = 13] = "BeginDrag", s[s.EndDrag = 14] = "EndDrag", s[s.Submit = 15] = "Submit", s[s.Cancel = 16] = "Cancel", s))(ns || {}), Zk = Object.defineProperty, tg = (s, e, t, i) => {
20179
+ var ss = /* @__PURE__ */ ((s) => (s[s.PointerEnter = 0] = "PointerEnter", s[s.PointerExit = 1] = "PointerExit", s[s.PointerDown = 2] = "PointerDown", s[s.PointerUp = 3] = "PointerUp", s[s.PointerClick = 4] = "PointerClick", s[s.Drag = 5] = "Drag", s[s.Drop = 6] = "Drop", s[s.Scroll = 7] = "Scroll", s[s.UpdateSelected = 8] = "UpdateSelected", s[s.Select = 9] = "Select", s[s.Deselect = 10] = "Deselect", s[s.Move = 11] = "Move", s[s.InitializePotentialDrag = 12] = "InitializePotentialDrag", s[s.BeginDrag = 13] = "BeginDrag", s[s.EndDrag = 14] = "EndDrag", s[s.Submit = 15] = "Submit", s[s.Cancel = 16] = "Cancel", s))(ss || {}), Zk = Object.defineProperty, tg = (s, e, t, i) => {
20180
20180
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
20181
20181
  (r = s[o]) && (n = r(e, t, n) || n);
20182
20182
  return n && Zk(e, t, n), n;
@@ -20203,27 +20203,27 @@ class ng extends T {
20203
20203
  return this.triggers?.some((t) => t.eventID === e) ?? !1;
20204
20204
  }
20205
20205
  shouldChangeCursor() {
20206
- return this.hasTrigger(ns.PointerClick) || this.hasTrigger(ns.PointerDown) || this.hasTrigger(ns.PointerUp);
20206
+ return this.hasTrigger(ss.PointerClick) || this.hasTrigger(ss.PointerDown) || this.hasTrigger(ss.PointerUp);
20207
20207
  }
20208
20208
  /** @internal */
20209
20209
  onPointerClick(e) {
20210
- this.invoke(ns.PointerClick);
20210
+ this.invoke(ss.PointerClick);
20211
20211
  }
20212
20212
  /** @internal */
20213
20213
  onPointerEnter(e) {
20214
- this.shouldChangeCursor() && this.context.input.setCursor("pointer"), this.invoke(ns.PointerEnter);
20214
+ this.shouldChangeCursor() && this.context.input.setCursor("pointer"), this.invoke(ss.PointerEnter);
20215
20215
  }
20216
20216
  /** @internal */
20217
20217
  onPointerExit(e) {
20218
- this.shouldChangeCursor() && this.context.input.unsetCursor("pointer"), this.invoke(ns.PointerExit);
20218
+ this.shouldChangeCursor() && this.context.input.unsetCursor("pointer"), this.invoke(ss.PointerExit);
20219
20219
  }
20220
20220
  /** @internal */
20221
20221
  onPointerDown(e) {
20222
- this.invoke(ns.PointerDown);
20222
+ this.invoke(ss.PointerDown);
20223
20223
  }
20224
20224
  /** @internal */
20225
20225
  onPointerUp(e) {
20226
- this.invoke(ns.PointerUp);
20226
+ this.invoke(ss.PointerUp);
20227
20227
  }
20228
20228
  }
20229
20229
  tg([
@@ -20270,7 +20270,7 @@ class eM {
20270
20270
  }
20271
20271
  typeof window < "u" && window.addEventListener("unhandledrejection", (s) => {
20272
20272
  });
20273
- const Zn = dt, lh = "$___Export_Components", tM = "NEEDLE_components";
20273
+ const Jn = dt, lh = "$___Export_Components", tM = "NEEDLE_components";
20274
20274
  class iM {
20275
20275
  [jr];
20276
20276
  }
@@ -20320,18 +20320,18 @@ class uv {
20320
20320
  return !i || i.length <= 0 ? !1 : (delete e.userData.components, e[lh] = i, !0);
20321
20321
  }
20322
20322
  afterSerializeUserData(e, t) {
20323
- if (e.type === "Scene" && Zn && console.log("DONE", JSON.stringify(t)), e[lh] === void 0) return;
20323
+ if (e.type === "Scene" && Jn && console.log("DONE", JSON.stringify(t)), e[lh] === void 0) return;
20324
20324
  const i = e[lh];
20325
20325
  delete e[lh], i !== null && (e.userData.components = i);
20326
20326
  }
20327
20327
  writeNode(e, t) {
20328
20328
  const i = this.writer.json.nodes.length;
20329
- Zn && console.log(e.name, i, e.uuid);
20329
+ Jn && console.log(e.name, i, e.uuid);
20330
20330
  const n = new nM(e, i, t);
20331
20331
  this.exportContext[i] = n, this.objectToNodeMap[e.uuid] = i;
20332
20332
  }
20333
20333
  afterParse(e) {
20334
- Zn && console.log("AFTER", e);
20334
+ Jn && console.log("AFTER", e);
20335
20335
  for (const t in this.exportContext) {
20336
20336
  const i = this.exportContext[t], n = i.node, o = i.nodeDef, r = i.nodeIndex, a = n.userData?.components;
20337
20337
  if (!a || a.length <= 0) continue;
@@ -20343,14 +20343,14 @@ class uv {
20343
20343
  const d = Fn().writeBuiltinComponentData(h, this.context);
20344
20344
  d !== null && c.push(d);
20345
20345
  }
20346
- c.length > 0 && (l[jr] = c, Zn && console.log("DID WRITE", n, "nodeIndex", r, c));
20346
+ c.length > 0 && (l[jr] = c, Jn && console.log("DID WRITE", n, "nodeIndex", r, c));
20347
20347
  }
20348
20348
  }
20349
20349
  // -------------------------------------
20350
20350
  // LOADING
20351
20351
  // called by GLTFLoader
20352
20352
  beforeRoot() {
20353
- return Zn && console.log("BEGIN LOAD"), this.nodeToObjectMap = {}, null;
20353
+ return Jn && console.log("BEGIN LOAD"), this.nodeToObjectMap = {}, null;
20354
20354
  }
20355
20355
  // called by GLTFLoader
20356
20356
  async afterRoot(e) {
@@ -20358,7 +20358,7 @@ class uv {
20358
20358
  const t = e.parser, i = t?.extensions;
20359
20359
  if (!i) return;
20360
20360
  const n = i[this.name];
20361
- Zn && console.log("After root", e, this.parser, i);
20361
+ Jn && console.log("After root", e, this.parser, i);
20362
20362
  const o = [];
20363
20363
  if (n === !0) {
20364
20364
  const r = t.json.nodes;
@@ -20372,7 +20372,7 @@ class uv {
20372
20372
  if (!h) continue;
20373
20373
  const d = h[this.name];
20374
20374
  if (!d) continue;
20375
- Zn && console.log("NODE", l);
20375
+ Jn && console.log("NODE", l);
20376
20376
  const f = this.nodeToObjectMap[c];
20377
20377
  if (!f) {
20378
20378
  console.error("Could not find object for node index: " + c, l, t);
@@ -20396,10 +20396,10 @@ class uv {
20396
20396
  const i = t[jr];
20397
20397
  if (i) {
20398
20398
  const n = new Array();
20399
- Zn && console.log(e.name, i);
20399
+ Jn && console.log(e.name, i);
20400
20400
  for (const o in i) {
20401
20401
  const r = i[o];
20402
- Zn && console.log("Serialized data", JSON.parse(JSON.stringify(r))), r && this.parser && n.push(
20402
+ Jn && console.log("Serialized data", JSON.parse(JSON.stringify(r))), r && this.parser && n.push(
20403
20403
  Im(this.parser, r).catch((a) => console.error(`Error while resolving references (see console for details)
20404
20404
  `, a, e, r))
20405
20405
  ), e.userData = e.userData || {}, e.userData[jr] = e.userData[jr] || [], e.userData[jr].push(r);
@@ -20864,7 +20864,7 @@ class dM {
20864
20864
  const I = S.substring(10), O = Number.parseInt(I);
20865
20865
  if (O >= 0) {
20866
20866
  const k = await this.parser.getDependency("texture", O);
20867
- k instanceof Te && (k.colorSpace = Ss, k.needsUpdate = !0), d[y] = { value: k };
20867
+ k instanceof Te && (k.colorSpace = Cs, k.needsUpdate = !0), d[y] = { value: k };
20868
20868
  continue;
20869
20869
  }
20870
20870
  }
@@ -20981,7 +20981,7 @@ function iL(s) {
20981
20981
  e >= 0 && sr.splice(e, 1);
20982
20982
  }
20983
20983
  function mv(s) {
20984
- if (s instanceof Ps) {
20984
+ if (s instanceof Os) {
20985
20985
  const e = new uv();
20986
20986
  return s.register((t) => (e.parser = t, e)), e;
20987
20987
  }
@@ -21043,14 +21043,14 @@ var gM = Object.defineProperty, _v = (s, e, t, i) => {
21043
21043
  (r = s[o]) && (n = r(e, t, n) || n);
21044
21044
  return n && gM(e, t, n), n;
21045
21045
  };
21046
- const ol = w("debugreflectionprobe"), v_ = w("noreflectionprobe"), Cf = Symbol("reflectionProbeKey"), w_ = Symbol("original material"), sg = class ss extends T {
21046
+ const ol = w("debugreflectionprobe"), v_ = w("noreflectionprobe"), Cf = Symbol("reflectionProbeKey"), w_ = Symbol("original material"), sg = class os extends T {
21047
21047
  static _probes = /* @__PURE__ */ new Map();
21048
21048
  static isUsingReflectionProbe(e) {
21049
21049
  return !!(e[Cf] || e[w_]?.[Cf]);
21050
21050
  }
21051
21051
  static get(e, t, i, n) {
21052
21052
  if (!e || e.isObject3D !== !0 || v_) return null;
21053
- const o = ss._probes.get(t);
21053
+ const o = os._probes.get(t);
21054
21054
  if (o) {
21055
21055
  for (const r of o)
21056
21056
  if (r.__didAwake || r.__internalAwake(), r.activeAndEnabled) {
@@ -21070,7 +21070,7 @@ const ol = w("debugreflectionprobe"), v_ = w("noreflectionprobe"), Cf = Symbol("
21070
21070
  console.error("ReflectionProbe.texture must be a Texture", e);
21071
21071
  return;
21072
21072
  }
21073
- this._texture = e, e && (e.mapping = _s, e.colorSpace = Ss, e.needsUpdate = !0);
21073
+ this._texture = e, e && (e.mapping = bs, e.colorSpace = Cs, e.needsUpdate = !0);
21074
21074
  }
21075
21075
  get texture() {
21076
21076
  return this._texture;
@@ -21082,16 +21082,16 @@ const ol = w("debugreflectionprobe"), v_ = w("noreflectionprobe"), Cf = Symbol("
21082
21082
  return this._boxHelper?.isInBox(e);
21083
21083
  }
21084
21084
  constructor() {
21085
- super(), ss._probes.has(this.context) || ss._probes.set(this.context, []), ss._probes.get(this.context)?.push(this);
21085
+ super(), os._probes.has(this.context) || os._probes.set(this.context, []), os._probes.get(this.context)?.push(this);
21086
21086
  }
21087
21087
  awake() {
21088
- this._boxHelper = this.gameObject.addComponent(Ct), this._boxHelper.updateBox(!0), ol && this._boxHelper.showHelper(5592320, !0), this._texture && (this._texture.mapping = _s, this._texture.colorSpace = Ss, this._texture.needsUpdate = !0);
21088
+ this._boxHelper = this.gameObject.addComponent(Ct), this._boxHelper.updateBox(!0), ol && this._boxHelper.showHelper(5592320, !0), this._texture && (this._texture.mapping = bs, this._texture.colorSpace = Cs, this._texture.needsUpdate = !0);
21089
21089
  }
21090
21090
  start() {
21091
21091
  !this._texture && L() && (console.warn(`[ReflectionProbe] Missing texture. Please assign a custom cubemap texture. To use reflection probes assign them to your renderer's "anchor" property.`), me("ReflectionProbe configuration hint: See browser console for details"));
21092
21092
  }
21093
21093
  onDestroy() {
21094
- const e = ss._probes.get(this.context);
21094
+ const e = os._probes.get(this.context);
21095
21095
  if (e) {
21096
21096
  const t = e.indexOf(this);
21097
21097
  t >= 0 && e.splice(t, 1);
@@ -21103,8 +21103,8 @@ const ol = w("debugreflectionprobe"), v_ = w("noreflectionprobe"), Cf = Symbol("
21103
21103
  static _rendererMaterialsCache = /* @__PURE__ */ new Map();
21104
21104
  onSet(e) {
21105
21105
  if (v_ || !this.enabled || e.sharedMaterials?.length <= 0 || !this.texture) return;
21106
- let t = ss._rendererMaterialsCache.get(e);
21107
- t || (t = [], ss._rendererMaterialsCache.set(e, t));
21106
+ let t = os._rendererMaterialsCache.get(e);
21107
+ t || (t = [], os._rendererMaterialsCache.set(e, t));
21108
21108
  for (let i = 0; i < e.sharedMaterials.length; i++) {
21109
21109
  const n = e.sharedMaterials[i];
21110
21110
  if (!n || n.envMap === void 0 || n instanceof we)
@@ -21131,7 +21131,7 @@ const ol = w("debugreflectionprobe"), v_ = w("noreflectionprobe"), Cf = Symbol("
21131
21131
  }
21132
21132
  }
21133
21133
  onUnset(e) {
21134
- const t = ss._rendererMaterialsCache.get(e);
21134
+ const t = os._rendererMaterialsCache.get(e);
21135
21135
  if (t)
21136
21136
  for (let i = 0; i < t.length; i++) {
21137
21137
  const n = t[i];
@@ -21721,7 +21721,7 @@ class wM {
21721
21721
  return i ? i.material : null;
21722
21722
  }
21723
21723
  }
21724
- const Wn = class Bh extends T {
21724
+ const Vn = class Bh extends T {
21725
21725
  /** Enable or disable instancing for an object. This will create a Renderer component if it does not exist yet.
21726
21726
  * @returns the Renderer component that was created or already existed on the object
21727
21727
  */
@@ -21740,7 +21740,7 @@ const Wn = class Bh extends T {
21740
21740
  *
21741
21741
  * If you want to activate or deactivate a complete object you can use obj.visible as usual (it acts the same as setActive in Unity) */
21742
21742
  static setVisible(e, t) {
21743
- hs(e, t);
21743
+ ds(e, t);
21744
21744
  }
21745
21745
  receiveShadows = !1;
21746
21746
  shadowCastingMode = 0;
@@ -21981,7 +21981,7 @@ const Wn = class Bh extends T {
21981
21981
  if (this._handles && this._handles.length <= 0 && x.markAsInstancedRendered(this.gameObject, !1), this._isInstancingEnabled && this._handles)
21982
21982
  for (let e = 0; e < this._handles.length; e++) {
21983
21983
  const t = this._handles[e];
21984
- hs(t.object, !1);
21984
+ ds(t.object, !1);
21985
21985
  }
21986
21986
  this.reflectionProbeUsage !== 0 && this._reflectionProbe && this._reflectionProbe.onSet(this);
21987
21987
  for (const e of this._sharedMaterials)
@@ -22001,7 +22001,7 @@ const Wn = class Bh extends T {
22001
22001
  if (this._isInstancingEnabled && this._handles)
22002
22002
  for (let e = 0; e < this._handles.length; e++) {
22003
22003
  const t = this._handles[e];
22004
- hs(t.object, !0);
22004
+ ds(t.object, !0);
22005
22005
  }
22006
22006
  this.reflectionProbeUsage !== 0 && this._reflectionProbe && this._reflectionProbe.onUnset(this), this.static && this.gameObject.matrixAutoUpdate && (this.gameObject.matrixAutoUpdate = !1);
22007
22007
  }
@@ -22025,10 +22025,10 @@ const Wn = class Bh extends T {
22025
22025
  }
22026
22026
  setVisibility(e) {
22027
22027
  if (!this.isMultiMaterialObject(this.gameObject))
22028
- hs(this.gameObject, e);
22028
+ ds(this.gameObject, e);
22029
22029
  else
22030
22030
  for (const t of this.gameObject.children)
22031
- this.isMeshOrSkinnedMesh(t) && hs(t, e);
22031
+ this.isMeshOrSkinnedMesh(t) && ds(t, e);
22032
22032
  }
22033
22033
  isMultiMaterialObject(e) {
22034
22034
  return e.type === "Group";
@@ -22039,32 +22039,32 @@ const Wn = class Bh extends T {
22039
22039
  };
22040
22040
  Es([
22041
22041
  u()
22042
- ], Wn.prototype, "receiveShadows");
22042
+ ], Vn.prototype, "receiveShadows");
22043
22043
  Es([
22044
22044
  u()
22045
- ], Wn.prototype, "shadowCastingMode");
22045
+ ], Vn.prototype, "shadowCastingMode");
22046
22046
  Es([
22047
22047
  u()
22048
- ], Wn.prototype, "lightmapIndex");
22048
+ ], Vn.prototype, "lightmapIndex");
22049
22049
  Es([
22050
22050
  u(de)
22051
- ], Wn.prototype, "lightmapScaleOffset");
22051
+ ], Vn.prototype, "lightmapScaleOffset");
22052
22052
  Es([
22053
22053
  u()
22054
- ], Wn.prototype, "enableInstancing");
22054
+ ], Vn.prototype, "enableInstancing");
22055
22055
  Es([
22056
22056
  u()
22057
- ], Wn.prototype, "renderOrder");
22057
+ ], Vn.prototype, "renderOrder");
22058
22058
  Es([
22059
22059
  u()
22060
- ], Wn.prototype, "allowOcclusionWhenDynamic");
22060
+ ], Vn.prototype, "allowOcclusionWhenDynamic");
22061
22061
  Es([
22062
22062
  u(M)
22063
- ], Wn.prototype, "probeAnchor");
22063
+ ], Vn.prototype, "probeAnchor");
22064
22064
  Es([
22065
22065
  u()
22066
- ], Wn.prototype, "reflectionProbeUsage");
22067
- let qi = Wn;
22066
+ ], Vn.prototype, "reflectionProbeUsage");
22067
+ let qi = Vn;
22068
22068
  class ru extends qi {
22069
22069
  }
22070
22070
  class bv extends ru {
@@ -22078,7 +22078,7 @@ class bv extends ru {
22078
22078
  onAfterRender() {
22079
22079
  if (super.onAfterRender(), this._needUpdateBoundingSphere) {
22080
22080
  for (const e of this.sharedMeshes)
22081
- if (e instanceof ys) {
22081
+ if (e instanceof _s) {
22082
22082
  this._needUpdateBoundingSphere = !1;
22083
22083
  try {
22084
22084
  const t = e.geometry, i = _b(e);
@@ -22090,7 +22090,7 @@ class bv extends ru {
22090
22090
  }
22091
22091
  if (S_) {
22092
22092
  for (const e of this.sharedMeshes)
22093
- if (e instanceof ys && e.boundingSphere) {
22093
+ if (e instanceof _s && e.boundingSphere) {
22094
22094
  const t = G(e.boundingSphere.center).applyMatrix4(e.matrixWorld);
22095
22095
  F.DrawWireSphere(t, e.boundingSphere.radius, "red");
22096
22096
  }
@@ -22709,11 +22709,11 @@ class st {
22709
22709
  needsOrient = !1;
22710
22710
  needsScale = !1;
22711
22711
  static createEmptyParent(e) {
22712
- const t = new st(gs.generateUUID(), e.name + "_empty_" + st.USDObject_export_id++, e.transform), i = e.parent;
22712
+ const t = new st(ys.generateUUID(), e.name + "_empty_" + st.USDObject_export_id++, e.transform), i = e.parent;
22713
22713
  return i && i.add(t), t.add(e), t.isDynamic = !0, e.transform = null, t;
22714
22714
  }
22715
22715
  static createEmpty() {
22716
- const e = new st(gs.generateUUID(), "Empty_" + st.USDObject_export_id++);
22716
+ const e = new st(ys.generateUUID(), "Empty_" + st.USDObject_export_id++);
22717
22717
  return e.isDynamic = !0, e;
22718
22718
  }
22719
22719
  constructor(e, t, i = null, n = null, o = null, r = null, a = null, l = null) {
@@ -22730,7 +22730,7 @@ class st {
22730
22730
  return !this.geometry;
22731
22731
  }
22732
22732
  clone() {
22733
- const e = new st(gs.generateUUID(), this.name, this.transform, this.geometry, this.material);
22733
+ const e = new st(ys.generateUUID(), this.name, this.transform, this.geometry, this.material);
22734
22734
  return e.isDynamic = this.isDynamic, e;
22735
22735
  }
22736
22736
  deepClone() {
@@ -22918,7 +22918,7 @@ let jM = class {
22918
22918
  le.report("export-usdz", "Invoking onBeforeBuildDocument"), await Fh(i, "onBeforeBuildDocument"), le.report("export-usdz", "Done onBeforeBuildDocument"), le.report("export-usdz", "Reparent bones to common ancestor");
22919
22919
  const l = [], c = /* @__PURE__ */ new Set();
22920
22920
  e?.traverse((y) => {
22921
- if (!(!t.exportInvisible && !y.visible) && y instanceof ys) {
22921
+ if (!(!t.exportInvisible && !y.visible) && y instanceof _s) {
22922
22922
  const S = y.skeleton.bones, I = Cv(S);
22923
22923
  if (I) {
22924
22924
  const O = { object: y, originalParent: y.parent, newParent: I };
@@ -22996,9 +22996,9 @@ function kv(s, e, t, i) {
22996
22996
  if (!t.exportInvisible && !s.visible) return;
22997
22997
  let n, o, r;
22998
22998
  const a = { position: s.position, quaternion: s.quaternion, scale: s.scale };
22999
- if (s.position.x === 0 && s.position.y === 0 && s.position.z === 0 && (a.position = null), s.quaternion.x === 0 && s.quaternion.y === 0 && s.quaternion.z === 0 && s.quaternion.w === 1 && (a.quaternion = null), s.scale.x === 1 && s.scale.y === 1 && s.scale.z === 1 && (a.scale = null), (s instanceof H || s instanceof ys) && (o = s.geometry, r = s.material), i && !i(s) && (o = void 0, r = void 0), (s instanceof H || s instanceof ys) && r && typeof r == "object" && (r instanceof ct || r instanceof we || // material instanceof MeshPhysicalNodeMaterial ||
22999
+ if (s.position.x === 0 && s.position.y === 0 && s.position.z === 0 && (a.position = null), s.quaternion.x === 0 && s.quaternion.y === 0 && s.quaternion.z === 0 && s.quaternion.w === 1 && (a.quaternion = null), s.scale.x === 1 && s.scale.y === 1 && s.scale.z === 1 && (a.scale = null), (s instanceof H || s instanceof _s) && (o = s.geometry, r = s.material), i && !i(s) && (o = void 0, r = void 0), (s instanceof H || s instanceof _s) && r && typeof r == "object" && (r instanceof ct || r instanceof we || // material instanceof MeshPhysicalNodeMaterial ||
23000
23000
  r.isMeshPhysicalNodeMaterial || r instanceof _e && r.type === "MeshLineMaterial")) {
23001
- const l = fh(s), c = s instanceof ys ? s : null;
23001
+ const l = fh(s), c = s instanceof _s ? s : null;
23002
23002
  n = new st(s.uuid, l, a, o, r, void 0, c, s.animations);
23003
23003
  } else if (s instanceof pe || s instanceof Md) {
23004
23004
  const l = fh(s);
@@ -23120,7 +23120,7 @@ async function Fh(s, e, t = null) {
23120
23120
  }
23121
23121
  let dh = null, Ft = null, Of, Ar, uh;
23122
23122
  async function FM(s, e = 1 / 0, t = null, i = void 0) {
23123
- Of || (Of = new Nn(2, 2, 1, 1)), Ar || (Ar = new jn({
23123
+ Of || (Of = new $n(2, 2, 1, 1)), Ar || (Ar = new jn({
23124
23124
  uniforms: {
23125
23125
  blitTexture: new Ui(s),
23126
23126
  flipY: new Ui(!1),
@@ -23153,7 +23153,7 @@ async function FM(s, e = 1 / 0, t = null, i = void 0) {
23153
23153
  }`
23154
23154
  }));
23155
23155
  const n = Ar.uniforms;
23156
- n.blitTexture.value = s, n.flipY.value = !1, n.scale.value = new de(1, 1, 1, 1), i !== void 0 && n.scale.value.copy(i), Ar.defines.IS_SRGB = s.colorSpace == Cs, Ar.needsUpdate = !0, uh || (uh = new H(Of, Ar), uh.frustumCulled = !1);
23156
+ n.blitTexture.value = s, n.flipY.value = !1, n.scale.value = new de(1, 1, 1, 1), i !== void 0 && n.scale.value.copy(i), Ar.defines.IS_SRGB = s.colorSpace == Ps, Ar.needsUpdate = !0, uh || (uh = new H(Of, Ar), uh.frustumCulled = !1);
23157
23157
  const o = new pe(), r = new bi();
23158
23158
  r.add(uh), t || (t = dh = new dr({ antialias: !1, alpha: !0, premultipliedAlpha: !1, preserveDrawingBuffer: !0 }));
23159
23159
  const a = Math.min(s.image.width, e), l = Math.min(s.image.height, e);
@@ -25256,7 +25256,7 @@ class tr {
25256
25256
  e.innerText = "View in AR", e.prepend(Rt("view_in_ar"));
25257
25257
  let i = !1, n = null;
25258
25258
  return e.addEventListener("click", () => {
25259
- n = qd(ws), n || (i = !0, n = new ws()), i && (n.objectToExport = N.Current.scene), n ? (e.classList.add("this-mode-is-requested"), n.exportAndOpen().then(() => {
25259
+ n = qd(xs), n || (i = !0, n = new xs()), i && (n.objectToExport = N.Current.scene), n ? (e.classList.add("this-mode-is-requested"), n.exportAndOpen().then(() => {
25260
25260
  e.classList.remove("this-mode-is-requested");
25261
25261
  }).catch((o) => {
25262
25262
  e.classList.remove("this-mode-is-requested"), console.error(o);
@@ -25360,7 +25360,7 @@ class nR {
25360
25360
  y;
25361
25361
  }
25362
25362
  function jv(s) {
25363
- s && (s.colorSpace != Cs && (s.colorSpace = Cs, s.needsUpdate = !0), s.minFilter == Hh && s.magFilter == Hh && (s.anisotropy = 1, s.needsUpdate = !0));
25363
+ s && (s.colorSpace != Ps && (s.colorSpace = Ps, s.needsUpdate = !0), s.minFilter == Hh && s.magFilter == Hh && (s.anisotropy = 1, s.needsUpdate = !0));
25364
25364
  }
25365
25365
  let bo = class {
25366
25366
  constructor(e) {
@@ -26321,7 +26321,7 @@ const $p = class xt extends T {
26321
26321
  }
26322
26322
  /** @internal */
26323
26323
  async start() {
26324
- $t && console.log("PLAYERSTATE.START, owner: " + this.owner, this.context.connection.usersInRoom([])), this.owner ? (this.context.connection.isInRoom || await Os(300), this.context.connection.userIsInRoom(this.owner) == !1 && ($t && console.log(`PlayerSync.start → doDestroy "${this.name}" because user "${this.owner}" is not in room anymore...`, "Currently in room:", ...this.context.connection.usersInRoom()), this.doDestroy())) : this.owner || ($t && console.warn("PlayerState.start → owner is undefined!", this.name), setTimeout(() => {
26324
+ $t && console.log("PLAYERSTATE.START, owner: " + this.owner, this.context.connection.usersInRoom([])), this.owner ? (this.context.connection.isInRoom || await ks(300), this.context.connection.userIsInRoom(this.owner) == !1 && ($t && console.log(`PlayerSync.start → doDestroy "${this.name}" because user "${this.owner}" is not in room anymore...`, "Currently in room:", ...this.context.connection.usersInRoom()), this.doDestroy())) : this.owner || ($t && console.warn("PlayerState.start → owner is undefined!", this.name), setTimeout(() => {
26325
26325
  !this.destroyed && !this.owner ? this.dontDestroy ? $t && console.warn("PlayerState.start → owner is still undefined but dontDestroy is set to true", this.name) : ($t && console.warn(`PlayerState.start → owner is still undefined: destroying "${this.name}" instance now`), this.doDestroy()) : $t && console.log("PlayerState.start → owner is assigned", this.owner);
26326
26326
  }, 2e3));
26327
26327
  }
@@ -26449,7 +26449,7 @@ class ar extends T {
26449
26449
  if (i) {
26450
26450
  const n = e.model && e.model.visible && e.model !== t;
26451
26451
  i.forEach((o) => {
26452
- hs(o, !n);
26452
+ ds(o, !n);
26453
26453
  });
26454
26454
  }
26455
26455
  }
@@ -26504,7 +26504,7 @@ class ar extends T {
26504
26504
  e?.isMesh && this._leftHandMeshes.push(e);
26505
26505
  }), this._rightHandMeshes = [], this.rightHand.asset?.traverse((e) => {
26506
26506
  e?.isMesh && this._rightHandMeshes.push(e);
26507
- }), En.isLocalPlayer(this.gameObject) && (this._syncTransforms = x.getComponentsInChildren(this.gameObject, ks));
26507
+ }), En.isLocalPlayer(this.gameObject) && (this._syncTransforms = x.getComponentsInChildren(this.gameObject, Un));
26508
26508
  }
26509
26509
  async loadAvatarObjects(e, t, i) {
26510
26510
  const n = e.loadAssetAsync(), o = t.loadAssetAsync(), r = i.loadAssetAsync(), a = new Array();
@@ -26527,7 +26527,7 @@ var pR = Object.defineProperty, fu = (s, e, t, i) => {
26527
26527
  (r = s[o]) && (n = r(e, t, n) || n);
26528
26528
  return n && pR(e, t, n), n;
26529
26529
  };
26530
- const Jn = w("debugwebxr"), Us = new Array();
26530
+ const es = w("debugwebxr"), Us = new Array();
26531
26531
  class fo extends T {
26532
26532
  createControllerModel = !0;
26533
26533
  createHandModel = !0;
@@ -26541,7 +26541,7 @@ class fo extends T {
26541
26541
  async onXRControllerAdded(e) {
26542
26542
  if (!(e.xr.isVR || e.xr.isPassThrough)) return;
26543
26543
  const { controller: i } = e;
26544
- if (Jn && console.warn("Add Controller Model for", i.side, i.index), this.createControllerModel || this.createHandModel) {
26544
+ if (es && console.warn("Add Controller Model for", i.side, i.index), this.createControllerModel || this.createHandModel) {
26545
26545
  if (i.hand) {
26546
26546
  if (this.createHandModel) {
26547
26547
  const n = await this.loadHandModel(this, i);
@@ -26578,7 +26578,7 @@ class fo extends T {
26578
26578
  this._models.length = 0;
26579
26579
  }
26580
26580
  onBeforeRender() {
26581
- if (K.active && (Jn && (Us[0] = Date.now()), this.updateRendering(K.active), Jn)) {
26581
+ if (K.active && (es && (Us[0] = Date.now()), this.updateRendering(K.active), es)) {
26582
26582
  const e = Date.now() - Us[0];
26583
26583
  Us.push(e), Us.length >= 30 && (Us[0] = 0, Us.reduce((t, i) => t + i, 0) / Us.length, Us.length = 0);
26584
26584
  }
@@ -26589,7 +26589,7 @@ class fo extends T {
26589
26589
  if (!i) continue;
26590
26590
  const n = i.controller;
26591
26591
  if (!n.connected) {
26592
- Jn && console.warn("XRControllerModel.onUpdateXR: controller is not connected anymore", n.side, n.hand);
26592
+ es && console.warn("XRControllerModel.onUpdateXR: controller is not connected anymore", n.side, n.hand);
26593
26593
  continue;
26594
26594
  }
26595
26595
  if (i.model && !i.handmesh)
@@ -26623,8 +26623,8 @@ class fo extends T {
26623
26623
  }
26624
26624
  async loadHandModel(e, t) {
26625
26625
  const i = this.context, n = i.renderer.xr.getHand(t.index);
26626
- n || (Jn ? F.DrawLabel(t.rayWorldPosition, "No hand found for index " + t.index, 0.05, 5) : console.warn("No hand found for index " + t.index));
26627
- const o = new Ps();
26626
+ n || (es ? F.DrawLabel(t.rayWorldPosition, "No hand found for index " + t.index, 0.05, 5) : console.warn("No hand found for index " + t.index));
26627
+ const o = new Os();
26628
26628
  Nm(o, i), await jp(o, i, this.sourceId ?? "");
26629
26629
  const r = mv(o);
26630
26630
  let a = "";
@@ -26636,17 +26636,17 @@ class fo extends T {
26636
26636
  const f = r?.gltf;
26637
26637
  f?.scene.children?.length === 0 && (f.scene.children[0] = d), r?.gltf && Fn().createBuiltinComponents(e.context, e.sourceId || a, r.gltf, null, r), d.traverse((p) => {
26638
26638
  p.layers.set(2), K.active?.isPassThrough && !l && this.makeOccluder(p), p instanceof H && We.assignMeshLOD(p, 0);
26639
- }), t.connected || (Jn && F.DrawLabel(t.rayWorldPosition, "Hand is loaded but not connected anymore", 0.05, 5), d.removeFromParent());
26639
+ }), t.connected || (es && F.DrawLabel(t.rayWorldPosition, "Hand is loaded but not connected anymore", 0.05, 5), d.removeFromParent());
26640
26640
  });
26641
- if (Jn && c.add(new _i(0.5)), t.inputSource.hand) {
26642
- Jn && console.log(t.inputSource.hand);
26641
+ if (es && c.add(new _i(0.5)), t.inputSource.hand) {
26642
+ es && console.log(t.inputSource.hand);
26643
26643
  for (const d of t.inputSource.hand.values())
26644
26644
  if (n.joints[d.jointName] === void 0) {
26645
26645
  const f = new no();
26646
26646
  f.matrixAutoUpdate = !1, f.visible = !0, n.joints[d.jointName] = f, n.add(f);
26647
26647
  }
26648
26648
  } else
26649
- Jn && F.DrawLabel(t.rayWorldPosition, "No inputSource.hand found for index " + t.index, 0.05, 5);
26649
+ es && F.DrawLabel(t.rayWorldPosition, "No inputSource.hand found for index " + t.index, 0.05, 5);
26650
26650
  return { handObject: c, handmesh: h };
26651
26651
  }
26652
26652
  makeOccluder(e) {
@@ -26960,7 +26960,7 @@ const al = w("debugwebxr"), _R = w("debugusdz"), rt = class $r extends T {
26960
26960
  * @internal
26961
26961
  */
26962
26962
  onEnable() {
26963
- window.location.protocol !== "https:" && me('<a href="https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API" target="_blank">WebXR</a> only works on secure connections (https).'), this.useQuicklookExport && (x.findObjectOfType(ws) || (al && console.log("WebXR: Adding USDZExporter"), this._usdzExporter = x.addComponent(this.gameObject, ws), this._usdzExporter.objectToExport = this.context.scene, this._usdzExporter.autoExportAnimations = !0, this._usdzExporter.autoExportAudioSources = !0)), this.handleCreatingHTML(), this.handleOfferSession(), this.defaultAvatar === !0 && (al && console.warn("WebXR: No default avatar set, using static default avatar"), this.defaultAvatar = new ie("https://cdn.needle.tools/static/avatars/DefaultAvatar.glb")), this.defaultAvatar && (this._playerSync = this.gameObject.getOrAddComponent(zv), this._playerSync.autoSync = !1), this._playerSync && typeof this.defaultAvatar != "boolean" && (this._playerSync.asset = this.defaultAvatar, this._playerSync.onPlayerSpawned?.removeEventListener(this.onAvatarSpawned), this._playerSync.onPlayerSpawned?.addEventListener(this.onAvatarSpawned));
26963
+ window.location.protocol !== "https:" && me('<a href="https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API" target="_blank">WebXR</a> only works on secure connections (https).'), this.useQuicklookExport && (x.findObjectOfType(xs) || (al && console.log("WebXR: Adding USDZExporter"), this._usdzExporter = x.addComponent(this.gameObject, xs), this._usdzExporter.objectToExport = this.context.scene, this._usdzExporter.autoExportAnimations = !0, this._usdzExporter.autoExportAudioSources = !0)), this.handleCreatingHTML(), this.handleOfferSession(), this.defaultAvatar === !0 && (al && console.warn("WebXR: No default avatar set, using static default avatar"), this.defaultAvatar = new ie("https://cdn.needle.tools/static/avatars/DefaultAvatar.glb")), this.defaultAvatar && (this._playerSync = this.gameObject.getOrAddComponent(zv), this._playerSync.autoSync = !1), this._playerSync && typeof this.defaultAvatar != "boolean" && (this._playerSync.asset = this.defaultAvatar, this._playerSync.onPlayerSpawned?.removeEventListener(this.onAvatarSpawned), this._playerSync.onPlayerSpawned?.addEventListener(this.onAvatarSpawned));
26964
26964
  }
26965
26965
  /**
26966
26966
  * Cleans up resources when the component is disabled.
@@ -27043,7 +27043,7 @@ const al = w("debugwebxr"), _R = w("debugusdz"), rt = class $r extends T {
27043
27043
  if (!this.isActiveWebXR) return;
27044
27044
  al && console.log("WebXR onEnterXR"), this._previousXRState = Jt.Global.Mask;
27045
27045
  const t = e.xr.isVR;
27046
- if (Jt.Global.Set(t ? us.VR : us.AR), e.xr.isAR) {
27046
+ if (Jt.Global.Set(t ? fs.VR : fs.AR), e.xr.isAR) {
27047
27047
  let i = x.findObjectOfType($i);
27048
27048
  if (!i)
27049
27049
  if (this.usePlacementReticle) {
@@ -27135,7 +27135,7 @@ const al = w("debugwebxr"), _R = w("debugusdz"), rt = class $r extends T {
27135
27135
  handleCreatingHTML() {
27136
27136
  if (this.createARButton || this.createVRButton || this.useQuicklookExport) {
27137
27137
  if ((q.isiOS() && q.isSafari() || _R) && this.useQuicklookExport) {
27138
- const t = x.findObjectOfType(ws);
27138
+ const t = x.findObjectOfType(xs);
27139
27139
  if (!t || t && t.allowCreateQuicklookButton) {
27140
27140
  const i = this.getButtonsFactory().createQuicklookButton();
27141
27141
  this.addButton(i, 50);
@@ -27758,7 +27758,7 @@ Oc([
27758
27758
  Oc([
27759
27759
  u(J)
27760
27760
  ], Ba.prototype, "anchorMax", 2);
27761
- let Un = Ba;
27761
+ let Nn = Ba;
27762
27762
  var CR = Object.defineProperty, Wv = (s, e, t, i) => {
27763
27763
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
27764
27764
  (r = s[o]) && (n = r(e, t, n) || n);
@@ -27815,7 +27815,7 @@ const yh = {
27815
27815
  _rect = null;
27816
27816
  _stateManager = null;
27817
27817
  get rectTransform() {
27818
- if (this._rect || (this._rect = x.getComponent(this.gameObject, Un)), !this._rect) throw new Error("Not Supported: Make sure to add a RectTransform component before adding a UI Graphic component.");
27818
+ if (this._rect || (this._rect = x.getComponent(this.gameObject, Nn)), !this._rect) throw new Error("Not Supported: Make sure to add a RectTransform component before adding a UI Graphic component.");
27819
27819
  return this._rect;
27820
27820
  }
27821
27821
  onParentRectTransformChanged() {
@@ -27873,7 +27873,7 @@ const yh = {
27873
27873
  e = Ml.textureCache.get(e);
27874
27874
  else if (!e.isRenderTargetTexture) {
27875
27875
  const t = e.clone();
27876
- t.colorSpace = Ss, Ml.textureCache.set(e, t), e = t;
27876
+ t.colorSpace = Cs, Ml.textureCache.set(e, t), e = t;
27877
27877
  }
27878
27878
  this.setOptions({ backgroundImage: e, borderRadius: 0, backgroundOpacity: this.color.alpha, backgroundSize: "stretch" }), We.assignTextureLOD(e, 0).then((t) => {
27879
27879
  t instanceof Te && (e && Ml.textureCache.set(e, t), this.setOptions({ backgroundImage: t }), this.markDirty());
@@ -28290,7 +28290,7 @@ class mg {
28290
28290
  exportText(e, t, i) {
28291
28291
  const n = x.getComponent(e, Xt);
28292
28292
  if (!n) return;
28293
- const o = x.getComponent(e, Un);
28293
+ const o = x.getComponent(e, Nn);
28294
28294
  let r = 100, a = 100;
28295
28295
  o && (r = o.width, a = o.height);
28296
28296
  const l = TR.clone();
@@ -28416,7 +28416,7 @@ class Pi extends T {
28416
28416
  this._needsUpdate = !0;
28417
28417
  }
28418
28418
  onEnable() {
28419
- D_ && console.log(this.name, this), this._rectTransform = this.gameObject.getComponent(Un);
28419
+ D_ && console.log(this.name, this), this._rectTransform = this.gameObject.getComponent(Nn);
28420
28420
  const e = this.gameObject.getComponentInParent(hc);
28421
28421
  e && e.registerLayoutGroup(this), this._needsUpdate = !0;
28422
28422
  }
@@ -28480,7 +28480,7 @@ class wo extends Pi {
28480
28480
  a ? m += this.padding.left : m += this.padding.top;
28481
28481
  let v = 0, y = 0;
28482
28482
  for (let E = 0; E < this.gameObject.children.length; E++) {
28483
- const z = this.gameObject.children[E], D = x.getComponent(z, Un);
28483
+ const z = this.gameObject.children[E], D = x.getComponent(z, Nn);
28484
28484
  D?.activeAndEnabled && (y += 1, a ? v += D.width : v += D.height);
28485
28485
  }
28486
28486
  let S = 0;
@@ -28493,7 +28493,7 @@ class wo extends Pi {
28493
28493
  O += this.padding.left, O -= this.padding.right, _ !== 0 && (m = g - v, m *= _, m -= I * _, a ? (m -= this.padding.right * _, m += this.padding.left * (1 - _), m < this.padding.left && (m = this.padding.left)) : (m -= this.padding.bottom * _, m += this.padding.top * (1 - _), m < this.padding.top && (m = this.padding.top)));
28494
28494
  let k = 1;
28495
28495
  for (let E = 0; E < this.gameObject.children.length; E++) {
28496
- const z = this.gameObject.children[E], D = x.getComponent(z, Un);
28496
+ const z = this.gameObject.children[E], D = x.getComponent(z, Nn);
28497
28497
  if (D?.activeAndEnabled) {
28498
28498
  D.pivot?.set(0.5, 0.5), D.anchorMin.set(0, 1), D.anchorMax.set(0, 1);
28499
28499
  const V = i * 0.5 + O * 0.5;
@@ -28543,7 +28543,7 @@ class Qv extends Pi {
28543
28543
  onCalculateLayout() {
28544
28544
  }
28545
28545
  }
28546
- var IR = Object.defineProperty, LR = Object.getOwnPropertyDescriptor, Vn = (s, e, t, i) => {
28546
+ var IR = Object.defineProperty, LR = Object.getOwnPropertyDescriptor, Hn = (s, e, t, i) => {
28547
28547
  for (var n = i > 1 ? void 0 : i ? LR(e, t) : e, o = s.length - 1, r; o >= 0; o--)
28548
28548
  (r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
28549
28549
  return i && n && IR(e, t, n), n;
@@ -28726,7 +28726,7 @@ const jf = w("debuguilayout"), Qi = class Kv extends pu {
28726
28726
  if (this._lastWidth = this.context.domWidth, this._lastHeight = this.context.domHeight, !t) return;
28727
28727
  const n = i + 0.01;
28728
28728
  this.gameObject.position.x = 0, this.gameObject.position.y = 0, this.gameObject.position.z = -n, this.gameObject.quaternion.identity();
28729
- const o = this.gameObject.getComponent(Un);
28729
+ const o = this.gameObject.getComponent(Nn);
28730
28730
  let r = !1;
28731
28731
  o.sizeDelta.x !== this.context.domWidth && (r = !0), o.sizeDelta.y !== this.context.domHeight && (r = !0);
28732
28732
  const a = t.fieldOfView * Math.PI / 180, l = 2 * Math.tan(a / 2) * Math.abs(n);
@@ -28738,34 +28738,34 @@ const jf = w("debuguilayout"), Qi = class Kv extends pu {
28738
28738
  }
28739
28739
  }
28740
28740
  };
28741
- Vn([
28741
+ Hn([
28742
28742
  u()
28743
28743
  ], Qi.prototype, "renderOnTop", 1);
28744
- Vn([
28744
+ Hn([
28745
28745
  u()
28746
28746
  ], Qi.prototype, "depthWrite", 1);
28747
- Vn([
28747
+ Hn([
28748
28748
  u()
28749
28749
  ], Qi.prototype, "doubleSided", 1);
28750
- Vn([
28750
+ Hn([
28751
28751
  u()
28752
28752
  ], Qi.prototype, "castShadows", 1);
28753
- Vn([
28753
+ Hn([
28754
28754
  u()
28755
28755
  ], Qi.prototype, "receiveShadows", 1);
28756
- Vn([
28756
+ Hn([
28757
28757
  u()
28758
28758
  ], Qi.prototype, "renderMode", 1);
28759
- Vn([
28759
+ Hn([
28760
28760
  u(Qi)
28761
28761
  ], Qi.prototype, "rootCanvas", 1);
28762
- Vn([
28762
+ Hn([
28763
28763
  u()
28764
28764
  ], Qi.prototype, "scaleFactor", 1);
28765
- Vn([
28765
+ Hn([
28766
28766
  u(mi)
28767
28767
  ], Qi.prototype, "worldCamera", 2);
28768
- Vn([
28768
+ Hn([
28769
28769
  u()
28770
28770
  ], Qi.prototype, "planeDistance", 2);
28771
28771
  let hc = Qi;
@@ -28821,7 +28821,7 @@ class Zv {
28821
28821
  onExportObject(e, t, i) {
28822
28822
  const n = x.getComponent(e, hc);
28823
28823
  if (n && n.enabled && n.renderMode === Yv.WorldSpace) {
28824
- const o = new mg(), r = x.getComponent(e, Un), a = x.getComponent(e, lr), l = new Array();
28824
+ const o = new mg(), r = x.getComponent(e, Nn), a = x.getComponent(e, lr), l = new Array();
28825
28825
  if (r) {
28826
28826
  if (!x.isActiveSelf(e)) {
28827
28827
  const d = x.isActiveSelf(e);
@@ -28837,7 +28837,7 @@ class Zv {
28837
28837
  p && (p.onEnable(), l.push(() => {
28838
28838
  p.onDisable();
28839
28839
  }));
28840
- const g = x.getComponent(d, Un);
28840
+ const g = x.getComponent(d, Nn);
28841
28841
  g && (g.onEnable(), g.updateTransform(), g.onApplyTransform(), l.push(() => {
28842
28842
  g.onDisable();
28843
28843
  }));
@@ -29063,7 +29063,7 @@ const si = class Wp extends T {
29063
29063
  */
29064
29064
  async exportAndOpen() {
29065
29065
  let e = this.exportFileName ?? this.objectToExport?.name ?? this.name;
29066
- if (e += "-" + CM(), bs() || (e !== "" && (e += "-"), e += "MadeWithNeedle"), this.link || (this.link = j_(this.context, q.supportsQuickLookAR())), this.customUsdzFile)
29066
+ if (e += "-" + CM(), vs() || (e !== "" && (e += "-"), e += "MadeWithNeedle"), this.link || (this.link = j_(this.context, q.supportsQuickLookAR())), this.customUsdzFile)
29067
29067
  return oi && console.log("Exporting custom usdz", this.customUsdzFile), this.openInQuickLook(this.customUsdzFile, e), null;
29068
29068
  if (!this.objectToExport)
29069
29069
  return console.warn("No object to export", this), null;
@@ -29118,7 +29118,7 @@ const si = class Wp extends T {
29118
29118
  }
29119
29119
  oi && Be("Progressive Loading: " + n.length), await Promise.all(n), oi && Be("Progressive Loading: done"), le.end("export-usdz-textures");
29120
29120
  const r = Jt.Global.Mask;
29121
- Jt.Global.Set(us.AR);
29121
+ Jt.Global.Set(fs.AR);
29122
29122
  const a = new jM(), l = new ag(this.quickLookCompatible);
29123
29123
  let c;
29124
29124
  const h = [];
@@ -29199,14 +29199,14 @@ const si = class Wp extends T {
29199
29199
  const i = new URLSearchParams(this.link.href);
29200
29200
  if (i) {
29201
29201
  const n = i.get("callToActionURL");
29202
- oi && Be("Quicklook url: " + n), n && (bs() ? globalThis.open(n, "_blank") : console.warn("Quicklook closed: custom redirects require a Needle Engine Pro license: https://needle.tools/pricing", n));
29202
+ oi && Be("Quicklook url: " + n), n && (vs() ? globalThis.open(n, "_blank") : console.warn("Quicklook closed: custom redirects require a Needle Engine Pro license: https://needle.tools/pricing", n));
29203
29203
  }
29204
29204
  }
29205
29205
  }
29206
29206
  }
29207
29207
  buildQuicklookOverlay() {
29208
29208
  const e = {};
29209
- return this.customBranding && Object.assign(e, this.customBranding), bs() || (console.log("Custom Quicklook banner text requires pro license: https://needle.tools/pricing"), e.callToAction = "Close", e.checkoutTitle = "🌵 Made with Needle", e.checkoutSubtitle = "_"), (e.callToAction?.length || e.checkoutTitle?.length || e.checkoutSubtitle?.length) && (e.callToAction?.length || (e.callToAction = "\0"), e.checkoutTitle?.length || (e.checkoutTitle = "\0"), e.checkoutSubtitle?.length || (e.checkoutSubtitle = "\0")), this.dispatchEvent(new CustomEvent("quicklook-overlay", { detail: e })), e;
29209
+ return this.customBranding && Object.assign(e, this.customBranding), vs() || (console.log("Custom Quicklook banner text requires pro license: https://needle.tools/pricing"), e.callToAction = "Close", e.checkoutTitle = "🌵 Made with Needle", e.checkoutSubtitle = "_"), (e.callToAction?.length || e.checkoutTitle?.length || e.checkoutSubtitle?.length) && (e.callToAction?.length || (e.callToAction = "\0"), e.checkoutTitle?.length || (e.checkoutTitle = "\0"), e.checkoutSubtitle?.length || (e.checkoutSubtitle = "\0")), this.dispatchEvent(new CustomEvent("quicklook-overlay", { detail: e })), e;
29210
29210
  }
29211
29211
  static invertForwardMatrix = new te().makeRotationY(Math.PI);
29212
29212
  static invertForwardQuaternion = new $().setFromEuler(new Tt(0, Math.PI, 0));
@@ -29277,7 +29277,7 @@ Pt([
29277
29277
  Pt([
29278
29278
  u()
29279
29279
  ], si.prototype, "quickLookCompatible");
29280
- let ws = si;
29280
+ let xs = si;
29281
29281
  var $R = Object.defineProperty, WR = Object.getOwnPropertyDescriptor, yg = (s, e, t, i) => {
29282
29282
  for (var n = WR(e, t), o = s.length - 1, r; o >= 0; o--)
29283
29283
  (r = s[o]) && (n = r(e, t, n) || n);
@@ -29428,7 +29428,7 @@ vg([
29428
29428
  vg([
29429
29429
  u(b)
29430
29430
  ], yu.prototype, "axis");
29431
- var qR = Object.defineProperty, XR = Object.getOwnPropertyDescriptor, Hn = (s, e, t, i) => {
29431
+ var qR = Object.defineProperty, XR = Object.getOwnPropertyDescriptor, Gn = (s, e, t, i) => {
29432
29432
  for (var n = i > 1 ? void 0 : i ? XR(e, t) : e, o = s.length - 1, r; o >= 0; o--)
29433
29433
  (r = s[o]) && (n = (i ? r(e, t, n) : r(n)) || n);
29434
29434
  return i && n && qR(e, t, n), n;
@@ -29673,34 +29673,34 @@ class Zi extends T {
29673
29673
  e.add(e.target), e.target.position.set(0, 0, -1);
29674
29674
  }
29675
29675
  }
29676
- Hn([
29676
+ Gn([
29677
29677
  u()
29678
29678
  ], Zi.prototype, "type", 2);
29679
- Hn([
29679
+ Gn([
29680
29680
  u(se)
29681
29681
  ], Zi.prototype, "color", 1);
29682
- Hn([
29682
+ Gn([
29683
29683
  u()
29684
29684
  ], Zi.prototype, "shadowNearPlane", 1);
29685
- Hn([
29685
+ Gn([
29686
29686
  u()
29687
29687
  ], Zi.prototype, "shadowBias", 1);
29688
- Hn([
29688
+ Gn([
29689
29689
  u()
29690
29690
  ], Zi.prototype, "shadowNormalBias", 1);
29691
- Hn([
29691
+ Gn([
29692
29692
  u()
29693
29693
  ], Zi.prototype, "shadows", 1);
29694
- Hn([
29694
+ Gn([
29695
29695
  u()
29696
29696
  ], Zi.prototype, "lightmapBakeType", 2);
29697
- Hn([
29697
+ Gn([
29698
29698
  u()
29699
29699
  ], Zi.prototype, "intensity", 1);
29700
- Hn([
29700
+ Gn([
29701
29701
  u()
29702
29702
  ], Zi.prototype, "shadowDistance", 1);
29703
- Hn([
29703
+ Gn([
29704
29704
  u()
29705
29705
  ], Zi.prototype, "shadowResolution", 1);
29706
29706
  new b(0, 0, 0);
@@ -29839,7 +29839,7 @@ class xg extends T {
29839
29839
  const e = this.gameObject.parent;
29840
29840
  if (e) {
29841
29841
  this._isLoadingOrDoneLoading = !0;
29842
- const t = new $n();
29842
+ const t = new Wn();
29843
29843
  t.idProvider = new Et(this.hash(this.guid)), t.parent = this.loadAssetInParent !== !1 ? e : this.gameObject, this.gameObject.updateMatrix();
29844
29844
  const i = this.gameObject.matrix;
29845
29845
  _h && console.log("Load nested:", this.filePath?.url ?? this.filePath, this.gameObject.position);
@@ -30079,7 +30079,7 @@ var sT = Object.defineProperty, C = (s, e, t, i) => {
30079
30079
  return n && sT(e, t, n), n;
30080
30080
  };
30081
30081
  const bh = w("debugparticles");
30082
- var ls = /* @__PURE__ */ ((s) => (s[s.Billboard = 0] = "Billboard", s[s.Stretch = 1] = "Stretch", s[s.HorizontalBillboard = 2] = "HorizontalBillboard", s[s.VerticalBillboard = 3] = "VerticalBillboard", s[s.Mesh = 4] = "Mesh", s))(ls || {});
30082
+ var cs = /* @__PURE__ */ ((s) => (s[s.Billboard = 0] = "Billboard", s[s.Stretch = 1] = "Stretch", s[s.HorizontalBillboard = 2] = "HorizontalBillboard", s[s.VerticalBillboard = 3] = "VerticalBillboard", s[s.Mesh = 4] = "Mesh", s))(cs || {});
30083
30083
  class $a {
30084
30084
  alphaKeys = [];
30085
30085
  colorKeys = [];
@@ -31169,7 +31169,7 @@ C([
31169
31169
  C([
31170
31170
  u()
31171
31171
  ], Yt.prototype, "timeMode");
31172
- class Gn {
31172
+ class qn {
31173
31173
  enabled;
31174
31174
  separateAxes;
31175
31175
  x;
@@ -31184,28 +31184,28 @@ class Gn {
31184
31184
  }
31185
31185
  C([
31186
31186
  u()
31187
- ], Gn.prototype, "enabled");
31187
+ ], qn.prototype, "enabled");
31188
31188
  C([
31189
31189
  u()
31190
- ], Gn.prototype, "separateAxes");
31190
+ ], qn.prototype, "separateAxes");
31191
31191
  C([
31192
31192
  u(Y)
31193
- ], Gn.prototype, "x");
31193
+ ], qn.prototype, "x");
31194
31194
  C([
31195
31195
  u()
31196
- ], Gn.prototype, "xMultiplier");
31196
+ ], qn.prototype, "xMultiplier");
31197
31197
  C([
31198
31198
  u(Y)
31199
- ], Gn.prototype, "y");
31199
+ ], qn.prototype, "y");
31200
31200
  C([
31201
31201
  u()
31202
- ], Gn.prototype, "yMultiplier");
31202
+ ], qn.prototype, "yMultiplier");
31203
31203
  C([
31204
31204
  u(Y)
31205
- ], Gn.prototype, "z");
31205
+ ], qn.prototype, "z");
31206
31206
  C([
31207
31207
  u()
31208
- ], Gn.prototype, "zMultiplier");
31208
+ ], qn.prototype, "zMultiplier");
31209
31209
  class pn {
31210
31210
  enabled;
31211
31211
  range;
@@ -31553,18 +31553,18 @@ class mn extends T {
31553
31553
  let t = e === !0 && this.trailMaterial ? this.trailMaterial : this.particleMaterial;
31554
31554
  if (t) {
31555
31555
  if (t.type === "MeshStandardMaterial") {
31556
- Qs && console.debug("ParticleSystemRenderer.getMaterial: MeshStandardMaterial detected, converting to MeshBasicMaterial. See https://github.com/Alchemist0823/three.quarks/issues/101"), "map" in t && t.map && (t.map.colorSpace = Ss, t.map.premultiplyAlpha = !1);
31556
+ Qs && console.debug("ParticleSystemRenderer.getMaterial: MeshStandardMaterial detected, converting to MeshBasicMaterial. See https://github.com/Alchemist0823/three.quarks/issues/101"), "map" in t && t.map && (t.map.colorSpace = Cs, t.map.premultiplyAlpha = !1);
31557
31557
  const i = new we();
31558
31558
  i.copy(t), e ? this.trailMaterial = i : this.particleMaterial = i;
31559
31559
  }
31560
- t.map && (t.map.colorSpace = Ss, t.map.premultiplyAlpha = !1), e && t.side === ho && (t = t.clone(), t.side = Dd, e ? this.trailMaterial = t : this.particleMaterial = t);
31560
+ t.map && (t.map.colorSpace = Cs, t.map.premultiplyAlpha = !1), e && t.side === ho && (t = t.clone(), t.side = Dd, e ? this.trailMaterial = t : this.particleMaterial = t);
31561
31561
  }
31562
31562
  return t && !rT && t._didRequestTextureLOD === void 0 && (t._didRequestTextureLOD = 0, aT && console.log("Load material LOD", t.name), We.assignTextureLOD(t, 0)), t;
31563
31563
  }
31564
31564
  getMesh(e) {
31565
31565
  let t = null;
31566
31566
  if (!t && (this.particleMesh instanceof H && (t = this.particleMesh.geometry), t === null)) {
31567
- t = new Nn(1, 1);
31567
+ t = new $n(1, 1);
31568
31568
  const n = t.attributes.uv;
31569
31569
  for (let o = 0; o < n.count; o++)
31570
31570
  n.setX(o, 1 - n.getX(o));
@@ -31707,7 +31707,7 @@ class uT extends wr {
31707
31707
  update(e, t) {
31708
31708
  if (e.rotation === void 0) return;
31709
31709
  const i = e.age / e.life;
31710
- if (typeof e.rotation == "number" && (this.system.rotationOverLifetime.enabled ? e.rotation += this.system.rotationOverLifetime.evaluate(i, e[F_]) * t : this.system.renderer.renderMode === ls.Billboard && (e.rotation = Math.PI), this.system.rotationBySpeed.enabled)) {
31710
+ if (typeof e.rotation == "number" && (this.system.rotationOverLifetime.enabled ? e.rotation += this.system.rotationOverLifetime.evaluate(i, e[F_]) * t : this.system.renderer.renderMode === cs.Billboard && (e.rotation = Math.PI), this.system.rotationBySpeed.enabled)) {
31711
31711
  const n = e.velocity.length();
31712
31712
  e.rotation += this.system.rotationBySpeed.evaluate(i, n) * t;
31713
31713
  }
@@ -31726,7 +31726,7 @@ class pT extends wr {
31726
31726
  let n = 1;
31727
31727
  this.system.sizeOverLifetime.enabled && (n *= this.system.sizeOverLifetime.evaluate(i, void 0, e[z_]).x);
31728
31728
  let o = 1;
31729
- this.system.renderer.renderMode !== ls.Mesh && (o = this.system.worldScale.x / this.system.cameraScale);
31729
+ this.system.renderer.renderMode !== cs.Mesh && (o = this.system.worldScale.x / this.system.cameraScale);
31730
31730
  const r = G(e.startSize).multiplyScalar(n * o);
31731
31731
  if (e.size.set(r.x, r.y, r.z), this.system.localspace) {
31732
31732
  const a = rw(this.system, fT);
@@ -31877,20 +31877,20 @@ class _T {
31877
31877
  }
31878
31878
  get renderMode() {
31879
31879
  if (this.system.trails.enabled === !0)
31880
- return as.Trail;
31880
+ return ls.Trail;
31881
31881
  switch (this.system.renderer.renderMode) {
31882
- case ls.Billboard:
31883
- return as.BillBoard;
31884
- case ls.Stretch:
31885
- return as.StretchedBillBoard;
31886
- case ls.HorizontalBillboard:
31887
- return as.HorizontalBillBoard;
31888
- case ls.VerticalBillboard:
31889
- return as.VerticalBillBoard;
31890
- case ls.Mesh:
31891
- return as.Mesh;
31892
- }
31893
- return as.BillBoard;
31882
+ case cs.Billboard:
31883
+ return ls.BillBoard;
31884
+ case cs.Stretch:
31885
+ return ls.StretchedBillBoard;
31886
+ case cs.HorizontalBillboard:
31887
+ return ls.HorizontalBillBoard;
31888
+ case cs.VerticalBillboard:
31889
+ return ls.VerticalBillBoard;
31890
+ case cs.Mesh:
31891
+ return ls.Mesh;
31892
+ }
31893
+ return ls.BillBoard;
31894
31894
  }
31895
31895
  rendererEmitterSettings = {
31896
31896
  startLength: new US(220),
@@ -31898,7 +31898,7 @@ class _T {
31898
31898
  };
31899
31899
  get speedFactor() {
31900
31900
  let e = this.system.main.simulationSpeed;
31901
- return this.system.renderer?.renderMode === ls.Stretch && (e *= this.system.renderer.velocityScale ?? 1), e;
31901
+ return this.system.renderer?.renderMode === cs.Stretch && (e *= this.system.renderer.velocityScale ?? 1), e;
31902
31902
  }
31903
31903
  flatWhiteTexture;
31904
31904
  clonedTexture = { original: void 0, clone: void 0 };
@@ -31908,7 +31908,7 @@ class _T {
31908
31908
  const t = e.map;
31909
31909
  if (this.clonedTexture.original !== t || !this.clonedTexture.clone) {
31910
31910
  const i = t.clone();
31911
- i.premultiplyAlpha = !1, i.colorSpace = Ss, this.clonedTexture.original = t, this.clonedTexture.clone = i;
31911
+ i.premultiplyAlpha = !1, i.colorSpace = Cs, this.clonedTexture.original = t, this.clonedTexture.clone = i;
31912
31912
  }
31913
31913
  return this.clonedTexture.clone;
31914
31914
  }
@@ -32153,8 +32153,8 @@ const jt = class Uh extends T {
32153
32153
  }
32154
32154
  /** @internal */
32155
32155
  start() {
32156
- this.addSubParticleSystems(), this.updateLayers(), this.renderer.particleMesh instanceof H && this._interface.renderMode == as.Mesh && We.assignMeshLOD(this.renderer.particleMesh, 0).then((e) => {
32157
- e && this.particleSystem && this._interface.renderMode == as.Mesh && (this.particleSystem.instancingGeometry = e);
32156
+ this.addSubParticleSystems(), this.updateLayers(), this.renderer.particleMesh instanceof H && this._interface.renderMode == ls.Mesh && We.assignMeshLOD(this.renderer.particleMesh, 0).then((e) => {
32157
+ e && this.particleSystem && this._interface.renderMode == ls.Mesh && (this.particleSystem.instancingGeometry = e);
32158
32158
  });
32159
32159
  }
32160
32160
  /** @internal */
@@ -32267,7 +32267,7 @@ ze([
32267
32267
  u(Yt)
32268
32268
  ], jt.prototype, "textureSheetAnimation");
32269
32269
  ze([
32270
- u(Gn)
32270
+ u(qn)
32271
32271
  ], jt.prototype, "rotationOverLifetime");
32272
32272
  ze([
32273
32273
  u(pn)
@@ -32683,7 +32683,7 @@ const Su = class cw extends ot {
32683
32683
  }, this.threshold.onValueChanged = (t) => {
32684
32684
  e.luminanceMaterial.threshold = Math.pow(t, 2.2);
32685
32685
  }, this.scatter.onValueChanged = (t) => {
32686
- e.luminancePass.enabled = !0, e.luminanceMaterial.smoothing = t, e.mipmapBlurPass && (e.mipmapBlurPass.radius = gs.lerp(0.1, 0.9, t));
32686
+ e.luminancePass.enabled = !0, e.luminanceMaterial.smoothing = t, e.mipmapBlurPass && (e.mipmapBlurPass.radius = ys.lerp(0.1, 0.9, t));
32687
32687
  }, e;
32688
32688
  }
32689
32689
  };
@@ -32882,7 +32882,7 @@ var $T = Object.defineProperty, Sr = (s, e, t, i) => {
32882
32882
  return n && $T(e, t, n), n;
32883
32883
  };
32884
32884
  const WT = w("debugpost");
32885
- class qn extends ot {
32885
+ class Xn extends ot {
32886
32886
  get typeName() {
32887
32887
  return "DepthOfField";
32888
32888
  }
@@ -32924,26 +32924,26 @@ class qn extends ot {
32924
32924
  }
32925
32925
  Sr([
32926
32926
  u()
32927
- ], qn.prototype, "mode");
32927
+ ], Xn.prototype, "mode");
32928
32928
  Sr([
32929
32929
  u(j)
32930
- ], qn.prototype, "focusDistance");
32930
+ ], Xn.prototype, "focusDistance");
32931
32931
  Sr([
32932
32932
  u(j)
32933
- ], qn.prototype, "focalLength");
32933
+ ], Xn.prototype, "focalLength");
32934
32934
  Sr([
32935
32935
  u(j)
32936
- ], qn.prototype, "aperture");
32936
+ ], Xn.prototype, "aperture");
32937
32937
  Sr([
32938
32938
  u(j)
32939
- ], qn.prototype, "gaussianMaxRadius");
32939
+ ], Xn.prototype, "gaussianMaxRadius");
32940
32940
  Sr([
32941
32941
  u(j)
32942
- ], qn.prototype, "resolutionScale");
32942
+ ], Xn.prototype, "resolutionScale");
32943
32943
  Sr([
32944
32944
  u(j)
32945
- ], qn.prototype, "bokehScale");
32946
- gn("DepthOfField", qn);
32945
+ ], Xn.prototype, "bokehScale");
32946
+ gn("DepthOfField", Xn);
32947
32947
  class vd extends ot {
32948
32948
  effect;
32949
32949
  constructor(e) {
@@ -33052,7 +33052,7 @@ var qT = Object.defineProperty, Cr = (s, e, t, i) => {
33052
33052
  };
33053
33053
  const XT = w("debugN8AO");
33054
33054
  var Jp = /* @__PURE__ */ ((s) => (s[s.Performance = 0] = "Performance", s[s.Low = 1] = "Low", s[s.Medium = 2] = "Medium", s[s.High = 3] = "High", s[s.Ultra = 4] = "Ultra", s))(Jp || {});
33055
- class Xn extends ot {
33055
+ class Qn extends ot {
33056
33056
  get typeName() {
33057
33057
  return "ScreenSpaceAmbientOcclusionN8";
33058
33058
  }
@@ -33099,28 +33099,28 @@ class Xn extends ot {
33099
33099
  Cr([
33100
33100
  Lt(),
33101
33101
  u()
33102
- ], Xn.prototype, "gammaCorrection");
33102
+ ], Qn.prototype, "gammaCorrection");
33103
33103
  Cr([
33104
33104
  u(j)
33105
- ], Xn.prototype, "aoRadius");
33105
+ ], Qn.prototype, "aoRadius");
33106
33106
  Cr([
33107
33107
  u(j)
33108
- ], Xn.prototype, "falloff");
33108
+ ], Qn.prototype, "falloff");
33109
33109
  Cr([
33110
33110
  u(j)
33111
- ], Xn.prototype, "intensity");
33111
+ ], Qn.prototype, "intensity");
33112
33112
  Cr([
33113
33113
  u(j)
33114
- ], Xn.prototype, "color");
33114
+ ], Qn.prototype, "color");
33115
33115
  Cr([
33116
33116
  Lt(),
33117
33117
  u()
33118
- ], Xn.prototype, "screenspaceRadius");
33118
+ ], Qn.prototype, "screenspaceRadius");
33119
33119
  Cr([
33120
33120
  Lt(),
33121
33121
  u()
33122
- ], Xn.prototype, "quality");
33123
- gn("ScreenSpaceAmbientOcclusionN8", Xn);
33122
+ ], Qn.prototype, "quality");
33123
+ gn("ScreenSpaceAmbientOcclusionN8", Qn);
33124
33124
  var QT = Object.defineProperty, YT = Object.getOwnPropertyDescriptor, dw = (s, e, t, i) => {
33125
33125
  for (var n = YT(e, t), o = s.length - 1, r; o >= 0; o--)
33126
33126
  (r = s[o]) && (n = r(e, t, n) || n);
@@ -33315,7 +33315,7 @@ Rg([
33315
33315
  ], Ga.prototype, "center");
33316
33316
  gn("Vignette", Ga);
33317
33317
  globalThis.NEEDLE_USE_POSTPROCESSING = globalThis.NEEDLE_USE_POSTPROCESSING !== void 0 ? globalThis.NEEDLE_USE_POSTPROCESSING : !0;
33318
- const es = w("debugpost"), Hf = Symbol("needle:postprocessing-handler"), cl = Symbol("needle:previous-autoclear-state"), hl = Symbol("needle:previous-tone-mapping");
33318
+ const ts = w("debugpost"), Hf = Symbol("needle:postprocessing-handler"), cl = Symbol("needle:previous-autoclear-state"), hl = Symbol("needle:previous-tone-mapping");
33319
33319
  class uw {
33320
33320
  _composer = null;
33321
33321
  _lastVolumeComponents;
@@ -33341,7 +33341,7 @@ class uw {
33341
33341
  return this._isActive = !0, this.onApply(this.context, e);
33342
33342
  }
33343
33343
  unapply(e = !0) {
33344
- if (es && console.log("Unapplying postprocessing effects"), this._isActive = !1, this._lastVolumeComponents) {
33344
+ if (ts && console.log("Unapplying postprocessing effects"), this._isActive = !1, this._lastVolumeComponents) {
33345
33345
  for (const n of this._lastVolumeComponents)
33346
33346
  n.unapply();
33347
33347
  this._lastVolumeComponents.length = 0;
@@ -33361,7 +33361,7 @@ class uw {
33361
33361
  R.POSTPROCESSING.load(),
33362
33362
  R.POSTPROCESSING_AO.load()
33363
33363
  // import("./Effects/Sharpening.effect")
33364
- ]), e[Hf] = this, es && console.log("Apply Postprocessing Effects", t), this._lastVolumeComponents = [...t], this._effects.length = 0;
33364
+ ]), e[Hf] = this, ts && console.log("Apply Postprocessing Effects", t), this._lastVolumeComponents = [...t], this._effects.length = 0;
33365
33365
  const i = {
33366
33366
  handler: this,
33367
33367
  components: this._lastVolumeComponents
@@ -33459,7 +33459,7 @@ class uw {
33459
33459
  minFilter: d.texture.minFilter ?? Gh,
33460
33460
  magFilter: d.texture.magFilter ?? Gh,
33461
33461
  generateMipmaps: d.texture.generateMipmaps
33462
- }), this._customInputBufferId++, this._customInputBuffer.texture.name = `CustomInputBuffer-${this._customInputBufferId}`, this._customInputBuffer.depthTexture && d.depthTexture && (this._customInputBuffer.depthTexture.format = d.depthTexture.format, this._customInputBuffer.depthTexture.type = d.depthTexture.type), this._customInputBuffer.samples > 0 && (this._customInputBuffer.ignoreDepthForMultisampleCopy = !1), es && console.warn(`[PostProcessing] Input buffer created with size ${this._customInputBuffer.width}x${this._customInputBuffer.height} and samples ${this._customInputBuffer.samples}`)), l.call(a, h, this._customInputBuffer, f, p, g), nr.blit(this._customInputBuffer.texture, d, {
33462
+ }), this._customInputBufferId++, this._customInputBuffer.texture.name = `CustomInputBuffer-${this._customInputBufferId}`, this._customInputBuffer.depthTexture && d.depthTexture && (this._customInputBuffer.depthTexture.format = d.depthTexture.format, this._customInputBuffer.depthTexture.type = d.depthTexture.type), this._customInputBuffer.samples > 0 && (this._customInputBuffer.ignoreDepthForMultisampleCopy = !1), ts && console.warn(`[PostProcessing] Input buffer created with size ${this._customInputBuffer.width}x${this._customInputBuffer.height} and samples ${this._customInputBuffer.samples}`)), l.call(a, h, this._customInputBuffer, f, p, g), nr.blit(this._customInputBuffer.texture, d, {
33463
33463
  renderer: h,
33464
33464
  depthTexture: this._customInputBuffer.depthTexture,
33465
33465
  depthWrite: !0,
@@ -33473,7 +33473,7 @@ class uw {
33473
33473
  const _ = this._effects[g].effect;
33474
33474
  if (_ instanceof R.POSTPROCESSING.MODULE.ToneMappingEffect) {
33475
33475
  if (h) {
33476
- es && console.warn(`[PostProcessing] Found multiple tonemapping effects in the scene: ${_.name} and ${d?.name}. Only the last one added will be used.`), this._effects.splice(g, 1);
33476
+ ts && console.warn(`[PostProcessing] Found multiple tonemapping effects in the scene: ${_.name} and ${d?.name}. Only the last one added will be used.`), this._effects.splice(g, 1);
33477
33477
  continue;
33478
33478
  }
33479
33479
  d = _, h = !0;
@@ -33486,7 +33486,7 @@ class uw {
33486
33486
  if (m instanceof R.POSTPROCESSING.MODULE.SMAAEffect ? this._hasSmaaEffect = !0 : m instanceof R.POSTPROCESSING.MODULE.NormalPass && (this._anyPassHasNormal = !0), !(m instanceof R.POSTPROCESSING.MODULE.ToneMappingEffect && d !== m))
33487
33487
  if (m instanceof R.POSTPROCESSING.MODULE.Effect) {
33488
33488
  const v = m.getAttributes(), y = R.POSTPROCESSING.MODULE.EffectAttribute.CONVOLUTION;
33489
- v & y && (es && console.log("[PostProcessing] Convolution effect: " + m.name), p && (es && console.log("[PostProcessing] → Merging effects [" + f.map((S) => S.name).join(", ") + "]"), this.createPassForMergeableEffects(f, r, o, n)), p = !0), f.push(m);
33489
+ v & y && (ts && console.log("[PostProcessing] Convolution effect: " + m.name), p && (ts && console.log("[PostProcessing] → Merging effects [" + f.map((S) => S.name).join(", ") + "]"), this.createPassForMergeableEffects(f, r, o, n)), p = !0), f.push(m);
33490
33490
  } else m instanceof R.POSTPROCESSING.MODULE.Pass ? (p = !1, this.createPassForMergeableEffects(f, r, o, n), m.renderToScreen = !1, r.addPass(m)) : (p = !1, this.createPassForMergeableEffects(f, r, o, n), r.addPass(m));
33491
33491
  }
33492
33492
  this.createPassForMergeableEffects(f, r, o, n);
@@ -33499,11 +33499,11 @@ class uw {
33499
33499
  let f = !1, p = !1;
33500
33500
  d.enabled && (c || (f = !0, p = !0), c = !0), d.renderToScreen = p, d?.configuration !== void 0 ? d.configuration.gammaCorrection = f : "autosetGamma" in d && (d.autosetGamma = f), this._anyPassHasDepth ||= d.needsDepthTexture;
33501
33501
  }
33502
- this.handleDevicePixelRatio(), es && console.log("[PostProcessing] Passes →", [...r.passes], `
33502
+ this.handleDevicePixelRatio(), ts && console.log("[PostProcessing] Passes →", [...r.passes], `
33503
33503
  ---------------------------------
33504
33504
  • ` + r.passes.map((h) => h.name || h.constructor.name + "*").join(`
33505
33505
  • `) + `
33506
- `), es && this._onCreateEffectsDebug(this._composer, o);
33506
+ `), ts && this._onCreateEffectsDebug(this._composer, o);
33507
33507
  }
33508
33508
  /** Should be called before `composer.addPass()` to create an effect pass with all previously collected effects that can be merged up to that point */
33509
33509
  createPassForMergeableEffects(e, t, i, n) {
@@ -33518,7 +33518,7 @@ class uw {
33518
33518
  _menuEntry = null;
33519
33519
  _passIndices = null;
33520
33520
  _onCreateEffectsDebug(e, t) {
33521
- if (es === "passes") {
33521
+ if (ts === "passes") {
33522
33522
  const i = new R.POSTPROCESSING.MODULE.DepthEffect({
33523
33523
  blendFunction: R.POSTPROCESSING.MODULE.BlendFunction.NORMAL,
33524
33524
  inverted: !0
@@ -34045,7 +34045,7 @@ class Ze extends T {
34045
34045
  }
34046
34046
  if (x.add(e.asset, this.gameObject), this.useSceneLighting && this.context.sceneLighting.enable(e), this.useSceneBackground) {
34047
34047
  const a = this.context.lightmaps.tryGetSkybox(e.url);
34048
- a ? (a.mapping = _s, this.context.scene.background = a) : kt && console.warn("SceneSwitcher: Can't find skybox for scene " + e.url);
34048
+ a ? (a.mapping = bs, this.context.scene.background = a) : kt && console.warn("SceneSwitcher: Can't find skybox for scene " + e.url);
34049
34049
  }
34050
34050
  if (this.useHistory && t >= 0) {
34051
34051
  let a = t.toString();
@@ -34552,7 +34552,7 @@ class pt extends T {
34552
34552
  t = this.url, !t?.length && typeof this.clip == "string" && (t = this.clip);
34553
34553
  break;
34554
34554
  }
34555
- return t ? (this._videoElement || (at && console.warn("Create VideoElement", this), this._videoElement = this.createVideoElement(), this.context.domElement.shadowRoot.prepend(this._videoElement), this.updateVideoElementStyles()), typeof t == "string" ? (at && console.log("Set Video src", t), this._videoElement.src = t) : (at && console.log("Set Video srcObject", t), this._videoElement.srcObject = t), this._videoTexture || (this._videoTexture = new Zx(this._videoElement)), this._videoTexture.flipY = !1, this._videoTexture.colorSpace = Cs, e && this.handleBeginPlaying(e), at && console.log("Video: handle playing done...", t, e), !0) : (at && console.warn("No video source set", this), !1);
34555
+ return t ? (this._videoElement || (at && console.warn("Create VideoElement", this), this._videoElement = this.createVideoElement(), this.context.domElement.shadowRoot.prepend(this._videoElement), this.updateVideoElementStyles()), typeof t == "string" ? (at && console.log("Set Video src", t), this._videoElement.src = t) : (at && console.log("Set Video srcObject", t), this._videoElement.srcObject = t), this._videoTexture || (this._videoTexture = new Zx(this._videoElement)), this._videoTexture.flipY = !1, this._videoTexture.colorSpace = Ps, e && this.handleBeginPlaying(e), at && console.log("Video: handle playing done...", t, e), !0) : (at && console.warn("No video source set", this), !1);
34556
34556
  }
34557
34557
  updateAspect() {
34558
34558
  this.aspectMode !== 0 && this.startCoroutine(this.updateAspectImpl());
@@ -34998,14 +34998,14 @@ class Pr extends T {
34998
34998
  }
34999
34999
  /** @internal */
35000
35000
  onEnable() {
35001
- this._net?.enable(), this._net?.addEventListener(ps.StreamReceived, this.onReceiveStream), this._net?.addEventListener(ps.StreamEnded, this.onCallEnded), this.context.connection.beginListen(ee.JoinedRoom, this.onJoinedRoom), this.autoConnect && Os(1e3).then(() => (this.enabled && this.autoConnect && !this.isReceiving && !this.isSending && this.context.connection.isInRoom && this.share(), 0));
35001
+ this._net?.enable(), this._net?.addEventListener(ms.StreamReceived, this.onReceiveStream), this._net?.addEventListener(ms.StreamEnded, this.onCallEnded), this.context.connection.beginListen(ee.JoinedRoom, this.onJoinedRoom), this.autoConnect && ks(1e3).then(() => (this.enabled && this.autoConnect && !this.isReceiving && !this.isSending && this.context.connection.isInRoom && this.share(), 0));
35002
35002
  }
35003
35003
  /** @internal */
35004
35004
  onDisable() {
35005
- this._net?.removeEventListener(ps.StreamReceived, this.onReceiveStream), this._net?.removeEventListener(ps.StreamEnded, this.onCallEnded), this.context.connection.stopListen(ee.JoinedRoom, this.onJoinedRoom), this._net?.disable(), this.close();
35005
+ this._net?.removeEventListener(ms.StreamReceived, this.onReceiveStream), this._net?.removeEventListener(ms.StreamEnded, this.onCallEnded), this.context.connection.stopListen(ee.JoinedRoom, this.onJoinedRoom), this._net?.disable(), this.close();
35006
35006
  }
35007
35007
  onJoinedRoom = async () => {
35008
- await Os(1e3), this.autoConnect && !this.isSending && !this.isReceiving && this.context.connection.isInRoom && this.share();
35008
+ await ks(1e3), this.autoConnect && !this.isSending && !this.isReceiving && this.context.connection.isInRoom && this.share();
35009
35009
  };
35010
35010
  _ensureVideoPlayer() {
35011
35011
  const e = new pt();
@@ -35051,7 +35051,7 @@ class Pr extends T {
35051
35051
  a,
35052
35052
  1
35053
35053
  /* Sending */
35054
- ) : ms(a);
35054
+ ) : gs(a);
35055
35055
  }
35056
35056
  break;
35057
35057
  // capture the canvas meaning the threejs view
@@ -35075,7 +35075,7 @@ class Pr extends T {
35075
35075
  a,
35076
35076
  1
35077
35077
  /* Sending */
35078
- ) : ms(a);
35078
+ ) : gs(a);
35079
35079
  }
35080
35080
  break;
35081
35081
  default:
@@ -35090,7 +35090,7 @@ class Pr extends T {
35090
35090
  }
35091
35091
  }
35092
35092
  close() {
35093
- this._requestOpen = !1, this._currentStream && (vt && console.warn("Close current stream / disposing resources, stream was active?", this._currentStream.active), this._net?.stopSendingStream(this._currentStream), ms(this._currentStream), this._currentMode = 0, this._currentStream = null);
35093
+ this._requestOpen = !1, this._currentStream && (vt && console.warn("Close current stream / disposing resources, stream was active?", this._currentStream.active), this._net?.stopSendingStream(this._currentStream), gs(this._currentStream), this._currentMode = 0, this._currentStream = null);
35094
35094
  }
35095
35095
  setStream(e, t) {
35096
35096
  if (e === this._currentStream || (this.close(), !e)) return;
@@ -35157,7 +35157,7 @@ class Pr extends T {
35157
35157
  l,
35158
35158
  1
35159
35159
  /* Sending */
35160
- ), vt && console.log("Selected camera", o)) : (ms(l), vt && console.log("Camera selection cancelled"));
35160
+ ), vt && console.log("Selected camera", o)) : (gs(l), vt && console.log("Camera selection cancelled"));
35161
35161
  break;
35162
35162
  } catch (r) {
35163
35163
  if (r.message === "Failed to allocate videosource" || r.message === "Could not start video source") {
@@ -35386,7 +35386,7 @@ const hr = class extends T {
35386
35386
  return Mt && console.warn("RemoteSkybox: URL changed while loading texture, aborting setSkybox"), !1;
35387
35387
  this.url = e;
35388
35388
  const n = e.lastIndexOf("/");
35389
- return i.name = e.substring(n >= 0 ? n + 1 : 0), this._loader instanceof Qr && (i.colorSpace = Cs), this._prevLoadedEnvironment = i, this.apply(), !0;
35389
+ return i.name = e.substring(n >= 0 ? n + 1 : 0), this._loader instanceof Qr && (i.colorSpace = Ps), this._prevLoadedEnvironment = i, this.apply(), !0;
35390
35390
  }
35391
35391
  async loadTexture(e, t) {
35392
35392
  if (!e) return Promise.resolve(null);
@@ -35572,7 +35572,7 @@ const Xl = w("debugspatialtrigger"), X_ = new lo(), Q_ = new lo();
35572
35572
  function wE(s, e) {
35573
35573
  return X_.mask = s, Q_.mask = e, X_.test(Q_);
35574
35574
  }
35575
- class xs extends T {
35575
+ class Ss extends T {
35576
35576
  triggerMask = 0;
35577
35577
  onEnter;
35578
35578
  onStay;
@@ -35629,16 +35629,16 @@ class xs extends T {
35629
35629
  }
35630
35630
  zc([
35631
35631
  u()
35632
- ], xs.prototype, "triggerMask");
35632
+ ], Ss.prototype, "triggerMask");
35633
35633
  zc([
35634
35634
  u(ye)
35635
- ], xs.prototype, "onEnter");
35635
+ ], Ss.prototype, "onEnter");
35636
35636
  zc([
35637
35637
  u(ye)
35638
- ], xs.prototype, "onStay");
35638
+ ], Ss.prototype, "onStay");
35639
35639
  zc([
35640
35640
  u(ye)
35641
- ], xs.prototype, "onExit");
35641
+ ], Ss.prototype, "onExit");
35642
35642
  const ww = class Wh extends T {
35643
35643
  /** Global registry of all active spatial triggers in the scene */
35644
35644
  static triggers = [];
@@ -35678,7 +35678,7 @@ const ww = class Wh extends T {
35678
35678
  */
35679
35679
  raiseOnEnterEvent(e) {
35680
35680
  x.foreachComponent(this.gameObject, (t) => {
35681
- t !== e && t instanceof xs && t.onEnterTrigger(this);
35681
+ t !== e && t instanceof Ss && t.onEnterTrigger(this);
35682
35682
  }, !1);
35683
35683
  }
35684
35684
  /**
@@ -35687,7 +35687,7 @@ const ww = class Wh extends T {
35687
35687
  */
35688
35688
  raiseOnStayEvent(e) {
35689
35689
  x.foreachComponent(this.gameObject, (t) => {
35690
- t !== e && t instanceof xs && t.onStayTrigger(this);
35690
+ t !== e && t instanceof Ss && t.onStayTrigger(this);
35691
35691
  }, !1);
35692
35692
  }
35693
35693
  /**
@@ -35696,7 +35696,7 @@ const ww = class Wh extends T {
35696
35696
  */
35697
35697
  raiseOnExitEvent(e) {
35698
35698
  x.foreachComponent(this.gameObject, (t) => {
35699
- t !== e && t instanceof xs && t.onExitTrigger(this);
35699
+ t !== e && t instanceof Ss && t.onExitTrigger(this);
35700
35700
  }, !1);
35701
35701
  }
35702
35702
  };
@@ -35875,8 +35875,8 @@ class Lg extends T {
35875
35875
  const e = this._mode === 0;
35876
35876
  for (const t of je.instances)
35877
35877
  if (t.avatar && "isLocalAvatar" in t.avatar && "flags" in t.avatar) {
35878
- let i = us.All;
35879
- this.isSpectatingSelf && (i = e && t.avatar.isLocalAvatar ? us.FirstPerson : us.ThirdPerson);
35878
+ let i = fs.All;
35879
+ this.isSpectatingSelf && (i = e && t.avatar.isLocalAvatar ? fs.FirstPerson : fs.ThirdPerson);
35880
35880
  const n = t.avatar.flags;
35881
35881
  if (!n) continue;
35882
35882
  for (const o of n)
@@ -35892,7 +35892,7 @@ class Lg extends T {
35892
35892
  const t = e.avatar.flags;
35893
35893
  if (!t) continue;
35894
35894
  for (const i of t)
35895
- "isLocalAvatar" in e.avatar && e.avatar?.isLocalAvatar ? i.UpdateVisible(us.FirstPerson) : i.UpdateVisible(us.ThirdPerson);
35895
+ "isLocalAvatar" in e.avatar && e.avatar?.isLocalAvatar ? i.UpdateVisible(fs.FirstPerson) : i.UpdateVisible(fs.ThirdPerson);
35896
35896
  }
35897
35897
  }
35898
35898
  }
@@ -36268,7 +36268,7 @@ const xw = class em extends T {
36268
36268
  let n = this.remoteCams[t];
36269
36269
  if (!n)
36270
36270
  if ("isObject3D" in this.cameraPrefab) {
36271
- const l = new $n();
36271
+ const l = new Wn();
36272
36272
  l.context = this.context;
36273
36273
  const c = x.instantiate(this.cameraPrefab, l);
36274
36274
  n = this.remoteCams[t] = { obj: c, lastUpdate: this.context.time.realtimeSinceStartup, userId: i }, n.obj.visible = !0, this.gameObject.add(c), this.userToCamMap[i] = t, em.instances.push(n);
@@ -36294,7 +36294,7 @@ var IE = Object.defineProperty, LE = Object.getOwnPropertyDescriptor, Oo = (s, e
36294
36294
  return i && n && IE(e, t, n), n;
36295
36295
  };
36296
36296
  const Gf = "view", qf = w("debugsyncedroom");
36297
- class Qn extends T {
36297
+ class Yn extends T {
36298
36298
  roomName = "";
36299
36299
  urlParameterName = "room";
36300
36300
  joinRandomRoom;
@@ -36441,28 +36441,28 @@ C) Set "joinRandomRoom" to true`), !1) : (qf && console.log("Join " + this.roomN
36441
36441
  }
36442
36442
  Oo([
36443
36443
  u()
36444
- ], Qn.prototype, "roomName", 2);
36444
+ ], Yn.prototype, "roomName", 2);
36445
36445
  Oo([
36446
36446
  u()
36447
- ], Qn.prototype, "urlParameterName", 2);
36447
+ ], Yn.prototype, "urlParameterName", 2);
36448
36448
  Oo([
36449
36449
  u()
36450
- ], Qn.prototype, "joinRandomRoom", 2);
36450
+ ], Yn.prototype, "joinRandomRoom", 2);
36451
36451
  Oo([
36452
36452
  u()
36453
- ], Qn.prototype, "requireRoomParameter", 2);
36453
+ ], Yn.prototype, "requireRoomParameter", 2);
36454
36454
  Oo([
36455
36455
  u()
36456
- ], Qn.prototype, "autoRejoin", 2);
36456
+ ], Yn.prototype, "autoRejoin", 2);
36457
36457
  Oo([
36458
36458
  u()
36459
- ], Qn.prototype, "createJoinButton", 2);
36459
+ ], Yn.prototype, "createJoinButton", 2);
36460
36460
  Oo([
36461
36461
  u()
36462
- ], Qn.prototype, "createViewOnlyButton", 2);
36462
+ ], Yn.prototype, "createViewOnlyButton", 2);
36463
36463
  Oo([
36464
36464
  u()
36465
- ], Qn.prototype, "roomPrefix", 1);
36465
+ ], Yn.prototype, "roomPrefix", 1);
36466
36466
  function DE() {
36467
36467
  const s = w("testwindowcount") || 0;
36468
36468
  s && s > 0 && jE(s);
@@ -36585,11 +36585,11 @@ Tu([
36585
36585
  Tu([
36586
36586
  u(ye)
36587
36587
  ], Eu.prototype, "reaction");
36588
- const Ow = class os extends T {
36588
+ const Ow = class rs extends T {
36589
36589
  static receivers = {};
36590
36590
  static invoke(e) {
36591
- if (os.receivers[e]) {
36592
- const t = os.receivers[e];
36591
+ if (rs.receivers[e]) {
36592
+ const t = rs.receivers[e];
36593
36593
  if (!t) return;
36594
36594
  for (const i of t)
36595
36595
  i.invoke(e);
@@ -36604,15 +36604,15 @@ const Ow = class os extends T {
36604
36604
  onEnable() {
36605
36605
  if (this.events)
36606
36606
  for (const e of this.events)
36607
- os.receivers[e.signal.guid] || (os.receivers[e.signal.guid] = []), os.receivers[e.signal.guid].push(this);
36607
+ rs.receivers[e.signal.guid] || (rs.receivers[e.signal.guid] = []), rs.receivers[e.signal.guid].push(this);
36608
36608
  }
36609
36609
  /** @internal */
36610
36610
  onDisable() {
36611
36611
  if (this.events) {
36612
36612
  for (const e of this.events)
36613
- if (os.receivers[e.signal.guid]) {
36614
- const t = os.receivers[e.signal.guid].indexOf(this);
36615
- t >= 0 && os.receivers[e.signal.guid].splice(t, 1);
36613
+ if (rs.receivers[e.signal.guid]) {
36614
+ const t = rs.receivers[e.signal.guid].indexOf(this);
36615
+ t >= 0 && rs.receivers[e.signal.guid].splice(t, 1);
36616
36616
  }
36617
36617
  }
36618
36618
  }
@@ -36652,7 +36652,7 @@ Tu([
36652
36652
  u(Eu)
36653
36653
  ], Ow.prototype, "events");
36654
36654
  let Au = Ow;
36655
- var Bi = /* @__PURE__ */ ((s) => (s.Activation = "ActivationTrack", s.Animation = "AnimationTrack", s.Audio = "AudioTrack", s.Control = "ControlTrack", s.Marker = "MarkerTrack", s.Signal = "SignalTrack", s))(Bi || {}), rs = /* @__PURE__ */ ((s) => (s[s.None = 0] = "None", s[s.Hold = 1] = "Hold", s[s.Loop = 2] = "Loop", s[s.PingPong = 3] = "PingPong", s[s.Continue = 4] = "Continue", s))(rs || {}), kw = /* @__PURE__ */ ((s) => (s.Signal = "SignalEmitter", s))(kw || {});
36655
+ var Bi = /* @__PURE__ */ ((s) => (s.Activation = "ActivationTrack", s.Animation = "AnimationTrack", s.Audio = "AudioTrack", s.Control = "ControlTrack", s.Marker = "MarkerTrack", s.Signal = "SignalTrack", s))(Bi || {}), as = /* @__PURE__ */ ((s) => (s[s.None = 0] = "None", s[s.Hold = 1] = "Hold", s[s.Loop = 2] = "Loop", s[s.PingPong = 3] = "PingPong", s[s.Continue = 4] = "Continue", s))(as || {}), kw = /* @__PURE__ */ ((s) => (s.Signal = "SignalEmitter", s))(kw || {});
36656
36656
  const An = w("debugtimeline");
36657
36657
  class Iu {
36658
36658
  director;
@@ -36827,15 +36827,15 @@ class jg extends Iu {
36827
36827
  c.weight = 0;
36828
36828
  const d = e >= l.start && e <= l.end, f = l.preExtrapolationMode, p = l.postExtrapolationMode, g = a < this.clips.length - 1 ? this.models[a + 1] : null;
36829
36829
  let _ = d, m = !1;
36830
- if (!_ && !n && l.end < e && p !== rs.None ? (!g || g.start > e) && (_ = !0, n = !0) : a == 0 && !_ && !o && l.start > e && f !== rs.None && (!g || g.start < e) && (_ = !0, m = !0, o = !0), _) {
36830
+ if (!_ && !n && l.end < e && p !== as.None ? (!g || g.start > e) && (_ = !0, n = !0) : a == 0 && !_ && !o && l.start > e && f !== as.None && (!g || g.start < e) && (_ = !0, m = !0, o = !0), _) {
36831
36831
  let v = this.weight;
36832
36832
  v *= this.evaluateWeight(e, a, this.models, _), v *= this.director.weight;
36833
36833
  let y = d;
36834
36834
  if (m)
36835
36835
  switch (f) {
36836
- case rs.Hold:
36836
+ case as.Hold:
36837
36837
  break;
36838
- case rs.Loop:
36838
+ case as.Loop:
36839
36839
  e += l.start, y = !0;
36840
36840
  break;
36841
36841
  default:
@@ -36844,19 +36844,19 @@ class jg extends Iu {
36844
36844
  }
36845
36845
  let S = this.getClipTime(e, l), I = 0;
36846
36846
  const O = h.duration;
36847
- if (m && f === rs.Hold && (S = 0), y) {
36847
+ if (m && f === as.Hold && (S = 0), y) {
36848
36848
  if (h.loop)
36849
36849
  for (I += Math.floor(S / (O + 1e-6)); S > O; )
36850
36850
  S -= O;
36851
36851
  } else if (!d && n)
36852
36852
  switch (p) {
36853
- case rs.Hold:
36853
+ case as.Hold:
36854
36854
  S = this.getClipTime(l.end, l);
36855
36855
  break;
36856
- case rs.Loop:
36856
+ case as.Loop:
36857
36857
  S %= O;
36858
36858
  break;
36859
- case rs.PingPong:
36859
+ case as.PingPong:
36860
36860
  const z = Math.floor(S / O) % 2 !== 0;
36861
36861
  S %= O, z && (S = O - S);
36862
36862
  break;
@@ -37128,7 +37128,7 @@ var $E = Object.defineProperty, Mw = (s, e, t, i) => {
37128
37128
  (r = s[o]) && (n = r(e, t, n) || n);
37129
37129
  return n && $E(e, t, n), n;
37130
37130
  };
37131
- const ts = w("debugtimeline"), Fg = class tm extends T {
37131
+ const is = w("debugtimeline"), Fg = class tm extends T {
37132
37132
  static createTrackFunctions = {};
37133
37133
  static registerCreateTrack(e, t) {
37134
37134
  this.createTrackFunctions[e] = t;
@@ -37149,7 +37149,7 @@ const ts = w("debugtimeline"), Fg = class tm extends T {
37149
37149
  return this._time;
37150
37150
  }
37151
37151
  set time(e) {
37152
- typeof e == "number" && !Number.isNaN(e) ? this._time = e : (ts || ti()) && console.error("INVALID TIMELINE.TIME VALUE", e, this.name);
37152
+ typeof e == "number" && !Number.isNaN(e) ? this._time = e : (is || ti()) && console.error("INVALID TIMELINE.TIME VALUE", e, this.name);
37153
37153
  }
37154
37154
  /** the duration of the timeline */
37155
37155
  get duration() {
@@ -37179,7 +37179,7 @@ const ts = w("debugtimeline"), Fg = class tm extends T {
37179
37179
  _speed = 1;
37180
37180
  /** @internal */
37181
37181
  awake() {
37182
- ts && console.log(this, this.playableAsset?.tracks), this.rebuildGraph(), !this.isValid() && (ts || L()) && (ts ? console.warn("PlayableDirector is not valid", "Asset?", this.playableAsset, "Tracks:", this.playableAsset?.tracks, "IsArray?", Array.isArray(this.playableAsset?.tracks), this) : this.playableAsset?.tracks?.length ? console.warn("PlayableDirector is not valid") : console.warn("PlayableDirector has no tracks"));
37182
+ is && console.log(this, this.playableAsset?.tracks), this.rebuildGraph(), !this.isValid() && (is || L()) && (is ? console.warn("PlayableDirector is not valid", "Asset?", this.playableAsset, "Tracks:", this.playableAsset?.tracks, "IsArray?", Array.isArray(this.playableAsset?.tracks), this) : this.playableAsset?.tracks?.length ? console.warn("PlayableDirector is not valid") : console.warn("PlayableDirector has no tracks"));
37183
37183
  }
37184
37184
  /** @internal */
37185
37185
  onEnable() {
@@ -37238,7 +37238,7 @@ const ts = w("debugtimeline"), Fg = class tm extends T {
37238
37238
  if (t.length > 0 && (await Promise.all(t), !this._isPlaying))
37239
37239
  return;
37240
37240
  for (; this._audioTracks.length > 0 && this._isPlaying && !hn.userInteractionRegistered && this.waitForAudio; )
37241
- await Os(200);
37241
+ await ks(200);
37242
37242
  }
37243
37243
  this.invokeStateChangedMethodsOnTracks(), this._internalUpdateRoutine = this.startCoroutine(this.internalUpdate(), xe.LateUpdate);
37244
37244
  }
@@ -37364,7 +37364,7 @@ const ts = w("debugtimeline"), Fg = class tm extends T {
37364
37364
  for (const c of n.clips)
37365
37365
  c.start <= i && i <= c.end && (a = !0);
37366
37366
  const l = r;
37367
- l.visible !== void 0 && l.visible !== a && (l.visible = a, ts && console.warn(this.name, "set ActivationTrack-" + o, l.name, a, i));
37367
+ l.visible !== void 0 && l.visible !== a && (l.visible = a, is && console.warn(this.name, "set ActivationTrack-" + o, l.name, a, i));
37368
37368
  }
37369
37369
  }
37370
37370
  break;
@@ -37390,7 +37390,7 @@ const ts = w("debugtimeline"), Fg = class tm extends T {
37390
37390
  if (typeof n == "string") {
37391
37391
  this._guidsMap && this._guidsMap[n] && (n = this._guidsMap[n]);
37392
37392
  const o = x.findByGuid(n, e);
37393
- o === null || typeof o != "object" ? (t.outputs.splice(i, 1), console.warn("Failed to resolve binding", n, t.name, t.type)) : (ts && console.log("Resolved binding", n, "to", o), t.outputs[i] = o);
37393
+ o === null || typeof o != "object" ? (t.outputs.splice(i, 1), console.warn("Failed to resolve binding", n, t.name, t.type)) : (is && console.log("Resolved binding", n, "to", o), t.outputs[i] = o);
37394
37394
  } else if (n === null) {
37395
37395
  if (t.outputs.splice(i, 1), tm.createTrackFunctions[t.type])
37396
37396
  continue;
@@ -37404,7 +37404,7 @@ const ts = w("debugtimeline"), Fg = class tm extends T {
37404
37404
  if (typeof o == "string") {
37405
37405
  this._guidsMap && this._guidsMap[o] && (o = this._guidsMap[o]);
37406
37406
  const r = x.findByGuid(o, e);
37407
- r === null || typeof r != "object" ? console.warn("Failed to resolve sourceObject binding", o, t.name, n) : (ts && console.log("Resolved binding", o, "to", r), n.asset.sourceObject = r);
37407
+ r === null || typeof r != "object" ? console.warn("Failed to resolve sourceObject binding", o, t.name, n) : (is && console.log("Resolved binding", o, "to", r), n.asset.sourceObject = r);
37408
37408
  }
37409
37409
  }
37410
37410
  }
@@ -37439,7 +37439,7 @@ const ts = w("debugtimeline"), Fg = class tm extends T {
37439
37439
  }
37440
37440
  if (t.type === Bi.Animation) {
37441
37441
  if (!t.clips || t.clips.length <= 0) {
37442
- ts && console.warn("Animation track has no clips", t);
37442
+ is && console.warn("Animation track has no clips", t);
37443
37443
  continue;
37444
37444
  }
37445
37445
  for (let o = t.outputs.length - 1; o >= 0; o--) {
@@ -37460,7 +37460,7 @@ const ts = w("debugtimeline"), Fg = class tm extends T {
37460
37460
  }
37461
37461
  const f = d.clip;
37462
37462
  let p = f;
37463
- if ((typeof p == "string" || typeof p == "number") && (p = a.find((_) => _.name === f)), ts && console.log(d, f, "→", p), !p) {
37463
+ if ((typeof p == "string" || typeof p == "number") && (p = a.find((_) => _.name === f)), is && console.log(d, f, "→", p), !p) {
37464
37464
  console.warn("Could not find animationClip for model", h, t.name, this.name, this.playableAsset?.name, a, r);
37465
37465
  continue;
37466
37466
  }
@@ -37573,7 +37573,7 @@ class qa extends T {
37573
37573
  * This applies the translationSnap, rotationSnapAngle, and scaleSnap properties to the controls.
37574
37574
  */
37575
37575
  enableSnapping() {
37576
- this._control && (this._control.setTranslationSnap(this.translationSnap), this._control.setRotationSnap(gs.degToRad(this.rotationSnapAngle)), this._control.setScaleSnap(this.scaleSnap));
37576
+ this._control && (this._control.setTranslationSnap(this.translationSnap), this._control.setRotationSnap(ys.degToRad(this.rotationSnapAngle)), this._control.setScaleSnap(this.scaleSnap));
37577
37577
  }
37578
37578
  /**
37579
37579
  * Disables grid snapping for transform operations.
@@ -37590,8 +37590,11 @@ class qa extends T {
37590
37590
  onControlChangedEvent = (e) => {
37591
37591
  const t = this.orbit;
37592
37592
  if (t && (t.enabled = !e.value), e.value) {
37593
- const i = x.getComponentInParent(this.gameObject, ks);
37594
- i && i.requestOwnership();
37593
+ const i = x.getComponentInParent(this.gameObject, Un);
37594
+ i && (i.fastMode = !0, i.requestOwnership());
37595
+ } else {
37596
+ const i = x.getComponentInParent(this.gameObject, Un);
37597
+ i && (i.fastMode = !1);
37595
37598
  }
37596
37599
  };
37597
37600
  /**
@@ -38522,7 +38525,7 @@ function iA(s, e) {
38522
38525
  if (t.has(s))
38523
38526
  return;
38524
38527
  t.add(s), Y_.set(e, t), console.debug("Initialize texture for camera feed");
38525
- const i = new we(), n = new Nn(), o = new bi();
38528
+ const i = new we(), n = new $n(), o = new bi();
38526
38529
  o.add(new H(n, i));
38527
38530
  const r = new pe();
38528
38531
  i.map = e, s.render(o, r);
@@ -38560,7 +38563,7 @@ function Lw(s) {
38560
38563
  if (A?.onBeforeRender(), A.isInstancingActive && A.instances)
38561
38564
  for (let U = 0; U < A.instances?.length; U++) {
38562
38565
  const W = A.instances[U];
38563
- hs(W.object, !0);
38566
+ ds(W.object, !0);
38564
38567
  }
38565
38568
  })), e && (i.scene.background = null, a.setClearColor(0, 0)), s.background && (i.scene.background = null, a.setClearColor(s.background), s.background instanceof oe && a.setClearAlpha(s.background.a)), e && a.setClearAlpha(0), a.setSize(n, o, !1), "cam" in r && (r = r.threeCamera), r instanceof pe && (r.aspect = n / o, r.updateProjectionMatrix());
38566
38569
  const z = "type" in s && s.type === "texture";
@@ -38676,7 +38679,7 @@ var Cd;
38676
38679
  let e = null, t = null, i = null, n = null, o = null;
38677
38680
  function r(c) {
38678
38681
  const { renderer: h, width: d, height: f } = c, p = h.xr.enabled, g = h.getRenderTarget(), _ = h.autoClear, m = d, v = f, y = d / f;
38679
- (!i || i.width !== m || i.height !== v) && (i ??= new Bn(m, v, { colorSpace: Cs }), i.width = m, i.height = v, i.samples = 4, i.texture.repeat.y = -1, i.texture.offset.y = 1), (!o || o.width !== m || o.height !== v) && (o = document.createElement("canvas"), o.width = m, o.height = v, o.style.position = "fixed", o.style.top = "0px", o.style.right = "0px", o.style.width = "300px", o.style.height = `${300 / y}px`, o.style.zIndex = "1000", o.style.pointerEvents = "none", o.style.opacity = "1.0", o.style.willChange = "contents"), e || (e = l({
38682
+ (!i || i.width !== m || i.height !== v) && (i ??= new Bn(m, v, { colorSpace: Ps }), i.width = m, i.height = v, i.samples = 4, i.texture.repeat.y = -1, i.texture.offset.y = 1), (!o || o.width !== m || o.height !== v) && (o = document.createElement("canvas"), o.width = m, o.height = v, o.style.position = "fixed", o.style.top = "0px", o.style.right = "0px", o.style.width = "300px", o.style.height = `${300 / y}px`, o.style.zIndex = "1000", o.style.pointerEvents = "none", o.style.opacity = "1.0", o.style.willChange = "contents"), e || (e = l({
38680
38683
  defines: {
38681
38684
  DECODE_VIDEO_TEXTURE: !0
38682
38685
  }
@@ -38725,7 +38728,7 @@ void main() {
38725
38728
  return this.threeTexture;
38726
38729
  }
38727
38730
  });
38728
- const d = new H(new Nn(2, 2), h);
38731
+ const d = new H(new $n(2, 2), h);
38729
38732
  return ap(d, !1), d.geometry.deleteAttribute("normal"), d.renderOrder = -1e6, d.setTexture = function(f) {
38730
38733
  h.uniforms.t2D.value = f;
38731
38734
  }, d;
@@ -38760,7 +38763,7 @@ class zu extends T {
38760
38763
  backgroundPlane;
38761
38764
  threeTexture;
38762
38765
  forceTextureInitialization = (function() {
38763
- const e = new we(), t = new Nn(), i = new bi();
38766
+ const e = new we(), t = new $n(), i = new bi();
38764
38767
  i.add(new H(t, e));
38765
38768
  const n = new pe();
38766
38769
  return function(r, a) {
@@ -38934,7 +38937,7 @@ class cA {
38934
38937
  if (!(!n || !n.trackedImages)) {
38935
38938
  for (const o of n.trackedImages)
38936
38939
  if (o.object?.asset === e) {
38937
- const r = x.findObjectOfType(ws);
38940
+ const r = x.findObjectOfType(xs);
38938
38941
  if (!r) continue;
38939
38942
  const { scale: a, target: l } = r.getARScaleAndTarget();
38940
38943
  let c = e;
@@ -38971,7 +38974,7 @@ const Wg = class jl extends T {
38971
38974
  jl._imageElements.set(t, n);
38972
38975
  const o = await NM(n);
38973
38976
  if (o) {
38974
- const a = await (await o.convertToBlob({ type: "image/png" })).arrayBuffer(), l = x.findObjectOfType(ws);
38977
+ const a = await (await o.convertToBlob({ type: "image/png" })).arrayBuffer(), l = x.findObjectOfType(xs);
38975
38978
  l && this.trackedImages && (l.extensions.push(
38976
38979
  new cA("marker.png", new Uint8Array(a), this.trackedImages[0].widthInMeters)
38977
38980
  ), l.anchoringType = "image");
@@ -39460,7 +39463,7 @@ P.add("PreliminaryAction", Pc);
39460
39463
  P.add("PreliminaryTrigger", cu);
39461
39464
  P.add("VisibilityAction", hu);
39462
39465
  P.add("TapGestureTrigger", Dv);
39463
- P.add("USDZExporter", ws);
39466
+ P.add("USDZExporter", xs);
39464
39467
  P.add("Fog", Mc);
39465
39468
  P.add("BoxGizmo", Ua);
39466
39469
  P.add("GridHelper", Rc);
@@ -39485,11 +39488,11 @@ P.add("Antialiasing", xu);
39485
39488
  P.add("BloomEffect", Mg);
39486
39489
  P.add("ChromaticAberration", Cu);
39487
39490
  P.add("ColorAdjustments", xr);
39488
- P.add("DepthOfField", qn);
39491
+ P.add("DepthOfField", Xn);
39489
39492
  P.add("EffectWrapper", vd);
39490
39493
  P.add("PixelationEffect", Ou);
39491
39494
  P.add("ScreenSpaceAmbientOcclusion", Po);
39492
- P.add("ScreenSpaceAmbientOcclusionN8", Xn);
39495
+ P.add("ScreenSpaceAmbientOcclusionN8", Qn);
39493
39496
  P.add("SharpeningEffect", ku);
39494
39497
  P.add("TiltShiftEffect", Ds);
39495
39498
  P.add("ToneMappingEffect", cr);
@@ -39505,13 +39508,13 @@ P.add("ScreenCapture", Pr);
39505
39508
  P.add("ShadowCatcher", Mu);
39506
39509
  P.add("RemoteSkybox", Eg);
39507
39510
  P.add("SmoothFollow", Ag);
39508
- P.add("SpatialTriggerReceiver", xs);
39511
+ P.add("SpatialTriggerReceiver", Ss);
39509
39512
  P.add("SpatialTrigger", Ig);
39510
39513
  P.add("SpectatorCamera", Lg);
39511
39514
  P.add("SpriteRenderer", Ci);
39512
39515
  P.add("SyncedCamera", Sw);
39513
- P.add("SyncedRoom", Qn);
39514
- P.add("SyncedTransform", ks);
39516
+ P.add("SyncedRoom", Yn);
39517
+ P.add("SyncedTransform", Un);
39515
39518
  P.add("TestRunner", Cw);
39516
39519
  P.add("TestSimulateUserData", Pw);
39517
39520
  P.add("PlayableDirector", fc);
@@ -39539,7 +39542,7 @@ P.add("Outline", kc);
39539
39542
  P.add("ObjectRaycaster", Gi);
39540
39543
  P.add("GraphicRaycaster", Hm);
39541
39544
  P.add("SpatialGrabRaycaster", Ca);
39542
- P.add("RectTransform", Un);
39545
+ P.add("RectTransform", Nn);
39543
39546
  P.add("SpatialHtml", Bu);
39544
39547
  P.add("Text", Xt);
39545
39548
  P.add("EnvironmentScene", Ng);
@@ -39691,7 +39694,7 @@ async function Bw(s, e) {
39691
39694
  case "unknown": {
39692
39695
  console.warn(`Unknown file type (${t}). Needle Engine will fallback to the GLTFLoader - To support more model formats please create a Needle loader plugin.
39693
39696
  Use import { NeedleEngineModelLoader } from "@needle-tools/engine" namespace to register your loader.`, s);
39694
- const i = new Ps();
39697
+ const i = new Os();
39695
39698
  return await jp(i, e, s), i;
39696
39699
  }
39697
39700
  case "model/fbx":
@@ -39706,7 +39709,7 @@ Use import { NeedleEngineModelLoader } from "@needle-tools/engine" namespace to
39706
39709
  case "model/gltf+json":
39707
39710
  case "model/gltf-binary":
39708
39711
  case "model/vrm": {
39709
- const i = new Ps();
39712
+ const i = new Os();
39710
39713
  return await jp(i, e, s), i;
39711
39714
  }
39712
39715
  }
@@ -39725,7 +39728,7 @@ async function vA(s, e, t, i) {
39725
39728
  const a = n.parse(e);
39726
39729
  return await Yl(n, s, t, a, i, o);
39727
39730
  }
39728
- if (!(n instanceof Ps)) {
39731
+ if (!(n instanceof Os)) {
39729
39732
  if (n.parse === void 0) {
39730
39733
  console.error("Loader does not support parse");
39731
39734
  return;
@@ -39755,7 +39758,7 @@ async function Fw(s, e, t, i, n) {
39755
39758
  if (!o)
39756
39759
  return;
39757
39760
  const { componentsExtension: r } = zw(o, s);
39758
- if (!(o instanceof Ps)) {
39761
+ if (!(o instanceof Os)) {
39759
39762
  const a = await o.loadAsync(e, n);
39760
39763
  return await Yl(o, s, e, a, i, r);
39761
39764
  }
@@ -39777,7 +39780,7 @@ async function Fw(s, e, t, i, n) {
39777
39780
  }
39778
39781
  function zw(s, e) {
39779
39782
  const t = mv(s);
39780
- return s instanceof Ps && Nm(s, e), { componentsExtension: t };
39783
+ return s instanceof Os && Nm(s, e), { componentsExtension: t };
39781
39784
  }
39782
39785
  async function Yl(s, e, t, i, n, o) {
39783
39786
  if (jw && console.warn("Loaded", t, i), i == null)
@@ -40012,7 +40015,7 @@ class Od {
40012
40015
  Ho && !e && console.log("Creating loading element"), this._loadingElement = e || document.createElement("div");
40013
40016
  let t = this._element.getAttribute("loading-style");
40014
40017
  (!t || t === "auto") && (window.matchMedia("(prefers-color-scheme: dark)").matches ? t = "dark" : t = "light");
40015
- const i = bs();
40018
+ const i = vs();
40016
40019
  if (!e) {
40017
40020
  this._loadingElement.style.position = "absolute", this._loadingElement.style.width = "100%", this._loadingElement.style.height = "100%", this._loadingElement.style.left = "0", this._loadingElement.style.top = "0";
40018
40021
  const f = this._element.getAttribute("loading-background");
@@ -40058,12 +40061,12 @@ class Od {
40058
40061
  return this.handleRuntimeLicense(this._loadingElement), this._loadingElement;
40059
40062
  }
40060
40063
  async handleRuntimeLicense(e) {
40061
- let t = vs();
40064
+ let t = ws();
40062
40065
  if (t) return;
40063
40066
  eb && console.log("Loading UI has commercial license?", t);
40064
40067
  const i = document.createElement("div");
40065
40068
  i.style.paddingTop = ".6em", i.style.fontSize = ".8em", i.style.textTransform = "uppercase", i.innerText = `NEEDLE ENGINE NON COMMERCIAL VERSION
40066
- CLICK HERE TO GET A LICENSE`, i.style.cursor = "pointer", i.style.userSelect = "none", i.style.textAlign = "center", i.style.pointerEvents = "all", i.addEventListener("click", () => window.open("https://needle.tools/pricing", "_self")), i.style.opacity = "0", e.appendChild(i), !L() && xa && (eb && console.log("Waiting for runtime license check"), await xa, t = vs()), !t && (i.style.transition = "opacity .5s ease-in-out", i.style.opacity = "1");
40069
+ CLICK HERE TO GET A LICENSE`, i.style.cursor = "pointer", i.style.userSelect = "none", i.style.textAlign = "center", i.style.pointerEvents = "all", i.addEventListener("click", () => window.open("https://needle.tools/pricing", "_self")), i.style.opacity = "0", e.appendChild(i), !L() && xa && (eb && console.log("Waiting for runtime license check"), await xa, t = ws()), !t && (i.style.transition = "opacity .5s ease-in-out", i.style.opacity = "1");
40067
40070
  }
40068
40071
  }
40069
40072
  Kb(Dw);
@@ -40322,7 +40325,7 @@ changed from "`, t, '" to "', i, '"'), this.onLoad();
40322
40325
  return;
40323
40326
  const i = this.getAttribute("alias");
40324
40327
  this.classList.add("loading");
40325
- const n = vs();
40328
+ const n = ws();
40326
40329
  this.ensureLoadStartIsRegistered();
40327
40330
  let o = this.dispatchEvent(new CustomEvent("loadstart", {
40328
40331
  detail: {
@@ -41413,7 +41416,7 @@ class dL {
41413
41416
  }
41414
41417
  if (m) {
41415
41418
  const v = await m.loadAsync(l).catch((y) => (console.error(y), null));
41416
- v && (v.mapping = _s, v.needsUpdate = !0, o.background = v, o.environment = v, o.backgroundBlurriness = 0.75);
41419
+ v && (v.mapping = bs, v.needsUpdate = !0, o.background = v, o.environment = v, o.backgroundBlurriness = 0.75);
41417
41420
  } else console.warn("Unsupported environment map format", l);
41418
41421
  }
41419
41422
  const c = wi(o.children), h = c.getCenter(new b()), d = c.getSize(new b()), p = Math.max(d.x, d.y, d.z) / (2 * Math.tan(Math.PI * a.fov / 360));
@@ -41623,7 +41626,7 @@ class FA {
41623
41626
  let i = null;
41624
41627
  if (typeof t == "string") {
41625
41628
  if (i = await this.loadAvatar(e, t), !i) {
41626
- const o = new $n();
41629
+ const o = new Wn();
41627
41630
  i = x.instantiate(Jl(t, e.scene), o);
41628
41631
  }
41629
41632
  } else i = t;
@@ -41649,7 +41652,7 @@ class FA {
41649
41652
  }
41650
41653
  return o ? (await Fn().parseSync(e, o, null, 0))?.scene ?? null : null;
41651
41654
  }
41652
- const i = new Ps();
41655
+ const i = new Os();
41653
41656
  return Nm(i, e), new Promise((n, o) => {
41654
41657
  const r = this.avatarRegistryUrl + "/" + t;
41655
41658
  i.load(
@@ -41792,7 +41795,7 @@ const pL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
41792
41795
  CustomBranding: za,
41793
41796
  Deletable: ov,
41794
41797
  DeleteBox: Jo,
41795
- DepthOfField: qn,
41798
+ DepthOfField: Xn,
41796
41799
  DeviceFlag: Jm,
41797
41800
  DocumentExtension: zA,
41798
41801
  DragControls: Hr,
@@ -41867,7 +41870,7 @@ const pL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
41867
41870
  PreliminaryTrigger: cu,
41868
41871
  RawImage: Ug,
41869
41872
  Rect: SR,
41870
- RectTransform: Un,
41873
+ RectTransform: Nn,
41871
41874
  ReflectionProbe: md,
41872
41875
  RegisteredAnimationInfo: Go,
41873
41876
  RemoteSkybox: Eg,
@@ -41875,11 +41878,11 @@ const pL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
41875
41878
  RendererLightmap: Bp,
41876
41879
  Rigidbody: ft,
41877
41880
  RotationBySpeedModule: pn,
41878
- RotationOverLifetimeModule: Gn,
41881
+ RotationOverLifetimeModule: qn,
41879
41882
  SceneSwitcher: Ze,
41880
41883
  ScreenCapture: Pr,
41881
41884
  ScreenSpaceAmbientOcclusion: Po,
41882
- ScreenSpaceAmbientOcclusionN8: Xn,
41885
+ ScreenSpaceAmbientOcclusionN8: Qn,
41883
41886
  SetActiveOnClick: Lv,
41884
41887
  ShadowCatcher: Mu,
41885
41888
  ShapeModule: iw,
@@ -41896,7 +41899,7 @@ const pL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
41896
41899
  SpatialGrabRaycaster: Ca,
41897
41900
  SpatialHtml: Bu,
41898
41901
  SpatialTrigger: Ig,
41899
- SpatialTriggerReceiver: xs,
41902
+ SpatialTriggerReceiver: Ss,
41900
41903
  SpectatorCamera: Lg,
41901
41904
  SphereCollider: wc,
41902
41905
  Sprite: bo,
@@ -41905,8 +41908,8 @@ const pL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
41905
41908
  SpriteSheet: cc,
41906
41909
  SubEmitterSystem: Yp,
41907
41910
  SyncedCamera: Sw,
41908
- SyncedRoom: Qn,
41909
- SyncedTransform: ks,
41911
+ SyncedRoom: Yn,
41912
+ SyncedTransform: Un,
41910
41913
  TapGestureTrigger: Dv,
41911
41914
  TeleportTarget: ug,
41912
41915
  TestRunner: Cw,
@@ -41924,7 +41927,7 @@ const pL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
41924
41927
  TriggerModel: er,
41925
41928
  UIRaycastUtils: q0,
41926
41929
  UIRootComponent: pu,
41927
- USDZExporter: ws,
41930
+ USDZExporter: xs,
41928
41931
  USDZText: Rl,
41929
41932
  USDZUIExtension: Zv,
41930
41933
  UsageMarker: su,
@@ -42129,7 +42132,7 @@ export {
42129
42132
  Cu as ChromaticAberration,
42130
42133
  Vi as CircularBuffer,
42131
42134
  sa as ClearFlags,
42132
- rs as ClipExtrapolation,
42135
+ as as ClipExtrapolation,
42133
42136
  Si as Collider,
42134
42137
  yk as Collision,
42135
42138
  Wm as CollisionDetectionMode,
@@ -42153,7 +42156,7 @@ export {
42153
42156
  Pp as DefaultReflectionMode,
42154
42157
  ov as Deletable,
42155
42158
  Jo as DeleteBox,
42156
- qn as DepthOfField,
42159
+ Xn as DepthOfField,
42157
42160
  Jm as DeviceFlag,
42158
42161
  q as DeviceUtilities,
42159
42162
  zA as DocumentExtension,
@@ -42209,7 +42212,7 @@ export {
42209
42212
  an as InstancingUtil,
42210
42213
  Q1 as InstantiateEvent,
42211
42214
  Et as InstantiateIdProvider,
42212
- $n as InstantiateOptions,
42215
+ Wn as InstantiateOptions,
42213
42216
  sv as Interactable,
42214
42217
  Cd as InternalScreenshotUtils,
42215
42218
  kI as JoinedRoomResponse,
@@ -42248,7 +42251,7 @@ export {
42248
42251
  A1 as NeedleXRUtils,
42249
42252
  xg as NestedGltf,
42250
42253
  w1 as NetworkConnection,
42251
- ps as NetworkedStreamEvents,
42254
+ ms as NetworkedStreamEvents,
42252
42255
  Jd as NetworkedStreams,
42253
42256
  ew as Networking,
42254
42257
  Z1 as NewInstanceModel,
@@ -42303,11 +42306,11 @@ export {
42303
42306
  Ug as RawImage,
42304
42307
  pr as RaycastOptions,
42305
42308
  SR as Rect,
42306
- Un as RectTransform,
42309
+ Nn as RectTransform,
42307
42310
  md as ReflectionProbe,
42308
42311
  Go as RegisteredAnimationInfo,
42309
42312
  Eg as RemoteSkybox,
42310
- fs as RenderTexture,
42313
+ ps as RenderTexture,
42311
42314
  ZO as RenderTextureSerializer,
42312
42315
  qi as Renderer,
42313
42316
  eO as RendererData,
@@ -42316,12 +42319,12 @@ export {
42316
42319
  qe as RigidbodyConstraints,
42317
42320
  ee as RoomEvents,
42318
42321
  pn as RotationBySpeedModule,
42319
- Gn as RotationOverLifetimeModule,
42322
+ qn as RotationOverLifetimeModule,
42320
42323
  Dp as SceneLightSettings,
42321
42324
  Ze as SceneSwitcher,
42322
42325
  Pr as ScreenCapture,
42323
42326
  Po as ScreenSpaceAmbientOcclusion,
42324
- Xn as ScreenSpaceAmbientOcclusionN8,
42327
+ Qn as ScreenSpaceAmbientOcclusionN8,
42325
42328
  xn as SendQueue,
42326
42329
  x0 as SerializationContext,
42327
42330
  Lv as SetActiveOnClick,
@@ -42341,7 +42344,7 @@ export {
42341
42344
  Ca as SpatialGrabRaycaster,
42342
42345
  Bu as SpatialHtml,
42343
42346
  Ig as SpatialTrigger,
42344
- xs as SpatialTriggerReceiver,
42347
+ Ss as SpatialTriggerReceiver,
42345
42348
  Lg as SpectatorCamera,
42346
42349
  wc as SphereCollider,
42347
42350
  a0 as SphereIntersection,
@@ -42354,8 +42357,8 @@ export {
42354
42357
  bk as StreamReceivedEvent,
42355
42358
  Yp as SubEmitterSystem,
42356
42359
  Sw as SyncedCamera,
42357
- Qn as SyncedRoom,
42358
- ks as SyncedTransform,
42360
+ Yn as SyncedRoom,
42361
+ Un as SyncedTransform,
42359
42362
  Dv as TapGestureTrigger,
42360
42363
  ug as TeleportTarget,
42361
42364
  Cw as TestRunner,
@@ -42381,7 +42384,7 @@ export {
42381
42384
  Ov as USDDocument,
42382
42385
  st as USDObject,
42383
42386
  LM as USDWriter,
42384
- ws as USDZExporter,
42387
+ xs as USDZExporter,
42385
42388
  jM as USDZExporter$1,
42386
42389
  Rl as USDZText,
42387
42390
  Zv as USDZUIExtension,
@@ -42418,7 +42421,7 @@ export {
42418
42421
  rn as XRFlag,
42419
42422
  Vg as XRRig,
42420
42423
  Jt as XRState,
42421
- us as XRStateFlag,
42424
+ fs as XRStateFlag,
42422
42425
  UA as __Ignore,
42423
42426
  U1 as __internalNotifyObjectDestroyed,
42424
42427
  ro as activeInHierarchyFieldName,
@@ -42446,14 +42449,14 @@ export {
42446
42449
  Yc as debugOwner,
42447
42450
  FM as decompressGpuTexture,
42448
42451
  Bd as deepClone,
42449
- Os as delay,
42452
+ ks as delay,
42450
42453
  Fd as delayForFrames,
42451
42454
  vp as deserializeObject,
42452
42455
  Hi as destroy,
42453
42456
  MP as destroyComponentInstance,
42454
42457
  Vk as determineMimeTypeFromExtension,
42455
42458
  Oe as disposeObjectResources,
42456
- ms as disposeStream,
42459
+ gs as disposeStream,
42457
42460
  Oh as editorGuidKeyName,
42458
42461
  Yr as enableSpatialConsole,
42459
42462
  KI as euler,
@@ -42499,10 +42502,10 @@ export {
42499
42502
  be as getWorldQuaternion,
42500
42503
  vm as getWorldRotation,
42501
42504
  $e as getWorldScale,
42502
- vs as hasCommercialLicense,
42505
+ ws as hasCommercialLicense,
42503
42506
  Qd as hasIndieLicense,
42504
42507
  Ap as hasPointerEventComponent,
42505
- bs as hasProLicense,
42508
+ vs as hasProLicense,
42506
42509
  XC as hideDebugConsole,
42507
42510
  NM as imageToCanvas,
42508
42511
  va as instantiate,