@needle-tools/engine 4.9.3-next.002c20b → 4.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { Vector2 as J, Vector3 as _, Vector4 as fe, Quaternion as U, PlaneGeometry as Nn, WebGLRenderer as mr, PerspectiveCamera as de, OrthographicCamera as zd, Scene as wi, Mesh as G, Texture as Te, Uniform$1 as $i, Color as se, ShaderMaterial as Ln, Box3 as bi, ShadowMaterial as Sb, Euler as ot, MeshStandardMaterial as ut, Box3Helper as lx, GridHelper as bm, Object3D as M, Material as _e, Matrix3 as Cb, Matrix4 as ee, Layers as ho, Ray as uo, MathUtils as ys, AxesHelper as vi, MeshBasicMaterial as we, DoubleSide as xi, BufferGeometry as an, Group as so, CylinderGeometry as Pb, SphereGeometry as Ud, BoxGeometry as pa, SpriteMaterial as cx, Sprite as hx, Shape as dx, ExtrudeGeometry as ux, Fog as Ob, DirectionalLight as fp, PointLight as vm, EdgesGeometry as fx, LineSegments as kb, LineBasicMaterial as wm, Line as ma, BufferAttribute as ft, Raycaster as Nd, Sphere as $d, ArrayCamera as px, Plane as rr, SkinnedMesh as oo, InterleavedBufferAttribute as Mb, Skeleton as mx, Bone as gx, WebGLCubeRenderTarget as yx, CubeCamera as _x, AnimationClip as ro, FileLoader as xm, TextureLoader as lc, PropertyBinding as ga, LinearSRGBColorSpace as Ss, ShaderChunk as Ht, UniformsLib as bx, DataTexture as Sm, RGBAFormat as Wd, EquirectangularReflectionMapping as _s, SRGBColorSpace as Cs, Clock as vx, NeutralToneMapping as ya, AgXToneMapping as Vd, ACESFilmicToneMapping as Hd, NoToneMapping as id, PCFSoftShadowMap$1 as wx, BasicNodeLibrary as xx, WebGLRenderTarget as Dn, DepthTexture as Rb, NearestFilter as nd, LoopRepeat as Sx, LoopOnce as pp, AnimationMixer as Cm, CompressedTexture as Cx, FrontSide as fo, Camera as Px, Frustum as ay, AudioListener as Ox, PositionalAudio as kx, AudioLoader as mp, EventDispatcher as Pm, BackSide as Gd, MeshDepthMaterial as Mx, CustomBlending as Rx, MaxEquation as Tx, AmbientLight as Ex, HemisphereLight as Ax, AlwaysStencilFunc as Ix, GreaterEqualStencilFunc as Lx, NotEqualStencilFunc as Dx, GreaterStencilFunc as jx, LessEqualStencilFunc as Bx, EqualStencilFunc as Fx, LessStencilFunc as zx, NeverStencilFunc as ly, InvertStencilOp as Ux, DecrementWrapStencilOp as Nx, IncrementWrapStencilOp as $x, DecrementStencilOp as Wx, IncrementStencilOp as Vx, ReplaceStencilOp as Hx, ZeroStencilOp as Gx, KeepStencilOp as qx, RawShaderMaterial as Tb, GLSL3 as Xx, AlwaysDepth as Qx, GreaterEqualDepth as Yx, GreaterDepth as Kx, LessEqualDepth as Zx, LessDepth as Jx, NotEqualDepth as eS, EqualDepth as tS, BatchedMesh as cy, MeshPhysicalMaterial as gp, LinearFilter as sd, UnsignedByteType as iS, RingGeometry as nS, Line3 as sS, AdditiveBlending as Eb, BoxHelper as oS, SpotLight as rS, DirectionalLightHelper as aS, CameraHelper as lS, LOD as cS, Triangle as hS, NormalBlending as dS, ReinhardToneMapping as Om, LinearToneMapping as km, HalfFloatType as tf, VideoTexture as uS, CubeUVReflectionMapping as Ab, CubeTexture as fS, CompressedCubeTexture as pS, EquirectangularRefractionMapping as mS, CatmullRomCurve3 as gS, VectorKeyframeTrack as yS, QuaternionKeyframeTrack as _S, Audio as bS, ShaderLib as od, UniformsUtils as Ib, MirroredRepeatWrapping as hy, MeshNormalMaterial as vS, AudioContext as wS, PMREMGenerator$1 as xS } from "./three-CsHK73Zc.js";
1
+ import { Vector2 as J, Vector3 as y, Vector4 as fe, Quaternion as U, PlaneGeometry as Nn, WebGLRenderer as mr, PerspectiveCamera as de, OrthographicCamera as zd, Scene as wi, Mesh as G, Texture as Te, Uniform$1 as $i, Color as se, ShaderMaterial as Ln, Box3 as bi, ShadowMaterial as Sb, Euler as ot, MeshStandardMaterial as ut, Box3Helper as lx, GridHelper as bm, Object3D as M, Material as _e, Matrix3 as Cb, Matrix4 as ee, Layers as ho, Ray as uo, MathUtils as ys, AxesHelper as vi, MeshBasicMaterial as we, DoubleSide as xi, BufferGeometry as an, Group as so, CylinderGeometry as Pb, SphereGeometry as Ud, BoxGeometry as pa, SpriteMaterial as cx, Sprite as hx, Shape as dx, ExtrudeGeometry as ux, Fog as Ob, DirectionalLight as fp, PointLight as vm, EdgesGeometry as fx, LineSegments as kb, LineBasicMaterial as wm, Line as ma, BufferAttribute as ft, Raycaster as Nd, Sphere as $d, ArrayCamera as px, Plane as rr, SkinnedMesh as oo, InterleavedBufferAttribute as Mb, Skeleton as mx, Bone as gx, WebGLCubeRenderTarget as yx, CubeCamera as _x, AnimationClip as ro, FileLoader as xm, TextureLoader as lc, PropertyBinding as ga, LinearSRGBColorSpace as Ss, ShaderChunk as Ht, UniformsLib as bx, DataTexture as Sm, RGBAFormat as Wd, EquirectangularReflectionMapping as _s, SRGBColorSpace as Cs, Clock as vx, NeutralToneMapping as ya, AgXToneMapping as Vd, ACESFilmicToneMapping as Hd, NoToneMapping as id, PCFSoftShadowMap$1 as wx, BasicNodeLibrary as xx, WebGLRenderTarget as Dn, DepthTexture as Rb, NearestFilter as nd, LoopRepeat as Sx, LoopOnce as pp, AnimationMixer as Cm, CompressedTexture as Cx, FrontSide as fo, Camera as Px, Frustum as ay, AudioListener as Ox, PositionalAudio as kx, AudioLoader as mp, EventDispatcher as Pm, BackSide as Gd, MeshDepthMaterial as Mx, CustomBlending as Rx, MaxEquation as Tx, AmbientLight as Ex, HemisphereLight as Ax, AlwaysStencilFunc as Ix, GreaterEqualStencilFunc as Lx, NotEqualStencilFunc as Dx, GreaterStencilFunc as jx, LessEqualStencilFunc as Bx, EqualStencilFunc as Fx, LessStencilFunc as zx, NeverStencilFunc as ly, InvertStencilOp as Ux, DecrementWrapStencilOp as Nx, IncrementWrapStencilOp as $x, DecrementStencilOp as Wx, IncrementStencilOp as Vx, ReplaceStencilOp as Hx, ZeroStencilOp as Gx, KeepStencilOp as qx, RawShaderMaterial as Tb, GLSL3 as Xx, AlwaysDepth as Qx, GreaterEqualDepth as Yx, GreaterDepth as Kx, LessEqualDepth as Zx, LessDepth as Jx, NotEqualDepth as eS, EqualDepth as tS, BatchedMesh as cy, MeshPhysicalMaterial as gp, LinearFilter as sd, UnsignedByteType as iS, RingGeometry as nS, Line3 as sS, AdditiveBlending as Eb, BoxHelper as oS, SpotLight as rS, DirectionalLightHelper as aS, CameraHelper as lS, LOD as cS, Triangle as hS, NormalBlending as dS, ReinhardToneMapping as Om, LinearToneMapping as km, HalfFloatType as tf, VideoTexture as uS, CubeUVReflectionMapping as Ab, CubeTexture as fS, CompressedCubeTexture as pS, EquirectangularRefractionMapping as mS, CatmullRomCurve3 as gS, VectorKeyframeTrack as yS, QuaternionKeyframeTrack as _S, Audio as bS, ShaderLib as od, UniformsUtils as Ib, MirroredRepeatWrapping as hy, MeshNormalMaterial as vS, AudioContext as wS, PMREMGenerator$1 as xS } from "./three-CsHK73Zc.js";
2
2
  import { createLoaders as Mm, getRaycastMesh as Lb, LODsManager as Do, NEEDLE_progressive as We, addDracoAndKTX2Loaders as SS, configureLoader as CS, setKTX2TranscoderLocation as PS, setDracoDecoderLocation as OS } from "./gltf-progressive-egsMzRdv.js";
3
3
  import { GroundedSkybox as _a, Font as kS, TextGeometry as MS, FontLoader as RS, GLTFLoader as Ps, TransformControlsGizmo as Db, EXRLoader as Rm, RGBELoader as jb, Stats as TS, nodeFrame as ES, OrbitControls as Bb, PositionalAudioHelper as AS, HorizontalBlurShader as IS, VerticalBlurShader as LS, GLTFExporter as Fb, strToU8 as zb, zipSync as DS, XRControllerModelFactory as jS, XRHandMeshModel as BS, Line2 as FS, LineGeometry as zS, LineMaterial as US, TransformControls as NS, InteractiveGroup as $S, HTMLMesh as WS, VertexNormalsHelper as VS, OBJLoader as Tm, FBXLoader as Ub, mergeVertices as HS } from "./three-examples-BvMpKSun.js";
4
4
  import { fetchProfile as GS, MotionController as qS, $70d766613f57b014$export$2e2bcd8739ae039 as dy, ByteBuffer as XS, v5 as uy, md5 as fy, SIZE_PREFIX_LENGTH as Nb, Builder as Em, createNoise4D as QS, Matrix4 as nf, BatchedParticleRenderer as YS, ParticleSystem as KS, RenderMode as ls, ConstantColor as ZS, Vector4 as JS, ConstantValue as eC, TrailParticle as py, WorkerBase as tC, MeshBVH as iC } from "./vendor-k9i6CeGi.js";
@@ -327,7 +327,7 @@ function Am(s, e) {
327
327
  if (!s[Nr])
328
328
  if (s instanceof J)
329
329
  s[Nr] = new ao(s, ["x", "y"]);
330
- else if (s instanceof _)
330
+ else if (s instanceof y)
331
331
  s[Nr] = new ao(s, ["x", "y", "z"]);
332
332
  else if (s instanceof fe || s instanceof U)
333
333
  s[Nr] = new ao(s, ["x", "y", "z", "w"]);
@@ -346,7 +346,7 @@ var q;
346
346
  function t() {
347
347
  if (e !== void 0) return e;
348
348
  const V = window.navigator.userAgent, ne = /Windows|MacOS|Mac OS/.test(V), re = /Windows NT/.test(V) && /Edg/.test(V) && !/Win64/.test(V);
349
- return e = ne && !re && !b();
349
+ return e = ne && !re && !_();
350
350
  }
351
351
  s.isDesktop = t;
352
352
  let i;
@@ -385,16 +385,16 @@ var q;
385
385
  }
386
386
  s.isMacOS = p;
387
387
  let g;
