@needle-tools/engine 3.44.3 → 3.44.4

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.
Files changed (26) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/needle-engine.js +235 -222
  3. package/dist/needle-engine.light.js +211 -198
  4. package/dist/needle-engine.light.min.js +45 -45
  5. package/dist/needle-engine.light.umd.cjs +50 -50
  6. package/dist/needle-engine.min.js +45 -45
  7. package/dist/needle-engine.umd.cjs +50 -50
  8. package/lib/engine/engine_addressables.d.ts +8 -1
  9. package/lib/engine/engine_addressables.js +12 -2
  10. package/lib/engine/engine_addressables.js.map +1 -1
  11. package/lib/engine-components/SceneSwitcher.js +15 -1
  12. package/lib/engine-components/SceneSwitcher.js.map +1 -1
  13. package/lib/engine-components/webxr/controllers/XRControllerFollow.js +3 -0
  14. package/lib/engine-components/webxr/controllers/XRControllerFollow.js.map +1 -1
  15. package/lib/engine-components/webxr/controllers/XRControllerModel.d.ts +8 -0
  16. package/lib/engine-components/webxr/controllers/XRControllerModel.js +8 -0
  17. package/lib/engine-components/webxr/controllers/XRControllerModel.js.map +1 -1
  18. package/lib/engine-components/webxr/controllers/XRControllerMovement.d.ts +21 -7
  19. package/lib/engine-components/webxr/controllers/XRControllerMovement.js +22 -8
  20. package/lib/engine-components/webxr/controllers/XRControllerMovement.js.map +1 -1
  21. package/package.json +1 -1
  22. package/src/engine/engine_addressables.ts +13 -2
  23. package/src/engine-components/SceneSwitcher.ts +16 -3
  24. package/src/engine-components/webxr/controllers/XRControllerFollow.ts +3 -0
  25. package/src/engine-components/webxr/controllers/XRControllerModel.ts +8 -0
  26. package/src/engine-components/webxr/controllers/XRControllerMovement.ts +22 -9
@@ -15,7 +15,7 @@ var mM = (g, A, e) => (SM(g, A, "access private method"), e);
15
15
  * Copyright 2010-2023 Three.js Authors
16
16
  * SPDX-License-Identifier: MIT
17
17
  */
