@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 qde(s, e, t, i, n, r, o) {
11222
11222
  ae = Bo.vertexShader, Ae = Bo.fragmentShader;
11223
11223
  } else
11224
11224
  ae = w.vertexShader, Ae = w.fragmentShader, l.update(w), Se = l.getVertexShaderID(w), Le = l.getFragmentShaderID(w);
11225
- const st = s.getRenderTarget(), ot = k.isInstancedMesh === !0, Ct = k.isBatchedMesh === !0, zt = !!w.map, ke = !!w.matcap, Z = !!W, Qe = !!w.aoMap, Je = !!w.lightMap, We = !!w.bumpMap, nt = !!w.normalMap, Tt = !!w.displacementMap, mt = !!w.emissiveMap, O = !!w.metalnessMap, D = !!w.roughnessMap, he = w.anisotropy > 0, Ee = w.clearcoat > 0, Ne = w.dispersion > 0, Re = w.iridescence > 0, yt = w.sheen > 0, et = w.transmission > 0, lt = he && !!w.anisotropyMap, jt = Ee && !!w.clearcoatMap, Ge = Ee && !!w.clearcoatNormalMap, At = Ee && !!w.clearcoatRoughnessMap, Yt = Re && !!w.iridescenceMap, Lt = Re && !!w.iridescenceThicknessMap, at = yt && !!w.sheenColorMap, kt = yt && !!w.sheenRoughnessMap, qt = !!w.specularMap, bi = !!w.specularColorMap, te = !!w.specularIntensityMap, xt = et && !!w.transmissionMap, ie = et && !!w.thicknessMap, Xe = !!w.gradientMap, bt = !!w.alphaMap, vt = w.alphaTest > 0, Di = !!w.alphaHash, gs = !!w.extensions;
11225
+ const st = s.getRenderTarget(), ot = k.isInstancedMesh === !0, Ct = k.isBatchedMesh === !0, zt = !!w.map, ke = !!w.matcap, Z = !!W, Qe = !!w.aoMap, je = !!w.lightMap, We = !!w.bumpMap, nt = !!w.normalMap, Tt = !!w.displacementMap, mt = !!w.emissiveMap, O = !!w.metalnessMap, D = !!w.roughnessMap, he = w.anisotropy > 0, Ee = w.clearcoat > 0, Ne = w.dispersion > 0, Re = w.iridescence > 0, yt = w.sheen > 0, et = w.transmission > 0, lt = he && !!w.anisotropyMap, jt = Ee && !!w.clearcoatMap, Ge = Ee && !!w.clearcoatNormalMap, At = Ee && !!w.clearcoatRoughnessMap, Yt = Re && !!w.iridescenceMap, Lt = Re && !!w.iridescenceThicknessMap, at = yt && !!w.sheenColorMap, kt = yt && !!w.sheenRoughnessMap, qt = !!w.specularMap, bi = !!w.specularColorMap, te = !!w.specularIntensityMap, xt = et && !!w.transmissionMap, ie = et && !!w.thicknessMap, Xe = !!w.gradientMap, bt = !!w.alphaMap, vt = w.alphaTest > 0, Di = !!w.alphaHash, gs = !!w.extensions;
11226
11226
  let Lo = zr;
11227
11227
  w.toneMapped && (st === null || st.isXRRenderTarget === !0) && (Lo = s.toneMapping);
