@needle-tools/engine 4.1.0-alpha.8 → 4.1.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11222,7 +11222,7 @@ function PBA(s, A, e, t, i, g, o) {
11222
11222
  CA = Ho.vertexShader, fA = Ho.fragmentShader;
11223
11223
  } else
11224
11224
  CA = D.vertexShader, fA = D.fragmentShader, I.update(D), kA = I.getVertexShaderID(D), FA = I.getFragmentShaderID(D);
11225
- const oe = s.getRenderTarget(), Ie = K.isInstancedMesh === !0, De = K.isBatchedMesh === !0, Ye = !!D.map, LA = !!D.matcap, O = !!P, XA = !!D.aoMap, jA = !!D.lightMap, ZA = !!D.bumpMap, ge = !!D.normalMap, ke = !!D.displacementMap, Ee = !!D.emissiveMap, q = !!D.metalnessMap, L = !!D.roughnessMap, BA = D.anisotropy > 0, UA = D.clearcoat > 0, vA = D.dispersion > 0, bA = D.iridescence > 0, pe = D.sheen > 0, te = D.transmission > 0, ae = BA && !!D.anisotropyMap, je = UA && !!D.clearcoatMap, JA = UA && !!D.clearcoatNormalMap, ue = UA && !!D.clearcoatRoughnessMap, We = bA && !!D.iridescenceMap, Ue = bA && !!D.iridescenceThicknessMap, re = pe && !!D.sheenColorMap, xe = pe && !!D.sheenRoughnessMap, $e = !!D.specularMap, yt = !!D.specularColorMap, iA = !!D.specularIntensityMap, ye = te && !!D.transmissionMap, sA = te && !!D.thicknessMap, HA = !!D.gradientMap, fe = !!D.alphaMap, me = D.alphaTest > 0, Yt = !!D.alphaHash, Ss = !!D.extensions;
11225
+ const oe = s.getRenderTarget(), Ie = K.isInstancedMesh === !0, De = K.isBatchedMesh === !0, Ye = !!D.map, LA = !!D.matcap, O = !!P, XA = !!D.aoMap, $A = !!D.lightMap, ZA = !!D.bumpMap, ge = !!D.normalMap, ke = !!D.displacementMap, Ee = !!D.emissiveMap, q = !!D.metalnessMap, L = !!D.roughnessMap, BA = D.anisotropy > 0, UA = D.clearcoat > 0, vA = D.dispersion > 0, bA = D.iridescence > 0, pe = D.sheen > 0, te = D.transmission > 0, ae = BA && !!D.anisotropyMap, je = UA && !!D.clearcoatMap, JA = UA && !!D.clearcoatNormalMap, ue = UA && !!D.clearcoatRoughnessMap, We = bA && !!D.iridescenceMap, Ue = bA && !!D.iridescenceThicknessMap, re = pe && !!D.sheenColorMap, xe = pe && !!D.sheenRoughnessMap, $e = !!D.specularMap, yt = !!D.specularColorMap, iA = !!D.specularIntensityMap, ye = te && !!D.transmissionMap, sA = te && !!D.thicknessMap, HA = !!D.gradientMap, fe = !!D.alphaMap, me = D.alphaTest > 0, Yt = !!D.alphaHash, Ss = !!D.extensions;
11226
11226
  let _o = Ao;
11227
11227
  D.toneMapped && (oe === null || oe.isXRRenderTarget === !0) && (_o = s.toneMapping);
