@tomorrowevening/hermes 0.1.16 → 0.1.17

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.
package/dist/hermes.es.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { types as le, getProject as xx, createRafDriver as _x } from "@theatre/core";
2
- import Wm, { useState as Ae, useEffect as wn, useRef as We, useMemo as Ca, Component as qa, createRef as Ni, forwardRef as bx } from "react";
3
- import { BufferGeometry as zi, Float32BufferAttribute as Vs, OrthographicCamera as dl, Texture as Gh, Scene as jm, MeshBasicMaterial as Sn, Mesh as Y, LinearSRGBColorSpace as Ia, ObjectLoader as Tx, AnimationMixer as Sx, AnimationClip as vx, Matrix4 as Ya, AlwaysStencilFunc as Zd, ReplaceStencilOp as Dn, NotEqualStencilFunc as Kd, EqualStencilFunc as Qd, KeepStencilOp as On, NormalBlending as qm, AddEquation as Xa, SrcAlphaFactor as Il, OneMinusSrcAlphaFactor as Ll, CustomBlending as Ul, OneFactor as kl, DstColorFactor as Mu, OneMinusDstColorFactor as Au, WebGLRenderTarget as Ym, RGBAFormat as wx, EventDispatcher as Xm, RepeatWrapping as Jd, Color as En, ColorManagement as or, FrontSide as Ex, BackSide as Zm, DoubleSide as Ru, ZeroFactor as Km, SrcColorFactor as Qm, OneMinusSrcColorFactor as Jm, DstAlphaFactor as eg, OneMinusDstAlphaFactor as tg, SrcAlphaSaturateFactor as Cx, ConstantColorFactor as sg, OneMinusConstantColorFactor as ig, ConstantAlphaFactor as ng, OneMinusConstantAlphaFactor as rg, SubtractEquation as Mx, ReverseSubtractEquation as Ax, MinEquation as Rx, MaxEquation as Nx, NoBlending as Px, AdditiveBlending as Fx, SubtractiveBlending as Dx, MultiplyBlending as Ox, Line as Us, LineBasicMaterial as Nu, Controls as ag, Vector3 as Z, MOUSE as mr, TOUCH as lr, Quaternion as es, Spherical as Vh, Vector2 as xt, Ray as Bx, Plane as Ix, MathUtils as Lx, ShaderMaterial as og, GLSL3 as Ux, PlaneGeometry as lg, Raycaster as La, Object3D as Er, CylinderGeometry as zt, BoxGeometry as St, OctahedronGeometry as ro, TorusGeometry as Gr, SphereGeometry as cg, Euler as hg, CatmullRomCurve3 as ep, Group as kx, AxesHelper as zx, MeshDepthMaterial as Gx, MeshNormalMaterial as Vx, Sphere as Hx, Box3 as $x, Vector4 as Wx, WebGLRenderer as ga, PerspectiveCamera as tp, CameraHelper as jx, SkinnedMesh as qx, SpotLightHelper as Yx, PointLightHelper as Xx, HemisphereLightHelper as Zx, DirectionalLightHelper as Kx, Clock as Qx, SkeletonHelper as Jx, SRGBColorSpace as sp, NoToneMapping as ip, NoColorSpace as e_, LinearToneMapping as t_, ReinhardToneMapping as s_, CineonToneMapping as i_, ACESFilmicToneMapping as n_, AgXToneMapping as r_, NeutralToneMapping as a_, CustomToneMapping as o_ } from "three";
2
+ import Wm, { useState as Ae, useEffect as wn, useRef as We, useMemo as Ma, Component as qa, createRef as Ni, forwardRef as bx } from "react";
3
+ import { BufferGeometry as zi, Float32BufferAttribute as Vs, OrthographicCamera as dl, Texture as Gh, Scene as jm, MeshBasicMaterial as Sn, Mesh as Y, LinearSRGBColorSpace as Ia, ObjectLoader as Tx, AnimationMixer as Sx, AnimationClip as vx, Matrix4 as Ya, AlwaysStencilFunc as Zd, ReplaceStencilOp as Dn, NotEqualStencilFunc as Kd, EqualStencilFunc as Qd, KeepStencilOp as On, NormalBlending as qm, AddEquation as Xa, SrcAlphaFactor as Il, OneMinusSrcAlphaFactor as Ll, CustomBlending as Ul, OneFactor as kl, DstColorFactor as Cu, OneMinusDstColorFactor as Au, WebGLRenderTarget as Ym, RGBAFormat as wx, EventDispatcher as Xm, RepeatWrapping as Jd, Color as En, ColorManagement as or, FrontSide as Ex, BackSide as Zm, DoubleSide as Ru, ZeroFactor as Km, SrcColorFactor as Qm, OneMinusSrcColorFactor as Jm, DstAlphaFactor as eg, OneMinusDstAlphaFactor as tg, SrcAlphaSaturateFactor as Mx, ConstantColorFactor as sg, OneMinusConstantColorFactor as ig, ConstantAlphaFactor as ng, OneMinusConstantAlphaFactor as rg, SubtractEquation as Cx, ReverseSubtractEquation as Ax, MinEquation as Rx, MaxEquation as Nx, NoBlending as Px, AdditiveBlending as Fx, SubtractiveBlending as Dx, MultiplyBlending as Ox, Line as Us, LineBasicMaterial as Nu, Controls as ag, Vector3 as Z, MOUSE as mr, TOUCH as lr, Quaternion as es, Spherical as Vh, Vector2 as xt, Ray as Bx, Plane as Ix, MathUtils as Lx, ShaderMaterial as og, GLSL3 as Ux, PlaneGeometry as lg, Raycaster as La, Object3D as Er, CylinderGeometry as zt, BoxGeometry as St, OctahedronGeometry as ro, TorusGeometry as Gr, SphereGeometry as cg, Euler as hg, CatmullRomCurve3 as ep, Group as kx, AxesHelper as zx, MeshDepthMaterial as Gx, MeshNormalMaterial as Vx, Sphere as Hx, Box3 as $x, Vector4 as Wx, WebGLRenderer as ga, PerspectiveCamera as tp, CameraHelper as jx, SkinnedMesh as qx, SpotLightHelper as Yx, PointLightHelper as Xx, HemisphereLightHelper as Zx, DirectionalLightHelper as Kx, Clock as Qx, SkeletonHelper as Jx, SRGBColorSpace as sp, NoToneMapping as ip, NoColorSpace as e_, LinearToneMapping as t_, ReinhardToneMapping as s_, CineonToneMapping as i_, ACESFilmicToneMapping as n_, AgXToneMapping as r_, NeutralToneMapping as a_, CustomToneMapping as o_ } from "three";
4
4
  const pl = () => {
5
5
  }, xP = () => {
6
6
  };
@@ -167,9 +167,9 @@ const f_ = ({ mobileTiers: a = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
167
167
  if ($ === 0) return;
168
168
  const q = T.split(/[.,()\[\]/\s]/g).sort().filter((Te, lt, Ut) => lt === 0 || Te !== Ut[lt - 1]).join(" ");
169
169
  let X, [Ee, , , , de] = $ > 1 ? W.map((Te) => [Te, d_(q, Te[2])]).sort(([, Te], [, lt]) => Te - lt)[0][0] : W[0], ye = Number.MAX_VALUE;
170
- const { devicePixelRatio: se } = window, Ce = c.width * se * c.height * se;
170
+ const { devicePixelRatio: se } = window, Me = c.width * se * c.height * se;
171
171
  for (const Te of de) {
172
- const [lt, Ut] = Te, kr = lt * Ut, Nn = Math.abs(Ce - kr);
172
+ const [lt, Ut] = Te, kr = lt * Ut, Nn = Math.abs(Me - kr);
173
173
  Nn < ye && (ye = Nn, X = Te);
174
174
  }
175
175
  if (!X) return;
@@ -294,7 +294,7 @@ function EP() {
294
294
  });
295
295
  }, []), a;
296
296
  }
297
- async function CP() {
297
+ async function MP() {
298
298
  for (; !document.getElementById("theatrejs-studio-root"); )
299
299
  await new Promise((s) => setTimeout(s, 100));
300
300
  const a = document.getElementById("theatrejs-studio-root");
@@ -315,7 +315,7 @@ async function CP() {
315
315
  }
316
316
  }
317
317
  }
318
- function MP(a, e, t, s) {
318
+ function CP(a, e, t, s) {
319
319
  s.sheetObject(a, e, {
320
320
  transform: {
321
321
  position: {
@@ -759,13 +759,13 @@ function kP(a) {
759
759
  a.blending = Ul, a.blendEquation = Xa, a.blendSrc = Il, a.blendDst = kl, a.needsUpdate = !0;
760
760
  }
761
761
  function zP(a) {
762
- a.blending = Ul, a.blendEquation = Xa, a.blendSrc = Mu, a.blendDst = Ll, a.needsUpdate = !0;
762
+ a.blending = Ul, a.blendEquation = Xa, a.blendSrc = Cu, a.blendDst = Ll, a.needsUpdate = !0;
763
763
  }
764
764
  function GP(a) {
765
765
  a.blending = Ul, a.blendEquation = Xa, a.blendSrc = Au, a.blendDst = kl, a.needsUpdate = !0;
766
766
  }
767
767
  let jh = [];
768
- function C_(a, e, t = !0) {
768
+ function M_(a, e, t = !0) {
769
769
  _n.renderer = e.renderer;
770
770
  const s = [];
771
771
  s.push({
@@ -892,7 +892,7 @@ function C_(a, e, t = !0) {
892
892
  }
893
893
  function VP(a, e) {
894
894
  a.passes.forEach((t) => {
895
- C_(t, e);
895
+ M_(t, e);
896
896
  });
897
897
  }
898
898
  function HP(a) {
@@ -973,7 +973,7 @@ const Ln = Fu([
973
973
  "clientY",
974
974
  "pageX",
975
975
  "pageY"
976
- ]), M_ = Fu([
976
+ ]), C_ = Fu([
977
977
  "clientX",
978
978
  "clientY",
979
979
  "deltaX",
@@ -986,7 +986,7 @@ const Ln = Fu([
986
986
  "keyCode"
987
987
  ]);
988
988
  function R_(a, e) {
989
- a.preventDefault(), M_(a, e);
989
+ a.preventDefault(), C_(a, e);
990
990
  }
991
991
  function N_(a) {
992
992
  a.preventDefault();
@@ -2248,14 +2248,14 @@ function $_() {
2248
2248
  }
2249
2249
  return null;
2250
2250
  }
2251
- var q = Object.assign, X = 0, Ee, de, ye, se, Ce, Ge, ot;
2251
+ var q = Object.assign, X = 0, Ee, de, ye, se, Me, Ge, ot;
2252
2252
  function Te() {
2253
2253
  }
2254
2254
  Te.__reactDisabledLog = !0;
2255
2255
  function lt() {
2256
2256
  {
2257
2257
  if (X === 0) {
2258
- Ee = console.log, de = console.info, ye = console.warn, se = console.error, Ce = console.group, Ge = console.groupCollapsed, ot = console.groupEnd;
2258
+ Ee = console.log, de = console.info, ye = console.warn, se = console.error, Me = console.group, Ge = console.groupCollapsed, ot = console.groupEnd;
2259
2259
  var S = {
2260
2260
  configurable: !0,
2261
2261
  enumerable: !0,
@@ -2297,7 +2297,7 @@ function $_() {
2297
2297
  value: se
2298
2298
  }),
2299
2299
  group: q({}, S, {
2300
- value: Ce
2300
+ value: Me
2301
2301
  }),
2302
2302
  groupCollapsed: q({}, S, {
2303
2303
  value: Ge
@@ -2750,15 +2750,15 @@ var pp;
2750
2750
  function W_() {
2751
2751
  return pp || (pp = 1, process.env.NODE_ENV === "production" ? oo.exports = H_() : oo.exports = $_()), oo.exports;
2752
2752
  }
2753
- var C = W_();
2753
+ var M = W_();
2754
2754
  function mg(a) {
2755
- return a.title.search("<") > -1 ? /* @__PURE__ */ C.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: a.title } }) : /* @__PURE__ */ C.jsx("button", { children: a.title });
2755
+ return a.title.search("<") > -1 ? /* @__PURE__ */ M.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: a.title } }) : /* @__PURE__ */ M.jsx("button", { children: a.title });
2756
2756
  }
2757
- const j_ = /* @__PURE__ */ C.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
2758
- /* @__PURE__ */ C.jsx("circle", { cx: "7", cy: "7", r: "6" }),
2759
- /* @__PURE__ */ C.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
2760
- /* @__PURE__ */ C.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
2761
- ] }), q_ = /* @__PURE__ */ C.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ C.jsx(
2757
+ const j_ = /* @__PURE__ */ M.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
2758
+ /* @__PURE__ */ M.jsx("circle", { cx: "7", cy: "7", r: "6" }),
2759
+ /* @__PURE__ */ M.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
2760
+ /* @__PURE__ */ M.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
2761
+ ] }), q_ = /* @__PURE__ */ M.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ M.jsx(
2762
2762
  "path",
2763
2763
  {
2764
2764
  d: `M10.43,4H3.57C3.26,4,3,4.22,3,4.5v1C3,5.78,3.26,6,3.57,6h6.86C10.74,6,11,5.78,11,5.5v-1\r
@@ -2767,7 +2767,7 @@ C11,8.22,10.74,8,10.43,8z`
2767
2767
  }
2768
2768
  ) });
2769
2769
  function Y_(a) {
2770
- return /* @__PURE__ */ C.jsx(
2770
+ return /* @__PURE__ */ M.jsx(
2771
2771
  "li",
2772
2772
  {
2773
2773
  className: `reorder-item ${a.draggingIndex === a.index ? "dragging" : ""}`,
@@ -2777,10 +2777,10 @@ function Y_(a) {
2777
2777
  e.preventDefault(), a.onDragOver(a.index);
2778
2778
  },
2779
2779
  onDragEnd: a.onDragEnd,
2780
- children: /* @__PURE__ */ C.jsxs("div", { children: [
2780
+ children: /* @__PURE__ */ M.jsxs("div", { children: [
2781
2781
  q_,
2782
- /* @__PURE__ */ C.jsx("span", { children: a.title }),
2783
- /* @__PURE__ */ C.jsx("button", { className: "closeIcon", onClick: () => a.onDelete(a.index), children: j_ })
2782
+ /* @__PURE__ */ M.jsx("span", { children: a.title }),
2783
+ /* @__PURE__ */ M.jsx("button", { className: "closeIcon", onClick: () => a.onDelete(a.index), children: j_ })
2784
2784
  ] })
2785
2785
  }
2786
2786
  );
@@ -2801,9 +2801,9 @@ function X_(a) {
2801
2801
  a.onDragComplete(s), r(null);
2802
2802
  };
2803
2803
  let d = "dropdown draggable";
2804
- return a.subdropdown && (d += " subdropdown"), /* @__PURE__ */ C.jsxs("div", { className: d, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
2805
- /* @__PURE__ */ C.jsx(mg, { title: a.title }),
2806
- /* @__PURE__ */ C.jsx("ul", { className: "reorder-list", style: { display: e ? "block" : "none" }, children: s.map((p, f) => /* @__PURE__ */ C.jsx(
2804
+ return a.subdropdown && (d += " subdropdown"), /* @__PURE__ */ M.jsxs("div", { className: d, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
2805
+ /* @__PURE__ */ M.jsx(mg, { title: a.title }),
2806
+ /* @__PURE__ */ M.jsx("ul", { className: "reorder-list", style: { display: e ? "block" : "none" }, children: s.map((p, f) => /* @__PURE__ */ M.jsx(
2807
2807
  Y_,
2808
2808
  {
2809
2809
  title: p,
@@ -2821,18 +2821,18 @@ function X_(a) {
2821
2821
  function Z_(a) {
2822
2822
  const [e, t] = Ae(!1), s = [];
2823
2823
  a.options.map((n, r) => {
2824
- a.onSelect !== void 0 && (n.onSelect = a.onSelect), s.push(/* @__PURE__ */ C.jsx(K_, { option: n }, r));
2824
+ a.onSelect !== void 0 && (n.onSelect = a.onSelect), s.push(/* @__PURE__ */ M.jsx(K_, { option: n }, r));
2825
2825
  });
2826
2826
  let i = "dropdown";
2827
- return a.subdropdown && (i += " subdropdown"), /* @__PURE__ */ C.jsxs(
2827
+ return a.subdropdown && (i += " subdropdown"), /* @__PURE__ */ M.jsxs(
2828
2828
  "div",
2829
2829
  {
2830
2830
  className: i,
2831
2831
  onMouseEnter: () => t(!0),
2832
2832
  onMouseLeave: () => t(!1),
2833
2833
  children: [
2834
- /* @__PURE__ */ C.jsx(mg, { title: a.title }),
2835
- /* @__PURE__ */ C.jsx(
2834
+ /* @__PURE__ */ M.jsx(mg, { title: a.title }),
2835
+ /* @__PURE__ */ M.jsx(
2836
2836
  "ul",
2837
2837
  {
2838
2838
  style: { visibility: e ? "visible" : "hidden" },
@@ -2848,7 +2848,7 @@ function K_(a) {
2848
2848
  let i;
2849
2849
  switch (e.type) {
2850
2850
  case "draggable":
2851
- i = /* @__PURE__ */ C.jsx(
2851
+ i = /* @__PURE__ */ M.jsx(
2852
2852
  X_,
2853
2853
  {
2854
2854
  title: e.title,
@@ -2861,7 +2861,7 @@ function K_(a) {
2861
2861
  );
2862
2862
  break;
2863
2863
  case "dropdown":
2864
- i = /* @__PURE__ */ C.jsx(
2864
+ i = /* @__PURE__ */ M.jsx(
2865
2865
  Z_,
2866
2866
  {
2867
2867
  title: e.title,
@@ -2872,7 +2872,7 @@ function K_(a) {
2872
2872
  );
2873
2873
  break;
2874
2874
  case "option":
2875
- i = /* @__PURE__ */ C.jsx(
2875
+ i = /* @__PURE__ */ M.jsx(
2876
2876
  "button",
2877
2877
  {
2878
2878
  onClick: () => {
@@ -2883,14 +2883,14 @@ function K_(a) {
2883
2883
  );
2884
2884
  break;
2885
2885
  }
2886
- return /* @__PURE__ */ C.jsx("li", { className: t === e.title ? "selected" : "", children: i }, gt());
2886
+ return /* @__PURE__ */ M.jsx("li", { className: t === e.title ? "selected" : "", children: i }, gt());
2887
2887
  }
2888
- function Ma(a) {
2888
+ function Ca(a) {
2889
2889
  const [e, t] = Ae(a.open !== void 0 ? a.open : !1), [s, i] = Ae(a.visible !== void 0 ? a.visible : !1), n = !e || a.children === void 0, r = () => {
2890
2890
  a.three.dispatchEvent({ type: ce.REMOVE_SCENE, value: a.scene });
2891
2891
  };
2892
- return /* @__PURE__ */ C.jsxs("div", { className: `accordion ${n ? "hide" : ""}`, children: [
2893
- /* @__PURE__ */ C.jsxs(
2892
+ return /* @__PURE__ */ M.jsxs("div", { className: `accordion ${n ? "hide" : ""}`, children: [
2893
+ /* @__PURE__ */ M.jsxs(
2894
2894
  "button",
2895
2895
  {
2896
2896
  className: "toggle",
@@ -2899,19 +2899,19 @@ function Ma(a) {
2899
2899
  a.onToggle !== void 0 && a.onToggle(o), t(o);
2900
2900
  },
2901
2901
  children: [
2902
- /* @__PURE__ */ C.jsx(
2902
+ /* @__PURE__ */ M.jsx(
2903
2903
  "p",
2904
2904
  {
2905
2905
  className: `status ${e ? "open" : ""}`,
2906
2906
  children: "Toggle"
2907
2907
  }
2908
2908
  ),
2909
- /* @__PURE__ */ C.jsx("p", { className: "label", children: fl(a.label) })
2909
+ /* @__PURE__ */ M.jsx("p", { className: "label", children: fl(a.label) })
2910
2910
  ]
2911
2911
  }
2912
2912
  ),
2913
- a.onRefresh ? /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
2914
- /* @__PURE__ */ C.jsx(
2913
+ a.onRefresh ? /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
2914
+ /* @__PURE__ */ M.jsx(
2915
2915
  "button",
2916
2916
  {
2917
2917
  className: "visibility",
@@ -2927,11 +2927,11 @@ function Ma(a) {
2927
2927
  }
2928
2928
  }
2929
2929
  ),
2930
- /* @__PURE__ */ C.jsx("button", { className: "refresh", onClick: a.onRefresh }),
2931
- /* @__PURE__ */ C.jsx("button", { className: "remove", onClick: r })
2930
+ /* @__PURE__ */ M.jsx("button", { className: "refresh", onClick: a.onRefresh }),
2931
+ /* @__PURE__ */ M.jsx("button", { className: "remove", onClick: r })
2932
2932
  ] }) : null,
2933
2933
  a.button,
2934
- /* @__PURE__ */ C.jsx("div", { className: e ? "open" : "", children: /* @__PURE__ */ C.jsx("div", { children: a.children }) }, Math.random())
2934
+ /* @__PURE__ */ M.jsx("div", { className: e ? "open" : "", children: /* @__PURE__ */ M.jsx("div", { children: a.children }) }, Math.random())
2935
2935
  ] });
2936
2936
  }
2937
2937
  function gg(a) {
@@ -2939,7 +2939,7 @@ function gg(a) {
2939
2939
  return console.log("Hermes - No child attached"), null;
2940
2940
  const e = We(null), [t, s] = Ae(!1), i = a.child.children.length > 0, n = [];
2941
2941
  return a.child.children.length > 0 && a.child.children.map((r, o) => {
2942
- n.push(/* @__PURE__ */ C.jsx(gg, { child: r, three: a.three }, o));
2942
+ n.push(/* @__PURE__ */ M.jsx(gg, { child: r, three: a.three }, o));
2943
2943
  }), wn(() => {
2944
2944
  if (a.child) {
2945
2945
  const r = a.child.uuid.split(".")[0], o = a.three.getScene(r);
@@ -2953,9 +2953,9 @@ function gg(a) {
2953
2953
  else
2954
2954
  console.log(`Hermes (ChildObject) - Can't find Scene: ${r} with child UUID: ${a.child.uuid}`, a.three.scenes, a.three.scene, o);
2955
2955
  }
2956
- }, [t]), /* @__PURE__ */ C.jsxs("div", { className: "childObject", children: [
2957
- /* @__PURE__ */ C.jsxs("div", { className: "child", children: [
2958
- i ? /* @__PURE__ */ C.jsx(
2956
+ }, [t]), /* @__PURE__ */ M.jsxs("div", { className: "childObject", children: [
2957
+ /* @__PURE__ */ M.jsxs("div", { className: "child", children: [
2958
+ i ? /* @__PURE__ */ M.jsx(
2959
2959
  "button",
2960
2960
  {
2961
2961
  className: "status",
@@ -2967,7 +2967,7 @@ function gg(a) {
2967
2967
  }
2968
2968
  }
2969
2969
  ) : null,
2970
- /* @__PURE__ */ C.jsx(
2970
+ /* @__PURE__ */ M.jsx(
2971
2971
  "button",
2972
2972
  {
2973
2973
  className: "name",
@@ -2980,7 +2980,7 @@ function gg(a) {
2980
2980
  children: a.child.name.length > 0 ? `${a.child.name} (${a.child.type})` : `${a.child.type}::${a.child.uuid}`
2981
2981
  }
2982
2982
  ),
2983
- /* @__PURE__ */ C.jsx(
2983
+ /* @__PURE__ */ M.jsx(
2984
2984
  "button",
2985
2985
  {
2986
2986
  className: "visibility",
@@ -3001,16 +3001,16 @@ function gg(a) {
3001
3001
  }
3002
3002
  }
3003
3003
  ),
3004
- /* @__PURE__ */ C.jsx("div", { className: `icon ${U_(a.child)}` })
3004
+ /* @__PURE__ */ M.jsx("div", { className: `icon ${U_(a.child)}` })
3005
3005
  ] }),
3006
- /* @__PURE__ */ C.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ C.jsx("div", { className: "container", children: n }) })
3006
+ /* @__PURE__ */ M.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ M.jsx("div", { className: "container", children: n }) })
3007
3007
  ] }, Math.random());
3008
3008
  }
3009
3009
  function yc(a) {
3010
3010
  const e = [];
3011
3011
  return a.child?.children.map((t, s) => {
3012
- e.push(/* @__PURE__ */ C.jsx(gg, { child: t, scene: a.scene, three: a.three }, s));
3013
- }), /* @__PURE__ */ C.jsx("div", { className: `scene ${a.class !== void 0 ? a.class : ""}`, children: e });
3012
+ e.push(/* @__PURE__ */ M.jsx(gg, { child: t, scene: a.scene, three: a.three }, s));
3013
+ }), /* @__PURE__ */ M.jsx("div", { className: `scene ${a.class !== void 0 ? a.class : ""}`, children: e });
3014
3014
  }
3015
3015
  function ya(a) {
3016
3016
  const [e, t] = Ae(a.defaultValue);
@@ -3048,8 +3048,8 @@ function bn(a) {
3048
3048
  onChange: (n) => {
3049
3049
  i(n), a.onChange !== void 0 && a.onChange(a.prop, n);
3050
3050
  }
3051
- }), /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
3052
- a.type === "number" && /* @__PURE__ */ C.jsx(
3051
+ }), /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
3052
+ a.type === "number" && /* @__PURE__ */ M.jsx(
3053
3053
  "input",
3054
3054
  {
3055
3055
  alt: a.alt,
@@ -3069,8 +3069,8 @@ function bn(a) {
3069
3069
  }
3070
3070
  }
3071
3071
  ),
3072
- a.type === "range" && /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
3073
- /* @__PURE__ */ C.jsx(
3072
+ a.type === "range" && /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
3073
+ /* @__PURE__ */ M.jsx(
3074
3074
  "input",
3075
3075
  {
3076
3076
  type: "text",
@@ -3086,7 +3086,7 @@ function bn(a) {
3086
3086
  }
3087
3087
  }
3088
3088
  ),
3089
- /* @__PURE__ */ C.jsx(
3089
+ /* @__PURE__ */ M.jsx(
3090
3090
  "input",
3091
3091
  {
3092
3092
  disabled: a.disabled,
@@ -3171,11 +3171,11 @@ function Q_(a) {
3171
3171
  r.current.style.left = `${Hh(m.min, m.max, u) * 100}%`, r.current.style.top = `${(1 - Hh(m.min, m.max, p)) * 100}%`;
3172
3172
  }, [m, u, p]);
3173
3173
  const A = a.step !== void 0 ? a.step : 0.01;
3174
- return /* @__PURE__ */ C.jsxs("div", { className: "vector2", children: [
3175
- /* @__PURE__ */ C.jsxs("div", { className: "fields", children: [
3176
- /* @__PURE__ */ C.jsxs("div", { children: [
3177
- /* @__PURE__ */ C.jsx("span", { ref: o, children: "X" }),
3178
- /* @__PURE__ */ C.jsx(
3174
+ return /* @__PURE__ */ M.jsxs("div", { className: "vector2", children: [
3175
+ /* @__PURE__ */ M.jsxs("div", { className: "fields", children: [
3176
+ /* @__PURE__ */ M.jsxs("div", { children: [
3177
+ /* @__PURE__ */ M.jsx("span", { ref: o, children: "X" }),
3178
+ /* @__PURE__ */ M.jsx(
3179
3179
  "input",
3180
3180
  {
3181
3181
  ref: e,
@@ -3193,9 +3193,9 @@ function Q_(a) {
3193
3193
  }
3194
3194
  )
3195
3195
  ] }),
3196
- /* @__PURE__ */ C.jsxs("div", { children: [
3197
- /* @__PURE__ */ C.jsx("span", { ref: l, children: "Y" }),
3198
- /* @__PURE__ */ C.jsx(
3196
+ /* @__PURE__ */ M.jsxs("div", { children: [
3197
+ /* @__PURE__ */ M.jsx("span", { ref: l, children: "Y" }),
3198
+ /* @__PURE__ */ M.jsx(
3199
3199
  "input",
3200
3200
  {
3201
3201
  ref: t,
@@ -3213,9 +3213,9 @@ function Q_(a) {
3213
3213
  }
3214
3214
  )
3215
3215
  ] }),
3216
- /* @__PURE__ */ C.jsxs("div", { children: [
3217
- /* @__PURE__ */ C.jsx("span", { ref: c, children: "Min" }),
3218
- /* @__PURE__ */ C.jsx(
3216
+ /* @__PURE__ */ M.jsxs("div", { children: [
3217
+ /* @__PURE__ */ M.jsx("span", { ref: c, children: "Min" }),
3218
+ /* @__PURE__ */ M.jsx(
3219
3219
  "input",
3220
3220
  {
3221
3221
  ref: s,
@@ -3227,9 +3227,9 @@ function Q_(a) {
3227
3227
  }
3228
3228
  )
3229
3229
  ] }),
3230
- /* @__PURE__ */ C.jsxs("div", { children: [
3231
- /* @__PURE__ */ C.jsx("span", { ref: h, children: "Max" }),
3232
- /* @__PURE__ */ C.jsx(
3230
+ /* @__PURE__ */ M.jsxs("div", { children: [
3231
+ /* @__PURE__ */ M.jsx("span", { ref: h, children: "Max" }),
3232
+ /* @__PURE__ */ M.jsx(
3233
3233
  "input",
3234
3234
  {
3235
3235
  ref: i,
@@ -3242,16 +3242,16 @@ function Q_(a) {
3242
3242
  )
3243
3243
  ] })
3244
3244
  ] }),
3245
- /* @__PURE__ */ C.jsxs("div", { className: "input", ref: n, onMouseDown: _, onMouseUp: b, children: [
3246
- /* @__PURE__ */ C.jsx("div", { className: "x" }),
3247
- /* @__PURE__ */ C.jsx("div", { className: "y" }),
3248
- /* @__PURE__ */ C.jsx("div", { className: "pt", ref: r })
3245
+ /* @__PURE__ */ M.jsxs("div", { className: "input", ref: n, onMouseDown: _, onMouseUp: b, children: [
3246
+ /* @__PURE__ */ M.jsx("div", { className: "x" }),
3247
+ /* @__PURE__ */ M.jsx("div", { className: "y" }),
3248
+ /* @__PURE__ */ M.jsx("div", { className: "pt", ref: r })
3249
3249
  ] })
3250
3250
  ] });
3251
3251
  }
3252
3252
  const bt = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
3253
3253
  let fp = 1234567;
3254
- const Aa = Math.PI / 180, Cr = 180 / Math.PI;
3254
+ const Aa = Math.PI / 180, Mr = 180 / Math.PI;
3255
3255
  function ni() {
3256
3256
  const a = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, s = Math.random() * 4294967295 | 0;
3257
3257
  return (bt[a & 255] + bt[a >> 8 & 255] + bt[a >> 16 & 255] + bt[a >> 24 & 255] + "-" + bt[e & 255] + bt[e >> 8 & 255] + "-" + bt[e >> 16 & 15 | 64] + bt[e >> 24 & 255] + "-" + bt[t & 63 | 128] + bt[t >> 8 & 255] + "-" + bt[t >> 16 & 255] + bt[t >> 24 & 255] + bt[s & 255] + bt[s >> 8 & 255] + bt[s >> 16 & 255] + bt[s >> 24 & 255]).toLowerCase();
@@ -3301,7 +3301,7 @@ function ml(a) {
3301
3301
  return a * Aa;
3302
3302
  }
3303
3303
  function yg(a) {
3304
- return a * Cr;
3304
+ return a * Mr;
3305
3305
  }
3306
3306
  function lb(a) {
3307
3307
  return (a & a - 1) === 0 && a !== 0;
@@ -3379,7 +3379,7 @@ function ae(a, e) {
3379
3379
  }
3380
3380
  const db = {
3381
3381
  DEG2RAD: Aa,
3382
- RAD2DEG: Cr,
3382
+ RAD2DEG: Mr,
3383
3383
  /**
3384
3384
  * Generate a [UUID]{@link https://en.wikipedia.org/wiki/Universally_unique_identifier}
3385
3385
  * (universally unique identifier).
@@ -3624,13 +3624,13 @@ const db = {
3624
3624
  function mp(a) {
3625
3625
  const e = a.value.x !== void 0 && a.value.y !== void 0 && a.value.z !== void 0, t = a.value.isEuler !== void 0, s = a.value.elements !== void 0, i = a.step !== void 0 ? a.step : 0.01, n = [];
3626
3626
  if (t) {
3627
- const r = Ca(() => a.value, []);
3627
+ const r = Ma(() => a.value, []);
3628
3628
  ["_x", "_y", "_z"].forEach((l) => {
3629
3629
  const c = We(null);
3630
3630
  n.push(
3631
- /* @__PURE__ */ C.jsxs("div", { children: [
3632
- /* @__PURE__ */ C.jsx("span", { ref: c, children: l.substring(1).toUpperCase() }),
3633
- /* @__PURE__ */ C.jsx(
3631
+ /* @__PURE__ */ M.jsxs("div", { children: [
3632
+ /* @__PURE__ */ M.jsx("span", { ref: c, children: l.substring(1).toUpperCase() }),
3633
+ /* @__PURE__ */ M.jsx(
3634
3634
  bn,
3635
3635
  {
3636
3636
  value: yg(r[l]),
@@ -3647,15 +3647,15 @@ function mp(a) {
3647
3647
  );
3648
3648
  });
3649
3649
  } else if (e) {
3650
- const r = Ca(() => a.value, []), o = (c, h) => {
3650
+ const r = Ma(() => a.value, []), o = (c, h) => {
3651
3651
  r[c] = h, a.onChange({ target: { value: r } });
3652
3652
  };
3653
3653
  ["x", "y", "z"].forEach((c) => {
3654
3654
  const h = We(null);
3655
3655
  n.push(
3656
- /* @__PURE__ */ C.jsxs("div", { children: [
3657
- /* @__PURE__ */ C.jsx("label", { ref: h, children: c.toUpperCase() }),
3658
- /* @__PURE__ */ C.jsx(
3656
+ /* @__PURE__ */ M.jsxs("div", { children: [
3657
+ /* @__PURE__ */ M.jsx("label", { ref: h, children: c.toUpperCase() }),
3658
+ /* @__PURE__ */ M.jsx(
3659
3659
  bn,
3660
3660
  {
3661
3661
  value: r[c],
@@ -3670,16 +3670,16 @@ function mp(a) {
3670
3670
  );
3671
3671
  });
3672
3672
  } else if (s) {
3673
- const r = Ca(() => a.value, []), o = (l, c) => {
3673
+ const r = Ma(() => a.value, []), o = (l, c) => {
3674
3674
  const h = Number(l);
3675
3675
  r.elements[h] = c, a.onChange({ target: { value: r } });
3676
3676
  };
3677
3677
  for (let l = 0; l < 9; l++) {
3678
3678
  const c = We(null);
3679
3679
  n.push(
3680
- /* @__PURE__ */ C.jsxs("div", { children: [
3681
- /* @__PURE__ */ C.jsx("label", { ref: c, children: l + 1 }),
3682
- /* @__PURE__ */ C.jsx(
3680
+ /* @__PURE__ */ M.jsxs("div", { children: [
3681
+ /* @__PURE__ */ M.jsx("label", { ref: c, children: l + 1 }),
3682
+ /* @__PURE__ */ M.jsx(
3683
3683
  bn,
3684
3684
  {
3685
3685
  value: r.elements[l],
@@ -3694,20 +3694,20 @@ function mp(a) {
3694
3694
  );
3695
3695
  }
3696
3696
  }
3697
- return /* @__PURE__ */ C.jsx("div", { className: "grid3", children: n }, Math.random().toString());
3697
+ return /* @__PURE__ */ M.jsx("div", { className: "grid3", children: n }, Math.random().toString());
3698
3698
  }
3699
3699
  function pb(a) {
3700
3700
  const e = a.value.x !== void 0, t = a.step !== void 0 ? a.step : 0.01, s = [];
3701
3701
  if (e) {
3702
- const i = Ca(() => a.value, []), n = (o, l) => {
3702
+ const i = Ma(() => a.value, []), n = (o, l) => {
3703
3703
  i[o] = l, a.onChange({ target: { value: i } });
3704
3704
  };
3705
3705
  ["x", "y", "z", "w"].forEach((o) => {
3706
3706
  const l = We(null);
3707
3707
  s.push(
3708
- /* @__PURE__ */ C.jsxs("div", { children: [
3709
- /* @__PURE__ */ C.jsx("label", { ref: l, children: o.toUpperCase() }),
3710
- /* @__PURE__ */ C.jsx(
3708
+ /* @__PURE__ */ M.jsxs("div", { children: [
3709
+ /* @__PURE__ */ M.jsx("label", { ref: l, children: o.toUpperCase() }),
3710
+ /* @__PURE__ */ M.jsx(
3711
3711
  bn,
3712
3712
  {
3713
3713
  value: i[o],
@@ -3722,16 +3722,16 @@ function pb(a) {
3722
3722
  );
3723
3723
  });
3724
3724
  } else {
3725
- const i = Ca(() => a.value, []), n = (r, o) => {
3725
+ const i = Ma(() => a.value, []), n = (r, o) => {
3726
3726
  const l = Number(r);
3727
3727
  i.elements[l] = o, a.onChange({ target: { value: i } });
3728
3728
  };
3729
3729
  for (let r = 0; r < 16; r++) {
3730
3730
  const o = We(null);
3731
3731
  s.push(
3732
- /* @__PURE__ */ C.jsxs("div", { children: [
3733
- /* @__PURE__ */ C.jsx("span", { ref: o, children: r + 1 }),
3734
- /* @__PURE__ */ C.jsx(
3732
+ /* @__PURE__ */ M.jsxs("div", { children: [
3733
+ /* @__PURE__ */ M.jsx("span", { ref: o, children: r + 1 }),
3734
+ /* @__PURE__ */ M.jsx(
3735
3735
  bn,
3736
3736
  {
3737
3737
  value: i.elements[r],
@@ -3746,7 +3746,7 @@ function pb(a) {
3746
3746
  );
3747
3747
  }
3748
3748
  }
3749
- return /* @__PURE__ */ C.jsx("div", { className: "grid4", children: s });
3749
+ return /* @__PURE__ */ M.jsx("div", { className: "grid4", children: s });
3750
3750
  }
3751
3751
  function fb(a) {
3752
3752
  return !(a === "defaultAttributeValues" || a === "forceSinglePass" || a === "linecap" || a === "linejoin" || a === "linewidth" || a === "normalMapType" || a === "precision" || a === "shadowSide" || a === "uniformsGroups" || a === "uniformsNeedUpdate" || a === "userData" || a === "version" || a === "wireframeLinecap" || a === "wireframeLinejoin" || a === "wireframeLinewidth" || a.slice(0, 4) === "clip" || a.slice(0, 7) === "polygon" || a.slice(0, 7) === "stencil" || a.slice(0, 2) === "is");
@@ -4067,7 +4067,7 @@ const yb = [
4067
4067
  },
4068
4068
  {
4069
4069
  title: "Subtract",
4070
- value: Mx
4070
+ value: Cx
4071
4071
  },
4072
4072
  {
4073
4073
  title: "Reverse Subtract",
@@ -4116,7 +4116,7 @@ const yb = [
4116
4116
  },
4117
4117
  {
4118
4118
  title: "Dst Color",
4119
- value: Mu
4119
+ value: Cu
4120
4120
  },
4121
4121
  {
4122
4122
  title: "One Minus Dst Color",
@@ -4124,7 +4124,7 @@ const yb = [
4124
4124
  },
4125
4125
  {
4126
4126
  title: "Src Alpha Saturate",
4127
- value: Cx
4127
+ value: Mx
4128
4128
  },
4129
4129
  {
4130
4130
  title: "Constant Color",
@@ -4177,7 +4177,7 @@ const yb = [
4177
4177
  },
4178
4178
  {
4179
4179
  title: "Dst Color",
4180
- value: Mu
4180
+ value: Cu
4181
4181
  },
4182
4182
  {
4183
4183
  title: "One Minus Dst Color",
@@ -4297,10 +4297,10 @@ function wb(a, e, t, s) {
4297
4297
  function Eb(a) {
4298
4298
  return a.x !== void 0 && a.y !== void 0 && a.z === void 0;
4299
4299
  }
4300
- function Cb(a) {
4300
+ function Mb(a) {
4301
4301
  return a.x !== void 0 && a.y !== void 0 && a.z !== void 0 && a.w === void 0;
4302
4302
  }
4303
- function Mb(a) {
4303
+ function Cb(a) {
4304
4304
  return a.x !== void 0 && a.y !== void 0 && a.z !== void 0 && a.w !== void 0;
4305
4305
  }
4306
4306
  function qh(a) {
@@ -4394,7 +4394,7 @@ function xa(a, e, t, s, i = "", n = !1) {
4394
4394
  }
4395
4395
  }
4396
4396
  };
4397
- if (Cb(e))
4397
+ if (Mb(e))
4398
4398
  return {
4399
4399
  title: r,
4400
4400
  prop: o,
@@ -4410,7 +4410,7 @@ function xa(a, e, t, s, i = "", n = !1) {
4410
4410
  }
4411
4411
  }
4412
4412
  };
4413
- if (Mb(e))
4413
+ if (Cb(e))
4414
4414
  return {
4415
4415
  title: r,
4416
4416
  prop: o,
@@ -4567,7 +4567,7 @@ function Ab(a, e) {
4567
4567
  const o = [], l = r.length;
4568
4568
  for (let c = 0; c < l; c++)
4569
4569
  o.push(
4570
- /* @__PURE__ */ C.jsx(
4570
+ /* @__PURE__ */ M.jsx(
4571
4571
  ms,
4572
4572
  {
4573
4573
  three: e,
@@ -4577,9 +4577,9 @@ function Ab(a, e) {
4577
4577
  `Material ${c}`
4578
4578
  )
4579
4579
  );
4580
- return /* @__PURE__ */ C.jsx(C.Fragment, { children: o });
4580
+ return /* @__PURE__ */ M.jsx(M.Fragment, { children: o });
4581
4581
  } else
4582
- return /* @__PURE__ */ C.jsx(
4582
+ return /* @__PURE__ */ M.jsx(
4583
4583
  ms,
4584
4584
  {
4585
4585
  three: e,
@@ -4622,16 +4622,16 @@ function Rb(a) {
4622
4622
  break;
4623
4623
  }
4624
4624
  }
4625
- return /* @__PURE__ */ C.jsxs("div", { className: "imageField", children: [
4626
- /* @__PURE__ */ C.jsx("img", { alt: a.title, ref: t, onClick: () => {
4625
+ return /* @__PURE__ */ M.jsxs("div", { className: "imageField", children: [
4626
+ /* @__PURE__ */ M.jsx("img", { alt: a.title, ref: t, onClick: () => {
4627
4627
  gb().then((x) => {
4628
4628
  t.current.src = x, y(x, l, h, d, f);
4629
4629
  });
4630
4630
  }, src: o.src.length > 0 ? o.src : yp }),
4631
- /* @__PURE__ */ C.jsxs("div", { className: "fields", children: [
4632
- /* @__PURE__ */ C.jsxs("div", { children: [
4633
- /* @__PURE__ */ C.jsx("span", { children: "Offset:" }),
4634
- /* @__PURE__ */ C.jsx(
4631
+ /* @__PURE__ */ M.jsxs("div", { className: "fields", children: [
4632
+ /* @__PURE__ */ M.jsxs("div", { children: [
4633
+ /* @__PURE__ */ M.jsx("span", { children: "Offset:" }),
4634
+ /* @__PURE__ */ M.jsx(
4635
4635
  "input",
4636
4636
  {
4637
4637
  ref: s,
@@ -4642,7 +4642,7 @@ function Rb(a) {
4642
4642
  onChange: g
4643
4643
  }
4644
4644
  ),
4645
- /* @__PURE__ */ C.jsx(
4645
+ /* @__PURE__ */ M.jsx(
4646
4646
  "input",
4647
4647
  {
4648
4648
  ref: i,
@@ -4654,9 +4654,9 @@ function Rb(a) {
4654
4654
  }
4655
4655
  )
4656
4656
  ] }),
4657
- /* @__PURE__ */ C.jsxs("div", { children: [
4658
- /* @__PURE__ */ C.jsx("span", { children: "Repeat:" }),
4659
- /* @__PURE__ */ C.jsx(
4657
+ /* @__PURE__ */ M.jsxs("div", { children: [
4658
+ /* @__PURE__ */ M.jsx("span", { children: "Repeat:" }),
4659
+ /* @__PURE__ */ M.jsx(
4660
4660
  "input",
4661
4661
  {
4662
4662
  ref: n,
@@ -4667,7 +4667,7 @@ function Rb(a) {
4667
4667
  onChange: g
4668
4668
  }
4669
4669
  ),
4670
- /* @__PURE__ */ C.jsx(
4670
+ /* @__PURE__ */ M.jsx(
4671
4671
  "input",
4672
4672
  {
4673
4673
  ref: r,
@@ -4679,7 +4679,7 @@ function Rb(a) {
4679
4679
  }
4680
4680
  )
4681
4681
  ] }),
4682
- /* @__PURE__ */ C.jsx("button", { onClick: () => {
4682
+ /* @__PURE__ */ M.jsx("button", { onClick: () => {
4683
4683
  y("", l, h, d, f), t.current.src = yp;
4684
4684
  }, children: "Clear" })
4685
4685
  ] })
@@ -4702,9 +4702,9 @@ function el(a) {
4702
4702
  a.disabled && (r.opacity = 0.8);
4703
4703
  const o = a.type === "field" || a.type === "string" && (t.length > 100 || t.search(`
4704
4704
  `) > -1), l = o || a.type === "image" || a.type === "vector2";
4705
- return /* @__PURE__ */ C.jsxs("div", { className: `field ${l ? "block" : ""}`, style: r, children: [
4706
- a.type !== "button" && /* @__PURE__ */ C.jsx("span", { ref: i, children: fl(a.title) }, "fieldLabel"),
4707
- a.type === "string" && !o && /* @__PURE__ */ C.jsx(
4705
+ return /* @__PURE__ */ M.jsxs("div", { className: `field ${l ? "block" : ""}`, style: r, children: [
4706
+ a.type !== "button" && /* @__PURE__ */ M.jsx("span", { ref: i, children: fl(a.title) }, "fieldLabel"),
4707
+ a.type === "string" && !o && /* @__PURE__ */ M.jsx(
4708
4708
  "input",
4709
4709
  {
4710
4710
  type: "text",
@@ -4714,7 +4714,7 @@ function el(a) {
4714
4714
  name: gt()
4715
4715
  }
4716
4716
  ),
4717
- (a.type === "field" || a.type === "string" && o) && /* @__PURE__ */ C.jsx(
4717
+ (a.type === "field" || a.type === "string" && o) && /* @__PURE__ */ M.jsx(
4718
4718
  "textarea",
4719
4719
  {
4720
4720
  cols: 50,
@@ -4728,7 +4728,7 @@ function el(a) {
4728
4728
  name: gt()
4729
4729
  }
4730
4730
  ),
4731
- a.type === "boolean" && /* @__PURE__ */ C.jsx(
4731
+ a.type === "boolean" && /* @__PURE__ */ M.jsx(
4732
4732
  "input",
4733
4733
  {
4734
4734
  type: "checkbox",
@@ -4738,7 +4738,7 @@ function el(a) {
4738
4738
  name: gt()
4739
4739
  }
4740
4740
  ),
4741
- a.type === "number" && /* @__PURE__ */ C.jsx(
4741
+ a.type === "number" && /* @__PURE__ */ M.jsx(
4742
4742
  bn,
4743
4743
  {
4744
4744
  value: t,
@@ -4752,7 +4752,7 @@ function el(a) {
4752
4752
  onChange: a.onChange
4753
4753
  }
4754
4754
  ),
4755
- a.type === "range" && /* @__PURE__ */ C.jsx(
4755
+ a.type === "range" && /* @__PURE__ */ M.jsx(
4756
4756
  bn,
4757
4757
  {
4758
4758
  value: t,
@@ -4766,11 +4766,11 @@ function el(a) {
4766
4766
  onChange: a.onChange
4767
4767
  }
4768
4768
  ),
4769
- a.type === "color" && /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
4770
- /* @__PURE__ */ C.jsx("input", { type: "text", value: t.toString(), onChange: n, disabled: a.disabled, className: "color", name: gt() }),
4771
- /* @__PURE__ */ C.jsx("input", { type: "color", value: t, onChange: n, disabled: a.disabled, name: gt() })
4769
+ a.type === "color" && /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
4770
+ /* @__PURE__ */ M.jsx("input", { type: "text", value: t.toString(), onChange: n, disabled: a.disabled, className: "color", name: gt() }),
4771
+ /* @__PURE__ */ M.jsx("input", { type: "color", value: t, onChange: n, disabled: a.disabled, name: gt() })
4772
4772
  ] }),
4773
- a.type === "button" && /* @__PURE__ */ C.jsx(
4773
+ a.type === "button" && /* @__PURE__ */ M.jsx(
4774
4774
  "button",
4775
4775
  {
4776
4776
  disabled: a.disabled,
@@ -4780,21 +4780,21 @@ function el(a) {
4780
4780
  children: a.title
4781
4781
  }
4782
4782
  ),
4783
- a.type === "image" && /* @__PURE__ */ C.jsx(Rb, { title: a.title, prop: a.prop, value: a.value, onChange: a.onChange }),
4784
- a.type === "option" && /* @__PURE__ */ C.jsx(C.Fragment, { children: /* @__PURE__ */ C.jsx(
4783
+ a.type === "image" && /* @__PURE__ */ M.jsx(Rb, { title: a.title, prop: a.prop, value: a.value, onChange: a.onChange }),
4784
+ a.type === "option" && /* @__PURE__ */ M.jsx(M.Fragment, { children: /* @__PURE__ */ M.jsx(
4785
4785
  "select",
4786
4786
  {
4787
4787
  onChange: n,
4788
4788
  disabled: a.disabled,
4789
4789
  defaultValue: a.value,
4790
4790
  name: gt(),
4791
- children: a.options?.map((c, h) => /* @__PURE__ */ C.jsx("option", { value: c.value, children: fl(c.title) }, h))
4791
+ children: a.options?.map((c, h) => /* @__PURE__ */ M.jsx("option", { value: c.value, children: fl(c.title) }, h))
4792
4792
  }
4793
4793
  ) }),
4794
- a.type === "vector2" && /* @__PURE__ */ C.jsx(Q_, { step: a.step, value: t, min: 0, max: 1, onChange: n }),
4795
- a.type === "grid3" && /* @__PURE__ */ C.jsx(mp, { step: a.step, value: t, onChange: n }),
4796
- a.type === "grid4" && /* @__PURE__ */ C.jsx(pb, { step: a.step, value: t, onChange: n }),
4797
- a.type === "euler" && /* @__PURE__ */ C.jsx(mp, { step: a.step, value: t, onChange: n })
4794
+ a.type === "vector2" && /* @__PURE__ */ M.jsx(Q_, { step: a.step, value: t, min: 0, max: 1, onChange: n }),
4795
+ a.type === "grid3" && /* @__PURE__ */ M.jsx(mp, { step: a.step, value: t, onChange: n }),
4796
+ a.type === "grid4" && /* @__PURE__ */ M.jsx(pb, { step: a.step, value: t, onChange: n }),
4797
+ a.type === "euler" && /* @__PURE__ */ M.jsx(mp, { step: a.step, value: t, onChange: n })
4798
4798
  ] });
4799
4799
  }
4800
4800
  function Nb(a) {
@@ -4826,7 +4826,7 @@ class ms extends qa {
4826
4826
  }
4827
4827
  });
4828
4828
  });
4829
- const s = Ni(), i = /* @__PURE__ */ C.jsx(
4829
+ const s = Ni(), i = /* @__PURE__ */ M.jsx(
4830
4830
  ms,
4831
4831
  {
4832
4832
  three: this.props.three,
@@ -4857,12 +4857,12 @@ class ms extends qa {
4857
4857
  return this.props.items.forEach((t) => {
4858
4858
  if (Nb(t))
4859
4859
  e.push(
4860
- /* @__PURE__ */ C.jsx(ms, { three: this.props.three, title: fl(t.title), items: t.items }, Math.random())
4860
+ /* @__PURE__ */ M.jsx(ms, { three: this.props.three, title: fl(t.title), items: t.items }, Math.random())
4861
4861
  );
4862
4862
  else {
4863
4863
  const s = this.valueOverrides.get(t.title), i = s !== void 0 ? s : t.value;
4864
4864
  e.push(
4865
- /* @__PURE__ */ C.jsx(
4865
+ /* @__PURE__ */ M.jsx(
4866
4866
  el,
4867
4867
  {
4868
4868
  title: t.title,
@@ -4885,8 +4885,8 @@ class ms extends qa {
4885
4885
  )
4886
4886
  );
4887
4887
  }
4888
- }), this.subgroupElements.forEach((t) => e.push(t)), /* @__PURE__ */ C.jsx(
4889
- Ma,
4888
+ }), this.subgroupElements.forEach((t) => e.push(t)), /* @__PURE__ */ M.jsx(
4889
+ Ca,
4890
4890
  {
4891
4891
  three: this.props.three,
4892
4892
  label: this.props.title,
@@ -4912,7 +4912,7 @@ class _e extends qa {
4912
4912
  this.props.three.removeEventListener(ce.ADD_GROUP, this.addGroup), this.props.three.removeEventListener(ce.REMOVE_GROUP, this.removeGroup);
4913
4913
  }
4914
4914
  render() {
4915
- return /* @__PURE__ */ C.jsx("div", { className: "customGroups", children: _e.groups }, this.state.lastUpdate);
4915
+ return /* @__PURE__ */ M.jsx("div", { className: "customGroups", children: _e.groups }, this.state.lastUpdate);
4916
4916
  }
4917
4917
  // Events
4918
4918
  addGroup = (e) => {
@@ -4933,7 +4933,7 @@ class _e extends qa {
4933
4933
  }
4934
4934
  });
4935
4935
  }), _e.groups.push(
4936
- /* @__PURE__ */ C.jsx(
4936
+ /* @__PURE__ */ M.jsx(
4937
4937
  ms,
4938
4938
  {
4939
4939
  three: this.props.three,
@@ -4975,7 +4975,7 @@ class _e extends qa {
4975
4975
  }
4976
4976
  });
4977
4977
  });
4978
- const i = Ni(), n = /* @__PURE__ */ C.jsx(
4978
+ const i = Ni(), n = /* @__PURE__ */ M.jsx(
4979
4979
  ms,
4980
4980
  {
4981
4981
  three: _e.three,
@@ -5075,7 +5075,7 @@ function Pb(a, e) {
5075
5075
  }
5076
5076
  }
5077
5077
  });
5078
- return /* @__PURE__ */ C.jsx(
5078
+ return /* @__PURE__ */ M.jsx(
5079
5079
  ms,
5080
5080
  {
5081
5081
  three: e,
@@ -5199,7 +5199,7 @@ class Rs {
5199
5199
  return t.delete(e[e.length - 1]);
5200
5200
  }
5201
5201
  }
5202
- const _g = "177", Db = 0, Ob = 1, Bb = 2, Ib = 0, Lb = 1, tl = 3, ri = 0, jt = 1, gr = 2, Mr = 0, ai = 1, gl = 2, yl = 3, xl = 4, Ra = 5, Cs = 100, bg = 101, Tg = 102, Ub = 103, kb = 104, Pi = 200, Sg = 201, vg = 202, wg = 203, _l = 204, bl = 205, Eg = 206, Cg = 207, Mg = 208, Ag = 209, Rg = 210, Ng = 0, Pg = 1, Fg = 2, Tl = 3, Dg = 4, Og = 5, Bg = 6, Ig = 7, Gl = 0, zb = 1, Gb = 2, yr = 0, Vb = 1, Hb = 2, $b = 3, Wb = 4, jb = 6, qb = 7, Ou = 300, ka = 301, Sl = 302, Bu = 303, Iu = 304, Yh = 306, Ar = 1e3, Li = 1001, Rr = 1002, dt = 1003, Lg = 1004, za = 1005, ns = 1006, Xh = 1007, oi = 1008, Ot = 1009, Na = 1010, Pa = 1011, cr = 1012, Pt = 1013, Ke = 1014, is = 1015, hs = 1016, Yb = 1017, Xb = 1018, ki = 1020, Ug = 35902, Zb = 1021, Lu = 1022, us = 1023, Hs = 1026, li = 1027, Uu = 1028, ku = 1029, xn = 1030, zu = 1031, Kb = 1032, Gu = 1033, xc = 33776, sl = 33777, il = 33778, nl = 33779, _p = 35840, bp = 35841, Tp = 35842, Sp = 35843, vp = 36196, Zh = 37492, Kh = 37496, Qh = 37808, Jh = 37809, eu = 37810, tu = 37811, su = 37812, iu = 37813, nu = 37814, ru = 37815, au = 37816, ou = 37817, lu = 37818, cu = 37819, hu = 37820, uu = 37821, _c = 36492, Qb = 36283, wp = 36284, Ep = 36285, Cp = 36286, Gi = 0, Jb = 1, pi = "", ts = "srgb", xr = "srgb-linear", vl = "linear", te = "srgb", eT = 0, hn = 7680, tT = 7681, sT = 7682, iT = 7683, nT = 34055, rT = 34056, aT = 5386, oT = 512, lT = 513, cT = 514, hT = 515, uT = 516, dT = 517, pT = 518, du = 519, kg = 512, Vu = 513, zg = 514, Gg = 515, Vg = 516, Hg = 517, $g = 518, Wg = 519, wl = 35044, hr = 35048, Ht = 2e3, Vi = 2001;
5202
+ const _g = "177", Db = 0, Ob = 1, Bb = 2, Ib = 0, Lb = 1, tl = 3, ri = 0, jt = 1, gr = 2, Cr = 0, ai = 1, gl = 2, yl = 3, xl = 4, Ra = 5, Ms = 100, bg = 101, Tg = 102, Ub = 103, kb = 104, Pi = 200, Sg = 201, vg = 202, wg = 203, _l = 204, bl = 205, Eg = 206, Mg = 207, Cg = 208, Ag = 209, Rg = 210, Ng = 0, Pg = 1, Fg = 2, Tl = 3, Dg = 4, Og = 5, Bg = 6, Ig = 7, Gl = 0, zb = 1, Gb = 2, yr = 0, Vb = 1, Hb = 2, $b = 3, Wb = 4, jb = 6, qb = 7, Ou = 300, ka = 301, Sl = 302, Bu = 303, Iu = 304, Yh = 306, Ar = 1e3, Li = 1001, Rr = 1002, dt = 1003, Lg = 1004, za = 1005, ns = 1006, Xh = 1007, oi = 1008, Ot = 1009, Na = 1010, Pa = 1011, cr = 1012, Pt = 1013, Ke = 1014, is = 1015, hs = 1016, Yb = 1017, Xb = 1018, ki = 1020, Ug = 35902, Zb = 1021, Lu = 1022, us = 1023, Hs = 1026, li = 1027, Uu = 1028, ku = 1029, xn = 1030, zu = 1031, Kb = 1032, Gu = 1033, xc = 33776, sl = 33777, il = 33778, nl = 33779, _p = 35840, bp = 35841, Tp = 35842, Sp = 35843, vp = 36196, Zh = 37492, Kh = 37496, Qh = 37808, Jh = 37809, eu = 37810, tu = 37811, su = 37812, iu = 37813, nu = 37814, ru = 37815, au = 37816, ou = 37817, lu = 37818, cu = 37819, hu = 37820, uu = 37821, _c = 36492, Qb = 36283, wp = 36284, Ep = 36285, Mp = 36286, Gi = 0, Jb = 1, pi = "", ts = "srgb", xr = "srgb-linear", vl = "linear", te = "srgb", eT = 0, hn = 7680, tT = 7681, sT = 7682, iT = 7683, nT = 34055, rT = 34056, aT = 5386, oT = 512, lT = 513, cT = 514, hT = 515, uT = 516, dT = 517, pT = 518, du = 519, kg = 512, Vu = 513, zg = 514, Gg = 515, Vg = 516, Hg = 517, $g = 518, Wg = 519, wl = 35044, hr = 35048, Ht = 2e3, Vi = 2001;
5203
5203
  class Yt {
5204
5204
  /**
5205
5205
  * Constructs a new 3x3 matrix. The arguments are supposed to be
@@ -5583,9 +5583,9 @@ function fT() {
5583
5583
  const a = pu("canvas");
5584
5584
  return a.style.display = "block", a;
5585
5585
  }
5586
- const Mp = {};
5586
+ const Cp = {};
5587
5587
  function fi(a) {
5588
- a in Mp || (Mp[a] = !0, console.warn(a));
5588
+ a in Cp || (Cp[a] = !0, console.warn(a));
5589
5589
  }
5590
5590
  const Ap = /* @__PURE__ */ new Yt().set(
5591
5591
  0.4123908,
@@ -7877,8 +7877,8 @@ class Le {
7877
7877
  * @return {Matrix4} A reference to this matrix.
7878
7878
  */
7879
7879
  multiplyMatrices(e, t) {
7880
- const s = e.elements, i = t.elements, n = this.elements, r = s[0], o = s[4], l = s[8], c = s[12], h = s[1], u = s[5], d = s[9], p = s[13], f = s[2], m = s[6], y = s[10], g = s[14], x = s[3], _ = s[7], b = s[11], T = s[15], E = i[0], v = i[4], A = i[8], N = i[12], k = i[1], H = i[5], W = i[9], $ = i[13], q = i[2], X = i[6], Ee = i[10], de = i[14], ye = i[3], se = i[7], Ce = i[11], Ge = i[15];
7881
- return n[0] = r * E + o * k + l * q + c * ye, n[4] = r * v + o * H + l * X + c * se, n[8] = r * A + o * W + l * Ee + c * Ce, n[12] = r * N + o * $ + l * de + c * Ge, n[1] = h * E + u * k + d * q + p * ye, n[5] = h * v + u * H + d * X + p * se, n[9] = h * A + u * W + d * Ee + p * Ce, n[13] = h * N + u * $ + d * de + p * Ge, n[2] = f * E + m * k + y * q + g * ye, n[6] = f * v + m * H + y * X + g * se, n[10] = f * A + m * W + y * Ee + g * Ce, n[14] = f * N + m * $ + y * de + g * Ge, n[3] = x * E + _ * k + b * q + T * ye, n[7] = x * v + _ * H + b * X + T * se, n[11] = x * A + _ * W + b * Ee + T * Ce, n[15] = x * N + _ * $ + b * de + T * Ge, this;
7880
+ const s = e.elements, i = t.elements, n = this.elements, r = s[0], o = s[4], l = s[8], c = s[12], h = s[1], u = s[5], d = s[9], p = s[13], f = s[2], m = s[6], y = s[10], g = s[14], x = s[3], _ = s[7], b = s[11], T = s[15], E = i[0], v = i[4], A = i[8], N = i[12], k = i[1], H = i[5], W = i[9], $ = i[13], q = i[2], X = i[6], Ee = i[10], de = i[14], ye = i[3], se = i[7], Me = i[11], Ge = i[15];
7881
+ return n[0] = r * E + o * k + l * q + c * ye, n[4] = r * v + o * H + l * X + c * se, n[8] = r * A + o * W + l * Ee + c * Me, n[12] = r * N + o * $ + l * de + c * Ge, n[1] = h * E + u * k + d * q + p * ye, n[5] = h * v + u * H + d * X + p * se, n[9] = h * A + u * W + d * Ee + p * Me, n[13] = h * N + u * $ + d * de + p * Ge, n[2] = f * E + m * k + y * q + g * ye, n[6] = f * v + m * H + y * X + g * se, n[10] = f * A + m * W + y * Ee + g * Me, n[14] = f * N + m * $ + y * de + g * Ge, n[3] = x * E + _ * k + b * q + T * ye, n[7] = x * v + _ * H + b * X + T * se, n[11] = x * A + _ * W + b * Ee + T * Me, n[15] = x * N + _ * $ + b * de + T * Ge, this;
7882
7882
  }
7883
7883
  /**
7884
7884
  * Multiplies every component of the matrix by the given scalar.
@@ -9394,11 +9394,11 @@ const xT = (a) => Ga(a), Hu = (a) => Ga(a), El = (...a) => Ga(a);
9394
9394
  function Yg(a, e = !1) {
9395
9395
  const t = [];
9396
9396
  a.isNode === !0 && (t.push(a.id), a = a.getSelf());
9397
- for (const { property: s, childNode: i } of Cl(a))
9397
+ for (const { property: s, childNode: i } of Ml(a))
9398
9398
  t.push(Ga(s.slice(0, -4)), i.getCacheKey(e));
9399
9399
  return Ga(t);
9400
9400
  }
9401
- function* Cl(a, e = !1) {
9401
+ function* Ml(a, e = !1) {
9402
9402
  for (const t in a) {
9403
9403
  if (t.startsWith("_") === !0) continue;
9404
9404
  const s = a[t];
@@ -9427,7 +9427,7 @@ const _T = /* @__PURE__ */ new Map([
9427
9427
  function bT(a) {
9428
9428
  return _T.get(a);
9429
9429
  }
9430
- function Ml(a) {
9430
+ function Cl(a) {
9431
9431
  if (a == null) return null;
9432
9432
  const e = typeof a;
9433
9433
  return a.isNode === !0 ? "node" : e === "number" ? "float" : e === "boolean" ? "bool" : e === "string" ? "string" : e === "function" ? "shader" : a.isVector2 === !0 ? "vec2" : a.isVector3 === !0 ? "vec3" : a.isVector4 === !0 ? "vec4" : a.isMatrix2 === !0 ? "mat2" : a.isMatrix3 === !0 ? "mat3" : a.isMatrix4 === !0 ? "mat4" : a.isColor === !0 ? "color" : a instanceof ArrayBuffer ? "ArrayBuffer" : null;
@@ -9735,7 +9735,7 @@ class ET {
9735
9735
  }
9736
9736
  }
9737
9737
  const Xi = [];
9738
- class CT {
9738
+ class MT {
9739
9739
  /**
9740
9740
  * Constructs a new render object management component.
9741
9741
  *
@@ -9854,7 +9854,7 @@ const ds = {
9854
9854
  INDEX: 2,
9855
9855
  STORAGE: 3,
9856
9856
  INDIRECT: 4
9857
- }, Oi = 16, MT = 211, AT = 212;
9857
+ }, Oi = 16, CT = 211, AT = 212;
9858
9858
  class RT extends Wi {
9859
9859
  /**
9860
9860
  * Constructs a new attribute management component.
@@ -11044,7 +11044,7 @@ function sy(a) {
11044
11044
  s.push(i.id);
11045
11045
  return Hu(s);
11046
11046
  }
11047
- let Cn = class {
11047
+ let Mn = class {
11048
11048
  /**
11049
11049
  * Adds the given event listener to the given event type.
11050
11050
  *
@@ -11373,7 +11373,7 @@ class $T {
11373
11373
  }
11374
11374
  let WT = 0;
11375
11375
  const Lp = /* @__PURE__ */ new R(), zn = /* @__PURE__ */ new Br(), Xs = /* @__PURE__ */ new Le(), po = /* @__PURE__ */ new R(), jr = /* @__PURE__ */ new R(), jT = /* @__PURE__ */ new R(), qT = /* @__PURE__ */ new Br(), Up = /* @__PURE__ */ new R(1, 0, 0), kp = /* @__PURE__ */ new R(0, 1, 0), zp = /* @__PURE__ */ new R(0, 0, 1), Gp = { type: "added" }, YT = { type: "removed" }, Gn = { type: "childadded", child: null }, wc = { type: "childremoved", child: null };
11376
- class pt extends Cn {
11376
+ class pt extends Mn {
11377
11377
  /**
11378
11378
  * Constructs a new 3D object.
11379
11379
  */
@@ -12246,8 +12246,8 @@ function Ec(a) {
12246
12246
  } : (console.warn("THREE.Texture: Unable to serialize Texture."), {});
12247
12247
  }
12248
12248
  let eS = 0;
12249
- const Cc = /* @__PURE__ */ new R();
12250
- class Ct extends Cn {
12249
+ const Mc = /* @__PURE__ */ new R();
12250
+ class Mt extends Mn {
12251
12251
  /**
12252
12252
  * Constructs a new texture.
12253
12253
  *
@@ -12262,26 +12262,26 @@ class Ct extends Cn {
12262
12262
  * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
12263
12263
  * @param {string} [colorSpace=NoColorSpace] - The color space.
12264
12264
  */
12265
- constructor(e = Ct.DEFAULT_IMAGE, t = Ct.DEFAULT_MAPPING, s = Li, i = Li, n = ns, r = oi, o = us, l = Ot, c = Ct.DEFAULT_ANISOTROPY, h = pi) {
12265
+ constructor(e = Mt.DEFAULT_IMAGE, t = Mt.DEFAULT_MAPPING, s = Li, i = Li, n = ns, r = oi, o = us, l = Ot, c = Mt.DEFAULT_ANISOTROPY, h = pi) {
12266
12266
  super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: eS++ }), this.uuid = ni(), this.name = "", this.source = new ju(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = s, this.wrapT = i, this.magFilter = n, this.minFilter = r, this.anisotropy = c, this.format = o, this.internalFormat = null, this.type = l, this.offset = new he(0, 0), this.repeat = new he(1, 1), this.center = new he(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new Yt(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = h, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
12267
12267
  }
12268
12268
  /**
12269
12269
  * The width of the texture in pixels.
12270
12270
  */
12271
12271
  get width() {
12272
- return this.source.getSize(Cc).x;
12272
+ return this.source.getSize(Mc).x;
12273
12273
  }
12274
12274
  /**
12275
12275
  * The height of the texture in pixels.
12276
12276
  */
12277
12277
  get height() {
12278
- return this.source.getSize(Cc).y;
12278
+ return this.source.getSize(Mc).y;
12279
12279
  }
12280
12280
  /**
12281
12281
  * The depth of the texture in pixels.
12282
12282
  */
12283
12283
  get depth() {
12284
- return this.source.getSize(Cc).z;
12284
+ return this.source.getSize(Mc).z;
12285
12285
  }
12286
12286
  /**
12287
12287
  * The image object holding the texture data.
@@ -12460,10 +12460,10 @@ class Ct extends Cn {
12460
12460
  e === !0 && this.pmremVersion++;
12461
12461
  }
12462
12462
  }
12463
- Ct.DEFAULT_IMAGE = null;
12464
- Ct.DEFAULT_MAPPING = Ou;
12465
- Ct.DEFAULT_ANISOTROPY = 1;
12466
- class $s extends Ct {
12463
+ Mt.DEFAULT_IMAGE = null;
12464
+ Mt.DEFAULT_MAPPING = Ou;
12465
+ Mt.DEFAULT_ANISOTROPY = 1;
12466
+ class $s extends Mt {
12467
12467
  /**
12468
12468
  * Constructs a new depth texture.
12469
12469
  *
@@ -12692,7 +12692,7 @@ const fo = {
12692
12692
  generate: "analyze"
12693
12693
  };
12694
12694
  let rS = 0;
12695
- class re extends Cn {
12695
+ class re extends Mn {
12696
12696
  static get type() {
12697
12697
  return "Node";
12698
12698
  }
@@ -12809,7 +12809,7 @@ class re extends Cn {
12809
12809
  * @yields {Node} A child node.
12810
12810
  */
12811
12811
  *getChildren() {
12812
- for (const { childNode: e } of Cl(this))
12812
+ for (const { childNode: e } of Ml(this))
12813
12813
  yield e;
12814
12814
  }
12815
12815
  /**
@@ -13075,7 +13075,7 @@ class re extends Cn {
13075
13075
  * @return {Array<Object>} An iterable list of serialized child objects as JSON.
13076
13076
  */
13077
13077
  getSerializeChildren() {
13078
- return Cl(this);
13078
+ return Ml(this);
13079
13079
  }
13080
13080
  /**
13081
13081
  * Serializes the node to JSON.
@@ -13436,7 +13436,7 @@ class Yu extends re {
13436
13436
  super(t), this.isInputNode = !0, this.value = e, this.precision = null;
13437
13437
  }
13438
13438
  getNodeType() {
13439
- return this.nodeType === null ? Ml(this.value) : this.nodeType;
13439
+ return this.nodeType === null ? Cl(this.value) : this.nodeType;
13440
13440
  }
13441
13441
  /**
13442
13442
  * Returns the input type of the node which is by default the node type. Derived modules
@@ -13463,7 +13463,7 @@ class Yu extends re {
13463
13463
  return this.precision = e, this;
13464
13464
  }
13465
13465
  serialize(e) {
13466
- super.serialize(e), e.value = this.value, this.value && this.value.toArray && (e.value = this.value.toArray()), e.valueType = Ml(this.value), e.nodeType = this.nodeType, e.valueType === "ArrayBuffer" && (e.value = TT(e.value)), e.precision = this.precision;
13466
+ super.serialize(e), e.value = this.value, this.value && this.value.toArray && (e.value = this.value.toArray()), e.valueType = Cl(this.value), e.nodeType = this.nodeType, e.valueType === "ArrayBuffer" && (e.value = TT(e.value)), e.precision = this.precision;
13467
13467
  }
13468
13468
  deserialize(e) {
13469
13469
  super.deserialize(e), this.nodeType = e.nodeType, this.value = Array.isArray(e.value) ? Xg(e.valueType, ...e.value) : e.value, this.precision = e.precision || null, this.value && this.value.fromArray && (this.value = this.value.fromArray(e.value));
@@ -13569,11 +13569,11 @@ const ny = (a) => a.replace(/r|s/g, "x").replace(/g|t/g, "y").replace(/b|p/g, "z
13569
13569
  set(a, e, t, s) {
13570
13570
  return typeof e == "string" && a[e] === void 0 && (/^[xyzwrgbastpq]{1,4}$/.test(e) === !0 || e === "width" || e === "height" || e === "depth" || /^\d+$/.test(e) === !0) ? (s[e].assign(t), !0) : Reflect.set(a, e, t, s);
13571
13571
  }
13572
- }, Mc = /* @__PURE__ */ new WeakMap(), qp = /* @__PURE__ */ new WeakMap(), uS = function(a, e = null) {
13573
- const t = Ml(a);
13572
+ }, Cc = /* @__PURE__ */ new WeakMap(), qp = /* @__PURE__ */ new WeakMap(), uS = function(a, e = null) {
13573
+ const t = Cl(a);
13574
13574
  if (t === "node") {
13575
- let s = Mc.get(a);
13576
- return s === void 0 && (s = new Proxy(a, ry), Mc.set(a, s), Mc.set(s, s)), s;
13575
+ let s = Cc.get(a);
13576
+ return s === void 0 && (s = new Proxy(a, ry), Cc.set(a, s), Cc.set(s, s)), s;
13577
13577
  } else {
13578
13578
  if (e === null && (t === "float" || t === "boolean") || t && t !== "shader" && t !== "string")
13579
13579
  return U(fu(a, e));
@@ -13726,7 +13726,7 @@ function ly(a) {
13726
13726
  return Nr && Nr.add(a), a;
13727
13727
  }
13728
13728
  D("toStack", ly);
13729
- const wS = new at("color"), O = new at("float", $l.float), ze = new at("int", $l.ints), ES = new at("uint", $l.uint), Qu = new at("bool", $l.bool), V = new at("vec2"), ei = new at("ivec2"), CS = new at("uvec2"), MS = new at("bvec2"), B = new at("vec3"), AS = new at("ivec3"), RS = new at("uvec3"), NS = new at("bvec3"), ne = new at("vec4"), PS = new at("ivec4"), FS = new at("uvec4"), DS = new at("bvec4"), Ju = new at("mat2"), It = new at("mat3"), Tr = new at("mat4");
13729
+ const wS = new at("color"), O = new at("float", $l.float), ze = new at("int", $l.ints), ES = new at("uint", $l.uint), Qu = new at("bool", $l.bool), V = new at("vec2"), ei = new at("ivec2"), MS = new at("uvec2"), CS = new at("bvec2"), B = new at("vec3"), AS = new at("ivec3"), RS = new at("uvec3"), NS = new at("bvec3"), ne = new at("vec4"), PS = new at("ivec4"), FS = new at("uvec4"), DS = new at("bvec4"), Ju = new at("mat2"), It = new at("mat3"), Tr = new at("mat4");
13730
13730
  D("toColor", wS);
13731
13731
  D("toFloat", O);
13732
13732
  D("toInt", ze);
@@ -13734,8 +13734,8 @@ D("toUint", ES);
13734
13734
  D("toBool", Qu);
13735
13735
  D("toVec2", V);
13736
13736
  D("toIVec2", ei);
13737
- D("toUVec2", CS);
13738
- D("toBVec2", MS);
13737
+ D("toUVec2", MS);
13738
+ D("toBVec2", CS);
13739
13739
  D("toVec3", B);
13740
13740
  D("toIVec3", AS);
13741
13741
  D("toUVec3", RS);
@@ -14186,7 +14186,7 @@ D("decrement", lv);
14186
14186
  const cv = (a, e) => (console.warn('THREE.TSL: "remainder()" is deprecated. Use "mod( int( ... ) )" instead.'), jl(a, e)), hv = (a, e) => (console.warn('THREE.TSL: "modInt()" is deprecated. Use "mod( int( ... ) )" instead.'), jl(ze(a), ze(e)));
14187
14187
  D("remainder", cv);
14188
14188
  D("modInt", hv);
14189
- class M extends rt {
14189
+ class C extends rt {
14190
14190
  static get type() {
14191
14191
  return "MathNode";
14192
14192
  }
@@ -14199,10 +14199,10 @@ class M extends rt {
14199
14199
  * @param {?Node} [cNode=null] - The third input.
14200
14200
  */
14201
14201
  constructor(e, t, s = null, i = null) {
14202
- if (super(), (e === M.MAX || e === M.MIN) && arguments.length > 3) {
14203
- let n = new M(e, t, s);
14202
+ if (super(), (e === C.MAX || e === C.MIN) && arguments.length > 3) {
14203
+ let n = new C(e, t, s);
14204
14204
  for (let r = 2; r < arguments.length - 1; r++)
14205
- n = new M(e, n, arguments[r]);
14205
+ n = new C(e, n, arguments[r]);
14206
14206
  t = n, s = arguments[arguments.length - 1], i = null;
14207
14207
  }
14208
14208
  this.method = e, this.aNode = t, this.bNode = s, this.cNode = i, this.isMathNode = !0;
@@ -14225,18 +14225,18 @@ class M extends rt {
14225
14225
  */
14226
14226
  getNodeType(e) {
14227
14227
  const t = this.method;
14228
- return t === M.LENGTH || t === M.DISTANCE || t === M.DOT ? "float" : t === M.CROSS ? "vec3" : t === M.ALL || t === M.ANY ? "bool" : t === M.EQUALS ? e.changeComponentType(this.aNode.getNodeType(e), "bool") : this.getInputType(e);
14228
+ return t === C.LENGTH || t === C.DISTANCE || t === C.DOT ? "float" : t === C.CROSS ? "vec3" : t === C.ALL || t === C.ANY ? "bool" : t === C.EQUALS ? e.changeComponentType(this.aNode.getNodeType(e), "bool") : this.getInputType(e);
14229
14229
  }
14230
14230
  setup(e) {
14231
14231
  const { aNode: t, bNode: s, method: i } = this;
14232
14232
  let n = null;
14233
- if (i === M.ONE_MINUS)
14233
+ if (i === C.ONE_MINUS)
14234
14234
  n = Ft(1, t);
14235
- else if (i === M.RECIPROCAL)
14235
+ else if (i === C.RECIPROCAL)
14236
14236
  n = Ws(1, t);
14237
- else if (i === M.DIFFERENCE)
14237
+ else if (i === C.DIFFERENCE)
14238
14238
  n = cs(Ft(t, s));
14239
- else if (i === M.TRANSFORM_DIRECTION) {
14239
+ else if (i === C.TRANSFORM_DIRECTION) {
14240
14240
  let r = t, o = s;
14241
14241
  e.isMatrix(r.getNodeType(e)) ? o = ne(B(o), 0) : r = ne(B(r), 0);
14242
14242
  const l = fe(r, o).xyz;
@@ -14249,28 +14249,28 @@ class M extends rt {
14249
14249
  return super.generate(e, t);
14250
14250
  let i = this.method;
14251
14251
  const n = this.getNodeType(e), r = this.getInputType(e), o = this.aNode, l = this.bNode, c = this.cNode, h = e.renderer.coordinateSystem;
14252
- if (i === M.NEGATE)
14252
+ if (i === C.NEGATE)
14253
14253
  return e.format("( - " + o.build(e, r) + " )", n, t);
14254
14254
  {
14255
14255
  const u = [];
14256
- return i === M.CROSS ? u.push(
14256
+ return i === C.CROSS ? u.push(
14257
14257
  o.build(e, n),
14258
14258
  l.build(e, n)
14259
- ) : h === Ht && i === M.STEP ? u.push(
14259
+ ) : h === Ht && i === C.STEP ? u.push(
14260
14260
  o.build(e, e.getTypeLength(o.getNodeType(e)) === 1 ? "float" : r),
14261
14261
  l.build(e, r)
14262
- ) : h === Ht && (i === M.MIN || i === M.MAX) ? u.push(
14262
+ ) : h === Ht && (i === C.MIN || i === C.MAX) ? u.push(
14263
14263
  o.build(e, r),
14264
14264
  l.build(e, e.getTypeLength(l.getNodeType(e)) === 1 ? "float" : r)
14265
- ) : i === M.REFRACT ? u.push(
14265
+ ) : i === C.REFRACT ? u.push(
14266
14266
  o.build(e, r),
14267
14267
  l.build(e, r),
14268
14268
  c.build(e, "float")
14269
- ) : i === M.MIX ? u.push(
14269
+ ) : i === C.MIX ? u.push(
14270
14270
  o.build(e, r),
14271
14271
  l.build(e, r),
14272
14272
  c.build(e, e.getTypeLength(c.getNodeType(e)) === 1 ? "float" : r)
14273
- ) : (h === Vi && i === M.ATAN && l !== null && (i = "atan2"), e.shaderStage !== "fragment" && (i === M.DFDX || i === M.DFDY) && (console.warn(`THREE.TSL: '${i}' is not supported in the ${e.shaderStage} stage.`), i = "/*" + i + "*/"), u.push(o.build(e, r)), l !== null && u.push(l.build(e, r)), c !== null && u.push(c.build(e, r))), e.format(`${e.getMethod(i, n)}( ${u.join(", ")} )`, n, t);
14273
+ ) : (h === Vi && i === C.ATAN && l !== null && (i = "atan2"), e.shaderStage !== "fragment" && (i === C.DFDX || i === C.DFDY) && (console.warn(`THREE.TSL: '${i}' is not supported in the ${e.shaderStage} stage.`), i = "/*" + i + "*/"), u.push(o.build(e, r)), l !== null && u.push(l.build(e, r)), c !== null && u.push(c.build(e, r))), e.format(`${e.getMethod(i, n)}( ${u.join(", ")} )`, n, t);
14274
14274
  }
14275
14275
  }
14276
14276
  serialize(e) {
@@ -14280,62 +14280,62 @@ class M extends rt {
14280
14280
  super.deserialize(e), this.method = e.method;
14281
14281
  }
14282
14282
  }
14283
- M.ALL = "all";
14284
- M.ANY = "any";
14285
- M.RADIANS = "radians";
14286
- M.DEGREES = "degrees";
14287
- M.EXP = "exp";
14288
- M.EXP2 = "exp2";
14289
- M.LOG = "log";
14290
- M.LOG2 = "log2";
14291
- M.SQRT = "sqrt";
14292
- M.INVERSE_SQRT = "inversesqrt";
14293
- M.FLOOR = "floor";
14294
- M.CEIL = "ceil";
14295
- M.NORMALIZE = "normalize";
14296
- M.FRACT = "fract";
14297
- M.SIN = "sin";
14298
- M.COS = "cos";
14299
- M.TAN = "tan";
14300
- M.ASIN = "asin";
14301
- M.ACOS = "acos";
14302
- M.ATAN = "atan";
14303
- M.ABS = "abs";
14304
- M.SIGN = "sign";
14305
- M.LENGTH = "length";
14306
- M.NEGATE = "negate";
14307
- M.ONE_MINUS = "oneMinus";
14308
- M.DFDX = "dFdx";
14309
- M.DFDY = "dFdy";
14310
- M.ROUND = "round";
14311
- M.RECIPROCAL = "reciprocal";
14312
- M.TRUNC = "trunc";
14313
- M.FWIDTH = "fwidth";
14314
- M.TRANSPOSE = "transpose";
14315
- M.BITCAST = "bitcast";
14316
- M.EQUALS = "equals";
14317
- M.MIN = "min";
14318
- M.MAX = "max";
14319
- M.STEP = "step";
14320
- M.REFLECT = "reflect";
14321
- M.DISTANCE = "distance";
14322
- M.DIFFERENCE = "difference";
14323
- M.DOT = "dot";
14324
- M.CROSS = "cross";
14325
- M.POW = "pow";
14326
- M.TRANSFORM_DIRECTION = "transformDirection";
14327
- M.MIX = "mix";
14328
- M.CLAMP = "clamp";
14329
- M.REFRACT = "refract";
14330
- M.SMOOTHSTEP = "smoothstep";
14331
- M.FACEFORWARD = "faceforward";
14332
- const uv = /* @__PURE__ */ O(1e-6), dv = /* @__PURE__ */ O(Math.PI), pv = /* @__PURE__ */ L(M, M.ALL).setParameterLength(1), fv = /* @__PURE__ */ L(M, M.ANY).setParameterLength(1), mv = /* @__PURE__ */ L(M, M.RADIANS).setParameterLength(1), gv = /* @__PURE__ */ L(M, M.DEGREES).setParameterLength(1), _y = /* @__PURE__ */ L(M, M.EXP).setParameterLength(1), Va = /* @__PURE__ */ L(M, M.EXP2).setParameterLength(1), by = /* @__PURE__ */ L(M, M.LOG).setParameterLength(1), hi = /* @__PURE__ */ L(M, M.LOG2).setParameterLength(1), id = /* @__PURE__ */ L(M, M.SQRT).setParameterLength(1), yv = /* @__PURE__ */ L(M, M.INVERSE_SQRT).setParameterLength(1), Tn = /* @__PURE__ */ L(M, M.FLOOR).setParameterLength(1), nd = /* @__PURE__ */ L(M, M.CEIL).setParameterLength(1), Ha = /* @__PURE__ */ L(M, M.NORMALIZE).setParameterLength(1), ji = /* @__PURE__ */ L(M, M.FRACT).setParameterLength(1), Es = /* @__PURE__ */ L(M, M.SIN).setParameterLength(1), Fi = /* @__PURE__ */ L(M, M.COS).setParameterLength(1), xv = /* @__PURE__ */ L(M, M.TAN).setParameterLength(1), _v = /* @__PURE__ */ L(M, M.ASIN).setParameterLength(1), Ty = /* @__PURE__ */ L(M, M.ACOS).setParameterLength(1), Sy = /* @__PURE__ */ L(M, M.ATAN).setParameterLength(1, 2), cs = /* @__PURE__ */ L(M, M.ABS).setParameterLength(1), Dl = /* @__PURE__ */ L(M, M.SIGN).setParameterLength(1), ui = /* @__PURE__ */ L(M, M.LENGTH).setParameterLength(1), bv = /* @__PURE__ */ L(M, M.NEGATE).setParameterLength(1), Tv = /* @__PURE__ */ L(M, M.ONE_MINUS).setParameterLength(1), vy = /* @__PURE__ */ L(M, M.DFDX).setParameterLength(1), wy = /* @__PURE__ */ L(M, M.DFDY).setParameterLength(1), Sv = /* @__PURE__ */ L(M, M.ROUND).setParameterLength(1), vv = /* @__PURE__ */ L(M, M.RECIPROCAL).setParameterLength(1), wv = /* @__PURE__ */ L(M, M.TRUNC).setParameterLength(1), Ev = /* @__PURE__ */ L(M, M.FWIDTH).setParameterLength(1), Cv = /* @__PURE__ */ L(M, M.TRANSPOSE).setParameterLength(1), Mv = (a, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), xy(a, e)), Pr = /* @__PURE__ */ L(M, M.MIN).setParameterLength(2, 1 / 0), Mt = /* @__PURE__ */ L(M, M.MAX).setParameterLength(2, 1 / 0), Ey = /* @__PURE__ */ L(M, M.STEP).setParameterLength(2), Av = /* @__PURE__ */ L(M, M.REFLECT).setParameterLength(2), Rv = /* @__PURE__ */ L(M, M.DISTANCE).setParameterLength(2), Nv = /* @__PURE__ */ L(M, M.DIFFERENCE).setParameterLength(2), rd = /* @__PURE__ */ L(M, M.DOT).setParameterLength(2), Cy = /* @__PURE__ */ L(M, M.CROSS).setParameterLength(2), ql = /* @__PURE__ */ L(M, M.POW).setParameterLength(2), My = /* @__PURE__ */ L(M, M.POW, 2).setParameterLength(1), Pv = /* @__PURE__ */ L(M, M.POW, 3).setParameterLength(1), Fv = /* @__PURE__ */ L(M, M.POW, 4).setParameterLength(1), Dv = /* @__PURE__ */ L(M, M.TRANSFORM_DIRECTION).setParameterLength(2), Ov = (a) => fe(Dl(a), ql(cs(a), 1 / 3)), Ay = (a) => rd(a, a), Ve = /* @__PURE__ */ L(M, M.MIX).setParameterLength(3), mi = (a, e = 0, t = 1) => U(new M(M.CLAMP, U(a), U(e), U(t))), Ry = (a) => mi(a), Ny = /* @__PURE__ */ L(M, M.REFRACT).setParameterLength(3), Hi = /* @__PURE__ */ L(M, M.SMOOTHSTEP).setParameterLength(3), Bv = /* @__PURE__ */ L(M, M.FACEFORWARD).setParameterLength(3), Iv = /* @__PURE__ */ I(([a]) => {
14283
+ C.ALL = "all";
14284
+ C.ANY = "any";
14285
+ C.RADIANS = "radians";
14286
+ C.DEGREES = "degrees";
14287
+ C.EXP = "exp";
14288
+ C.EXP2 = "exp2";
14289
+ C.LOG = "log";
14290
+ C.LOG2 = "log2";
14291
+ C.SQRT = "sqrt";
14292
+ C.INVERSE_SQRT = "inversesqrt";
14293
+ C.FLOOR = "floor";
14294
+ C.CEIL = "ceil";
14295
+ C.NORMALIZE = "normalize";
14296
+ C.FRACT = "fract";
14297
+ C.SIN = "sin";
14298
+ C.COS = "cos";
14299
+ C.TAN = "tan";
14300
+ C.ASIN = "asin";
14301
+ C.ACOS = "acos";
14302
+ C.ATAN = "atan";
14303
+ C.ABS = "abs";
14304
+ C.SIGN = "sign";
14305
+ C.LENGTH = "length";
14306
+ C.NEGATE = "negate";
14307
+ C.ONE_MINUS = "oneMinus";
14308
+ C.DFDX = "dFdx";
14309
+ C.DFDY = "dFdy";
14310
+ C.ROUND = "round";
14311
+ C.RECIPROCAL = "reciprocal";
14312
+ C.TRUNC = "trunc";
14313
+ C.FWIDTH = "fwidth";
14314
+ C.TRANSPOSE = "transpose";
14315
+ C.BITCAST = "bitcast";
14316
+ C.EQUALS = "equals";
14317
+ C.MIN = "min";
14318
+ C.MAX = "max";
14319
+ C.STEP = "step";
14320
+ C.REFLECT = "reflect";
14321
+ C.DISTANCE = "distance";
14322
+ C.DIFFERENCE = "difference";
14323
+ C.DOT = "dot";
14324
+ C.CROSS = "cross";
14325
+ C.POW = "pow";
14326
+ C.TRANSFORM_DIRECTION = "transformDirection";
14327
+ C.MIX = "mix";
14328
+ C.CLAMP = "clamp";
14329
+ C.REFRACT = "refract";
14330
+ C.SMOOTHSTEP = "smoothstep";
14331
+ C.FACEFORWARD = "faceforward";
14332
+ const uv = /* @__PURE__ */ O(1e-6), dv = /* @__PURE__ */ O(Math.PI), pv = /* @__PURE__ */ L(C, C.ALL).setParameterLength(1), fv = /* @__PURE__ */ L(C, C.ANY).setParameterLength(1), mv = /* @__PURE__ */ L(C, C.RADIANS).setParameterLength(1), gv = /* @__PURE__ */ L(C, C.DEGREES).setParameterLength(1), _y = /* @__PURE__ */ L(C, C.EXP).setParameterLength(1), Va = /* @__PURE__ */ L(C, C.EXP2).setParameterLength(1), by = /* @__PURE__ */ L(C, C.LOG).setParameterLength(1), hi = /* @__PURE__ */ L(C, C.LOG2).setParameterLength(1), id = /* @__PURE__ */ L(C, C.SQRT).setParameterLength(1), yv = /* @__PURE__ */ L(C, C.INVERSE_SQRT).setParameterLength(1), Tn = /* @__PURE__ */ L(C, C.FLOOR).setParameterLength(1), nd = /* @__PURE__ */ L(C, C.CEIL).setParameterLength(1), Ha = /* @__PURE__ */ L(C, C.NORMALIZE).setParameterLength(1), ji = /* @__PURE__ */ L(C, C.FRACT).setParameterLength(1), Es = /* @__PURE__ */ L(C, C.SIN).setParameterLength(1), Fi = /* @__PURE__ */ L(C, C.COS).setParameterLength(1), xv = /* @__PURE__ */ L(C, C.TAN).setParameterLength(1), _v = /* @__PURE__ */ L(C, C.ASIN).setParameterLength(1), Ty = /* @__PURE__ */ L(C, C.ACOS).setParameterLength(1), Sy = /* @__PURE__ */ L(C, C.ATAN).setParameterLength(1, 2), cs = /* @__PURE__ */ L(C, C.ABS).setParameterLength(1), Dl = /* @__PURE__ */ L(C, C.SIGN).setParameterLength(1), ui = /* @__PURE__ */ L(C, C.LENGTH).setParameterLength(1), bv = /* @__PURE__ */ L(C, C.NEGATE).setParameterLength(1), Tv = /* @__PURE__ */ L(C, C.ONE_MINUS).setParameterLength(1), vy = /* @__PURE__ */ L(C, C.DFDX).setParameterLength(1), wy = /* @__PURE__ */ L(C, C.DFDY).setParameterLength(1), Sv = /* @__PURE__ */ L(C, C.ROUND).setParameterLength(1), vv = /* @__PURE__ */ L(C, C.RECIPROCAL).setParameterLength(1), wv = /* @__PURE__ */ L(C, C.TRUNC).setParameterLength(1), Ev = /* @__PURE__ */ L(C, C.FWIDTH).setParameterLength(1), Mv = /* @__PURE__ */ L(C, C.TRANSPOSE).setParameterLength(1), Cv = (a, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), xy(a, e)), Pr = /* @__PURE__ */ L(C, C.MIN).setParameterLength(2, 1 / 0), Ct = /* @__PURE__ */ L(C, C.MAX).setParameterLength(2, 1 / 0), Ey = /* @__PURE__ */ L(C, C.STEP).setParameterLength(2), Av = /* @__PURE__ */ L(C, C.REFLECT).setParameterLength(2), Rv = /* @__PURE__ */ L(C, C.DISTANCE).setParameterLength(2), Nv = /* @__PURE__ */ L(C, C.DIFFERENCE).setParameterLength(2), rd = /* @__PURE__ */ L(C, C.DOT).setParameterLength(2), My = /* @__PURE__ */ L(C, C.CROSS).setParameterLength(2), ql = /* @__PURE__ */ L(C, C.POW).setParameterLength(2), Cy = /* @__PURE__ */ L(C, C.POW, 2).setParameterLength(1), Pv = /* @__PURE__ */ L(C, C.POW, 3).setParameterLength(1), Fv = /* @__PURE__ */ L(C, C.POW, 4).setParameterLength(1), Dv = /* @__PURE__ */ L(C, C.TRANSFORM_DIRECTION).setParameterLength(2), Ov = (a) => fe(Dl(a), ql(cs(a), 1 / 3)), Ay = (a) => rd(a, a), Ve = /* @__PURE__ */ L(C, C.MIX).setParameterLength(3), mi = (a, e = 0, t = 1) => U(new C(C.CLAMP, U(a), U(e), U(t))), Ry = (a) => mi(a), Ny = /* @__PURE__ */ L(C, C.REFRACT).setParameterLength(3), Hi = /* @__PURE__ */ L(C, C.SMOOTHSTEP).setParameterLength(3), Bv = /* @__PURE__ */ L(C, C.FACEFORWARD).setParameterLength(3), Iv = /* @__PURE__ */ I(([a]) => {
14333
14333
  const s = 43758.5453, i = rd(a.xy, V(12.9898, 78.233)), n = jl(i, dv);
14334
14334
  return ji(Es(n).mul(s));
14335
14335
  }), Lv = (a, e, t) => Ve(e, t, a), Uv = (a, e, t) => Hi(e, t, a), kv = (a, e) => (console.warn('THREE.TSL: "atan2" is overloaded. Use "atan" instead.'), Sy(a, e));
14336
14336
  D("all", pv);
14337
14337
  D("any", fv);
14338
- D("equals", Mv);
14338
+ D("equals", Cv);
14339
14339
  D("radians", mv);
14340
14340
  D("degrees", gv);
14341
14341
  D("exp", _y);
@@ -14368,14 +14368,14 @@ D("trunc", wv);
14368
14368
  D("fwidth", Ev);
14369
14369
  D("atan2", kv);
14370
14370
  D("min", Pr);
14371
- D("max", Mt);
14371
+ D("max", Ct);
14372
14372
  D("step", Ey);
14373
14373
  D("reflect", Av);
14374
14374
  D("distance", Rv);
14375
14375
  D("dot", rd);
14376
- D("cross", Cy);
14376
+ D("cross", My);
14377
14377
  D("pow", ql);
14378
- D("pow2", My);
14378
+ D("pow2", Cy);
14379
14379
  D("pow3", Pv);
14380
14380
  D("pow4", Fv);
14381
14381
  D("transformDirection", Dv);
@@ -14387,7 +14387,7 @@ D("faceForward", Bv);
14387
14387
  D("difference", Nv);
14388
14388
  D("saturate", Ry);
14389
14389
  D("cbrt", Ov);
14390
- D("transpose", Cv);
14390
+ D("transpose", Mv);
14391
14391
  D("rand", Iv);
14392
14392
  class zv extends re {
14393
14393
  static get type() {
@@ -15948,7 +15948,7 @@ class ww extends re {
15948
15948
  return e.addFlowTab(), r;
15949
15949
  }
15950
15950
  }
15951
- const Ms = (...a) => U(new ww(br(a, "int"))).toStack(), Ew = () => Fr("break").toStack();
15951
+ const Cs = (...a) => U(new ww(br(a, "int"))).toStack(), Ew = () => Fr("break").toStack();
15952
15952
  class Qa {
15953
15953
  /**
15954
15954
  * Constructs a new bounding box.
@@ -16368,7 +16368,7 @@ function Nc(a, e, t, s, i) {
16368
16368
  }
16369
16369
  return !0;
16370
16370
  }
16371
- const Cw = /* @__PURE__ */ new Qa(), Xr = /* @__PURE__ */ new R(), Pc = /* @__PURE__ */ new R();
16371
+ const Mw = /* @__PURE__ */ new Qa(), Xr = /* @__PURE__ */ new R(), Pc = /* @__PURE__ */ new R();
16372
16372
  class Yl {
16373
16373
  /**
16374
16374
  * Constructs a new sphere.
@@ -16401,7 +16401,7 @@ class Yl {
16401
16401
  */
16402
16402
  setFromPoints(e, t) {
16403
16403
  const s = this.center;
16404
- t !== void 0 ? s.copy(t) : Cw.setFromPoints(e).getCenter(s);
16404
+ t !== void 0 ? s.copy(t) : Mw.setFromPoints(e).getCenter(s);
16405
16405
  let i = 0;
16406
16406
  for (let n = 0, r = e.length; n < r; n++)
16407
16407
  i = Math.max(i, s.distanceToSquared(e[n]));
@@ -16663,7 +16663,7 @@ Fe.SCALE = "scale";
16663
16663
  Fe.VIEW_POSITION = "viewPosition";
16664
16664
  Fe.DIRECTION = "direction";
16665
16665
  Fe.RADIUS = "radius";
16666
- const Mw = /* @__PURE__ */ L(Fe, Fe.POSITION).setParameterLength(1);
16666
+ const Cw = /* @__PURE__ */ L(Fe, Fe.POSITION).setParameterLength(1);
16667
16667
  class Ly extends Ka {
16668
16668
  static get type() {
16669
16669
  return "BufferNode";
@@ -16727,7 +16727,7 @@ class Rw extends Ly {
16727
16727
  * @param {?string} [elementType=null] - The data type of a buffer element.
16728
16728
  */
16729
16729
  constructor(e, t = null) {
16730
- super(null), this.array = e, this.elementType = t === null ? Ml(e[0]) : t, this.paddedType = this.getPaddedType(), this.updateType = ue.RENDER, this.isArrayBufferNode = !0;
16730
+ super(null), this.array = e, this.elementType = t === null ? Cl(e[0]) : t, this.paddedType = this.getPaddedType(), this.updateType = ue.RENDER, this.isArrayBufferNode = !0;
16731
16731
  }
16732
16732
  /**
16733
16733
  * This method is overwritten since the node type is inferred from the
@@ -17127,7 +17127,7 @@ class Ww extends re {
17127
17127
  return e.format(`${e.getMethod("textureDimensions")}( ${s}, ${i} )`, this.getNodeType(e), t);
17128
17128
  }
17129
17129
  }
17130
- const wr = /* @__PURE__ */ L(Ww).setParameterLength(1, 2), Wy = /* @__PURE__ */ new Ct();
17130
+ const wr = /* @__PURE__ */ L(Ww).setParameterLength(1, 2), Wy = /* @__PURE__ */ new Mt();
17131
17131
  class Lr extends Ka {
17132
17132
  static get type() {
17133
17133
  return "TextureNode";
@@ -17437,7 +17437,7 @@ const jw = /* @__PURE__ */ L(Lr).setParameterLength(1, 4).setName("texture"), be
17437
17437
  let i;
17438
17438
  return a && a.isTextureNode === !0 ? (i = U(a.clone()), i.referenceNode = a.getSelf(), e !== null && (i.uvNode = U(e)), t !== null && (i.levelNode = U(t)), s !== null && (i.biasNode = U(s))) : i = jw(a, e, t, s), i;
17439
17439
  }, vs = (...a) => be(...a).setSampler(!1);
17440
- class qw extends Ct {
17440
+ class qw extends Mt {
17441
17441
  /**
17442
17442
  * Constructs a new framebuffer texture.
17443
17443
  *
@@ -17750,7 +17750,7 @@ class Di {
17750
17750
  return new this.constructor().copy(this);
17751
17751
  }
17752
17752
  }
17753
- class Mn extends Cn {
17753
+ class Cn extends Mn {
17754
17754
  /**
17755
17755
  * Render target options.
17756
17756
  *
@@ -17797,7 +17797,7 @@ class Mn extends Cn {
17797
17797
  depth: 1,
17798
17798
  multiview: !1
17799
17799
  }, s), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = s.depth, this.scissor = new ge(0, 0, e, t), this.scissorTest = !1, this.viewport = new ge(0, 0, e, t);
17800
- const i = { width: e, height: t, depth: s.depth }, n = new Ct(i);
17800
+ const i = { width: e, height: t, depth: s.depth }, n = new Mt(i);
17801
17801
  this.textures = [];
17802
17802
  const r = s.count;
17803
17803
  for (let o = 0; o < r; o++)
@@ -17902,16 +17902,16 @@ new R();
17902
17902
  new R();
17903
17903
  new ge();
17904
17904
  new he();
17905
- const eE = new Mn();
17905
+ const eE = new Cn();
17906
17906
  vr.flipX();
17907
17907
  eE.depthTexture = new $s(1, 1);
17908
17908
  let tE = 0;
17909
- class qt extends Cn {
17909
+ class qt extends Mn {
17910
17910
  /**
17911
17911
  * Constructs a new material.
17912
17912
  */
17913
17913
  constructor() {
17914
- super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: tE++ }), this.uuid = ni(), this.name = "", this.type = "Material", this.blending = ai, this.side = ri, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = _l, this.blendDst = bl, this.blendEquation = Cs, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new we(0, 0, 0), this.blendAlpha = 0, this.depthFunc = Tl, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = du, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = hn, this.stencilZFail = hn, this.stencilZPass = hn, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
17914
+ super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: tE++ }), this.uuid = ni(), this.name = "", this.type = "Material", this.blending = ai, this.side = ri, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = _l, this.blendDst = bl, this.blendEquation = Ms, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new we(0, 0, 0), this.blendAlpha = 0, this.depthFunc = Tl, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = du, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = hn, this.stencilZFail = hn, this.stencilZPass = hn, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
17915
17915
  }
17916
17916
  /**
17917
17917
  * Sets the alpha value to be used when running an alpha test. The material
@@ -18010,7 +18010,7 @@ class qt extends Cn {
18010
18010
  generator: "Material.toJSON"
18011
18011
  }
18012
18012
  };
18013
- s.uuid = this.uuid, s.type = this.type, this.name !== "" && (s.name = this.name), this.color && this.color.isColor && (s.color = this.color.getHex()), this.roughness !== void 0 && (s.roughness = this.roughness), this.metalness !== void 0 && (s.metalness = this.metalness), this.sheen !== void 0 && (s.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (s.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (s.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (s.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (s.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (s.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (s.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (s.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (s.shininess = this.shininess), this.clearcoat !== void 0 && (s.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (s.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (s.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (s.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (s.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, s.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.dispersion !== void 0 && (s.dispersion = this.dispersion), this.iridescence !== void 0 && (s.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (s.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (s.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (s.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (s.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (s.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (s.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (s.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (s.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (s.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (s.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (s.lightMap = this.lightMap.toJSON(e).uuid, s.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (s.aoMap = this.aoMap.toJSON(e).uuid, s.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (s.bumpMap = this.bumpMap.toJSON(e).uuid, s.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (s.normalMap = this.normalMap.toJSON(e).uuid, s.normalMapType = this.normalMapType, s.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (s.displacementMap = this.displacementMap.toJSON(e).uuid, s.displacementScale = this.displacementScale, s.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (s.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (s.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (s.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (s.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (s.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (s.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (s.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (s.combine = this.combine)), this.envMapRotation !== void 0 && (s.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (s.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (s.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (s.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (s.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (s.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (s.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (s.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (s.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (s.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (s.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (s.size = this.size), this.shadowSide !== null && (s.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (s.sizeAttenuation = this.sizeAttenuation), this.blending !== ai && (s.blending = this.blending), this.side !== ri && (s.side = this.side), this.vertexColors === !0 && (s.vertexColors = !0), this.opacity < 1 && (s.opacity = this.opacity), this.transparent === !0 && (s.transparent = !0), this.blendSrc !== _l && (s.blendSrc = this.blendSrc), this.blendDst !== bl && (s.blendDst = this.blendDst), this.blendEquation !== Cs && (s.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (s.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (s.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (s.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (s.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (s.blendAlpha = this.blendAlpha), this.depthFunc !== Tl && (s.depthFunc = this.depthFunc), this.depthTest === !1 && (s.depthTest = this.depthTest), this.depthWrite === !1 && (s.depthWrite = this.depthWrite), this.colorWrite === !1 && (s.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (s.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== du && (s.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (s.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (s.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== hn && (s.stencilFail = this.stencilFail), this.stencilZFail !== hn && (s.stencilZFail = this.stencilZFail), this.stencilZPass !== hn && (s.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (s.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (s.rotation = this.rotation), this.polygonOffset === !0 && (s.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (s.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (s.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (s.linewidth = this.linewidth), this.dashSize !== void 0 && (s.dashSize = this.dashSize), this.gapSize !== void 0 && (s.gapSize = this.gapSize), this.scale !== void 0 && (s.scale = this.scale), this.dithering === !0 && (s.dithering = !0), this.alphaTest > 0 && (s.alphaTest = this.alphaTest), this.alphaHash === !0 && (s.alphaHash = !0), this.alphaToCoverage === !0 && (s.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (s.premultipliedAlpha = !0), this.forceSinglePass === !0 && (s.forceSinglePass = !0), this.wireframe === !0 && (s.wireframe = !0), this.wireframeLinewidth > 1 && (s.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (s.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (s.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (s.flatShading = !0), this.visible === !1 && (s.visible = !1), this.toneMapped === !1 && (s.toneMapped = !1), this.fog === !1 && (s.fog = !1), Object.keys(this.userData).length > 0 && (s.userData = this.userData);
18013
+ s.uuid = this.uuid, s.type = this.type, this.name !== "" && (s.name = this.name), this.color && this.color.isColor && (s.color = this.color.getHex()), this.roughness !== void 0 && (s.roughness = this.roughness), this.metalness !== void 0 && (s.metalness = this.metalness), this.sheen !== void 0 && (s.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (s.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (s.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (s.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (s.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (s.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (s.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (s.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (s.shininess = this.shininess), this.clearcoat !== void 0 && (s.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (s.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (s.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (s.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (s.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, s.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.dispersion !== void 0 && (s.dispersion = this.dispersion), this.iridescence !== void 0 && (s.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (s.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (s.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (s.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (s.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (s.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (s.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (s.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (s.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (s.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (s.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (s.lightMap = this.lightMap.toJSON(e).uuid, s.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (s.aoMap = this.aoMap.toJSON(e).uuid, s.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (s.bumpMap = this.bumpMap.toJSON(e).uuid, s.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (s.normalMap = this.normalMap.toJSON(e).uuid, s.normalMapType = this.normalMapType, s.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (s.displacementMap = this.displacementMap.toJSON(e).uuid, s.displacementScale = this.displacementScale, s.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (s.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (s.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (s.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (s.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (s.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (s.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (s.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (s.combine = this.combine)), this.envMapRotation !== void 0 && (s.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (s.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (s.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (s.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (s.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (s.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (s.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (s.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (s.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (s.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (s.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (s.size = this.size), this.shadowSide !== null && (s.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (s.sizeAttenuation = this.sizeAttenuation), this.blending !== ai && (s.blending = this.blending), this.side !== ri && (s.side = this.side), this.vertexColors === !0 && (s.vertexColors = !0), this.opacity < 1 && (s.opacity = this.opacity), this.transparent === !0 && (s.transparent = !0), this.blendSrc !== _l && (s.blendSrc = this.blendSrc), this.blendDst !== bl && (s.blendDst = this.blendDst), this.blendEquation !== Ms && (s.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (s.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (s.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (s.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (s.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (s.blendAlpha = this.blendAlpha), this.depthFunc !== Tl && (s.depthFunc = this.depthFunc), this.depthTest === !1 && (s.depthTest = this.depthTest), this.depthWrite === !1 && (s.depthWrite = this.depthWrite), this.colorWrite === !1 && (s.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (s.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== du && (s.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (s.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (s.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== hn && (s.stencilFail = this.stencilFail), this.stencilZFail !== hn && (s.stencilZFail = this.stencilZFail), this.stencilZPass !== hn && (s.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (s.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (s.rotation = this.rotation), this.polygonOffset === !0 && (s.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (s.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (s.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (s.linewidth = this.linewidth), this.dashSize !== void 0 && (s.dashSize = this.dashSize), this.gapSize !== void 0 && (s.gapSize = this.gapSize), this.scale !== void 0 && (s.scale = this.scale), this.dithering === !0 && (s.dithering = !0), this.alphaTest > 0 && (s.alphaTest = this.alphaTest), this.alphaHash === !0 && (s.alphaHash = !0), this.alphaToCoverage === !0 && (s.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (s.premultipliedAlpha = !0), this.forceSinglePass === !0 && (s.forceSinglePass = !0), this.wireframe === !0 && (s.wireframe = !0), this.wireframeLinewidth > 1 && (s.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (s.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (s.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (s.flatShading = !0), this.visible === !1 && (s.visible = !1), this.toneMapped === !1 && (s.toneMapped = !1), this.fog === !1 && (s.fog = !1), Object.keys(this.userData).length > 0 && (s.userData = this.userData);
18014
18014
  function i(n) {
18015
18015
  const r = [];
18016
18016
  for (const o in n) {
@@ -18080,7 +18080,7 @@ const af = /* @__PURE__ */ new gs(), Oc = /* @__PURE__ */ new Le(), sE = /* @__P
18080
18080
  const t = e.environment !== null && a.envMap === null ? e.environmentRotation : a.envMapRotation;
18081
18081
  return t ? (af.copy(t), Oc.makeRotationFromEuler(af)) : Oc.identity(), Oc;
18082
18082
  }), iE = /* @__PURE__ */ Ye.negate().reflect(st), nE = /* @__PURE__ */ Ye.negate().refract(st, sE), rE = /* @__PURE__ */ iE.transformDirection(xi).toVar("reflectVector"), aE = /* @__PURE__ */ nE.transformDirection(xi).toVar("reflectVector");
18083
- class ec extends Ct {
18083
+ class ec extends Mt {
18084
18084
  /**
18085
18085
  * Constructs a new cube texture.
18086
18086
  *
@@ -18586,7 +18586,7 @@ F.POINT_SIZE = "size";
18586
18586
  F.DISPERSION = "dispersion";
18587
18587
  F.LIGHT_MAP = "light";
18588
18588
  F.AO = "ao";
18589
- const TE = /* @__PURE__ */ G(F, F.ALPHA_TEST), SE = /* @__PURE__ */ G(F, F.COLOR), vE = /* @__PURE__ */ G(F, F.SHININESS), wE = /* @__PURE__ */ G(F, F.EMISSIVE), t0 = /* @__PURE__ */ G(F, F.OPACITY), EE = /* @__PURE__ */ G(F, F.SPECULAR), hf = /* @__PURE__ */ G(F, F.SPECULAR_INTENSITY), CE = /* @__PURE__ */ G(F, F.SPECULAR_COLOR), hl = /* @__PURE__ */ G(F, F.SPECULAR_STRENGTH), Ic = /* @__PURE__ */ G(F, F.REFLECTIVITY), ME = /* @__PURE__ */ G(F, F.ROUGHNESS), AE = /* @__PURE__ */ G(F, F.METALNESS), RE = /* @__PURE__ */ G(F, F.NORMAL), NE = /* @__PURE__ */ G(F, F.CLEARCOAT), PE = /* @__PURE__ */ G(F, F.CLEARCOAT_ROUGHNESS), FE = /* @__PURE__ */ G(F, F.CLEARCOAT_NORMAL), DE = /* @__PURE__ */ G(F, F.ROTATION), OE = /* @__PURE__ */ G(F, F.SHEEN), BE = /* @__PURE__ */ G(F, F.SHEEN_ROUGHNESS), IE = /* @__PURE__ */ G(F, F.ANISOTROPY), LE = /* @__PURE__ */ G(F, F.IRIDESCENCE), UE = /* @__PURE__ */ G(F, F.IRIDESCENCE_IOR), kE = /* @__PURE__ */ G(F, F.IRIDESCENCE_THICKNESS), zE = /* @__PURE__ */ G(F, F.TRANSMISSION), GE = /* @__PURE__ */ G(F, F.THICKNESS), VE = /* @__PURE__ */ G(F, F.IOR), HE = /* @__PURE__ */ G(F, F.ATTENUATION_DISTANCE), $E = /* @__PURE__ */ G(F, F.ATTENUATION_COLOR), WE = /* @__PURE__ */ G(F, F.LINE_SCALE), jE = /* @__PURE__ */ G(F, F.LINE_DASH_SIZE), qE = /* @__PURE__ */ G(F, F.LINE_GAP_SIZE);
18589
+ const TE = /* @__PURE__ */ G(F, F.ALPHA_TEST), SE = /* @__PURE__ */ G(F, F.COLOR), vE = /* @__PURE__ */ G(F, F.SHININESS), wE = /* @__PURE__ */ G(F, F.EMISSIVE), t0 = /* @__PURE__ */ G(F, F.OPACITY), EE = /* @__PURE__ */ G(F, F.SPECULAR), hf = /* @__PURE__ */ G(F, F.SPECULAR_INTENSITY), ME = /* @__PURE__ */ G(F, F.SPECULAR_COLOR), hl = /* @__PURE__ */ G(F, F.SPECULAR_STRENGTH), Ic = /* @__PURE__ */ G(F, F.REFLECTIVITY), CE = /* @__PURE__ */ G(F, F.ROUGHNESS), AE = /* @__PURE__ */ G(F, F.METALNESS), RE = /* @__PURE__ */ G(F, F.NORMAL), NE = /* @__PURE__ */ G(F, F.CLEARCOAT), PE = /* @__PURE__ */ G(F, F.CLEARCOAT_ROUGHNESS), FE = /* @__PURE__ */ G(F, F.CLEARCOAT_NORMAL), DE = /* @__PURE__ */ G(F, F.ROTATION), OE = /* @__PURE__ */ G(F, F.SHEEN), BE = /* @__PURE__ */ G(F, F.SHEEN_ROUGHNESS), IE = /* @__PURE__ */ G(F, F.ANISOTROPY), LE = /* @__PURE__ */ G(F, F.IRIDESCENCE), UE = /* @__PURE__ */ G(F, F.IRIDESCENCE_IOR), kE = /* @__PURE__ */ G(F, F.IRIDESCENCE_THICKNESS), zE = /* @__PURE__ */ G(F, F.TRANSMISSION), GE = /* @__PURE__ */ G(F, F.THICKNESS), VE = /* @__PURE__ */ G(F, F.IOR), HE = /* @__PURE__ */ G(F, F.ATTENUATION_DISTANCE), $E = /* @__PURE__ */ G(F, F.ATTENUATION_COLOR), WE = /* @__PURE__ */ G(F, F.LINE_SCALE), jE = /* @__PURE__ */ G(F, F.LINE_DASH_SIZE), qE = /* @__PURE__ */ G(F, F.LINE_GAP_SIZE);
18590
18590
  F.LINE_WIDTH;
18591
18591
  const YE = /* @__PURE__ */ G(F, F.LINE_DASH_OFFSET), XE = /* @__PURE__ */ G(F, F.POINT_SIZE), ZE = /* @__PURE__ */ G(F, F.DISPERSION), s0 = /* @__PURE__ */ G(F, F.LIGHT_MAP), KE = /* @__PURE__ */ G(F, F.AO), Jr = /* @__PURE__ */ Q(new he()).onReference(function(a) {
18592
18592
  return a.material;
@@ -18636,7 +18636,7 @@ class JE extends ps {
18636
18636
  return e.meshPerAttribute = this.meshPerAttribute, e.isInstancedBufferAttribute = !0, e;
18637
18637
  }
18638
18638
  }
18639
- class eC extends re {
18639
+ class eM extends re {
18640
18640
  static get type() {
18641
18641
  return "InstanceNode";
18642
18642
  }
@@ -18697,7 +18697,7 @@ class eC extends re {
18697
18697
  this.instanceMatrix.usage !== hr && this.buffer !== null && this.instanceMatrix.version !== this.buffer.version && (this.buffer.version = this.instanceMatrix.version), this.instanceColor && this.instanceColor.usage !== hr && this.bufferColor !== null && this.instanceColor.version !== this.bufferColor.version && (this.bufferColor.version = this.instanceColor.version);
18698
18698
  }
18699
18699
  }
18700
- class tC extends eC {
18700
+ class tM extends eM {
18701
18701
  static get type() {
18702
18702
  return "InstancedMeshNode";
18703
18703
  }
@@ -18711,8 +18711,8 @@ class tC extends eC {
18711
18711
  super(t, s, i), this.instancedMesh = e;
18712
18712
  }
18713
18713
  }
18714
- const sC = /* @__PURE__ */ L(tC).setParameterLength(1);
18715
- class iC extends re {
18714
+ const sM = /* @__PURE__ */ L(tM).setParameterLength(1);
18715
+ class iM extends re {
18716
18716
  static get type() {
18717
18717
  return "BatchNode";
18718
18718
  }
@@ -18767,8 +18767,8 @@ class iC extends re {
18767
18767
  js.assign(p), e.hasGeometryAttribute("tangent") && yd.mulAssign(u);
18768
18768
  }
18769
18769
  }
18770
- const nC = /* @__PURE__ */ L(iC).setParameterLength(1), uf = /* @__PURE__ */ new WeakMap();
18771
- class rC extends re {
18770
+ const nM = /* @__PURE__ */ L(iM).setParameterLength(1), uf = /* @__PURE__ */ new WeakMap();
18771
+ class rM extends re {
18772
18772
  static get type() {
18773
18773
  return "SkinningNode";
18774
18774
  }
@@ -18870,8 +18870,8 @@ class rC extends re {
18870
18870
  uf.get(t) !== e.frameId && (uf.set(t, e.frameId), this.previousBoneMatricesNode !== null && t.previousBoneMatrices.set(t.boneMatrices), t.update());
18871
18871
  }
18872
18872
  }
18873
- const aC = (a) => U(new rC(a));
18874
- class oC extends Ct {
18873
+ const aM = (a) => U(new rM(a));
18874
+ class oM extends Mt {
18875
18875
  /**
18876
18876
  * Constructs a new data array texture.
18877
18877
  *
@@ -18906,7 +18906,7 @@ const Lc = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new ge(), df = /*
18906
18906
  const r = ze(bw).mul(t).add(n), o = r.div(s), l = r.sub(o.mul(s));
18907
18907
  return vs(a, ei(l, o)).depth(i).xyz.mul(e);
18908
18908
  });
18909
- function lC(a) {
18909
+ function lM(a) {
18910
18910
  const e = a.morphAttributes.position !== void 0, t = a.morphAttributes.normal !== void 0, s = a.morphAttributes.color !== void 0, i = a.morphAttributes.position || a.morphAttributes.normal || a.morphAttributes.color, n = i !== void 0 ? i.length : 0;
18911
18911
  let r = Lc.get(a);
18912
18912
  if (r === void 0 || r.count !== n) {
@@ -18920,7 +18920,7 @@ function lC(a) {
18920
18920
  let u = a.attributes.position.count * h, d = 1;
18921
18921
  const p = 4096;
18922
18922
  u > p && (d = Math.ceil(u / p), u = p);
18923
- const f = new Float32Array(u * d * 4 * n), m = new oC(f, u, d, n);
18923
+ const f = new Float32Array(u * d * 4 * n), m = new oM(f, u, d, n);
18924
18924
  m.type = is, m.needsUpdate = !0;
18925
18925
  const y = h * 4;
18926
18926
  for (let x = 0; x < n; x++) {
@@ -18939,7 +18939,7 @@ function lC(a) {
18939
18939
  }
18940
18940
  return r;
18941
18941
  }
18942
- class cC extends re {
18942
+ class cM extends re {
18943
18943
  static get type() {
18944
18944
  return "MorphNode";
18945
18945
  }
@@ -18957,10 +18957,10 @@ class cC extends re {
18957
18957
  * @param {NodeBuilder} builder - The current node builder.
18958
18958
  */
18959
18959
  setup(e) {
18960
- const { geometry: t } = e, s = t.morphAttributes.position !== void 0, i = t.hasAttribute("normal") && t.morphAttributes.normal !== void 0, n = t.morphAttributes.position || t.morphAttributes.normal || t.morphAttributes.color, r = n !== void 0 ? n.length : 0, { texture: o, stride: l, size: c } = lC(t);
18960
+ const { geometry: t } = e, s = t.morphAttributes.position !== void 0, i = t.hasAttribute("normal") && t.morphAttributes.normal !== void 0, n = t.morphAttributes.position || t.morphAttributes.normal || t.morphAttributes.color, r = n !== void 0 ? n.length : 0, { texture: o, stride: l, size: c } = lM(t);
18961
18961
  s === !0 && wt.mulAssign(this.morphBaseInfluence), i === !0 && js.mulAssign(this.morphBaseInfluence);
18962
18962
  const h = ze(c.width);
18963
- Ms(r, ({ i: u }) => {
18963
+ Cs(r, ({ i: u }) => {
18964
18964
  const d = O(0).toVar();
18965
18965
  this.mesh.count > 1 && this.mesh.morphTexture !== null && this.mesh.morphTexture !== void 0 ? d.assign(vs(this.mesh.morphTexture, ei(ze(u).add(1), ze(dd))).r) : d.assign(Ie("morphTargetInfluences", "float").element(u).toVar()), Qe(d.notEqual(0), () => {
18966
18966
  s === !0 && wt.addAssign(df({
@@ -18991,7 +18991,7 @@ class cC extends re {
18991
18991
  this.mesh.geometry.morphTargetsRelative ? e.value = 1 : e.value = 1 - this.mesh.morphTargetInfluences.reduce((t, s) => t + s, 0);
18992
18992
  }
18993
18993
  }
18994
- const hC = /* @__PURE__ */ L(cC).setParameterLength(1);
18994
+ const hM = /* @__PURE__ */ L(cM).setParameterLength(1);
18995
18995
  class Ur extends re {
18996
18996
  static get type() {
18997
18997
  return "LightingNode";
@@ -19003,7 +19003,7 @@ class Ur extends re {
19003
19003
  super("vec3"), this.isLightingNode = !0;
19004
19004
  }
19005
19005
  }
19006
- class uC extends Ur {
19006
+ class uM extends Ur {
19007
19007
  static get type() {
19008
19008
  return "AONode";
19009
19009
  }
@@ -19019,7 +19019,7 @@ class uC extends Ur {
19019
19019
  e.context.ambientOcclusion.mulAssign(this.aoNode);
19020
19020
  }
19021
19021
  }
19022
- class dC extends Py {
19022
+ class dM extends Py {
19023
19023
  static get type() {
19024
19024
  return "LightingContextNode";
19025
19025
  }
@@ -19068,8 +19068,8 @@ class dC extends Py {
19068
19068
  return this.value = this._value || (this._value = this.getContext()), this.value.lightingModel = this.lightingModel || e.context.lightingModel, super.setup(e);
19069
19069
  }
19070
19070
  }
19071
- const pC = /* @__PURE__ */ L(dC);
19072
- class fC extends Ur {
19071
+ const pM = /* @__PURE__ */ L(dM);
19072
+ class fM extends Ur {
19073
19073
  static get type() {
19074
19074
  return "IrradianceNode";
19075
19075
  }
@@ -19121,7 +19121,7 @@ class fs extends re {
19121
19121
  const s = O().toVar("distanceToPlane"), i = O().toVar("distanceToGradient"), n = O(1).toVar("clipOpacity"), r = t.length;
19122
19122
  if (this.hardwareClipping === !1 && r > 0) {
19123
19123
  const l = Gs(t);
19124
- Ms(r, ({ i: c }) => {
19124
+ Cs(r, ({ i: c }) => {
19125
19125
  const h = l.element(c);
19126
19126
  s.assign(it.dot(h.xyz).negate().add(h.w)), i.assign(s.fwidth().div(2)), n.mulAssign(Hi(i.negate(), i, s));
19127
19127
  });
@@ -19129,7 +19129,7 @@ class fs extends re {
19129
19129
  const o = e.length;
19130
19130
  if (o > 0) {
19131
19131
  const l = Gs(e), c = O(1).toVar("intersectionClipOpacity");
19132
- Ms(o, ({ i: h }) => {
19132
+ Cs(o, ({ i: h }) => {
19133
19133
  const u = l.element(h);
19134
19134
  s.assign(it.dot(u.xyz).negate().add(u.w)), i.assign(s.fwidth().div(2)), c.mulAssign(Hi(i.negate(), i, s).oneMinus());
19135
19135
  }), n.mulAssign(c.oneMinus());
@@ -19149,7 +19149,7 @@ class fs extends re {
19149
19149
  const s = t.length;
19150
19150
  if (this.hardwareClipping === !1 && s > 0) {
19151
19151
  const n = Gs(t);
19152
- Ms(s, ({ i: r }) => {
19152
+ Cs(s, ({ i: r }) => {
19153
19153
  const o = n.element(r);
19154
19154
  it.dot(o.xyz).greaterThan(o.w).discard();
19155
19155
  });
@@ -19157,7 +19157,7 @@ class fs extends re {
19157
19157
  const i = e.length;
19158
19158
  if (i > 0) {
19159
19159
  const n = Gs(e), r = Qu(!0).toVar("clipped");
19160
- Ms(i, ({ i: o }) => {
19160
+ Cs(i, ({ i: o }) => {
19161
19161
  const l = n.element(o);
19162
19162
  r.assign(it.dot(l.xyz).greaterThan(l.w).and(r));
19163
19163
  }), r.discard();
@@ -19175,7 +19175,7 @@ class fs extends re {
19175
19175
  const s = e.length;
19176
19176
  return t.enableHardwareClipping(s), I(() => {
19177
19177
  const i = Gs(e), n = Xl(t.getClipDistance());
19178
- Ms(s, ({ i: r }) => {
19178
+ Cs(s, ({ i: r }) => {
19179
19179
  const o = i.element(r), l = it.dot(o.xyz).sub(o.w).negate();
19180
19180
  n.element(r).assign(l);
19181
19181
  });
@@ -19185,7 +19185,7 @@ class fs extends re {
19185
19185
  fs.ALPHA_TO_COVERAGE = "alphaToCoverage";
19186
19186
  fs.DEFAULT = "default";
19187
19187
  fs.HARDWARE = "hardware";
19188
- const mC = () => U(new fs()), gC = () => U(new fs(fs.ALPHA_TO_COVERAGE)), yC = () => U(new fs(fs.HARDWARE)), xC = [
19188
+ const mM = () => U(new fs()), gM = () => U(new fs(fs.ALPHA_TO_COVERAGE)), yM = () => U(new fs(fs.HARDWARE)), xM = [
19189
19189
  "alphaMap",
19190
19190
  "alphaTest",
19191
19191
  "anisotropy",
@@ -19241,14 +19241,14 @@ const mC = () => U(new fs()), gC = () => U(new fs(fs.ALPHA_TO_COVERAGE)), yC = (
19241
19241
  "transmission",
19242
19242
  "transmissionMap"
19243
19243
  ];
19244
- class _C {
19244
+ class _M {
19245
19245
  /**
19246
19246
  * Constructs a new node material observer.
19247
19247
  *
19248
19248
  * @param {NodeBuilder} builder - The node builder.
19249
19249
  */
19250
19250
  constructor(e) {
19251
- this.renderObjects = /* @__PURE__ */ new WeakMap(), this.hasNode = this.containsNode(e), this.hasAnimation = e.object.isSkinnedMesh === !0, this.refreshUniforms = xC, this.renderId = 0;
19251
+ this.renderObjects = /* @__PURE__ */ new WeakMap(), this.hasNode = this.containsNode(e), this.hasAnimation = e.object.isSkinnedMesh === !0, this.refreshUniforms = xM, this.renderId = 0;
19252
19252
  }
19253
19253
  /**
19254
19254
  * Returns `true` if the given render object is verified for the first time of this observer.
@@ -19411,11 +19411,11 @@ class _C {
19411
19411
  return i || n ? !1 : this.equals(e) !== !0;
19412
19412
  }
19413
19413
  }
19414
- const bC = 0.05, pf = /* @__PURE__ */ I(([a]) => ji(fe(1e4, Es(fe(17, a.x).add(fe(0.1, a.y)))).mul(Lt(0.1, cs(Es(fe(13, a.y).add(a.x))))))), ff = /* @__PURE__ */ I(([a]) => pf(V(pf(a.xy), a.z))), TC = /* @__PURE__ */ I(([a]) => {
19415
- const e = Mt(
19414
+ const bM = 0.05, pf = /* @__PURE__ */ I(([a]) => ji(fe(1e4, Es(fe(17, a.x).add(fe(0.1, a.y)))).mul(Lt(0.1, cs(Es(fe(13, a.y).add(a.x))))))), ff = /* @__PURE__ */ I(([a]) => pf(V(pf(a.xy), a.z))), TM = /* @__PURE__ */ I(([a]) => {
19415
+ const e = Ct(
19416
19416
  ui(vy(a.xyz)),
19417
19417
  ui(wy(a.xyz))
19418
- ), t = O(1).div(O(bC).mul(e)).toVar("pixScale"), s = V(
19418
+ ), t = O(1).div(O(bM).mul(e)).toVar("pixScale"), s = V(
19419
19419
  Va(Tn(hi(t))),
19420
19420
  Va(nd(hi(t)))
19421
19421
  ), i = V(
@@ -19434,7 +19434,7 @@ const bC = 0.05, pf = /* @__PURE__ */ I(([a]) => ji(fe(1e4, Es(fe(17, a.x).add(f
19434
19434
  { name: "position", type: "vec3" }
19435
19435
  ]
19436
19436
  });
19437
- class SC extends Iy {
19437
+ class SM extends Iy {
19438
19438
  static get type() {
19439
19439
  return "VertexColorNode";
19440
19440
  }
@@ -19468,7 +19468,7 @@ class SC extends Iy {
19468
19468
  super.deserialize(e), this.index = e.index;
19469
19469
  }
19470
19470
  }
19471
- const vC = (a = 0) => U(new SC(a));
19471
+ const vM = (a = 0) => U(new SM(a));
19472
19472
  class nt extends qt {
19473
19473
  static get type() {
19474
19474
  return "NodeMaterial";
@@ -19519,7 +19519,7 @@ class nt extends qt {
19519
19519
  * @return {NodeMaterialObserver} The node material observer.
19520
19520
  */
19521
19521
  setupObserver(e) {
19522
- return new _C(e);
19522
+ return new _M(e);
19523
19523
  }
19524
19524
  /**
19525
19525
  * Setups the vertex and fragment stage of this node material.
@@ -19563,7 +19563,7 @@ class nt extends qt {
19563
19563
  let i = null;
19564
19564
  if (t.length > 0 || s.length > 0) {
19565
19565
  const n = e.renderer.samples;
19566
- this.alphaToCoverage && n > 1 ? i = gC() : e.stack.add(mC());
19566
+ this.alphaToCoverage && n > 1 ? i = gM() : e.stack.add(mM());
19567
19567
  }
19568
19568
  return i;
19569
19569
  }
@@ -19575,7 +19575,7 @@ class nt extends qt {
19575
19575
  setupHardwareClipping(e) {
19576
19576
  if (this.hardwareClipping = !1, e.clippingContext === null) return;
19577
19577
  const t = e.clippingContext.unionPlanes.length;
19578
- t > 0 && t <= 8 && e.isAvailable("clipDistance") && (e.stack.add(yC()), this.hardwareClipping = !0);
19578
+ t > 0 && t <= 8 && e.isAvailable("clipDistance") && (e.stack.add(yM()), this.hardwareClipping = !0);
19579
19579
  }
19580
19580
  /**
19581
19581
  * Setups the depth of this material.
@@ -19627,11 +19627,11 @@ class nt extends qt {
19627
19627
  */
19628
19628
  setupPosition(e) {
19629
19629
  const { object: t, geometry: s } = e;
19630
- if ((s.morphAttributes.position || s.morphAttributes.normal || s.morphAttributes.color) && hC(t).toStack(), t.isSkinnedMesh === !0 && aC(t).toStack(), this.displacementMap) {
19630
+ if ((s.morphAttributes.position || s.morphAttributes.normal || s.morphAttributes.color) && hM(t).toStack(), t.isSkinnedMesh === !0 && aM(t).toStack(), this.displacementMap) {
19631
19631
  const i = Bi("displacementMap", "texture"), n = Bi("displacementScale", "float"), r = Bi("displacementBias", "float");
19632
19632
  wt.addAssign(js.normalize().mul(i.x.mul(n).add(r)));
19633
19633
  }
19634
- return t.isBatchedMesh && nC(t).toStack(), t.isInstancedMesh && t.instanceMatrix && t.instanceMatrix.isInstancedBufferAttribute === !0 && sC(t).toStack(), this.positionNode !== null && wt.assign(hw(this.positionNode, "POSITION")), wt;
19634
+ return t.isBatchedMesh && nM(t).toStack(), t.isInstancedMesh && t.instanceMatrix && t.instanceMatrix.isInstancedBufferAttribute === !0 && sM(t).toStack(), this.positionNode !== null && wt.assign(hw(this.positionNode, "POSITION")), wt;
19635
19635
  }
19636
19636
  /**
19637
19637
  * Setups the computation of the material's diffuse color.
@@ -19642,11 +19642,11 @@ class nt extends qt {
19642
19642
  setupDiffuseColor({ object: e, geometry: t }) {
19643
19643
  this.maskNode !== null && Qu(this.maskNode).not().discard();
19644
19644
  let s = this.colorNode ? ne(this.colorNode) : SE;
19645
- this.vertexColors === !0 && t.hasAttribute("color") && (s = s.mul(vC())), e.instanceColor && (s = Rl("vec3", "vInstanceColor").mul(s)), e.isBatchedMesh && e._colorsTexture && (s = Rl("vec3", "vBatchColor").mul(s)), ve.assign(s);
19645
+ this.vertexColors === !0 && t.hasAttribute("color") && (s = s.mul(vM())), e.instanceColor && (s = Rl("vec3", "vInstanceColor").mul(s)), e.isBatchedMesh && e._colorsTexture && (s = Rl("vec3", "vBatchColor").mul(s)), ve.assign(s);
19646
19646
  const i = this.opacityNode ? O(this.opacityNode) : t0;
19647
19647
  ve.a.assign(ve.a.mul(i));
19648
19648
  let n = null;
19649
- (this.alphaTestNode !== null || this.alphaTest > 0) && (n = this.alphaTestNode !== null ? O(this.alphaTestNode) : TE, ve.a.lessThanEqual(n).discard()), this.alphaHash === !0 && ve.a.lessThan(TC(wt)).discard(), this.transparent === !1 && this.blending === ai && this.alphaToCoverage === !1 ? ve.a.assign(1) : n === null && ve.a.lessThanEqual(0).discard();
19649
+ (this.alphaTestNode !== null || this.alphaTest > 0) && (n = this.alphaTestNode !== null ? O(this.alphaTestNode) : TE, ve.a.lessThanEqual(n).discard()), this.alphaHash === !0 && ve.a.lessThan(TM(wt)).discard(), this.transparent === !1 && this.blending === ai && this.alphaToCoverage === !1 ? ve.a.assign(1) : n === null && ve.a.lessThanEqual(0).discard();
19650
19650
  }
19651
19651
  /**
19652
19652
  * Abstract interface method that can be implemented by derived materials
@@ -19691,7 +19691,7 @@ class nt extends qt {
19691
19691
  */
19692
19692
  setupLightMap(e) {
19693
19693
  let t = null;
19694
- return e.material.lightMap && (t = new fC(s0)), t;
19694
+ return e.material.lightMap && (t = new fM(s0)), t;
19695
19695
  }
19696
19696
  /**
19697
19697
  * Setups the lights node based on the scene, environment and material.
@@ -19705,7 +19705,7 @@ class nt extends qt {
19705
19705
  const i = this.setupLightMap(e);
19706
19706
  if (i && i.isLightingNode && t.push(i), this.aoNode !== null || e.material.aoMap) {
19707
19707
  const r = this.aoNode !== null ? this.aoNode : KE;
19708
- t.push(new uC(r));
19708
+ t.push(new uM(r));
19709
19709
  }
19710
19710
  let n = this.lightsNode || e.lightsNode;
19711
19711
  return t.length > 0 && (n = e.renderer.lighting.createNode([...n.getLights(), ...t])), n;
@@ -19731,7 +19731,7 @@ class nt extends qt {
19731
19731
  let l = this.setupOutgoingLight(e);
19732
19732
  if (o && o.getScope().hasLights) {
19733
19733
  const c = this.setupLightingModel(e) || null;
19734
- l = pC(o, c, s, i);
19734
+ l = pM(o, c, s, i);
19735
19735
  } else s !== null && (l = B(i !== null ? Ve(l, s, i) : s));
19736
19736
  return (n && n.isNode === !0 || t.emissive && t.emissive.isColor === !0) && (Kp.assign(B(n || wE)), l = l.add(Kp)), l;
19737
19737
  }
@@ -19785,7 +19785,7 @@ class nt extends qt {
19785
19785
  images: {},
19786
19786
  nodes: {}
19787
19787
  });
19788
- const s = qt.prototype.toJSON.call(this, e), i = Cl(this);
19788
+ const s = qt.prototype.toJSON.call(this, e), i = Ml(this);
19789
19789
  s.inputNodes = {};
19790
19790
  for (const { property: r, childNode: o } of i)
19791
19791
  s.inputNodes[r] = o.toJSON(e).uuid;
@@ -19813,14 +19813,14 @@ class nt extends qt {
19813
19813
  return this.lightsNode = e.lightsNode, this.envNode = e.envNode, this.colorNode = e.colorNode, this.normalNode = e.normalNode, this.opacityNode = e.opacityNode, this.backdropNode = e.backdropNode, this.backdropAlphaNode = e.backdropAlphaNode, this.alphaTestNode = e.alphaTestNode, this.maskNode = e.maskNode, this.positionNode = e.positionNode, this.geometryNode = e.geometryNode, this.depthNode = e.depthNode, this.receivedShadowPositionNode = e.receivedShadowPositionNode, this.castShadowPositionNode = e.castShadowPositionNode, this.receivedShadowNode = e.receivedShadowNode, this.castShadowNode = e.castShadowNode, this.outputNode = e.outputNode, this.mrtNode = e.mrtNode, this.fragmentNode = e.fragmentNode, this.vertexNode = e.vertexNode, super.copy(e);
19814
19814
  }
19815
19815
  }
19816
- let wC = 0;
19816
+ let wM = 0;
19817
19817
  const as = /* @__PURE__ */ new Le(), Uc = /* @__PURE__ */ new pt(), jn = /* @__PURE__ */ new R(), Qt = /* @__PURE__ */ new Qa(), ea = /* @__PURE__ */ new Qa(), ft = /* @__PURE__ */ new R();
19818
- class _i extends Cn {
19818
+ class _i extends Mn {
19819
19819
  /**
19820
19820
  * Constructs a new geometry.
19821
19821
  */
19822
19822
  constructor() {
19823
- super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: wC++ }), this.uuid = ni(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
19823
+ super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: wM++ }), this.uuid = ni(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
19824
19824
  }
19825
19825
  /**
19826
19826
  * Returns the index of this geometry.
@@ -20345,7 +20345,7 @@ class _i extends Cn {
20345
20345
  }
20346
20346
  }
20347
20347
  const Ks = /* @__PURE__ */ new R(), kc = /* @__PURE__ */ new R(), xo = /* @__PURE__ */ new R(), wi = /* @__PURE__ */ new R(), zc = /* @__PURE__ */ new R(), _o = /* @__PURE__ */ new R(), Gc = /* @__PURE__ */ new R();
20348
- class EC {
20348
+ class EM {
20349
20349
  /**
20350
20350
  * Constructs a new ray.
20351
20351
  *
@@ -20906,7 +20906,7 @@ class Ii extends qt {
20906
20906
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
20907
20907
  }
20908
20908
  }
20909
- const gf = /* @__PURE__ */ new Le(), Qi = /* @__PURE__ */ new EC(), bo = /* @__PURE__ */ new Yl(), yf = /* @__PURE__ */ new R(), To = /* @__PURE__ */ new R(), So = /* @__PURE__ */ new R(), vo = /* @__PURE__ */ new R(), Xc = /* @__PURE__ */ new R(), wo = /* @__PURE__ */ new R(), xf = /* @__PURE__ */ new R(), Eo = /* @__PURE__ */ new R();
20909
+ const gf = /* @__PURE__ */ new Le(), Qi = /* @__PURE__ */ new EM(), bo = /* @__PURE__ */ new Yl(), yf = /* @__PURE__ */ new R(), To = /* @__PURE__ */ new R(), So = /* @__PURE__ */ new R(), vo = /* @__PURE__ */ new R(), Xc = /* @__PURE__ */ new R(), wo = /* @__PURE__ */ new R(), xf = /* @__PURE__ */ new R(), Eo = /* @__PURE__ */ new R();
20910
20910
  class gi extends pt {
20911
20911
  /**
20912
20912
  * Constructs a new mesh.
@@ -20978,14 +20978,14 @@ class gi extends pt {
20978
20978
  const y = d[f], g = r[y.materialIndex], x = Math.max(y.start, p.start), _ = Math.min(o.count, Math.min(y.start + y.count, p.start + p.count));
20979
20979
  for (let b = x, T = _; b < T; b += 3) {
20980
20980
  const E = o.getX(b), v = o.getX(b + 1), A = o.getX(b + 2);
20981
- i = Co(this, g, e, s, c, h, u, E, v, A), i && (i.faceIndex = Math.floor(b / 3), i.face.materialIndex = y.materialIndex, t.push(i));
20981
+ i = Mo(this, g, e, s, c, h, u, E, v, A), i && (i.faceIndex = Math.floor(b / 3), i.face.materialIndex = y.materialIndex, t.push(i));
20982
20982
  }
20983
20983
  }
20984
20984
  else {
20985
20985
  const f = Math.max(0, p.start), m = Math.min(o.count, p.start + p.count);
20986
20986
  for (let y = f, g = m; y < g; y += 3) {
20987
20987
  const x = o.getX(y), _ = o.getX(y + 1), b = o.getX(y + 2);
20988
- i = Co(this, r, e, s, c, h, u, x, _, b), i && (i.faceIndex = Math.floor(y / 3), t.push(i));
20988
+ i = Mo(this, r, e, s, c, h, u, x, _, b), i && (i.faceIndex = Math.floor(y / 3), t.push(i));
20989
20989
  }
20990
20990
  }
20991
20991
  else if (l !== void 0)
@@ -20994,19 +20994,19 @@ class gi extends pt {
20994
20994
  const y = d[f], g = r[y.materialIndex], x = Math.max(y.start, p.start), _ = Math.min(l.count, Math.min(y.start + y.count, p.start + p.count));
20995
20995
  for (let b = x, T = _; b < T; b += 3) {
20996
20996
  const E = b, v = b + 1, A = b + 2;
20997
- i = Co(this, g, e, s, c, h, u, E, v, A), i && (i.faceIndex = Math.floor(b / 3), i.face.materialIndex = y.materialIndex, t.push(i));
20997
+ i = Mo(this, g, e, s, c, h, u, E, v, A), i && (i.faceIndex = Math.floor(b / 3), i.face.materialIndex = y.materialIndex, t.push(i));
20998
20998
  }
20999
20999
  }
21000
21000
  else {
21001
21001
  const f = Math.max(0, p.start), m = Math.min(l.count, p.start + p.count);
21002
21002
  for (let y = f, g = m; y < g; y += 3) {
21003
21003
  const x = y, _ = y + 1, b = y + 2;
21004
- i = Co(this, r, e, s, c, h, u, x, _, b), i && (i.faceIndex = Math.floor(y / 3), t.push(i));
21004
+ i = Mo(this, r, e, s, c, h, u, x, _, b), i && (i.faceIndex = Math.floor(y / 3), t.push(i));
21005
21005
  }
21006
21006
  }
21007
21007
  }
21008
21008
  }
21009
- function CC(a, e, t, s, i, n, r, o) {
21009
+ function MM(a, e, t, s, i, n, r, o) {
21010
21010
  let l;
21011
21011
  if (e.side === jt ? l = s.intersectTriangle(r, n, i, !0, o) : l = s.intersectTriangle(i, n, r, e.side === ri, o), l === null) return null;
21012
21012
  Eo.copy(o), Eo.applyMatrix4(a.matrixWorld);
@@ -21017,9 +21017,9 @@ function CC(a, e, t, s, i, n, r, o) {
21017
21017
  object: a
21018
21018
  };
21019
21019
  }
21020
- function Co(a, e, t, s, i, n, r, o, l, c) {
21020
+ function Mo(a, e, t, s, i, n, r, o, l, c) {
21021
21021
  a.getVertexPosition(o, To), a.getVertexPosition(l, So), a.getVertexPosition(c, vo);
21022
- const h = CC(a, e, t, s, To, So, vo, xf);
21022
+ const h = MM(a, e, t, s, To, So, vo, xf);
21023
21023
  if (h) {
21024
21024
  const u = new R();
21025
21025
  As.getBarycoord(xf, To, So, vo, u), i && (h.uv = As.getInterpolatedAttribute(i, o, l, c, u, new he())), n && (h.uv1 = As.getInterpolatedAttribute(n, o, l, c, u, new he())), r && (h.normal = As.getInterpolatedAttribute(r, o, l, c, u, new R()), h.normal.dot(s.direction) > 0 && h.normal.multiplyScalar(-1));
@@ -21099,7 +21099,7 @@ class xd extends Wu {
21099
21099
  }
21100
21100
  }
21101
21101
  const Zc = /* @__PURE__ */ new xd(-1, 1, 1, -1, 0, 1);
21102
- class MC extends _i {
21102
+ class CM extends _i {
21103
21103
  /**
21104
21104
  * Constructs a new quad geometry.
21105
21105
  *
@@ -21111,7 +21111,7 @@ class MC extends _i {
21111
21111
  this.setAttribute("position", new Bt([-1, 3, 0, -1, -1, 0, 3, -1, 0], 3)), this.setAttribute("uv", new Bt(t, 2));
21112
21112
  }
21113
21113
  }
21114
- const AC = /* @__PURE__ */ new MC();
21114
+ const AM = /* @__PURE__ */ new CM();
21115
21115
  class _d extends gi {
21116
21116
  /**
21117
21117
  * Constructs a new quad mesh.
@@ -21119,7 +21119,7 @@ class _d extends gi {
21119
21119
  * @param {?Material} [material=null] - The material to render the quad mesh with.
21120
21120
  */
21121
21121
  constructor(e = null) {
21122
- super(AC, e), this.camera = Zc, this.isQuadMesh = !0;
21122
+ super(AM, e), this.camera = Zc, this.isQuadMesh = !0;
21123
21123
  }
21124
21124
  /**
21125
21125
  * Async version of `render()`.
@@ -21143,7 +21143,7 @@ class _d extends gi {
21143
21143
  const tc = 1 / 6, n0 = (a) => fe(tc, fe(a, fe(a, a.negate().add(3)).sub(3)).add(1)), bu = (a) => fe(tc, fe(a, fe(a, fe(3, a).sub(6))).add(4)), r0 = (a) => fe(tc, fe(a, fe(a, fe(-3, a).add(3)).add(3)).add(1)), Tu = (a) => fe(tc, ql(a, 3)), _f = (a) => n0(a).add(bu(a)), bf = (a) => r0(a).add(Tu(a)), Tf = (a) => Lt(-1, bu(a).div(n0(a).add(bu(a)))), Sf = (a) => Lt(1, Tu(a).div(r0(a).add(Tu(a)))), vf = (a, e, t) => {
21144
21144
  const s = a.uvNode, i = fe(s, e.zw).add(0.5), n = Tn(i), r = ji(i), o = _f(r.x), l = bf(r.x), c = Tf(r.x), h = Sf(r.x), u = Tf(r.y), d = Sf(r.y), p = V(n.x.add(c), n.y.add(u)).sub(0.5).mul(e.xy), f = V(n.x.add(h), n.y.add(u)).sub(0.5).mul(e.xy), m = V(n.x.add(c), n.y.add(d)).sub(0.5).mul(e.xy), y = V(n.x.add(h), n.y.add(d)).sub(0.5).mul(e.xy), g = _f(r.y).mul(Lt(o.mul(a.sample(p).level(t)), l.mul(a.sample(f).level(t)))), x = bf(r.y).mul(Lt(o.mul(a.sample(m).level(t)), l.mul(a.sample(y).level(t))));
21145
21145
  return g.add(x);
21146
- }, RC = /* @__PURE__ */ I(([a, e = O(3)]) => {
21146
+ }, RM = /* @__PURE__ */ I(([a, e = O(3)]) => {
21147
21147
  const t = V(a.size(ze(e))), s = V(a.size(ze(e.add(1)))), i = Ws(1, t), n = Ws(1, s), r = vf(a, ne(i, t), Tn(e)), o = vf(a, ne(n, s), nd(e));
21148
21148
  return ji(e).mix(r, o);
21149
21149
  }), ta = /* @__PURE__ */ new gs(), Kc = /* @__PURE__ */ new Le();
@@ -21179,7 +21179,7 @@ class Wt extends re {
21179
21179
  Wt.BACKGROUND_BLURRINESS = "backgroundBlurriness";
21180
21180
  Wt.BACKGROUND_INTENSITY = "backgroundIntensity";
21181
21181
  Wt.BACKGROUND_ROTATION = "backgroundRotation";
21182
- const NC = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_BLURRINESS), wf = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_INTENSITY), PC = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_ROTATION), FC = I(({ texture: a, uv: e }) => {
21182
+ const NM = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_BLURRINESS), wf = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_INTENSITY), PM = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_ROTATION), FM = I(({ texture: a, uv: e }) => {
21183
21183
  const s = B().toVar();
21184
21184
  return Qe(e.x.lessThan(1e-4), () => {
21185
21185
  s.assign(B(1, 0, 0));
@@ -21198,7 +21198,7 @@ const NC = /* @__PURE__ */ G(Wt, Wt.BACKGROUND_BLURRINESS), wf = /* @__PURE__ */
21198
21198
  s.assign(B(n, r, o));
21199
21199
  }), s.normalize();
21200
21200
  });
21201
- class DC extends Lr {
21201
+ class DM extends Lr {
21202
21202
  static get type() {
21203
21203
  return "Texture3DNode";
21204
21204
  }
@@ -21267,11 +21267,11 @@ class DC extends Lr {
21267
21267
  * @return {Node<vec3>} TODO.
21268
21268
  */
21269
21269
  normal(e) {
21270
- return FC({ texture: this, uv: e });
21270
+ return FM({ texture: this, uv: e });
21271
21271
  }
21272
21272
  }
21273
- const OC = /* @__PURE__ */ L(DC).setParameterLength(1, 3), Mo = /* @__PURE__ */ new he();
21274
- class BC extends Lr {
21273
+ const OM = /* @__PURE__ */ L(DM).setParameterLength(1, 3), Co = /* @__PURE__ */ new he();
21274
+ class BM extends Lr {
21275
21275
  static get type() {
21276
21276
  return "PassTextureNode";
21277
21277
  }
@@ -21291,7 +21291,7 @@ class BC extends Lr {
21291
21291
  return new this.constructor(this.passNode, this.value);
21292
21292
  }
21293
21293
  }
21294
- class Ef extends BC {
21294
+ class Ef extends BM {
21295
21295
  static get type() {
21296
21296
  return "PassMultipleTextureNode";
21297
21297
  }
@@ -21334,7 +21334,7 @@ class sc extends rt {
21334
21334
  super("vec4"), this.scope = e, this.scene = t, this.camera = s, this.options = i, this._pixelRatio = 1, this._width = 1, this._height = 1;
21335
21335
  const n = new $s();
21336
21336
  n.isRenderTargetTexture = !0, n.name = "depth";
21337
- const r = new Mn(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: hs, ...i });
21337
+ const r = new Cn(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: hs, ...i });
21338
21338
  r.texture.name = "output", r.depthTexture = n, this.renderTarget = r, this._textures = {
21339
21339
  output: r.texture,
21340
21340
  depth: n
@@ -21469,7 +21469,7 @@ class sc extends rt {
21469
21469
  const { renderer: t } = e, { scene: s } = this;
21470
21470
  let i, n;
21471
21471
  const r = t.getOutputRenderTarget();
21472
- r && r.isXRRenderTarget === !0 ? (n = 1, i = t.xr.getCamera(), t.xr.updateCamera(i), Mo.set(r.width, r.height)) : (i = this.camera, n = t.getPixelRatio(), t.getSize(Mo)), this._pixelRatio = n, this.setSize(Mo.width, Mo.height);
21472
+ r && r.isXRRenderTarget === !0 ? (n = 1, i = t.xr.getCamera(), t.xr.updateCamera(i), Co.set(r.width, r.height)) : (i = this.camera, n = t.getPixelRatio(), t.getSize(Co)), this._pixelRatio = n, this.setSize(Co.width, Co.height);
21473
21473
  const o = t.getRenderTarget(), l = t.getMRT(), c = i.layers.mask;
21474
21474
  this._cameraNear.value = i.near, this._cameraFar.value = i.far, this._layers !== null && (i.layers.mask = this._layers.mask);
21475
21475
  for (const h in this._previousTextures)
@@ -21504,21 +21504,21 @@ class sc extends rt {
21504
21504
  }
21505
21505
  sc.COLOR = "color";
21506
21506
  sc.DEPTH = "depth";
21507
- const IC = /* @__PURE__ */ I(([a, e]) => a.mul(e).clamp()).setLayout({
21507
+ const IM = /* @__PURE__ */ I(([a, e]) => a.mul(e).clamp()).setLayout({
21508
21508
  name: "linearToneMapping",
21509
21509
  type: "vec3",
21510
21510
  inputs: [
21511
21511
  { name: "color", type: "vec3" },
21512
21512
  { name: "exposure", type: "float" }
21513
21513
  ]
21514
- }), LC = /* @__PURE__ */ I(([a, e]) => (a = a.mul(e), a.div(a.add(1)).clamp())).setLayout({
21514
+ }), LM = /* @__PURE__ */ I(([a, e]) => (a = a.mul(e), a.div(a.add(1)).clamp())).setLayout({
21515
21515
  name: "reinhardToneMapping",
21516
21516
  type: "vec3",
21517
21517
  inputs: [
21518
21518
  { name: "color", type: "vec3" },
21519
21519
  { name: "exposure", type: "float" }
21520
21520
  ]
21521
- }), UC = /* @__PURE__ */ I(([a, e]) => {
21521
+ }), UM = /* @__PURE__ */ I(([a, e]) => {
21522
21522
  a = a.mul(e), a = a.sub(4e-3).max(0);
21523
21523
  const t = a.mul(a.mul(6.2).add(0.5)), s = a.mul(a.mul(6.2).add(1.7)).add(0.06);
21524
21524
  return t.div(s).pow(2.2);
@@ -21529,10 +21529,10 @@ const IC = /* @__PURE__ */ I(([a, e]) => a.mul(e).clamp()).setLayout({
21529
21529
  { name: "color", type: "vec3" },
21530
21530
  { name: "exposure", type: "float" }
21531
21531
  ]
21532
- }), kC = /* @__PURE__ */ I(([a]) => {
21532
+ }), kM = /* @__PURE__ */ I(([a]) => {
21533
21533
  const e = a.mul(a.add(0.0245786)).sub(90537e-9), t = a.mul(a.add(0.432951).mul(0.983729)).add(0.238081);
21534
21534
  return e.div(t);
21535
- }), zC = /* @__PURE__ */ I(([a, e]) => {
21535
+ }), zM = /* @__PURE__ */ I(([a, e]) => {
21536
21536
  const t = It(
21537
21537
  0.59719,
21538
21538
  0.35458,
@@ -21554,7 +21554,7 @@ const IC = /* @__PURE__ */ I(([a, e]) => a.mul(e).clamp()).setLayout({
21554
21554
  -0.07276,
21555
21555
  1.07602
21556
21556
  );
21557
- return a = a.mul(e).div(0.6), a = t.mul(a), a = kC(a), a = s.mul(a), a.clamp();
21557
+ return a = a.mul(e).div(0.6), a = t.mul(a), a = kM(a), a = s.mul(a), a.clamp();
21558
21558
  }).setLayout({
21559
21559
  name: "acesFilmicToneMapping",
21560
21560
  type: "vec3",
@@ -21562,12 +21562,12 @@ const IC = /* @__PURE__ */ I(([a, e]) => a.mul(e).clamp()).setLayout({
21562
21562
  { name: "color", type: "vec3" },
21563
21563
  { name: "exposure", type: "float" }
21564
21564
  ]
21565
- }), GC = /* @__PURE__ */ It(B(1.6605, -0.1246, -0.0182), B(-0.5876, 1.1329, -0.1006), B(-0.0728, -83e-4, 1.1187)), VC = /* @__PURE__ */ It(B(0.6274, 0.0691, 0.0164), B(0.3293, 0.9195, 0.088), B(0.0433, 0.0113, 0.8956)), HC = /* @__PURE__ */ I(([a]) => {
21565
+ }), GM = /* @__PURE__ */ It(B(1.6605, -0.1246, -0.0182), B(-0.5876, 1.1329, -0.1006), B(-0.0728, -83e-4, 1.1187)), VM = /* @__PURE__ */ It(B(0.6274, 0.0691, 0.0164), B(0.3293, 0.9195, 0.088), B(0.0433, 0.0113, 0.8956)), HM = /* @__PURE__ */ I(([a]) => {
21566
21566
  const e = B(a).toVar(), t = B(e.mul(e)).toVar(), s = B(t.mul(t)).toVar();
21567
21567
  return O(15.5).mul(s.mul(t)).sub(fe(40.14, s.mul(e))).add(fe(31.96, s).sub(fe(6.868, t.mul(e))).add(fe(0.4298, t).add(fe(0.1191, e).sub(232e-5))));
21568
- }), $C = /* @__PURE__ */ I(([a, e]) => {
21568
+ }), $M = /* @__PURE__ */ I(([a, e]) => {
21569
21569
  const t = B(a).toVar(), s = It(B(0.856627153315983, 0.137318972929847, 0.11189821299995), B(0.0951212405381588, 0.761241990602591, 0.0767994186031903), B(0.0482516061458583, 0.101439036467562, 0.811302368396859)), i = It(B(1.1271005818144368, -0.1413297634984383, -0.14132976349843826), B(-0.11060664309660323, 1.157823702216272, -0.11060664309660294), B(-0.016493938717834573, -0.016493938717834257, 1.2519364065950405)), n = O(-12.47393), r = O(4.026069);
21570
- return t.mulAssign(e), t.assign(VC.mul(t)), t.assign(s.mul(t)), t.assign(Mt(t, 1e-10)), t.assign(hi(t)), t.assign(t.sub(n).div(r.sub(n))), t.assign(mi(t, 0, 1)), t.assign(HC(t)), t.assign(i.mul(t)), t.assign(ql(Mt(B(0), t), B(2.2))), t.assign(GC.mul(t)), t.assign(mi(t, 0, 1)), t;
21570
+ return t.mulAssign(e), t.assign(VM.mul(t)), t.assign(s.mul(t)), t.assign(Ct(t, 1e-10)), t.assign(hi(t)), t.assign(t.sub(n).div(r.sub(n))), t.assign(mi(t, 0, 1)), t.assign(HM(t)), t.assign(i.mul(t)), t.assign(ql(Ct(B(0), t), B(2.2))), t.assign(GM.mul(t)), t.assign(mi(t, 0, 1)), t;
21571
21571
  }).setLayout({
21572
21572
  name: "agxToneMapping",
21573
21573
  type: "vec3",
@@ -21575,12 +21575,12 @@ const IC = /* @__PURE__ */ I(([a, e]) => a.mul(e).clamp()).setLayout({
21575
21575
  { name: "color", type: "vec3" },
21576
21576
  { name: "exposure", type: "float" }
21577
21577
  ]
21578
- }), WC = /* @__PURE__ */ I(([a, e]) => {
21578
+ }), WM = /* @__PURE__ */ I(([a, e]) => {
21579
21579
  const t = O(0.76), s = O(0.15);
21580
21580
  a = a.mul(e);
21581
21581
  const i = Pr(a.r, Pr(a.g, a.b)), n = Et(i.lessThan(0.08), i.sub(fe(6.25, i.mul(i))), 0.04);
21582
21582
  a.subAssign(n);
21583
- const r = Mt(a.r, Mt(a.g, a.b));
21583
+ const r = Ct(a.r, Ct(a.g, a.b));
21584
21584
  Qe(r.lessThan(t), () => a);
21585
21585
  const o = Ft(1, t), l = Ft(1, o.mul(o).div(r.add(o.sub(t))));
21586
21586
  a.mulAssign(l.div(r));
@@ -21640,7 +21640,7 @@ class ht extends re {
21640
21640
  super.deserialize(e), this.code = e.code, this.language = e.language;
21641
21641
  }
21642
21642
  }
21643
- class jC extends ht {
21643
+ class jM extends ht {
21644
21644
  static get type() {
21645
21645
  return "FunctionNode";
21646
21646
  }
@@ -21691,14 +21691,14 @@ function a0(a) {
21691
21691
  const t = a.context.getViewZ;
21692
21692
  return t !== void 0 && (e = t(this)), (e || it.z).negate();
21693
21693
  }
21694
- const qC = I(([a, e], t) => {
21694
+ const qM = I(([a, e], t) => {
21695
21695
  const s = a0(t);
21696
21696
  return Hi(a, e, s);
21697
- }), YC = I(([a], e) => {
21697
+ }), YM = I(([a], e) => {
21698
21698
  const t = a0(e);
21699
21699
  return a.mul(a, t, t).negate().exp().oneMinus();
21700
- }), Cf = I(([a, e]) => ne(e.toFloat().mix(Fa.rgb, a.toVec3()), Fa.a));
21701
- class XC extends re {
21700
+ }), Mf = I(([a, e]) => ne(e.toFloat().mix(Fa.rgb, a.toVec3()), Fa.a));
21701
+ class XM extends re {
21702
21702
  /**
21703
21703
  * Constructs a new barrier node.
21704
21704
  *
@@ -21713,7 +21713,7 @@ class XC extends re {
21713
21713
  `) : e.addLineFlowCode(`${t}Barrier()`, this);
21714
21714
  }
21715
21715
  }
21716
- L(XC);
21716
+ L(XM);
21717
21717
  class Ys extends re {
21718
21718
  static get type() {
21719
21719
  return "AtomicFunctionNode";
@@ -21777,7 +21777,7 @@ function o0(a) {
21777
21777
  const e = ic(a);
21778
21778
  return e.shadowMatrix || (e.shadowMatrix = Q("mat4").setGroup(K).onRenderUpdate((t) => ((a.castShadow !== !0 || t.renderer.shadowMap.enabled === !1) && a.shadow.updateMatrices(a), a.shadow.matrix)));
21779
21779
  }
21780
- function ZC(a, e = $a) {
21780
+ function ZM(a, e = $a) {
21781
21781
  const t = o0(a).mul(e);
21782
21782
  return t.xyz.div(t.w);
21783
21783
  }
@@ -21785,7 +21785,7 @@ function l0(a) {
21785
21785
  const e = ic(a);
21786
21786
  return e.position || (e.position = Q(new R()).setGroup(K).onRenderUpdate((t, s) => s.value.setFromMatrixPosition(a.matrixWorld)));
21787
21787
  }
21788
- function KC(a) {
21788
+ function KM(a) {
21789
21789
  const e = ic(a);
21790
21790
  return e.targetPosition || (e.targetPosition = Q(new R()).setGroup(K).onRenderUpdate((t, s) => s.value.setFromMatrixPosition(a.target.matrixWorld)));
21791
21791
  }
@@ -21795,7 +21795,7 @@ function c0(a) {
21795
21795
  s.value = s.value || new R(), s.value.setFromMatrixPosition(a.matrixWorld), s.value.applyMatrix4(t.matrixWorldInverse);
21796
21796
  }));
21797
21797
  }
21798
- const h0 = (a) => xi.transformDirection(l0(a).sub(KC(a))), QC = (a) => a.sort((e, t) => e.id - t.id), JC = (a, e) => {
21798
+ const h0 = (a) => xi.transformDirection(l0(a).sub(KM(a))), QM = (a) => a.sort((e, t) => e.id - t.id), JM = (a, e) => {
21799
21799
  for (const t of e)
21800
21800
  if (t.isAnalyticLightNode && t.light.id === a)
21801
21801
  return t;
@@ -21858,13 +21858,13 @@ class u0 extends re {
21858
21858
  * @param {NodeBuilder} builder - A reference to the current node builder.
21859
21859
  */
21860
21860
  setupLightsNode(e) {
21861
- const t = [], s = this._lightNodes, i = QC(this._lights), n = e.renderer.library;
21861
+ const t = [], s = this._lightNodes, i = QM(this._lights), n = e.renderer.library;
21862
21862
  for (const r of i)
21863
21863
  if (r.isNode)
21864
21864
  t.push(U(r));
21865
21865
  else {
21866
21866
  let o = null;
21867
- if (s !== null && (o = JC(r.id, s)), o === null) {
21867
+ if (s !== null && (o = JM(r.id, s)), o === null) {
21868
21868
  const l = n.getLightNodeClass(r.constructor);
21869
21869
  if (l === null) {
21870
21870
  console.warn(`LightsNode.setupNodeLights: Light node not found for ${r.constructor.name}`);
@@ -21964,7 +21964,7 @@ class u0 extends re {
21964
21964
  return this._lights.length > 0;
21965
21965
  }
21966
21966
  }
21967
- class eM extends re {
21967
+ class eC extends re {
21968
21968
  static get type() {
21969
21969
  return "ShadowBaseNode";
21970
21970
  }
@@ -21986,34 +21986,34 @@ class eM extends re {
21986
21986
  }
21987
21987
  }
21988
21988
  const d0 = /* @__PURE__ */ uy("vec3", "shadowPositionWorld");
21989
- function tM(a, e = {}) {
21989
+ function tC(a, e = {}) {
21990
21990
  return e.toneMapping = a.toneMapping, e.toneMappingExposure = a.toneMappingExposure, e.outputColorSpace = a.outputColorSpace, e.renderTarget = a.getRenderTarget(), e.activeCubeFace = a.getActiveCubeFace(), e.activeMipmapLevel = a.getActiveMipmapLevel(), e.renderObjectFunction = a.getRenderObjectFunction(), e.pixelRatio = a.getPixelRatio(), e.mrt = a.getMRT(), e.clearColor = a.getClearColor(e.clearColor || new we()), e.clearAlpha = a.getClearAlpha(), e.autoClear = a.autoClear, e.scissorTest = a.getScissorTest(), e;
21991
21991
  }
21992
- function sM(a, e) {
21993
- return e = tM(a, e), a.setMRT(null), a.setRenderObjectFunction(null), a.setClearColor(0, 1), a.autoClear = !0, e;
21992
+ function sC(a, e) {
21993
+ return e = tC(a, e), a.setMRT(null), a.setRenderObjectFunction(null), a.setClearColor(0, 1), a.autoClear = !0, e;
21994
21994
  }
21995
- function iM(a, e) {
21995
+ function iC(a, e) {
21996
21996
  a.toneMapping = e.toneMapping, a.toneMappingExposure = e.toneMappingExposure, a.outputColorSpace = e.outputColorSpace, a.setRenderTarget(e.renderTarget, e.activeCubeFace, e.activeMipmapLevel), a.setRenderObjectFunction(e.renderObjectFunction), a.setPixelRatio(e.pixelRatio), a.setMRT(e.mrt), a.setClearColor(e.clearColor, e.clearAlpha), a.autoClear = e.autoClear, a.setScissorTest(e.scissorTest);
21997
21997
  }
21998
- function nM(a, e = {}) {
21998
+ function nC(a, e = {}) {
21999
21999
  return e.background = a.background, e.backgroundNode = a.backgroundNode, e.overrideMaterial = a.overrideMaterial, e;
22000
22000
  }
22001
- function rM(a, e) {
22002
- return e = nM(a, e), a.background = null, a.backgroundNode = null, a.overrideMaterial = null, e;
22001
+ function rC(a, e) {
22002
+ return e = nC(a, e), a.background = null, a.backgroundNode = null, a.overrideMaterial = null, e;
22003
22003
  }
22004
- function aM(a, e) {
22004
+ function aC(a, e) {
22005
22005
  a.background = e.background, a.backgroundNode = e.backgroundNode, a.overrideMaterial = e.overrideMaterial;
22006
22006
  }
22007
- function oM(a, e, t) {
22008
- return t = sM(a, t), t = rM(e, t), t;
22007
+ function oC(a, e, t) {
22008
+ return t = sC(a, t), t = rC(e, t), t;
22009
22009
  }
22010
- function lM(a, e, t) {
22011
- iM(a, t), aM(e, t);
22010
+ function lC(a, e, t) {
22011
+ iC(a, t), aC(e, t);
22012
22012
  }
22013
- const Mf = /* @__PURE__ */ new WeakMap(), cM = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, depthLayer: t }) => {
22013
+ const Cf = /* @__PURE__ */ new WeakMap(), cC = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, depthLayer: t }) => {
22014
22014
  let s = be(a, e.xy).label("t_basic");
22015
22015
  return a.isArrayTexture && (s = s.depth(t)), s.compare(e.z);
22016
- }), hM = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, shadow: t, depthLayer: s }) => {
22016
+ }), hC = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, shadow: t, depthLayer: s }) => {
22017
22017
  const i = (y, g) => {
22018
22018
  let x = be(a, y);
22019
22019
  return a.isArrayTexture && (x = x.depth(s)), x.compare(g);
@@ -22037,7 +22037,7 @@ const Mf = /* @__PURE__ */ new WeakMap(), cM = /* @__PURE__ */ I(({ depthTexture
22037
22037
  i(e.xy.add(V(0, u)), e.z),
22038
22038
  i(e.xy.add(V(h, u)), e.z)
22039
22039
  ).mul(1 / 17);
22040
- }), uM = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, shadow: t, depthLayer: s }) => {
22040
+ }), uC = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, shadow: t, depthLayer: s }) => {
22041
22041
  const i = (u, d) => {
22042
22042
  let p = be(a, u);
22043
22043
  return a.isArrayTexture && (p = p.depth(s)), p.compare(d);
@@ -22081,57 +22081,57 @@ const Mf = /* @__PURE__ */ new WeakMap(), cM = /* @__PURE__ */ I(({ depthTexture
22081
22081
  h.y
22082
22082
  )
22083
22083
  ).mul(1 / 9);
22084
- }), dM = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, depthLayer: t }) => {
22084
+ }), dC = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, depthLayer: t }) => {
22085
22085
  const s = O(1).toVar();
22086
22086
  let i = be(a).sample(e.xy);
22087
22087
  a.isArrayTexture && (i = i.depth(t)), i = i.rg;
22088
22088
  const n = Ey(e.z, i.x);
22089
22089
  return Qe(n.notEqual(O(1)), () => {
22090
- const r = e.z.sub(i.x), o = Mt(0, i.y.mul(i.y));
22090
+ const r = e.z.sub(i.x), o = Ct(0, i.y.mul(i.y));
22091
22091
  let l = o.div(o.add(r.mul(r)));
22092
- l = mi(Ft(l, 0.3).div(0.95 - 0.3)), s.assign(mi(Mt(n, l)));
22092
+ l = mi(Ft(l, 0.3).div(0.95 - 0.3)), s.assign(mi(Ct(n, l)));
22093
22093
  }), s;
22094
- }), pM = /* @__PURE__ */ I(([a, e, t]) => {
22094
+ }), pC = /* @__PURE__ */ I(([a, e, t]) => {
22095
22095
  let s = $a.sub(a).length();
22096
22096
  return s = s.sub(e).div(t.sub(e)), s = s.saturate(), s;
22097
- }), fM = (a) => {
22098
- const e = a.shadow.camera, t = Ie("near", "float", e).setGroup(K), s = Ie("far", "float", e).setGroup(K), i = Mw(a);
22099
- return pM(i, t, s);
22100
- }, mM = (a) => {
22101
- let e = Mf.get(a);
22097
+ }), fC = (a) => {
22098
+ const e = a.shadow.camera, t = Ie("near", "float", e).setGroup(K), s = Ie("far", "float", e).setGroup(K), i = Cw(a);
22099
+ return pC(i, t, s);
22100
+ }, mC = (a) => {
22101
+ let e = Cf.get(a);
22102
22102
  if (e === void 0) {
22103
- const t = a.isPointLight ? fM(a) : null;
22104
- e = new nt(), e.colorNode = ne(0, 0, 0, 1), e.depthNode = t, e.isShadowPassMaterial = !0, e.name = "ShadowMaterial", e.fog = !1, Mf.set(a, e);
22103
+ const t = a.isPointLight ? fC(a) : null;
22104
+ e = new nt(), e.colorNode = ne(0, 0, 0, 1), e.depthNode = t, e.isShadowPassMaterial = !0, e.name = "ShadowMaterial", e.fog = !1, Cf.set(a, e);
22105
22105
  }
22106
22106
  return e;
22107
- }, Af = /* @__PURE__ */ new Rs(), Xn = [], gM = (a, e, t, s) => {
22107
+ }, Af = /* @__PURE__ */ new Rs(), Xn = [], gC = (a, e, t, s) => {
22108
22108
  Xn[0] = a, Xn[1] = e;
22109
22109
  let i = Af.get(Xn);
22110
22110
  return (i === void 0 || i.shadowType !== t || i.useVelocity !== s) && (i = (n, r, o, l, c, h, ...u) => {
22111
22111
  (n.castShadow === !0 || n.receiveShadow && t === tl) && (s && (Zg(n).useVelocity = !0), n.onBeforeShadow(a, n, o, e.camera, l, r.overrideMaterial, h), a.renderObject(n, r, o, l, c, h, ...u), n.onAfterShadow(a, n, o, e.camera, l, r.overrideMaterial, h));
22112
22112
  }, i.shadowType = t, i.useVelocity = s, Af.set(Xn, i)), Xn[0] = null, Xn[1] = null, i;
22113
- }, yM = /* @__PURE__ */ I(({ samples: a, radius: e, size: t, shadowPass: s, depthLayer: i }) => {
22113
+ }, yC = /* @__PURE__ */ I(({ samples: a, radius: e, size: t, shadowPass: s, depthLayer: i }) => {
22114
22114
  const n = O(0).toVar("meanVertical"), r = O(0).toVar("squareMeanVertical"), o = a.lessThanEqual(O(1)).select(O(0), O(2).div(a.sub(1))), l = a.lessThanEqual(O(1)).select(O(0), O(-1));
22115
- Ms({ start: ze(0), end: ze(a), type: "int", condition: "<" }, ({ i: h }) => {
22115
+ Cs({ start: ze(0), end: ze(a), type: "int", condition: "<" }, ({ i: h }) => {
22116
22116
  const u = l.add(O(h).mul(o));
22117
22117
  let d = s.sample(Lt(Jl.xy, V(0, u).mul(e)).div(t));
22118
22118
  s.value.isArrayTexture && (d = d.depth(i)), d = d.x, n.addAssign(d), r.addAssign(d.mul(d));
22119
22119
  }), n.divAssign(a), r.divAssign(a);
22120
22120
  const c = id(r.sub(n.mul(n)));
22121
22121
  return V(n, c);
22122
- }), xM = /* @__PURE__ */ I(({ samples: a, radius: e, size: t, shadowPass: s, depthLayer: i }) => {
22122
+ }), xC = /* @__PURE__ */ I(({ samples: a, radius: e, size: t, shadowPass: s, depthLayer: i }) => {
22123
22123
  const n = O(0).toVar("meanHorizontal"), r = O(0).toVar("squareMeanHorizontal"), o = a.lessThanEqual(O(1)).select(O(0), O(2).div(a.sub(1))), l = a.lessThanEqual(O(1)).select(O(0), O(-1));
22124
- Ms({ start: ze(0), end: ze(a), type: "int", condition: "<" }, ({ i: h }) => {
22124
+ Cs({ start: ze(0), end: ze(a), type: "int", condition: "<" }, ({ i: h }) => {
22125
22125
  const u = l.add(O(h).mul(o));
22126
22126
  let d = s.sample(Lt(Jl.xy, V(u, 0).mul(e)).div(t));
22127
22127
  s.value.isArrayTexture && (d = d.depth(i)), n.addAssign(d.x), r.addAssign(Lt(d.y.mul(d.y), d.x.mul(d.x)));
22128
22128
  }), n.divAssign(a), r.divAssign(a);
22129
22129
  const c = id(r.sub(n.mul(n)));
22130
22130
  return V(n, c);
22131
- }), _M = [cM, hM, uM, dM];
22131
+ }), _C = [cC, hC, uC, dC];
22132
22132
  let Jc;
22133
22133
  const Ro = /* @__PURE__ */ new _d();
22134
- class p0 extends eM {
22134
+ class p0 extends eC {
22135
22135
  static get type() {
22136
22136
  return "ShadowNode";
22137
22137
  }
@@ -22191,7 +22191,7 @@ class p0 extends eM {
22191
22191
  * @return {Function} The filtering function.
22192
22192
  */
22193
22193
  getShadowFilterFn(e) {
22194
- return _M[e];
22194
+ return _C[e];
22195
22195
  }
22196
22196
  setupRenderTarget(e, t) {
22197
22197
  const s = new $s(e.mapSize.width, e.mapSize.height);
@@ -22215,7 +22215,7 @@ class p0 extends eM {
22215
22215
  r.isArrayTexture && (x = x.depth(this.depthLayer));
22216
22216
  const _ = Ie("blurSamples", "float", i).setGroup(K), b = Ie("radius", "float", i).setGroup(K), T = Ie("mapSize", "vec2", i).setGroup(K);
22217
22217
  let E = this.vsmMaterialVertical || (this.vsmMaterialVertical = new nt());
22218
- E.fragmentNode = yM({ samples: _, radius: b, size: T, shadowPass: g, depthLayer: this.depthLayer }).context(e.getSharedContext()), E.name = "VSMVertical", E = this.vsmMaterialHorizontal || (this.vsmMaterialHorizontal = new nt()), E.fragmentNode = xM({ samples: _, radius: b, size: T, shadowPass: x, depthLayer: this.depthLayer }).context(e.getSharedContext()), E.name = "VSMHorizontal";
22218
+ E.fragmentNode = yC({ samples: _, radius: b, size: T, shadowPass: g, depthLayer: this.depthLayer }).context(e.getSharedContext()), E.name = "VSMVertical", E = this.vsmMaterialHorizontal || (this.vsmMaterialHorizontal = new nt()), E.fragmentNode = xC({ samples: _, radius: b, size: T, shadowPass: x, depthLayer: this.depthLayer }).context(e.getSharedContext()), E.name = "VSMHorizontal";
22219
22219
  }
22220
22220
  const l = Ie("intensity", "float", i).setGroup(K), c = Ie("normalBias", "float", i).setGroup(K), h = o0(s).mul(d0.add(md.mul(c))), u = this.setupShadowCoord(e, h), d = i.filterNode || this.getShadowFilterFn(t.shadowMap.type) || null;
22221
22221
  if (d === null)
@@ -22263,7 +22263,7 @@ class p0 extends eM {
22263
22263
  const h = i.camera.layers.mask;
22264
22264
  (i.camera.layers.mask & 4294967294) === 0 && (i.camera.layers.mask = o.layers.mask);
22265
22265
  const u = n.getRenderObjectFunction(), d = n.getMRT(), p = d ? d.has("velocity") : !1;
22266
- Jc = oM(n, r, Jc), r.overrideMaterial = mM(s), n.setRenderObjectFunction(gM(n, i, l, p)), n.setClearColor(0, 0), n.setRenderTarget(t), this.renderShadow(e), n.setRenderObjectFunction(u), l === tl && i.isPointLightShadow !== !0 && this.vsmPass(n), i.camera.layers.mask = h, lM(n, r, Jc);
22266
+ Jc = oC(n, r, Jc), r.overrideMaterial = mC(s), n.setRenderObjectFunction(gC(n, i, l, p)), n.setClearColor(0, 0), n.setRenderTarget(t), this.renderShadow(e), n.setRenderObjectFunction(u), l === tl && i.isPointLightShadow !== !0 && this.vsmPass(n), i.camera.layers.mask = h, lC(n, r, Jc);
22267
22267
  }
22268
22268
  /**
22269
22269
  * For VSM additional render passes are required.
@@ -22291,8 +22291,8 @@ class p0 extends eM {
22291
22291
  s && (this._cameraFrameId[e.camera] === e.frameId && (s = !1), this._cameraFrameId[e.camera] = e.frameId), s && (this.updateShadow(e), this.shadowMap.depthTexture.version === this._depthVersionCached && (t.needsUpdate = !1));
22292
22292
  }
22293
22293
  }
22294
- const bM = (a, e) => U(new p0(a, e)), TM = /* @__PURE__ */ new we(), Ls = /* @__PURE__ */ I(([a, e]) => {
22295
- const t = a.toVar(), s = cs(t), i = Ws(1, Mt(s.x, Mt(s.y, s.z)));
22294
+ const bC = (a, e) => U(new p0(a, e)), TC = /* @__PURE__ */ new we(), Ls = /* @__PURE__ */ I(([a, e]) => {
22295
+ const t = a.toVar(), s = cs(t), i = Ws(1, Ct(s.x, Ct(s.y, s.z)));
22296
22296
  s.mulAssign(i), t.mulAssign(i.mul(e.mul(2).oneMinus()));
22297
22297
  const n = V(t.xy).toVar(), o = e.mul(1.5).oneMinus();
22298
22298
  return Qe(s.z.greaterThanEqual(o), () => {
@@ -22313,10 +22313,10 @@ const bM = (a, e) => U(new p0(a, e)), TM = /* @__PURE__ */ new we(), Ls = /* @__
22313
22313
  { name: "pos", type: "vec3" },
22314
22314
  { name: "texelSizeY", type: "float" }
22315
22315
  ]
22316
- }), SM = /* @__PURE__ */ I(({ depthTexture: a, bd3D: e, dp: t, texelSize: s }) => be(a, Ls(e, s.y)).compare(t)), vM = /* @__PURE__ */ I(({ depthTexture: a, bd3D: e, dp: t, texelSize: s, shadow: i }) => {
22316
+ }), SC = /* @__PURE__ */ I(({ depthTexture: a, bd3D: e, dp: t, texelSize: s }) => be(a, Ls(e, s.y)).compare(t)), vC = /* @__PURE__ */ I(({ depthTexture: a, bd3D: e, dp: t, texelSize: s, shadow: i }) => {
22317
22317
  const n = Ie("radius", "float", i).setGroup(K), r = V(-1, 1).mul(n).mul(s.y);
22318
22318
  return be(a, Ls(e.add(r.xyy), s.y)).compare(t).add(be(a, Ls(e.add(r.yyy), s.y)).compare(t)).add(be(a, Ls(e.add(r.xyx), s.y)).compare(t)).add(be(a, Ls(e.add(r.yyx), s.y)).compare(t)).add(be(a, Ls(e, s.y)).compare(t)).add(be(a, Ls(e.add(r.xxy), s.y)).compare(t)).add(be(a, Ls(e.add(r.yxy), s.y)).compare(t)).add(be(a, Ls(e.add(r.xxx), s.y)).compare(t)).add(be(a, Ls(e.add(r.yxx), s.y)).compare(t)).mul(1 / 9);
22319
- }), wM = /* @__PURE__ */ I(({ filterFn: a, depthTexture: e, shadowCoord: t, shadow: s }) => {
22319
+ }), wC = /* @__PURE__ */ I(({ filterFn: a, depthTexture: e, shadowCoord: t, shadow: s }) => {
22320
22320
  const i = t.xyz.toVar(), n = i.length(), r = Q("float").setGroup(K).onRenderUpdate(() => s.camera.near), o = Q("float").setGroup(K).onRenderUpdate(() => s.camera.far), l = Ie("bias", "float", s).setGroup(K), c = Q(s.mapSize).setGroup(K), h = O(1).toVar();
22321
22321
  return Qe(n.sub(o).lessThanEqual(0).and(n.sub(r).greaterThanEqual(0)), () => {
22322
22322
  const u = n.sub(r).div(o.sub(r)).toVar();
@@ -22325,7 +22325,7 @@ const bM = (a, e) => U(new p0(a, e)), TM = /* @__PURE__ */ new we(), Ls = /* @__
22325
22325
  h.assign(a({ depthTexture: e, bd3D: d, dp: u, texelSize: p, shadow: s }));
22326
22326
  }), h;
22327
22327
  }), Rf = /* @__PURE__ */ new ge(), Zn = /* @__PURE__ */ new he(), ia = /* @__PURE__ */ new he();
22328
- class EM extends p0 {
22328
+ class EC extends p0 {
22329
22329
  static get type() {
22330
22330
  return "PointShadowNode";
22331
22331
  }
@@ -22346,7 +22346,7 @@ class EM extends p0 {
22346
22346
  * @return {Function} The filtering function.
22347
22347
  */
22348
22348
  getShadowFilterFn(e) {
22349
- return e === Ib ? SM : vM;
22349
+ return e === Ib ? SC : vC;
22350
22350
  }
22351
22351
  /**
22352
22352
  * Overwrites the default implementation so the unaltered shadow position is used.
@@ -22372,7 +22372,7 @@ class EM extends p0 {
22372
22372
  * @return {Node<float>} The result node of the shadow filtering.
22373
22373
  */
22374
22374
  setupShadowFilter(e, { filterFn: t, shadowTexture: s, depthTexture: i, shadowCoord: n, shadow: r }) {
22375
- return wM({ filterFn: t, shadowTexture: s, depthTexture: i, shadowCoord: n, shadow: r });
22375
+ return wC({ filterFn: t, shadowTexture: s, depthTexture: i, shadowCoord: n, shadow: r });
22376
22376
  }
22377
22377
  /**
22378
22378
  * Overwrites the default implementation with point light specific
@@ -22383,7 +22383,7 @@ class EM extends p0 {
22383
22383
  renderShadow(e) {
22384
22384
  const { shadow: t, shadowMap: s, light: i } = this, { renderer: n, scene: r } = e, o = t.getFrameExtents();
22385
22385
  ia.copy(t.mapSize), ia.multiply(o), s.setSize(ia.width, ia.height), Zn.copy(t.mapSize);
22386
- const l = n.autoClear, c = n.getClearColor(TM), h = n.getClearAlpha();
22386
+ const l = n.autoClear, c = n.getClearColor(TC), h = n.getClearAlpha();
22387
22387
  n.autoClear = !1, n.setClearColor(t.clearColor, t.clearAlpha), n.clear();
22388
22388
  const u = t.getViewportCount();
22389
22389
  for (let d = 0; d < u; d++) {
@@ -22398,7 +22398,7 @@ class EM extends p0 {
22398
22398
  n.autoClear = l, n.setClearColor(c, h);
22399
22399
  }
22400
22400
  }
22401
- const CM = (a, e) => U(new EM(a, e));
22401
+ const MC = (a, e) => U(new EC(a, e));
22402
22402
  class An extends Ur {
22403
22403
  static get type() {
22404
22404
  return "AnalyticLightNode";
@@ -22449,7 +22449,7 @@ class An extends Ur {
22449
22449
  * @return {ShadowNode} The created shadow node.
22450
22450
  */
22451
22451
  setupShadowNode() {
22452
- return bM(this.light);
22452
+ return bC(this.light);
22453
22453
  }
22454
22454
  /**
22455
22455
  * Setups the shadow for this light. This method is only executed if the light
@@ -22499,7 +22499,7 @@ const f0 = /* @__PURE__ */ I(({ lightDistance: a, cutoffDistance: e, decayExpone
22499
22499
  s.mul(a.div(e).pow4().oneMinus().clamp().pow2()),
22500
22500
  s
22501
22501
  );
22502
- }), MM = ({ color: a, lightVector: e, cutoffDistance: t, decayExponent: s }) => {
22502
+ }), CC = ({ color: a, lightVector: e, cutoffDistance: t, decayExponent: s }) => {
22503
22503
  const i = e.normalize(), n = e.length(), r = f0({
22504
22504
  lightDistance: n,
22505
22505
  cutoffDistance: t,
@@ -22507,7 +22507,7 @@ const f0 = /* @__PURE__ */ I(({ lightDistance: a, cutoffDistance: e, decayExpone
22507
22507
  }), o = a.mul(r);
22508
22508
  return { lightDirection: i, lightColor: o };
22509
22509
  };
22510
- class AM extends An {
22510
+ class AC extends An {
22511
22511
  static get type() {
22512
22512
  return "PointLightNode";
22513
22513
  }
@@ -22534,10 +22534,10 @@ class AM extends An {
22534
22534
  * @return {PointShadowNode}
22535
22535
  */
22536
22536
  setupShadowNode() {
22537
- return CM(this.light);
22537
+ return MC(this.light);
22538
22538
  }
22539
22539
  setupDirect(e) {
22540
- return MM({
22540
+ return CC({
22541
22541
  color: this.colorNode,
22542
22542
  lightVector: this.getLightVector(e),
22543
22543
  cutoffDistance: this.cutoffDistanceNode,
@@ -22545,7 +22545,7 @@ class AM extends An {
22545
22545
  });
22546
22546
  }
22547
22547
  }
22548
- const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ */ O(0.8), eh = /* @__PURE__ */ O(-1), Po = /* @__PURE__ */ O(0.4), th = /* @__PURE__ */ O(2), Fo = /* @__PURE__ */ O(0.305), sh = /* @__PURE__ */ O(3), Pf = /* @__PURE__ */ O(0.21), RM = /* @__PURE__ */ O(4), Ff = /* @__PURE__ */ O(4), NM = /* @__PURE__ */ O(16), PM = /* @__PURE__ */ I(([a]) => {
22548
+ const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ */ O(0.8), eh = /* @__PURE__ */ O(-1), Po = /* @__PURE__ */ O(0.4), th = /* @__PURE__ */ O(2), Fo = /* @__PURE__ */ O(0.305), sh = /* @__PURE__ */ O(3), Pf = /* @__PURE__ */ O(0.21), RC = /* @__PURE__ */ O(4), Ff = /* @__PURE__ */ O(4), NC = /* @__PURE__ */ O(16), PC = /* @__PURE__ */ I(([a]) => {
22549
22549
  const e = B(cs(a)).toVar(), t = O(-1).toVar();
22550
22550
  return Qe(e.x.greaterThan(e.z), () => {
22551
22551
  Qe(e.x.greaterThan(e.y), () => {
@@ -22566,7 +22566,7 @@ const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ *
22566
22566
  inputs: [
22567
22567
  { name: "direction", type: "vec3" }
22568
22568
  ]
22569
- }), FM = /* @__PURE__ */ I(([a, e]) => {
22569
+ }), FC = /* @__PURE__ */ I(([a, e]) => {
22570
22570
  const t = V().toVar();
22571
22571
  return Qe(e.equal(0), () => {
22572
22572
  t.assign(V(a.z, a.y).div(cs(a.x)));
@@ -22588,7 +22588,7 @@ const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ *
22588
22588
  { name: "direction", type: "vec3" },
22589
22589
  { name: "face", type: "float" }
22590
22590
  ]
22591
- }), DM = /* @__PURE__ */ I(([a]) => {
22591
+ }), DC = /* @__PURE__ */ I(([a]) => {
22592
22592
  const e = O(0).toVar();
22593
22593
  return Qe(a.greaterThanEqual(No), () => {
22594
22594
  e.assign(Nf.sub(a).mul(eh.sub(Su)).div(Nf.sub(No)).add(Su));
@@ -22597,7 +22597,7 @@ const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ *
22597
22597
  }).ElseIf(a.greaterThanEqual(Fo), () => {
22598
22598
  e.assign(Po.sub(a).mul(sh.sub(th)).div(Po.sub(Fo)).add(th));
22599
22599
  }).ElseIf(a.greaterThanEqual(Pf), () => {
22600
- e.assign(Fo.sub(a).mul(RM.sub(sh)).div(Fo.sub(Pf)).add(sh));
22600
+ e.assign(Fo.sub(a).mul(RC.sub(sh)).div(Fo.sub(Pf)).add(sh));
22601
22601
  }).Else(() => {
22602
22602
  e.assign(O(-2).mul(hi(fe(1.16, a))));
22603
22603
  }), e;
@@ -22607,7 +22607,7 @@ const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ *
22607
22607
  inputs: [
22608
22608
  { name: "roughness", type: "float" }
22609
22609
  ]
22610
- }), OM = /* @__PURE__ */ I(([a, e]) => {
22610
+ }), OC = /* @__PURE__ */ I(([a, e]) => {
22611
22611
  const t = a.toVar();
22612
22612
  t.assign(fe(2, t).sub(1));
22613
22613
  const s = B(t, 1).toVar();
@@ -22631,29 +22631,29 @@ const Nf = /* @__PURE__ */ O(1), Su = /* @__PURE__ */ O(-2), No = /* @__PURE__ *
22631
22631
  { name: "uv", type: "vec2" },
22632
22632
  { name: "face", type: "float" }
22633
22633
  ]
22634
- }), BM = /* @__PURE__ */ I(([a, e, t, s, i, n]) => {
22635
- const r = O(t), o = B(e), l = mi(DM(r), Su, n), c = ji(l), h = Tn(l), u = B(vu(a, o, h, s, i, n)).toVar();
22634
+ }), BC = /* @__PURE__ */ I(([a, e, t, s, i, n]) => {
22635
+ const r = O(t), o = B(e), l = mi(DC(r), Su, n), c = ji(l), h = Tn(l), u = B(vu(a, o, h, s, i, n)).toVar();
22636
22636
  return Qe(c.notEqual(0), () => {
22637
22637
  const d = B(vu(a, o, h.add(1), s, i, n)).toVar();
22638
22638
  u.assign(Ve(u, d, c));
22639
22639
  }), u;
22640
22640
  }), vu = /* @__PURE__ */ I(([a, e, t, s, i, n]) => {
22641
- const r = O(t).toVar(), o = B(e), l = O(PM(o)).toVar(), c = O(Mt(Ff.sub(r), 0)).toVar();
22642
- r.assign(Mt(r, Ff));
22643
- const h = O(Va(r)).toVar(), u = V(FM(o, l).mul(h.sub(2)).add(1)).toVar();
22641
+ const r = O(t).toVar(), o = B(e), l = O(PC(o)).toVar(), c = O(Ct(Ff.sub(r), 0)).toVar();
22642
+ r.assign(Ct(r, Ff));
22643
+ const h = O(Va(r)).toVar(), u = V(FC(o, l).mul(h.sub(2)).add(1)).toVar();
22644
22644
  return Qe(l.greaterThan(2), () => {
22645
22645
  u.y.addAssign(h), l.subAssign(3);
22646
- }), u.x.addAssign(l.mul(h)), u.x.addAssign(c.mul(fe(3, NM))), u.y.addAssign(fe(4, Va(n).sub(h))), u.x.mulAssign(s), u.y.mulAssign(i), a.sample(u).grad(V(), V());
22646
+ }), u.x.addAssign(l.mul(h)), u.x.addAssign(c.mul(fe(3, NC))), u.y.addAssign(fe(4, Va(n).sub(h))), u.x.mulAssign(s), u.y.mulAssign(i), a.sample(u).grad(V(), V());
22647
22647
  }), ih = /* @__PURE__ */ I(({ envMap: a, mipInt: e, outputDirection: t, theta: s, axis: i, CUBEUV_TEXEL_WIDTH: n, CUBEUV_TEXEL_HEIGHT: r, CUBEUV_MAX_MIP: o }) => {
22648
22648
  const l = Fi(s), c = t.mul(l).add(i.cross(t).mul(Es(s))).add(i.mul(i.dot(t).mul(l.oneMinus())));
22649
22649
  return vu(a, c, e, n, r, o);
22650
- }), IM = /* @__PURE__ */ I(({ n: a, latitudinal: e, poleAxis: t, outputDirection: s, weights: i, samples: n, dTheta: r, mipInt: o, envMap: l, CUBEUV_TEXEL_WIDTH: c, CUBEUV_TEXEL_HEIGHT: h, CUBEUV_MAX_MIP: u }) => {
22651
- const d = B(Et(e, t, Cy(t, s))).toVar();
22650
+ }), IC = /* @__PURE__ */ I(({ n: a, latitudinal: e, poleAxis: t, outputDirection: s, weights: i, samples: n, dTheta: r, mipInt: o, envMap: l, CUBEUV_TEXEL_WIDTH: c, CUBEUV_TEXEL_HEIGHT: h, CUBEUV_MAX_MIP: u }) => {
22651
+ const d = B(Et(e, t, My(t, s))).toVar();
22652
22652
  Qe(d.equal(B(0)), () => {
22653
22653
  d.assign(B(s.z, 0, s.x.negate()));
22654
22654
  }), d.assign(Ha(d));
22655
22655
  const p = B().toVar();
22656
- return p.addAssign(i.element(0).mul(ih({ theta: 0, axis: d, outputDirection: s, mipInt: o, envMap: l, CUBEUV_TEXEL_WIDTH: c, CUBEUV_TEXEL_HEIGHT: h, CUBEUV_MAX_MIP: u }))), Ms({ start: ze(1), end: a }, ({ i: f }) => {
22656
+ return p.addAssign(i.element(0).mul(ih({ theta: 0, axis: d, outputDirection: s, mipInt: o, envMap: l, CUBEUV_TEXEL_WIDTH: c, CUBEUV_TEXEL_HEIGHT: h, CUBEUV_MAX_MIP: u }))), Cs({ start: ze(1), end: a }, ({ i: f }) => {
22657
22657
  Qe(f.greaterThanEqual(n), () => {
22658
22658
  Ew();
22659
22659
  });
@@ -22686,7 +22686,7 @@ class ss extends Wu {
22686
22686
  */
22687
22687
  setFocalLength(e) {
22688
22688
  const t = 0.5 * this.getFilmHeight() / e;
22689
- this.fov = Cr * 2 * Math.atan(t), this.updateProjectionMatrix();
22689
+ this.fov = Mr * 2 * Math.atan(t), this.updateProjectionMatrix();
22690
22690
  }
22691
22691
  /**
22692
22692
  * Returns the focal length from the current {@link PerspectiveCamera#fov} and
@@ -22704,7 +22704,7 @@ class ss extends Wu {
22704
22704
  * @return {number} The effective FOV.
22705
22705
  */
22706
22706
  getEffectiveFOV() {
22707
- return Cr * 2 * Math.atan(
22707
+ return Mr * 2 * Math.atan(
22708
22708
  Math.tan(Aa * 0.5 * this.fov) / this.zoom
22709
22709
  );
22710
22710
  }
@@ -22856,16 +22856,16 @@ class eo extends _i {
22856
22856
  const k = b / v, H = T / A, W = b / 2, $ = T / 2, q = E / 2, X = v + 1, Ee = A + 1;
22857
22857
  let de = 0, ye = 0;
22858
22858
  const se = new R();
22859
- for (let Ce = 0; Ce < Ee; Ce++) {
22860
- const Ge = Ce * H - $;
22859
+ for (let Me = 0; Me < Ee; Me++) {
22860
+ const Ge = Me * H - $;
22861
22861
  for (let ot = 0; ot < X; ot++) {
22862
22862
  const Te = ot * k - W;
22863
- se[m] = Te * x, se[y] = Ge * _, se[g] = q, c.push(se.x, se.y, se.z), se[m] = 0, se[y] = 0, se[g] = E > 0 ? 1 : -1, h.push(se.x, se.y, se.z), u.push(ot / v), u.push(1 - Ce / A), de += 1;
22863
+ se[m] = Te * x, se[y] = Ge * _, se[g] = q, c.push(se.x, se.y, se.z), se[m] = 0, se[y] = 0, se[g] = E > 0 ? 1 : -1, h.push(se.x, se.y, se.z), u.push(ot / v), u.push(1 - Me / A), de += 1;
22864
22864
  }
22865
22865
  }
22866
- for (let Ce = 0; Ce < A; Ce++)
22866
+ for (let Me = 0; Me < A; Me++)
22867
22867
  for (let Ge = 0; Ge < v; Ge++) {
22868
- const ot = d + Ge + X * Ce, Te = d + Ge + X * (Ce + 1), lt = d + (Ge + 1) + X * (Ce + 1), Ut = d + (Ge + 1) + X * Ce;
22868
+ const ot = d + Ge + X * Me, Te = d + Ge + X * (Me + 1), lt = d + (Ge + 1) + X * (Me + 1), Ut = d + (Ge + 1) + X * Me;
22869
22869
  l.push(ot, Te, Ut), l.push(Te, lt, Ut), ye += 6;
22870
22870
  }
22871
22871
  o.addGroup(p, ye, N), p += ye, d += de;
@@ -22885,7 +22885,7 @@ class eo extends _i {
22885
22885
  return new eo(e.width, e.height, e.depth, e.widthSegments, e.heightSegments, e.depthSegments);
22886
22886
  }
22887
22887
  }
22888
- const pr = 4, Bf = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], gn = 20, nh = /* @__PURE__ */ new xd(-1, 1, 1, -1, 0, 1), LM = /* @__PURE__ */ new ss(90, 1), If = /* @__PURE__ */ new we();
22888
+ const pr = 4, Bf = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], gn = 20, nh = /* @__PURE__ */ new xd(-1, 1, 1, -1, 0, 1), LC = /* @__PURE__ */ new ss(90, 1), If = /* @__PURE__ */ new we();
22889
22889
  let rh = null, ah = 0, oh = 0;
22890
22890
  const dn = (1 + Math.sqrt(5)) / 2, Kn = 1 / dn, Lf = [
22891
22891
  /* @__PURE__ */ new R(-dn, Kn, 0),
@@ -22898,15 +22898,15 @@ const dn = (1 + Math.sqrt(5)) / 2, Kn = 1 / dn, Lf = [
22898
22898
  /* @__PURE__ */ new R(1, 1, -1),
22899
22899
  /* @__PURE__ */ new R(-1, 1, 1),
22900
22900
  /* @__PURE__ */ new R(1, 1, 1)
22901
- ], UM = /* @__PURE__ */ new R(), m0 = /* @__PURE__ */ new WeakMap(), kM = [
22901
+ ], UC = /* @__PURE__ */ new R(), m0 = /* @__PURE__ */ new WeakMap(), kC = [
22902
22902
  3,
22903
22903
  1,
22904
22904
  5,
22905
22905
  0,
22906
22906
  4,
22907
22907
  2
22908
- ], lh = /* @__PURE__ */ OM(Ja(), $i("faceIndex")).normalize(), bd = /* @__PURE__ */ B(lh.x, lh.y, lh.z);
22909
- class zM {
22908
+ ], lh = /* @__PURE__ */ OC(Ja(), $i("faceIndex")).normalize(), bd = /* @__PURE__ */ B(lh.x, lh.y, lh.z);
22909
+ class zC {
22910
22910
  /**
22911
22911
  * Constructs a new PMREM generator.
22912
22912
  *
@@ -22938,7 +22938,7 @@ class zM {
22938
22938
  fromScene(e, t = 0, s = 0.1, i = 100, n = {}) {
22939
22939
  const {
22940
22940
  size: r = 256,
22941
- position: o = UM,
22941
+ position: o = UC,
22942
22942
  renderTarget: l = null
22943
22943
  } = n;
22944
22944
  if (this._setSize(r), this._hasInitialized === !1) {
@@ -23087,7 +23087,7 @@ class zM {
23087
23087
  if (this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== e.width || this._pingPongRenderTarget.height !== e.height) {
23088
23088
  this._pingPongRenderTarget !== null && this._dispose(), this._pingPongRenderTarget = Uf(e.width, e.height);
23089
23089
  const { _lodMax: t } = this;
23090
- ({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas, lodMeshes: this._lodMeshes } = GM(t)), this._blurMaterial = VM(t, e.width, e.height);
23090
+ ({ sizeLods: this._sizeLods, lodPlanes: this._lodPlanes, sigmas: this._sigmas, lodMeshes: this._lodMeshes } = GC(t)), this._blurMaterial = VC(t, e.width, e.height);
23091
23091
  }
23092
23092
  }
23093
23093
  async _compileMaterial(e) {
@@ -23095,7 +23095,7 @@ class zM {
23095
23095
  await this._renderer.compile(t, nh);
23096
23096
  }
23097
23097
  _sceneToCubeUV(e, t, s, i, n) {
23098
- const r = LM;
23098
+ const r = LC;
23099
23099
  r.near = t, r.far = s;
23100
23100
  const o = [1, 1, 1, 1, -1, 1], l = [1, -1, 1, -1, 1, -1], c = this._renderer, h = c.autoClear;
23101
23101
  c.getClearColor(If), c.autoClear = !1;
@@ -23196,7 +23196,7 @@ class zM {
23196
23196
  Do(t, T, E, 3 * b, 2 * b), l.setRenderTarget(t), l.render(u, nh);
23197
23197
  }
23198
23198
  }
23199
- function GM(a) {
23199
+ function GC(a) {
23200
23200
  const e = [], t = [], s = [], i = [];
23201
23201
  let n = a;
23202
23202
  const r = a - pr + 1 + Bf.length;
@@ -23226,7 +23226,7 @@ function GM(a) {
23226
23226
  A,
23227
23227
  N + 1,
23228
23228
  0
23229
- ], H = kM[v];
23229
+ ], H = kC[v];
23230
23230
  _.set(k, y * m * H), b.set(p, g * m * H);
23231
23231
  const W = [H, H, H, H, H, H];
23232
23232
  T.set(W, x * m * H);
@@ -23245,7 +23245,7 @@ function Uf(a, e) {
23245
23245
  format: us,
23246
23246
  colorSpace: xr
23247
23247
  //depthBuffer: false
23248
- }, s = new Mn(a, e, t);
23248
+ }, s = new Cn(a, e, t);
23249
23249
  return s.texture.mapping = Yh, s.texture.name = "PMREM.cubeUv", s.texture.isPMREMTexture = !0, s.scissorTest = !0, s;
23250
23250
  }
23251
23251
  function Do(a, e, t, s, i) {
@@ -23253,9 +23253,9 @@ function Do(a, e, t, s, i) {
23253
23253
  }
23254
23254
  function Td(a) {
23255
23255
  const e = new nt();
23256
- return e.depthTest = !1, e.depthWrite = !1, e.blending = Mr, e.name = `PMREM_${a}`, e;
23256
+ return e.depthTest = !1, e.depthWrite = !1, e.blending = Cr, e.name = `PMREM_${a}`, e;
23257
23257
  }
23258
- function VM(a, e, t) {
23258
+ function VC(a, e, t) {
23259
23259
  const s = Gs(new Array(gn).fill(0)), i = Q(new R(0, 1, 0)), n = Q(0), r = O(gn), o = Q(0), l = Q(1), c = be(null), h = Q(0), u = O(1 / e), d = O(1 / t), p = O(a), f = {
23260
23260
  n: r,
23261
23261
  latitudinal: o,
@@ -23270,7 +23270,7 @@ function VM(a, e, t) {
23270
23270
  CUBEUV_TEXEL_HEIGHT: d,
23271
23271
  CUBEUV_MAX_MIP: p
23272
23272
  }, m = Td("blur");
23273
- return m.fragmentNode = IM({ ...f, latitudinal: o.equal(1) }), m0.set(m, f), m;
23273
+ return m.fragmentNode = IC({ ...f, latitudinal: o.equal(1) }), m0.set(m, f), m;
23274
23274
  }
23275
23275
  function kf(a) {
23276
23276
  const e = Td("cubemap");
@@ -23281,21 +23281,21 @@ function zf(a) {
23281
23281
  return e.fragmentNode = be(a, Gy(bd), 0), e;
23282
23282
  }
23283
23283
  const Gf = /* @__PURE__ */ new WeakMap();
23284
- function HM(a) {
23284
+ function HC(a) {
23285
23285
  const e = Math.log2(a) - 2, t = 1 / a;
23286
23286
  return { texelWidth: 1 / (3 * Math.max(Math.pow(2, e), 7 * 16)), texelHeight: t, maxMip: e };
23287
23287
  }
23288
- function $M(a, e, t) {
23289
- const s = WM(e);
23288
+ function $C(a, e, t) {
23289
+ const s = WC(e);
23290
23290
  let i = s.get(a);
23291
23291
  if ((i !== void 0 ? i.pmremVersion : -1) !== a.pmremVersion) {
23292
23292
  const r = a.image;
23293
23293
  if (a.isCubeTexture)
23294
- if (qM(r))
23294
+ if (qC(r))
23295
23295
  i = t.fromCubemap(a, i);
23296
23296
  else
23297
23297
  return null;
23298
- else if (YM(r))
23298
+ else if (YC(r))
23299
23299
  i = t.fromEquirectangular(a, i);
23300
23300
  else
23301
23301
  return null;
@@ -23303,11 +23303,11 @@ function $M(a, e, t) {
23303
23303
  }
23304
23304
  return i.texture;
23305
23305
  }
23306
- function WM(a) {
23306
+ function WC(a) {
23307
23307
  let e = Gf.get(a);
23308
23308
  return e === void 0 && (e = /* @__PURE__ */ new WeakMap(), Gf.set(a, e)), e;
23309
23309
  }
23310
- class jM extends rt {
23310
+ class jC extends rt {
23311
23311
  static get type() {
23312
23312
  return "PMREMNode";
23313
23313
  }
@@ -23320,7 +23320,7 @@ class jM extends rt {
23320
23320
  */
23321
23321
  constructor(e, t = null, s = null) {
23322
23322
  super("vec3"), this._value = e, this._pmrem = null, this.uvNode = t, this.levelNode = s, this._generator = null;
23323
- const i = new Ct();
23323
+ const i = new Mt();
23324
23324
  i.isRenderTargetTexture = !0, this._texture = be(i), this._width = Q(0), this._height = Q(0), this._maxMip = Q(0), this.updateBeforeType = ue.RENDER;
23325
23325
  }
23326
23326
  set value(e) {
@@ -23340,26 +23340,26 @@ class jM extends rt {
23340
23340
  * @param {Texture} texture - The PMREM texture.
23341
23341
  */
23342
23342
  updateFromTexture(e) {
23343
- const t = HM(e.image.height);
23343
+ const t = HC(e.image.height);
23344
23344
  this._texture.value = e, this._width.value = t.texelWidth, this._height.value = t.texelHeight, this._maxMip.value = t.maxMip;
23345
23345
  }
23346
23346
  updateBefore(e) {
23347
23347
  let t = this._pmrem;
23348
23348
  const s = t ? t.pmremVersion : -1, i = this._value;
23349
- s !== i.pmremVersion && (i.isPMREMTexture === !0 ? t = i : t = $M(i, e.renderer, this._generator), t !== null && (this._pmrem = t, this.updateFromTexture(t)));
23349
+ s !== i.pmremVersion && (i.isPMREMTexture === !0 ? t = i : t = $C(i, e.renderer, this._generator), t !== null && (this._pmrem = t, this.updateFromTexture(t)));
23350
23350
  }
23351
23351
  setup(e) {
23352
- this._generator === null && (this._generator = new zM(e.renderer)), this.updateBefore(e);
23352
+ this._generator === null && (this._generator = new zC(e.renderer)), this.updateBefore(e);
23353
23353
  let t = this.uvNode;
23354
23354
  t === null && e.context.getUV && (t = e.context.getUV(this)), t = Qy.mul(B(t.x, t.y.negate(), t.z));
23355
23355
  let s = this.levelNode;
23356
- return s === null && e.context.getTextureLevel && (s = e.context.getTextureLevel(this)), BM(this._texture, t, s, this._width, this._height, this._maxMip);
23356
+ return s === null && e.context.getTextureLevel && (s = e.context.getTextureLevel(this)), BC(this._texture, t, s, this._width, this._height, this._maxMip);
23357
23357
  }
23358
23358
  dispose() {
23359
23359
  super.dispose(), this._generator !== null && this._generator.dispose();
23360
23360
  }
23361
23361
  }
23362
- function qM(a) {
23362
+ function qC(a) {
23363
23363
  if (a == null) return !1;
23364
23364
  let e = 0;
23365
23365
  const t = 6;
@@ -23367,10 +23367,10 @@ function qM(a) {
23367
23367
  a[s] !== void 0 && e++;
23368
23368
  return e === t;
23369
23369
  }
23370
- function YM(a) {
23370
+ function YC(a) {
23371
23371
  return a == null ? !1 : a.height > 0;
23372
23372
  }
23373
- const g0 = /* @__PURE__ */ L(jM).setParameterLength(1, 3);
23373
+ const g0 = /* @__PURE__ */ L(jC).setParameterLength(1, 3);
23374
23374
  I(([a = Ja()], { renderer: e, material: t }) => {
23375
23375
  const s = Ay(a.mul(2).sub(1));
23376
23376
  let i;
@@ -23384,7 +23384,7 @@ I(([a = Ja()], { renderer: e, material: t }) => {
23384
23384
  const ja = /* @__PURE__ */ I(({ f0: a, f90: e, dotVH: t }) => {
23385
23385
  const s = t.mul(-5.55473).sub(6.98316).mul(t).exp2();
23386
23386
  return a.mul(s.oneMinus()).add(e.mul(s));
23387
- }), XM = /* @__PURE__ */ I(({ alpha: a, dotNL: e, dotNV: t }) => {
23387
+ }), XC = /* @__PURE__ */ I(({ alpha: a, dotNL: e, dotNV: t }) => {
23388
23388
  const s = a.pow2(), i = e.mul(s.add(s.oneMinus().mul(t.pow2())).sqrt()), n = t.mul(s.add(s.oneMinus().mul(e.pow2())).sqrt());
23389
23389
  return Ws(0.5, i.add(n).max(uv));
23390
23390
  }).setLayout({
@@ -23395,7 +23395,7 @@ const ja = /* @__PURE__ */ I(({ f0: a, f90: e, dotVH: t }) => {
23395
23395
  { name: "dotNL", type: "float" },
23396
23396
  { name: "dotNV", type: "float" }
23397
23397
  ]
23398
- }), ZM = /* @__PURE__ */ I(({ alphaT: a, alphaB: e, dotTV: t, dotBV: s, dotTL: i, dotBL: n, dotNV: r, dotNL: o }) => {
23398
+ }), ZC = /* @__PURE__ */ I(({ alphaT: a, alphaB: e, dotTV: t, dotBV: s, dotTL: i, dotBL: n, dotNV: r, dotNL: o }) => {
23399
23399
  const l = o.mul(B(a.mul(t), e.mul(s), r).length()), c = r.mul(B(a.mul(i), e.mul(n), o).length());
23400
23400
  return Ws(0.5, l.add(c)).saturate();
23401
23401
  }).setLayout({
@@ -23411,7 +23411,7 @@ const ja = /* @__PURE__ */ I(({ f0: a, f90: e, dotVH: t }) => {
23411
23411
  { name: "dotNV", type: "float", qualifier: "in" },
23412
23412
  { name: "dotNL", type: "float", qualifier: "in" }
23413
23413
  ]
23414
- }), KM = /* @__PURE__ */ I(({ alpha: a, dotNH: e }) => {
23414
+ }), KC = /* @__PURE__ */ I(({ alpha: a, dotNH: e }) => {
23415
23415
  const t = a.pow2(), s = e.pow2().mul(t.oneMinus()).oneMinus();
23416
23416
  return t.div(s.pow2()).mul(1 / Math.PI);
23417
23417
  }).setLayout({
@@ -23421,9 +23421,9 @@ const ja = /* @__PURE__ */ I(({ f0: a, f90: e, dotVH: t }) => {
23421
23421
  { name: "alpha", type: "float" },
23422
23422
  { name: "dotNH", type: "float" }
23423
23423
  ]
23424
- }), QM = /* @__PURE__ */ O(1 / Math.PI), JM = /* @__PURE__ */ I(({ alphaT: a, alphaB: e, dotNH: t, dotTH: s, dotBH: i }) => {
23424
+ }), QC = /* @__PURE__ */ O(1 / Math.PI), JC = /* @__PURE__ */ I(({ alphaT: a, alphaB: e, dotNH: t, dotTH: s, dotBH: i }) => {
23425
23425
  const n = a.mul(e), r = B(e.mul(s), a.mul(i), n.mul(t)), o = r.dot(r), l = n.div(o);
23426
- return QM.mul(n.mul(l.pow2()));
23426
+ return QC.mul(n.mul(l.pow2()));
23427
23427
  }).setLayout({
23428
23428
  name: "D_GGX_Anisotropic",
23429
23429
  type: "float",
@@ -23439,9 +23439,9 @@ const ja = /* @__PURE__ */ I(({ f0: a, f90: e, dotVH: t }) => {
23439
23439
  let m = ja({ f0: t, f90: s, dotVH: f }), y, g;
23440
23440
  if (Xp(r) && (m = sd.mix(m, n)), Xp(o)) {
23441
23441
  const x = rl.dot(e), _ = rl.dot(Ye), b = rl.dot(h), T = Sr.dot(e), E = Sr.dot(Ye), v = Sr.dot(h);
23442
- y = ZM({ alphaT: gu, alphaB: c, dotTV: _, dotBV: E, dotTL: x, dotBL: T, dotNV: d, dotNL: u }), g = JM({ alphaT: gu, alphaB: c, dotNH: p, dotTH: b, dotBH: v });
23442
+ y = ZC({ alphaT: gu, alphaB: c, dotTV: _, dotBV: E, dotTL: x, dotBL: T, dotNV: d, dotNL: u }), g = JC({ alphaT: gu, alphaB: c, dotNH: p, dotTH: b, dotBH: v });
23443
23443
  } else
23444
- y = XM({ alpha: c, dotNL: u, dotNV: d }), g = KM({ alpha: c, dotNH: p });
23444
+ y = XC({ alpha: c, dotNL: u, dotNV: d }), g = KC({ alpha: c, dotNH: p });
23445
23445
  return m.mul(y).mul(g);
23446
23446
  }), Dr = /* @__PURE__ */ I((a) => a.diffuseColor.mul(1 / Math.PI)), y0 = /* @__PURE__ */ I(({ roughness: a, dotNV: e }) => {
23447
23447
  const t = ne(-1, -0.0275, -0.572, 0.022), s = ne(1, 0.0425, 1.04, -0.04), i = a.mul(t).add(s), n = i.x.mul(i.x).min(e.mul(-9.28).exp2()).mul(i.x).add(i.y);
@@ -23572,8 +23572,8 @@ class iA extends Wi {
23572
23572
  };
23573
23573
  const d = ad(ne(c).mul(wf), {
23574
23574
  // @TODO: Add Texture2D support using node context
23575
- getUV: () => PC.mul(fd),
23576
- getTextureLevel: () => NC
23575
+ getUV: () => PM.mul(fd),
23576
+ getTextureLevel: () => NM
23577
23577
  });
23578
23578
  let p = i0;
23579
23579
  p = p.setZ(p.w);
@@ -23740,7 +23740,7 @@ class cA extends qt {
23740
23740
  return Object.keys(s).length > 0 && (t.extensions = s), t;
23741
23741
  }
23742
23742
  }
23743
- class hA extends Mn {
23743
+ class hA extends Cn {
23744
23744
  /**
23745
23745
  * Constructs a new 3D render target.
23746
23746
  *
@@ -23882,7 +23882,7 @@ class uA extends hA {
23882
23882
  vertexShader: s.vertexShader,
23883
23883
  fragmentShader: s.fragmentShader,
23884
23884
  side: jt,
23885
- blending: Mr
23885
+ blending: Cr
23886
23886
  });
23887
23887
  n.uniforms.tEquirect.value = t;
23888
23888
  const r = new gi(i, n), o = t.minFilter;
@@ -23924,7 +23924,7 @@ class T0 extends uA {
23924
23924
  const s = t.minFilter, i = t.generateMipmaps;
23925
23925
  t.generateMipmaps = !0, this.texture.type = t.type, this.texture.colorSpace = t.colorSpace, this.texture.generateMipmaps = t.generateMipmaps, this.texture.minFilter = t.minFilter, this.texture.magFilter = t.magFilter;
23926
23926
  const n = new eo(5, 5, 5), r = Gy(zy), o = new nt();
23927
- o.colorNode = be(t, r, 0), o.side = jt, o.blending = Mr;
23927
+ o.colorNode = be(t, r, 0), o.side = jt, o.blending = Cr;
23928
23928
  const l = new gi(n, o), c = new $u();
23929
23929
  c.add(l), t.minFilter === oi && (t.minFilter = ns);
23930
23930
  const h = new b0(1, 10, this), u = e.getMRT();
@@ -24274,7 +24274,7 @@ class EA extends qi {
24274
24274
  super(e, t), this.isMatrix3Uniform = !0, this.boundary = 48, this.itemSize = 12;
24275
24275
  }
24276
24276
  }
24277
- class CA extends qi {
24277
+ class MA extends qi {
24278
24278
  /**
24279
24279
  * Constructs a new Number uniform.
24280
24280
  *
@@ -24285,7 +24285,7 @@ class CA extends qi {
24285
24285
  super(e, t), this.isMatrix4Uniform = !0, this.boundary = 64, this.itemSize = 16;
24286
24286
  }
24287
24287
  }
24288
- class MA extends _A {
24288
+ class CA extends _A {
24289
24289
  /**
24290
24290
  * Constructs a new node-based Number uniform.
24291
24291
  *
@@ -24467,7 +24467,7 @@ class DA extends EA {
24467
24467
  return this.nodeUniform.type;
24468
24468
  }
24469
24469
  }
24470
- class OA extends CA {
24470
+ class OA extends MA {
24471
24471
  /**
24472
24472
  * Constructs a new node-based Matrix4 uniform.
24473
24473
  *
@@ -24534,7 +24534,7 @@ class E0 {
24534
24534
  * @return {RenderTarget} The render target.
24535
24535
  */
24536
24536
  createRenderTarget(e, t, s) {
24537
- return new Mn(e, t, s);
24537
+ return new Cn(e, t, s);
24538
24538
  }
24539
24539
  /**
24540
24540
  * Factory method for creating an instance of {@link CubeRenderTarget} with the given
@@ -25510,7 +25510,7 @@ class E0 {
25510
25510
  * @return {FunctionNode} The build function node.
25511
25511
  */
25512
25512
  buildFunctionNode(e) {
25513
- const t = new jC(), s = this.currentFunctionNode;
25513
+ const t = new jM(), s = this.currentFunctionNode;
25514
25514
  return this.currentFunctionNode = t, t.code = this.buildFunctionCode(e), this.currentFunctionNode = s, t;
25515
25515
  }
25516
25516
  /**
@@ -25771,7 +25771,7 @@ class E0 {
25771
25771
  * @return {Uniform} The uniform.
25772
25772
  */
25773
25773
  getNodeUniform(e, t) {
25774
- if (t === "float" || t === "int" || t === "uint") return new MA(e);
25774
+ if (t === "float" || t === "int" || t === "uint") return new CA(e);
25775
25775
  if (t === "vec2" || t === "ivec2" || t === "uvec2") return new AA(e);
25776
25776
  if (t === "vec3" || t === "ivec3" || t === "uvec3") return new RA(e);
25777
25777
  if (t === "vec4" || t === "ivec4" || t === "uvec4") return new NA(e);
@@ -26022,7 +26022,7 @@ class wd extends An {
26022
26022
  getLightCoord(e) {
26023
26023
  const t = e.getNodeProperties(this);
26024
26024
  let s = t.projectionUV;
26025
- return s === void 0 && (s = ZC(this.light, e.context.positionWorld), t.projectionUV = s), s;
26025
+ return s === void 0 && (s = ZM(this.light, e.context.positionWorld), t.projectionUV = s), s;
26026
26026
  }
26027
26027
  setupDirect(e) {
26028
26028
  const { colorNode: t, cutoffDistanceNode: s, decayExponentNode: i, light: n } = this, r = this.getLightVector(e), o = r.normalize(), l = o.dot(h0(n)), c = this.getSpotAttenuation(e, l), h = r.length(), u = f0({
@@ -26058,7 +26058,7 @@ class UA extends wd {
26058
26058
  }
26059
26059
  const kA = /* @__PURE__ */ I(([a, e]) => {
26060
26060
  const t = a.abs().sub(e);
26061
- return ui(Mt(t, 0)).add(Pr(Mt(t.x, t.y), 0));
26061
+ return ui(Ct(t, 0)).add(Pr(Ct(t.x, t.y), 0));
26062
26062
  });
26063
26063
  class zA extends wd {
26064
26064
  static get type() {
@@ -26213,7 +26213,7 @@ class Ed extends Ur {
26213
26213
  e.context.environment = v0(this.envNode);
26214
26214
  }
26215
26215
  }
26216
- class C0 {
26216
+ class M0 {
26217
26217
  /**
26218
26218
  * The method parses the given native code an returns a node function.
26219
26219
  *
@@ -26225,7 +26225,7 @@ class C0 {
26225
26225
  console.warn("Abstract function.");
26226
26226
  }
26227
26227
  }
26228
- class Cd {
26228
+ class Md {
26229
26229
  /**
26230
26230
  * Constructs a new node function.
26231
26231
  *
@@ -26248,7 +26248,7 @@ class Cd {
26248
26248
  console.warn("Abstract function.");
26249
26249
  }
26250
26250
  }
26251
- Cd.isNodeFunction = !0;
26251
+ Md.isNodeFunction = !0;
26252
26252
  const jA = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]*?)\)/i, qA = /[a-z_0-9]+/ig, Xf = "#pragma main", YA = (a) => {
26253
26253
  a = a.trim();
26254
26254
  const e = a.indexOf(Xf), t = e !== -1 ? a.slice(e + Xf.length) : a, s = t.match(jA);
@@ -26283,7 +26283,7 @@ const jA = /^\s*(highp|mediump|lowp)?\s*([a-z_0-9]+)\s*([a-z_0-9]+)?\s*\(([\s\S]
26283
26283
  } else
26284
26284
  throw new Error("FunctionNode: Function is not a GLSL code.");
26285
26285
  };
26286
- class XA extends Cd {
26286
+ class XA extends Md {
26287
26287
  /**
26288
26288
  * Constructs a new GLSL node function.
26289
26289
  *
@@ -26311,7 +26311,7 @@ class XA extends Cd {
26311
26311
  return t;
26312
26312
  }
26313
26313
  }
26314
- class ZA extends C0 {
26314
+ class ZA extends M0 {
26315
26315
  /**
26316
26316
  * The method parses the given GLSL code an returns a node function.
26317
26317
  *
@@ -26322,7 +26322,7 @@ class ZA extends C0 {
26322
26322
  return new XA(e);
26323
26323
  }
26324
26324
  }
26325
- class M0 extends nc {
26325
+ class C0 extends nc {
26326
26326
  /**
26327
26327
  * Constructs a new basic lighting model.
26328
26328
  */
@@ -26366,7 +26366,7 @@ const KA = () => O(0.25), QA = /* @__PURE__ */ I(({ dotNH: a }) => yu.mul(O(0.5)
26366
26366
  const e = a.add(Ye).normalize(), t = st.dot(e).clamp(), s = Ye.dot(e).clamp(), i = ja({ f0: Jt, f90: 1, dotVH: s }), n = KA(), r = QA({ dotNH: t });
26367
26367
  return i.mul(n).mul(r);
26368
26368
  });
26369
- class A0 extends M0 {
26369
+ class A0 extends C0 {
26370
26370
  /**
26371
26371
  * Constructs a new phong lighting model.
26372
26372
  *
@@ -26431,7 +26431,7 @@ const R0 = /* @__PURE__ */ I((a) => {
26431
26431
  ]
26432
26432
  }), nR = /* @__PURE__ */ I(({ f: a }) => {
26433
26433
  const e = a.length();
26434
- return Mt(e.mul(e).add(a.z).div(e.add(1)), 0);
26434
+ return Ct(e.mul(e).add(a.z).div(e.add(1)), 0);
26435
26435
  }).setLayout({
26436
26436
  name: "LTC_ClippedSphereFormFactor",
26437
26437
  type: "float",
@@ -26439,7 +26439,7 @@ const R0 = /* @__PURE__ */ I((a) => {
26439
26439
  { name: "f", type: "vec3" }
26440
26440
  ]
26441
26441
  }), Io = /* @__PURE__ */ I(({ v1: a, v2: e }) => {
26442
- const t = a.dot(e), s = t.abs().toVar(), i = s.mul(0.0145206).add(0.4965155).mul(s).add(0.8543985).toVar(), n = s.add(4.1616724).mul(s).add(3.417594).toVar(), r = i.div(n), o = t.greaterThan(0).select(r, Mt(t.mul(t).oneMinus(), 1e-7).inverseSqrt().mul(0.5).sub(r));
26442
+ const t = a.dot(e), s = t.abs().toVar(), i = s.mul(0.0145206).add(0.4965155).mul(s).add(0.8543985).toVar(), n = s.add(4.1616724).mul(s).add(3.417594).toVar(), r = i.div(n), o = t.greaterThan(0).select(r, Ct(t.mul(t).oneMinus(), 1e-7).inverseSqrt().mul(0.5).sub(r));
26443
26443
  return a.cross(e).mul(o);
26444
26444
  }).setLayout({
26445
26445
  name: "LTC_EdgeVectorFormFactor",
@@ -26493,7 +26493,7 @@ const R0 = /* @__PURE__ */ I((a) => {
26493
26493
  ]
26494
26494
  }), aR = /* @__PURE__ */ qy(), oR = /* @__PURE__ */ qy(), Qf = /* @__PURE__ */ I(([a, e, t], { material: s }) => {
26495
26495
  const n = (s.side === jt ? aR : oR).sample(a), r = hi(_u.x).mul(rR(e, t));
26496
- return RC(n, r);
26496
+ return RM(n, r);
26497
26497
  }), Jf = /* @__PURE__ */ I(([a, e, t]) => (Qe(t.notEqual(0), () => {
26498
26498
  const s = by(e).negate().div(t);
26499
26499
  return _y(s.negate().mul(a));
@@ -26510,7 +26510,7 @@ const R0 = /* @__PURE__ */ I((a) => {
26510
26510
  if (f) {
26511
26511
  m = ne().toVar(), y = B().toVar();
26512
26512
  const T = h.sub(1).mul(f.mul(0.025)), E = B(h.sub(T), h, h.add(T));
26513
- Ms({ start: 0, end: 3 }, ({ i: v }) => {
26513
+ Cs({ start: 0, end: 3 }, ({ i: v }) => {
26514
26514
  const A = E.element(v), N = Kf(a, e, u, A, o), k = r.add(N), H = c.mul(l.mul(ne(k, 1))), W = V(H.xy.div(H.w)).toVar();
26515
26515
  W.addAssign(1), W.divAssign(2), W.assign(V(W.x, W.y.oneMinus()));
26516
26516
  const $ = Qf(W, t, A);
@@ -26553,7 +26553,7 @@ const R0 = /* @__PURE__ */ I((a) => {
26553
26553
  f.y.lessThan(n).select(Math.PI, 0),
26554
26554
  f.z.lessThan(n).select(Math.PI, 0)
26555
26555
  ), x = n.mul(s, l, 2), _ = B(p).add(g), b = h.mul(y).clamp(1e-5, 0.9999), T = b.sqrt(), E = u.pow2().mul(y).div(B(1).sub(b)), A = h.add(E).toVar(), N = E.sub(u).toVar();
26556
- return Ms({ start: 1, end: 2, condition: "<=", name: "m" }, ({ m: k }) => {
26556
+ return Cs({ start: 1, end: 2, condition: "<=", name: "m" }, ({ m: k }) => {
26557
26557
  N.mulAssign(T);
26558
26558
  const H = uR(O(k).mul(x), O(k).mul(_)).mul(2);
26559
26559
  A.addAssign(N.mul(H));
@@ -26988,10 +26988,10 @@ class fR extends Wi {
26988
26988
  const i = this.getCacheNode("fog", s, () => {
26989
26989
  if (s.isFogExp2) {
26990
26990
  const n = Ie("color", "color", s).setGroup(K), r = Ie("density", "float", s).setGroup(K);
26991
- return Cf(n, YC(r));
26991
+ return Mf(n, YM(r));
26992
26992
  } else if (s.isFog) {
26993
26993
  const n = Ie("color", "color", s).setGroup(K), r = Ie("near", "float", s).setGroup(K), o = Ie("far", "float", s).setGroup(K);
26994
- return Cf(n, qC(r, o));
26994
+ return Mf(n, qM(r, o));
26995
26995
  } else
26996
26996
  console.error("THREE.Renderer: Unsupported fog configuration.", s);
26997
26997
  });
@@ -27055,7 +27055,7 @@ class fR extends Wi {
27055
27055
  * @return {Node} The output node.
27056
27056
  */
27057
27057
  getOutputNode(e) {
27058
- const t = this.renderer, s = this.getOutputCacheKey(), i = e.isArrayTexture ? OC(e, B(vr, Xl("gl_ViewID_OVR"))).renderOutput(t.toneMapping, t.currentColorSpace) : be(e, vr).renderOutput(t.toneMapping, t.currentColorSpace);
27058
+ const t = this.renderer, s = this.getOutputCacheKey(), i = e.isArrayTexture ? OM(e, B(vr, Xl("gl_ViewID_OVR"))).renderOutput(t.toneMapping, t.currentColorSpace) : be(e, vr).renderOutput(t.toneMapping, t.currentColorSpace);
27059
27059
  return tm.set(e, s), i;
27060
27060
  }
27061
27061
  /**
@@ -27512,7 +27512,7 @@ class TR {
27512
27512
  return e.joints[t.jointName];
27513
27513
  }
27514
27514
  }
27515
- class Sa extends Mn {
27515
+ class Sa extends Cn {
27516
27516
  /**
27517
27517
  * Constructs a new XR render target.
27518
27518
  *
@@ -27527,7 +27527,7 @@ class Sa extends Mn {
27527
27527
  return super.copy(e), this.hasExternalTextures = e.hasExternalTextures, this.autoAllocateDepthBuffer = e.autoAllocateDepthBuffer, this;
27528
27528
  }
27529
27529
  }
27530
- class Md extends _i {
27530
+ class Cd extends _i {
27531
27531
  /**
27532
27532
  * Constructs a new cylinder geometry.
27533
27533
  *
@@ -27607,7 +27607,7 @@ class Md extends _i {
27607
27607
  * @return {CylinderGeometry} A new instance.
27608
27608
  */
27609
27609
  static fromJSON(e) {
27610
- return new Md(e.radiusTop, e.radiusBottom, e.height, e.radialSegments, e.heightSegments, e.openEnded, e.thetaStart, e.thetaLength);
27610
+ return new Cd(e.radiusTop, e.radiusBottom, e.height, e.radialSegments, e.heightSegments, e.openEnded, e.thetaStart, e.thetaLength);
27611
27611
  }
27612
27612
  }
27613
27613
  class Ad extends _i {
@@ -27656,7 +27656,7 @@ class Ad extends _i {
27656
27656
  }
27657
27657
  }
27658
27658
  const sm = /* @__PURE__ */ new R(), im = /* @__PURE__ */ new R();
27659
- class SR extends Cn {
27659
+ class SR extends Mn {
27660
27660
  /**
27661
27661
  * Constructs a new XR manager.
27662
27662
  *
@@ -27664,7 +27664,7 @@ class SR extends Cn {
27664
27664
  * @param {boolean} [multiview=false] - Enables multiview if the device supports it.
27665
27665
  */
27666
27666
  constructor(e, t = !1) {
27667
- super(), this.enabled = !1, this.isPresenting = !1, this.cameraAutoUpdate = !0, this._renderer = e, this._cameraL = new ss(), this._cameraL.viewport = new ge(), this._cameraR = new ss(), this._cameraR.viewport = new ge(), this._cameras = [this._cameraL, this._cameraR], this._cameraXR = new _R(), this._currentDepthNear = null, this._currentDepthFar = null, this._controllers = [], this._controllerInputSources = [], this._xrRenderTarget = null, this._layers = [], this._supportsLayers = !1, this._frameBufferTargets = null, this._createXRLayer = AR.bind(this), this._gl = null, this._currentAnimationContext = null, this._currentAnimationLoop = null, this._currentPixelRatio = null, this._currentSize = new he(), this._onSessionEvent = ER.bind(this), this._onSessionEnd = CR.bind(this), this._onInputSourcesChange = MR.bind(this), this._onAnimationFrame = RR.bind(this), this._referenceSpace = null, this._referenceSpaceType = "local-floor", this._customReferenceSpace = null, this._framebufferScaleFactor = 1, this._foveation = 1, this._session = null, this._glBaseLayer = null, this._glBinding = null, this._glProjLayer = null, this._xrFrame = null, this._useLayers = typeof XRWebGLBinding < "u" && "createProjectionLayer" in XRWebGLBinding.prototype, this._useMultiviewIfPossible = t, this._useMultiview = !1;
27667
+ super(), this.enabled = !1, this.isPresenting = !1, this.cameraAutoUpdate = !0, this._renderer = e, this._cameraL = new ss(), this._cameraL.viewport = new ge(), this._cameraR = new ss(), this._cameraR.viewport = new ge(), this._cameras = [this._cameraL, this._cameraR], this._cameraXR = new _R(), this._currentDepthNear = null, this._currentDepthFar = null, this._controllers = [], this._controllerInputSources = [], this._xrRenderTarget = null, this._layers = [], this._supportsLayers = !1, this._frameBufferTargets = null, this._createXRLayer = AR.bind(this), this._gl = null, this._currentAnimationContext = null, this._currentAnimationLoop = null, this._currentPixelRatio = null, this._currentSize = new he(), this._onSessionEvent = ER.bind(this), this._onSessionEnd = MR.bind(this), this._onInputSourcesChange = CR.bind(this), this._onAnimationFrame = RR.bind(this), this._referenceSpace = null, this._referenceSpaceType = "local-floor", this._customReferenceSpace = null, this._framebufferScaleFactor = 1, this._foveation = 1, this._session = null, this._glBaseLayer = null, this._glBinding = null, this._glProjLayer = null, this._xrFrame = null, this._useLayers = typeof XRWebGLBinding < "u" && "createProjectionLayer" in XRWebGLBinding.prototype, this._useMultiviewIfPossible = t, this._useMultiview = !1;
27668
27668
  }
27669
27669
  /**
27670
27670
  * Returns an instance of `THREE.Group` that represents the transformation
@@ -27860,7 +27860,7 @@ class SR extends Cn {
27860
27860
  renderTarget: h
27861
27861
  };
27862
27862
  if (this._layers.push(p), this._session !== null) {
27863
- p.plane.material = new Ii({ color: 16777215, side: ri }), p.plane.material.blending = Ra, p.plane.material.blendEquation = Cs, p.plane.material.blendSrc = Pi, p.plane.material.blendDst = Pi, p.xrlayer = this._createXRLayer(p);
27863
+ p.plane.material = new Ii({ color: 16777215, side: ri }), p.plane.material.blending = Ra, p.plane.material.blendEquation = Ms, p.plane.material.blendSrc = Pi, p.plane.material.blendDst = Pi, p.xrlayer = this._createXRLayer(p);
27864
27864
  const f = this._session.renderState.layers;
27865
27865
  f.unshift(p.xrlayer), this._session.updateRenderState({ layers: f });
27866
27866
  } else
@@ -27884,7 +27884,7 @@ class SR extends Cn {
27884
27884
  * @return {Mesh} A mesh representing the cylindrical XR layer. This mesh should be added to the XR scene.
27885
27885
  */
27886
27886
  createCylinderLayer(e, t, s, i, n, r, o, l, c = {}) {
27887
- const h = new Md(e, e, e * t / s, 64, 64, !0, Math.PI - t / 2, t), u = new Sa(
27887
+ const h = new Cd(e, e, e * t / s, 64, 64, !0, Math.PI - t / 2, t), u = new Sa(
27888
27888
  r,
27889
27889
  o,
27890
27890
  {
@@ -27927,7 +27927,7 @@ class SR extends Cn {
27927
27927
  renderTarget: u
27928
27928
  };
27929
27929
  if (this._layers.push(f), this._session !== null) {
27930
- f.plane.material = new Ii({ color: 16777215, side: jt }), f.plane.material.blending = Ra, f.plane.material.blendEquation = Cs, f.plane.material.blendSrc = Pi, f.plane.material.blendDst = Pi, f.xrlayer = this._createXRLayer(f);
27930
+ f.plane.material = new Ii({ color: 16777215, side: jt }), f.plane.material.blending = Ra, f.plane.material.blendEquation = Ms, f.plane.material.blendSrc = Pi, f.plane.material.blendDst = Pi, f.xrlayer = this._createXRLayer(f);
27931
27931
  const m = this._session.renderState.layers;
27932
27932
  m.unshift(f.xrlayer), this._session.updateRenderState({ layers: m });
27933
27933
  } else
@@ -28014,7 +28014,7 @@ class SR extends Cn {
28014
28014
  }
28015
28015
  ), this._xrRenderTarget.hasExternalTextures = !0, this._xrRenderTarget.depth = this._useMultiview ? 2 : 1, this._supportsLayers = e.enabledFeatures.includes("layers"), this._referenceSpace = await e.requestReferenceSpace(this.getReferenceSpaceType()), this._supportsLayers)
28016
28016
  for (const m of this._layers)
28017
- m.plane.material = new Ii({ color: 16777215, side: m.type === "cylinder" ? jt : ri }), m.plane.material.blending = Ra, m.plane.material.blendEquation = Cs, m.plane.material.blendSrc = Pi, m.plane.material.blendDst = Pi, m.xrlayer = this._createXRLayer(m), d.unshift(m.xrlayer);
28017
+ m.plane.material = new Ii({ color: 16777215, side: m.type === "cylinder" ? jt : ri }), m.plane.material.blending = Ra, m.plane.material.blendEquation = Ms, m.plane.material.blendSrc = Pi, m.plane.material.blendDst = Pi, m.xrlayer = this._createXRLayer(m), d.unshift(m.xrlayer);
28018
28018
  e.updateRenderState({ layers: d });
28019
28019
  } else {
28020
28020
  const r = {
@@ -28087,7 +28087,7 @@ function nm(a, e) {
28087
28087
  e === null ? a.matrixWorld.copy(a.matrix) : a.matrixWorld.multiplyMatrices(e.matrixWorld, a.matrix), a.matrixWorldInverse.copy(a.matrixWorld).invert();
28088
28088
  }
28089
28089
  function wR(a, e, t) {
28090
- t === null ? a.matrix.copy(e.matrixWorld) : (a.matrix.copy(t.matrixWorld), a.matrix.invert(), a.matrix.multiply(e.matrixWorld)), a.matrix.decompose(a.position, a.quaternion, a.scale), a.updateMatrixWorld(!0), a.projectionMatrix.copy(e.projectionMatrix), a.projectionMatrixInverse.copy(e.projectionMatrixInverse), a.isPerspectiveCamera && (a.fov = Cr * 2 * Math.atan(1 / a.projectionMatrix.elements[5]), a.zoom = 1);
28090
+ t === null ? a.matrix.copy(e.matrixWorld) : (a.matrix.copy(t.matrixWorld), a.matrix.invert(), a.matrix.multiply(e.matrixWorld)), a.matrix.decompose(a.position, a.quaternion, a.scale), a.updateMatrixWorld(!0), a.projectionMatrix.copy(e.projectionMatrix), a.projectionMatrixInverse.copy(e.projectionMatrixInverse), a.isPerspectiveCamera && (a.fov = Mr * 2 * Math.atan(1 / a.projectionMatrix.elements[5]), a.zoom = 1);
28091
28091
  }
28092
28092
  function ER(a) {
28093
28093
  const e = this._controllerInputSources.indexOf(a.inputSource);
@@ -28099,7 +28099,7 @@ function ER(a) {
28099
28099
  t.update(a.inputSource, a.frame, s), t.dispatchEvent({ type: a.type, data: a.inputSource });
28100
28100
  }
28101
28101
  }
28102
- function CR() {
28102
+ function MR() {
28103
28103
  const a = this._session, e = this._renderer;
28104
28104
  a.removeEventListener("select", this._onSessionEvent), a.removeEventListener("selectstart", this._onSessionEvent), a.removeEventListener("selectend", this._onSessionEvent), a.removeEventListener("squeeze", this._onSessionEvent), a.removeEventListener("squeezestart", this._onSessionEvent), a.removeEventListener("squeezeend", this._onSessionEvent), a.removeEventListener("end", this._onSessionEnd), a.removeEventListener("inputsourceschange", this._onInputSourcesChange);
28105
28105
  for (let t = 0; t < this._controllers.length; t++) {
@@ -28133,7 +28133,7 @@ function CR() {
28133
28133
  ), t.renderTarget.isXRRenderTarget = !1, t.plane.material = t.material, t.material.map = t.renderTarget.texture, t.material.map.offset.y = 1, t.material.map.repeat.y = -1, delete t.xrlayer;
28134
28134
  this.isPresenting = !1, this._useMultiview = !1, e._animation.stop(), e._animation.setAnimationLoop(this._currentAnimationLoop), e._animation.setContext(this._currentAnimationContext), e._animation.start(), e.setPixelRatio(this._currentPixelRatio), e.setSize(this._currentSize.width, this._currentSize.height, !1), this.dispatchEvent({ type: "sessionend" });
28135
28135
  }
28136
- function MR(a) {
28136
+ function CR(a) {
28137
28137
  const e = this._controllers, t = this._controllerInputSources;
28138
28138
  for (let s = 0; s < a.removed.length; s++) {
28139
28139
  const i = a.removed[s], n = t.indexOf(i);
@@ -28481,7 +28481,7 @@ class Nd {
28481
28481
  return new Nd();
28482
28482
  }
28483
28483
  }
28484
- const rm = /* @__PURE__ */ new $u(), ko = /* @__PURE__ */ new he(), fh = /* @__PURE__ */ new ge(), mh = /* @__PURE__ */ new Rd(), gh = /* @__PURE__ */ new Nd(), zo = /* @__PURE__ */ new Le(), Ci = /* @__PURE__ */ new ge();
28484
+ const rm = /* @__PURE__ */ new $u(), ko = /* @__PURE__ */ new he(), fh = /* @__PURE__ */ new ge(), mh = /* @__PURE__ */ new Rd(), gh = /* @__PURE__ */ new Nd(), zo = /* @__PURE__ */ new Le(), Mi = /* @__PURE__ */ new ge();
28485
28485
  class NR {
28486
28486
  /**
28487
28487
  * Renderer options.
@@ -28563,7 +28563,7 @@ class NR {
28563
28563
  return;
28564
28564
  }
28565
28565
  }
28566
- this._nodes = new fR(this, s), this._animation = new Fb(this._nodes, this.info), this._attributes = new RT(s), this._background = new iA(this, this._nodes), this._geometries = new FT(this._attributes, this.info), this._textures = new sS(this, s, this.info), this._pipelines = new LT(s, this._nodes), this._bindings = new UT(s, this._nodes, this._textures, this._attributes, this._pipelines, this.info), this._objects = new CT(this, this._nodes, this._geometries, this._pipelines, this._bindings, this.info), this._renderLists = new GT(this.lighting), this._bundles = new gR(), this._renderContexts = new KT(), this._animation.start(), this._initialized = !0, e(this);
28566
+ this._nodes = new fR(this, s), this._animation = new Fb(this._nodes, this.info), this._attributes = new RT(s), this._background = new iA(this, this._nodes), this._geometries = new FT(this._attributes, this.info), this._textures = new sS(this, s, this.info), this._pipelines = new LT(s, this._nodes), this._bindings = new UT(s, this._nodes, this._textures, this._attributes, this._pipelines, this.info), this._objects = new MT(this, this._nodes, this._geometries, this._pipelines, this._bindings, this.info), this._renderLists = new GT(this.lighting), this._bundles = new gR(), this._renderContexts = new KT(), this._animation.start(), this._initialized = !0, e(this);
28567
28567
  }), this._initPromise);
28568
28568
  }
28569
28569
  /**
@@ -28751,7 +28751,7 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
28751
28751
  if (e !== yr === !1 && t !== xr === !1) return null;
28752
28752
  const { width: n, height: r } = this.getDrawingBufferSize(ko), { depth: o, stencil: l } = this;
28753
28753
  let c = this._frameBufferTarget;
28754
- c === null && (c = new Mn(n, r, {
28754
+ c === null && (c = new Cn(n, r, {
28755
28755
  depthBuffer: o,
28756
28756
  stencilBuffer: l,
28757
28757
  type: this._colorBufferType,
@@ -29402,15 +29402,15 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
29402
29402
  copyFramebufferToTexture(e, t = null) {
29403
29403
  if (t !== null)
29404
29404
  if (t.isVector2)
29405
- t = Ci.set(t.x, t.y, e.image.width, e.image.height).floor();
29405
+ t = Mi.set(t.x, t.y, e.image.width, e.image.height).floor();
29406
29406
  else if (t.isVector4)
29407
- t = Ci.copy(t).floor();
29407
+ t = Mi.copy(t).floor();
29408
29408
  else {
29409
29409
  console.error("THREE.Renderer.copyFramebufferToTexture: Invalid rectangle.");
29410
29410
  return;
29411
29411
  }
29412
29412
  else
29413
- t = Ci.set(0, 0, e.image.width, e.image.height);
29413
+ t = Mi.set(0, 0, e.image.width, e.image.height);
29414
29414
  let s = this._currentRenderContext, i;
29415
29415
  s !== null ? i = s.renderTarget : (i = this._renderTarget || this._getFrameBufferTarget(), i !== null && (this._textures.updateRenderTarget(i), s = this._textures.get(i))), this._textures.updateTexture(e, { renderTarget: i }), this.backend.copyFramebufferToTexture(e, s, t);
29416
29416
  }
@@ -29465,9 +29465,9 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
29465
29465
  else if (e.isSprite) {
29466
29466
  const l = t.isArrayCamera ? gh : mh;
29467
29467
  if (!e.frustumCulled || l.intersectsSprite(e, t)) {
29468
- this.sortObjects === !0 && Ci.setFromMatrixPosition(e.matrixWorld).applyMatrix4(zo);
29468
+ this.sortObjects === !0 && Mi.setFromMatrixPosition(e.matrixWorld).applyMatrix4(zo);
29469
29469
  const { geometry: c, material: h } = e;
29470
- h.visible && i.push(e, c, h, s, Ci.z, null, n);
29470
+ h.visible && i.push(e, c, h, s, Mi.z, null, n);
29471
29471
  }
29472
29472
  } else if (e.isLineLoop)
29473
29473
  console.error("THREE.Renderer: Objects of type THREE.LineLoop are not supported. Please use THREE.Line or THREE.LineSegments.");
@@ -29475,13 +29475,13 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
29475
29475
  const l = t.isArrayCamera ? gh : mh;
29476
29476
  if (!e.frustumCulled || l.intersectsObject(e, t)) {
29477
29477
  const { geometry: c, material: h } = e;
29478
- if (this.sortObjects === !0 && (c.boundingSphere === null && c.computeBoundingSphere(), Ci.copy(c.boundingSphere.center).applyMatrix4(e.matrixWorld).applyMatrix4(zo)), Array.isArray(h)) {
29478
+ if (this.sortObjects === !0 && (c.boundingSphere === null && c.computeBoundingSphere(), Mi.copy(c.boundingSphere.center).applyMatrix4(e.matrixWorld).applyMatrix4(zo)), Array.isArray(h)) {
29479
29479
  const u = c.groups;
29480
29480
  for (let d = 0, p = u.length; d < p; d++) {
29481
29481
  const f = u[d], m = h[f.materialIndex];
29482
- m && m.visible && i.push(e, c, m, s, Ci.z, f, n);
29482
+ m && m.visible && i.push(e, c, m, s, Mi.z, f, n);
29483
29483
  }
29484
- } else h.visible && i.push(e, c, h, s, Ci.z, null, n);
29484
+ } else h.visible && i.push(e, c, h, s, Mi.z, null, n);
29485
29485
  }
29486
29486
  }
29487
29487
  }
@@ -30037,7 +30037,7 @@ class L0 extends rc {
30037
30037
  super(e, t, s, i), this.isSampledTexture3D = !0;
30038
30038
  }
30039
30039
  }
30040
- class kR extends Ct {
30040
+ class kR extends Mt {
30041
30041
  /**
30042
30042
  * Constructs a new data texture.
30043
30043
  *
@@ -31491,7 +31491,7 @@ class jR {
31491
31491
  _init() {
31492
31492
  const e = this.gl;
31493
31493
  xh = {
31494
- [Cs]: e.FUNC_ADD,
31494
+ [Ms]: e.FUNC_ADD,
31495
31495
  [bg]: e.FUNC_SUBTRACT,
31496
31496
  [Tg]: e.FUNC_REVERSE_SUBTRACT
31497
31497
  }, oa = {
@@ -31500,12 +31500,12 @@ class jR {
31500
31500
  [vg]: e.SRC_COLOR,
31501
31501
  [_l]: e.SRC_ALPHA,
31502
31502
  [Rg]: e.SRC_ALPHA_SATURATE,
31503
- [Mg]: e.DST_COLOR,
31503
+ [Cg]: e.DST_COLOR,
31504
31504
  [Eg]: e.DST_ALPHA,
31505
31505
  [wg]: e.ONE_MINUS_SRC_COLOR,
31506
31506
  [bl]: e.ONE_MINUS_SRC_ALPHA,
31507
31507
  [Ag]: e.ONE_MINUS_DST_COLOR,
31508
- [Cg]: e.ONE_MINUS_DST_ALPHA
31508
+ [Mg]: e.ONE_MINUS_DST_ALPHA
31509
31509
  };
31510
31510
  const t = e.getParameter(e.SCISSOR_BOX), s = e.getParameter(e.VIEWPORT);
31511
31511
  this.currentScissor = new ge().fromArray(t), this.currentViewport = new ge().fromArray(s), this._tempVec4 = new ge();
@@ -31591,13 +31591,13 @@ class jR {
31591
31591
  */
31592
31592
  setBlending(e, t, s, i, n, r, o, l) {
31593
31593
  const { gl: c } = this;
31594
- if (e === Mr) {
31594
+ if (e === Cr) {
31595
31595
  this.currentBlendingEnabled === !0 && (this.disable(c.BLEND), this.currentBlendingEnabled = !1);
31596
31596
  return;
31597
31597
  }
31598
31598
  if (this.currentBlendingEnabled === !1 && (this.enable(c.BLEND), this.currentBlendingEnabled = !0), e !== Ra) {
31599
31599
  if (e !== this.currentBlending || l !== this.currentPremultipledAlpha) {
31600
- if ((this.currentBlendEquation !== Cs || this.currentBlendEquationAlpha !== Cs) && (c.blendEquation(c.FUNC_ADD), this.currentBlendEquation = Cs, this.currentBlendEquationAlpha = Cs), l)
31600
+ if ((this.currentBlendEquation !== Ms || this.currentBlendEquationAlpha !== Ms) && (c.blendEquation(c.FUNC_ADD), this.currentBlendEquation = Ms, this.currentBlendEquationAlpha = Ms), l)
31601
31601
  switch (e) {
31602
31602
  case ai:
31603
31603
  c.blendFuncSeparate(c.ONE, c.ONE_MINUS_SRC_ALPHA, c.ONE, c.ONE_MINUS_SRC_ALPHA);
@@ -31814,7 +31814,7 @@ class jR {
31814
31814
  const { gl: i } = this;
31815
31815
  e.side === gr ? this.disable(i.CULL_FACE) : this.enable(i.CULL_FACE);
31816
31816
  let n = e.side === jt;
31817
- t && (n = !n), this.setFlipSided(n), e.blending === ai && e.transparent === !1 ? this.setBlending(Mr) : this.setBlending(e.blending, e.blendEquation, e.blendSrc, e.blendDst, e.blendEquationAlpha, e.blendSrcAlpha, e.blendDstAlpha, e.premultipliedAlpha), this.setDepthFunc(e.depthFunc), this.setDepthTest(e.depthTest), this.setDepthMask(e.depthWrite), this.setColorMask(e.colorWrite);
31817
+ t && (n = !n), this.setFlipSided(n), e.blending === ai && e.transparent === !1 ? this.setBlending(Cr) : this.setBlending(e.blending, e.blendEquation, e.blendSrc, e.blendDst, e.blendEquationAlpha, e.blendSrcAlpha, e.blendDstAlpha, e.premultipliedAlpha), this.setDepthFunc(e.depthFunc), this.setDepthTest(e.depthTest), this.setDepthMask(e.depthWrite), this.setColorMask(e.colorWrite);
31818
31818
  const r = e.stencilWrite;
31819
31819
  if (this.setStencilTest(r), r && (this.setStencilMask(e.stencilWriteMask), this.setStencilFunc(e.stencilFunc, e.stencilRef, e.stencilFuncMask), this.setStencilOp(e.stencilFail, e.stencilZFail, e.stencilZPass)), this.setPolygonOffset(e.polygonOffset, e.polygonOffsetFactor, e.polygonOffsetUnits), e.alphaToCoverage === !0 && this.backend.renderer.samples > 1 ? this.enable(i.SAMPLE_ALPHA_TO_COVERAGE) : this.disable(i.SAMPLE_ALPHA_TO_COVERAGE), s > 0 && this.currentClippingPlanes !== s)
31820
31820
  for (let l = 0; l < 8; l++)
@@ -32056,12 +32056,12 @@ class qR {
32056
32056
  if (e === _c) return r === te ? n.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : n.COMPRESSED_RGBA_BPTC_UNORM_EXT;
32057
32057
  } else
32058
32058
  return null;
32059
- if (e === Qb || e === wp || e === Ep || e === Cp)
32059
+ if (e === Qb || e === wp || e === Ep || e === Mp)
32060
32060
  if (n = i.get("EXT_texture_compression_rgtc"), n !== null) {
32061
32061
  if (e === _c) return n.COMPRESSED_RED_RGTC1_EXT;
32062
32062
  if (e === wp) return n.COMPRESSED_SIGNED_RED_RGTC1_EXT;
32063
32063
  if (e === Ep) return n.COMPRESSED_RED_GREEN_RGTC2_EXT;
32064
- if (e === Cp) return n.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
32064
+ if (e === Mp) return n.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
32065
32065
  } else
32066
32066
  return null;
32067
32067
  return e === ki ? s.UNSIGNED_INT_24_8 : s[e] !== void 0 ? s[e] : null;
@@ -32330,8 +32330,8 @@ class YR {
32330
32330
  if (e.isRenderTargetTexture || e.isDepthTexture) {
32331
32331
  const q = l.get(e), X = l.get(t), Ee = l.get(q.renderTarget), de = l.get(X.renderTarget), ye = Ee.framebuffers[q.cacheKey], se = de.framebuffers[X.cacheKey];
32332
32332
  c.bindFramebuffer(o.READ_FRAMEBUFFER, ye), c.bindFramebuffer(o.DRAW_FRAMEBUFFER, se);
32333
- let Ce = o.COLOR_BUFFER_BIT;
32334
- e.isDepthTexture && (Ce = o.DEPTH_BUFFER_BIT), o.blitFramebuffer(g, x, f, m, b, T, f, m, Ce, o.NEAREST), c.bindFramebuffer(o.READ_FRAMEBUFFER, null), c.bindFramebuffer(o.DRAW_FRAMEBUFFER, null);
32333
+ let Me = o.COLOR_BUFFER_BIT;
32334
+ e.isDepthTexture && (Me = o.DEPTH_BUFFER_BIT), o.blitFramebuffer(g, x, f, m, b, T, f, m, Me, o.NEAREST), c.bindFramebuffer(o.READ_FRAMEBUFFER, null), c.bindFramebuffer(o.DRAW_FRAMEBUFFER, null);
32335
32335
  } else
32336
32336
  $ ? e.isDataTexture || e.isData3DTexture ? o.texSubImage3D(u, r, b, T, E, f, m, y, p, d, v.data) : t.isCompressedArrayTexture ? o.compressedTexSubImage3D(u, r, b, T, E, f, m, y, p, v.data) : o.texSubImage3D(u, r, b, T, E, f, m, y, p, d, v) : e.isDataTexture ? o.texSubImage2D(u, r, b, T, f, m, p, d, v.data) : e.isCompressedTexture ? o.compressedTexSubImage2D(u, r, b, T, v.width, v.height, p, v.data) : o.texSubImage2D(u, r, b, T, f, m, p, d, v);
32337
32337
  o.pixelStorei(o.UNPACK_ROW_LENGTH, A), o.pixelStorei(o.UNPACK_IMAGE_HEIGHT, N), o.pixelStorei(o.UNPACK_SKIP_PIXELS, k), o.pixelStorei(o.UNPACK_SKIP_ROWS, H), o.pixelStorei(o.UNPACK_SKIP_IMAGES, W), r === 0 && t.generateMipmaps && o.generateMipmap(u), c.unbindTexture();
@@ -33148,10 +33148,10 @@ class mm extends U0 {
33148
33148
  $ && (this.renderer._activeCubeFace = X, this._currentContext.activeCubeFace = X, this._setFramebuffer(this._currentContext));
33149
33149
  const ye = de.viewport;
33150
33150
  if (ye !== void 0) {
33151
- const se = ye.x * H, Ce = ye.y * H, Ge = ye.width * H, ot = ye.height * H;
33151
+ const se = ye.x * H, Me = ye.y * H, Ge = ye.width * H, ot = ye.height * H;
33152
33152
  c.viewport(
33153
33153
  Math.floor(se),
33154
- Math.floor(e.context.height - ot - Ce),
33154
+ Math.floor(e.context.height - ot - Me),
33155
33155
  Math.floor(Ge),
33156
33156
  Math.floor(ot)
33157
33157
  );
@@ -33818,7 +33818,7 @@ const fr = {
33818
33818
  Always: "always"
33819
33819
  }, Nt = {
33820
33820
  Store: "store"
33821
- }, Me = {
33821
+ }, Ce = {
33822
33822
  Load: "load",
33823
33823
  Clear: "clear"
33824
33824
  }, bh = {
@@ -33967,7 +33967,7 @@ const fr = {
33967
33967
  }, gm = {
33968
33968
  None: 0,
33969
33969
  All: 15
33970
- }, Mi = {
33970
+ }, Ci = {
33971
33971
  Keep: "keep",
33972
33972
  Zero: "zero",
33973
33973
  Replace: "replace",
@@ -34247,7 +34247,7 @@ fn main( @location( 0 ) vTex : vec2<f32> ) -> @location( 0 ) vec4<f32> {
34247
34247
  }), _ = d.beginRenderPass({
34248
34248
  colorAttachments: [{
34249
34249
  view: y,
34250
- loadOp: Me.Clear,
34250
+ loadOp: Ce.Clear,
34251
34251
  storeOp: Nt.Store,
34252
34252
  clearValue: [0, 0, 0, 0]
34253
34253
  }]
@@ -34305,7 +34305,7 @@ fn main( @location( 0 ) vTex : vec2<f32> ) -> @location( 0 ) vec4<f32> {
34305
34305
  }), u = {
34306
34306
  colorAttachments: [{
34307
34307
  view: h,
34308
- loadOp: Me.Clear,
34308
+ loadOp: Ce.Clear,
34309
34309
  storeOp: Nt.Store,
34310
34310
  clearValue: [0, 0, 0, 0]
34311
34311
  }]
@@ -34377,7 +34377,7 @@ class l1 {
34377
34377
  */
34378
34378
  createDefaultTexture(e) {
34379
34379
  let t;
34380
- const s = Cu(e);
34380
+ const s = Mu(e);
34381
34381
  e.isCubeTexture ? t = this._getDefaultCubeTextureGPU(s) : e.isVideoTexture ? this.backend.get(e).externalTexture = this._getDefaultVideoFrame() : t = this._getDefaultTextureGPU(s), this.backend.get(e).texture = t;
34382
34382
  }
34383
34383
  /**
@@ -34393,7 +34393,7 @@ class l1 {
34393
34393
  t.needsMipmaps === void 0 && (t.needsMipmaps = !1), t.levels === void 0 && (t.levels = 1), t.depth === void 0 && (t.depth = 1);
34394
34394
  const { width: n, height: r, depth: o, levels: l } = t;
34395
34395
  e.isFramebufferTexture && (t.renderTarget ? t.format = this.backend.utils.getCurrentColorFormat(t.renderTarget) : t.format = this.backend.utils.getPreferredCanvasFormat());
34396
- const c = this._getDimension(e), h = e.internalFormat || t.format || Cu(e, s.device);
34396
+ const c = this._getDimension(e), h = e.internalFormat || t.format || Mu(e, s.device);
34397
34397
  i.format = h;
34398
34398
  const { samples: u, primarySamples: d, isMSAA: p } = s.utils.getTextureSampleData(e);
34399
34399
  let f = GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.COPY_DST | GPUTextureUsage.COPY_SRC;
@@ -34577,7 +34577,7 @@ class l1 {
34577
34577
  _getDefaultTextureGPU(e) {
34578
34578
  let t = this.defaultTexture[e];
34579
34579
  if (t === void 0) {
34580
- const s = new Ct();
34580
+ const s = new Mt();
34581
34581
  s.minFilter = dt, s.magFilter = dt, this.createTexture(s, { width: 1, height: 1, format: e }), this.defaultTexture[e] = t = s;
34582
34582
  }
34583
34583
  return this.backend.get(t).texture;
@@ -34887,7 +34887,7 @@ class l1 {
34887
34887
  return e.isData3DTexture ? t = xm.ThreeD : t = xm.TwoD, t;
34888
34888
  }
34889
34889
  }
34890
- function Cu(a, e = null) {
34890
+ function Mu(a, e = null) {
34891
34891
  const t = a.format, s = a.type, i = a.colorSpace, n = ke.getTransfer(i);
34892
34892
  let r;
34893
34893
  if (a.isCompressedTexture === !0 || a.isCompressedArrayTexture === !0)
@@ -35202,7 +35202,7 @@ const c1 = /^[fn]*\s*([a-z_0-9]+)?\s*\(([\s\S]*?)\)\s*[\-\>]*\s*([a-z_0-9]+(?:<[
35202
35202
  } else
35203
35203
  throw new Error("FunctionNode: Function is not a WGSL code.");
35204
35204
  };
35205
- class d1 extends Cd {
35205
+ class d1 extends Md {
35206
35206
  /**
35207
35207
  * Constructs a new WGSL node function.
35208
35208
  *
@@ -35223,7 +35223,7 @@ class d1 extends Cd {
35223
35223
  return `fn ${e} ( ${this.inputsCode.trim()} ) ${t}` + this.blockCode;
35224
35224
  }
35225
35225
  }
35226
- class p1 extends C0 {
35226
+ class p1 extends M0 {
35227
35227
  /**
35228
35228
  * The method parses the given WGSL code an returns a node function.
35229
35229
  *
@@ -36106,7 +36106,7 @@ ${t.join(`
36106
36106
  else if (u.isData3DTexture === !0)
36107
36107
  d = "texture_3d<f32>";
36108
36108
  else if (l.node.isStorageTextureNode === !0) {
36109
- const m = Cu(u), y = this.getStorageAccess(l.node, e);
36109
+ const m = Mu(u), y = this.getStorageAccess(l.node, e);
36110
36110
  d = `texture_storage_2d<${m}, ${y}>`;
36111
36111
  } else {
36112
36112
  const m = this.getComponentTypeFromTexture(u).charAt(0);
@@ -36918,7 +36918,7 @@ class w1 {
36918
36918
  }
36919
36919
  const f = c.attributeUtils.createShaderVertexBuffers(e);
36920
36920
  let m;
36921
- i.blending !== Mr && (i.blending !== ai || i.transparent !== !1) && (m = this._getBlending(i));
36921
+ i.blending !== Cr && (i.blending !== ai || i.transparent !== !1) && (m = this._getBlending(i));
36922
36922
  let y = {};
36923
36923
  i.stencilWrite === !0 && (y = {
36924
36924
  compare: this._getStencilCompare(i),
@@ -37101,7 +37101,7 @@ class w1 {
37101
37101
  case bl:
37102
37102
  t = ie.OneMinusSrcAlpha;
37103
37103
  break;
37104
- case Mg:
37104
+ case Cg:
37105
37105
  t = ie.Dst;
37106
37106
  break;
37107
37107
  case Ag:
@@ -37110,13 +37110,13 @@ class w1 {
37110
37110
  case Eg:
37111
37111
  t = ie.DstAlpha;
37112
37112
  break;
37113
- case Cg:
37113
+ case Mg:
37114
37114
  t = ie.OneMinusDstAlpha;
37115
37115
  break;
37116
37116
  case Rg:
37117
37117
  t = ie.SrcAlphaSaturated;
37118
37118
  break;
37119
- case MT:
37119
+ case CT:
37120
37120
  t = ie.Constant;
37121
37121
  break;
37122
37122
  case AT:
@@ -37178,28 +37178,28 @@ class w1 {
37178
37178
  let t;
37179
37179
  switch (e) {
37180
37180
  case hn:
37181
- t = Mi.Keep;
37181
+ t = Ci.Keep;
37182
37182
  break;
37183
37183
  case eT:
37184
- t = Mi.Zero;
37184
+ t = Ci.Zero;
37185
37185
  break;
37186
37186
  case tT:
37187
- t = Mi.Replace;
37187
+ t = Ci.Replace;
37188
37188
  break;
37189
37189
  case aT:
37190
- t = Mi.Invert;
37190
+ t = Ci.Invert;
37191
37191
  break;
37192
37192
  case sT:
37193
- t = Mi.IncrementClamp;
37193
+ t = Ci.IncrementClamp;
37194
37194
  break;
37195
37195
  case iT:
37196
- t = Mi.DecrementClamp;
37196
+ t = Ci.DecrementClamp;
37197
37197
  break;
37198
37198
  case nT:
37199
- t = Mi.IncrementWrap;
37199
+ t = Ci.IncrementWrap;
37200
37200
  break;
37201
37201
  case rT:
37202
- t = Mi.DecrementWrap;
37202
+ t = Ci.DecrementWrap;
37203
37203
  break;
37204
37204
  default:
37205
37205
  console.error("THREE.WebGPURenderer: Invalid stencil operation.", t);
@@ -37216,7 +37216,7 @@ class w1 {
37216
37216
  _getBlendOperation(e) {
37217
37217
  let t;
37218
37218
  switch (e) {
37219
- case Cs:
37219
+ case Ms:
37220
37220
  t = tn.Add;
37221
37221
  break;
37222
37222
  case bg:
@@ -37445,7 +37445,7 @@ class E1 extends k0 {
37445
37445
  }
37446
37446
  }
37447
37447
  }
37448
- class C1 extends U0 {
37448
+ class M1 extends U0 {
37449
37449
  /**
37450
37450
  * WebGPUBackend options.
37451
37451
  *
@@ -37664,7 +37664,7 @@ class C1 extends U0 {
37664
37664
  view: h.view,
37665
37665
  depthSlice: h.depthSlice,
37666
37666
  resolveTarget: h.resolveTarget,
37667
- loadOp: t.loadOp || Me.Load,
37667
+ loadOp: t.loadOp || Ce.Load,
37668
37668
  storeOp: t.storeOp || Nt.Store,
37669
37669
  clearValue: u
37670
37670
  });
@@ -37684,19 +37684,19 @@ class C1 extends U0 {
37684
37684
  let n;
37685
37685
  i > 0 && (t.currentOcclusionQuerySet && t.currentOcclusionQuerySet.destroy(), t.currentOcclusionQueryBuffer && t.currentOcclusionQueryBuffer.destroy(), t.currentOcclusionQuerySet = t.occlusionQuerySet, t.currentOcclusionQueryBuffer = t.occlusionQueryBuffer, t.currentOcclusionQueryObjects = t.occlusionQueryObjects, n = s.createQuerySet({ type: "occlusion", count: i, label: `occlusionQuerySet_${e.id}` }), t.occlusionQuerySet = n, t.occlusionQueryIndex = 0, t.occlusionQueryObjects = new Array(i), t.lastOcclusionObject = null);
37686
37686
  let r;
37687
- e.textures === null ? r = this._getDefaultRenderPassDescriptor() : r = this._getRenderPassDescriptor(e, { loadOp: Me.Load }), this.initTimestampQuery(e, r), r.occlusionQuerySet = n;
37687
+ e.textures === null ? r = this._getDefaultRenderPassDescriptor() : r = this._getRenderPassDescriptor(e, { loadOp: Ce.Load }), this.initTimestampQuery(e, r), r.occlusionQuerySet = n;
37688
37688
  const o = r.depthStencilAttachment;
37689
37689
  if (e.textures !== null) {
37690
37690
  const c = r.colorAttachments;
37691
37691
  for (let h = 0; h < c.length; h++) {
37692
37692
  const u = c[h];
37693
- e.clearColor ? (u.clearValue = h === 0 ? e.clearColorValue : { r: 0, g: 0, b: 0, a: 1 }, u.loadOp = Me.Clear) : u.loadOp = Me.Load, u.storeOp = Nt.Store;
37693
+ e.clearColor ? (u.clearValue = h === 0 ? e.clearColorValue : { r: 0, g: 0, b: 0, a: 1 }, u.loadOp = Ce.Clear) : u.loadOp = Ce.Load, u.storeOp = Nt.Store;
37694
37694
  }
37695
37695
  } else {
37696
37696
  const c = r.colorAttachments[0];
37697
- e.clearColor ? (c.clearValue = e.clearColorValue, c.loadOp = Me.Clear) : c.loadOp = Me.Load, c.storeOp = Nt.Store;
37697
+ e.clearColor ? (c.clearValue = e.clearColorValue, c.loadOp = Ce.Clear) : c.loadOp = Ce.Load, c.storeOp = Nt.Store;
37698
37698
  }
37699
- e.depth && (e.clearDepth ? (o.depthClearValue = e.clearDepthValue, o.depthLoadOp = Me.Clear) : o.depthLoadOp = Me.Load, o.depthStoreOp = Nt.Store), e.stencil && (e.clearStencil ? (o.stencilClearValue = e.clearStencilValue, o.stencilLoadOp = Me.Clear) : o.stencilLoadOp = Me.Load, o.stencilStoreOp = Nt.Store);
37699
+ e.depth && (e.clearDepth ? (o.depthClearValue = e.clearDepthValue, o.depthLoadOp = Ce.Clear) : o.depthLoadOp = Ce.Load, o.depthStoreOp = Nt.Store), e.stencil && (e.clearStencil ? (o.stencilClearValue = e.clearStencilValue, o.stencilLoadOp = Ce.Clear) : o.stencilLoadOp = Ce.Load, o.stencilStoreOp = Nt.Store);
37700
37700
  const l = s.createCommandEncoder({ label: "renderContext_" + e.id });
37701
37701
  if (this._isRenderCameraDepthArray(e) === !0) {
37702
37702
  const c = e.camera.cameras;
@@ -37755,7 +37755,7 @@ class C1 extends U0 {
37755
37755
  arrayLayerCount: 1
37756
37756
  })), l.depthStencilAttachment = {
37757
37757
  view: r.viewCache[c],
37758
- depthLoadOp: n.depthLoadOp || Me.Clear,
37758
+ depthLoadOp: n.depthLoadOp || Ce.Clear,
37759
37759
  depthStoreOp: n.depthStoreOp || Nt.Store,
37760
37760
  depthClearValue: n.depthClearValue || 1
37761
37761
  }, e.stencil && (l.depthStencilAttachment.stencilLoadOp = n.stencilLoadOp, l.depthStencilAttachment.stencilStoreOp = n.stencilStoreOp, l.depthStencilAttachment.stencilClearValue = n.stencilClearValue);
@@ -37778,7 +37778,7 @@ class C1 extends U0 {
37778
37778
  const n = t.layerDescriptors[i];
37779
37779
  if (n.depthStencilAttachment) {
37780
37780
  const r = n.depthStencilAttachment;
37781
- e.depth && (e.clearDepth ? (r.depthClearValue = e.clearDepthValue, r.depthLoadOp = Me.Clear) : r.depthLoadOp = Me.Load), e.stencil && (e.clearStencil ? (r.stencilClearValue = e.clearStencilValue, r.stencilLoadOp = Me.Clear) : r.stencilLoadOp = Me.Load);
37781
+ e.depth && (e.clearDepth ? (r.depthClearValue = e.clearDepthValue, r.depthLoadOp = Ce.Clear) : r.depthLoadOp = Ce.Load), e.stencil && (e.clearStencil ? (r.stencilClearValue = e.clearStencilValue, r.stencilLoadOp = Ce.Clear) : r.stencilLoadOp = Ce.Load);
37782
37782
  }
37783
37783
  }
37784
37784
  }
@@ -37908,20 +37908,20 @@ class C1 extends U0 {
37908
37908
  if (e) {
37909
37909
  o = f.colorAttachments;
37910
37910
  const m = o[0];
37911
- m.clearValue = c, m.loadOp = Me.Clear, m.storeOp = Nt.Store;
37911
+ m.clearValue = c, m.loadOp = Ce.Clear, m.storeOp = Nt.Store;
37912
37912
  }
37913
37913
  (h || u) && (l = f.depthStencilAttachment);
37914
37914
  } else {
37915
37915
  h = i.depth, u = i.stencil;
37916
37916
  const f = {
37917
- loadOp: e ? Me.Clear : Me.Load,
37917
+ loadOp: e ? Ce.Clear : Ce.Load,
37918
37918
  clearValue: e ? c : void 0
37919
37919
  };
37920
- h && (f.depthLoadOp = t ? Me.Clear : Me.Load, f.depthClearValue = t ? r.getClearDepth() : void 0, f.depthStoreOp = Nt.Store), u && (f.stencilLoadOp = s ? Me.Clear : Me.Load, f.stencilClearValue = s ? r.getClearStencil() : void 0, f.stencilStoreOp = Nt.Store);
37920
+ h && (f.depthLoadOp = t ? Ce.Clear : Ce.Load, f.depthClearValue = t ? r.getClearDepth() : void 0, f.depthStoreOp = Nt.Store), u && (f.stencilLoadOp = s ? Ce.Clear : Ce.Load, f.stencilClearValue = s ? r.getClearStencil() : void 0, f.stencilStoreOp = Nt.Store);
37921
37921
  const m = this._getRenderPassDescriptor(i, f);
37922
37922
  o = m.colorAttachments, l = m.depthStencilAttachment;
37923
37923
  }
37924
- h && l && l.depthLoadOp === void 0 && (t ? (l.depthLoadOp = Me.Clear, l.depthClearValue = r.getClearDepth(), l.depthStoreOp = Nt.Store) : (l.depthLoadOp = Me.Load, l.depthStoreOp = Nt.Store)), u && l && l.stencilLoadOp === void 0 && (s ? (l.stencilLoadOp = Me.Clear, l.stencilClearValue = r.getClearStencil(), l.stencilStoreOp = Nt.Store) : (l.stencilLoadOp = Me.Load, l.stencilStoreOp = Nt.Store));
37924
+ h && l && l.depthLoadOp === void 0 && (t ? (l.depthLoadOp = Ce.Clear, l.depthClearValue = r.getClearDepth(), l.depthStoreOp = Nt.Store) : (l.depthLoadOp = Ce.Load, l.depthStoreOp = Nt.Store)), u && l && l.stencilLoadOp === void 0 && (s ? (l.stencilLoadOp = Ce.Clear, l.stencilClearValue = r.getClearStencil(), l.stencilStoreOp = Nt.Store) : (l.stencilLoadOp = Ce.Load, l.stencilStoreOp = Nt.Store));
37925
37925
  const d = n.createCommandEncoder({ label: "clear" });
37926
37926
  d.beginRenderPass({
37927
37927
  colorAttachments: o,
@@ -38471,8 +38471,8 @@ class C1 extends U0 {
38471
38471
  ), i.currentPass) {
38472
38472
  const { descriptor: l } = i;
38473
38473
  for (let c = 0; c < l.colorAttachments.length; c++)
38474
- l.colorAttachments[c].loadOp = Me.Load;
38475
- if (t.depth && (l.depthStencilAttachment.depthLoadOp = Me.Load), t.stencil && (l.depthStencilAttachment.stencilLoadOp = Me.Load), i.currentPass = o.beginRenderPass(l), i.currentSets = { attributes: {}, bindingGroups: [], pipeline: null, index: null }, t.viewport && this.updateViewport(t), t.scissor) {
38474
+ l.colorAttachments[c].loadOp = Ce.Load;
38475
+ if (t.depth && (l.depthStencilAttachment.depthLoadOp = Ce.Load), t.stencil && (l.depthStencilAttachment.stencilLoadOp = Ce.Load), i.currentPass = o.beginRenderPass(l), i.currentSets = { attributes: {}, bindingGroups: [], pipeline: null, index: null }, t.viewport && this.updateViewport(t), t.scissor) {
38476
38476
  const { x: c, y: h, width: u, height: d } = t.scissorValue;
38477
38477
  i.currentPass.setScissorRect(c, h, u, d);
38478
38478
  }
@@ -38481,7 +38481,7 @@ class C1 extends U0 {
38481
38481
  e.generateMipmaps && this.textureUtils.generateMipmaps(e);
38482
38482
  }
38483
38483
  }
38484
- class M1 extends qt {
38484
+ class C1 extends qt {
38485
38485
  /**
38486
38486
  * Constructs a new mesh phong material.
38487
38487
  *
@@ -38498,7 +38498,7 @@ class M1 extends qt {
38498
38498
  return super.copy(e), this.color.copy(e.color), this.specular.copy(e.specular), this.shininess = e.shininess, this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.flatShading = e.flatShading, this.fog = e.fog, this;
38499
38499
  }
38500
38500
  }
38501
- const A1 = /* @__PURE__ */ new M1();
38501
+ const A1 = /* @__PURE__ */ new C1();
38502
38502
  class R1 extends nt {
38503
38503
  static get type() {
38504
38504
  return "MeshPhongNodeMaterial";
@@ -38610,7 +38610,7 @@ class V0 extends nt {
38610
38610
  setupVariants() {
38611
38611
  const e = this.metalnessNode ? O(this.metalnessNode) : AE;
38612
38612
  Nl.assign(e);
38613
- let t = this.roughnessNode ? O(this.roughnessNode) : ME;
38613
+ let t = this.roughnessNode ? O(this.roughnessNode) : CE;
38614
38614
  t = x0({ roughness: t }), si.assign(t), this.setupSpecular(), ve.assign(ne(ve.rgb.mul(e.oneMinus()), ve.a));
38615
38615
  }
38616
38616
  copy(e) {
@@ -38802,7 +38802,7 @@ class D1 extends V0 {
38802
38802
  */
38803
38803
  setupSpecular() {
38804
38804
  const e = this.iorNode ? O(this.iorNode) : VE;
38805
- al.assign(e), Jt.assign(Ve(Pr(My(al.sub(1).div(al.add(1))).mul(CE), B(1)).mul(hf), ve.rgb, Nl)), Fl.assign(Ve(hf, 1, Nl));
38805
+ al.assign(e), Jt.assign(Ve(Pr(Cy(al.sub(1).div(al.add(1))).mul(ME), B(1)).mul(hf), ve.rgb, Nl)), Fl.assign(Ve(hf, 1, Nl));
38806
38806
  }
38807
38807
  /**
38808
38808
  * Setups the lighting model.
@@ -39008,7 +39008,7 @@ class G1 extends nt {
39008
39008
  * @return {BasicLightingModel} The lighting model.
39009
39009
  */
39010
39010
  setupLightingModel() {
39011
- return new M0();
39011
+ return new C0();
39012
39012
  }
39013
39013
  }
39014
39014
  class V1 extends qt {
@@ -39539,7 +39539,7 @@ class Fd {
39539
39539
  return this.intensity !== 1 && (e.intensity = this.intensity), this.bias !== 0 && (e.bias = this.bias), this.normalBias !== 0 && (e.normalBias = this.normalBias), this.radius !== 1 && (e.radius = this.radius), (this.mapSize.x !== 512 || this.mapSize.y !== 512) && (e.mapSize = this.mapSize.toArray()), e.camera = this.camera.toJSON(!1).object, delete e.camera.matrix, e;
39540
39540
  }
39541
39541
  }
39542
- const Em = /* @__PURE__ */ new Le(), la = /* @__PURE__ */ new R(), Ch = /* @__PURE__ */ new R();
39542
+ const Em = /* @__PURE__ */ new Le(), la = /* @__PURE__ */ new R(), Mh = /* @__PURE__ */ new R();
39543
39543
  class uN extends Fd {
39544
39544
  /**
39545
39545
  * Constructs a new point light shadow.
@@ -39594,7 +39594,7 @@ class uN extends Fd {
39594
39594
  */
39595
39595
  updateMatrices(e, t = 0) {
39596
39596
  const s = this.camera, i = this.matrix, n = e.distance || s.far;
39597
- n !== s.far && (s.far = n, s.updateProjectionMatrix()), la.setFromMatrixPosition(e.matrixWorld), s.position.copy(la), Ch.copy(s.position), Ch.add(this._cubeDirections[t]), s.up.copy(this._cubeUps[t]), s.lookAt(Ch), s.updateMatrixWorld(), i.makeTranslation(-la.x, -la.y, -la.z), Em.multiplyMatrices(s.projectionMatrix, s.matrixWorldInverse), this._frustum.setFromProjectionMatrix(Em);
39597
+ n !== s.far && (s.far = n, s.updateProjectionMatrix()), la.setFromMatrixPosition(e.matrixWorld), s.position.copy(la), Mh.copy(s.position), Mh.add(this._cubeDirections[t]), s.up.copy(this._cubeUps[t]), s.lookAt(Mh), s.updateMatrixWorld(), i.makeTranslation(-la.x, -la.y, -la.z), Em.multiplyMatrices(s.projectionMatrix, s.matrixWorldInverse), this._frustum.setFromProjectionMatrix(Em);
39598
39598
  }
39599
39599
  }
39600
39600
  class dN extends Rn {
@@ -39693,7 +39693,7 @@ class gN extends Fd {
39693
39693
  super(new ss(50, 1, 0.5, 500)), this.isSpotLightShadow = !0, this.focus = 1, this.aspect = 1;
39694
39694
  }
39695
39695
  updateMatrices(e) {
39696
- const t = this.camera, s = Cr * 2 * e.angle * this.focus, i = this.mapSize.width / this.mapSize.height * this.aspect, n = e.distance || t.far;
39696
+ const t = this.camera, s = Mr * 2 * e.angle * this.focus, i = this.mapSize.width / this.mapSize.height * this.aspect, n = e.distance || t.far;
39697
39697
  (s !== t.fov || i !== t.aspect || n !== t.far) && (t.fov = s, t.aspect = i, t.far = n, t.updateProjectionMatrix()), super.updateMatrices(e);
39698
39698
  }
39699
39699
  copy(e) {
@@ -39996,7 +39996,7 @@ class vN extends P0 {
39996
39996
  * Constructs a new standard node library.
39997
39997
  */
39998
39998
  constructor() {
39999
- super(), this.addMaterial(R1, "MeshPhongMaterial"), this.addMaterial(V0, "MeshStandardMaterial"), this.addMaterial(D1, "MeshPhysicalMaterial"), this.addMaterial(U1, "MeshToonMaterial"), this.addMaterial(G1, "MeshBasicMaterial"), this.addMaterial($1, "MeshLambertMaterial"), this.addMaterial(q1, "MeshNormalMaterial"), this.addMaterial(Z1, "MeshMatcapMaterial"), this.addMaterial(Q1, "LineBasicMaterial"), this.addMaterial(tN, "LineDashedMaterial"), this.addMaterial(aN, "PointsMaterial"), this.addMaterial($0, "SpriteMaterial"), this.addMaterial(hN, "ShadowMaterial"), this.addLight(AM, dN), this.addLight(IA, fN), this.addLight(LA, mN), this.addLight(wd, Dd), this.addLight(GA, yN), this.addLight(VA, xN), this.addLight(HA, bN), this.addLight(UA, TN), this.addLight(zA, SN), this.addToneMapping(IC, Vb), this.addToneMapping(LC, Hb), this.addToneMapping(UC, $b), this.addToneMapping(zC, Wb), this.addToneMapping($C, jb), this.addToneMapping(WC, qb);
39999
+ super(), this.addMaterial(R1, "MeshPhongMaterial"), this.addMaterial(V0, "MeshStandardMaterial"), this.addMaterial(D1, "MeshPhysicalMaterial"), this.addMaterial(U1, "MeshToonMaterial"), this.addMaterial(G1, "MeshBasicMaterial"), this.addMaterial($1, "MeshLambertMaterial"), this.addMaterial(q1, "MeshNormalMaterial"), this.addMaterial(Z1, "MeshMatcapMaterial"), this.addMaterial(Q1, "LineBasicMaterial"), this.addMaterial(tN, "LineDashedMaterial"), this.addMaterial(aN, "PointsMaterial"), this.addMaterial($0, "SpriteMaterial"), this.addMaterial(hN, "ShadowMaterial"), this.addLight(AC, dN), this.addLight(IA, fN), this.addLight(LA, mN), this.addLight(wd, Dd), this.addLight(GA, yN), this.addLight(VA, xN), this.addLight(HA, bN), this.addLight(UA, TN), this.addLight(zA, SN), this.addToneMapping(IM, Vb), this.addToneMapping(LM, Hb), this.addToneMapping(UM, $b), this.addToneMapping(zM, Wb), this.addToneMapping($M, jb), this.addToneMapping(WM, qb);
40000
40000
  }
40001
40001
  }
40002
40002
  class $o extends NR {
@@ -40023,7 +40023,7 @@ class $o extends NR {
40023
40023
  */
40024
40024
  constructor(e = {}) {
40025
40025
  let t;
40026
- e.forceWebGL ? t = mm : (t = C1, e.getFallback = () => (console.warn("THREE.WebGPURenderer: WebGPU is not available, running under WebGL2 backend."), new mm(e)));
40026
+ e.forceWebGL ? t = mm : (t = M1, e.getFallback = () => (console.warn("THREE.WebGPURenderer: WebGPU is not available, running under WebGL2 backend."), new mm(e)));
40027
40027
  const s = new t(e);
40028
40028
  super(s, e), this.library = new vN(), this.isWebGPURenderer = !0, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
40029
40029
  }
@@ -40062,7 +40062,7 @@ class wN extends Us {
40062
40062
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
40063
40063
  }
40064
40064
  }
40065
- const Cm = { type: "change" }, Od = { type: "start" }, W0 = { type: "end" }, Wo = new Bx(), Mm = new Ix(), EN = Math.cos(70 * Lx.DEG2RAD), ct = new Z(), Gt = 2 * Math.PI, De = {
40065
+ const Mm = { type: "change" }, Od = { type: "start" }, W0 = { type: "end" }, Wo = new Bx(), Cm = new Ix(), EN = Math.cos(70 * Lx.DEG2RAD), ct = new Z(), Gt = 2 * Math.PI, De = {
40066
40066
  NONE: -1,
40067
40067
  ROTATE: 0,
40068
40068
  DOLLY: 1,
@@ -40071,8 +40071,8 @@ const Cm = { type: "change" }, Od = { type: "start" }, W0 = { type: "end" }, Wo
40071
40071
  TOUCH_PAN: 4,
40072
40072
  TOUCH_DOLLY_PAN: 5,
40073
40073
  TOUCH_DOLLY_ROTATE: 6
40074
- }, Mh = 1e-6;
40075
- class CN extends ag {
40074
+ }, Ch = 1e-6;
40075
+ class MN extends ag {
40076
40076
  /**
40077
40077
  * Constructs a new controls instance.
40078
40078
  *
@@ -40080,7 +40080,7 @@ class CN extends ag {
40080
40080
  * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
40081
40081
  */
40082
40082
  constructor(e, t = null) {
40083
- super(e, t), this.state = De.NONE, this.target = new Z(), this.cursor = new Z(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: mr.ROTATE, MIDDLE: mr.DOLLY, RIGHT: mr.PAN }, this.touches = { ONE: lr.ROTATE, TWO: lr.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new Z(), this._lastQuaternion = new es(), this._lastTargetPosition = new Z(), this._quat = new es().setFromUnitVectors(e.up, new Z(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Vh(), this._sphericalDelta = new Vh(), this._scale = 1, this._panOffset = new Z(), this._rotateStart = new xt(), this._rotateEnd = new xt(), this._rotateDelta = new xt(), this._panStart = new xt(), this._panEnd = new xt(), this._panDelta = new xt(), this._dollyStart = new xt(), this._dollyEnd = new xt(), this._dollyDelta = new xt(), this._dollyDirection = new Z(), this._mouse = new xt(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = AN.bind(this), this._onPointerDown = MN.bind(this), this._onPointerUp = RN.bind(this), this._onContextMenu = IN.bind(this), this._onMouseWheel = FN.bind(this), this._onKeyDown = DN.bind(this), this._onTouchStart = ON.bind(this), this._onTouchMove = BN.bind(this), this._onMouseDown = NN.bind(this), this._onMouseMove = PN.bind(this), this._interceptControlDown = LN.bind(this), this._interceptControlUp = UN.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
40083
+ super(e, t), this.state = De.NONE, this.target = new Z(), this.cursor = new Z(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: mr.ROTATE, MIDDLE: mr.DOLLY, RIGHT: mr.PAN }, this.touches = { ONE: lr.ROTATE, TWO: lr.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new Z(), this._lastQuaternion = new es(), this._lastTargetPosition = new Z(), this._quat = new es().setFromUnitVectors(e.up, new Z(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Vh(), this._sphericalDelta = new Vh(), this._scale = 1, this._panOffset = new Z(), this._rotateStart = new xt(), this._rotateEnd = new xt(), this._rotateDelta = new xt(), this._panStart = new xt(), this._panEnd = new xt(), this._panDelta = new xt(), this._dollyStart = new xt(), this._dollyEnd = new xt(), this._dollyDelta = new xt(), this._dollyDirection = new Z(), this._mouse = new xt(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = AN.bind(this), this._onPointerDown = CN.bind(this), this._onPointerUp = RN.bind(this), this._onContextMenu = IN.bind(this), this._onMouseWheel = FN.bind(this), this._onKeyDown = DN.bind(this), this._onTouchStart = ON.bind(this), this._onTouchMove = BN.bind(this), this._onMouseDown = NN.bind(this), this._onMouseMove = PN.bind(this), this._interceptControlDown = LN.bind(this), this._interceptControlUp = UN.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
40084
40084
  }
40085
40085
  connect(e) {
40086
40086
  super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -40141,7 +40141,7 @@ class CN extends ag {
40141
40141
  * was called, or the initial state.
40142
40142
  */
40143
40143
  reset() {
40144
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Cm), this.update(), this.state = De.NONE;
40144
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Mm), this.update(), this.state = De.NONE;
40145
40145
  }
40146
40146
  update(e = null) {
40147
40147
  const t = this.object.position;
@@ -40171,12 +40171,12 @@ class CN extends ag {
40171
40171
  c.unproject(this.object), this.object.position.sub(c).add(o), this.object.updateMatrixWorld(), r = ct.length();
40172
40172
  } else
40173
40173
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
40174
- r !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position) : (Wo.origin.copy(this.object.position), Wo.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Wo.direction)) < EN ? this.object.lookAt(this.target) : (Mm.setFromNormalAndCoplanarPoint(this.object.up, this.target), Wo.intersectPlane(Mm, this.target))));
40174
+ r !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position) : (Wo.origin.copy(this.object.position), Wo.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Wo.direction)) < EN ? this.object.lookAt(this.target) : (Cm.setFromNormalAndCoplanarPoint(this.object.up, this.target), Wo.intersectPlane(Cm, this.target))));
40175
40175
  } else if (this.object.isOrthographicCamera) {
40176
40176
  const r = this.object.zoom;
40177
40177
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), r !== this.object.zoom && (this.object.updateProjectionMatrix(), n = !0);
40178
40178
  }
40179
- return this._scale = 1, this._performCursorZoom = !1, n || this._lastPosition.distanceToSquared(this.object.position) > Mh || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Mh || this._lastTargetPosition.distanceToSquared(this.target) > Mh ? (this.dispatchEvent(Cm), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
40179
+ return this._scale = 1, this._performCursorZoom = !1, n || this._lastPosition.distanceToSquared(this.object.position) > Ch || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Ch || this._lastTargetPosition.distanceToSquared(this.target) > Ch ? (this.dispatchEvent(Mm), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
40180
40180
  }
40181
40181
  _getAutoRotationAngle(e) {
40182
40182
  return e !== null ? Gt / 60 * this.autoRotateSpeed * e : Gt / 60 / 60 * this.autoRotateSpeed;
@@ -40368,7 +40368,7 @@ class CN extends ag {
40368
40368
  return e.ctrlKey && !this._controlActive && (s.deltaY *= 10), s;
40369
40369
  }
40370
40370
  }
40371
- function MN(a) {
40371
+ function CN(a) {
40372
40372
  this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(a.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(a) && (this._addPointer(a), a.pointerType === "touch" ? this._onTouchStart(a) : this._onMouseDown(a)));
40373
40373
  }
40374
40374
  function AN(a) {
@@ -41892,9 +41892,9 @@ const Bl = (a) => {
41892
41892
  }, i = (r) => {
41893
41893
  r !== e && (a.onSelect(r), t(r)), a.onToggle(!1);
41894
41894
  }, n = a.open ? `${a.options.length * 31 - 1}px` : "0px";
41895
- return /* @__PURE__ */ C.jsxs("div", { className: `dropdown ${a.up === !0 ? "up" : ""}`, children: [
41896
- /* @__PURE__ */ C.jsx("div", { className: "dropdown-toggle", onClick: s, children: `${a.title}: ${e}` }),
41897
- /* @__PURE__ */ C.jsx("ul", { className: "dropdown-menu", style: { height: n }, children: a.options.map((r) => /* @__PURE__ */ C.jsx("li", { onClick: () => i(r), children: r }, r)) })
41895
+ return /* @__PURE__ */ M.jsxs("div", { className: `dropdown ${a.up === !0 ? "up" : ""}`, children: [
41896
+ /* @__PURE__ */ M.jsx("div", { className: "dropdown-toggle", onClick: s, children: `${a.title}: ${e}` }),
41897
+ /* @__PURE__ */ M.jsx("ul", { className: "dropdown-menu", style: { height: n }, children: a.options.map((r) => /* @__PURE__ */ M.jsx("li", { onClick: () => i(r), children: r }, r)) })
41898
41898
  ] });
41899
41899
  }, an = bx(function(e, t) {
41900
41900
  const s = [
@@ -41904,12 +41904,12 @@ const Bl = (a) => {
41904
41904
  "UVs",
41905
41905
  "Wireframe"
41906
41906
  ], [i, n] = Ae("Renderer"), [r, o] = Ae(!1), [l, c] = Ae(!1), [h, u] = Ae(!1);
41907
- return /* @__PURE__ */ C.jsxs("div", { className: `CameraWindow ${e.name}`, children: [
41908
- /* @__PURE__ */ C.jsx("div", { ref: t, className: "clickable", onClick: () => {
41907
+ return /* @__PURE__ */ M.jsxs("div", { className: `CameraWindow ${e.name}`, children: [
41908
+ /* @__PURE__ */ M.jsx("div", { ref: t, className: "clickable", onClick: () => {
41909
41909
  h && u(!1);
41910
41910
  } }),
41911
- /* @__PURE__ */ C.jsxs("div", { className: "options", children: [
41912
- e.camera !== null && /* @__PURE__ */ C.jsx(
41911
+ /* @__PURE__ */ M.jsxs("div", { className: "options", children: [
41912
+ e.camera !== null && /* @__PURE__ */ M.jsx(
41913
41913
  Bl,
41914
41914
  {
41915
41915
  title: "Camera",
@@ -41923,7 +41923,7 @@ const Bl = (a) => {
41923
41923
  up: !0
41924
41924
  }
41925
41925
  ),
41926
- /* @__PURE__ */ C.jsx(
41926
+ /* @__PURE__ */ M.jsx(
41927
41927
  Bl,
41928
41928
  {
41929
41929
  title: "Mode",
@@ -42069,7 +42069,7 @@ class WN extends Y {
42069
42069
  }
42070
42070
  function Bh(a) {
42071
42071
  const [e, t] = Ae(a.selected), s = "toggle" + (e ? " selected" : "");
42072
- return /* @__PURE__ */ C.jsx(
42072
+ return /* @__PURE__ */ M.jsx(
42073
42073
  "button",
42074
42074
  {
42075
42075
  className: s,
@@ -42607,8 +42607,8 @@ class sP extends Er {
42607
42607
  const Ee = new Er();
42608
42608
  for (const de in X)
42609
42609
  for (let ye = X[de].length; ye--; ) {
42610
- const se = X[de][ye][0].clone(), Ce = X[de][ye][1], Ge = X[de][ye][2], ot = X[de][ye][3], Te = X[de][ye][4];
42611
- se.name = de, se.tag = Te, Ce && se.position.set(Ce[0], Ce[1], Ce[2]), Ge && se.rotation.set(Ge[0], Ge[1], Ge[2]), ot && se.scale.set(ot[0], ot[1], ot[2]), se.updateMatrix();
42610
+ const se = X[de][ye][0].clone(), Me = X[de][ye][1], Ge = X[de][ye][2], ot = X[de][ye][3], Te = X[de][ye][4];
42611
+ se.name = de, se.tag = Te, Me && se.position.set(Me[0], Me[1], Me[2]), Ge && se.rotation.set(Ge[0], Ge[1], Ge[2]), ot && se.scale.set(ot[0], ot[1], ot[2]), se.updateMatrix();
42612
42612
  const lt = se.geometry.clone();
42613
42613
  lt.applyMatrix4(se.matrix), se.geometry = lt, se.renderOrder = 1 / 0, se.position.set(0, 0, 0), se.rotation.set(0, 0, 0), se.scale.set(1, 1, 1), Ee.add(se);
42614
42614
  }
@@ -42824,13 +42824,13 @@ class kh extends Er {
42824
42824
  };
42825
42825
  addNextPt = () => {
42826
42826
  const e = this.draggable.children.length, t = e > 1 ? this.draggable.children[e - 1].position.clone() : new Z(), s = this.addPoint(t);
42827
- this.group.current?.setField("Current Point", s.position);
42827
+ this.updateField(s.position);
42828
42828
  };
42829
42829
  removePoint = (e) => {
42830
42830
  if (this._transform?.object === e) {
42831
42831
  this._transform?.detach();
42832
42832
  const t = this.draggable.children[this.draggable.children.length - 1];
42833
- this._transform?.attach(t), this.group.current?.setField("Current Point", t.position);
42833
+ this._transform?.attach(t), this.updateField(t.position);
42834
42834
  }
42835
42835
  di(e), this.updateSpline();
42836
42836
  };
@@ -42848,6 +42848,9 @@ class kh extends Er {
42848
42848
  updateSpline = () => {
42849
42849
  this.points.length < 2 || (this.curve = new ep(this.points, this.closed, this.curveType, this.tension), this.line.geometry.dispose(), this.line.geometry = new zi().setFromPoints(this.curve.getPoints(this.subdivide)), this.curvePos.position.copy(this.getPointAt(this._curvePercentage)));
42850
42850
  };
42851
+ updateField(e) {
42852
+ this.group.current?.setField("Current Point", e);
42853
+ }
42851
42854
  // Handlers
42852
42855
  onMouseClick = (e) => {
42853
42856
  if (!ut.instance || !ut.instance.currentWindow || this._transform && !this._transform.getHelper().visible) return;
@@ -42856,7 +42859,7 @@ class kh extends Er {
42856
42859
  const i = this.raycaster.intersectObjects(this.draggable.children, !1);
42857
42860
  if (i.length > 0) {
42858
42861
  const n = i[0].object;
42859
- n !== this._transform?.object && (this._transform?.attach(n), this.group.current?.setField("Current Point", n.position));
42862
+ n !== this._transform?.object && (this._transform?.attach(n), this.updateField(n.position));
42860
42863
  }
42861
42864
  };
42862
42865
  // Getters
@@ -42897,19 +42900,19 @@ class kh extends Er {
42897
42900
  updateCurrentPoint() {
42898
42901
  if (this._transform?.object && this.group) {
42899
42902
  const e = this._transform?.object;
42900
- e.name.search("point") > -1 && this.group.current?.setField("Current Point", e.position);
42903
+ e.name.search("point") > -1 && this.updateField(e.position);
42901
42904
  }
42902
42905
  }
42903
42906
  onUpdateTransform = () => {
42904
42907
  this.updateCurrentPoint(), this.updateSpline();
42905
42908
  };
42906
- initDebug(e) {
42907
- const t = this.draggable.children;
42908
- this.parentGroup = e, this._transform = _t.instance.add(this.name), this._transform.camera = this._camera, this._transform.addEventListener("objectChange", this.onUpdateTransform), t.length > 0 && this._transform.attach(t[t.length - 1]), ut.instance?.helpersContainer.add(this._transform.getHelper());
42909
- const s = t.length > 0 ? t[t.length - 1].position : { x: 0, y: 0, z: 0 };
42909
+ initDebug(e, t) {
42910
+ const s = this.draggable.children;
42911
+ this.visible = t, this.parentGroup = e, this._transform = _t.instance.add(this.name), this._transform.camera = this._camera, this._transform.addEventListener("objectChange", this.onUpdateTransform), s.length > 0 && this._transform.attach(s[s.length - 1]), ut.instance?.helpersContainer.add(this._transform.getHelper());
42912
+ const i = s.length > 0 ? s[s.length - 1].position : { x: 0, y: 0, z: 0 };
42910
42913
  this.group = e.addGroup({
42911
42914
  title: this.name,
42912
- expanded: !0,
42915
+ expanded: t,
42913
42916
  items: [
42914
42917
  {
42915
42918
  prop: "Closed",
@@ -43016,43 +43019,43 @@ class kh extends Er {
43016
43019
  {
43017
43020
  prop: "Current Point",
43018
43021
  type: "grid3",
43019
- value: s
43022
+ value: i
43020
43023
  }
43021
43024
  ],
43022
- onUpdate: (i, n) => {
43023
- switch (i) {
43025
+ onUpdate: (n, r) => {
43026
+ switch (n) {
43024
43027
  case "Closed":
43025
- this.closed = n, this.updateSpline();
43028
+ this.closed = r, this.updateSpline();
43026
43029
  break;
43027
43030
  case "Visible":
43028
- this.visible = n;
43031
+ this.visible = r;
43029
43032
  break;
43030
43033
  case "Color":
43031
- this.lineMaterial.color.setStyle(n), this.draggedMat.color.setStyle(n);
43034
+ this.lineMaterial.color.setStyle(r), this.draggedMat.color.setStyle(r);
43032
43035
  break;
43033
43036
  case "Curve":
43034
- this.curveType = n, this.updateSpline();
43037
+ this.curveType = r, this.updateSpline();
43035
43038
  break;
43036
43039
  case "Draggable Scale":
43037
- this.draggableScale = n;
43040
+ this.draggableScale = r;
43038
43041
  break;
43039
43042
  case "Subdivide":
43040
- this.subdivide = n, this.updateSpline();
43043
+ this.subdivide = r, this.updateSpline();
43041
43044
  break;
43042
43045
  case "Tension":
43043
- this.tension = n, this.updateSpline();
43046
+ this.tension = r, this.updateSpline();
43044
43047
  break;
43045
43048
  case "New Pt Offset":
43046
- this.offset = n;
43049
+ this.offset = r;
43047
43050
  break;
43048
43051
  case "Curve At":
43049
- this.curvePos.position.copy(this.getPointAt(n));
43052
+ this.curvePos.position.copy(this.getPointAt(r));
43050
43053
  break;
43051
43054
  case "Show Position":
43052
- this.curvePos.visible = n;
43055
+ this.curvePos.visible = r;
43053
43056
  break;
43054
43057
  case "Show Points":
43055
- this.draggable.visible = n;
43058
+ this.draggable.visible = r;
43056
43059
  break;
43057
43060
  case "Toggle Transform":
43058
43061
  this._transform && (this._transform.getHelper().visible = !this._transform.getHelper().visible);
@@ -43071,14 +43074,14 @@ class kh extends Er {
43071
43074
  break;
43072
43075
  case "Current Point":
43073
43076
  if (this.group.current && this._transform?.object) {
43074
- const r = this._transform?.object;
43075
- r.name.search("point") > -1 && (r.position.copy(n), this.updateSpline());
43077
+ const o = this._transform?.object;
43078
+ o.name.search("point") > -1 && (o.position.copy(r), this.updateSpline());
43076
43079
  }
43077
43080
  break;
43078
43081
  }
43079
43082
  }
43080
- }), this.draggable.children.forEach((i) => {
43081
- this.debugPoint(i);
43083
+ }), this.draggable.children.forEach((n) => {
43084
+ this.debugPoint(n);
43082
43085
  });
43083
43086
  }
43084
43087
  debugPoint = (e) => {
@@ -43168,12 +43171,12 @@ class rP extends Er {
43168
43171
  dispose() {
43169
43172
  this.three.removeEventListener(ce.ADD_SPLINE, this.onAddSpline), _e.removeEditorGroup(this.name);
43170
43173
  }
43171
- addSpline(e) {
43172
- e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current), this.add(e), this.currentSpline = e;
43174
+ addSpline(e, t) {
43175
+ e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current, t), this.add(e), this.currentSpline = e;
43173
43176
  }
43174
43177
  createSpline = (e = []) => {
43175
43178
  const t = `Spline ${Jo + 1}`, s = new kh(t, this._camera);
43176
- return s.addPoints(e), this.addSpline(s), Jo++, s;
43179
+ return s.addPoints(e), this.addSpline(s, !0), Jo++, s;
43177
43180
  };
43178
43181
  createSplineFromArray = (e) => {
43179
43182
  const t = [];
@@ -43188,7 +43191,7 @@ class rP extends Er {
43188
43191
  t.push(new Z(i[0], i[1], i[2]));
43189
43192
  });
43190
43193
  const s = new kh(e.name, this._camera);
43191
- return s.closed = e.closed, s.subdivide = e.subdivide, s.tension = e.tension, s.type = e.type, s.addPoints(t), s.updateSpline(), this.addSpline(s), s;
43194
+ return s.closed = e.closed, s.subdivide = e.subdivide, s.tension = e.tension, s.type = e.type, s.addPoints(t), s.updateSpline(), this.addSpline(s, !1), s;
43192
43195
  };
43193
43196
  showPoints = (e = !0) => {
43194
43197
  this.children.forEach((t) => {
@@ -43201,7 +43204,7 @@ class rP extends Er {
43201
43204
  const n = [];
43202
43205
  t.points.forEach((r) => {
43203
43206
  n.push(new Z(r[0], r[1], r[2]));
43204
- }), i.addPoints(n), this.addSpline(i), Jo++;
43207
+ }), i.addPoints(n), this.addSpline(i, !1), Jo++;
43205
43208
  };
43206
43209
  isMouseDown = !1;
43207
43210
  enableClickToDraw() {
@@ -43238,7 +43241,7 @@ class rP extends Er {
43238
43241
  onMouseMove = (e) => {
43239
43242
  if (!this.isMouseDown) return;
43240
43243
  const s = e.target.getBoundingClientRect(), i = (e.clientX - s.left) / s.width * 2 - 1, n = -((e.clientY - s.top) / s.height) * 2 + 1, r = this.mouseToSplinePos(i, n, s.width, s.height);
43241
- this.currentSpline?.updateLastPoint(r);
43244
+ this.currentSpline?.updateLastPoint(r), this.currentSpline?.updateField(r);
43242
43245
  };
43243
43246
  onMouseUp = () => {
43244
43247
  this.isMouseDown = !1;
@@ -43389,10 +43392,10 @@ class ut extends qa {
43389
43392
  const e = [];
43390
43393
  return this.cameras.forEach((t, s) => {
43391
43394
  e.push(s);
43392
- }), /* @__PURE__ */ C.jsxs("div", { className: "multiview", children: [
43393
- /* @__PURE__ */ C.jsx("canvas", { ref: this.canvasRef }),
43394
- /* @__PURE__ */ C.jsxs("div", { className: `cameras ${this.state.mode === "Single" || this.state.mode === "Stacked" ? "single" : ""}`, ref: this.containerRef, children: [
43395
- this.state.mode === "Single" && /* @__PURE__ */ C.jsx(C.Fragment, { children: /* @__PURE__ */ C.jsx(
43395
+ }), /* @__PURE__ */ M.jsxs("div", { className: "multiview", children: [
43396
+ /* @__PURE__ */ M.jsx("canvas", { ref: this.canvasRef }),
43397
+ /* @__PURE__ */ M.jsxs("div", { className: `cameras ${this.state.mode === "Single" || this.state.mode === "Stacked" ? "single" : ""}`, ref: this.containerRef, children: [
43398
+ this.state.mode === "Single" && /* @__PURE__ */ M.jsx(M.Fragment, { children: /* @__PURE__ */ M.jsx(
43396
43399
  an,
43397
43400
  {
43398
43401
  name: "tl",
@@ -43409,8 +43412,8 @@ class ut extends qa {
43409
43412
  }
43410
43413
  }
43411
43414
  ) }),
43412
- (this.state.mode === "Side by Side" || this.state.mode === "Stacked") && /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
43413
- /* @__PURE__ */ C.jsx(
43415
+ (this.state.mode === "Side by Side" || this.state.mode === "Stacked") && /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
43416
+ /* @__PURE__ */ M.jsx(
43414
43417
  an,
43415
43418
  {
43416
43419
  name: "tl",
@@ -43427,7 +43430,7 @@ class ut extends qa {
43427
43430
  }
43428
43431
  }
43429
43432
  ),
43430
- /* @__PURE__ */ C.jsx(
43433
+ /* @__PURE__ */ M.jsx(
43431
43434
  an,
43432
43435
  {
43433
43436
  name: "tr",
@@ -43445,8 +43448,8 @@ class ut extends qa {
43445
43448
  }
43446
43449
  )
43447
43450
  ] }),
43448
- this.state.mode === "Quad" && /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
43449
- /* @__PURE__ */ C.jsx(
43451
+ this.state.mode === "Quad" && /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
43452
+ /* @__PURE__ */ M.jsx(
43450
43453
  an,
43451
43454
  {
43452
43455
  name: "tl",
@@ -43463,7 +43466,7 @@ class ut extends qa {
43463
43466
  }
43464
43467
  }
43465
43468
  ),
43466
- /* @__PURE__ */ C.jsx(
43469
+ /* @__PURE__ */ M.jsx(
43467
43470
  an,
43468
43471
  {
43469
43472
  name: "tr",
@@ -43480,7 +43483,7 @@ class ut extends qa {
43480
43483
  }
43481
43484
  }
43482
43485
  ),
43483
- /* @__PURE__ */ C.jsx(
43486
+ /* @__PURE__ */ M.jsx(
43484
43487
  an,
43485
43488
  {
43486
43489
  name: "bl",
@@ -43497,7 +43500,7 @@ class ut extends qa {
43497
43500
  }
43498
43501
  }
43499
43502
  ),
43500
- /* @__PURE__ */ C.jsx(
43503
+ /* @__PURE__ */ M.jsx(
43501
43504
  an,
43502
43505
  {
43503
43506
  name: "br",
@@ -43516,8 +43519,8 @@ class ut extends qa {
43516
43519
  )
43517
43520
  ] })
43518
43521
  ] }),
43519
- /* @__PURE__ */ C.jsxs("div", { className: "settings", children: [
43520
- /* @__PURE__ */ C.jsx(
43522
+ /* @__PURE__ */ M.jsxs("div", { className: "settings", children: [
43523
+ /* @__PURE__ */ M.jsx(
43521
43524
  Bl,
43522
43525
  {
43523
43526
  title: "View",
@@ -43536,7 +43539,7 @@ class ut extends qa {
43536
43539
  }
43537
43540
  }
43538
43541
  ),
43539
- /* @__PURE__ */ C.jsx(
43542
+ /* @__PURE__ */ M.jsx(
43540
43543
  Bl,
43541
43544
  {
43542
43545
  title: "Interact",
@@ -43558,7 +43561,7 @@ class ut extends qa {
43558
43561
  }
43559
43562
  }
43560
43563
  ),
43561
- /* @__PURE__ */ C.jsx(
43564
+ /* @__PURE__ */ M.jsx(
43562
43565
  Bh,
43563
43566
  {
43564
43567
  name: "cameraHelper",
@@ -43576,7 +43579,7 @@ class ut extends qa {
43576
43579
  }
43577
43580
  }
43578
43581
  ),
43579
- /* @__PURE__ */ C.jsx(
43582
+ /* @__PURE__ */ M.jsx(
43580
43583
  Bh,
43581
43584
  {
43582
43585
  name: "lightHelper",
@@ -43594,7 +43597,7 @@ class ut extends qa {
43594
43597
  }
43595
43598
  }
43596
43599
  ),
43597
- /* @__PURE__ */ C.jsx(
43600
+ /* @__PURE__ */ M.jsx(
43598
43601
  Bh,
43599
43602
  {
43600
43603
  name: "gridHelper",
@@ -43881,7 +43884,7 @@ class ut extends qa {
43881
43884
  createControls(e, t) {
43882
43885
  const s = this.controls.get(e.name);
43883
43886
  if (s !== void 0 && s.dispose(), this.controls.delete(e.name), e.name === "UI") return;
43884
- const i = new CN(e, t);
43887
+ const i = new MN(e, t);
43885
43888
  switch (i.enableDamping = !0, i.dampingFactor = 0.1, e.name) {
43886
43889
  case "Top":
43887
43890
  case "Bottom":
@@ -44051,7 +44054,7 @@ class ac extends qa {
44051
44054
  }
44052
44055
  }
44053
44056
  render() {
44054
- return /* @__PURE__ */ C.jsx(
44057
+ return /* @__PURE__ */ M.jsx(
44055
44058
  ms,
44056
44059
  {
44057
44060
  three: this.props.three,
@@ -44176,7 +44179,7 @@ function cP(a, e) {
44176
44179
  }
44177
44180
  }));
44178
44181
  }
44179
- return /* @__PURE__ */ C.jsx(
44182
+ return /* @__PURE__ */ M.jsx(
44180
44183
  ms,
44181
44184
  {
44182
44185
  three: e,
@@ -44266,7 +44269,7 @@ function hP(a) {
44266
44269
  }
44267
44270
  return wn(() => () => {
44268
44271
  h !== void 0 && di(h);
44269
- }, []), /* @__PURE__ */ C.jsx(
44272
+ }, []), /* @__PURE__ */ M.jsx(
44270
44273
  ms,
44271
44274
  {
44272
44275
  three: a.three,
@@ -44306,17 +44309,17 @@ function uP(a) {
44306
44309
  };
44307
44310
  }, []);
44308
44311
  const s = e.type.toLowerCase(), i = e.animations.length > 0 || e.mixer !== void 0, n = s.search("mesh") > -1 || s.search("line") > -1 || s.search("points") > -1;
44309
- return /* @__PURE__ */ C.jsx(
44310
- Ma,
44312
+ return /* @__PURE__ */ M.jsx(
44313
+ Ca,
44311
44314
  {
44312
44315
  three: a.three,
44313
44316
  label: "Inspector",
44314
- button: e.uuid.length > 0 ? /* @__PURE__ */ C.jsx("button", { className: "remove", onClick: () => {
44317
+ button: e.uuid.length > 0 ? /* @__PURE__ */ M.jsx("button", { className: "remove", onClick: () => {
44315
44318
  _t.instance.remove(e.name), t(zh);
44316
44319
  } }) : void 0,
44317
- children: /* @__PURE__ */ C.jsx("div", { id: "Inspector", className: a.class, children: e.uuid.length > 0 && /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
44318
- /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
44319
- /* @__PURE__ */ C.jsx(
44320
+ children: /* @__PURE__ */ M.jsx("div", { id: "Inspector", className: a.class, children: e.uuid.length > 0 && /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
44321
+ /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
44322
+ /* @__PURE__ */ M.jsx(
44320
44323
  el,
44321
44324
  {
44322
44325
  type: "string",
@@ -44326,7 +44329,7 @@ function uP(a) {
44326
44329
  disabled: !0
44327
44330
  }
44328
44331
  ),
44329
- /* @__PURE__ */ C.jsx(
44332
+ /* @__PURE__ */ M.jsx(
44330
44333
  el,
44331
44334
  {
44332
44335
  type: "string",
@@ -44336,7 +44339,7 @@ function uP(a) {
44336
44339
  disabled: !0
44337
44340
  }
44338
44341
  ),
44339
- /* @__PURE__ */ C.jsx(
44342
+ /* @__PURE__ */ M.jsx(
44340
44343
  el,
44341
44344
  {
44342
44345
  type: "string",
@@ -44347,9 +44350,9 @@ function uP(a) {
44347
44350
  }
44348
44351
  )
44349
44352
  ] }),
44350
- /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
44351
- /* @__PURE__ */ C.jsx(ac, { object: e, three: a.three }),
44352
- i ? /* @__PURE__ */ C.jsx(hP, { object: e, three: a.three }) : null,
44353
+ /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
44354
+ /* @__PURE__ */ M.jsx(ac, { object: e, three: a.three }),
44355
+ i ? /* @__PURE__ */ M.jsx(hP, { object: e, three: a.three }) : null,
44353
44356
  s.search("camera") > -1 ? Pb(e, a.three) : null,
44354
44357
  s.search("light") > -1 ? cP(e, a.three) : null,
44355
44358
  n ? Ab(e, a.three) : null
@@ -44414,7 +44417,7 @@ class dP extends qa {
44414
44417
  }));
44415
44418
  }
44416
44419
  };
44417
- return /* @__PURE__ */ C.jsx(
44420
+ return /* @__PURE__ */ M.jsx(
44418
44421
  ms,
44419
44422
  {
44420
44423
  three: this.props.three,
@@ -44595,8 +44598,8 @@ function pP(a) {
44595
44598
  const [e] = Ae([]), [t] = Ae([]), [s, i] = Ae(0), n = (c) => {
44596
44599
  const h = c.value;
44597
44600
  e.push(h), t.push(
44598
- /* @__PURE__ */ C.jsx(
44599
- Ma,
44601
+ /* @__PURE__ */ M.jsx(
44602
+ Ca,
44600
44603
  {
44601
44604
  three: a.three,
44602
44605
  label: `Scene: ${h.name}`,
@@ -44606,7 +44609,7 @@ function pP(a) {
44606
44609
  onRefresh: () => {
44607
44610
  a.three.refreshScene(h.name);
44608
44611
  },
44609
- children: /* @__PURE__ */ C.jsx(yc, { child: h, scene: h, three: a.three })
44612
+ children: /* @__PURE__ */ M.jsx(yc, { child: h, scene: h, three: a.three })
44610
44613
  },
44611
44614
  h.name
44612
44615
  )
@@ -44615,8 +44618,8 @@ function pP(a) {
44615
44618
  const h = c.value;
44616
44619
  for (let u = 0; u < e.length; u++)
44617
44620
  if (h.uuid === e[u].uuid) {
44618
- e[u] = h, t[u] = /* @__PURE__ */ C.jsx(
44619
- Ma,
44621
+ e[u] = h, t[u] = /* @__PURE__ */ M.jsx(
44622
+ Ca,
44620
44623
  {
44621
44624
  three: a.three,
44622
44625
  label: `Scene: ${h.name}`,
@@ -44626,7 +44629,7 @@ function pP(a) {
44626
44629
  onRefresh: () => {
44627
44630
  a.three.refreshScene(h.name);
44628
44631
  },
44629
- children: /* @__PURE__ */ C.jsx(yc, { child: h, scene: h, three: a.three })
44632
+ children: /* @__PURE__ */ M.jsx(yc, { child: h, scene: h, three: a.three })
44630
44633
  },
44631
44634
  h.name
44632
44635
  ), i(Date.now());
@@ -44644,8 +44647,8 @@ function pP(a) {
44644
44647
  for (let u = 0; u < e.length; u++) {
44645
44648
  const d = e[u];
44646
44649
  if (d.name === h) {
44647
- t[u] = /* @__PURE__ */ C.jsx(
44648
- Ma,
44650
+ t[u] = /* @__PURE__ */ M.jsx(
44651
+ Ca,
44649
44652
  {
44650
44653
  three: a.three,
44651
44654
  label: `Scene: ${d.name}`,
@@ -44655,7 +44658,7 @@ function pP(a) {
44655
44658
  onRefresh: () => {
44656
44659
  a.three.refreshScene(d.name);
44657
44660
  },
44658
- children: /* @__PURE__ */ C.jsx(yc, { child: d, scene: d, three: a.three })
44661
+ children: /* @__PURE__ */ M.jsx(yc, { child: d, scene: d, three: a.three })
44659
44662
  },
44660
44663
  d.name
44661
44664
  );
@@ -44666,23 +44669,23 @@ function pP(a) {
44666
44669
  };
44667
44670
  return wn(() => (a.three.addEventListener(ce.ADD_SCENE, n), a.three.addEventListener(ce.SET_SCENE, l), a.three.addEventListener(ce.REFRESH_SCENE, r), a.three.addEventListener(ce.REMOVE_SCENE, o), () => {
44668
44671
  a.three.removeEventListener(ce.ADD_SCENE, n), a.three.removeEventListener(ce.SET_SCENE, l), a.three.removeEventListener(ce.REFRESH_SCENE, r), a.three.removeEventListener(ce.REMOVE_SCENE, o);
44669
- }), []), /* @__PURE__ */ C.jsxs("div", { id: "SidePanel", children: [
44670
- /* @__PURE__ */ C.jsx("div", { className: "scenes", children: t }, s),
44671
- /* @__PURE__ */ C.jsx(uP, { three: a.three }),
44672
- /* @__PURE__ */ C.jsx(dP, { three: a.three }),
44673
- /* @__PURE__ */ C.jsx(_e, { three: a.three })
44672
+ }), []), /* @__PURE__ */ M.jsxs("div", { id: "SidePanel", children: [
44673
+ /* @__PURE__ */ M.jsx("div", { className: "scenes", children: t }, s),
44674
+ /* @__PURE__ */ M.jsx(uP, { three: a.three }),
44675
+ /* @__PURE__ */ M.jsx(dP, { three: a.three }),
44676
+ /* @__PURE__ */ M.jsx(_e, { three: a.three })
44674
44677
  ] });
44675
44678
  }
44676
44679
  function fP(a) {
44677
- return /* @__PURE__ */ C.jsxs("div", { className: "editor", ref: a.ref, style: a.style, children: [
44678
- /* @__PURE__ */ C.jsx("div", { className: "header", children: a.header }),
44680
+ return /* @__PURE__ */ M.jsxs("div", { className: "editor", ref: a.ref, style: a.style, children: [
44681
+ /* @__PURE__ */ M.jsx("div", { className: "header", children: a.header }),
44679
44682
  a.children,
44680
- /* @__PURE__ */ C.jsx("div", { className: "footer", children: a.footer })
44683
+ /* @__PURE__ */ M.jsx("div", { className: "footer", children: a.footer })
44681
44684
  ] });
44682
44685
  }
44683
44686
  function JP(a) {
44684
- return /* @__PURE__ */ C.jsx(fP, { children: /* @__PURE__ */ C.jsxs(C.Fragment, { children: [
44685
- /* @__PURE__ */ C.jsx(
44687
+ return /* @__PURE__ */ M.jsx(fP, { children: /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
44688
+ /* @__PURE__ */ M.jsx(
44686
44689
  ut,
44687
44690
  {
44688
44691
  three: a.three,
@@ -44692,11 +44695,11 @@ function JP(a) {
44692
44695
  onSceneUpdate: a.onSceneUpdate
44693
44696
  }
44694
44697
  ),
44695
- /* @__PURE__ */ C.jsx(pP, { three: a.three })
44698
+ /* @__PURE__ */ M.jsx(pP, { three: a.three })
44696
44699
  ] }) });
44697
44700
  }
44698
44701
  export {
44699
- Ma as Accordion,
44702
+ Ca as Accordion,
44700
44703
  YP as Application,
44701
44704
  pg as BaseRemote,
44702
44705
  gg as ChildObject,
@@ -44727,7 +44730,7 @@ export {
44727
44730
  E_ as anchorGeometry,
44728
44731
  FP as anchorGeometryTL,
44729
44732
  AP as animateObjectMaterial,
44730
- MP as animateObjectTransform,
44733
+ CP as animateObjectTransform,
44731
44734
  w_ as applyObjectMaterial,
44732
44735
  fl as capitalize,
44733
44736
  ln as clamp,
@@ -44736,7 +44739,7 @@ export {
44736
44739
  l_ as copyToClipboard,
44737
44740
  IP as createMask,
44738
44741
  vP as cubicBezier,
44739
- CP as customizeTheatreElements,
44742
+ MP as customizeTheatreElements,
44740
44743
  TP as damp,
44741
44744
  xP as defaultTheatreCallback,
44742
44745
  m_ as detectMaxFrameRate,
@@ -44751,7 +44754,7 @@ export {
44751
44754
  S_ as getObjectMaterialProps,
44752
44755
  Wh as hierarchyUUID,
44753
44756
  VP as inspectComposer,
44754
- C_ as inspectComposerPass,
44757
+ M_ as inspectComposerPass,
44755
44758
  c_ as isColor,
44756
44759
  _P as map,
44757
44760
  Ua as mix,