11228
11228
  const Ki = {
@@ -11251,7 +11251,7 @@ function qde(s, e, t, i, n, r, o) {
11251
11251
  envMapMode: Z && W.mapping,
11252
11252
  envMapCubeUVHeight: se,
11253
11253
  aoMap: Qe,
11254
- lightMap: Je,
11254
+ lightMap: je,
11255
11255
  bumpMap: We,
11256
11256
  normalMap: nt,
11257
11257
  displacementMap: f && Tt,
@@ -11288,7 +11288,7 @@ function qde(s, e, t, i, n, r, o) {
11288
11288
  //
11289
11289
  mapUv: zt && A(w.map.channel),
11290
11290
  aoMapUv: Qe && A(w.aoMap.channel),
11291
- lightMapUv: Je && A(w.lightMap.channel),
11291
+ lightMapUv: je && A(w.lightMap.channel),
11292
11292
  bumpMapUv: We && A(w.bumpMap.channel),
11293
11293
  normalMapUv: nt && A(w.normalMap.channel),
11294
11294
  displacementMapUv: Tt && A(w.displacementMap.channel),
@@ -12067,7 +12067,7 @@ function dpe(s) {
12067
12067
  return vt;
12068
12068
  }
12069
12069
  const Ae = {};
12070
- Ae[s.TEXTURE_2D] = ae(s.TEXTURE_2D, s.TEXTURE_2D, 1), Ae[s.TEXTURE_CUBE_MAP] = ae(s.TEXTURE_CUBE_MAP, s.TEXTURE_CUBE_MAP_POSITIVE_X, 6), Ae[s.TEXTURE_2D_ARRAY] = ae(s.TEXTURE_2D_ARRAY, s.TEXTURE_2D_ARRAY, 1, 1), Ae[s.TEXTURE_3D] = ae(s.TEXTURE_3D, s.TEXTURE_3D, 1, 1), n.setClear(0, 0, 0, 1), r.setClear(1), o.setClear(0), Se(s.DEPTH_TEST), r.setFunc(ap), Je(!1), We(JD), Se(s.CULL_FACE), Z(Nn);
12070
+ Ae[s.TEXTURE_2D] = ae(s.TEXTURE_2D, s.TEXTURE_2D, 1), Ae[s.TEXTURE_CUBE_MAP] = ae(s.TEXTURE_CUBE_MAP, s.TEXTURE_CUBE_MAP_POSITIVE_X, 6), Ae[s.TEXTURE_2D_ARRAY] = ae(s.TEXTURE_2D_ARRAY, s.TEXTURE_2D_ARRAY, 1, 1), Ae[s.TEXTURE_3D] = ae(s.TEXTURE_3D, s.TEXTURE_3D, 1, 1), n.setClear(0, 0, 0, 1), r.setClear(1), o.setClear(0), Se(s.DEPTH_TEST), r.setFunc(ap), je(!1), We(JD), Se(s.CULL_FACE), Z(Nn);
12071
12071
  function Se(te) {
12072
12072
  c[te] !== !0 && (s.enable(te), c[te] = !0);
12073
12073
  }
@@ -12169,11 +12169,11 @@ function dpe(s) {
12169
12169
  function Qe(te, xt) {
12170
12170
  te.side === Zi ? Le(s.CULL_FACE) : Se(s.CULL_FACE);
12171
12171
  let ie = te.side === vn;
12172
- xt && (ie = !ie), Je(ie), te.blending === qd && te.transparent === !1 ? Z(Nn) : Z(te.blending, te.blendEquation, te.blendSrc, te.blendDst, te.blendEquationAlpha, te.blendSrcAlpha, te.blendDstAlpha, te.blendColor, te.blendAlpha, te.premultipliedAlpha), r.setFunc(te.depthFunc), r.setTest(te.depthTest), r.setMask(te.depthWrite), n.setMask(te.colorWrite);
12172
+ xt && (ie = !ie), je(ie), te.blending === qd && te.transparent === !1 ? Z(Nn) : Z(te.blending, te.blendEquation, te.blendSrc, te.blendDst, te.blendEquationAlpha, te.blendSrcAlpha, te.blendDstAlpha, te.blendColor, te.blendAlpha, te.premultipliedAlpha), r.setFunc(te.depthFunc), r.setTest(te.depthTest), r.setMask(te.depthWrite), n.setMask(te.colorWrite);
12173
12173
  const Xe = te.stencilWrite;
12174
12174
  o.setTest(Xe), Xe && (o.setMask(te.stencilWriteMask), o.setFunc(te.stencilFunc, te.stencilRef, te.stencilFuncMask), o.setOp(te.stencilFail, te.stencilZFail, te.stencilZPass)), Tt(te.polygonOffset, te.polygonOffsetFactor, te.polygonOffsetUnits), te.alphaToCoverage === !0 ? Se(s.SAMPLE_ALPHA_TO_COVERAGE) : Le(s.SAMPLE_ALPHA_TO_COVERAGE);
12175
12175
  }
12176
- function Je(te) {
12176
+ function je(te) {
12177
12177
  L !== te && (te ? s.frontFace(s.CW) : s.frontFace(s.CCW), L = te);
12178
12178
  }
12179
12179
  function We(te) {
@@ -12302,7 +12302,7 @@ function dpe(s) {
12302
12302
  useProgram: Ct,
12303
12303
  setBlending: Z,
12304
12304
  setMaterial: Qe,
12305
- setFlipSided: Je,
12305
+ setFlipSided: je,
12306
12306
  setCullFace: We,
12307
12307
  setLineWidth: nt,
12308
12308
  setPolygonOffset: Tt,
@@ -12818,16 +12818,16 @@ function ype(s, e, t, i, n, r, o) {
12818
12818
  const Ge = Math.max(1, D.width >> Re), At = Math.max(1, D.height >> Re);
12819
12819
  Ne === s.TEXTURE_3D || Ne === s.TEXTURE_2D_ARRAY ? t.texImage3D(Ne, Re, lt, Ge, At, D.depth, 0, yt, et, null) : t.texImage2D(Ne, Re, lt, Ge, At, 0, yt, et, null);
12820
12820
  }
12821
- t.bindFramebuffer(s.FRAMEBUFFER, O), We(D) ? a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, Ee, Ne, i.get(he).__webglTexture, 0, Je(D)) : (Ne === s.TEXTURE_2D || Ne >= s.TEXTURE_CUBE_MAP_POSITIVE_X && Ne <= s.TEXTURE_CUBE_MAP_NEGATIVE_Z) && s.framebufferTexture2D(s.FRAMEBUFFER, Ee, Ne, i.get(he).__webglTexture, Re), t.bindFramebuffer(s.FRAMEBUFFER, null);
12821
+ t.bindFramebuffer(s.FRAMEBUFFER, O), We(D) ? a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, Ee, Ne, i.get(he).__webglTexture, 0, je(D)) : (Ne === s.TEXTURE_2D || Ne >= s.TEXTURE_CUBE_MAP_POSITIVE_X && Ne <= s.TEXTURE_CUBE_MAP_NEGATIVE_Z) && s.framebufferTexture2D(s.FRAMEBUFFER, Ee, Ne, i.get(he).__webglTexture, Re), t.bindFramebuffer(s.FRAMEBUFFER, null);
12822
12822
  }
12823
12823
  function Se(O, D, he) {
12824
12824
  if (s.bindRenderbuffer(s.RENDERBUFFER, O), D.depthBuffer) {
12825
- const Ee = D.depthTexture, Ne = Ee && Ee.isDepthTexture ? Ee.type : null, Re = x(D.stencilBuffer, Ne), yt = D.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, et = Je(D);
12825
+ const Ee = D.depthTexture, Ne = Ee && Ee.isDepthTexture ? Ee.type : null, Re = x(D.stencilBuffer, Ne), yt = D.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, et = je(D);
12826
12826
  We(D) ? a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, et, Re, D.width, D.height) : he ? s.renderbufferStorageMultisample(s.RENDERBUFFER, et, Re, D.width, D.height) : s.renderbufferStorage(s.RENDERBUFFER, Re, D.width, D.height), s.framebufferRenderbuffer(s.FRAMEBUFFER, yt, s.RENDERBUFFER, O);
12827
12827
  } else {
12828
12828
  const Ee = D.textures;
12829
12829
  for (let Ne = 0; Ne < Ee.length; Ne++) {
12830
- const Re = Ee[Ne], yt = r.convert(Re.format, Re.colorSpace), et = r.convert(Re.type), lt = b(Re.internalFormat, yt, et, Re.colorSpace), jt = Je(D);
12830
+ const Re = Ee[Ne], yt = r.convert(Re.format, Re.colorSpace), et = r.convert(Re.type), lt = b(Re.internalFormat, yt, et, Re.colorSpace), jt = je(D);
12831
12831
  he && We(D) === !1 ? s.renderbufferStorageMultisample(s.RENDERBUFFER, jt, lt, D.width, D.height) : We(D) ? a.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, jt, lt, D.width, D.height) : s.renderbufferStorage(s.RENDERBUFFER, lt, D.width, D.height);
12832
12832
  }
12833
12833
  }
@@ -12839,7 +12839,7 @@ function ype(s, e, t, i, n, r, o) {
12839
12839
  if (t.bindFramebuffer(s.FRAMEBUFFER, O), !(D.depthTexture && D.depthTexture.isDepthTexture))
12840
12840
  throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");
12841
12841
  (!i.get(D.depthTexture).__webglTexture || D.depthTexture.image.width !== D.width || D.depthTexture.image.height !== D.height) && (D.depthTexture.image.width = D.width, D.depthTexture.image.height = D.height, D.depthTexture.needsUpdate = !0), k(D.depthTexture, 0);
12842
- const Ee = i.get(D.depthTexture).__webglTexture, Ne = Je(D);
12842
+ const Ee = i.get(D.depthTexture).__webglTexture, Ne = je(D);
12843
12843
  if (D.depthTexture.format === Hg)
12844
12844
  We(D) ? a.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, s.DEPTH_ATTACHMENT, s.TEXTURE_2D, Ee, 0, Ne) : s.framebufferTexture2D(s.FRAMEBUFFER, s.DEPTH_ATTACHMENT, s.TEXTURE_2D, Ee, 0);
12845
12845
  else if (D.depthTexture.format === Wf)
@@ -12914,7 +12914,7 @@ function ype(s, e, t, i, n, r, o) {
12914
12914
  for (let et = 0; et < Ne.length; et++) {
12915
12915
  const lt = Ne[et];
12916
12916
  he.__webglColorRenderbuffer[et] = s.createRenderbuffer(), s.bindRenderbuffer(s.RENDERBUFFER, he.__webglColorRenderbuffer[et]);
12917
- const jt = r.convert(lt.format, lt.colorSpace), Ge = r.convert(lt.type), At = b(lt.internalFormat, jt, Ge, lt.colorSpace, O.isXRRenderTarget === !0), Yt = Je(O);
12917
+ const jt = r.convert(lt.format, lt.colorSpace), Ge = r.convert(lt.type), At = b(lt.internalFormat, jt, Ge, lt.colorSpace, O.isXRRenderTarget === !0), Yt = je(O);
12918
12918
  s.renderbufferStorageMultisample(s.RENDERBUFFER, Yt, At, O.width, O.height), s.framebufferRenderbuffer(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0 + et, s.RENDERBUFFER, he.__webglColorRenderbuffer[et]);
12919
12919
  }
12920
12920
  s.bindRenderbuffer(s.RENDERBUFFER, null), O.depthBuffer && (he.__webglDepthRenderbuffer = s.createRenderbuffer(), Se(he.__webglDepthRenderbuffer, O, !0)), t.bindFramebuffer(s.FRAMEBUFFER, null);
@@ -12988,7 +12988,7 @@ function ype(s, e, t, i, n, r, o) {
12988
12988
  }
12989
12989
  }
12990
12990
  }
12991
- function Je(O) {
12991
+ function je(O) {
12992
12992
  return Math.min(n.maxSamples, O.samples);
12993
12993
  }
12994
12994
  function We(O) {
@@ -13425,7 +13425,7 @@ class Cpe extends Cr {
13425
13425
  const F = new T(), H = new T();
13426
13426
  function W(ae, Ae, Se) {
13427
13427
  F.setFromMatrixPosition(Ae.matrixWorld), H.setFromMatrixPosition(Se.matrixWorld);
13428
- const Le = F.distanceTo(H), st = Ae.projectionMatrix.elements, ot = Se.projectionMatrix.elements, Ct = st[14] / (st[10] - 1), zt = st[14] / (st[10] + 1), ke = (st[9] + 1) / st[5], Z = (st[9] - 1) / st[5], Qe = (st[8] - 1) / st[0], Je = (ot[8] + 1) / ot[0], We = Ct * Qe, nt = Ct * Je, Tt = Le / (-Qe + Je), mt = Tt * -Qe;
13428
+ const Le = F.distanceTo(H), st = Ae.projectionMatrix.elements, ot = Se.projectionMatrix.elements, Ct = st[14] / (st[10] - 1), zt = st[14] / (st[10] + 1), ke = (st[9] + 1) / st[5], Z = (st[9] - 1) / st[5], Qe = (st[8] - 1) / st[0], je = (ot[8] + 1) / ot[0], We = Ct * Qe, nt = Ct * je, Tt = Le / (-Qe + je), mt = Tt * -Qe;
13429
13429
  if (Ae.matrixWorld.decompose(ae.position, ae.quaternion, ae.scale), ae.translateX(mt), ae.translateZ(Tt), ae.matrixWorld.compose(ae.position, ae.quaternion, ae.scale), ae.matrixWorldInverse.copy(ae.matrixWorld).invert(), st[10] === -1)
13430
13430
  ae.projectionMatrix.copy(Ae.projectionMatrix), ae.projectionMatrixInverse.copy(Ae.projectionMatrixInverse);
13431
13431
  else {
@@ -13739,9 +13739,9 @@ class sm {
13739
13739
  } catch (z) {
13740
13740
  throw console.error("THREE.WebGLRenderer: " + z.message), z;
13741
13741
  }
13742
- let Je, We, nt, Tt, mt, O, D, he, Ee, Ne, Re, yt, et, lt, jt, Ge, At, Yt, Lt, at, kt, qt, bi, te;
13742
+ let je, We, nt, Tt, mt, O, D, he, Ee, Ne, Re, yt, et, lt, jt, Ge, At, Yt, Lt, at, kt, qt, bi, te;
13743
13743
  function xt() {
13744
- Je = new Bue(Z), Je.init(), qt = new mj(Z, Je), We = new Iue(Z, Je, e, qt), nt = new dpe(Z), We.reverseDepthBuffer && nt.buffers.depth.setReversed(!0), Tt = new kue(Z), mt = new $de(), O = new ype(Z, Je, nt, mt, We, qt, Tt), D = new Eue(x), he = new Lue(x), Ee = new Ole(Z), bi = new Sue(Z, Ee), Ne = new Pue(Z, Ee, Tt, bi), Re = new Due(Z, Ne, Ee, Tt), Lt = new Nue(Z, We, O), Ge = new Tue(mt), yt = new qde(x, D, he, Je, We, bi, Ge), et = new Spe(x, mt), lt = new tpe(), jt = new ape(Je), Yt = new wue(x, D, he, nt, Re, d, l), At = new hpe(x, Re, We), te = new Mpe(Z, Tt, We, nt), at = new Mue(Z, Je, Tt), kt = new Gue(Z, Je, Tt), Tt.programs = yt.programs, x.capabilities = We, x.extensions = Je, x.properties = mt, x.renderLists = lt, x.shadowMap = At, x.state = nt, x.info = Tt;
13744
+ je = new Bue(Z), je.init(), qt = new mj(Z, je), We = new Iue(Z, je, e, qt), nt = new dpe(Z), We.reverseDepthBuffer && nt.buffers.depth.setReversed(!0), Tt = new kue(Z), mt = new $de(), O = new ype(Z, je, nt, mt, We, qt, Tt), D = new Eue(x), he = new Lue(x), Ee = new Ole(Z), bi = new Sue(Z, Ee), Ne = new Pue(Z, Ee, Tt, bi), Re = new Due(Z, Ne, Ee, Tt), Lt = new Nue(Z, We, O), Ge = new Tue(mt), yt = new qde(x, D, he, je, We, bi, Ge), et = new Spe(x, mt), lt = new tpe(), jt = new ape(je), Yt = new wue(x, D, he, nt, Re, d, l), At = new hpe(x, Re, We), te = new Mpe(Z, Tt, We, nt), at = new Mue(Z, je, Tt), kt = new Gue(Z, je, Tt), Tt.programs = yt.programs, x.capabilities = We, x.extensions = je, x.properties = mt, x.renderLists = lt, x.shadowMap = At, x.state = nt, x.info = Tt;
13745
13745
  }
13746
13746
  xt();
13747
13747
  const ie = new Cpe(x, Z);
@@ -13750,10 +13750,10 @@ class sm {
13750
13750
  }, this.getContextAttributes = function() {
13751
13751
  return Z.getContextAttributes();
13752
13752
  }, this.forceContextLoss = function() {
13753
- const z = Je.get("WEBGL_lose_context");
13753
+ const z = je.get("WEBGL_lose_context");
13754
13754
  z && z.loseContext();
13755
13755
  }, this.forceContextRestore = function() {
13756
- const z = Je.get("WEBGL_lose_context");
13756
+ const z = je.get("WEBGL_lose_context");
13757
13757
  z && z.restoreContext();
13758
13758
  }, this.getPixelRatio = function() {
13759
13759
  return H;
@@ -13858,8 +13858,8 @@ class sm {
13858
13858
  const ve = G.drawRange, pe = G.attributes.position;
13859
13859
  let Ze = ve.start * xe, Ke = (ve.start + ve.count) * xe;
13860
13860
  q !== null && (Ze = Math.max(Ze, q.start * xe), Ke = Math.min(Ke, (q.start + q.count) * xe)), Ce !== null ? (Ze = Math.max(Ze, 0), Ke = Math.min(Ke, Ce.count)) : pe != null && (Ze = Math.max(Ze, 0), Ke = Math.min(Ke, pe.count));
13861
- const je = Ke - Ze;
13862
- if (je < 0 || je === 1 / 0)
13861
+ const qe = Ke - Ze;
13862
+ if (qe < 0 || qe === 1 / 0)
13863
13863
  return;
13864
13864
  bi.setup(V, N, de, G, Ce);
13865
13865
  let wt, He = at;
@@ -13873,7 +13873,7 @@ class sm {
13873
13873
  if (V.isBatchedMesh)
13874
13874
  if (V._multiDrawInstances !== null)
13875
13875
  He.renderMultiDrawInstances(V._multiDrawStarts, V._multiDrawCounts, V._multiDrawCount, V._multiDrawInstances);
13876
- else if (Je.get("WEBGL_multi_draw"))
13876
+ else if (je.get("WEBGL_multi_draw"))
13877
13877
  He.renderMultiDraw(V._multiDrawStarts, V._multiDrawCounts, V._multiDrawCount);
13878
13878
  else {
13879
13879
  const De = V._multiDrawStarts, Nt = V._multiDrawCounts, Dt = V._multiDrawCount, Fi = Ce ? Ee.get(Ce).bytesPerElement : 1, Ws = mt.get(N).currentProgram.getUniforms();
@@ -13881,12 +13881,12 @@ class sm {
13881
13881
  Ws.setValue(Z, "_gl_DrawID", vi), He.render(De[vi] / Fi, Nt[vi]);
13882
13882
  }
13883
13883
  else if (V.isInstancedMesh)
13884
- He.renderInstances(Ze, je, V.count);
13884
+ He.renderInstances(Ze, qe, V.count);
13885
13885
  else if (G.isInstancedBufferGeometry) {
13886
13886
  const De = G._maxInstanceCount !== void 0 ? G._maxInstanceCount : 1 / 0, Nt = Math.min(G.instanceCount, De);
13887
- He.renderInstances(Ze, je, Nt);
13887
+ He.renderInstances(Ze, qe, Nt);
13888
13888
  } else
13889
- He.render(Ze, je);
13889
+ He.render(Ze, qe);
13890
13890
  };
13891
13891
  function Ki(z, R, G) {
13892
13892
  z.transparent === !0 && z.side === Zi && z.forceSinglePass === !1 ? (z.side = vn, z.needsUpdate = !0, gA(z, R, G), z.side = us, z.needsUpdate = !0, gA(z, R, G), z.side = Zi) : gA(z, R, G);
@@ -13923,7 +13923,7 @@ class sm {
13923
13923
  }
13924
13924
  setTimeout(q, 10);
13925
13925
  }
13926
- Je.get("KHR_parallel_shader_compile") !== null ? q() : setTimeout(q, 10);
13926
+ je.get("KHR_parallel_shader_compile") !== null ? q() : setTimeout(q, 10);
13927
13927
  });
13928
13928
  };
13929
13929
  let Bo = null;
@@ -14011,7 +14011,7 @@ class sm {
14011
14011
  return;
14012
14012
  A.state.transmissionRenderTarget[N.id] === void 0 && (A.state.transmissionRenderTarget[N.id] = new hi(1, 1, {
14013
14013
  generateMipmaps: !0,
14014
- type: Je.has("EXT_color_buffer_half_float") || Je.has("EXT_color_buffer_float") ? Wi : Gi,
14014
+ type: je.has("EXT_color_buffer_half_float") || je.has("EXT_color_buffer_float") ? Wi : Gi,
14015
14015
  minFilter: Ar,
14016
14016
  samples: 4,
14017
14017
  stencilBuffer: r,
@@ -14026,13 +14026,13 @@ class sm {
14026
14026
  const Ce = x.toneMapping;
14027
14027
  x.toneMapping = zr;
14028
14028
  const xe = N.viewport;
14029
- if (N.viewport !== void 0 && (N.viewport = void 0), A.setupLightsView(N), ae === !0 && Ge.setGlobalState(x.clippingPlanes, N), mA(z, G, N), O.updateMultisampleRenderTarget(q), O.updateRenderTargetMipmap(q), Je.has("WEBGL_multisampled_render_to_texture") === !1) {
14029
+ if (N.viewport !== void 0 && (N.viewport = void 0), A.setupLightsView(N), ae === !0 && Ge.setGlobalState(x.clippingPlanes, N), mA(z, G, N), O.updateMultisampleRenderTarget(q), O.updateRenderTargetMipmap(q), je.has("WEBGL_multisampled_render_to_texture") === !1) {
14030
14030
  let ve = !1;
14031
14031
  for (let pe = 0, Ze = R.length; pe < Ze; pe++) {
14032
- const Ke = R[pe], je = Ke.object, wt = Ke.geometry, He = Ke.material, De = Ke.group;
14033
- if (He.side === Zi && je.layers.test(N.layers)) {
14032
+ const Ke = R[pe], qe = Ke.object, wt = Ke.geometry, He = Ke.material, De = Ke.group;
14033
+ if (He.side === Zi && qe.layers.test(N.layers)) {
14034
14034
  const Nt = He.side;
14035
- He.side = vn, He.needsUpdate = !0, sM(je, G, N, wt, He, De), He.side = Nt, He.needsUpdate = !0, ve = !0;
14035
+ He.side = vn, He.needsUpdate = !0, sM(qe, G, N, wt, He, De), He.side = Nt, He.needsUpdate = !0, ve = !0;
14036
14036
  }
14037
14037
  }
14038
14038
  ve === !0 && (O.updateMultisampleRenderTarget(q), O.updateRenderTargetMipmap(q));
@@ -14077,15 +14077,15 @@ class sm {
14077
14077
  function oM(z, R, G, N, V) {
14078
14078
  R.isScene !== !0 && (R = Ct), O.resetTextureUnits();
14079
14079
  const q = R.fog, j = N.isMeshStandardMaterial ? R.environment : null, de = S === null ? x.outputColorSpace : S.isXRRenderTarget === !0 ? S.texture.colorSpace : Ji, Ce = (N.isMeshStandardMaterial ? he : D).get(N.envMap || j), xe = N.vertexColors === !0 && !!G.attributes.color && G.attributes.color.itemSize === 4, ve = !!G.attributes.tangent && (!!N.normalMap || N.anisotropy > 0), pe = !!G.morphAttributes.position, Ze = !!G.morphAttributes.normal, Ke = !!G.morphAttributes.color;
14080
- let je = zr;
14081
- N.toneMapped && (S === null || S.isXRRenderTarget === !0) && (je = x.toneMapping);
14080
+ let qe = zr;
14081
+ N.toneMapped && (S === null || S.isXRRenderTarget === !0) && (qe = x.toneMapping);
14082
14082
  const wt = G.morphAttributes.position || G.morphAttributes.normal || G.morphAttributes.color, He = wt !== void 0 ? wt.length : 0, De = mt.get(N), Nt = A.state.lights;
14083
14083
  if (ae === !0 && (Ae === !0 || z !== L)) {
14084
14084
  const mi = z === L && N.id === M;
14085
14085
  Ge.setState(N, z, mi);
14086
14086
  }
14087
14087
  let Dt = !1;
14088
- N.version === De.__version ? (De.needsLights && De.lightsStateVersion !== Nt.state.version || De.outputColorSpace !== de || V.isBatchedMesh && De.batching === !1 || !V.isBatchedMesh && De.batching === !0 || V.isBatchedMesh && De.batchingColor === !0 && V.colorTexture === null || V.isBatchedMesh && De.batchingColor === !1 && V.colorTexture !== null || V.isInstancedMesh && De.instancing === !1 || !V.isInstancedMesh && De.instancing === !0 || V.isSkinnedMesh && De.skinning === !1 || !V.isSkinnedMesh && De.skinning === !0 || V.isInstancedMesh && De.instancingColor === !0 && V.instanceColor === null || V.isInstancedMesh && De.instancingColor === !1 && V.instanceColor !== null || V.isInstancedMesh && De.instancingMorph === !0 && V.morphTexture === null || V.isInstancedMesh && De.instancingMorph === !1 && V.morphTexture !== null || De.envMap !== Ce || N.fog === !0 && De.fog !== q || De.numClippingPlanes !== void 0 && (De.numClippingPlanes !== Ge.numPlanes || De.numIntersection !== Ge.numIntersection) || De.vertexAlphas !== xe || De.vertexTangents !== ve || De.morphTargets !== pe || De.morphNormals !== Ze || De.morphColors !== Ke || De.toneMapping !== je || De.morphTargetsCount !== He) && (Dt = !0) : (Dt = !0, De.__version = N.version);
14088
+ N.version === De.__version ? (De.needsLights && De.lightsStateVersion !== Nt.state.version || De.outputColorSpace !== de || V.isBatchedMesh && De.batching === !1 || !V.isBatchedMesh && De.batching === !0 || V.isBatchedMesh && De.batchingColor === !0 && V.colorTexture === null || V.isBatchedMesh && De.batchingColor === !1 && V.colorTexture !== null || V.isInstancedMesh && De.instancing === !1 || !V.isInstancedMesh && De.instancing === !0 || V.isSkinnedMesh && De.skinning === !1 || !V.isSkinnedMesh && De.skinning === !0 || V.isInstancedMesh && De.instancingColor === !0 && V.instanceColor === null || V.isInstancedMesh && De.instancingColor === !1 && V.instanceColor !== null || V.isInstancedMesh && De.instancingMorph === !0 && V.morphTexture === null || V.isInstancedMesh && De.instancingMorph === !1 && V.morphTexture !== null || De.envMap !== Ce || N.fog === !0 && De.fog !== q || De.numClippingPlanes !== void 0 && (De.numClippingPlanes !== Ge.numPlanes || De.numIntersection !== Ge.numIntersection) || De.vertexAlphas !== xe || De.vertexTangents !== ve || De.morphTargets !== pe || De.morphNormals !== Ze || De.morphColors !== Ke || De.toneMapping !== qe || De.morphTargetsCount !== He) && (Dt = !0) : (Dt = !0, De.__version = N.version);
14089
14089
  let Fi = De.currentProgram;
14090
14090
  Dt === !0 && (Fi = gA(N, R, V));
14091
14091
  let Ws = !1, vi = !1, Si = !1;
@@ -14130,7 +14130,7 @@ class sm {
14130
14130
  }, this.setRenderTargetTextures = function(z, R, G) {
14131
14131
  mt.get(z.texture).__webglTexture = R, mt.get(z.depthTexture).__webglTexture = G;
14132
14132
  const N = mt.get(z);
14133
- N.__hasExternalTextures = !0, N.__autoAllocateDepthBuffer = G === void 0, N.__autoAllocateDepthBuffer || Je.has("WEBGL_multisampled_render_to_texture") === !0 && (console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"), N.__useRenderToTexture = !1);
14133
+ N.__hasExternalTextures = !0, N.__autoAllocateDepthBuffer = G === void 0, N.__autoAllocateDepthBuffer || je.has("WEBGL_multisampled_render_to_texture") === !0 && (console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"), N.__useRenderToTexture = !1);
14134
14134
  }, this.setRenderTargetFramebuffer = function(z, R) {
14135
14135
  const G = mt.get(z);
14136
14136
  G.__webglFramebuffer = R, G.__useDefaultFramebuffer = R === void 0;
@@ -14222,13 +14222,13 @@ class sm {
14222
14222
  G !== null ? (q = G.max.x - G.min.x, j = G.max.y - G.min.y, de = G.min.x, Ce = G.min.y) : (q = z.image.width, j = z.image.height, de = 0, Ce = 0), N !== null ? (xe = N.x, ve = N.y) : (xe = 0, ve = 0);
14223
14223
  const pe = qt.convert(R.format), Ze = qt.convert(R.type);
14224
14224
  O.setTexture2D(R, 0), Z.pixelStorei(Z.UNPACK_FLIP_Y_WEBGL, R.flipY), Z.pixelStorei(Z.UNPACK_PREMULTIPLY_ALPHA_WEBGL, R.premultiplyAlpha), Z.pixelStorei(Z.UNPACK_ALIGNMENT, R.unpackAlignment);
14225
- const Ke = Z.getParameter(Z.UNPACK_ROW_LENGTH), je = Z.getParameter(Z.UNPACK_IMAGE_HEIGHT), wt = Z.getParameter(Z.UNPACK_SKIP_PIXELS), He = Z.getParameter(Z.UNPACK_SKIP_ROWS), De = Z.getParameter(Z.UNPACK_SKIP_IMAGES), Nt = z.isCompressedTexture ? z.mipmaps[V] : z.image;
14226
- Z.pixelStorei(Z.UNPACK_ROW_LENGTH, Nt.width), Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT, Nt.height), Z.pixelStorei(Z.UNPACK_SKIP_PIXELS, de), Z.pixelStorei(Z.UNPACK_SKIP_ROWS, Ce), z.isDataTexture ? Z.texSubImage2D(Z.TEXTURE_2D, V, xe, ve, q, j, pe, Ze, Nt.data) : z.isCompressedTexture ? Z.compressedTexSubImage2D(Z.TEXTURE_2D, V, xe, ve, Nt.width, Nt.height, pe, Nt.data) : Z.texSubImage2D(Z.TEXTURE_2D, V, xe, ve, q, j, pe, Ze, Nt), Z.pixelStorei(Z.UNPACK_ROW_LENGTH, Ke), Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT, je), Z.pixelStorei(Z.UNPACK_SKIP_PIXELS, wt), Z.pixelStorei(Z.UNPACK_SKIP_ROWS, He), Z.pixelStorei(Z.UNPACK_SKIP_IMAGES, De), V === 0 && R.generateMipmaps && Z.generateMipmap(Z.TEXTURE_2D), nt.unbindTexture();
14225
+ const Ke = Z.getParameter(Z.UNPACK_ROW_LENGTH), qe = Z.getParameter(Z.UNPACK_IMAGE_HEIGHT), wt = Z.getParameter(Z.UNPACK_SKIP_PIXELS), He = Z.getParameter(Z.UNPACK_SKIP_ROWS), De = Z.getParameter(Z.UNPACK_SKIP_IMAGES), Nt = z.isCompressedTexture ? z.mipmaps[V] : z.image;
14226
+ Z.pixelStorei(Z.UNPACK_ROW_LENGTH, Nt.width), Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT, Nt.height), Z.pixelStorei(Z.UNPACK_SKIP_PIXELS, de), Z.pixelStorei(Z.UNPACK_SKIP_ROWS, Ce), z.isDataTexture ? Z.texSubImage2D(Z.TEXTURE_2D, V, xe, ve, q, j, pe, Ze, Nt.data) : z.isCompressedTexture ? Z.compressedTexSubImage2D(Z.TEXTURE_2D, V, xe, ve, Nt.width, Nt.height, pe, Nt.data) : Z.texSubImage2D(Z.TEXTURE_2D, V, xe, ve, q, j, pe, Ze, Nt), Z.pixelStorei(Z.UNPACK_ROW_LENGTH, Ke), Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT, qe), Z.pixelStorei(Z.UNPACK_SKIP_PIXELS, wt), Z.pixelStorei(Z.UNPACK_SKIP_ROWS, He), Z.pixelStorei(Z.UNPACK_SKIP_IMAGES, De), V === 0 && R.generateMipmaps && Z.generateMipmap(Z.TEXTURE_2D), nt.unbindTexture();
14227
14227
  }, this.copyTextureToTexture3D = function(z, R, G = null, N = null, V = 0) {
14228
14228
  z.isTexture !== !0 && (gE("WebGLRenderer: copyTextureToTexture3D function signature has changed."), G = arguments[0] || null, N = arguments[1] || null, z = arguments[2], R = arguments[3], V = arguments[4] || 0);
14229
14229
  let q, j, de, Ce, xe, ve, pe, Ze, Ke;
14230
- const je = z.isCompressedTexture ? z.mipmaps[V] : z.image;
14231
- G !== null ? (q = G.max.x - G.min.x, j = G.max.y - G.min.y, de = G.max.z - G.min.z, Ce = G.min.x, xe = G.min.y, ve = G.min.z) : (q = je.width, j = je.height, de = je.depth, Ce = 0, xe = 0, ve = 0), N !== null ? (pe = N.x, Ze = N.y, Ke = N.z) : (pe = 0, Ze = 0, Ke = 0);
14230
+ const qe = z.isCompressedTexture ? z.mipmaps[V] : z.image;
14231
+ G !== null ? (q = G.max.x - G.min.x, j = G.max.y - G.min.y, de = G.max.z - G.min.z, Ce = G.min.x, xe = G.min.y, ve = G.min.z) : (q = qe.width, j = qe.height, de = qe.depth, Ce = 0, xe = 0, ve = 0), N !== null ? (pe = N.x, Ze = N.y, Ke = N.z) : (pe = 0, Ze = 0, Ke = 0);
14232
14232
  const wt = qt.convert(R.format), He = qt.convert(R.type);
14233
14233
  let De;
14234
14234
  if (R.isData3DTexture)
@@ -14241,7 +14241,7 @@ class sm {
14241
14241
  }
14242
14242
  Z.pixelStorei(Z.UNPACK_FLIP_Y_WEBGL, R.flipY), Z.pixelStorei(Z.UNPACK_PREMULTIPLY_ALPHA_WEBGL, R.premultiplyAlpha), Z.pixelStorei(Z.UNPACK_ALIGNMENT, R.unpackAlignment);
14243
14243
  const Nt = Z.getParameter(Z.UNPACK_ROW_LENGTH), Dt = Z.getParameter(Z.UNPACK_IMAGE_HEIGHT), Fi = Z.getParameter(Z.UNPACK_SKIP_PIXELS), Ws = Z.getParameter(Z.UNPACK_SKIP_ROWS), vi = Z.getParameter(Z.UNPACK_SKIP_IMAGES);
14244
- Z.pixelStorei(Z.UNPACK_ROW_LENGTH, je.width), Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT, je.height), Z.pixelStorei(Z.UNPACK_SKIP_PIXELS, Ce), Z.pixelStorei(Z.UNPACK_SKIP_ROWS, xe), Z.pixelStorei(Z.UNPACK_SKIP_IMAGES, ve), z.isDataTexture || z.isData3DTexture ? Z.texSubImage3D(De, V, pe, Ze, Ke, q, j, de, wt, He, je.data) : R.isCompressedArrayTexture ? Z.compressedTexSubImage3D(De, V, pe, Ze, Ke, q, j, de, wt, je.data) : Z.texSubImage3D(De, V, pe, Ze, Ke, q, j, de, wt, He, je), Z.pixelStorei(Z.UNPACK_ROW_LENGTH, Nt), Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT, Dt), Z.pixelStorei(Z.UNPACK_SKIP_PIXELS, Fi), Z.pixelStorei(Z.UNPACK_SKIP_ROWS, Ws), Z.pixelStorei(Z.UNPACK_SKIP_IMAGES, vi), V === 0 && R.generateMipmaps && Z.generateMipmap(De), nt.unbindTexture();
14244
+ Z.pixelStorei(Z.UNPACK_ROW_LENGTH, qe.width), Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT, qe.height), Z.pixelStorei(Z.UNPACK_SKIP_PIXELS, Ce), Z.pixelStorei(Z.UNPACK_SKIP_ROWS, xe), Z.pixelStorei(Z.UNPACK_SKIP_IMAGES, ve), z.isDataTexture || z.isData3DTexture ? Z.texSubImage3D(De, V, pe, Ze, Ke, q, j, de, wt, He, qe.data) : R.isCompressedArrayTexture ? Z.compressedTexSubImage3D(De, V, pe, Ze, Ke, q, j, de, wt, qe.data) : Z.texSubImage3D(De, V, pe, Ze, Ke, q, j, de, wt, He, qe), Z.pixelStorei(Z.UNPACK_ROW_LENGTH, Nt), Z.pixelStorei(Z.UNPACK_IMAGE_HEIGHT, Dt), Z.pixelStorei(Z.UNPACK_SKIP_PIXELS, Fi), Z.pixelStorei(Z.UNPACK_SKIP_ROWS, Ws), Z.pixelStorei(Z.UNPACK_SKIP_IMAGES, vi), V === 0 && R.generateMipmaps && Z.generateMipmap(De), nt.unbindTexture();
14245
14245
  }, this.initRenderTarget = function(z) {
14246
14246
  mt.get(z).__webglFramebuffer === void 0 && O.setupRenderTarget(z);
14247
14247
  }, this.initTexture = function(z) {
@@ -16906,44 +16906,44 @@ class bx extends St {
16906
16906
  }
16907
16907
  const F = w.length, H = P.length;
16908
16908
  function W(ke, Z, Qe) {
16909
- let Je, We, nt;
16909
+ let je, We, nt;
16910
16910
  const Tt = ke.x - Z.x, mt = ke.y - Z.y, O = Qe.x - ke.x, D = Qe.y - ke.y, he = Tt * Tt + mt * mt, Ee = Tt * D - mt * O;
16911
16911
  if (Math.abs(Ee) > Number.EPSILON) {
16912
16912
  const Ne = Math.sqrt(he), Re = Math.sqrt(O * O + D * D), yt = Z.x - mt / Ne, et = Z.y + Tt / Ne, lt = Qe.x - D / Re, jt = Qe.y + O / Re, Ge = ((lt - yt) * D - (jt - et) * O) / (Tt * D - mt * O);
16913
- Je = yt + Tt * Ge - ke.x, We = et + mt * Ge - ke.y;
16914
- const At = Je * Je + We * We;
16913
+ je = yt + Tt * Ge - ke.x, We = et + mt * Ge - ke.y;
16914
+ const At = je * je + We * We;
16915
16915
  if (At <= 2)
16916
- return new Q(Je, We);
16916
+ return new Q(je, We);
16917
16917
  nt = Math.sqrt(At / 2);
16918
16918
  } else {
16919
16919
  let Ne = !1;
16920
- Tt > Number.EPSILON ? O > Number.EPSILON && (Ne = !0) : Tt < -Number.EPSILON ? O < -Number.EPSILON && (Ne = !0) : Math.sign(mt) === Math.sign(D) && (Ne = !0), Ne ? (Je = -mt, We = Tt, nt = Math.sqrt(he)) : (Je = Tt, We = mt, nt = Math.sqrt(he / 2));
16920
+ Tt > Number.EPSILON ? O > Number.EPSILON && (Ne = !0) : Tt < -Number.EPSILON ? O < -Number.EPSILON && (Ne = !0) : Math.sign(mt) === Math.sign(D) && (Ne = !0), Ne ? (je = -mt, We = Tt, nt = Math.sqrt(he)) : (je = Tt, We = mt, nt = Math.sqrt(he / 2));
16921
16921
  }
16922
- return new Q(Je / nt, We / nt);
16922
+ return new Q(je / nt, We / nt);
16923
16923
  }
16924
16924
  const se = [];
16925
- for (let ke = 0, Z = k.length, Qe = Z - 1, Je = ke + 1; ke < Z; ke++, Qe++, Je++)
16926
- Qe === Z && (Qe = 0), Je === Z && (Je = 0), se[ke] = W(k[ke], k[Qe], k[Je]);
16925
+ for (let ke = 0, Z = k.length, Qe = Z - 1, je = ke + 1; ke < Z; ke++, Qe++, je++)
16926
+ Qe === Z && (Qe = 0), je === Z && (je = 0), se[ke] = W(k[ke], k[Qe], k[je]);
16927
16927
  const ue = [];
16928
16928
  let be, Pe = se.concat();
16929
16929
  for (let ke = 0, Z = E.length; ke < Z; ke++) {
16930
16930
  const Qe = E[ke];
16931
16931
  be = [];
16932
- for (let Je = 0, We = Qe.length, nt = We - 1, Tt = Je + 1; Je < We; Je++, nt++, Tt++)
16933
- nt === We && (nt = 0), Tt === We && (Tt = 0), be[Je] = W(Qe[Je], Qe[nt], Qe[Tt]);
16932
+ for (let je = 0, We = Qe.length, nt = We - 1, Tt = je + 1; je < We; je++, nt++, Tt++)
16933
+ nt === We && (nt = 0), Tt === We && (Tt = 0), be[je] = W(Qe[je], Qe[nt], Qe[Tt]);
16934
16934
  ue.push(be), Pe = Pe.concat(be);
16935
16935
  }
16936
16936
  for (let ke = 0; ke < A; ke++) {
16937
- const Z = ke / A, Qe = f * Math.cos(Z * Math.PI / 2), Je = m * Math.sin(Z * Math.PI / 2) + g;
16937
+ const Z = ke / A, Qe = f * Math.cos(Z * Math.PI / 2), je = m * Math.sin(Z * Math.PI / 2) + g;
16938
16938
  for (let We = 0, nt = k.length; We < nt; We++) {
16939
- const Tt = U(k[We], se[We], Je);
16939
+ const Tt = U(k[We], se[We], je);
16940
16940
  Le(Tt.x, Tt.y, -Qe);
16941
16941
  }
16942
16942
  for (let We = 0, nt = E.length; We < nt; We++) {
16943
16943
  const Tt = E[We];
16944
16944
  be = ue[We];
16945
16945
  for (let mt = 0, O = Tt.length; mt < O; mt++) {
16946
- const D = U(Tt[mt], be[mt], Je);
16946
+ const D = U(Tt[mt], be[mt], je);
16947
16947
  Le(D.x, D.y, -Qe);
16948
16948
  }
16949
16949
  }
@@ -16959,16 +16959,16 @@ class bx extends St {
16959
16959
  v ? (S.copy(_.normals[ke]).multiplyScalar(Qe.x), C.copy(_.binormals[ke]).multiplyScalar(Qe.y), M.copy(x[ke]).add(S).add(C), Le(M.x, M.y, M.z)) : Le(Qe.x, Qe.y, u / h * ke);
16960
16960
  }
16961
16961
  for (let ke = A - 1; ke >= 0; ke--) {
16962
- const Z = ke / A, Qe = f * Math.cos(Z * Math.PI / 2), Je = m * Math.sin(Z * Math.PI / 2) + g;
16962
+ const Z = ke / A, Qe = f * Math.cos(Z * Math.PI / 2), je = m * Math.sin(Z * Math.PI / 2) + g;
16963
16963
  for (let We = 0, nt = k.length; We < nt; We++) {
16964
- const Tt = U(k[We], se[We], Je);
16964
+ const Tt = U(k[We], se[We], je);
16965
16965
  Le(Tt.x, Tt.y, u + Qe);
16966
16966
  }
16967
16967
  for (let We = 0, nt = E.length; We < nt; We++) {
16968
16968
  const Tt = E[We];
16969
16969
  be = ue[We];
16970
16970
  for (let mt = 0, O = Tt.length; mt < O; mt++) {
16971
- const D = U(Tt[mt], be[mt], Je);
16971
+ const D = U(Tt[mt], be[mt], je);
16972
16972
  v ? Le(D.x, D.y + x[h - 1].y, x[h - 1].x + Qe) : Le(D.x, D.y, u + Qe);
16973
16973
  }
16974
16974
  }
@@ -16978,13 +16978,13 @@ class bx extends St {
16978
16978
  const ke = n.length / 3;
16979
16979
  if (d) {
16980
16980
  let Z = 0, Qe = F * Z;
16981
- for (let Je = 0; Je < H; Je++) {
16982
- const We = P[Je];
16981
+ for (let je = 0; je < H; je++) {
16982
+ const We = P[je];
16983
16983
  st(We[2] + Qe, We[1] + Qe, We[0] + Qe);
16984
16984
  }
16985
16985
  Z = h + A * 2, Qe = F * Z;
16986
- for (let Je = 0; Je < H; Je++) {
16987
- const We = P[Je];
16986
+ for (let je = 0; je < H; je++) {
16987
+ const We = P[je];
16988
16988
  st(We[0] + Qe, We[1] + Qe, We[2] + Qe);
16989
16989
  }
16990
16990
  } else {
@@ -17003,7 +17003,7 @@ class bx extends St {
17003
17003
  const ke = n.length / 3;
17004
17004
  let Z = 0;
17005
17005
  Se(k, Z), Z += k.length;
17006
- for (let Qe = 0, Je = E.length; Qe < Je; Qe++) {
17006
+ for (let Qe = 0, je = E.length; Qe < je; Qe++) {
17007
17007
  const We = E[Qe];
17008
17008
  Se(We, Z), Z += We.length;
17009
17009
  }
@@ -17012,11 +17012,11 @@ class bx extends St {
17012
17012
  function Se(ke, Z) {
17013
17013
  let Qe = ke.length;
17014
17014
  for (; --Qe >= 0; ) {
17015
- const Je = Qe;
17015
+ const je = Qe;
17016
17016
  let We = Qe - 1;
17017
17017
  We < 0 && (We = ke.length - 1);
17018
17018
  for (let nt = 0, Tt = h + A * 2; nt < Tt; nt++) {
17019
- const mt = F * nt, O = F * (nt + 1), D = Z + Je + mt, he = Z + We + mt, Ee = Z + We + O, Ne = Z + Je + O;
17019
+ const mt = F * nt, O = F * (nt + 1), D = Z + je + mt, he = Z + We + mt, Ee = Z + We + O, Ne = Z + je + O;
17020
17020
  ot(D, he, Ee, Ne);
17021
17021
  }
17022
17022
  }
@@ -17026,11 +17026,11 @@ class bx extends St {
17026
17026
  }
17027
17027
  function st(ke, Z, Qe) {
17028
17028
  Ct(ke), Ct(Z), Ct(Qe);
17029
- const Je = n.length / 3, We = b.generateTopUV(i, n, Je - 3, Je - 2, Je - 1);
17029
+ const je = n.length / 3, We = b.generateTopUV(i, n, je - 3, je - 2, je - 1);
17030
17030
  zt(We[0]), zt(We[1]), zt(We[2]);
17031
17031
  }
17032
- function ot(ke, Z, Qe, Je) {
17033
- Ct(ke), Ct(Z), Ct(Je), Ct(Z), Ct(Qe), Ct(Je);
17032
+ function ot(ke, Z, Qe, je) {
17033
+ Ct(ke), Ct(Z), Ct(je), Ct(Z), Ct(Qe), Ct(je);
17034
17034
  const We = n.length / 3, nt = b.generateSideWallUV(i, n, We - 6, We - 3, We - 2, We - 1);
17035
17035
  zt(nt[0]), zt(nt[1]), zt(nt[3]), zt(nt[1]), zt(nt[2]), zt(nt[3]);
17036
17036
  }
@@ -22647,7 +22647,7 @@ class U0 extends FX {
22647
22647
  return e.context.label !== void 0 && delete e.context.label, e.format(l, i, t);
22648
22648
  }
22649
22649
  }
22650
- const qe = (s, e) => {
22650
+ const $e = (s, e) => {
22651
22651
  const t = s8(e || s), i = s && s.isNode === !0 ? s.node && s.node.value || s.value : s;
22652
22652
  return me(new U0(i, t));
22653
22653
  };
@@ -23205,7 +23205,7 @@ class b6 extends Kt {
23205
23205
  return me(new wme(this, me(e)));
23206
23206
  }
23207
23207
  setNodeType(e) {
23208
- const t = qe(null, e).getSelf();
23208
+ const t = $e(null, e).getSelf();
23209
23209
  this.group !== null && t.setGroup(this.group), this.node = t;
23210
23210
  }
23211
23211
  getNodeType(e) {
@@ -23539,7 +23539,7 @@ class ku extends U0 {
23539
23539
  return this.value;
23540
23540
  }
23541
23541
  getTransformedUV(e) {
23542
- return this._matrixUniform === null && (this._matrixUniform = qe(this.value.matrix)), this._matrixUniform.mul(J(e, 1)).xy;
23542
+ return this._matrixUniform === null && (this._matrixUniform = $e(this.value.matrix)), this._matrixUniform.mul(J(e, 1)).xy;
23543
23543
  }
23544
23544
  setUpdateMatrix(e) {
23545
23545
  return this.updateMatrix = e, this.updateType = e ? Wt.FRAME : Wt.NONE, this;
@@ -23641,7 +23641,7 @@ class ku extends U0 {
23641
23641
  return e.sampler = this.sampler, e;
23642
23642
  }
23643
23643
  }
23644
- const ki = /* @__PURE__ */ we(ku), hc = (...s) => ki(...s).setSampler(!1), Tme = (s) => (s.isNode === !0 ? s : ki(s)).convert("sampler"), wy = /* @__PURE__ */ qe("float").label("cameraNear").setGroup(zi).onRenderUpdate(({ camera: s }) => s.near), Sy = /* @__PURE__ */ qe("float").label("cameraFar").setGroup(zi).onRenderUpdate(({ camera: s }) => s.far), X6 = /* @__PURE__ */ qe("float").label("cameraLogDepth").setGroup(zi).onRenderUpdate(({ camera: s }) => 2 / (Math.log(s.far + 1) / Math.LN2)), ja = /* @__PURE__ */ qe("mat4").label("cameraProjectionMatrix").setGroup(zi).onRenderUpdate(({ camera: s }) => s.projectionMatrix), Eme = /* @__PURE__ */ qe("mat4").label("cameraProjectionMatrixInverse").setGroup(zi).onRenderUpdate(({ camera: s }) => s.projectionMatrixInverse), rl = /* @__PURE__ */ qe("mat4").label("cameraViewMatrix").setGroup(zi).onRenderUpdate(({ camera: s }) => s.matrixWorldInverse), Rme = /* @__PURE__ */ qe("mat4").label("cameraWorldMatrix").setGroup(zi).onRenderUpdate(({ camera: s }) => s.matrixWorld), Lme = /* @__PURE__ */ qe("mat3").label("cameraNormalMatrix").setGroup(zi).onRenderUpdate(({ camera: s }) => s.normalMatrix), AU = /* @__PURE__ */ qe(new T()).label("cameraPosition").setGroup(zi).onRenderUpdate(({ camera: s }, e) => e.value.setFromMatrixPosition(s.matrixWorld));
23644
+ const ki = /* @__PURE__ */ we(ku), hc = (...s) => ki(...s).setSampler(!1), Tme = (s) => (s.isNode === !0 ? s : ki(s)).convert("sampler"), wy = /* @__PURE__ */ $e("float").label("cameraNear").setGroup(zi).onRenderUpdate(({ camera: s }) => s.near), Sy = /* @__PURE__ */ $e("float").label("cameraFar").setGroup(zi).onRenderUpdate(({ camera: s }) => s.far), X6 = /* @__PURE__ */ $e("float").label("cameraLogDepth").setGroup(zi).onRenderUpdate(({ camera: s }) => 2 / (Math.log(s.far + 1) / Math.LN2)), ja = /* @__PURE__ */ $e("mat4").label("cameraProjectionMatrix").setGroup(zi).onRenderUpdate(({ camera: s }) => s.projectionMatrix), Eme = /* @__PURE__ */ $e("mat4").label("cameraProjectionMatrixInverse").setGroup(zi).onRenderUpdate(({ camera: s }) => s.projectionMatrixInverse), rl = /* @__PURE__ */ $e("mat4").label("cameraViewMatrix").setGroup(zi).onRenderUpdate(({ camera: s }) => s.matrixWorldInverse), Rme = /* @__PURE__ */ $e("mat4").label("cameraWorldMatrix").setGroup(zi).onRenderUpdate(({ camera: s }) => s.matrixWorld), Lme = /* @__PURE__ */ $e("mat3").label("cameraNormalMatrix").setGroup(zi).onRenderUpdate(({ camera: s }) => s.normalMatrix), AU = /* @__PURE__ */ $e(new T()).label("cameraPosition").setGroup(zi).onRenderUpdate(({ camera: s }, e) => e.value.setFromMatrixPosition(s.matrixWorld));
23645
23645
  class Yi extends Kt {
23646
23646
  static get type() {
23647
23647
  return "Object3DNode";
@@ -23699,9 +23699,9 @@ class wh extends Yi {
23699
23699
  this.object3d = e.object, super.update(e);
23700
23700
  }
23701
23701
  }
23702
- const Dme = /* @__PURE__ */ tt(wh, wh.DIRECTION), Sc = /* @__PURE__ */ tt(wh, wh.WORLD_MATRIX), Fme = /* @__PURE__ */ tt(wh, wh.POSITION), Vme = /* @__PURE__ */ tt(wh, wh.SCALE), zme = /* @__PURE__ */ tt(wh, wh.VIEW_POSITION), U6 = /* @__PURE__ */ qe(new ei()).onObjectUpdate(({ object: s }, e) => e.value.getNormalMatrix(s.matrixWorld)), O6 = /* @__PURE__ */ qe(new ce()).onObjectUpdate(({ object: s }, e) => e.value.copy(s.matrixWorld).invert()), Nu = /* @__PURE__ */ rl.mul(Sc).toVar("modelViewMatrix_2"), Xme = /* @__PURE__ */ ne((s) => (s.context.isHighPrecisionModelViewMatrix = !0, qe("mat4").onObjectUpdate(({ object: e, camera: t }) => e.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse, e.matrixWorld)))).once()().toVar("highPrecisionModelViewMatrix"), Ume = /* @__PURE__ */ ne((s) => {
23702
+ const Dme = /* @__PURE__ */ tt(wh, wh.DIRECTION), Sc = /* @__PURE__ */ tt(wh, wh.WORLD_MATRIX), Fme = /* @__PURE__ */ tt(wh, wh.POSITION), Vme = /* @__PURE__ */ tt(wh, wh.SCALE), zme = /* @__PURE__ */ tt(wh, wh.VIEW_POSITION), U6 = /* @__PURE__ */ $e(new ei()).onObjectUpdate(({ object: s }, e) => e.value.getNormalMatrix(s.matrixWorld)), O6 = /* @__PURE__ */ $e(new ce()).onObjectUpdate(({ object: s }, e) => e.value.copy(s.matrixWorld).invert()), Nu = /* @__PURE__ */ rl.mul(Sc).toVar("modelViewMatrix_2"), Xme = /* @__PURE__ */ ne((s) => (s.context.isHighPrecisionModelViewMatrix = !0, $e("mat4").onObjectUpdate(({ object: e, camera: t }) => e.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse, e.matrixWorld)))).once()().toVar("highPrecisionModelViewMatrix"), Ume = /* @__PURE__ */ ne((s) => {
23703
23703
  const e = s.context.isHighPrecisionModelViewMatrix;
23704
- return qe("mat3").onObjectUpdate(({ object: t, camera: i }) => (e !== !0 && t.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse, t.matrixWorld), t.normalMatrix.getNormalMatrix(t.modelViewMatrix)));
23704
+ return $e("mat3").onObjectUpdate(({ object: t, camera: i }) => (e !== !0 && t.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse, t.matrixWorld), t.normalMatrix.getNormalMatrix(t.modelViewMatrix)));
23705
23705
  }).once()().toVar("highPrecisionModelNormalMatrix"), ho = /* @__PURE__ */ Pr("position", "vec3"), Ss = /* @__PURE__ */ ho.varying("positionLocal"), UR = /* @__PURE__ */ ho.varying("positionPrevious"), OR = /* @__PURE__ */ Sc.mul(Ss).xyz.varying("v_positionWorld"), yU = /* @__PURE__ */ Ss.transformDirection(Sc).varying("v_positionWorldDirection").normalize().toVar("positionWorldDirection"), bo = /* @__PURE__ */ Nu.mul(Ss).xyz.varying("v_positionView"), Pn = /* @__PURE__ */ bo.negate().varying("v_positionViewDirection").normalize().toVar("positionViewDirection");
23706
23706
  class Z6 extends Kt {
23707
23707
  static get type() {
@@ -23727,7 +23727,7 @@ const W6 = /* @__PURE__ */ tt(Z6), t1 = /* @__PURE__ */ X(W6).mul(2).sub(1), zL
23727
23727
  return t.transformDirection(s);
23728
23728
  const i = U6.mul(s);
23729
23729
  return rl.transformDirection(i);
23730
- }), K6 = /* @__PURE__ */ qe(0).onReference(({ material: s }) => s).onRenderUpdate(({ material: s }) => s.refractionRatio), Y6 = /* @__PURE__ */ Pn.negate().reflect(ls), J6 = /* @__PURE__ */ Pn.negate().refract(ls, K6), j6 = /* @__PURE__ */ Y6.transformDirection(rl).toVar("reflectVector"), q6 = /* @__PURE__ */ J6.transformDirection(rl).toVar("reflectVector");
23730
+ }), K6 = /* @__PURE__ */ $e(0).onReference(({ material: s }) => s).onRenderUpdate(({ material: s }) => s.refractionRatio), Y6 = /* @__PURE__ */ Pn.negate().reflect(ls), J6 = /* @__PURE__ */ Pn.negate().refract(ls, K6), j6 = /* @__PURE__ */ Y6.transformDirection(rl).toVar("reflectVector"), q6 = /* @__PURE__ */ J6.transformDirection(rl).toVar("reflectVector");
23731
23731
  class $6 extends ku {
23732
23732
  static get type() {
23733
23733
  return "CubeTextureNode";
@@ -23856,7 +23856,7 @@ class n1 extends Kt {
23856
23856
  }
23857
23857
  setNodeType(e) {
23858
23858
  let t = null;
23859
- this.count !== null ? t = i1(null, e, this.count) : Array.isArray(this.getValueFromReference()) ? t = Su(null, e) : e === "texture" ? t = ki(null) : e === "cubeTexture" ? t = UL(null) : t = qe(null, e), this.group !== null && t.setGroup(this.group), this.name !== null && t.label(this.name), this.node = t.getSelf();
23859
+ this.count !== null ? t = i1(null, e, this.count) : Array.isArray(this.getValueFromReference()) ? t = Su(null, e) : e === "texture" ? t = ki(null) : e === "cubeTexture" ? t = UL(null) : t = $e(null, e), this.group !== null && t.setGroup(this.group), this.name !== null && t.label(this.name), this.node = t.getSelf();
23860
23860
  }
23861
23861
  getNodeType(e) {
23862
23862
  return this.node === null && (this.updateReference(e), this.updateValue()), this.node.getNodeType(e);
@@ -24087,7 +24087,7 @@ Me.POINT_WIDTH = "pointWidth";
24087
24087
  Me.DISPERSION = "dispersion";
24088
24088
  Me.LIGHT_MAP = "light";
24089
24089
  Me.AO_MAP = "ao";
24090
- const c7 = /* @__PURE__ */ tt(Me, Me.ALPHA_TEST), Ub = /* @__PURE__ */ tt(Me, Me.COLOR), h7 = /* @__PURE__ */ tt(Me, Me.SHININESS), u7 = /* @__PURE__ */ tt(Me, Me.EMISSIVE), WL = /* @__PURE__ */ tt(Me, Me.OPACITY), d7 = /* @__PURE__ */ tt(Me, Me.SPECULAR), bF = /* @__PURE__ */ tt(Me, Me.SPECULAR_INTENSITY), p7 = /* @__PURE__ */ tt(Me, Me.SPECULAR_COLOR), hC = /* @__PURE__ */ tt(Me, Me.SPECULAR_STRENGTH), xE = /* @__PURE__ */ tt(Me, Me.REFLECTIVITY), f7 = /* @__PURE__ */ tt(Me, Me.ROUGHNESS), m7 = /* @__PURE__ */ tt(Me, Me.METALNESS), g7 = /* @__PURE__ */ tt(Me, Me.NORMAL).context({ getUV: null }), A7 = /* @__PURE__ */ tt(Me, Me.CLEARCOAT), y7 = /* @__PURE__ */ tt(Me, Me.CLEARCOAT_ROUGHNESS), b7 = /* @__PURE__ */ tt(Me, Me.CLEARCOAT_NORMAL).context({ getUV: null }), x7 = /* @__PURE__ */ tt(Me, Me.ROTATION), v7 = /* @__PURE__ */ tt(Me, Me.SHEEN), _7 = /* @__PURE__ */ tt(Me, Me.SHEEN_ROUGHNESS), C7 = /* @__PURE__ */ tt(Me, Me.ANISOTROPY), w7 = /* @__PURE__ */ tt(Me, Me.IRIDESCENCE), S7 = /* @__PURE__ */ tt(Me, Me.IRIDESCENCE_IOR), M7 = /* @__PURE__ */ tt(Me, Me.IRIDESCENCE_THICKNESS), I7 = /* @__PURE__ */ tt(Me, Me.TRANSMISSION), T7 = /* @__PURE__ */ tt(Me, Me.THICKNESS), E7 = /* @__PURE__ */ tt(Me, Me.IOR), R7 = /* @__PURE__ */ tt(Me, Me.ATTENUATION_DISTANCE), L7 = /* @__PURE__ */ tt(Me, Me.ATTENUATION_COLOR), ZR = /* @__PURE__ */ tt(Me, Me.LINE_SCALE), CU = /* @__PURE__ */ tt(Me, Me.LINE_DASH_SIZE), wU = /* @__PURE__ */ tt(Me, Me.LINE_GAP_SIZE), vE = /* @__PURE__ */ tt(Me, Me.LINE_WIDTH), xF = /* @__PURE__ */ tt(Me, Me.LINE_DASH_OFFSET), B7 = /* @__PURE__ */ tt(Me, Me.POINT_WIDTH), P7 = /* @__PURE__ */ tt(Me, Me.DISPERSION), SU = /* @__PURE__ */ tt(Me, Me.LIGHT_MAP), G7 = /* @__PURE__ */ tt(Me, Me.AO_MAP), My = /* @__PURE__ */ qe(new Q()).onReference(function(s) {
24090
+ const c7 = /* @__PURE__ */ tt(Me, Me.ALPHA_TEST), Ub = /* @__PURE__ */ tt(Me, Me.COLOR), h7 = /* @__PURE__ */ tt(Me, Me.SHININESS), u7 = /* @__PURE__ */ tt(Me, Me.EMISSIVE), WL = /* @__PURE__ */ tt(Me, Me.OPACITY), d7 = /* @__PURE__ */ tt(Me, Me.SPECULAR), bF = /* @__PURE__ */ tt(Me, Me.SPECULAR_INTENSITY), p7 = /* @__PURE__ */ tt(Me, Me.SPECULAR_COLOR), hC = /* @__PURE__ */ tt(Me, Me.SPECULAR_STRENGTH), xE = /* @__PURE__ */ tt(Me, Me.REFLECTIVITY), f7 = /* @__PURE__ */ tt(Me, Me.ROUGHNESS), m7 = /* @__PURE__ */ tt(Me, Me.METALNESS), g7 = /* @__PURE__ */ tt(Me, Me.NORMAL).context({ getUV: null }), A7 = /* @__PURE__ */ tt(Me, Me.CLEARCOAT), y7 = /* @__PURE__ */ tt(Me, Me.CLEARCOAT_ROUGHNESS), b7 = /* @__PURE__ */ tt(Me, Me.CLEARCOAT_NORMAL).context({ getUV: null }), x7 = /* @__PURE__ */ tt(Me, Me.ROTATION), v7 = /* @__PURE__ */ tt(Me, Me.SHEEN), _7 = /* @__PURE__ */ tt(Me, Me.SHEEN_ROUGHNESS), C7 = /* @__PURE__ */ tt(Me, Me.ANISOTROPY), w7 = /* @__PURE__ */ tt(Me, Me.IRIDESCENCE), S7 = /* @__PURE__ */ tt(Me, Me.IRIDESCENCE_IOR), M7 = /* @__PURE__ */ tt(Me, Me.IRIDESCENCE_THICKNESS), I7 = /* @__PURE__ */ tt(Me, Me.TRANSMISSION), T7 = /* @__PURE__ */ tt(Me, Me.THICKNESS), E7 = /* @__PURE__ */ tt(Me, Me.IOR), R7 = /* @__PURE__ */ tt(Me, Me.ATTENUATION_DISTANCE), L7 = /* @__PURE__ */ tt(Me, Me.ATTENUATION_COLOR), ZR = /* @__PURE__ */ tt(Me, Me.LINE_SCALE), CU = /* @__PURE__ */ tt(Me, Me.LINE_DASH_SIZE), wU = /* @__PURE__ */ tt(Me, Me.LINE_GAP_SIZE), vE = /* @__PURE__ */ tt(Me, Me.LINE_WIDTH), xF = /* @__PURE__ */ tt(Me, Me.LINE_DASH_OFFSET), B7 = /* @__PURE__ */ tt(Me, Me.POINT_WIDTH), P7 = /* @__PURE__ */ tt(Me, Me.DISPERSION), SU = /* @__PURE__ */ tt(Me, Me.LIGHT_MAP), G7 = /* @__PURE__ */ tt(Me, Me.AO_MAP), My = /* @__PURE__ */ $e(new Q()).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 MU extends Kt {
24238
24238
  constructor(e, t = !1) {
24239
24239
  super("void"), this.skinnedMesh = e, this.useReference = t, this.updateType = Wt.OBJECT, this.skinIndexNode = Pr("skinIndex", "uvec4"), this.skinWeightNode = Pr("skinWeight", "vec4");
24240
24240
  let i, n, r;
24241
- t ? (i = mr("bindMatrix", "mat4"), n = mr("bindMatrixInverse", "mat4"), r = AF("skeleton.boneMatrices", "mat4", e.skeleton.bones.length)) : (i = qe(e.bindMatrix, "mat4"), n = qe(e.bindMatrixInverse, "mat4"), r = i1(e.skeleton.boneMatrices, "mat4", e.skeleton.bones.length)), this.bindMatrixNode = i, this.bindMatrixInverseNode = n, this.boneMatricesNode = r, this.previousBoneMatricesNode = null;
24241
+ t ? (i = mr("bindMatrix", "mat4"), n = mr("bindMatrixInverse", "mat4"), r = AF("skeleton.boneMatrices", "mat4", e.skeleton.bones.length)) : (i = $e(e.bindMatrix, "mat4"), n = $e(e.bindMatrixInverse, "mat4"), r = i1(e.skeleton.boneMatrices, "mat4", e.skeleton.bones.length)), this.bindMatrixNode = i, this.bindMatrixInverseNode = n, this.boneMatricesNode = r, this.previousBoneMatricesNode = null;
24242
24242
  }
24243
24243
  getSkinnedPosition(e = this.boneMatricesNode, t = Ss) {
24244
24244
  const { skinIndexNode: i, skinWeightNode: n, bindMatrixNode: r, bindMatrixInverseNode: o } = this, a = e.element(i.x), l = e.element(i.y), c = e.element(i.z), h = e.element(i.w), u = r.mul(t), d = Yn(
@@ -24381,7 +24381,7 @@ class Z7 extends Kt {
24381
24381
  return "MorphNode";
24382
24382
  }
24383
24383
  constructor(e) {
24384
- super("void"), this.mesh = e, this.morphBaseInfluence = qe(1), this.updateType = Wt.OBJECT;
24384
+ super("void"), this.mesh = e, this.morphBaseInfluence = $e(1), this.updateType = Wt.OBJECT;
24385
24385
  }
24386
24386
  setup(e) {
24387
24387
  const { geometry: t } = e, i = t.morphAttributes.position !== void 0, n = t.hasAttribute("normal") && t.morphAttributes.normal !== void 0, r = t.morphAttributes.position || t.morphAttributes.normal || t.morphAttributes.color, o = r !== void 0 ? r.length : 0, { texture: a, stride: l, size: c } = age(t);
@@ -24568,7 +24568,7 @@ class Fs extends Kt {
24568
24568
  setup() {
24569
24569
  const e = this.scope;
24570
24570
  let t = null;
24571
- return e === Fs.SIZE ? t = qe(bv || (bv = new Q())) : e === Fs.VIEWPORT ? t = qe(xv || (xv = new Ye())) : t = le(Cx.div(Ob)), t;
24571
+ return e === Fs.SIZE ? t = $e(bv || (bv = new Q())) : e === Fs.VIEWPORT ? t = $e(xv || (xv = new Ye())) : t = le(Cx.div(Ob)), t;
24572
24572
  }
24573
24573
  generate(e) {
24574
24574
  if (this.scope === Fs.COORDINATE) {
@@ -25811,7 +25811,7 @@ class xq extends wi {
25811
25811
  constructor(e, t = null, i = null) {
25812
25812
  super("vec3"), this._value = e, this._pmrem = null, this.uvNode = t, this.levelNode = i, this._generator = null;
25813
25813
  const n = new ri();
25814
- n.isRenderTargetTexture = !0, this._texture = ki(n), this._width = qe(0), this._height = qe(0), this._maxMip = qe(0), this.updateBeforeType = Wt.RENDER;
25814
+ n.isRenderTargetTexture = !0, this._texture = ki(n), this._width = $e(0), this._height = $e(0), this._maxMip = $e(0), this.updateBeforeType = Wt.RENDER;
25815
25815
  }
25816
25816
  set value(e) {
25817
25817
  this._value = e, this._pmrem = null;
@@ -26897,7 +26897,7 @@ function zU(s) {
26897
26897
  return e.depthTest = !1, e.depthWrite = !1, e.blending = Nn, e.name = `PMREM_${s}`, e;
26898
26898
  }
26899
26899
  function aAe(s, e, t) {
26900
- const i = Su(new Array(vg).fill(0)), n = qe(new T(0, 1, 0)), r = qe(0), o = X(vg), a = qe(0), l = qe(1), c = ki(null), h = qe(0), u = X(1 / e), d = X(1 / t), f = X(s), m = {
26900
+ const i = Su(new Array(vg).fill(0)), n = $e(new T(0, 1, 0)), r = $e(0), o = X(vg), a = $e(0), l = $e(1), c = ki(null), h = $e(0), u = X(1 / e), d = X(1 / t), f = X(s), m = {
26901
26901
  n: o,
26902
26902
  latitudinal: a,
26903
26903
  weights: i,
@@ -28061,7 +28061,7 @@ class Wr extends wi {
28061
28061
  o.texture.name = "output", o.depthTexture = r, this.renderTarget = o, this.updateBeforeType = Wt.FRAME, this._textures = {
28062
28062
  output: o.texture,
28063
28063
  depth: r
28064
- }, this._textureNodes = {}, this._linearDepthNodes = {}, this._viewZNodes = {}, this._previousTextures = {}, this._previousTextureNodes = {}, this._cameraNear = qe(0), this._cameraFar = qe(0), this._mrt = null, this.isPassNode = !0;
28064
+ }, this._textureNodes = {}, this._linearDepthNodes = {}, this._viewZNodes = {}, this._previousTextures = {}, this._previousTextureNodes = {}, this._cameraNear = $e(0), this._cameraFar = $e(0), this._mrt = null, this.isPassNode = !0;
28065
28065
  }
28066
28066
  setMRT(e) {
28067
28067
  return this._mrt = e, this;
@@ -28145,7 +28145,7 @@ class t$ extends wi {
28145
28145
  return "GaussianBlurNode";
28146
28146
  }
28147
28147
  constructor(e, t = null, i = 2) {
28148
- super("vec4"), this.textureNode = e, this.directionNode = t, this.sigma = i, this._invSize = qe(new Q()), this._passDirection = qe(new Q()), this._horizontalRT = new br(), this._horizontalRT.texture.name = "GaussianBlurNode.horizontal", this._verticalRT = new br(), this._verticalRT.texture.name = "GaussianBlurNode.vertical", this._textureNode = wx(this, this._verticalRT.texture), this.updateBeforeType = Wt.RENDER, this.resolution = new Q(1, 1);
28148
+ super("vec4"), this.textureNode = e, this.directionNode = t, this.sigma = i, this._invSize = $e(new Q()), this._passDirection = $e(new Q()), this._horizontalRT = new br(), this._horizontalRT.texture.name = "GaussianBlurNode.horizontal", this._verticalRT = new br(), this._verticalRT.texture.name = "GaussianBlurNode.vertical", this._textureNode = wx(this, this._verticalRT.texture), this.updateBeforeType = Wt.RENDER, this.resolution = new Q(1, 1);
28149
28149
  }
28150
28150
  setSize(e, t) {
28151
28151
  e = Math.max(Math.round(e * this.resolution.x), 1), t = Math.max(Math.round(t * this.resolution.y), 1), this._invSize.value.set(1 / e, 1 / t), this._horizontalRT.setSize(e, t), this._verticalRT.setSize(e, t);
@@ -28191,7 +28191,7 @@ class i$ extends wi {
28191
28191
  return "AfterImageNode";
28192
28192
  }
28193
28193
  constructor(e, t = 0.96) {
28194
- super(e), this.textureNode = e, this.textureNodeOld = ki(), this.damp = qe(t), this._compRT = new br(), this._compRT.texture.name = "AfterImageNode.comp", this._oldRT = new br(), this._oldRT.texture.name = "AfterImageNode.old", this._textureNode = wx(this, this._compRT.texture), this.updateBeforeType = Wt.RENDER;
28194
+ super(e), this.textureNode = e, this.textureNodeOld = ki(), this.damp = $e(t), this._compRT = new br(), this._compRT.texture.name = "AfterImageNode.comp", this._oldRT = new br(), this._oldRT.texture.name = "AfterImageNode.old", this._textureNode = wx(this, this._compRT.texture), this.updateBeforeType = Wt.RENDER;
28195
28195
  }
28196
28196
  getTextureNode() {
28197
28197
  return this._textureNode;
@@ -28237,7 +28237,7 @@ class s$ extends wi {
28237
28237
  return "AnamorphicNode";
28238
28238
  }
28239
28239
  constructor(e, t, i, n) {
28240
- super("vec4"), this.textureNode = e, this.tresholdNode = t, this.scaleNode = i, this.colorNode = J(0.1, 0, 1), this.samples = n, this.resolution = new Q(1, 1), this._renderTarget = new br(), this._renderTarget.texture.name = "anamorphic", this._invSize = qe(new Q()), this._textureNode = wx(this, this._renderTarget.texture), this.updateBeforeType = Wt.RENDER;
28240
+ super("vec4"), this.textureNode = e, this.tresholdNode = t, this.scaleNode = i, this.colorNode = J(0.1, 0, 1), this.samples = n, this.resolution = new Q(1, 1), this._renderTarget = new br(), this._renderTarget.texture.name = "anamorphic", this._invSize = $e(new Q()), this._textureNode = wx(this, this._renderTarget.texture), this.updateBeforeType = Wt.RENDER;
28241
28241
  }
28242
28242
  getTextureNode() {
28243
28243
  return this._textureNode;
@@ -28273,7 +28273,7 @@ class r$ extends wi {
28273
28273
  return "SobelOperatorNode";
28274
28274
  }
28275
28275
  constructor(e) {
28276
- super(), this.textureNode = e, this.updateBeforeType = Wt.RENDER, this._invSize = qe(new Q());
28276
+ super(), this.textureNode = e, this.updateBeforeType = Wt.RENDER, this._invSize = $e(new Q());
28277
28277
  }
28278
28278
  updateBefore() {
28279
28279
  const e = this.textureNode.value;
@@ -28313,7 +28313,7 @@ class o$ extends wi {
28313
28313
  return "DepthOfFieldNode";
28314
28314
  }
28315
28315
  constructor(e, t, i, n, r) {
28316
- super(), this.textureNode = e, this.viewZNode = t, this.focusNode = i, this.apertureNode = n, this.maxblurNode = r, this._aspect = qe(0), this.updateBeforeType = Wt.RENDER;
28316
+ super(), this.textureNode = e, this.viewZNode = t, this.focusNode = i, this.apertureNode = n, this.maxblurNode = r, this._aspect = $e(0), this.updateBeforeType = Wt.RENDER;
28317
28317
  }
28318
28318
  updateBefore() {
28319
28319
  const e = this.textureNode.value;
@@ -28334,7 +28334,7 @@ class a$ extends wi {
28334
28334
  return "DotScreenNode";
28335
28335
  }
28336
28336
  constructor(e, t = new Q(0.5, 0.5), i = 1.57, n = 1) {
28337
- super("vec4"), this.inputNode = e, this.center = qe(t), this.angle = qe(i), this.scale = qe(n);
28337
+ super("vec4"), this.inputNode = e, this.center = $e(t), this.angle = $e(i), this.scale = $e(n);
28338
28338
  }
28339
28339
  setup() {
28340
28340
  const e = this.inputNode, t = ne(() => {
@@ -28353,7 +28353,7 @@ class l$ extends wi {
28353
28353
  return "RGBShiftNode";
28354
28354
  }
28355
28355
  constructor(e, t = 5e-3, i = 0) {
28356
- super("vec4"), this.textureNode = e, this.amount = qe(t), this.angle = qe(i);
28356
+ super("vec4"), this.textureNode = e, this.amount = $e(t), this.angle = $e(i);
28357
28357
  }
28358
28358
  setup() {
28359
28359
  const { textureNode: e } = this, t = e.uvNode || ui(), i = (r) => e.uv(r);
@@ -28386,7 +28386,7 @@ class h$ extends wi {
28386
28386
  return "Lut3DNode";
28387
28387
  }
28388
28388
  constructor(e, t, i, n) {
28389
- super(), this.inputNode = e, this.lutNode = t, this.size = qe(i), this.intensityNode = n;
28389
+ super(), this.inputNode = e, this.lutNode = t, this.size = $e(i), this.intensityNode = n;
28390
28390
  }
28391
28391
  setup() {
28392
28392
  const { inputNode: e, lutNode: t } = this, i = (o) => t.uv(o);
@@ -28402,7 +28402,7 @@ class u$ extends wi {
28402
28402
  return "GTAONode";
28403
28403
  }
28404
28404
  constructor(e, t, i) {
28405
- super(), this.depthNode = e, this.normalNode = t, this.radius = qe(0.25), this.resolution = qe(new Q()), this.thickness = qe(1), this.distanceExponent = qe(1), this.distanceFallOff = qe(1), this.scale = qe(1), this.noiseNode = ki(sye()), this.cameraProjectionMatrix = qe(i.projectionMatrix), this.cameraProjectionMatrixInverse = qe(i.projectionMatrixInverse), this.SAMPLES = qe(16), this._aoRenderTarget = new br(), this._aoRenderTarget.texture.name = "GTAONode.AO", this._material = null, this._textureNode = wx(this, this._aoRenderTarget.texture), this.updateBeforeType = Wt.FRAME;
28405
+ super(), this.depthNode = e, this.normalNode = t, this.radius = $e(0.25), this.resolution = $e(new Q()), this.thickness = $e(1), this.distanceExponent = $e(1), this.distanceFallOff = $e(1), this.scale = $e(1), this.noiseNode = ki(sye()), this.cameraProjectionMatrix = $e(i.projectionMatrix), this.cameraProjectionMatrixInverse = $e(i.projectionMatrixInverse), this.SAMPLES = $e(16), this._aoRenderTarget = new br(), this._aoRenderTarget.texture.name = "GTAONode.AO", this._material = null, this._textureNode = wx(this, this._aoRenderTarget.texture), this.updateBeforeType = Wt.FRAME;
28406
28406
  }
28407
28407
  getTextureNode() {
28408
28408
  return this._textureNode;
@@ -28492,7 +28492,7 @@ class d$ extends wi {
28492
28492
  return "DenoiseNode";
28493
28493
  }
28494
28494
  constructor(e, t, i, n, r) {
28495
- super(), this.textureNode = e, this.depthNode = t, this.normalNode = i, this.noiseNode = n, this.cameraProjectionMatrixInverse = qe(r.projectionMatrixInverse), this.lumaPhi = qe(5), this.depthPhi = qe(5), this.normalPhi = qe(5), this.radius = qe(5), this.index = qe(0), this._resolution = qe(new Q()), this._sampleVectors = Su(aye(16, 2, 1)), this.updateBeforeType = Wt.RENDER;
28495
+ super(), this.textureNode = e, this.depthNode = t, this.normalNode = i, this.noiseNode = n, this.cameraProjectionMatrixInverse = $e(r.projectionMatrixInverse), this.lumaPhi = $e(5), this.depthPhi = $e(5), this.normalPhi = $e(5), this.radius = $e(5), this.index = $e(0), this._resolution = $e(new Q()), this._sampleVectors = Su(aye(16, 2, 1)), this.updateBeforeType = Wt.RENDER;
28496
28496
  }
28497
28497
  updateBefore() {
28498
28498
  const e = this.textureNode.value;
@@ -28551,7 +28551,7 @@ class p$ extends wi {
28551
28551
  return "FXAANode";
28552
28552
  }
28553
28553
  constructor(e) {
28554
- super(), this.textureNode = e, this.updateBeforeType = Wt.RENDER, this._invSize = qe(new Q());
28554
+ super(), this.textureNode = e, this.updateBeforeType = Wt.RENDER, this._invSize = $e(new Q());
28555
28555
  }
28556
28556
  updateBefore() {
28557
28557
  const e = this.textureNode.value;
@@ -28631,7 +28631,7 @@ class f$ extends wi {
28631
28631
  return "BloomNode";
28632
28632
  }
28633
28633
  constructor(e, t = 1, i = 0, n = 0) {
28634
- super(), this.inputNode = e, this.strength = qe(t), this.radius = qe(i), this.threshold = qe(n), this.smoothWidth = qe(0.01), this._renderTargetsHorizontal = [], this._renderTargetsVertical = [], this._nMips = 5, this._renderTargetBright = new br(1, 1, { type: Wi }), this._renderTargetBright.texture.name = "UnrealBloomPass.bright", this._renderTargetBright.texture.generateMipmaps = !1;
28634
+ super(), this.inputNode = e, this.strength = $e(t), this.radius = $e(i), this.threshold = $e(n), this.smoothWidth = $e(0.01), this._renderTargetsHorizontal = [], this._renderTargetsVertical = [], this._nMips = 5, this._renderTargetBright = new br(1, 1, { type: Wi }), this._renderTargetBright.texture.name = "UnrealBloomPass.bright", this._renderTargetBright.texture.generateMipmaps = !1;
28635
28635
  for (let r = 0; r < this._nMips; r++) {
28636
28636
  const o = new br(1, 1, { type: Wi });
28637
28637
  o.texture.name = "UnrealBloomPass.h" + r, o.texture.generateMipmaps = !1, this._renderTargetsHorizontal.push(o);
@@ -28697,7 +28697,7 @@ class f$ extends wi {
28697
28697
  const i = [];
28698
28698
  for (let d = 0; d < t; d++)
28699
28699
  i.push(0.39894 * Math.exp(-0.5 * d * d / (t * t)) / t);
28700
- const n = ki(), r = Su(i), o = qe(new Q()), a = qe(new Q(0.5, 0.5)), l = ui(), c = (d) => n.uv(d), h = ne(() => {
28700
+ const n = ki(), r = Su(i), o = $e(new Q()), a = $e(new Q(0.5, 0.5)), l = ui(), c = (d) => n.uv(d), h = ne(() => {
28701
28701
  const d = r.element(0).toVar(), f = c(l).rgb.mul(d).toVar();
28702
28702
  return Bi({ start: K(1), end: K(t), type: "int", condition: "<" }, ({ i: m }) => {
28703
28703
  const g = X(m), A = r.element(m), y = a.mul(o).mul(g), b = c(l.add(y)).rgb, x = c(l.sub(y)).rgb;
@@ -28737,7 +28737,7 @@ class Aye extends wi {
28737
28737
  return "PixelationNode";
28738
28738
  }
28739
28739
  constructor(e, t, i, n, r, o) {
28740
- super(), this.textureNode = e, this.depthNode = t, this.normalNode = i, this.pixelSize = n, this.normalEdgeStrength = r, this.depthEdgeStrength = o, this._resolution = qe(new Ye()), this.updateBeforeType = Wt.RENDER;
28740
+ super(), this.textureNode = e, this.depthNode = t, this.normalNode = i, this.pixelSize = n, this.normalEdgeStrength = r, this.depthEdgeStrength = o, this._resolution = $e(new Ye()), this.updateBeforeType = Wt.RENDER;
28741
28741
  }
28742
28742
  updateBefore() {
28743
28743
  const e = this.textureNode.value, t = e.image.width, i = e.image.height;
@@ -28798,7 +28798,7 @@ class A$ extends Wr {
28798
28798
  return "SSAAPassNode";
28799
28799
  }
28800
28800
  constructor(e, t) {
28801
- super(Wr.COLOR, e, t), this.isSSAAPassNode = !0, this.sampleLevel = 4, this.unbiased = !0, this.clearColor = new ge(0), this.clearAlpha = 0, this._currentClearColor = new ge(), this.sampleWeight = qe(1), this.sampleRenderTarget = null, this._quadMesh = new zu();
28801
+ super(Wr.COLOR, e, t), this.isSSAAPassNode = !0, this.sampleLevel = 4, this.unbiased = !0, this.clearColor = new ge(0), this.clearAlpha = 0, this._currentClearColor = new ge(), this.sampleWeight = $e(1), this.sampleRenderTarget = null, this._quadMesh = new zu();
28802
28802
  }
28803
28803
  updateBefore(e) {
28804
28804
  const { renderer: t } = e, { scene: i, camera: n } = this;
@@ -28991,7 +28991,7 @@ class x$ extends b$ {
28991
28991
  return "AnaglyphPassNode";
28992
28992
  }
28993
28993
  constructor(e, t) {
28994
- super(e, t), this.isAnaglyphPassNode = !0, this._colorMatrixLeft = qe(new ei().fromArray([
28994
+ super(e, t), this.isAnaglyphPassNode = !0, this._colorMatrixLeft = $e(new ei().fromArray([
28995
28995
  0.4561,
28996
28996
  -0.0400822,
28997
28997
  -0.0152161,
@@ -29001,7 +29001,7 @@ class x$ extends b$ {
29001
29001
  0.176381,
29002
29002
  -0.0157589,
29003
29003
  -546856e-8
29004
- ])), this._colorMatrixRight = qe(new ei().fromArray([
29004
+ ])), this._colorMatrixRight = $e(new ei().fromArray([
29005
29005
  -0.0434706,
29006
29006
  0.378476,
29007
29007
  -0.0721527,
@@ -29452,7 +29452,7 @@ class dm extends O0 {
29452
29452
  return "AnalyticLightNode";
29453
29453
  }
29454
29454
  constructor(e = null) {
29455
- super(), this.updateType = Wt.FRAME, this.light = e, this.color = new ge(), this.colorNode = qe(this.color).setGroup(zi), 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 = Wt.FRAME, this.light = e, this.color = new ge(), this.colorNode = $e(this.color).setGroup(zi), 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 BX(super.getCacheKey(), this.light.id, this.light.castShadow ? 1 : 0);
@@ -29477,7 +29477,7 @@ class dm extends O0 {
29477
29477
  M.fragmentNode = Vye({ samples: _, radius: C, size: S, shadowPass: x }).context(e.getSharedContext()), M.name = "VSMVertical", M = this.vsmMaterialHorizontal || (this.vsmMaterialHorizontal = new Hi()), M.fragmentNode = zye({ samples: _, radius: C, size: S, shadowPass: v }).context(e.getSharedContext()), M.name = "VSMHorizontal";
29478
29478
  }
29479
29479
  const c = mr("intensity", "float", o).setGroup(zi), h = mr("bias", "float", o).setGroup(zi), u = mr("normalBias", "float", o).setGroup(zi), d = t.material.shadowPositionNode || OR;
29480
- let f = qe(o.matrix).setGroup(zi).mul(d.add(XL.mul(u)));
29480
+ let f = $e(o.matrix).setGroup(zi).mul(d.add(XL.mul(u)));
29481
29481
  f = f.xyz.div(f.w);
29482
29482
  let m = f.z.add(h);
29483
29483
  i.coordinateSystem === y0 && (m = m.mul(2).sub(1)), f = J(
@@ -29538,15 +29538,15 @@ function QU(s) {
29538
29538
  }
29539
29539
  function KU(s) {
29540
29540
  const e = QU(s);
29541
- return e.position || (e.position = qe(new T()).setGroup(zi).onRenderUpdate((t, i) => i.value.setFromMatrixPosition(s.matrixWorld)));
29541
+ return e.position || (e.position = $e(new T()).setGroup(zi).onRenderUpdate((t, i) => i.value.setFromMatrixPosition(s.matrixWorld)));
29542
29542
  }
29543
29543
  function E$(s) {
29544
29544
  const e = QU(s);
29545
- return e.targetPosition || (e.targetPosition = qe(new T()).setGroup(zi).onRenderUpdate((t, i) => i.value.setFromMatrixPosition(s.target.matrixWorld)));
29545
+ return e.targetPosition || (e.targetPosition = $e(new T()).setGroup(zi).onRenderUpdate((t, i) => i.value.setFromMatrixPosition(s.target.matrixWorld)));
29546
29546
  }
29547
29547
  function $L(s) {
29548
29548
  const e = QU(s);
29549
- return e.viewPosition || (e.viewPosition = qe(new T()).setGroup(zi).onRenderUpdate(({ camera: t }, i) => {
29549
+ return e.viewPosition || (e.viewPosition = $e(new T()).setGroup(zi).onRenderUpdate(({ camera: t }, i) => {
29550
29550
  i.value = i.value || new T(), i.value.setFromMatrixPosition(s.matrixWorld), i.value.applyMatrix4(t.matrixWorldInverse);
29551
29551
  }));
29552
29552
  }
@@ -29598,7 +29598,7 @@ class jye extends wi {
29598
29598
  return "VelocityNode";
29599
29599
  }
29600
29600
  constructor() {
29601
- super("vec2"), this.updateType = Wt.OBJECT, this.updateAfterType = Wt.OBJECT, this.previousModelWorldMatrix = qe(new ce()), this.previousProjectionMatrix = qe(new ce()).setGroup(zi), this.previousCameraViewMatrix = qe(new ce());
29601
+ super("vec2"), this.updateType = Wt.OBJECT, this.updateAfterType = Wt.OBJECT, this.previousModelWorldMatrix = $e(new ce()), this.previousProjectionMatrix = $e(new ce()).setGroup(zi), this.previousCameraViewMatrix = $e(new ce());
29602
29602
  }
29603
29603
  update({ frameId: e, camera: t, object: i }) {
29604
29604
  const n = cH(i);
@@ -30602,7 +30602,7 @@ class j$ extends dm {
30602
30602
  return "PointLightNode";
30603
30603
  }
30604
30604
  constructor(e = null) {
30605
- super(e), this.cutoffDistanceNode = qe(0).setGroup(zi), this.decayExponentNode = qe(0).setGroup(zi);
30605
+ super(e), this.cutoffDistanceNode = $e(0).setGroup(zi), this.decayExponentNode = $e(0).setGroup(zi);
30606
30606
  }
30607
30607
  update(e) {
30608
30608
  const { light: t } = this;
@@ -30645,7 +30645,7 @@ class $$ extends dm {
30645
30645
  return "RectAreaLightNode";
30646
30646
  }
30647
30647
  constructor(e = null) {
30648
- super(e), this.halfHeight = qe(new T()).setGroup(zi), this.halfWidth = qe(new T()).setGroup(zi);
30648
+ super(e), this.halfHeight = $e(new T()).setGroup(zi), this.halfWidth = $e(new T()).setGroup(zi);
30649
30649
  }
30650
30650
  update(e) {
30651
30651
  super.update(e);
@@ -30676,7 +30676,7 @@ class $U extends dm {
30676
30676
  return "SpotLightNode";
30677
30677
  }
30678
30678
  constructor(e = null) {
30679
- super(e), this.coneCosNode = qe(0).setGroup(zi), this.penumbraCosNode = qe(0).setGroup(zi), this.cutoffDistanceNode = qe(0).setGroup(zi), this.decayExponentNode = qe(0).setGroup(zi);
30679
+ super(e), this.coneCosNode = $e(0).setGroup(zi), this.penumbraCosNode = $e(0).setGroup(zi), this.cutoffDistanceNode = $e(0).setGroup(zi), this.decayExponentNode = $e(0).setGroup(zi);
30680
30680
  }
30681
30681
  update(e) {
30682
30682
  super.update(e);
@@ -30732,7 +30732,7 @@ class iee extends dm {
30732
30732
  return "HemisphereLightNode";
30733
30733
  }
30734
30734
  constructor(e = null) {
30735
- super(e), this.lightPositionNode = KU(e), this.lightDirectionNode = this.lightPositionNode.normalize(), this.groundColorNode = qe(new ge()).setGroup(zi);
30735
+ super(e), this.lightPositionNode = KU(e), this.lightDirectionNode = this.lightPositionNode.normalize(), this.groundColorNode = $e(new ge()).setGroup(zi);
30736
30736
  }
30737
30737
  update(e) {
30738
30738
  const { light: t } = this;
@@ -31982,7 +31982,7 @@ const qxe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
31982
31982
  trunc: rU,
31983
31983
  tslFn: fme,
31984
31984
  uint: pt,
31985
- uniform: qe,
31985
+ uniform: $e,
31986
31986
  uniformArray: Su,
31987
31987
  uniformGroup: m8,
31988
31988
  uniforms: Zme,
@@ -39478,7 +39478,7 @@ function dte(s, e, t, i) {
39478
39478
  let gI = !1;
39479
39479
  uve((...s) => {
39480
39480
  var e;
39481
- $e() && ((e = ji.Current) != null && e.isInXR) && (gb(!0), pte("error", ...s));
39481
+ Je() && ((e = ji.Current) != null && e.isInXR) && (gb(!0), pte("error", ...s));
39482
39482
  });
39483
39483
  function gb(s) {
39484
39484
  if (s) {
@@ -39756,7 +39756,7 @@ function hB(s) {
39756
39756
  hs(s, Mc.Error);
39757
39757
  }
39758
39758
  let DF, QG;
39759
- function $e() {
39759
+ function Je() {
39760
39760
  if (gSe)
39761
39761
  return !1;
39762
39762
  if (DF !== void 0)
@@ -39778,7 +39778,7 @@ if (!ASe && (E_ || nl())) {
39778
39778
  e.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: ` + e.toString());
39780
39780
  }
39781
- const s = Ft.isMobileDevice() || Ft.isQuest() && $e();
39781
+ const s = Ft.isMobileDevice() || Ft.isQuest() && Je();
39782
39782
  if ((s || E_) && (fve(), gte(), Ate(!0), s)) {
39783
39783
  const e = document.querySelector("needle-engine");
39784
39784
  e == null || e.addEventListener("enter-ar", () => {
@@ -39951,15 +39951,15 @@ function SSe() {
39951
39951
  return s || null;
39952
39952
  }
39953
39953
  const yte = ee("debugdefines");
39954
- pm('if(!globalThis[""4.1.0-alpha.8""]) globalThis[""4.1.0-alpha.8""] = "0.0.0";');
39954
+ pm('if(!globalThis[""4.1.0-alpha.9""]) globalThis[""4.1.0-alpha.9""] = "0.0.0";');
39955
39955
  pm('if(!globalThis[""undefined""]) globalThis[""undefined""] = "unknown";');
39956
- pm('if(!globalThis[""Tue Jan 14 2025 14:14:08 GMT+0100 (Central European Standard Time)""]) globalThis[""Tue Jan 14 2025 14:14:08 GMT+0100 (Central European Standard Time)""] = "unknown";');
39956
+ pm('if(!globalThis[""Wed Jan 15 2025 09:56:43 GMT+0100 (Central European Standard Time)""]) globalThis[""Wed Jan 15 2025 09:56:43 GMT+0100 (Central European Standard Time)""] = "unknown";');
39957
39957
  pm('if(!globalThis[""npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9""]) globalThis[""npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9""] = "unknown";');
39958
- pm('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.1.0-alpha.8";');
39958
+ pm('globalThis["__NEEDLE_ENGINE_VERSION__"] = "4.1.0-alpha.9";');
39959
39959
  pm('globalThis["__NEEDLE_ENGINE_GENERATOR__"] = "undefined";');
39960
- pm('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Tue Jan 14 2025 14:14:08 GMT+0100 (Central European Standard Time)";');
39960
+ pm('globalThis["__NEEDLE_PROJECT_BUILD_TIME__"] = "Wed Jan 15 2025 09:56:43 GMT+0100 (Central European Standard Time)";');
39961
39961
  pm('globalThis["__NEEDLE_PUBLIC_KEY__"] = "npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9";');
39962
- const Iu = "4.1.0-alpha.8", E3 = "undefined", bte = "Tue Jan 14 2025 14:14:08 GMT+0100 (Central European Standard Time)";
39962
+ const Iu = "4.1.0-alpha.9", E3 = "undefined", bte = "Wed Jan 15 2025 09:56:43 GMT+0100 (Central European Standard Time)";
39963
39963
  yte && console.log(`Engine version: ${Iu} (generator: ${E3})
39964
39964
  Project built at ${bte}`);
39965
39965
  const EE = "npk_74222a9fbd1b42572cdd3bf7f639eeb17a07d07f40a6185fac5f722e8fd34df9", Lf = "needle_isActiveInHierarchy", Ty = "builtin_components", RE = "needle_editor_guid";
@@ -65910,7 +65910,7 @@ class ZRe {
65910
65910
  console.debug(`⊡ Connecting to networking backend on
65911
65911
  ` + Fa);
65912
65912
  const r = await Promise.resolve().then(() => LOe), o = ((c = r.default) == null ? void 0 : c.WebsocketBuilder) ?? r.WebsocketBuilder, a = ((h = r.default) == null ? void 0 : h.ExponentialBackoff) ?? r.ExponentialBackoff, l = new o(Fa).withMaxRetries(10).withBackoff(new a(2e3, 4)).onOpen(() => {
65913
- this._connectingToWebsocketPromise = null, this._ws = l, this.connected = !0, $e() || yl ? console.log(`⊞ Connected to networking backend
65913
+ this._connectingToWebsocketPromise = null, this._ws = l, this.connected = !0, Je() || yl ? console.log(`⊞ Connected to networking backend
65914
65914
  ` + Fa) : console.debug("⊞ Connected to networking backend", Fa), n(!0), this.onSendQueued(eu.OnConnection);
65915
65915
  }).onClose((u) => {
65916
65916
  this._connectingToWebsocketPromise = null, this.connected = !1, this._isInRoom = !1, n(!1);
@@ -65941,7 +65941,7 @@ class ZRe {
65941
65941
  this.handleIncomingStringMessage(n);
65942
65942
  return;
65943
65943
  } catch (n) {
65944
- yl && i === "pong" ? console.log("<<", i) : $e() && console.error("Failed to parse message", n);
65944
+ yl && i === "pong" ? console.log("<<", i) : Je() && console.error("Failed to parse message", n);
65945
65945
  }
65946
65946
  }
65947
65947
  async handleIncomingBinaryMessage(e) {
@@ -65974,7 +65974,7 @@ class ZRe {
65974
65974
  if (yl && console.log(e), e) {
65975
65975
  this._isInRoom = !0;
65976
65976
  const l = e;
65977
- this._currentRoomName = l.room, this._currentRoomViewId = l.viewId, this._currentRoomAllowEditing = l.allowEditing ?? !0, this._currentInRoom.length = 0, this._currentInRoom.push(...l.inRoom), (Ok || $e()) && console.debug("Joined Needle Engine Room: " + l.room);
65977
+ this._currentRoomName = l.room, this._currentRoomViewId = l.viewId, this._currentRoomAllowEditing = l.allowEditing ?? !0, this._currentInRoom.length = 0, this._currentInRoom.push(...l.inRoom), (Ok || Je()) && console.debug("Joined Needle Engine Room: " + l.room);
65978
65978
  const c = new URL(window.location.href);
65979
65979
  c.searchParams.has("room") && c.searchParams.delete("room"), c.searchParams.set("view", this._currentRoomViewId), console.debug(`Room view id: ${this._currentRoomViewId}
65980
65980
  ${c.href}`);
@@ -68337,7 +68337,7 @@ function F2e() {
68337
68337
  }, 100);
68338
68338
  });
68339
68339
  }
68340
- Ft.isDesktop() && $e() && window.addEventListener("keydown", (s) => {
68340
+ Ft.isDesktop() && Je() && window.addEventListener("keydown", (s) => {
68341
68341
  (s.key === "x" || s.key === "Escape") && Ut.active && Ut.stop();
68342
68342
  });
68343
68343
  const Bd = class {
@@ -68724,10 +68724,10 @@ const Bd = class {
68724
68724
  return Nw.exportAndOpen(), null;
68725
68725
  } else
68726
68726
  e == "ar" && (e = "immersive-ar");
68727
- if ($e() && ee("debugxrpreroom"))
68727
+ if (Je() && ee("debugxrpreroom"))
68728
68728
  return console.warn("Debug: Starting temporary XR session"), await vf.start(e, t || Bd.getDefaultSessionInit(e)), null;
68729
68729
  if (this._currentSessionRequest)
68730
- return console.warn("A XRSession is already being requested"), (Ir || $e()) && Cn("A XRSession is already being requested"), this._currentSessionRequest.then(() => this._activeSession);
68730
+ return console.warn("A XRSession is already being requested"), (Ir || Je()) && Cn("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 (i || (i = Qt.Current), i || (i = ji.All[0]), !i)
@@ -68853,7 +68853,7 @@ const Bd = 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((e) => e.inputSource.targetRayMode === "tracked-pointer") || $e() && Ft.isDesktop() && this.mode === "immersive-ar");
68856
+ return !!(this.environmentBlendMode !== "opaque" && this.interactionMode === "world-space" || this.mode === "immersive-ar" && this.environmentBlendMode !== "opaque" && this.controllers.some((e) => e.inputSource.targetRayMode === "tracked-pointer") || Je() && Ft.isDesktop() && this.mode === "immersive-ar");
68857
68857
  }
68858
68858
  get isAR() {
68859
68859
  return this.mode === "immersive-ar";
@@ -69738,7 +69738,7 @@ var c2;
69738
69738
  t || (t = !0, Promise.resolve().then(() => dZe).then((y) => {
69739
69739
  i = y.acceleratedRaycast, n = y.MeshBVH, r = y.StaticGeometryGenerator, o = y.computeBoundsTree;
69740
69740
  }).catch((y) => {
69741
- (Cl || $e()) && console.error("Failed to load BVH library...", y.message);
69741
+ (Cl || Je()) && console.error("Failed to load BVH library...", y.message);
69742
69742
  }));
69743
69743
  }
69744
69744
  const l = new ce();
@@ -69748,7 +69748,7 @@ var c2;
69748
69748
  c = !0, h = !0, Promise.resolve().then(() => gZe).then((y) => {
69749
69749
  u = y.GenerateMeshBVHWorker;
69750
69750
  }).catch((y) => {
69751
- (Cl || $e()) && console.warn("Failed to setup mesh bvh worker");
69751
+ (Cl || Je()) && console.warn("Failed to setup mesh bvh worker");
69752
69752
  }).finally(() => {
69753
69753
  h = !1;
69754
69754
  });
@@ -70020,7 +70020,7 @@ function u2(s) {
70020
70020
  try {
70021
70021
  const t = Jn[e];
70022
70022
  if (t.isComponent !== !0) {
70023
- ($e() || xV) && console.error(`Registered script is not a Needle Engine component.
70023
+ (Je() || xV) && 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
  `, t), Jn.splice(e, 1), e--;
70026
70026
  continue;
@@ -70116,7 +70116,7 @@ function DE(s) {
70116
70116
  return;
70117
70117
  }
70118
70118
  const e = v1(s);
70119
- kne(s, e, !0) || (xV || $e() ? console.error(`Error updating hierarchy
70119
+ kne(s, e, !0) || (xV || Je() ? 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 kne(s, e, t, i = 0) {
@@ -70336,7 +70336,7 @@ function CB(s, e, t = !0, i) {
70336
70336
  return;
70337
70337
  }
70338
70338
  if (!e.isConnected) {
70339
- $e() && console.debug("Can not send destroy: not connected", s.guid);
70339
+ Je() && console.debug("Can not send destroy: not connected", s.guid);
70340
70340
  return;
70341
70341
  }
70342
70342
  let r = s.guid;
@@ -70402,7 +70402,7 @@ function Fne(s, e, t, i) {
70402
70402
  if (h.guid) {
70403
70403
  d2 && console.log("[Local] new instance", "gameobject:", o == null ? void 0 : o.guid);
70404
70404
  const u = new gLe(n.guid, h.guid);
70405
- u.seed = a, e.deleteOnDisconnect === !0 && (u.deleteStateOnDisconnect = !0), r && (r.position && (u.position = { x: r.position.x, y: r.position.y, z: r.position.z }), r.rotation && (u.rotation = { x: r.rotation.x, y: r.rotation.y, z: r.rotation.z, w: r.rotation.w }), r.scale && (u.scale = { x: r.scale.x, y: r.scale.y, z: r.scale.z })), u.position || (u.position = { x: h.position.x, y: h.position.y, z: h.position.z }), u.rotation || (u.rotation = { x: h.quaternion.x, y: h.quaternion.y, z: h.quaternion.z, w: h.quaternion.w }), u.scale || (u.scale = { x: h.scale.x, y: h.scale.y, z: h.scale.z }), u.visible = n.visible, r != null && r.parent && (typeof r.parent == "string" ? u.parent = r.parent : u.parent = r.parent.guid), u.hostData = t, i === !1 && (u.dontSave = !0), !((l = e == null ? void 0 : e.context) == null ? void 0 : l.connection) && $e() && console.debug("Object will be instantiated but it will not be synced: not connected", n.guid), e.context.connection.isInRoom && Py.push(new WeakRef(h)), (c = e == null ? void 0 : e.context) == null || c.connection.send("new-instance-created", u);
70405
+ u.seed = a, e.deleteOnDisconnect === !0 && (u.deleteStateOnDisconnect = !0), r && (r.position && (u.position = { x: r.position.x, y: r.position.y, z: r.position.z }), r.rotation && (u.rotation = { x: r.rotation.x, y: r.rotation.y, z: r.rotation.z, w: r.rotation.w }), r.scale && (u.scale = { x: r.scale.x, y: r.scale.y, z: r.scale.z })), u.position || (u.position = { x: h.position.x, y: h.position.y, z: h.position.z }), u.rotation || (u.rotation = { x: h.quaternion.x, y: h.quaternion.y, z: h.quaternion.z, w: h.quaternion.w }), u.scale || (u.scale = { x: h.scale.x, y: h.scale.y, z: h.scale.z }), u.visible = n.visible, r != null && r.parent && (typeof r.parent == "string" ? u.parent = r.parent : u.parent = r.parent.guid), u.hostData = t, i === !1 && (u.dontSave = !0), !((l = e == null ? void 0 : e.context) == null ? void 0 : l.connection) && Je() && console.debug("Object will be instantiated but it will not be synced: not connected", n.guid), e.context.connection.isInRoom && Py.push(new WeakRef(h)), (c = e == null ? void 0 : e.context) == null || c.connection.send("new-instance-created", u);
70406
70406
  } else
70407
70407
  console.warn("Missing guid, can not send new instance event", h);
70408
70408
  }
@@ -72843,7 +72843,7 @@ const eb = [];
72843
72843
  function j0() {
72844
72844
  if (m2)
72845
72845
  return;
72846
- $e() && console.debug("User interaction registered: audio can now be played"), m2 = !0;
72846
+ Je() && console.debug("User interaction registered: audio can now be played"), m2 = !0;
72847
72847
  const s = [...eb];
72848
72848
  eb.length = 0, s.forEach((e) => e());
72849
72849
  }
@@ -73642,17 +73642,17 @@ class Xw extends vX {
73642
73642
  ve <<= 1;
73643
73643
  for (ve >>= 1, pe = ve, ve >>= 1; ve >= 1; ) {
73644
73644
  Ze = 0;
73645
- const Ke = Ze + j * (q - pe), je = j * ve, wt = j * pe, He = V * ve, De = V * pe;
73645
+ const Ke = Ze + j * (q - pe), qe = j * ve, wt = j * pe, He = V * ve, De = V * pe;
73646
73646
  let Nt, Dt, Fi, Ws;
73647
73647
  for (; Ze <= Ke; Ze += wt) {
73648
73648
  let vi = Ze;
73649
73649
  const Si = Ze + V * (N - pe);
73650
73650
  for (; vi <= Si; vi += De) {
73651
- const Ai = vi + He, Ls = vi + je, As = Ls + He;
73651
+ const Ai = vi + He, Ls = vi + qe, As = Ls + He;
73652
73652
  Ce ? (Le(R[vi + G], R[Ls + G]), Nt = Se.a, Fi = Se.b, Le(R[Ai + G], R[As + G]), Dt = Se.a, Ws = Se.b, Le(Nt, Dt), R[vi + G] = Se.a, R[Ai + G] = Se.b, Le(Fi, Ws), R[Ls + G] = Se.a, R[As + G] = Se.b) : (st(R[vi + G], R[Ls + G]), Nt = Se.a, Fi = Se.b, st(R[Ai + G], R[As + G]), Dt = Se.a, Ws = Se.b, st(Nt, Dt), R[vi + G] = Se.a, R[Ai + G] = Se.b, st(Fi, Ws), R[Ls + G] = Se.a, R[As + G] = Se.b);
73653
73653
  }
73654
73654
  if (N & ve) {
73655
- const Ai = vi + je;
73655
+ const Ai = vi + qe;
73656
73656
  Ce ? Le(R[vi + G], R[Ai + G]) : st(R[vi + G], R[Ai + G]), Nt = Se.a, R[Ai + G] = Se.b, R[vi + G] = Nt;
73657
73657
  }
73658
73658
  }
@@ -73693,8 +73693,8 @@ class Xw extends vX {
73693
73693
  throw new Error("hufDecode issues");
73694
73694
  }
73695
73695
  }
73696
- const je = 8 - q & 7;
73697
- for (ve >>= je, pe -= je; pe > 0; ) {
73696
+ const qe = 8 - q & 7;
73697
+ for (ve >>= qe, pe -= qe; pe > 0; ) {
73698
73698
  const wt = G[ve << 14 - pe & 16383];
73699
73699
  if (wt.len)
73700
73700
  pe -= wt.len, Oe(wt.lit, j, ve, pe, N, V, Ce, xe, Ze), ve = Pe.c, pe = Pe.lc;
@@ -73711,8 +73711,8 @@ class Xw extends vX {
73711
73711
  throw new Error("Something wrong with HUF_ENCSIZE");
73712
73712
  const Ze = new Array(65537), Ke = new Array(16384);
73713
73713
  E(Ke);
73714
- const je = V - (N.value - Ce);
73715
- if (F(R, N, je, xe, ve, Ze), pe > 8 * (V - (N.value - Ce)))
73714
+ const qe = V - (N.value - Ce);
73715
+ if (F(R, N, qe, xe, ve, Ze), pe > 8 * (V - (N.value - Ce)))
73716
73716
  throw new Error("Something wrong with hufUncompress");
73717
73717
  se(Ze, xe, ve, Ke), Ct(Ze, Ke, R, N, pe, ve, j, q, de);
73718
73718
  }
@@ -73732,7 +73732,7 @@ class Xw extends vX {
73732
73732
  for (; !(q > j || (G[q++] = R[N++], q > j)); )
73733
73733
  G[q++] = R[V++];
73734
73734
  }
73735
- function Je(R) {
73735
+ function je(R) {
73736
73736
  let G = R.byteLength;
73737
73737
  const N = new Array();
73738
73738
  let V = 0;
@@ -73756,7 +73756,7 @@ class Xw extends vX {
73756
73756
  }
73757
73757
  function We(R, G, N, V, q, j) {
73758
73758
  let de = new DataView(j.buffer);
73759
- const Ce = N[R.idx[0]].width, xe = N[R.idx[0]].height, ve = 3, pe = Math.floor(Ce / 8), Ze = Math.ceil(Ce / 8), Ke = Math.ceil(xe / 8), je = Ce - (Ze - 1) * 8, wt = xe - (Ke - 1) * 8, He = { value: 0 }, De = new Array(ve), Nt = new Array(ve), Dt = new Array(ve), Fi = new Array(ve), Ws = new Array(ve);
73759
+ const Ce = N[R.idx[0]].width, xe = N[R.idx[0]].height, ve = 3, pe = Math.floor(Ce / 8), Ze = Math.ceil(Ce / 8), Ke = Math.ceil(xe / 8), qe = Ce - (Ze - 1) * 8, wt = xe - (Ke - 1) * 8, He = { value: 0 }, De = new Array(ve), Nt = new Array(ve), Dt = new Array(ve), Fi = new Array(ve), Ws = new Array(ve);
73760
73760
  for (let Si = 0; Si < ve; ++Si)
73761
73761
  Ws[Si] = G[R.idx[Si]], De[Si] = Si < 1 ? 0 : De[Si - 1] + Ze * Ke, Nt[Si] = new Float32Array(64), Dt[Si] = new Uint16Array(64), Fi[Si] = new Uint16Array(Ze * 64);
73762
73762
  for (let Si = 0; Si < Ke; ++Si) {
@@ -73764,7 +73764,7 @@ class Xw extends vX {
73764
73764
  Si == Ke - 1 && (Ai = wt);
73765
73765
  let Ls = 8;
73766
73766
  for (let mi = 0; mi < Ze; ++mi) {
73767
- mi == Ze - 1 && (Ls = je);
73767
+ mi == Ze - 1 && (Ls = qe);
73768
73768
  for (let an = 0; an < ve; ++an)
73769
73769
  Dt[an].fill(0), Dt[an][0] = q[De[an]++], nt(He, V, Dt[an]), Tt(Dt[an], Nt[an]), mt(Nt[an]);
73770
73770
  O(Nt);
@@ -73815,8 +73815,8 @@ class Xw extends vX {
73815
73815
  function mt(R) {
73816
73816
  const G = 0.5 * Math.cos(0.7853975), N = 0.5 * Math.cos(3.14159 / 16), V = 0.5 * Math.cos(3.14159 / 8), q = 0.5 * Math.cos(3 * 3.14159 / 16), j = 0.5 * Math.cos(5 * 3.14159 / 16), de = 0.5 * Math.cos(3 * 3.14159 / 8), Ce = 0.5 * Math.cos(7 * 3.14159 / 16), xe = new Array(4), ve = new Array(4), pe = new Array(4), Ze = new Array(4);
73817
73817
  for (let Ke = 0; Ke < 8; ++Ke) {
73818
- const je = Ke * 8;
73819
- xe[0] = V * R[je + 2], xe[1] = de * R[je + 2], xe[2] = V * R[je + 6], xe[3] = de * R[je + 6], ve[0] = N * R[je + 1] + q * R[je + 3] + j * R[je + 5] + Ce * R[je + 7], ve[1] = q * R[je + 1] - Ce * R[je + 3] - N * R[je + 5] - j * R[je + 7], ve[2] = j * R[je + 1] - N * R[je + 3] + Ce * R[je + 5] + q * R[je + 7], ve[3] = Ce * R[je + 1] - j * R[je + 3] + q * R[je + 5] - N * R[je + 7], pe[0] = G * (R[je + 0] + R[je + 4]), pe[3] = G * (R[je + 0] - R[je + 4]), pe[1] = xe[0] + xe[3], pe[2] = xe[1] - xe[2], Ze[0] = pe[0] + pe[1], Ze[1] = pe[3] + pe[2], Ze[2] = pe[3] - pe[2], Ze[3] = pe[0] - pe[1], R[je + 0] = Ze[0] + ve[0], R[je + 1] = Ze[1] + ve[1], R[je + 2] = Ze[2] + ve[2], R[je + 3] = Ze[3] + ve[3], R[je + 4] = Ze[3] - ve[3], R[je + 5] = Ze[2] - ve[2], R[je + 6] = Ze[1] - ve[1], R[je + 7] = Ze[0] - ve[0];
73818
+ const qe = Ke * 8;
73819
+ xe[0] = V * R[qe + 2], xe[1] = de * R[qe + 2], xe[2] = V * R[qe + 6], xe[3] = de * R[qe + 6], ve[0] = N * R[qe + 1] + q * R[qe + 3] + j * R[qe + 5] + Ce * R[qe + 7], ve[1] = q * R[qe + 1] - Ce * R[qe + 3] - N * R[qe + 5] - j * R[qe + 7], ve[2] = j * R[qe + 1] - N * R[qe + 3] + Ce * R[qe + 5] + q * R[qe + 7], ve[3] = Ce * R[qe + 1] - j * R[qe + 3] + q * R[qe + 5] - N * R[qe + 7], pe[0] = G * (R[qe + 0] + R[qe + 4]), pe[3] = G * (R[qe + 0] - R[qe + 4]), pe[1] = xe[0] + xe[3], pe[2] = xe[1] - xe[2], Ze[0] = pe[0] + pe[1], Ze[1] = pe[3] + pe[2], Ze[2] = pe[3] - pe[2], Ze[3] = pe[0] - pe[1], R[qe + 0] = Ze[0] + ve[0], R[qe + 1] = Ze[1] + ve[1], R[qe + 2] = Ze[2] + ve[2], R[qe + 3] = Ze[3] + ve[3], R[qe + 4] = Ze[3] - ve[3], R[qe + 5] = Ze[2] - ve[2], R[qe + 6] = Ze[1] - ve[1], R[qe + 7] = Ze[0] - ve[0];
73820
73820
  }
73821
73821
  for (let Ke = 0; Ke < 8; ++Ke)
73822
73822
  xe[0] = V * R[16 + Ke], xe[1] = de * R[16 + Ke], xe[2] = V * R[48 + Ke], xe[3] = de * R[48 + Ke], ve[0] = N * R[8 + Ke] + q * R[24 + Ke] + j * R[40 + Ke] + Ce * R[56 + Ke], ve[1] = q * R[8 + Ke] - Ce * R[24 + Ke] - N * R[40 + Ke] - j * R[56 + Ke], ve[2] = j * R[8 + Ke] - N * R[24 + Ke] + Ce * R[40 + Ke] + q * R[56 + Ke], ve[3] = Ce * R[8 + Ke] - j * R[24 + Ke] + q * R[40 + Ke] - N * R[56 + Ke], pe[0] = G * (R[Ke] + R[32 + Ke]), pe[3] = G * (R[Ke] - R[32 + Ke]), pe[1] = xe[0] + xe[3], pe[2] = xe[1] - xe[2], Ze[0] = pe[0] + pe[1], Ze[1] = pe[3] + pe[2], Ze[2] = pe[3] - pe[2], Ze[3] = pe[0] - pe[1], R[0 + Ke] = Ze[0] + ve[0], R[8 + Ke] = Ze[1] + ve[1], R[16 + Ke] = Ze[2] + ve[2], R[24 + Ke] = Ze[3] + ve[3], R[32 + Ke] = Ze[3] - ve[3], R[40 + Ke] = Ze[2] - ve[2], R[48 + Ke] = Ze[1] - ve[1], R[56 + Ke] = Ze[0] - ve[0];
@@ -73838,7 +73838,7 @@ class Xw extends vX {
73838
73838
  return new DataView(R.array.buffer, R.offset.value, R.size);
73839
73839
  }
73840
73840
  function Ne(R) {
73841
- const G = R.viewer.buffer.slice(R.offset.value, R.offset.value + R.size), N = new Uint8Array(Je(G)), V = new Uint8Array(N.length);
73841
+ const G = R.viewer.buffer.slice(R.offset.value, R.offset.value + R.size), N = new Uint8Array(je(G)), V = new Uint8Array(N.length);
73842
73842
  return Z(N), Qe(N, V), new DataView(V.buffer);
73843
73843
  }
73844
73844
  function Re(R) {
@@ -73874,13 +73874,13 @@ class Xw extends vX {
73874
73874
  }
73875
73875
  ke(ve, V, j);
73876
73876
  let Ke = 0;
73877
- const je = new Uint8Array(V.buffer.byteLength);
73877
+ const qe = new Uint8Array(V.buffer.byteLength);
73878
73878
  for (let wt = 0; wt < R.lines; wt++)
73879
73879
  for (let He = 0; He < R.inputChannels.length; He++) {
73880
73880
  const De = de[He], Nt = De.nx * De.size, Dt = new Uint8Array(V.buffer, De.end * 2, Nt * 2);
73881
- je.set(Dt, Ke), Ke += Nt * 2, De.end += Nt;
73881
+ qe.set(Dt, Ke), Ke += Nt * 2, De.end += Nt;
73882
73882
  }
73883
- return new DataView(je.buffer);
73883
+ return new DataView(qe.buffer);
73884
73884
  }
73885
73885
  function et(R) {
73886
73886
  const G = R.array.slice(R.offset.value, R.offset.value + R.size), N = V_(G), V = R.inputChannels.length * R.lines * R.columns * R.totalBytes, q = new ArrayBuffer(V), j = new DataView(q);
@@ -73892,14 +73892,14 @@ class Xw extends vX {
73892
73892
  switch (R.inputChannels[pe].pixelType) {
73893
73893
  case 1:
73894
73894
  xe[0] = de, xe[1] = xe[0] + R.columns, de = xe[1] + R.columns;
73895
- for (let je = 0; je < R.columns; ++je) {
73895
+ for (let qe = 0; qe < R.columns; ++qe) {
73896
73896
  const wt = N[xe[0]++] << 8 | N[xe[1]++];
73897
73897
  Ze += wt, j.setUint16(Ce, Ze, !0), Ce += 2;
73898
73898
  }
73899
73899
  break;
73900
73900
  case 2:
73901
73901
  xe[0] = de, xe[1] = xe[0] + R.columns, xe[2] = xe[1] + R.columns, de = xe[2] + R.columns;
73902
- for (let je = 0; je < R.columns; ++je) {
73902
+ for (let qe = 0; qe < R.columns; ++qe) {
73903
73903
  const wt = N[xe[0]++] << 24 | N[xe[1]++] << 16 | N[xe[2]++] << 8;
73904
73904
  Ze += wt, j.setUint32(Ce, Ze, !0), Ce += 4;
73905
73905
  }
@@ -73971,15 +73971,15 @@ class Xw extends vX {
73971
73971
  }
73972
73972
  if (q.rleRawSize > 0) {
73973
73973
  const He = R.array.slice(N.value, N.value + q.rleCompressedSize), De = V_(He);
73974
- Ke = Je(De.buffer), N.value += q.rleCompressedSize;
73974
+ Ke = je(De.buffer), N.value += q.rleCompressedSize;
73975
73975
  }
73976
- let je = 0;
73976
+ let qe = 0;
73977
73977
  const wt = new Array(xe.length);
73978
73978
  for (let He = 0; He < wt.length; ++He)
73979
73979
  wt[He] = new Array();
73980
73980
  for (let He = 0; He < R.lines; ++He)
73981
73981
  for (let De = 0; De < xe.length; ++De)
73982
- wt[De].push(je), je += xe[De].width * R.type * 2;
73982
+ wt[De].push(qe), qe += xe[De].width * R.type * 2;
73983
73983
  We(ve, wt, xe, pe, Ze, V);
73984
73984
  for (let He = 0; He < xe.length; ++He) {
73985
73985
  const De = xe[He];
@@ -74217,8 +74217,8 @@ class Xw extends vX {
74217
74217
  G.value += R.size;
74218
74218
  for (let Ze = 0; Ze < R.lines; Ze++) {
74219
74219
  const Ke = Ze * R.columns * R.totalBytes;
74220
- for (let je = 0; je < R.inputChannels.length; je++) {
74221
- const wt = qu.channels[je].name, He = R.channelByteOffsets[wt] * R.columns, De = R.decodeChannels[wt];
74220
+ for (let qe = 0; qe < R.inputChannels.length; qe++) {
74221
+ const wt = qu.channels[qe].name, He = R.channelByteOffsets[wt] * R.columns, De = R.decodeChannels[wt];
74222
74222
  if (De === void 0)
74223
74223
  continue;
74224
74224
  N.value = Ke + He;
@@ -74243,8 +74243,8 @@ class Xw extends vX {
74243
74243
  if (pe >= R.height)
74244
74244
  continue;
74245
74245
  const Ze = xe * j, Ke = (R.height - 1 - pe) * R.outLineWidth;
74246
- for (let je = 0; je < R.inputChannels.length; je++) {
74247
- const wt = qu.channels[je].name, He = R.channelByteOffsets[wt] * R.columns, De = R.decodeChannels[wt];
74246
+ for (let qe = 0; qe < R.inputChannels.length; qe++) {
74247
+ const wt = qu.channels[qe].name, He = R.channelByteOffsets[wt] * R.columns, De = R.decodeChannels[wt];
74248
74248
  if (De !== void 0) {
74249
74249
  N.value = Ze + He;
74250
74250
  for (let Nt = 0; Nt < R.columns; Nt++) {
@@ -74386,9 +74386,9 @@ class Xw extends vX {
74386
74386
  j.blockHeight = R.tiles.ySize, j.blockWidth = R.tiles.xSize;
74387
74387
  const pe = nM(R.tiles, j.width, j.height), Ze = sv(pe, j.width, R.tiles.xSize, R.tiles.roundingMode), Ke = sv(pe, j.height, R.tiles.ySize, R.tiles.roundingMode);
74388
74388
  j.tileCount = Ze[0] * Ke[0];
74389
- for (let je = 0; je < pe; je++)
74390
- for (let wt = 0; wt < Ke[je]; wt++)
74391
- for (let He = 0; He < Ze[je]; He++)
74389
+ for (let qe = 0; qe < pe; qe++)
74390
+ for (let wt = 0; wt < Ke[qe]; wt++)
74391
+ for (let He = 0; He < Ze[qe]; He++)
74392
74392
  bi(G, V);
74393
74393
  j.decode = mA.bind(j);
74394
74394
  } else {
@@ -74611,7 +74611,7 @@ class zBe {
74611
74611
  h && a.push(h);
74612
74612
  }
74613
74613
  const l = await i3(a);
74614
- l != null && l.anyFailed && $e() && console.error("Failed to load lightmap extension", l), r();
74614
+ l != null && l.anyFailed && Je() && console.error("Failed to load lightmap extension", l), r();
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
- `, e = "vec3 NeutralToneMapping( vec3 color ) {", t = `return mix(color, vec3(1, 1, 1), g);
75190
+ `, e = "vec3 NeutralToneMapping( vec3 color ) {", t = `return mix( color, vec3( newPeak ), g );
75191
75191
  }`, i = Xt.tonemapping_pars_fragment.indexOf(e), n = Xt.tonemapping_pars_fragment.indexOf(t, i);
75192
75192
  if (i >= 0 && n >= 0) {
75193
75193
  const r = Xt.tonemapping_pars_fragment.substring(i, n + t.length);
75194
75194
  Xt.tonemapping_pars_fragment = Xt.tonemapping_pars_fragment.replace(r, s);
75195
- }
75195
+ } else
75196
+ Je() && console.error("Couldn't find NeutralToneMapping in ShaderChunk.tonemapping_pars_fragment");
75196
75197
  }
75197
75198
  function iPe() {
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
- }`, e = "vec3 AgXToneMapping( vec3 color ) {", t = ` return color;
75309
- }`, i = Xt.tonemapping_pars_fragment.indexOf(e), n = Xt.tonemapping_pars_fragment.indexOf(t, i);
75309
+ `, e = "vec3 AgXToneMapping( vec3 color ) {", t = "return color;", i = Xt.tonemapping_pars_fragment.indexOf(e), n = Xt.tonemapping_pars_fragment.indexOf(t, i);
75310
75310
  if (i >= 0 && n >= 0) {
75311
75311
  const r = Xt.tonemapping_pars_fragment.substring(i, n + t.length);
75312
75312
  Xt.tonemapping_pars_fragment = Xt.tonemapping_pars_fragment.replace(r, s);
75313
- }
75313
+ } else
75314
+ Je() && console.error("Couldn't find AgXToneMapping in ShaderChunk.tonemapping_pars_fragment");
75314
75315
  }
75315
75316
  function Ho(s) {
75316
75317
  const e = document.createElement("span");
@@ -75363,7 +75364,7 @@ const H2 = class {
75363
75364
  if (this._fullscreenButton)
75364
75365
  return this._fullscreenButton;
75365
75366
  if (!document.fullscreenEnabled)
75366
- return $e() && console.warn("NeedleMenu: Fullscreen button could not be created, device doesn't support the Fullscreen API"), null;
75367
+ return Je() && console.warn("NeedleMenu: Fullscreen button could not be created, device doesn't support the Fullscreen API"), null;
75367
75368
  const t = document.createElement("button");
75368
75369
  this._fullscreenButton = t, t.classList.add("fullscreen-button"), t.title = "Click to enter fullscreen mode";
75369
75370
  const i = Ho("fullscreen"), n = Ho("fullscreen_exit");
@@ -76613,7 +76614,7 @@ function bO(s, e) {
76613
76614
  if (!s)
76614
76615
  return;
76615
76616
  if (!s.isComponent) {
76616
- ($e() || dr) && console.error(`Registered script is not a Needle Engine component.
76617
+ (Je() || dr) && 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 En = class {
76901
76902
  const r = (n = (i = this.domElement) == null ? void 0 : i.shadowRoot) == null ? void 0 : n.querySelector("canvas");
76902
76903
  r && (e.canvas = r, dr && console.log("Using canvas from shadow root", r));
76903
76904
  }
76904
- dr && console.log("Using Renderer Parameters:", e, this.domElement), this.renderer = new sm(e), this.renderer.debug.checkShaderErrors = $e() || ee("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = zr, this.renderer.setClearColor(new ge("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = Pz, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = ft, this.renderer.nodes = {
76905
+ dr && console.log("Using Renderer Parameters:", e, this.domElement), this.renderer = new sm(e), this.renderer.debug.checkShaderErrors = Je() || ee("checkshadererrors") === !0, this.renderer.toneMappingExposure = 1, this.renderer.toneMapping = zr, this.renderer.setClearColor(new ge("lightgrey"), 0), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = Pz, this.renderer.setSize(this.domWidth, this.domHeight), this.renderer.outputColorSpace = ft, this.renderer.nodes = {
76905
76906
  library: new ree(),
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
  dr && console.log("Creating context", this.name, e);
77085
77086
  const i = globalThis["needle:dependencies:ready"];
77086
77087
  i instanceof Promise && (dr && console.log("Waiting for dependencies to be ready"), await i.catch((g) => {
77087
- if (dr || $e()) {
77088
+ if (dr || Je()) {
77088
77089
  if (hB("Needle Engine dependencies failed to load. Please check the console for more details"), g instanceof ReferenceError) {
77089
77090
  let A = "YourComponentName";
77090
77091
  const y = g.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(e, t) {
77226
- if (t === void 0 && (t = null), $e() || dr || j2e())
77227
+ if (t === void 0 && (t = null), Je() || dr || j2e())
77227
77228
  try {
77228
77229
  performance.mark("update.start"), this.internalStep(e, t), this._renderlooperrors = 0, performance.mark("update.end"), performance.measure("NE Frame", "update.start", "update.end");
77229
77230
  } catch (i) {
77230
- this._renderlooperrors += 1, ($e() || dr) && (i instanceof Error || i instanceof TypeError) && hs("Caught unhandled exception during render-loop - see console for details.", Mc.Error), console.error("Frame #" + this.time.frame + `
77231
+ this._renderlooperrors += 1, (Je() || dr) && (i instanceof Error || i instanceof TypeError) && hs("Caught unhandled exception during render-loop - see console for details.", Mc.Error), console.error("Frame #" + this.time.frame + `
77231
77232
  `, i), this._renderlooperrors >= 3 && (console.warn("Stopping render loop due to error"), this.renderer.setAnimationLoop(null)), this.domElement.dispatchEvent(new CustomEvent("error", { detail: i }));
77232
77233
  }
77233
77234
  else
@@ -77778,7 +77779,7 @@ const Q2 = class {
77778
77779
  T4 && console.log("Loading UI has commercial license?", t);
77779
77780
  const i = document.createElement("div");
77780
77781
  i.style.paddingTop = ".6em", i.style.fontSize = ".8em", i.style.textTransform = "uppercase", i.innerText = `NEEDLE ENGINE NON COMMERCIAL VERSION
77781
- CLICK HERE TO GET A LICENSE`, i.style.cursor = "pointer", i.style.userSelect = "none", i.style.textAlign = "center", i.style.pointerEvents = "all", i.addEventListener("click", () => window.open("https://needle.tools/pricing", "_self")), i.style.opacity = "0", e.appendChild(i), !$e() && kf && (T4 && console.log("Waiting for runtime license check"), await kf, t = Lu()), !t && (i.style.transition = "opacity .5s ease-in-out", i.style.opacity = "1");
77782
+ CLICK HERE TO GET A LICENSE`, i.style.cursor = "pointer", i.style.userSelect = "none", i.style.textAlign = "center", i.style.pointerEvents = "all", i.addEventListener("click", () => window.open("https://needle.tools/pricing", "_self")), i.style.opacity = "0", e.appendChild(i), !Je() && kf && (T4 && console.log("Waiting for runtime license check"), await kf, t = Lu()), !t && (i.style.transition = "opacity .5s ease-in-out", i.style.opacity = "1");
77782
77783
  }
77783
77784
  };
77784
77785
  let HE = Q2;
@@ -82026,7 +82027,7 @@ let ze = (du = class {
82026
82027
  }
82027
82028
  /** @internal */
82028
82029
  __internalEnable(e) {
82029
- return this.__destroyed ? ($e() && console.warn("[Needle Engine Dev] Trying to enable destroyed component"), !1) : this.__didAwake ? this.__didEnable ? (e !== !0 && (this.__isEnabled = !0), !1) : (this.__didEnable = !0, this.__isEnabled = !0, this.onEnable(), !0) : !1;
82030
+ return this.__destroyed ? (Je() && console.warn("[Needle Engine Dev] Trying to enable destroyed component"), !1) : this.__didAwake ? this.__didEnable ? (e !== !0 && (this.__isEnabled = !0), !1) : (this.__didEnable = !0, this.__isEnabled = !0, this.onEnable(), !0) : !1;
82030
82031
  }
82031
82032
  /** @internal */
82032
82033
  __internalDisable(e) {
@@ -82048,7 +82049,7 @@ let ze = (du = class {
82048
82049
  }
82049
82050
  set enabled(e) {
82050
82051
  if (this.__destroyed) {
82051
- $e() && console.warn(`[Needle Engine Dev] Trying to ${e ? "enable" : "disable"} destroyed component`);
82052
+ Je() && console.warn(`[Needle Engine Dev] Trying to ${e ? "enable" : "disable"} destroyed component`);
82052
82053
  return;
82053
82054
  }
82054
82055
  if (typeof e == "number" && (e >= 0.5 ? e = !0 : e = !1), !this.__didAwake) {
@@ -82889,7 +82890,7 @@ class Bc {
82889
82890
  }
82890
82891
  setStartTransition() {
82891
82892
  var e;
82892
- this.model.layers.length > 1 && (lr || $e()) && console.warn("Multiple layers are not supported yet " + ((e = this.animator) == null ? void 0 : e.name));
82893
+ this.model.layers.length > 1 && (lr || Je()) && console.warn("Multiple layers are not supported yet " + ((e = this.animator) == null ? void 0 : e.name));
82893
82894
  for (const t of this.model.layers) {
82894
82895
  const i = t.stateMachine;
82895
82896
  i.defaultState === void 0 && (lr && console.warn("AnimatorController default state is undefined, will assign state 0 as default", t), i.defaultState = 0);
@@ -83048,7 +83049,7 @@ Exit Time: ` + h, o.hasExitTime);
83048
83049
  var d, f;
83049
83050
  return u.node.name === ((f = (d = this.animator) == null ? void 0 : d.gameObject) == null ? void 0 : f.name);
83050
83051
  });
83051
- h ? c.motion.clip = h.clip : (lr || $e()) && console.warn('Could not find clip for animator "' + ((n = (i = this.animator) == null ? void 0 : i.gameObject) == null ? void 0 : n.name) + '"', c.motion.clips.map((u) => u.node.name));
83052
+ h ? c.motion.clip = h.clip : (lr || Je()) && console.warn('Could not find clip for animator "' + ((n = (i = this.animator) == null ? void 0 : i.gameObject) == null ? void 0 : n.name) + '"', c.motion.clips.map((u) => u.node.name));
83052
83053
  }
83053
83054
  if (!c.motion.clip) {
83054
83055
  lr && console.warn("No clip assigned to state", c);
@@ -83061,7 +83062,7 @@ Exit Time: ` + h, o.hasExitTime);
83061
83062
  const u = this.createAction(h);
83062
83063
  c.motion.action = u;
83063
83064
  } else
83064
- (lr || $e()) && console.warn("No valid animationclip assigned", c);
83065
+ (lr || Je()) && console.warn("No valid animationclip assigned", c);
83065
83066
  }
83066
83067
  if (c.behaviours && Array.isArray(c.behaviours))
83067
83068
  for (const h of c.behaviours) {
@@ -83072,7 +83073,7 @@ Exit Time: ` + h, o.hasExitTime);
83072
83073
  const d = new u();
83073
83074
  d.isStateMachineBehaviour && (d._context = this.context ?? void 0, ix(d, h.properties), h.instance = d), lr && console.log("Created animator controller behaviour", c.name, h.typeName, h.properties, d);
83074
83075
  } else
83075
- (lr || $e()) && console.warn("Could not find AnimatorBehaviour type: " + h.typeName);
83076
+ (lr || Je()) && console.warn("Could not find AnimatorBehaviour type: " + h.typeName);
83076
83077
  }
83077
83078
  }
83078
83079
  }
@@ -83556,7 +83557,7 @@ const OC = 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
- e.name.endsWith("position") ? this.pos = e : e.name.endsWith("quaternion") ? this.rot = e : e.name.endsWith("scale") ? this.scale = e : (e.name.endsWith("activeSelf") ? console.warn("[USDZ] Animation of enabled/disabled state is not supported for USDZ export and will NOT be exported: " + e.name + " on " + (((t = this.root) == null ? void 0 : t.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: " + e.name + " on " + (((i = this.root) == null ? void 0 : i.name) ?? this.target.name) + ". Only .position, .rotation, .scale are supported."), $e() && Cn("[USDZ] Some animations can't be exported. See console for details."));
83560
+ e.name.endsWith("position") ? this.pos = e : e.name.endsWith("quaternion") ? this.rot = e : e.name.endsWith("scale") ? this.scale = e : (e.name.endsWith("activeSelf") ? console.warn("[USDZ] Animation of enabled/disabled state is not supported for USDZ export and will NOT be exported: " + e.name + " on " + (((t = this.root) == null ? void 0 : t.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: " + e.name + " on " + (((i = this.root) == null ? void 0 : i.name) ?? this.target.name) + ". Only .position, .rotation, .scale are supported."), Je() && Cn("[USDZ] Some animations can't be exported. See console for details."));
83560
83561
  }
83561
83562
  getFrames() {
83562
83563
  var e, t, i, n, r, o;
@@ -84965,7 +84966,7 @@ function JGe(s, e, t, i, n) {
84965
84966
  s.__internalAwake = function() {
84966
84967
  var l;
84967
84968
  if (!this.onValidate) {
84968
- $e() && console.warn('Usage of @validate decorate detected but there is no onValidate method in your class: "' + ((l = s.constructor) == null ? void 0 : l.name) + '"');
84969
+ Je() && console.warn('Usage of @validate decorate detected but there is no onValidate method in your class: "' + ((l = s.constructor) == null ? void 0 : l.name) + '"');
84969
84970
  return;
84970
84971
  }
84971
84972
  if (this[o] === void 0) {
@@ -85194,7 +85195,7 @@ const ZV = (DD = class extends ze {
85194
85195
  }
85195
85196
  onEnable() {
85196
85197
  var e;
85197
- this._watch || (this._watch = new $Ge(this.gameObject, this.context)), this._watch.start(!0, !0), this.startCoroutine(this.beforePhysics(), Tn.LateUpdate), $e() && !((e = this.context.physics.engine) != null && e.getBody(this)) && (globalThis.false ? 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 $Ge(this.gameObject, this.context)), this._watch.start(!0, !0), this.startCoroutine(this.beforePhysics(), Tn.LateUpdate), Je() && !((e = this.context.physics.engine) != null && e.getBody(this)) && (globalThis.false ? 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 e, t;
@@ -85812,7 +85813,7 @@ class Fn {
85812
85813
  const h = (n = o.arguments) == null ? void 0 : n.map((u) => u instanceof Object && u.uuid ? e[u.uuid] : u != null && u.isComponent ? e[u.guid] : u);
85813
85814
  t.push(new Ud(c.clone, o.methodName, h, o.enabled));
85814
85815
  } else
85815
- $e() && console.warn("Could not find target for event listener");
85816
+ Je() && console.warn("Could not find target for event listener");
85816
85817
  }
85817
85818
  }
85818
85819
  }
@@ -85926,7 +85927,7 @@ class oke extends Oc {
85926
85927
  if (e.endsWith(".glb") || e.endsWith(".gltf")) {
85927
85928
  if (t.serializable instanceof Array && t.serializable.includes(yi))
85928
85929
  return;
85929
- $e() && Cn("Detected wrong usage of @serializable with Object3D or GameObject. Instead you should use AssetReference here! Please see the console for details.");
85930
+ Je() && Cn("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 = (n = (i = t.target) == null ? void 0 : i.constructor) == null ? void 0 : n.name;
85931
85932
  console.warn(`Wrong usage of @serializable detected in your script "${o}"
85932
85933
 
@@ -85951,7 +85952,7 @@ ${t.path}! : AssetReference;
85951
85952
  }
85952
85953
  let o;
85953
85954
  const a = (r = t.gltf) == null ? void 0 : r.scene;
85954
- return a && (o = $.findByGuid(e.guid, a)), o || (o = $.findByGuid(e.guid, t.context.scene)), o ? (o && o.isComponent === !0 && (Dr && console.warn("Deserialized object reference is a component"), o = o.gameObject), Dr && console.log("Deserialized object reference?", e, o, t == null ? void 0 : t.nodeToObject)) : (($e() || Dr) && console.warn("Could not resolve object reference", t.path, e, t.target, t.context.scene), e.could_not_resolve = !0), o;
85955
+ return a && (o = $.findByGuid(e.guid, a)), o || (o = $.findByGuid(e.guid, t.context.scene)), o ? (o && o.isComponent === !0 && (Dr && console.warn("Deserialized object reference is a component"), o = o.gameObject), Dr && console.log("Deserialized object reference?", e, o, t == null ? void 0 : t.nodeToObject)) : ((Je() || Dr) && console.warn("Could not resolve object reference", t.path, e, t.target, t.context.scene), e.could_not_resolve = !0), o;
85955
85956
  }
85956
85957
  }
85957
85958
  }
@@ -85977,7 +85978,7 @@ class lke extends Oc {
85977
85978
  let r = this.findObjectForGuid(e.guid, t.root);
85978
85979
  if (r || t.context && (r = this.findObjectForGuid(e.guid, (i = t.context) == null ? void 0 : i.scene), r))
85979
85980
  return r;
85980
- ($e() || Dr) && console.warn('Could not resolve component reference: "' + n + '" using guid ' + e.guid, t.target), e.could_not_resolve = !0;
85981
+ (Je() || Dr) && console.warn('Could not resolve component reference: "' + n + '" using guid ' + e.guid, t.target), e.could_not_resolve = !0;
85981
85982
  return;
85982
85983
  }
85983
85984
  }
@@ -86049,7 +86050,7 @@ Could not find method ${c.method} on object ${u.name}`, u, typeof u[c.method]);
86049
86050
  }
86050
86051
  A = Object.getPrototypeOf(A);
86051
86052
  }
86052
- !g && ($e() || Dr) && f();
86053
+ !g && (Je() || Dr) && f();
86053
86054
  }
86054
86055
  }
86055
86056
  if (u) {
@@ -86062,7 +86063,7 @@ Could not find method ${c.method} on object ${u.name}`, u, typeof u[c.method]);
86062
86063
  o.push(g);
86063
86064
  }
86064
86065
  } else
86065
- $e() && console.warn("[Debug] EventList: Could not find event listener in scene", c, t.object, e);
86066
+ Je() && console.warn("[Debug] EventList: Could not find event listener in scene", c, t.object, e);
86066
86067
  }
86067
86068
  const a = new Fn(o);
86068
86069
  Dr && console.log(a);
@@ -86400,7 +86401,7 @@ const qh = class extends ze {
86400
86401
  start() {
86401
86402
  if (this.raycaster.length <= 0 && !$.findObjectOfType(I1, this.context)) {
86402
86403
  const i = $.addComponent(this.context.scene, Dc);
86403
- this.raycaster.push(i), ($e() || vd) && console.warn("Added an ObjectRaycaster to the scene because no raycaster was found.");
86404
+ this.raycaster.push(i), (Je() || vd) && console.warn("Added an ObjectRaycaster to the scene because no raycaster was found.");
86404
86405
  }
86405
86406
  }
86406
86407
  register(t) {
@@ -86587,7 +86588,7 @@ const qh = class extends ze {
86587
86588
  const r = this._capturedPointer[n] || [];
86588
86589
  r.push(i), this._capturedPointer[n] = r;
86589
86590
  } else
86590
- $e() && !i.z__warned_no_pointermove && (i.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
+ Je() && !i.z__warned_no_pointermove && (i.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
  t.z__pointer_cture_rleased && (t.z__pointer_cture_rleased = !1, this.releasePointerCapture(t, i));
86593
86594
  }
@@ -87773,7 +87774,7 @@ const zo = ee("debugaudio"), hf = class extends ze {
87773
87774
  /** Play a audioclip or mediastream */
87774
87775
  play(e = void 0) {
87775
87776
  var i, n, r;
87776
- !e && this.clip && (e = this.clip), e !== void 0 && typeof e != "string" && !(e instanceof MediaStream) && ($e() && console.warn("Called play on AudioSource with unknown argument type:", e + `
87777
+ !e && this.clip && (e = this.clip), e !== void 0 && typeof e != "string" && !(e instanceof MediaStream) && (Je() && console.warn("Called play on AudioSource with unknown argument type:", e + `
87777
87778
  Using the assigned clip instead:`, this.clip), e = this.clip);
87778
87779
  let t = !this.sound || e && e !== this.clip;
87779
87780
  if (typeof e == "string" && !this.audioLoader && (t = !0), (e instanceof MediaStream || typeof e == "string") && (this.clip = e), t) {
@@ -88021,7 +88022,7 @@ const KV = (VD = class extends ze {
88021
88022
  /** @internal */
88022
88023
  awake() {
88023
88024
  var e, t, i, n, r;
88024
- gd && console.log(this, (e = this.playableAsset) == null ? void 0 : e.tracks), this.rebuildGraph(), !this.isValid() && (gd || $e()) && (gd ? console.warn("PlayableDirector is not valid", "Asset?", this.playableAsset, "Tracks:", (t = this.playableAsset) == null ? void 0 : t.tracks, "IsArray?", Array.isArray((i = this.playableAsset) == null ? void 0 : i.tracks), this) : (r = (n = this.playableAsset) == null ? void 0 : n.tracks) != null && r.length ? console.warn("PlayableDirector is not valid") : console.warn("PlayableDirector has no tracks"));
88025
+ gd && console.log(this, (e = this.playableAsset) == null ? void 0 : e.tracks), this.rebuildGraph(), !this.isValid() && (gd || Je()) && (gd ? console.warn("PlayableDirector is not valid", "Asset?", this.playableAsset, "Tracks:", (t = this.playableAsset) == null ? void 0 : t.tracks, "IsArray?", Array.isArray((i = this.playableAsset) == null ? void 0 : i.tracks), this) : (r = (n = this.playableAsset) == null ? void 0 : n.tracks) != null && r.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 RO extends DB {
88599
88600
  }
88600
88601
  }
88601
88602
  }
88602
- if (this._useclipOffsets && (this._totalOffsetPosition.lerp(this._totalOffsetPosition2, n), this._totalOffsetRotation.slerp(this._totalOffsetRotation2, n)), this.__mixerError === void 0 && (yu || $e()) && ((c = (l = this._animator) == null ? void 0 : l.runtimeAnimatorController) != null && c.mixer) && this.mixer !== ((u = (h = this._animator) == null ? void 0 : h.runtimeAnimatorController) == null ? void 0 : u.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)), (d = this._animator) != null && d.runtimeAnimatorController) {
88603
+ if (this._useclipOffsets && (this._totalOffsetPosition.lerp(this._totalOffsetPosition2, n), this._totalOffsetRotation.slerp(this._totalOffsetRotation2, n)), this.__mixerError === void 0 && (yu || Je()) && ((c = (l = this._animator) == null ? void 0 : l.runtimeAnimatorController) != null && c.mixer) && this.mixer !== ((u = (h = this._animator) == null ? void 0 : h.runtimeAnimatorController) == null ? void 0 : u.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)), (d = this._animator) != null && d.runtimeAnimatorController) {
88603
88604
  const g = Math.max(0, 1 - a);
88604
88605
  (m = (f = this._animator) == null ? void 0 : f.runtimeAnimatorController) == null || m.update(g);
88605
88606
  } else
@@ -88885,7 +88886,7 @@ function Nke(s) {
88885
88886
  const t = s.scene;
88886
88887
  e = Lc(t, YV);
88887
88888
  } else
88888
- $e() && console.warn("No post processing manager found");
88889
+ Je() && console.warn("No post processing manager found");
88889
88890
  return e;
88890
88891
  }
88891
88892
  var Dke = Object.defineProperty, Fke = Object.getOwnPropertyDescriptor, Hse = (s, e, t, i) => {
@@ -89251,10 +89252,10 @@ const Qse = function(s = null) {
89251
89252
  let i = "";
89252
89253
  typeof t == "string" ? i = t : i = t.name;
89253
89254
  let n = null, r;
89254
- typeof s == "string" ? r = e[s] : typeof s == "function" && (r = s), r == null && ($e() || Od) && s != null && console.warn('syncField: no callback function found for property "' + i + '"', '"' + s + '"');
89255
+ typeof s == "string" ? r = e[s] : typeof s == "function" && (r = s), r == null && (Je() || Od) && s != null && console.warn('syncField: no callback function found for property "' + i + '"', '"' + s + '"');
89255
89256
  const o = e, a = o.__internalAwake;
89256
89257
  if (typeof a != "function") {
89257
- (Od || $e()) && console.error('@syncField can currently only used on Needle Engine Components, custom object of type "' + ((h = e == null ? void 0 : e.constructor) == null ? void 0 : h.name) + '" is not supported', e);
89258
+ (Od || Je()) && console.error('@syncField can currently only used on Needle Engine Components, custom object of type "' + ((h = e == null ? void 0 : e.constructor) == null ? void 0 : h.name) + '" is not supported', e);
89258
89259
  return;
89259
89260
  }
89260
89261
  Od && console.log(i);
@@ -89271,7 +89272,7 @@ const Qse = function(s = null) {
89271
89272
  var g;
89272
89273
  const m = this[l];
89273
89274
  if (this[l] = f, d) {
89274
- ($e() || Od) && console.warn("Recursive call detected", i);
89275
+ (Je() || Od) && console.warn("Recursive call detected", i);
89275
89276
  return;
89276
89277
  }
89277
89278
  d = !0;
@@ -90385,7 +90386,7 @@ class eA extends ze {
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, (i = this._net) == null || i.stopSendingStream(this._outputStream), jd(this._outputStream), this._outputStream = await this.getAudioStream(t), this._outputStream ? (this.debug && console.log("VOIP: Got audio stream"), (n = this._net) == null || n.startSendingStream(this._outputStream), this.updateButton(), !0) : (this.updateButton(), await Ft.microphonePermissionsGranted() ? console.error("VOIP: Could not get audio stream - please make sure to connect an audio device and grant microphone permissions") : hB("Microphone permissions not granted: Please grant microphone permissions to use voice chat"), (this.debug || $e()) && console.log("VOIP: Failed to get audio stream"), !1);
90389
+ return this._allowSending = !0, (i = this._net) == null || i.stopSendingStream(this._outputStream), jd(this._outputStream), this._outputStream = await this.getAudioStream(t), this._outputStream ? (this.debug && console.log("VOIP: Got audio stream"), (n = this._net) == null || n.startSendingStream(this._outputStream), this.updateButton(), !0) : (this.updateButton(), await Ft.microphonePermissionsGranted() ? console.error("VOIP: Could not get audio stream - please make sure to connect an audio device and grant microphone permissions") : hB("Microphone permissions not granted: Please grant microphone permissions to use voice chat"), (this.debug || Je()) && console.log("VOIP: Failed to get audio stream"), !1);
90389
90390
  }
90390
90391
  /** Stop sending audio (muting your own microphone) */
90391
90392
  disconnect(t) {
@@ -90433,7 +90434,7 @@ class eA extends ze {
90433
90434
  // private _analyzer?: AudioAnalyser;
90434
90435
  /** @deprecated */
90435
90436
  getFrequency(t) {
90436
- return this.unsupported_getfrequency || (this.unsupported_getfrequency = !0, $e() && Cn("VOIP: getFrequency is currently not supported"), console.warn("VOIP: getFrequency is currently not supported")), null;
90437
+ return this.unsupported_getfrequency || (this.unsupported_getfrequency = !0, Je() && Cn("VOIP: getFrequency is currently not supported"), console.warn("VOIP: getFrequency is currently not supported")), null;
90437
90438
  }
90438
90439
  async getAudioStream(t) {
90439
90440
  if (!navigator.mediaDevices.getUserMedia)
@@ -92503,7 +92504,7 @@ var lDe = Object.defineProperty, cDe = Object.getOwnPropertyDescriptor, ps = (s,
92503
92504
  };
92504
92505
  const nK = ee("debugusdzbehaviours");
92505
92506
  function F1(s) {
92506
- s && (s.getComponentInParent(I1) || ($e() && console.debug('Raycaster on "' + s.name + '" was automatically added, because no raycaster was found in the parent hierarchy.'), s.addComponent(Dc)));
92507
+ s && (s.getComponentInParent(I1) || (Je() && console.debug('Raycaster on "' + s.name + '" was automatically added, because no raycaster was found in the parent hierarchy.'), s.addComponent(Dc)));
92507
92508
  }
92508
92509
  class Fx extends ze {
92509
92510
  constructor() {
@@ -92583,7 +92584,7 @@ const Kh = (cE = class extends ze {
92583
92584
  }
92584
92585
  start() {
92585
92586
  var e;
92586
- this._objectsWithThisMaterial = this.objectsWithThisMaterial, F1(this.gameObject), $e() && this._objectsWithThisMaterial.length <= 0 && console.warn('ChangeMaterialOnClick: No objects found with material "' + ((e = this.materialToSwitch) == null ? void 0 : e.name) + '"');
92587
+ this._objectsWithThisMaterial = this.objectsWithThisMaterial, F1(this.gameObject), Je() && this._objectsWithThisMaterial.length <= 0 && console.warn('ChangeMaterialOnClick: No objects found with material "' + ((e = this.materialToSwitch) == null ? void 0 : e.name) + '"');
92587
92588
  }
92588
92589
  onPointerEnter(e) {
92589
92590
  this.context.input.setCursorPointer();
@@ -92930,7 +92931,7 @@ const Yh = (hE = class extends ze {
92930
92931
  afterSerialize() {
92931
92932
  if (Yh.rootsWithExclusivePlayback.size > 1) {
92932
92933
  const e = '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
- $e() && Cn(e), console.warn(e, ...Yh.rootsWithExclusivePlayback);
92934
+ Je() && Cn(e), console.warn(e, ...Yh.rootsWithExclusivePlayback);
92934
92935
  }
92935
92936
  Yh.animationActions = [], Yh.rootsWithExclusivePlayback = /* @__PURE__ */ new Set();
92936
92937
  }
@@ -92941,7 +92942,7 @@ const Yh = (hE = class extends ze {
92941
92942
  if (!n)
92942
92943
  return;
92943
92944
  const r = n.getClipCount(this.target) > 1;
92944
- r && ($e() && console.warn("Setting exclusive playback for " + this.target.name + "@" + this.stateName + " because it has " + n.getClipCount(this.target) + " animations. This works around QuickLook bug FB13410767."), Yh.rootsWithExclusivePlayback.add(this.target));
92945
+ r && (Je() && console.warn("Setting exclusive playback for " + this.target.name + "@" + this.stateName + " because it has " + n.getClipCount(this.target) + " animations. This works around QuickLook bug FB13410767."), Yh.rootsWithExclusivePlayback.add(this.target));
92945
92946
  const o = this.name ? this.name : "";
92946
92947
  i.traverse((a) => {
92947
92948
  var l, c;
@@ -93634,7 +93635,7 @@ function vDe(s = Math.random) {
93634
93635
  const A = (a + l + c + h) * xDe, y = xT(a + A), b = xT(l + A), x = xT(c + A), v = xT(h + A), _ = (y + b + x + v) * $r, C = y - _, S = b - _, M = x - _, L = v - _, w = a - C, E = l - S, B = c - M, P = h - L;
93635
93636
  let k = 0, U = 0, F = 0, H = 0;
93636
93637
  w > E ? k++ : U++, w > B ? k++ : F++, w > P ? k++ : H++, E > B ? U++ : F++, E > P ? U++ : H++, B > P ? F++ : H++;
93637
- const W = k >= 3 ? 1 : 0, se = U >= 3 ? 1 : 0, ue = F >= 3 ? 1 : 0, be = H >= 3 ? 1 : 0, Pe = k >= 2 ? 1 : 0, Oe = U >= 2 ? 1 : 0, ae = F >= 2 ? 1 : 0, Ae = H >= 2 ? 1 : 0, Se = k >= 1 ? 1 : 0, Le = U >= 1 ? 1 : 0, st = F >= 1 ? 1 : 0, ot = H >= 1 ? 1 : 0, Ct = w - W + $r, zt = E - se + $r, ke = B - ue + $r, Z = P - be + $r, Qe = w - Pe + 2 * $r, Je = E - Oe + 2 * $r, We = B - ae + 2 * $r, nt = P - Ae + 2 * $r, Tt = w - Se + 3 * $r, mt = E - Le + 3 * $r, O = B - st + 3 * $r, D = P - ot + 3 * $r, he = w - 1 + 4 * $r, Ee = E - 1 + 4 * $r, Ne = B - 1 + 4 * $r, Re = P - 1 + 4 * $r, yt = y & 255, et = b & 255, lt = x & 255, jt = v & 255;
93638
+ const W = k >= 3 ? 1 : 0, se = U >= 3 ? 1 : 0, ue = F >= 3 ? 1 : 0, be = H >= 3 ? 1 : 0, Pe = k >= 2 ? 1 : 0, Oe = U >= 2 ? 1 : 0, ae = F >= 2 ? 1 : 0, Ae = H >= 2 ? 1 : 0, Se = k >= 1 ? 1 : 0, Le = U >= 1 ? 1 : 0, st = F >= 1 ? 1 : 0, ot = H >= 1 ? 1 : 0, Ct = w - W + $r, zt = E - se + $r, ke = B - ue + $r, Z = P - be + $r, Qe = w - Pe + 2 * $r, je = E - Oe + 2 * $r, We = B - ae + 2 * $r, nt = P - Ae + 2 * $r, Tt = w - Se + 3 * $r, mt = E - Le + 3 * $r, O = B - st + 3 * $r, D = P - ot + 3 * $r, he = w - 1 + 4 * $r, Ee = E - 1 + 4 * $r, Ne = B - 1 + 4 * $r, Re = P - 1 + 4 * $r, yt = y & 255, et = b & 255, lt = x & 255, jt = v & 255;
93638
93639
  let Ge = 0.6 - w * w - E * E - B * B - P * P;
93639
93640
  if (Ge < 0)
93640
93641
  u = 0;
@@ -93649,12 +93650,12 @@ function vDe(s = Math.random) {
93649
93650
  const kt = yt + W + e[et + se + e[lt + ue + e[jt + be]]];
93650
93651
  At *= At, d = At * At * (t[kt] * Ct + i[kt] * zt + n[kt] * ke + r[kt] * Z);
93651
93652
  }
93652
- let Yt = 0.6 - Qe * Qe - Je * Je - We * We - nt * nt;
93653
+ let Yt = 0.6 - Qe * Qe - je * je - We * We - nt * nt;
93653
93654
  if (Yt < 0)
93654
93655
  f = 0;
93655
93656
  else {
93656
93657
  const kt = yt + Pe + e[et + Oe + e[lt + ae + e[jt + Ae]]];
93657
- Yt *= Yt, f = Yt * Yt * (t[kt] * Qe + i[kt] * Je + n[kt] * We + r[kt] * nt);
93658
+ Yt *= Yt, f = Yt * Yt * (t[kt] * Qe + i[kt] * je + n[kt] * We + r[kt] * nt);
93658
93659
  }
93659
93660
  let Lt = 0.6 - Tt * Tt - mt * mt - O * O - D * D;
93660
93661
  if (Lt < 0)
@@ -94552,7 +94553,7 @@ async function qV(s, e, t) {
94552
94553
  const r = new I2(n);
94553
94554
  return r.setAnimationPointerResolver.bind(r)(new XDe()), r;
94554
94555
  } else
94555
- return (VDe || $e()) && console.error("Missing KHR_animation_pointer extension..."), {
94556
+ return (VDe || Je()) && console.error("Missing KHR_animation_pointer extension..."), {
94556
94557
  name: "KHR_animation_pointer_NOT_AVAILABLE"
94557
94558
  };
94558
94559
  });
@@ -94776,7 +94777,7 @@ class Sre {
94776
94777
  this.add(t);
94777
94778
  } catch (i) {
94778
94779
  return console.error(`Failed adding mesh to instancing
94779
- `, i), $e() && hB("Failed instancing mesh. See the browser console for details."), null;
94780
+ `, i), Je() && hB("Failed instancing mesh. See the browser console for details."), null;
94780
94781
  }
94781
94782
  return t;
94782
94783
  }
@@ -94804,7 +94805,7 @@ class Sre {
94804
94805
  const t = this.geometry;
94805
94806
  for (const i in t.attributes)
94806
94807
  if (i !== "batchId" && !e.hasAttribute(i))
94807
- return $e() && console.warn(`BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`), !1;
94808
+ return Je() && console.warn(`BatchedMesh: Added geometry missing "${i}". 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} -> ${r}`), this._debugMaterial = hK();
94879
94880
  this._batchedMesh.setMatrixAt(l, e.object.matrixWorld), this._batchedMesh.setVisibleAt(l, !0), e.__instanceIndex = l, this._usedBuckets[a.geometryIndex] = a, this._availableBuckets.splice(n, 1);
94880
94881
  return;
94881
94882
  } catch (l) {
94882
- oc ? console.error("Failed to re-use space", l) : $e() && l instanceof Error && console.warn(`Failed to re-use space "${l.message}" in bucket ${a.geometryIndex} (${a.vertexCount}) - will add new geometry instead`);
94883
+ oc ? console.error("Failed to re-use space", l) : Je() && l instanceof Error && console.warn(`Failed to re-use space "${l.message}" in bucket ${a.geometryIndex} (${a.vertexCount}) - will add new geometry instead`);
94883
94884
  }
94884
94885
  }
94885
94886
  oc && console.debug("ADD GEOMETRY", t.name, `
@@ -94906,7 +94907,7 @@ p(Sre, "nullMatrix", new ce());
94906
94907
  function Fy(s) {
94907
94908
  var n, r;
94908
94909
  if (!s)
94909
- return $e() && console.error("Cannot get mesh information from null geometry"), { vertexCount: 0, indexCount: 0 };
94910
+ return Je() && console.error("Cannot get mesh information from null geometry"), { vertexCount: 0, indexCount: 0 };
94910
94911
  let e = ((r = (n = s.attributes) == null ? void 0 : n.position) == null ? void 0 : r.count) || 0, t = s.index ? s.index.count : 0;
94911
94912
  const i = Ui.getMeshLODInformation(s);
94912
94913
  if (i) {
@@ -96085,7 +96086,7 @@ const K_ = (pE = class {
96085
96086
  }
96086
96087
  break;
96087
96088
  default:
96088
- this._vector.set(0, 0, 0), $e() && !globalThis.__particlesystem_shapetype_unsupported && (console.warn("ParticleSystem ShapeType is not supported:", $V[this.shapeType]), globalThis.__particlesystem_shapetype_unsupported = !0);
96089
+ this._vector.set(0, 0, 0), Je() && !globalThis.__particlesystem_shapetype_unsupported && (console.warn("ParticleSystem ShapeType is not supported:", $V[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 pK = [], NN = new Array(), V5 = class {
97329
97330
  return;
97330
97331
  }
97331
97332
  Ut.isSessionSupported(t).then((i) => {
97332
- e.style.display = i ? "" : "none", $e() && !i && console.log('[WebXR] "' + t + '" is not supported on this device – make sure your server runs using HTTPS and you have a device connected that supports ' + t);
97333
+ e.style.display = i ? "" : "none", Je() && !i && console.log('[WebXR] "' + t + '" is not supported on this device – make sure your server runs using HTTPS and you have a device connected that supports ' + t);
97333
97334
  });
97334
97335
  }
97335
97336
  hideElementDuringXRSession(e) {
@@ -97847,7 +97848,7 @@ class tm extends ze {
97847
97848
  }
97848
97849
  async onCreateAnchor(t, i) {
97849
97850
  if (i.createAnchor === void 0) {
97850
- console.warn("Hit does not support creating an anchor", i), $e() && Cn("Hit does not support creating an anchor");
97851
+ console.warn("Hit does not support creating an anchor", i), Je() && Cn("Hit does not support creating an anchor");
97851
97852
  return;
97852
97853
  } else {
97853
97854
  const n = await i.createAnchor(t.viewerPose.transform);
@@ -99668,7 +99669,7 @@ const zy = (ZD = class extends ze {
99668
99669
  }), this.createQRCode) {
99669
99670
  const t = uO(Sp);
99670
99671
  if (t && t.createQRCodeButton === !1)
99671
- $e() && console.warn("WebXR: QRCode button is disabled in the Needle Menu component");
99672
+ Je() && console.warn("WebXR: QRCode button is disabled in the Needle Menu component");
99672
99673
  else if (!Ft.isMobileDevice()) {
99673
99674
  const i = Au.getOrCreate().createQRCode();
99674
99675
  this.addButton(i, 50);
@@ -100589,7 +100590,7 @@ const tz = (fE = class extends ze {
100589
100590
  const a = new eGe(), l = new PB(this.quickLookCompatible);
100590
100591
  let c;
100591
100592
  const h = [];
100592
- this.interactive && (h.push(new FO()), h.push(new $0()), globalThis.false && $.getComponentsInChildren(e, on).length > 0 && (this.physics ? (c = new QO(), h.push(c)) : $e() && console.warn("USDZExporter: Physics export is disabled, but there are active Rigidbody components in the scene. They will not be exported.")), h.push(new $B()), h.push(new YO()));
100593
+ this.interactive && (h.push(new FO()), h.push(new $0()), globalThis.false && $.getComponentsInChildren(e, on).length > 0 && (this.physics ? (c = new QO(), h.push(c)) : Je() && console.warn("USDZExporter: Physics export is disabled, but there are active Rigidbody components in the scene. They will not be exported.")), h.push(new $B()), h.push(new YO()));
100593
100594
  const u = [l, ...h, ...this.extensions], d = { self: this, exporter: a, extensions: u, object: e };
100594
100595
  Ii.report("export-usdz", "Invoking before-export"), this.dispatchEvent(new CustomEvent("before-export", { detail: d })), this.applyWebARSessionRoot(), this._previousTimeScale = this.context.time.timeScale, this.context.time.timeScale = 0, Ii.report("export-usdz", "auto export animations and audio sources");
100595
100596
  const f = new Array();
@@ -100600,7 +100601,7 @@ const tz = (fE = class extends ze {
100600
100601
  const S = $.getComponent(_, Us);
100601
100602
  return S && !S.enabled && (C = !1), C && g.includes(_) && (C = !1), C && $.getComponentInParent(_, Hu) && (C = !1), C && $.getComponentInParent(_, xp) && (C = !1), ml && !C && console.log("USDZExporter: Discarding object", _), C;
100602
100603
  }, a.beforeWritingDocument = () => {
100603
- if ($e() && l && c) {
100604
+ if (Je() && l && c) {
100604
100605
  const _ = l.animatedRoots;
100605
100606
  for (const C of _) {
100606
100607
  const S = $.getComponentsInChildren(C, on).filter((L) => L.enabled), M = $.getComponents(C, Wl).filter((L) => L.enabled && !L.isTrigger);
@@ -101774,7 +101775,7 @@ class Cm extends ze {
101774
101775
  recursive: !0,
101775
101776
  testObject: (r) => !this._addedObjects.includes(r)
101776
101777
  }).length)
101777
- return $e() && console.log(`Dropped outside of drop area for DropListener "${this.name}".`), !1;
101778
+ return Je() && 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 Q1 extends ze {
104569
104570
  }
104570
104571
  this._validateUrl();
104571
104572
  let t = this.url;
104572
- switch (!t.startsWith("mailto:") && t.includes("@") && (t = "mailto:" + t), $e() && hs("Open URL: " + t), this.mode) {
104573
+ switch (!t.startsWith("mailto:") && t.includes("@") && (t = "mailto:" + t), Je() && hs("Open URL: " + t), this.mode) {
104573
104574
  case 0:
104574
104575
  Ft.isSafari(), globalThis.open(t, "_blank");
104575
104576
  break;
@@ -104599,7 +104600,7 @@ class Q1 extends ze {
104599
104600
  this.clickable && !t.used && ((i = this.url) != null && i.length) && this.open();
104600
104601
  }
104601
104602
  _validateUrl() {
104602
- this.url && this.url.startsWith("www.") && ($e() && 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.") && (Je() && 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
  a5([
@@ -107697,7 +107698,7 @@ class eoe {
107697
107698
  const u = (e + t + i + n) * Hze, d = Math.floor(e + u), f = Math.floor(t + u), m = Math.floor(i + u), g = Math.floor(n + u), A = (d + f + m + g) * io, y = d - A, b = f - A, x = m - A, v = g - A, _ = e - y, C = t - b, S = i - x, M = n - v;
107698
107699
  let L = 0, w = 0, E = 0, B = 0;
107699
107700
  _ > C ? L++ : w++, _ > S ? L++ : E++, _ > M ? L++ : B++, C > S ? w++ : E++, C > M ? w++ : B++, S > M ? E++ : B++;
107700
- const P = L >= 3 ? 1 : 0, k = w >= 3 ? 1 : 0, U = E >= 3 ? 1 : 0, F = B >= 3 ? 1 : 0, H = L >= 2 ? 1 : 0, W = w >= 2 ? 1 : 0, se = E >= 2 ? 1 : 0, ue = B >= 2 ? 1 : 0, be = L >= 1 ? 1 : 0, Pe = w >= 1 ? 1 : 0, Oe = E >= 1 ? 1 : 0, ae = B >= 1 ? 1 : 0, Ae = _ - P + io, Se = C - k + io, Le = S - U + io, st = M - F + io, ot = _ - H + 2 * io, Ct = C - W + 2 * io, zt = S - se + 2 * io, ke = M - ue + 2 * io, Z = _ - be + 3 * io, Qe = C - Pe + 3 * io, Je = S - Oe + 3 * io, We = M - ae + 3 * io, nt = _ - 1 + 4 * io, Tt = C - 1 + 4 * io, mt = S - 1 + 4 * io, O = M - 1 + 4 * io, D = d & 255, he = f & 255, Ee = m & 255, Ne = g & 255;
107701
+ const P = L >= 3 ? 1 : 0, k = w >= 3 ? 1 : 0, U = E >= 3 ? 1 : 0, F = B >= 3 ? 1 : 0, H = L >= 2 ? 1 : 0, W = w >= 2 ? 1 : 0, se = E >= 2 ? 1 : 0, ue = B >= 2 ? 1 : 0, be = L >= 1 ? 1 : 0, Pe = w >= 1 ? 1 : 0, Oe = E >= 1 ? 1 : 0, ae = B >= 1 ? 1 : 0, Ae = _ - P + io, Se = C - k + io, Le = S - U + io, st = M - F + io, ot = _ - H + 2 * io, Ct = C - W + 2 * io, zt = S - se + 2 * io, ke = M - ue + 2 * io, Z = _ - be + 3 * io, Qe = C - Pe + 3 * io, je = S - Oe + 3 * io, We = M - ae + 3 * io, nt = _ - 1 + 4 * io, Tt = C - 1 + 4 * io, mt = S - 1 + 4 * io, O = M - 1 + 4 * io, D = d & 255, he = f & 255, Ee = m & 255, Ne = g & 255;
107701
107702
  let Re = 0.6 - _ * _ - C * C - S * S - M * M;
107702
107703
  if (Re < 0)
107703
107704
  o = 0;
@@ -107719,12 +107720,12 @@ class eoe {
107719
107720
  const Ge = r[D + H + r[he + W + r[Ee + se + r[Ne + ue]]]] % 32 * 4;
107720
107721
  et *= et, l = et * et * (Ks[Ge] * ot + Ks[Ge + 1] * Ct + Ks[Ge + 2] * zt + Ks[Ge + 3] * ke);
107721
107722
  }
107722
- let lt = 0.6 - Z * Z - Qe * Qe - Je * Je - We * We;
107723
+ let lt = 0.6 - Z * Z - Qe * Qe - je * je - We * We;
107723
107724
  if (lt < 0)
107724
107725
  c = 0;
107725
107726
  else {
107726
107727
  const Ge = r[D + be + r[he + Pe + r[Ee + Oe + r[Ne + ae]]]] % 32 * 4;
107727
- lt *= lt, c = lt * lt * (Ks[Ge] * Z + Ks[Ge + 1] * Qe + Ks[Ge + 2] * Je + Ks[Ge + 3] * We);
107728
+ lt *= lt, c = lt * lt * (Ks[Ge] * Z + Ks[Ge + 1] * Qe + Ks[Ge + 2] * je + Ks[Ge + 3] * We);
107728
107729
  }
107729
107730
  let jt = 0.6 - nt * nt - Tt * Tt - mt * mt - O * O;
107730
107731
  if (jt < 0)
@@ -110033,7 +110034,7 @@ class Nh extends ze {
110033
110034
  p(this, "lengthScale");
110034
110035
  }
110035
110036
  start() {
110036
- if (this.maxParticleSize !== 0.5 && this.minParticleSize !== 0 && $e()) {
110037
+ if (this.maxParticleSize !== 0.5 && this.minParticleSize !== 0 && Je()) {
110037
110038
  const t = `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(t);
110039
110040
  }
@@ -110615,7 +110616,7 @@ const qE = class extends ze {
110615
110616
  * ```
110616
110617
  */
110617
110618
  addBehaviour(e) {
110618
- return this._particleSystem ? (e instanceof cA && (e.system = this), $e() && console.log("add behaviour", e), this._particleSystem.addBehavior(e), !0) : !1;
110619
+ return this._particleSystem ? (e instanceof cA && (e.system = this), Je() && console.log("add behaviour", e), this._particleSystem.addBehavior(e), !0) : !1;
110619
110620
  }
110620
110621
  /** Remove a custom quarks behaviour from the particle system. **/
110621
110622
  removeBehaviour(e) {
@@ -110751,7 +110752,7 @@ const qE = class extends ze {
110751
110752
  var e;
110752
110753
  if (this._subEmitterSystems && this._particleSystem)
110753
110754
  for (const t of this._subEmitterSystems) {
110754
- t.particleSystem && (t.particleSystem.__internalAwake ? t.particleSystem.__internalAwake() : $e() && console.warn("SubParticleSystem serialization issue(?)", t.particleSystem, t));
110755
+ t.particleSystem && (t.particleSystem.__internalAwake ? t.particleSystem.__internalAwake() : Je() && console.warn("SubParticleSystem serialization issue(?)", t.particleSystem, t));
110755
110756
  const i = (e = t.particleSystem) == null ? void 0 : e._particleSystem;
110756
110757
  if (i) {
110757
110758
  t.particleSystem._isUsedAsSubsystem = !0;
@@ -110833,7 +110834,7 @@ function ioe(s, e) {
110833
110834
  if (!s.unsupported_scaling_mode) {
110834
110835
  s.unsupported_scaling_mode = !0;
110835
110836
  const t = "ParticleSystem scale mode " + ez[s.main.scalingMode] + " is not supported";
110836
- $e() && Cn(t), console.warn(t, s.name, s);
110837
+ Je() && Cn(t), console.warn(t, s.name, s);
110837
110838
  }
110838
110839
  e = Zn(s.gameObject, e);
110839
110840
  break;
@@ -114072,7 +114073,7 @@ class Hr extends ze {
114072
114073
  return this.clip;
114073
114074
  }
114074
114075
  set audioOutputMode(t) {
114075
- t !== this._audioOutputMode && (t === 1 && $e() && console.warn("VideoAudioOutputMode.AudioSource is not yet implemented"), this._audioOutputMode = t, this.updateVideoElementSettings());
114076
+ t !== this._audioOutputMode && (t === 1 && Je() && console.warn("VideoAudioOutputMode.AudioSource is not yet implemented"), this._audioOutputMode = t, this.updateVideoElementSettings());
114076
114077
  }
114077
114078
  get audioOutputMode() {
114078
114079
  return this._audioOutputMode;
@@ -114651,7 +114652,7 @@ class hA extends ze {
114651
114652
  }
114652
114653
  async internalShare(t) {
114653
114654
  if (this.context.connection.isInRoom === !1) {
114654
- console.warn("Can not start screensharing: requires network connection"), $e() && Cn("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"), Je() && Cn("Can not start screensharing: requires network connection. Add a SyncedRoom component or join a room first.");
114655
114656
  return;
114656
114657
  }
114657
114658
  if (t != null && t.device && (this.device = t.device), !this.videoPlayer && this.requiresVideoPlayer && (this._videoPlayer || (this._videoPlayer = $.getComponent(this.gameObject, Hr) ?? void 0), this.videoPlayer || this._ensureVideoPlayer(), !this.videoPlayer)) {
@@ -114791,7 +114792,7 @@ class hA extends ze {
114791
114792
  } else
114792
114793
  console.error("Failed to get user media", a.message, a.code, a);
114793
114794
  }
114794
- !r && $e() && (Cn("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", n, this.deviceName, "Using deviceFilter? " + this.deviceFilter != null, "Using options? " + i != null, "Using deviceName? " + this.deviceName != null, "Using options.deviceId? " + (i == null ? void 0 : i.deviceId) != null, "Using options.deviceFilter? " + (i == null ? void 0 : i.deviceFilter) != null));
114795
+ !r && Je() && (Cn("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", n, this.deviceName, "Using deviceFilter? " + this.deviceFilter != null, "Using options? " + i != null, "Using deviceName? " + this.deviceName != null, "Using options.deviceId? " + (i == null ? void 0 : i.deviceId) != null, "Using options.deviceFilter? " + (i == null ? void 0 : i.deviceFilter) != null));
114795
114796
  }
114796
114797
  // private _cameraSelectionWindow : Window | null = null;
114797
114798
  // private openWindowToSelectCamera(){
@@ -115924,7 +115925,7 @@ const dz = (KD = class extends ze {
115924
115925
  for (const n in this.remoteCams) {
115925
115926
  const r = this.remoteCams[n], o = this.context.time.realtimeSinceStartup - r.lastUpdate;
115926
115927
  if (!r || o > this._camTimeoutInSeconds) {
115927
- $e() && console.log("Remote cam timeout", n), r != null && r.obj && $.destroy(r.obj), delete this.remoteCams[n], r && delete this.userToCamMap[r.userId], dz.instances.push(r), this.context.players.removePlayerView(r.userId, i0.Browser);
115928
+ Je() && console.log("Remote cam timeout", n), r != null && r.obj && $.destroy(r.obj), delete this.remoteCams[n], r && delete this.userToCamMap[r.userId], dz.instances.push(r), this.context.players.removePlayerView(r.userId, i0.Browser);
115928
115929
  continue;
115929
115930
  }
115930
115931
  }
@@ -116073,7 +116074,7 @@ class Ju extends ze {
116073
116074
  return this.tryJoinRoom(t + 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 && !i ? ((yD || $e()) && console.warn('[SyncedRoom] Missing required room parameter "' + this.urlParameterName + `" in url - will not connect.
116077
+ return this.requireRoomParameter && !i ? ((yD || Je()) && 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) : (yD && 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()) : $e() && 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()) : Je() && 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 gP extends ze {
116551
116552
  }
116552
116553
  apply() {
116553
116554
  var t;
116554
- if (VT && console.log("Apply PostProcessing " + this.name), $e() && (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, (t = this.sharedProfile) != null && t.components) {
116555
+ if (VT && console.log("Apply PostProcessing " + this.name), Je() && (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, (t = this.sharedProfile) != null && t.components) {
116555
116556
  const i = this.sharedProfile.components;
116556
116557
  for (const n of i)
116557
116558
  n.active && !this._activeEffects.includes(n) && this._activeEffects.push(n);
@@ -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
- `), $e() && hB("No camera feed available - please request the 'camera-access' feature before starting WebXR or add the ARCameraBackground component to your scene"), !1;
116641
+ `), Je() && hB("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 n = t.getViewerPose(s.xr.getReferenceSpace());
116642
116643
  if (n)
116643
116644
  for (const r of n.views)
@@ -117072,7 +117073,7 @@ class R3e {
117072
117073
  }
117073
117074
  onBeforeBuildDocument(e) {
117074
117075
  const t = $.findObjectOfType(SS);
117075
- !t || !t.trackedImages || t.trackedImages.length > 1 && ($e() && Cn("USDZ: Only one tracked image is supported."), console.warn("USDZ: Only one tracked image is supported."));
117076
+ !t || !t.trackedImages || t.trackedImages.length > 1 && (Je() && Cn("USDZ: Only one tracked image is supported."), console.warn("USDZ: Only one tracked image is supported."));
117076
117077
  }
117077
117078
  onAfterSerialize(e) {
117078
117079
  e.files["image_tracking/" + this.filename] = this.imageData;
@@ -118285,7 +118286,7 @@ function Q3e(s, e) {
118285
118286
  return console.debug("OBJ detected (exported by ZBrush)"), "obj";
118286
118287
  if (t[0] == 109 && t[1] == 116 && t[2] == 108 && t[3] == 108 && t[4] == 105 && t[5] == 98)
118287
118288
  return console.debug("OBJ detected (mtllib)"), "obj";
118288
- if ($e() || z2) {
118289
+ if (Je() || z2) {
118289
118290
  const i = new TextDecoder().decode(s.slice(0, 16));
118290
118291
  console.debug('Could not determine file type from binary data: "' + i + '..."', t);
118291
118292
  } else
@@ -118754,7 +118755,7 @@ changed from "`, i, '" to "', n, '"'), this.onLoad();
118754
118755
  const y = this.getAttribute("hide-loading-overlay");
118755
118756
  y != null && y !== "0" && (o = !1);
118756
118757
  }
118757
- o === !1 && !r && ($e() || (o = !0), console.warn("Needle Engine: You need a commercial license to override the default loading view. Visit https://needle.tools/pricing"), $e() && Cn('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 HE(this)), o && (this._didFullyLoad !== !0 ? (g = this._loadingView) == null || g.onLoadingBegin("begin load") : setTimeout(() => {
118758
+ o === !1 && !r && (Je() || (o = !0), console.warn("Needle Engine: You need a commercial license to override the default loading view. Visit https://needle.tools/pricing"), Je() && Cn('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 HE(this)), o && (this._didFullyLoad !== !0 ? (g = this._loadingView) == null || g.onLoadingBegin("begin load") : setTimeout(() => {
118758
118759
  this._loadingView && this._loadingProgress01 < 0.3 && this._loadId === i && this._loadingView.onLoadingBegin("begin load");
118759
118760
  }, 300)), bs && console.warn(`--------------
118760
118761
  Needle Engine: Begin loading ` + i + `
@@ -118989,9 +118990,9 @@ function eOe(s) {
118989
118990
  let d = t[u];
118990
118991
  (d === "_" || d === "-") && (d = " "), !(d === " " && l.length <= 0 || h.includes(d) || (l.length === 0 && (d = d.toUpperCase()), c && d === " ")) && (c && (d = d.toUpperCase()), c = !1, l += d, d === " " && (c = !0));
118991
118992
  }
118992
- return $e() && t !== l && console.debug('Generated display name: "' + t + '" → "' + l + '"'), l.trim();
118993
+ return Je() && t !== l && console.debug('Generated display name: "' + t + '" → "' + l + '"'), l.trim();
118993
118994
  }
118994
- return $e() && console.debug("Loading: use default name", t), t;
118995
+ return Je() && console.debug("Loading: use default name", t), t;
118995
118996
  }
118996
118997
  const tOe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
118997
118998
  __proto__: null,
@@ -120815,7 +120816,7 @@ const HC = class {
120815
120816
  const c = l.parent();
120816
120817
  c && c.numColliders() <= 0 && (c[Ua] || (n = this.world) == null || n.removeRigidBody(c));
120817
120818
  } else
120818
- a instanceof TY && (a.numColliders() <= 0 ? (r = this.world) == null || r.removeRigidBody(a) : $e() && (a.did_log_removing || setTimeout(() => {
120819
+ a instanceof TY && (a.numColliders() <= 0 ? (r = this.world) == null || r.removeRigidBody(a) : Je() && (a.did_log_removing || setTimeout(() => {
120819
120820
  a.numColliders() > 0 && (a.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"));
120820
120821
  }, 1)));
120821
120822
  }
@@ -121078,7 +121079,7 @@ const HC = class {
121078
121079
  if (this._meshCache.has(f))
121079
121080
  co && console.warn("Use cached mesh collider"), o = this._meshCache.get(f);
121080
121081
  else {
121081
- (co || $e()) && console.warn(`Your MeshCollider "${e.name}" is scaled: consider applying the scale to the collider mesh instead (${n.x}, ${n.y}, ${n.z})`);
121082
+ (co || Je()) && console.warn(`Your MeshCollider "${e.name}" is scaled: consider applying the scale to the collider mesh instead (${n.x}, ${n.y}, ${n.z})`);
121082
121083
  const m = new Float32Array(o.length);
121083
121084
  for (let g = 0; g < o.length; g += 3)
121084
121085
  m[g] = o[g] * n.x, m[g + 1] = o[g + 1] * n.y, m[g + 2] = o[g + 2] * n.z;
@@ -121314,7 +121315,7 @@ Error:`, a), null;
121314
121315
  }
121315
121316
  const r = i.translation(), o = i.rotation();
121316
121317
  if (Number.isNaN(r.x) || Number.isNaN(o.x)) {
121317
- !n.__COLLIDER_NAN && $e() && (console.warn("Collider has NaN values", n.name, n.gameObject, i), n.__COLLIDER_NAN = !0);
121318
+ !n.__COLLIDER_NAN && Je() && (console.warn("Collider has NaN values", n.name, n.gameObject, i), n.__COLLIDER_NAN = !0);
121318
121319
  continue;
121319
121320
  }
121320
121321
  const a = t.center;
@@ -121669,7 +121670,7 @@ function wOe(s, e, t) {
121669
121670
  const i = new Set(t);
121670
121671
  return Array.from(i);
121671
121672
  }
121672
- const GY = "needle-button", wD = $e();
121673
+ const GY = "needle-button", wD = Je();
121673
121674
  var Ug, Og, Zg, ya, kd, Bb, q2, uae, $2, dae, BS;
121674
121675
  class hae extends HTMLElement {
121675
121676
  constructor() {
@@ -126340,7 +126341,7 @@ export {
126340
126341
  JWe as isDebugMode,
126341
126342
  tHe as isDesktop,
126342
126343
  nx as isDestroyed,
126343
- $e as isDevEnvironment,
126344
+ Je as isDevEnvironment,
126344
126345
  P9e as isDisposed,
126345
126346
  bQe as isExporting,
126346
126347
  $xe as isHostedOnGlitch,