11228
11228
  const $t = {
@@ -11251,7 +11251,7 @@ function PBA(s, A, e, t, i, g, o) {
11251
11251
  envMapMode: O && P.mapping,
11252
11252
  envMapCubeUVHeight: oA,
11253
11253
  aoMap: XA,
11254
- lightMap: jA,
11254
+ lightMap: $A,
11255
11255
  bumpMap: ZA,
11256
11256
  normalMap: ge,
11257
11257
  displacementMap: l && ke,
@@ -11288,7 +11288,7 @@ function PBA(s, A, e, t, i, g, o) {
11288
11288
  //
11289
11289
  mapUv: Ye && E(D.map.channel),
11290
11290
  aoMapUv: XA && E(D.aoMap.channel),
11291
- lightMapUv: jA && E(D.lightMap.channel),
11291
+ lightMapUv: $A && E(D.lightMap.channel),
11292
11292
  bumpMapUv: ZA && E(D.bumpMap.channel),
11293
11293
  normalMapUv: ge && E(D.normalMap.channel),
11294
11294
  displacementMapUv: ke && E(D.displacementMap.channel),
@@ -12067,7 +12067,7 @@ function ohA(s) {
12067
12067
  return me;
12068
12068
  }
12069
12069
  const fA = {};
12070
- fA[s.TEXTURE_2D] = CA(s.TEXTURE_2D, s.TEXTURE_2D, 1), fA[s.TEXTURE_CUBE_MAP] = CA(s.TEXTURE_CUBE_MAP, s.TEXTURE_CUBE_MAP_POSITIVE_X, 6), fA[s.TEXTURE_2D_ARRAY] = CA(s.TEXTURE_2D_ARRAY, s.TEXTURE_2D_ARRAY, 1, 1), fA[s.TEXTURE_3D] = CA(s.TEXTURE_3D, s.TEXTURE_3D, 1, 1), i.setClear(0, 0, 0, 1), g.setClear(1), o.setClear(0), kA(s.DEPTH_TEST), g.setFunc(yl), jA(!1), ZA(cY), kA(s.CULL_FACE), O(_i);
12070
+ fA[s.TEXTURE_2D] = CA(s.TEXTURE_2D, s.TEXTURE_2D, 1), fA[s.TEXTURE_CUBE_MAP] = CA(s.TEXTURE_CUBE_MAP, s.TEXTURE_CUBE_MAP_POSITIVE_X, 6), fA[s.TEXTURE_2D_ARRAY] = CA(s.TEXTURE_2D_ARRAY, s.TEXTURE_2D_ARRAY, 1, 1), fA[s.TEXTURE_3D] = CA(s.TEXTURE_3D, s.TEXTURE_3D, 1, 1), i.setClear(0, 0, 0, 1), g.setClear(1), o.setClear(0), kA(s.DEPTH_TEST), g.setFunc(yl), $A(!1), ZA(cY), kA(s.CULL_FACE), O(_i);
12071
12071
  function kA(iA) {
12072
12072
  r[iA] !== !0 && (s.enable(iA), r[iA] = !0);
12073
12073
  }
@@ -12169,11 +12169,11 @@ function ohA(s) {
12169
12169
  function XA(iA, ye) {
12170
12170
  iA.side === Xt ? FA(s.CULL_FACE) : kA(s.CULL_FACE);
12171
12171
  let sA = iA.side === wi;
12172
- ye && (sA = !sA), jA(sA), iA.blending === ll && iA.transparent === !1 ? O(_i) : O(iA.blending, iA.blendEquation, iA.blendSrc, iA.blendDst, iA.blendEquationAlpha, iA.blendSrcAlpha, iA.blendDstAlpha, iA.blendColor, iA.blendAlpha, iA.premultipliedAlpha), g.setFunc(iA.depthFunc), g.setTest(iA.depthTest), g.setMask(iA.depthWrite), i.setMask(iA.colorWrite);
12172
+ ye && (sA = !sA), $A(sA), iA.blending === ll && iA.transparent === !1 ? O(_i) : O(iA.blending, iA.blendEquation, iA.blendSrc, iA.blendDst, iA.blendEquationAlpha, iA.blendSrcAlpha, iA.blendDstAlpha, iA.blendColor, iA.blendAlpha, iA.premultipliedAlpha), g.setFunc(iA.depthFunc), g.setTest(iA.depthTest), g.setMask(iA.depthWrite), i.setMask(iA.colorWrite);
12173
12173
  const HA = iA.stencilWrite;
12174
12174
  o.setTest(HA), HA && (o.setMask(iA.stencilWriteMask), o.setFunc(iA.stencilFunc, iA.stencilRef, iA.stencilFuncMask), o.setOp(iA.stencilFail, iA.stencilZFail, iA.stencilZPass)), ke(iA.polygonOffset, iA.polygonOffsetFactor, iA.polygonOffsetUnits), iA.alphaToCoverage === !0 ? kA(s.SAMPLE_ALPHA_TO_COVERAGE) : FA(s.SAMPLE_ALPHA_TO_COVERAGE);
12175
12175
  }
12176
- function jA(iA) {
12176
+ function $A(iA) {
12177
12177
  N !== iA && (iA ? s.frontFace(s.CW) : s.frontFace(s.CCW), N = iA);
12178
12178
  }
12179
12179
  function ZA(iA) {
@@ -12302,7 +12302,7 @@ function ohA(s) {
12302
12302
  useProgram: De,
12303
12303
  setBlending: O,
12304
12304
  setMaterial: XA,
12305
- setFlipSided: jA,
12305
+ setFlipSided: $A,
12306
12306
  setCullFace: ZA,
12307
12307
  setLineWidth: ge,
12308
12308
  setPolygonOffset: ke,
@@ -12818,16 +12818,16 @@ function chA(s, A, e, t, i, g, o) {
12818
12818
  const JA = Math.max(1, L.width >> bA), ue = Math.max(1, L.height >> bA);
12819
12819
  vA === s.TEXTURE_3D || vA === s.TEXTURE_2D_ARRAY ? e.texImage3D(vA, bA, ae, JA, ue, L.depth, 0, pe, te, null) : e.texImage2D(vA, bA, ae, JA, ue, 0, pe, te, null);
12820
12820
  }
12821
- e.bindFramebuffer(s.FRAMEBUFFER, q), ZA(L) ? n.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, UA, vA, t.get(BA).__webglTexture, 0, jA(L)) : (vA === s.TEXTURE_2D || vA >= s.TEXTURE_CUBE_MAP_POSITIVE_X && vA <= s.TEXTURE_CUBE_MAP_NEGATIVE_Z) && s.framebufferTexture2D(s.FRAMEBUFFER, UA, vA, t.get(BA).__webglTexture, bA), e.bindFramebuffer(s.FRAMEBUFFER, null);
12821
+ e.bindFramebuffer(s.FRAMEBUFFER, q), ZA(L) ? n.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, UA, vA, t.get(BA).__webglTexture, 0, $A(L)) : (vA === s.TEXTURE_2D || vA >= s.TEXTURE_CUBE_MAP_POSITIVE_X && vA <= s.TEXTURE_CUBE_MAP_NEGATIVE_Z) && s.framebufferTexture2D(s.FRAMEBUFFER, UA, vA, t.get(BA).__webglTexture, bA), e.bindFramebuffer(s.FRAMEBUFFER, null);
12822
12822
  }
12823
12823
  function kA(q, L, BA) {
12824
12824
  if (s.bindRenderbuffer(s.RENDERBUFFER, q), L.depthBuffer) {
12825
- const UA = L.depthTexture, vA = UA && UA.isDepthTexture ? UA.type : null, bA = p(L.stencilBuffer, vA), pe = L.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, te = jA(L);
12825
+ const UA = L.depthTexture, vA = UA && UA.isDepthTexture ? UA.type : null, bA = p(L.stencilBuffer, vA), pe = L.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, te = $A(L);
12826
12826
  ZA(L) ? n.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, te, bA, L.width, L.height) : BA ? s.renderbufferStorageMultisample(s.RENDERBUFFER, te, bA, L.width, L.height) : s.renderbufferStorage(s.RENDERBUFFER, bA, L.width, L.height), s.framebufferRenderbuffer(s.FRAMEBUFFER, pe, s.RENDERBUFFER, q);
12827
12827
  } else {
12828
12828
  const UA = L.textures;
12829
12829
  for (let vA = 0; vA < UA.length; vA++) {
12830
- const bA = UA[vA], pe = g.convert(bA.format, bA.colorSpace), te = g.convert(bA.type), ae = u(bA.internalFormat, pe, te, bA.colorSpace), je = jA(L);
12830
+ const bA = UA[vA], pe = g.convert(bA.format, bA.colorSpace), te = g.convert(bA.type), ae = u(bA.internalFormat, pe, te, bA.colorSpace), je = $A(L);
12831
12831
  BA && ZA(L) === !1 ? s.renderbufferStorageMultisample(s.RENDERBUFFER, je, ae, L.width, L.height) : ZA(L) ? n.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, je, ae, L.width, L.height) : s.renderbufferStorage(s.RENDERBUFFER, ae, L.width, L.height);
12832
12832
  }
12833
12833
  }
@@ -12839,7 +12839,7 @@ function chA(s, A, e, t, i, g, o) {
12839
12839
  if (e.bindFramebuffer(s.FRAMEBUFFER, q), !(L.depthTexture && L.depthTexture.isDepthTexture))
12840
12840
  throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");
12841
12841
  (!t.get(L.depthTexture).__webglTexture || L.depthTexture.image.width !== L.width || L.depthTexture.image.height !== L.height) && (L.depthTexture.image.width = L.width, L.depthTexture.image.height = L.height, L.depthTexture.needsUpdate = !0), K(L.depthTexture, 0);
12842
- const UA = t.get(L.depthTexture).__webglTexture, vA = jA(L);
12842
+ const UA = t.get(L.depthTexture).__webglTexture, vA = $A(L);
12843
12843
  if (L.depthTexture.format === cE)
12844
12844
  ZA(L) ? n.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, s.DEPTH_ATTACHMENT, s.TEXTURE_2D, UA, 0, vA) : s.framebufferTexture2D(s.FRAMEBUFFER, s.DEPTH_ATTACHMENT, s.TEXTURE_2D, UA, 0);
12845
12845
  else if (L.depthTexture.format === ah)
@@ -12914,7 +12914,7 @@ function chA(s, A, e, t, i, g, o) {
12914
12914
  for (let te = 0; te < vA.length; te++) {
12915
12915
  const ae = vA[te];
12916
12916
  BA.__webglColorRenderbuffer[te] = s.createRenderbuffer(), s.bindRenderbuffer(s.RENDERBUFFER, BA.__webglColorRenderbuffer[te]);
12917
- const je = g.convert(ae.format, ae.colorSpace), JA = g.convert(ae.type), ue = u(ae.internalFormat, je, JA, ae.colorSpace, q.isXRRenderTarget === !0), We = jA(q);
12917
+ const je = g.convert(ae.format, ae.colorSpace), JA = g.convert(ae.type), ue = u(ae.internalFormat, je, JA, ae.colorSpace, q.isXRRenderTarget === !0), We = $A(q);
12918
12918
  s.renderbufferStorageMultisample(s.RENDERBUFFER, We, ue, q.width, q.height), s.framebufferRenderbuffer(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0 + te, s.RENDERBUFFER, BA.__webglColorRenderbuffer[te]);
12919
12919
  }
12920
12920
  s.bindRenderbuffer(s.RENDERBUFFER, null), q.depthBuffer && (BA.__webglDepthRenderbuffer = s.createRenderbuffer(), kA(BA.__webglDepthRenderbuffer, q, !0)), e.bindFramebuffer(s.FRAMEBUFFER, null);
@@ -12988,7 +12988,7 @@ function chA(s, A, e, t, i, g, o) {
12988
12988
  }
12989
12989
  }
12990
12990
  }
12991
- function jA(q) {
12991
+ function $A(q) {
12992
12992
  return Math.min(i.maxSamples, q.samples);
12993
12993
  }
12994
12994
  function ZA(q) {
@@ -13425,7 +13425,7 @@ class EhA extends xg {
13425
13425
  const v = new M(), Z = new M();
13426
13426
  function P(CA, fA, kA) {
13427
13427
  v.setFromMatrixPosition(fA.matrixWorld), Z.setFromMatrixPosition(kA.matrixWorld);
13428
- const FA = v.distanceTo(Z), oe = fA.projectionMatrix.elements, Ie = kA.projectionMatrix.elements, De = oe[14] / (oe[10] - 1), Ye = oe[14] / (oe[10] + 1), LA = (oe[9] + 1) / oe[5], O = (oe[9] - 1) / oe[5], XA = (oe[8] - 1) / oe[0], jA = (Ie[8] + 1) / Ie[0], ZA = De * XA, ge = De * jA, ke = FA / (-XA + jA), Ee = ke * -XA;
13428
+ const FA = v.distanceTo(Z), oe = fA.projectionMatrix.elements, Ie = kA.projectionMatrix.elements, De = oe[14] / (oe[10] - 1), Ye = oe[14] / (oe[10] + 1), LA = (oe[9] + 1) / oe[5], O = (oe[9] - 1) / oe[5], XA = (oe[8] - 1) / oe[0], $A = (Ie[8] + 1) / Ie[0], ZA = De * XA, ge = De * $A, ke = FA / (-XA + $A), Ee = ke * -XA;
13429
13429
  if (fA.matrixWorld.decompose(CA.position, CA.quaternion, CA.scale), CA.translateX(Ee), CA.translateZ(ke), CA.matrixWorld.compose(CA.position, CA.quaternion, CA.scale), CA.matrixWorldInverse.copy(CA.matrixWorld).invert(), oe[10] === -1)
13430
13430
  CA.projectionMatrix.copy(fA.projectionMatrix), CA.projectionMatrixInverse.copy(fA.projectionMatrixInverse);
13431
13431
  else {
@@ -13739,9 +13739,9 @@ class Dh {
13739
13739
  } catch (Y) {
13740
13740
  throw console.error("THREE.WebGLRenderer: " + Y.message), Y;
13741
13741
  }
13742
- let jA, ZA, ge, ke, Ee, q, L, BA, UA, vA, bA, pe, te, ae, je, JA, ue, We, Ue, re, xe, $e, yt, iA;
13742
+ let $A, ZA, ge, ke, Ee, q, L, BA, UA, vA, bA, pe, te, ae, je, JA, ue, We, Ue, re, xe, $e, yt, iA;
13743
13743
  function ye() {
13744
- jA = new wlA(O), jA.init(), $e = new B8(O, jA), ZA = new flA(O, jA, A, $e), ge = new ohA(O), ZA.reverseDepthBuffer && ge.buffers.depth.setReversed(!0), ke = new klA(O), Ee = new ZBA(), q = new chA(O, jA, ge, Ee, ZA, $e, ke), L = new mlA(p), BA = new SlA(p), UA = new JaA(O), yt = new ulA(O, UA), vA = new GlA(O, UA, ke, yt), bA = new NlA(O, vA, UA, ke), Ue = new RlA(O, ZA, q), JA = new ylA(Ee), pe = new PBA(p, L, BA, jA, ZA, yt, JA), te = new uhA(p, Ee), ae = new XBA(), je = new ehA(jA), We = new dlA(p, L, BA, ge, bA, c, I), ue = new shA(p, bA, ZA), iA = new phA(O, ke, ZA, ge), re = new plA(O, jA, ke), xe = new MlA(O, jA, ke), ke.programs = pe.programs, p.capabilities = ZA, p.extensions = jA, p.properties = Ee, p.renderLists = ae, p.shadowMap = ue, p.state = ge, p.info = ke;
13744
+ $A = new wlA(O), $A.init(), $e = new B8(O, $A), ZA = new flA(O, $A, A, $e), ge = new ohA(O), ZA.reverseDepthBuffer && ge.buffers.depth.setReversed(!0), ke = new klA(O), Ee = new ZBA(), q = new chA(O, $A, ge, Ee, ZA, $e, ke), L = new mlA(p), BA = new SlA(p), UA = new JaA(O), yt = new ulA(O, UA), vA = new GlA(O, UA, ke, yt), bA = new NlA(O, vA, UA, ke), Ue = new RlA(O, ZA, q), JA = new ylA(Ee), pe = new PBA(p, L, BA, $A, ZA, yt, JA), te = new uhA(p, Ee), ae = new XBA(), je = new ehA($A), We = new dlA(p, L, BA, ge, bA, c, I), ue = new shA(p, bA, ZA), iA = new phA(O, ke, ZA, ge), re = new plA(O, $A, ke), xe = new MlA(O, $A, ke), ke.programs = pe.programs, p.capabilities = ZA, p.extensions = $A, p.properties = Ee, p.renderLists = ae, p.shadowMap = ue, p.state = ge, p.info = ke;
13745
13745
  }
13746
13746
  ye();
13747
13747
  const sA = new EhA(p, O);
@@ -13750,10 +13750,10 @@ class Dh {
13750
13750
  }, this.getContextAttributes = function() {
13751
13751
  return O.getContextAttributes();
13752
13752
  }, this.forceContextLoss = function() {
13753
- const Y = jA.get("WEBGL_lose_context");
13753
+ const Y = $A.get("WEBGL_lose_context");
13754
13754
  Y && Y.loseContext();
13755
13755
  }, this.forceContextRestore = function() {
13756
- const Y = jA.get("WEBGL_lose_context");
13756
+ const Y = $A.get("WEBGL_lose_context");
13757
13757
  Y && Y.restoreContext();
13758
13758
  }, this.getPixelRatio = function() {
13759
13759
  return Z;
@@ -13858,8 +13858,8 @@ class Dh {
13858
13858
  const SA = x.drawRange, EA = x.attributes.position;
13859
13859
  let PA = SA.start * DA, WA = (SA.start + SA.count) * DA;
13860
13860
  AA !== null && (PA = Math.max(PA, AA.start * DA), WA = Math.min(WA, (AA.start + AA.count) * DA)), GA !== null ? (PA = Math.max(PA, 0), WA = Math.min(WA, GA.count)) : EA != null && (PA = Math.max(PA, 0), WA = Math.min(WA, EA.count));
13861
- const $A = WA - PA;
13862
- if ($A < 0 || $A === 1 / 0)
13861
+ const Ae = WA - PA;
13862
+ if (Ae < 0 || Ae === 1 / 0)
13863
13863
  return;
13864
13864
  yt.setup(T, J, QA, x, GA);
13865
13865
  let Se, VA = re;
@@ -13873,7 +13873,7 @@ class Dh {
13873
13873
  if (T.isBatchedMesh)
13874
13874
  if (T._multiDrawInstances !== null)
13875
13875
  VA.renderMultiDrawInstances(T._multiDrawStarts, T._multiDrawCounts, T._multiDrawCount, T._multiDrawInstances);
13876
- else if (jA.get("WEBGL_multi_draw"))
13876
+ else if ($A.get("WEBGL_multi_draw"))
13877
13877
  VA.renderMultiDraw(T._multiDrawStarts, T._multiDrawCounts, T._multiDrawCount);
13878
13878
  else {
13879
13879
  const TA = T._multiDrawStarts, Je = T._multiDrawCounts, Le = T._multiDrawCount, _t = GA ? UA.get(GA).bytesPerElement : 1, tg = Ee.get(J).currentProgram.getUniforms();
@@ -13881,12 +13881,12 @@ class Dh {
13881
13881
  tg.setValue(O, "_gl_DrawID", Dt), VA.render(TA[Dt] / _t, Je[Dt]);
13882
13882
  }
13883
13883
  else if (T.isInstancedMesh)
13884
- VA.renderInstances(PA, $A, T.count);
13884
+ VA.renderInstances(PA, Ae, T.count);
13885
13885
  else if (x.isInstancedBufferGeometry) {
13886
13886
  const TA = x._maxInstanceCount !== void 0 ? x._maxInstanceCount : 1 / 0, Je = Math.min(x.instanceCount, TA);
13887
- VA.renderInstances(PA, $A, Je);
13887
+ VA.renderInstances(PA, Ae, Je);
13888
13888
  } else
13889
- VA.render(PA, $A);
13889
+ VA.render(PA, Ae);
13890
13890
  };
13891
13891
  function $t(Y, R, x) {
13892
13892
  Y.transparent === !0 && Y.side === Xt && Y.forceSinglePass === !1 ? (Y.side = wi, Y.needsUpdate = !0, Yd(Y, R, x), Y.side = us, Y.needsUpdate = !0, Yd(Y, R, x), Y.side = Xt) : Yd(Y, R, x);
@@ -13923,7 +13923,7 @@ class Dh {
13923
13923
  }
13924
13924
  setTimeout(AA, 10);
13925
13925
  }
13926
- jA.get("KHR_parallel_shader_compile") !== null ? AA() : setTimeout(AA, 10);
13926
+ $A.get("KHR_parallel_shader_compile") !== null ? AA() : setTimeout(AA, 10);
13927
13927
  });
13928
13928
  };
13929
13929
  let Ho = null;
@@ -14011,7 +14011,7 @@ class Dh {
14011
14011
  return;
14012
14012
  E.state.transmissionRenderTarget[J.id] === void 0 && (E.state.transmissionRenderTarget[J.id] = new lt(1, 1, {
14013
14013
  generateMipmaps: !0,
14014
- type: jA.has("EXT_color_buffer_half_float") || jA.has("EXT_color_buffer_float") ? Wt : Lt,
14014
+ type: $A.has("EXT_color_buffer_half_float") || $A.has("EXT_color_buffer_float") ? Wt : Lt,
14015
14015
  minFilter: kg,
14016
14016
  samples: 4,
14017
14017
  stencilBuffer: g,
@@ -14026,13 +14026,13 @@ class Dh {
14026
14026
  const GA = p.toneMapping;
14027
14027
  p.toneMapping = Ao;
14028
14028
  const DA = J.viewport;
14029
- if (J.viewport !== void 0 && (J.viewport = void 0), E.setupLightsView(J), CA === !0 && JA.setGlobalState(p.clippingPlanes, J), Td(Y, x, J), q.updateMultisampleRenderTarget(AA), q.updateRenderTargetMipmap(AA), jA.has("WEBGL_multisampled_render_to_texture") === !1) {
14029
+ if (J.viewport !== void 0 && (J.viewport = void 0), E.setupLightsView(J), CA === !0 && JA.setGlobalState(p.clippingPlanes, J), Td(Y, x, J), q.updateMultisampleRenderTarget(AA), q.updateRenderTargetMipmap(AA), $A.has("WEBGL_multisampled_render_to_texture") === !1) {
14030
14030
  let SA = !1;
14031
14031
  for (let EA = 0, PA = R.length; EA < PA; EA++) {
14032
- const WA = R[EA], $A = WA.object, Se = WA.geometry, VA = WA.material, TA = WA.group;
14033
- if (VA.side === Xt && $A.layers.test(J.layers)) {
14032
+ const WA = R[EA], Ae = WA.object, Se = WA.geometry, VA = WA.material, TA = WA.group;
14033
+ if (VA.side === Xt && Ae.layers.test(J.layers)) {
14034
14034
  const Je = VA.side;
14035
- VA.side = wi, VA.needsUpdate = !0, ZG($A, x, J, Se, VA, TA), VA.side = Je, VA.needsUpdate = !0, SA = !0;
14035
+ VA.side = wi, VA.needsUpdate = !0, ZG(Ae, x, J, Se, VA, TA), VA.side = Je, VA.needsUpdate = !0, SA = !0;
14036
14036
  }
14037
14037
  }
14038
14038
  SA === !0 && (q.updateMultisampleRenderTarget(AA), q.updateRenderTargetMipmap(AA));
@@ -14077,15 +14077,15 @@ class Dh {
14077
14077
  function XG(Y, R, x, J, T) {
14078
14078
  R.isScene !== !0 && (R = De), q.resetTextureUnits();
14079
14079
  const AA = R.fog, j = J.isMeshStandardMaterial ? R.environment : null, QA = S === null ? p.outputColorSpace : S.isXRRenderTarget === !0 ? S.texture.colorSpace : ti, GA = (J.isMeshStandardMaterial ? BA : L).get(J.envMap || j), DA = J.vertexColors === !0 && !!x.attributes.color && x.attributes.color.itemSize === 4, SA = !!x.attributes.tangent && (!!J.normalMap || J.anisotropy > 0), EA = !!x.morphAttributes.position, PA = !!x.morphAttributes.normal, WA = !!x.morphAttributes.color;
14080
- let $A = Ao;
14081
- J.toneMapped && (S === null || S.isXRRenderTarget === !0) && ($A = p.toneMapping);
14080
+ let Ae = Ao;
14081
+ J.toneMapped && (S === null || S.isXRRenderTarget === !0) && (Ae = p.toneMapping);
14082
14082
  const Se = x.morphAttributes.position || x.morphAttributes.normal || x.morphAttributes.color, VA = Se !== void 0 ? Se.length : 0, TA = Ee.get(J), Je = E.state.lights;
14083
14083
  if (CA === !0 && (fA === !0 || Y !== N)) {
14084
14084
  const Et = Y === N && J.id === w;
14085
14085
  JA.setState(J, Y, Et);
14086
14086
  }
14087
14087
  let Le = !1;
14088
- J.version === TA.__version ? (TA.needsLights && TA.lightsStateVersion !== Je.state.version || TA.outputColorSpace !== QA || T.isBatchedMesh && TA.batching === !1 || !T.isBatchedMesh && TA.batching === !0 || T.isBatchedMesh && TA.batchingColor === !0 && T.colorTexture === null || T.isBatchedMesh && TA.batchingColor === !1 && T.colorTexture !== null || T.isInstancedMesh && TA.instancing === !1 || !T.isInstancedMesh && TA.instancing === !0 || T.isSkinnedMesh && TA.skinning === !1 || !T.isSkinnedMesh && TA.skinning === !0 || T.isInstancedMesh && TA.instancingColor === !0 && T.instanceColor === null || T.isInstancedMesh && TA.instancingColor === !1 && T.instanceColor !== null || T.isInstancedMesh && TA.instancingMorph === !0 && T.morphTexture === null || T.isInstancedMesh && TA.instancingMorph === !1 && T.morphTexture !== null || TA.envMap !== GA || J.fog === !0 && TA.fog !== AA || TA.numClippingPlanes !== void 0 && (TA.numClippingPlanes !== JA.numPlanes || TA.numIntersection !== JA.numIntersection) || TA.vertexAlphas !== DA || TA.vertexTangents !== SA || TA.morphTargets !== EA || TA.morphNormals !== PA || TA.morphColors !== WA || TA.toneMapping !== $A || TA.morphTargetsCount !== VA) && (Le = !0) : (Le = !0, TA.__version = J.version);
14088
+ J.version === TA.__version ? (TA.needsLights && TA.lightsStateVersion !== Je.state.version || TA.outputColorSpace !== QA || T.isBatchedMesh && TA.batching === !1 || !T.isBatchedMesh && TA.batching === !0 || T.isBatchedMesh && TA.batchingColor === !0 && T.colorTexture === null || T.isBatchedMesh && TA.batchingColor === !1 && T.colorTexture !== null || T.isInstancedMesh && TA.instancing === !1 || !T.isInstancedMesh && TA.instancing === !0 || T.isSkinnedMesh && TA.skinning === !1 || !T.isSkinnedMesh && TA.skinning === !0 || T.isInstancedMesh && TA.instancingColor === !0 && T.instanceColor === null || T.isInstancedMesh && TA.instancingColor === !1 && T.instanceColor !== null || T.isInstancedMesh && TA.instancingMorph === !0 && T.morphTexture === null || T.isInstancedMesh && TA.instancingMorph === !1 && T.morphTexture !== null || TA.envMap !== GA || J.fog === !0 && TA.fog !== AA || TA.numClippingPlanes !== void 0 && (TA.numClippingPlanes !== JA.numPlanes || TA.numIntersection !== JA.numIntersection) || TA.vertexAlphas !== DA || TA.vertexTangents !== SA || TA.morphTargets !== EA || TA.morphNormals !== PA || TA.morphColors !== WA || TA.toneMapping !== Ae || TA.morphTargetsCount !== VA) && (Le = !0) : (Le = !0, TA.__version = J.version);
14089
14089
  let _t = TA.currentProgram;
14090
14090
  Le === !0 && (_t = Yd(J, R, T));
14091
14091
  let tg = !1, Dt = !1, Mt = !1;
@@ -14130,7 +14130,7 @@ class Dh {
14130
14130
  }, this.setRenderTargetTextures = function(Y, R, x) {
14131
14131
  Ee.get(Y.texture).__webglTexture = R, Ee.get(Y.depthTexture).__webglTexture = x;
14132
14132
  const J = Ee.get(Y);
14133
- J.__hasExternalTextures = !0, J.__autoAllocateDepthBuffer = x === void 0, J.__autoAllocateDepthBuffer || jA.has("WEBGL_multisampled_render_to_texture") === !0 && (console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"), J.__useRenderToTexture = !1);
14133
+ J.__hasExternalTextures = !0, J.__autoAllocateDepthBuffer = x === void 0, J.__autoAllocateDepthBuffer || $A.has("WEBGL_multisampled_render_to_texture") === !0 && (console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"), J.__useRenderToTexture = !1);
14134
14134
  }, this.setRenderTargetFramebuffer = function(Y, R) {
14135
14135
  const x = Ee.get(Y);
14136
14136
  x.__webglFramebuffer = R, x.__useDefaultFramebuffer = R === void 0;
@@ -14222,13 +14222,13 @@ class Dh {
14222
14222
  x !== null ? (AA = x.max.x - x.min.x, j = x.max.y - x.min.y, QA = x.min.x, GA = x.min.y) : (AA = Y.image.width, j = Y.image.height, QA = 0, GA = 0), J !== null ? (DA = J.x, SA = J.y) : (DA = 0, SA = 0);
14223
14223
  const EA = $e.convert(R.format), PA = $e.convert(R.type);
14224
14224
  q.setTexture2D(R, 0), O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL, R.flipY), O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL, R.premultiplyAlpha), O.pixelStorei(O.UNPACK_ALIGNMENT, R.unpackAlignment);
14225
- const WA = O.getParameter(O.UNPACK_ROW_LENGTH), $A = O.getParameter(O.UNPACK_IMAGE_HEIGHT), Se = O.getParameter(O.UNPACK_SKIP_PIXELS), VA = O.getParameter(O.UNPACK_SKIP_ROWS), TA = O.getParameter(O.UNPACK_SKIP_IMAGES), Je = Y.isCompressedTexture ? Y.mipmaps[T] : Y.image;
14226
- O.pixelStorei(O.UNPACK_ROW_LENGTH, Je.width), O.pixelStorei(O.UNPACK_IMAGE_HEIGHT, Je.height), O.pixelStorei(O.UNPACK_SKIP_PIXELS, QA), O.pixelStorei(O.UNPACK_SKIP_ROWS, GA), Y.isDataTexture ? O.texSubImage2D(O.TEXTURE_2D, T, DA, SA, AA, j, EA, PA, Je.data) : Y.isCompressedTexture ? O.compressedTexSubImage2D(O.TEXTURE_2D, T, DA, SA, Je.width, Je.height, EA, Je.data) : O.texSubImage2D(O.TEXTURE_2D, T, DA, SA, AA, j, EA, PA, Je), O.pixelStorei(O.UNPACK_ROW_LENGTH, WA), O.pixelStorei(O.UNPACK_IMAGE_HEIGHT, $A), O.pixelStorei(O.UNPACK_SKIP_PIXELS, Se), O.pixelStorei(O.UNPACK_SKIP_ROWS, VA), O.pixelStorei(O.UNPACK_SKIP_IMAGES, TA), T === 0 && R.generateMipmaps && O.generateMipmap(O.TEXTURE_2D), ge.unbindTexture();
14225
+ const WA = O.getParameter(O.UNPACK_ROW_LENGTH), Ae = O.getParameter(O.UNPACK_IMAGE_HEIGHT), Se = O.getParameter(O.UNPACK_SKIP_PIXELS), VA = O.getParameter(O.UNPACK_SKIP_ROWS), TA = O.getParameter(O.UNPACK_SKIP_IMAGES), Je = Y.isCompressedTexture ? Y.mipmaps[T] : Y.image;
14226
+ O.pixelStorei(O.UNPACK_ROW_LENGTH, Je.width), O.pixelStorei(O.UNPACK_IMAGE_HEIGHT, Je.height), O.pixelStorei(O.UNPACK_SKIP_PIXELS, QA), O.pixelStorei(O.UNPACK_SKIP_ROWS, GA), Y.isDataTexture ? O.texSubImage2D(O.TEXTURE_2D, T, DA, SA, AA, j, EA, PA, Je.data) : Y.isCompressedTexture ? O.compressedTexSubImage2D(O.TEXTURE_2D, T, DA, SA, Je.width, Je.height, EA, Je.data) : O.texSubImage2D(O.TEXTURE_2D, T, DA, SA, AA, j, EA, PA, Je), O.pixelStorei(O.UNPACK_ROW_LENGTH, WA), O.pixelStorei(O.UNPACK_IMAGE_HEIGHT, Ae), O.pixelStorei(O.UNPACK_SKIP_PIXELS, Se), O.pixelStorei(O.UNPACK_SKIP_ROWS, VA), O.pixelStorei(O.UNPACK_SKIP_IMAGES, TA), T === 0 && R.generateMipmaps && O.generateMipmap(O.TEXTURE_2D), ge.unbindTexture();
14227
14227
  }, this.copyTextureToTexture3D = function(Y, R, x = null, J = null, T = 0) {
14228
14228
  Y.isTexture !== !0 && (tN("WebGLRenderer: copyTextureToTexture3D function signature has changed."), x = arguments[0] || null, J = arguments[1] || null, Y = arguments[2], R = arguments[3], T = arguments[4] || 0);
14229
14229
  let AA, j, QA, GA, DA, SA, EA, PA, WA;
14230
- const $A = Y.isCompressedTexture ? Y.mipmaps[T] : Y.image;
14231
- x !== null ? (AA = x.max.x - x.min.x, j = x.max.y - x.min.y, QA = x.max.z - x.min.z, GA = x.min.x, DA = x.min.y, SA = x.min.z) : (AA = $A.width, j = $A.height, QA = $A.depth, GA = 0, DA = 0, SA = 0), J !== null ? (EA = J.x, PA = J.y, WA = J.z) : (EA = 0, PA = 0, WA = 0);
14230
+ const Ae = Y.isCompressedTexture ? Y.mipmaps[T] : Y.image;
14231
+ x !== null ? (AA = x.max.x - x.min.x, j = x.max.y - x.min.y, QA = x.max.z - x.min.z, GA = x.min.x, DA = x.min.y, SA = x.min.z) : (AA = Ae.width, j = Ae.height, QA = Ae.depth, GA = 0, DA = 0, SA = 0), J !== null ? (EA = J.x, PA = J.y, WA = J.z) : (EA = 0, PA = 0, WA = 0);
14232
14232
  const Se = $e.convert(R.format), VA = $e.convert(R.type);
14233
14233
  let TA;
14234
14234
  if (R.isData3DTexture)
@@ -14241,7 +14241,7 @@ class Dh {
14241
14241
  }
14242
14242
  O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL, R.flipY), O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL, R.premultiplyAlpha), O.pixelStorei(O.UNPACK_ALIGNMENT, R.unpackAlignment);
14243
14243
  const Je = O.getParameter(O.UNPACK_ROW_LENGTH), Le = O.getParameter(O.UNPACK_IMAGE_HEIGHT), _t = O.getParameter(O.UNPACK_SKIP_PIXELS), tg = O.getParameter(O.UNPACK_SKIP_ROWS), Dt = O.getParameter(O.UNPACK_SKIP_IMAGES);
14244
- O.pixelStorei(O.UNPACK_ROW_LENGTH, $A.width), O.pixelStorei(O.UNPACK_IMAGE_HEIGHT, $A.height), O.pixelStorei(O.UNPACK_SKIP_PIXELS, GA), O.pixelStorei(O.UNPACK_SKIP_ROWS, DA), O.pixelStorei(O.UNPACK_SKIP_IMAGES, SA), Y.isDataTexture || Y.isData3DTexture ? O.texSubImage3D(TA, T, EA, PA, WA, AA, j, QA, Se, VA, $A.data) : R.isCompressedArrayTexture ? O.compressedTexSubImage3D(TA, T, EA, PA, WA, AA, j, QA, Se, $A.data) : O.texSubImage3D(TA, T, EA, PA, WA, AA, j, QA, Se, VA, $A), O.pixelStorei(O.UNPACK_ROW_LENGTH, Je), O.pixelStorei(O.UNPACK_IMAGE_HEIGHT, Le), O.pixelStorei(O.UNPACK_SKIP_PIXELS, _t), O.pixelStorei(O.UNPACK_SKIP_ROWS, tg), O.pixelStorei(O.UNPACK_SKIP_IMAGES, Dt), T === 0 && R.generateMipmaps && O.generateMipmap(TA), ge.unbindTexture();
14244
+ O.pixelStorei(O.UNPACK_ROW_LENGTH, Ae.width), O.pixelStorei(O.UNPACK_IMAGE_HEIGHT, Ae.height), O.pixelStorei(O.UNPACK_SKIP_PIXELS, GA), O.pixelStorei(O.UNPACK_SKIP_ROWS, DA), O.pixelStorei(O.UNPACK_SKIP_IMAGES, SA), Y.isDataTexture || Y.isData3DTexture ? O.texSubImage3D(TA, T, EA, PA, WA, AA, j, QA, Se, VA, Ae.data) : R.isCompressedArrayTexture ? O.compressedTexSubImage3D(TA, T, EA, PA, WA, AA, j, QA, Se, Ae.data) : O.texSubImage3D(TA, T, EA, PA, WA, AA, j, QA, Se, VA, Ae), O.pixelStorei(O.UNPACK_ROW_LENGTH, Je), O.pixelStorei(O.UNPACK_IMAGE_HEIGHT, Le), O.pixelStorei(O.UNPACK_SKIP_PIXELS, _t), O.pixelStorei(O.UNPACK_SKIP_ROWS, tg), O.pixelStorei(O.UNPACK_SKIP_IMAGES, Dt), T === 0 && R.generateMipmaps && O.generateMipmap(TA), ge.unbindTexture();
14245
14245
  }, this.initRenderTarget = function(Y) {
14246
14246
  Ee.get(Y).__webglFramebuffer === void 0 && q.setupRenderTarget(Y);
14247
14247
  }, this.initTexture = function(Y) {
@@ -16906,44 +16906,44 @@ class Xf extends we {
16906
16906
  }
16907
16907
  const v = D.length, Z = F.length;
16908
16908
  function P(LA, O, XA) {
16909
- let jA, ZA, ge;
16909
+ let $A, ZA, ge;
16910
16910
  const ke = LA.x - O.x, Ee = LA.y - O.y, q = XA.x - LA.x, L = XA.y - LA.y, BA = ke * ke + Ee * Ee, UA = ke * L - Ee * q;
16911
16911
  if (Math.abs(UA) > Number.EPSILON) {
16912
16912
  const vA = Math.sqrt(BA), bA = Math.sqrt(q * q + L * L), pe = O.x - Ee / vA, te = O.y + ke / vA, ae = XA.x - L / bA, je = XA.y + q / bA, JA = ((ae - pe) * L - (je - te) * q) / (ke * L - Ee * q);
16913
- jA = pe + ke * JA - LA.x, ZA = te + Ee * JA - LA.y;
16914
- const ue = jA * jA + ZA * ZA;
16913
+ $A = pe + ke * JA - LA.x, ZA = te + Ee * JA - LA.y;
16914
+ const ue = $A * $A + ZA * ZA;
16915
16915
  if (ue <= 2)
16916
- return new V(jA, ZA);
16916
+ return new V($A, ZA);
16917
16917
  ge = Math.sqrt(ue / 2);
16918
16918
  } else {
16919
16919
  let vA = !1;
16920
- ke > Number.EPSILON ? q > Number.EPSILON && (vA = !0) : ke < -Number.EPSILON ? q < -Number.EPSILON && (vA = !0) : Math.sign(Ee) === Math.sign(L) && (vA = !0), vA ? (jA = -Ee, ZA = ke, ge = Math.sqrt(BA)) : (jA = ke, ZA = Ee, ge = Math.sqrt(BA / 2));
16920
+ ke > Number.EPSILON ? q > Number.EPSILON && (vA = !0) : ke < -Number.EPSILON ? q < -Number.EPSILON && (vA = !0) : Math.sign(Ee) === Math.sign(L) && (vA = !0), vA ? ($A = -Ee, ZA = ke, ge = Math.sqrt(BA)) : ($A = ke, ZA = Ee, ge = Math.sqrt(BA / 2));
16921
16921
  }
16922
- return new V(jA / ge, ZA / ge);
16922
+ return new V($A / ge, ZA / ge);
16923
16923
  }
16924
16924
  const oA = [];
16925
- for (let LA = 0, O = K.length, XA = O - 1, jA = LA + 1; LA < O; LA++, XA++, jA++)
16926
- XA === O && (XA = 0), jA === O && (jA = 0), oA[LA] = P(K[LA], K[XA], K[jA]);
16925
+ for (let LA = 0, O = K.length, XA = O - 1, $A = LA + 1; LA < O; LA++, XA++, $A++)
16926
+ XA === O && (XA = 0), $A === O && ($A = 0), oA[LA] = P(K[LA], K[XA], K[$A]);
16927
16927
  const hA = [];
16928
16928
  let mA, KA = oA.concat();
16929
16929
  for (let LA = 0, O = k.length; LA < O; LA++) {
16930
16930
  const XA = k[LA];
16931
16931
  mA = [];
16932
- for (let jA = 0, ZA = XA.length, ge = ZA - 1, ke = jA + 1; jA < ZA; jA++, ge++, ke++)
16933
- ge === ZA && (ge = 0), ke === ZA && (ke = 0), mA[jA] = P(XA[jA], XA[ge], XA[ke]);
16932
+ for (let $A = 0, ZA = XA.length, ge = ZA - 1, ke = $A + 1; $A < ZA; $A++, ge++, ke++)
16933
+ ge === ZA && (ge = 0), ke === ZA && (ke = 0), mA[$A] = P(XA[$A], XA[ge], XA[ke]);
16934
16934
  hA.push(mA), KA = KA.concat(mA);
16935
16935
  }
16936
16936
  for (let LA = 0; LA < E; LA++) {
16937
- const O = LA / E, XA = l * Math.cos(O * Math.PI / 2), jA = h * Math.sin(O * Math.PI / 2) + Q;
16937
+ const O = LA / E, XA = l * Math.cos(O * Math.PI / 2), $A = h * Math.sin(O * Math.PI / 2) + Q;
16938
16938
  for (let ZA = 0, ge = K.length; ZA < ge; ZA++) {
16939
- const ke = H(K[ZA], oA[ZA], jA);
16939
+ const ke = H(K[ZA], oA[ZA], $A);
16940
16940
  FA(ke.x, ke.y, -XA);
16941
16941
  }
16942
16942
  for (let ZA = 0, ge = k.length; ZA < ge; ZA++) {
16943
16943
  const ke = k[ZA];
16944
16944
  mA = hA[ZA];
16945
16945
  for (let Ee = 0, q = ke.length; Ee < q; Ee++) {
16946
- const L = H(ke[Ee], mA[Ee], jA);
16946
+ const L = H(ke[Ee], mA[Ee], $A);
16947
16947
  FA(L.x, L.y, -XA);
16948
16948
  }
16949
16949
  }
@@ -16959,16 +16959,16 @@ class Xf extends we {
16959
16959
  f ? (S.copy(y.normals[LA]).multiplyScalar(XA.x), m.copy(y.binormals[LA]).multiplyScalar(XA.y), w.copy(p[LA]).add(S).add(m), FA(w.x, w.y, w.z)) : FA(XA.x, XA.y, C / a * LA);
16960
16960
  }
16961
16961
  for (let LA = E - 1; LA >= 0; LA--) {
16962
- const O = LA / E, XA = l * Math.cos(O * Math.PI / 2), jA = h * Math.sin(O * Math.PI / 2) + Q;
16962
+ const O = LA / E, XA = l * Math.cos(O * Math.PI / 2), $A = h * Math.sin(O * Math.PI / 2) + Q;
16963
16963
  for (let ZA = 0, ge = K.length; ZA < ge; ZA++) {
16964
- const ke = H(K[ZA], oA[ZA], jA);
16964
+ const ke = H(K[ZA], oA[ZA], $A);
16965
16965
  FA(ke.x, ke.y, C + XA);
16966
16966
  }
16967
16967
  for (let ZA = 0, ge = k.length; ZA < ge; ZA++) {
16968
16968
  const ke = k[ZA];
16969
16969
  mA = hA[ZA];
16970
16970
  for (let Ee = 0, q = ke.length; Ee < q; Ee++) {
16971
- const L = H(ke[Ee], mA[Ee], jA);
16971
+ const L = H(ke[Ee], mA[Ee], $A);
16972
16972
  f ? FA(L.x, L.y + p[a - 1].y, p[a - 1].x + XA) : FA(L.x, L.y, C + XA);
16973
16973
  }
16974
16974
  }
@@ -16978,13 +16978,13 @@ class Xf extends we {
16978
16978
  const LA = i.length / 3;
16979
16979
  if (c) {
16980
16980
  let O = 0, XA = v * O;
16981
- for (let jA = 0; jA < Z; jA++) {
16982
- const ZA = F[jA];
16981
+ for (let $A = 0; $A < Z; $A++) {
16982
+ const ZA = F[$A];
16983
16983
  oe(ZA[2] + XA, ZA[1] + XA, ZA[0] + XA);
16984
16984
  }
16985
16985
  O = a + E * 2, XA = v * O;
16986
- for (let jA = 0; jA < Z; jA++) {
16987
- const ZA = F[jA];
16986
+ for (let $A = 0; $A < Z; $A++) {
16987
+ const ZA = F[$A];
16988
16988
  oe(ZA[0] + XA, ZA[1] + XA, ZA[2] + XA);
16989
16989
  }
16990
16990
  } else {
@@ -17003,7 +17003,7 @@ class Xf extends we {
17003
17003
  const LA = i.length / 3;
17004
17004
  let O = 0;
17005
17005
  kA(K, O), O += K.length;
17006
- for (let XA = 0, jA = k.length; XA < jA; XA++) {
17006
+ for (let XA = 0, $A = k.length; XA < $A; XA++) {
17007
17007
  const ZA = k[XA];
17008
17008
  kA(ZA, O), O += ZA.length;
17009
17009
  }
@@ -17012,11 +17012,11 @@ class Xf extends we {
17012
17012
  function kA(LA, O) {
17013
17013
  let XA = LA.length;
17014
17014
  for (; --XA >= 0; ) {
17015
- const jA = XA;
17015
+ const $A = XA;
17016
17016
  let ZA = XA - 1;
17017
17017
  ZA < 0 && (ZA = LA.length - 1);
17018
17018
  for (let ge = 0, ke = a + E * 2; ge < ke; ge++) {
17019
- const Ee = v * ge, q = v * (ge + 1), L = O + jA + Ee, BA = O + ZA + Ee, UA = O + ZA + q, vA = O + jA + q;
17019
+ const Ee = v * ge, q = v * (ge + 1), L = O + $A + Ee, BA = O + ZA + Ee, UA = O + ZA + q, vA = O + $A + q;
17020
17020
  Ie(L, BA, UA, vA);
17021
17021
  }
17022
17022
  }
@@ -17026,11 +17026,11 @@ class Xf extends we {
17026
17026
  }
17027
17027
  function oe(LA, O, XA) {
17028
17028
  De(LA), De(O), De(XA);
17029
- const jA = i.length / 3, ZA = u.generateTopUV(t, i, jA - 3, jA - 2, jA - 1);
17029
+ const $A = i.length / 3, ZA = u.generateTopUV(t, i, $A - 3, $A - 2, $A - 1);
17030
17030
  Ye(ZA[0]), Ye(ZA[1]), Ye(ZA[2]);
17031
17031
  }
17032
- function Ie(LA, O, XA, jA) {
17033
- De(LA), De(O), De(jA), De(O), De(XA), De(jA);
17032
+ function Ie(LA, O, XA, $A) {
17033
+ De(LA), De(O), De($A), De(O), De(XA), De($A);
17034
17034
  const ZA = i.length / 3, ge = u.generateSideWallUV(t, i, ZA - 6, ZA - 3, ZA - 2, ZA - 1);
17035
17035
  Ye(ge[0]), Ye(ge[1]), Ye(ge[3]), Ye(ge[1]), Ye(ge[2]), Ye(ge[3]);
17036
17036
  }
@@ -22647,7 +22647,7 @@ class cd extends z1 {
22647
22647
  return A.context.label !== void 0 && delete A.context.label, A.format(I, t, e);
22648
22648
  }
22649
22649
  }
22650
- const Ae = (s, A) => {
22650
+ const ee = (s, A) => {
22651
22651
  const e = i6(A || s), t = s && s.isNode === !0 ? s.node && s.node.value || s.value : s;
22652
22652
  return uA(new cd(t, e));
22653
22653
  };
@@ -23205,7 +23205,7 @@ class d7 extends Xe {
23205
23205
  return uA(new dEA(this, uA(A)));
23206
23206
  }
23207
23207
  setNodeType(A) {
23208
- const e = Ae(null, A).getSelf();
23208
+ const e = ee(null, A).getSelf();
23209
23209
  this.group !== null && e.setGroup(this.group), this.node = e;
23210
23210
  }
23211
23211
  getNodeType(A) {
@@ -23539,7 +23539,7 @@ class WC extends cd {
23539
23539
  return this.value;
23540
23540
  }
23541
23541
  getTransformedUV(A) {
23542
- return this._matrixUniform === null && (this._matrixUniform = Ae(this.value.matrix)), this._matrixUniform.mul(z(A, 1)).xy;
23542
+ return this._matrixUniform === null && (this._matrixUniform = ee(this.value.matrix)), this._matrixUniform.mul(z(A, 1)).xy;
23543
23543
  }
23544
23544
  setUpdateMatrix(A) {
23545
23545
  return this.updateMatrix = A, this.updateType = A ? Pe.FRAME : Pe.NONE, this;
@@ -23641,7 +23641,7 @@ class WC extends cd {
23641
23641
  return A.sampler = this.sampler, A;
23642
23642
  }
23643
23643
  }
23644
- const vt = /* @__PURE__ */ MA(WC), fr = (...s) => vt(...s).setSampler(!1), yEA = (s) => (s.isNode === !0 ? s : vt(s)).convert("sampler"), Vu = /* @__PURE__ */ Ae("float").label("cameraNear").setGroup(qt).onRenderUpdate(({ camera: s }) => s.near), Xu = /* @__PURE__ */ Ae("float").label("cameraFar").setGroup(qt).onRenderUpdate(({ camera: s }) => s.far), T7 = /* @__PURE__ */ Ae("float").label("cameraLogDepth").setGroup(qt).onRenderUpdate(({ camera: s }) => 2 / (Math.log(s.far + 1) / Math.LN2)), II = /* @__PURE__ */ Ae("mat4").label("cameraProjectionMatrix").setGroup(qt).onRenderUpdate(({ camera: s }) => s.projectionMatrix), mEA = /* @__PURE__ */ Ae("mat4").label("cameraProjectionMatrixInverse").setGroup(qt).onRenderUpdate(({ camera: s }) => s.projectionMatrixInverse), QI = /* @__PURE__ */ Ae("mat4").label("cameraViewMatrix").setGroup(qt).onRenderUpdate(({ camera: s }) => s.matrixWorldInverse), DEA = /* @__PURE__ */ Ae("mat4").label("cameraWorldMatrix").setGroup(qt).onRenderUpdate(({ camera: s }) => s.matrixWorld), SEA = /* @__PURE__ */ Ae("mat3").label("cameraNormalMatrix").setGroup(qt).onRenderUpdate(({ camera: s }) => s.normalMatrix), RH = /* @__PURE__ */ Ae(new M()).label("cameraPosition").setGroup(qt).onRenderUpdate(({ camera: s }, A) => A.value.setFromMatrixPosition(s.matrixWorld));
23644
+ const vt = /* @__PURE__ */ MA(WC), fr = (...s) => vt(...s).setSampler(!1), yEA = (s) => (s.isNode === !0 ? s : vt(s)).convert("sampler"), Vu = /* @__PURE__ */ ee("float").label("cameraNear").setGroup(qt).onRenderUpdate(({ camera: s }) => s.near), Xu = /* @__PURE__ */ ee("float").label("cameraFar").setGroup(qt).onRenderUpdate(({ camera: s }) => s.far), T7 = /* @__PURE__ */ ee("float").label("cameraLogDepth").setGroup(qt).onRenderUpdate(({ camera: s }) => 2 / (Math.log(s.far + 1) / Math.LN2)), II = /* @__PURE__ */ ee("mat4").label("cameraProjectionMatrix").setGroup(qt).onRenderUpdate(({ camera: s }) => s.projectionMatrix), mEA = /* @__PURE__ */ ee("mat4").label("cameraProjectionMatrixInverse").setGroup(qt).onRenderUpdate(({ camera: s }) => s.projectionMatrixInverse), QI = /* @__PURE__ */ ee("mat4").label("cameraViewMatrix").setGroup(qt).onRenderUpdate(({ camera: s }) => s.matrixWorldInverse), DEA = /* @__PURE__ */ ee("mat4").label("cameraWorldMatrix").setGroup(qt).onRenderUpdate(({ camera: s }) => s.matrixWorld), SEA = /* @__PURE__ */ ee("mat3").label("cameraNormalMatrix").setGroup(qt).onRenderUpdate(({ camera: s }) => s.normalMatrix), RH = /* @__PURE__ */ ee(new M()).label("cameraPosition").setGroup(qt).onRenderUpdate(({ camera: s }, A) => A.value.setFromMatrixPosition(s.matrixWorld));
23645
23645
  class Ai extends Xe {
23646
23646
  static get type() {
23647
23647
  return "Object3DNode";
@@ -23699,9 +23699,9 @@ class va extends Ai {
23699
23699
  this.object3d = A.object, super.update(A);
23700
23700
  }
23701
23701
  }
23702
- const NEA = /* @__PURE__ */ ie(va, va.DIRECTION), Kr = /* @__PURE__ */ ie(va, va.WORLD_MATRIX), UEA = /* @__PURE__ */ ie(va, va.POSITION), bEA = /* @__PURE__ */ ie(va, va.SCALE), FEA = /* @__PURE__ */ ie(va, va.VIEW_POSITION), Y7 = /* @__PURE__ */ Ae(new it()).onObjectUpdate(({ object: s }, A) => A.value.getNormalMatrix(s.matrixWorld)), _7 = /* @__PURE__ */ Ae(new lA()).onObjectUpdate(({ object: s }, A) => A.value.copy(s.matrixWorld).invert()), zC = /* @__PURE__ */ QI.mul(Kr).toVar("modelViewMatrix_2"), xEA = /* @__PURE__ */ gA((s) => (s.context.isHighPrecisionModelViewMatrix = !0, Ae("mat4").onObjectUpdate(({ object: A, camera: e }) => A.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse, A.matrixWorld)))).once()().toVar("highPrecisionModelViewMatrix"), KEA = /* @__PURE__ */ gA((s) => {
23702
+ const NEA = /* @__PURE__ */ ie(va, va.DIRECTION), Kr = /* @__PURE__ */ ie(va, va.WORLD_MATRIX), UEA = /* @__PURE__ */ ie(va, va.POSITION), bEA = /* @__PURE__ */ ie(va, va.SCALE), FEA = /* @__PURE__ */ ie(va, va.VIEW_POSITION), Y7 = /* @__PURE__ */ ee(new it()).onObjectUpdate(({ object: s }, A) => A.value.getNormalMatrix(s.matrixWorld)), _7 = /* @__PURE__ */ ee(new lA()).onObjectUpdate(({ object: s }, A) => A.value.copy(s.matrixWorld).invert()), zC = /* @__PURE__ */ QI.mul(Kr).toVar("modelViewMatrix_2"), xEA = /* @__PURE__ */ gA((s) => (s.context.isHighPrecisionModelViewMatrix = !0, ee("mat4").onObjectUpdate(({ object: A, camera: e }) => A.modelViewMatrix.multiplyMatrices(e.matrixWorldInverse, A.matrixWorld)))).once()().toVar("highPrecisionModelViewMatrix"), KEA = /* @__PURE__ */ gA((s) => {
23703
23703
  const A = s.context.isHighPrecisionModelViewMatrix;
23704
- return Ae("mat3").onObjectUpdate(({ object: e, camera: t }) => (A !== !0 && e.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse, e.matrixWorld), e.normalMatrix.getNormalMatrix(e.modelViewMatrix)));
23704
+ return ee("mat3").onObjectUpdate(({ object: e, camera: t }) => (A !== !0 && e.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse, e.matrixWorld), e.normalMatrix.getNormalMatrix(e.modelViewMatrix)));
23705
23705
  }).once()().toVar("highPrecisionModelNormalMatrix"), mo = /* @__PURE__ */ Zg("position", "vec3"), Ks = /* @__PURE__ */ mo.varying("positionLocal"), MU = /* @__PURE__ */ mo.varying("positionPrevious"), kU = /* @__PURE__ */ Kr.mul(Ks).xyz.varying("v_positionWorld"), NH = /* @__PURE__ */ Ks.transformDirection(Kr).varying("v_positionWorldDirection").normalize().toVar("positionWorldDirection"), Ro = /* @__PURE__ */ zC.mul(Ks).xyz.varying("v_positionView"), vi = /* @__PURE__ */ Ro.negate().varying("v_positionViewDirection").normalize().toVar("positionViewDirection");
23706
23706
  class H7 extends Xe {
23707
23707
  static get type() {
@@ -23727,7 +23727,7 @@ const q7 = /* @__PURE__ */ ie(H7), Hw = /* @__PURE__ */ _(q7).mul(2).sub(1), xF
23727
23727
  return e.transformDirection(s);
23728
23728
  const t = Y7.mul(s);
23729
23729
  return QI.transformDirection(t);
23730
- }), Z7 = /* @__PURE__ */ Ae(0).onReference(({ material: s }) => s).onRenderUpdate(({ material: s }) => s.refractionRatio), V7 = /* @__PURE__ */ vi.negate().reflect(Qs), X7 = /* @__PURE__ */ vi.negate().refract(Qs, Z7), W7 = /* @__PURE__ */ V7.transformDirection(QI).toVar("reflectVector"), z7 = /* @__PURE__ */ X7.transformDirection(QI).toVar("reflectVector");
23730
+ }), Z7 = /* @__PURE__ */ ee(0).onReference(({ material: s }) => s).onRenderUpdate(({ material: s }) => s.refractionRatio), V7 = /* @__PURE__ */ vi.negate().reflect(Qs), X7 = /* @__PURE__ */ vi.negate().refract(Qs, Z7), W7 = /* @__PURE__ */ V7.transformDirection(QI).toVar("reflectVector"), z7 = /* @__PURE__ */ X7.transformDirection(QI).toVar("reflectVector");
23731
23731
  class j7 extends WC {
23732
23732
  static get type() {
23733
23733
  return "CubeTextureNode";
@@ -23856,7 +23856,7 @@ class Ow extends Xe {
23856
23856
  }
23857
23857
  setNodeType(A) {
23858
23858
  let e = null;
23859
- this.count !== null ? e = qw(null, A, this.count) : Array.isArray(this.getValueFromReference()) ? e = TC(null, A) : A === "texture" ? e = vt(null) : A === "cubeTexture" ? e = JF(null) : e = Ae(null, A), this.group !== null && e.setGroup(this.group), this.name !== null && e.label(this.name), this.node = e.getSelf();
23859
+ this.count !== null ? e = qw(null, A, this.count) : Array.isArray(this.getValueFromReference()) ? e = TC(null, A) : A === "texture" ? e = vt(null) : A === "cubeTexture" ? e = JF(null) : e = ee(null, A), this.group !== null && e.setGroup(this.group), this.name !== null && e.label(this.name), this.node = e.getSelf();
23860
23860
  }
23861
23861
  getNodeType(A) {
23862
23862
  return this.node === null && (this.updateReference(A), this.updateValue()), this.node.getNodeType(A);
@@ -24087,7 +24087,7 @@ RA.POINT_WIDTH = "pointWidth";
24087
24087
  RA.DISPERSION = "dispersion";
24088
24088
  RA.LIGHT_MAP = "light";
24089
24089
  RA.AO_MAP = "ao";
24090
- const I$ = /* @__PURE__ */ ie(RA, RA.ALPHA_TEST), cf = /* @__PURE__ */ ie(RA, RA.COLOR), r$ = /* @__PURE__ */ ie(RA, RA.SHININESS), a$ = /* @__PURE__ */ ie(RA, RA.EMISSIVE), TF = /* @__PURE__ */ ie(RA, RA.OPACITY), C$ = /* @__PURE__ */ ie(RA, RA.SPECULAR), xY = /* @__PURE__ */ ie(RA, RA.SPECULAR_INTENSITY), c$ = /* @__PURE__ */ ie(RA, RA.SPECULAR_COLOR), X0 = /* @__PURE__ */ ie(RA, RA.SPECULAR_STRENGTH), oN = /* @__PURE__ */ ie(RA, RA.REFLECTIVITY), l$ = /* @__PURE__ */ ie(RA, RA.ROUGHNESS), B$ = /* @__PURE__ */ ie(RA, RA.METALNESS), h$ = /* @__PURE__ */ ie(RA, RA.NORMAL).context({ getUV: null }), Q$ = /* @__PURE__ */ ie(RA, RA.CLEARCOAT), E$ = /* @__PURE__ */ ie(RA, RA.CLEARCOAT_ROUGHNESS), d$ = /* @__PURE__ */ ie(RA, RA.CLEARCOAT_NORMAL).context({ getUV: null }), u$ = /* @__PURE__ */ ie(RA, RA.ROTATION), p$ = /* @__PURE__ */ ie(RA, RA.SHEEN), f$ = /* @__PURE__ */ ie(RA, RA.SHEEN_ROUGHNESS), y$ = /* @__PURE__ */ ie(RA, RA.ANISOTROPY), m$ = /* @__PURE__ */ ie(RA, RA.IRIDESCENCE), D$ = /* @__PURE__ */ ie(RA, RA.IRIDESCENCE_IOR), S$ = /* @__PURE__ */ ie(RA, RA.IRIDESCENCE_THICKNESS), w$ = /* @__PURE__ */ ie(RA, RA.TRANSMISSION), G$ = /* @__PURE__ */ ie(RA, RA.THICKNESS), M$ = /* @__PURE__ */ ie(RA, RA.IOR), k$ = /* @__PURE__ */ ie(RA, RA.ATTENUATION_DISTANCE), R$ = /* @__PURE__ */ ie(RA, RA.ATTENUATION_COLOR), RU = /* @__PURE__ */ ie(RA, RA.LINE_SCALE), KH = /* @__PURE__ */ ie(RA, RA.LINE_DASH_SIZE), JH = /* @__PURE__ */ ie(RA, RA.LINE_GAP_SIZE), nN = /* @__PURE__ */ ie(RA, RA.LINE_WIDTH), KY = /* @__PURE__ */ ie(RA, RA.LINE_DASH_OFFSET), N$ = /* @__PURE__ */ ie(RA, RA.POINT_WIDTH), U$ = /* @__PURE__ */ ie(RA, RA.DISPERSION), LH = /* @__PURE__ */ ie(RA, RA.LIGHT_MAP), b$ = /* @__PURE__ */ ie(RA, RA.AO_MAP), Wu = /* @__PURE__ */ Ae(new V()).onReference(function(s) {
24090
+ const I$ = /* @__PURE__ */ ie(RA, RA.ALPHA_TEST), cf = /* @__PURE__ */ ie(RA, RA.COLOR), r$ = /* @__PURE__ */ ie(RA, RA.SHININESS), a$ = /* @__PURE__ */ ie(RA, RA.EMISSIVE), TF = /* @__PURE__ */ ie(RA, RA.OPACITY), C$ = /* @__PURE__ */ ie(RA, RA.SPECULAR), xY = /* @__PURE__ */ ie(RA, RA.SPECULAR_INTENSITY), c$ = /* @__PURE__ */ ie(RA, RA.SPECULAR_COLOR), X0 = /* @__PURE__ */ ie(RA, RA.SPECULAR_STRENGTH), oN = /* @__PURE__ */ ie(RA, RA.REFLECTIVITY), l$ = /* @__PURE__ */ ie(RA, RA.ROUGHNESS), B$ = /* @__PURE__ */ ie(RA, RA.METALNESS), h$ = /* @__PURE__ */ ie(RA, RA.NORMAL).context({ getUV: null }), Q$ = /* @__PURE__ */ ie(RA, RA.CLEARCOAT), E$ = /* @__PURE__ */ ie(RA, RA.CLEARCOAT_ROUGHNESS), d$ = /* @__PURE__ */ ie(RA, RA.CLEARCOAT_NORMAL).context({ getUV: null }), u$ = /* @__PURE__ */ ie(RA, RA.ROTATION), p$ = /* @__PURE__ */ ie(RA, RA.SHEEN), f$ = /* @__PURE__ */ ie(RA, RA.SHEEN_ROUGHNESS), y$ = /* @__PURE__ */ ie(RA, RA.ANISOTROPY), m$ = /* @__PURE__ */ ie(RA, RA.IRIDESCENCE), D$ = /* @__PURE__ */ ie(RA, RA.IRIDESCENCE_IOR), S$ = /* @__PURE__ */ ie(RA, RA.IRIDESCENCE_THICKNESS), w$ = /* @__PURE__ */ ie(RA, RA.TRANSMISSION), G$ = /* @__PURE__ */ ie(RA, RA.THICKNESS), M$ = /* @__PURE__ */ ie(RA, RA.IOR), k$ = /* @__PURE__ */ ie(RA, RA.ATTENUATION_DISTANCE), R$ = /* @__PURE__ */ ie(RA, RA.ATTENUATION_COLOR), RU = /* @__PURE__ */ ie(RA, RA.LINE_SCALE), KH = /* @__PURE__ */ ie(RA, RA.LINE_DASH_SIZE), JH = /* @__PURE__ */ ie(RA, RA.LINE_GAP_SIZE), nN = /* @__PURE__ */ ie(RA, RA.LINE_WIDTH), KY = /* @__PURE__ */ ie(RA, RA.LINE_DASH_OFFSET), N$ = /* @__PURE__ */ ie(RA, RA.POINT_WIDTH), U$ = /* @__PURE__ */ ie(RA, RA.DISPERSION), LH = /* @__PURE__ */ ie(RA, RA.LIGHT_MAP), b$ = /* @__PURE__ */ ie(RA, RA.AO_MAP), Wu = /* @__PURE__ */ ee(new V()).onReference(function(s) {
24091
24091
  return s.material;
24092
24092
  }).onRenderUpdate(function({ material: s }) {
24093
24093
  this.value.set(s.anisotropy * Math.cos(s.anisotropyRotation), s.anisotropy * Math.sin(s.anisotropyRotation));
@@ -24238,7 +24238,7 @@ class vH extends Xe {
24238
24238
  constructor(A, e = !1) {
24239
24239
  super("void"), this.skinnedMesh = A, this.useReference = e, this.updateType = Pe.OBJECT, this.skinIndexNode = Zg("skinIndex", "uvec4"), this.skinWeightNode = Zg("skinWeight", "vec4");
24240
24240
  let t, i, g;
24241
- e ? (t = Gg("bindMatrix", "mat4"), i = Gg("bindMatrixInverse", "mat4"), g = bY("skeleton.boneMatrices", "mat4", A.skeleton.bones.length)) : (t = Ae(A.bindMatrix, "mat4"), i = Ae(A.bindMatrixInverse, "mat4"), g = qw(A.skeleton.boneMatrices, "mat4", A.skeleton.bones.length)), this.bindMatrixNode = t, this.bindMatrixInverseNode = i, this.boneMatricesNode = g, this.previousBoneMatricesNode = null;
24241
+ e ? (t = Gg("bindMatrix", "mat4"), i = Gg("bindMatrixInverse", "mat4"), g = bY("skeleton.boneMatrices", "mat4", A.skeleton.bones.length)) : (t = ee(A.bindMatrix, "mat4"), i = ee(A.bindMatrixInverse, "mat4"), g = qw(A.skeleton.boneMatrices, "mat4", A.skeleton.bones.length)), this.bindMatrixNode = t, this.bindMatrixInverseNode = i, this.boneMatricesNode = g, this.previousBoneMatricesNode = null;
24242
24242
  }
24243
24243
  getSkinnedPosition(A = this.boneMatricesNode, e = Ks) {
24244
24244
  const { skinIndexNode: t, skinWeightNode: i, bindMatrixNode: g, bindMatrixInverseNode: o } = this, n = A.element(t.x), I = A.element(t.y), r = A.element(t.z), a = A.element(t.w), C = g.mul(e), c = ts(
@@ -24381,7 +24381,7 @@ class H$ extends Xe {
24381
24381
  return "MorphNode";
24382
24382
  }
24383
24383
  constructor(A) {
24384
- super("void"), this.mesh = A, this.morphBaseInfluence = Ae(1), this.updateType = Pe.OBJECT;
24384
+ super("void"), this.mesh = A, this.morphBaseInfluence = ee(1), this.updateType = Pe.OBJECT;
24385
24385
  }
24386
24386
  setup(A) {
24387
24387
  const { geometry: e } = A, t = e.morphAttributes.position !== void 0, i = e.hasAttribute("normal") && e.morphAttributes.normal !== void 0, g = e.morphAttributes.position || e.morphAttributes.normal || e.morphAttributes.color, o = g !== void 0 ? g.length : 0, { texture: n, stride: I, size: r } = edA(e);
@@ -24568,7 +24568,7 @@ class Ws extends Xe {
24568
24568
  setup() {
24569
24569
  const A = this.scope;
24570
24570
  let e = null;
24571
- return A === Ws.SIZE ? e = Ae($y || ($y = new V())) : A === Ws.VIEWPORT ? e = Ae(Am || (Am = new zA())) : e = cA($f.div(lf)), e;
24571
+ return A === Ws.SIZE ? e = ee($y || ($y = new V())) : A === Ws.VIEWPORT ? e = ee(Am || (Am = new zA())) : e = cA($f.div(lf)), e;
24572
24572
  }
24573
24573
  generate(A) {
24574
24574
  if (this.scope === Ws.COORDINATE) {
@@ -25811,7 +25811,7 @@ class uAA extends Gt {
25811
25811
  constructor(A, e = null, t = null) {
25812
25812
  super("vec3"), this._value = A, this._pmrem = null, this.uvNode = e, this.levelNode = t, this._generator = null;
25813
25813
  const i = new It();
25814
- i.isRenderTargetTexture = !0, this._texture = vt(i), this._width = Ae(0), this._height = Ae(0), this._maxMip = Ae(0), this.updateBeforeType = Pe.RENDER;
25814
+ i.isRenderTargetTexture = !0, this._texture = vt(i), this._width = ee(0), this._height = ee(0), this._maxMip = ee(0), this.updateBeforeType = Pe.RENDER;
25815
25815
  }
25816
25816
  set value(A) {
25817
25817
  this._value = A, this._pmrem = null;
@@ -26897,7 +26897,7 @@ function $H(s) {
26897
26897
  return A.depthTest = !1, A.depthWrite = !1, A.blending = _i, A.name = `PMREM_${s}`, A;
26898
26898
  }
26899
26899
  function epA(s, A, e) {
26900
- const t = TC(new Array(YQ).fill(0)), i = Ae(new M(0, 1, 0)), g = Ae(0), o = _(YQ), n = Ae(0), I = Ae(1), r = vt(null), a = Ae(0), C = _(1 / A), c = _(1 / e), l = _(s), h = {
26900
+ const t = TC(new Array(YQ).fill(0)), i = ee(new M(0, 1, 0)), g = ee(0), o = _(YQ), n = ee(0), I = ee(1), r = vt(null), a = ee(0), C = _(1 / A), c = _(1 / e), l = _(s), h = {
26901
26901
  n: o,
26902
26902
  latitudinal: n,
26903
26903
  weights: t,
@@ -28061,7 +28061,7 @@ class go extends Gt {
28061
28061
  o.texture.name = "output", o.depthTexture = g, this.renderTarget = o, this.updateBeforeType = Pe.FRAME, this._textures = {
28062
28062
  output: o.texture,
28063
28063
  depth: g
28064
- }, this._textureNodes = {}, this._linearDepthNodes = {}, this._viewZNodes = {}, this._previousTextures = {}, this._previousTextureNodes = {}, this._cameraNear = Ae(0), this._cameraFar = Ae(0), this._mrt = null, this.isPassNode = !0;
28064
+ }, this._textureNodes = {}, this._linearDepthNodes = {}, this._viewZNodes = {}, this._previousTextures = {}, this._previousTextureNodes = {}, this._cameraNear = ee(0), this._cameraFar = ee(0), this._mrt = null, this.isPassNode = !0;
28065
28065
  }
28066
28066
  setMRT(A) {
28067
28067
  return this._mrt = A, this;
@@ -28145,7 +28145,7 @@ class AeA extends Gt {
28145
28145
  return "GaussianBlurNode";
28146
28146
  }
28147
28147
  constructor(A, e = null, t = 2) {
28148
- super("vec4"), this.textureNode = A, this.directionNode = e, this.sigma = t, this._invSize = Ae(new V()), this._passDirection = Ae(new V()), this._horizontalRT = new Ng(), this._horizontalRT.texture.name = "GaussianBlurNode.horizontal", this._verticalRT = new Ng(), this._verticalRT.texture.name = "GaussianBlurNode.vertical", this._textureNode = Ay(this, this._verticalRT.texture), this.updateBeforeType = Pe.RENDER, this.resolution = new V(1, 1);
28148
+ super("vec4"), this.textureNode = A, this.directionNode = e, this.sigma = t, this._invSize = ee(new V()), this._passDirection = ee(new V()), this._horizontalRT = new Ng(), this._horizontalRT.texture.name = "GaussianBlurNode.horizontal", this._verticalRT = new Ng(), this._verticalRT.texture.name = "GaussianBlurNode.vertical", this._textureNode = Ay(this, this._verticalRT.texture), this.updateBeforeType = Pe.RENDER, this.resolution = new V(1, 1);
28149
28149
  }
28150
28150
  setSize(A, e) {
28151
28151
  A = Math.max(Math.round(A * this.resolution.x), 1), e = Math.max(Math.round(e * this.resolution.y), 1), this._invSize.value.set(1 / A, 1 / e), this._horizontalRT.setSize(A, e), this._verticalRT.setSize(A, e);
@@ -28191,7 +28191,7 @@ class eeA extends Gt {
28191
28191
  return "AfterImageNode";
28192
28192
  }
28193
28193
  constructor(A, e = 0.96) {
28194
- super(A), this.textureNode = A, this.textureNodeOld = vt(), this.damp = Ae(e), this._compRT = new Ng(), this._compRT.texture.name = "AfterImageNode.comp", this._oldRT = new Ng(), this._oldRT.texture.name = "AfterImageNode.old", this._textureNode = Ay(this, this._compRT.texture), this.updateBeforeType = Pe.RENDER;
28194
+ super(A), this.textureNode = A, this.textureNodeOld = vt(), this.damp = ee(e), this._compRT = new Ng(), this._compRT.texture.name = "AfterImageNode.comp", this._oldRT = new Ng(), this._oldRT.texture.name = "AfterImageNode.old", this._textureNode = Ay(this, this._compRT.texture), this.updateBeforeType = Pe.RENDER;
28195
28195
  }
28196
28196
  getTextureNode() {
28197
28197
  return this._textureNode;
@@ -28237,7 +28237,7 @@ class ieA extends Gt {
28237
28237
  return "AnamorphicNode";
28238
28238
  }
28239
28239
  constructor(A, e, t, i) {
28240
- super("vec4"), this.textureNode = A, this.tresholdNode = e, this.scaleNode = t, this.colorNode = z(0.1, 0, 1), this.samples = i, this.resolution = new V(1, 1), this._renderTarget = new Ng(), this._renderTarget.texture.name = "anamorphic", this._invSize = Ae(new V()), this._textureNode = Ay(this, this._renderTarget.texture), this.updateBeforeType = Pe.RENDER;
28240
+ super("vec4"), this.textureNode = A, this.tresholdNode = e, this.scaleNode = t, this.colorNode = z(0.1, 0, 1), this.samples = i, this.resolution = new V(1, 1), this._renderTarget = new Ng(), this._renderTarget.texture.name = "anamorphic", this._invSize = ee(new V()), this._textureNode = Ay(this, this._renderTarget.texture), this.updateBeforeType = Pe.RENDER;
28241
28241
  }
28242
28242
  getTextureNode() {
28243
28243
  return this._textureNode;
@@ -28273,7 +28273,7 @@ class seA extends Gt {
28273
28273
  return "SobelOperatorNode";
28274
28274
  }
28275
28275
  constructor(A) {
28276
- super(), this.textureNode = A, this.updateBeforeType = Pe.RENDER, this._invSize = Ae(new V());
28276
+ super(), this.textureNode = A, this.updateBeforeType = Pe.RENDER, this._invSize = ee(new V());
28277
28277
  }
28278
28278
  updateBefore() {
28279
28279
  const A = this.textureNode.value;
@@ -28313,7 +28313,7 @@ class geA extends Gt {
28313
28313
  return "DepthOfFieldNode";
28314
28314
  }
28315
28315
  constructor(A, e, t, i, g) {
28316
- super(), this.textureNode = A, this.viewZNode = e, this.focusNode = t, this.apertureNode = i, this.maxblurNode = g, this._aspect = Ae(0), this.updateBeforeType = Pe.RENDER;
28316
+ super(), this.textureNode = A, this.viewZNode = e, this.focusNode = t, this.apertureNode = i, this.maxblurNode = g, this._aspect = ee(0), this.updateBeforeType = Pe.RENDER;
28317
28317
  }
28318
28318
  updateBefore() {
28319
28319
  const A = this.textureNode.value;
@@ -28334,7 +28334,7 @@ class oeA extends Gt {
28334
28334
  return "DotScreenNode";
28335
28335
  }
28336
28336
  constructor(A, e = new V(0.5, 0.5), t = 1.57, i = 1) {
28337
- super("vec4"), this.inputNode = A, this.center = Ae(e), this.angle = Ae(t), this.scale = Ae(i);
28337
+ super("vec4"), this.inputNode = A, this.center = ee(e), this.angle = ee(t), this.scale = ee(i);
28338
28338
  }
28339
28339
  setup() {
28340
28340
  const A = this.inputNode, e = gA(() => {
@@ -28353,7 +28353,7 @@ class neA extends Gt {
28353
28353
  return "RGBShiftNode";
28354
28354
  }
28355
28355
  constructor(A, e = 5e-3, t = 0) {
28356
- super("vec4"), this.textureNode = A, this.amount = Ae(e), this.angle = Ae(t);
28356
+ super("vec4"), this.textureNode = A, this.amount = ee(e), this.angle = ee(t);
28357
28357
  }
28358
28358
  setup() {
28359
28359
  const { textureNode: A } = this, e = A.uvNode || Bt(), t = (g) => A.uv(g);
@@ -28386,7 +28386,7 @@ class reA extends Gt {
28386
28386
  return "Lut3DNode";
28387
28387
  }
28388
28388
  constructor(A, e, t, i) {
28389
- super(), this.inputNode = A, this.lutNode = e, this.size = Ae(t), this.intensityNode = i;
28389
+ super(), this.inputNode = A, this.lutNode = e, this.size = ee(t), this.intensityNode = i;
28390
28390
  }
28391
28391
  setup() {
28392
28392
  const { inputNode: A, lutNode: e } = this, t = (o) => e.uv(o);
@@ -28402,7 +28402,7 @@ class aeA extends Gt {
28402
28402
  return "GTAONode";
28403
28403
  }
28404
28404
  constructor(A, e, t) {
28405
- super(), this.depthNode = A, this.normalNode = e, this.radius = Ae(0.25), this.resolution = Ae(new V()), this.thickness = Ae(1), this.distanceExponent = Ae(1), this.distanceFallOff = Ae(1), this.scale = Ae(1), this.noiseNode = vt(jpA()), this.cameraProjectionMatrix = Ae(t.projectionMatrix), this.cameraProjectionMatrixInverse = Ae(t.projectionMatrixInverse), this.SAMPLES = Ae(16), this._aoRenderTarget = new Ng(), this._aoRenderTarget.texture.name = "GTAONode.AO", this._material = null, this._textureNode = Ay(this, this._aoRenderTarget.texture), this.updateBeforeType = Pe.FRAME;
28405
+ super(), this.depthNode = A, this.normalNode = e, this.radius = ee(0.25), this.resolution = ee(new V()), this.thickness = ee(1), this.distanceExponent = ee(1), this.distanceFallOff = ee(1), this.scale = ee(1), this.noiseNode = vt(jpA()), this.cameraProjectionMatrix = ee(t.projectionMatrix), this.cameraProjectionMatrixInverse = ee(t.projectionMatrixInverse), this.SAMPLES = ee(16), this._aoRenderTarget = new Ng(), this._aoRenderTarget.texture.name = "GTAONode.AO", this._material = null, this._textureNode = Ay(this, this._aoRenderTarget.texture), this.updateBeforeType = Pe.FRAME;
28406
28406
  }
28407
28407
  getTextureNode() {
28408
28408
  return this._textureNode;
@@ -28492,7 +28492,7 @@ class CeA extends Gt {
28492
28492
  return "DenoiseNode";
28493
28493
  }
28494
28494
  constructor(A, e, t, i, g) {
28495
- super(), this.textureNode = A, this.depthNode = e, this.normalNode = t, this.noiseNode = i, this.cameraProjectionMatrixInverse = Ae(g.projectionMatrixInverse), this.lumaPhi = Ae(5), this.depthPhi = Ae(5), this.normalPhi = Ae(5), this.radius = Ae(5), this.index = Ae(0), this._resolution = Ae(new V()), this._sampleVectors = TC(efA(16, 2, 1)), this.updateBeforeType = Pe.RENDER;
28495
+ super(), this.textureNode = A, this.depthNode = e, this.normalNode = t, this.noiseNode = i, this.cameraProjectionMatrixInverse = ee(g.projectionMatrixInverse), this.lumaPhi = ee(5), this.depthPhi = ee(5), this.normalPhi = ee(5), this.radius = ee(5), this.index = ee(0), this._resolution = ee(new V()), this._sampleVectors = TC(efA(16, 2, 1)), this.updateBeforeType = Pe.RENDER;
28496
28496
  }
28497
28497
  updateBefore() {
28498
28498
  const A = this.textureNode.value;
@@ -28551,7 +28551,7 @@ class ceA extends Gt {
28551
28551
  return "FXAANode";
28552
28552
  }
28553
28553
  constructor(A) {
28554
- super(), this.textureNode = A, this.updateBeforeType = Pe.RENDER, this._invSize = Ae(new V());
28554
+ super(), this.textureNode = A, this.updateBeforeType = Pe.RENDER, this._invSize = ee(new V());
28555
28555
  }
28556
28556
  updateBefore() {
28557
28557
  const A = this.textureNode.value;
@@ -28631,7 +28631,7 @@ class leA extends Gt {
28631
28631
  return "BloomNode";
28632
28632
  }
28633
28633
  constructor(A, e = 1, t = 0, i = 0) {
28634
- super(), this.inputNode = A, this.strength = Ae(e), this.radius = Ae(t), this.threshold = Ae(i), this.smoothWidth = Ae(0.01), this._renderTargetsHorizontal = [], this._renderTargetsVertical = [], this._nMips = 5, this._renderTargetBright = new Ng(1, 1, { type: Wt }), this._renderTargetBright.texture.name = "UnrealBloomPass.bright", this._renderTargetBright.texture.generateMipmaps = !1;
28634
+ super(), this.inputNode = A, this.strength = ee(e), this.radius = ee(t), this.threshold = ee(i), this.smoothWidth = ee(0.01), this._renderTargetsHorizontal = [], this._renderTargetsVertical = [], this._nMips = 5, this._renderTargetBright = new Ng(1, 1, { type: Wt }), this._renderTargetBright.texture.name = "UnrealBloomPass.bright", this._renderTargetBright.texture.generateMipmaps = !1;
28635
28635
  for (let g = 0; g < this._nMips; g++) {
28636
28636
  const o = new Ng(1, 1, { type: Wt });
28637
28637
  o.texture.name = "UnrealBloomPass.h" + g, o.texture.generateMipmaps = !1, this._renderTargetsHorizontal.push(o);
@@ -28697,7 +28697,7 @@ class leA extends Gt {
28697
28697
  const t = [];
28698
28698
  for (let c = 0; c < e; c++)
28699
28699
  t.push(0.39894 * Math.exp(-0.5 * c * c / (e * e)) / e);
28700
- const i = vt(), g = TC(t), o = Ae(new V()), n = Ae(new V(0.5, 0.5)), I = Bt(), r = (c) => i.uv(c), a = gA(() => {
28700
+ const i = vt(), g = TC(t), o = ee(new V()), n = ee(new V(0.5, 0.5)), I = Bt(), r = (c) => i.uv(c), a = gA(() => {
28701
28701
  const c = g.element(0).toVar(), l = r(I).rgb.mul(c).toVar();
28702
28702
  return Kt({ start: X(1), end: X(e), type: "int", condition: "<" }, ({ i: h }) => {
28703
28703
  const Q = _(h), E = g.element(h), d = n.mul(o).mul(Q), u = r(I.add(d)).rgb, p = r(I.sub(d)).rgb;
@@ -28737,7 +28737,7 @@ class CfA extends Gt {
28737
28737
  return "PixelationNode";
28738
28738
  }
28739
28739
  constructor(A, e, t, i, g, o) {
28740
- super(), this.textureNode = A, this.depthNode = e, this.normalNode = t, this.pixelSize = i, this.normalEdgeStrength = g, this.depthEdgeStrength = o, this._resolution = Ae(new zA()), this.updateBeforeType = Pe.RENDER;
28740
+ super(), this.textureNode = A, this.depthNode = e, this.normalNode = t, this.pixelSize = i, this.normalEdgeStrength = g, this.depthEdgeStrength = o, this._resolution = ee(new zA()), this.updateBeforeType = Pe.RENDER;
28741
28741
  }
28742
28742
  updateBefore() {
28743
28743
  const A = this.textureNode.value, e = A.image.width, t = A.image.height;
@@ -28798,7 +28798,7 @@ class QeA extends go {
28798
28798
  return "SSAAPassNode";
28799
28799
  }
28800
28800
  constructor(A, e) {
28801
- super(go.COLOR, A, e), this.isSSAAPassNode = !0, this.sampleLevel = 4, this.unbiased = !0, this.clearColor = new pA(0), this.clearAlpha = 0, this._currentClearColor = new pA(), this.sampleWeight = Ae(1), this.sampleRenderTarget = null, this._quadMesh = new ec();
28801
+ super(go.COLOR, A, e), this.isSSAAPassNode = !0, this.sampleLevel = 4, this.unbiased = !0, this.clearColor = new pA(0), this.clearAlpha = 0, this._currentClearColor = new pA(), this.sampleWeight = ee(1), this.sampleRenderTarget = null, this._quadMesh = new ec();
28802
28802
  }
28803
28803
  updateBefore(A) {
28804
28804
  const { renderer: e } = A, { scene: t, camera: i } = this;
@@ -28991,7 +28991,7 @@ class ueA extends deA {
28991
28991
  return "AnaglyphPassNode";
28992
28992
  }
28993
28993
  constructor(A, e) {
28994
- super(A, e), this.isAnaglyphPassNode = !0, this._colorMatrixLeft = Ae(new it().fromArray([
28994
+ super(A, e), this.isAnaglyphPassNode = !0, this._colorMatrixLeft = ee(new it().fromArray([
28995
28995
  0.4561,
28996
28996
  -0.0400822,
28997
28997
  -0.0152161,
@@ -29001,7 +29001,7 @@ class ueA extends deA {
29001
29001
  0.176381,
29002
29002
  -0.0157589,
29003
29003
  -546856e-8
29004
- ])), this._colorMatrixRight = Ae(new it().fromArray([
29004
+ ])), this._colorMatrixRight = ee(new it().fromArray([
29005
29005
  -0.0434706,
29006
29006
  0.378476,
29007
29007
  -0.0721527,
@@ -29452,7 +29452,7 @@ class Uh extends ld {
29452
29452
  return "AnalyticLightNode";
29453
29453
  }
29454
29454
  constructor(A = null) {
29455
- super(), this.updateType = Pe.FRAME, this.light = A, this.color = new pA(), this.colorNode = Ae(this.color).setGroup(qt), this.baseColorNode = null, this.shadowMap = null, this.shadowNode = null, this.shadowColorNode = null, this.vsmShadowMapVertical = null, this.vsmShadowMapHorizontal = null, this.vsmMaterialVertical = null, this.vsmMaterialHorizontal = null, this.isAnalyticLightNode = !0;
29455
+ super(), this.updateType = Pe.FRAME, this.light = A, this.color = new pA(), this.colorNode = ee(this.color).setGroup(qt), this.baseColorNode = null, this.shadowMap = null, this.shadowNode = null, this.shadowColorNode = null, this.vsmShadowMapVertical = null, this.vsmShadowMapHorizontal = null, this.vsmMaterialVertical = null, this.vsmMaterialHorizontal = null, this.isAnalyticLightNode = !0;
29456
29456
  }
29457
29457
  getCacheKey() {
29458
29458
  return O1(super.getCacheKey(), this.light.id, this.light.castShadow ? 1 : 0);
@@ -29477,7 +29477,7 @@ class Uh extends ld {
29477
29477
  w.fragmentNode = bfA({ samples: y, radius: m, size: S, shadowPass: p }).context(A.getSharedContext()), w.name = "VSMVertical", w = this.vsmMaterialHorizontal || (this.vsmMaterialHorizontal = new zt()), w.fragmentNode = FfA({ samples: y, radius: m, size: S, shadowPass: f }).context(A.getSharedContext()), w.name = "VSMHorizontal";
29478
29478
  }
29479
29479
  const r = Gg("intensity", "float", o).setGroup(qt), a = Gg("bias", "float", o).setGroup(qt), C = Gg("normalBias", "float", o).setGroup(qt), c = e.material.shadowPositionNode || kU;
29480
- let l = Ae(o.matrix).setGroup(qt).mul(c.add(KF.mul(C)));
29480
+ let l = ee(o.matrix).setGroup(qt).mul(c.add(KF.mul(C)));
29481
29481
  l = l.xyz.div(l.w);
29482
29482
  let h = l.z.add(a);
29483
29483
  t.coordinateSystem === LE && (h = h.mul(2).sub(1)), l = z(
@@ -29538,15 +29538,15 @@ function oq(s) {
29538
29538
  }
29539
29539
  function nq(s) {
29540
29540
  const A = oq(s);
29541
- return A.position || (A.position = Ae(new M()).setGroup(qt).onRenderUpdate((e, t) => t.value.setFromMatrixPosition(s.matrixWorld)));
29541
+ return A.position || (A.position = ee(new M()).setGroup(qt).onRenderUpdate((e, t) => t.value.setFromMatrixPosition(s.matrixWorld)));
29542
29542
  }
29543
29543
  function MeA(s) {
29544
29544
  const A = oq(s);
29545
- return A.targetPosition || (A.targetPosition = Ae(new M()).setGroup(qt).onRenderUpdate((e, t) => t.value.setFromMatrixPosition(s.target.matrixWorld)));
29545
+ return A.targetPosition || (A.targetPosition = ee(new M()).setGroup(qt).onRenderUpdate((e, t) => t.value.setFromMatrixPosition(s.target.matrixWorld)));
29546
29546
  }
29547
29547
  function VF(s) {
29548
29548
  const A = oq(s);
29549
- return A.viewPosition || (A.viewPosition = Ae(new M()).setGroup(qt).onRenderUpdate(({ camera: e }, t) => {
29549
+ return A.viewPosition || (A.viewPosition = ee(new M()).setGroup(qt).onRenderUpdate(({ camera: e }, t) => {
29550
29550
  t.value = t.value || new M(), t.value.setFromMatrixPosition(s.matrixWorld), t.value.applyMatrix4(e.matrixWorldInverse);
29551
29551
  }));
29552
29552
  }
@@ -29598,7 +29598,7 @@ class OfA extends Gt {
29598
29598
  return "VelocityNode";
29599
29599
  }
29600
29600
  constructor() {
29601
- super("vec2"), this.updateType = Pe.OBJECT, this.updateAfterType = Pe.OBJECT, this.previousModelWorldMatrix = Ae(new lA()), this.previousProjectionMatrix = Ae(new lA()).setGroup(qt), this.previousCameraViewMatrix = Ae(new lA());
29601
+ super("vec2"), this.updateType = Pe.OBJECT, this.updateAfterType = Pe.OBJECT, this.previousModelWorldMatrix = ee(new lA()), this.previousProjectionMatrix = ee(new lA()).setGroup(qt), this.previousCameraViewMatrix = ee(new lA());
29602
29602
  }
29603
29603
  update({ frameId: A, camera: e, object: t }) {
29604
29604
  const i = tX(t);
@@ -30602,7 +30602,7 @@ class WeA extends Uh {
30602
30602
  return "PointLightNode";
30603
30603
  }
30604
30604
  constructor(A = null) {
30605
- super(A), this.cutoffDistanceNode = Ae(0).setGroup(qt), this.decayExponentNode = Ae(0).setGroup(qt);
30605
+ super(A), this.cutoffDistanceNode = ee(0).setGroup(qt), this.decayExponentNode = ee(0).setGroup(qt);
30606
30606
  }
30607
30607
  update(A) {
30608
30608
  const { light: e } = this;
@@ -30645,7 +30645,7 @@ class jeA extends Uh {
30645
30645
  return "RectAreaLightNode";
30646
30646
  }
30647
30647
  constructor(A = null) {
30648
- super(A), this.halfHeight = Ae(new M()).setGroup(qt), this.halfWidth = Ae(new M()).setGroup(qt);
30648
+ super(A), this.halfHeight = ee(new M()).setGroup(qt), this.halfWidth = ee(new M()).setGroup(qt);
30649
30649
  }
30650
30650
  update(A) {
30651
30651
  super.update(A);
@@ -30676,7 +30676,7 @@ class cq extends Uh {
30676
30676
  return "SpotLightNode";
30677
30677
  }
30678
30678
  constructor(A = null) {
30679
- super(A), this.coneCosNode = Ae(0).setGroup(qt), this.penumbraCosNode = Ae(0).setGroup(qt), this.cutoffDistanceNode = Ae(0).setGroup(qt), this.decayExponentNode = Ae(0).setGroup(qt);
30679
+ super(A), this.coneCosNode = ee(0).setGroup(qt), this.penumbraCosNode = ee(0).setGroup(qt), this.cutoffDistanceNode = ee(0).setGroup(qt), this.decayExponentNode = ee(0).setGroup(qt);
30680
30680
  }
30681
30681
  update(A) {
30682
30682
  super.update(A);
@@ -30732,7 +30732,7 @@ class etA extends Uh {
30732
30732
  return "HemisphereLightNode";
30733
30733
  }
30734
30734
  constructor(A = null) {
30735
- super(A), this.lightPositionNode = nq(A), this.lightDirectionNode = this.lightPositionNode.normalize(), this.groundColorNode = Ae(new pA()).setGroup(qt);
30735
+ super(A), this.lightPositionNode = nq(A), this.lightDirectionNode = this.lightPositionNode.normalize(), this.groundColorNode = ee(new pA()).setGroup(qt);
30736
30736
  }
30737
30737
  update(A) {
30738
30738
  const { light: e } = this;
@@ -31982,7 +31982,7 @@ const PmA = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
31982
31982
  trunc: dH,
31983
31983
  tslFn: IEA,
31984
31984
  uint: he,
31985
- uniform: Ae,
31985
+ uniform: ee,
31986
31986
  uniformArray: TC,
31987
31987
  uniformGroup: B6,
31988
31988
  uniforms: LEA,
@@ -39478,7 +39478,7 @@ function CiA(s, A, e, t) {
39478
39478
  let gk = !1;
39479
39479
  g0A((...s) => {
39480
39480
  var A;
39481
- ee() && ((A = ei.Current) != null && A.isInXR) && (vp(!0), ciA("error", ...s));
39481
+ jA() && ((A = ei.Current) != null && A.isInXR) && (vp(!0), ciA("error", ...s));
39482
39482
  });
39483
39483
  function vp(s) {
39484
39484
  if (s) {
@@ -39756,7 +39756,7 @@ function gx(s) {
39756
39756
  ds(s, Jr.Error);
39757
39757
  }
39758
39758
  let $Y, IL;
39759
- function ee() {
39759
+ function jA() {
39760
39760
  if (aGA)
39761
39761
  return !1;
39762
39762
  if ($Y !== void 0)
@@ -39778,7 +39778,7 @@ if (!CGA && (r0 || BI())) {
39778
39778
  A.searchParams.set("console", "1"), console.log('🌵 Tip: You can add the "?console" query parameter to the url to show the debug console (on mobile it will automatically open in the bottom right corner when your get errors during development. In VR a spatial console will appear.)', `
39779
39779
  Open this page to get the console: ` + A.toString());
39780
39780
  }
39781
- const s = ve.isMobileDevice() || ve.isQuest() && ee();
39781
+ const s = ve.isMobileDevice() || ve.isQuest() && jA();
39782
39782
  if ((s || r0) && (I0A(), hiA(), QiA(!0), s)) {
39783
39783
  const A = document.querySelector("needle-engine");
39784
39784
  A == null || A.addEventListener("enter-ar", () => {
@@ -39951,15 +39951,15 @@ function uGA() {
39951
39951
  return s || null;
39952
39952
  }
39953
39953
  const EiA = tA("debugdefines");
39954
- bh('if(!globalThis[""4.1.0-alpha.8""]) globalThis[""4.1.0-alpha.8""] = "0.0.0";');
39954
+ bh('if(!globalThis[""4.1.0-alpha.9""]) globalThis[""4.1.0-alpha.9""] = "0.0.0";');
39955
39955
  bh('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
39956
- bh('if(!globalThis[""Tue Jan 14 2025 14:13:53 GMT+0100 (Central European Standard Time)""]) globalThis[""Tue Jan 14 2025 14:13:53 GMT+0100 (Central European Standard Time)""] = "unknown";');
39956
+ bh('if(!globalThis[""Wed Jan 15 2025 09:56:28 GMT+0100 (Central European Standard Time)""]) globalThis[""Wed Jan 15 2025 09:56:28 GMT+0100 (Central European Standard Time)""] = "unknown";');
39957
39957
  bh('if(!globalThis[""npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9""]) globalThis[""npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9""] = "unknown";');
39958
- bh('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.1.0-alpha.8";');
39958
+ bh('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.1.0-alpha.9";');
39959
39959
  bh('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
39960
- bh('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Tue Jan 14 2025 14:13:53 GMT+0100 (Central European Standard Time)";');
39960
+ bh('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Wed Jan 15 2025 09:56:28 GMT+0100 (Central European Standard Time)";');
39961
39961
  bh('globalThis["__NEEDLE_PUBLIC_KEY__"] = "npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9";');
39962
- const _C = "4.1.0-alpha.8", _q = "undefined", diA = "Tue Jan 14 2025 14:13:53 GMT+0100 (Central European Standard Time)";
39962
+ const _C = "4.1.0-alpha.9", _q = "undefined", diA = "Wed Jan 15 2025 09:56:28 GMT+0100 (Central European Standard Time)";
39963
39963
  EiA && console.log(`Engine version: ${_C} (generator: ${_q})
39964
39964
  Project built at ${diA}`);
39965
39965
  const hN = "npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9", WB = "needle_isActiveInHierarchy", ju = "builtin_components", QN = "needle_editor_guid";
@@ -65910,7 +65910,7 @@ class LbA {
65910
65910
  console.debug(`⊡ Connecting to networking backend on
65911
65911
  ` + Xn);
65912
65912
  const g = await Promise.resolve().then(() => UPA), o = ((r = g.default) == null ? void 0 : r.WebsocketBuilder) ?? g.WebsocketBuilder, n = ((a = g.default) == null ? void 0 : a.ExponentialBackoff) ?? g.ExponentialBackoff, I = new o(Xn).withMaxRetries(10).withBackoff(new n(2e3, 4)).onOpen(() => {
65913
- this._connectingToWebsocketPromise = null, this._ws = I, this.connected = !0, ee() || kI ? console.log(`⊞ Connected to networking backend
65913
+ this._connectingToWebsocketPromise = null, this._ws = I, this.connected = !0, jA() || kI ? console.log(`⊞ Connected to networking backend
65914
65914
  ` + Xn) : console.debug("⊞ Connected to networking backend", Xn), i(!0), this.onSendQueued(hC.OnConnection);
65915
65915
  }).onClose((C) => {
65916
65916
  this._connectingToWebsocketPromise = null, this.connected = !1, this._isInRoom = !1, i(!1);
@@ -65941,7 +65941,7 @@ class LbA {
65941
65941
  this.handleIncomingStringMessage(i);
65942
65942
  return;
65943
65943
  } catch (i) {
65944
- kI && t === "pong" ? console.log("<<", t) : ee() && console.error("Failed to parse message", i);
65944
+ kI && t === "pong" ? console.log("<<", t) : jA() && console.error("Failed to parse message", i);
65945
65945
  }
65946
65946
  }
65947
65947
  async handleIncomingBinaryMessage(A) {
@@ -65974,7 +65974,7 @@ class LbA {
65974
65974
  if (kI && console.log(A), A) {
65975
65975
  this._isInRoom = !0;
65976
65976
  const I = A;
65977
- this._currentRoomName = I.room, this._currentRoomViewId = I.viewId, this._currentRoomAllowEditing = I.allowEditing ?? !0, this._currentInRoom.length = 0, this._currentInRoom.push(...I.inRoom), (sv || ee()) && console.debug("Joined Needle Engine Room: " + I.room);
65977
+ this._currentRoomName = I.room, this._currentRoomViewId = I.viewId, this._currentRoomAllowEditing = I.allowEditing ?? !0, this._currentInRoom.length = 0, this._currentInRoom.push(...I.inRoom), (sv || jA()) && console.debug("Joined Needle Engine Room: " + I.room);
65978
65978
  const r = new URL(window.location.href);
65979
65979
  r.searchParams.has("room") && r.searchParams.delete("room"), r.searchParams.set("view", this._currentRoomViewId), console.debug(`Room view id: ${this._currentRoomViewId}
65980
65980
  ${r.href}`);
@@ -68337,7 +68337,7 @@ function UFA() {
68337
68337
  }, 100);
68338
68338
  });
68339
68339
  }
68340
- ve.isDesktop() && ee() && window.addEventListener("keydown", (s) => {
68340
+ ve.isDesktop() && jA() && window.addEventListener("keydown", (s) => {
68341
68341
  (s.key === "x" || s.key === "Escape") && He.active && He.stop();
68342
68342
  });
68343
68343
  const Zc = class {
@@ -68724,10 +68724,10 @@ const Zc = class {
68724
68724
  return pS.exportAndOpen(), null;
68725
68725
  } else
68726
68726
  A == "ar" && (A = "immersive-ar");
68727
- if (ee() && tA("debugxrpreroom"))
68727
+ if (jA() && tA("debugxrpreroom"))
68728
68728
  return console.warn("Debug: Starting temporary XR session"), await vB.start(A, e || Zc.getDefaultSessionInit(A)), null;
68729
68729
  if (this._currentSessionRequest)
68730
- return console.warn("A XRSession is already being requested"), (vg || ee()) && Mi("A XRSession is already being requested"), this._currentSessionRequest.then(() => this._activeSession);
68730
+ return console.warn("A XRSession is already being requested"), (vg || jA()) && Mi("A XRSession is already being requested"), this._currentSessionRequest.then(() => this._activeSession);
68731
68731
  if (this._activeSession)
68732
68732
  return console.error("A XRSession is already running"), this._activeSession;
68733
68733
  if (t || (t = Ve.Current), t || (t = ei.All[0]), !t)
@@ -68853,7 +68853,7 @@ const Zc = class {
68853
68853
  }
68854
68854
  /** Returns true if running in pass through mode in immersive AR (e.g. user is wearing a headset while in AR) */
68855
68855
  get isPassThrough() {
68856
- return !!(this.environmentBlendMode !== "opaque" && this.interactionMode === "world-space" || this.mode === "immersive-ar" && this.environmentBlendMode !== "opaque" && this.controllers.some((A) => A.inputSource.targetRayMode === "tracked-pointer") || ee() && ve.isDesktop() && this.mode === "immersive-ar");
68856
+ return !!(this.environmentBlendMode !== "opaque" && this.interactionMode === "world-space" || this.mode === "immersive-ar" && this.environmentBlendMode !== "opaque" && this.controllers.some((A) => A.inputSource.targetRayMode === "tracked-pointer") || jA() && ve.isDesktop() && this.mode === "immersive-ar");
68857
68857
  }
68858
68858
  get isAR() {
68859
68859
  return this.mode === "immersive-ar";
@@ -69738,7 +69738,7 @@ var XU;
69738
69738
  e || (e = !0, Promise.resolve().then(() => l3A).then((d) => {
69739
69739
  t = d.acceleratedRaycast, i = d.MeshBVH, g = d.StaticGeometryGenerator, o = d.computeBoundsTree;
69740
69740
  }).catch((d) => {
69741
- (FI || ee()) && console.error("Failed to load BVH library...", d.message);
69741
+ (FI || jA()) && console.error("Failed to load BVH library...", d.message);
69742
69742
  }));
69743
69743
  }
69744
69744
  const I = new lA();
@@ -69748,7 +69748,7 @@ var XU;
69748
69748
  r = !0, a = !0, Promise.resolve().then(() => E3A).then((d) => {
69749
69749
  C = d.GenerateMeshBVHWorker;
69750
69750
  }).catch((d) => {
69751
- (FI || ee()) && console.warn("Failed to setup mesh bvh worker");
69751
+ (FI || jA()) && console.warn("Failed to setup mesh bvh worker");
69752
69752
  }).finally(() => {
69753
69753
  a = !1;
69754
69754
  });
@@ -70020,7 +70020,7 @@ function zU(s) {
70020
70020
  try {
70021
70021
  const e = is[A];
70022
70022
  if (e.isComponent !== !0) {
70023
- (ee() || K_) && console.error(`Registered script is not a Needle Engine component.
70023
+ (jA() || K_) && console.error(`Registered script is not a Needle Engine component.
70024
70024
  The script will be ignored. Please make sure your component extends "Behaviour" imported from "@needle-tools/engine"
70025
70025
  `, e), is.splice(A, 1), A--;
70026
70026
  continue;
@@ -70116,7 +70116,7 @@ function mN(s) {
70116
70116
  return;
70117
70117
  }
70118
70118
  const A = rG(s);
70119
- FgA(s, A, !0) || (K_ || ee() ? console.error(`Error updating hierarchy
70119
+ FgA(s, A, !0) || (K_ || jA() ? console.error(`Error updating hierarchy
70120
70120
  Do you have circular references in your project? <a target="_blank" href="https://docs.needle.tools/circular-reference"> Click here for more information.`, s) : console.error('Failed to update active state in hierarchy of "' + s.name + '"', s), console.warn(" ↑ this error might be caused by circular references. Please make sure you don't have files with circular references (e.g. one GLB 1 is loading GLB 2 which is then loading GLB 1 again)."));
70121
70121
  }
70122
70122
  function FgA(s, A, e, t = 0) {
@@ -70336,7 +70336,7 @@ function dx(s, A, e = !0, t) {
70336
70336
  return;
70337
70337
  }
70338
70338
  if (!A.isConnected) {
70339
- ee() && console.debug("Can not send destroy: not connected", s.guid);
70339
+ jA() && console.debug("Can not send destroy: not connected", s.guid);
70340
70340
  return;
70341
70341
  }
70342
70342
  let g = s.guid;
@@ -70402,7 +70402,7 @@ function JgA(s, A, e, t) {
70402
70402
  if (a.guid) {
70403
70403
  jU && console.log("[Local] new instance", "gameobject:", o == null ? void 0 : o.guid);
70404
70404
  const C = new axA(i.guid, a.guid);
70405
- C.seed = n, A.deleteOnDisconnect === !0 && (C.deleteStateOnDisconnect = !0), g && (g.position && (C.position = { x: g.position.x, y: g.position.y, z: g.position.z }), g.rotation && (C.rotation = { x: g.rotation.x, y: g.rotation.y, z: g.rotation.z, w: g.rotation.w }), g.scale && (C.scale = { x: g.scale.x, y: g.scale.y, z: g.scale.z })), C.position || (C.position = { x: a.position.x, y: a.position.y, z: a.position.z }), C.rotation || (C.rotation = { x: a.quaternion.x, y: a.quaternion.y, z: a.quaternion.z, w: a.quaternion.w }), C.scale || (C.scale = { x: a.scale.x, y: a.scale.y, z: a.scale.z }), C.visible = i.visible, g != null && g.parent && (typeof g.parent == "string" ? C.parent = g.parent : C.parent = g.parent.guid), C.hostData = e, t === !1 && (C.dontSave = !0), !((I = A == null ? void 0 : A.context) == null ? void 0 : I.connection) && ee() && console.debug("Object will be instantiated but it will not be synced: not connected", i.guid), A.context.connection.isInRoom && ip.push(new WeakRef(a)), (r = A == null ? void 0 : A.context) == null || r.connection.send("new-instance-created", C);
70405
+ C.seed = n, A.deleteOnDisconnect === !0 && (C.deleteStateOnDisconnect = !0), g && (g.position && (C.position = { x: g.position.x, y: g.position.y, z: g.position.z }), g.rotation && (C.rotation = { x: g.rotation.x, y: g.rotation.y, z: g.rotation.z, w: g.rotation.w }), g.scale && (C.scale = { x: g.scale.x, y: g.scale.y, z: g.scale.z })), C.position || (C.position = { x: a.position.x, y: a.position.y, z: a.position.z }), C.rotation || (C.rotation = { x: a.quaternion.x, y: a.quaternion.y, z: a.quaternion.z, w: a.quaternion.w }), C.scale || (C.scale = { x: a.scale.x, y: a.scale.y, z: a.scale.z }), C.visible = i.visible, g != null && g.parent && (typeof g.parent == "string" ? C.parent = g.parent : C.parent = g.parent.guid), C.hostData = e, t === !1 && (C.dontSave = !0), !((I = A == null ? void 0 : A.context) == null ? void 0 : I.connection) && jA() && console.debug("Object will be instantiated but it will not be synced: not connected", i.guid), A.context.connection.isInRoom && ip.push(new WeakRef(a)), (r = A == null ? void 0 : A.context) == null || r.connection.send("new-instance-created", C);
70406
70406
  } else
70407
70407
  console.warn("Missing guid, can not send new instance event", a);
70408
70408
  }
@@ -72843,7 +72843,7 @@ const Dp = [];
72843
72843
  function fd() {
72844
72844
  if (eb)
72845
72845
  return;
72846
- ee() && console.debug("User interaction registered: audio can now be played"), eb = !0;
72846
+ jA() && console.debug("User interaction registered: audio can now be played"), eb = !0;
72847
72847
  const s = [...Dp];
72848
72848
  Dp.length = 0, s.forEach((A) => A());
72849
72849
  }
@@ -73642,17 +73642,17 @@ class SS extends F1 {
73642
73642
  SA <<= 1;
73643
73643
  for (SA >>= 1, EA = SA, SA >>= 1; SA >= 1; ) {
73644
73644
  PA = 0;
73645
- const WA = PA + j * (AA - EA), $A = j * SA, Se = j * EA, VA = T * SA, TA = T * EA;
73645
+ const WA = PA + j * (AA - EA), Ae = j * SA, Se = j * EA, VA = T * SA, TA = T * EA;
73646
73646
  let Je, Le, _t, tg;
73647
73647
  for (; PA <= WA; PA += Se) {
73648
73648
  let Dt = PA;
73649
73649
  const Mt = PA + T * (J - EA);
73650
73650
  for (; Dt <= Mt; Dt += TA) {
73651
- const ut = Dt + VA, _s = Dt + $A, ws = _s + VA;
73651
+ const ut = Dt + VA, _s = Dt + Ae, ws = _s + VA;
73652
73652
  GA ? (FA(R[Dt + x], R[_s + x]), Je = kA.a, _t = kA.b, FA(R[ut + x], R[ws + x]), Le = kA.a, tg = kA.b, FA(Je, Le), R[Dt + x] = kA.a, R[ut + x] = kA.b, FA(_t, tg), R[_s + x] = kA.a, R[ws + x] = kA.b) : (oe(R[Dt + x], R[_s + x]), Je = kA.a, _t = kA.b, oe(R[ut + x], R[ws + x]), Le = kA.a, tg = kA.b, oe(Je, Le), R[Dt + x] = kA.a, R[ut + x] = kA.b, oe(_t, tg), R[_s + x] = kA.a, R[ws + x] = kA.b);
73653
73653
  }
73654
73654
  if (J & SA) {
73655
- const ut = Dt + $A;
73655
+ const ut = Dt + Ae;
73656
73656
  GA ? FA(R[Dt + x], R[ut + x]) : oe(R[Dt + x], R[ut + x]), Je = kA.a, R[ut + x] = kA.b, R[Dt + x] = Je;
73657
73657
  }
73658
73658
  }
@@ -73693,8 +73693,8 @@ class SS extends F1 {
73693
73693
  throw new Error("hufDecode issues");
73694
73694
  }
73695
73695
  }
73696
- const $A = 8 - AA & 7;
73697
- for (SA >>= $A, EA -= $A; EA > 0; ) {
73696
+ const Ae = 8 - AA & 7;
73697
+ for (SA >>= Ae, EA -= Ae; EA > 0; ) {
73698
73698
  const Se = x[SA << 14 - EA & 16383];
73699
73699
  if (Se.len)
73700
73700
  EA -= Se.len, OA(Se.lit, j, SA, EA, J, T, GA, DA, PA), SA = KA.c, EA = KA.lc;
@@ -73711,8 +73711,8 @@ class SS extends F1 {
73711
73711
  throw new Error("Something wrong with HUF_ENCSIZE");
73712
73712
  const PA = new Array(65537), WA = new Array(16384);
73713
73713
  k(WA);
73714
- const $A = T - (J.value - GA);
73715
- if (v(R, J, $A, DA, SA, PA), EA > 8 * (T - (J.value - GA)))
73714
+ const Ae = T - (J.value - GA);
73715
+ if (v(R, J, Ae, DA, SA, PA), EA > 8 * (T - (J.value - GA)))
73716
73716
  throw new Error("Something wrong with hufUncompress");
73717
73717
  oA(PA, DA, SA, WA), De(PA, WA, R, J, EA, SA, j, AA, QA);
73718
73718
  }
@@ -73732,7 +73732,7 @@ class SS extends F1 {
73732
73732
  for (; !(AA > j || (x[AA++] = R[J++], AA > j)); )
73733
73733
  x[AA++] = R[T++];
73734
73734
  }
73735
- function jA(R) {
73735
+ function $A(R) {
73736
73736
  let x = R.byteLength;
73737
73737
  const J = new Array();
73738
73738
  let T = 0;
@@ -73756,7 +73756,7 @@ class SS extends F1 {
73756
73756
  }
73757
73757
  function ZA(R, x, J, T, AA, j) {
73758
73758
  let QA = new DataView(j.buffer);
73759
- const GA = J[R.idx[0]].width, DA = J[R.idx[0]].height, SA = 3, EA = Math.floor(GA / 8), PA = Math.ceil(GA / 8), WA = Math.ceil(DA / 8), $A = GA - (PA - 1) * 8, Se = DA - (WA - 1) * 8, VA = { value: 0 }, TA = new Array(SA), Je = new Array(SA), Le = new Array(SA), _t = new Array(SA), tg = new Array(SA);
73759
+ const GA = J[R.idx[0]].width, DA = J[R.idx[0]].height, SA = 3, EA = Math.floor(GA / 8), PA = Math.ceil(GA / 8), WA = Math.ceil(DA / 8), Ae = GA - (PA - 1) * 8, Se = DA - (WA - 1) * 8, VA = { value: 0 }, TA = new Array(SA), Je = new Array(SA), Le = new Array(SA), _t = new Array(SA), tg = new Array(SA);
73760
73760
  for (let Mt = 0; Mt < SA; ++Mt)
73761
73761
  tg[Mt] = x[R.idx[Mt]], TA[Mt] = Mt < 1 ? 0 : TA[Mt - 1] + PA * WA, Je[Mt] = new Float32Array(64), Le[Mt] = new Uint16Array(64), _t[Mt] = new Uint16Array(PA * 64);
73762
73762
  for (let Mt = 0; Mt < WA; ++Mt) {
@@ -73764,7 +73764,7 @@ class SS extends F1 {
73764
73764
  Mt == WA - 1 && (ut = Se);
73765
73765
  let _s = 8;
73766
73766
  for (let Et = 0; Et < PA; ++Et) {
73767
- Et == PA - 1 && (_s = $A);
73767
+ Et == PA - 1 && (_s = Ae);
73768
73768
  for (let Ci = 0; Ci < SA; ++Ci)
73769
73769
  Le[Ci].fill(0), Le[Ci][0] = AA[TA[Ci]++], ge(VA, T, Le[Ci]), ke(Le[Ci], Je[Ci]), Ee(Je[Ci]);
73770
73770
  q(Je);
@@ -73815,8 +73815,8 @@ class SS extends F1 {
73815
73815
  function Ee(R) {
73816
73816
  const x = 0.5 * Math.cos(0.7853975), J = 0.5 * Math.cos(3.14159 / 16), T = 0.5 * Math.cos(3.14159 / 8), AA = 0.5 * Math.cos(3 * 3.14159 / 16), j = 0.5 * Math.cos(5 * 3.14159 / 16), QA = 0.5 * Math.cos(3 * 3.14159 / 8), GA = 0.5 * Math.cos(7 * 3.14159 / 16), DA = new Array(4), SA = new Array(4), EA = new Array(4), PA = new Array(4);
73817
73817
  for (let WA = 0; WA < 8; ++WA) {
73818
- const $A = WA * 8;
73819
- DA[0] = T * R[$A + 2], DA[1] = QA * R[$A + 2], DA[2] = T * R[$A + 6], DA[3] = QA * R[$A + 6], SA[0] = J * R[$A + 1] + AA * R[$A + 3] + j * R[$A + 5] + GA * R[$A + 7], SA[1] = AA * R[$A + 1] - GA * R[$A + 3] - J * R[$A + 5] - j * R[$A + 7], SA[2] = j * R[$A + 1] - J * R[$A + 3] + GA * R[$A + 5] + AA * R[$A + 7], SA[3] = GA * R[$A + 1] - j * R[$A + 3] + AA * R[$A + 5] - J * R[$A + 7], EA[0] = x * (R[$A + 0] + R[$A + 4]), EA[3] = x * (R[$A + 0] - R[$A + 4]), EA[1] = DA[0] + DA[3], EA[2] = DA[1] - DA[2], PA[0] = EA[0] + EA[1], PA[1] = EA[3] + EA[2], PA[2] = EA[3] - EA[2], PA[3] = EA[0] - EA[1], R[$A + 0] = PA[0] + SA[0], R[$A + 1] = PA[1] + SA[1], R[$A + 2] = PA[2] + SA[2], R[$A + 3] = PA[3] + SA[3], R[$A + 4] = PA[3] - SA[3], R[$A + 5] = PA[2] - SA[2], R[$A + 6] = PA[1] - SA[1], R[$A + 7] = PA[0] - SA[0];
73818
+ const Ae = WA * 8;
73819
+ DA[0] = T * R[Ae + 2], DA[1] = QA * R[Ae + 2], DA[2] = T * R[Ae + 6], DA[3] = QA * R[Ae + 6], SA[0] = J * R[Ae + 1] + AA * R[Ae + 3] + j * R[Ae + 5] + GA * R[Ae + 7], SA[1] = AA * R[Ae + 1] - GA * R[Ae + 3] - J * R[Ae + 5] - j * R[Ae + 7], SA[2] = j * R[Ae + 1] - J * R[Ae + 3] + GA * R[Ae + 5] + AA * R[Ae + 7], SA[3] = GA * R[Ae + 1] - j * R[Ae + 3] + AA * R[Ae + 5] - J * R[Ae + 7], EA[0] = x * (R[Ae + 0] + R[Ae + 4]), EA[3] = x * (R[Ae + 0] - R[Ae + 4]), EA[1] = DA[0] + DA[3], EA[2] = DA[1] - DA[2], PA[0] = EA[0] + EA[1], PA[1] = EA[3] + EA[2], PA[2] = EA[3] - EA[2], PA[3] = EA[0] - EA[1], R[Ae + 0] = PA[0] + SA[0], R[Ae + 1] = PA[1] + SA[1], R[Ae + 2] = PA[2] + SA[2], R[Ae + 3] = PA[3] + SA[3], R[Ae + 4] = PA[3] - SA[3], R[Ae + 5] = PA[2] - SA[2], R[Ae + 6] = PA[1] - SA[1], R[Ae + 7] = PA[0] - SA[0];
73820
73820
  }
73821
73821
  for (let WA = 0; WA < 8; ++WA)
73822
73822
  DA[0] = T * R[16 + WA], DA[1] = QA * R[16 + WA], DA[2] = T * R[48 + WA], DA[3] = QA * R[48 + WA], SA[0] = J * R[8 + WA] + AA * R[24 + WA] + j * R[40 + WA] + GA * R[56 + WA], SA[1] = AA * R[8 + WA] - GA * R[24 + WA] - J * R[40 + WA] - j * R[56 + WA], SA[2] = j * R[8 + WA] - J * R[24 + WA] + GA * R[40 + WA] + AA * R[56 + WA], SA[3] = GA * R[8 + WA] - j * R[24 + WA] + AA * R[40 + WA] - J * R[56 + WA], EA[0] = x * (R[WA] + R[32 + WA]), EA[3] = x * (R[WA] - R[32 + WA]), EA[1] = DA[0] + DA[3], EA[2] = DA[1] - DA[2], PA[0] = EA[0] + EA[1], PA[1] = EA[3] + EA[2], PA[2] = EA[3] - EA[2], PA[3] = EA[0] - EA[1], R[0 + WA] = PA[0] + SA[0], R[8 + WA] = PA[1] + SA[1], R[16 + WA] = PA[2] + SA[2], R[24 + WA] = PA[3] + SA[3], R[32 + WA] = PA[3] - SA[3], R[40 + WA] = PA[2] - SA[2], R[48 + WA] = PA[1] - SA[1], R[56 + WA] = PA[0] - SA[0];
@@ -73838,7 +73838,7 @@ class SS extends F1 {
73838
73838
  return new DataView(R.array.buffer, R.offset.value, R.size);
73839
73839
  }
73840
73840
  function vA(R) {
73841
- const x = R.viewer.buffer.slice(R.offset.value, R.offset.value + R.size), J = new Uint8Array(jA(x)), T = new Uint8Array(J.length);
73841
+ const x = R.viewer.buffer.slice(R.offset.value, R.offset.value + R.size), J = new Uint8Array($A(x)), T = new Uint8Array(J.length);
73842
73842
  return O(J), XA(J, T), new DataView(T.buffer);
73843
73843
  }
73844
73844
  function bA(R) {
@@ -73874,13 +73874,13 @@ class SS extends F1 {
73874
73874
  }
73875
73875
  LA(SA, T, j);
73876
73876
  let WA = 0;
73877
- const $A = new Uint8Array(T.buffer.byteLength);
73877
+ const Ae = new Uint8Array(T.buffer.byteLength);
73878
73878
  for (let Se = 0; Se < R.lines; Se++)
73879
73879
  for (let VA = 0; VA < R.inputChannels.length; VA++) {
73880
73880
  const TA = QA[VA], Je = TA.nx * TA.size, Le = new Uint8Array(T.buffer, TA.end * 2, Je * 2);
73881
- $A.set(Le, WA), WA += Je * 2, TA.end += Je;
73881
+ Ae.set(Le, WA), WA += Je * 2, TA.end += Je;
73882
73882
  }
73883
- return new DataView($A.buffer);
73883
+ return new DataView(Ae.buffer);
73884
73884
  }
73885
73885
  function te(R) {
73886
73886
  const x = R.array.slice(R.offset.value, R.offset.value + R.size), J = u0(x), T = R.inputChannels.length * R.lines * R.columns * R.totalBytes, AA = new ArrayBuffer(T), j = new DataView(AA);
@@ -73892,14 +73892,14 @@ class SS extends F1 {
73892
73892
  switch (R.inputChannels[EA].pixelType) {
73893
73893
  case 1:
73894
73894
  DA[0] = QA, DA[1] = DA[0] + R.columns, QA = DA[1] + R.columns;
73895
- for (let $A = 0; $A < R.columns; ++$A) {
73895
+ for (let Ae = 0; Ae < R.columns; ++Ae) {
73896
73896
  const Se = J[DA[0]++] << 8 | J[DA[1]++];
73897
73897
  PA += Se, j.setUint16(GA, PA, !0), GA += 2;
73898
73898
  }
73899
73899
  break;
73900
73900
  case 2:
73901
73901
  DA[0] = QA, DA[1] = DA[0] + R.columns, DA[2] = DA[1] + R.columns, QA = DA[2] + R.columns;
73902
- for (let $A = 0; $A < R.columns; ++$A) {
73902
+ for (let Ae = 0; Ae < R.columns; ++Ae) {
73903
73903
  const Se = J[DA[0]++] << 24 | J[DA[1]++] << 16 | J[DA[2]++] << 8;
73904
73904
  PA += Se, j.setUint32(GA, PA, !0), GA += 4;
73905
73905
  }
@@ -73971,15 +73971,15 @@ class SS extends F1 {
73971
73971
  }
73972
73972
  if (AA.rleRawSize > 0) {
73973
73973
  const VA = R.array.slice(J.value, J.value + AA.rleCompressedSize), TA = u0(VA);
73974
- WA = jA(TA.buffer), J.value += AA.rleCompressedSize;
73974
+ WA = $A(TA.buffer), J.value += AA.rleCompressedSize;
73975
73975
  }
73976
- let $A = 0;
73976
+ let Ae = 0;
73977
73977
  const Se = new Array(DA.length);
73978
73978
  for (let VA = 0; VA < Se.length; ++VA)
73979
73979
  Se[VA] = new Array();
73980
73980
  for (let VA = 0; VA < R.lines; ++VA)
73981
73981
  for (let TA = 0; TA < DA.length; ++TA)
73982
- Se[TA].push($A), $A += DA[TA].width * R.type * 2;
73982
+ Se[TA].push(Ae), Ae += DA[TA].width * R.type * 2;
73983
73983
  ZA(SA, Se, DA, EA, PA, T);
73984
73984
  for (let VA = 0; VA < DA.length; ++VA) {
73985
73985
  const TA = DA[VA];
@@ -74217,8 +74217,8 @@ class SS extends F1 {
74217
74217
  x.value += R.size;
74218
74218
  for (let PA = 0; PA < R.lines; PA++) {
74219
74219
  const WA = PA * R.columns * R.totalBytes;
74220
- for (let $A = 0; $A < R.inputChannels.length; $A++) {
74221
- const Se = lc.channels[$A].name, VA = R.channelByteOffsets[Se] * R.columns, TA = R.decodeChannels[Se];
74220
+ for (let Ae = 0; Ae < R.inputChannels.length; Ae++) {
74221
+ const Se = lc.channels[Ae].name, VA = R.channelByteOffsets[Se] * R.columns, TA = R.decodeChannels[Se];
74222
74222
  if (TA === void 0)
74223
74223
  continue;
74224
74224
  J.value = WA + VA;
@@ -74243,8 +74243,8 @@ class SS extends F1 {
74243
74243
  if (EA >= R.height)
74244
74244
  continue;
74245
74245
  const PA = DA * j, WA = (R.height - 1 - EA) * R.outLineWidth;
74246
- for (let $A = 0; $A < R.inputChannels.length; $A++) {
74247
- const Se = lc.channels[$A].name, VA = R.channelByteOffsets[Se] * R.columns, TA = R.decodeChannels[Se];
74246
+ for (let Ae = 0; Ae < R.inputChannels.length; Ae++) {
74247
+ const Se = lc.channels[Ae].name, VA = R.channelByteOffsets[Se] * R.columns, TA = R.decodeChannels[Se];
74248
74248
  if (TA !== void 0) {
74249
74249
  J.value = PA + VA;
74250
74250
  for (let Je = 0; Je < R.columns; Je++) {
@@ -74386,9 +74386,9 @@ class SS extends F1 {
74386
74386
  j.blockHeight = R.tiles.ySize, j.blockWidth = R.tiles.xSize;
74387
74387
  const EA = PG(R.tiles, j.width, j.height), PA = Ly(EA, j.width, R.tiles.xSize, R.tiles.roundingMode), WA = Ly(EA, j.height, R.tiles.ySize, R.tiles.roundingMode);
74388
74388
  j.tileCount = PA[0] * WA[0];
74389
- for (let $A = 0; $A < EA; $A++)
74390
- for (let Se = 0; Se < WA[$A]; Se++)
74391
- for (let VA = 0; VA < PA[$A]; VA++)
74389
+ for (let Ae = 0; Ae < EA; Ae++)
74390
+ for (let Se = 0; Se < WA[Ae]; Se++)
74391
+ for (let VA = 0; VA < PA[Ae]; VA++)
74392
74392
  yt(x, T);
74393
74393
  j.decode = Td.bind(j);
74394
74394
  } else {
@@ -74611,7 +74611,7 @@ class FKA {
74611
74611
  a && n.push(a);
74612
74612
  }
74613
74613
  const I = await hq(n);
74614
- I != null && I.anyFailed && ee() && console.error("Failed to load lightmap extension", I), g();
74614
+ I != null && I.anyFailed && jA() && console.error("Failed to load lightmap extension", I), g();
74615
74615
  })) : null;
74616
74616
  }
74617
74617
  }
@@ -75187,12 +75187,13 @@ vec3 NeutralToneMapping( vec3 color ) {
75187
75187
  float g = 1. - 3. / (desaturation * extraBrightness + 3.);
75188
75188
  return mix(color, vec3(1, 1, 1), g);
75189
75189
  }
75190
- `, A = "vec3 NeutralToneMapping( vec3 color ) {", e = `return mix(color, vec3(1, 1, 1), g);
75190
+ `, A = "vec3 NeutralToneMapping( vec3 color ) {", e = `return mix( color, vec3( newPeak ), g );
75191
75191
  }`, t = _e.tonemapping_pars_fragment.indexOf(A), i = _e.tonemapping_pars_fragment.indexOf(e, t);
75192
75192
  if (t >= 0 && i >= 0) {
75193
75193
  const g = _e.tonemapping_pars_fragment.substring(t, i + e.length);
75194
75194
  _e.tonemapping_pars_fragment = _e.tonemapping_pars_fragment.replace(g, s);
75195
- }
75195
+ } else
75196
+ jA() && console.error("Couldn't find NeutralToneMapping in ShaderChunk.tonemapping_pars_fragment");
75196
75197
  }
75197
75198
  function WKA() {
75198
75199
  const s = `
@@ -75305,12 +75306,12 @@ vec3 AgXToneMapping( vec3 color ) {
75305
75306
  color = _agxLook(color); // Optional
75306
75307
  color = _agxEotf(color);
75307
75308
  return color;
75308
- }`, A = "vec3 AgXToneMapping( vec3 color ) {", e = ` return color;
75309
- }`, t = _e.tonemapping_pars_fragment.indexOf(A), i = _e.tonemapping_pars_fragment.indexOf(e, t);
75309
+ `, A = "vec3 AgXToneMapping( vec3 color ) {", e = "return color;", t = _e.tonemapping_pars_fragment.indexOf(A), i = _e.tonemapping_pars_fragment.indexOf(e, t);
75310
75310
  if (t >= 0 && i >= 0) {
75311
75311
  const g = _e.tonemapping_pars_fragment.substring(t, i + e.length);
75312
75312
  _e.tonemapping_pars_fragment = _e.tonemapping_pars_fragment.replace(g, s);
75313
- }
75313
+ } else
75314
+ jA() && console.error("Couldn't find AgXToneMapping in ShaderChunk.tonemapping_pars_fragment");
75314
75315
  }
75315
75316
  function en(s) {
75316
75317
  const A = document.createElement("span");
@@ -75363,7 +75364,7 @@ const Yb = class {
75363
75364
  if (this._fullscreenButton)
75364
75365
  return this._fullscreenButton;
75365
75366
  if (!document.fullscreenEnabled)
75366
- return ee() && console.warn("NeedleMenu: Fullscreen button could not be created, device doesn't support the Fullscreen API"), null;
75367
+ return jA() && console.warn("NeedleMenu: Fullscreen button could not be created, device doesn't support the Fullscreen API"), null;
75367
75368
  const e = document.createElement("button");
75368
75369
  this._fullscreenButton = e, e.classList.add("fullscreen-button"), e.title = "Click to enter fullscreen mode";
75369
75370
  const t = en("fullscreen"), i = en("fullscreen_exit");
@@ -76613,7 +76614,7 @@ function UO(s, A) {
76613
76614
  if (!s)
76614
76615
  return;
76615
76616
  if (!s.isComponent) {
76616
- (ee() || Dg) && console.error(`Registered script is not a Needle Engine component.
76617
+ (jA() || Dg) && console.error(`Registered script is not a Needle Engine component.
76617
76618
  The script will be ignored. Please make sure your component extends "Behaviour" imported from "@needle-tools/engine"
76618
76619
  `, s);
76619
76620
  return;
@@ -76901,7 +76902,7 @@ const xi = class {
76901
76902
  const g = (i = (t = this.domElement) == null ? void 0 : t.shadowRoot) == null ? void 0 : i.querySelector("canvas");
76902
76903
  g && (A.canvas = g, Dg && console.log("Using canvas from shadow root", g));
76903
76904
  }
76904
- Dg && console.log("Using Renderer Parameters:", A, this.domElement), this.renderer = new Dh(A), this.renderer.debug.checkShaderErrors = ee() || tA("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = Ao, this.renderer.setClearColor(new pA("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = P2, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = Qe, this.renderer.nodes = {
76905
+ Dg && console.log("Using Renderer Parameters:", A, this.domElement), this.renderer = new Dh(A), this.renderer.debug.checkShaderErrors = jA() || tA("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = Ao, this.renderer.setClearColor(new pA("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = P2, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = Qe, this.renderer.nodes = {
76905
76906
  library: new stA(),
76906
76907
  modelViewMatrix: null,
76907
76908
  modelNormalViewMatrix: null
@@ -77084,7 +77085,7 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
77084
77085
  Dg && console.log("Creating context", this.name, A);
77085
77086
  const t = globalThis["needle:dependencies:ready"];
77086
77087
  t instanceof Promise && (Dg && console.log("Waiting for dependencies to be ready"), await t.catch((Q) => {
77087
- if (Dg || ee()) {
77088
+ if (Dg || jA()) {
77088
77089
  if (gx("Needle Engine dependencies failed to load. Please check the console for more details"), Q instanceof ReferenceError) {
77089
77090
  let E = "YourComponentName";
77090
77091
  const d = Q.message.indexOf("'");
@@ -77223,11 +77224,11 @@ Start a coroutine from a component by calling "this.startCoroutine(myCoroutine()
77223
77224
  }
77224
77225
  /** Performs a full update step including script callbacks, rendering (unless isManagedExternally is set to false) and post render callbacks */
77225
77226
  update(A, e) {
77226
- if (e === void 0 && (e = null), ee() || Dg || OFA())
77227
+ if (e === void 0 && (e = null), jA() || Dg || OFA())
77227
77228
  try {
77228
77229
  performance.mark("update.start"), this.internalStep(A, e), this._renderlooperrors = 0, performance.mark("update.end"), performance.measure("NE Frame", "update.start", "update.end");
77229
77230
  } catch (t) {
77230
- this._renderlooperrors += 1, (ee() || Dg) && (t instanceof Error || t instanceof TypeError) && ds("Caught unhandled exception during render-loop - see console for details.", Jr.Error), console.error("Frame #" + this.time.frame + `
77231
+ this._renderlooperrors += 1, (jA() || Dg) && (t instanceof Error || t instanceof TypeError) && ds("Caught unhandled exception during render-loop - see console for details.", Jr.Error), console.error("Frame #" + this.time.frame + `
77231
77232
  `, t), this._renderlooperrors >= 3 && (console.warn("Stopping render loop due to error"), this.renderer.setAnimationLoop(null)), this.domElement.dispatchEvent(new CustomEvent("error", { detail: t }));
77232
77233
  }
77233
77234
  else
@@ -77778,7 +77779,7 @@ const _b = class {
77778
77779
  f5 && console.log("Loading UI has commercial license?", e);
77779
77780
  const t = document.createElement("div");
77780
77781
  t.style.paddingTop = ".6em", t.style.fontSize = ".8em", t.style.textTransform = "uppercase", t.innerText = `NEEDLE ENGINE NON COMMERCIAL VERSION
77781
- CLICK HERE TO GET A LICENSE`, t.style.cursor = "pointer", t.style.userSelect = "none", t.style.textAlign = "center", t.style.pointerEvents = "all", t.addEventListener("click", () => window.open("https://needle.tools/pricing", "_self")), t.style.opacity = "0", A.appendChild(t), !ee() && Ah && (f5 && console.log("Waiting for runtime license check"), await Ah, e = PC()), !e && (t.style.transition = "opacity .5s ease-in-out", t.style.opacity = "1");
77782
+ CLICK HERE TO GET A LICENSE`, t.style.cursor = "pointer", t.style.userSelect = "none", t.style.textAlign = "center", t.style.pointerEvents = "all", t.addEventListener("click", () => window.open("https://needle.tools/pricing", "_self")), t.style.opacity = "0", A.appendChild(t), !jA() && Ah && (f5 && console.log("Waiting for runtime license check"), await Ah, e = PC()), !e && (t.style.transition = "opacity .5s ease-in-out", t.style.opacity = "1");
77782
77783
  }
77783
77784
  };
77784
77785
  let UN = _b;
@@ -82026,7 +82027,7 @@ let _A = (GC = class {
82026
82027
  }
82027
82028
  /** @internal */
82028
82029
  __internalEnable(A) {
82029
- return this.__destroyed ? (ee() && console.warn("[Needle Engine Dev] Trying to enable destroyed component"), !1) : this.__didAwake ? this.__didEnable ? (A !== !0 && (this.__isEnabled = !0), !1) : (this.__didEnable = !0, this.__isEnabled = !0, this.onEnable(), !0) : !1;
82030
+ return this.__destroyed ? (jA() && console.warn("[Needle Engine Dev] Trying to enable destroyed component"), !1) : this.__didAwake ? this.__didEnable ? (A !== !0 && (this.__isEnabled = !0), !1) : (this.__didEnable = !0, this.__isEnabled = !0, this.onEnable(), !0) : !1;
82030
82031
  }
82031
82032
  /** @internal */
82032
82033
  __internalDisable(A) {
@@ -82048,7 +82049,7 @@ let _A = (GC = class {
82048
82049
  }
82049
82050
  set enabled(A) {
82050
82051
  if (this.__destroyed) {
82051
- ee() && console.warn(`[Needle Engine Dev] Trying to ${A ? "enable" : "disable"} destroyed component`);
82052
+ jA() && console.warn(`[Needle Engine Dev] Trying to ${A ? "enable" : "disable"} destroyed component`);
82052
82053
  return;
82053
82054
  }
82054
82055
  if (typeof A == "number" && (A >= 0.5 ? A = !0 : A = !1), !this.__didAwake) {
@@ -82889,7 +82890,7 @@ class Hr {
82889
82890
  }
82890
82891
  setStartTransition() {
82891
82892
  var A;
82892
- this.model.layers.length > 1 && (pg || ee()) && console.warn("Multiple layers are not supported yet " + ((A = this.animator) == null ? void 0 : A.name));
82893
+ this.model.layers.length > 1 && (pg || jA()) && console.warn("Multiple layers are not supported yet " + ((A = this.animator) == null ? void 0 : A.name));
82893
82894
  for (const e of this.model.layers) {
82894
82895
  const t = e.stateMachine;
82895
82896
  t.defaultState === void 0 && (pg && console.warn("AnimatorController default state is undefined, will assign state 0 as default", e), t.defaultState = 0);
@@ -83048,7 +83049,7 @@ Exit Time: ` + a, o.hasExitTime);
83048
83049
  var c, l;
83049
83050
  return C.node.name === ((l = (c = this.animator) == null ? void 0 : c.gameObject) == null ? void 0 : l.name);
83050
83051
  });
83051
- a ? r.motion.clip = a.clip : (pg || ee()) && console.warn('Could not find clip for animator "' + ((i = (t = this.animator) == null ? void 0 : t.gameObject) == null ? void 0 : i.name) + '"', r.motion.clips.map((C) => C.node.name));
83052
+ a ? r.motion.clip = a.clip : (pg || jA()) && console.warn('Could not find clip for animator "' + ((i = (t = this.animator) == null ? void 0 : t.gameObject) == null ? void 0 : i.name) + '"', r.motion.clips.map((C) => C.node.name));
83052
83053
  }
83053
83054
  if (!r.motion.clip) {
83054
83055
  pg && console.warn("No clip assigned to state", r);
@@ -83061,7 +83062,7 @@ Exit Time: ` + a, o.hasExitTime);
83061
83062
  const C = this.createAction(a);
83062
83063
  r.motion.action = C;
83063
83064
  } else
83064
- (pg || ee()) && console.warn("No valid animationclip assigned", r);
83065
+ (pg || jA()) && console.warn("No valid animationclip assigned", r);
83065
83066
  }
83066
83067
  if (r.behaviours && Array.isArray(r.behaviours))
83067
83068
  for (const a of r.behaviours) {
@@ -83072,7 +83073,7 @@ Exit Time: ` + a, o.hasExitTime);
83072
83073
  const c = new C();
83073
83074
  c.isStateMachineBehaviour && (c._context = this.context ?? void 0, wf(c, a.properties), a.instance = c), pg && console.log("Created animator controller behaviour", r.name, a.typeName, a.properties, c);
83074
83075
  } else
83075
- (pg || ee()) && console.warn("Could not find AnimatorBehaviour type: " + a.typeName);
83076
+ (pg || jA()) && console.warn("Could not find AnimatorBehaviour type: " + a.typeName);
83076
83077
  }
83077
83078
  }
83078
83079
  }
@@ -83556,7 +83557,7 @@ const GD = class {
83556
83557
  console.error("This is a rest clip but you're trying to add tracks to it – this is likely a bug");
83557
83558
  return;
83558
83559
  }
83559
- A.name.endsWith("position") ? this.pos = A : A.name.endsWith("quaternion") ? this.rot = A : A.name.endsWith("scale") ? this.scale = A : (A.name.endsWith("activeSelf") ? console.warn("[USDZ] Animation of enabled/disabled state is not supported for USDZ export and will NOT be exported: " + A.name + " on " + (((e = this.root) == null ? void 0 : e.name) ?? this.target.name) + ". Animate scale 0/1 instead.") : console.warn("[USDZ] Animation track type not supported for USDZ export and will NOT be exported: " + A.name + " on " + (((t = this.root) == null ? void 0 : t.name) ?? this.target.name) + ". Only .position, .rotation, .scale are supported."), ee() && Mi("[USDZ] Some animations can't be exported. See console for details."));
83560
+ A.name.endsWith("position") ? this.pos = A : A.name.endsWith("quaternion") ? this.rot = A : A.name.endsWith("scale") ? this.scale = A : (A.name.endsWith("activeSelf") ? console.warn("[USDZ] Animation of enabled/disabled state is not supported for USDZ export and will NOT be exported: " + A.name + " on " + (((e = this.root) == null ? void 0 : e.name) ?? this.target.name) + ". Animate scale 0/1 instead.") : console.warn("[USDZ] Animation track type not supported for USDZ export and will NOT be exported: " + A.name + " on " + (((t = this.root) == null ? void 0 : t.name) ?? this.target.name) + ". Only .position, .rotation, .scale are supported."), jA() && Mi("[USDZ] Some animations can't be exported. See console for details."));
83560
83561
  }
83561
83562
  getFrames() {
83562
83563
  var A, e, t, i, g, o;
@@ -84965,7 +84966,7 @@ function qLA(s, A, e, t, i) {
84965
84966
  s.__internalAwake = function() {
84966
84967
  var I;
84967
84968
  if (!this.onValidate) {
84968
- ee() && console.warn('Usage of @validate decorate detected but there is no onValidate method in your class: "' + ((I = s.constructor) == null ? void 0 : I.name) + '"');
84969
+ jA() && console.warn('Usage of @validate decorate detected but there is no onValidate method in your class: "' + ((I = s.constructor) == null ? void 0 : I.name) + '"');
84969
84970
  return;
84970
84971
  }
84971
84972
  if (this[o] === void 0) {
@@ -85194,7 +85195,7 @@ const o2 = ($T = class extends _A {
85194
85195
  }
85195
85196
  onEnable() {
85196
85197
  var A;
85197
- this._watch || (this._watch = new ZLA(this.gameObject, this.context)), this._watch.start(!0, !0), this.startCoroutine(this.beforePhysics(), Fi.LateUpdate), ee() && !((A = this.context.physics.engine) != null && A.getBody(this)) && (globalThis.true ? console.warn(`Rigidbody could not be created. Ensure "(${this.name}" has a Collider component.`) : console.warn("Rigidbody could not be created: Rapier physics are explicitly disabled."));
85198
+ this._watch || (this._watch = new ZLA(this.gameObject, this.context)), this._watch.start(!0, !0), this.startCoroutine(this.beforePhysics(), Fi.LateUpdate), jA() && !((A = this.context.physics.engine) != null && A.getBody(this)) && (globalThis.true ? console.warn(`Rigidbody could not be created. Ensure "(${this.name}" has a Collider component.`) : console.warn("Rigidbody could not be created: Rapier physics are explicitly disabled."));
85198
85199
  }
85199
85200
  onDisable() {
85200
85201
  var A, e;
@@ -85812,7 +85813,7 @@ class qi {
85812
85813
  const a = (i = o.arguments) == null ? void 0 : i.map((C) => C instanceof Object && C.uuid ? A[C.uuid] : C != null && C.isComponent ? A[C.guid] : C);
85813
85814
  e.push(new il(r.clone, o.methodName, a, o.enabled));
85814
85815
  } else
85815
- ee() && console.warn("Could not find target for event listener");
85816
+ jA() && console.warn("Could not find target for event listener");
85816
85817
  }
85817
85818
  }
85818
85819
  }
@@ -85926,7 +85927,7 @@ class AvA extends ea {
85926
85927
  if (A.endsWith(".glb") || A.endsWith(".gltf")) {
85927
85928
  if (e.serializable instanceof Array && e.serializable.includes(ft))
85928
85929
  return;
85929
- ee() && Mi("Detected wrong usage of @serializable with Object3D or GameObject. Instead you should use AssetReference here! Please see the console for details.");
85930
+ jA() && Mi("Detected wrong usage of @serializable with Object3D or GameObject. Instead you should use AssetReference here! Please see the console for details.");
85930
85931
  const o = (i = (t = e.target) == null ? void 0 : t.constructor) == null ? void 0 : i.name;
85931
85932
  console.warn(`Wrong usage of @serializable detected in your script "${o}"
85932
85933
 
@@ -85951,7 +85952,7 @@ ${e.path}! : AssetReference;
85951
85952
  }
85952
85953
  let o;
85953
85954
  const n = (g = e.gltf) == null ? void 0 : g.scene;
85954
- return n && (o = eA.findByGuid(A.guid, n)), o || (o = eA.findByGuid(A.guid, e.context.scene)), o ? (o && o.isComponent === !0 && (zg && console.warn("Deserialized object reference is a component"), o = o.gameObject), zg && console.log("Deserialized object reference?", A, o, e == null ? void 0 : e.nodeToObject)) : ((ee() || zg) && console.warn("Could not resolve object reference", e.path, A, e.target, e.context.scene), A.could_not_resolve = !0), o;
85955
+ return n && (o = eA.findByGuid(A.guid, n)), o || (o = eA.findByGuid(A.guid, e.context.scene)), o ? (o && o.isComponent === !0 && (zg && console.warn("Deserialized object reference is a component"), o = o.gameObject), zg && console.log("Deserialized object reference?", A, o, e == null ? void 0 : e.nodeToObject)) : ((jA() || zg) && console.warn("Could not resolve object reference", e.path, A, e.target, e.context.scene), A.could_not_resolve = !0), o;
85955
85956
  }
85956
85957
  }
85957
85958
  }
@@ -85977,7 +85978,7 @@ class tvA extends ea {
85977
85978
  let g = this.findObjectForGuid(A.guid, e.root);
85978
85979
  if (g || e.context && (g = this.findObjectForGuid(A.guid, (t = e.context) == null ? void 0 : t.scene), g))
85979
85980
  return g;
85980
- (ee() || zg) && console.warn('Could not resolve component reference: "' + i + '" using guid ' + A.guid, e.target), A.could_not_resolve = !0;
85981
+ (jA() || zg) && console.warn('Could not resolve component reference: "' + i + '" using guid ' + A.guid, e.target), A.could_not_resolve = !0;
85981
85982
  return;
85982
85983
  }
85983
85984
  }
@@ -86049,7 +86050,7 @@ Could not find method ${r.method} on object ${C.name}`, C, typeof C[r.method]);
86049
86050
  }
86050
86051
  E = Object.getPrototypeOf(E);
86051
86052
  }
86052
- !Q && (ee() || zg) && l();
86053
+ !Q && (jA() || zg) && l();
86053
86054
  }
86054
86055
  }
86055
86056
  if (C) {
@@ -86062,7 +86063,7 @@ Could not find method ${r.method} on object ${C.name}`, C, typeof C[r.method]);
86062
86063
  o.push(Q);
86063
86064
  }
86064
86065
  } else
86065
- ee() && console.warn("[Debug] EventList: Could not find event listener in scene", r, e.object, A);
86066
+ jA() && console.warn("[Debug] EventList: Could not find event listener in scene", r, e.object, A);
86066
86067
  }
86067
86068
  const n = new qi(o);
86068
86069
  zg && console.log(n);
@@ -86400,7 +86401,7 @@ const lC = class extends _A {
86400
86401
  start() {
86401
86402
  if (this.raycaster.length <= 0 && !eA.findObjectOfType(hG, this.context)) {
86402
86403
  const t = eA.addComponent(this.context.scene, Vr);
86403
- this.raycaster.push(t), (ee() || Jc) && console.warn("Added an ObjectRaycaster to the scene because no raycaster was found.");
86404
+ this.raycaster.push(t), (jA() || Jc) && console.warn("Added an ObjectRaycaster to the scene because no raycaster was found.");
86404
86405
  }
86405
86406
  }
86406
86407
  register(e) {
@@ -86587,7 +86588,7 @@ const lC = class extends _A {
86587
86588
  const g = this._capturedPointer[i] || [];
86588
86589
  g.push(t), this._capturedPointer[i] = g;
86589
86590
  } else
86590
- ee() && !t.z__warned_no_pointermove && (t.z__warned_no_pointermove = !0, console.warn("PointerCapture was requested but the component doesn't implement onPointerMove. It will not receive any pointer events"));
86591
+ jA() && !t.z__warned_no_pointermove && (t.z__warned_no_pointermove = !0, console.warn("PointerCapture was requested but the component doesn't implement onPointerMove. It will not receive any pointer events"));
86591
86592
  } else
86592
86593
  e.z__pointer_cture_rleased && (e.z__pointer_cture_rleased = !1, this.releasePointerCapture(e, t));
86593
86594
  }
@@ -87773,7 +87774,7 @@ const zo = tA("debugaudio"), MB = class extends _A {
87773
87774
  /** Play a audioclip or mediastream */
87774
87775
  play(A = void 0) {
87775
87776
  var t, i, g;
87776
- !A && this.clip && (A = this.clip), A !== void 0 && typeof A != "string" && !(A instanceof MediaStream) && (ee() && console.warn("Called play on AudioSource with unknown argument type:", A + `
87777
+ !A && this.clip && (A = this.clip), A !== void 0 && typeof A != "string" && !(A instanceof MediaStream) && (jA() && console.warn("Called play on AudioSource with unknown argument type:", A + `
87777
87778
  Using the assigned clip instead:`, this.clip), A = this.clip);
87778
87779
  let e = !this.sound || A && A !== this.clip;
87779
87780
  if (typeof A == "string" && !this.audioLoader && (e = !0), (A instanceof MediaStream || typeof A == "string") && (this.clip = A), e) {
@@ -88021,7 +88022,7 @@ const a2 = (eY = class extends _A {
88021
88022
  /** @internal */
88022
88023
  awake() {
88023
88024
  var A, e, t, i, g;
88024
- Nc && console.log(this, (A = this.playableAsset) == null ? void 0 : A.tracks), this.rebuildGraph(), !this.isValid() && (Nc || ee()) && (Nc ? console.warn("PlayableDirector is not valid", "Asset?", this.playableAsset, "Tracks:", (e = this.playableAsset) == null ? void 0 : e.tracks, "IsArray?", Array.isArray((t = this.playableAsset) == null ? void 0 : t.tracks), this) : (g = (i = this.playableAsset) == null ? void 0 : i.tracks) != null && g.length ? console.warn("PlayableDirector is not valid") : console.warn("PlayableDirector has no tracks"));
88025
+ Nc && console.log(this, (A = this.playableAsset) == null ? void 0 : A.tracks), this.rebuildGraph(), !this.isValid() && (Nc || jA()) && (Nc ? console.warn("PlayableDirector is not valid", "Asset?", this.playableAsset, "Tracks:", (e = this.playableAsset) == null ? void 0 : e.tracks, "IsArray?", Array.isArray((t = this.playableAsset) == null ? void 0 : t.tracks), this) : (g = (i = this.playableAsset) == null ? void 0 : i.tracks) != null && g.length ? console.warn("PlayableDirector is not valid") : console.warn("PlayableDirector has no tracks"));
88025
88026
  }
88026
88027
  /** @internal */
88027
88028
  onEnable() {
@@ -88599,7 +88600,7 @@ class HO extends Ux {
88599
88600
  }
88600
88601
  }
88601
88602
  }
88602
- if (this._useclipOffsets && (this._totalOffsetPosition.lerp(this._totalOffsetPosition2, i), this._totalOffsetRotation.slerp(this._totalOffsetRotation2, i)), this.__mixerError === void 0 && (bC || ee()) && ((r = (I = this._animator) == null ? void 0 : I.runtimeAnimatorController) != null && r.mixer) && this.mixer !== ((C = (a = this._animator) == null ? void 0 : a.runtimeAnimatorController) == null ? void 0 : C.mixer) && (this.__mixerError = !0, console.error("AnimationTrack mixer is not shared with the animator controller - this might result in the timeline to not animate properly. Please report a bug to the Needle Engine team!", this)), (c = this._animator) != null && c.runtimeAnimatorController) {
88603
+ if (this._useclipOffsets && (this._totalOffsetPosition.lerp(this._totalOffsetPosition2, i), this._totalOffsetRotation.slerp(this._totalOffsetRotation2, i)), this.__mixerError === void 0 && (bC || jA()) && ((r = (I = this._animator) == null ? void 0 : I.runtimeAnimatorController) != null && r.mixer) && this.mixer !== ((C = (a = this._animator) == null ? void 0 : a.runtimeAnimatorController) == null ? void 0 : C.mixer) && (this.__mixerError = !0, console.error("AnimationTrack mixer is not shared with the animator controller - this might result in the timeline to not animate properly. Please report a bug to the Needle Engine team!", this)), (c = this._animator) != null && c.runtimeAnimatorController) {
88603
88604
  const Q = Math.max(0, 1 - n);
88604
88605
  (h = (l = this._animator) == null ? void 0 : l.runtimeAnimatorController) == null || h.update(Q);
88605
88606
  } else
@@ -88885,7 +88886,7 @@ function RvA(s) {
88885
88886
  const e = s.scene;
88886
88887
  A = _r(e, C2);
88887
88888
  } else
88888
- ee() && console.warn("No post processing manager found");
88889
+ jA() && console.warn("No post processing manager found");
88889
88890
  return A;
88890
88891
  }
88891
88892
  var NvA = Object.defineProperty, UvA = Object.getOwnPropertyDescriptor, OoA = (s, A, e, t) => {
@@ -89251,10 +89252,10 @@ const PoA = function(s = null) {
89251
89252
  let t = "";
89252
89253
  typeof e == "string" ? t = e : t = e.name;
89253
89254
  let i = null, g;
89254
- typeof s == "string" ? g = A[s] : typeof s == "function" && (g = s), g == null && (ee() || sl) && s != null && console.warn('syncField: no callback function found for property "' + t + '"', '"' + s + '"');
89255
+ typeof s == "string" ? g = A[s] : typeof s == "function" && (g = s), g == null && (jA() || sl) && s != null && console.warn('syncField: no callback function found for property "' + t + '"', '"' + s + '"');
89255
89256
  const o = A, n = o.__internalAwake;
89256
89257
  if (typeof n != "function") {
89257
- (sl || ee()) && console.error('@syncField can currently only used on Needle Engine Components, custom object of type "' + ((a = A == null ? void 0 : A.constructor) == null ? void 0 : a.name) + '" is not supported', A);
89258
+ (sl || jA()) && console.error('@syncField can currently only used on Needle Engine Components, custom object of type "' + ((a = A == null ? void 0 : A.constructor) == null ? void 0 : a.name) + '" is not supported', A);
89258
89259
  return;
89259
89260
  }
89260
89261
  sl && console.log(t);
@@ -89271,7 +89272,7 @@ const PoA = function(s = null) {
89271
89272
  var Q;
89272
89273
  const h = this[I];
89273
89274
  if (this[I] = l, c) {
89274
- (ee() || sl) && console.warn("Recursive call detected", t);
89275
+ (jA() || sl) && console.warn("Recursive call detected", t);
89275
89276
  return;
89276
89277
  }
89277
89278
  c = !0;
@@ -90385,7 +90386,7 @@ class Dd extends _A {
90385
90386
  return console.error("Cannot connect to voice chat - microphone permissions not granted"), this.updateButton(), !1;
90386
90387
  } else
90387
90388
  return console.error("Cannot connect to voice chat - not connected to server"), this.updateButton(), !1;
90388
- return this._allowSending = !0, (t = this._net) == null || t.stopSendingStream(this._outputStream), cl(this._outputStream), this._outputStream = await this.getAudioStream(e), this._outputStream ? (this.debug && console.log("VOIP: Got audio stream"), (i = this._net) == null || i.startSendingStream(this._outputStream), this.updateButton(), !0) : (this.updateButton(), await ve.microphonePermissionsGranted() ? console.error("VOIP: Could not get audio stream - please make sure to connect an audio device and grant microphone permissions") : gx("Microphone permissions not granted: Please grant microphone permissions to use voice chat"), (this.debug || ee()) && console.log("VOIP: Failed to get audio stream"), !1);
90389
+ return this._allowSending = !0, (t = this._net) == null || t.stopSendingStream(this._outputStream), cl(this._outputStream), this._outputStream = await this.getAudioStream(e), this._outputStream ? (this.debug && console.log("VOIP: Got audio stream"), (i = this._net) == null || i.startSendingStream(this._outputStream), this.updateButton(), !0) : (this.updateButton(), await ve.microphonePermissionsGranted() ? console.error("VOIP: Could not get audio stream - please make sure to connect an audio device and grant microphone permissions") : gx("Microphone permissions not granted: Please grant microphone permissions to use voice chat"), (this.debug || jA()) && console.log("VOIP: Failed to get audio stream"), !1);
90389
90390
  }
90390
90391
  /** Stop sending audio (muting your own microphone) */
90391
90392
  disconnect(e) {
@@ -90433,7 +90434,7 @@ class Dd extends _A {
90433
90434
  // private _analyzer?: AudioAnalyser;
90434
90435
  /** @deprecated */
90435
90436
  getFrequency(e) {
90436
- return this.unsupported_getfrequency || (this.unsupported_getfrequency = !0, ee() && Mi("VOIP: getFrequency is currently not supported"), console.warn("VOIP: getFrequency is currently not supported")), null;
90437
+ return this.unsupported_getfrequency || (this.unsupported_getfrequency = !0, jA() && Mi("VOIP: getFrequency is currently not supported"), console.warn("VOIP: getFrequency is currently not supported")), null;
90437
90438
  }
90438
90439
  async getAudioStream(e) {
90439
90440
  if (!navigator.mediaDevices.getUserMedia)
@@ -92503,7 +92504,7 @@ var tYA = Object.defineProperty, iYA = Object.getOwnPropertyDescriptor, ys = (s,
92503
92504
  };
92504
92505
  const W5 = tA("debugusdzbehaviours");
92505
92506
  function wG(s) {
92506
- s && (s.getComponentInParent(hG) || (ee() && console.debug('Raycaster on "' + s.name + '" was automatically added, because no raycaster was found in the parent hierarchy.'), s.addComponent(Vr)));
92507
+ s && (s.getComponentInParent(hG) || (jA() && console.debug('Raycaster on "' + s.name + '" was automatically added, because no raycaster was found in the parent hierarchy.'), s.addComponent(Vr)));
92507
92508
  }
92508
92509
  class By extends _A {
92509
92510
  constructor() {
@@ -92583,7 +92584,7 @@ const rC = (XR = class extends _A {
92583
92584
  }
92584
92585
  start() {
92585
92586
  var A;
92586
- this._objectsWithThisMaterial = this.objectsWithThisMaterial, wG(this.gameObject), ee() && this._objectsWithThisMaterial.length <= 0 && console.warn('ChangeMaterialOnClick: No objects found with material "' + ((A = this.materialToSwitch) == null ? void 0 : A.name) + '"');
92587
+ this._objectsWithThisMaterial = this.objectsWithThisMaterial, wG(this.gameObject), jA() && this._objectsWithThisMaterial.length <= 0 && console.warn('ChangeMaterialOnClick: No objects found with material "' + ((A = this.materialToSwitch) == null ? void 0 : A.name) + '"');
92587
92588
  }
92588
92589
  onPointerEnter(A) {
92589
92590
  this.context.input.setCursorPointer();
@@ -92930,7 +92931,7 @@ const aC = (WR = class extends _A {
92930
92931
  afterSerialize() {
92931
92932
  if (aC.rootsWithExclusivePlayback.size > 1) {
92932
92933
  const A = 'Multiple root objects targeted by more than one animation. To work around QuickLook bug FB13410767, animations will be set as "exclusive" and activating them will stop other animations being marked as exclusive.';
92933
- ee() && Mi(A), console.warn(A, ...aC.rootsWithExclusivePlayback);
92934
+ jA() && Mi(A), console.warn(A, ...aC.rootsWithExclusivePlayback);
92934
92935
  }
92935
92936
  aC.animationActions = [], aC.rootsWithExclusivePlayback = /* @__PURE__ */ new Set();
92936
92937
  }
@@ -92941,7 +92942,7 @@ const aC = (WR = class extends _A {
92941
92942
  if (!i)
92942
92943
  return;
92943
92944
  const g = i.getClipCount(this.target) > 1;
92944
- g && (ee() && console.warn("Setting exclusive playback for " + this.target.name + "@" + this.stateName + " because it has " + i.getClipCount(this.target) + " animations. This works around QuickLook bug FB13410767."), aC.rootsWithExclusivePlayback.add(this.target));
92945
+ g && (jA() && console.warn("Setting exclusive playback for " + this.target.name + "@" + this.stateName + " because it has " + i.getClipCount(this.target) + " animations. This works around QuickLook bug FB13410767."), aC.rootsWithExclusivePlayback.add(this.target));
92945
92946
  const o = this.name ? this.name : "";
92946
92947
  t.traverse((n) => {
92947
92948
  var I, r;
@@ -93634,7 +93635,7 @@ function hYA(s = Math.random) {
93634
93635
  const E = (n + I + r + a) * BYA, d = rR(n + E), u = rR(I + E), p = rR(r + E), f = rR(a + E), y = (d + u + p + f) * co, m = d - y, S = u - y, w = p - y, N = f - y, D = n - m, k = I - S, b = r - w, F = a - N;
93635
93636
  let K = 0, H = 0, v = 0, Z = 0;
93636
93637
  D > k ? K++ : H++, D > b ? K++ : v++, D > F ? K++ : Z++, k > b ? H++ : v++, k > F ? H++ : Z++, b > F ? v++ : Z++;
93637
- const P = K >= 3 ? 1 : 0, oA = H >= 3 ? 1 : 0, hA = v >= 3 ? 1 : 0, mA = Z >= 3 ? 1 : 0, KA = K >= 2 ? 1 : 0, OA = H >= 2 ? 1 : 0, CA = v >= 2 ? 1 : 0, fA = Z >= 2 ? 1 : 0, kA = K >= 1 ? 1 : 0, FA = H >= 1 ? 1 : 0, oe = v >= 1 ? 1 : 0, Ie = Z >= 1 ? 1 : 0, De = D - P + co, Ye = k - oA + co, LA = b - hA + co, O = F - mA + co, XA = D - KA + 2 * co, jA = k - OA + 2 * co, ZA = b - CA + 2 * co, ge = F - fA + 2 * co, ke = D - kA + 3 * co, Ee = k - FA + 3 * co, q = b - oe + 3 * co, L = F - Ie + 3 * co, BA = D - 1 + 4 * co, UA = k - 1 + 4 * co, vA = b - 1 + 4 * co, bA = F - 1 + 4 * co, pe = d & 255, te = u & 255, ae = p & 255, je = f & 255;
93638
+ const P = K >= 3 ? 1 : 0, oA = H >= 3 ? 1 : 0, hA = v >= 3 ? 1 : 0, mA = Z >= 3 ? 1 : 0, KA = K >= 2 ? 1 : 0, OA = H >= 2 ? 1 : 0, CA = v >= 2 ? 1 : 0, fA = Z >= 2 ? 1 : 0, kA = K >= 1 ? 1 : 0, FA = H >= 1 ? 1 : 0, oe = v >= 1 ? 1 : 0, Ie = Z >= 1 ? 1 : 0, De = D - P + co, Ye = k - oA + co, LA = b - hA + co, O = F - mA + co, XA = D - KA + 2 * co, $A = k - OA + 2 * co, ZA = b - CA + 2 * co, ge = F - fA + 2 * co, ke = D - kA + 3 * co, Ee = k - FA + 3 * co, q = b - oe + 3 * co, L = F - Ie + 3 * co, BA = D - 1 + 4 * co, UA = k - 1 + 4 * co, vA = b - 1 + 4 * co, bA = F - 1 + 4 * co, pe = d & 255, te = u & 255, ae = p & 255, je = f & 255;
93638
93639
  let JA = 0.6 - D * D - k * k - b * b - F * F;
93639
93640
  if (JA < 0)
93640
93641
  C = 0;
@@ -93649,12 +93650,12 @@ function hYA(s = Math.random) {
93649
93650
  const xe = pe + P + A[te + oA + A[ae + hA + A[je + mA]]];
93650
93651
  ue *= ue, c = ue * ue * (e[xe] * De + t[xe] * Ye + i[xe] * LA + g[xe] * O);
93651
93652
  }
93652
- let We = 0.6 - XA * XA - jA * jA - ZA * ZA - ge * ge;
93653
+ let We = 0.6 - XA * XA - $A * $A - ZA * ZA - ge * ge;
93653
93654
  if (We < 0)
93654
93655
  l = 0;
93655
93656
  else {
93656
93657
  const xe = pe + KA + A[te + OA + A[ae + CA + A[je + fA]]];
93657
- We *= We, l = We * We * (e[xe] * XA + t[xe] * jA + i[xe] * ZA + g[xe] * ge);
93658
+ We *= We, l = We * We * (e[xe] * XA + t[xe] * $A + i[xe] * ZA + g[xe] * ge);
93658
93659
  }
93659
93660
  let Ue = 0.6 - ke * ke - Ee * Ee - q * q - L * L;
93660
93661
  if (Ue < 0)
@@ -94552,7 +94553,7 @@ async function B2(s, A, e) {
94552
94553
  const g = new lb(i);
94553
94554
  return g.setAnimationPointerResolver.bind(g)(new xYA()), g;
94554
94555
  } else
94555
- return (bYA || ee()) && console.error("Missing KHR_animation_pointer extension..."), {
94556
+ return (bYA || jA()) && console.error("Missing KHR_animation_pointer extension..."), {
94556
94557
  name: "KHR_animation_pointer_NOT_AVAILABLE"
94557
94558
  };
94558
94559
  });
@@ -94776,7 +94777,7 @@ class DnA {
94776
94777
  this.add(e);
94777
94778
  } catch (t) {
94778
94779
  return console.error(`Failed adding mesh to instancing
94779
- `, t), ee() && gx("Failed instancing mesh. See the browser console for details."), null;
94780
+ `, t), jA() && gx("Failed instancing mesh. See the browser console for details."), null;
94780
94781
  }
94781
94782
  return e;
94782
94783
  }
@@ -94804,7 +94805,7 @@ class DnA {
94804
94805
  const e = this.geometry;
94805
94806
  for (const t in e.attributes)
94806
94807
  if (t !== "batchId" && !A.hasAttribute(t))
94807
- return ee() && console.warn(`BatchedMesh: Added geometry missing "${t}". All geometries must have consistent attributes.`), !1;
94808
+ return jA() && console.warn(`BatchedMesh: Added geometry missing "${t}". All geometries must have consistent attributes.`), !1;
94808
94809
  return !0;
94809
94810
  }
94810
94811
  markNeedsUpdate() {
@@ -94879,7 +94880,7 @@ Max index count ${this._maxIndexCount} -> ${g}`), this._debugMaterial = iz();
94879
94880
  this._batchedMesh.setMatrixAt(I, A.object.matrixWorld), this._batchedMesh.setVisibleAt(I, !0), A.__instanceIndex = I, this._usedBuckets[n.geometryIndex] = n, this._availableBuckets.splice(i, 1);
94880
94881
  return;
94881
94882
  } catch (I) {
94882
- Er ? console.error("Failed to re-use space", I) : ee() && I instanceof Error && console.warn(`Failed to re-use space "${I.message}" in bucket ${n.geometryIndex} (${n.vertexCount}) - will add new geometry instead`);
94883
+ Er ? console.error("Failed to re-use space", I) : jA() && I instanceof Error && console.warn(`Failed to re-use space "${I.message}" in bucket ${n.geometryIndex} (${n.vertexCount}) - will add new geometry instead`);
94883
94884
  }
94884
94885
  }
94885
94886
  Er && console.debug("ADD GEOMETRY", e.name, `
@@ -94906,7 +94907,7 @@ B(DnA, "nullMatrix", new lA());
94906
94907
  function Ip(s) {
94907
94908
  var i, g;
94908
94909
  if (!s)
94909
- return ee() && console.error("Cannot get mesh information from null geometry"), { vertexCount: 0, indexCount: 0 };
94910
+ return jA() && console.error("Cannot get mesh information from null geometry"), { vertexCount: 0, indexCount: 0 };
94910
94911
  let A = ((g = (i = s.attributes) == null ? void 0 : i.position) == null ? void 0 : g.count) || 0, e = s.index ? s.index.count : 0;
94911
94912
  const t = Pt.getMeshLODInformation(s);
94912
94913
  if (t) {
@@ -96085,7 +96086,7 @@ const M0 = ($R = class {
96085
96086
  }
96086
96087
  break;
96087
96088
  default:
96088
- this._vector.set(0, 0, 0), ee() && !globalThis.__particlesystem_shapetype_unsupported && (console.warn("ParticleSystem ShapeType is not supported:", h2[this.shapeType]), globalThis.__particlesystem_shapetype_unsupported = !0);
96089
+ this._vector.set(0, 0, 0), jA() && !globalThis.__particlesystem_shapetype_unsupported && (console.warn("ParticleSystem ShapeType is not supported:", h2[this.shapeType]), globalThis.__particlesystem_shapetype_unsupported = !0);
96089
96090
  break;
96090
96091
  }
96091
96092
  this.randomizePosition(this._vector, this.randomPositionAmount);
@@ -97329,7 +97330,7 @@ const oz = [], zv = new Array(), UZ = class {
97329
97330
  return;
97330
97331
  }
97331
97332
  He.isSessionSupported(e).then((t) => {
97332
- A.style.display = t ? "" : "none", ee() && !t && console.log('[WebXR] "' + e + '" is not supported on this device – make sure your server runs using HTTPS and you have a device connected that supports ' + e);
97333
+ A.style.display = t ? "" : "none", jA() && !t && console.log('[WebXR] "' + e + '" is not supported on this device – make sure your server runs using HTTPS and you have a device connected that supports ' + e);
97333
97334
  });
97334
97335
  }
97335
97336
  hideElementDuringXRSession(A) {
@@ -97847,7 +97848,7 @@ class ph extends _A {
97847
97848
  }
97848
97849
  async onCreateAnchor(e, t) {
97849
97850
  if (t.createAnchor === void 0) {
97850
- console.warn("Hit does not support creating an anchor", t), ee() && Mi("Hit does not support creating an anchor");
97851
+ console.warn("Hit does not support creating an anchor", t), jA() && Mi("Hit does not support creating an anchor");
97851
97852
  return;
97852
97853
  } else {
97853
97854
  const i = await t.createAnchor(e.viewerPose.transform);
@@ -99668,7 +99669,7 @@ const ap = (oY = class extends _A {
99668
99669
  }), this.createQRCode) {
99669
99670
  const e = DO(ql);
99670
99671
  if (e && e.createQRCodeButton === !1)
99671
- ee() && console.warn("WebXR: QRCode button is disabled in the Needle Menu component");
99672
+ jA() && console.warn("WebXR: QRCode button is disabled in the Needle Menu component");
99672
99673
  else if (!ve.isMobileDevice()) {
99673
99674
  const t = UC.getOrCreate().createQRCode();
99674
99675
  this.addButton(t, 50);
@@ -100589,7 +100590,7 @@ const E2 = (AN = class extends _A {
100589
100590
  const n = new VJA(), I = new Mx(this.quickLookCompatible);
100590
100591
  let r;
100591
100592
  const a = [];
100592
- this.interactive && (a.push(new zO()), a.push(new md()), globalThis.true && eA.getComponentsInChildren(A, ai).length > 0 && (this.physics ? (r = new oP(), a.push(r)) : ee() && console.warn("USDZExporter: Physics export is disabled, but there are active Rigidbody components in the scene. They will not be exported.")), a.push(new Vx()), a.push(new IP()));
100593
+ this.interactive && (a.push(new zO()), a.push(new md()), globalThis.true && eA.getComponentsInChildren(A, ai).length > 0 && (this.physics ? (r = new oP(), a.push(r)) : jA() && console.warn("USDZExporter: Physics export is disabled, but there are active Rigidbody components in the scene. They will not be exported.")), a.push(new Vx()), a.push(new IP()));
100593
100594
  const C = [I, ...a, ...this.extensions], c = { self: this, exporter: n, extensions: C, object: A };
100594
100595
  Rt.report("export-usdz", "Invoking before-export"), this.dispatchEvent(new CustomEvent("before-export", { detail: c })), this.applyWebARSessionRoot(), this._previousTimeScale = this.context.time.timeScale, this.context.time.timeScale = 0, Rt.report("export-usdz", "auto export animations and audio sources");
100595
100596
  const l = new Array();
@@ -100600,7 +100601,7 @@ const E2 = (AN = class extends _A {
100600
100601
  const S = eA.getComponent(y, Ag);
100601
100602
  return S && !S.enabled && (m = !1), m && Q.includes(y) && (m = !1), m && eA.getComponentInParent(y, nc) && (m = !1), m && eA.getComponentInParent(y, vl) && (m = !1), wI && !m && console.log("USDZExporter: Discarding object", y), m;
100602
100603
  }, n.beforeWritingDocument = () => {
100603
- if (ee() && I && r) {
100604
+ if (jA() && I && r) {
100604
100605
  const y = I.animatedRoots;
100605
100606
  for (const m of y) {
100606
100607
  const S = eA.getComponentsInChildren(m, ai).filter((N) => N.enabled), w = eA.getComponents(m, tr).filter((N) => N.enabled && !N.isTrigger);
@@ -101774,7 +101775,7 @@ class Hh extends _A {
101774
101775
  recursive: !0,
101775
101776
  testObject: (g) => !this._addedObjects.includes(g)
101776
101777
  }).length)
101777
- return ee() && console.log(`Dropped outside of drop area for DropListener "${this.name}".`), !1;
101778
+ return jA() && console.log(`Dropped outside of drop area for DropListener "${this.name}".`), !1;
101778
101779
  }
101779
101780
  return !0;
101780
101781
  }
@@ -104569,7 +104570,7 @@ class xG extends _A {
104569
104570
  }
104570
104571
  this._validateUrl();
104571
104572
  let e = this.url;
104572
- switch (!e.startsWith("mailto:") && e.includes("@") && (e = "mailto:" + e), ee() && ds("Open URL: " + e), this.mode) {
104573
+ switch (!e.startsWith("mailto:") && e.includes("@") && (e = "mailto:" + e), jA() && ds("Open URL: " + e), this.mode) {
104573
104574
  case 0:
104574
104575
  ve.isSafari(), globalThis.open(e, "_blank");
104575
104576
  break;
@@ -104599,7 +104600,7 @@ class xG extends _A {
104599
104600
  this.clickable && !e.used && ((t = this.url) != null && t.length) && this.open();
104600
104601
  }
104601
104602
  _validateUrl() {
104602
- this.url && this.url.startsWith("www.") && (ee() && console.warn("URL is not valid, adding https:// to the start of the URL", this.url), this.url = "https://" + this.url);
104603
+ this.url && this.url.startsWith("www.") && (jA() && console.warn("URL is not valid, adding https:// to the start of the URL", this.url), this.url = "https://" + this.url);
104603
104604
  }
104604
104605
  }
104605
104606
  pP([
@@ -107697,7 +107698,7 @@ class $nA {
107697
107698
  const C = (A + e + t + i) * T1A, c = Math.floor(A + C), l = Math.floor(e + C), h = Math.floor(t + C), Q = Math.floor(i + C), E = (c + l + h + Q) * ho, d = c - E, u = l - E, p = h - E, f = Q - E, y = A - d, m = e - u, S = t - p, w = i - f;
107698
107699
  let N = 0, D = 0, k = 0, b = 0;
107699
107700
  y > m ? N++ : D++, y > S ? N++ : k++, y > w ? N++ : b++, m > S ? D++ : k++, m > w ? D++ : b++, S > w ? k++ : b++;
107700
- const F = N >= 3 ? 1 : 0, K = D >= 3 ? 1 : 0, H = k >= 3 ? 1 : 0, v = b >= 3 ? 1 : 0, Z = N >= 2 ? 1 : 0, P = D >= 2 ? 1 : 0, oA = k >= 2 ? 1 : 0, hA = b >= 2 ? 1 : 0, mA = N >= 1 ? 1 : 0, KA = D >= 1 ? 1 : 0, OA = k >= 1 ? 1 : 0, CA = b >= 1 ? 1 : 0, fA = y - F + ho, kA = m - K + ho, FA = S - H + ho, oe = w - v + ho, Ie = y - Z + 2 * ho, De = m - P + 2 * ho, Ye = S - oA + 2 * ho, LA = w - hA + 2 * ho, O = y - mA + 3 * ho, XA = m - KA + 3 * ho, jA = S - OA + 3 * ho, ZA = w - CA + 3 * ho, ge = y - 1 + 4 * ho, ke = m - 1 + 4 * ho, Ee = S - 1 + 4 * ho, q = w - 1 + 4 * ho, L = c & 255, BA = l & 255, UA = h & 255, vA = Q & 255;
107701
+ const F = N >= 3 ? 1 : 0, K = D >= 3 ? 1 : 0, H = k >= 3 ? 1 : 0, v = b >= 3 ? 1 : 0, Z = N >= 2 ? 1 : 0, P = D >= 2 ? 1 : 0, oA = k >= 2 ? 1 : 0, hA = b >= 2 ? 1 : 0, mA = N >= 1 ? 1 : 0, KA = D >= 1 ? 1 : 0, OA = k >= 1 ? 1 : 0, CA = b >= 1 ? 1 : 0, fA = y - F + ho, kA = m - K + ho, FA = S - H + ho, oe = w - v + ho, Ie = y - Z + 2 * ho, De = m - P + 2 * ho, Ye = S - oA + 2 * ho, LA = w - hA + 2 * ho, O = y - mA + 3 * ho, XA = m - KA + 3 * ho, $A = S - OA + 3 * ho, ZA = w - CA + 3 * ho, ge = y - 1 + 4 * ho, ke = m - 1 + 4 * ho, Ee = S - 1 + 4 * ho, q = w - 1 + 4 * ho, L = c & 255, BA = l & 255, UA = h & 255, vA = Q & 255;
107701
107702
  let bA = 0.6 - y * y - m * m - S * S - w * w;
107702
107703
  if (bA < 0)
107703
107704
  o = 0;
@@ -107719,12 +107720,12 @@ class $nA {
107719
107720
  const JA = g[L + Z + g[BA + P + g[UA + oA + g[vA + hA]]]] % 32 * 4;
107720
107721
  te *= te, I = te * te * (gg[JA] * Ie + gg[JA + 1] * De + gg[JA + 2] * Ye + gg[JA + 3] * LA);
107721
107722
  }
107722
- let ae = 0.6 - O * O - XA * XA - jA * jA - ZA * ZA;
107723
+ let ae = 0.6 - O * O - XA * XA - $A * $A - ZA * ZA;
107723
107724
  if (ae < 0)
107724
107725
  r = 0;
107725
107726
  else {
107726
107727
  const JA = g[L + mA + g[BA + KA + g[UA + OA + g[vA + CA]]]] % 32 * 4;
107727
- ae *= ae, r = ae * ae * (gg[JA] * O + gg[JA + 1] * XA + gg[JA + 2] * jA + gg[JA + 3] * ZA);
107728
+ ae *= ae, r = ae * ae * (gg[JA] * O + gg[JA + 1] * XA + gg[JA + 2] * $A + gg[JA + 3] * ZA);
107728
107729
  }
107729
107730
  let je = 0.6 - ge * ge - ke * ke - Ee * Ee - q * q;
107730
107731
  if (je < 0)
@@ -110033,7 +110034,7 @@ class za extends _A {
110033
110034
  B(this, "lengthScale");
110034
110035
  }
110035
110036
  start() {
110036
- if (this.maxParticleSize !== 0.5 && this.minParticleSize !== 0 && ee()) {
110037
+ if (this.maxParticleSize !== 0.5 && this.minParticleSize !== 0 && jA()) {
110037
110038
  const e = `ParticleSystem "${this.name}" has non-default min/max particle size. This may not render correctly. Please set min size to 0 and the max size to 0.5 and use the "StartSize" setting instead`;
110038
110039
  console.warn(e);
110039
110040
  }
@@ -110615,7 +110616,7 @@ const LN = class extends _A {
110615
110616
  * ```
110616
110617
  */
110617
110618
  addBehaviour(A) {
110618
- return this._particleSystem ? (A instanceof bd && (A.system = this), ee() && console.log("add behaviour", A), this._particleSystem.addBehavior(A), !0) : !1;
110619
+ return this._particleSystem ? (A instanceof bd && (A.system = this), jA() && console.log("add behaviour", A), this._particleSystem.addBehavior(A), !0) : !1;
110619
110620
  }
110620
110621
  /** Remove a custom quarks behaviour from the particle system. **/
110621
110622
  removeBehaviour(A) {
@@ -110751,7 +110752,7 @@ const LN = class extends _A {
110751
110752
  var A;
110752
110753
  if (this._subEmitterSystems && this._particleSystem)
110753
110754
  for (const e of this._subEmitterSystems) {
110754
- e.particleSystem && (e.particleSystem.__internalAwake ? e.particleSystem.__internalAwake() : ee() && console.warn("SubParticleSystem serialization issue(?)", e.particleSystem, e));
110755
+ e.particleSystem && (e.particleSystem.__internalAwake ? e.particleSystem.__internalAwake() : jA() && console.warn("SubParticleSystem serialization issue(?)", e.particleSystem, e));
110755
110756
  const t = (A = e.particleSystem) == null ? void 0 : A._particleSystem;
110756
110757
  if (t) {
110757
110758
  e.particleSystem._isUsedAsSubsystem = !0;
@@ -110833,7 +110834,7 @@ function eIA(s, A) {
110833
110834
  if (!s.unsupported_scaling_mode) {
110834
110835
  s.unsupported_scaling_mode = !0;
110835
110836
  const e = "ParticleSystem scale mode " + Q2[s.main.scalingMode] + " is not supported";
110836
- ee() && Mi(e), console.warn(e, s.name, s);
110837
+ jA() && Mi(e), console.warn(e, s.name, s);
110837
110838
  }
110838
110839
  A = zi(s.gameObject, A);
110839
110840
  break;
@@ -114072,7 +114073,7 @@ class oo extends _A {
114072
114073
  return this.clip;
114073
114074
  }
114074
114075
  set audioOutputMode(e) {
114075
- e !== this._audioOutputMode && (e === 1 && ee() && console.warn("VideoAudioOutputMode.AudioSource is not yet implemented"), this._audioOutputMode = e, this.updateVideoElementSettings());
114076
+ e !== this._audioOutputMode && (e === 1 && jA() && console.warn("VideoAudioOutputMode.AudioSource is not yet implemented"), this._audioOutputMode = e, this.updateVideoElementSettings());
114076
114077
  }
114077
114078
  get audioOutputMode() {
114078
114079
  return this._audioOutputMode;
@@ -114651,7 +114652,7 @@ class Fd extends _A {
114651
114652
  }
114652
114653
  async internalShare(e) {
114653
114654
  if (this.context.connection.isInRoom === !1) {
114654
- console.warn("Can not start screensharing: requires network connection"), ee() && Mi("Can not start screensharing: requires network connection. Add a SyncedRoom component or join a room first.");
114655
+ console.warn("Can not start screensharing: requires network connection"), jA() && Mi("Can not start screensharing: requires network connection. Add a SyncedRoom component or join a room first.");
114655
114656
  return;
114656
114657
  }
114657
114658
  if (e != null && e.device && (this.device = e.device), !this.videoPlayer && this.requiresVideoPlayer && (this._videoPlayer || (this._videoPlayer = eA.getComponent(this.gameObject, oo) ?? void 0), this.videoPlayer || this._ensureVideoPlayer(), !this.videoPlayer)) {
@@ -114791,7 +114792,7 @@ class Fd extends _A {
114791
114792
  } else
114792
114793
  console.error("Failed to get user media", n.message, n.code, n);
114793
114794
  }
114794
- !g && ee() && (Mi("No camera found for sharing. Please connect a camera (see console for more information)"), console.warn("No camera found for sharing. Please connect a camera", i, this.deviceName, "Using deviceFilter? " + this.deviceFilter != null, "Using options? " + t != null, "Using deviceName? " + this.deviceName != null, "Using options.deviceId? " + (t == null ? void 0 : t.deviceId) != null, "Using options.deviceFilter? " + (t == null ? void 0 : t.deviceFilter) != null));
114795
+ !g && jA() && (Mi("No camera found for sharing. Please connect a camera (see console for more information)"), console.warn("No camera found for sharing. Please connect a camera", i, this.deviceName, "Using deviceFilter? " + this.deviceFilter != null, "Using options? " + t != null, "Using deviceName? " + this.deviceName != null, "Using options.deviceId? " + (t == null ? void 0 : t.deviceId) != null, "Using options.deviceFilter? " + (t == null ? void 0 : t.deviceFilter) != null));
114795
114796
  }
114796
114797
  // private _cameraSelectionWindow : Window | null = null;
114797
114798
  // private openWindowToSelectCamera(){
@@ -115924,7 +115925,7 @@ const M2 = (aY = class extends _A {
115924
115925
  for (const i in this.remoteCams) {
115925
115926
  const g = this.remoteCams[i], o = this.context.time.realtimeSinceStartup - g.lastUpdate;
115926
115927
  if (!g || o > this._camTimeoutInSeconds) {
115927
- ee() && console.log("Remote cam timeout", i), g != null && g.obj && eA.destroy(g.obj), delete this.remoteCams[i], g && delete this.userToCamMap[g.userId], M2.instances.push(g), this.context.players.removePlayerView(g.userId, yE.Browser);
115928
+ jA() && console.log("Remote cam timeout", i), g != null && g.obj && eA.destroy(g.obj), delete this.remoteCams[i], g && delete this.userToCamMap[g.userId], M2.instances.push(g), this.context.players.removePlayerView(g.userId, yE.Browser);
115928
115929
  continue;
115929
115930
  }
115930
115931
  }
@@ -116073,7 +116074,7 @@ class Cc extends _A {
116073
116074
  return this.tryJoinRoom(e + 1);
116074
116075
  } else
116075
116076
  this.joinRandomRoom && (this.roomName === null || this.roomName === void 0 || this.roomName.length <= 0) && (this.roomName = this.generateRoomName());
116076
- return this.requireRoomParameter && !t ? ((bT || ee()) && console.warn('[SyncedRoom] Missing required room parameter "' + this.urlParameterName + `" in url - will not connect.
116077
+ return this.requireRoomParameter && !t ? ((bT || jA()) && console.warn('[SyncedRoom] Missing required room parameter "' + this.urlParameterName + `" in url - will not connect.
116077
116078
  To allow joining a room without a query parameter you can set "requireRoomParameter" to false.`), !1) : (this.context.connection.isConnected || this.context.connection.connect(), this._lastJoinedRoom = this.roomName, this._roomPrefix && (this.roomName = this._roomPrefix + this.roomName), this.roomName.length <= 0 ? (console.warn(`[SyncedRoom] Room name is not set so we can not join a networked room.
116078
116079
  Please choose one of the following options to fix this:
116079
116080
  A) Set a room name in the SyncedRoom component
@@ -116082,7 +116083,7 @@ C) Set "joinRandomRoom" to true`), !1) : (bT && console.log("Join " + this.roomN
116082
116083
  }
116083
116084
  /** @internal */
116084
116085
  update() {
116085
- this.context.connection.isConnected && (this.context.time.time - this._lastPingTime > 3 && (this._lastPingTime = this.context.time.time, this.context.connection.sendPing()), this.context.connection.isInRoom && (this._lastRoomTime = this.context.time.time)), this._lastRoomTime > 0 && this.context.time.time - this._lastRoomTime > 0.3 && (this._lastRoomTime = -1, this.autoRejoin ? this._userWantsToBeInARoom && (console.log("Disconnected from networking backend - attempt reconnecting now"), this.tryJoinRoom()) : ee() && console.warn("You are not connected to a room anymore (possibly because the tab was inactive for too long and the server kicked you?)"));
116086
+ this.context.connection.isConnected && (this.context.time.time - this._lastPingTime > 3 && (this._lastPingTime = this.context.time.time, this.context.connection.sendPing()), this.context.connection.isInRoom && (this._lastRoomTime = this.context.time.time)), this._lastRoomTime > 0 && this.context.time.time - this._lastRoomTime > 0.3 && (this._lastRoomTime = -1, this.autoRejoin ? this._userWantsToBeInARoom && (console.log("Disconnected from networking backend - attempt reconnecting now"), this.tryJoinRoom()) : jA() && console.warn("You are not connected to a room anymore (possibly because the tab was inactive for too long and the server kicked you?)"));
116086
116087
  }
116087
116088
  /**
116088
116089
  * Get the URL to view the current room in view only mode.
@@ -116551,7 +116552,7 @@ class CK extends _A {
116551
116552
  }
116552
116553
  apply() {
116553
116554
  var e;
116554
- if (MR && console.log("Apply PostProcessing " + this.name), ee() && (this._lastApplyTime !== void 0 && Date.now() - this._lastApplyTime < 100 && (this._rapidApplyCount++, this._rapidApplyCount === 5 && console.warn("Detected rapid post processing modifications - this might be a bug", this)), this._lastApplyTime = Date.now()), this._isDirty = !1, this.unapply(), this._activeEffects.length = 0, (e = this.sharedProfile) != null && e.components) {
116555
+ if (MR && console.log("Apply PostProcessing " + this.name), jA() && (this._lastApplyTime !== void 0 && Date.now() - this._lastApplyTime < 100 && (this._rapidApplyCount++, this._rapidApplyCount === 5 && console.warn("Detected rapid post processing modifications - this might be a bug", this)), this._lastApplyTime = Date.now()), this._isDirty = !1, this.unapply(), this._activeEffects.length = 0, (e = this.sharedProfile) != null && e.components) {
116555
116556
  const t = this.sharedProfile.components;
116556
116557
  for (const i of t)
116557
116558
  i.active && !this._activeEffects.includes(i) && this._activeEffects.push(i);
@@ -116637,7 +116638,7 @@ NeedleXRSession.onSessionRequestStart(evt => {
116637
116638
  evt.init.optionalFeatures = evt.init.optionalFeatures || [];
116638
116639
  evt.init.optionalFeatures.push('camera-access');
116639
116640
  });
116640
- `), ee() && gx("No camera feed available - please request the 'camera-access' feature before starting WebXR or add the ARCameraBackground component to your scene"), !1;
116641
+ `), jA() && gx("No camera feed available - please request the 'camera-access' feature before starting WebXR or add the ARCameraBackground component to your scene"), !1;
116641
116642
  const i = e.getViewerPose(s.xr.getReferenceSpace());
116642
116643
  if (i)
116643
116644
  for (const g of i.views)
@@ -117072,7 +117073,7 @@ class DOA {
117072
117073
  }
117073
117074
  onBeforeBuildDocument(A) {
117074
117075
  const e = eA.findObjectOfType(rw);
117075
- !e || !e.trackedImages || e.trackedImages.length > 1 && (ee() && Mi("USDZ: Only one tracked image is supported."), console.warn("USDZ: Only one tracked image is supported."));
117076
+ !e || !e.trackedImages || e.trackedImages.length > 1 && (jA() && Mi("USDZ: Only one tracked image is supported."), console.warn("USDZ: Only one tracked image is supported."));
117076
117077
  }
117077
117078
  onAfterSerialize(A) {
117078
117079
  A.files["image_tracking/" + this.filename] = this.imageData;
@@ -118285,7 +118286,7 @@ function YOA(s, A) {
118285
118286
  return console.debug("OBJ detected (exported by ZBrush)"), "obj";
118286
118287
  if (e[0] == 109 && e[1] == 116 && e[2] == 108 && e[3] == 108 && e[4] == 105 && e[5] == 98)
118287
118288
  return console.debug("OBJ detected (mtllib)"), "obj";
118288
- if (ee() || wb) {
118289
+ if (jA() || wb) {
118289
118290
  const t = new TextDecoder().decode(s.slice(0, 16));
118290
118291
  console.debug('Could not determine file type from binary data: "' + t + '..."', e);
118291
118292
  } else
@@ -118754,7 +118755,7 @@ changed from "`, t, '" to "', i, '"'), this.onLoad();
118754
118755
  const d = this.getAttribute("hide-loading-overlay");
118755
118756
  d != null && d !== "0" && (o = !1);
118756
118757
  }
118757
- o === !1 && !g && (ee() || (o = !0), console.warn("Needle Engine: You need a commercial license to override the default loading view. Visit https://needle.tools/pricing"), ee() && Mi('You need a <a target="_blank" href="https://needle.tools/pricing">commercial license</a> to override the default loading view. This will not work in production.')), !this._loadingView && o && (this._loadingView = new UN(this)), o && (this._didFullyLoad !== !0 ? (Q = this._loadingView) == null || Q.onLoadingBegin("begin load") : setTimeout(() => {
118758
+ o === !1 && !g && (jA() || (o = !0), console.warn("Needle Engine: You need a commercial license to override the default loading view. Visit https://needle.tools/pricing"), jA() && Mi('You need a <a target="_blank" href="https://needle.tools/pricing">commercial license</a> to override the default loading view. This will not work in production.')), !this._loadingView && o && (this._loadingView = new UN(this)), o && (this._didFullyLoad !== !0 ? (Q = this._loadingView) == null || Q.onLoadingBegin("begin load") : setTimeout(() => {
118758
118759
  this._loadingView && this._loadingProgress01 < 0.3 && this._loadId === t && this._loadingView.onLoadingBegin("begin load");
118759
118760
  }, 300)), Ms && console.warn(`--------------
118760
118761
  Needle Engine: Begin loading ` + t + `
@@ -118989,9 +118990,9 @@ function VOA(s) {
118989
118990
  let c = e[C];
118990
118991
  (c === "_" || c === "-") && (c = " "), !(c === " " && I.length <= 0 || a.includes(c) || (I.length === 0 && (c = c.toUpperCase()), r && c === " ")) && (r && (c = c.toUpperCase()), r = !1, I += c, c === " " && (r = !0));
118991
118992
  }
118992
- return ee() && e !== I && console.debug('Generated display name: "' + e + '" → "' + I + '"'), I.trim();
118993
+ return jA() && e !== I && console.debug('Generated display name: "' + e + '" → "' + I + '"'), I.trim();
118993
118994
  }
118994
- return ee() && console.debug("Loading: use default name", e), e;
118995
+ return jA() && console.debug("Loading: use default name", e), e;
118995
118996
  }
118996
118997
  const XOA = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
118997
118998
  __proto__: null,
@@ -124363,7 +124364,7 @@ const RD = class {
124363
124364
  const r = I.parent();
124364
124365
  r && r.numColliders() <= 0 && (r[$n] || (i = this.world) == null || i.removeRigidBody(r));
124365
124366
  } else
124366
- n instanceof Kf && (n.numColliders() <= 0 ? (g = this.world) == null || g.removeRigidBody(n) : ee() && (n.did_log_removing || setTimeout(() => {
124367
+ n instanceof Kf && (n.numColliders() <= 0 ? (g = this.world) == null || g.removeRigidBody(n) : jA() && (n.did_log_removing || setTimeout(() => {
124367
124368
  n.numColliders() > 0 && (n.did_log_removing = !0, console.warn("RapierPhysics: removing rigidbody with colliders from the physics world is not possible right now, please remove the colliders first"));
124368
124369
  }, 1)));
124369
124370
  }
@@ -124635,7 +124636,7 @@ const RD = class {
124635
124636
  if (this._meshCache.has(l))
124636
124637
  ks && console.warn("Use cached mesh collider"), o = this._meshCache.get(l);
124637
124638
  else {
124638
- (ks || ee()) && console.warn(`Your MeshCollider "${A.name}" is scaled: consider applying the scale to the collider mesh instead (${i.x}, ${i.y}, ${i.z})`);
124639
+ (ks || jA()) && console.warn(`Your MeshCollider "${A.name}" is scaled: consider applying the scale to the collider mesh instead (${i.x}, ${i.y}, ${i.z})`);
124639
124640
  const h = new Float32Array(o.length);
124640
124641
  for (let Q = 0; Q < o.length; Q += 3)
124641
124642
  h[Q] = o[Q] * i.x, h[Q + 1] = o[Q + 1] * i.y, h[Q + 2] = o[Q + 2] * i.z;
@@ -124871,7 +124872,7 @@ Error:`, n), null;
124871
124872
  }
124872
124873
  const g = t.translation(), o = t.rotation();
124873
124874
  if (Number.isNaN(g.x) || Number.isNaN(o.x)) {
124874
- !i.__COLLIDER_NAN && ee() && (console.warn("Collider has NaN values", i.name, i.gameObject, t), i.__COLLIDER_NAN = !0);
124875
+ !i.__COLLIDER_NAN && jA() && (console.warn("Collider has NaN values", i.name, i.gameObject, t), i.__COLLIDER_NAN = !0);
124875
124876
  continue;
124876
124877
  }
124877
124878
  const n = e.center;
@@ -125226,7 +125227,7 @@ function SPA(s, A, e) {
125226
125227
  const t = new Set(e);
125227
125228
  return Array.from(t);
125228
125229
  }
125229
- const b9 = "needle-button", TT = ee();
125230
+ const b9 = "needle-button", TT = jA();
125230
125231
  var IE, rE, aE, Mn, Wc, ef, Zb, grA, Vb, orA, pw;
125231
125232
  class srA extends HTMLElement {
125232
125233
  constructor() {
@@ -129897,7 +129898,7 @@ export {
129897
129898
  zVA as isDebugMode,
129898
129899
  tXA as isDesktop,
129899
129900
  Gf as isDestroyed,
129900
- ee as isDevEnvironment,
129901
+ jA as isDevEnvironment,
129901
129902
  FWA as isDisposed,
129902
129903
  p4A as isExporting,
129903
129904
  ZmA as isHostedOnGlitch,