18
- const ba = "162", nQ = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }, rQ = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, _2 = 0, PU = 1, T2 = 2, Qj = 3, cj = 0, DK = 1, yK = 2, $n = 3, mg = 0, Ri = 1, Dt = 2, pi = 0, AB = 1, $Q = 2, WU = 3, ZU = 4, wK = 5, YC = 100, H2 = 101, Y2 = 102, jU = 103, RS = 104, O2 = 200, P2 = 201, W2 = 202, Z2 = 203, US = 204, NS = 205, j2 = 206, z2 = 207, V2 = 208, X2 = 209, $2 = 210, AO = 211, eO = 212, tO = 213, iO = 214, SK = 0, Y0 = 1, Qp = 2, Ac = 3, Yl = 4, O0 = 5, P0 = 6, af = 7, Cf = 0, gO = 1, IO = 2, so = 0, hh = 1, Bf = 2, oO = 3, Qf = 4, sO = 5, dh = 6, ec = 7, zU = "attached", nO = "detached", W0 = 300, Ja = 301, BB = 302, So = 303, Ol = 304, uh = 306, ko = 1e3, ag = 1001, tc = 1002, Ye = 1003, Pl = 1004, Ej = 1004, Ea = 1005, lj = 1005, be = 1006, JQ = 1007, hj = 1007, wo = 1008, dj = 1008, Oi = 1009, rO = 1010, aO = 1011, Z0 = 1012, mK = 1013, En = 1014, Ag = 1015, wg = 1016, kK = 1017, MK = 1018, Ga = 1020, CO = 1021, ri = 1023, j0 = 1024, BO = 1025, eB = 1026, QB = 1027, ph = 1028, GK = 1029, RK = 1030, UK = 1031, NK = 1033, Tw = 33776, Hw = 33777, Yw = 33778, Ow = 33779, VU = 35840, XU = 35841, $U = 35842, AN = 35843, FK = 36196, eN = 37492, tN = 37496, iN = 37808, gN = 37809, IN = 37810, oN = 37811, sN = 37812, nN = 37813, rN = 37814, aN = 37815, CN = 37816, BN = 37817, QN = 37818, cN = 37819, EN = 37820, lN = 37821, Pw = 36492, hN = 36494, dN = 36495, QO = 36283, uN = 36284, pN = 36285, fN = 36286, cp = 2200, KK = 2201, cO = 2202, cB = 2300, Dr = 2301, Ww = 2302, DQ = 2400, yQ = 2401, Ep = 2402, z0 = 2500, bK = 2501, EO = 0, JK = 1, FS = 2, lO = 3e3, DN = 3001, BI = 3200, V0 = 3201, uB = 0, hO = 1, yo = "", pe = "srgb", Lt = "srgb-linear", X0 = "display-p3", cf = "display-p3-linear", lp = "linear", Xt = "srgb", hp = "rec709", dp = "p3", dO = 0, vC = 7680, uO = 7681, pO = 7682, fO = 7683, DO = 34055, yO = 34056, wO = 5386, yN = 512, SO = 513, mO = 514, kO = 515, MO = 516, GO = 517, RO = 518, KS = 519, UO = 512, NO = 513, FO = 514, xK = 515, KO = 516, bO = 517, JO = 518, xO = 519, up = 35044, kI = 35048, uj = 35040, pj = 35045, fj = 35049, Dj = 35041, yj = 35046, wj = 35050, Sj = 35042, mj = "100", bS = "300 es", JS = 1035, Cr = 2e3, pp = 2001;
18
+ const ba = "162", nQ = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }, rQ = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, _2 = 0, PU = 1, T2 = 2, Qj = 3, cj = 0, DK = 1, yK = 2, $n = 3, mg = 0, Ri = 1, Dt = 2, pi = 0, AB = 1, $Q = 2, WU = 3, ZU = 4, wK = 5, YC = 100, H2 = 101, Y2 = 102, jU = 103, RS = 104, O2 = 200, P2 = 201, W2 = 202, Z2 = 203, US = 204, NS = 205, j2 = 206, z2 = 207, V2 = 208, X2 = 209, $2 = 210, AO = 211, eO = 212, tO = 213, iO = 214, SK = 0, Y0 = 1, Qp = 2, Ac = 3, Yl = 4, O0 = 5, P0 = 6, af = 7, Cf = 0, gO = 1, IO = 2, so = 0, hh = 1, Bf = 2, oO = 3, Qf = 4, sO = 5, dh = 6, ec = 7, zU = "attached", nO = "detached", W0 = 300, Ja = 301, BB = 302, So = 303, Ol = 304, uh = 306, ko = 1e3, ag = 1001, tc = 1002, Ye = 1003, Pl = 1004, Ej = 1004, Ea = 1005, lj = 1005, be = 1006, JQ = 1007, hj = 1007, wo = 1008, dj = 1008, Oi = 1009, rO = 1010, aO = 1011, Z0 = 1012, mK = 1013, En = 1014, Ag = 1015, wg = 1016, kK = 1017, MK = 1018, Ga = 1020, CO = 1021, ri = 1023, j0 = 1024, BO = 1025, eB = 1026, QB = 1027, ph = 1028, GK = 1029, RK = 1030, UK = 1031, NK = 1033, Tw = 33776, Hw = 33777, Yw = 33778, Ow = 33779, VU = 35840, XU = 35841, $U = 35842, AN = 35843, FK = 36196, eN = 37492, tN = 37496, iN = 37808, gN = 37809, IN = 37810, oN = 37811, sN = 37812, nN = 37813, rN = 37814, aN = 37815, CN = 37816, BN = 37817, QN = 37818, cN = 37819, EN = 37820, lN = 37821, Pw = 36492, hN = 36494, dN = 36495, QO = 36283, uN = 36284, pN = 36285, fN = 36286, cp = 2200, KK = 2201, cO = 2202, cB = 2300, Dr = 2301, Ww = 2302, DQ = 2400, yQ = 2401, Ep = 2402, z0 = 2500, bK = 2501, EO = 0, JK = 1, FS = 2, lO = 3e3, DN = 3001, BI = 3200, V0 = 3201, uB = 0, hO = 1, yo = "", pe = "srgb", _t = "srgb-linear", X0 = "display-p3", cf = "display-p3-linear", lp = "linear", Xt = "srgb", hp = "rec709", dp = "p3", dO = 0, vC = 7680, uO = 7681, pO = 7682, fO = 7683, DO = 34055, yO = 34056, wO = 5386, yN = 512, SO = 513, mO = 514, kO = 515, MO = 516, GO = 517, RO = 518, KS = 519, UO = 512, NO = 513, FO = 514, xK = 515, KO = 516, bO = 517, JO = 518, xO = 519, up = 35044, kI = 35048, uj = 35040, pj = 35045, fj = 35049, Dj = 35041, yj = 35046, wj = 35050, Sj = 35042, mj = "100", bS = "300 es", JS = 1035, Cr = 2e3, pp = 2001;
19
19
  let Wg = class {
20
20
  addEventListener(A, e) {
21
21
  this._listeners === void 0 && (this._listeners = {});
@@ -636,7 +636,7 @@ const vv = /* @__PURE__ */ new Le().set(
636
636
  -0.0786361,
637
637
  1.0982735
638
638
  ), ED = {
639
- [Lt]: {
639
+ [_t]: {
640
640
  transfer: lp,
641
641
  primaries: hp,
642
642
  toReference: (g) => g,
@@ -660,9 +660,9 @@ const vv = /* @__PURE__ */ new Le().set(
660
660
  toReference: (g) => g.convertSRGBToLinear().applyMatrix3(qv),
661
661
  fromReference: (g) => g.applyMatrix3(vv).convertLinearToSRGB()
662
662
  }
663
- }, Tj = /* @__PURE__ */ new Set([Lt, cf]), Mt = {
663
+ }, Tj = /* @__PURE__ */ new Set([_t, cf]), Mt = {
664
664
  enabled: !0,
665
- _workingColorSpace: Lt,
665
+ _workingColorSpace: _t,
666
666
  get workingColorSpace() {
667
667
  return this._workingColorSpace;
668
668
  },
@@ -9385,7 +9385,7 @@ class mN {
9385
9385
  generateMipmaps: !1,
9386
9386
  type: wg,
9387
9387
  format: ri,
9388
- colorSpace: Lt,
9388
+ colorSpace: _t,
9389
9389
  depthBuffer: !1
9390
9390
  }, i = Iq(A, e, t), { _lodMax: I } = this;
9391
9391
  if ({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas } = gq(I), this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== A || this._pingPongRenderTarget.height !== e) {
@@ -10585,7 +10585,7 @@ function s9(g) {
10585
10585
  const A = Mt.getPrimaries(Mt.workingColorSpace), e = Mt.getPrimaries(g);
10586
10586
  let t;
10587
10587
  switch (A === e ? t = "" : A === dp && e === hp ? t = "LinearDisplayP3ToLinearSRGB" : A === hp && e === dp && (t = "LinearSRGBToLinearDisplayP3"), g) {
10588
- case Lt:
10588
+ case _t:
10589
10589
  case cf:
10590
10590
  return [t, "LinearTransferOETF"];
10591
10591
  case pe:
@@ -11229,7 +11229,7 @@ function M9(g, A, e, t, i, I, o) {
11229
11229
  instancingColor: OA && b.instanceColor !== null,
11230
11230
  instancingMorph: OA && b.morphTexture !== null,
11231
11231
  supportsVertexTextures: c,
11232
- outputColorSpace: ZA === null ? g.outputColorSpace : ZA.isXRRenderTarget === !0 ? ZA.texture.colorSpace : Lt,
11232
+ outputColorSpace: ZA === null ? g.outputColorSpace : ZA.isXRRenderTarget === !0 ? ZA.texture.colorSpace : _t,
11233
11233
  alphaToCoverage: !!S.alphaToCoverage,
11234
11234
  map: oe,
11235
11235
  matcap: W,
@@ -12824,7 +12824,7 @@ function T9(g, A, e, t, i, I, o) {
12824
12824
  }
12825
12825
  function re(H, J) {
12826
12826
  const uA = H.colorSpace, wA = H.format, KA = H.type;
12827
- return H.isCompressedTexture === !0 || H.isVideoTexture === !0 || H.format === JS || uA !== Lt && uA !== yo && (Mt.getTransfer(uA) === Xt ? s === !1 ? A.has("EXT_sRGB") === !0 && wA === ri ? (H.format = JS, H.minFilter = be, H.generateMipmaps = !1) : J = qK.sRGBToLinear(J) : (wA !== ri || KA !== Oi) && console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : console.error("THREE.WebGLTextures: Unsupported texture color space:", uA)), J;
12827
+ return H.isCompressedTexture === !0 || H.isVideoTexture === !0 || H.format === JS || uA !== _t && uA !== yo && (Mt.getTransfer(uA) === Xt ? s === !1 ? A.has("EXT_sRGB") === !0 && wA === ri ? (H.format = JS, H.minFilter = be, H.generateMipmaps = !1) : J = qK.sRGBToLinear(J) : (wA !== ri || KA !== Oi) && console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : console.error("THREE.WebGLTextures: Unsupported texture color space:", uA)), J;
12828
12828
  }
12829
12829
  function ve(H) {
12830
12830
  return typeof HTMLImageElement < "u" && H instanceof HTMLImageElement ? (a.width = H.naturalWidth || H.width, a.height = H.naturalHeight || H.height) : typeof VideoFrame < "u" && H instanceof VideoFrame ? (a.width = H.displayWidth, a.height = H.displayHeight) : (a.width = H.width, a.height = H.height), a;
@@ -13868,7 +13868,7 @@ class Oa {
13868
13868
  }
13869
13869
  function F(U, T, Y, z, V) {
13870
13870
  T.isScene !== !0 && (T = he), re.resetTextureUnits();
13871
- const dA = T.fog, cA = z.isMeshStandardMaterial ? T.environment : null, SA = M === null ? u.outputColorSpace : M.isXRRenderTarget === !0 ? M.texture.colorSpace : Lt, bA = (z.isMeshStandardMaterial ? H : ve).get(z.envMap || cA), xA = z.vertexColors === !0 && !!Y.attributes.color && Y.attributes.color.itemSize === 4, WA = !!Y.attributes.tangent && (!!z.normalMap || z.anisotropy > 0), $A = !!Y.morphAttributes.position, te = !!Y.morphAttributes.normal, Be = !!Y.morphAttributes.color;
13871
+ const dA = T.fog, cA = z.isMeshStandardMaterial ? T.environment : null, SA = M === null ? u.outputColorSpace : M.isXRRenderTarget === !0 ? M.texture.colorSpace : _t, bA = (z.isMeshStandardMaterial ? H : ve).get(z.envMap || cA), xA = z.vertexColors === !0 && !!Y.attributes.color && Y.attributes.color.itemSize === 4, WA = !!Y.attributes.tangent && (!!z.normalMap || z.anisotropy > 0), $A = !!Y.morphAttributes.position, te = !!Y.morphAttributes.normal, Be = !!Y.morphAttributes.color;
13872
13872
  let Me = so;
13873
13873
  z.toneMapped && (M === null || M.isXRRenderTarget === !0) && (Me = u.toneMapping);
13874
13874
  const wt = Y.morphAttributes.position || Y.morphAttributes.normal || Y.morphAttributes.color, We = wt !== void 0 ? wt.length : 0, Ne = ee.get(z), xt = l.state.lights;
@@ -13878,11 +13878,11 @@ class Oa {
13878
13878
  }
13879
13879
  let Se = !1;
13880
13880
  z.version === Ne.__version ? (Ne.needsLights && Ne.lightsStateVersion !== xt.state.version || Ne.outputColorSpace !== SA || V.isBatchedMesh && Ne.batching === !1 || !V.isBatchedMesh && Ne.batching === !0 || V.isInstancedMesh && Ne.instancing === !1 || !V.isInstancedMesh && Ne.instancing === !0 || V.isSkinnedMesh && Ne.skinning === !1 || !V.isSkinnedMesh && Ne.skinning === !0 || V.isInstancedMesh && Ne.instancingColor === !0 && V.instanceColor === null || V.isInstancedMesh && Ne.instancingColor === !1 && V.instanceColor !== null || V.isInstancedMesh && Ne.instancingMorph === !0 && V.morphTexture === null || V.isInstancedMesh && Ne.instancingMorph === !1 && V.morphTexture !== null || Ne.envMap !== bA || z.fog === !0 && Ne.fog !== dA || Ne.numClippingPlanes !== void 0 && (Ne.numClippingPlanes !== qA.numPlanes || Ne.numIntersection !== qA.numIntersection) || Ne.vertexAlphas !== xA || Ne.vertexTangents !== WA || Ne.morphTargets !== $A || Ne.morphNormals !== te || Ne.morphColors !== Be || Ne.toneMapping !== Me || _A.isWebGL2 === !0 && Ne.morphTargetsCount !== We) && (Se = !0) : (Se = !0, Ne.__version = z.version);
13881
- let Yt = Ne.currentProgram;
13882
- Se === !0 && (Yt = et(z, T, V));
13881
+ let Ot = Ne.currentProgram;
13882
+ Se === !0 && (Ot = et(z, T, V));
13883
13883
  let OI = !1, ci = !1, pt = !1;
13884
- const je = Yt.getUniforms(), Zg = Ne.uniforms;
13885
- if (RA.useProgram(Yt.program) && (OI = !0, ci = !0, pt = !0), z.id !== G && (G = z.id, ci = !0), OI || N !== U) {
13884
+ const je = Ot.getUniforms(), Zg = Ne.uniforms;
13885
+ if (RA.useProgram(Ot.program) && (OI = !0, ci = !0, pt = !0), z.id !== G && (G = z.id, ci = !0), OI || N !== U) {
13886
13886
  je.setValue(W, "projectionMatrix", U.projectionMatrix), je.setValue(W, "viewMatrix", U.matrixWorldInverse);
13887
13887
  const wi = je.map.cameraPosition;
13888
13888
  wi !== void 0 && wi.setValue(W, OA.setFromMatrixPosition(U.matrixWorld)), _A.logarithmicDepthBuffer && je.setValue(
@@ -13898,16 +13898,16 @@ class Oa {
13898
13898
  }
13899
13899
  V.isBatchedMesh && (je.setOptional(W, V, "batchingTexture"), je.setValue(W, "batchingTexture", V._matricesTexture, re));
13900
13900
  const Jr = Y.morphAttributes;
13901
- if ((Jr.position !== void 0 || Jr.normal !== void 0 || Jr.color !== void 0 && _A.isWebGL2 === !0) && LA.update(V, Y, Yt), (ci || Ne.receiveShadow !== V.receiveShadow) && (Ne.receiveShadow = V.receiveShadow, je.setValue(W, "receiveShadow", V.receiveShadow)), z.isMeshGouraudMaterial && z.envMap !== null && (Zg.envMap.value = bA, Zg.flipEnvMap.value = bA.isCubeTexture && bA.isRenderTargetTexture === !1 ? -1 : 1), ci && (je.setValue(W, "toneMappingExposure", u.toneMappingExposure), Ne.needsLights && L(Zg, pt), dA && z.fog === !0 && NA.refreshFogUniforms(Zg, dA), NA.refreshMaterialUniforms(Zg, z, x, K, MA), zw.upload(W, rd(Ne), Zg, re)), z.isShaderMaterial && z.uniformsNeedUpdate === !0 && (zw.upload(W, rd(Ne), Zg, re), z.uniformsNeedUpdate = !1), z.isSpriteMaterial && je.setValue(W, "center", V.center), je.setValue(W, "modelViewMatrix", V.modelViewMatrix), je.setValue(W, "normalMatrix", V.normalMatrix), je.setValue(W, "modelMatrix", V.matrixWorld), z.isShaderMaterial || z.isRawShaderMaterial) {
13901
+ if ((Jr.position !== void 0 || Jr.normal !== void 0 || Jr.color !== void 0 && _A.isWebGL2 === !0) && LA.update(V, Y, Ot), (ci || Ne.receiveShadow !== V.receiveShadow) && (Ne.receiveShadow = V.receiveShadow, je.setValue(W, "receiveShadow", V.receiveShadow)), z.isMeshGouraudMaterial && z.envMap !== null && (Zg.envMap.value = bA, Zg.flipEnvMap.value = bA.isCubeTexture && bA.isRenderTargetTexture === !1 ? -1 : 1), ci && (je.setValue(W, "toneMappingExposure", u.toneMappingExposure), Ne.needsLights && L(Zg, pt), dA && z.fog === !0 && NA.refreshFogUniforms(Zg, dA), NA.refreshMaterialUniforms(Zg, z, x, K, MA), zw.upload(W, rd(Ne), Zg, re)), z.isShaderMaterial && z.uniformsNeedUpdate === !0 && (zw.upload(W, rd(Ne), Zg, re), z.uniformsNeedUpdate = !1), z.isSpriteMaterial && je.setValue(W, "center", V.center), je.setValue(W, "modelViewMatrix", V.modelViewMatrix), je.setValue(W, "normalMatrix", V.normalMatrix), je.setValue(W, "modelMatrix", V.matrixWorld), z.isShaderMaterial || z.isRawShaderMaterial) {
13902
13902
  const wi = z.uniformsGroups;
13903
13903
  for (let IC = 0, aj = wi.length; IC < aj; IC++)
13904
13904
  if (_A.isWebGL2) {
13905
13905
  const bv = wi[IC];
13906
- se.update(bv, Yt), se.bind(bv, Yt);
13906
+ se.update(bv, Ot), se.bind(bv, Ot);
13907
13907
  } else
13908
13908
  console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.");
13909
13909
  }
13910
- return Yt;
13910
+ return Ot;
13911
13911
  }
13912
13912
  function L(U, T) {
13913
13913
  U.ambientLightColor.needsUpdate = T, U.lightProbe.needsUpdate = T, U.directionalLights.needsUpdate = T, U.directionalLightShadows.needsUpdate = T, U.pointLights.needsUpdate = T, U.pointLightShadows.needsUpdate = T, U.spotLights.needsUpdate = T, U.spotLightShadows.needsUpdate = T, U.rectAreaLights.needsUpdate = T, U.hemisphereLights.needsUpdate = T;
@@ -14020,7 +14020,7 @@ class Oa {
14020
14020
  return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."), this.outputColorSpace === pe ? DN : lO;
14021
14021
  }
14022
14022
  set outputEncoding(A) {
14023
- console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."), this.outputColorSpace = A === DN ? pe : Lt;
14023
+ console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."), this.outputColorSpace = A === DN ? pe : _t;
14024
14024
  }
14025
14025
  get useLegacyLights() {
14026
14026
  return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."), this._useLegacyLights;
@@ -21611,7 +21611,7 @@ const S7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
21611
21611
  LinearMipMapNearestFilter: hj,
21612
21612
  LinearMipmapLinearFilter: wo,
21613
21613
  LinearMipmapNearestFilter: JQ,
21614
- LinearSRGBColorSpace: Lt,
21614
+ LinearSRGBColorSpace: _t,
21615
21615
  LinearToneMapping: hh,
21616
21616
  LinearTransfer: lp,
21617
21617
  Loader: Gg,
@@ -28661,7 +28661,7 @@ const FP = () => OS.update(), KP = {
28661
28661
  };
28662
28662
  typeof global < "u" && (global.ThreeMeshUI = KP);
28663
28663
  const rtA = KP;
28664
- var atA = Eg.ti, bP = Eg.nS, Ob = Eg.eB, CtA = Eg.Yp, LN = Eg.VB, BtA = Eg.BC, QtA = Eg.zN, Xw = Eg.cV, ctA = Eg.hW, EtA = Eg.k2, ltA = Eg.K6, htA = Eg.M7, dtA = Eg.ls, utA = Eg.Hi, Pb = Eg.EY, ptA = Eg.MR, ftA = Eg.zf, Wt = Eg.Ay, JP = Eg.yo;
28664
+ var atA = Eg.ti, bP = Eg.nS, Ob = Eg.eB, CtA = Eg.Yp, LN = Eg.VB, BtA = Eg.BC, QtA = Eg.zN, Xw = Eg.cV, ctA = Eg.hW, EtA = Eg.k2, ltA = Eg.K6, htA = Eg.M7, dtA = Eg.ls, utA = Eg.Hi, Pb = Eg.EY, ptA = Eg.MR, ftA = Eg.zf, Zt = Eg.Ay, JP = Eg.yo;
28665
28665
  const RL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28666
28666
  __proto__: null,
28667
28667
  BaseProperty: atA,
@@ -28681,7 +28681,7 @@ const RL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28681
28681
  Text: Pb,
28682
28682
  TypographicFont: ptA,
28683
28683
  TypographicGlyph: ftA,
28684
- default: Wt,
28684
+ default: Zt,
28685
28685
  update: JP
28686
28686
  }, Symbol.toStringTag, { value: "Module" }));
28687
28687
  class DtA {
@@ -28885,7 +28885,7 @@ function Km(g, A, e = !0, t = !1) {
28885
28885
  fG.copy(g.quaternion);
28886
28886
  const i = He(A), I = He(g);
28887
28887
  if (t) {
28888
- if (yn(g, Ht(A)), e) {
28888
+ if (yn(g, Yt(A)), e) {
28889
28889
  const o = I.y, s = I.sub(LP(g));
28890
28890
  s.y = o, g.lookAt(s);
28891
28891
  }
@@ -28895,7 +28895,7 @@ function Km(g, A, e = !0, t = !1) {
28895
28895
  e && (i.y = I.y), g.lookAt(i), Number.isNaN(g.quaternion.x) && g.quaternion.copy(fG);
28896
28896
  }
28897
28897
  const ktA = new Dn(() => new y(), 100);
28898
- function Zt(g, A, e) {
28898
+ function Lt(g, A, e) {
28899
28899
  const t = ktA.get();
28900
28900
  return g instanceof y ? t.copy(g) : g instanceof DOMPointReadOnly ? t.set(g.x, g.y, g.z) : (typeof g == "number" && (t.x = g), typeof A == "number" && (t.y = A), typeof e == "number" && (t.z = e)), t;
28901
28901
  }
@@ -28920,7 +28920,7 @@ function $l(g, A, e, t) {
28920
28920
  return i.set(A, e, t), aI(g, i), g;
28921
28921
  }
28922
28922
  const WS = new Dn(() => new GA(), 100), qQ = new GA(), DG = new GA();
28923
- function Ht(g, A = null) {
28923
+ function Yt(g, A = null) {
28924
28924
  if (!g)
28925
28925
  return WS.get().identity();
28926
28926
  const e = A ?? WS.get();
@@ -28954,11 +28954,11 @@ function Kp(g, A) {
28954
28954
  }
28955
28955
  const UtA = new y(), bL = new GA();
28956
28956
  function aSA(g) {
28957
- return Ht(g, bL), UtA.set(0, 0, 1).applyQuaternion(bL);
28957
+ return Yt(g, bL), UtA.set(0, 0, 1).applyQuaternion(bL);
28958
28958
  }
28959
28959
  const NtA = new Dn(() => new y(), 100), JL = new GA();
28960
28960
  function LP(g, A) {
28961
- return A || (A = NtA.get().set(0, 0, 1)), Ht(g, JL), A.applyQuaternion(JL);
28961
+ return A || (A = NtA.get().set(0, 0, 1)), Yt(g, JL), A.applyQuaternion(JL);
28962
28962
  }
28963
28963
  const xL = new ut(), vL = new ut(), FtA = new y();
28964
28964
  function _P(g) {
@@ -29209,7 +29209,7 @@ class LtA {
29209
29209
  const a = Date.now();
29210
29210
  for (let C = 0; C < this._activeTexts.length; C++) {
29211
29211
  const Q = this._activeTexts[C];
29212
- if (Q instanceof Wt.Text && a - Q._activatedTime > 2e4) {
29212
+ if (Q instanceof Zt.Text && a - Q._activatedTime > 2e4) {
29213
29213
  Q.removeFromParent(), this._textBuffer.push(Q), this._activeTexts.splice(C, 1);
29214
29214
  break;
29215
29215
  }
@@ -29258,15 +29258,15 @@ class LtA {
29258
29258
  i.textContent = "[" + s + "] " + e, i.visible = !0, i._activatedTime = Date.now(), t.add(i), this._activeTexts.push(i), this.context && this.context.scene.add(t), i.set({
29259
29259
  backgroundColor: I,
29260
29260
  color: o
29261
- }), Wt.update();
29261
+ }), Zt.update();
29262
29262
  }
29263
29263
  ensureFont() {
29264
- let A = Wt.FontLibrary.getFontFamily(this.familyName);
29264
+ let A = Zt.FontLibrary.getFontFamily(this.familyName);
29265
29265
  if (!A) {
29266
- A = Wt.FontLibrary.addFontFamily(this.familyName);
29266
+ A = Zt.FontLibrary.addFontFamily(this.familyName);
29267
29267
  const e = A.addVariant("normal", "normal", "./include/needle/arial-msdf.json", "./include/needle/arial.png");
29268
29268
  e == null || e.addEventListener("ready", () => {
29269
- Wt.update();
29269
+ Zt.update();
29270
29270
  });
29271
29271
  }
29272
29272
  }
@@ -29278,7 +29278,7 @@ class LtA {
29278
29278
  }
29279
29279
  if (A.children.length > 20 && this._activeTexts.length > 0)
29280
29280
  return this._activeTexts.shift();
29281
- const e = new Wt.Text(this.textOptions);
29281
+ const e = new Zt.Text(this.textOptions);
29282
29282
  return setTimeout(() => this.disableDepthTestRecursive(e), 500), setTimeout(() => this.disableDepthTestRecursive(e), 1500), e;
29283
29283
  }
29284
29284
  disableDepthTestRecursive(A, e = 0) {
@@ -29288,7 +29288,7 @@ class LtA {
29288
29288
  }
29289
29289
  A.renderOrder = 10 * e, A.layers.set(2);
29290
29290
  const t = A.material;
29291
- t && (t.depthWrite = !1, t.depthTest = !1, t.transparent = !0), e === 0 && Wt.update();
29291
+ t && (t.depthWrite = !1, t.depthTest = !1, t.transparent = !0), e === 0 && Zt.update();
29292
29292
  }
29293
29293
  getRoot() {
29294
29294
  if (this.root)
@@ -29309,7 +29309,7 @@ class LtA {
29309
29309
  whiteSpace: "pre-wrap",
29310
29310
  flexDirection: "column-reverse"
29311
29311
  };
29312
- return this.root = new Wt.Block(e), this.root;
29312
+ return this.root = new Zt.Block(e), this.root;
29313
29313
  }
29314
29314
  }
29315
29315
  let to = null;
@@ -29624,13 +29624,13 @@ function XtA() {
29624
29624
  return g || null;
29625
29625
  }
29626
29626
  const VP = gA("debugdefines");
29627
- Sh('if(!globalThis[""3.44.3""]) globalThis[""3.44.3""] = "0.0.0";');
29627
+ Sh('if(!globalThis[""3.44.4""]) globalThis[""3.44.4""] = "0.0.0";');
29628
29628
  Sh('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
29629
- Sh('if(!globalThis[""Fri Jul 05 2024 19:08:44 GMT+0200 (Central European Summer Time)""]) globalThis[""Fri Jul 05 2024 19:08:44 GMT+0200 (Central European Summer Time)""] = "unknown";');
29630
- Sh('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.44.3";');
29629
+ Sh('if(!globalThis[""Tue Jul 09 2024 10:40:44 GMT+0200 (Central European Summer Time)""]) globalThis[""Tue Jul 09 2024 10:40:44 GMT+0200 (Central European Summer Time)""] = "unknown";');
29630
+ Sh('globalThis["__NEEDLE_ENGINE_VERSION__"] = "3.44.4";');
29631
29631
  Sh('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
29632
- Sh('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Fri Jul 05 2024 19:08:44 GMT+0200 (Central European Summer Time)";');
29633
- const ln = "3.44.3", Zb = "undefined", XP = "Fri Jul 05 2024 19:08:44 GMT+0200 (Central European Summer Time)";
29632
+ Sh('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Tue Jul 09 2024 10:40:44 GMT+0200 (Central European Summer Time)";');
29633
+ const ln = "3.44.4", Zb = "undefined", XP = "Tue Jul 09 2024 10:40:44 GMT+0200 (Central European Summer Time)";
29634
29634
  VP && console.log(`Engine version: ${ln} (generator: ${Zb})
29635
29635
  Project built at ${XP}`);
29636
29636
  const gB = "needle_isActiveInHierarchy", $E = "builtin_components", AS = "needle_editor_guid";
@@ -42144,7 +42144,7 @@ class ssA {
42144
42144
  const I = e.json, n = ((I.extensions && I.extensions[this.name] || {}).lights || [])[A];
42145
42145
  let r;
42146
42146
  const a = new yA(16777215);
42147
- n.color !== void 0 && a.setRGB(n.color[0], n.color[1], n.color[2], Lt);
42147
+ n.color !== void 0 && a.setRGB(n.color[0], n.color[1], n.color[2], _t);
42148
42148
  const C = n.range !== void 0 ? n.range : 0;
42149
42149
  switch (n.type) {
42150
42150
  case "directional":
@@ -42186,7 +42186,7 @@ let nsA = class {
42186
42186
  if (I) {
42187
42187
  if (Array.isArray(I.baseColorFactor)) {
42188
42188
  const o = I.baseColorFactor;
42189
- A.color.setRGB(o[0], o[1], o[2], Lt), A.opacity = o[3];
42189
+ A.color.setRGB(o[0], o[1], o[2], _t), A.opacity = o[3];
42190
42190
  }
42191
42191
  I.baseColorTexture !== void 0 && i.push(t.assignTexture(A, "map", I.baseColorTexture, pe));
42192
42192
  }
@@ -42254,7 +42254,7 @@ let nsA = class {
42254
42254
  const o = i.extensions[this.name];
42255
42255
  if (o.sheenColorFactor !== void 0) {
42256
42256
  const s = o.sheenColorFactor;
42257
- e.sheenColor.setRGB(s[0], s[1], s[2], Lt);
42257
+ e.sheenColor.setRGB(s[0], s[1], s[2], _t);
42258
42258
  }
42259
42259
  return o.sheenRoughnessFactor !== void 0 && (e.sheenRoughness = o.sheenRoughnessFactor), o.sheenColorTexture !== void 0 && I.push(t.assignTexture(e, "sheenColorMap", o.sheenColorTexture, pe)), o.sheenRoughnessTexture !== void 0 && I.push(t.assignTexture(e, "sheenRoughnessMap", o.sheenRoughnessTexture)), Promise.all(I);
42260
42260
  }
@@ -42288,7 +42288,7 @@ let nsA = class {
42288
42288
  const I = [], o = i.extensions[this.name];
42289
42289
  e.thickness = o.thicknessFactor !== void 0 ? o.thicknessFactor : 0, o.thicknessTexture !== void 0 && I.push(t.assignTexture(e, "thicknessMap", o.thicknessTexture)), e.attenuationDistance = o.attenuationDistance || 1 / 0;
42290
42290
  const s = o.attenuationColor || [1, 1, 1];
42291
- return e.attenuationColor = new yA().setRGB(s[0], s[1], s[2], Lt), Promise.all(I);
42291
+ return e.attenuationColor = new yA().setRGB(s[0], s[1], s[2], _t), Promise.all(I);
42292
42292
  }
42293
42293
  }, EsA = class {
42294
42294
  constructor(A) {
@@ -42320,7 +42320,7 @@ let nsA = class {
42320
42320
  const I = [], o = i.extensions[this.name];
42321
42321
  e.specularIntensity = o.specularFactor !== void 0 ? o.specularFactor : 1, o.specularTexture !== void 0 && I.push(t.assignTexture(e, "specularIntensityMap", o.specularTexture));
42322
42322
  const s = o.specularColorFactor || [1, 1, 1];
42323
- return e.specularColor = new yA().setRGB(s[0], s[1], s[2], Lt), o.specularColorTexture !== void 0 && I.push(t.assignTexture(e, "specularColorMap", o.specularColorTexture, pe)), Promise.all(I);
42323
+ return e.specularColor = new yA().setRGB(s[0], s[1], s[2], _t), o.specularColorTexture !== void 0 && I.push(t.assignTexture(e, "specularColorMap", o.specularColorTexture, pe)), Promise.all(I);
42324
42324
  }
42325
42325
  }, hsA = class {
42326
42326
  constructor(A) {
@@ -42550,7 +42550,7 @@ class SsA {
42550
42550
  l !== void 0 && (h.normalized = l);
42551
42551
  }
42552
42552
  C(c);
42553
- }, s, r, Lt, Q);
42553
+ }, s, r, _t, Q);
42554
42554
  });
42555
42555
  });
42556
42556
  }
@@ -43137,7 +43137,7 @@ class xsA {
43137
43137
  const C = I.pbrMetallicRoughness || {};
43138
43138
  if (s.color = new yA(1, 1, 1), s.opacity = 1, Array.isArray(C.baseColorFactor)) {
43139
43139
  const Q = C.baseColorFactor;
43140
- s.color.setRGB(Q[0], Q[1], Q[2], Lt), s.opacity = Q[3];
43140
+ s.color.setRGB(Q[0], Q[1], Q[2], _t), s.opacity = Q[3];
43141
43141
  }
43142
43142
  C.baseColorTexture !== void 0 && r.push(e.assignTexture(s, "map", C.baseColorTexture, pe)), s.metalness = C.metallicFactor !== void 0 ? C.metallicFactor : 1, s.roughness = C.roughnessFactor !== void 0 ? C.roughnessFactor : 1, C.metallicRoughnessTexture !== void 0 && (r.push(e.assignTexture(s, "metalnessMap", C.metallicRoughnessTexture)), r.push(e.assignTexture(s, "roughnessMap", C.metallicRoughnessTexture))), o = this._invokeOne(function(Q) {
43143
43143
  return Q.getMaterialType && Q.getMaterialType(A);
@@ -43153,7 +43153,7 @@ class xsA {
43153
43153
  }
43154
43154
  if (I.occlusionTexture !== void 0 && o !== tt && (r.push(e.assignTexture(s, "aoMap", I.occlusionTexture)), I.occlusionTexture.strength !== void 0 && (s.aoMapIntensity = I.occlusionTexture.strength)), I.emissiveFactor !== void 0 && o !== tt) {
43155
43155
  const C = I.emissiveFactor;
43156
- s.emissive = new yA().setRGB(C[0], C[1], C[2], Lt);
43156
+ s.emissive = new yA().setRGB(C[0], C[1], C[2], _t);
43157
43157
  }
43158
43158
  return I.emissiveTexture !== void 0 && o !== tt && r.push(e.assignTexture(s, "emissiveMap", I.emissiveTexture, pe)), Promise.all(r).then(function() {
43159
43159
  const C = new o(s);
@@ -43513,7 +43513,7 @@ function dT(g, A, e) {
43513
43513
  });
43514
43514
  i.push(o);
43515
43515
  }
43516
- return Mt.workingColorSpace !== Lt && "COLOR_0" in t && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Mt.workingColorSpace}" not supported.`), _C(g, A), vsA(g, A, e), Promise.all(i).then(function() {
43516
+ return Mt.workingColorSpace !== _t && "COLOR_0" in t && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Mt.workingColorSpace}" not supported.`), _C(g, A), vsA(g, A, e), Promise.all(i).then(function() {
43517
43517
  return A.targets !== void 0 ? NsA(g, A.targets, e) : g;
43518
43518
  });
43519
43519
  }
@@ -45382,7 +45382,7 @@ function GR(g, A, e) {
45382
45382
  return t[i];
45383
45383
  return !1;
45384
45384
  }
45385
- const Oy = new ut(), Ot = new y(0, 1, 0), bT = new y(0, 0, 0), JT = new fA(), Py = new GA(), sS = new GA(), _n = new y(), xT = new fA(), Bu = new y(1, 0, 0), CQ = new y(0, 1, 0), Qu = new y(0, 0, 1), Wy = new y(), qd = new y(), Ld = new y();
45385
+ const Oy = new ut(), Pt = new y(0, 1, 0), bT = new y(0, 0, 0), JT = new fA(), Py = new GA(), sS = new GA(), _n = new y(), xT = new fA(), Bu = new y(1, 0, 0), CQ = new y(0, 1, 0), Qu = new y(0, 0, 1), Wy = new y(), qd = new y(), Ld = new y();
45386
45386
  class QJ extends DA {
45387
45387
  constructor() {
45388
45388
  super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
@@ -45632,10 +45632,10 @@ class QJ extends DA {
45632
45632
  o.visible = !0, o.rotation.set(0, 0, 0), o.position.copy(this.worldPosition);
45633
45633
  let s;
45634
45634
  if (this.camera.isOrthographicCamera ? s = (this.camera.top - this.camera.bottom) / this.camera.zoom : s = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), o.scale.set(1, 1, 1).multiplyScalar(s * this.size / 4), o.tag === "helper") {
45635
- o.visible = !1, o.name === "AXIS" ? (o.visible = !!this.axis, this.axis === "X" && (di.setFromEuler(Oy.set(0, 0, 0)), o.quaternion.copy(t).multiply(di), Math.abs(Ot.copy(Bu).applyQuaternion(t).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Y" && (di.setFromEuler(Oy.set(0, 0, Math.PI / 2)), o.quaternion.copy(t).multiply(di), Math.abs(Ot.copy(CQ).applyQuaternion(t).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Z" && (di.setFromEuler(Oy.set(0, Math.PI / 2, 0)), o.quaternion.copy(t).multiply(di), Math.abs(Ot.copy(Qu).applyQuaternion(t).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "XYZE" && (di.setFromEuler(Oy.set(0, Math.PI / 2, 0)), Ot.copy(this.rotationAxis), o.quaternion.setFromRotationMatrix(JT.lookAt(bT, Ot, CQ)), o.quaternion.multiply(di), o.visible = this.dragging), this.axis === "E" && (o.visible = !1)) : o.name === "START" ? (o.position.copy(this.worldPositionStart), o.visible = this.dragging) : o.name === "END" ? (o.position.copy(this.worldPosition), o.visible = this.dragging) : o.name === "DELTA" ? (o.position.copy(this.worldPositionStart), o.quaternion.copy(this.worldQuaternionStart), SI.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), SI.applyQuaternion(this.worldQuaternionStart.clone().invert()), o.scale.copy(SI), o.visible = this.dragging) : (o.quaternion.copy(t), this.dragging ? o.position.copy(this.worldPositionStart) : o.position.copy(this.worldPosition), this.axis && (o.visible = this.axis.search(o.name) !== -1));
45635
+ o.visible = !1, o.name === "AXIS" ? (o.visible = !!this.axis, this.axis === "X" && (di.setFromEuler(Oy.set(0, 0, 0)), o.quaternion.copy(t).multiply(di), Math.abs(Pt.copy(Bu).applyQuaternion(t).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Y" && (di.setFromEuler(Oy.set(0, 0, Math.PI / 2)), o.quaternion.copy(t).multiply(di), Math.abs(Pt.copy(CQ).applyQuaternion(t).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "Z" && (di.setFromEuler(Oy.set(0, Math.PI / 2, 0)), o.quaternion.copy(t).multiply(di), Math.abs(Pt.copy(Qu).applyQuaternion(t).dot(this.eye)) > 0.9 && (o.visible = !1)), this.axis === "XYZE" && (di.setFromEuler(Oy.set(0, Math.PI / 2, 0)), Pt.copy(this.rotationAxis), o.quaternion.setFromRotationMatrix(JT.lookAt(bT, Pt, CQ)), o.quaternion.multiply(di), o.visible = this.dragging), this.axis === "E" && (o.visible = !1)) : o.name === "START" ? (o.position.copy(this.worldPositionStart), o.visible = this.dragging) : o.name === "END" ? (o.position.copy(this.worldPosition), o.visible = this.dragging) : o.name === "DELTA" ? (o.position.copy(this.worldPositionStart), o.quaternion.copy(this.worldQuaternionStart), SI.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), SI.applyQuaternion(this.worldQuaternionStart.clone().invert()), o.scale.copy(SI), o.visible = this.dragging) : (o.quaternion.copy(t), this.dragging ? o.position.copy(this.worldPositionStart) : o.position.copy(this.worldPosition), this.axis && (o.visible = this.axis.search(o.name) !== -1));
45636
45636
  continue;
45637
45637
  }
45638
- o.quaternion.copy(t), this.mode === "translate" || this.mode === "scale" ? (o.name === "X" && Math.abs(Ot.copy(Bu).applyQuaternion(t).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Y" && Math.abs(Ot.copy(CQ).applyQuaternion(t).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Z" && Math.abs(Ot.copy(Qu).applyQuaternion(t).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XY" && Math.abs(Ot.copy(Qu).applyQuaternion(t).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "YZ" && Math.abs(Ot.copy(Bu).applyQuaternion(t).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XZ" && Math.abs(Ot.copy(CQ).applyQuaternion(t).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1)) : this.mode === "rotate" && (Py.copy(t), Ot.copy(this.eye).applyQuaternion(di.copy(t).invert()), o.name.search("E") !== -1 && o.quaternion.setFromRotationMatrix(JT.lookAt(this.eye, bT, CQ)), o.name === "X" && (di.setFromAxisAngle(Bu, Math.atan2(-Ot.y, Ot.z)), di.multiplyQuaternions(Py, di), o.quaternion.copy(di)), o.name === "Y" && (di.setFromAxisAngle(CQ, Math.atan2(Ot.x, Ot.z)), di.multiplyQuaternions(Py, di), o.quaternion.copy(di)), o.name === "Z" && (di.setFromAxisAngle(Qu, Math.atan2(Ot.y, Ot.x)), di.multiplyQuaternions(Py, di), o.quaternion.copy(di))), o.visible = o.visible && (o.name.indexOf("X") === -1 || this.showX), o.visible = o.visible && (o.name.indexOf("Y") === -1 || this.showY), o.visible = o.visible && (o.name.indexOf("Z") === -1 || this.showZ), o.visible = o.visible && (o.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), o.material._color = o.material._color || o.material.color.clone(), o.material._opacity = o.material._opacity || o.material.opacity, o.material.color.copy(o.material._color), o.material.opacity = o.material._opacity, this.enabled && this.axis && (o.name === this.axis || this.axis.split("").some(function(n) {
45638
+ o.quaternion.copy(t), this.mode === "translate" || this.mode === "scale" ? (o.name === "X" && Math.abs(Pt.copy(Bu).applyQuaternion(t).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Y" && Math.abs(Pt.copy(CQ).applyQuaternion(t).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "Z" && Math.abs(Pt.copy(Qu).applyQuaternion(t).dot(this.eye)) > 0.99 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XY" && Math.abs(Pt.copy(Qu).applyQuaternion(t).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "YZ" && Math.abs(Pt.copy(Bu).applyQuaternion(t).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1), o.name === "XZ" && Math.abs(Pt.copy(CQ).applyQuaternion(t).dot(this.eye)) < 0.2 && (o.scale.set(1e-10, 1e-10, 1e-10), o.visible = !1)) : this.mode === "rotate" && (Py.copy(t), Pt.copy(this.eye).applyQuaternion(di.copy(t).invert()), o.name.search("E") !== -1 && o.quaternion.setFromRotationMatrix(JT.lookAt(this.eye, bT, CQ)), o.name === "X" && (di.setFromAxisAngle(Bu, Math.atan2(-Pt.y, Pt.z)), di.multiplyQuaternions(Py, di), o.quaternion.copy(di)), o.name === "Y" && (di.setFromAxisAngle(CQ, Math.atan2(Pt.x, Pt.z)), di.multiplyQuaternions(Py, di), o.quaternion.copy(di)), o.name === "Z" && (di.setFromAxisAngle(Qu, Math.atan2(Pt.y, Pt.x)), di.multiplyQuaternions(Py, di), o.quaternion.copy(di))), o.visible = o.visible && (o.name.indexOf("X") === -1 || this.showX), o.visible = o.visible && (o.name.indexOf("Y") === -1 || this.showY), o.visible = o.visible && (o.name.indexOf("Z") === -1 || this.showZ), o.visible = o.visible && (o.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), o.material._color = o.material._color || o.material.color.clone(), o.material._opacity = o.material._opacity || o.material.opacity, o.material.color.copy(o.material._color), o.material.opacity = o.material._opacity, this.enabled && this.axis && (o.name === this.axis || this.axis.split("").some(function(n) {
45639
45639
  return o.name === n;
45640
45640
  })) && (o.material.color.setHex(16776960), o.material.opacity = 1);
45641
45641
  }
@@ -45651,18 +45651,18 @@ class lnA extends hA {
45651
45651
  }
45652
45652
  updateMatrixWorld(A) {
45653
45653
  let e = this.space;
45654
- switch (this.position.copy(this.worldPosition), this.mode === "scale" && (e = "local"), Wy.copy(Bu).applyQuaternion(e === "local" ? this.worldQuaternion : sS), qd.copy(CQ).applyQuaternion(e === "local" ? this.worldQuaternion : sS), Ld.copy(Qu).applyQuaternion(e === "local" ? this.worldQuaternion : sS), Ot.copy(qd), this.mode) {
45654
+ switch (this.position.copy(this.worldPosition), this.mode === "scale" && (e = "local"), Wy.copy(Bu).applyQuaternion(e === "local" ? this.worldQuaternion : sS), qd.copy(CQ).applyQuaternion(e === "local" ? this.worldQuaternion : sS), Ld.copy(Qu).applyQuaternion(e === "local" ? this.worldQuaternion : sS), Pt.copy(qd), this.mode) {
45655
45655
  case "translate":
45656
45656
  case "scale":
45657
45657
  switch (this.axis) {
45658
45658
  case "X":
45659
- Ot.copy(this.eye).cross(Wy), _n.copy(Wy).cross(Ot);
45659
+ Pt.copy(this.eye).cross(Wy), _n.copy(Wy).cross(Pt);
45660
45660
  break;
45661
45661
  case "Y":
45662
- Ot.copy(this.eye).cross(qd), _n.copy(qd).cross(Ot);
45662
+ Pt.copy(this.eye).cross(qd), _n.copy(qd).cross(Pt);
45663
45663
  break;
45664
45664
  case "Z":
45665
- Ot.copy(this.eye).cross(Ld), _n.copy(Ld).cross(Ot);
45665
+ Pt.copy(this.eye).cross(Ld), _n.copy(Ld).cross(Pt);
45666
45666
  break;
45667
45667
  case "XY":
45668
45668
  _n.copy(Ld);
@@ -45671,7 +45671,7 @@ class lnA extends hA {
45671
45671
  _n.copy(Wy);
45672
45672
  break;
45673
45673
  case "XZ":
45674
- Ot.copy(Ld), _n.copy(qd);
45674
+ Pt.copy(Ld), _n.copy(qd);
45675
45675
  break;
45676
45676
  case "XYZ":
45677
45677
  case "E":
@@ -45683,7 +45683,7 @@ class lnA extends hA {
45683
45683
  default:
45684
45684
  _n.set(0, 0, 0);
45685
45685
  }
45686
- _n.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (xT.lookAt(SI.set(0, 0, 0), _n, Ot), this.quaternion.setFromRotationMatrix(xT)), super.updateMatrixWorld(A);
45686
+ _n.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (xT.lookAt(SI.set(0, 0, 0), _n, Pt), this.quaternion.setFromRotationMatrix(xT)), super.updateMatrixWorld(A);
45687
45687
  }
45688
45688
  }
45689
45689
  const hnA = gA("debugpatch");
@@ -47108,7 +47108,7 @@ uniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuf
47108
47108
  [St.FRAGMENT_MAIN_IMAGE, null],
47109
47109
  [St.VERTEX_HEAD, null],
47110
47110
  [St.VERTEX_MAIN_SUPPORT, null]
47111
- ]), this.defines = /* @__PURE__ */ new Map(), this.uniforms = /* @__PURE__ */ new Map(), this.blendModes = /* @__PURE__ */ new Map(), this.extensions = /* @__PURE__ */ new Set(), this.attributes = Is.NONE, this.varyings = /* @__PURE__ */ new Set(), this.uvTransformation = !1, this.readDepth = !1, this.colorSpace = Lt;
47111
+ ]), this.defines = /* @__PURE__ */ new Map(), this.uniforms = /* @__PURE__ */ new Map(), this.blendModes = /* @__PURE__ */ new Map(), this.extensions = /* @__PURE__ */ new Set(), this.attributes = Is.NONE, this.varyings = /* @__PURE__ */ new Set(), this.uvTransformation = !1, this.readDepth = !1, this.colorSpace = _t;
47112
47112
  }
47113
47113
  }, KR = !1, PT = class {
47114
47114
  /**
@@ -48700,7 +48700,7 @@ uniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varyin
48700
48700
  extensions: o = null,
48701
48701
  vertexShader: s = null
48702
48702
  } = {}) {
48703
- super(), this.name = g, this.renderer = null, this.attributes = e, this.fragmentShader = A, this.vertexShader = s, this.defines = i, this.uniforms = I, this.extensions = o, this.blendMode = new UrA(t), this.blendMode.addEventListener("change", (n) => this.setChanged()), this._inputColorSpace = Lt, this._outputColorSpace = yo;
48703
+ super(), this.name = g, this.renderer = null, this.attributes = e, this.fragmentShader = A, this.vertexShader = s, this.defines = i, this.uniforms = I, this.extensions = o, this.blendMode = new UrA(t), this.blendMode.addEventListener("change", (n) => this.setChanged()), this._inputColorSpace = _t, this._outputColorSpace = yo;
48704
48704
  }
48705
48705
  /**
48706
48706
  * The input color space.
@@ -55377,11 +55377,21 @@ const JR = Symbol("assetReference"), pQ = class {
55377
55377
  set asset(A) {
55378
55378
  this._asset = A;
55379
55379
  }
55380
- // TODO: rename to url
55381
- /** The url of the loaded asset (or the asset to be loaded) */
55380
+ /** The url of the loaded asset (or the asset to be loaded)
55381
+ * @deprecated use url */
55382
55382
  get uri() {
55383
55383
  return this._url;
55384
55384
  }
55385
+ /** The url of the loaded asset (or the asset to be loaded) */
55386
+ get url() {
55387
+ return this._url;
55388
+ }
55389
+ /**
55390
+ * @returns true if the uri is a valid URL (http, https, blob)
55391
+ */
55392
+ get hasUrl() {
55393
+ return this._url !== void 0 && (this._url.startsWith("http") || this._url.startsWith("blob:"));
55394
+ }
55385
55395
  /**
55386
55396
  * This is the loaded asset root object. If the asset is a glb/gltf file this will be the {@link three#Scene} object.
55387
55397
  */
@@ -56046,12 +56056,12 @@ function SJ(g = null) {
56046
56056
  const kF = Symbol("GizmoCache");
56047
56057
  class Li {
56048
56058
  static ensureFont() {
56049
- let A = Wt.FontLibrary.getFontFamily(this.familyName);
56059
+ let A = Zt.FontLibrary.getFontFamily(this.familyName);
56050
56060
  if (!A) {
56051
- A = Wt.FontLibrary.addFontFamily(this.familyName);
56061
+ A = Zt.FontLibrary.addFontFamily(this.familyName);
56052
56062
  const e = A.addVariant("normal", "normal", "https://uploads.needle.tools/include/font-msdf.json", "https://uploads.needle.tools/include/font.png");
56053
56063
  e == null || e.addEventListener("ready", () => {
56054
- Wt.update();
56064
+ Zt.update();
56055
56065
  });
56056
56066
  }
56057
56067
  }
@@ -56142,10 +56152,10 @@ class Li {
56142
56152
  }), e.renderOrder = 999999, e[kF] = i, this.timedObjectsBuffer.push(e), t <= 0 && A.currentFrameEvent >= Ci.OnBeforeRender ? this.timesBuffer.push(0) : this.timesBuffer.push(xe.Current.time.realtimeSinceStartup + t), A.scene.add(e);
56143
56153
  }
56144
56154
  static onBeforeRender(A, e) {
56145
- this.tmuiNeedsUpdate && Wt.update();
56155
+ this.tmuiNeedsUpdate && Zt.update();
56146
56156
  for (let t = 0; t < e.length; t++) {
56147
56157
  const i = e[t];
56148
- if (A.mainCamera && i instanceof Wt.MeshUIBaseElement) {
56158
+ if (A.mainCamera && i instanceof Zt.MeshUIBaseElement) {
56149
56159
  if (nh(i))
56150
56160
  continue;
56151
56161
  const I = A.isInVR, o = !1, s = !I;
@@ -56953,14 +56963,14 @@ class Z3 {
56953
56963
  return;
56954
56964
  this.onUpdateFrame(A.frame), this._hasSelectEvent = !0;
56955
56965
  const e = (i = this._layout) == null ? void 0 : i.selectComponentId, t = (s = (o = (I = this._layout) == null ? void 0 : I.components[e]) == null ? void 0 : o.gamepadIndices) == null ? void 0 : s.button;
56956
- t !== void 0 && (this._selectButtonIndex = t), !zy && (kC && fe.DrawDirection(this.rayWorldPosition, Zt(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 16711680, 10), this.emitPointerEvent(ki.PointerDown, this._selectButtonIndex || 0, "xr-standard-trigger", !0, A));
56966
+ t !== void 0 && (this._selectButtonIndex = t), !zy && (kC && fe.DrawDirection(this.rayWorldPosition, Lt(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 16711680, 10), this.emitPointerEvent(ki.PointerDown, this._selectButtonIndex || 0, "xr-standard-trigger", !0, A));
56957
56967
  });
56958
56968
  B(this, "onSelectEnd", (A) => {
56959
56969
  zy || this.inputSource === A.inputSource && this.emitPointerEvent(ki.PointerUp, this._selectButtonIndex || 0, "xr-standard-trigger", !0, A);
56960
56970
  });
56961
56971
  B(this, "onSequeezeStart", (A) => {
56962
56972
  var e, t, i;
56963
- this.inputSource === A.inputSource && (this._squeezeButtonIndex = (i = (t = (e = this._layout) == null ? void 0 : e.components["xr-standard-squeeze"]) == null ? void 0 : t.gamepadIndices) == null ? void 0 : i.button, this._squeezeButtonIndex !== void 0 && (kC && fe.DrawDirection(this.rayWorldPosition, Zt(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 255, 10), this.emitPointerEvent(ki.PointerDown, this._squeezeButtonIndex || 0, "xr-standard-squeeze", !0, A)));
56973
+ this.inputSource === A.inputSource && (this._squeezeButtonIndex = (i = (t = (e = this._layout) == null ? void 0 : e.components["xr-standard-squeeze"]) == null ? void 0 : t.gamepadIndices) == null ? void 0 : i.button, this._squeezeButtonIndex !== void 0 && (kC && fe.DrawDirection(this.rayWorldPosition, Lt(0, 0.01, 1).applyQuaternion(this.rayWorldQuaternion), 255, 10), this.emitPointerEvent(ki.PointerDown, this._squeezeButtonIndex || 0, "xr-standard-squeeze", !0, A)));
56964
56974
  });
56965
56975
  B(this, "onSequeezeEnd", (A) => {
56966
56976
  this.inputSource === A.inputSource && this._squeezeButtonIndex !== void 0 && this.emitPointerEvent(ki.PointerUp, this._squeezeButtonIndex || 0, "xr-standard-squeeze", !0, A);
@@ -57081,7 +57091,7 @@ class Z3 {
57081
57091
  }
57082
57092
  /** Grip position in rig space */
57083
57093
  get gripPosition() {
57084
- return Zt(this._gripPosition).applyMatrix4(t0);
57094
+ return Lt(this._gripPosition).applyMatrix4(t0);
57085
57095
  }
57086
57096
  /** Grip rotation in rig space */
57087
57097
  get gripQuaternion() {
@@ -57091,11 +57101,11 @@ class Z3 {
57091
57101
  * @link https://developer.mozilla.org/en-US/docs/Web/API/XRPose/linearVelocity
57092
57102
  */
57093
57103
  get gripLinearVelocity() {
57094
- return Zt(this._linearVelocity).applyQuaternion(Gs);
57104
+ return Lt(this._linearVelocity).applyQuaternion(Gs);
57095
57105
  }
57096
57106
  /** Ray position in rig space */
57097
57107
  get rayPosition() {
57098
- return Zt(this._rayPosition).applyMatrix4(t0);
57108
+ return Lt(this._rayPosition).applyMatrix4(t0);
57099
57109
  }
57100
57110
  /** Ray rotation in rig space */
57101
57111
  get rayQuaternion() {
@@ -57103,7 +57113,7 @@ class Z3 {
57103
57113
  }
57104
57114
  /** Controller grip position in worldspace */
57105
57115
  get gripWorldPosition() {
57106
- return Zt(this._gripWorldPosition);
57116
+ return Lt(this._gripWorldPosition);
57107
57117
  }
57108
57118
  /** Controller grip rotation in wordspace */
57109
57119
  get gripWorldQuaternion() {
@@ -57111,7 +57121,7 @@ class Z3 {
57111
57121
  }
57112
57122
  /** Controller ray position in worldspace (this value is calculated once per frame by default - call `updateRayWorldPosition` to force an update) */
57113
57123
  get rayWorldPosition() {
57114
- return Zt(this._rayWorldPosition);
57124
+ return Lt(this._rayWorldPosition);
57115
57125
  }
57116
57126
  /** Recalculates the ray world position */
57117
57127
  updateRayWorldPosition() {
@@ -57126,12 +57136,12 @@ class Z3 {
57126
57136
  /** Recalculates the ray world quaternion */
57127
57137
  updateRayWorldQuaternion() {
57128
57138
  var t;
57129
- const A = (t = this.xr.context.mainCamera) == null ? void 0 : t.parent, e = A ? Ht(A) : void 0;
57139
+ const A = (t = this.xr.context.mainCamera) == null ? void 0 : t.parent, e = A ? Yt(A) : void 0;
57130
57140
  this._rayWorldQuaternion.copy(this._rayQuaternion).multiply(Gs), e && this._rayWorldQuaternion.premultiply(e);
57131
57141
  }
57132
57142
  /** The controller ray in worldspace */
57133
57143
  get ray() {
57134
- return this._ray.origin.copy(this.rayWorldPosition), this._ray.direction.copy(Zt(0, 0, 1).applyQuaternion(this.rayWorldQuaternion)), this._ray;
57144
+ return this._ray.origin.copy(this.rayWorldPosition), this._ray.direction.copy(Lt(0, 0, 1).applyQuaternion(this.rayWorldQuaternion)), this._ray;
57135
57145
  }
57136
57146
  /** The controller object space.
57137
57147
  * You can use it to attach objects to the controller.
@@ -57150,7 +57160,7 @@ class Z3 {
57150
57160
  }
57151
57161
  onRenderDebug() {
57152
57162
  var i;
57153
- fe.DrawWireSphere(this.rayWorldPosition, 0.02), fe.DrawDirection(this.rayWorldPosition, Zt(0, 0, 10).applyQuaternion(this.rayWorldQuaternion));
57163
+ fe.DrawWireSphere(this.rayWorldPosition, 0.02), fe.DrawDirection(this.rayWorldPosition, Lt(0, 0, 10).applyQuaternion(this.rayWorldQuaternion));
57154
57164
  const A = this.gripWorldPosition.sub(this.object.worldForward.multiplyScalar(0.1)), e = this.inputSource.profiles.join(`
57155
57165
  `);
57156
57166
  let t = `Controller[${this.index}] ${this.side}
@@ -57198,7 +57208,7 @@ Pinch: ${(i = this.getGesture("pinch")) == null ? void 0 : i.value.toFixed(3)}`)
57198
57208
  }
57199
57209
  } else
57200
57210
  this.inputSource.gripSpace && this.targetRayMode === "transient-pointer" ? (this._object.position.copy(this._gripPosition), this._object.quaternion.copy(this._gripQuaternion).multiply(Gs)) : (this._object.position.copy(this._rayPosition), this._object.quaternion.copy(this._rayQuaternion).multiply(Gs));
57201
- const i = (n = this.xr.context.mainCamera) == null ? void 0 : n.parent, I = i ? Ht(i) : void 0;
57211
+ const i = (n = this.xr.context.mainCamera) == null ? void 0 : n.parent, I = i ? Yt(i) : void 0;
57202
57212
  this._gripWorldPosition.copy(this._gripPosition), i && this._gripWorldPosition.applyMatrix4(i.matrixWorld), this._gripWorldQuaternion.copy(this._gripQuaternion), this._gripWorldQuaternion.multiply(Gs), I && this._gripWorldQuaternion.premultiply(I), this.updateRayWorldPosition(), this.updateRayWorldQuaternion();
57203
57213
  }
57204
57214
  /** Called when the input source disconnects */
@@ -64141,7 +64151,7 @@ const aa = class {
64141
64151
  wBA(A, i.init), this.session = e, this.mode = A, this.context = t, (Kg || gA("console")) && bp(!0), this._xr_scripts = [...i.scripts], this._xr_update_scripts = this._xr_scripts.filter((s) => typeof s.onUpdateXR == "function"), this._controllerAdded = i.controller_added, this._controllerRemoved = i.controller_removed, wB(this.onBefore, Ci.LateUpdate), this.context.pre_render_callbacks.push(this.onBeforeRender), this.context.post_render_callbacks.push(this.onAfterRender), ((I = i.init.optionalFeatures) != null && I.includes("hit-test") || (o = i.init.requiredFeatures) != null && o.includes("hit-test")) && e.requestReferenceSpace("viewer").then((s) => {
64142
64152
  var n, r;
64143
64153
  return (r = (n = e.requestHitTestSource) == null ? void 0 : n.call(e, { space: s })) == null ? void 0 : r.then((a) => this._viewerHitTestSource = a);
64144
- }).catch((s) => console.warn(s)), this.context.mainCamera && (this._originalCameraWorldPosition = He(this.context.mainCamera, new y()), this._originalCameraWorldRotation = Ht(this.context.mainCamera, new GA()), this._originalCameraWorldScale = ni(this.context.mainCamera, new y()), this._originalCameraParent = this.context.mainCamera.parent), this._defaultRig = new mCA(), this.context.scene.add(this._defaultRig.gameObject), this.addRig(this._defaultRig);
64154
+ }).catch((s) => console.warn(s)), this.context.mainCamera && (this._originalCameraWorldPosition = He(this.context.mainCamera, new y()), this._originalCameraWorldRotation = Yt(this.context.mainCamera, new GA()), this._originalCameraWorldScale = ni(this.context.mainCamera, new y()), this._originalCameraParent = this.context.mainCamera.parent), this._defaultRig = new mCA(), this.context.scene.add(this._defaultRig.gameObject), this.addRig(this._defaultRig);
64145
64155
  for (let s = 0; s < e.inputSources.length; s++) {
64146
64156
  const n = e.inputSources[s];
64147
64157
  if (!n.handedness) {
@@ -64503,10 +64513,10 @@ const aa = class {
64503
64513
  convertHitTestResult(A) {
64504
64514
  const e = this.context.renderer.xr.getReferenceSpace(), t = e && A.getPose(e);
64505
64515
  if (t) {
64506
- const i = Zt(t.transform.position), I = El(t.transform.orientation), o = this.context.mainCamera;
64516
+ const i = Lt(t.transform.position), I = El(t.transform.orientation), o = this.context.mainCamera;
64507
64517
  if ((o == null ? void 0 : o.parent) !== this._cameraRenderParent && i.applyMatrix4(t0), o != null && o.parent) {
64508
64518
  i.applyMatrix4(o.parent.matrixWorld), I.multiply(Gs);
64509
- const s = Ht(o.parent);
64519
+ const s = Yt(o.parent);
64510
64520
  s.premultiply(Gs), I.premultiply(s);
64511
64521
  }
64512
64522
  return { hit: A, position: i, quaternion: I };
@@ -64515,7 +64525,7 @@ const aa = class {
64515
64525
  }
64516
64526
  /** convert a XRRigidTransform from XR session space to threejs / Needle Engine XR space */
64517
64527
  convertSpace(A) {
64518
- const e = Zt(A.position);
64528
+ const e = Lt(A.position);
64519
64529
  e.applyMatrix4(t0);
64520
64530
  const t = El(A.orientation);
64521
64531
  return t.premultiply(Gs), { position: e, quaternion: t };
@@ -64966,20 +64976,20 @@ class Pp extends rb {
64966
64976
  let xt = bA;
64967
64977
  const Se = bA + U * ($ - SA);
64968
64978
  for (; xt <= Se; xt += Be) {
64969
- const Yt = xt + te, OI = xt + WA, ci = OI + te;
64970
- V ? (vA(F[xt + L], F[OI + L]), Me = MA.a, We = MA.b, vA(F[Yt + L], F[ci + L]), wt = MA.a, Ne = MA.b, vA(Me, wt), F[xt + L] = MA.a, F[Yt + L] = MA.b, vA(We, Ne), F[OI + L] = MA.a, F[ci + L] = MA.b) : (ZA(F[xt + L], F[OI + L]), Me = MA.a, We = MA.b, ZA(F[Yt + L], F[ci + L]), wt = MA.a, Ne = MA.b, ZA(Me, wt), F[xt + L] = MA.a, F[Yt + L] = MA.b, ZA(We, Ne), F[OI + L] = MA.a, F[ci + L] = MA.b);
64979
+ const Ot = xt + te, OI = xt + WA, ci = OI + te;
64980
+ V ? (vA(F[xt + L], F[OI + L]), Me = MA.a, We = MA.b, vA(F[Ot + L], F[ci + L]), wt = MA.a, Ne = MA.b, vA(Me, wt), F[xt + L] = MA.a, F[Ot + L] = MA.b, vA(We, Ne), F[OI + L] = MA.a, F[ci + L] = MA.b) : (ZA(F[xt + L], F[OI + L]), Me = MA.a, We = MA.b, ZA(F[Ot + L], F[ci + L]), wt = MA.a, Ne = MA.b, ZA(Me, wt), F[xt + L] = MA.a, F[Ot + L] = MA.b, ZA(We, Ne), F[OI + L] = MA.a, F[ci + L] = MA.b);
64971
64981
  }
64972
64982
  if ($ & cA) {
64973
- const Yt = xt + WA;
64974
- V ? vA(F[xt + L], F[Yt + L]) : ZA(F[xt + L], F[Yt + L]), Me = MA.a, F[Yt + L] = MA.b, F[xt + L] = Me;
64983
+ const Ot = xt + WA;
64984
+ V ? vA(F[xt + L], F[Ot + L]) : ZA(F[xt + L], F[Ot + L]), Me = MA.a, F[Ot + L] = MA.b, F[xt + L] = Me;
64975
64985
  }
64976
64986
  }
64977
64987
  if (T & cA) {
64978
64988
  let xt = bA;
64979
64989
  const Se = bA + U * ($ - SA);
64980
64990
  for (; xt <= Se; xt += Be) {
64981
- const Yt = xt + te;
64982
- V ? vA(F[xt + L], F[Yt + L]) : ZA(F[xt + L], F[Yt + L]), Me = MA.a, F[Yt + L] = MA.b, F[xt + L] = Me;
64991
+ const Ot = xt + te;
64992
+ V ? vA(F[xt + L], F[Ot + L]) : ZA(F[xt + L], F[Ot + L]), Me = MA.a, F[Ot + L] = MA.b, F[xt + L] = Me;
64983
64993
  }
64984
64994
  }
64985
64995
  SA = cA, cA >>= 1;
@@ -65078,8 +65088,8 @@ class Pp extends rb {
65078
65088
  for (let Se = 0; Se < cA; ++Se)
65079
65089
  Ne[Se] = L[F.idx[Se]], Be[Se] = Se < 1 ? 0 : Be[Se - 1] + bA * xA, Me[Se] = new Float32Array(64), wt[Se] = new Uint16Array(64), We[Se] = new Uint16Array(bA * 64);
65080
65090
  for (let Se = 0; Se < xA; ++Se) {
65081
- let Yt = 8;
65082
- Se == xA - 1 && (Yt = $A);
65091
+ let Ot = 8;
65092
+ Se == xA - 1 && (Ot = $A);
65083
65093
  let OI = 8;
65084
65094
  for (let pt = 0; pt < bA; ++pt) {
65085
65095
  pt == bA - 1 && (OI = WA);
@@ -65092,7 +65102,7 @@ class Pp extends rb {
65092
65102
  let ci = 0;
65093
65103
  for (let pt = 0; pt < cA; ++pt) {
65094
65104
  const je = $[F.idx[pt]].type;
65095
- for (let Zg = 8 * Se; Zg < 8 * Se + Yt; ++Zg) {
65105
+ for (let Zg = 8 * Se; Zg < 8 * Se + Ot; ++Zg) {
65096
65106
  ci = Ne[pt][Zg];
65097
65107
  for (let Jr = 0; Jr < SA; ++Jr) {
65098
65108
  const wi = Jr * 64 + (Zg & 7) * 8;
@@ -65100,7 +65110,7 @@ class Pp extends rb {
65100
65110
  }
65101
65111
  }
65102
65112
  if (SA != bA)
65103
- for (let Zg = 8 * Se; Zg < 8 * Se + Yt; ++Zg) {
65113
+ for (let Zg = 8 * Se; Zg < 8 * Se + Ot; ++Zg) {
65104
65114
  const Jr = Ne[pt][Zg] + 8 * SA * 2 * je, wi = SA * 64 + (Zg & 7) * 8;
65105
65115
  for (let IC = 0; IC < OI; ++IC)
65106
65116
  z.setUint16(Jr + IC * 2 * je, We[pt][wi + IC], !0);
@@ -65111,14 +65121,14 @@ class Pp extends rb {
65111
65121
  z = new DataView(Y.buffer);
65112
65122
  for (let Se = 0; Se < cA; ++Se) {
65113
65123
  $[F.idx[Se]].decoded = !0;
65114
- const Yt = $[F.idx[Se]].type;
65124
+ const Ot = $[F.idx[Se]].type;
65115
65125
  if ($[Se].type == 2)
65116
65126
  for (let OI = 0; OI < dA; ++OI) {
65117
65127
  const ci = Ne[Se][OI];
65118
65128
  for (let pt = 0; pt < V; ++pt)
65119
- xt[pt] = z.getUint16(ci + pt * 2 * Yt, !0);
65129
+ xt[pt] = z.getUint16(ci + pt * 2 * Ot, !0);
65120
65130
  for (let pt = 0; pt < V; ++pt)
65121
- z.setFloat32(ci + pt * 2 * Yt, CA(xt[pt]), !0);
65131
+ z.setFloat32(ci + pt * 2 * Ot, CA(xt[pt]), !0);
65122
65132
  }
65123
65133
  }
65124
65134
  }
@@ -65508,7 +65518,7 @@ class Pp extends rb {
65508
65518
  uncompress: null,
65509
65519
  getter: null,
65510
65520
  format: null,
65511
- colorSpace: Lt
65521
+ colorSpace: _t
65512
65522
  };
65513
65523
  switch (F.compression) {
65514
65524
  case "NO_COMPRESSION":
@@ -65573,7 +65583,7 @@ class Pp extends rb {
65573
65583
  console.error("THREE.EXRLoader: unsupported type: ", T);
65574
65584
  break;
65575
65585
  }
65576
- return Y.bytesPerLine = Y.width * Y.inputSize * Y.channels, Y.outputChannels == 4 ? (Y.format = ri, Y.colorSpace = Lt) : (Y.format = ph, Y.colorSpace = yo), Y;
65586
+ return Y.bytesPerLine = Y.width * Y.inputSize * Y.channels, Y.outputChannels == 4 ? (Y.format = ri, Y.colorSpace = _t) : (Y.format = ph, Y.colorSpace = yo), Y;
65577
65587
  }
65578
65588
  const xo = new DataView(A), iC = new Uint8Array(A), vo = { value: 0 }, gC = yi(xo, A, vo), et = Ji(gC, xo, iC, vo, this.type), rd = { value: 0 }, cD = { R: 0, G: 1, B: 2, A: 3, Y: 0 };
65579
65589
  for (let F = 0; F < et.height / et.scanlineBlockSize; F++) {
@@ -65758,7 +65768,7 @@ class o0 extends rb {
65758
65768
  switch (o.type) {
65759
65769
  case Ag:
65760
65770
  case wg:
65761
- o.colorSpace = Lt, o.minFilter = be, o.magFilter = be, o.generateMipmaps = !1, o.flipY = !0;
65771
+ o.colorSpace = _t, o.minFilter = be, o.magFilter = be, o.generateMipmaps = !1, o.flipY = !0;
65762
65772
  break;
65763
65773
  }
65764
65774
  e && e(o, s);
@@ -65813,7 +65823,7 @@ class NBA {
65813
65823
  }
65814
65824
  resolveTexture(A, e) {
65815
65825
  const t = e;
65816
- Yd && console.log("Lightmap loaded:", t), t != null && t.isTexture && (this.registry ? (t.colorSpace = Lt, this.registry.registerTexture(this.source, A.type, t, A.index)) : console.log(VC[A.type], A.pointer, t));
65826
+ Yd && console.log("Lightmap loaded:", t), t != null && t.isTexture && (this.registry ? (t.colorSpace = _t, this.registry.registerTexture(this.source, A.type, t, A.index)) : console.log(VC[A.type], A.pointer, t));
65817
65827
  }
65818
65828
  }
65819
65829
  const xH = !!gA("debuglightmaps");
@@ -65947,7 +65957,7 @@ TEX ` + t.texture_lod;
65947
65957
  ` + (i.lastScreenCoverage * 100).toFixed(1) + `% cov
65948
65958
  ` + (i.lastCentrality * 100).toFixed(1) + `% centr
65949
65959
  ` + (iw.min.x.toFixed(2) + "-" + iw.max.x.toFixed(2) + "x" + iw.min.y.toFixed(2) + "-" + iw.max.y.toFixed(2)) + " scr"), i.lastScreenCoverage > 0.1) {
65950
- const u = A, f = u.worldForward, w = u.worldPosition, M = Zt(f).multiplyScalar(Q * 0.7).add(C), G = M.distanceTo(w), N = c[Math.min(c.length - 1, Math.max(0, I))] + "88", S = this.context.domHeight > 0 ? screen.height / this.context.domHeight : 1, R = A.isPerspectiveCamera ? Math.tan(A.fov * Math.PI / 180 / 2) : 1;
65960
+ const u = A, f = u.worldForward, w = u.worldPosition, M = Lt(f).multiplyScalar(Q * 0.7).add(C), G = M.distanceTo(w), N = c[Math.min(c.length - 1, Math.max(0, I))] + "88", S = this.context.domHeight > 0 ? screen.height / this.context.domHeight : 1, R = A.isPerspectiveCamera ? Math.tan(A.fov * Math.PI / 180 / 2) : 1;
65951
65961
  fe.DrawLabel(M, p, G * 0.012 * S * R, void 0, 16777215, N);
65952
65962
  }
65953
65963
  }
@@ -66912,7 +66922,7 @@ class XBA {
66912
66922
  this.createButtonFromHTMLNode(n);
66913
66923
  }), s.removedNodes.forEach((n) => {
66914
66924
  const r = n, a = this.htmlButtonsMap.get(r);
66915
- a && (this.htmlButtonsMap.delete(r), a.remove(), Wt.update());
66925
+ a && (this.htmlButtonsMap.delete(r), a.remove(), Zt.update());
66916
66926
  }));
66917
66927
  }).observe(t, { childList: !0 }) : console.error("Could not find options container in needle menu");
66918
66928
  }
@@ -66968,7 +66978,7 @@ class XBA {
66968
66978
  const h = 5;
66969
66979
  (I = this.menu) == null || I.quaternion.slerp(this._menuTarget.quaternion, this._context.time.deltaTime * h), (o = this.menu) == null || o.scale.setScalar(i);
66970
66980
  }
66971
- this.uiisDirty && (this.uiisDirty = !1, Wt.update());
66981
+ this.uiisDirty && (this.uiisDirty = !1, Zt.update());
66972
66982
  }
66973
66983
  ensureRenderOnTop(A, e = 0) {
66974
66984
  A instanceof hA && (A.material.depthTest = !1, A.material.depthWrite = !1), A.renderOrder = 1e3 + e * 2;
@@ -66978,7 +66988,7 @@ class XBA {
66978
66988
  getMenu() {
66979
66989
  if (this.menu)
66980
66990
  return this.menu;
66981
- this.ensureFont(), this.menu = new Wt.Block({
66991
+ this.ensureFont(), this.menu = new Zt.Block({
66982
66992
  boxSizing: "border-box",
66983
66993
  fontFamily: this.familyName,
66984
66994
  height: "auto",
@@ -67002,7 +67012,7 @@ class XBA {
67002
67012
  handleNeedleWatermark() {
67003
67013
  var A;
67004
67014
  if (!this._poweredByNeedleElement) {
67005
- this._poweredByNeedleElement = new Wt.Block({
67015
+ this._poweredByNeedleElement = new Zt.Block({
67006
67016
  width: "auto",
67007
67017
  height: "auto",
67008
67018
  fontSize: 0.05,
@@ -67018,11 +67028,11 @@ class XBA {
67018
67028
  }), this._poweredByNeedleElement["needle:use_eventsystem"] = !0;
67019
67029
  const e = new YH(this._context, () => globalThis.open("https://needle.tools", "_self"));
67020
67030
  Jl(this._poweredByNeedleElement, e);
67021
- const t = new Wt.Text({
67031
+ const t = new Zt.Text({
67022
67032
  textContent: "Powered by",
67023
67033
  width: "auto",
67024
67034
  height: "auto"
67025
- }), i = new Wt.Text({
67035
+ }), i = new Zt.Text({
67026
67036
  textContent: "needle",
67027
67037
  width: "auto",
67028
67038
  height: "auto",
@@ -67053,9 +67063,9 @@ class XBA {
67053
67063
  }
67054
67064
  }
67055
67065
  ensureFont() {
67056
- let A = Wt.FontLibrary.getFontFamily(this.familyName);
67066
+ let A = Zt.FontLibrary.getFontFamily(this.familyName);
67057
67067
  if (!A) {
67058
- A = Wt.FontLibrary.addFontFamily(this.familyName);
67068
+ A = Zt.FontLibrary.addFontFamily(this.familyName);
67059
67069
  const e = A.addVariant("normal", "normal", "./include/needle/arial-msdf.json", "./include/needle/arial.png");
67060
67070
  e == null || e.addEventListener("ready", () => {
67061
67071
  this.markDirty();
@@ -67063,7 +67073,7 @@ class XBA {
67063
67073
  }
67064
67074
  }
67065
67075
  createButton(A, e) {
67066
- const t = new Wt.Block({
67076
+ const t = new Zt.Block({
67067
67077
  width: "auto",
67068
67078
  height: "auto",
67069
67079
  whiteSpace: "pre-wrap",
@@ -67077,7 +67087,7 @@ class XBA {
67077
67087
  borderRadius: 0.02,
67078
67088
  cursor: "pointer",
67079
67089
  fontSize: 0.05
67080
- }), i = new Wt.Text({
67090
+ }), i = new Zt.Text({
67081
67091
  textContent: "",
67082
67092
  width: "auto",
67083
67093
  justifyContent: "center",
@@ -67130,7 +67140,7 @@ class $BA {
67130
67140
  if (!this.spatialIcon) {
67131
67141
  const i = await HH(A);
67132
67142
  if (i && !this.spatialIcon) {
67133
- const o = new Wt.Block({
67143
+ const o = new Zt.Block({
67134
67144
  width: 0.08,
67135
67145
  height: 0.08,
67136
67146
  backgroundColor: 16777215,
@@ -67179,10 +67189,10 @@ class YH {
67179
67189
  return this.gameObject;
67180
67190
  }
67181
67191
  onPointerEnter() {
67182
- this.context.input.setCursorPointer(), this.allowModifyUI && (this.element.set({ backgroundOpacity: 1 }), Wt.update());
67192
+ this.context.input.setCursorPointer(), this.allowModifyUI && (this.element.set({ backgroundOpacity: 1 }), Zt.update());
67183
67193
  }
67184
67194
  onPointerExit() {
67185
- this.context.input.setCursorNormal(), this.allowModifyUI && (this.element.set({ backgroundOpacity: 0 }), Wt.update());
67195
+ this.context.input.setCursorNormal(), this.allowModifyUI && (this.element.set({ backgroundOpacity: 0 }), Zt.update());
67186
67196
  }
67187
67197
  onPointerDown(A) {
67188
67198
  A.use();
@@ -69083,7 +69093,7 @@ Object.getOwnPropertyDescriptor(DA.prototype, "worldPosition") || Object.defineP
69083
69093
  });
69084
69094
  Object.getOwnPropertyDescriptor(DA.prototype, "worldQuaternion") || Object.defineProperty(DA.prototype, "worldQuaternion", {
69085
69095
  get: function() {
69086
- return this instanceof QJ ? Ht(this.object) : Ht(this);
69096
+ return this instanceof QJ ? Yt(this.object) : Yt(this);
69087
69097
  },
69088
69098
  set: function(g) {
69089
69099
  yn(this, g);
@@ -69107,17 +69117,17 @@ Object.getOwnPropertyDescriptor(DA.prototype, "worldScale") || Object.defineProp
69107
69117
  });
69108
69118
  Object.getOwnPropertyDescriptor(DA.prototype, "worldForward") || Object.defineProperty(DA.prototype, "worldForward", {
69109
69119
  get: function() {
69110
- return Zt().set(0, 0, 1).applyQuaternion(Ht(this));
69120
+ return Lt().set(0, 0, 1).applyQuaternion(Yt(this));
69111
69121
  }
69112
69122
  });
69113
69123
  Object.getOwnPropertyDescriptor(DA.prototype, "worldRight") || Object.defineProperty(DA.prototype, "worldRight", {
69114
69124
  get: function() {
69115
- return Zt().set(1, 0, 0).applyQuaternion(Ht(this));
69125
+ return Lt().set(1, 0, 0).applyQuaternion(Yt(this));
69116
69126
  }
69117
69127
  });
69118
69128
  Object.getOwnPropertyDescriptor(DA.prototype, "worldUp") || Object.defineProperty(DA.prototype, "worldUp", {
69119
69129
  get: function() {
69120
- return Zt().set(0, 1, 0).applyQuaternion(Ht(this));
69130
+ return Lt().set(0, 1, 0).applyQuaternion(Yt(this));
69121
69131
  }
69122
69132
  });
69123
69133
  pQA(DA);
@@ -69665,7 +69675,7 @@ let FA = (ar = class {
69665
69675
  $l(this.gameObject, A, e, t);
69666
69676
  }
69667
69677
  get worldQuaternion() {
69668
- return Ht(this.gameObject);
69678
+ return Yt(this.gameObject);
69669
69679
  }
69670
69680
  set worldQuaternion(A) {
69671
69681
  yn(this.gameObject, A);
@@ -70416,7 +70426,7 @@ class TQA extends Kn {
70416
70426
  onDeserialize(A, e) {
70417
70427
  if (A instanceof Pe && e.type === WQ) {
70418
70428
  const t = A, i = new WQ(t.image.width, t.image.height, {
70419
- colorSpace: Lt
70429
+ colorSpace: _t
70420
70430
  });
70421
70431
  return i.texture = t, t.isRenderTargetTexture = !0, t.flipY = !0, t.offset.y = 1, t.repeat.y = -1, t.needsUpdate = !0, t.mipmaps = [], t instanceof tB && (t.isCompressedTexture = !1, t.format = RGBAFormat), i;
70422
70432
  }
@@ -77353,7 +77363,7 @@ const hW = (xU = class extends FA {
77353
77363
  if (I.length() < 0.1)
77354
77364
  return;
77355
77365
  const o = hW.forward;
77356
- if (o.set(0, 0, 1), o.applyQuaternion(Ht(this.head)), o.dot(I) > 0.45)
77366
+ if (o.set(0, 0, 1), o.applyQuaternion(Yt(this.head)), o.dot(I) > 0.45)
77357
77367
  for (let n = 0; n < e.length; n++)
77358
77368
  e[n].lookAt(this.currentTargetPoint);
77359
77369
  }
@@ -78377,7 +78387,7 @@ const fu = (qU = class extends kn {
78377
78387
  A = fu.textureCache.get(A);
78378
78388
  else if (!A.isRenderTargetTexture) {
78379
78389
  const e = A.clone();
78380
- e.colorSpace = Lt, fu.textureCache.set(A, e), A = e;
78390
+ e.colorSpace = _t, fu.textureCache.set(A, e), A = e;
78381
78391
  }
78382
78392
  this.setOptions({ backgroundImage: A, borderRadius: 0, backgroundOpacity: this.color.alpha, backgroundSize: "stretch" }), yt.assignTextureLOD(A, 0).then((e) => {
78383
78393
  e instanceof Pe && (A && fu.textureCache.set(A, e), this.setOptions({ backgroundImage: e }), this.markDirty());
@@ -79177,7 +79187,7 @@ class _h extends FA {
79177
79187
  *moveToTarget() {
79178
79188
  if (!this.target || !this.object)
79179
79189
  return;
79180
- const e = He(this.object).clone(), t = He(this.target).clone(), i = Ht(this.object).clone(), I = Ht(this.target).clone(), o = ni(this.object).clone(), s = ni(this.target).clone(), n = e.distanceTo(t), r = i.angleTo(I), a = o.distanceTo(s);
79190
+ const e = He(this.object).clone(), t = He(this.target).clone(), i = Yt(this.object).clone(), I = Yt(this.target).clone(), o = ni(this.object).clone(), s = ni(this.target).clone(), n = e.distanceTo(t), r = i.angleTo(I), a = o.distanceTo(s);
79181
79191
  if (n < 0.01 && r < 0.01 && a < 0.01) {
79182
79192
  aI(this.object, t), yn(this.object, I), Kp(this.object, s), this.coroutine = null;
79183
79193
  return;
@@ -81034,7 +81044,7 @@ class NlA {
81034
81044
  const M = m.substring(10), G = Number.parseInt(M);
81035
81045
  if (G >= 0) {
81036
81046
  const N = await this.parser.getDependency("texture", G);
81037
- N instanceof Pe && (N.colorSpace = Lt, N.needsUpdate = !0), C[w] = { value: N };
81047
+ N instanceof Pe && (N.colorSpace = _t, N.needsUpdate = !0), C[w] = { value: N };
81038
81048
  continue;
81039
81049
  }
81040
81050
  }
@@ -81973,7 +81983,7 @@ const DS = class extends FA {
81973
81983
  if (this.gameObject) {
81974
81984
  if (this._probeAnchorLastFrame !== this.probeAnchor && ((A = this._reflectionProbe) == null || A.onUnset(this), this.updateReflectionProbe()), Du == this.name && this.gameObject instanceof hA) {
81975
81985
  this.gameObject.geometry.computeBoundingSphere();
81976
- const i = Zt(this.gameObject.geometry.boundingSphere.center).applyMatrix4(this.gameObject.matrixWorld);
81986
+ const i = Lt(this.gameObject.geometry.boundingSphere.center).applyMatrix4(this.gameObject.matrixWorld);
81977
81987
  fe.DrawWireSphere(i, this.gameObject.geometry.boundingSphere.radius, 56831);
81978
81988
  }
81979
81989
  if (this.isMultiMaterialObject(this.gameObject) && ((e = this.gameObject.children) == null ? void 0 : e.length) > 0)
@@ -82088,7 +82098,7 @@ class OW extends kk {
82088
82098
  if (hY) {
82089
82099
  for (const e of this.sharedMeshes)
82090
82100
  if (e instanceof mo && e.boundingSphere) {
82091
- const t = Zt(e.boundingSphere.center).applyMatrix4(e.matrixWorld);
82101
+ const t = Lt(e.boundingSphere.center).applyMatrix4(e.matrixWorld);
82092
82102
  fe.DrawWireSphere(t, e.boundingSphere.radius, "red");
82093
82103
  }
82094
82104
  }
@@ -82645,9 +82655,9 @@ const yu = (qw = class {
82645
82655
  {
82646
82656
  const n = s.index;
82647
82657
  if (n) {
82648
- const r = g.mesh_normal, a = n.getX(r * 3), C = n.getX(r * 3 + 1), Q = n.getX(r * 3 + 2), c = s.getAttribute("position"), E = Zt(), h = Zt(), l = Zt();
82658
+ const r = g.mesh_normal, a = n.getX(r * 3), C = n.getX(r * 3 + 1), Q = n.getX(r * 3 + 2), c = s.getAttribute("position"), E = Lt(), h = Lt(), l = Lt();
82649
82659
  E.fromBufferAttribute(c, a), h.fromBufferAttribute(c, C), l.fromBufferAttribute(c, Q), E.sub(h), l.sub(h), E.cross(l), this._dir.copy(E).multiplyScalar(-1);
82650
- const d = Ht(o);
82660
+ const d = Yt(o);
82651
82661
  this._dir.applyQuaternion(d);
82652
82662
  }
82653
82663
  }
@@ -82767,7 +82777,7 @@ nA([
82767
82777
  nA([
82768
82778
  D(kk)
82769
82779
  ], Wi.prototype, "meshRenderer", 2);
82770
- class _t {
82780
+ class Tt {
82771
82781
  constructor() {
82772
82782
  B(this, "damping");
82773
82783
  B(this, "enabled");
@@ -82816,82 +82826,82 @@ class _t {
82816
82826
  }
82817
82827
  nA([
82818
82828
  D()
82819
- ], _t.prototype, "damping", 2);
82829
+ ], Tt.prototype, "damping", 2);
82820
82830
  nA([
82821
82831
  D()
82822
- ], _t.prototype, "enabled", 2);
82832
+ ], Tt.prototype, "enabled", 2);
82823
82833
  nA([
82824
82834
  D()
82825
- ], _t.prototype, "frequency", 2);
82835
+ ], Tt.prototype, "frequency", 2);
82826
82836
  nA([
82827
82837
  D()
82828
- ], _t.prototype, "octaveCount", 2);
82838
+ ], Tt.prototype, "octaveCount", 2);
82829
82839
  nA([
82830
82840
  D()
82831
- ], _t.prototype, "octaveMultiplier", 2);
82841
+ ], Tt.prototype, "octaveMultiplier", 2);
82832
82842
  nA([
82833
82843
  D()
82834
- ], _t.prototype, "octaveScale", 2);
82844
+ ], Tt.prototype, "octaveScale", 2);
82835
82845
  nA([
82836
82846
  D(de)
82837
- ], _t.prototype, "positionAmount", 2);
82847
+ ], Tt.prototype, "positionAmount", 2);
82838
82848
  nA([
82839
82849
  D()
82840
- ], _t.prototype, "quality", 2);
82850
+ ], Tt.prototype, "quality", 2);
82841
82851
  nA([
82842
82852
  D(de)
82843
- ], _t.prototype, "remap", 2);
82853
+ ], Tt.prototype, "remap", 2);
82844
82854
  nA([
82845
82855
  D()
82846
- ], _t.prototype, "remapEnabled", 2);
82856
+ ], Tt.prototype, "remapEnabled", 2);
82847
82857
  nA([
82848
82858
  D()
82849
- ], _t.prototype, "remapMultiplier", 2);
82859
+ ], Tt.prototype, "remapMultiplier", 2);
82850
82860
  nA([
82851
82861
  D(de)
82852
- ], _t.prototype, "remapX", 2);
82862
+ ], Tt.prototype, "remapX", 2);
82853
82863
  nA([
82854
82864
  D()
82855
- ], _t.prototype, "remapXMultiplier", 2);
82865
+ ], Tt.prototype, "remapXMultiplier", 2);
82856
82866
  nA([
82857
82867
  D(de)
82858
- ], _t.prototype, "remapY", 2);
82868
+ ], Tt.prototype, "remapY", 2);
82859
82869
  nA([
82860
82870
  D()
82861
- ], _t.prototype, "remapYMultiplier", 2);
82871
+ ], Tt.prototype, "remapYMultiplier", 2);
82862
82872
  nA([
82863
82873
  D(de)
82864
- ], _t.prototype, "remapZ", 2);
82874
+ ], Tt.prototype, "remapZ", 2);
82865
82875
  nA([
82866
82876
  D()
82867
- ], _t.prototype, "remapZMultiplier", 2);
82877
+ ], Tt.prototype, "remapZMultiplier", 2);
82868
82878
  nA([
82869
82879
  D()
82870
- ], _t.prototype, "scrollSpeedMultiplier", 2);
82880
+ ], Tt.prototype, "scrollSpeedMultiplier", 2);
82871
82881
  nA([
82872
82882
  D()
82873
- ], _t.prototype, "separateAxes", 2);
82883
+ ], Tt.prototype, "separateAxes", 2);
82874
82884
  nA([
82875
82885
  D()
82876
- ], _t.prototype, "strengthMultiplier", 2);
82886
+ ], Tt.prototype, "strengthMultiplier", 2);
82877
82887
  nA([
82878
82888
  D(de)
82879
- ], _t.prototype, "strengthX", 2);
82889
+ ], Tt.prototype, "strengthX", 2);
82880
82890
  nA([
82881
82891
  D()
82882
- ], _t.prototype, "strengthXMultiplier", 2);
82892
+ ], Tt.prototype, "strengthXMultiplier", 2);
82883
82893
  nA([
82884
82894
  D(de)
82885
- ], _t.prototype, "strengthY", 2);
82895
+ ], Tt.prototype, "strengthY", 2);
82886
82896
  nA([
82887
82897
  D()
82888
- ], _t.prototype, "strengthYMultiplier", 2);
82898
+ ], Tt.prototype, "strengthYMultiplier", 2);
82889
82899
  nA([
82890
82900
  D(de)
82891
- ], _t.prototype, "strengthZ", 2);
82901
+ ], Tt.prototype, "strengthZ", 2);
82892
82902
  nA([
82893
82903
  D()
82894
- ], _t.prototype, "strengthZMultiplier", 2);
82904
+ ], Tt.prototype, "strengthZMultiplier", 2);
82895
82905
  class Ki {
82896
82906
  constructor() {
82897
82907
  B(this, "enabled");
@@ -85670,7 +85680,7 @@ class Mn extends FA {
85670
85680
  B(this, "useTeleportTarget", !1);
85671
85681
  B(this, "useTeleportFade", !1);
85672
85682
  B(this, "showRays", !0);
85673
- B(this, "showHits", !0);
85683
+ B(this, "showHits", !1);
85674
85684
  B(this, "isXRMovementHandler", !0);
85675
85685
  B(this, "xrSessionMode", "immersive-vr");
85676
85686
  B(this, "_didApplyRotation", !1);
@@ -85768,12 +85778,12 @@ class Mn extends FA {
85768
85778
  let o = this._hitDiscs[t];
85769
85779
  if (o && (o.hit = I), I) {
85770
85780
  const s = e.rigScale ?? 1;
85771
- mY && (fe.DrawWireSphere(I.point, 0.025 * s, 16711680), fe.DrawLabel(Zt(0, 0.2, 0).add(I.point), I.object.name, 0.02, 0)), o || (o = this.createHitPointObject(), this._hitDiscs[t] = o), o.visible = !0;
85781
+ mY && (fe.DrawWireSphere(I.point, 0.025 * s, 16711680), fe.DrawLabel(Lt(0, 0.2, 0).add(I.point), I.object.name, 0.02, 0)), o || (o = this.createHitPointObject(), this._hitDiscs[t] = o), o.visible = !0;
85772
85782
  const n = 0.01 * (s + I.distance);
85773
85783
  if (o.scale.set(n, n, n), o.layers.disableAll(), o.layers.enable(2), o.hit = I, I.normal) {
85774
85784
  const r = 0.02 * s;
85775
85785
  o.position.set(0, 0, -0.1 * r).applyQuaternion(i.rayWorldQuaternion), o.position.add(I.point);
85776
- const a = I.normal.applyQuaternion(Ht(I.object));
85786
+ const a = I.normal.applyQuaternion(Yt(I.object));
85777
85787
  o.quaternion.setFromUnitVectors(yhA, a);
85778
85788
  } else
85779
85789
  o.position.add(I.point);
@@ -87564,9 +87574,9 @@ class WhA {
87564
87574
  const f = this._draggedOverObjectDuration >= 0.15, w = 1e-3, m = this._totalMovement.length() >= w;
87565
87575
  if ((f || m) && (this._draggedOverObjectLastSetUp !== this._draggedOverObject || this._draggedOverObjectLastNormal.dot(p.face.normal) < 0.999999 || this.context.time.frame % 60 === 0)) {
87566
87576
  this._draggedOverObjectLastSetUp = this._draggedOverObject, this._draggedOverObjectLastNormal.copy(p.face.normal);
87567
- const M = Zt(), G = Zt();
87577
+ const M = Lt(), G = Lt();
87568
87578
  this._bounds.getCenter(M), this._bounds.getSize(G), M.sub(G.multiplyScalar(0.5).multiply(p.face.normal)), this._hitPointInLocalSpace.copy(M), this._hitNormalInLocalSpace.copy(p.face.normal), this._bounds.getCenter(M), this._bounds.getSize(G), M.add(G.multiplyScalar(0.5).multiply(p.face.normal));
87569
- const N = Zt(this._hitPointInLocalSpace).add(M);
87579
+ const N = Lt(this._hitPointInLocalSpace).add(M);
87570
87580
  this._followObject.localToWorld(N);
87571
87581
  const S = p.point;
87572
87582
  this._dragPlane.setFromNormalAndCoplanarPoint(p.face.normal, S);
@@ -87689,14 +87699,14 @@ const Kv = class {
87689
87699
  onUpdateGroundPlane() {
87690
87700
  if (!this._selected || !this._context)
87691
87701
  return;
87692
- const A = He(this._selected), e = new No(Zt(0, 0.1, 0).add(A), Zt(0, -1, 0)), t = new mr();
87702
+ const A = He(this._selected), e = new No(Lt(0, 0.1, 0).add(A), Lt(0, -1, 0)), t = new mr();
87693
87703
  t.testObject = (I) => I !== this._selected;
87694
87704
  const i = this._context.physics.raycastFromRay(e, t);
87695
87705
  for (let I = 0; I < i.length; I++) {
87696
87706
  const o = i[I];
87697
87707
  if (!o.face || this.contains(this._selected, o.object))
87698
87708
  continue;
87699
- const s = Zt(0, 1, 0);
87709
+ const s = Lt(0, 1, 0);
87700
87710
  this._groundPlane.setFromNormalAndCoplanarPoint(s, o.point);
87701
87711
  break;
87702
87712
  }
@@ -90683,7 +90693,7 @@ class $h extends FA {
90683
90693
  update() {
90684
90694
  if (!this.from)
90685
90695
  return;
90686
- var e = He(this.from), t = Ht(this.from);
90696
+ var e = He(this.from), t = Yt(this.from);
90687
90697
  this.offset.copy(this.positionOffset);
90688
90698
  const i = this.offset.length();
90689
90699
  if (this.referenceSpace && this.offset.transformDirection(this.referenceSpace.matrixWorld).multiplyScalar(i), e.add(this.offset), this.levelPosition && this.referenceSpace) {
@@ -95718,7 +95728,7 @@ class _pA {
95718
95728
  const e = A.map;
95719
95729
  if (this.clonedTexture.original !== e || !this.clonedTexture.clone) {
95720
95730
  const t = e.clone();
95721
- t.premultiplyAlpha = !1, t.colorSpace = Lt, this.clonedTexture.original = e, this.clonedTexture.clone = t;
95731
+ t.premultiplyAlpha = !1, t.colorSpace = _t, this.clonedTexture.original = e, this.clonedTexture.clone = t;
95722
95732
  }
95723
95733
  return this.clonedTexture.clone;
95724
95734
  }
@@ -96034,7 +96044,7 @@ const wS = class extends FA {
96034
96044
  this._cameraScale = s.x;
96035
96045
  }
96036
96046
  const t = !this.worldspace, i = this.gameObject;
96037
- if (Ht(i, this.__worldQuaternion), this._worldQuaternionInverted.copy(this.__worldQuaternion).invert(), ni(this.gameObject, this._worldScale), t && this._container && ((I = this.gameObject) != null && I.parent)) {
96047
+ if (Yt(i, this.__worldQuaternion), this._worldQuaternionInverted.copy(this.__worldQuaternion).invert(), ni(this.gameObject, this._worldScale), t && this._container && ((I = this.gameObject) != null && I.parent)) {
96038
96048
  const s = hZ(this, QK);
96039
96049
  this._container.matrix.makeScale(s.x, s.y, s.z), this._container.matrix.makeRotationFromQuaternion(this.__worldQuaternion), this._container.matrix.setPosition(this.worldPos), this._container.matrix.scale(this.gameObject.scale);
96040
96050
  }
@@ -96072,7 +96082,7 @@ bi([
96072
96082
  D(Wi)
96073
96083
  ], Rg.prototype, "shape", 2);
96074
96084
  bi([
96075
- D(_t)
96085
+ D(Tt)
96076
96086
  ], Rg.prototype, "noise", 2);
96077
96087
  bi([
96078
96088
  D(Ki)
@@ -98147,7 +98157,10 @@ class co extends FA {
98147
98157
  }
98148
98158
  /** @internal */
98149
98159
  awake() {
98150
- this.scenes === void 0 && (this.scenes = []), Zo && console.log("SceneSwitcher", this);
98160
+ this.scenes === void 0 && (this.scenes = []);
98161
+ for (const e of this.scenes)
98162
+ e && !e.hasUrl && e.asset instanceof DA && e.asset.removeFromParent();
98163
+ Zo && console.log("SceneSwitcher", this);
98151
98164
  }
98152
98165
  /** @internal */
98153
98166
  async onEnable() {
@@ -98271,7 +98284,7 @@ class co extends FA {
98271
98284
  const s = o.sceneClosing();
98272
98285
  s instanceof Promise && await s;
98273
98286
  }
98274
- this._currentScene.unload();
98287
+ this._currentScene.hasUrl ? this._currentScene.unload() : this._currentScene.asset instanceof DA && this._currentScene.asset.removeFromParent();
98275
98288
  }
98276
98289
  this._currentScene = void 0;
98277
98290
  const t = this._currentIndex = ((i = this.scenes) == null ? void 0 : i.indexOf(e)) ?? -1;
@@ -99633,7 +99646,7 @@ const GZ = (TU = class extends FA {
99633
99646
  this.positionAxes & uu.X && (i.x = Ie.lerp(i.x, e.x, t)), this.positionAxes & uu.Y && (i.y = Ie.lerp(i.y, e.y, t)), this.positionAxes & uu.Z && (i.z = Ie.lerp(i.z, e.z, t)), this.worldPosition = i;
99634
99647
  }
99635
99648
  if (this.rotateFactor > 0) {
99636
- const e = Ht(this.target);
99649
+ const e = Yt(this.target);
99637
99650
  this.flipForward && e.premultiply(GZ._invertForward);
99638
99651
  const t = this._firstUpdate || A ? 1 : Ie.clamp01(this.context.time.deltaTime * this.rotateFactor);
99639
99652
  this.worldQuaternion = this.worldQuaternion.slerp(e, t);
@@ -100492,7 +100505,7 @@ const lK = (YU = class extends FA {
100492
100505
  if (!this.context.connection.isConnected || this.context.connection.connectionId === null)
100493
100506
  return;
100494
100507
  this._model === null && (this._model = new jfA(this.context.connection.connectionId, this.context.connection.connectionId + "_camera"));
100495
- const e = He(A), t = Ht(A);
100508
+ const e = He(A), t = Yt(A);
100496
100509
  (e.distanceTo(this._lastWorldPosition) > 1e-3 || t.angleTo(this._lastWorldQuaternion) > 0.01) && (this._needsUpdate = !0), this._lastWorldPosition.copy(e), this._lastWorldQuaternion.copy(t), !((!this._needsUpdate || this.context.time.frameCount % 2 !== 0) && !(this.context.time.realtimeSinceStartup - this._lastUpdateTime > this._camTimeoutInSeconds * 0.5)) && (this._lastUpdateTime = this.context.time.realtimeSinceStartup, this._needsUpdate = !1, this._model.send(A, this.context.connection), this.context.isInXR || this.context.players.setPlayerView(this.context.connection.connectionId, A, PQ.Browser));
100497
100510
  }
100498
100511
  onReceivedRemoteCameraInfoBin(A) {
@@ -101840,7 +101853,7 @@ class tM extends FA {
101840
101853
  this.controlVisibility && (this.gameObject.visible = !1);
101841
101854
  return;
101842
101855
  }
101843
- this.controlVisibility && (this.gameObject.visible = !0), this.useGripSpace || t.targetRayMode === "transient-pointer" ? (this.gameObject.worldPosition = t.gripWorldPosition, this.gameObject.worldQuaternion = t.gripWorldQuaternion) : (this.gameObject.worldPosition = t.rayWorldPosition, this.gameObject.worldQuaternion = t.rayWorldQuaternion);
101856
+ this.controlVisibility && (this.gameObject.visible = !0), this.useGripSpace || t.targetRayMode === "transient-pointer" ? (this.gameObject.worldPosition = t.gripWorldPosition, this.gameObject.worldQuaternion = t.gripWorldQuaternion, this.gameObject.worldScale = Lt(t.xr.rigScale, t.xr.rigScale, t.xr.rigScale)) : (this.gameObject.worldPosition = t.rayWorldPosition, this.gameObject.worldQuaternion = t.rayWorldQuaternion, this.gameObject.worldScale = Lt(t.xr.rigScale, t.xr.rigScale, t.xr.rigScale));
101844
101857
  }
101845
101858
  }
101846
101859
  }
@@ -102007,7 +102020,7 @@ const SDA = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
102007
102020
  NeedleMenu: Xa,
102008
102021
  NestedGltf: Dx,
102009
102022
  Networking: tD,
102010
- NoiseModule: _t,
102023
+ NoiseModule: Tt,
102011
102024
  ObjectRaycaster: _s,
102012
102025
  OffsetConstraint: $h,
102013
102026
  OpenURL: iD,
@@ -102234,7 +102247,7 @@ X.add("MinMaxGradient", as);
102234
102247
  X.add("NeedleMenu", Xa);
102235
102248
  X.add("NestedGltf", Dx);
102236
102249
  X.add("Networking", tD);
102237
- X.add("NoiseModule", _t);
102250
+ X.add("NoiseModule", Tt);
102238
102251
  X.add("ObjectRaycaster", _s);
102239
102252
  X.add("OffsetConstraint", $h);
102240
102253
  X.add("OpenURL", iD);
@@ -103278,11 +103291,11 @@ let Uu = null;
103278
103291
  function si() {
103279
103292
  return Uu !== null && Uu.byteLength !== 0 || (Uu = new Float32Array(k.memory.buffer)), Uu;
103280
103293
  }
103281
- let Pt = 128;
103294
+ let Wt = 128;
103282
103295
  function ui(g) {
103283
- if (Pt == 1)
103296
+ if (Wt == 1)
103284
103297
  throw new Error("out of js stack");
103285
- return ht[--Pt] = g, Pt;
103298
+ return ht[--Wt] = g, Wt;
103286
103299
  }
103287
103300
  function F2(g, A) {
103288
103301
  return g >>>= 0, si().subarray(g / 4, g / 4 + A);
@@ -103705,7 +103718,7 @@ class mi {
103705
103718
  try {
103706
103719
  k.rawcolliderset_forEachColliderHandle(this.__wbg_ptr, ui(A));
103707
103720
  } finally {
103708
- ht[Pt++] = void 0;
103721
+ ht[Wt++] = void 0;
103709
103722
  }
103710
103723
  }
103711
103724
  }
@@ -103969,7 +103982,7 @@ class YDA {
103969
103982
  try {
103970
103983
  eA(e, Ti), eA(t, mi), eA(i, Hx), k.rawdynamicraycastvehiclecontroller_update_vehicle(this.__wbg_ptr, A, e.__wbg_ptr, t.__wbg_ptr, i.__wbg_ptr, I, !ue(o), ue(o) ? 0 : o, ui(s));
103971
103984
  } finally {
103972
- ht[Pt++] = void 0;
103985
+ ht[Wt++] = void 0;
103973
103986
  }
103974
103987
  }
103975
103988
  wheel_chassis_connection_point_cs(A) {
@@ -104242,14 +104255,14 @@ class $Z {
104242
104255
  try {
104243
104256
  k.raweventqueue_drainCollisionEvents(this.__wbg_ptr, ui(A));
104244
104257
  } finally {
104245
- ht[Pt++] = void 0;
104258
+ ht[Wt++] = void 0;
104246
104259
  }
104247
104260
  }
104248
104261
  drainContactForceEvents(A) {
104249
104262
  try {
104250
104263
  k.raweventqueue_drainContactForceEvents(this.__wbg_ptr, ui(A));
104251
104264
  } finally {
104252
- ht[Pt++] = void 0;
104265
+ ht[Wt++] = void 0;
104253
104266
  }
104254
104267
  }
104255
104268
  clear() {
@@ -104401,14 +104414,14 @@ class _a {
104401
104414
  try {
104402
104415
  k.rawimpulsejointset_forEachJointHandle(this.__wbg_ptr, ui(A));
104403
104416
  } finally {
104404
- ht[Pt++] = void 0;
104417
+ ht[Wt++] = void 0;
104405
104418
  }
104406
104419
  }
104407
104420
  forEachJointAttachedToRigidBody(A, e) {
104408
104421
  try {
104409
104422
  k.rawimpulsejointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, ui(e));
104410
104423
  } finally {
104411
- ht[Pt++] = void 0;
104424
+ ht[Wt++] = void 0;
104412
104425
  }
104413
104426
  }
104414
104427
  }
@@ -104513,7 +104526,7 @@ class Ta {
104513
104526
  try {
104514
104527
  k.rawislandmanager_forEachActiveRigidBodyHandle(this.__wbg_ptr, ui(A));
104515
104528
  } finally {
104516
- ht[Pt++] = void 0;
104529
+ ht[Wt++] = void 0;
104517
104530
  }
104518
104531
  }
104519
104532
  }
@@ -104617,7 +104630,7 @@ class ODA {
104617
104630
  try {
104618
104631
  eA(e, Ti), eA(t, mi), eA(i, Hx), eA(o, aA), k.rawkinematiccharactercontroller_computeColliderMovement(this.__wbg_ptr, A, e.__wbg_ptr, t.__wbg_ptr, i.__wbg_ptr, I, o.__wbg_ptr, s, !ue(n), ue(n) ? 0 : n, r, !ue(a), ue(a) ? 0 : a, ui(C));
104619
104632
  } finally {
104620
- ht[Pt++] = void 0;
104633
+ ht[Wt++] = void 0;
104621
104634
  }
104622
104635
  }
104623
104636
  computedMovement() {
@@ -104699,14 +104712,14 @@ class Ha {
104699
104712
  try {
104700
104713
  k.rawmultibodyjointset_forEachJointHandle(this.__wbg_ptr, ui(A));
104701
104714
  } finally {
104702
- ht[Pt++] = void 0;
104715
+ ht[Wt++] = void 0;
104703
104716
  }
104704
104717
  }
104705
104718
  forEachJointAttachedToRigidBody(A, e) {
104706
104719
  try {
104707
104720
  k.rawmultibodyjointset_forEachJointAttachedToRigidBody(this.__wbg_ptr, A, ui(e));
104708
104721
  } finally {
104709
- ht[Pt++] = void 0;
104722
+ ht[Wt++] = void 0;
104710
104723
  }
104711
104724
  }
104712
104725
  }
@@ -104844,7 +104857,7 @@ class Hx {
104844
104857
  const Q = k.rawquerypipeline_castRay(this.__wbg_ptr, A.__wbg_ptr, e.__wbg_ptr, t.__wbg_ptr, i.__wbg_ptr, I, o, s, !ue(n), ue(n) ? 0 : n, !ue(r), ue(r) ? 0 : r, !ue(a), ue(a) ? 0 : a, ui(C));
104845
104858
  return Q === 0 ? void 0 : Yx.__wrap(Q);
104846
104859
  } finally {
104847
- ht[Pt++] = void 0;
104860
+ ht[Wt++] = void 0;
104848
104861
  }
104849
104862
  }
104850
104863
  castRayAndGetNormal(A, e, t, i, I, o, s, n, r, a, C) {
@@ -104853,14 +104866,14 @@ class Hx {
104853
104866
  const Q = k.rawquerypipeline_castRayAndGetNormal(this.__wbg_ptr, A.__wbg_ptr, e.__wbg_ptr, t.__wbg_ptr, i.__wbg_ptr, I, o, s, !ue(n), ue(n) ? 0 : n, !ue(r), ue(r) ? 0 : r, !ue(a), ue(a) ? 0 : a, ui(C));
104854
104867
  return Q === 0 ? void 0 : IM.__wrap(Q);
104855
104868
  } finally {
104856
- ht[Pt++] = void 0;
104869
+ ht[Wt++] = void 0;
104857
104870
  }
104858
104871
  }
104859
104872
  intersectionsWithRay(A, e, t, i, I, o, s, n, r, a, C, Q) {
104860
104873
  try {
104861
104874
  eA(A, Ti), eA(e, mi), eA(t, aA), eA(i, aA), k.rawquerypipeline_intersectionsWithRay(this.__wbg_ptr, A.__wbg_ptr, e.__wbg_ptr, t.__wbg_ptr, i.__wbg_ptr, I, o, ui(s), n, !ue(r), ue(r) ? 0 : r, !ue(a), ue(a) ? 0 : a, !ue(C), ue(C) ? 0 : C, ui(Q));
104862
104875
  } finally {
104863
- ht[Pt++] = void 0, ht[Pt++] = void 0;
104876
+ ht[Wt++] = void 0, ht[Wt++] = void 0;
104864
104877
  }
104865
104878
  }
104866
104879
  intersectionWithShape(A, e, t, i, I, o, s, n, r, a) {
@@ -104870,7 +104883,7 @@ class Hx {
104870
104883
  var C = Oe()[c / 4 + 0], Q = If()[c / 8 + 1];
104871
104884
  return C === 0 ? void 0 : Q;
104872
104885
  } finally {
104873
- k.__wbindgen_add_to_stack_pointer(16), ht[Pt++] = void 0;
104886
+ k.__wbindgen_add_to_stack_pointer(16), ht[Wt++] = void 0;
104874
104887
  }
104875
104888
  }
104876
104889
  projectPoint(A, e, t, i, I, o, s, n, r) {
@@ -104879,7 +104892,7 @@ class Hx {
104879
104892
  const a = k.rawquerypipeline_projectPoint(this.__wbg_ptr, A.__wbg_ptr, e.__wbg_ptr, t.__wbg_ptr, i, I, !ue(o), ue(o) ? 0 : o, !ue(s), ue(s) ? 0 : s, !ue(n), ue(n) ? 0 : n, ui(r));
104880
104893
  return a === 0 ? void 0 : m0.__wrap(a);
104881
104894
  } finally {
104882
- ht[Pt++] = void 0;
104895
+ ht[Wt++] = void 0;
104883
104896
  }
104884
104897
  }
104885
104898
  projectPointAndGetFeature(A, e, t, i, I, o, s, n) {
@@ -104888,14 +104901,14 @@ class Hx {
104888
104901
  const r = k.rawquerypipeline_projectPointAndGetFeature(this.__wbg_ptr, A.__wbg_ptr, e.__wbg_ptr, t.__wbg_ptr, i, !ue(I), ue(I) ? 0 : I, !ue(o), ue(o) ? 0 : o, !ue(s), ue(s) ? 0 : s, ui(n));
104889
104902
  return r === 0 ? void 0 : m0.__wrap(r);
104890
104903
  } finally {
104891
- ht[Pt++] = void 0;
104904
+ ht[Wt++] = void 0;
104892
104905
  }
104893
104906
  }
104894
104907
  intersectionsWithPoint(A, e, t, i, I, o, s, n, r) {
104895
104908
  try {
104896
104909
  eA(A, Ti), eA(e, mi), eA(t, aA), k.rawquerypipeline_intersectionsWithPoint(this.__wbg_ptr, A.__wbg_ptr, e.__wbg_ptr, t.__wbg_ptr, ui(i), I, !ue(o), ue(o) ? 0 : o, !ue(s), ue(s) ? 0 : s, !ue(n), ue(n) ? 0 : n, ui(r));
104897
104910
  } finally {
104898
- ht[Pt++] = void 0, ht[Pt++] = void 0;
104911
+ ht[Wt++] = void 0, ht[Wt++] = void 0;
104899
104912
  }
104900
104913
  }
104901
104914
  castShape(A, e, t, i, I, o, s, n, r, a, C, Q, c) {
@@ -104904,21 +104917,21 @@ class Hx {
104904
104917
  const E = k.rawquerypipeline_castShape(this.__wbg_ptr, A.__wbg_ptr, e.__wbg_ptr, t.__wbg_ptr, i.__wbg_ptr, I.__wbg_ptr, o.__wbg_ptr, s, n, r, !ue(a), ue(a) ? 0 : a, !ue(C), ue(C) ? 0 : C, !ue(Q), ue(Q) ? 0 : Q, ui(c));
104905
104918
  return E === 0 ? void 0 : sM.__wrap(E);
104906
104919
  } finally {
104907
- ht[Pt++] = void 0;
104920
+ ht[Wt++] = void 0;
104908
104921
  }
104909
104922
  }
104910
104923
  intersectionsWithShape(A, e, t, i, I, o, s, n, r, a, C) {
104911
104924
  try {
104912
104925
  eA(A, Ti), eA(e, mi), eA(t, aA), eA(i, at), eA(I, Ke), k.rawquerypipeline_intersectionsWithShape(this.__wbg_ptr, A.__wbg_ptr, e.__wbg_ptr, t.__wbg_ptr, i.__wbg_ptr, I.__wbg_ptr, ui(o), s, !ue(n), ue(n) ? 0 : n, !ue(r), ue(r) ? 0 : r, !ue(a), ue(a) ? 0 : a, ui(C));
104913
104926
  } finally {
104914
- ht[Pt++] = void 0, ht[Pt++] = void 0;
104927
+ ht[Wt++] = void 0, ht[Wt++] = void 0;
104915
104928
  }
104916
104929
  }
104917
104930
  collidersWithAabbIntersectingAabb(A, e, t) {
104918
104931
  try {
104919
104932
  eA(A, aA), eA(e, aA), k.rawquerypipeline_collidersWithAabbIntersectingAabb(this.__wbg_ptr, A.__wbg_ptr, e.__wbg_ptr, ui(t));
104920
104933
  } finally {
104921
- ht[Pt++] = void 0;
104934
+ ht[Wt++] = void 0;
104922
104935
  }
104923
104936
  }
104924
104937
  }
@@ -105256,7 +105269,7 @@ class Ti {
105256
105269
  try {
105257
105270
  k.rawrigidbodyset_forEachRigidBodyHandle(this.__wbg_ptr, ui(A));
105258
105271
  } finally {
105259
- ht[Pt++] = void 0;
105272
+ ht[Wt++] = void 0;
105260
105273
  }
105261
105274
  }
105262
105275
  propagateModifiedBodyPositionsToColliders(A) {
@@ -108651,7 +108664,7 @@ const Bp = class {
108651
108664
  throw new Error("Physics world not initialized");
108652
108665
  const t = this._tempMatrix;
108653
108666
  let i;
108654
- A.attachedRigidbody ? i = this.getRigidbody(A, this._tempMatrix) : (vi && console.log("Create collider without rigidbody", A.name), t.makeRotationFromQuaternion(Ht(A.gameObject)), t.setPosition(He(A.gameObject))), t.decompose(this._tempPosition, this._tempQuaternion, this._tempScale), this.tryApplyCenter(A, this._tempPosition), e.setTranslation(this._tempPosition.x, this._tempPosition.y, this._tempPosition.z), e.setRotation(this._tempQuaternion), e.setSensor(A.isTrigger);
108667
+ A.attachedRigidbody ? i = this.getRigidbody(A, this._tempMatrix) : (vi && console.log("Create collider without rigidbody", A.name), t.makeRotationFromQuaternion(Yt(A.gameObject)), t.setPosition(He(A.gameObject))), t.decompose(this._tempPosition, this._tempQuaternion, this._tempScale), this.tryApplyCenter(A, this._tempPosition), e.setTranslation(this._tempPosition.x, this._tempPosition.y, this._tempPosition.z), e.setRotation(this._tempQuaternion), e.setSensor(A.isTrigger);
108655
108668
  const I = A.sharedMaterial;
108656
108669
  if (I) {
108657
108670
  if (I.bounciness !== void 0 && e.setRestitution(I.bounciness), I.bounceCombine !== void 0)
@@ -108730,12 +108743,12 @@ Error:`, s), null;
108730
108743
  const I = i.isKinematic && !UU;
108731
108744
  vi && console.log("Create rigidbody", I);
108732
108745
  const o = I ? Aa.RigidBodyDesc.kinematicPositionBased() : Aa.RigidBodyDesc.dynamic(), s = He(A.attachedRigidbody.gameObject);
108733
- o.setTranslation(s.x, s.y, s.z), o.setRotation(Ht(A.attachedRigidbody.gameObject)), o.centerOfMass = new Aa.Vector3(i.centerOfMass.x, i.centerOfMass.y, i.centerOfMass.z), t = this.world.createRigidBody(o), this.bodies.push(t), this.objects.push(i);
108746
+ o.setTranslation(s.x, s.y, s.z), o.setRotation(Yt(A.attachedRigidbody.gameObject)), o.centerOfMass = new Aa.Vector3(i.centerOfMass.x, i.centerOfMass.y, i.centerOfMass.z), t = this.world.createRigidBody(o), this.bodies.push(t), this.objects.push(i);
108734
108747
  }
108735
108748
  t[po] = i, i[XI] = t, this.internalUpdateRigidbodyProperties(i, t), this.getRigidbodyRelativeMatrix(A.gameObject, i.gameObject, e), A[b2] = t;
108736
108749
  } else {
108737
108750
  const i = Aa.RigidBodyDesc.kinematicPositionBased(), I = He(A.gameObject);
108738
- i.setTranslation(I.x, I.y, I.z), i.setRotation(Ht(A.gameObject)), t = this.world.createRigidBody(i), e.identity(), t[po] = null;
108751
+ i.setTranslation(I.x, I.y, I.z), i.setRotation(Yt(A.gameObject)), t = this.world.createRigidBody(i), e.identity(), t[po] = null;
108739
108752
  }
108740
108753
  return t;
108741
108754
  }
@@ -108840,7 +108853,7 @@ Error:`, s), null;
108840
108853
  }
108841
108854
  syncPhysicsBody(A, e, t, i) {
108842
108855
  if (e instanceof Qh) {
108843
- const I = He(A, this._tempPosition), o = Ht(A, this._tempQuaternion);
108856
+ const I = He(A, this._tempPosition), o = Yt(A, this._tempQuaternion);
108844
108857
  switch (e.bodyType()) {
108845
108858
  case io.Fixed:
108846
108859
  case io.KinematicPositionBased:
@@ -108852,7 +108865,7 @@ Error:`, s), null;
108852
108865
  break;
108853
108866
  }
108854
108867
  } else if (e instanceof lh) {
108855
- const I = He(A, this._tempPosition), o = Ht(A, this._tempQuaternion), s = e[po];
108868
+ const I = He(A, this._tempPosition), o = Yt(A, this._tempQuaternion), s = e[po];
108856
108869
  if (this.tryApplyCenter(s, I), t) {
108857
108870
  const n = e.translation();
108858
108871
  (n.x !== I.x || n.y !== I.y || n.z !== I.z) && e.setTranslation(I);
@@ -108865,7 +108878,7 @@ Error:`, s), null;
108865
108878
  }
108866
108879
  tryApplyCenter(A, e) {
108867
108880
  const t = A.center;
108868
- t && A.gameObject && (t.x !== 0 || t.y !== 0 || t.z !== 0) && (this._tempCenterPos.x = -t.x, this._tempCenterPos.y = t.y, this._tempCenterPos.z = t.z, ni(A.gameObject, this._tempCenterVec), this._tempCenterPos.multiply(this._tempCenterVec), A.attachedRigidbody ? this._tempCenterPos.applyQuaternion(A.gameObject.quaternion) : (Ht(A.gameObject, this._tempCenterQuaternion), this._tempCenterPos.applyQuaternion(this._tempCenterQuaternion)), e.x += this._tempCenterPos.x, e.y += this._tempCenterPos.y, e.z += this._tempCenterPos.z);
108881
+ t && A.gameObject && (t.x !== 0 || t.y !== 0 || t.z !== 0) && (this._tempCenterPos.x = -t.x, this._tempCenterPos.y = t.y, this._tempCenterPos.z = t.z, ni(A.gameObject, this._tempCenterVec), this._tempCenterPos.multiply(this._tempCenterVec), A.attachedRigidbody ? this._tempCenterPos.applyQuaternion(A.gameObject.quaternion) : (Yt(A.gameObject, this._tempCenterQuaternion), this._tempCenterPos.applyQuaternion(this._tempCenterQuaternion)), e.x += this._tempCenterPos.x, e.y += this._tempCenterPos.y, e.z += this._tempCenterPos.z);
108869
108882
  }
108870
108883
  getRigidbodyRelativeMatrix(A, e, t, i) {
108871
108884
  if (i === void 0 && (i = Bp._matricesBuffer, i.length = 0), A === e) {
@@ -109528,10 +109541,10 @@ class hyA {
109528
109541
  return A !== void 0 && (this.tail = (this.tail + 1) % this.elements.length), A;
109529
109542
  }
109530
109543
  }
109531
- var Tt;
109544
+ var Ht;
109532
109545
  (function(g) {
109533
109546
  g.open = "open", g.close = "close", g.error = "error", g.message = "message", g.retry = "retry", g.reconnect = "reconnect";
109534
- })(Tt || (Tt = {}));
109547
+ })(Ht || (Ht = {}));
109535
109548
  class rj {
109536
109549
  /**
109537
109550
  * Creates a new websocket.
@@ -109542,7 +109555,7 @@ class rj {
109542
109555
  */
109543
109556
  constructor(A, e, t) {
109544
109557
  var i, I, o, s, n, r, a, C, Q, c, E, h, l, d, p;
109545
- this._closedByUser = !1, this.handleOpenEvent = (u) => this.handleEvent(Tt.open, u), this.handleErrorEvent = (u) => this.handleEvent(Tt.error, u), this.handleCloseEvent = (u) => this.handleEvent(Tt.close, u), this.handleMessageEvent = (u) => this.handleEvent(Tt.message, u), this._url = A, this._protocols = e, this._options = {
109558
+ this._closedByUser = !1, this.handleOpenEvent = (u) => this.handleEvent(Ht.open, u), this.handleErrorEvent = (u) => this.handleEvent(Ht.error, u), this.handleCloseEvent = (u) => this.handleEvent(Ht.close, u), this.handleMessageEvent = (u) => this.handleEvent(Ht.message, u), this._url = A, this._protocols = e, this._options = {
109546
109559
  buffer: t == null ? void 0 : t.buffer,
109547
109560
  retry: {
109548
109561
  maxRetries: (i = t == null ? void 0 : t.retry) === null || i === void 0 ? void 0 : i.maxRetries,
@@ -109727,13 +109740,13 @@ class rj {
109727
109740
  * @return the created browser-native websocket which is also stored in the '_underlyingWebsocket' property.
109728
109741
  */
109729
109742
  tryConnect() {
109730
- return this._underlyingWebsocket = new WebSocket(this.url, this.protocols), this._underlyingWebsocket.addEventListener(Tt.open, this.handleOpenEvent), this._underlyingWebsocket.addEventListener(Tt.close, this.handleCloseEvent), this._underlyingWebsocket.addEventListener(Tt.error, this.handleErrorEvent), this._underlyingWebsocket.addEventListener(Tt.message, this.handleMessageEvent), this._underlyingWebsocket;
109743
+ return this._underlyingWebsocket = new WebSocket(this.url, this.protocols), this._underlyingWebsocket.addEventListener(Ht.open, this.handleOpenEvent), this._underlyingWebsocket.addEventListener(Ht.close, this.handleCloseEvent), this._underlyingWebsocket.addEventListener(Ht.error, this.handleErrorEvent), this._underlyingWebsocket.addEventListener(Ht.message, this.handleMessageEvent), this._underlyingWebsocket;
109731
109744
  }
109732
109745
  /**
109733
109746
  * Removes all event listeners from the browser-native websocket and closes it.
109734
109747
  */
109735
109748
  clearWebsocket() {
109736
- this._underlyingWebsocket.removeEventListener(Tt.open, this.handleOpenEvent), this._underlyingWebsocket.removeEventListener(Tt.close, this.handleCloseEvent), this._underlyingWebsocket.removeEventListener(Tt.error, this.handleErrorEvent), this._underlyingWebsocket.removeEventListener(Tt.message, this.handleMessageEvent), this._underlyingWebsocket.close();
109749
+ this._underlyingWebsocket.removeEventListener(Ht.open, this.handleOpenEvent), this._underlyingWebsocket.removeEventListener(Ht.close, this.handleCloseEvent), this._underlyingWebsocket.removeEventListener(Ht.error, this.handleErrorEvent), this._underlyingWebsocket.removeEventListener(Ht.message, this.handleMessageEvent), this._underlyingWebsocket.close();
109737
109750
  }
109738
109751
  /**
109739
109752
  * Dispatch an event to all listeners of the given event-type.
@@ -109755,22 +109768,22 @@ class rj {
109755
109768
  */
109756
109769
  handleEvent(A, e) {
109757
109770
  switch (A) {
109758
- case Tt.close:
109771
+ case Ht.close:
109759
109772
  this.dispatchEvent(A, e), this.scheduleConnectionRetryIfNeeded();
109760
109773
  break;
109761
- case Tt.open:
109774
+ case Ht.open:
109762
109775
  if (this.backoff !== void 0 && this._lastConnection !== void 0) {
109763
109776
  const t = {
109764
109777
  retries: this.backoff.retries,
109765
109778
  lastConnection: new Date(this._lastConnection)
109766
- }, i = new CustomEvent(Tt.reconnect, {
109779
+ }, i = new CustomEvent(Ht.reconnect, {
109767
109780
  detail: t
109768
109781
  });
109769
- this.dispatchEvent(Tt.reconnect, i), this.backoff.reset();
109782
+ this.dispatchEvent(Ht.reconnect, i), this.backoff.reset();
109770
109783
  }
109771
109784
  this._lastConnection = /* @__PURE__ */ new Date(), this.dispatchEvent(A, e), this.sendBufferedData();
109772
109785
  break;
109773
- case Tt.retry:
109786
+ case Ht.retry:
109774
109787
  this.dispatchEvent(A, e), this.clearWebsocket(), this.tryConnect();
109775
109788
  break;
109776
109789
  default:
@@ -109793,8 +109806,8 @@ class rj {
109793
109806
  if (this.closedByUser || this.backoff === void 0)
109794
109807
  return;
109795
109808
  const A = (t) => {
109796
- const i = new CustomEvent(Tt.retry, { detail: t });
109797
- this.handleEvent(Tt.retry, i);
109809
+ const i = new CustomEvent(Ht.retry, { detail: t });
109810
+ this.handleEvent(Ht.retry, i);
109798
109811
  }, e = {
109799
109812
  backoff: this._options.retry.instantReconnect === !0 ? 0 : this.backoff.next(),
109800
109813
  retries: this._options.retry.instantReconnect === !0 ? 0 : this.backoff.retries,
@@ -109921,7 +109934,7 @@ class dyA {
109921
109934
  * @param options the listener options
109922
109935
  */
109923
109936
  onOpen(A, e) {
109924
- return this.addListener(Tt.open, A, e), this;
109937
+ return this.addListener(Ht.open, A, e), this;
109925
109938
  }
109926
109939
  /**
109927
109940
  * Adds an 'close' event listener to the websocket. Subsequent calls to this method will add additional listeners that will be
@@ -109931,7 +109944,7 @@ class dyA {
109931
109944
  * @param options the listener options
109932
109945
  */
109933
109946
  onClose(A, e) {
109934
- return this.addListener(Tt.close, A, e), this;
109947
+ return this.addListener(Ht.close, A, e), this;
109935
109948
  }
109936
109949
  /**
109937
109950
  * Adds an 'error' event listener to the websocket. Subsequent calls to this method will add additional listeners that will be
@@ -109941,7 +109954,7 @@ class dyA {
109941
109954
  * @param options the listener options
109942
109955
  */
109943
109956
  onError(A, e) {
109944
- return this.addListener(Tt.error, A, e), this;
109957
+ return this.addListener(Ht.error, A, e), this;
109945
109958
  }
109946
109959
  /**
109947
109960
  * Adds an 'message' event listener to the websocket. Subsequent calls to this method will add additional listeners that will be
@@ -109951,7 +109964,7 @@ class dyA {
109951
109964
  * @param options the listener options
109952
109965
  */
109953
109966
  onMessage(A, e) {
109954
- return this.addListener(Tt.message, A, e), this;
109967
+ return this.addListener(Ht.message, A, e), this;
109955
109968
  }
109956
109969
  /**
109957
109970
  * Adds an 'retry' event listener to the websocket. Subsequent calls to this method will add additional listeners that will be
@@ -109961,7 +109974,7 @@ class dyA {
109961
109974
  * @param options the listener options
109962
109975
  */
109963
109976
  onRetry(A, e) {
109964
- return this.addListener(Tt.retry, A, e), this;
109977
+ return this.addListener(Ht.retry, A, e), this;
109965
109978
  }
109966
109979
  /**
109967
109980
  * Adds an 'reconnect' event listener to the websocket. Subsequent calls to this method will add additional listeners that will be
@@ -109971,7 +109984,7 @@ class dyA {
109971
109984
  * @param options the listener options
109972
109985
  */
109973
109986
  onReconnect(A, e) {
109974
- return this.addListener(Tt.reconnect, A, e), this;
109987
+ return this.addListener(Ht.reconnect, A, e), this;
109975
109988
  }
109976
109989
  /**
109977
109990
  * Builds the websocket.
@@ -110014,7 +110027,7 @@ const uyA = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
110014
110027
  Websocket: rj,
110015
110028
  WebsocketBuilder: dyA,
110016
110029
  get WebsocketEvent() {
110017
- return Tt;
110030
+ return Ht;
110018
110031
  }
110019
110032
  }, Symbol.toStringTag, { value: "Module" })), ps = {
110020
110033
  node: "node",
@@ -110540,7 +110553,7 @@ export {
110540
110553
  dk as NetworkedStreams,
110541
110554
  tD as Networking,
110542
110555
  nQA as NewInstanceModel,
110543
- _t as NoiseModule,
110556
+ Tt as NoiseModule,
110544
110557
  _s as ObjectRaycaster,
110545
110558
  ek as ObjectUtils,
110546
110559
  $h as OffsetConstraint,
@@ -110782,12 +110795,12 @@ export {
110782
110795
  QBA as getPeerjsInstance,
110783
110796
  s0A as getResourceUserCount,
110784
110797
  El as getTempQuaternion,
110785
- Zt as getTempVector,
110798
+ Lt as getTempVector,
110786
110799
  Mm as getUrlParams,
110787
110800
  LP as getWorldDirection,
110788
110801
  _P as getWorldEuler,
110789
110802
  He as getWorldPosition,
110790
- Ht as getWorldQuaternion,
110803
+ Yt as getWorldQuaternion,
110791
110804
  bm as getWorldRotation,
110792
110805
  ni as getWorldScale,
110793
110806
  IB as hasCommercialLicense,