388
- function y() {
388
+ function b() {
389
389
  return g !== void 0 ? g : g = p() && "xr" in navigator;
390
390
  }
391
- s.isVisionOS = y;
391
+ s.isVisionOS = b;
392
392
  let m;
393
393
  const v = ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"];
394
- function b() {
394
+ function _() {
395
395
  return m !== void 0 ? m : m = v.includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
396
396
  }
397
- s.isiOS = b;
397
+ s.isiOS = _;
398
398
  let x;
399
399
  function I() {
400
400
  return x !== void 0 || (x = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), x;
@@ -564,9 +564,9 @@ async function PC(s, e) {
564
564
  const t = 8, i = 20, n = e.logoPadding || 1 / 32, o = "transparent", r = 0, a = new Image(), c = document.querySelector("needle-engine")?.getAttribute("loading-logo-src") || Vb;
565
565
  if (!c) return;
566
566
  let h = !1;
567
- e.showLogo !== !1 && (a.src = c, h = await new Promise((b, x) => {
568
- a.onload = () => b(!0), a.onerror = (I) => {
569
- console.error("Error loading favicon image for QR code", I), b(!1);
567
+ e.showLogo !== !1 && (a.src = c, h = await new Promise((_, x) => {
568
+ a.onload = () => _(!0), a.onerror = (I) => {
569
+ console.error("Error loading favicon image for QR code", I), _(!1);
570
570
  };
571
571
  }));
572
572
  const d = document.createElement("canvas");
@@ -577,16 +577,16 @@ async function PC(s, e) {
577
577
  f.fillStyle = "#ffffff", f.fillRect(0, 0, d.width, d.height), f.drawImage(s, t / 2, t / 2), f.imageSmoothingEnabled = !0, f.imageSmoothingQuality = "high", f.mozImageSmoothingEnabled = !0, f.webkitImageSmoothingEnabled = !0, f.globalCompositeOperation = "lighten";
578
578
  const p = f.createLinearGradient(0, 0, 0, d.height);
579
579
  p.addColorStop(0, "rgb(45, 45, 45)"), p.addColorStop(1, "rgb(45, 45, 45)"), f.fillStyle = p, f.fillRect(0, 0, d.width, d.height), f.globalCompositeOperation = "source-over";
580
- let g = Math.min(s.width, s.height) * (e.logoSize || 0.25), y = g;
580
+ let g = Math.min(s.width, s.height) * (e.logoSize || 0.25), b = g;
581
581
  if (h) {
582
- const b = a.width / a.height;
583
- b > 1 ? y = g / b : g = y * b;
584
- const x = n * s.width, I = Math.max(g, y), O = Math.round(I + x), k = Math.round(I + x), E = (d.width - I) / 2, B = (d.height - I) / 2;
582
+ const _ = a.width / a.height;
583
+ _ > 1 ? b = g / _ : g = b * _;
584
+ const x = n * s.width, I = Math.max(g, b), O = Math.round(I + x), k = Math.round(I + x), E = (d.width - I) / 2, B = (d.height - I) / 2;
585
585
  f.shadowColor = o, f.shadowBlur = i;
586
586
  const D = r, W = Math.round(E - x / 2), X = Math.round(B - x / 2);
587
587
  f.beginPath(), f.moveTo(W + D, X), f.lineTo(W + O - D, X), f.quadraticCurveTo(W + O, X, W + O, X + D), f.lineTo(W + O, X + k - D), f.quadraticCurveTo(W + O, X + k, W + O - D, X + k), f.lineTo(W + D, X + k), f.quadraticCurveTo(W, X + k, W, X + k - D), f.lineTo(W, X + D), f.quadraticCurveTo(W, X, W + D, X), f.fillStyle = "#ffffff", f.closePath(), f.fill(), f.clip(), f.shadowColor = "transparent";
588
- const A = (d.width - g) / 2, $ = (d.height - y) / 2;
589
- f.drawImage(a, A, $, g, y);
588
+ const A = (d.width - g) / 2, $ = (d.height - b) / 2;
589
+ f.drawImage(a, A, $, g, b);
590
590
  }
591
591
  const m = d.toDataURL("image/png"), v = document.createElement("img");
592
592
  return v.src = m, v.style.width = "100%", v.style.height = "auto", v;
@@ -971,7 +971,7 @@ function HI(s, e, t) {
971
971
  const i = s.length(), n = e.length(), o = j.lerp(i, n, t);
972
972
  return s.lerp(e, t).normalize().multiplyScalar(o);
973
973
  }
974
- const cf = new U(), Jb = new U().setFromAxisAngle(new _(0, 1, 0), Math.PI);
974
+ const cf = new U(), Jb = new U().setFromAxisAngle(new y(0, 1, 0), Math.PI);
975
975
  function GI(s, e) {
976
976
  s.lookAt(e), s.quaternion.multiply(Jb);
977
977
  }
@@ -1004,10 +1004,10 @@ function qI(s, e, t, i = 1) {
1004
1004
  }
1005
1005
  return null;
1006
1006
  }
1007
- const WC = new Hi(() => new _(), 100);
1007
+ const WC = new Hi(() => new y(), 100);
1008
1008
  function H(s, e, t) {
1009
1009
  const i = WC.get();
1010
- return i.set(0, 0, 0), s instanceof _ ? i.copy(s) : Array.isArray(s) ? i.set(s[0], s[1], s[2]) : s instanceof DOMPointReadOnly ? i.set(s.x, s.y, s.z) : typeof s == "number" ? (i.x = s, i.y = e !== void 0 ? e : i.x, i.z = t !== void 0 ? t : i.x) : typeof s == "object" && (i.x = s.x, i.y = s.y, i.z = s.z), i;
1010
+ return i.set(0, 0, 0), s instanceof y ? i.copy(s) : Array.isArray(s) ? i.set(s[0], s[1], s[2]) : s instanceof DOMPointReadOnly ? i.set(s.x, s.y, s.z) : typeof s == "number" ? (i.x = s, i.y = e !== void 0 ? e : i.x, i.z = t !== void 0 ? t : i.x) : typeof s == "object" && (i.x = s.x, i.y = s.y, i.z = s.z), i;
1011
1011
  }
1012
1012
  const VC = new Hi(() => new se(), 30);
1013
1013
  function HC(s) {
@@ -1019,7 +1019,7 @@ function ui(s) {
1019
1019
  const e = GC.get();
1020
1020
  return e.identity(), s instanceof U ? e.copy(s) : s instanceof DOMPointReadOnly && e.set(s.x, s.y, s.z, s.w), e;
1021
1021
  }
1022
- const Lm = new Hi(() => new _(), 100), Py = Symbol("lastMatrixWorldUpdateKey");
1022
+ const Lm = new Hi(() => new y(), 100), Py = Symbol("lastMatrixWorldUpdateKey");
1023
1023
  function Z(s, e = null, t = !0) {
1024
1024
  const i = e ?? Lm.get();
1025
1025
  return s ? s.parent ? (t && s.updateWorldMatrix(!0, !1), s.matrixWorldNeedsUpdate && s[Py] !== Date.now() && (s[Py] = Date.now(), s.updateMatrixWorld()), i.setFromMatrixPosition(s.matrixWorld), i) : i.copy(s.position) : i.set(0, 0, 0);
@@ -1050,7 +1050,7 @@ function jn(s, e) {
1050
1050
  function e0(s, e, t, i, n) {
1051
1051
  Ko.set(e, t, i, n), jn(s, Ko);
1052
1052
  }
1053
- const qC = new Hi(() => new _(), 100), XC = new _();
1053
+ const qC = new Hi(() => new y(), 100), XC = new y();
1054
1054
  function Qe(s, e = null) {
1055
1055
  return e || (e = qC.get()), s ? s.parent ? (s.getWorldScale(e), e) : e.copy(s.scale) : e.set(0, 0, 0);
1056
1056
  }
@@ -1063,15 +1063,15 @@ function hc(s, e) {
1063
1063
  const t = XC;
1064
1064
  s.parent.getWorldScale(t), s.scale.copy(e), s.scale.divide(t);
1065
1065
  }
1066
- const QC = new _(), Oy = new U();
1066
+ const QC = new y(), Oy = new U();
1067
1067
  function XI(s) {
1068
1068
  return be(s, Oy), QC.set(0, 0, 1).applyQuaternion(Oy);
1069
1069
  }
1070
- const YC = new Hi(() => new _(), 100), ky = new U();
1070
+ const YC = new Hi(() => new y(), 100), ky = new U();
1071
1071
  function KC(s, e) {
1072
1072
  return e || (e = YC.get().set(0, 0, 1)), be(s, ky), e.applyQuaternion(ky);
1073
1073
  }
1074
- const My = new ot(), Ry = new ot(), ZC = new _();
1074
+ const My = new ot(), Ry = new ot(), ZC = new y();
1075
1075
  function t0(s) {
1076
1076
  const e = ld.get();
1077
1077
  return s.getWorldQuaternion(e), Ry.setFromQuaternion(e), Ry;
@@ -1194,10 +1194,10 @@ class ar {
1194
1194
  this.blitMaterial.reset(), o.uniforms.map && (o.uniforms.map.value = e), o.uniforms.flipY && (o.uniforms.flipY.value = r), a ? (o.uniforms.writeDepth = new $i(!0), o.uniforms.depthTexture.value = a) : (o.uniforms.writeDepth = new $i(!1), o.uniforms.depthTexture.value = null), o.needsUpdate = !0, o.uniformsNeedUpdate = !0;
1195
1195
  const h = this.mesh;
1196
1196
  h.material = o, h.frustumCulled = !1, this.scene.children.length = 0, this.scene.add(h);
1197
- const d = n.getRenderTarget(), f = n.getContext(), p = f.getParameter(f.DEPTH_TEST), g = f.getParameter(f.DEPTH_WRITEMASK), y = f.getParameter(f.DEPTH_FUNC);
1197
+ const d = n.getRenderTarget(), f = n.getContext(), p = f.getParameter(f.DEPTH_TEST), g = f.getParameter(f.DEPTH_WRITEMASK), b = f.getParameter(f.DEPTH_FUNC);
1198
1198
  l ? n.getContext().enable(n.getContext().DEPTH_TEST) : n.getContext().disable(n.getContext().DEPTH_TEST), n.state.buffers.depth.setMask(c), n.setClearColor(new se(0, 0, 0), 0), n.pixelRatio !== window.devicePixelRatio && n.xr.isPresenting === !1 && n.setPixelRatio(window.devicePixelRatio), n.setRenderTarget(t), n.clear(), n.render(this.scene, this.perspectiveCam), n.setRenderTarget(d);
1199
1199
  const m = n.state.buffers.depth;
1200
- m.setTest(p), m.setMask(g), m.setFunc(y);
1200
+ m.setTest(p), m.setMask(g), m.setFunc(b);
1201
1201
  }
1202
1202
  /**
1203
1203
  * Copy a texture to a HTMLCanvasElement
@@ -1279,21 +1279,21 @@ function ii(s, e = void 0, t = void 0, i = void 0) {
1279
1279
  return a || console.warn("No objects to fit camera to..."), n;
1280
1280
  }
1281
1281
  function o1(s, e, t) {
1282
- const i = ii([s], t?.ignore), n = new _();
1282
+ const i = ii([s], t?.ignore), n = new y();
1283
1283
  i.getSize(n);
1284
- const o = new _();
1284
+ const o = new y();
1285
1285
  i.getCenter(o);
1286
- const r = new _();
1286
+ const r = new y();
1287
1287
  e.getSize(r);
1288
- const a = new _();
1288
+ const a = new y();
1289
1289
  e.getCenter(a);
1290
- const l = new _();
1290
+ const l = new y();
1291
1291
  l.set(r.x / n.x, r.y / n.y, r.z / n.z);
1292
1292
  const c = Math.min(l.x, l.y, l.z), h = t?.scale !== !1;
1293
1293
  if (h && hc(s, Qe(s).multiplyScalar(c)), t?.position !== !1) {
1294
- const d = new _();
1294
+ const d = new y();
1295
1295
  i.getCenter(d), d.y = i.min.y;
1296
- const f = new _();
1296
+ const f = new y();
1297
1297
  e.getCenter(f), f.y = e.min.y;
1298
1298
  const p = f.clone().sub(d);
1299
1299
  h && p.multiplyScalar(c), Ot(s, Z(s).add(p));
@@ -1304,7 +1304,7 @@ function o1(s, e, t) {
1304
1304
  };
1305
1305
  }
1306
1306
  function r1(s, e) {
1307
- const t = ii([s]), i = new _();
1307
+ const t = ii([s]), i = new y();
1308
1308
  t.getCenter(i), i.y = t.min.y;
1309
1309
  const n = e.clone().sub(i), o = Z(s);
1310
1310
  return Ot(s, o.add(n)), {
@@ -1362,7 +1362,7 @@ class a1 {
1362
1362
  }
1363
1363
  targetObject = new M();
1364
1364
  /** this is a point in forward view of the user */
1365
- userForwardViewPoint = new _();
1365
+ userForwardViewPoint = new y();
1366
1366
  oneEuroFilter = new Zb(90, 0.8);
1367
1367
  _lastElementRemoveTime = 0;
1368
1368
  onBeforeRender = () => {
@@ -1543,7 +1543,7 @@ function o0(s, ...e) {
1543
1543
  return o.name + "()";
1544
1544
  }
1545
1545
  if (o instanceof J) return `(${i(o.x)}, ${i(o.y)})`;
1546
- if (o instanceof _) return `(${i(o.x)}, ${i(o.y)}, ${i(o.z)})`;
1546
+ if (o instanceof y) return `(${i(o.x)}, ${i(o.y)}, ${i(o.z)})`;
1547
1547
  if (o instanceof fe) return `(${i(o.x)}, ${i(o.y)}, ${i(o.z)}, ${i(o.w)})`;
1548
1548
  if (o instanceof U) return `(${i(o.x)}, ${i(o.y)}, ${i(o.z)}, ${i(o.w)})`;
1549
1549
  if (o instanceof _e || o instanceof Te) return o.name;
@@ -1765,9 +1765,9 @@ go('if(!globalThis["NEEDLE_PROJECT_BUILD_TIME"]) globalThis["NEEDLE_PROJECT_BUIL
1765
1765
  go('if(!globalThis["NEEDLE_PUBLIC_KEY"]) globalThis["NEEDLE_PUBLIC_KEY"] = "unknown";');
1766
1766
  go('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.9.3";');
1767
1767
  go('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
1768
- go('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Thu Sep 18 2025 09:34:12 GMT+0000 (Coordinated Universal Time)";');
1768
+ go('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Mon Sep 15 2025 07:49:39 GMT+0000 (Coordinated Universal Time)";');
1769
1769
  go('globalThis["__NEEDLE_PUBLIC_KEY__"] = "' + NEEDLE_PUBLIC_KEY + '";');
1770
- const En = "4.9.3", jm = "undefined", c0 = "Thu Sep 18 2025 09:34:12 GMT+0000 (Coordinated Universal Time)";
1770
+ const En = "4.9.3", jm = "undefined", c0 = "Mon Sep 15 2025 07:49:39 GMT+0000 (Coordinated Universal Time)";
1771
1771
  l0 && console.log(`Engine version: ${En} (generator: ${jm})
1772
1772
  Project built at ${c0}`);
1773
1773
  const Rl = NEEDLE_PUBLIC_KEY, lo = "needle_isActiveInHierarchy", $r = "builtin_components", Fh = "needle_editor_guid";
@@ -2254,7 +2254,7 @@ class O1 {
2254
2254
  _pointerPositionsLastFrame = [new J()];
2255
2255
  _pointerPositionsDelta = [new J()];
2256
2256
  _pointerPositionsRC = [new J()];
2257
- _pointerPositionDown = [new _()];
2257
+ _pointerPositionDown = [new y()];
2258
2258
  _pointerDownTime = [];
2259
2259
  _pointerUpTime = [];
2260
2260
  _pointerUpTimestamp = [];
@@ -2535,8 +2535,8 @@ class O1 {
2535
2535
  this.onUp(o), this._pointerIds[n] = -1;
2536
2536
  }
2537
2537
  };
2538
- tempNearPlaneVector = new _();
2539
- tempFarPlaneVector = new _();
2538
+ tempNearPlaneVector = new y();
2539
+ tempFarPlaneVector = new y();
2540
2540
  tempLookMatrix = new ee();
2541
2541
  getAndUpdateSpatialObjectForScreenPosition(e, t, i) {
2542
2542
  let n = this._pointerSpace[e];
@@ -2568,7 +2568,7 @@ class O1 {
2568
2568
  const t = e.pointerId;
2569
2569
  if (this.getPointerPressed(t) && console.warn(`Received pointerDown for pointerId that is already pressed: ${t}`, tt ? e : ""), tt && console.log(e.pointerType, "DOWN", t), !!this.isInRect(e)) {
2570
2570
  for (this.setPointerState(t, this._pointerPressed, !0), this.setPointerState(t, this._pointerDown, !0), this.setPointerStateT(t, this._pointerEvent, e.source); t >= this._pointerTypes.length; ) this._pointerTypes.push(e.pointerType);
2571
- for (this._pointerTypes[t] = e.pointerType; t >= this._pointerPositionDown.length; ) this._pointerPositionDown.push(new _());
2571
+ for (this._pointerTypes[t] = e.pointerType; t >= this._pointerPositionDown.length; ) this._pointerPositionDown.push(new y());
2572
2572
  for (this._pointerPositionDown[t].set(e.clientX, e.clientY, e.clientZ ?? 0); t >= this._pointerPositions.length; ) this._pointerPositions.push(new J());
2573
2573
  this._pointerPositions[t].set(e.clientX, e.clientY), t >= this._pointerDownTime.length && this._pointerDownTime.push(0), this._pointerDownTime[t] = this.context.time.realtimeSinceStartup, this.updatePointerPosition(e), this._pointerEventsPressed.push(e), this.onDispatchEvent(e);
2574
2574
  }
@@ -2648,7 +2648,7 @@ class O1 {
2648
2648
  }
2649
2649
  }
2650
2650
  }
2651
- const na = new ee().makeRotationY(Math.PI), zi = new U().setFromAxisAngle(new _(0, 1, 0), Math.PI), k1 = w("debugwebxr");
2651
+ const na = new ee().makeRotationY(Math.PI), zi = new U().setFromAxisAngle(new y(0, 1, 0), Math.PI), k1 = w("debugwebxr");
2652
2652
  class M1 {
2653
2653
  priority = -1e5;
2654
2654
  gameObject;
@@ -2665,7 +2665,7 @@ class M1 {
2665
2665
  }
2666
2666
  }
2667
2667
  }
2668
- const Zn = w("debugwebxr"), nh = w("debugcustomgesture"), R1 = "https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles", T1 = "generic-trigger", E1 = new U().setFromEuler(new ot(ys.degToRad(0), ys.degToRad(-90), ys.degToRad(-90))), A1 = new _(0.04, -0.04, 0);
2668
+ const Zn = w("debugwebxr"), nh = w("debugcustomgesture"), R1 = "https://cdn.jsdelivr.net/npm/@webxr-input-profiles/assets@1.0/dist/profiles", T1 = "generic-trigger", E1 = new U().setFromEuler(new ot(ys.degToRad(0), ys.degToRad(-90), ys.degToRad(-90))), A1 = new y(0.04, -0.04, 0);
2669
2669
  class m0 {
2670
2670
  /** the Needle XR Session */
2671
2671
  xr;
@@ -2795,16 +2795,16 @@ class m0 {
2795
2795
  /** Grip matrix in grip space */
2796
2796
  _gripMatrix = new ee();
2797
2797
  /** Grip position in grip space */
2798
- _gripPosition = new _();
2798
+ _gripPosition = new y();
2799
2799
  /** Grip rotation in grip space */
2800
2800
  _gripQuaternion = new U();
2801
- _linearVelocity = new _();
2802
- _rayPositionRaw = new _();
2801
+ _linearVelocity = new y();
2802
+ _rayPositionRaw = new y();
2803
2803
  _rayRotationRaw = new U();
2804
2804
  /** ray matrix in grip space */
2805
2805
  _rayMatrix = new ee();
2806
2806
  /** Ray position in rig space */
2807
- _rayPosition = new _();
2807
+ _rayPosition = new y();
2808
2808
  /** Ray rotation in rig space */
2809
2809
  _rayQuaternion = new U();
2810
2810
  /** Grip position in rig space */
@@ -2836,7 +2836,7 @@ class m0 {
2836
2836
  get gripWorldPosition() {
2837
2837
  return H(this._gripWorldPosition);
2838
2838
  }
2839
- _gripWorldPosition = new _();
2839
+ _gripWorldPosition = new y();
2840
2840
  /** Controller grip rotation in wordspace */
2841
2841
  get gripWorldQuaternion() {
2842
2842
  return ui(this._gripWorldQuaternion);
@@ -2846,7 +2846,7 @@ class m0 {
2846
2846
  get rayWorldPosition() {
2847
2847
  return H(this._rayWorldPosition);
2848
2848
  }
2849
- _rayWorldPosition = new _();
2849
+ _rayWorldPosition = new y();
2850
2850
  /** Recalculates the ray world position */
2851
2851
  updateRayWorldPosition() {
2852
2852
  const e = this.xr.context.mainCamera?.parent;
@@ -2860,7 +2860,7 @@ class m0 {
2860
2860
  get pinchPosition() {
2861
2861
  return H(this._pinchPosition);
2862
2862
  }
2863
- _pinchPosition = new _();
2863
+ _pinchPosition = new y();
2864
2864
  /** Recalculates the ray world quaternion */
2865
2865
  updateRayWorldQuaternion() {
2866
2866
  const e = this.xr.context.mainCamera?.parent, t = e ? be(e) : void 0;
@@ -2989,8 +2989,8 @@ Pinch: ${this.getGesture("pinch")?.value.toFixed(3)}`), n += `
2989
2989
  const d = a.get("wrist"), f = d && this.getHandJointPose(d, e);
2990
2990
  if (f) {
2991
2991
  h = !0;
2992
- const y = f.transform.position, m = f.transform.orientation;
2993
- this._object.position.set(y.x, y.y, y.z), this._object.quaternion.set(m.x, m.y, m.z, m.w).multiply(zi);
2992
+ const b = f.transform.position, m = f.transform.orientation;
2993
+ this._object.position.set(b.x, b.y, b.z), this._object.quaternion.set(m.x, m.y, m.z, m.w).multiply(zi);
2994
2994
  }
2995
2995
  h || (this._object.position.copy(this._rayPosition), this._object.quaternion.copy(this._rayQuaternion).multiply(zi));
2996
2996
  const p = a.get("middle-finger-metacarpal"), g = p && this.getHandJointPose(p, e);
@@ -3223,7 +3223,7 @@ Pinch: ${this.getGesture("pinch")?.value.toFixed(3)}`), n += `
3223
3223
  }
3224
3224
  }
3225
3225
  _didMoveLastFrame = !1;
3226
- _lastPointerMovePosition = new _();
3226
+ _lastPointerMovePosition = new y();
3227
3227
  _lastPointerMoveQuaternion = new U();
3228
3228
  onUpdateMove() {
3229
3229
  if (!this.emitPointerMoveEvent) return;
@@ -4272,8 +4272,8 @@ function W1(s, e, t, i, n) {
4272
4272
  return d;
4273
4273
  },
4274
4274
  generateSideWallUV: (c, h, d, f, p, g) => {
4275
- const y = [];
4276
- return y.push(new J(h[d] / s, h[d + 1] / e)), y.push(new J(h[f] / s, h[f + 1] / e)), y.push(new J(h[p] / s, h[p + 1] / e)), y.push(new J(h[g] / s, h[g + 1] / e)), y;
4275
+ const b = [];
4276
+ return b.push(new J(h[d] / s, h[d + 1] / e)), b.push(new J(h[f] / s, h[f + 1] / e)), b.push(new J(h[p] / s, h[p + 1] / e)), b.push(new J(h[g] / s, h[g + 1] / e)), b;
4277
4277
  }
4278
4278
  }
4279
4279
  });
@@ -5007,7 +5007,7 @@ class K {
5007
5007
  */
5008
5008
  _mainCamera = null;
5009
5009
  constructor(e, t, i, n) {
5010
- X1(e, n.init), this.session = t, this.mode = e, this.context = i, ($e || w("console")) && ia(!0), this._xr_scripts = [...n.scripts], this._xr_update_scripts = this._xr_scripts.filter((o) => typeof o.onUpdateXR == "function"), this._controllerAdded = n.controller_added, this._controllerRemoved = n.controller_removed, Ms(this.onBefore, xe.LateUpdate), this.context.pre_render_callbacks.push(this.onBeforeRender), this.context.post_render_callbacks.push(this.onAfterRender), (n.init.optionalFeatures?.includes("hit-test") || n.init.requiredFeatures?.includes("hit-test")) && t.requestReferenceSpace("viewer").then((o) => t.requestHitTestSource?.call(t, { space: o })?.then((r) => this._viewerHitTestSource = r).catch((r) => console.error(r))).catch((o) => console.error(o)), this.context.mainCamera && (this._originalCameraWorldPosition = Z(this.context.mainCamera, new _()), this._originalCameraWorldRotation = be(this.context.mainCamera, new U()), this._originalCameraWorldScale = Qe(this.context.mainCamera, new _()), this._originalCameraParent = this.context.mainCamera.parent, this.context.mainCamera instanceof de && (this.context.mainCamera[lh] = this.context.mainCamera.fov)), this._defaultRig = new M1(), this.context.scene.add(this._defaultRig.gameObject), this.addRig(this._defaultRig);
5010
+ X1(e, n.init), this.session = t, this.mode = e, this.context = i, ($e || w("console")) && ia(!0), this._xr_scripts = [...n.scripts], this._xr_update_scripts = this._xr_scripts.filter((o) => typeof o.onUpdateXR == "function"), this._controllerAdded = n.controller_added, this._controllerRemoved = n.controller_removed, Ms(this.onBefore, xe.LateUpdate), this.context.pre_render_callbacks.push(this.onBeforeRender), this.context.post_render_callbacks.push(this.onAfterRender), (n.init.optionalFeatures?.includes("hit-test") || n.init.requiredFeatures?.includes("hit-test")) && t.requestReferenceSpace("viewer").then((o) => t.requestHitTestSource?.call(t, { space: o })?.then((r) => this._viewerHitTestSource = r).catch((r) => console.error(r))).catch((o) => console.error(o)), this.context.mainCamera && (this._originalCameraWorldPosition = Z(this.context.mainCamera, new y()), this._originalCameraWorldRotation = be(this.context.mainCamera, new U()), this._originalCameraWorldScale = Qe(this.context.mainCamera, new y()), this._originalCameraParent = this.context.mainCamera.parent, this.context.mainCamera instanceof de && (this.context.mainCamera[lh] = this.context.mainCamera.fov)), this._defaultRig = new M1(), this.context.scene.add(this._defaultRig.gameObject), this.addRig(this._defaultRig);
5011
5011
  for (let o = 0; o < t.inputSources.length; o++) {
5012
5012
  const r = t.inputSources[o];
5013
5013
  if (!r.handedness) {
@@ -5331,7 +5331,7 @@ ${o.hand ? "hand" : "ctrl"} ${o.inputSource.handedness}[${o.index}] con:${o.conn
5331
5331
  }
5332
5332
  _viewerPose;
5333
5333
  _transformOrientation = new U();
5334
- _transformPosition = new _();
5334
+ _transformPosition = new y();
5335
5335
  internalUpdateState() {
5336
5336
  const e = this.context.renderer.xr.getReferenceSpace();
5337
5337
  if (!e) {
@@ -5378,7 +5378,7 @@ class Z1 {
5378
5378
  }
5379
5379
  }
5380
5380
  }
5381
- const Rt = new _(), Gy = new _(), qy = new U(), J1 = w("debuggizmos"), tn = 8947848, _f = 32;
5381
+ const Rt = new y(), Gy = new y(), qy = new U(), J1 = w("debuggizmos"), tn = 8947848, _f = 32;
5382
5382
  class z {
5383
5383
  constructor() {
5384
5384
  }
@@ -5521,7 +5521,7 @@ class z {
5521
5521
  const o = Ii.getBox(i);
5522
5522
  o.position.copy(e.getCenter(Rt)), o.scale.copy(e.getSize(Rt)), o.material.color.set(t), o.material.depthTest = n, o.material.wireframe = !0, o.material.depthWrite = !1, o.material.fog = !1;
5523
5523
  }
5524
- static _up = new _(0, 1, 0);
5524
+ static _up = new y(0, 1, 0);
5525
5525
  /**
5526
5526
  * Draw an arrow gizmo in the scene
5527
5527
  * @param pt0 the start point of the arrow in world space
@@ -5891,7 +5891,7 @@ class uc {
5891
5891
  h.matrixWorldNeedsUpdate && h.updateWorldMatrix(!1, !1);
5892
5892
  const f = this.tempBoundingBox.copy(d.boundingBox).applyMatrix4(h.matrixWorld), p = this.sphere;
5893
5893
  if (p.center.copy(t), p.radius = i, p.intersectsBox(f)) {
5894
- const g = Z(e), y = g.distanceTo(p.center), m = new w0(e, y, g);
5894
+ const g = Z(e), b = g.distanceTo(p.center), m = new w0(e, b, g);
5895
5895
  if (o.push(m), !r) return;
5896
5896
  }
5897
5897
  }
@@ -5939,17 +5939,17 @@ function iP(s, e, t) {
5939
5939
  }
5940
5940
  var dd;
5941
5941
  ((s) => {
5942
- function e(v, b, x, I, O) {
5943
- if (!b.geometry || !b.geometry.hasAttribute("position"))
5942
+ function e(v, _, x, I, O) {
5943
+ if (!_.geometry || !_.geometry.hasAttribute("position"))
5944
5944
  return !1;
5945
- const k = b.geometry;
5946
- if (b?.isSkinnedMesh) {
5947
- const E = b, B = E.bvhNeedsUpdate;
5945
+ const k = _.geometry;
5946
+ if (_?.isSkinnedMesh) {
5947
+ const E = _, B = E.bvhNeedsUpdate;
5948
5948
  if (!E.staticGenerator)
5949
- a(), o && (E.staticGenerator = new o(b), E.staticGenerator.applyWorldTransforms = !1, E.staticGeometry = E.staticGenerator.generate(), k.boundsTree = r?.call(E.staticGeometry), E.staticGeometryLastUpdate = performance.now() + Math.random() * 200, E.bvhNeedsUpdate = !0);
5949
+ a(), o && (E.staticGenerator = new o(_), E.staticGenerator.applyWorldTransforms = !1, E.staticGeometry = E.staticGenerator.generate(), k.boundsTree = r?.call(E.staticGeometry), E.staticGeometryLastUpdate = performance.now() + Math.random() * 200, E.bvhNeedsUpdate = !0);
5950
5950
  else if (k.boundsTree && (E.autoUpdateMeshBvhInterval !== void 0 && E.autoUpdateMeshBvhInterval >= 0 || B === !0)) {
5951
5951
  const D = performance.now(), W = D - E.staticGeometryLastUpdate, X = E.autoUpdateMeshBvhInterval ?? 100;
5952
- (B || W > X) && (Vt && console.warn(`Physics: updating skinned mesh bvh for ${b.name} after ${W.toFixed(2)}ms`), E.bvhNeedsUpdate = !1, E.staticGeometryLastUpdate = D, E.staticGenerator?.generate(E.staticGeometry), k.boundsTree.refit());
5952
+ (B || W > X) && (Vt && console.warn(`Physics: updating skinned mesh bvh for ${_.name} after ${W.toFixed(2)}ms`), E.bvhNeedsUpdate = !1, E.staticGeometryLastUpdate = D, E.staticGenerator?.generate(E.staticGeometry), k.boundsTree.refit());
5953
5953
  }
5954
5954
  } else if (!k.boundsTree) {
5955
5955
  c || m();
@@ -5957,12 +5957,12 @@ var dd;
5957
5957
  if ((I.xr || k[p] === !1 || k.getAttribute("position")?.isInterleavedBufferAttribute || k.index && k.index?.isInterleavedBufferAttribute) && (E = !1), E && d) {
5958
5958
  if (k[f] === void 0) {
5959
5959
  let B = null;
5960
- if (y.length > 0) {
5961
- const D = y.shift();
5960
+ if (b.length > 0) {
5961
+ const D = b.shift();
5962
5962
  D && !D.running && (B = D);
5963
5963
  }
5964
5964
  if (!B && g.length < 3 && (B = new d(), g.push(B)), B != null && !B.running) {
5965
- const D = b.name;
5965
+ const D = _.name;
5966
5966
  Vt && console.log("<<<< worker start", D, B), k[f] = "queued", performance.mark("bvh.create.start");
5967
5967
  const W = k.clone();
5968
5968
  try {
@@ -5971,7 +5971,7 @@ var dd;
5971
5971
  }).catch((X) => {
5972
5972
  k[f] = "failed - " + X?.message, k[p] = !1, Vt && console.error("Failed to generate mesh bvh on worker", X);
5973
5973
  }).finally(() => {
5974
- Vt && console.log(">>>>> worker done", D, { hasBoundsTre: k.boundsTree != null }), y.push(B), W.dispose(), performance.mark("bvh.create.end"), performance.measure("bvh.create (worker)", "bvh.create.start", "bvh.create.end");
5974
+ Vt && console.log(">>>>> worker done", D, { hasBoundsTre: k.boundsTree != null }), b.push(B), W.dispose(), performance.mark("bvh.create.end"), performance.measure("bvh.create (worker)", "bvh.create.start", "bvh.create.end");
5975
5975
  });
5976
5976
  } catch (X) {
5977
5977
  console.error("Failed to generate mesh bvh on worker", X);
@@ -5982,19 +5982,19 @@ var dd;
5982
5982
  } else (!h || !E) && (a(), n && (performance.mark("bvh.create.start"), k.boundsTree = new n(k), performance.mark("bvh.create.end"), performance.measure("bvh.create", "bvh.create.start", "bvh.create.end")));
5983
5983
  }
5984
5984
  if (v instanceof Nd) {
5985
- const E = v, B = b.raycast;
5985
+ const E = v, B = _.raycast;
5986
5986
  if (k.boundsTree)
5987
- a(), i && (b.acceleratedRaycast || (b.acceleratedRaycast = i.bind(b), Vt && console.debug(`Physics: bind acceleratedRaycast fn to "${b.name}"`)), b.raycast = b.acceleratedRaycast);
5988
- else if (Vt && console.warn("No bounds tree found for mesh", b.name, { workerTask: k[f], hasAcceleratedRaycast: i != null }), O.allowSlowRaycastFallback === !1)
5987
+ a(), i && (_.acceleratedRaycast || (_.acceleratedRaycast = i.bind(_), Vt && console.debug(`Physics: bind acceleratedRaycast fn to "${_.name}"`)), _.raycast = _.acceleratedRaycast);
5988
+ else if (Vt && console.warn("No bounds tree found for mesh", _.name, { workerTask: k[f], hasAcceleratedRaycast: i != null }), O.allowSlowRaycastFallback === !1)
5989
5989
  return Vt && console.warn("Skipping raycast because no bounds tree is available and allowSlowRaycastFallback is false"), !1;
5990
5990
  const D = E.firstHitOnly;
5991
- return E.firstHitOnly = !1, E.intersectObject(b, !1, x), E.firstHitOnly = D, b.raycast = B, !0;
5991
+ return E.firstHitOnly = !1, E.intersectObject(_, !1, x), E.firstHitOnly = D, _.raycast = B, !0;
5992
5992
  } else if (v instanceof $d) {
5993
5993
  const E = k.boundsTree;
5994
5994
  if (E) {
5995
5995
  const B = v;
5996
- if (l.copy(b.matrixWorld).invert(), B.applyMatrix4(l), E.intersectsSphere(B)) {
5997
- const W = Z(b), X = W.distanceTo(B.center), A = new w0(b, X, W);
5996
+ if (l.copy(_.matrixWorld).invert(), B.applyMatrix4(l), E.intersectsSphere(B)) {
5997
+ const W = Z(_), X = W.distanceTo(B.center), A = new w0(_, X, W);
5998
5998
  x.push(A);
5999
5999
  }
6000
6000
  }
@@ -6013,7 +6013,7 @@ var dd;
6013
6013
  }
6014
6014
  const l = new ee();
6015
6015
  let c = !1, h = !1, d = null;
6016
- const f = Symbol("Needle:MeshBVH-Worker"), p = Symbol("Needle:MeshBVH-CanUseWorker"), g = [], y = [];
6016
+ const f = Symbol("Needle:MeshBVH-Worker"), p = Symbol("Needle:MeshBVH-CanUseWorker"), g = [], b = [];
6017
6017
  function m() {
6018
6018
  c = !0, h = !0, Promise.resolve().then(() => bI).then((v) => {
6019
6019
  d = v.GenerateMeshBVHWorker;
@@ -6590,7 +6590,7 @@ function vP(s) {
6590
6590
  return;
6591
6591
  }
6592
6592
  const i = new $n();
6593
- e.position && (i.position = new _(e.position.x, e.position.y, e.position.z)), e.rotation && (i.rotation = new U(e.rotation.x, e.rotation.y, e.rotation.z, e.rotation.w)), e.scale && (i.scale = new _(e.scale.x, e.scale.y, e.scale.z)), i.parent = e.parent, e.seed && (i.idProvider = new At(e.seed)), i.visible = e.visible, i.context = s, md && s.alias && console.log("[Remote] instantiate in: " + s.alias);
6593
+ e.position && (i.position = new y(e.position.x, e.position.y, e.position.z)), e.rotation && (i.rotation = new U(e.rotation.x, e.rotation.y, e.rotation.z, e.rotation.w)), e.scale && (i.scale = new y(e.scale.x, e.scale.y, e.scale.z)), i.parent = e.parent, e.seed && (i.idProvider = new At(e.seed)), i.visible = e.visible, i.context = s, md && s.alias && console.log("[Remote] instantiate in: " + s.alias);
6594
6594
  const n = ka(t, i);
6595
6595
  Wr.push(new WeakRef(n)), n && (e.parent === "scene" && s.scene.add(n), md && console.log("[Remote] new instance", "gameobject:", n?.guid, t));
6596
6596
  }), s.connection.beginListen("left-room", () => {
@@ -7447,7 +7447,7 @@ Object.getOwnPropertyDescriptor(M.prototype, "worldScale") || Object.definePrope
7447
7447
  hc(this, s);
7448
7448
  }
7449
7449
  });
7450
- const YP = new ee(), KP = new _(0, 0, 0), ZP = new _(0, 1, 0);
7450
+ const YP = new ee(), KP = new y(0, 0, 0), ZP = new y(0, 1, 0);
7451
7451
  Object.getOwnPropertyDescriptor(M.prototype, "worldForward") || Object.defineProperty(M.prototype, "worldForward", {
7452
7452
  get: function() {
7453
7453
  return H().set(0, 0, 1).applyQuaternion(be(this));
@@ -7693,7 +7693,7 @@ function G0(s, e, t, i, n, o) {
7693
7693
  const c = e.parent;
7694
7694
  if (c && c.add(l), t?.position)
7695
7695
  if (Array.isArray(t.position)) {
7696
- const h = new _();
7696
+ const h = new y();
7697
7697
  h.fromArray(t.position), l.worldPosition = h;
7698
7698
  } else
7699
7699
  l.worldPosition = t.position;
@@ -7710,7 +7710,7 @@ function G0(s, e, t, i, n, o) {
7710
7710
  } else l.quaternion.copy(e.quaternion);
7711
7711
  if (t?.scale)
7712
7712
  if (Array.isArray(t.scale)) {
7713
- const h = new _();
7713
+ const h = new y();
7714
7714
  h.fromArray(t.scale), t.scale = h;
7715
7715
  } else
7716
7716
  l.scale.copy(t.scale);
@@ -7878,13 +7878,13 @@ var Ma;
7878
7878
  } else return console.error("Blob storage base url is not set"), null;
7879
7879
  let p = null;
7880
7880
  h instanceof File ? p = await h.arrayBuffer() : p = h.data;
7881
- const g = p.byteLength, y = g / 1024 / 1024;
7882
- if (y > 50)
7883
- return d?.silent !== !0 && ge(`File (${y.toFixed(1)}MB) is too large for uploading (see console for details)`), console.warn(`Your file is too large for uploading (${y.toFixed(1)}MB). Max allowed size is 50MB`), null;
7884
- if (!vs() && y > 5)
7885
- return d?.silent !== !0 && ge('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 (${y.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;
7881
+ const g = p.byteLength, b = g / 1024 / 1024;
7882
+ if (b > 50)
7883
+ return d?.silent !== !0 && ge(`File (${b.toFixed(1)}MB) is too large for uploading (see console for details)`), console.warn(`Your file is too large for uploading (${b.toFixed(1)}MB). Max allowed size is 50MB`), null;
7884
+ if (!vs() && b > 5)
7885
+ return d?.silent !== !0 && ge('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 (${b.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;
7886
7886
  if (g < 1)
7887
- return console.warn(`Your file is too small for uploading (${y.toFixed(1)}MB). Min size is 1 byte`), null;
7887
+ return console.warn(`Your file is too small for uploading (${b.toFixed(1)}MB). Min size is 1 byte`), null;
7888
7888
  const m = n(p), v = {
7889
7889
  filename: h.name,
7890
7890
  "Content-Md5": m,
@@ -7896,16 +7896,16 @@ var Ma;
7896
7896
  "Content-Disposition": `attachment; filename="${h.name}"`,
7897
7897
  // enforced by the server
7898
7898
  "x-amz-server-side-encryption": "AES256"
7899
- }, b = await fetch(f + "/api/needle/blob", {
7899
+ }, _ = await fetch(f + "/api/needle/blob", {
7900
7900
  method: "POST",
7901
7901
  headers: v,
7902
7902
  signal: d?.abort
7903
7903
  }).then((x) => x.json()).catch((x) => (console.error(x), null));
7904
- if (b == null)
7904
+ if (_ == null)
7905
7905
  return console.warn("Upload failed..."), null;
7906
- if ("error" in b)
7907
- return console.error(b.error), null;
7908
- if ("upload" in b && b.upload) {
7906
+ if ("error" in _)
7907
+ return console.error(_.error), null;
7908
+ if ("upload" in _ && _.upload) {
7909
7909
  let x = function(k) {
7910
7910
  return d?.onProgress?.call(null, { progress01: 0, state: "inprogress" }), fetch(k, {
7911
7911
  method: "PUT",
@@ -7914,14 +7914,14 @@ var Ma;
7914
7914
  signal: d?.abort
7915
7915
  }).then((B) => (d?.onProgress?.call(null, { progress01: 1, state: "finished" }), B)).catch((B) => B);
7916
7916
  };
7917
- console.debug("Uploading file", b.upload);
7917
+ console.debug("Uploading file", _.upload);
7918
7918
  let I = !1, O = null;
7919
7919
  for (let k = 0; k < 3; k++)
7920
7920
  try {
7921
7921
  if (I) break;
7922
7922
  if (d?.abort?.aborted)
7923
7923
  return console.debug("Aborted upload"), null;
7924
- const E = await x(b.upload);
7924
+ const E = await x(_.upload);
7925
7925
  E instanceof Error ? (O = E, await Os(1e3 * k)) : E.ok && (console.debug("File uploaded successfully"), I = !0);
7926
7926
  } catch (E) {
7927
7927
  console.error(E);
@@ -7929,10 +7929,10 @@ var Ma;
7929
7929
  if (!I)
7930
7930
  return console.error(O?.message || "Failed to upload file"), null;
7931
7931
  }
7932
- if ("download" in b) {
7933
- const x = f + b.download;
7932
+ if ("download" in _) {
7933
+ const x = f + _.download;
7934
7934
  return console.debug("File found in blob storage", x), {
7935
- key: b.key,
7935
+ key: _.key,
7936
7936
  success: !0,
7937
7937
  download_url: x
7938
7938
  };
@@ -8600,20 +8600,20 @@ class pO {
8600
8600
  let p = "";
8601
8601
  if (f && n.lastScreenCoverage > 0)
8602
8602
  for (let m = 0; m < f.length; m++) {
8603
- const v = f[m].density, b = m == f.length - 1;
8604
- p += v.toFixed(0) + ">" + (v / n.lastScreenCoverage).toFixed(0) + (b ? "" : ",");
8603
+ const v = f[m].density, _ = m == f.length - 1;
8604
+ p += v.toFixed(0) + ">" + (v / n.lastScreenCoverage).toFixed(0) + (_ ? "" : ",");
8605
8605
  }
8606
8606
  const g = f ? f[o]?.density : -1;
8607
- let y = "LOD " + i.mesh_lod + `
8607
+ let b = "LOD " + i.mesh_lod + `
8608
8608
  TEX ` + i.texture_lod;
8609
- if (Cf == "density" && (y += `
8609
+ if (Cf == "density" && (b += `
8610
8610
  ` + d + ` tris
8611
8611
  ` + (g / n.lastScreenCoverage).toFixed(0) + ` dens
8612
8612
  ` + (n.lastScreenCoverage * 100).toFixed(1) + `% cov
8613
8613
  ` + (n.lastCentrality * 100).toFixed(1) + `% centr
8614
8614
  ` + (hh.min.x.toFixed(2) + "-" + hh.max.x.toFixed(2) + "x" + hh.min.y.toFixed(2) + "-" + hh.max.y.toFixed(2)) + " scr"), n.lastScreenCoverage > 0.1) {
8615
- const m = e, v = m.worldForward, b = m.worldPosition, I = H(v).multiplyScalar(c * 0.7).add(l), O = I.distanceTo(b), k = h[Math.min(h.length - 1, Math.max(0, o))] + "88", E = this.context.domHeight > 0 ? screen.height / this.context.domHeight : 1, B = e.isPerspectiveCamera ? Math.tan(e.fov * Math.PI / 180 / 2) : 1;
8616
- z.DrawLabel(I, y, O * 0.012 * E * B, void 0, 16777215, k);
8615
+ const m = e, v = m.worldForward, _ = m.worldPosition, I = H(v).multiplyScalar(c * 0.7).add(l), O = I.distanceTo(_), k = h[Math.min(h.length - 1, Math.max(0, o))] + "88", E = this.context.domHeight > 0 ? screen.height / this.context.domHeight : 1, B = e.isPerspectiveCamera ? Math.tan(e.fov * Math.PI / 180 / 2) : 1;
8616
+ z.DrawLabel(I, b, O * 0.012 * E * B, void 0, 16777215, k);
8617
8617
  }
8618
8618
  }
8619
8619
  }
@@ -8682,12 +8682,12 @@ function Zm(s, e = 1) {
8682
8682
  function bO(s, e, t, i = 1, n = 3) {
8683
8683
  const r = i * n, a = [s, e, t], l = a.length, c = new Uint8Array(4 * l * r), h = new se();
8684
8684
  for (let f = 0; f < n; f++) {
8685
- const p = Math.floor(f / n * l), g = j.clamp(p + 1, 0, l - 1), y = a[p], m = a[g], v = f / n * l % 1;
8686
- h.lerpColors(y, m, v);
8687
- const b = Math.floor(h.r * 255), x = Math.floor(h.g * 255), I = Math.floor(h.b * 255);
8685
+ const p = Math.floor(f / n * l), g = j.clamp(p + 1, 0, l - 1), b = a[p], m = a[g], v = f / n * l % 1;
8686
+ h.lerpColors(b, m, v);
8687
+ const _ = Math.floor(h.r * 255), x = Math.floor(h.g * 255), I = Math.floor(h.b * 255);
8688
8688
  for (let O = 0; O < i; O++) {
8689
8689
  const k = (f * i + O) * 4;
8690
- c[k + 0] = b, c[k + 1] = x, c[k + 2] = I, c[k + 3] = 255;
8690
+ c[k + 0] = _, c[k + 1] = x, c[k + 2] = I, c[k + 3] = 255;
8691
8691
  }
8692
8692
  }
8693
8693
  const d = new Sm(c, i, n);
@@ -11865,24 +11865,24 @@ function xL(s) {
11865
11865
  if (n) {
11866
11866
  const c = new i(), h = Object.getOwnPropertyDescriptors(c);
11867
11867
  for (const d of n) {
11868
- const f = d, p = f.isComponent === !0, g = p ? f.activeAndEnabled : !0, y = p ? f.context : void 0;
11868
+ const f = d, p = f.isComponent === !0, g = p ? f.activeAndEnabled : !0, b = p ? f.context : void 0;
11869
11869
  try {
11870
- if (p && y && hs(f, y), p && g && (f.enabled = !1), d.onBeforeHotReloadFields && d.onBeforeHotReloadFields() === !1)
11870
+ if (p && b && hs(f, b), p && g && (f.enabled = !1), d.onBeforeHotReloadFields && d.onBeforeHotReloadFields() === !1)
11871
11871
  continue;
11872
11872
  for (const m in h)
11873
11873
  if (h[m].writable) {
11874
11874
  if (d[m] === void 0)
11875
11875
  d[m] = c[m];
11876
11876
  else if (typeof d[m] == "function" && !d[m].prototype) {
11877
- const b = d[m], x = b.name, I = "bound ";
11877
+ const _ = d[m], x = _.name, I = "bound ";
11878
11878
  if (x === I) continue;
11879
- const O = b.name.substring(I.length), k = i.prototype[O];
11879
+ const O = _.name.substring(I.length), k = i.prototype[O];
11880
11880
  k && (d[m] = k.bind(d));
11881
11881
  }
11882
11882
  }
11883
11883
  d.onAfterHotReloadFields && d.onAfterHotReloadFields();
11884
11884
  } finally {
11885
- p && y && Hm(f, y), p && g && (f.enabled = !0);
11885
+ p && b && Hm(f, b), p && g && (f.enabled = !0);
11886
11886
  }
11887
11887
  }
11888
11888
  }
@@ -12531,21 +12531,21 @@ class R {
12531
12531
  setWorldRotation(e, t, i, n = !0) {
12532
12532
  Kd(this.gameObject, e, t, i, n);
12533
12533
  }
12534
- static _forward = new _();
12534
+ static _forward = new y();
12535
12535
  /**
12536
12536
  * Gets the forward direction vector (0,0,-1) of this component's GameObject in world space
12537
12537
  */
12538
12538
  get forward() {
12539
12539
  return R._forward.set(0, 0, -1).applyQuaternion(this.worldQuaternion);
12540
12540
  }
12541
- static _right = new _();
12541
+ static _right = new y();
12542
12542
  /**
12543
12543
  * Gets the right direction vector (1,0,0) of this component's GameObject in world space
12544
12544
  */
12545
12545
  get right() {
12546
12546
  return R._right.set(1, 0, 0).applyQuaternion(this.worldQuaternion);
12547
12547
  }
12548
- static _up = new _();
12548
+ static _up = new y();
12549
12549
  /**
12550
12550
  * Gets the up direction vector (0,1,0) of this component's GameObject in world space
12551
12551
  */
@@ -12607,7 +12607,7 @@ class au extends R {
12607
12607
  centered = !0;
12608
12608
  _centerPos;
12609
12609
  awake() {
12610
- this._centerPos = new _();
12610
+ this._centerPos = new y();
12611
12611
  }
12612
12612
  update() {
12613
12613
  if (!this.from || !this.to) return;
@@ -13575,7 +13575,7 @@ class nt {
13575
13575
  positionWrapper = null;
13576
13576
  rotationWrapper = null;
13577
13577
  context;
13578
- positionChange = new _();
13578
+ positionChange = new y();
13579
13579
  rotationChange = new U();
13580
13580
  constructor(e, t, i, n, o) {
13581
13581
  if (this.context = e, this.root = t, this.clip = i, nt.firstKeyframeRotation[this.cacheId] || (nt.firstKeyframeRotation[this.cacheId] = new U()), o) {
@@ -13601,7 +13601,7 @@ class nt {
13601
13601
  if (t) {
13602
13602
  const i = this.root;
13603
13603
  mh && i.add(new vi()), nt.lastObjPosition[this.cacheId] || (nt.lastObjPosition[this.cacheId] = this.root.position.clone());
13604
- const n = new _(), o = new _();
13604
+ const n = new y(), o = new y();
13605
13605
  this.positionWrapper = new C_(t, (r, a) => {
13606
13606
  const l = this.action.getEffectiveWeight();
13607
13607
  return mh && i.position.length() > 8 && i.position.set(0, i.position.y, 0), r > this._prevTime && (n.set(a[0], a[1], a[2]), n.sub(o), n.multiplyScalar(l), n.applyQuaternion(this.getClipRotationOffset()), n.applyQuaternion(i.quaternion), this.positionChange.copy(n)), o.fromArray(a), this._prevTime = r, a[0] = 0, a[1] = 0, a[2] = 0, a;
@@ -13634,7 +13634,7 @@ class tk {
13634
13634
  controller;
13635
13635
  handler = [];
13636
13636
  root;
13637
- basePosition = new _();
13637
+ basePosition = new y();
13638
13638
  baseQuaternion = new U();
13639
13639
  baseRotation = new ot();
13640
13640
  constructor(e) {
@@ -13656,7 +13656,7 @@ class tk {
13656
13656
  for (const t of this.handler)
13657
13657
  t.onBeforeUpdate(e);
13658
13658
  }
13659
- summedPosition = new _();
13659
+ summedPosition = new y();
13660
13660
  summedRotation = new U();
13661
13661
  onAfterUpdate(e) {
13662
13662
  if (!(e <= 0)) {
@@ -14402,7 +14402,7 @@ function hk(s, e, t, i, n) {
14402
14402
  if (this[r] === void 0) {
14403
14403
  this[r] = this[o];
14404
14404
  const l = this[o];
14405
- if (l instanceof J || l instanceof _ || l instanceof fe || l instanceof U) {
14405
+ if (l instanceof J || l instanceof y || l instanceof fe || l instanceof U) {
14406
14406
  const c = this[o];
14407
14407
  Am(c, () => {
14408
14408
  this.onValidate(o);
@@ -14534,7 +14534,7 @@ const si = class qh extends R {
14534
14534
  }
14535
14535
  _mass = 0;
14536
14536
  useGravity = !0;
14537
- centerOfMass = new _(0, 0, 0);
14537
+ centerOfMass = new y(0, 0, 0);
14538
14538
  constraints = Ge.None;
14539
14539
  isKinematic = !1;
14540
14540
  drag = 0;
@@ -14603,12 +14603,12 @@ const si = class qh extends R {
14603
14603
  }
14604
14604
  _gravityScale = 1;
14605
14605
  dominanceGroup = 0;
14606
- static tempPosition = new _();
14606
+ static tempPosition = new y();
14607
14607
  _propertiesChanged = !1;
14608
- _currentVelocity = new _();
14609
- _smoothedVelocity = new _();
14610
- _smoothedVelocityGetter = new _();
14611
- _lastPosition = new _();
14608
+ _currentVelocity = new y();
14609
+ _smoothedVelocity = new y();
14610
+ _smoothedVelocityGetter = new y();
14611
+ _lastPosition = new y();
14612
14612
  _watch;
14613
14613
  awake() {
14614
14614
  this._watch = void 0, this._propertiesChanged = !1;
@@ -14687,7 +14687,7 @@ const si = class qh extends R {
14687
14687
  return e ? (this._currentVelocity.x = e.x, this._currentVelocity.y = e.y, this._currentVelocity.z = e.z, this._currentVelocity) : this._currentVelocity.set(0, 0, 0);
14688
14688
  }
14689
14689
  setVelocity(e, t, i, n = !0) {
14690
- if (e instanceof _) {
14690
+ if (e instanceof y) {
14691
14691
  const o = e;
14692
14692
  this.context.physics.engine?.setLinearVelocity(this, o, n);
14693
14693
  return;
@@ -14744,7 +14744,7 @@ Si([
14744
14744
  u()
14745
14745
  ], si.prototype, "useGravity", 2);
14746
14746
  Si([
14747
- u(_)
14747
+ u(y)
14748
14748
  ], si.prototype, "centerOfMass", 2);
14749
14749
  Si([
14750
14750
  Lt(),
@@ -14781,8 +14781,8 @@ Si([
14781
14781
  Lt()
14782
14782
  ], si.prototype, "dominanceGroup", 2);
14783
14783
  let rt = si;
14784
- new _();
14785
- new _();
14784
+ new y();
14785
+ new y();
14786
14786
  const Gs = w("debugsync"), yc = "STRS";
14787
14787
  _0(yc, us.getRootAsSyncedTransformModel);
14788
14788
  const _n = new Em();
@@ -14855,7 +14855,7 @@ class zn extends R {
14855
14855
  receivedDataCallback = null;
14856
14856
  /** @internal */
14857
14857
  awake() {
14858
- Gs && console.log("new instance", this.guid, this), this._receivedDataBefore = !1, this._targetPosition = new _(), this._targetRotation = new U(), this.lastPosition = new _(), this.lastRotation = new U(), this.lastScale = new _(), this.rb = S.getComponentInChildren(this.gameObject, rt), this.rb && (this._wasKinematic = this.rb.isKinematic), this.receivedUpdate = !0, this._model = new b0(this.context.connection, this.guid), this.context.connection.isConnected && this.tryGetLastState(), this.joinedRoomCallback = this.tryGetLastState.bind(this), this.context.connection.beginListen(te.JoinedRoom, this.joinedRoomCallback), this.receivedDataCallback = this.onReceivedData.bind(this), this.context.connection.beginListenBinary(yc, this.receivedDataCallback);
14858
+ Gs && console.log("new instance", this.guid, this), this._receivedDataBefore = !1, this._targetPosition = new y(), this._targetRotation = new U(), this.lastPosition = new y(), this.lastRotation = new U(), this.lastScale = new y(), this.rb = S.getComponentInChildren(this.gameObject, rt), this.rb && (this._wasKinematic = this.rb.isKinematic), this.receivedUpdate = !0, this._model = new b0(this.context.connection, this.guid), this.context.connection.isConnected && this.tryGetLastState(), this.joinedRoomCallback = this.tryGetLastState.bind(this), this.context.connection.beginListen(te.JoinedRoom, this.joinedRoomCallback), this.receivedDataCallback = this.onReceivedData.bind(this), this.context.connection.beginListenBinary(yc, this.receivedDataCallback);
14859
14859
  }
14860
14860
  /** @internal */
14861
14861
  onDestroy() {
@@ -16108,13 +16108,13 @@ class ye extends R {
16108
16108
  _controls = null;
16109
16109
  _cameraObject = null;
16110
16110
  _lookTargetLerpActive = !1;
16111
- _lookTargetStartPosition = new _();
16112
- _lookTargetEndPosition = new _();
16111
+ _lookTargetStartPosition = new y();
16112
+ _lookTargetEndPosition = new y();
16113
16113
  _lookTargetLerp01 = 0;
16114
16114
  _lookTargetLerpDuration = 0;
16115
16115
  _cameraLerpActive = !1;
16116
- _cameraStartPosition = new _();
16117
- _cameraEndPosition = new _();
16116
+ _cameraStartPosition = new y();
16117
+ _cameraEndPosition = new y();
16118
16118
  _cameraLerp01 = 0;
16119
16119
  _cameraLerpDuration = 0;
16120
16120
  _fovLerpActive = !1;
@@ -16241,7 +16241,7 @@ class ye extends R {
16241
16241
  const t = S.getComponent(this.gameObject, yi);
16242
16242
  if (t && !this.setLookTargetFromConstraint()) {
16243
16243
  this.debugLog && console.log("NO TARGET");
16244
- const i = Z(t.threeCamera), n = Math.max(0.01, i.length()), o = new _(0, 0, -n).applyMatrix4(t.threeCamera.matrixWorld);
16244
+ const i = Z(t.threeCamera), n = Math.max(0.01, i.length()), o = new y(0, 0, -n).applyMatrix4(t.threeCamera.matrixWorld);
16245
16245
  Ft && z.DrawLine(i, o, 5592575, 10), this.setLookTargetPosition(o, !0);
16246
16246
  }
16247
16247
  if (!this.setLookTargetFromConstraint()) {
@@ -16319,7 +16319,7 @@ class ye extends R {
16319
16319
  * @param immediateOrDuration If true the camera will move immediately to the new position, otherwise it will lerp. If a number is passed in it will be used as the duration of the lerp.
16320
16320
  */
16321
16321
  setCameraTargetPosition(e, t = !1) {
16322
- e && (e instanceof M && (e = Z(e)), this._cameraEndPosition || (this._cameraEndPosition = new _()), this._cameraEndPosition.copy(e), t === !0 ? (this._cameraLerpActive = !1, this._cameraObject && this._cameraObject.position.copy(this._cameraEndPosition)) : this._cameraObject && (this._cameraLerpActive = !0, this._cameraLerp01 = 0, this._cameraStartPosition.copy(this._cameraObject?.position), typeof t == "number" ? this._cameraLerpDuration = t : this._cameraLerpDuration = this.targetLerpDuration));
16322
+ e && (e instanceof M && (e = Z(e)), this._cameraEndPosition || (this._cameraEndPosition = new y()), this._cameraEndPosition.copy(e), t === !0 ? (this._cameraLerpActive = !1, this._cameraObject && this._cameraObject.position.copy(this._cameraEndPosition)) : this._cameraObject && (this._cameraLerpActive = !0, this._cameraLerp01 = 0, this._cameraStartPosition.copy(this._cameraObject?.position), typeof t == "number" ? this._cameraLerpDuration = t : this._cameraLerpDuration = this.targetLerpDuration));
16323
16323
  }
16324
16324
  // public setCameraTargetRotation(rotation: Vector3 | Euler | Quaternion, immediateOrDuration: boolean | number = false): void {
16325
16325
  // if (!this._cameraObject) return;
@@ -16418,10 +16418,10 @@ class ye extends R {
16418
16418
  return;
16419
16419
  }
16420
16420
  t || (t = {});
16421
- const { immediate: r = !1, centerCamera: a, cameraNearFar: l = "auto", fitOffset: c = 1.1, fov: h = n?.fov } = t, d = new _(), f = new _(), p = ii(i, void 0, this._camera?.threeCamera?.layers), g = p.clone();
16421
+ const { immediate: r = !1, centerCamera: a, cameraNearFar: l = "auto", fitOffset: c = 1.1, fov: h = n?.fov } = t, d = new y(), f = new y(), p = ii(i, void 0, this._camera?.threeCamera?.layers), g = p.clone();
16422
16422
  p.getCenter(f);
16423
- const y = new _();
16424
- if (p.getSize(y), n.updateMatrixWorld(), p.applyMatrix4(n.matrixWorldInverse), p.getSize(d), p.setFromCenterAndSize(f, d), Number.isNaN(d.x) || Number.isNaN(d.y) || Number.isNaN(d.z)) {
16423
+ const b = new y();
16424
+ if (p.getSize(b), n.updateMatrixWorld(), p.applyMatrix4(n.matrixWorldInverse), p.getSize(d), p.setFromCenterAndSize(f, d), Number.isNaN(d.x) || Number.isNaN(d.y) || Number.isNaN(d.z)) {
16425
16425
  console.warn("Camera fit size resultet in NaN", n, p, [...i]);
16426
16426
  return;
16427
16427
  }
@@ -16429,17 +16429,17 @@ class ye extends R {
16429
16429
  fl && console.warn("Camera fit size is zero", p, [...i]);
16430
16430
  return;
16431
16431
  }
16432
- const m = h, v = 2 * Math.atan(Math.tan(m * Math.PI / 360 / 2) * n.aspect) / Math.PI * 360, b = d.y / (2 * Math.atan(Math.PI * m / 360)), x = d.x / (2 * Math.atan(Math.PI * v / 360)), I = c * Math.max(b, x) + d.z / 2;
16433
- fl && console.log("Fit camera to objects", { fitHeightDistance: b, fitWidthDistance: x, distance: I, verticalFov: m, horizontalFov: v }), this.maxZoom = I * 10, this.minZoom = I * 0.01;
16432
+ const m = h, v = 2 * Math.atan(Math.tan(m * Math.PI / 360 / 2) * n.aspect) / Math.PI * 360, _ = d.y / (2 * Math.atan(Math.PI * m / 360)), x = d.x / (2 * Math.atan(Math.PI * v / 360)), I = c * Math.max(_, x) + d.z / 2;
16433
+ fl && console.log("Fit camera to objects", { fitHeightDistance: _, fitWidthDistance: x, distance: I, verticalFov: m, horizontalFov: v }), this.maxZoom = I * 10, this.minZoom = I * 0.01;
16434
16434
  const O = 0.05, k = f.clone();
16435
16435
  if (k.y -= d.y * O, t.targetOffset && (t.targetOffset.x !== void 0 && (k.x += t.targetOffset.x), t.targetOffset.y !== void 0 && (k.y += t.targetOffset.y), t.targetOffset.z !== void 0 && (k.z += t.targetOffset.z)), t.relativeTargetOffset && (t.relativeTargetOffset.x !== void 0 && (k.x += t.relativeTargetOffset.x * d.x), t.relativeTargetOffset.y !== void 0 && (k.y += t.relativeTargetOffset.y * d.y), t.relativeTargetOffset.z !== void 0 && (k.z += t.relativeTargetOffset.z * d.z)), this.setLookTargetPosition(k, r), this.setFieldOfView(t.fov, r), l == null || l == "auto") {
16436
- const W = S.findObjectOfType(Rs), X = W ? W.radius : 0, A = Math.max(y.x, y.y, y.z, X);
16436
+ const W = S.findObjectOfType(Rs), X = W ? W.radius : 0, A = Math.max(b.x, b.y, b.z, X);
16437
16437
  n.near = I / 100, n.far = A + I * 10, n.updateProjectionMatrix(), W && (this.maxZoom = Math.max(Math.min(this.maxZoom, X * 0.5), I));
16438
16438
  }
16439
16439
  const E = o.getDistance();
16440
16440
  E < this.minZoom && (this.minZoom = E * 0.9), E > this.maxZoom && (this.maxZoom = E * 1.1);
16441
16441
  const B = f.clone();
16442
- t.fitDirection ? B.sub(new _().copy(t.fitDirection).multiplyScalar(1e6)) : B.sub(n.worldPosition), a === "y" && (B.y = 0), B.normalize(), B.multiplyScalar(I), a === "y" && (B.y += -O * 4 * I);
16442
+ t.fitDirection ? B.sub(new y().copy(t.fitDirection).multiplyScalar(1e6)) : B.sub(n.worldPosition), a === "y" && (B.y = 0), B.normalize(), B.multiplyScalar(I), a === "y" && (B.y += -O * 4 * I);
16443
16443
  let D = f.clone().sub(B);
16444
16444
  t.cameraOffset && (t.cameraOffset.x !== void 0 && (D.x += t.cameraOffset.x), t.cameraOffset.y !== void 0 && (D.y += t.cameraOffset.y), t.cameraOffset.z !== void 0 && (D.z += t.cameraOffset.z)), t.relativeCameraOffset && (t.relativeCameraOffset.x !== void 0 && (D.x += t.relativeCameraOffset.x * d.x), t.relativeCameraOffset.y !== void 0 && (D.y += t.relativeCameraOffset.y * d.y), t.relativeCameraOffset.z !== void 0 && (D.z += t.relativeCameraOffset.z * d.z)), n.parent && (D = n.parent.worldToLocal(D)), this.setCameraTargetPosition(D, r), (fl || t.debug) && (z.DrawWireBox3(p, 16777011, 10), z.DrawWireBox3(g, 65280, 10), !this._haveAttachedKeyboardEvents && fl && (this._haveAttachedKeyboardEvents = !0, document.body.addEventListener("keydown", (W) => {
16445
16445
  if (W.code === "KeyF") {
@@ -16694,8 +16694,8 @@ const Xs = w("debugcam"), k_ = w("debugscreenpointtoray"), Dt = class Il extends
16694
16694
  get threeCamera() {
16695
16695
  return this.activeAndEnabled && this.buildCamera(), this._cam;
16696
16696
  }
16697
- static _origin = new _();
16698
- static _direction = new _();
16697
+ static _origin = new y();
16698
+ static _direction = new y();
16699
16699
  /**
16700
16700
  * Converts screen coordinates to a ray in world space.
16701
16701
  * Useful for implementing picking or raycasting from screen to world.
@@ -17350,7 +17350,7 @@ class da {
17350
17350
  }
17351
17351
  class Bk {
17352
17352
  guid;
17353
- position = new _();
17353
+ position = new y();
17354
17354
  }
17355
17355
  class Cd extends R {
17356
17356
  set controlledTarget(e) {
@@ -17407,7 +17407,7 @@ var lg = /* @__PURE__ */ ((s) => (s[s.None = 0] = "None", s[s.DontExport = 1] =
17407
17407
  function zk(s) {
17408
17408
  return s && s.isComponent;
17409
17409
  }
17410
- const EL = Symbol("object"), Af = new Hi(() => new _(), 20);
17410
+ const EL = Symbol("object"), Af = new Hi(() => new y(), 20);
17411
17411
  class Uk {
17412
17412
  _point;
17413
17413
  _normal;
@@ -18219,9 +18219,9 @@ const fu = class uv extends R {
18219
18219
  awake() {
18220
18220
  this.brain || (this.brain = S.getComponentInParent(this.gameObject, Cd)), this.brain || (this.brain = S.addComponent(this.gameObject, Cd)), this.brain && this.target && (this.brain.controlledTarget = this.target);
18221
18221
  }
18222
- vec = new _();
18223
- static forward = new _(0, 0, 1);
18224
- currentTargetPoint = new _();
18222
+ vec = new y();
18223
+ static forward = new y(0, 0, 1);
18224
+ currentTargetPoint = new y();
18225
18225
  update() {
18226
18226
  const e = this.target;
18227
18227
  if (e && this.head) {
@@ -18300,7 +18300,7 @@ class pv extends R {
18300
18300
  o.add(e), o.multiplyScalar(0.5);
18301
18301
  const r = Z(this.hint).clone();
18302
18302
  r.sub(o);
18303
- const a = new _();
18303
+ const a = new y();
18304
18304
  a.crossVectors(r, n), a.crossVectors(n, a), a.normalize();
18305
18305
  const l = i * 0.5, c = Math.max(this.desiredDistance, l), h = Math.sqrt(c * c - l * l), d = a.clone();
18306
18306
  d.multiplyScalar(h), d.add(o), Ot(this.gameObject, d);
@@ -18314,9 +18314,9 @@ class Pt extends R {
18314
18314
  box = null;
18315
18315
  static testBox = new bi();
18316
18316
  _lastMatrixUpdateFrame = -1;
18317
- static _position = new _();
18318
- static _size = new _(0.01, 0.01, 0.01);
18319
- static _emptyObjectSize = new _(0.01, 0.01, 0.01);
18317
+ static _position = new y();
18318
+ static _size = new y(0.01, 0.01, 0.01);
18319
+ static _emptyObjectSize = new y(0.01, 0.01, 0.01);
18320
18320
  /**
18321
18321
  * Tests if an object intersects with this helper's bounding box
18322
18322
  * @param obj The object to test for intersection
@@ -18447,7 +18447,7 @@ oi([
18447
18447
  ], Ci.prototype, "filter");
18448
18448
  class Rc extends Ci {
18449
18449
  radius = 0.5;
18450
- center = new _(0, 0, 0);
18450
+ center = new y(0, 0, 0);
18451
18451
  /**
18452
18452
  * Registers the sphere collider with the physics engine and sets up scale change monitoring.
18453
18453
  */
@@ -18472,7 +18472,7 @@ oi([
18472
18472
  u()
18473
18473
  ], Rc.prototype, "radius");
18474
18474
  oi([
18475
- u(_)
18475
+ u(y)
18476
18476
  ], Rc.prototype, "center");
18477
18477
  const ug = class mv extends Ci {
18478
18478
  /**
@@ -18485,8 +18485,8 @@ const ug = class mv extends Ci {
18485
18485
  const i = An(e, mv);
18486
18486
  return i.autoFit(), t?.rigidbody === !0 && An(e, rt, { isKinematic: !1 }), i;
18487
18487
  }
18488
- size = new _(1, 1, 1);
18489
- center = new _(0, 0, 0);
18488
+ size = new y(1, 1, 1);
18489
+ center = new y(0, 0, 0);
18490
18490
  /**
18491
18491
  * Registers the box collider with the physics engine and sets up scale change monitoring.
18492
18492
  * @internal
@@ -18517,15 +18517,15 @@ const ug = class mv extends Ci {
18517
18517
  const t = this.gameObject, i = t.position.clone(), n = t.quaternion.clone(), o = t.scale.clone(), r = t.parent;
18518
18518
  t.position.set(0, 0, 0), t.quaternion.set(0, 0, 0, 1), t.scale.set(1, 1, 1), t.parent = null, t.updateMatrix();
18519
18519
  const a = ii([t]);
18520
- t.position.copy(i), t.quaternion.copy(n), t.scale.copy(o), t.parent = r, e?.debug === !0 && z.DrawWireBox3(a, 16768256, 20), this.size = a.getSize(new _()) || new _(1, 1, 1), this.center = a.getCenter(new _()) || new _(0, 0, 0), this.size.length() <= 0 && this.size.set(0.01, 0.01, 0.01);
18520
+ t.position.copy(i), t.quaternion.copy(n), t.scale.copy(o), t.parent = r, e?.debug === !0 && z.DrawWireBox3(a, 16768256, 20), this.size = a.getSize(new y()) || new y(1, 1, 1), this.center = a.getCenter(new y()) || new y(0, 0, 0), this.size.length() <= 0 && this.size.set(0.01, 0.01, 0.01);
18521
18521
  }
18522
18522
  };
18523
18523
  oi([
18524
18524
  Lt(),
18525
- u(_)
18525
+ u(y)
18526
18526
  ], ug.prototype, "size");
18527
18527
  oi([
18528
- u(_)
18528
+ u(y)
18529
18529
  ], ug.prototype, "center");
18530
18530
  let fg = ug;
18531
18531
  class xr extends Ci {
@@ -18571,7 +18571,7 @@ oi([
18571
18571
  u()
18572
18572
  ], xr.prototype, "convex");
18573
18573
  class po extends Ci {
18574
- center = new _(0, 0, 0);
18574
+ center = new y(0, 0, 0);
18575
18575
  radius = 0.5;
18576
18576
  height = 2;
18577
18577
  /**
@@ -18582,7 +18582,7 @@ class po extends Ci {
18582
18582
  }
18583
18583
  }
18584
18584
  oi([
18585
- u(_)
18585
+ u(y)
18586
18586
  ], po.prototype, "center");
18587
18587
  oi([
18588
18588
  u()
@@ -18597,7 +18597,7 @@ var rM = Object.defineProperty, Ts = (s, e, t, i) => {
18597
18597
  };
18598
18598
  const R_ = w("debugcharactercontroller");
18599
18599
  class Fa extends R {
18600
- center = new _(0, 0, 0);
18600
+ center = new y(0, 0, 0);
18601
18601
  radius = 0.5;
18602
18602
  height = 2;
18603
18603
  _rigidbody = null;
@@ -18612,7 +18612,7 @@ class Fa extends R {
18612
18612
  const e = this.rigidbody;
18613
18613
  let t = this.gameObject.getComponent(po);
18614
18614
  t || (t = this.gameObject.addComponent(po)), t.center.copy(this.center), t.radius = this.radius, t.height = this.height;
18615
- const i = new _(0, 0, 1), n = new _(1, 0, 0), o = new _(0, 1, 0), r = this.gameObject.getWorldDirection(new _());
18615
+ const i = new y(0, 0, 1), n = new y(1, 0, 0), o = new y(0, 1, 0), r = this.gameObject.getWorldDirection(new y());
18616
18616
  r.y = 0;
18617
18617
  const a = n.dot(r) < 0 ? -1 : 1, l = i.angleTo(r) * a;
18618
18618
  this.gameObject.setRotationFromAxisAngle(o, l), e.lockRotationX = !0, e.lockRotationY = !0, e.lockRotationZ = !0;
@@ -18629,7 +18629,7 @@ class Fa extends R {
18629
18629
  get isGrounded() {
18630
18630
  return this._activeGroundCollisions.size > 0;
18631
18631
  }
18632
- _contactVelocity = new _();
18632
+ _contactVelocity = new y();
18633
18633
  get contactVelocity() {
18634
18634
  this._contactVelocity.set(0, 0, 0);
18635
18635
  for (const e of this._activeGroundCollisions) {
@@ -18640,7 +18640,7 @@ class Fa extends R {
18640
18640
  }
18641
18641
  }
18642
18642
  Ts([
18643
- u(_)
18643
+ u(y)
18644
18644
  ], Fa.prototype, "center");
18645
18645
  Ts([
18646
18646
  u()
@@ -18678,22 +18678,22 @@ class _o extends R {
18678
18678
  onBeforeRender() {
18679
18679
  this.handleInput(this.moveInput, this.lookInput, this.jumpInput), this.lookInput.set(0, 0), this.moveInput.set(0, 0), this.jumpInput = !1;
18680
18680
  }
18681
- _currentSpeed = new _(0, 0, 0);
18682
- _currentAngularSpeed = new _(0, 0, 0);
18683
- _temp = new _(0, 0, 0);
18681
+ _currentSpeed = new y(0, 0, 0);
18682
+ _currentAngularSpeed = new y(0, 0, 0);
18683
+ _temp = new y(0, 0, 0);
18684
18684
  _jumpCount = 0;
18685
18685
  _currentRotation;
18686
18686
  handleInput(e, t, i) {
18687
18687
  if (this.controller?.isGrounded && (this._jumpCount = 0, this.doubleJumpForce > 0 && this.animator?.setBool("doubleJump", !1)), this._currentSpeed.z += e.y * this.movementSpeed * this.context.time.deltaTime, this.animator?.setBool("running", e.length() > 0.01), this.animator?.setBool("jumping", this.controller?.isGrounded === !0 && i), this._temp.copy(this._currentSpeed), this._temp.applyQuaternion(this.gameObject.quaternion), this.controller ? this.controller.move(this._temp) : this.gameObject.position.add(this._temp), this._currentAngularSpeed.y += j.toRadians(-t.x * this.rotationSpeed) * this.context.time.deltaTime, this.lookForward && Math.abs(this._currentAngularSpeed.y) < 0.01) {
18688
18688
  const n = this.context.mainCameraComponent.forward;
18689
- n.y = 0, n.normalize(), this._currentRotation.setFromUnitVectors(new _(0, 0, 1), n), this.gameObject.quaternion.slerp(this._currentRotation, this.context.time.deltaTime * 10);
18689
+ n.y = 0, n.normalize(), this._currentRotation.setFromUnitVectors(new y(0, 0, 1), n), this.gameObject.quaternion.slerp(this._currentRotation, this.context.time.deltaTime * 10);
18690
18690
  }
18691
18691
  if (this.gameObject.rotateY(this._currentAngularSpeed.y), this._currentSpeed.multiplyScalar(1 - this.context.time.deltaTime * 10), this._currentAngularSpeed.y *= 1 - this.context.time.deltaTime * 10, this.controller && i && this.jumpForce > 0) {
18692
18692
  let n = this.controller?.isGrounded;
18693
18693
  if (this.doubleJumpForce > 0 && !this.controller?.isGrounded && this._jumpCount === 1 && (n = !0, this.animator?.setBool("doubleJump", !0)), n) {
18694
18694
  this._jumpCount += 1;
18695
18695
  const o = this.controller.rigidbody, r = this._jumpCount === 2 ? this.doubleJumpForce : this.jumpForce;
18696
- o.applyImpulse(new _(0, 1, 0).multiplyScalar(r));
18696
+ o.applyImpulse(new y(0, 1, 0).multiplyScalar(r));
18697
18697
  }
18698
18698
  }
18699
18699
  if (this.controller) {
@@ -18811,7 +18811,7 @@ const Sr = class Ll extends R {
18811
18811
  fitShadows(e = {}) {
18812
18812
  pl && console.warn("Fitting shadows to scene"), vp(this.shadowsRoot, !1);
18813
18813
  const t = e.object || this.context.scene, i = ii(t, [this.shadowsRoot]), n = Math.max(1, this.blur / 32), o = i.max.x - i.min.x, r = i.max.z - i.min.z;
18814
- i.expandByVector(new _(n * o, 0, n * r)), pl && z.DrawWireBox3(i, 16776960, 60), this.gameObject.parent && i.applyMatrix4(this.gameObject.parent.matrixWorld.clone().invert());
18814
+ i.expandByVector(new y(n * o, 0, n * r)), pl && z.DrawWireBox3(i, 16776960, 60), this.gameObject.parent && i.applyMatrix4(this.gameObject.parent.matrixWorld.clone().invert());
18815
18815
  const a = i.min, l = Math.max(1e-5, (i.max.y - a.y) * 2e-3);
18816
18816
  i.max.y += l, this.shadowsRoot.position.set((a.x + i.max.x) / 2, a.y - l, (a.z + i.max.z) / 2), this.shadowsRoot.scale.set(i.max.x - a.x, i.max.y - a.y, i.max.z - a.z), e.positionOffset && (e.positionOffset.x !== void 0 && (this.shadowsRoot.position.x += e.positionOffset.x), e.positionOffset.y !== void 0 && (this.shadowsRoot.position.y += e.positionOffset.y), e.positionOffset.z !== void 0 && (this.shadowsRoot.position.z += e.positionOffset.z)), e.scaleFactor && (e.scaleFactor.x !== void 0 && (this.shadowsRoot.scale.x *= e.scaleFactor.x), e.scaleFactor.y !== void 0 && (this.shadowsRoot.scale.y *= e.scaleFactor.y), e.scaleFactor.z !== void 0 && (this.shadowsRoot.scale.z *= e.scaleFactor.z)), this.applyMinSize(), this.shadowsRoot.matrixWorldNeedsUpdate = !0, pl && console.log("Fitted shadows to scene", this.shadowsRoot.scale.clone());
18817
18817
  }
@@ -18883,8 +18883,8 @@ const Sr = class Ll extends R {
18883
18883
  for (const p of h.opaque) {
18884
18884
  if (!p.object.visible) continue;
18885
18885
  const g = p.material;
18886
- let y = p.material.colorWrite == !1 || g.wireframe === !0 || s1(p.object) === !1;
18887
- !y && p.material.isLineMaterial && (y = !0), !y && p.material.isPointsMaterial && (y = !0), y && (If.push(p.object), p.object["needle:visible"] = p.object.visible, p.object.visible = !1);
18886
+ let b = p.material.colorWrite == !1 || g.wireframe === !0 || s1(p.object) === !1;
18887
+ !b && p.material.isLineMaterial && (b = !0), !b && p.material.isPointsMaterial && (b = !0), b && (If.push(p.object), p.object["needle:visible"] = p.object.visible, p.object.visible = !1);
18888
18888
  }
18889
18889
  i.setRenderTarget(this.renderTarget), i.clear(), i.render(t, this.shadowCamera), h.transparent = d;
18890
18890
  for (const p of If)
@@ -19067,14 +19067,14 @@ const bo = class ji extends R {
19067
19067
  _draggingRigidbodies = [];
19068
19068
  _potentialDragStartEvt = null;
19069
19069
  _dragHandlers = /* @__PURE__ */ new Map();
19070
- _totalMovement = new _();
19070
+ _totalMovement = new y();
19071
19071
  /** A marker is attached to components that are currently interacted with, to e.g. prevent them from being deleted. */
19072
19072
  _marker = null;
19073
19073
  _isDragging = !1;
19074
19074
  _didDrag = !1;
19075
19075
  /** @internal */
19076
19076
  awake() {
19077
- this._potentialDragStartEvt = null, this._dragHandlers = /* @__PURE__ */ new Map(), this._totalMovement = new _(), this._marker = null, this._isDragging = !1, this._didDrag = !1, this._dragHelper = null, this._draggingRigidbodies = [];
19077
+ this._potentialDragStartEvt = null, this._dragHandlers = /* @__PURE__ */ new Map(), this._totalMovement = new y(), this._marker = null, this._isDragging = !1, this._didDrag = !1, this._dragHelper = null, this._draggingRigidbodies = [];
19078
19078
  }
19079
19079
  /** @internal */
19080
19080
  start() {
@@ -19250,8 +19250,8 @@ class uM {
19250
19250
  context;
19251
19251
  settings;
19252
19252
  gameObject;
19253
- _handlerAAttachmentPoint = new _();
19254
- _handlerBAttachmentPoint = new _();
19253
+ _handlerAAttachmentPoint = new y();
19254
+ _handlerBAttachmentPoint = new y();
19255
19255
  _followObject;
19256
19256
  _manipulatorObject;
19257
19257
  _deviceMode;
@@ -19281,14 +19281,14 @@ class uM {
19281
19281
  }
19282
19282
  this.handlerA.recenter(), this.handlerB.recenter(), this._manipulatorObject.removeFromParent(), this._followObject.removeFromParent(), this._manipulatorObject.destroy(), this._followObject.destroy();
19283
19283
  }
19284
- _manipulatorPosOffset = new _();
19284
+ _manipulatorPosOffset = new y();
19285
19285
  _manipulatorRotOffset = new U();
19286
- _manipulatorScaleOffset = new _();
19287
- _tempVec1 = new _();
19288
- _tempVec2 = new _();
19289
- _tempVec3 = new _();
19286
+ _manipulatorScaleOffset = new y();
19287
+ _tempVec1 = new y();
19288
+ _tempVec2 = new y();
19289
+ _tempVec3 = new y();
19290
19290
  tempLookMatrix = new ee();
19291
- _initialScale = new _();
19291
+ _initialScale = new y();
19292
19292
  _initialDistance = 0;
19293
19293
  alignManipulator() {
19294
19294
  if (!this.handlerA || !this.handlerB) {
@@ -19303,7 +19303,7 @@ class uM {
19303
19303
  const e = this.context.mainCamera;
19304
19304
  this.tempLookMatrix.lookAt(this._tempVec3, this._tempVec2, e.worldUp), this._manipulatorObject.quaternion.setFromRotationMatrix(this.tempLookMatrix);
19305
19305
  const t = this._tempVec1.distanceTo(this._tempVec2);
19306
- this._manipulatorObject.scale.copy(this._initialScale).multiplyScalar(t / this._initialDistance), this._manipulatorObject.updateMatrix(), this._manipulatorObject.updateMatrixWorld(!0), Mn && (z.DrawLabel(this._tempVec3.clone().add(new _(0, 0.2, 0)), "A:B " + t.toFixed(2), 0.03), z.DrawLine(this._tempVec1, this._tempVec2, 65280, 0, !1));
19306
+ this._manipulatorObject.scale.copy(this._initialScale).multiplyScalar(t / this._initialDistance), this._manipulatorObject.updateMatrix(), this._manipulatorObject.updateMatrixWorld(!0), Mn && (z.DrawLabel(this._tempVec3.clone().add(new y(0, 0.2, 0)), "A:B " + t.toFixed(2), 0.03), z.DrawLine(this._tempVec1, this._tempVec2, 65280, 0, !1));
19307
19307
  }
19308
19308
  onDragUpdate() {
19309
19309
  this.alignManipulator();
@@ -19358,29 +19358,29 @@ class Df {
19358
19358
  _lastRig = void 0;
19359
19359
  /** This object is placed at the pivot of the dragged object, and parented to the control space. */
19360
19360
  _followObject;
19361
- _totalMovement = new _();
19361
+ _totalMovement = new y();
19362
19362
  /** Motion along the pointer ray. On screens this doesn't change. In XR it can be used to determine how much
19363
19363
  * effort someone is putting into moving an object closer or further away. */
19364
19364
  _totalMovementAlongRayDirection = 0;
19365
19365
  /** Distance between _followObject and its parent at grab start, in local space */
19366
19366
  _grabStartDistance = 0;
19367
19367
  _deviceMode;
19368
- _followObjectStartPosition = new _();
19368
+ _followObjectStartPosition = new y();
19369
19369
  _followObjectStartQuaternion = new U();
19370
19370
  _followObjectStartWorldQuaternion = new U();
19371
19371
  _lastDragPosRigSpace;
19372
- _tempVec = new _();
19372
+ _tempVec = new y();
19373
19373
  _tempMat = new ee();
19374
- _hitPointInLocalSpace = new _();
19375
- _hitNormalInLocalSpace = new _();
19376
- _bottomCenter = new _();
19377
- _backCenter = new _();
19378
- _backBottomCenter = new _();
19374
+ _hitPointInLocalSpace = new y();
19375
+ _hitNormalInLocalSpace = new y();
19376
+ _bottomCenter = new y();
19377
+ _backCenter = new y();
19378
+ _backBottomCenter = new y();
19379
19379
  _bounds = new bi();
19380
- _dragPlane = new rr(new _(0, 1, 0));
19380
+ _dragPlane = new rr(new y(0, 1, 0));
19381
19381
  _draggedOverObject = null;
19382
19382
  _draggedOverObjectLastSetUp = null;
19383
- _draggedOverObjectLastNormal = new _();
19383
+ _draggedOverObjectLastNormal = new y();
19384
19384
  _draggedOverObjectDuration = 0;
19385
19385
  /** Allows overriding which object is dragged while a drag is already ongoing. Used for example by Duplicatable */
19386
19386
  setTargetObject(e) {
@@ -19403,7 +19403,7 @@ class Df {
19403
19403
  const t = this._hitPointInLocalSpace.clone();
19404
19404
  this.gameObject.localToWorld(t), this._grabStartDistance = t.distanceTo(e.worldPosition);
19405
19405
  const n = K.active?.rig?.gameObject?.worldScale.x || 1;
19406
- this._grabStartDistance /= n, this._totalMovementAlongRayDirection = 0, this._lastDragPosRigSpace = void 0, Mn && (z.DrawLine(t, e.worldPosition, 65280, 0.5, !1), z.DrawLabel(e.worldPosition.add(new _(0, 0.1, 0)), this._grabStartDistance.toFixed(2), 0.03, 0.5));
19406
+ this._grabStartDistance /= n, this._totalMovementAlongRayDirection = 0, this._lastDragPosRigSpace = void 0, Mn && (z.DrawLine(t, e.worldPosition, 65280, 0.5, !1), z.DrawLabel(e.worldPosition.add(new y(0, 0.1, 0)), this._grabStartDistance.toFixed(2), 0.03, 0.5));
19407
19407
  }
19408
19408
  onDragStart(e) {
19409
19409
  if (!this.gameObject) {
@@ -19413,17 +19413,17 @@ class Df {
19413
19413
  if (e.event.space.add(this._followObject), this._lastDragPosRigSpace = void 0, e.point && e.normal)
19414
19414
  this._hitPointInLocalSpace.copy(e.point), this.gameObject.worldToLocal(this._hitPointInLocalSpace), this._hitNormalInLocalSpace.copy(e.normal);
19415
19415
  else if (e) {
19416
- const y = e.event.space, m = y.worldPosition;
19416
+ const b = e.event.space, m = b.worldPosition;
19417
19417
  this.gameObject.worldToLocal(m), this._hitPointInLocalSpace.copy(m);
19418
- const v = y.worldUp;
19418
+ const v = b.worldUp;
19419
19419
  this._tempMat.copy(this.gameObject.matrixWorld).invert(), v.transformDirection(this._tempMat), this._hitNormalInLocalSpace.copy(v);
19420
19420
  }
19421
19421
  this.recenter(), this._totalMovement.set(0, 0, 0), this._deviceMode = e.mode;
19422
19422
  const i = this._followObject.parent.worldForward, o = this._deviceMode === "tracked-pointer" || this._deviceMode === "transient-pointer" ? this.settings.xrDragMode : this.settings.dragMode, r = this._hitPointInLocalSpace.clone();
19423
19423
  switch (this.gameObject.localToWorld(r), o) {
19424
19424
  case 0:
19425
- const y = new _(0, 1, 0);
19426
- this.gameObject.parent && y.transformDirection(this.gameObject.parent.matrixWorld.clone().invert()), this._dragPlane.setFromNormalAndCoplanarPoint(y, r);
19425
+ const b = new y(0, 1, 0);
19426
+ this.gameObject.parent && b.transformDirection(this.gameObject.parent.matrixWorld.clone().invert()), this._dragPlane.setFromNormalAndCoplanarPoint(b, r);
19427
19427
  break;
19428
19428
  case 2:
19429
19429
  const m = this._hitNormalInLocalSpace.clone();
@@ -19443,10 +19443,10 @@ class Df {
19443
19443
  a && a.remove(this.gameObject), this.gameObject.position.set(0, 0, 0), this.gameObject.quaternion.set(0, 0, 0, 1), this.gameObject.scale.set(1, 1, 1);
19444
19444
  const f = ii([this.gameObject]);
19445
19445
  f.expandByPoint(this.gameObject.worldPosition);
19446
- const p = new _();
19446
+ const p = new y();
19447
19447
  f.getCenter(p);
19448
- const g = new _();
19449
- f.getSize(g), this._bottomCenter.copy(p.clone().add(new _(0, -g.y / 2, 0))), this._backCenter.copy(p.clone().add(new _(0, 0, g.z / 2))), this._backBottomCenter.copy(p.clone().add(new _(0, -g.y / 2, g.z / 2))), this._bounds.copy(f), a && a.add(this.gameObject), this.gameObject.position.copy(l), this.gameObject.quaternion.copy(c), this.gameObject.scale.copy(h), this.gameObject.matrixWorld.copy(d), this._draggedOverObject = null, this._draggedOverObjectLastSetUp = null, this._draggedOverObjectLastNormal.set(0, 1, 0), this._draggedOverObjectDuration = 0;
19448
+ const g = new y();
19449
+ f.getSize(g), this._bottomCenter.copy(p.clone().add(new y(0, -g.y / 2, 0))), this._backCenter.copy(p.clone().add(new y(0, 0, g.z / 2))), this._backBottomCenter.copy(p.clone().add(new y(0, -g.y / 2, g.z / 2))), this._bounds.copy(f), a && a.add(this.gameObject), this.gameObject.position.copy(l), this.gameObject.quaternion.copy(c), this.gameObject.scale.copy(h), this.gameObject.matrixWorld.copy(d), this._draggedOverObject = null, this._draggedOverObjectLastSetUp = null, this._draggedOverObjectLastNormal.set(0, 1, 0), this._draggedOverObjectDuration = 0;
19450
19450
  }
19451
19451
  collectMovementInfo() {
19452
19452
  if (!this._followObject.parent) return;
@@ -19479,20 +19479,20 @@ class Df {
19479
19479
  a && (this._followObject.worldQuaternion = this._followObjectStartWorldQuaternion), this._followObject.updateMatrix(), this._followObject.updateMatrixWorld(!0);
19480
19480
  let h = 1, d = 2;
19481
19481
  if (r && this._grabStartDistance > 0.5) {
19482
- const b = 1 + this._totalMovementAlongRayDirection * (2 * this.settings.xrDistanceDragFactor);
19483
- h = Math.max(0, b), h = h * h * h;
19482
+ const _ = 1 + this._totalMovementAlongRayDirection * (2 * this.settings.xrDistanceDragFactor);
19483
+ h = Math.max(0, _), h = h * h * h;
19484
19484
  } else this._grabStartDistance <= 0.5 && (d = 3);
19485
19485
  this._followObject.position.copy(this._followObjectStartPosition), a || this._followObject.quaternion.copy(this._followObjectStartQuaternion), this._followObject.position.multiplyScalar(h), this._followObject.updateMatrix();
19486
19486
  const f = this._hasLastSurfaceHitPoint;
19487
19487
  this._hasLastSurfaceHitPoint = !1;
19488
19488
  const p = new uo(n, o);
19489
19489
  if (l == 4) {
19490
- const b = this.context.physics.raycastFromRay(p, {
19490
+ const _ = this.context.physics.raycastFromRay(p, {
19491
19491
  testObject: (x) => x !== this.followObject && x !== i && x !== t
19492
19492
  // && !(o instanceof GroundedSkybox)
19493
19493
  });
19494
- if (b.length > 0) {
19495
- const x = b[0];
19494
+ if (_.length > 0) {
19495
+ const x = _[0];
19496
19496
  if (this._draggedOverObject === x.object ? this._draggedOverObjectDuration += this.context.time.deltaTime : (this._draggedOverObject = x.object, this._draggedOverObjectDuration = 0), x.face) {
19497
19497
  this._hasLastSurfaceHitPoint = !0, this._lastSurfaceHitPoint.copy(x.point);
19498
19498
  const O = this._draggedOverObjectDuration >= 0.15, E = this._totalMovement.length() >= 1e-3, B = H(x.normal || x.face.normal).applyQuaternion(x.object.worldQuaternion);
@@ -19511,23 +19511,23 @@ class Df {
19511
19511
  }
19512
19512
  if (l !== 1 && p.intersectPlane(this._dragPlane, this._tempVec)) {
19513
19513
  this._followObject.worldPosition = this._tempVec, this._followObject.updateMatrix(), this._followObject.updateMatrixWorld(!0);
19514
- const b = H(this._hitPointInLocalSpace);
19515
- this._followObject.localToWorld(b), Mn && z.DrawLine(b, this._tempVec, 65535, 0, !1), this._followObject.worldPosition = this._tempVec.multiplyScalar(2).sub(b), this._followObject.updateMatrix(), this._followObject.updateMatrix();
19514
+ const _ = H(this._hitPointInLocalSpace);
19515
+ this._followObject.localToWorld(_), Mn && z.DrawLine(_, this._tempVec, 65535, 0, !1), this._followObject.worldPosition = this._tempVec.multiplyScalar(2).sub(_), this._followObject.updateMatrix(), this._followObject.updateMatrix();
19516
19516
  }
19517
19517
  if (this.settings.snapGridResolution > 0) {
19518
- const b = this._followObject.worldPosition, x = this.settings.snapGridResolution;
19519
- b.x = Math.round(b.x / x) * x, b.y = Math.round(b.y / x) * x, b.z = Math.round(b.z / x) * x, this._followObject.worldPosition = b, this._followObject.updateMatrix();
19518
+ const _ = this._followObject.worldPosition, x = this.settings.snapGridResolution;
19519
+ _.x = Math.round(_.x / x) * x, _.y = Math.round(_.y / x) * x, _.z = Math.round(_.z / x) * x, this._followObject.worldPosition = _, this._followObject.updateMatrix();
19520
19520
  }
19521
19521
  a && (this._followObject.worldQuaternion = this._followObjectStartWorldQuaternion, this._followObject.updateMatrix());
19522
- const g = j.clamp01(this.context.time.deltaTime * c * d), y = j.clamp01(this.context.time.deltaTime * c * 0.5 * d), m = t.worldPosition;
19522
+ const g = j.clamp01(this.context.time.deltaTime * c * d), b = j.clamp01(this.context.time.deltaTime * c * 0.5 * d), m = t.worldPosition;
19523
19523
  m.lerp(this._followObject.worldPosition, g), t.worldPosition = m;
19524
19524
  const v = t.worldQuaternion;
19525
- if (v.slerp(this._followObject.worldQuaternion, y), t.worldQuaternion = v, Mn) {
19526
- const b = this._hitPointInLocalSpace.clone();
19527
- t.localToWorld(b), z.DrawSphere(b, 0.02, 16711680);
19525
+ if (v.slerp(this._followObject.worldQuaternion, b), t.worldQuaternion = v, Mn) {
19526
+ const _ = this._hitPointInLocalSpace.clone();
19527
+ t.localToWorld(_), z.DrawSphere(_, 0.02, 16711680);
19528
19528
  const x = this._hitNormalInLocalSpace.clone();
19529
- x.applyQuaternion(v), z.DrawRay(b, x, 16711680), z.DrawLabel(
19530
- m.add(new _(0, 0.25, 0)),
19529
+ x.applyQuaternion(v), z.DrawRay(_, x, 16711680), z.DrawLabel(
19530
+ m.add(new y(0, 0.25, 0)),
19531
19531
  `Distance: ${this._totalMovement.length().toFixed(2)}
19532
19532
 
19533
19533
  Along Ray: ${this._totalMovementAlongRayDirection.toFixed(2)}
@@ -19547,7 +19547,7 @@ class Df {
19547
19547
  console.assert(this._followObject.parent === e.event.space, "Drag end: _followObject is not parented to the space object"), this._followObject.removeFromParent(), this._followObject.destroy(), this._lastDragPosRigSpace = void 0;
19548
19548
  }
19549
19549
  _hasLastSurfaceHitPoint = !1;
19550
- _lastSurfaceHitPoint = new _();
19550
+ _lastSurfaceHitPoint = new y();
19551
19551
  setPlaneViewAligned(e, t) {
19552
19552
  if (!this._followObject.parent)
19553
19553
  return !1;
@@ -19578,19 +19578,19 @@ class vv {
19578
19578
  _cameraPlane = new rr();
19579
19579
  _hasGroundPlane = !1;
19580
19580
  _groundPlane = new rr();
19581
- _groundOffset = new _();
19581
+ _groundOffset = new y();
19582
19582
  _groundOffsetFactor = 0;
19583
19583
  _groundDistance = 0;
19584
- _groundPlanePoint = new _();
19584
+ _groundPlanePoint = new y();
19585
19585
  _raycaster = new Nd();
19586
- _cameraPlaneOffset = new _();
19587
- _intersection = new _();
19588
- _worldPosition = new _();
19586
+ _cameraPlaneOffset = new y();
19587
+ _intersection = new y();
19588
+ _worldPosition = new y();
19589
19589
  _inverseMatrix = new ee();
19590
19590
  _rbs = [];
19591
19591
  _groundLine;
19592
19592
  _groundMarker;
19593
- static geometry = new an().setFromPoints([new _(0, 0, 0), new _(0, -1, 0)]);
19593
+ static geometry = new an().setFromPoints([new y(0, 0, 0), new y(0, -1, 0)]);
19594
19594
  constructor(e) {
19595
19595
  this._camera = e;
19596
19596
  const t = new ma(vv.geometry), i = t.material;
@@ -19610,7 +19610,7 @@ class vv {
19610
19610
  da.Add(t, this._selected, null), this._groundOffsetFactor = 0, this._hasGroundPlane = !0, this._groundOffset.set(0, 0, 0), this._requireUpdateGroundPlane = !0, this.onUpdateScreenSpacePlane();
19611
19611
  }
19612
19612
  }
19613
- _groundOffsetVector = new _(0, 1, 0);
19613
+ _groundOffsetVector = new y(0, 1, 0);
19614
19614
  _requireUpdateGroundPlane = !0;
19615
19615
  _didDragOnGroundPlaneLastFrame = !1;
19616
19616
  onUpdate(e) {
@@ -19702,7 +19702,7 @@ var Go;
19702
19702
  opacity: 0.05,
19703
19703
  depthTest: !1
19704
19704
  }));
19705
- return h.rotateX(-Math.PI / 2), h.position.y = 0.51, c.add(h), n.parent.add(o), o.rotateY(Math.PI / 2), n.position && o.position?.copy(n.position), n.size && (o.worldScale = new _().copy(n.size)), o.position.y = o.scale.y / 2, {
19705
+ return h.rotateX(-Math.PI / 2), h.position.y = 0.51, c.add(h), n.parent.add(o), o.rotateY(Math.PI / 2), n.position && o.position?.copy(n.position), n.size && (o.worldScale = new y().copy(n.size)), o.position.y = o.scale.y / 2, {
19706
19706
  object: o,
19707
19707
  onProgress: (d) => {
19708
19708
  l instanceof M && l.scale.set(1, d, 1);
@@ -19896,7 +19896,7 @@ const bM = "blob";
19896
19896
  class vo extends R {
19897
19897
  dropArea;
19898
19898
  fitIntoVolume = !1;
19899
- fitVolumeSize = new _(1, 1, 1);
19899
+ fitVolumeSize = new y(1, 1, 1);
19900
19900
  placeAtHitPosition = !0;
19901
19901
  useNetworking = !1;
19902
19902
  onDropped = new ce();
@@ -20087,7 +20087,7 @@ class vo extends R {
20087
20087
  this.removePreviouslyAddedObjects();
20088
20088
  const r = n.scene;
20089
20089
  this.gameObject.attach(r), r.position.set(0, 0, 0), r.quaternion.identity(), this._addedObjects.push(r), this._addedModels.push(n);
20090
- const a = new bi().setFromCenterAndSize(new _(0, this.fitVolumeSize.y * 0.5, 0).add(this.gameObject.worldPosition), this.fitVolumeSize);
20090
+ const a = new bi().setFromCenterAndSize(new y(0, this.fitVolumeSize.y * 0.5, 0).add(this.gameObject.worldPosition), this.fitVolumeSize);
20091
20091
  if (hi && z.DrawWireBox3(a, 255, 5), this.fitIntoVolume && o1(r, a, {
20092
20092
  position: !this.placeAtHitPosition
20093
20093
  }), this.placeAtHitPosition && t && t.screenposition) {
@@ -20130,7 +20130,7 @@ class vo extends R {
20130
20130
  guid: this.guid,
20131
20131
  url: e,
20132
20132
  point: t.worldPosition.clone(),
20133
- size: n.getSize(new _()),
20133
+ size: n.getSize(new y()),
20134
20134
  contentMD5: i
20135
20135
  };
20136
20136
  this.context.connection.send("droplistener", o);
@@ -20169,7 +20169,7 @@ Ua([
20169
20169
  u()
20170
20170
  ], vo.prototype, "fitIntoVolume");
20171
20171
  Ua([
20172
- u(_)
20172
+ u(y)
20173
20173
  ], vo.prototype, "fitVolumeSize");
20174
20174
  Ua([
20175
20175
  u()
@@ -20192,7 +20192,7 @@ var Pd;
20192
20192
  return URL.revokeObjectURL(c), h ? new Promise((d, f) => {
20193
20193
  const p = new FileReader();
20194
20194
  p.readAsArrayBuffer(i), p.onloadend = async (g) => {
20195
- const y = p.result, m = Ma.hashMD5(y);
20195
+ const b = p.result, m = Ma.hashMD5(b);
20196
20196
  return d({ model: h, contentMD5: m });
20197
20197
  };
20198
20198
  }) : (console.warn(`Failed to load "${i.name}" (${i.type})`), null);
@@ -20245,7 +20245,7 @@ const gu = class wv extends R {
20245
20245
  }
20246
20246
  this.object.visible = !1;
20247
20247
  const e = this.gameObject.getComponent(Zr);
20248
- e && (e.enabled = !1), this._startPosition = this.object.position?.clone() ?? new _(0, 0, 0), this._startQuaternion = this.object.quaternion?.clone() ?? new U(0, 0, 0, 1);
20248
+ e && (e.enabled = !1), this._startPosition = this.object.position?.clone() ?? new y(0, 0, 0), this._startQuaternion = this.object.quaternion?.clone() ?? new U(0, 0, 0, 1);
20249
20249
  }
20250
20250
  this.gameObject.getComponentInParent(qi) || this.gameObject.addComponent(qi);
20251
20251
  }
@@ -20841,9 +20841,9 @@ class Me extends Tb {
20841
20841
  static _viewMatrixValues = [];
20842
20842
  _viewMatrixName = "hlslcc_mtx4x4unity_MatrixV";
20843
20843
  static _worldSpaceCameraPosName = "_WorldSpaceCameraPos";
20844
- static _worldSpaceCameraPos = new _();
20844
+ static _worldSpaceCameraPos = new y();
20845
20845
  static _mainLightColor = new fe();
20846
- static _mainLightPosition = new _();
20846
+ static _mainLightPosition = new y();
20847
20847
  static _lightData = new fe();
20848
20848
  _rendererData = new LM();
20849
20849
  get depthTextureUniform() {
@@ -20944,35 +20944,35 @@ class DM {
20944
20944
  const d = {}, f = o.uniforms;
20945
20945
  (h.includes("_Time") || c.includes("_Time")) && (d._Time = { value: new fe(0, 0, 0, 0) }), (h.includes("_SinTime") || c.includes("_SinTime")) && (d._SinTime = { value: new fe(0, 0, 0, 0) }), (h.includes("_CosTime") || c.includes("_CosTime")) && (d._CosTime = { value: new fe(0, 0, 0, 0) }), (h.includes("unity_DeltaTime") || c.includes("unity_DeltaTime")) && (d.unity_DeltaTime = { value: new fe(0, 0, 0, 0) });
20946
20946
  for (const v in f) {
20947
- const b = v;
20948
- switch (b) {
20947
+ const _ = v;
20948
+ switch (_) {
20949
20949
  case "_TimeParameters":
20950
20950
  const x = new fe();
20951
- d[b] = { value: x };
20951
+ d[_] = { value: x };
20952
20952
  break;
20953
20953
  case "hlslcc_mtx4x4unity_MatrixV":
20954
20954
  case "hlslcc_mtx4x4unity_MatrixVP":
20955
- d[b] = { value: [] };
20955
+ d[_] = { value: [] };
20956
20956
  break;
20957
20957
  case "_MainLightPosition":
20958
20958
  case "_MainLightColor":
20959
20959
  case "_WorldSpaceCameraPos":
20960
- d[b] = { value: [0, 0, 0, 1] };
20960
+ d[_] = { value: [0, 0, 0, 1] };
20961
20961
  break;
20962
20962
  case "unity_OrthoParams":
20963
20963
  break;
20964
20964
  case "unity_SpecCube0":
20965
- d[b] = { value: null };
20965
+ d[_] = { value: null };
20966
20966
  break;
20967
20967
  default:
20968
20968
  case "_ScreenParams":
20969
20969
  case "_ZBufferParams":
20970
20970
  case "_ProjectionParams":
20971
- d[b] = { value: [0, 0, 0, 0] };
20971
+ d[_] = { value: [0, 0, 0, 0] };
20972
20972
  break;
20973
20973
  case "_CameraOpaqueTexture":
20974
20974
  case "_CameraDepthTexture":
20975
- d[b] = { value: null };
20975
+ d[_] = { value: null };
20976
20976
  break;
20977
20977
  }
20978
20978
  }
@@ -20981,28 +20981,28 @@ class DM {
20981
20981
  const v = t.extensions[Dr];
20982
20982
  if (v.technique === i) {
20983
20983
  vn && console.log(t.name, "Material Properties", v);
20984
- for (const b in v.values) {
20985
- const x = v.values[b];
20984
+ for (const _ in v.values) {
20985
+ const x = v.values[_];
20986
20986
  if (typeof x == "string") {
20987
20987
  if (x.startsWith("/textures/")) {
20988
20988
  const I = x.substring(10), O = Number.parseInt(I);
20989
20989
  if (O >= 0) {
20990
20990
  const k = await this.parser.getDependency("texture", O);
20991
- k instanceof Te && (k.colorSpace = Ss, k.needsUpdate = !0), d[b] = { value: k };
20991
+ k instanceof Te && (k.colorSpace = Ss, k.needsUpdate = !0), d[_] = { value: k };
20992
20992
  continue;
20993
20993
  }
20994
20994
  }
20995
- switch (b) {
20995
+ switch (_) {
20996
20996
  case "alphaMode":
20997
20997
  x === "BLEND" && (p = !0);
20998
20998
  continue;
20999
20999
  }
21000
21000
  }
21001
21001
  if (Array.isArray(x) && x.length === 4) {
21002
- d[b] = { value: new fe(x[0], x[1], x[2], x[3]) };
21002
+ d[_] = { value: new fe(x[0], x[1], x[2], x[3]) };
21003
21003
  continue;
21004
21004
  }
21005
- d[b] = { value: x };
21005
+ d[_] = { value: x };
21006
21006
  }
21007
21007
  }
21008
21008
  }
@@ -21058,14 +21058,14 @@ class DM {
21058
21058
  }
21059
21059
  g.transparent = p, p && (g.depthWrite = !1), vO(d), g.onUpdateUniforms();
21060
21060
  for (const v in f) {
21061
- const b = v, x = f[v].type;
21062
- if (d[b]?.value === void 0)
21061
+ const _ = v, x = f[v].type;
21062
+ if (d[_]?.value === void 0)
21063
21063
  switch (x) {
21064
21064
  case Ov.SAMPLER_2D:
21065
- d[b] = { value: _O }, console.warn("Missing/unassigned texture, fallback to white: " + b);
21065
+ d[_] = { value: _O }, console.warn("Missing/unassigned texture, fallback to white: " + _);
21066
21066
  break;
21067
21067
  default:
21068
- b === "unity_OrthoParams" || console.warn("TODO: EXPECTED UNIFORM / fallback NOT SET: " + b, f[v]);
21068
+ _ === "unity_OrthoParams" || console.warn("TODO: EXPECTED UNIFORM / fallback NOT SET: " + _, f[v]);
21069
21069
  break;
21070
21070
  }
21071
21071
  }
@@ -21151,8 +21151,8 @@ class Tv {
21151
21151
  const a = new Array(), l = new Array(), c = new Array();
21152
21152
  for (let p = 0; p < e.count; p++) {
21153
21153
  e.getMatrixAt(p, r);
21154
- let g = new _(), y = new U(), m = new _();
21155
- r.decompose(g, y, m), a.push(g.x, g.y, g.z), l.push(y.x, y.y, y.z, y.w), c.push(m.x, m.y, m.z);
21154
+ let g = new y(), b = new U(), m = new y();
21155
+ r.decompose(g, b, m), a.push(g.x, g.y, g.z), l.push(b.x, b.y, b.z, b.w), c.push(m.x, m.y, m.z);
21156
21156
  }
21157
21157
  const h = new Float32Array(a), d = new Float32Array(l), f = new Float32Array(c);
21158
21158
  o.attributes = {
@@ -21264,10 +21264,10 @@ const ml = w("debugreflectionprobe"), D_ = w("noreflectionprobe"), zf = Symbol("
21264
21264
  }
21265
21265
  };
21266
21266
  Ev([
21267
- u(_)
21267
+ u(y)
21268
21268
  ], bg.prototype, "center");
21269
21269
  Ev([
21270
- u(_)
21270
+ u(y)
21271
21271
  ], bg.prototype, "size");
21272
21272
  let kd = bg;
21273
21273
  const Kt = w("debuginstancing");
@@ -22332,7 +22332,7 @@ const vg = class Xr extends R {
22332
22332
  return t;
22333
22333
  }
22334
22334
  static calculateCenter(e, t) {
22335
- const i = t || new _();
22335
+ const i = t || new y();
22336
22336
  return i.set(0, 0, 0), e.forEach((n) => {
22337
22337
  i.add(Z(n));
22338
22338
  }), i.divideScalar(e.length), i;
@@ -22513,13 +22513,13 @@ class QM {
22513
22513
  }
22514
22514
  const Ie = "</StageRoot/Materials";
22515
22515
  function YM(s, e, t) {
22516
- const i = /* @__PURE__ */ new Map(), n = (y) => {
22517
- const m = y.type___needle, v = i.get(m) || /* @__PURE__ */ new Map();
22518
- if (i.set(m, v), !v.has(y)) {
22519
- const b = `${m}${v.size ? `_${v.size}` : ""}`;
22520
- v.set(y, b);
22516
+ const i = /* @__PURE__ */ new Map(), n = (b) => {
22517
+ const m = b.type___needle, v = i.get(m) || /* @__PURE__ */ new Map();
22518
+ if (i.set(m, v), !v.has(b)) {
22519
+ const _ = `${m}${v.size ? `_${v.size}` : ""}`;
22520
+ v.set(b, _);
22521
22521
  }
22522
- return v.get(y);
22522
+ return v.get(b);
22523
22523
  }, o = s.colorNode ? vh(s.colorNode) : [], r = s.colorNode ? `color3f inputs:diffuseColor.connect = ${Ie}/${e}/${n(o.values().next().value)}.outputs:out>` : "", a = s.roughnessNode ? vh(s.roughnessNode) : [], l = s.roughnessNode ? `float inputs:roughness.connect = ${Ie}/${e}/${n(a.values().next().value)}.outputs:out>` : "", c = s.normalNode ? vh(s.normalNode) : [], h = s.normalNode ? `float3 inputs:normal.connect = ${Ie}/${e}/${n(c.values().next().value)}.outputs:out>` : "", d = s.metalnessNode ? vh(s.metalnessNode) : [], f = s.metalnessNode ? `float inputs:metallic.connect = ${Ie}/${e}/${n(d.values().next().value)}.outputs:out>` : "", p = /* @__PURE__ */ new Set([...o, ...a, ...c, ...d]), g = JM(p, e, t, n);
22524
22524
  return console.debug(g), `
22525
22525
 
@@ -22557,16 +22557,16 @@ function vh(s) {
22557
22557
  return;
22558
22558
  }
22559
22559
  }, t = (m) => {
22560
- const v = /* @__PURE__ */ new Set(), b = (x) => {
22560
+ const v = /* @__PURE__ */ new Set(), _ = (x) => {
22561
22561
  if (!(!x.isNode || v.has(x))) {
22562
22562
  x.nodeType___needle || (x.nodeType___needle = e(x)), x.shaderNode ? (x.type___needle = "ShaderCallNodeInternal", x.shaderNodeLayoutName___needle = x.shaderNode.layout.name.slice(3)) : x.type___needle = x.type, v.add(x);
22563
22563
  for (const I in x)
22564
- x[I]?.isNode && (b(x[I]), x.nodeType___needle ||= x[I].nodeType___needle), Array.isArray(x[I]) && x[I].forEach((O) => {
22565
- O.isNode && (b(O), x.nodeType___needle ||= O.nodeType___needle);
22564
+ x[I]?.isNode && (_(x[I]), x.nodeType___needle ||= x[I].nodeType___needle), Array.isArray(x[I]) && x[I].forEach((O) => {
22565
+ O.isNode && (_(O), x.nodeType___needle ||= O.nodeType___needle);
22566
22566
  });
22567
22567
  }
22568
22568
  };
22569
- return b(m), v;
22569
+ return _(m), v;
22570
22570
  }, i = (m) => {
22571
22571
  if (m.type === "ConvertNode") {
22572
22572
  if (m.convertTo === m.node.nodeType___needle)
@@ -22594,23 +22594,23 @@ function vh(s) {
22594
22594
  const v = ["UniformNode", "UniformGroupNode", "ShaderNodeInternal"];
22595
22595
  return !m || i(m) || v.includes(m.type___needle) || m.type___needle === void 0;
22596
22596
  }, r = (m, v) => {
22597
- for (const b of v)
22598
- for (const x in b) {
22599
- if (b[x]?.isNode && b[x] === m)
22600
- return { parent: b, label: x };
22601
- if (Array.isArray(b[x]) && b[x].find((O) => O.isNode && O === m))
22602
- return { parent: b, label: x };
22597
+ for (const _ of v)
22598
+ for (const x in _) {
22599
+ if (_[x]?.isNode && _[x] === m)
22600
+ return { parent: _, label: x };
22601
+ if (Array.isArray(_[x]) && _[x].find((O) => O.isNode && O === m))
22602
+ return { parent: _, label: x };
22603
22603
  }
22604
22604
  return null;
22605
22605
  }, a = (m, v) => {
22606
22606
  if (m.shaderNode)
22607
22607
  m.inputNodes[0] = n(m.inputNodes[0]);
22608
22608
  else if (Array.isArray(m.nodes))
22609
- for (let b = 0; b < m.nodes.length; b++)
22610
- m.nodes[b] && o(m.nodes[b]) && (m.nodes[b] = n(m.nodes[b]));
22609
+ for (let _ = 0; _ < m.nodes.length; _++)
22610
+ m.nodes[_] && o(m.nodes[_]) && (m.nodes[_] = n(m.nodes[_]));
22611
22611
  else
22612
- v.forEach((b) => {
22613
- m[b] && o(m[b]) && (m[b] = n(m[b]));
22612
+ v.forEach((_) => {
22613
+ m[_] && o(m[_]) && (m[_] = n(m[_]));
22614
22614
  });
22615
22615
  }, l = (m) => {
22616
22616
  m.type === "MathNode" && m.method === "mix" && (m.cNode.nodeType___needle = "float", m.cNode.type === "ConvertNode" && (m.cNode.convertTo = "float"));
@@ -22618,7 +22618,7 @@ function vh(s) {
22618
22618
  v.label === "cNode" && v.parent.type === "MathNode" && v.parent.method === "mix" || (v.parent.type === "JoinNode" ? m.nodeType___needle = "float" : m.nodeType___needle = v.parent.nodeType___needle);
22619
22619
  }, h = (m) => m?.type === "ConvertNode" && m.nodeType___needle === "color" && m.node.nodeType___needle === "vec4", d = (m, v) => {
22620
22620
  m.convertTo = "vec3", m.nodeType___needle = "vec3";
22621
- const b = {
22621
+ const _ = {
22622
22622
  type: "ConvertNode",
22623
22623
  convertTo: "color",
22624
22624
  node: m,
@@ -22626,25 +22626,25 @@ function vh(s) {
22626
22626
  nodeType___needle: "color",
22627
22627
  type___needle: "ConvertNode"
22628
22628
  }, x = r(m, v);
22629
- return x?.parent && (x.parent[x.label] = b), b;
22629
+ return x?.parent && (x.parent[x.label] = _), _;
22630
22630
  }, f = (m) => m?.type === "ConvertNode" && m.node.type === "TextureNode" && m.nodeType___needle !== m.node.nodeType___needle, p = (m) => {
22631
22631
  const v = /* @__PURE__ */ new Set();
22632
- for (let b of m)
22633
- if (!o(b)) {
22634
- if (l(b), b.type == "SplitNode") {
22635
- const x = r(b, m);
22636
- if (b.components.length === 1)
22637
- b.nodeType___needle = "float";
22632
+ for (let _ of m)
22633
+ if (!o(_)) {
22634
+ if (l(_), _.type == "SplitNode") {
22635
+ const x = r(_, m);
22636
+ if (_.components.length === 1)
22637
+ _.nodeType___needle = "float";
22638
22638
  else if (x)
22639
- b.nodeType___needle = x.parent.nodeType___needle;
22639
+ _.nodeType___needle = x.parent.nodeType___needle;
22640
22640
  else throw new Error("SplitNode without parent found, this should not happen");
22641
22641
  }
22642
- if (a(b, ["node", "aNode", "bNode", "cNode"]), b.type == "ConstNode" && b.nodeType == null && c(b, r(b, m)), h(b) && v.add(d(b, m)), f(b)) {
22643
- b.node.nodeType___needle = b.convertTo;
22644
- const x = r(b, m);
22645
- x?.parent && (x.parent[x.label] = b.node), b = b.node;
22642
+ if (a(_, ["node", "aNode", "bNode", "cNode"]), _.type == "ConstNode" && _.nodeType == null && c(_, r(_, m)), h(_) && v.add(d(_, m)), f(_)) {
22643
+ _.node.nodeType___needle = _.convertTo;
22644
+ const x = r(_, m);
22645
+ x?.parent && (x.parent[x.label] = _.node), _ = _.node;
22646
22646
  }
22647
- v.add(b);
22647
+ v.add(_);
22648
22648
  }
22649
22649
  return v;
22650
22650
  }, g = t(s);
@@ -22703,30 +22703,30 @@ function ZM(s, e, t, i) {
22703
22703
  d = s.method + "_" + c, s.aNode && !s.bNode && f.push(`${r(s.aNode.nodeType___needle)} inputs:in.connect = ${Ie}/${e}/${t(s.aNode)}.outputs:out>`), s.aNode && s.bNode && !s.cNode && (f.push(`${r(s.aNode.nodeType___needle)} inputs:in1.connect = ${Ie}/${e}/${t(s.aNode)}.outputs:out>`), f.push(`${r(s.bNode.nodeType___needle)} inputs:in2.connect = ${Ie}/${e}/${t(s.bNode)}.outputs:out>`)), s.aNode && s.bNode && s.cNode && s.method == "clamp" && (f.push(`${r(s.aNode.nodeType___needle)} inputs:in.connect = ${Ie}/${e}/${t(s.aNode)}.outputs:out>`), f.push(`${r(s.bNode.nodeType___needle)} inputs:low.connect = ${Ie}/${e}/${t(s.bNode)}.outputs:out>`), f.push(`${r(s.cNode.nodeType___needle)} inputs:high.connect = ${Ie}/${e}/${t(s.cNode)}.outputs:out>`)), s.aNode && s.bNode && s.cNode && s.method == "mix" && (f.push(`${r(s.aNode.nodeType___needle)} inputs:fg.connect = ${Ie}/${e}/${t(s.bNode)}.outputs:out>`), f.push(`${r(s.bNode.nodeType___needle)} inputs:bg.connect = ${Ie}/${e}/${t(s.aNode)}.outputs:out>`), f.push(`float inputs:mix.connect = ${Ie}/${e}/${t(s.cNode)}.outputs:out>`));
22704
22704
  break;
22705
22705
  case "OperatorNode":
22706
- let y = "";
22706
+ let b = "";
22707
22707
  switch (s.op) {
22708
22708
  case "*":
22709
- y = "multiply";
22709
+ b = "multiply";
22710
22710
  break;
22711
22711
  case "/":
22712
- y = "divide";
22712
+ b = "divide";
22713
22713
  break;
22714
22714
  case "+":
22715
- y = "add";
22715
+ b = "add";
22716
22716
  break;
22717
22717
  case "-":
22718
- y = "subtract";
22718
+ b = "subtract";
22719
22719
  break;
22720
22720
  }
22721
- if (d = y + "_" + c, s.aNode && !s.bNode && f.push(`${r(s.aNode.nodeType___needle)} inputs:in.connect = ${Ie}/${e}/${t(s.aNode)}.outputs:out>`), s.aNode && s.bNode) {
22721
+ if (d = b + "_" + c, s.aNode && !s.bNode && f.push(`${r(s.aNode.nodeType___needle)} inputs:in.connect = ${Ie}/${e}/${t(s.aNode)}.outputs:out>`), s.aNode && s.bNode) {
22722
22722
  const x = r(s.aNode.nodeType___needle), I = r(s.bNode.nodeType___needle);
22723
- (x === "color3f" && I === "float" || I === "float" && I === "color3f") && (d = y + "_color3FA"), f.push(`${x} inputs:in1.connect = ${Ie}/${e}/${t(s.aNode)}.outputs:out>`), f.push(`${I} inputs:in2.connect = ${Ie}/${e}/${t(s.bNode)}.outputs:out>`);
22723
+ (x === "color3f" && I === "float" || I === "float" && I === "color3f") && (d = b + "_color3FA"), f.push(`${x} inputs:in1.connect = ${Ie}/${e}/${t(s.aNode)}.outputs:out>`), f.push(`${I} inputs:in2.connect = ${Ie}/${e}/${t(s.bNode)}.outputs:out>`);
22724
22724
  }
22725
22725
  break;
22726
22726
  case "TextureNode":
22727
22727
  s.uvNode ? (d = "tiledimage_" + c, f.push(`float2 inputs:texcoord.connect = ${Ie}/${e}/${t(s.uvNode)}.outputs:out>`)) : d = "image_" + c;
22728
- const m = s._value, v = wg.includes(m.format), b = eR(m);
22729
- f.push(`asset inputs:file = @textures/${b}.${v ? "png" : "jpg"}@`), i[b] = { texture: m, scale: void 0 };
22728
+ const m = s._value, v = wg.includes(m.format), _ = eR(m);
22729
+ f.push(`asset inputs:file = @textures/${_}.${v ? "png" : "jpg"}@`), i[_] = { texture: m, scale: void 0 };
22730
22730
  break;
22731
22731
  case "NormalMapNode":
22732
22732
  h = "float3", d = "normalmap", f.push(`${h} inputs:in.connect = ${Ie}/${e}/${t(s.node)}.outputs:out>`);
@@ -22785,7 +22785,7 @@ function Fv(s) {
22785
22785
  }
22786
22786
  return t;
22787
22787
  }
22788
- const tR = new _(), iR = new U(), nR = new _(1, 1, 1);
22788
+ const tR = new y(), iR = new U(), nR = new y(1, 1, 1);
22789
22789
  class st {
22790
22790
  static USDObject_export_id = 0;
22791
22791
  uuid;
@@ -22807,7 +22807,7 @@ class st {
22807
22807
  this.transform = null;
22808
22808
  return;
22809
22809
  }
22810
- const t = new _(), i = new U(), n = new _();
22810
+ const t = new y(), i = new U(), n = new y();
22811
22811
  e.decompose(t, i, n), this.transform = { position: t, quaternion: i, scale: n };
22812
22812
  }
22813
22813
  /** @deprecated Use `transform`, or `getMatrix()` if you really need the matrix */
@@ -23047,33 +23047,33 @@ let rR = class {
23047
23047
  const r = i.materials, a = i.textures;
23048
23048
  le.report("export-usdz", "Invoking onBeforeBuildDocument"), await Yh(i, "onBeforeBuildDocument"), le.report("export-usdz", "Done onBeforeBuildDocument"), le.report("export-usdz", "Reparent bones to common ancestor");
23049
23049
  const l = [], c = /* @__PURE__ */ new Set();
23050
- e?.traverse((b) => {
23051
- if (!(!t.exportInvisible && !b.visible) && b instanceof oo) {
23052
- const x = b.skeleton.bones, I = Bv(x);
23050
+ e?.traverse((_) => {
23051
+ if (!(!t.exportInvisible && !_.visible) && _ instanceof oo) {
23052
+ const x = _.skeleton.bones, I = Bv(x);
23053
23053
  if (I) {
23054
- const O = { object: b, originalParent: b.parent, newParent: I };
23054
+ const O = { object: _, originalParent: _.parent, newParent: I };
23055
23055
  l.push(O), c.add(O.object.uuid), O.newParent && c.add(O.newParent.uuid), O.originalParent && c.add(O.originalParent.uuid);
23056
23056
  }
23057
23057
  }
23058
23058
  });
23059
- for (const b of l) {
23060
- const { object: x, originalParent: I, newParent: O } = b;
23059
+ for (const _ of l) {
23060
+ const { object: x, originalParent: I, newParent: O } = _;
23061
23061
  O.add(x);
23062
23062
  }
23063
23063
  le.report("export-usdz", "Traversing hierarchy"), e && Uv(e, i.document, i, this.keepObject), le.report("export-usdz", "Invoking onAfterBuildDocument"), await Yh(i, "onAfterBuildDocument");
23064
- const d = i.extensions.find((b) => b.extensionName === "Behaviour")?.getAllTargetUuids() ?? /* @__PURE__ */ new Set();
23064
+ const d = i.extensions.find((_) => _.extensionName === "Behaviour")?.getAllTargetUuids() ?? /* @__PURE__ */ new Set();
23065
23065
  if (this.pruneUnusedNodes) {
23066
- const b = {
23066
+ const _ = {
23067
23067
  allBehaviorTargets: d,
23068
23068
  debug: !1,
23069
23069
  boneReparentings: c,
23070
23070
  quickLookCompatible: i.quickLookCompatible
23071
23071
  };
23072
- this.debug && U_(i.document, "Hierarchy BEFORE pruning", b), Nv(i.document, b), this.debug && U_(i.document, "Hierarchy AFTER pruning");
23072
+ this.debug && U_(i.document, "Hierarchy BEFORE pruning", _), Nv(i.document, _), this.debug && U_(i.document, "Hierarchy AFTER pruning");
23073
23073
  } else this.debug && console.log("Pruning of empty nodes is disabled. This may result in a larger USDZ file.");
23074
23074
  le.report("export-usdz", { message: "Parsing document", autoStep: 10 }), await aR(i, () => (le.report("export-usdz", "Building materials"), yR(r, a, t.quickLookCompatible))), le.report("export-usdz", "Invoking onAfterSerialize"), await Yh(i, "onAfterSerialize");
23075
- for (const b of l) {
23076
- const { object: x, originalParent: I, newParent: O } = b;
23075
+ for (const _ of l) {
23076
+ const { object: x, originalParent: I, newParent: O } = _;
23077
23077
  I && I.add(x);
23078
23078
  }
23079
23079
  i.exporter?.beforeWritingDocument?.();
@@ -23085,10 +23085,10 @@ let rR = class {
23085
23085
  alpha: !0,
23086
23086
  premultipliedAlpha: !1,
23087
23087
  preserveDrawingBuffer: !0
23088
- }), y = Object.keys(a).length;
23089
- le.report("export-usdz-textures", { totalSteps: y * 3, currentStep: 0 });
23090
- const m = async (b) => {
23091
- const x = a[b], I = x.texture, O = wg.includes(I.format);
23088
+ }), b = Object.keys(a).length;
23089
+ le.report("export-usdz-textures", { totalSteps: b * 3, currentStep: 0 });
23090
+ const m = async (_) => {
23091
+ const x = a[_], I = x.texture, O = wg.includes(I.format);
23092
23092
  let k = {
23093
23093
  imageData: I.image
23094
23094
  };
@@ -23101,21 +23101,21 @@ let rR = class {
23101
23101
  if (B) {
23102
23102
  le.report("export-usdz-textures", { message: "convert canvas to blob", autoStep: !0 });
23103
23103
  const D = await B.convertToBlob({ type: O ? "image/png" : "image/jpeg", quality: 0.95 });
23104
- n[`textures/${b}.${O ? "png" : "jpg"}`] = new Uint8Array(await D.arrayBuffer());
23104
+ n[`textures/${_}.${O ? "png" : "jpg"}`] = new Uint8Array(await D.arrayBuffer());
23105
23105
  } else
23106
23106
  console.warn("Can`t export texture: ", I);
23107
23107
  };
23108
- for (const b in a)
23109
- await m(b);
23108
+ for (const _ in a)
23109
+ await m(_);
23110
23110
  g.dispose(), le.end("export-usdz-textures");
23111
23111
  let v = 0;
23112
- for (const b in n) {
23113
- const x = n[b], I = 34 + b.length;
23112
+ for (const _ in n) {
23113
+ const x = n[_], I = 34 + _.length;
23114
23114
  v += I;
23115
23115
  const O = v & 63;
23116
23116
  if (O !== 4) {
23117
23117
  const k = 64 - O, E = new Uint8Array(k);
23118
- n[b] = [x, { extra: { 12345: E } }];
23118
+ n[_] = [x, { extra: { 12345: E } }];
23119
23119
  }
23120
23120
  v = x.length;
23121
23121
  }
@@ -23408,8 +23408,8 @@ function mR(s, e = [], t = !0) {
23408
23408
  for (; f.length < e.length && p-- > 0; )
23409
23409
  for (const m of a) {
23410
23410
  const v = m.bone.children;
23411
- for (const b of v)
23412
- f.indexOf(b.uuid) === -1 && e.indexOf(b) !== -1 && (a.push({ bone: b, index: e.indexOf(b) }), f.push(b.uuid));
23411
+ for (const _ of v)
23412
+ f.indexOf(_.uuid) === -1 && e.indexOf(_) !== -1 && (a.push({ bone: _, index: e.indexOf(_) }), f.push(_.uuid));
23413
23413
  }
23414
23414
  p <= 0 && console.error("Failed to sort bones in skinned mesh", a, e, f);
23415
23415
  for (const m of Fv(e))
@@ -23418,11 +23418,11 @@ function mR(s, e = [], t = !0) {
23418
23418
  a.sort((m, v) => fa(m.bone, g) > fa(v.bone, g) ? 1 : -1), a.map((m) => '"' + fa(m.bone, g) + '"').join(", ");
23419
23419
  for (const m in a)
23420
23420
  l[a[m].index] = parseInt(m);
23421
- const y = n.skinIndex;
23421
+ const b = n.skinIndex;
23422
23422
  c = new Array();
23423
- for (let m = 0; m < y.count; m++) {
23424
- const v = y.getX(m), b = y.getY(m), x = y.getZ(m), I = y.getW(m);
23425
- c.push(l[v], l[b], l[x], l[I]);
23423
+ for (let m = 0; m < b.count; m++) {
23424
+ const v = b.getX(m), _ = b.getY(m), x = b.getZ(m), I = b.getW(m);
23425
+ c.push(l[v], l[_], l[x], l[I]);
23426
23426
  }
23427
23427
  h = new ft(new Uint16Array(c), 4);
23428
23428
  }
@@ -23587,9 +23587,9 @@ function zs(s, e, t, i, n, o, r = void 0, a = void 0) {
23587
23587
  // ClampToEdgeWrapping
23588
23588
  1002: "mirror"
23589
23589
  // MirroredRepeatWrapping
23590
- }, y = s.repeat.clone(), m = s.offset.clone(), v = s.rotation, b = Math.sin(v), x = Math.cos(v);
23591
- m.y = 1 - m.y - y.y, t ? (y.x === 0 && (y.x = 1e-4), y.y === 0 && (y.y = 1e-4), m.x = m.x / y.x, m.y = m.y / y.y, m.x += b / y.x, m.y += x - 1) : (m.x += b * y.x, m.y += (1 - x) * y.y);
23592
- const I = _u(n), O = y.x != 1 || y.y != 1 || m.x != 0 || m.y != 0 || v != 0, k = `${$t}/${I}/${"uvReader_" + f}.outputs:result>`, E = `${$t}/${I}/Transform2d_${e}.outputs:result>`, B = e !== "normal" && r && (r.r !== 1 || r.g !== 1 || r.b !== 1 || a !== 1) || !1, D = e === "normal", W = n instanceof ut && n.normalScale ? n.normalScale.x * 2 : 2, X = W.toFixed(Oe), A = (-1 * (W / 2)).toFixed(Oe), $ = (1 - W).toFixed(Oe);
23590
+ }, b = s.repeat.clone(), m = s.offset.clone(), v = s.rotation, _ = Math.sin(v), x = Math.cos(v);
23591
+ m.y = 1 - m.y - b.y, t ? (b.x === 0 && (b.x = 1e-4), b.y === 0 && (b.y = 1e-4), m.x = m.x / b.x, m.y = m.y / b.y, m.x += _ / b.x, m.y += x - 1) : (m.x += _ * b.x, m.y += (1 - x) * b.y);
23592
+ const I = _u(n), O = b.x != 1 || b.y != 1 || m.x != 0 || m.y != 0 || v != 0, k = `${$t}/${I}/${"uvReader_" + f}.outputs:result>`, E = `${$t}/${I}/Transform2d_${e}.outputs:result>`, B = e !== "normal" && r && (r.r !== 1 || r.g !== 1 || r.b !== 1 || a !== 1) || !1, D = e === "normal", W = n instanceof ut && n.normalScale ? n.normalScale.x * 2 : 2, X = W.toFixed(Oe), A = (-1 * (W / 2)).toFixed(Oe), $ = (1 - W).toFixed(Oe);
23593
23593
  return `
23594
23594
  ${O ? `def Shader "Transform2d_${e}" (
23595
23595
  sdrMetadata = {
@@ -23599,7 +23599,7 @@ function zs(s, e, t, i, n, o, r = void 0, a = void 0) {
23599
23599
  {
23600
23600
  uniform token info:id = "UsdTransform2d"
23601
23601
  float2 inputs:in.connect = ${k}
23602
- float2 inputs:scale = ${H_(y)}
23602
+ float2 inputs:scale = ${H_(b)}
23603
23603
  float2 inputs:translation = ${H_(m)}
23604
23604
  float inputs:rotation = ${(v / Math.PI * 180).toFixed(Oe)}
23605
23605
  float2 outputs:result
@@ -24208,12 +24208,12 @@ class Ue {
24208
24208
  * @param generateScale
24209
24209
  */
24210
24210
  *getValues(e, t = !0, i = !0, n = !0) {
24211
- const o = new _(), r = new U(), a = new _(1, 1, 1), l = this.target, c = t ? this.pos?.createInterpolant() : void 0, h = i ? this.rot?.createInterpolant() : void 0, d = n ? this.scale?.createInterpolant() : void 0;
24211
+ const o = new y(), r = new U(), a = new y(1, 1, 1), l = this.target, c = t ? this.pos?.createInterpolant() : void 0, h = i ? this.rot?.createInterpolant() : void 0, d = n ? this.scale?.createInterpolant() : void 0;
24212
24212
  c || o.set(l.position.x, l.position.y, l.position.z), h || r.set(l.quaternion.x, l.quaternion.y, l.quaternion.z, l.quaternion.w), d || a.set(l.scale.x, l.scale.y, l.scale.z), c && c.valueSize !== 3 && (c.valueSize = 3), h && h.valueSize !== 4 && (h.valueSize = 4), d && d.valueSize !== 3 && (d.valueSize = 3);
24213
24213
  const f = 0;
24214
24214
  for (let p = 0 - f; p < e.length + f; p++) {
24215
- let g = 0, y = 0;
24216
- if (p < 0 ? (g = e[0], y = g - Ue.animationDurationPadding / 2 + 1 / 60) : p >= e.length ? (g = e[e.length - 1], y = g + Ue.animationDurationPadding / 2 - 1 / 60) : (g = e[p], y = g), c) {
24215
+ let g = 0, b = 0;
24216
+ if (p < 0 ? (g = e[0], b = g - Ue.animationDurationPadding / 2 + 1 / 60) : p >= e.length ? (g = e[e.length - 1], b = g + Ue.animationDurationPadding / 2 - 1 / 60) : (g = e[p], b = g), c) {
24217
24217
  const m = c.evaluate(g);
24218
24218
  o.set(m[0], m[1], m[2]);
24219
24219
  }
@@ -24229,7 +24229,7 @@ class Ue {
24229
24229
  const m = new ee();
24230
24230
  m.compose(o, r, a), m.multiply(l.matrix), m.decompose(o, r, a);
24231
24231
  }
24232
- yield { time: y, translation: o, rotation: r, scale: a, index: p };
24232
+ yield { time: b, translation: o, rotation: r, scale: a, index: p };
24233
24233
  }
24234
24234
  }
24235
24235
  }
@@ -24547,30 +24547,30 @@ class wR {
24547
24547
  const $ = f(A), V = l($);
24548
24548
  return c($, V, A);
24549
24549
  };
24550
- const g = n.skinnedMesh.skeleton, y = new Array(), m = [], v = [];
24550
+ const g = n.skinnedMesh.skeleton, b = new Array(), m = [], v = [];
24551
24551
  for (const A of g.bones) {
24552
24552
  m.push(A), v.push(A.uuid);
24553
24553
  const $ = g.boneInverses[g.bones.indexOf(A)];
24554
- y.push({ bone: A, inverse: $ });
24554
+ b.push({ bone: A, inverse: $ });
24555
24555
  }
24556
- let b = 1e4;
24557
- for (; v.length < g.bones.length && b-- > 0; )
24556
+ let _ = 1e4;
24557
+ for (; v.length < g.bones.length && _-- > 0; )
24558
24558
  for (const A of m) {
24559
24559
  const $ = A.children;
24560
24560
  for (const V of $)
24561
24561
  if (v.indexOf(V.uuid) === -1 && g.bones.indexOf(V) !== -1) {
24562
24562
  m.push(V), v.push(V.uuid);
24563
24563
  const ne = g.boneInverses[g.bones.indexOf(V)];
24564
- y.push({ bone: V, inverse: ne });
24564
+ b.push({ bone: V, inverse: ne });
24565
24565
  }
24566
24566
  }
24567
- b <= 0 && console.error("Failed to sort bones in skinned mesh", n.skinnedMesh, g.bones, v);
24567
+ _ <= 0 && console.error("Failed to sort bones in skinned mesh", n.skinnedMesh, g.bones, v);
24568
24568
  for (const A of Fv(g.bones))
24569
- y.push({ bone: A, inverse: A.matrixWorld.clone().invert() });
24570
- const x = y[0].bone.parent;
24571
- x || console.error("No bone parent found for skinned mesh during USDZ export", n.skinnedMesh), y.sort((A, $) => fa(A.bone, x) > fa($.bone, x) ? 1 : -1);
24569
+ b.push({ bone: A, inverse: A.matrixWorld.clone().invert() });
24570
+ const x = b[0].bone.parent;
24571
+ x || console.error("No bone parent found for skinned mesh during USDZ export", n.skinnedMesh), b.sort((A, $) => fa(A.bone, x) > fa($.bone, x) ? 1 : -1);
24572
24572
  const I = t.quickLookCompatible, O = [], k = [], E = [], B = [];
24573
- for (const { bone: A } of y) {
24573
+ for (const { bone: A } of b) {
24574
24574
  if (I) {
24575
24575
  const $ = A.scale;
24576
24576
  $.x == 0 && ($.x = 1e-5), $.y == 0 && ($.y = 1e-5), $.z == 0 && ($.z = 1e-5), O.push(new ee().compose(A.position, A.quaternion, A.scale));
@@ -24578,9 +24578,9 @@ class wR {
24578
24578
  O.push(A.matrix.clone());
24579
24579
  k.push(A.position), E.push(A.quaternion), B.push(A.scale);
24580
24580
  }
24581
- const D = y.map((A) => '"' + fa(A.bone, x) + '"').join(", "), W = y.map((A) => $_(A.inverse.clone().invert())).join(", ");
24581
+ const D = b.map((A) => '"' + fa(A.bone, x) + '"').join(", "), W = b.map((A) => $_(A.inverse.clone().invert())).join(", ");
24582
24582
  e.beginBlock('def Skeleton "Rig"'), e.appendLine(`uniform matrix4d[] bindTransforms = [${W}]`), e.appendLine(`uniform token[] joints = [${D}]`), e.appendLine('uniform token purpose = "guide"'), e.appendLine(`uniform matrix4d[] restTransforms = [${O.map((A) => $_(A)).join(", ")}]`);
24583
- const X = p(y.map((A) => A.bone));
24583
+ const X = p(b.map((A) => A.bone));
24584
24584
  if (Cn) {
24585
24585
  let A = 1e7, $ = 0;
24586
24586
  for (const V of X.position?.keys() ?? [])
@@ -24647,29 +24647,29 @@ class wR {
24647
24647
  for (let p = 0; p < h.length; p++) {
24648
24648
  const g = h[p];
24649
24649
  if (!g) continue;
24650
- const y = n.getStartTimeByClip(g.clip), m = g.getSortedTimesArray(d === "position", d === "rotation", d === "scale");
24650
+ const b = n.getStartTimeByClip(g.clip), m = g.getSortedTimesArray(d === "position", d === "rotation", d === "scale");
24651
24651
  if (!m || m.length === 0) {
24652
24652
  console.error("got an animated object but no time values?", o, g);
24653
24653
  continue;
24654
24654
  }
24655
- const v = !g.clip, b = d === "position" && (g.pos || v), x = d === "rotation" && (g.rot || v), I = d === "scale" && (g.scale || v);
24656
- if (b || x || I) {
24655
+ const v = !g.clip, _ = d === "position" && (g.pos || v), x = d === "rotation" && (g.rot || v), I = d === "scale" && (g.scale || v);
24656
+ if (_ || x || I) {
24657
24657
  const O = g.clip?.name ?? "rest", k = g.getDuration();
24658
- Cn && console.log("Write .timeSamples:", O, y, k, h), e.appendLine("# " + O + ": start=" + l.format(y * Ue.frameRate) + ", length=" + l.format(k * Ue.frameRate) + ", frames=" + g.getFrames());
24658
+ Cn && console.log("Write .timeSamples:", O, b, k, h), e.appendLine("# " + O + ": start=" + l.format(b * Ue.frameRate) + ", length=" + l.format(k * Ue.frameRate) + ", frames=" + g.getFrames());
24659
24659
  }
24660
- if (b)
24660
+ if (_)
24661
24661
  for (const { time: O, translation: k } of g.getValues(m, !0, !1, !1)) {
24662
- const B = `${l.format((y + O) * Ue.frameRate)}: (${ae(k.x)}, ${ae(k.y)}, ${ae(k.z)}),`;
24662
+ const B = `${l.format((b + O) * Ue.frameRate)}: (${ae(k.x)}, ${ae(k.y)}, ${ae(k.z)}),`;
24663
24663
  e.appendLine(B);
24664
24664
  }
24665
24665
  if (x)
24666
24666
  for (const { time: O, rotation: k } of g.getValues(m, !1, !0, !1)) {
24667
- const B = `${l.format((y + O) * Ue.frameRate)}: (${ae(k.w)}, ${ae(k.x)}, ${ae(k.y)}, ${ae(k.z)}),`;
24667
+ const B = `${l.format((b + O) * Ue.frameRate)}: (${ae(k.w)}, ${ae(k.x)}, ${ae(k.y)}, ${ae(k.z)}),`;
24668
24668
  e.appendLine(B);
24669
24669
  }
24670
24670
  if (I)
24671
24671
  for (const { time: O, scale: k } of g.getValues(m, !1, !1, !0)) {
24672
- const B = `${l.format((y + O) * Ue.frameRate)}: (${ae(k.x)}, ${ae(k.y)}, ${ae(k.z)}),`;
24672
+ const B = `${l.format((b + O) * Ue.frameRate)}: (${ae(k.x)}, ${ae(k.y)}, ${ae(k.z)}),`;
24673
24673
  e.appendLine(B);
24674
24674
  }
24675
24675
  }
@@ -24734,9 +24734,9 @@ class $a extends R {
24734
24734
  duration = 1;
24735
24735
  relativeMotion = !1;
24736
24736
  coroutine = null;
24737
- targetPos = new _();
24737
+ targetPos = new y();
24738
24738
  targetRot = new U();
24739
- targetScale = new _();
24739
+ targetScale = new y();
24740
24740
  start() {
24741
24741
  Tc(this.gameObject);
24742
24742
  }
@@ -25185,15 +25185,15 @@ const Sg = class bn extends R {
25185
25185
  if (o) {
25186
25186
  const g = e.registerAnimation(t, o.clip);
25187
25187
  g && (o.loop ? a.push(g) : r.push(g));
25188
- let y = 0;
25188
+ let b = 0;
25189
25189
  if (o.minMaxOffsetNormalized) {
25190
25190
  const m = o.minMaxOffsetNormalized.x, v = o.minMaxOffsetNormalized.y;
25191
- y = (o.clip?.duration || 1) * (m + Math.random() * (v - m));
25191
+ b = (o.clip?.duration || 1) * (m + Math.random() * (v - m));
25192
25192
  }
25193
25193
  return {
25194
25194
  animationSequence: r,
25195
25195
  animationLoopAfterSequence: a,
25196
- randomTimeOffset: y
25196
+ randomTimeOffset: b
25197
25197
  };
25198
25198
  }
25199
25199
  const l = n?.runtimeAnimatorController;
@@ -25201,26 +25201,26 @@ const Sg = class bn extends R {
25201
25201
  if (l && c) {
25202
25202
  const g = new Array();
25203
25203
  g.push(c);
25204
- let y = !1;
25204
+ let b = !1;
25205
25205
  for (; g.length < 100; ) {
25206
25206
  if (!c || c === null || !c.transitions || c.transitions.length === 0) {
25207
- c.motion?.isLooping && (y = !0);
25207
+ c.motion?.isLooping && (b = !0);
25208
25208
  break;
25209
25209
  }
25210
- const m = c.transitions.find((b) => b.conditions.length === 0), v = m ? l.getState(m.destinationState, 0) : null;
25210
+ const m = c.transitions.find((_) => _.conditions.length === 0), v = m ? l.getState(m.destinationState, 0) : null;
25211
25211
  if (v && g.includes(v)) {
25212
- c = v, y = !0;
25212
+ c = v, b = !0;
25213
25213
  break;
25214
25214
  } else if (m) {
25215
25215
  if (c = v, !c)
25216
25216
  break;
25217
25217
  g.push(c);
25218
25218
  } else {
25219
- y = c.motion?.isLooping ?? !1;
25219
+ b = c.motion?.isLooping ?? !1;
25220
25220
  break;
25221
25221
  }
25222
25222
  }
25223
- if (y && c) {
25223
+ if (b && c) {
25224
25224
  const m = g.indexOf(c);
25225
25225
  h = g.slice(0, m), d = g.slice(m), q_ && console.log("found loop from " + i, "states until loop", h, "states looping", d);
25226
25226
  } else
@@ -25228,24 +25228,24 @@ const Sg = class bn extends R {
25228
25228
  if (!d.length) {
25229
25229
  const m = h[h.length - 1], v = m.motion?.clip;
25230
25230
  if (v) {
25231
- let b;
25231
+ let _;
25232
25232
  if (e.holdClipMap.has(v))
25233
- b = e.holdClipMap.get(v);
25233
+ _ = e.holdClipMap.get(v);
25234
25234
  else {
25235
25235
  const x = m.name + "_hold";
25236
- b = v.clone(), b.duration = 1, b.name = x;
25236
+ _ = v.clone(), _.duration = 1, _.name = x;
25237
25237
  const I = v.duration;
25238
- b.tracks = v.tracks.map((O) => {
25238
+ _.tracks = v.tracks.map((O) => {
25239
25239
  const k = O.clone();
25240
25240
  k.times = new Float32Array([0, I]);
25241
25241
  const E = O.values.length, B = O.getValueSize(), D = O.values.slice(E - B, E);
25242
25242
  return k.values = new Float32Array(2 * B), k.values.set(D, 0), k.values.set(D, B), k;
25243
- }), b.name = x, e.holdClipMap.set(v, b);
25243
+ }), _.name = x, e.holdClipMap.set(v, _);
25244
25244
  }
25245
- if (b) {
25245
+ if (_) {
25246
25246
  const x = {
25247
- name: b.name,
25248
- motion: { clip: b, isLooping: !1, name: b.name },
25247
+ name: _.name,
25248
+ motion: { clip: _, isLooping: !1, name: _.name },
25249
25249
  speed: 1,
25250
25250
  transitions: [],
25251
25251
  behaviours: [],
@@ -25266,10 +25266,10 @@ const Sg = class bn extends R {
25266
25266
  console.warn("No clips found for state " + i + " on " + n?.name + ", can't export animation data");
25267
25267
  return;
25268
25268
  }
25269
- const f = (g, y) => {
25269
+ const f = (g, b) => {
25270
25270
  if (!t) return;
25271
25271
  const m = e.registerAnimation(t, g.motion.clip ?? null);
25272
- m ? (m.speed = g.speed, y.push(m)) : console.warn("Couldn't register animation for state " + g.name + " on " + n?.name);
25272
+ m ? (m.speed = g.speed, b.push(m)) : console.warn("Couldn't register animation for state " + g.name + " on " + n?.name);
25273
25273
  };
25274
25274
  if (h.length > 0) {
25275
25275
  r = new Array();
@@ -25283,8 +25283,8 @@ const Sg = class bn extends R {
25283
25283
  }
25284
25284
  let p = 0;
25285
25285
  if (n && l && n.minMaxOffsetNormalized) {
25286
- const g = n.minMaxOffsetNormalized.x, y = n.minMaxOffsetNormalized.y;
25287
- p = ((h.length ? h[0] : d.length ? d[0] : null)?.motion.clip?.duration || 1) * (g + Math.random() * (y - g));
25286
+ const g = n.minMaxOffsetNormalized.x, b = n.minMaxOffsetNormalized.y;
25287
+ p = ((h.length ? h[0] : d.length ? d[0] : null)?.motion.clip?.duration || 1) * (g + Math.random() * (b - g));
25288
25288
  }
25289
25289
  return {
25290
25290
  animationSequence: r,
@@ -25828,7 +25828,7 @@ class Vi extends R {
25828
25828
  this._placementScene.add(n);
25829
25829
  }
25830
25830
  if (this.context.scene.add(t), this.autoCenter) {
25831
- const i = ii(this._placementScene.children), n = i.getCenter(new _()), o = i.getSize(new _()), r = new ee();
25831
+ const i = ii(this._placementScene.children), n = i.getCenter(new y()), o = i.getSize(new y()), r = new ee();
25832
25832
  r.makeTranslation(n.x, n.y - o.y * 0.5, n.z), this._startOffset.multiply(r);
25833
25833
  }
25834
25834
  this._reparentedComponents.length = 0, this._reparentedComponents.push({ comp: this, originalObject: this.gameObject }), S.addComponent(t, this);
@@ -25957,9 +25957,9 @@ class Vi extends R {
25957
25957
  e.running && i && (this._anchor = i);
25958
25958
  }
25959
25959
  }
25960
- upVec = new _(0, 1, 0);
25961
- lookPoint = new _();
25962
- worldUpVec = new _(0, 1, 0);
25960
+ upVec = new y(0, 1, 0);
25961
+ lookPoint = new y();
25962
+ worldUpVec = new y(0, 1, 0);
25963
25963
  applyViewBasedTransform(e) {
25964
25964
  const t = this.context.mainCamera, i = e, n = t.worldPosition, o = i.worldPosition;
25965
25965
  this.upVec.set(0, 1, 0).applyQuaternion(e.quaternion);
@@ -25979,9 +25979,9 @@ class Vi extends R {
25979
25979
  }
25980
25980
  }
25981
25981
  class Rd {
25982
- static up = new _(0, 1, 0);
25983
- static zero = new _(0, 0, 0);
25984
- static one = new _(1, 1, 1);
25982
+ static up = new y(0, 1, 0);
25983
+ static zero = new y(0, 0, 0);
25984
+ static one = new y(1, 1, 1);
25985
25985
  oneFingerDrag = !0;
25986
25986
  twoFingerRotate = !0;
25987
25987
  twoFingerScale = !0;
@@ -26105,8 +26105,8 @@ class Rd {
26105
26105
  }
26106
26106
  };
26107
26107
  _raycaster = new Nd();
26108
- _intersection = new _();
26109
- _screenPos = new _();
26108
+ _intersection = new y();
26109
+ _screenPos = new y();
26110
26110
  getPositionOnPlane(e, t) {
26111
26111
  const i = this.context.mainCamera;
26112
26112
  return this._screenPos.x = e / window.innerWidth * 2 - 1, this._screenPos.y = -(t / window.innerHeight) * 2 + 1, this._screenPos.z = 1, this._screenPos.unproject(i), this._raycaster.set(i.position, this._screenPos.sub(i.position)), this._raycaster.ray.intersectPlane(this.plane, this._intersection), this._intersection;
@@ -26530,7 +26530,7 @@ var BR = Object.defineProperty, Og = (s, e, t, i) => {
26530
26530
  (r = s[o]) && (n = r(e, t, n) || n);
26531
26531
  return n && BR(e, t, n), n;
26532
26532
  };
26533
- const gl = w("debugwebxr"), Q_ = new U().setFromAxisAngle(new _(0, 1, 0), Math.PI);
26533
+ const gl = w("debugwebxr"), Q_ = new U().setFromAxisAngle(new y(0, 1, 0), Math.PI);
26534
26534
  class dr extends R {
26535
26535
  head;
26536
26536
  leftHand;
@@ -26882,9 +26882,9 @@ class Yi extends R {
26882
26882
  }
26883
26883
  let o = n?.point;
26884
26884
  if (!o && !this.useTeleportTarget) {
26885
- this._plane || (this._plane = new rr(new _(0, 1, 0), 0));
26885
+ this._plane || (this._plane = new rr(new y(0, 1, 0), 0));
26886
26886
  const r = t.worldPosition;
26887
- this._plane.setFromNormalAndCoplanarPoint(new _(0, 1, 0), r);
26887
+ this._plane.setFromNormalAndCoplanarPoint(new y(0, 1, 0), r);
26888
26888
  const a = e.ray;
26889
26889
  o = r.clone(), this._plane.intersectLine(new sS(a.origin, H(a.direction).multiplyScalar(1e4).add(a.origin)), o), o.distanceTo(r) > t.scale.x * 10 && (o = null);
26890
26890
  }
@@ -27048,7 +27048,7 @@ xo([
27048
27048
  xo([
27049
27049
  u()
27050
27050
  ], Yi.prototype, "showHits");
27051
- const UR = new _(0, 1, 0);
27051
+ const UR = new y(0, 1, 0);
27052
27052
  var NR = Object.defineProperty, yt = (s, e, t, i) => {
27053
27053
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
27054
27054
  (r = s[o]) && (n = r(e, t, n) || n);
@@ -27436,9 +27436,9 @@ class Jv {
27436
27436
  const p = d.affectedObjects;
27437
27437
  if (p)
27438
27438
  if (Array.isArray(p))
27439
- for (const y of p)
27440
- i.add(y), r && (l += `${d.id}[${d.id}
27441
- ${f}] -- ${f} --> ${y.uuid}(("${y.displayName || y.name || y.uuid}"))
27439
+ for (const b of p)
27440
+ i.add(b), r && (l += `${d.id}[${d.id}
27441
+ ${f}] -- ${f} --> ${b.uuid}(("${b.displayName || b.name || b.uuid}"))
27442
27442
  `);
27443
27443
  else typeof p == "object" ? (i.add(p), r && (l += `${d.id}[${d.id}
27444
27444
  ${f}] -- ${f} --> ${p.uuid}(("${p.displayName || p.name || p.uuid}"))
@@ -27477,8 +27477,8 @@ axisFormat %s
27477
27477
  for (const v of f)
27478
27478
  if (v.affectedObjects && typeof v.affectedObjects != "string") {
27479
27479
  if (Array.isArray(v.affectedObjects))
27480
- for (const b of v.affectedObjects)
27481
- p.add(b);
27480
+ for (const _ of v.affectedObjects)
27481
+ p.add(_);
27482
27482
  else
27483
27483
  p.add(v.affectedObjects);
27484
27484
  r && (d += `section ${v.animationName} (${v.id})
@@ -27489,14 +27489,14 @@ axisFormat %s
27489
27489
  const g = /* @__PURE__ */ new Set();
27490
27490
  for (const v of p) {
27491
27491
  v.getPath || console.error("USDZExporter: Animation target object has no getPath method. This is likely a bug", v);
27492
- let b = v.getPath();
27493
- b.startsWith("<") && (b = b.substring(1)), b.endsWith(">") && (b = b.substring(0, b.length - 1)), g.add({ path: b, obj: v });
27494
- }
27495
- const y = Array.from(g).sort((v, b) => v.path.length - b.path.length), m = new Array();
27496
- for (let v = 0; v < y.length; v++)
27497
- for (let b = v + 1; b < y.length; b++)
27498
- if (y[b].path.startsWith(y[v].path)) {
27499
- const x = y[b], I = y[v];
27492
+ let _ = v.getPath();
27493
+ _.startsWith("<") && (_ = _.substring(1)), _.endsWith(">") && (_ = _.substring(0, _.length - 1)), g.add({ path: _, obj: v });
27494
+ }
27495
+ const b = Array.from(g).sort((v, _) => v.path.length - _.path.length), m = new Array();
27496
+ for (let v = 0; v < b.length; v++)
27497
+ for (let _ = v + 1; _ < b.length; _++)
27498
+ if (b[_].path.startsWith(b[v].path)) {
27499
+ const x = b[_], I = b[v];
27500
27500
  m.push({ child: x.obj.displayName + " (" + x.path + ")", parent: I.obj.displayName + " (" + I.path + ")" });
27501
27501
  }
27502
27502
  m.length && console.warn(
@@ -27695,7 +27695,7 @@ class qR {
27695
27695
  width;
27696
27696
  height;
27697
27697
  }
27698
- const sn = new _(), _l = new ee(), Oh = new U(), Va = class tw extends un {
27698
+ const sn = new y(), _l = new ee(), Oh = new U(), Va = class tw extends un {
27699
27699
  get parent() {
27700
27700
  return this._parentRectTransform;
27701
27701
  }
@@ -27766,7 +27766,7 @@ const sn = new _(), _l = new ee(), Oh = new U(), Va = class tw extends un {
27766
27766
  });
27767
27767
  }
27768
27768
  onEnable() {
27769
- super.onEnable(), this.rectBlock || (this.rectBlock = new M()), this.lastMatrix || (this.lastMatrix = new ee()), this._lastAnchoring || (this._lastAnchoring = new J()), this._initialPosition || (this._initialPosition = new _()), this._anchoredPosition || (this._anchoredPosition = new J()), this.addShadowComponent(this.rectBlock), this._transformNeedsUpdate = !0, this.canvas?.registerTransform(this);
27769
+ super.onEnable(), this.rectBlock || (this.rectBlock = new M()), this.lastMatrix || (this.lastMatrix = new ee()), this._lastAnchoring || (this._lastAnchoring = new J()), this._initialPosition || (this._initialPosition = new y()), this._anchoredPosition || (this._anchoredPosition = new J()), this.addShadowComponent(this.rectBlock), this._transformNeedsUpdate = !0, this.canvas?.registerTransform(this);
27770
27770
  }
27771
27771
  onDisable() {
27772
27772
  super.onDisable(), this.removeShadowComponent(), this.canvas?.unregisterTransform(this);
@@ -28606,22 +28606,22 @@ class So extends Oi {
28606
28606
  const o = e.height;
28607
28607
  let r = o;
28608
28608
  n -= this.padding.horizontal, r -= this.padding.vertical, t === "x" ? this.padding.horizontal : this.padding.vertical;
28609
- const a = t === "x", l = a ? "y" : "x", c = a ? this.childControlWidth : this.childControlHeight, h = a ? this.childControlHeight : this.childControlWidth, d = a ? this.childForceExpandWidth : this.childForceExpandHeight, f = a ? this.childForceExpandHeight : this.childForceExpandWidth, p = a ? r : n, g = a ? i : o, y = 0.5 * (a ? this.childAlignment % 3 : Math.floor(this.childAlignment / 3));
28609
+ const a = t === "x", l = a ? "y" : "x", c = a ? this.childControlWidth : this.childControlHeight, h = a ? this.childControlHeight : this.childControlWidth, d = a ? this.childForceExpandWidth : this.childForceExpandHeight, f = a ? this.childForceExpandHeight : this.childForceExpandWidth, p = a ? r : n, g = a ? i : o, b = 0.5 * (a ? this.childAlignment % 3 : Math.floor(this.childAlignment / 3));
28610
28610
  let m = 0;
28611
28611
  a ? m += this.padding.left : m += this.padding.top;
28612
- let v = 0, b = 0;
28612
+ let v = 0, _ = 0;
28613
28613
  for (let E = 0; E < this.gameObject.children.length; E++) {
28614
28614
  const B = this.gameObject.children[E], D = S.getComponent(B, Un);
28615
- D?.activeAndEnabled && (b += 1, a ? v += D.width : v += D.height);
28615
+ D?.activeAndEnabled && (_ += 1, a ? v += D.width : v += D.height);
28616
28616
  }
28617
28617
  let x = 0;
28618
- const I = this.spacing * (b - 1);
28618
+ const I = this.spacing * (_ - 1);
28619
28619
  if (d || c) {
28620
28620
  let E = 0;
28621
- a ? E = n -= I : E = r -= I, b > 0 && (x = E / b);
28621
+ a ? E = n -= I : E = r -= I, _ > 0 && (x = E / _);
28622
28622
  }
28623
28623
  let O = 0;
28624
- O += this.padding.left, O -= this.padding.right, y !== 0 && (m = g - v, m *= y, m -= I * y, a ? (m -= this.padding.right * y, m += this.padding.left * (1 - y), m < this.padding.left && (m = this.padding.left)) : (m -= this.padding.bottom * y, m += this.padding.top * (1 - y), m < this.padding.top && (m = this.padding.top)));
28624
+ O += this.padding.left, O -= this.padding.right, b !== 0 && (m = g - v, m *= b, m -= I * b, a ? (m -= this.padding.right * b, m += this.padding.left * (1 - b), m < this.padding.left && (m = this.padding.left)) : (m -= this.padding.bottom * b, m += this.padding.top * (1 - b), m < this.padding.top && (m = this.padding.top)));
28625
28625
  let k = 1;
28626
28626
  for (let E = 0; E < this.gameObject.children.length; E++) {
28627
28627
  const B = this.gameObject.children[E], D = S.getComponent(B, Un);
@@ -28972,9 +28972,9 @@ class dw {
28972
28972
  g && (g.onEnable(), g.updateTransform(), g.onApplyTransform(), l.push(() => {
28973
28973
  g.onDisable();
28974
28974
  }));
28975
- const y = S.getComponent(d, Xt);
28976
- y && (y.onEnable(), l.push(() => {
28977
- y.onDisable();
28975
+ const b = S.getComponent(d, Xt);
28976
+ b && (b.onEnable(), l.push(() => {
28977
+ b.onDisable();
28978
28978
  })), l.push(() => {
28979
28979
  S.setActive(d, f);
28980
28980
  });
@@ -28987,33 +28987,33 @@ class dw {
28987
28987
  const f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
28988
28988
  f.set(h, c), p.set(h, a ? a.alpha : 1), h.traverse((g) => {
28989
28989
  if (g === h) return;
28990
- const y = st.createEmpty();
28991
- y.setMatrix(g.matrix);
28990
+ const b = st.createEmpty();
28991
+ b.setMatrix(g.matrix);
28992
28992
  const m = g.parent, v = !!m && typeof m.textContent == "string" && m.textContent.length > 0;
28993
- let b = p.get(m) || 1;
28993
+ let _ = p.get(m) || 1;
28994
28994
  const x = S.getComponent(g, ur);
28995
- if (x && (b *= x.alpha), g instanceof G && v) {
28995
+ if (x && (_ *= x.alpha), g instanceof G && v) {
28996
28996
  const O = g[pi];
28997
- O ? o.exportText(O.gameObject, y, i) : console.error("Error when exporting UI: shadow component owner not found. This is likely a bug.", g);
28997
+ O ? o.exportText(O.gameObject, b, i) : console.error("Error when exporting UI: shadow component owner not found. This is likely a bug.", g);
28998
28998
  }
28999
28999
  if (g instanceof G && !v) {
29000
29000
  const O = g.geometry.clone();
29001
- O.scale(1, 1, -1), this.flipWindingOrder(O), y.geometry = O;
29001
+ O.scale(1, 1, -1), this.flipWindingOrder(O), b.geometry = O;
29002
29002
  const k = new se(), E = g.material.opacity;
29003
- k.copy(g.material.color), y.material = new we({
29003
+ k.copy(g.material.color), b.material = new we({
29004
29004
  color: k,
29005
- opacity: E * b,
29005
+ opacity: E * _,
29006
29006
  map: g.material.map,
29007
29007
  transparent: !0
29008
29008
  });
29009
29009
  }
29010
- f.set(g, y), p.set(g, b);
29010
+ f.set(g, b), p.set(g, _);
29011
29011
  const I = f.get(m);
29012
29012
  if (!I) {
29013
29013
  console.error("Error when exporting UI: shadow component parent not found!", g, g.parent);
29014
29014
  return;
29015
29015
  }
29016
- I.add(y);
29016
+ I.add(b);
29017
29017
  });
29018
29018
  }
29019
29019
  }
@@ -29263,11 +29263,11 @@ const ri = class zl extends R {
29263
29263
  le.report("export-usdz", "Invoking before-export"), this.dispatchEvent(new CustomEvent("before-export", { detail: f })), this.applyWebARSessionRoot(), this._previousTimeScale = this.context.time.timeScale, this.context.time.timeScale = 0, le.report("export-usdz", "auto export animations and audio sources");
29264
29264
  const p = new Array();
29265
29265
  this.autoExportAnimations && p.push(...aT(e, l)), d.find((O) => O.extensionName === "Audio") && this.autoExportAudioSources && p.push(...lT(e)), a.debug = ai, a.pruneUnusedNodes = !dT;
29266
- const y = Aa.instance.objs.map((O) => O.batchedMesh);
29266
+ const b = Aa.instance.objs.map((O) => O.batchedMesh);
29267
29267
  a.keepObject = (O) => {
29268
29268
  let k = !0;
29269
29269
  const E = S.getComponent(O, Qi);
29270
- return E && !E.enabled && (k = !1), k && y.includes(O) && (k = !1), k && S.getComponentInParent(O, pu) && (k = !1), k && S.getComponentInParent(O, Rs) && (k = !1), ai && !k && console.log("USDZExporter: Discarding object", O), k;
29270
+ return E && !E.enabled && (k = !1), k && b.includes(O) && (k = !1), k && S.getComponentInParent(O, pu) && (k = !1), k && S.getComponentInParent(O, Rs) && (k = !1), ai && !k && console.log("USDZExporter: Discarding object", O), k;
29271
29271
  }, a.beforeWritingDocument = () => {
29272
29272
  if (L() && l && c) {
29273
29273
  const O = l.animatedRoots;
@@ -29283,8 +29283,8 @@ const ri = class zl extends R {
29283
29283
  });
29284
29284
  const v = d.find((O) => O.extensionName === "Behaviour");
29285
29285
  this.interactive && v && m.length > 0 && v.addBehavior(cT(m));
29286
- let b = !0;
29287
- this.quickLookCompatible && !this.interactive && (b = !1), this.anchoringType !== "plane" && this.anchoringType !== "none" && this.anchoringType !== "image" && this.anchoringType !== "face" && (this.anchoringType = "plane"), this.planeAnchoringAlignment !== "horizontal" && this.planeAnchoringAlignment !== "vertical" && this.planeAnchoringAlignment !== "any" && (this.planeAnchoringAlignment = "horizontal"), le.report("export-usdz", "Invoking exporter.parse");
29286
+ let _ = !0;
29287
+ this.quickLookCompatible && !this.interactive && (_ = !1), this.anchoringType !== "plane" && this.anchoringType !== "none" && this.anchoringType !== "image" && this.anchoringType !== "face" && (this.anchoringType = "plane"), this.planeAnchoringAlignment !== "horizontal" && this.planeAnchoringAlignment !== "vertical" && this.planeAnchoringAlignment !== "any" && (this.planeAnchoringAlignment = "horizontal"), le.report("export-usdz", "Invoking exporter.parse");
29288
29288
  const x = await a.parse(this.objectToExport, {
29289
29289
  ar: {
29290
29290
  anchoring: {
@@ -29297,7 +29297,7 @@ const ri = class zl extends R {
29297
29297
  extensions: d,
29298
29298
  quickLookCompatible: this.quickLookCompatible,
29299
29299
  maxTextureSize: this.maxTextureSize,
29300
- exportInvisible: b
29300
+ exportInvisible: _
29301
29301
  }), I = new Blob([x], { type: "model/vnd.usdz+zip" });
29302
29302
  this.revertWebARSessionRoot(), this.context.time.timeScale = this._previousTimeScale, le.report("export-usdz", "Invoking after-export"), this.dispatchEvent(new CustomEvent("after-export", { detail: f }));
29303
29303
  for (const O of p)
@@ -29347,9 +29347,9 @@ const ri = class zl extends R {
29347
29347
  static invertForwardMatrix = new ee().makeRotationY(Math.PI);
29348
29348
  static invertForwardQuaternion = new U().setFromEuler(new ot(0, Math.PI, 0));
29349
29349
  _rootSessionRootWasAppliedTo = null;
29350
- _rootPositionBeforeExport = new _();
29350
+ _rootPositionBeforeExport = new y();
29351
29351
  _rootRotationBeforeExport = new U();
29352
- _rootScaleBeforeExport = new _();
29352
+ _rootScaleBeforeExport = new y();
29353
29353
  getARScaleAndTarget() {
29354
29354
  if (!this.objectToExport) return { scale: 1, _invertForward: !1, target: this.gameObject, sessionRoot: null };
29355
29355
  const e = S.findObjectOfType(Mg);
@@ -29559,10 +29559,10 @@ class Mu extends jg {
29559
29559
  }
29560
29560
  }
29561
29561
  Dg([
29562
- u(_)
29562
+ u(y)
29563
29563
  ], Mu.prototype, "anchor");
29564
29564
  Dg([
29565
- u(_)
29565
+ u(y)
29566
29566
  ], Mu.prototype, "axis");
29567
29567
  var yT = Object.defineProperty, _T = Object.getOwnPropertyDescriptor, Hn = (s, e, t, i) => {
29568
29568
  for (var n = i > 1 ? void 0 : i ? _T(e, t) : e, o = s.length - 1, r; o >= 0; o--)
@@ -29839,7 +29839,7 @@ Hn([
29839
29839
  Hn([
29840
29840
  u()
29841
29841
  ], ki.prototype, "shadowResolution", 1);
29842
- new _(0, 0, 0);
29842
+ new y(0, 0, 0);
29843
29843
  var bT = Object.defineProperty, Fc = (s, e, t, i) => {
29844
29844
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
29845
29845
  (r = s[o]) && (n = r(e, t, n) || n);
@@ -29942,7 +29942,7 @@ class Ru extends R {
29942
29942
  }
29943
29943
  }
29944
29944
  Fc([
29945
- u(_)
29945
+ u(y)
29946
29946
  ], Ru.prototype, "localReferencePoint");
29947
29947
  Fc([
29948
29948
  u(zc)
@@ -30081,9 +30081,9 @@ class Xa extends R {
30081
30081
  alignLookDirection = !1;
30082
30082
  levelLookDirection = !1;
30083
30083
  levelPosition = !1;
30084
- positionOffset = new _(0, 0, 0);
30085
- rotationOffset = new _(0, 0, 0);
30086
- offset = new _(0, 0, 0);
30084
+ positionOffset = new y(0, 0, 0);
30085
+ rotationOffset = new y(0, 0, 0);
30086
+ offset = new y(0, 0, 0);
30087
30087
  update() {
30088
30088
  if (!this.from) return;
30089
30089
  var e = Z(this.from), t = be(this.from);
@@ -30092,13 +30092,13 @@ class Xa extends R {
30092
30092
  if (this.referenceSpace && this.offset.transformDirection(this.referenceSpace.matrixWorld).multiplyScalar(i), e.add(this.offset), this.levelPosition && this.referenceSpace) {
30093
30093
  const a = new rr(this.gameObject.up, 0), l = Z(this.referenceSpace);
30094
30094
  a.setFromNormalAndCoplanarPoint(this.gameObject.up, l);
30095
- const c = new _(0, 0, 0);
30095
+ const c = new y(0, 0, 0);
30096
30096
  a.projectPoint(e, c), e.copy(c);
30097
30097
  }
30098
30098
  this.affectPosition && Ot(this.gameObject, e);
30099
30099
  const n = new ot(this.rotationOffset.x, this.rotationOffset.y, this.rotationOffset.z), o = new U().setFromEuler(n);
30100
30100
  this.affectRotation && jn(this.gameObject, t.multiply(o));
30101
- const r = new _();
30101
+ const r = new y();
30102
30102
  this.from.getWorldDirection(r).multiplyScalar(50), this.levelLookDirection && (r.y = 0), this.alignLookDirection && this.gameObject.lookAt(r);
30103
30103
  }
30104
30104
  }
@@ -30109,10 +30109,10 @@ Au([
30109
30109
  u(S)
30110
30110
  ], Xa.prototype, "from");
30111
30111
  Au([
30112
- u(_)
30112
+ u(y)
30113
30113
  ], Xa.prototype, "positionOffset");
30114
30114
  Au([
30115
- u(_)
30115
+ u(y)
30116
30116
  ], Xa.prototype, "rotationOffset");
30117
30117
  var OT = Object.defineProperty, Co = (s, e, t, i) => {
30118
30118
  for (var n = void 0, o = s.length - 1, r; o >= 0; o--)
@@ -30205,8 +30205,8 @@ const mw = class Ul {
30205
30205
  return this.keys[this.keys.length - 1].value;
30206
30206
  }
30207
30207
  static interpolateValue(e, t, i) {
30208
- const n = t.time, o = t.value, r = t.outTangent, a = i.time, l = i.value, c = i.inTangent, h = a - n, d = h * h, f = d * h, p = ((r + c) * h - 2 * (l - o)) / f, g = (3 * (l - o) - (c + 2 * r) * h) / d, y = r, m = o, v = e - n, b = v * v, x = b * v;
30209
- return p * x + g * b + y * v + m;
30208
+ const n = t.time, o = t.value, r = t.outTangent, a = i.time, l = i.value, c = i.inTangent, h = a - n, d = h * h, f = d * h, p = ((r + c) * h - 2 * (l - o)) / f, g = (3 * (l - o) - (c + 2 * r) * h) / d, b = r, m = o, v = e - n, _ = v * v, x = _ * v;
30209
+ return p * x + g * _ + b * v + m;
30210
30210
  }
30211
30211
  };
30212
30212
  Co([
@@ -30620,7 +30620,7 @@ class Ka {
30620
30620
  z;
30621
30621
  zMultiplier;
30622
30622
  _time = 0;
30623
- _temp = new _();
30623
+ _temp = new y();
30624
30624
  evaluate(e, t, i) {
30625
30625
  if (t || (t = this._temp), !this.enabled)
30626
30626
  return t.x = t.y = t.z = 1, t;
@@ -30702,8 +30702,8 @@ const Ke = class $l {
30702
30702
  }
30703
30703
  /** nebula implementations: */
30704
30704
  /** initializer implementation */
30705
- _vector = new _(0, 0, 0);
30706
- _temp = new _(0, 0, 0);
30705
+ _vector = new y(0, 0, 0);
30706
+ _temp = new y(0, 0, 0);
30707
30707
  _triangle = new hS();
30708
30708
  onInitialize(e) {
30709
30709
  this._vector.set(0, 0, 0), e.mesh = void 0, e.mesh_geometry = void 0;
@@ -30747,8 +30747,8 @@ const Ke = class $l {
30747
30747
  const d = Math.floor(Math.random() * (l.count / 3));
30748
30748
  let f = d * 3, p = d * 3 + 1, g = d * 3 + 2;
30749
30749
  f = l.getX(f), p = l.getX(p), g = l.getX(g);
30750
- const y = a.getAttribute("position");
30751
- this._triangle.a.fromBufferAttribute(y, f), this._triangle.b.fromBufferAttribute(y, p), this._triangle.c.fromBufferAttribute(y, g), this._vector.set(0, 0, 0).addScaledVector(this._triangle.a, c).addScaledVector(this._triangle.b, h).addScaledVector(this._triangle.c, 1 - (c + h)), this._vector.applyMatrix4(r.matrixWorld), e.mesh_normal = d;
30750
+ const b = a.getAttribute("position");
30751
+ this._triangle.a.fromBufferAttribute(b, f), this._triangle.b.fromBufferAttribute(b, p), this._triangle.c.fromBufferAttribute(b, g), this._vector.set(0, 0, 0).addScaledVector(this._triangle.a, c).addScaledVector(this._triangle.b, h).addScaledVector(this._triangle.c, 1 - (c + h)), this._vector.applyMatrix4(r.matrixWorld), e.mesh_normal = d;
30752
30752
  }
30753
30753
  }
30754
30754
  break;
@@ -30762,7 +30762,7 @@ const Ke = class $l {
30762
30762
  }
30763
30763
  this.applyRotation(this._vector), i && (this._vector.applyQuaternion(this.system.worldQuaternion), this._vector.add(this.system.worldPos)), Rh && z.DrawSphere(this._vector, 0.03, 16711680, 0.5, !0);
30764
30764
  }
30765
- _dir = new _();
30765
+ _dir = new y();
30766
30766
  getDirection(e, t) {
30767
30767
  if (!this.enabled)
30768
30768
  return this._dir.set(0, 0, 1), this._dir;
@@ -30794,8 +30794,8 @@ const Ke = class $l {
30794
30794
  {
30795
30795
  const l = a.index;
30796
30796
  if (l) {
30797
- const c = e.mesh_normal, h = l.getX(c * 3), d = l.getX(c * 3 + 1), f = l.getX(c * 3 + 2), p = a.getAttribute("position"), g = H(), y = H(), m = H();
30798
- g.fromBufferAttribute(p, h), y.fromBufferAttribute(p, d), m.fromBufferAttribute(p, f), g.sub(y), m.sub(y), g.cross(m), this._dir.copy(g).multiplyScalar(-1);
30797
+ const c = e.mesh_normal, h = l.getX(c * 3), d = l.getX(c * 3 + 1), f = l.getX(c * 3 + 2), p = a.getAttribute("position"), g = H(), b = H(), m = H();
30798
+ g.fromBufferAttribute(p, h), b.fromBufferAttribute(p, d), m.fromBufferAttribute(p, f), g.sub(b), m.sub(b), g.cross(m), this._dir.copy(g).multiplyScalar(-1);
30799
30799
  const v = be(r);
30800
30800
  this._dir.applyQuaternion(v);
30801
30801
  }
@@ -30810,7 +30810,7 @@ const Ke = class $l {
30810
30810
  return this._space === 1 && this._dir.applyQuaternion(this.system.worldQuaternion), this.applyRotation(this._dir), this._dir.normalize(), this.spherizeDirection(this._dir, this.sphericalDirectionAmount), this.randomizeDirection(this._dir, this.randomDirectionAmount), Rh && (z.DrawSphere(t, 0.01, 8925952, 0.5, !0), z.DrawDirection(t, this._dir, 8925952, 0.5, !0)), this._dir;
30811
30811
  }
30812
30812
  static _randomQuat = new U();
30813
- static _tempVec = new _();
30813
+ static _tempVec = new y();
30814
30814
  randomizePosition(e, t) {
30815
30815
  if (t <= 0) return;
30816
30816
  const i = $l._tempVec;
@@ -30823,7 +30823,7 @@ const Ke = class $l {
30823
30823
  }
30824
30824
  spherizeDirection(e, t) {
30825
30825
  if (t === 0) return;
30826
- const i = Math.random() * Math.PI * 2, n = Math.acos(1 - Math.random() * 2), o = Math.sin(n) * Math.cos(i), r = Math.sin(n) * Math.sin(i), a = Math.cos(n), l = new _(o, r, a);
30826
+ const i = Math.random() * Math.PI * 2, n = Math.acos(1 - Math.random() * 2), o = Math.sin(n) * Math.cos(i), r = Math.sin(n) * Math.sin(i), a = Math.cos(n), l = new y(o, r, a);
30827
30827
  e.lerp(l, t);
30828
30828
  }
30829
30829
  randomSpherePoint(e, t, i, n, o) {
@@ -30856,8 +30856,8 @@ const Ke = class $l {
30856
30856
  h += Math.PI + 0.5, h += this._loopTime * Math.PI * 2, h %= j.toRadians(o);
30857
30857
  break;
30858
30858
  }
30859
- const d = Math.acos(2 * c - 1), f = j.lerp(1, 1 - Math.pow(1 - Math.random(), Math.PI), n) * i, p = e.x + -f * Math.sin(d) * Math.cos(h), g = e.y + f * Math.sin(d) * Math.sin(h), y = e.z;
30860
- a.x = p * this.scale.x, a.y = g * this.scale.y, a.z = y * this.scale.z;
30859
+ const d = Math.acos(2 * c - 1), f = j.lerp(1, 1 - Math.pow(1 - Math.random(), Math.PI), n) * i, p = e.x + -f * Math.sin(d) * Math.cos(h), g = e.y + f * Math.sin(d) * Math.sin(h), b = e.z;
30860
+ a.x = p * this.scale.x, a.y = g * this.scale.y, a.z = b * this.scale.z;
30861
30861
  }
30862
30862
  };
30863
30863
  C([
@@ -30885,16 +30885,16 @@ C([
30885
30885
  u()
30886
30886
  ], Ke.prototype, "arcMode");
30887
30887
  C([
30888
- u(_)
30888
+ u(y)
30889
30889
  ], Ke.prototype, "boxThickness");
30890
30890
  C([
30891
- u(_)
30891
+ u(y)
30892
30892
  ], Ke.prototype, "position");
30893
30893
  C([
30894
- u(_)
30894
+ u(y)
30895
30895
  ], Ke.prototype, "rotation");
30896
30896
  C([
30897
- u(_)
30897
+ u(y)
30898
30898
  ], Ke.prototype, "scale");
30899
30899
  C([
30900
30900
  u()
@@ -30951,7 +30951,7 @@ class ve {
30951
30951
  this._time += e.time.deltaTime * this.scrollSpeedMultiplier;
30952
30952
  }
30953
30953
  /** nebula implementations: */
30954
- _temp = new _();
30954
+ _temp = new y();
30955
30955
  apply(e, t, i, n, o, r) {
30956
30956
  if (!this.enabled) return;
30957
30957
  this._noise || (this._noise = QS(() => 0));
@@ -31155,9 +31155,9 @@ class Ve {
31155
31155
  update(e) {
31156
31156
  this._system = e;
31157
31157
  }
31158
- _temp = new _();
31159
- _temp2 = new _();
31160
- _temp3 = new _();
31158
+ _temp = new y();
31159
+ _temp2 = new y();
31160
+ _temp3 = new y();
31161
31161
  _hasOrbital = !1;
31162
31162
  _index = 0;
31163
31163
  _orbitalMatrix = new ee();
@@ -31168,7 +31168,7 @@ class Ve {
31168
31168
  if (!this.enabled) return;
31169
31169
  const l = r / a, c = this.speedModifier.evaluate(l) * this.speedModifierMultiplier, h = this.x.evaluate(l), d = this.y.evaluate(l), f = this.z.evaluate(l);
31170
31170
  if (this._temp.set(-h, d, f), this._system && this._system.main.simulationSpace === 1 && this._temp.applyQuaternion(this._system.worldQuaternion), this._hasOrbital && this._system?.worldPos) {
31171
- const g = this._temp2.set(i.x, i.y, i.z), y = this.orbitalXMultiplier, m = this.orbitalYMultiplier, v = this.orbitalZMultiplier, b = c * Math.PI * 2 * 10, x = Math.cos(b * y), I = Math.sin(b * y), O = Math.cos(b * m), k = Math.sin(b * m), E = Math.cos(b * v), B = Math.sin(b * v), D = g.x * (O * E) + g.y * (O * B) + g.z * -k, W = g.x * (I * k * E - x * B) + g.y * (I * k * B + x * E) + g.z * (I * O), X = g.x * (x * k * E + I * B) + g.y * (x * k * B - I * E) + g.z * (x * O), A = this._temp3.set(g.x - D, g.y - W, g.z - X);
31171
+ const g = this._temp2.set(i.x, i.y, i.z), b = this.orbitalXMultiplier, m = this.orbitalYMultiplier, v = this.orbitalZMultiplier, _ = c * Math.PI * 2 * 10, x = Math.cos(_ * b), I = Math.sin(_ * b), O = Math.cos(_ * m), k = Math.sin(_ * m), E = Math.cos(_ * v), B = Math.sin(_ * v), D = g.x * (O * E) + g.y * (O * B) + g.z * -k, W = g.x * (I * k * E - x * B) + g.y * (I * k * B + x * E) + g.z * (I * O), X = g.x * (x * k * E + I * B) + g.y * (x * k * B - I * E) + g.z * (x * O), A = this._temp3.set(g.x - D, g.y - W, g.z - X);
31172
31172
  A.normalize(), A.multiplyScalar(0.2 / o * Math.max(this.orbitalXMultiplier, this.orbitalYMultiplier, this.orbitalZMultiplier)), n.x += A.x, n.y += A.y, n.z += A.z;
31173
31173
  }
31174
31174
  n.x += this._temp.x, n.y += this._temp.y, n.z += this._temp.z, n.x *= c, n.y *= c, n.z *= c;
@@ -31409,8 +31409,8 @@ class _t {
31409
31409
  multiplyDragByParticleSize = !1;
31410
31410
  multiplyDragByParticleVelocity = !1;
31411
31411
  space;
31412
- _temp = new _();
31413
- _temp2 = new _();
31412
+ _temp = new y();
31413
+ _temp2 = new y();
31414
31414
  apply(e, t, i, n, o, r, a) {
31415
31415
  if (this.enabled) {
31416
31416
  const l = this.limit.evaluate(o) * this.limitMultiplier;
@@ -31481,12 +31481,12 @@ const Uc = class yw {
31481
31481
  }
31482
31482
  system;
31483
31483
  get _lastWorldPosition() {
31484
- return this.system._iv_lastWorldPosition || (this.system._iv_lastWorldPosition = new _()), this.system._iv_lastWorldPosition;
31484
+ return this.system._iv_lastWorldPosition || (this.system._iv_lastWorldPosition = new y()), this.system._iv_lastWorldPosition;
31485
31485
  }
31486
31486
  get _velocity() {
31487
- return this.system._iv_velocity || (this.system._iv_velocity = new _()), this.system._iv_velocity;
31487
+ return this.system._iv_velocity || (this.system._iv_velocity = new y()), this.system._iv_velocity;
31488
31488
  }
31489
- _temp = new _();
31489
+ _temp = new y();
31490
31490
  _firstUpdate = !0;
31491
31491
  awake(e) {
31492
31492
  this.system = e, this.reset();
@@ -31593,8 +31593,8 @@ C([
31593
31593
  C([
31594
31594
  u(Ya)
31595
31595
  ], Nc.prototype, "color");
31596
- new _(1, 1, 1);
31597
- new _(0, 0, 1);
31596
+ new y(1, 1, 1);
31597
+ new y(0, 0, 1);
31598
31598
  class bw {
31599
31599
  constructor(e, t, i, n) {
31600
31600
  this.system = e, this.particleSystem = t, this.subSystem = i, this.subParticleSystem = n, this.subParticleSystem && this.subParticleSystem && (this.subParticleSystem.onlyUsedByOther = !0);
@@ -31606,8 +31606,8 @@ class bw {
31606
31606
  emitterProbability;
31607
31607
  //private matrix_ = new Matrix4();
31608
31608
  q_ = new U();
31609
- v_ = new _();
31610
- v2_ = new _();
31609
+ v_ = new y();
31610
+ v2_ = new y();
31611
31611
  _emitterMatrix = new nf();
31612
31612
  _circularBuffer;
31613
31613
  clone() {
@@ -31776,7 +31776,7 @@ class ET extends zg {
31776
31776
  }
31777
31777
  }
31778
31778
  class AT extends zg {
31779
- _lastPosition = new _();
31779
+ _lastPosition = new y();
31780
31780
  _lastDistance = 0;
31781
31781
  update() {
31782
31782
  const e = Z(this.system.gameObject);
@@ -31853,7 +31853,7 @@ class DT extends Pr {
31853
31853
  }
31854
31854
  }
31855
31855
  }
31856
- const eb = Symbol("sizeLerpFactor"), jT = new _();
31856
+ const eb = Symbol("sizeLerpFactor"), jT = new y();
31857
31857
  class BT extends Pr {
31858
31858
  type = "NeedleSize";
31859
31859
  _minSize = 0;
@@ -31899,10 +31899,10 @@ class FT extends Pr {
31899
31899
  }
31900
31900
  }
31901
31901
  }
31902
- const Eh = Symbol("startVelocity"), ib = Symbol("gravityModifier"), ip = Symbol("gravitySpeed"), Ah = Symbol("velocity lerp factor"), am = new _();
31902
+ const Eh = Symbol("startVelocity"), ib = Symbol("gravityModifier"), ip = Symbol("gravitySpeed"), Ah = Symbol("velocity lerp factor"), am = new y();
31903
31903
  class zT extends Pr {
31904
31904
  type = "NeedleVelocity";
31905
- _gravityDirection = new _();
31905
+ _gravityDirection = new y();
31906
31906
  initialize(e) {
31907
31907
  const t = this.system.main.simulationSpeed;
31908
31908
  e.startSpeed = this.system.main.startSpeed.evaluate(Math.random(), Math.random());
@@ -32182,12 +32182,12 @@ const jt = class Zh extends R {
32182
32182
  get worldQuaternionInverted() {
32183
32183
  return this._worldQuaternionInverted;
32184
32184
  }
32185
- _worldScale = new _();
32185
+ _worldScale = new y();
32186
32186
  get worldScale() {
32187
32187
  return this._worldScale;
32188
32188
  }
32189
32189
  _worldPositionFrame = -1;
32190
- _worldPos = new _();
32190
+ _worldPos = new y();
32191
32191
  get worldPos() {
32192
32192
  return this._worldPositionFrame !== this.context.time.frame && (this._worldPositionFrame = this.context.time.frame, Z(this.gameObject, this._worldPos)), this._worldPos;
32193
32193
  }
@@ -33639,13 +33639,13 @@ class Ow {
33639
33639
  GT(this._effects);
33640
33640
  let h = !1, d = null;
33641
33641
  for (let g = this._effects.length - 1; g >= 0; g--) {
33642
- const y = this._effects[g].effect;
33643
- if (y instanceof T.POSTPROCESSING.MODULE.ToneMappingEffect) {
33642
+ const b = this._effects[g].effect;
33643
+ if (b instanceof T.POSTPROCESSING.MODULE.ToneMappingEffect) {
33644
33644
  if (h) {
33645
- ts && console.warn(`[PostProcessing] Found multiple tonemapping effects in the scene: ${y.name} and ${d?.name}. Only the last one added will be used.`), this._effects.splice(g, 1);
33645
+ ts && console.warn(`[PostProcessing] Found multiple tonemapping effects in the scene: ${b.name} and ${d?.name}. Only the last one added will be used.`), this._effects.splice(g, 1);
33646
33646
  continue;
33647
33647
  }
33648
- d = y, h = !0;
33648
+ d = b, h = !0;
33649
33649
  }
33650
33650
  }
33651
33651
  const f = [];
@@ -33654,8 +33654,8 @@ class Ow {
33654
33654
  const m = this._effects[g].effect;
33655
33655
  if (m instanceof T.POSTPROCESSING.MODULE.SMAAEffect ? this._hasSmaaEffect = !0 : m instanceof T.POSTPROCESSING.MODULE.NormalPass && (this._anyPassHasNormal = !0), !(m instanceof T.POSTPROCESSING.MODULE.ToneMappingEffect && d !== m))
33656
33656
  if (m instanceof T.POSTPROCESSING.MODULE.Effect) {
33657
- const v = m.getAttributes(), b = T.POSTPROCESSING.MODULE.EffectAttribute.CONVOLUTION;
33658
- v & b && (ts && console.log("[PostProcessing] Convolution effect: " + m.name), p && (ts && console.log("[PostProcessing] → Merging effects [" + f.map((x) => x.name).join(", ") + "]"), this.createPassForMergeableEffects(f, r, o, n)), p = !0), f.push(m);
33657
+ const v = m.getAttributes(), _ = T.POSTPROCESSING.MODULE.EffectAttribute.CONVOLUTION;
33658
+ v & _ && (ts && console.log("[PostProcessing] Convolution effect: " + m.name), p && (ts && console.log("[PostProcessing] → Merging effects [" + f.map((x) => x.name).join(", ") + "]"), this.createPassForMergeableEffects(f, r, o, n)), p = !0), f.push(m);
33659
33659
  } else m instanceof T.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));
33660
33660
  }
33661
33661
  this.createPassForMergeableEffects(f, r, o, n);
@@ -35677,7 +35677,7 @@ const qc = class Iw extends R {
35677
35677
  rotateFactor = 0.1;
35678
35678
  positionAxes = Al.All;
35679
35679
  flipForward = !1;
35680
- static _invertForward = new U().setFromAxisAngle(new _(0, 1, 0), Math.PI);
35680
+ static _invertForward = new U().setFromAxisAngle(new y(0, 1, 0), Math.PI);
35681
35681
  _firstUpdate = !0;
35682
35682
  /**
35683
35683
  * Update the position and rotation of the GameObject to follow the target.
@@ -36114,7 +36114,7 @@ class XE {
36114
36114
  }
36115
36115
  }
36116
36116
  }
36117
- const QE = new U().setFromAxisAngle(new _(0, 1, 0), Math.PI);
36117
+ const QE = new U().setFromAxisAngle(new y(0, 1, 0), Math.PI);
36118
36118
  class YE {
36119
36119
  context;
36120
36120
  spectator;
@@ -36281,22 +36281,22 @@ var eA = Object.defineProperty, tA = Object.getOwnPropertyDescriptor, el = (s, e
36281
36281
  };
36282
36282
  const hb = w("debugsplines");
36283
36283
  class ks {
36284
- position = new _();
36284
+ position = new y();
36285
36285
  rotation = new U();
36286
- tangentIn = new _();
36287
- tangentOut = new _();
36286
+ tangentIn = new y();
36287
+ tangentOut = new y();
36288
36288
  }
36289
36289
  el([
36290
- lt(_)
36290
+ lt(y)
36291
36291
  ], ks.prototype, "position", 2);
36292
36292
  el([
36293
36293
  lt(U)
36294
36294
  ], ks.prototype, "rotation", 2);
36295
36295
  el([
36296
- lt(_)
36296
+ lt(y)
36297
36297
  ], ks.prototype, "tangentIn", 2);
36298
36298
  el([
36299
- lt(_)
36299
+ lt(y)
36300
36300
  ], ks.prototype, "tangentOut", 2);
36301
36301
  class tl extends R {
36302
36302
  /**
@@ -36327,7 +36327,7 @@ class tl extends R {
36327
36327
  * Gets a point on the spline in world space.
36328
36328
  */
36329
36329
  getPointAt(e, t) {
36330
- if (!this.curve) return new _();
36330
+ if (!this.curve) return new y();
36331
36331
  const i = this.curve.getPointAt(j.clamp01(e), t), n = this.gameObject.matrixWorld ?? void 0;
36332
36332
  return n && i.applyMatrix4(n), i;
36333
36333
  }
@@ -36341,7 +36341,7 @@ class tl extends R {
36341
36341
  * Gets the tangent vector on the spline in world space.
36342
36342
  */
36343
36343
  getTangentAt(e, t) {
36344
- if (!this.curve) return t ?? new _();
36344
+ if (!this.curve) return t ?? new y();
36345
36345
  const i = this.gameObject.worldQuaternion;
36346
36346
  return this.curve.getTangentAt(j.clamp01(e), t).applyQuaternion(i);
36347
36347
  }
@@ -36402,7 +36402,7 @@ el([
36402
36402
  lt(ks)
36403
36403
  ], tl.prototype, "spline", 2);
36404
36404
  function iA(s, e) {
36405
- const t = s.map((o) => new _(-o.position.x, o.position.y, o.position.z));
36405
+ const t = s.map((o) => new y(-o.position.x, o.position.y, o.position.z));
36406
36406
  t.length === 1 && t.push(t[0]);
36407
36407
  const i = s.reduce((o, r) => o + Math.abs(r.tangentOut.x) + Math.abs(r.tangentOut.y) + Math.abs(r.tangentOut.z), 0) / s.length, n = j.remap(i, 0, 0.3, 0, 0.5);
36408
36408
  return new gS(t, e, "catmullrom", n);
@@ -36900,7 +36900,7 @@ class uA {
36900
36900
  constructor(e, t) {
36901
36901
  this.guid = e, this.position = { x: 0, y: 0, z: 0 }, this.rotation = { x: 0, y: 0, z: 0, w: 0 }, this.update(t, null);
36902
36902
  }
36903
- static temp = new _();
36903
+ static temp = new y();
36904
36904
  update(e, t) {
36905
36905
  const i = e.worldPosition;
36906
36906
  this.position.x = i.x, this.position.y = i.y, this.position.z = i.z;
@@ -37064,7 +37064,7 @@ class mA {
37064
37064
  for (const r of t.tracks)
37065
37065
  if (!(r.times.length <= 0)) {
37066
37066
  if (r.name.endsWith(n))
37067
- this.rootStartPosition = new _().fromArray(r.values, 0), this.rootEndPosition = new _().fromArray(r.values, r.values.length - 3), this.rootPositionOffset = this.rootEndPosition.clone().sub(this.rootStartPosition), Tn && console.log(this.rootPositionOffset);
37067
+ this.rootStartPosition = new y().fromArray(r.values, 0), this.rootEndPosition = new y().fromArray(r.values, r.values.length - 3), this.rootPositionOffset = this.rootEndPosition.clone().sub(this.rootStartPosition), Tn && console.log(this.rootPositionOffset);
37068
37068
  else if (r.name.endsWith(o) && (this.rootStartQuaternion = new U().fromArray(r.values, 0), this.rootEndQuaternion = new U().fromArray(r.values, r.values.length - 4), this.rootQuaternionOffset = this.rootEndQuaternion.clone().multiply(this.rootStartQuaternion), Tn)) {
37069
37069
  const a = new ot().setFromQuaternion(this.rootQuaternionOffset);
37070
37070
  console.log("ROT", a);
@@ -37120,15 +37120,15 @@ class Kg extends Hu {
37120
37120
  if (g)
37121
37121
  if (a) {
37122
37122
  if (!l) {
37123
- const y = t.tracks[0].name.substring(0, d) + ".quaternion";
37123
+ const b = t.tracks[0].name.substring(0, d) + ".quaternion";
37124
37124
  Tn && console.warn("Create quaternion track", p, g);
37125
- const m = g.quaternion, v = new _S(y, [0, t.duration], [m.x, m.y, m.z, m.w, m.x, m.y, m.z, m.w]);
37125
+ const m = g.quaternion, v = new _S(b, [0, t.duration], [m.x, m.y, m.z, m.w, m.x, m.y, m.z, m.w]);
37126
37126
  t.tracks.push(v), this.createRotationInterpolant(t, e, v);
37127
37127
  }
37128
37128
  } else {
37129
- const y = f + ".position";
37129
+ const b = f + ".position";
37130
37130
  Tn && console.warn("Create position track", p, g);
37131
- const m = g.position, v = new yS(y, [0, t.duration], [m.x, m.y, m.z, m.x, m.y, m.z]);
37131
+ const m = g.position, v = new yS(b, [0, t.duration], [m.x, m.y, m.z, m.x, m.y, m.z]);
37132
37132
  t.tracks.push(v), this.createPositionInterpolant(t, e, v);
37133
37133
  }
37134
37134
  }
@@ -37143,7 +37143,7 @@ class Kg extends Hu {
37143
37143
  this.target && (this._animator = S.getComponent(this.target, kt) ?? null, this._animator && S_(this._animator.gameObject, this, !0));
37144
37144
  for (const e of this.models) {
37145
37145
  const t = e.asset, i = t.position, n = t.rotation;
37146
- i && i.x !== void 0 && (i.isVector3 || (t.position = new _(i.x, i.y, i.z)), n.isQuaternion || (t.rotation = new U(n.x, n.y, n.z, n.w)));
37146
+ i && i.x !== void 0 && (i.isVector3 || (t.position = new y(i.x, i.y, i.z)), n.isQuaternion || (t.rotation = new U(n.x, n.y, n.z, n.w)));
37147
37147
  }
37148
37148
  this.ensureTrackOffsets();
37149
37149
  }
@@ -37151,18 +37151,18 @@ class Kg extends Hu {
37151
37151
  ensureTrackOffsets() {
37152
37152
  if (this.trackOffset) {
37153
37153
  const e = this.trackOffset.position;
37154
- e && (e.isVector3 || (this.trackOffset.position = new _(e.x, e.y, e.z)));
37154
+ e && (e.isVector3 || (this.trackOffset.position = new y(e.x, e.y, e.z)));
37155
37155
  const t = this.trackOffset.rotation;
37156
37156
  t && (t.isQuaternion || (this.trackOffset.rotation = new U(t.x, t.y, t.z, t.w)));
37157
37157
  }
37158
37158
  }
37159
37159
  _useclipOffsets = !0;
37160
- _totalOffsetPosition = new _();
37160
+ _totalOffsetPosition = new y();
37161
37161
  _totalOffsetRotation = new U();
37162
- _totalOffsetPosition2 = new _();
37162
+ _totalOffsetPosition2 = new y();
37163
37163
  _totalOffsetRotation2 = new U();
37164
- _summedPos = new _();
37165
- _tempPos = new _();
37164
+ _summedPos = new y();
37165
+ _tempPos = new y();
37166
37166
  _summedRot = new U();
37167
37167
  _tempRot = new U();
37168
37168
  _clipRotQuat = new U();
@@ -37174,25 +37174,25 @@ class Kg extends Hu {
37174
37174
  const l = this.models[a], c = this.actions[a], h = l.asset;
37175
37175
  c.weight = 0;
37176
37176
  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;
37177
- let y = d, m = !1;
37178
- if (!y && !n && l.end < e && p !== as.None ? (!g || g.start > e) && (y = !0, n = !0) : a == 0 && !y && !o && l.start > e && f !== as.None && (!g || g.start < e) && (y = !0, m = !0, o = !0), y) {
37177
+ let b = d, m = !1;
37178
+ if (!b && !n && l.end < e && p !== as.None ? (!g || g.start > e) && (b = !0, n = !0) : a == 0 && !b && !o && l.start > e && f !== as.None && (!g || g.start < e) && (b = !0, m = !0, o = !0), b) {
37179
37179
  let v = this.weight;
37180
- v *= this.evaluateWeight(e, a, this.models, y), v *= this.director.weight;
37181
- let b = d;
37180
+ v *= this.evaluateWeight(e, a, this.models, b), v *= this.director.weight;
37181
+ let _ = d;
37182
37182
  if (m)
37183
37183
  switch (f) {
37184
37184
  case as.Hold:
37185
37185
  break;
37186
37186
  case as.Loop:
37187
- e += l.start, b = !0;
37187
+ e += l.start, _ = !0;
37188
37188
  break;
37189
37189
  default:
37190
- e += l.start, b = !0;
37190
+ e += l.start, _ = !0;
37191
37191
  break;
37192
37192
  }
37193
37193
  let x = this.getClipTime(e, l), I = 0;
37194
37194
  const O = h.duration;
37195
- if (m && f === as.Hold && (x = 0), b) {
37195
+ if (m && f === as.Hold && (x = 0), _) {
37196
37196
  if (h.loop)
37197
37197
  for (I += Math.floor(x / (O + 1e-6)); x > O; )
37198
37198
  x -= O;
@@ -37246,7 +37246,7 @@ class Kg extends Hu {
37246
37246
  };
37247
37247
  }
37248
37248
  createPositionInterpolant(e, t, i) {
37249
- const n = i.createInterpolant.bind(i), o = new _();
37249
+ const n = i.createInterpolant.bind(i), o = new y();
37250
37250
  this.ensureTrackOffsets();
37251
37251
  const r = this.trackOffset?.rotation, a = this.trackOffset?.position;
37252
37252
  let l;
@@ -37808,7 +37808,7 @@ const is = w("debugtimeline"), Jg = class fm extends R {
37808
37808
  }
37809
37809
  const f = d.clip;
37810
37810
  let p = f;
37811
- if ((typeof p == "string" || typeof p == "number") && (p = a.find((y) => y.name === f)), is && console.log(d, f, "→", p), !p) {
37811
+ if ((typeof p == "string" || typeof p == "number") && (p = a.find((b) => b.name === f)), is && console.log(d, f, "→", p), !p) {
37812
37812
  console.warn("Could not find animationClip for model", h, t.name, this.name, this.playableAsset?.name, a, r);
37813
37813
  continue;
37814
37814
  }
@@ -38665,7 +38665,7 @@ const Kc = class Vw extends R {
38665
38665
  invertForward = !1;
38666
38666
  keepUpDirection = !0;
38667
38667
  copyTargetRotation = !1;
38668
- static flipYQuat = new U().setFromAxisAngle(new _(0, 1, 0), Math.PI);
38668
+ static flipYQuat = new U().setFromAxisAngle(new y(0, 1, 0), Math.PI);
38669
38669
  /** @internal */
38670
38670
  onBeforeRender() {
38671
38671
  let e = this.target;
@@ -38956,9 +38956,9 @@ class Eo extends R {
38956
38956
  controlVisibility = !0;
38957
38957
  useGripSpace = !1;
38958
38958
  resetTransformAfterXRSession = !0;
38959
- _startPosition = new _();
38959
+ _startPosition = new y();
38960
38960
  _startRotation = new U();
38961
- _startScale = new _();
38961
+ _startScale = new y();
38962
38962
  /** @internal */
38963
38963
  onEnterXR(e) {
38964
38964
  this._startPosition.copy(this.gameObject.position), this._startRotation.copy(this.gameObject.quaternion), this._startScale.copy(this.gameObject.scale);
@@ -39070,11 +39070,11 @@ function Qw(s) {
39070
39070
  const c = a.domElement, h = c.width, d = c.height;
39071
39071
  n || (n = h), o || (o = d);
39072
39072
  const f = n, p = o;
39073
- let g = window.devicePixelRatio || 1, y = 1;
39074
- i.devicePixelRatio === "auto" || i.devicePixelRatio === "manual" ? y = 1 : y = i.devicePixelRatio / window.devicePixelRatio, g *= y, n /= g, o /= g, n = Math.floor(n), o = Math.floor(o), a.xr.isPresenting && a.xr.getFrame();
39073
+ let g = window.devicePixelRatio || 1, b = 1;
39074
+ i.devicePixelRatio === "auto" || i.devicePixelRatio === "manual" ? b = 1 : b = i.devicePixelRatio / window.devicePixelRatio, g *= b, n /= g, o /= g, n = Math.floor(n), o = Math.floor(o), a.xr.isPresenting && a.xr.getFrame();
39075
39075
  const m = a.xr.enabled;
39076
39076
  a.xr.enabled = !1, a.xr.isPresenting = !1, c.style.width = `${n}px`, c.style.height = `${o}px`;
39077
- const v = a.getRenderTarget(), b = a.getClearColor(new se()), x = a.getClearAlpha(), I = i.scene.background, O = "aspect" in r ? r.aspect : null;
39077
+ const v = a.getRenderTarget(), _ = a.getClearColor(new se()), x = a.getClearAlpha(), I = i.scene.background, O = "aspect" in r ? r.aspect : null;
39078
39078
  try {
39079
39079
  const k = s.render_events !== !1, E = new Array();
39080
39080
  k && (Cc(i.scene, Qi, E), E.forEach((A) => {
@@ -39161,7 +39161,7 @@ function Qw(s) {
39161
39161
  }
39162
39162
  return X;
39163
39163
  } finally {
39164
- a.setRenderTarget(v), i.scene.background = I, a.setSize(h, d, !1), a.setClearColor(b, x), O != null && r instanceof de && (r.aspect = O, r.updateProjectionMatrix()), a.xr.enabled = m, a.xr.isPresenting = l, l || i.updateSize(!0);
39164
+ a.setRenderTarget(v), i.scene.background = I, a.setSize(h, d, !1), a.setClearColor(_, x), O != null && r instanceof de && (r.aspect = O, r.updateProjectionMatrix()), a.xr.enabled = m, a.xr.isPresenting = l, l || i.updateSize(!0);
39165
39165
  }
39166
39166
  return null;
39167
39167
  }
@@ -39174,10 +39174,10 @@ function LA(s) {
39174
39174
  t.drawImage(s, 0, 0);
39175
39175
  const i = e.width, n = e.height, r = t.getImageData(0, 0, i, n).data;
39176
39176
  let a = n, l = i, c = 0, h = 0;
39177
- for (let y = 0; y < n; y++)
39177
+ for (let b = 0; b < n; b++)
39178
39178
  for (let m = 0; m < i; m++) {
39179
- const v = (y * i + m) * 4;
39180
- r[v + 3] !== 0 && (m < l && (l = m), m > h && (h = m), y < a && (a = y), y > c && (c = y));
39179
+ const v = (b * i + m) * 4;
39180
+ r[v + 3] !== 0 && (m < l && (l = m), m > h && (h = m), b < a && (a = b), b > c && (c = b));
39181
39181
  }
39182
39182
  const d = h - l + 1, f = c - a + 1, p = document.createElement("canvas"), g = p.getContext("2d");
39183
39183
  return g ? (p.width = d, p.height = f, g.drawImage(e, l, a, d, f, 0, 0, d, f), p) : null;
@@ -39196,14 +39196,14 @@ var Dd;
39196
39196
  ((s) => {
39197
39197
  let e = null, t = null, i = null, n = null, o = null;
39198
39198
  function r(c) {
39199
- const { renderer: h, width: d, height: f } = c, p = h.xr.enabled, g = h.getRenderTarget(), y = h.autoClear, m = d, v = f, b = d / f;
39200
- (!i || i.width !== m || i.height !== v) && (i ??= new Dn(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 / b}px`, o.style.zIndex = "1000", o.style.pointerEvents = "none", o.style.opacity = "1.0", o.style.willChange = "contents"), e || (e = l({
39199
+ const { renderer: h, width: d, height: f } = c, p = h.xr.enabled, g = h.getRenderTarget(), b = h.autoClear, m = d, v = f, _ = d / f;
39200
+ (!i || i.width !== m || i.height !== v) && (i ??= new Dn(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 / _}px`, o.style.zIndex = "1000", o.style.pointerEvents = "none", o.style.opacity = "1.0", o.style.willChange = "contents"), e || (e = l({
39201
39201
  defines: {
39202
39202
  DECODE_VIDEO_TEXTURE: !0
39203
39203
  }
39204
39204
  })), t || (t = l()), n || (n = new Te()), h.xr.updateCamera(c.camera), h.xr.enabled = !1, h.autoClear = !1, h.clear(), h.setSize(m, v), h.setRenderTarget(i), Xw(c.renderer, n) || console.error("Could not update texture from XR frame");
39205
39205
  const I = S.findObjectOfType(Zu);
39206
- return I ? I.setTexture(n) : (e.setTexture(n), h.render(e, c.camera)), h.clearDepth(), h.setSize(m, v), h.render(c.scene, c.camera), h.setRenderTarget(null), t.setTexture(i.texture), h.render(t, c.camera), o.getContext("2d", { alpha: !1 }).drawImage(h.domElement, 0, 0, o.width, o.height), h.setRenderTarget(g), h.xr.enabled = p, h.autoClear = y, o;
39206
+ return I ? I.setTexture(n) : (e.setTexture(n), h.render(e, c.camera)), h.clearDepth(), h.setSize(m, v), h.render(c.scene, c.camera), h.setRenderTarget(null), t.setTexture(i.texture), h.render(t, c.camera), o.getContext("2d", { alpha: !1 }).drawImage(h.domElement, 0, 0, o.width, o.height), h.setRenderTarget(g), h.xr.enabled = p, h.autoClear = b, o;
39207
39207
  }
39208
39208
  s.compositeWithCameraImage = r;
39209
39209
  const a = (
@@ -39384,7 +39384,7 @@ class xc {
39384
39384
  const i = e.position.distanceToSquared(this._position) / 0.05 + e.quaternion.angleTo(this._rotation) / 0.05;
39385
39385
  t && (t *= Math.max(1, i)), t === void 0 || t >= 1 ? (e.position.copy(this._position), e.quaternion.copy(this._rotation)) : (t = Math.max(0, Math.min(1, t)), e.position.lerp(this._position, t), e.quaternion.slerp(this._rotation, t));
39386
39386
  }
39387
- static _positionBuffer = new Hi(() => new _(), 20);
39387
+ static _positionBuffer = new Hi(() => new y(), 20);
39388
39388
  static _rotationBuffer = new Hi(() => new U(), 20);
39389
39389
  _position;
39390
39390
  _rotation;
@@ -39485,7 +39485,7 @@ class UA {
39485
39485
  for (; l && l.parent && l.parent !== a; )
39486
39486
  l = l.parent, c.premultiply(l.matrix);
39487
39487
  const h = c.clone().invert();
39488
- t.setMatrix(h.scale(new _(r, r, r)));
39488
+ t.setMatrix(h.scale(new y(r, r, r)));
39489
39489
  }
39490
39490
  }
39491
39491
  }
@@ -39732,8 +39732,8 @@ class Lo extends R {
39732
39732
  }
39733
39733
  }
39734
39734
  bounds = new bi();
39735
- center = new _();
39736
- labelOffset = new _();
39735
+ center = new y();
39736
+ labelOffset = new y();
39737
39737
  removeData(e, t) {
39738
39738
  const i = t.get(e);
39739
39739
  if (!i) return;
@@ -39781,15 +39781,15 @@ class Lo extends R {
39781
39781
  if (f.mesh instanceof G)
39782
39782
  f.mesh.geometry.dispose(), f.mesh.geometry = g, this.makeOccluder(f.mesh, f.mesh.material);
39783
39783
  else if (f.mesh instanceof so)
39784
- for (const y of f.mesh.children)
39785
- y instanceof G && (y.geometry.dispose(), y.geometry = g, this.makeOccluder(y, y.material));
39784
+ for (const b of f.mesh.children)
39785
+ b instanceof G && (b.geometry.dispose(), b.geometry = g, this.makeOccluder(b, b.material));
39786
39786
  if (f.collider) {
39787
- const y = f.mesh;
39788
- f.collider.sharedMesh = y, f.collider.convex = this.checkIfContextShouldBeConvex(y, f.xrData), f.collider.onDisable(), f.collider.onEnable();
39787
+ const b = f.mesh;
39788
+ f.collider.sharedMesh = b, f.collider.convex = this.checkIfContextShouldBeConvex(b, f.xrData), f.collider.onDisable(), f.collider.onEnable();
39789
39789
  }
39790
- $o && (console.log("Plane updated, id=" + f.id, f), f.mesh.traverse((y) => {
39791
- if (!(y instanceof G)) return;
39792
- const m = y.userData.normalsHelper;
39790
+ $o && (console.log("Plane updated, id=" + f.id, f), f.mesh.traverse((b) => {
39791
+ if (!(b instanceof G)) return;
39792
+ const m = b.userData.normalsHelper;
39793
39793
  m && m.update();
39794
39794
  }));
39795
39795
  }
@@ -39813,12 +39813,12 @@ class Lo extends R {
39813
39813
  if (f.name = "xr-tracked-plane", d = f, n0(f, !1), f instanceof G)
39814
39814
  Re(f.geometry), f.geometry = this.createGeometry(l), this.makeOccluder(f, f.material, this.occluder && !this.dataTemplate);
39815
39815
  else if (f instanceof so)
39816
- for (const y of f.children)
39817
- y instanceof G && (Re(y.geometry), y.geometry = this.createGeometry(l), this.makeOccluder(y, y.material, this.occluder && !this.dataTemplate));
39816
+ for (const b of f.children)
39817
+ b instanceof G && (Re(b.geometry), b.geometry = this.createGeometry(l), this.makeOccluder(b, b.material, this.occluder && !this.dataTemplate));
39818
39818
  const p = f.getComponent(xr);
39819
39819
  if (p) {
39820
- const y = f;
39821
- p.sharedMesh = y, p.convex = this.checkIfContextShouldBeConvex(y, l), p.onDisable(), p.onEnable();
39820
+ const b = f;
39821
+ p.sharedMesh = b, p.convex = this.checkIfContextShouldBeConvex(b, l), p.onDisable(), p.onEnable();
39822
39822
  }
39823
39823
  f.matrixAutoUpdate = !1, f.matrixWorldNeedsUpdate = !0, t.add(f);
39824
39824
  const g = {
@@ -39830,15 +39830,15 @@ class Lo extends R {
39830
39830
  };
39831
39831
  o.set(l, g), $o && console.log("New plane detected, id=" + g.id, g, { hasCollider: !!p, isGroup: f instanceof so });
39832
39832
  try {
39833
- const y = new CustomEvent("plane-tracking", {
39833
+ const b = new CustomEvent("plane-tracking", {
39834
39834
  detail: {
39835
39835
  type: "plane-added",
39836
39836
  context: g
39837
39837
  }
39838
39838
  });
39839
- this.dispatchEvent(y);
39840
- } catch (y) {
39841
- console.error(y);
39839
+ this.dispatchEvent(b);
39840
+ } catch (b) {
39841
+ console.error(b);
39842
39842
  }
39843
39843
  }
39844
39844
  }
@@ -39862,7 +39862,7 @@ class Lo extends R {
39862
39862
  if (e) {
39863
39863
  const i = new bi();
39864
39864
  i.expandByObject(e);
39865
- const n = new _();
39865
+ const n = new y();
39866
39866
  i.getSize(n);
39867
39867
  let o = !0;
39868
39868
  return n.x > 2 && n.y > 2 && n.z > 1.5 && (o = !1), o && "semanticLabel" in t && t.semanticLabel === "wall" && (o = !0), o;
@@ -39891,7 +39891,7 @@ class Lo extends R {
39891
39891
  e.forEach((f) => {
39892
39892
  i.push(f.x, f.y, f.z), n.push(f.x, f.z);
39893
39893
  });
39894
- const o = new _(i[0], i[1], i[2]), r = new _(i[3], i[4], i[5]), a = new _(i[6], i[7], i[8]), l = new _(), c = new _();
39894
+ const o = new y(i[0], i[1], i[2]), r = new y(i[3], i[4], i[5]), a = new y(i[6], i[7], i[8]), l = new y(), c = new y();
39895
39895
  l.subVectors(r, o), c.subVectors(a, o), l.cross(c), l.normalize();
39896
39896
  const h = [];
39897
39897
  for (let f = 0; f < i.length / 3; f++)
@@ -40577,20 +40577,7 @@ class Bd {
40577
40577
  }, e);
40578
40578
  }
40579
40579
  onDoneLoading() {
40580
- if (this._loadingElement) {
40581
- Xo && console.log("Hiding loading element");
40582
- const e = this._loadingElement;
40583
- e.animate([
40584
- { opacity: 1 },
40585
- { opacity: 0 }
40586
- ], {
40587
- duration: 200,
40588
- easing: "ease-in-out"
40589
- }).addEventListener("finish", () => {
40590
- e.style.display = "none", e.remove();
40591
- });
40592
- }
40593
- this._progressLoop && clearInterval(this._progressLoop), this._progressLoop = null;
40580
+ this._loadingElement && (Xo && console.log("Hiding loading element"), this._loadingElement.style.display = "none", this._loadingElement.remove()), this._progressLoop && clearInterval(this._progressLoop), this._progressLoop = null;
40594
40581
  }
40595
40582
  updateDisplay() {
40596
40583
  const e = this._progress, t = (e * 100).toFixed(0) + "%";
@@ -40602,53 +40589,26 @@ class Bd {
40602
40589
  (!t || t === "auto") && (window.matchMedia("(prefers-color-scheme: dark)").matches ? t = "dark" : t = "light");
40603
40590
  const i = bs();
40604
40591
  if (!e) {
40605
- 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", this._loadingElement.style.overflow = "hidden";
40606
- const y = this._element.getAttribute("loading-background");
40607
- y ? this._loadingElement.style.background = y : this._loadingElement.style.backgroundColor = "transparent", this._loadingElement.style.display = "flex", this._loadingElement.style.alignItems = "center", this._loadingElement.style.justifyContent = "center", this._loadingElement.style.zIndex = "0", this._loadingElement.style.flexDirection = "column", this._loadingElement.style.pointerEvents = "none", this._loadingElement.style.color = "white", this._loadingElement.style.fontFamily = 'system-ui, Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', this._loadingElement.style.fontSize = "1rem", t === "light" ? this._loadingElement.style.color = "rgba(0,0,0,.6)" : this._loadingElement.style.color = "rgba(255,255,255,.3)";
40592
+ 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";
40593
+ const f = this._element.getAttribute("loading-background");
40594
+ f ? this._loadingElement.style.background = f : this._loadingElement.style.backgroundColor = "transparent", this._loadingElement.style.display = "flex", this._loadingElement.style.alignItems = "center", this._loadingElement.style.justifyContent = "center", this._loadingElement.style.zIndex = "0", this._loadingElement.style.flexDirection = "column", this._loadingElement.style.pointerEvents = "none", this._loadingElement.style.color = "white", this._loadingElement.style.fontFamily = 'system-ui, Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', this._loadingElement.style.fontSize = "1rem", t === "light" ? this._loadingElement.style.color = "rgba(0,0,0,.6)" : this._loadingElement.style.color = "rgba(255,255,255,.3)";
40608
40595
  }
40609
40596
  const n = this._loadingElementOptions?.className ?? Bd.LoadingContainerClassName;
40610
40597
  if (this._loadingElement.classList.add(n), this._loadingElementOptions?.additionalClasses)
40611
- for (const y of this._loadingElementOptions.additionalClasses)
40612
- this._loadingElement.classList.add(y);
40598
+ for (const f of this._loadingElementOptions.additionalClasses)
40599
+ this._loadingElement.classList.add(f);
40613
40600
  const o = document.createElement("div");
40614
- o.style.cssText = `
40615
- position: relative;
40616
- display: flex;
40617
- flex-direction: column;
40618
- align-items: center;
40619
- justify-content: center;
40620
- width: 100%;
40621
- height: 100%;
40622
- pointer-events: none;
40623
- `, this._loadingElement.appendChild(o);
40624
- const r = this._element.getAttribute("poster");
40625
- if (r !== null && r !== "0") {
40626
- const y = document.createElement("div"), m = r?.length ? "0px" : "50px";
40627
- y.style.cssText = `
40628
- position: absolute;
40629
- left: 0;
40630
- top: 0;
40631
- bottom: 0;
40632
- right: 0;
40633
- z-index: -1;
40634
- overflow: hidden;
40635
-
40636
- margin: -${m};
40637
- background: url('${r?.length ? r : "/include/poster.webp"}') center center no-repeat;
40638
- background-size: cover;
40639
- filter: blur(${m});
40640
- `, this._loadingElement.appendChild(y);
40641
- }
40642
- const a = document.createElement("img"), l = "80%", c = "15%", h = ".2s";
40643
- if (a.style.userSelect = "none", a.style.objectFit = "contain", a.style.transform = "translateY(30px)", a.style.opacity = "0.0000001", a.style.transition = `transform 1s ease-out ${h}, opacity .3s ease-in-out ${h}`, a.src = Vb, i && this._element) {
40644
- const y = this._element.getAttribute("loading-logo-src");
40645
- y && (a.src = y, setTimeout(() => {
40646
- a.style.opacity = "1", a.style.transform = "translateY(0px)";
40647
- }, 1));
40648
- }
40649
- a.style.width = `${l}`, a.style.height = `min(1000px, max(${c}, 50px))`, o.appendChild(a);
40650
- const d = document.createElement("div");
40651
- d.style.cssText = `
40601
+ this._loadingElement.appendChild(o);
40602
+ const r = document.createElement("img"), a = 120;
40603
+ if (r.style.width = `${a}px`, r.style.height = `${a}px`, r.style.paddingTop = "20px", r.style.paddingBottom = "10px", r.style.margin = "0px", r.style.userSelect = "none", r.style.objectFit = "contain", r.style.transition = "transform 1.5s ease-out, opacity .3s ease-in-out", r.style.transform = "translateY(30px)", r.style.opacity = "0.05", setTimeout(() => {
40604
+ r.style.opacity = "1", r.style.transform = "translateY(0px)";
40605
+ }, 1), r.src = Vb, i && this._element) {
40606
+ const f = this._element.getAttribute("loading-logo-src");
40607
+ f && (r.src = f);
40608
+ }
40609
+ o.appendChild(r);
40610
+ const l = document.createElement("div");
40611
+ l.style.cssText = `
40652
40612
  display: flex;
40653
40613
  flex-direction: column;
40654
40614
  align-items: center;
@@ -40657,18 +40617,18 @@ class Bd {
40657
40617
  opacity: 0;
40658
40618
  transition: opacity 1s ease-in-out 4s;
40659
40619
  `, setTimeout(() => {
40660
- d.style.opacity = "1";
40661
- }, 1), this._loadingElement.appendChild(d);
40662
- const f = document.createElement("div"), p = 100;
40663
- f.style.display = "flex", f.style.width = p + "%", f.style.height = "5px", f.style.position = "absolute", f.style.left = "0", f.style.top = "0px", f.style.opacity = "0", f.style.transition = "opacity 1s ease-in-out", f.style.backgroundColor = "rgba(240,240,240,.5)", setTimeout(() => {
40664
- f.style.opacity = "1";
40665
- }, 1), this._loadingElement.appendChild(f), this._loadingBar = document.createElement("div"), f.appendChild(this._loadingBar);
40666
- const g = function(y) {
40667
- return j.lerp(0, p, y) + "%";
40620
+ l.style.opacity = "1";
40621
+ }, 1), this._loadingElement.appendChild(l);
40622
+ const c = document.createElement("div"), h = 100;
40623
+ c.style.display = "flex", c.style.width = h + "%", c.style.height = "3px", c.style.position = "absolute", c.style.left = "0", c.style.bottom = "0px", c.style.opacity = "0", c.style.transition = "opacity 1s ease-in-out 2s", setTimeout(() => {
40624
+ c.style.opacity = "1";
40625
+ }, 1), t === "light" ? c.style.backgroundColor = "rgba(0,0,0,.2)" : c.style.backgroundColor = "rgba(255,255,255,.2)", this._loadingElement.appendChild(c), this._loadingBar = document.createElement("div"), c.appendChild(this._loadingBar);
40626
+ const d = function(f) {
40627
+ return j.lerp(0, h, f) + "%";
40668
40628
  };
40669
- if (this._loadingBar.style.backgroundAttachment = "fixed", this._loadingBar.style.background = "#c4c4c4ab", this._loadingBar.style.width = "0%", this._loadingBar.style.height = "100%", i && this._element) {
40670
- const y = this._element.getAttribute("primary-color"), m = this._element.getAttribute("secondary-color");
40671
- y && m ? this._loadingBar.style.background = `linear-gradient(90deg, ${y} ${g(0)}, ${m} ${g(1)})` : y ? this._loadingBar.style.background = y : m && (this._loadingBar.style.background = m);
40629
+ if (this._loadingBar.style.background = "#66A22F", this._loadingBar.style.backgroundAttachment = "fixed", this._loadingBar.style.width = "0%", this._loadingBar.style.height = "100%", i && this._element) {
40630
+ const f = this._element.getAttribute("primary-color"), p = this._element.getAttribute("secondary-color");
40631
+ f && p ? this._loadingBar.style.background = `linear-gradient(90deg, ${f} ${d(0)}, ${p} ${d(1)})` : f ? this._loadingBar.style.background = f : p && (this._loadingBar.style.background = p);
40672
40632
  }
40673
40633
  return this.handleRuntimeLicense(this._loadingElement), this._loadingElement;
40674
40634
  }
@@ -40962,12 +40922,12 @@ Needle Engine: Begin loading ` + t + `
40962
40922
  abortSignal: h.signal,
40963
40923
  onLoadingProgress: (g) => {
40964
40924
  if (Pe && console.debug("Loading progress: ", g), h.signal.aborted) return;
40965
- const y = g.index;
40966
- !c[y] && g.name && (c[y] = oI(g.name)), g.name = c[y], o && this._loadingView?.onLoadingUpdate(g), a.name = g.name, a.progress = g.progress, this._loadingProgress01 = ix(g), a.totalProgress01 = this._loadingProgress01, this.dispatchEvent(l);
40925
+ const b = g.index;
40926
+ !c[b] && g.name && (c[b] = oI(g.name)), g.name = c[b], o && this._loadingView?.onLoadingUpdate(g), a.name = g.name, a.progress = g.progress, this._loadingProgress01 = ix(g), a.totalProgress01 = this._loadingProgress01, this.dispatchEvent(l);
40967
40927
  },
40968
- onLoadingFinished: (g, y, m) => {
40969
- Pe && console.debug(`Finished loading "${y}" (aborted? ${h.signal.aborted})`), !h.signal.aborted && m && r.push({
40970
- src: y,
40928
+ onLoadingFinished: (g, b, m) => {
40929
+ Pe && console.debug(`Finished loading "${b}" (aborted? ${h.signal.aborted})`), !h.signal.aborted && m && r.push({
40930
+ src: b,
40971
40931
  file: m
40972
40932
  });
40973
40933
  }
@@ -41349,7 +41309,7 @@ class ac {
41349
41309
  this._isInitialized || Xe && (this._lastWarnTime = this._lastWarnTime ?? 0, Date.now() - this._lastWarnTime > 1e3 && (this._lastWarnTime = Date.now(), console.warn("Physics engine is not initialized")));
41350
41310
  }
41351
41311
  rapierRay;
41352
- raycastVectorsBuffer = new Hi(() => new _(), 10);
41312
+ raycastVectorsBuffer = new Hi(() => new y(), 10);
41353
41313
  raycast(e, t, i) {
41354
41314
  if (!this._isInitialized)
41355
41315
  return console.log("Physics engine is not initialized"), null;
@@ -41459,9 +41419,9 @@ class ac {
41459
41419
  get world() {
41460
41420
  return this._world;
41461
41421
  }
41462
- _tempPosition = new _();
41422
+ _tempPosition = new y();
41463
41423
  _tempQuaternion = new U();
41464
- _tempScale = new _();
41424
+ _tempScale = new y();
41465
41425
  _tempMatrix = new ee();
41466
41426
  static _didLoadPhysicsEngine = !1;
41467
41427
  _isUpdatingPhysicsWorld = !1;
@@ -41533,8 +41493,8 @@ class ac {
41533
41493
  const d = a.count;
41534
41494
  r = new Float32Array(d * 3);
41535
41495
  for (let f = 0; f < d; f++) {
41536
- const p = a.getX(f), g = a.getY(f), y = a.getZ(f);
41537
- r[f * 3] = p, r[f * 3 + 1] = g, r[f * 3 + 2] = y;
41496
+ const p = a.getX(f), g = a.getY(f), b = a.getZ(f);
41497
+ r[f * 3] = p, r[f * 3 + 1] = g, r[f * 3 + 2] = b;
41538
41498
  }
41539
41499
  } else
41540
41500
  r = a.array;
@@ -41703,7 +41663,7 @@ Error:`, r), null;
41703
41663
  switch (i.type) {
41704
41664
  // Sphere Collider
41705
41665
  case T.RAPIER_PHYSICS.MODULE.ShapeType.Ball: {
41706
- const f = i, p = e, g = e.gameObject, y = Qe(g, this._tempPosition), m = Math.abs(p.radius * y.x);
41666
+ const f = i, p = e, g = e.gameObject, b = Qe(g, this._tempPosition), m = Math.abs(p.radius * b.x);
41707
41667
  n = f.radius !== m, f.radius = m, n && t.setShape(f);
41708
41668
  break;
41709
41669
  }
@@ -41820,8 +41780,8 @@ Error:`, r), null;
41820
41780
  }
41821
41781
  }
41822
41782
  }
41823
- _tempCenterPos = new _();
41824
- _tempCenterVec = new _();
41783
+ _tempCenterPos = new y();
41784
+ _tempCenterVec = new y();
41825
41785
  _tempCenterQuaternion = new U();
41826
41786
  tryApplyCenter(e, t) {
41827
41787
  const i = e.center;
@@ -41909,9 +41869,9 @@ class hI {
41909
41869
  const d = [], f = a.normal();
41910
41870
  i instanceof xr && i.convex && (f.x = -f.x, f.y = -f.y, f.z = -f.z);
41911
41871
  for (let p = 0; p < a.numSolverContacts(); p++) {
41912
- const g = a.solverContactPoint(p), y = a.contactImpulse(p);
41872
+ const g = a.solverContactPoint(p), b = a.contactImpulse(p);
41913
41873
  if (g) {
41914
- const m = a.contactDist(p), v = a.solverContactFriction(p), b = a.solverContactTangentVelocity(p), x = new Uk(g, m, f, y, v, b);
41874
+ const m = a.contactDist(p), v = a.solverContactFriction(p), _ = a.solverContactTangentVelocity(p), x = new Uk(g, m, f, b, v, _);
41915
41875
  d.push(x), dp && z.DrawDirection(g, f, 16711680, 3, !0);
41916
41876
  }
41917
41877
  }
@@ -42013,7 +41973,7 @@ class WL {
42013
41973
  if (m instanceof M) {
42014
41974
  m.position.y = r, o.add(m);
42015
41975
  const v = ii([m]);
42016
- r += v.getSize(new _()).y, r += 0.1;
41976
+ r += v.getSize(new y()).y, r += 0.1;
42017
41977
  }
42018
41978
  const a = new de(20);
42019
41979
  o.add(a);
@@ -42021,23 +41981,23 @@ class WL {
42021
41981
  {
42022
41982
  let m = null;
42023
41983
  if (l.endsWith(".hdr")) {
42024
- const v = (await import("./three-examples-BvMpKSun.js").then((b) => b.RGBELoader$1)).RGBELoader;
41984
+ const v = (await import("./three-examples-BvMpKSun.js").then((_) => _.RGBELoader$1)).RGBELoader;
42025
41985
  m = new v();
42026
41986
  } else if (l.endsWith(".exr")) {
42027
- const v = (await import("./three-examples-BvMpKSun.js").then((b) => b.EXRLoader$1)).EXRLoader;
41987
+ const v = (await import("./three-examples-BvMpKSun.js").then((_) => _.EXRLoader$1)).EXRLoader;
42028
41988
  m = new v();
42029
41989
  }
42030
41990
  if (m) {
42031
- const v = await m.loadAsync(l).catch((b) => (console.error(b), null));
41991
+ const v = await m.loadAsync(l).catch((_) => (console.error(_), null));
42032
41992
  v && (v.mapping = _s, v.needsUpdate = !0, o.background = v, o.environment = v, o.backgroundBlurriness = 0.75);
42033
41993
  } else console.warn("Unsupported environment map format", l);
42034
41994
  }
42035
- const c = ii(o.children), h = c.getCenter(new _()), d = c.getSize(new _()), p = Math.max(d.x, d.y, d.z) / (2 * Math.tan(Math.PI * a.fov / 360));
41995
+ const c = ii(o.children), h = c.getCenter(new y()), d = c.getSize(new y()), p = Math.max(d.x, d.y, d.z) / (2 * Math.tan(Math.PI * a.fov / 360));
42036
41996
  a.position.set(h.x, h.y, p), a.lookAt(h);
42037
41997
  const g = new Bb(a, e.domElement || document.body);
42038
41998
  g.target = h, g.update();
42039
- const y = (e.domElement || document.body).getBoundingClientRect();
42040
- return a.aspect = y.width / y.height, a.updateProjectionMatrix(), {
41999
+ const b = (e.domElement || document.body).getBoundingClientRect();
42000
+ return a.aspect = b.width / b.height, a.updateProjectionMatrix(), {
42041
42001
  scene: o,
42042
42002
  camera: a
42043
42003
  };
@@ -42302,7 +42262,7 @@ class mI {
42302
42262
  const o = this.findAvatarPart(i, ["left", "hand"]), r = this.findAvatarPart(i, ["right", "hand"]);
42303
42263
  if (!n) {
42304
42264
  n = t;
42305
- const l = new _();
42265
+ const l = new y();
42306
42266
  new bi().setFromObject(n).getSize(l);
42307
42267
  const c = Math.max(l.x, l.y, l.z);
42308
42268
  console.warn("[Custom Avatar] Normalizing head scale, it's too big: " + c + " meters! Should be < 0.3m"), c > 0.3 && n.scale.multiplyScalar(1 / c * 0.3);
@@ -42645,7 +42605,7 @@ var xb;
42645
42605
  function e(t, i = !1, n = 0.75) {
42646
42606
  const o = new tl(), r = 1 - j.clamp(n, 0, 1);
42647
42607
  return t.forEach((a, l) => {
42648
- const c = new _();
42608
+ const c = new y();
42649
42609
  l < t.length - 1 ? c.subVectors(t[l + 1], a).normalize().multiplyScalar(r) : i && t.length > 1 && c.subVectors(t[0], a).normalize().multiplyScalar(r);
42650
42610
  const h = new ks();
42651
42611
  h.position.copy(a), h.tangentIn.copy(c), h.tangentOut.copy(c), o.addKnot(h);
@@ -42675,8 +42635,8 @@ class _I extends tC {
42675
42635
  if (t.index)
42676
42636
  t.index.array = d.index;
42677
42637
  else {
42678
- const y = new ft(d.index, 1, !1);
42679
- t.setIndex(y);
42638
+ const b = new ft(d.index, 1, !1);
42639
+ t.setIndex(b);
42680
42640
  }
42681
42641
  g.setBoundingBox && (t.boundingBox = p.getBoundingBox(new bi())), i.onProgress && i.onProgress(h.progress), n(p), e.onmessage = null;
42682
42642
  } else i.onProgress && i.onProgress(h.progress);