@tomorrowevening/hermes 0.1.13 → 0.1.15

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,5 +1,5 @@
1
1
  import { types as le, getProject as xx, createRafDriver as _x } from "@theatre/core";
2
- import Wm, { useState as Ce, useEffect as wn, useRef as We, useMemo as Ma, Component as qa, createRef as Ni, forwardRef as bx } from "react";
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
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 = () => {
@@ -143,38 +143,38 @@ const f_ = ({ mobileTiers: a = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
143
143
  const m = (yield Promise.all(p.map(function(T) {
144
144
  var E;
145
145
  return pc(this, void 0, void 0, function* () {
146
- const v = ((be) => {
146
+ const v = ((Te) => {
147
147
  const lt = l ? ["adreno", "apple", "mali-t", "mali", "nvidia", "powervr", "samsung"] : ["intel", "apple", "amd", "radeon", "nvidia", "geforce", "adreno"];
148
- for (const Ut of lt) if (be.includes(Ut)) return Ut;
148
+ for (const Ut of lt) if (Te.includes(Ut)) return Ut;
149
149
  })(T);
150
150
  if (!v) return;
151
151
  const A = `${l ? "m" : "d"}-${v}${o ? "-ipad" : ""}.json`, N = r[A] = (E = r[A]) !== null && E !== void 0 ? E : h(A);
152
152
  let k;
153
153
  try {
154
154
  k = yield N;
155
- } catch (be) {
156
- if (be instanceof ap) throw be;
155
+ } catch (Te) {
156
+ if (Te instanceof ap) throw Te;
157
157
  return;
158
158
  }
159
- const H = function(be) {
159
+ const H = function(Te) {
160
160
  var lt;
161
- const Ut = (be = be.replace(/\([^)]+\)/, "")).match(/\d+/) || be.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);
161
+ const Ut = (Te = Te.replace(/\([^)]+\)/, "")).match(/\d+/) || Te.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);
162
162
  return (lt = Ut?.join("").replace(/\W|amd/g, "")) !== null && lt !== void 0 ? lt : "";
163
163
  }(T);
164
- let W = k.filter(([, be]) => be === H);
165
- W.length || (W = k.filter(([be]) => be.includes(T)));
164
+ let W = k.filter(([, Te]) => Te === H);
165
+ W.length || (W = k.filter(([Te]) => Te.includes(T)));
166
166
  const $ = W.length;
167
167
  if ($ === 0) return;
168
- const q = T.split(/[.,()\[\]/\s]/g).sort().filter((be, lt, Ut) => lt === 0 || be !== Ut[lt - 1]).join(" ");
169
- let X, [we, , , , de] = $ > 1 ? W.map((be) => [be, d_(q, be[2])]).sort(([, be], [, lt]) => be - lt)[0][0] : W[0], ye = Number.MAX_VALUE;
170
- const { devicePixelRatio: se } = window, Ee = c.width * se * c.height * se;
171
- for (const be of de) {
172
- const [lt, Ut] = be, kr = lt * Ut, Nn = Math.abs(Ee - kr);
173
- Nn < ye && (ye = Nn, X = be);
168
+ const q = T.split(/[.,()\[\]/\s]/g).sort().filter((Te, lt, Ut) => lt === 0 || Te !== Ut[lt - 1]).join(" ");
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, Me = c.width * se * c.height * se;
171
+ for (const Te of de) {
172
+ const [lt, Ut] = Te, kr = lt * Ut, Nn = Math.abs(Me - kr);
173
+ Nn < ye && (ye = Nn, X = Te);
174
174
  }
175
175
  if (!X) return;
176
176
  const [, , Ge, ot] = X;
177
- return [ye, Ge, we, ot];
177
+ return [ye, Ge, Ee, ot];
178
178
  });
179
179
  }))).filter(p_).sort(([T = Number.MAX_VALUE, E], [v = Number.MAX_VALUE, A]) => T === v ? E - A : T - v);
180
180
  if (!m.length) {
@@ -287,7 +287,7 @@ function wP({ r: a, g: e, b: t, a: s = 1 }) {
287
287
  }
288
288
  let Bn;
289
289
  function EP() {
290
- const [a, e] = Ce(Bn);
290
+ const [a, e] = Ae(Bn);
291
291
  return wn(() => {
292
292
  Bn || import("@theatre/studio").then((t) => {
293
293
  Bn = t.default, Bn.initialize(), Bn.ui.hide(), e(Bn);
@@ -2167,8 +2167,8 @@ function $_() {
2167
2167
  }
2168
2168
  function _(S, z, j) {
2169
2169
  {
2170
- var ee = g.ReactDebugCurrentFrame, Ae = ee.getStackAddendum();
2171
- Ae !== "" && (z += "%s", j = j.concat([Ae]));
2170
+ var ee = g.ReactDebugCurrentFrame, Re = ee.getStackAddendum();
2171
+ Re !== "" && (z += "%s", j = j.concat([Re]));
2172
2172
  var Oe = j.map(function(xe) {
2173
2173
  return String(xe);
2174
2174
  });
@@ -2188,8 +2188,8 @@ function $_() {
2188
2188
  var ee = S.displayName;
2189
2189
  if (ee)
2190
2190
  return ee;
2191
- var Ae = z.displayName || z.name || "";
2192
- return Ae !== "" ? j + "(" + Ae + ")" : j;
2191
+ var Re = z.displayName || z.name || "";
2192
+ return Re !== "" ? j + "(" + Re + ")" : j;
2193
2193
  }
2194
2194
  function W(S) {
2195
2195
  return S.displayName || "Context";
@@ -2229,7 +2229,7 @@ function $_() {
2229
2229
  var ee = S.displayName || null;
2230
2230
  return ee !== null ? ee : $(S.type) || "Memo";
2231
2231
  case d: {
2232
- var Ae = S, Oe = Ae._payload, xe = Ae._init;
2232
+ var Re = S, Oe = Re._payload, xe = Re._init;
2233
2233
  try {
2234
2234
  return $(xe(Oe));
2235
2235
  } catch {
@@ -2239,18 +2239,18 @@ function $_() {
2239
2239
  }
2240
2240
  return null;
2241
2241
  }
2242
- var q = Object.assign, X = 0, we, de, ye, se, Ee, Ge, ot;
2243
- function be() {
2242
+ var q = Object.assign, X = 0, Ee, de, ye, se, Me, Ge, ot;
2243
+ function Te() {
2244
2244
  }
2245
- be.__reactDisabledLog = !0;
2245
+ Te.__reactDisabledLog = !0;
2246
2246
  function lt() {
2247
2247
  {
2248
2248
  if (X === 0) {
2249
- we = console.log, de = console.info, ye = console.warn, se = console.error, Ee = console.group, Ge = console.groupCollapsed, ot = console.groupEnd;
2249
+ Ee = console.log, de = console.info, ye = console.warn, se = console.error, Me = console.group, Ge = console.groupCollapsed, ot = console.groupEnd;
2250
2250
  var S = {
2251
2251
  configurable: !0,
2252
2252
  enumerable: !0,
2253
- value: be,
2253
+ value: Te,
2254
2254
  writable: !0
2255
2255
  };
2256
2256
  Object.defineProperties(console, {
@@ -2276,7 +2276,7 @@ function $_() {
2276
2276
  };
2277
2277
  Object.defineProperties(console, {
2278
2278
  log: q({}, S, {
2279
- value: we
2279
+ value: Ee
2280
2280
  }),
2281
2281
  info: q({}, S, {
2282
2282
  value: de
@@ -2288,7 +2288,7 @@ function $_() {
2288
2288
  value: se
2289
2289
  }),
2290
2290
  group: q({}, S, {
2291
- value: Ee
2291
+ value: Me
2292
2292
  }),
2293
2293
  groupCollapsed: q({}, S, {
2294
2294
  value: Ge
@@ -2307,8 +2307,8 @@ function $_() {
2307
2307
  if (Nn === void 0)
2308
2308
  try {
2309
2309
  throw Error();
2310
- } catch (Ae) {
2311
- var ee = Ae.stack.trim().match(/\n( *(at )?)/);
2310
+ } catch (Re) {
2311
+ var ee = Re.stack.trim().match(/\n( *(at )?)/);
2312
2312
  Nn = ee && ee[1] || "";
2313
2313
  }
2314
2314
  return `
@@ -2330,7 +2330,7 @@ function $_() {
2330
2330
  }
2331
2331
  var ee;
2332
2332
  oc = !0;
2333
- var Ae = Error.prepareStackTrace;
2333
+ var Re = Error.prepareStackTrace;
2334
2334
  Error.prepareStackTrace = void 0;
2335
2335
  var Oe;
2336
2336
  Oe = kr.current, kr.current = null, lt();
@@ -2386,7 +2386,7 @@ function $_() {
2386
2386
  }
2387
2387
  }
2388
2388
  } finally {
2389
- oc = !1, kr.current = Oe, Ut(), Error.prepareStackTrace = Ae;
2389
+ oc = !1, kr.current = Oe, Ut(), Error.prepareStackTrace = Re;
2390
2390
  }
2391
2391
  var Fn = S ? S.displayName || S.name : "", Yi = Fn ? to(Fn) : "";
2392
2392
  return typeof S == "function" && so.set(S, Yi), Yi;
@@ -2418,9 +2418,9 @@ function $_() {
2418
2418
  case u:
2419
2419
  return io(S.type, z, j);
2420
2420
  case d: {
2421
- var ee = S, Ae = ee._payload, Oe = ee._init;
2421
+ var ee = S, Re = ee._payload, Oe = ee._init;
2422
2422
  try {
2423
- return io(Oe(Ae), z, j);
2423
+ return io(Oe(Re), z, j);
2424
2424
  } catch {
2425
2425
  }
2426
2426
  }
@@ -2435,7 +2435,7 @@ function $_() {
2435
2435
  } else
2436
2436
  Ld.setExtraStackFrame(null);
2437
2437
  }
2438
- function Z0(S, z, j, ee, Ae) {
2438
+ function Z0(S, z, j, ee, Re) {
2439
2439
  {
2440
2440
  var Oe = Function.call.bind(zr);
2441
2441
  for (var xe in S)
@@ -2450,7 +2450,7 @@ function $_() {
2450
2450
  } catch (Xe) {
2451
2451
  me = Xe;
2452
2452
  }
2453
- me && !(me instanceof Error) && (no(Ae), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", ee || "React class", j, xe, typeof me), no(null)), me instanceof Error && !(me.message in Id) && (Id[me.message] = !0, no(Ae), x("Failed %s type: %s", j, me.message), no(null));
2453
+ me && !(me instanceof Error) && (no(Re), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", ee || "React class", j, xe, typeof me), no(null)), me instanceof Error && !(me.message in Id) && (Id[me.message] = !0, no(Re), x("Failed %s type: %s", j, me.message), no(null));
2454
2454
  }
2455
2455
  }
2456
2456
  }
@@ -2525,7 +2525,7 @@ function $_() {
2525
2525
  });
2526
2526
  }
2527
2527
  }
2528
- var ax = function(S, z, j, ee, Ae, Oe, xe) {
2528
+ var ax = function(S, z, j, ee, Re, Oe, xe) {
2529
2529
  var me = {
2530
2530
  // This tag allows us to uniquely identify this as a React Element
2531
2531
  $$typeof: e,
@@ -2551,13 +2551,13 @@ function $_() {
2551
2551
  configurable: !1,
2552
2552
  enumerable: !1,
2553
2553
  writable: !1,
2554
- value: Ae
2554
+ value: Re
2555
2555
  }), Object.freeze && (Object.freeze(me.props), Object.freeze(me)), me;
2556
2556
  };
2557
- function ox(S, z, j, ee, Ae) {
2557
+ function ox(S, z, j, ee, Re) {
2558
2558
  {
2559
2559
  var Oe, xe = {}, me = null, At = null;
2560
- j !== void 0 && (kd(j), me = "" + j), sx(z) && (kd(z.key), me = "" + z.key), tx(z) && (At = z.ref, ix(z, Ae));
2560
+ j !== void 0 && (kd(j), me = "" + j), sx(z) && (kd(z.key), me = "" + z.key), tx(z) && (At = z.ref, ix(z, Re));
2561
2561
  for (Oe in z)
2562
2562
  zr.call(z, Oe) && !ex.hasOwnProperty(Oe) && (xe[Oe] = z[Oe]);
2563
2563
  if (S && S.defaultProps) {
@@ -2569,7 +2569,7 @@ function $_() {
2569
2569
  var Je = typeof S == "function" ? S.displayName || S.name || "Unknown" : S;
2570
2570
  me && nx(xe, Je), At && rx(xe, Je);
2571
2571
  }
2572
- return ax(S, me, At, Ae, ee, zd.current, xe);
2572
+ return ax(S, me, At, Re, ee, zd.current, xe);
2573
2573
  }
2574
2574
  }
2575
2575
  var cc = g.ReactCurrentOwner, Hd = g.ReactDebugCurrentFrame;
@@ -2638,9 +2638,9 @@ Check the top-level render call using <` + j + ">.");
2638
2638
  else if (uc(S))
2639
2639
  S._store && (S._store.validated = !0);
2640
2640
  else if (S) {
2641
- var Ae = y(S);
2642
- if (typeof Ae == "function" && Ae !== S.entries)
2643
- for (var Oe = Ae.call(S), xe; !(xe = Oe.next()).done; )
2641
+ var Re = y(S);
2642
+ if (typeof Re == "function" && Re !== S.entries)
2643
+ for (var Oe = Re.call(S), xe; !(xe = Oe.next()).done; )
2644
2644
  uc(xe.value) && jd(xe.value, z);
2645
2645
  }
2646
2646
  }
@@ -2664,8 +2664,8 @@ Check the top-level render call using <` + j + ">.");
2664
2664
  Z0(j, S.props, "prop", ee, S);
2665
2665
  } else if (z.PropTypes !== void 0 && !hc) {
2666
2666
  hc = !0;
2667
- var Ae = $(z);
2668
- x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Ae || "Unknown");
2667
+ var Re = $(z);
2668
+ x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Re || "Unknown");
2669
2669
  }
2670
2670
  typeof z.getDefaultProps == "function" && !z.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2671
2671
  }
@@ -2683,7 +2683,7 @@ Check the top-level render call using <` + j + ">.");
2683
2683
  }
2684
2684
  }
2685
2685
  var Yd = {};
2686
- function Xd(S, z, j, ee, Ae, Oe) {
2686
+ function Xd(S, z, j, ee, Re, Oe) {
2687
2687
  {
2688
2688
  var xe = k(S);
2689
2689
  if (!xe) {
@@ -2694,7 +2694,7 @@ Check the top-level render call using <` + j + ">.");
2694
2694
  var Xe;
2695
2695
  S === null ? Xe = "null" : lc(S) ? Xe = "array" : S !== void 0 && S.$$typeof === e ? (Xe = "<" + ($(S.type) || "Unknown") + " />", me = " Did you accidentally export a JSX literal instead of a component?") : Xe = typeof S, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Xe, me);
2696
2696
  }
2697
- var Je = ox(S, z, j, Ae, Oe);
2697
+ var Je = ox(S, z, j, Re, Oe);
2698
2698
  if (Je == null)
2699
2699
  return Je;
2700
2700
  if (xe) {
@@ -2777,7 +2777,7 @@ function Y_(a) {
2777
2777
  );
2778
2778
  }
2779
2779
  function X_(a) {
2780
- const [e, t] = Ce(!1), [s, i] = Ce(a.options), [n, r] = Ce(null), o = (p) => {
2780
+ const [e, t] = Ae(!1), [s, i] = Ae(a.options), [n, r] = Ae(null), o = (p) => {
2781
2781
  a.onDragComplete(p), i(p);
2782
2782
  }, l = (p) => {
2783
2783
  const f = [...s];
@@ -2810,7 +2810,7 @@ function X_(a) {
2810
2810
  ] });
2811
2811
  }
2812
2812
  function Z_(a) {
2813
- const [e, t] = Ce(!1), s = [];
2813
+ const [e, t] = Ae(!1), s = [];
2814
2814
  a.options.map((n, r) => {
2815
2815
  a.onSelect !== void 0 && (n.onSelect = a.onSelect), s.push(/* @__PURE__ */ M.jsx(K_, { option: n }, r));
2816
2816
  });
@@ -2835,7 +2835,7 @@ function Z_(a) {
2835
2835
  );
2836
2836
  }
2837
2837
  function K_(a) {
2838
- const { option: e } = a, [t, s] = Ce("");
2838
+ const { option: e } = a, [t, s] = Ae("");
2839
2839
  let i;
2840
2840
  switch (e.type) {
2841
2841
  case "draggable":
@@ -2877,7 +2877,7 @@ function K_(a) {
2877
2877
  return /* @__PURE__ */ M.jsx("li", { className: t === e.title ? "selected" : "", children: i }, gt());
2878
2878
  }
2879
2879
  function Ca(a) {
2880
- const [e, t] = Ce(a.open !== void 0 ? a.open : !1), [s, i] = Ce(a.visible !== void 0 ? a.visible : !1), n = !e || a.children === void 0, r = () => {
2880
+ 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 = () => {
2881
2881
  a.three.dispatchEvent({ type: ce.REMOVE_SCENE, value: a.scene });
2882
2882
  };
2883
2883
  return /* @__PURE__ */ M.jsxs("div", { className: `accordion ${n ? "hide" : ""}`, children: [
@@ -2928,7 +2928,7 @@ function Ca(a) {
2928
2928
  function gg(a) {
2929
2929
  if (a.child === void 0)
2930
2930
  return console.log("Hermes - No child attached"), null;
2931
- const e = We(null), [t, s] = Ce(!1), i = a.child.children.length > 0, n = [];
2931
+ const e = We(null), [t, s] = Ae(!1), i = a.child.children.length > 0, n = [];
2932
2932
  return a.child.children.length > 0 && a.child.children.map((r, o) => {
2933
2933
  n.push(/* @__PURE__ */ M.jsx(gg, { child: r, three: a.three }, o));
2934
2934
  }), wn(() => {
@@ -3004,7 +3004,7 @@ function yc(a) {
3004
3004
  }), /* @__PURE__ */ M.jsx("div", { className: `scene ${a.class !== void 0 ? a.class : ""}`, children: e });
3005
3005
  }
3006
3006
  function ya(a) {
3007
- const [e, t] = Ce(a.defaultValue);
3007
+ const [e, t] = Ae(a.defaultValue);
3008
3008
  return wn(() => {
3009
3009
  let s = !1, i = -1, n = 0, r = a.defaultValue, o = !1;
3010
3010
  const l = (p) => {
@@ -3027,7 +3027,7 @@ function ya(a) {
3027
3027
  }, []), e;
3028
3028
  }
3029
3029
  function bn(a) {
3030
- const e = We(null), t = We(null), [s, i] = Ce(a.value);
3030
+ const e = We(null), t = We(null), [s, i] = Ae(a.value);
3031
3031
  return ya({
3032
3032
  label: a.labelRef,
3033
3033
  input: e,
@@ -3095,10 +3095,10 @@ function bn(a) {
3095
3095
  ] });
3096
3096
  }
3097
3097
  function Q_(a) {
3098
- const e = We(null), t = We(null), s = We(null), i = We(null), n = We(null), r = We(null), o = We(null), l = We(null), c = We(null), h = We(null), [u, d] = Ce(a.value.x), [p, f] = Ce(a.value.y), [m, y] = Ce({
3098
+ const e = We(null), t = We(null), s = We(null), i = We(null), n = We(null), r = We(null), o = We(null), l = We(null), c = We(null), h = We(null), [u, d] = Ae(a.value.x), [p, f] = Ae(a.value.y), [m, y] = Ae({
3099
3099
  min: Math.min(a.min, Math.min(a.value.x, a.value.y)),
3100
3100
  max: Math.max(a.max, Math.max(a.value.x, a.value.y))
3101
- }), [g, x] = Ce(!1);
3101
+ }), [g, x] = Ae(!1);
3102
3102
  ya({
3103
3103
  label: o,
3104
3104
  input: e,
@@ -4585,7 +4585,7 @@ function Ab(a, e) {
4585
4585
  }
4586
4586
  const yp = "data:image/gif;base64,R0lGODlhDgFkAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDIgNzkuZGJhM2RhM2I1LCAyMDIzLzEyLzE1LTEwOjQyOjM3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMDk3M0NEODAxQjQxMUVGODVGNENDMkUyMUExNDk1NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyMDk3M0NEOTAxQjQxMUVGODVGNENDMkUyMUExNDk1NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4ODc3Qzg5MDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4ODc3QzhBMDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAAAAAAAsAAAAAA4BZAAAAv+Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9js/r9/y+/w8YKDhIWGh4iJiouMjY6PgIGSk5SVlpeYmZqTkJAGDQ+dnpuekmGgAKejpKuiZqmprKqoZKGyrbOlqrejub6xvLGyw8TFzcprurGuvqybxq7ETbrItsCz0l7Zpc+6p9/cS967w9/S2FTF0u/mzehK4Oqz3eTl9vf4+fr7/P3+//DzCgwIEECxo8iDChwoUMGzp8CDGixIkUK1q8iDGjxo0XHDt6/AgypMiRJEuaPIkypcqVLFt+KwAAOw==";
4587
4587
  function Rb(a) {
4588
- const e = a.step !== void 0 ? a.step : 0.01, t = We(null), s = We(null), i = We(null), n = We(null), r = We(null), [o] = Ce(a.value), [l, c] = Ce(a.value.offset[0]), [h, u] = Ce(a.value.offset[1]), [d, p] = Ce(a.value.repeat[0]), [f, m] = Ce(a.value.repeat[1]);
4588
+ const e = a.step !== void 0 ? a.step : 0.01, t = We(null), s = We(null), i = We(null), n = We(null), r = We(null), [o] = Ae(a.value), [l, c] = Ae(a.value.offset[0]), [h, u] = Ae(a.value.offset[1]), [d, p] = Ae(a.value.repeat[0]), [f, m] = Ae(a.value.repeat[1]);
4589
4589
  function y(x, _, b, T, E) {
4590
4590
  if (a.onChange !== void 0) {
4591
4591
  const v = a.prop !== void 0 ? a.prop : a.title;
@@ -4679,7 +4679,7 @@ function Rb(a) {
4679
4679
  function el(a) {
4680
4680
  let e = a.value;
4681
4681
  e !== void 0 && (e.isColor !== void 0 ? e = np(a.value) : a.type === "color" && (e = np(new En().setStyle(a.value, Ia))));
4682
- const [t, s] = Ce(e), i = We(null), n = (c) => {
4682
+ const [t, s] = Ae(e), i = We(null), n = (c) => {
4683
4683
  let h = c.target.value;
4684
4684
  if (a.type === "boolean")
4685
4685
  h = c.target.checked;
@@ -4890,20 +4890,20 @@ class ms extends qa {
4890
4890
  );
4891
4891
  }
4892
4892
  }
4893
- class Pe extends qa {
4893
+ class _e extends qa {
4894
4894
  static instance;
4895
4895
  static groups = [];
4896
4896
  static groupsRefs = [];
4897
4897
  static groupTitles = [];
4898
4898
  static three;
4899
4899
  constructor(e) {
4900
- super(e), this.state = { lastUpdate: Date.now() }, Pe.instance = this, Pe.three = e.three, e.three.addEventListener(ce.ADD_GROUP, this.addGroup), e.three.addEventListener(ce.REMOVE_GROUP, this.removeGroup);
4900
+ super(e), this.state = { lastUpdate: Date.now() }, _e.instance = this, _e.three = e.three, e.three.addEventListener(ce.ADD_GROUP, this.addGroup), e.three.addEventListener(ce.REMOVE_GROUP, this.removeGroup);
4901
4901
  }
4902
4902
  componentWillUnmount() {
4903
4903
  this.props.three.removeEventListener(ce.ADD_GROUP, this.addGroup), this.props.three.removeEventListener(ce.REMOVE_GROUP, this.removeGroup);
4904
4904
  }
4905
4905
  render() {
4906
- return /* @__PURE__ */ M.jsx("div", { className: "customGroups", children: Pe.groups }, this.state.lastUpdate);
4906
+ return /* @__PURE__ */ M.jsx("div", { className: "customGroups", children: _e.groups }, this.state.lastUpdate);
4907
4907
  }
4908
4908
  // Events
4909
4909
  addGroup = (e) => {
@@ -4923,7 +4923,7 @@ class Pe extends qa {
4923
4923
  this.props.three.updateGroup(t.title, n, r);
4924
4924
  }
4925
4925
  });
4926
- }), Pe.groups.push(
4926
+ }), _e.groups.push(
4927
4927
  /* @__PURE__ */ M.jsx(
4928
4928
  ms,
4929
4929
  {
@@ -4933,59 +4933,65 @@ class Pe extends qa {
4933
4933
  },
4934
4934
  Math.random()
4935
4935
  )
4936
- ), Pe.groupTitles.push(t.title), this.setState({ lastUpdate: Date.now() });
4936
+ ), _e.groupTitles.push(t.title), this.setState({ lastUpdate: Date.now() });
4937
4937
  };
4938
4938
  removeGroup = (e) => {
4939
- const t = e.value, s = Pe.groupTitles.length;
4939
+ const t = e.value, s = _e.groupTitles.length;
4940
4940
  for (let i = 0; i < s; i++)
4941
- if (t === Pe.groupTitles[i]) {
4942
- Pe.groups.splice(i, 1), Pe.groupTitles.splice(i, 1), this.setState({ lastUpdate: Date.now() });
4941
+ if (t === _e.groupTitles[i]) {
4942
+ _e.groups.splice(i, 1), _e.groupTitles.splice(i, 1), this.setState({ lastUpdate: Date.now() });
4943
4943
  return;
4944
4944
  }
4945
4945
  };
4946
4946
  // Static
4947
4947
  static addEditorGroup(e) {
4948
- const t = [];
4949
- e.items.forEach((n) => {
4950
- t.push({
4951
- type: n.type,
4952
- prop: n.prop,
4953
- title: n.title !== void 0 ? n.title : n.prop,
4954
- value: n.value,
4955
- min: n.min,
4956
- max: n.max,
4957
- step: n.step,
4958
- options: n.options,
4959
- disabled: n.disabled,
4960
- onChange: (r, o) => {
4961
- e.onUpdate(r, o);
4948
+ const t = _e.groupTitles.length;
4949
+ for (let r = 0; r < t; r++)
4950
+ if (_e.groupTitles[r] === e.title)
4951
+ return _e.groupsRefs[r];
4952
+ const s = [];
4953
+ e.items.forEach((r) => {
4954
+ s.push({
4955
+ type: r.type,
4956
+ prop: r.prop,
4957
+ title: r.title !== void 0 ? r.title : r.prop,
4958
+ value: r.value,
4959
+ min: r.min,
4960
+ max: r.max,
4961
+ step: r.step,
4962
+ options: r.options,
4963
+ disabled: r.disabled,
4964
+ onChange: (o, l) => {
4965
+ e.onUpdate(o, l);
4962
4966
  }
4963
4967
  });
4964
4968
  });
4965
- const s = Ni(), i = /* @__PURE__ */ M.jsx(
4969
+ const i = Ni(), n = /* @__PURE__ */ M.jsx(
4966
4970
  ms,
4967
4971
  {
4968
- three: Pe.three,
4969
- ref: s,
4972
+ three: _e.three,
4973
+ ref: i,
4970
4974
  title: e.title,
4971
- items: t
4975
+ items: s
4972
4976
  },
4973
4977
  Math.random()
4974
4978
  );
4975
- return Pe.groups.push(i), Pe.groupsRefs.push(s), Pe.groupTitles.push(e.title), s;
4979
+ return _e.groups.push(n), _e.groupsRefs.push(i), _e.groupTitles.push(e.title), setTimeout(() => {
4980
+ _e.instance.setState({ lastUpdate: Date.now() });
4981
+ }, 0), i;
4976
4982
  }
4977
4983
  static removeEditorGroup(e) {
4978
- const t = Pe.groupTitles.length;
4984
+ const t = _e.groupTitles.length;
4979
4985
  for (let s = 0; s < t; s++)
4980
- if (e === Pe.groupTitles[s]) {
4981
- Pe.groups.splice(s, 1), Pe.groupTitles.splice(s, 1), Pe.instance.setState({ lastUpdate: Date.now() });
4986
+ if (e === _e.groupTitles[s]) {
4987
+ _e.groups.splice(s, 1), _e.groupTitles.splice(s, 1), _e.instance.setState({ lastUpdate: Date.now() });
4982
4988
  return;
4983
4989
  }
4984
4990
  }
4985
4991
  static removeAllGroups() {
4986
- for (let e = Pe.groupTitles.length; e > 0; e--)
4987
- Pe.groups.splice(e, 1), Pe.groupTitles.splice(e, 1);
4988
- Pe.instance.setState({ lastUpdate: Date.now() });
4992
+ for (let e = _e.groupTitles.length; e > 0; e--)
4993
+ _e.groups.splice(e, 1), _e.groupTitles.splice(e, 1);
4994
+ _e.instance.setState({ lastUpdate: Date.now() });
4989
4995
  }
4990
4996
  }
4991
4997
  function xp(a) {
@@ -5837,7 +5843,7 @@ const qg = {
5837
5843
  function Tc(a, e, t) {
5838
5844
  return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? a + (e - a) * 6 * t : t < 1 / 2 ? e : t < 2 / 3 ? a + (e - a) * 6 * (2 / 3 - t) : a;
5839
5845
  }
5840
- class ve {
5846
+ class we {
5841
5847
  /**
5842
5848
  * Constructs a new color.
5843
5849
  *
@@ -6305,8 +6311,8 @@ class ve {
6305
6311
  yield this.r, yield this.g, yield this.b;
6306
6312
  }
6307
6313
  }
6308
- const Tt = /* @__PURE__ */ new ve();
6309
- ve.NAMES = qg;
6314
+ const Tt = /* @__PURE__ */ new we();
6315
+ we.NAMES = qg;
6310
6316
  class Vl {
6311
6317
  /**
6312
6318
  * Constructs a new 2x2 matrix. The arguments are supposed to be
@@ -7862,8 +7868,8 @@ class Le {
7862
7868
  * @return {Matrix4} A reference to this matrix.
7863
7869
  */
7864
7870
  multiplyMatrices(e, t) {
7865
- 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], we = i[10], de = i[14], ye = i[3], se = i[7], Ee = i[11], Ge = i[15];
7866
- 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 * we + c * Ee, 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 * we + p * Ee, 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 * we + g * Ee, 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 * we + T * Ee, n[15] = x * N + _ * $ + b * de + T * Ge, this;
7871
+ 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];
7872
+ 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;
7867
7873
  }
7868
7874
  /**
7869
7875
  * Multiplies every component of the matrix by the given scalar.
@@ -9419,7 +9425,7 @@ function Cl(a) {
9419
9425
  }
9420
9426
  function Xg(a, ...e) {
9421
9427
  const t = a ? a.slice(-4) : void 0;
9422
- return e.length === 1 && (t === "vec2" ? e = [e[0], e[0]] : t === "vec3" ? e = [e[0], e[0], e[0]] : t === "vec4" && (e = [e[0], e[0], e[0], e[0]])), a === "color" ? new ve(...e) : t === "vec2" ? new he(...e) : t === "vec3" ? new R(...e) : t === "vec4" ? new ge(...e) : t === "mat2" ? new Vl(...e) : t === "mat3" ? new Yt(...e) : t === "mat4" ? new Le(...e) : a === "bool" ? e[0] || !1 : a === "float" || a === "int" || a === "uint" ? e[0] || 0 : a === "string" ? e[0] || "" : a === "ArrayBuffer" ? ST(e[0]) : null;
9428
+ return e.length === 1 && (t === "vec2" ? e = [e[0], e[0]] : t === "vec3" ? e = [e[0], e[0], e[0]] : t === "vec4" && (e = [e[0], e[0], e[0], e[0]])), a === "color" ? new we(...e) : t === "vec2" ? new he(...e) : t === "vec3" ? new R(...e) : t === "vec4" ? new ge(...e) : t === "mat2" ? new Vl(...e) : t === "mat3" ? new Yt(...e) : t === "mat4" ? new Le(...e) : a === "bool" ? e[0] || !1 : a === "float" || a === "int" || a === "uint" ? e[0] || 0 : a === "string" ? e[0] || "" : a === "ArrayBuffer" ? ST(e[0]) : null;
9423
9429
  }
9424
9430
  function Zg(a) {
9425
9431
  let e = Pp.get(a);
@@ -12615,7 +12621,7 @@ class sS extends Wi {
12615
12621
  this.has(e) === !0 && (this.backend.destroySampler(e), this.backend.destroyTexture(e), this.delete(e), this.info.memory.textures--);
12616
12622
  }
12617
12623
  }
12618
- class qu extends ve {
12624
+ class qu extends we {
12619
12625
  /**
12620
12626
  * Constructs a new four-component color.
12621
12627
  * You can also pass a single THREE.Color, hex or
@@ -13946,7 +13952,7 @@ const Q = (a, e) => {
13946
13952
  const t = SS(e || a), s = a && a.isNode === !0 ? a.node && a.node.value || a.value : a;
13947
13953
  return U(new Ka(s, t));
13948
13954
  };
13949
- class Ne extends re {
13955
+ class Pe extends re {
13950
13956
  static get type() {
13951
13957
  return "PropertyNode";
13952
13958
  }
@@ -13968,7 +13974,7 @@ class Ne extends re {
13968
13974
  return this.varying === !0 ? (t = e.getVaryingFromNode(this, this.name), t.needsInterpolation = !0) : t = e.getVarFromNode(this, this.name), e.getPropertyName(t);
13969
13975
  }
13970
13976
  }
13971
- const uy = (a, e) => U(new Ne(a, e)), Rl = (a, e) => U(new Ne(a, e, !0)), Se = /* @__PURE__ */ G(Ne, "vec4", "DiffuseColor"), Kp = /* @__PURE__ */ G(Ne, "vec3", "EmissiveColor"), si = /* @__PURE__ */ G(Ne, "float", "Roughness"), Nl = /* @__PURE__ */ G(Ne, "float", "Metalness"), mu = /* @__PURE__ */ G(Ne, "float", "Clearcoat"), Pl = /* @__PURE__ */ G(Ne, "float", "ClearcoatRoughness"), dr = /* @__PURE__ */ G(Ne, "vec3", "Sheen"), td = /* @__PURE__ */ G(Ne, "float", "SheenRoughness"), sd = /* @__PURE__ */ G(Ne, "float", "Iridescence"), dy = /* @__PURE__ */ G(Ne, "float", "IridescenceIOR"), py = /* @__PURE__ */ G(Ne, "float", "IridescenceThickness"), gu = /* @__PURE__ */ G(Ne, "float", "AlphaT"), un = /* @__PURE__ */ G(Ne, "float", "Anisotropy"), rl = /* @__PURE__ */ G(Ne, "vec3", "AnisotropyT"), Sr = /* @__PURE__ */ G(Ne, "vec3", "AnisotropyB"), Jt = /* @__PURE__ */ G(Ne, "color", "SpecularColor"), Fl = /* @__PURE__ */ G(Ne, "float", "SpecularF90"), yu = /* @__PURE__ */ G(Ne, "float", "Shininess"), Fa = /* @__PURE__ */ G(Ne, "vec4", "Output"), Ac = /* @__PURE__ */ G(Ne, "float", "dashSize"), Qp = /* @__PURE__ */ G(Ne, "float", "gapSize"), al = /* @__PURE__ */ G(Ne, "float", "IOR"), xu = /* @__PURE__ */ G(Ne, "float", "Transmission"), fy = /* @__PURE__ */ G(Ne, "float", "Thickness"), my = /* @__PURE__ */ G(Ne, "float", "AttenuationDistance"), gy = /* @__PURE__ */ G(Ne, "color", "AttenuationColor"), yy = /* @__PURE__ */ G(Ne, "float", "Dispersion");
13977
+ const uy = (a, e) => U(new Pe(a, e)), Rl = (a, e) => U(new Pe(a, e, !0)), ve = /* @__PURE__ */ G(Pe, "vec4", "DiffuseColor"), Kp = /* @__PURE__ */ G(Pe, "vec3", "EmissiveColor"), si = /* @__PURE__ */ G(Pe, "float", "Roughness"), Nl = /* @__PURE__ */ G(Pe, "float", "Metalness"), mu = /* @__PURE__ */ G(Pe, "float", "Clearcoat"), Pl = /* @__PURE__ */ G(Pe, "float", "ClearcoatRoughness"), dr = /* @__PURE__ */ G(Pe, "vec3", "Sheen"), td = /* @__PURE__ */ G(Pe, "float", "SheenRoughness"), sd = /* @__PURE__ */ G(Pe, "float", "Iridescence"), dy = /* @__PURE__ */ G(Pe, "float", "IridescenceIOR"), py = /* @__PURE__ */ G(Pe, "float", "IridescenceThickness"), gu = /* @__PURE__ */ G(Pe, "float", "AlphaT"), un = /* @__PURE__ */ G(Pe, "float", "Anisotropy"), rl = /* @__PURE__ */ G(Pe, "vec3", "AnisotropyT"), Sr = /* @__PURE__ */ G(Pe, "vec3", "AnisotropyB"), Jt = /* @__PURE__ */ G(Pe, "color", "SpecularColor"), Fl = /* @__PURE__ */ G(Pe, "float", "SpecularF90"), yu = /* @__PURE__ */ G(Pe, "float", "Shininess"), Fa = /* @__PURE__ */ G(Pe, "vec4", "Output"), Ac = /* @__PURE__ */ G(Pe, "float", "dashSize"), Qp = /* @__PURE__ */ G(Pe, "float", "gapSize"), al = /* @__PURE__ */ G(Pe, "float", "IOR"), xu = /* @__PURE__ */ G(Pe, "float", "Transmission"), fy = /* @__PURE__ */ G(Pe, "float", "Thickness"), my = /* @__PURE__ */ G(Pe, "float", "AttenuationDistance"), gy = /* @__PURE__ */ G(Pe, "color", "AttenuationColor"), yy = /* @__PURE__ */ G(Pe, "float", "Dispersion");
13972
13978
  class GS extends rt {
13973
13979
  static get type() {
13974
13980
  return "FunctionCallNode";
@@ -15675,7 +15681,7 @@ He.SUBGROUP;
15675
15681
  He.INVOCATION_SUBGROUP;
15676
15682
  He.INVOCATION_LOCAL;
15677
15683
  const Tw = /* @__PURE__ */ G(He, He.DRAW);
15678
- class Sw extends Ne {
15684
+ class Sw extends Pe {
15679
15685
  static get type() {
15680
15686
  return "ParameterNode";
15681
15687
  }
@@ -17418,10 +17424,10 @@ class Lr extends Ka {
17418
17424
  return e.sampler = this.sampler, e.depthNode = this.depthNode, e.compareNode = this.compareNode, e.gradNode = this.gradNode, e;
17419
17425
  }
17420
17426
  }
17421
- const jw = /* @__PURE__ */ L(Lr).setParameterLength(1, 4).setName("texture"), _e = (a = Wy, e = null, t = null, s = null) => {
17427
+ const jw = /* @__PURE__ */ L(Lr).setParameterLength(1, 4).setName("texture"), be = (a = Wy, e = null, t = null, s = null) => {
17422
17428
  let i;
17423
17429
  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;
17424
- }, vs = (...a) => _e(...a).setSampler(!1);
17430
+ }, vs = (...a) => be(...a).setSampler(!1);
17425
17431
  class qw extends Mt {
17426
17432
  /**
17427
17433
  * Constructs a new framebuffer texture.
@@ -17896,7 +17902,7 @@ class qt extends Mn {
17896
17902
  * Constructs a new material.
17897
17903
  */
17898
17904
  constructor() {
17899
- 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 ve(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;
17905
+ 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;
17900
17906
  }
17901
17907
  /**
17902
17908
  * Sets the alpha value to be used when running an alpha test. The material
@@ -18243,7 +18249,7 @@ class gd extends re {
18243
18249
  */
18244
18250
  setNodeType(e) {
18245
18251
  let t = null;
18246
- this.count !== null ? t = Uy(null, e, this.count) : Array.isArray(this.getValueFromReference()) ? t = Gs(null, e) : e === "texture" ? t = _e(null) : e === "cubeTexture" ? t = Wa(null) : t = Q(null, e), this.group !== null && t.setGroup(this.group), this.name !== null && t.label(this.name), this.node = t.getSelf();
18252
+ this.count !== null ? t = Uy(null, e, this.count) : Array.isArray(this.getValueFromReference()) ? t = Gs(null, e) : e === "texture" ? t = be(null) : e === "cubeTexture" ? t = Wa(null) : t = Q(null, e), this.group !== null && t.setGroup(this.group), this.name !== null && t.label(this.name), this.node = t.getSelf();
18247
18253
  }
18248
18254
  /**
18249
18255
  * This method is overwritten since the node type is inferred from
@@ -19119,7 +19125,7 @@ class fs extends re {
19119
19125
  s.assign(it.dot(u.xyz).negate().add(u.w)), i.assign(s.fwidth().div(2)), c.mulAssign(Hi(i.negate(), i, s).oneMinus());
19120
19126
  }), n.mulAssign(c.oneMinus());
19121
19127
  }
19122
- Se.a.mulAssign(n), Se.a.equal(0).discard();
19128
+ ve.a.mulAssign(n), ve.a.equal(0).discard();
19123
19129
  })();
19124
19130
  }
19125
19131
  /**
@@ -19523,7 +19529,7 @@ class nt extends qt {
19523
19529
  this.setupDiffuseColor(e), this.setupVariants(e);
19524
19530
  const l = this.setupLighting(e);
19525
19531
  o !== null && e.stack.add(o);
19526
- const c = ne(l, Se.a).max(0);
19532
+ const c = ne(l, ve.a).max(0);
19527
19533
  r = this.setupOutput(e, c), Fa.assign(r);
19528
19534
  const h = this.outputNode !== null;
19529
19535
  if (h && (r = this.outputNode), s !== null) {
@@ -19627,11 +19633,11 @@ class nt extends qt {
19627
19633
  setupDiffuseColor({ object: e, geometry: t }) {
19628
19634
  this.maskNode !== null && Qu(this.maskNode).not().discard();
19629
19635
  let s = this.colorNode ? ne(this.colorNode) : SE;
19630
- 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)), Se.assign(s);
19636
+ 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);
19631
19637
  const i = this.opacityNode ? O(this.opacityNode) : t0;
19632
- Se.a.assign(Se.a.mul(i));
19638
+ ve.a.assign(ve.a.mul(i));
19633
19639
  let n = null;
19634
- (this.alphaTestNode !== null || this.alphaTest > 0) && (n = this.alphaTestNode !== null ? O(this.alphaTestNode) : TE, Se.a.lessThanEqual(n).discard()), this.alphaHash === !0 && Se.a.lessThan(TM(wt)).discard(), this.transparent === !1 && this.blending === ai && this.alphaToCoverage === !1 ? Se.a.assign(1) : n === null && Se.a.lessThanEqual(0).discard();
19640
+ (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();
19635
19641
  }
19636
19642
  /**
19637
19643
  * Abstract interface method that can be implemented by derived materials
@@ -19648,7 +19654,7 @@ class nt extends qt {
19648
19654
  * @return {Node<vec3>} The outgoing light node.
19649
19655
  */
19650
19656
  setupOutgoingLight() {
19651
- return this.lights === !0 ? B(0) : Se.rgb;
19657
+ return this.lights === !0 ? B(0) : ve.rgb;
19652
19658
  }
19653
19659
  /**
19654
19660
  * Setups the normal node from the material.
@@ -20885,7 +20891,7 @@ class Ii extends qt {
20885
20891
  * by {@link Color#set}.
20886
20892
  */
20887
20893
  constructor(e) {
20888
- super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new ve(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new gs(), this.combine = Gl, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(e);
20894
+ super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new we(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new gs(), this.combine = Gl, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(e);
20889
20895
  }
20890
20896
  copy(e) {
20891
20897
  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;
@@ -21972,7 +21978,7 @@ class eC extends re {
21972
21978
  }
21973
21979
  const d0 = /* @__PURE__ */ uy("vec3", "shadowPositionWorld");
21974
21980
  function tC(a, e = {}) {
21975
- 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 ve()), e.clearAlpha = a.getClearAlpha(), e.autoClear = a.autoClear, e.scissorTest = a.getScissorTest(), e;
21981
+ 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;
21976
21982
  }
21977
21983
  function sC(a, e) {
21978
21984
  return e = tC(a, e), a.setMRT(null), a.setRenderObjectFunction(null), a.setClearColor(0, 1), a.autoClear = !0, e;
@@ -21996,11 +22002,11 @@ function lC(a, e, t) {
21996
22002
  iC(a, t), aC(e, t);
21997
22003
  }
21998
22004
  const Cf = /* @__PURE__ */ new WeakMap(), cC = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, depthLayer: t }) => {
21999
- let s = _e(a, e.xy).label("t_basic");
22005
+ let s = be(a, e.xy).label("t_basic");
22000
22006
  return a.isArrayTexture && (s = s.depth(t)), s.compare(e.z);
22001
22007
  }), hC = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, shadow: t, depthLayer: s }) => {
22002
22008
  const i = (y, g) => {
22003
- let x = _e(a, y);
22009
+ let x = be(a, y);
22004
22010
  return a.isArrayTexture && (x = x.depth(s)), x.compare(g);
22005
22011
  }, n = Ie("mapSize", "vec2", t).setGroup(K), r = Ie("radius", "float", t).setGroup(K), o = V(1).div(n), l = o.x.negate().mul(r), c = o.y.negate().mul(r), h = o.x.mul(r), u = o.y.mul(r), d = l.div(2), p = c.div(2), f = h.div(2), m = u.div(2);
22006
22012
  return Lt(
@@ -22024,7 +22030,7 @@ const Cf = /* @__PURE__ */ new WeakMap(), cC = /* @__PURE__ */ I(({ depthTexture
22024
22030
  ).mul(1 / 17);
22025
22031
  }), uC = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, shadow: t, depthLayer: s }) => {
22026
22032
  const i = (u, d) => {
22027
- let p = _e(a, u);
22033
+ let p = be(a, u);
22028
22034
  return a.isArrayTexture && (p = p.depth(s)), p.compare(d);
22029
22035
  }, n = Ie("mapSize", "vec2", t).setGroup(K), r = V(1).div(n), o = r.x, l = r.y, c = e.xy, h = ji(c.mul(n).add(0.5));
22030
22036
  return c.subAssign(h.mul(r)), Lt(
@@ -22068,7 +22074,7 @@ const Cf = /* @__PURE__ */ new WeakMap(), cC = /* @__PURE__ */ I(({ depthTexture
22068
22074
  ).mul(1 / 9);
22069
22075
  }), dC = /* @__PURE__ */ I(({ depthTexture: a, shadowCoord: e, depthLayer: t }) => {
22070
22076
  const s = O(1).toVar();
22071
- let i = _e(a).sample(e.xy);
22077
+ let i = be(a).sample(e.xy);
22072
22078
  a.isArrayTexture && (i = i.depth(t)), i = i.rg;
22073
22079
  const n = Ey(e.z, i.x);
22074
22080
  return Qe(n.notEqual(O(1)), () => {
@@ -22194,9 +22200,9 @@ class p0 extends eC {
22194
22200
  const { renderer: t } = e, { light: s, shadow: i } = this, n = t.shadowMap.type, { depthTexture: r, shadowMap: o } = this.setupRenderTarget(i, e);
22195
22201
  if (i.camera.updateProjectionMatrix(), n === tl && i.isPointLightShadow !== !0) {
22196
22202
  r.compareFunction = null, o.depth > 1 ? (o._vsmShadowMapVertical || (o._vsmShadowMapVertical = e.createRenderTarget(i.mapSize.width, i.mapSize.height, { format: xn, type: hs, depth: o.depth, depthBuffer: !1 }), o._vsmShadowMapVertical.texture.name = "VSMVertical"), this.vsmShadowMapVertical = o._vsmShadowMapVertical, o._vsmShadowMapHorizontal || (o._vsmShadowMapHorizontal = e.createRenderTarget(i.mapSize.width, i.mapSize.height, { format: xn, type: hs, depth: o.depth, depthBuffer: !1 }), o._vsmShadowMapHorizontal.texture.name = "VSMHorizontal"), this.vsmShadowMapHorizontal = o._vsmShadowMapHorizontal) : (this.vsmShadowMapVertical = e.createRenderTarget(i.mapSize.width, i.mapSize.height, { format: xn, type: hs, depthBuffer: !1 }), this.vsmShadowMapHorizontal = e.createRenderTarget(i.mapSize.width, i.mapSize.height, { format: xn, type: hs, depthBuffer: !1 }));
22197
- let g = _e(r);
22203
+ let g = be(r);
22198
22204
  r.isArrayTexture && (g = g.depth(this.depthLayer));
22199
- let x = _e(this.vsmShadowMapVertical.texture);
22205
+ let x = be(this.vsmShadowMapVertical.texture);
22200
22206
  r.isArrayTexture && (x = x.depth(this.depthLayer));
22201
22207
  const _ = Ie("blurSamples", "float", i).setGroup(K), b = Ie("radius", "float", i).setGroup(K), T = Ie("mapSize", "vec2", i).setGroup(K);
22202
22208
  let E = this.vsmMaterialVertical || (this.vsmMaterialVertical = new nt());
@@ -22206,7 +22212,7 @@ class p0 extends eC {
22206
22212
  if (d === null)
22207
22213
  throw new Error("THREE.WebGPURenderer: Shadow map type not supported yet.");
22208
22214
  const p = n === tl && i.isPointLightShadow !== !0 ? this.vsmShadowMapHorizontal.texture : r, f = this.setupShadowFilter(e, { filterFn: d, shadowTexture: o.texture, depthTexture: p, shadowCoord: u, shadow: i, depthLayer: this.depthLayer });
22209
- let m = _e(o.texture, u);
22215
+ let m = be(o.texture, u);
22210
22216
  r.isArrayTexture && (m = m.depth(this.depthLayer));
22211
22217
  const y = Ve(1, f.rgb.mix(m, 1), l.mul(m.a)).toVar();
22212
22218
  return this.shadowMap = o, this.shadow.map = o, y;
@@ -22276,7 +22282,7 @@ class p0 extends eC {
22276
22282
  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));
22277
22283
  }
22278
22284
  }
22279
- const bC = (a, e) => U(new p0(a, e)), TC = /* @__PURE__ */ new ve(), Ls = /* @__PURE__ */ I(([a, e]) => {
22285
+ const bC = (a, e) => U(new p0(a, e)), TC = /* @__PURE__ */ new we(), Ls = /* @__PURE__ */ I(([a, e]) => {
22280
22286
  const t = a.toVar(), s = cs(t), i = Ws(1, Ct(s.x, Ct(s.y, s.z)));
22281
22287
  s.mulAssign(i), t.mulAssign(i.mul(e.mul(2).oneMinus()));
22282
22288
  const n = V(t.xy).toVar(), o = e.mul(1.5).oneMinus();
@@ -22298,9 +22304,9 @@ const bC = (a, e) => U(new p0(a, e)), TC = /* @__PURE__ */ new ve(), Ls = /* @__
22298
22304
  { name: "pos", type: "vec3" },
22299
22305
  { name: "texelSizeY", type: "float" }
22300
22306
  ]
22301
- }), SC = /* @__PURE__ */ I(({ depthTexture: a, bd3D: e, dp: t, texelSize: s }) => _e(a, Ls(e, s.y)).compare(t)), vC = /* @__PURE__ */ I(({ depthTexture: a, bd3D: e, dp: t, texelSize: s, shadow: i }) => {
22307
+ }), 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 }) => {
22302
22308
  const n = Ie("radius", "float", i).setGroup(K), r = V(-1, 1).mul(n).mul(s.y);
22303
- return _e(a, Ls(e.add(r.xyy), s.y)).compare(t).add(_e(a, Ls(e.add(r.yyy), s.y)).compare(t)).add(_e(a, Ls(e.add(r.xyx), s.y)).compare(t)).add(_e(a, Ls(e.add(r.yyx), s.y)).compare(t)).add(_e(a, Ls(e, s.y)).compare(t)).add(_e(a, Ls(e.add(r.xxy), s.y)).compare(t)).add(_e(a, Ls(e.add(r.yxy), s.y)).compare(t)).add(_e(a, Ls(e.add(r.xxx), s.y)).compare(t)).add(_e(a, Ls(e.add(r.yxx), s.y)).compare(t)).mul(1 / 9);
22309
+ 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);
22304
22310
  }), wC = /* @__PURE__ */ I(({ filterFn: a, depthTexture: e, shadowCoord: t, shadow: s }) => {
22305
22311
  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();
22306
22312
  return Qe(n.sub(o).lessThanEqual(0).and(n.sub(r).greaterThanEqual(0)), () => {
@@ -22394,7 +22400,7 @@ class An extends Ur {
22394
22400
  * @param {?Light} [light=null] - The light source.
22395
22401
  */
22396
22402
  constructor(e = null) {
22397
- super(), this.light = e, this.color = new ve(), this.colorNode = e && e.colorNode || Q(this.color).setGroup(K), this.baseColorNode = null, this.shadowNode = null, this.shadowColorNode = null, this.isAnalyticLightNode = !0, this.updateType = ue.FRAME;
22403
+ super(), this.light = e, this.color = new we(), this.colorNode = e && e.colorNode || Q(this.color).setGroup(K), this.baseColorNode = null, this.shadowNode = null, this.shadowColorNode = null, this.isAnalyticLightNode = !0, this.updateType = ue.FRAME;
22398
22404
  }
22399
22405
  getHash() {
22400
22406
  return this.light.uuid;
@@ -22838,20 +22844,20 @@ class eo extends _i {
22838
22844
  let d = 0, p = 0;
22839
22845
  f("z", "y", "x", -1, -1, s, t, e, r, n, 0), f("z", "y", "x", 1, -1, s, t, -e, r, n, 1), f("x", "z", "y", 1, 1, e, s, t, i, r, 2), f("x", "z", "y", 1, -1, e, s, -t, i, r, 3), f("x", "y", "z", 1, -1, e, t, s, i, n, 4), f("x", "y", "z", -1, -1, e, t, -s, i, n, 5), this.setIndex(l), this.setAttribute("position", new Bt(c, 3)), this.setAttribute("normal", new Bt(h, 3)), this.setAttribute("uv", new Bt(u, 2));
22840
22846
  function f(m, y, g, x, _, b, T, E, v, A, N) {
22841
- const k = b / v, H = T / A, W = b / 2, $ = T / 2, q = E / 2, X = v + 1, we = A + 1;
22847
+ const k = b / v, H = T / A, W = b / 2, $ = T / 2, q = E / 2, X = v + 1, Ee = A + 1;
22842
22848
  let de = 0, ye = 0;
22843
22849
  const se = new R();
22844
- for (let Ee = 0; Ee < we; Ee++) {
22845
- const Ge = Ee * H - $;
22850
+ for (let Me = 0; Me < Ee; Me++) {
22851
+ const Ge = Me * H - $;
22846
22852
  for (let ot = 0; ot < X; ot++) {
22847
- const be = ot * k - W;
22848
- se[m] = be * 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 - Ee / A), de += 1;
22853
+ const Te = ot * k - W;
22854
+ 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;
22849
22855
  }
22850
22856
  }
22851
- for (let Ee = 0; Ee < A; Ee++)
22857
+ for (let Me = 0; Me < A; Me++)
22852
22858
  for (let Ge = 0; Ge < v; Ge++) {
22853
- const ot = d + Ge + X * Ee, be = d + Ge + X * (Ee + 1), lt = d + (Ge + 1) + X * (Ee + 1), Ut = d + (Ge + 1) + X * Ee;
22854
- l.push(ot, be, Ut), l.push(be, lt, Ut), ye += 6;
22859
+ 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;
22860
+ l.push(ot, Te, Ut), l.push(Te, lt, Ut), ye += 6;
22855
22861
  }
22856
22862
  o.addGroup(p, ye, N), p += ye, d += de;
22857
22863
  }
@@ -22870,7 +22876,7 @@ class eo extends _i {
22870
22876
  return new eo(e.width, e.height, e.depth, e.widthSegments, e.heightSegments, e.depthSegments);
22871
22877
  }
22872
22878
  }
22873
- 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 ve();
22879
+ 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();
22874
22880
  let rh = null, ah = 0, oh = 0;
22875
22881
  const dn = (1 + Math.sqrt(5)) / 2, Kn = 1 / dn, Lf = [
22876
22882
  /* @__PURE__ */ new R(-dn, Kn, 0),
@@ -23241,7 +23247,7 @@ function Td(a) {
23241
23247
  return e.depthTest = !1, e.depthWrite = !1, e.blending = Cr, e.name = `PMREM_${a}`, e;
23242
23248
  }
23243
23249
  function VC(a, e, t) {
23244
- 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 = _e(null), h = Q(0), u = O(1 / e), d = O(1 / t), p = O(a), f = {
23250
+ 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 = {
23245
23251
  n: r,
23246
23252
  latitudinal: o,
23247
23253
  weights: s,
@@ -23263,7 +23269,7 @@ function kf(a) {
23263
23269
  }
23264
23270
  function zf(a) {
23265
23271
  const e = Td("equirect");
23266
- return e.fragmentNode = _e(a, Gy(bd), 0), e;
23272
+ return e.fragmentNode = be(a, Gy(bd), 0), e;
23267
23273
  }
23268
23274
  const Gf = /* @__PURE__ */ new WeakMap();
23269
23275
  function HC(a) {
@@ -23306,7 +23312,7 @@ class jC extends rt {
23306
23312
  constructor(e, t = null, s = null) {
23307
23313
  super("vec3"), this._value = e, this._pmrem = null, this.uvNode = t, this.levelNode = s, this._generator = null;
23308
23314
  const i = new Mt();
23309
- i.isRenderTargetTexture = !0, this._texture = _e(i), this._width = Q(0), this._height = Q(0), this._maxMip = Q(0), this.updateBeforeType = ue.RENDER;
23315
+ i.isRenderTargetTexture = !0, this._texture = be(i), this._width = Q(0), this._height = Q(0), this._maxMip = Q(0), this.updateBeforeType = ue.RENDER;
23310
23316
  }
23311
23317
  set value(e) {
23312
23318
  this._value = e, this._pmrem = null;
@@ -23909,7 +23915,7 @@ class T0 extends uA {
23909
23915
  const s = t.minFilter, i = t.generateMipmaps;
23910
23916
  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;
23911
23917
  const n = new eo(5, 5, 5), r = Gy(zy), o = new nt();
23912
- o.colorNode = _e(t, r, 0), o.side = jt, o.blending = Cr;
23918
+ o.colorNode = be(t, r, 0), o.side = jt, o.blending = Cr;
23913
23919
  const l = new gi(n, o), c = new $u();
23914
23920
  c.add(l), t.minFilter === oi && (t.minFilter = ns);
23915
23921
  const h = new b0(1, 10, this), u = e.getMRT();
@@ -24233,7 +24239,7 @@ class vA extends qi {
24233
24239
  * @param {string} name - The uniform's name.
24234
24240
  * @param {Color} value - The uniform's value.
24235
24241
  */
24236
- constructor(e, t = new ve()) {
24242
+ constructor(e, t = new we()) {
24237
24243
  super(e, t), this.isColorUniform = !0, this.boundary = 16, this.itemSize = 3;
24238
24244
  }
24239
24245
  }
@@ -24922,7 +24928,7 @@ class E0 {
24922
24928
  * @return {string} The generated value as a shader string.
24923
24929
  */
24924
24930
  generateConst(e, t = null) {
24925
- if (t === null && (e === "float" || e === "int" || e === "uint" ? t = 0 : e === "bool" ? t = !1 : e === "color" ? t = new ve() : e === "vec2" ? t = new he() : e === "vec3" ? t = new R() : e === "vec4" && (t = new ge())), e === "float") return Oo(t);
24931
+ if (t === null && (e === "float" || e === "int" || e === "uint" ? t = 0 : e === "bool" ? t = !1 : e === "color" ? t = new we() : e === "vec2" ? t = new he() : e === "vec3" ? t = new R() : e === "vec4" && (t = new ge())), e === "float") return Oo(t);
24926
24932
  if (e === "int") return `${Math.round(t)}`;
24927
24933
  if (e === "uint") return t >= 0 ? `${Math.round(t)}u` : "0u";
24928
24934
  if (e === "bool") return t ? "true" : "false";
@@ -25951,7 +25957,7 @@ class LA extends An {
25951
25957
  }
25952
25958
  setupDirectRectArea(e) {
25953
25959
  let t, s;
25954
- e.isAvailable("float32Filterable") ? (t = _e(na.LTC_FLOAT_1), s = _e(na.LTC_FLOAT_2)) : (t = _e(na.LTC_HALF_1), s = _e(na.LTC_HALF_2));
25960
+ e.isAvailable("float32Filterable") ? (t = be(na.LTC_FLOAT_1), s = be(na.LTC_FLOAT_2)) : (t = be(na.LTC_HALF_1), s = be(na.LTC_HALF_2));
25955
25961
  const { colorNode: i, light: n } = this, r = c0(n);
25956
25962
  return {
25957
25963
  lightColor: i,
@@ -26016,7 +26022,7 @@ class wd extends An {
26016
26022
  decayExponent: i
26017
26023
  });
26018
26024
  let d = t.mul(c).mul(u), p, f;
26019
- return n.colorNode ? (f = this.getLightCoord(e), p = n.colorNode(f)) : n.map && (f = this.getLightCoord(e), p = _e(n.map, f.xy).onRenderUpdate(() => n.map)), p && (d = f.mul(2).sub(1).abs().lessThan(1).all().select(d.mul(p), d)), { lightColor: d, lightDirection: o };
26025
+ return n.colorNode ? (f = this.getLightCoord(e), p = n.colorNode(f)) : n.map && (f = this.getLightCoord(e), p = be(n.map, f.xy).onRenderUpdate(() => n.map)), p && (d = f.mul(2).sub(1).abs().lessThan(1).all().select(d.mul(p), d)), { lightColor: d, lightDirection: o };
26020
26026
  }
26021
26027
  }
26022
26028
  class UA extends wd {
@@ -26035,7 +26041,7 @@ class UA extends wd {
26035
26041
  let i = null;
26036
26042
  if (s && s.isTexture === !0) {
26037
26043
  const n = t.acos().mul(1 / Math.PI);
26038
- i = _e(s, V(n, 0), 0).r;
26044
+ i = be(s, V(n, 0), 0).r;
26039
26045
  } else
26040
26046
  i = super.getSpotAttenuation(t);
26041
26047
  return i;
@@ -26095,7 +26101,7 @@ class VA extends An {
26095
26101
  * @param {?HemisphereLight} [light=null] - The hemisphere light source.
26096
26102
  */
26097
26103
  constructor(e = null) {
26098
- super(e), this.lightPositionNode = l0(e), this.lightDirectionNode = this.lightPositionNode.normalize(), this.groundColorNode = Q(new ve()).setGroup(K);
26104
+ super(e), this.lightPositionNode = l0(e), this.lightDirectionNode = this.lightPositionNode.normalize(), this.groundColorNode = Q(new we()).setGroup(K);
26099
26105
  }
26100
26106
  /**
26101
26107
  * Overwritten to updated hemisphere light specific uniforms.
@@ -26321,7 +26327,7 @@ class C0 extends nc {
26321
26327
  */
26322
26328
  indirect({ context: e }) {
26323
26329
  const t = e.ambientOcclusion, s = e.reflectedLight, i = e.irradianceLightMap;
26324
- s.indirectDiffuse.assign(ne(0)), i ? s.indirectDiffuse.addAssign(i) : s.indirectDiffuse.addAssign(ne(1, 1, 1, 0)), s.indirectDiffuse.mulAssign(t), s.indirectDiffuse.mulAssign(Se.rgb);
26330
+ s.indirectDiffuse.assign(ne(0)), i ? s.indirectDiffuse.addAssign(i) : s.indirectDiffuse.addAssign(ne(1, 1, 1, 0)), s.indirectDiffuse.mulAssign(t), s.indirectDiffuse.mulAssign(ve.rgb);
26325
26331
  }
26326
26332
  /**
26327
26333
  * Implements the environment mapping.
@@ -26368,7 +26374,7 @@ class A0 extends C0 {
26368
26374
  */
26369
26375
  direct({ lightDirection: e, lightColor: t, reflectedLight: s }) {
26370
26376
  const n = st.dot(e).clamp().mul(t);
26371
- s.directDiffuse.addAssign(n.mul(Dr({ diffuseColor: Se.rgb }))), this.specular === !0 && s.directSpecular.addAssign(n.mul(JA({ lightDirection: e })).mul(hl));
26377
+ s.directDiffuse.addAssign(n.mul(Dr({ diffuseColor: ve.rgb }))), this.specular === !0 && s.directSpecular.addAssign(n.mul(JA({ lightDirection: e })).mul(hl));
26372
26378
  }
26373
26379
  /**
26374
26380
  * Implements the indirect lighting.
@@ -26377,7 +26383,7 @@ class A0 extends C0 {
26377
26383
  */
26378
26384
  indirect(e) {
26379
26385
  const { ambientOcclusion: t, irradiance: s, reflectedLight: i } = e.context;
26380
- i.indirectDiffuse.addAssign(s.mul(Dr({ diffuseColor: Se }))), i.indirectDiffuse.mulAssign(t);
26386
+ i.indirectDiffuse.addAssign(s.mul(Dr({ diffuseColor: ve }))), i.indirectDiffuse.mulAssign(t);
26381
26387
  }
26382
26388
  }
26383
26389
  const R0 = /* @__PURE__ */ I((a) => {
@@ -26602,7 +26608,7 @@ class N0 extends nc {
26602
26608
  i,
26603
26609
  s,
26604
26610
  si,
26605
- Se,
26611
+ ve,
26606
26612
  Jt,
26607
26613
  Fl,
26608
26614
  // specularF90
@@ -26619,7 +26625,7 @@ class N0 extends nc {
26619
26625
  gy,
26620
26626
  my,
26621
26627
  this.dispersion ? yy : null
26622
- ), n.backdropAlpha = xu, Se.a.mulAssign(Ve(1, n.backdrop.a, xu));
26628
+ ), n.backdropAlpha = xu, ve.a.mulAssign(Ve(1, n.backdrop.a, xu));
26623
26629
  }
26624
26630
  super.start(e);
26625
26631
  }
@@ -26642,7 +26648,7 @@ class N0 extends nc {
26642
26648
  const o = ba.dot(e).clamp().mul(t);
26643
26649
  this.clearcoatSpecularDirect.addAssign(o.mul(Vf({ lightDirection: e, f0: uh, f90: dh, roughness: Pl, normalView: ba })));
26644
26650
  }
26645
- s.directDiffuse.addAssign(n.mul(Dr({ diffuseColor: Se.rgb }))), s.directSpecular.addAssign(n.mul(Vf({ lightDirection: e, f0: Jt, f90: 1, roughness: si, iridescence: this.iridescence, f: this.iridescenceFresnel, USE_IRIDESCENCE: this.iridescence, USE_ANISOTROPY: this.anisotropy })));
26651
+ s.directDiffuse.addAssign(n.mul(Dr({ diffuseColor: ve.rgb }))), s.directSpecular.addAssign(n.mul(Vf({ lightDirection: e, f0: Jt, f90: 1, roughness: si, iridescence: this.iridescence, f: this.iridescenceFresnel, USE_IRIDESCENCE: this.iridescence, USE_ANISOTROPY: this.anisotropy })));
26646
26652
  }
26647
26653
  /**
26648
26654
  * This method is intended for implementing the direct light term for
@@ -26657,7 +26663,7 @@ class N0 extends nc {
26657
26663
  B(0, 1, 0),
26658
26664
  B(y.z, 0, y.w)
26659
26665
  ).toVar(), _ = Jt.mul(g.x).add(Jt.oneMinus().mul(g.y)).toVar();
26660
- n.directSpecular.addAssign(e.mul(_).mul(Zf({ N: d, V: p, P: f, mInv: x, p0: l, p1: c, p2: h, p3: u }))), n.directDiffuse.addAssign(e.mul(Se).mul(Zf({ N: d, V: p, P: f, mInv: It(1, 0, 0, 0, 1, 0, 0, 0, 1), p0: l, p1: c, p2: h, p3: u })));
26666
+ n.directSpecular.addAssign(e.mul(_).mul(Zf({ N: d, V: p, P: f, mInv: x, p0: l, p1: c, p2: h, p3: u }))), n.directDiffuse.addAssign(e.mul(ve).mul(Zf({ N: d, V: p, P: f, mInv: It(1, 0, 0, 0, 1, 0, 0, 0, 1), p0: l, p1: c, p2: h, p3: u })));
26661
26667
  }
26662
26668
  /**
26663
26669
  * Implements the indirect lighting.
@@ -26674,7 +26680,7 @@ class N0 extends nc {
26674
26680
  */
26675
26681
  indirectDiffuse(e) {
26676
26682
  const { irradiance: t, reflectedLight: s } = e.context;
26677
- s.indirectDiffuse.addAssign(t.mul(Dr({ diffuseColor: Se })));
26683
+ s.indirectDiffuse.addAssign(t.mul(Dr({ diffuseColor: ve })));
26678
26684
  }
26679
26685
  /**
26680
26686
  * Implements the indirect specular term.
@@ -26701,7 +26707,7 @@ class N0 extends nc {
26701
26707
  }
26702
26708
  const n = B().toVar("singleScattering"), r = B().toVar("multiScattering"), o = s.mul(1 / Math.PI);
26703
26709
  this.computeMultiscattering(n, r, Fl);
26704
- const l = n.add(r), c = Se.mul(l.r.max(l.g).max(l.b).oneMinus());
26710
+ const l = n.add(r), c = ve.mul(l.r.max(l.g).max(l.b).oneMinus());
26705
26711
  i.indirectSpecular.addAssign(t.mul(n)), i.indirectSpecular.addAssign(r.mul(o)), i.indirectDiffuse.addAssign(c.mul(o));
26706
26712
  }
26707
26713
  /**
@@ -26933,11 +26939,11 @@ class fR extends Wi {
26933
26939
  return g0(s);
26934
26940
  {
26935
26941
  let r;
26936
- return s.isCubeTexture === !0 ? r = Wa(s) : r = _e(s), v0(r);
26942
+ return s.isCubeTexture === !0 ? r = Wa(s) : r = be(s), v0(r);
26937
26943
  }
26938
26944
  } else {
26939
26945
  if (s.isTexture === !0)
26940
- return _e(s, vr.flipY()).setUpdateMatrix(!0);
26946
+ return be(s, vr.flipY()).setUpdateMatrix(!0);
26941
26947
  s.isColor !== !0 && console.error("WebGPUNodes: Unsupported background configuration.", s);
26942
26948
  }
26943
26949
  }, i);
@@ -26999,7 +27005,7 @@ class fR extends Wi {
26999
27005
  if (s.isCubeTexture === !0)
27000
27006
  return Wa(s);
27001
27007
  if (s.isTexture === !0)
27002
- return _e(s);
27008
+ return be(s);
27003
27009
  console.error("Nodes: Unsupported environment configuration.", s);
27004
27010
  });
27005
27011
  t.environmentNode = i, t.environment = s;
@@ -27040,7 +27046,7 @@ class fR extends Wi {
27040
27046
  * @return {Node} The output node.
27041
27047
  */
27042
27048
  getOutputNode(e) {
27043
- const t = this.renderer, s = this.getOutputCacheKey(), i = e.isArrayTexture ? OM(e, B(vr, Xl("gl_ViewID_OVR"))).renderOutput(t.toneMapping, t.currentColorSpace) : _e(e, vr).renderOutput(t.toneMapping, t.currentColorSpace);
27049
+ 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);
27044
27050
  return tm.set(e, s), i;
27045
27051
  }
27046
27052
  /**
@@ -27551,8 +27557,8 @@ class Cd extends _i {
27551
27557
  for (let A = 0; A <= n; A++) {
27552
27558
  const N = [], k = A / n, H = k * (t - e) + e;
27553
27559
  for (let W = 0; W <= i; W++) {
27554
- const $ = W / i, q = $ * l + o, X = Math.sin(q), we = Math.cos(q);
27555
- T.x = H * X, T.y = -k * s + y, T.z = H * we, u.push(T.x, T.y, T.z), b.set(X, v, we).normalize(), d.push(b.x, b.y, b.z), p.push($, 1 - k), N.push(f++);
27560
+ const $ = W / i, q = $ * l + o, X = Math.sin(q), Ee = Math.cos(q);
27561
+ T.x = H * X, T.y = -k * s + y, T.z = H * Ee, u.push(T.x, T.y, T.z), b.set(X, v, Ee).normalize(), d.push(b.x, b.y, b.z), p.push($, 1 - k), N.push(f++);
27556
27562
  }
27557
27563
  m.push(N);
27558
27564
  }
@@ -27571,8 +27577,8 @@ class Cd extends _i {
27571
27577
  u.push(0, y * k, 0), d.push(0, k, 0), p.push(0.5, 0.5), f++;
27572
27578
  const H = f;
27573
27579
  for (let W = 0; W <= i; W++) {
27574
- const q = W / i * l + o, X = Math.cos(q), we = Math.sin(q);
27575
- v.x = N * we, v.y = y * k, v.z = N * X, u.push(v.x, v.y, v.z), d.push(0, k, 0), E.x = X * 0.5 + 0.5, E.y = we * 0.5 * k + 0.5, p.push(E.x, E.y), f++;
27580
+ const q = W / i * l + o, X = Math.cos(q), Ee = Math.sin(q);
27581
+ v.x = N * Ee, v.y = y * k, v.z = N * X, u.push(v.x, v.y, v.z), d.push(0, k, 0), E.x = X * 0.5 + 0.5, E.y = Ee * 0.5 * k + 0.5, p.push(E.x, E.y), f++;
27576
27582
  }
27577
27583
  for (let W = 0; W < i; W++) {
27578
27584
  const $ = T + W, q = H + W;
@@ -32313,10 +32319,10 @@ class YR {
32313
32319
  o.pixelStorei(o.UNPACK_ROW_LENGTH, v.width), o.pixelStorei(o.UNPACK_IMAGE_HEIGHT, v.height), o.pixelStorei(o.UNPACK_SKIP_PIXELS, g), o.pixelStorei(o.UNPACK_SKIP_ROWS, x), o.pixelStorei(o.UNPACK_SKIP_IMAGES, _);
32314
32320
  const $ = t.isDataArrayTexture || t.isData3DTexture || t.isArrayTexture;
32315
32321
  if (e.isRenderTargetTexture || e.isDepthTexture) {
32316
- const q = l.get(e), X = l.get(t), we = l.get(q.renderTarget), de = l.get(X.renderTarget), ye = we.framebuffers[q.cacheKey], se = de.framebuffers[X.cacheKey];
32322
+ 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];
32317
32323
  c.bindFramebuffer(o.READ_FRAMEBUFFER, ye), c.bindFramebuffer(o.DRAW_FRAMEBUFFER, se);
32318
- let Ee = o.COLOR_BUFFER_BIT;
32319
- e.isDepthTexture && (Ee = o.DEPTH_BUFFER_BIT), o.blitFramebuffer(g, x, f, m, b, T, f, m, Ee, o.NEAREST), c.bindFramebuffer(o.READ_FRAMEBUFFER, null), c.bindFramebuffer(o.DRAW_FRAMEBUFFER, null);
32324
+ let Me = o.COLOR_BUFFER_BIT;
32325
+ 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);
32320
32326
  } else
32321
32327
  $ ? 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);
32322
32328
  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();
@@ -33109,34 +33115,34 @@ class mm extends U0 {
33109
33115
  if (e.camera.isArrayCamera === !0 && e.camera.cameras.length > 0 && e.camera.isMultiViewCamera === !1) {
33110
33116
  const v = this.get(e.camera), A = e.camera.cameras, N = e.getBindingGroup("cameraIndex").bindings[0];
33111
33117
  if (v.indexesGPU === void 0 || v.indexesGPU.length !== A.length) {
33112
- const X = new Uint32Array([0, 0, 0, 0]), we = [];
33118
+ const X = new Uint32Array([0, 0, 0, 0]), Ee = [];
33113
33119
  for (let de = 0, ye = A.length; de < ye; de++) {
33114
33120
  const se = l.createBuffer();
33115
- X[0] = de, l.bindBuffer(l.UNIFORM_BUFFER, se), l.bufferData(l.UNIFORM_BUFFER, X, l.STATIC_DRAW), we.push(se);
33121
+ X[0] = de, l.bindBuffer(l.UNIFORM_BUFFER, se), l.bufferData(l.UNIFORM_BUFFER, X, l.STATIC_DRAW), Ee.push(se);
33116
33122
  }
33117
- v.indexesGPU = we;
33123
+ v.indexesGPU = Ee;
33118
33124
  }
33119
33125
  const k = this.get(N), H = this.renderer.getPixelRatio(), W = this._currentContext.renderTarget, $ = this._isRenderCameraDepthArray(this._currentContext), q = this._currentContext.activeCubeFace;
33120
33126
  if ($) {
33121
33127
  const X = this.get(W.depthTexture);
33122
33128
  if (X.clearedRenderId !== this.renderer._nodes.nodeFrame.renderId) {
33123
33129
  X.clearedRenderId = this.renderer._nodes.nodeFrame.renderId;
33124
- const { stencilBuffer: we } = W;
33130
+ const { stencilBuffer: Ee } = W;
33125
33131
  for (let de = 0, ye = A.length; de < ye; de++)
33126
- this.renderer._activeCubeFace = de, this._currentContext.activeCubeFace = de, this._setFramebuffer(this._currentContext), this.clear(!1, !0, we, this._currentContext, !1);
33132
+ this.renderer._activeCubeFace = de, this._currentContext.activeCubeFace = de, this._setFramebuffer(this._currentContext), this.clear(!1, !0, Ee, this._currentContext, !1);
33127
33133
  this.renderer._activeCubeFace = q, this._currentContext.activeCubeFace = q;
33128
33134
  }
33129
33135
  }
33130
- for (let X = 0, we = A.length; X < we; X++) {
33136
+ for (let X = 0, Ee = A.length; X < Ee; X++) {
33131
33137
  const de = A[X];
33132
33138
  if (t.layers.test(de.layers)) {
33133
33139
  $ && (this.renderer._activeCubeFace = X, this._currentContext.activeCubeFace = X, this._setFramebuffer(this._currentContext));
33134
33140
  const ye = de.viewport;
33135
33141
  if (ye !== void 0) {
33136
- const se = ye.x * H, Ee = ye.y * H, Ge = ye.width * H, ot = ye.height * H;
33142
+ const se = ye.x * H, Me = ye.y * H, Ge = ye.width * H, ot = ye.height * H;
33137
33143
  c.viewport(
33138
33144
  Math.floor(se),
33139
- Math.floor(e.context.height - ot - Ee),
33145
+ Math.floor(e.context.height - ot - Me),
33140
33146
  Math.floor(Ge),
33141
33147
  Math.floor(ot)
33142
33148
  );
@@ -33803,7 +33809,7 @@ const fr = {
33803
33809
  Always: "always"
33804
33810
  }, Nt = {
33805
33811
  Store: "store"
33806
- }, Me = {
33812
+ }, Ce = {
33807
33813
  Load: "load",
33808
33814
  Clear: "clear"
33809
33815
  }, bh = {
@@ -34232,7 +34238,7 @@ fn main( @location( 0 ) vTex : vec2<f32> ) -> @location( 0 ) vec4<f32> {
34232
34238
  }), _ = d.beginRenderPass({
34233
34239
  colorAttachments: [{
34234
34240
  view: y,
34235
- loadOp: Me.Clear,
34241
+ loadOp: Ce.Clear,
34236
34242
  storeOp: Nt.Store,
34237
34243
  clearValue: [0, 0, 0, 0]
34238
34244
  }]
@@ -34290,7 +34296,7 @@ fn main( @location( 0 ) vTex : vec2<f32> ) -> @location( 0 ) vec4<f32> {
34290
34296
  }), u = {
34291
34297
  colorAttachments: [{
34292
34298
  view: h,
34293
- loadOp: Me.Clear,
34299
+ loadOp: Ce.Clear,
34294
34300
  storeOp: Nt.Store,
34295
34301
  clearValue: [0, 0, 0, 0]
34296
34302
  }]
@@ -37649,7 +37655,7 @@ class M1 extends U0 {
37649
37655
  view: h.view,
37650
37656
  depthSlice: h.depthSlice,
37651
37657
  resolveTarget: h.resolveTarget,
37652
- loadOp: t.loadOp || Me.Load,
37658
+ loadOp: t.loadOp || Ce.Load,
37653
37659
  storeOp: t.storeOp || Nt.Store,
37654
37660
  clearValue: u
37655
37661
  });
@@ -37669,19 +37675,19 @@ class M1 extends U0 {
37669
37675
  let n;
37670
37676
  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);
37671
37677
  let r;
37672
- e.textures === null ? r = this._getDefaultRenderPassDescriptor() : r = this._getRenderPassDescriptor(e, { loadOp: Me.Load }), this.initTimestampQuery(e, r), r.occlusionQuerySet = n;
37678
+ e.textures === null ? r = this._getDefaultRenderPassDescriptor() : r = this._getRenderPassDescriptor(e, { loadOp: Ce.Load }), this.initTimestampQuery(e, r), r.occlusionQuerySet = n;
37673
37679
  const o = r.depthStencilAttachment;
37674
37680
  if (e.textures !== null) {
37675
37681
  const c = r.colorAttachments;
37676
37682
  for (let h = 0; h < c.length; h++) {
37677
37683
  const u = c[h];
37678
- 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;
37684
+ 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;
37679
37685
  }
37680
37686
  } else {
37681
37687
  const c = r.colorAttachments[0];
37682
- e.clearColor ? (c.clearValue = e.clearColorValue, c.loadOp = Me.Clear) : c.loadOp = Me.Load, c.storeOp = Nt.Store;
37688
+ e.clearColor ? (c.clearValue = e.clearColorValue, c.loadOp = Ce.Clear) : c.loadOp = Ce.Load, c.storeOp = Nt.Store;
37683
37689
  }
37684
- 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);
37690
+ 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);
37685
37691
  const l = s.createCommandEncoder({ label: "renderContext_" + e.id });
37686
37692
  if (this._isRenderCameraDepthArray(e) === !0) {
37687
37693
  const c = e.camera.cameras;
@@ -37740,7 +37746,7 @@ class M1 extends U0 {
37740
37746
  arrayLayerCount: 1
37741
37747
  })), l.depthStencilAttachment = {
37742
37748
  view: r.viewCache[c],
37743
- depthLoadOp: n.depthLoadOp || Me.Clear,
37749
+ depthLoadOp: n.depthLoadOp || Ce.Clear,
37744
37750
  depthStoreOp: n.depthStoreOp || Nt.Store,
37745
37751
  depthClearValue: n.depthClearValue || 1
37746
37752
  }, e.stencil && (l.depthStencilAttachment.stencilLoadOp = n.stencilLoadOp, l.depthStencilAttachment.stencilStoreOp = n.stencilStoreOp, l.depthStencilAttachment.stencilClearValue = n.stencilClearValue);
@@ -37763,7 +37769,7 @@ class M1 extends U0 {
37763
37769
  const n = t.layerDescriptors[i];
37764
37770
  if (n.depthStencilAttachment) {
37765
37771
  const r = n.depthStencilAttachment;
37766
- 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);
37772
+ 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);
37767
37773
  }
37768
37774
  }
37769
37775
  }
@@ -37893,20 +37899,20 @@ class M1 extends U0 {
37893
37899
  if (e) {
37894
37900
  o = f.colorAttachments;
37895
37901
  const m = o[0];
37896
- m.clearValue = c, m.loadOp = Me.Clear, m.storeOp = Nt.Store;
37902
+ m.clearValue = c, m.loadOp = Ce.Clear, m.storeOp = Nt.Store;
37897
37903
  }
37898
37904
  (h || u) && (l = f.depthStencilAttachment);
37899
37905
  } else {
37900
37906
  h = i.depth, u = i.stencil;
37901
37907
  const f = {
37902
- loadOp: e ? Me.Clear : Me.Load,
37908
+ loadOp: e ? Ce.Clear : Ce.Load,
37903
37909
  clearValue: e ? c : void 0
37904
37910
  };
37905
- 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);
37911
+ 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);
37906
37912
  const m = this._getRenderPassDescriptor(i, f);
37907
37913
  o = m.colorAttachments, l = m.depthStencilAttachment;
37908
37914
  }
37909
- 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));
37915
+ 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));
37910
37916
  const d = n.createCommandEncoder({ label: "clear" });
37911
37917
  d.beginRenderPass({
37912
37918
  colorAttachments: o,
@@ -38456,8 +38462,8 @@ class M1 extends U0 {
38456
38462
  ), i.currentPass) {
38457
38463
  const { descriptor: l } = i;
38458
38464
  for (let c = 0; c < l.colorAttachments.length; c++)
38459
- l.colorAttachments[c].loadOp = Me.Load;
38460
- 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) {
38465
+ l.colorAttachments[c].loadOp = Ce.Load;
38466
+ 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) {
38461
38467
  const { x: c, y: h, width: u, height: d } = t.scissorValue;
38462
38468
  i.currentPass.setScissorRect(c, h, u, d);
38463
38469
  }
@@ -38477,7 +38483,7 @@ class C1 extends qt {
38477
38483
  * by {@link Color#set}.
38478
38484
  */
38479
38485
  constructor(e) {
38480
- super(), this.isMeshPhongMaterial = !0, this.type = "MeshPhongMaterial", this.color = new ve(16777215), this.specular = new ve(1118481), this.shininess = 30, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new ve(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Gi, this.normalScale = new he(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new gs(), this.combine = Gl, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
38486
+ super(), this.isMeshPhongMaterial = !0, this.type = "MeshPhongMaterial", this.color = new we(16777215), this.specular = new we(1118481), this.shininess = 30, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new we(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Gi, this.normalScale = new he(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new gs(), this.combine = Gl, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
38481
38487
  }
38482
38488
  copy(e) {
38483
38489
  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;
@@ -38541,7 +38547,7 @@ class G0 extends qt {
38541
38547
  * by {@link Color#set}.
38542
38548
  */
38543
38549
  constructor(e) {
38544
- super(), this.isMeshStandardMaterial = !0, this.type = "MeshStandardMaterial", this.defines = { STANDARD: "" }, this.color = new ve(16777215), this.roughness = 1, this.metalness = 0, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new ve(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Gi, this.normalScale = new he(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.roughnessMap = null, this.metalnessMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new gs(), this.envMapIntensity = 1, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
38550
+ super(), this.isMeshStandardMaterial = !0, this.type = "MeshStandardMaterial", this.defines = { STANDARD: "" }, this.color = new we(16777215), this.roughness = 1, this.metalness = 0, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new we(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Gi, this.normalScale = new he(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.roughnessMap = null, this.metalnessMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new gs(), this.envMapIntensity = 1, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
38545
38551
  }
38546
38552
  copy(e) {
38547
38553
  return super.copy(e), this.defines = { STANDARD: "" }, this.color.copy(e.color), this.roughness = e.roughness, this.metalness = e.metalness, 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.roughnessMap = e.roughnessMap, this.metalnessMap = e.metalnessMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.envMapIntensity = e.envMapIntensity, 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;
@@ -38584,7 +38590,7 @@ class V0 extends nt {
38584
38590
  * Setups the specular related node variables.
38585
38591
  */
38586
38592
  setupSpecular() {
38587
- const e = Ve(B(0.04), Se.rgb, Nl);
38593
+ const e = Ve(B(0.04), ve.rgb, Nl);
38588
38594
  Jt.assign(e), Fl.assign(1);
38589
38595
  }
38590
38596
  /**
@@ -38596,7 +38602,7 @@ class V0 extends nt {
38596
38602
  const e = this.metalnessNode ? O(this.metalnessNode) : AE;
38597
38603
  Nl.assign(e);
38598
38604
  let t = this.roughnessNode ? O(this.roughnessNode) : CE;
38599
- t = x0({ roughness: t }), si.assign(t), this.setupSpecular(), Se.assign(ne(Se.rgb.mul(e.oneMinus()), Se.a));
38605
+ t = x0({ roughness: t }), si.assign(t), this.setupSpecular(), ve.assign(ne(ve.rgb.mul(e.oneMinus()), ve.a));
38600
38606
  }
38601
38607
  copy(e) {
38602
38608
  return this.emissiveNode = e.emissiveNode, this.metalnessNode = e.metalnessNode, this.roughnessNode = e.roughnessNode, super.copy(e);
@@ -38623,7 +38629,7 @@ class P1 extends G0 {
38623
38629
  set: function(t) {
38624
38630
  this.ior = (1 + 0.4 * t) / (1 - 0.4 * t);
38625
38631
  }
38626
- }), this.iridescenceMap = null, this.iridescenceIOR = 1.3, this.iridescenceThicknessRange = [100, 400], this.iridescenceThicknessMap = null, this.sheenColor = new ve(0), this.sheenColorMap = null, this.sheenRoughness = 1, this.sheenRoughnessMap = null, this.transmissionMap = null, this.thickness = 0, this.thicknessMap = null, this.attenuationDistance = 1 / 0, this.attenuationColor = new ve(1, 1, 1), this.specularIntensity = 1, this.specularIntensityMap = null, this.specularColor = new ve(1, 1, 1), this.specularColorMap = null, this._anisotropy = 0, this._clearcoat = 0, this._dispersion = 0, this._iridescence = 0, this._sheen = 0, this._transmission = 0, this.setValues(e);
38632
+ }), this.iridescenceMap = null, this.iridescenceIOR = 1.3, this.iridescenceThicknessRange = [100, 400], this.iridescenceThicknessMap = null, this.sheenColor = new we(0), this.sheenColorMap = null, this.sheenRoughness = 1, this.sheenRoughnessMap = null, this.transmissionMap = null, this.thickness = 0, this.thicknessMap = null, this.attenuationDistance = 1 / 0, this.attenuationColor = new we(1, 1, 1), this.specularIntensity = 1, this.specularIntensityMap = null, this.specularColor = new we(1, 1, 1), this.specularColorMap = null, this._anisotropy = 0, this._clearcoat = 0, this._dispersion = 0, this._iridescence = 0, this._sheen = 0, this._transmission = 0, this.setValues(e);
38627
38633
  }
38628
38634
  /**
38629
38635
  * The anisotropy strength.
@@ -38787,7 +38793,7 @@ class D1 extends V0 {
38787
38793
  */
38788
38794
  setupSpecular() {
38789
38795
  const e = this.iorNode ? O(this.iorNode) : VE;
38790
- al.assign(e), Jt.assign(Ve(Pr(Cy(al.sub(1).div(al.add(1))).mul(ME), B(1)).mul(hf), Se.rgb, Nl)), Fl.assign(Ve(hf, 1, Nl));
38796
+ 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));
38791
38797
  }
38792
38798
  /**
38793
38799
  * Setups the lighting model.
@@ -38866,7 +38872,7 @@ class B1 extends nc {
38866
38872
  */
38867
38873
  direct({ lightDirection: e, lightColor: t, reflectedLight: s }, i) {
38868
38874
  const n = O1({ normal: Vy, lightDirection: e, builder: i }).mul(t);
38869
- s.directDiffuse.addAssign(n.mul(Dr({ diffuseColor: Se.rgb })));
38875
+ s.directDiffuse.addAssign(n.mul(Dr({ diffuseColor: ve.rgb })));
38870
38876
  }
38871
38877
  /**
38872
38878
  * Implements the indirect lighting.
@@ -38875,7 +38881,7 @@ class B1 extends nc {
38875
38881
  */
38876
38882
  indirect(e) {
38877
38883
  const { ambientOcclusion: t, irradiance: s, reflectedLight: i } = e.context;
38878
- i.indirectDiffuse.addAssign(s.mul(Dr({ diffuseColor: Se }))), i.indirectDiffuse.mulAssign(t);
38884
+ i.indirectDiffuse.addAssign(s.mul(Dr({ diffuseColor: ve }))), i.indirectDiffuse.mulAssign(t);
38879
38885
  }
38880
38886
  }
38881
38887
  class I1 extends qt {
@@ -38889,7 +38895,7 @@ class I1 extends qt {
38889
38895
  * by {@link Color#set}.
38890
38896
  */
38891
38897
  constructor(e) {
38892
- super(), this.isMeshToonMaterial = !0, this.defines = { TOON: "" }, this.type = "MeshToonMaterial", this.color = new ve(16777215), this.map = null, this.gradientMap = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new ve(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Gi, this.normalScale = new he(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.alphaMap = null, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(e);
38898
+ super(), this.isMeshToonMaterial = !0, this.defines = { TOON: "" }, this.type = "MeshToonMaterial", this.color = new we(16777215), this.map = null, this.gradientMap = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new we(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Gi, this.normalScale = new he(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.alphaMap = null, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(e);
38893
38899
  }
38894
38900
  copy(e) {
38895
38901
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.gradientMap = e.gradientMap, 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.alphaMap = e.alphaMap, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
@@ -38985,7 +38991,7 @@ class G1 extends nt {
38985
38991
  * @return {Node<vec3>} The outgoing light node.
38986
38992
  */
38987
38993
  setupOutgoingLight() {
38988
- return Se.rgb;
38994
+ return ve.rgb;
38989
38995
  }
38990
38996
  /**
38991
38997
  * Setups the lighting model.
@@ -39007,7 +39013,7 @@ class V1 extends qt {
39007
39013
  * by {@link Color#set}.
39008
39014
  */
39009
39015
  constructor(e) {
39010
- super(), this.isMeshLambertMaterial = !0, this.type = "MeshLambertMaterial", this.color = new ve(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new ve(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Gi, this.normalScale = new he(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new gs(), this.combine = Gl, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
39016
+ super(), this.isMeshLambertMaterial = !0, this.type = "MeshLambertMaterial", this.color = new we(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new we(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Gi, this.normalScale = new he(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new gs(), this.combine = Gl, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
39011
39017
  }
39012
39018
  copy(e) {
39013
39019
  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.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;
@@ -39082,7 +39088,7 @@ class q1 extends nt {
39082
39088
  */
39083
39089
  setupDiffuseColor() {
39084
39090
  const e = this.opacityNode ? O(this.opacityNode) : t0;
39085
- Se.assign(cd(ne(Hw(st), e), ts));
39091
+ ve.assign(cd(ne(Hw(st), e), ts));
39086
39092
  }
39087
39093
  }
39088
39094
  class Y1 extends qt {
@@ -39096,7 +39102,7 @@ class Y1 extends qt {
39096
39102
  * by {@link Color#set}.
39097
39103
  */
39098
39104
  constructor(e) {
39099
- super(), this.isMeshMatcapMaterial = !0, this.defines = { MATCAP: "" }, this.type = "MeshMatcapMaterial", this.color = new ve(16777215), this.matcap = null, this.map = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Gi, this.normalScale = new he(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.alphaMap = null, this.flatShading = !1, this.fog = !0, this.setValues(e);
39105
+ super(), this.isMeshMatcapMaterial = !0, this.defines = { MATCAP: "" }, this.type = "MeshMatcapMaterial", this.color = new we(16777215), this.matcap = null, this.map = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Gi, this.normalScale = new he(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.alphaMap = null, this.flatShading = !1, this.fog = !0, this.setValues(e);
39100
39106
  }
39101
39107
  copy(e) {
39102
39108
  return super.copy(e), this.defines = { MATCAP: "" }, this.color.copy(e.color), this.matcap = e.matcap, this.map = e.map, 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.alphaMap = e.alphaMap, this.flatShading = e.flatShading, this.fog = e.fog, this;
@@ -39123,7 +39129,7 @@ class Z1 extends nt {
39123
39129
  setupVariants(e) {
39124
39130
  const t = zw;
39125
39131
  let s;
39126
- e.material.matcap ? s = Bi("matcap", "texture").context({ getUV: () => t }) : s = B(Ve(0.2, 0.8, t.y)), Se.rgb.mulAssign(s.rgb);
39132
+ e.material.matcap ? s = Bi("matcap", "texture").context({ getUV: () => t }) : s = B(Ve(0.2, 0.8, t.y)), ve.rgb.mulAssign(s.rgb);
39127
39133
  }
39128
39134
  }
39129
39135
  class H0 extends qt {
@@ -39137,7 +39143,7 @@ class H0 extends qt {
39137
39143
  * by {@link Color#set}.
39138
39144
  */
39139
39145
  constructor(e) {
39140
- super(), this.isLineBasicMaterial = !0, this.type = "LineBasicMaterial", this.color = new ve(16777215), this.map = null, this.linewidth = 1, this.linecap = "round", this.linejoin = "round", this.fog = !0, this.setValues(e);
39146
+ super(), this.isLineBasicMaterial = !0, this.type = "LineBasicMaterial", this.color = new we(16777215), this.map = null, this.linewidth = 1, this.linecap = "round", this.linejoin = "round", this.fog = !0, this.setValues(e);
39141
39147
  }
39142
39148
  copy(e) {
39143
39149
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.linewidth = e.linewidth, this.linecap = e.linecap, this.linejoin = e.linejoin, this.fog = e.fog, this;
@@ -39210,7 +39216,7 @@ class sN extends qt {
39210
39216
  * by {@link Color#set}.
39211
39217
  */
39212
39218
  constructor(e) {
39213
- super(), this.isSpriteMaterial = !0, this.type = "SpriteMaterial", this.color = new ve(16777215), this.map = null, this.alphaMap = null, this.rotation = 0, this.sizeAttenuation = !0, this.transparent = !0, this.fog = !0, this.setValues(e);
39219
+ super(), this.isSpriteMaterial = !0, this.type = "SpriteMaterial", this.color = new we(16777215), this.map = null, this.alphaMap = null, this.rotation = 0, this.sizeAttenuation = !0, this.transparent = !0, this.fog = !0, this.setValues(e);
39214
39220
  }
39215
39221
  copy(e) {
39216
39222
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.alphaMap = e.alphaMap, this.rotation = e.rotation, this.sizeAttenuation = e.sizeAttenuation, this.fog = e.fog, this;
@@ -39282,7 +39288,7 @@ class nN extends qt {
39282
39288
  * by {@link Color#set}.
39283
39289
  */
39284
39290
  constructor(e) {
39285
- super(), this.isPointsMaterial = !0, this.type = "PointsMaterial", this.color = new ve(16777215), this.map = null, this.alphaMap = null, this.size = 1, this.sizeAttenuation = !0, this.fog = !0, this.setValues(e);
39291
+ super(), this.isPointsMaterial = !0, this.type = "PointsMaterial", this.color = new we(16777215), this.map = null, this.alphaMap = null, this.size = 1, this.sizeAttenuation = !0, this.fog = !0, this.setValues(e);
39286
39292
  }
39287
39293
  copy(e) {
39288
39294
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.alphaMap = e.alphaMap, this.size = e.size, this.sizeAttenuation = e.sizeAttenuation, this.fog = e.fog, this;
@@ -39351,7 +39357,7 @@ class oN extends nc {
39351
39357
  * @param {NodeBuilder} builder - The current node builder.
39352
39358
  */
39353
39359
  finish({ context: e }) {
39354
- Se.a.mulAssign(this.shadowNode.oneMinus()), e.outgoingLight.rgb.assign(Se.rgb);
39360
+ ve.a.mulAssign(this.shadowNode.oneMinus()), e.outgoingLight.rgb.assign(ve.rgb);
39355
39361
  }
39356
39362
  }
39357
39363
  class lN extends qt {
@@ -39365,7 +39371,7 @@ class lN extends qt {
39365
39371
  * by {@link Color#set}.
39366
39372
  */
39367
39373
  constructor(e) {
39368
- super(), this.isShadowMaterial = !0, this.type = "ShadowMaterial", this.color = new ve(0), this.transparent = !0, this.fog = !0, this.setValues(e);
39374
+ super(), this.isShadowMaterial = !0, this.type = "ShadowMaterial", this.color = new we(0), this.transparent = !0, this.fog = !0, this.setValues(e);
39369
39375
  }
39370
39376
  copy(e) {
39371
39377
  return super.copy(e), this.color.copy(e.color), this.fog = e.fog, this;
@@ -39401,7 +39407,7 @@ class Rn extends pt {
39401
39407
  * @param {number} [intensity=1] - The light's strength/intensity.
39402
39408
  */
39403
39409
  constructor(e, t = 1) {
39404
- super(), this.isLight = !0, this.type = "Light", this.color = new ve(e), this.intensity = t;
39410
+ super(), this.isLight = !0, this.type = "Light", this.color = new we(e), this.intensity = t;
39405
39411
  }
39406
39412
  /**
39407
39413
  * Frees the GPU-related resources allocated by this instance. Call this
@@ -39738,7 +39744,7 @@ class xN extends Rn {
39738
39744
  * @param {number} [intensity=1] - The light's strength/intensity.
39739
39745
  */
39740
39746
  constructor(e, t, s) {
39741
- super(e, s), this.isHemisphereLight = !0, this.type = "HemisphereLight", this.position.copy(pt.DEFAULT_UP), this.updateMatrix(), this.groundColor = new ve(t);
39747
+ super(e, s), this.isHemisphereLight = !0, this.type = "HemisphereLight", this.position.copy(pt.DEFAULT_UP), this.updateMatrix(), this.groundColor = new we(t);
39742
39748
  }
39743
39749
  copy(e, t) {
39744
39750
  return super.copy(e, t), this.groundColor.copy(e.groundColor), this;
@@ -40551,7 +40557,7 @@ function Ss(a, e, t) {
40551
40557
  function Ue(a, e = j0) {
40552
40558
  return Math.abs(a) < e;
40553
40559
  }
40554
- function Re(a, e, t = j0) {
40560
+ function Ne(a, e, t = j0) {
40555
40561
  return Ue(a - e, t);
40556
40562
  }
40557
40563
  function Rm(a, e) {
@@ -40663,7 +40669,7 @@ class kN {
40663
40669
  }
40664
40670
  var Nh;
40665
40671
  const zN = "2.10.1", qo = 1 / 8, GN = /Mac/.test((Nh = globalThis?.navigator) === null || Nh === void 0 ? void 0 : Nh.platform);
40666
- let J, Pm, Yo, Ph, Vt, oe, Te, nr, da, Os, Bs, rn, Fm, Dm, os, pa, rr, Om, Fh, Bm, Dh, Oh, Xo;
40672
+ let J, Pm, Yo, Ph, Vt, oe, Se, nr, da, Os, Bs, rn, Fm, Dm, os, pa, rr, Om, Fh, Bm, Dh, Oh, Xo;
40667
40673
  class zs extends kN {
40668
40674
  /**
40669
40675
  * Injects THREE as the dependency. You can then proceed to use CameraControls.
@@ -40706,7 +40712,7 @@ class zs extends kN {
40706
40712
  * @category Statics
40707
40713
  */
40708
40714
  static install(e) {
40709
- J = e.THREE, Pm = Object.freeze(new J.Vector3(0, 0, 0)), Yo = Object.freeze(new J.Vector3(0, 1, 0)), Ph = Object.freeze(new J.Vector3(0, 0, 1)), Vt = new J.Vector2(), oe = new J.Vector3(), Te = new J.Vector3(), nr = new J.Vector3(), da = new J.Vector3(), Os = new J.Vector3(), Bs = new J.Vector3(), rn = new J.Vector3(), Fm = new J.Vector3(), Dm = new J.Vector3(), os = new J.Spherical(), pa = new J.Spherical(), rr = new J.Box3(), Om = new J.Box3(), Fh = new J.Sphere(), Bm = new J.Quaternion(), Dh = new J.Quaternion(), Oh = new J.Matrix4(), Xo = new J.Raycaster();
40715
+ J = e.THREE, Pm = Object.freeze(new J.Vector3(0, 0, 0)), Yo = Object.freeze(new J.Vector3(0, 1, 0)), Ph = Object.freeze(new J.Vector3(0, 0, 1)), Vt = new J.Vector2(), oe = new J.Vector3(), Se = new J.Vector3(), nr = new J.Vector3(), da = new J.Vector3(), Os = new J.Vector3(), Bs = new J.Vector3(), rn = new J.Vector3(), Fm = new J.Vector3(), Dm = new J.Vector3(), os = new J.Spherical(), pa = new J.Spherical(), rr = new J.Box3(), Om = new J.Box3(), Fh = new J.Sphere(), Bm = new J.Quaternion(), Dh = new J.Quaternion(), Oh = new J.Matrix4(), Xo = new J.Raycaster();
40710
40716
  }
40711
40717
  /**
40712
40718
  * list all ACTIONs
@@ -41174,7 +41180,7 @@ class zs extends kN {
41174
41180
  this._isUserControllingRotate = !1;
41175
41181
  const i = Ss(e, this.minAzimuthAngle, this.maxAzimuthAngle), n = Ss(t, this.minPolarAngle, this.maxPolarAngle);
41176
41182
  this._sphericalEnd.theta = i, this._sphericalEnd.phi = n, this._sphericalEnd.makeSafe(), this._needsUpdate = !0, s || (this._spherical.theta = this._sphericalEnd.theta, this._spherical.phi = this._sphericalEnd.phi);
41177
- const r = !s || Re(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Re(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold);
41183
+ const r = !s || Ne(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Ne(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold);
41178
41184
  return this._createOnRestPromise(r);
41179
41185
  }
41180
41186
  /**
@@ -41198,14 +41204,14 @@ class zs extends kN {
41198
41204
  _dollyToNoClamp(e, t = !1) {
41199
41205
  const s = this._sphericalEnd.radius;
41200
41206
  if (this.colliderMeshes.length >= 1) {
41201
- const r = this._collisionTest(), o = Re(r, this._spherical.radius);
41207
+ const r = this._collisionTest(), o = Ne(r, this._spherical.radius);
41202
41208
  if (!(s > e) && o)
41203
41209
  return Promise.resolve();
41204
41210
  this._sphericalEnd.radius = Math.min(e, r);
41205
41211
  } else
41206
41212
  this._sphericalEnd.radius = e;
41207
41213
  this._needsUpdate = !0, t || (this._spherical.radius = this._sphericalEnd.radius);
41208
- const n = !t || Re(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
41214
+ const n = !t || Ne(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
41209
41215
  return this._createOnRestPromise(n);
41210
41216
  }
41211
41217
  /**
@@ -41217,7 +41223,7 @@ class zs extends kN {
41217
41223
  */
41218
41224
  dollyInFixed(e, t = !1) {
41219
41225
  this._targetEnd.add(this._getCameraDirection(da).multiplyScalar(e)), t || this._target.copy(this._targetEnd);
41220
- const s = !t || Re(this._target.x, this._targetEnd.x, this.restThreshold) && Re(this._target.y, this._targetEnd.y, this.restThreshold) && Re(this._target.z, this._targetEnd.z, this.restThreshold);
41226
+ const s = !t || Ne(this._target.x, this._targetEnd.x, this.restThreshold) && Ne(this._target.y, this._targetEnd.y, this.restThreshold) && Ne(this._target.z, this._targetEnd.z, this.restThreshold);
41221
41227
  return this._createOnRestPromise(s);
41222
41228
  }
41223
41229
  /**
@@ -41239,7 +41245,7 @@ class zs extends kN {
41239
41245
  */
41240
41246
  zoomTo(e, t = !1) {
41241
41247
  this._isUserControllingZoom = !1, this._zoomEnd = Ss(e, this.minZoom, this.maxZoom), this._needsUpdate = !0, t || (this._zoom = this._zoomEnd);
41242
- const s = !t || Re(this._zoom, this._zoomEnd, this.restThreshold);
41248
+ const s = !t || Ne(this._zoom, this._zoomEnd, this.restThreshold);
41243
41249
  return this._changedZoom = 0, this._createOnRestPromise(s);
41244
41250
  }
41245
41251
  /**
@@ -41258,7 +41264,7 @@ class zs extends kN {
41258
41264
  */
41259
41265
  truck(e, t, s = !1) {
41260
41266
  this._camera.updateMatrix(), Os.setFromMatrixColumn(this._camera.matrix, 0), Bs.setFromMatrixColumn(this._camera.matrix, 1), Os.multiplyScalar(e), Bs.multiplyScalar(-t);
41261
- const i = oe.copy(Os).add(Bs), n = Te.copy(this._targetEnd).add(i);
41267
+ const i = oe.copy(Os).add(Bs), n = Se.copy(this._targetEnd).add(i);
41262
41268
  return this.moveTo(n.x, n.y, n.z, s);
41263
41269
  }
41264
41270
  /**
@@ -41269,7 +41275,7 @@ class zs extends kN {
41269
41275
  */
41270
41276
  forward(e, t = !1) {
41271
41277
  oe.setFromMatrixColumn(this._camera.matrix, 0), oe.crossVectors(this._camera.up, oe), oe.multiplyScalar(e);
41272
- const s = Te.copy(this._targetEnd).add(oe);
41278
+ const s = Se.copy(this._targetEnd).add(oe);
41273
41279
  return this.moveTo(s.x, s.y, s.z, t);
41274
41280
  }
41275
41281
  /**
@@ -41293,7 +41299,7 @@ class zs extends kN {
41293
41299
  this._isUserControllingTruck = !1;
41294
41300
  const n = oe.set(e, t, s).sub(this._targetEnd);
41295
41301
  this._encloseToBoundary(this._targetEnd, n, this.boundaryFriction), this._needsUpdate = !0, i || this._target.copy(this._targetEnd);
41296
- const r = !i || Re(this._target.x, this._targetEnd.x, this.restThreshold) && Re(this._target.y, this._targetEnd.y, this.restThreshold) && Re(this._target.z, this._targetEnd.z, this.restThreshold);
41302
+ const r = !i || Ne(this._target.x, this._targetEnd.x, this.restThreshold) && Ne(this._target.y, this._targetEnd.y, this.restThreshold) && Ne(this._target.z, this._targetEnd.z, this.restThreshold);
41297
41303
  return this._createOnRestPromise(r);
41298
41304
  }
41299
41305
  /**
@@ -41327,11 +41333,11 @@ class zs extends kN {
41327
41333
  c.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
41328
41334
  const h = Rm(this._sphericalEnd.theta, Am), u = Rm(this._sphericalEnd.phi, Am);
41329
41335
  l.push(this.rotateTo(h, u, t));
41330
- const d = oe.setFromSpherical(this._sphericalEnd).normalize(), p = Bm.setFromUnitVectors(d, Ph), f = Re(Math.abs(d.y), 1);
41336
+ const d = oe.setFromSpherical(this._sphericalEnd).normalize(), p = Bm.setFromUnitVectors(d, Ph), f = Ne(Math.abs(d.y), 1);
41331
41337
  f && p.multiply(Dh.setFromAxisAngle(Yo, h)), p.multiply(this._yAxisUpSpaceInverse);
41332
41338
  const m = Om.makeEmpty();
41333
- Te.copy(c.min).applyQuaternion(p), m.expandByPoint(Te), Te.copy(c.min).setX(c.max.x).applyQuaternion(p), m.expandByPoint(Te), Te.copy(c.min).setY(c.max.y).applyQuaternion(p), m.expandByPoint(Te), Te.copy(c.max).setZ(c.min.z).applyQuaternion(p), m.expandByPoint(Te), Te.copy(c.min).setZ(c.max.z).applyQuaternion(p), m.expandByPoint(Te), Te.copy(c.max).setY(c.min.y).applyQuaternion(p), m.expandByPoint(Te), Te.copy(c.max).setX(c.min.x).applyQuaternion(p), m.expandByPoint(Te), Te.copy(c.max).applyQuaternion(p), m.expandByPoint(Te), m.min.x -= i, m.min.y -= r, m.max.x += n, m.max.y += o, p.setFromUnitVectors(Ph, d), f && p.premultiply(Dh.invert()), p.premultiply(this._yAxisUpSpace);
41334
- const y = m.getSize(oe), g = m.getCenter(Te).applyQuaternion(p);
41339
+ Se.copy(c.min).applyQuaternion(p), m.expandByPoint(Se), Se.copy(c.min).setX(c.max.x).applyQuaternion(p), m.expandByPoint(Se), Se.copy(c.min).setY(c.max.y).applyQuaternion(p), m.expandByPoint(Se), Se.copy(c.max).setZ(c.min.z).applyQuaternion(p), m.expandByPoint(Se), Se.copy(c.min).setZ(c.max.z).applyQuaternion(p), m.expandByPoint(Se), Se.copy(c.max).setY(c.min.y).applyQuaternion(p), m.expandByPoint(Se), Se.copy(c.max).setX(c.min.x).applyQuaternion(p), m.expandByPoint(Se), Se.copy(c.max).applyQuaternion(p), m.expandByPoint(Se), m.min.x -= i, m.min.y -= r, m.max.x += n, m.max.y += o, p.setFromUnitVectors(Ph, d), f && p.premultiply(Dh.invert()), p.premultiply(this._yAxisUpSpace);
41340
+ const y = m.getSize(oe), g = m.getCenter(Se).applyQuaternion(p);
41335
41341
  if (nn(this._camera)) {
41336
41342
  const x = this.getDistanceToFitBox(y.x, y.y, y.z, s);
41337
41343
  l.push(this.moveTo(g.x, g.y, g.z, t)), l.push(this.dollyTo(x, t)), l.push(this.setFocalOffset(0, 0, 0, t));
@@ -41371,9 +41377,9 @@ class zs extends kN {
41371
41377
  */
41372
41378
  setLookAt(e, t, s, i, n, r, o = !1) {
41373
41379
  this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = sr.NONE, this._changedDolly = 0;
41374
- const l = Te.set(i, n, r), c = oe.set(e, t, s);
41380
+ const l = Se.set(i, n, r), c = oe.set(e, t, s);
41375
41381
  this._targetEnd.copy(l), this._sphericalEnd.setFromVector3(c.sub(l).applyQuaternion(this._yAxisUpSpace)), this.normalizeRotations(), this._needsUpdate = !0, o || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
41376
- const h = !o || Re(this._target.x, this._targetEnd.x, this.restThreshold) && Re(this._target.y, this._targetEnd.y, this.restThreshold) && Re(this._target.z, this._targetEnd.z, this.restThreshold) && Re(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Re(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && Re(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
41382
+ const h = !o || Ne(this._target.x, this._targetEnd.x, this.restThreshold) && Ne(this._target.y, this._targetEnd.y, this.restThreshold) && Ne(this._target.z, this._targetEnd.z, this.restThreshold) && Ne(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Ne(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && Ne(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
41377
41383
  return this._createOnRestPromise(h);
41378
41384
  }
41379
41385
  /**
@@ -41396,13 +41402,13 @@ class zs extends kN {
41396
41402
  */
41397
41403
  lerpLookAt(e, t, s, i, n, r, o, l, c, h, u, d, p, f = !1) {
41398
41404
  this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = sr.NONE, this._changedDolly = 0;
41399
- const m = oe.set(i, n, r), y = Te.set(e, t, s);
41405
+ const m = oe.set(i, n, r), y = Se.set(e, t, s);
41400
41406
  os.setFromVector3(y.sub(m).applyQuaternion(this._yAxisUpSpace));
41401
- const g = nr.set(h, u, d), x = Te.set(o, l, c);
41407
+ const g = nr.set(h, u, d), x = Se.set(o, l, c);
41402
41408
  pa.setFromVector3(x.sub(g).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(m.lerp(g, p));
41403
41409
  const _ = pa.theta - os.theta, b = pa.phi - os.phi, T = pa.radius - os.radius;
41404
41410
  this._sphericalEnd.set(os.radius + T * p, os.phi + b * p, os.theta + _ * p), this.normalizeRotations(), this._needsUpdate = !0, f || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
41405
- const E = !f || Re(this._target.x, this._targetEnd.x, this.restThreshold) && Re(this._target.y, this._targetEnd.y, this.restThreshold) && Re(this._target.z, this._targetEnd.z, this.restThreshold) && Re(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Re(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && Re(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
41411
+ const E = !f || Ne(this._target.x, this._targetEnd.x, this.restThreshold) && Ne(this._target.y, this._targetEnd.y, this.restThreshold) && Ne(this._target.z, this._targetEnd.z, this.restThreshold) && Ne(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Ne(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && Ne(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
41406
41412
  return this._createOnRestPromise(E);
41407
41413
  }
41408
41414
  /**
@@ -41440,7 +41446,7 @@ class zs extends kN {
41440
41446
  */
41441
41447
  setFocalOffset(e, t, s, i = !1) {
41442
41448
  this._isUserControllingOffset = !1, this._focalOffsetEnd.set(e, t, s), this._needsUpdate = !0, i || this._focalOffset.copy(this._focalOffsetEnd);
41443
- const n = !i || Re(this._focalOffset.x, this._focalOffsetEnd.x, this.restThreshold) && Re(this._focalOffset.y, this._focalOffsetEnd.y, this.restThreshold) && Re(this._focalOffset.z, this._focalOffsetEnd.z, this.restThreshold);
41449
+ const n = !i || Ne(this._focalOffset.x, this._focalOffsetEnd.x, this.restThreshold) && Ne(this._focalOffset.y, this._focalOffsetEnd.y, this.restThreshold) && Ne(this._focalOffset.z, this._focalOffsetEnd.z, this.restThreshold);
41444
41450
  return this._createOnRestPromise(n);
41445
41451
  }
41446
41452
  /**
@@ -41565,7 +41571,7 @@ class zs extends kN {
41565
41571
  * @category Methods
41566
41572
  */
41567
41573
  reset(e = !1) {
41568
- if (!Re(this._camera.up.x, this._cameraUp0.x) || !Re(this._camera.up.y, this._cameraUp0.y) || !Re(this._camera.up.z, this._cameraUp0.z)) {
41574
+ if (!Ne(this._camera.up.x, this._cameraUp0.x) || !Ne(this._camera.up.y, this._cameraUp0.y) || !Ne(this._camera.up.z, this._cameraUp0.z)) {
41569
41575
  this._camera.up.copy(this._cameraUp0);
41570
41576
  const s = this.getPosition(oe);
41571
41577
  this.updateCameraUp(), this.setPosition(s.x, s.y, s.z);
@@ -41598,7 +41604,7 @@ class zs extends kN {
41598
41604
  * @category Methods
41599
41605
  */
41600
41606
  applyCameraUp() {
41601
- const e = oe.subVectors(this._target, this._camera.position).normalize(), t = Te.crossVectors(e, this._camera.up);
41607
+ const e = oe.subVectors(this._target, this._camera.position).normalize(), t = Se.crossVectors(e, this._camera.up);
41602
41608
  this._camera.up.crossVectors(t, e).normalize(), this._camera.updateMatrixWorld();
41603
41609
  const s = this.getPosition(oe);
41604
41610
  this.updateCameraUp(), this.setPosition(s.x, s.y, s.z);
@@ -41652,19 +41658,19 @@ class zs extends kN {
41652
41658
  if (nn(this._camera) && this._changedDolly !== 0) {
41653
41659
  const u = this._spherical.radius - this._lastDistance, d = this._camera, p = this._getCameraDirection(da), f = oe.copy(p).cross(d.up).normalize();
41654
41660
  f.lengthSq() === 0 && (f.x = 1);
41655
- const m = Te.crossVectors(f, p), y = this._sphericalEnd.radius * Math.tan(d.getEffectiveFOV() * ca * 0.5), x = (this._sphericalEnd.radius - u - this._sphericalEnd.radius) / this._sphericalEnd.radius, _ = nr.copy(this._targetEnd).add(f.multiplyScalar(this._dollyControlCoord.x * y * d.aspect)).add(m.multiplyScalar(this._dollyControlCoord.y * y)), b = oe.copy(this._targetEnd).lerp(_, x), T = this._lastDollyDirection === sr.IN && this._spherical.radius <= this.minDistance, E = this._lastDollyDirection === sr.OUT && this.maxDistance <= this._spherical.radius;
41661
+ const m = Se.crossVectors(f, p), y = this._sphericalEnd.radius * Math.tan(d.getEffectiveFOV() * ca * 0.5), x = (this._sphericalEnd.radius - u - this._sphericalEnd.radius) / this._sphericalEnd.radius, _ = nr.copy(this._targetEnd).add(f.multiplyScalar(this._dollyControlCoord.x * y * d.aspect)).add(m.multiplyScalar(this._dollyControlCoord.y * y)), b = oe.copy(this._targetEnd).lerp(_, x), T = this._lastDollyDirection === sr.IN && this._spherical.radius <= this.minDistance, E = this._lastDollyDirection === sr.OUT && this.maxDistance <= this._spherical.radius;
41656
41662
  if (this.infinityDolly && (T || E)) {
41657
41663
  this._sphericalEnd.radius -= u, this._spherical.radius -= u;
41658
- const A = Te.copy(p).multiplyScalar(-u);
41664
+ const A = Se.copy(p).multiplyScalar(-u);
41659
41665
  b.add(A);
41660
41666
  }
41661
41667
  this._boundary.clampPoint(b, b);
41662
- const v = Te.subVectors(b, this._targetEnd);
41668
+ const v = Se.subVectors(b, this._targetEnd);
41663
41669
  this._targetEnd.copy(b), this._target.add(v), this._changedDolly -= u, Ue(this._changedDolly) && (this._changedDolly = 0);
41664
41670
  } else if (Ri(this._camera) && this._changedZoom !== 0) {
41665
- const u = this._zoom - this._lastZoom, d = this._camera, p = oe.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (d.near + d.far) / (d.near - d.far)).unproject(d), f = Te.set(0, 0, -1).applyQuaternion(d.quaternion), m = nr.copy(p).add(f.multiplyScalar(-p.dot(d.up))), g = -(this._zoom - u - this._zoom) / this._zoom, x = this._getCameraDirection(da), _ = this._targetEnd.dot(x), b = oe.copy(this._targetEnd).lerp(m, g), T = b.dot(x), E = x.multiplyScalar(T - _);
41671
+ const u = this._zoom - this._lastZoom, d = this._camera, p = oe.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (d.near + d.far) / (d.near - d.far)).unproject(d), f = Se.set(0, 0, -1).applyQuaternion(d.quaternion), m = nr.copy(p).add(f.multiplyScalar(-p.dot(d.up))), g = -(this._zoom - u - this._zoom) / this._zoom, x = this._getCameraDirection(da), _ = this._targetEnd.dot(x), b = oe.copy(this._targetEnd).lerp(m, g), T = b.dot(x), E = x.multiplyScalar(T - _);
41666
41672
  b.sub(E), this._boundary.clampPoint(b, b);
41667
- const v = Te.subVectors(b, this._targetEnd);
41673
+ const v = Se.subVectors(b, this._targetEnd);
41668
41674
  this._targetEnd.copy(b), this._target.add(v), this._changedZoom -= u, Ue(this._changedZoom) && (this._changedZoom = 0);
41669
41675
  }
41670
41676
  }
@@ -41759,7 +41765,7 @@ class zs extends kN {
41759
41765
  const i = t.lengthSq();
41760
41766
  if (i === 0)
41761
41767
  return e;
41762
- const n = Te.copy(t).add(e), o = this._boundary.clampPoint(n, nr).sub(n), l = o.lengthSq();
41768
+ const n = Se.copy(t).add(e), o = this._boundary.clampPoint(n, nr).sub(n), l = o.lengthSq();
41763
41769
  if (l === 0)
41764
41770
  return e.add(t);
41765
41771
  if (l === i)
@@ -41768,7 +41774,7 @@ class zs extends kN {
41768
41774
  return e.add(t).add(o);
41769
41775
  {
41770
41776
  const c = 1 + s * l / t.dot(o);
41771
- return e.add(Te.copy(t).multiplyScalar(c)).add(o.multiplyScalar(1 - s));
41777
+ return e.add(Se.copy(t).multiplyScalar(c)).add(o.multiplyScalar(1 - s));
41772
41778
  }
41773
41779
  }
41774
41780
  _updateNearPlaneCorners() {
@@ -41788,7 +41794,7 @@ class zs extends kN {
41788
41794
  const s = this._getTargetDirection(da);
41789
41795
  Oh.lookAt(Pm, s, this._camera.up);
41790
41796
  for (let i = 0; i < 4; i++) {
41791
- const n = Te.copy(this._nearPlaneCorners[i]);
41797
+ const n = Se.copy(this._nearPlaneCorners[i]);
41792
41798
  n.applyMatrix4(Oh);
41793
41799
  const r = nr.addVectors(this._target, n);
41794
41800
  Xo.set(r, s), Xo.far = this._spherical.radius + 1;
@@ -41872,7 +41878,7 @@ class zs extends kN {
41872
41878
  }
41873
41879
  }
41874
41880
  const Bl = (a) => {
41875
- const [e, t] = Ce(a.options[a.index]), s = () => {
41881
+ const [e, t] = Ae(a.options[a.index]), s = () => {
41876
41882
  a.onToggle(!a.open);
41877
41883
  }, i = (r) => {
41878
41884
  r !== e && (a.onSelect(r), t(r)), a.onToggle(!1);
@@ -41888,7 +41894,7 @@ const Bl = (a) => {
41888
41894
  "Normals",
41889
41895
  "UVs",
41890
41896
  "Wireframe"
41891
- ], [i, n] = Ce("Renderer"), [r, o] = Ce(!1), [l, c] = Ce(!1), [h, u] = Ce(!1);
41897
+ ], [i, n] = Ae("Renderer"), [r, o] = Ae(!1), [l, c] = Ae(!1), [h, u] = Ae(!1);
41892
41898
  return /* @__PURE__ */ M.jsxs("div", { className: `CameraWindow ${e.name}`, children: [
41893
41899
  /* @__PURE__ */ M.jsx("div", { ref: t, className: "clickable", onClick: () => {
41894
41900
  h && u(!1);
@@ -42053,7 +42059,7 @@ class WN extends Y {
42053
42059
  }
42054
42060
  }
42055
42061
  function Bh(a) {
42056
- const [e, t] = Ce(a.selected), s = "toggle" + (e ? " selected" : "");
42062
+ const [e, t] = Ae(a.selected), s = "toggle" + (e ? " selected" : "");
42057
42063
  return /* @__PURE__ */ M.jsx(
42058
42064
  "button",
42059
42065
  {
@@ -42408,8 +42414,8 @@ class sP extends Er {
42408
42414
  g.setAttribute("position", new Vs([0, 0, 0, 1, 0, 0], 3));
42409
42415
  const x = new zt(75e-4, 75e-4, 0.5, 3);
42410
42416
  x.translate(0, 0.25, 0);
42411
- function _(X, we) {
42412
- const de = new Gr(X, 75e-4, 3, 64, we * Math.PI * 2);
42417
+ function _(X, Ee) {
42418
+ const de = new Gr(X, 75e-4, 3, 64, Ee * Math.PI * 2);
42413
42419
  return de.rotateY(Math.PI / 2), de.rotateX(Math.PI / 2), de;
42414
42420
  }
42415
42421
  function b() {
@@ -42589,15 +42595,15 @@ class sP extends Er {
42589
42595
  ]
42590
42596
  };
42591
42597
  function q(X) {
42592
- const we = new Er();
42598
+ const Ee = new Er();
42593
42599
  for (const de in X)
42594
42600
  for (let ye = X[de].length; ye--; ) {
42595
- const se = X[de][ye][0].clone(), Ee = X[de][ye][1], Ge = X[de][ye][2], ot = X[de][ye][3], be = X[de][ye][4];
42596
- se.name = de, se.tag = be, Ee && se.position.set(Ee[0], Ee[1], Ee[2]), Ge && se.rotation.set(Ge[0], Ge[1], Ge[2]), ot && se.scale.set(ot[0], ot[1], ot[2]), se.updateMatrix();
42601
+ 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];
42602
+ 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();
42597
42603
  const lt = se.geometry.clone();
42598
- 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), we.add(se);
42604
+ 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);
42599
42605
  }
42600
- return we;
42606
+ return Ee;
42601
42607
  }
42602
42608
  this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = q(T)), this.add(this.gizmo.rotate = q(A)), this.add(this.gizmo.scale = q(H)), this.add(this.picker.translate = q(E)), this.add(this.picker.rotate = q(k)), this.add(this.picker.scale = q(W)), this.add(this.helper.translate = q(v)), this.add(this.helper.rotate = q(N)), this.add(this.helper.scale = q($)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
42603
42609
  }
@@ -43082,7 +43088,7 @@ class rP extends Er {
43082
43088
  super(), this.name = "Spline Editor", this._camera = e, this.three = t, this.three.addEventListener(ce.ADD_SPLINE, this.onAddSpline);
43083
43089
  }
43084
43090
  initDebug() {
43085
- this.group = Pe.addEditorGroup({
43091
+ this.group = _e.addEditorGroup({
43086
43092
  title: this.name,
43087
43093
  items: [
43088
43094
  {
@@ -43151,7 +43157,7 @@ class rP extends Er {
43151
43157
  });
43152
43158
  }
43153
43159
  dispose() {
43154
- this.three.removeEventListener(ce.ADD_SPLINE, this.onAddSpline), Pe.removeEditorGroup(this.name);
43160
+ this.three.removeEventListener(ce.ADD_SPLINE, this.onAddSpline), _e.removeEditorGroup(this.name);
43155
43161
  }
43156
43162
  addSpline(e) {
43157
43163
  e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current), this.add(e), this.currentSpline = e;
@@ -43273,9 +43279,9 @@ class ut extends qa {
43273
43279
  currentWindow;
43274
43280
  // RefObject to one of the "windows"
43275
43281
  helpersContainer = new kx();
43282
+ grid = new WN();
43276
43283
  cameraHelpers = /* @__PURE__ */ new Map();
43277
43284
  lightHelpers = /* @__PURE__ */ new Map();
43278
- grid = new WN();
43279
43285
  interactionHelper = new zx(25);
43280
43286
  currentTransform;
43281
43287
  // Tools
@@ -43368,7 +43374,7 @@ class ut extends qa {
43368
43374
  t.mode !== this.state.mode && (this.assignControls(), this.resize());
43369
43375
  }
43370
43376
  componentWillUnmount() {
43371
- this.disable(), this.clear(), Pe.removeEditorGroup("View Settings");
43377
+ this.disable(), this.clear(), _e.removeEditorGroup("View Settings");
43372
43378
  }
43373
43379
  render() {
43374
43380
  const e = [];
@@ -43588,7 +43594,7 @@ class ut extends qa {
43588
43594
  height: 21,
43589
43595
  width: 21,
43590
43596
  onClick: (t) => {
43591
- this.gridVisibility = t, this.saveExpandedGridVisibility(), this.grid.visible = t;
43597
+ this.setGridVisibility(t);
43592
43598
  }
43593
43599
  }
43594
43600
  )
@@ -43610,14 +43616,30 @@ class ut extends qa {
43610
43616
  }), this.grid.visible = !1), this.renderer && (this.renderer.autoClear = !1, this.renderer.shadowMap.enabled = !0, this.renderer.setPixelRatio(devicePixelRatio), this.renderer.setClearColor(0), this.resize(), this.props.three.renderer = this.renderer);
43611
43617
  };
43612
43618
  setupScene() {
43613
- this.helpersContainer.name = "helpers", this.scene.add(this.helpersContainer), this.grid.position.y = -1, this.scene.add(this.grid), this.interactionHelper.name = "interactionHelper", this.interactionHelper.visible = !1, this.helpersContainer.add(this.interactionHelper);
43619
+ this.helpersContainer.name = "helpers", this.scene.add(this.helpersContainer), this.scene.add(this.grid), this.interactionHelper.name = "interactionHelper", this.interactionHelper.visible = !1, this.helpersContainer.add(this.interactionHelper);
43614
43620
  const e = (n, r) => {
43615
43621
  const o = new dl(-100, 100, 100, -100, 0, 3e3);
43616
43622
  return o.name = n, o.position.copy(r), o.lookAt(0, 0, 0), this.cameras.set(n, o), o;
43617
43623
  }, t = 1e3;
43618
43624
  e("Top", new Z(0, t, 0)), e("Bottom", new Z(0, -t, 0)), e("Left", new Z(-t, 0, 0)), e("Right", new Z(t, 0, 0)), e("Front", new Z(0, 0, t)), e("Back", new Z(0, 0, -t)), e("Orthographic", new Z(t, t, t)), e("UI", new Z()), this.debugCamera = new tp(60, 1, 0.01, 3e3), this.debugCamera.name = "Debug", this.debugCamera.position.set(300, 300, 300), this.debugCamera.lookAt(0, 0, 0), this.cameras.set("Debug", this.debugCamera), this.currentCamera = this.debugCamera;
43619
43625
  const s = localStorage, i = this.props.three.name;
43620
- this.tlCam = this.cameras.get(s.getItem(`${i}_tlCam`)), this.trCam = this.cameras.get(s.getItem(`${i}_trCam`)), this.blCam = this.cameras.get(s.getItem(`${i}_blCam`)), this.brCam = this.cameras.get(s.getItem(`${i}_brCam`)), this.tlCam === void 0 && (this.tlCam = this.cameras.get("Debug")), this.trCam === void 0 && (this.trCam = this.cameras.get("Orthographic")), this.blCam === void 0 && (this.blCam = this.cameras.get("Front")), this.brCam === void 0 && (this.brCam = this.cameras.get("Top"));
43626
+ this.tlCam = this.cameras.get(s.getItem(`${i}_tlCam`)), this.trCam = this.cameras.get(s.getItem(`${i}_trCam`)), this.blCam = this.cameras.get(s.getItem(`${i}_blCam`)), this.brCam = this.cameras.get(s.getItem(`${i}_brCam`)), this.tlCam === void 0 && (this.tlCam = this.cameras.get("Debug")), this.trCam === void 0 && (this.trCam = this.cameras.get("Orthographic")), this.blCam === void 0 && (this.blCam = this.cameras.get("Front")), this.brCam === void 0 && (this.brCam = this.cameras.get("Top")), _e.addEditorGroup({
43627
+ title: "Editor",
43628
+ items: [
43629
+ {
43630
+ type: "number",
43631
+ prop: "Grid Position",
43632
+ value: this.grid.position.y
43633
+ }
43634
+ ],
43635
+ onUpdate: (n, r) => {
43636
+ switch (n) {
43637
+ case "Grid Position":
43638
+ this.grid.position.y = r;
43639
+ break;
43640
+ }
43641
+ }
43642
+ });
43621
43643
  }
43622
43644
  setupTools() {
43623
43645
  this.splineEditor = new rP(this.currentCamera, this.three), this.splineEditor.initDebug(), this.helpersContainer.add(this.splineEditor);
@@ -43635,12 +43657,15 @@ class ut extends qa {
43635
43657
  });
43636
43658
  }
43637
43659
  clear() {
43638
- this.three.dispatchEvent({ type: ce.CLEAR_OBJECT }), Pe.removeAllGroups(), this.clearLightHelpers(), this.clearControls(), this.currentTransform !== void 0 && (this.currentTransform.removeEventListener("objectChange", this.onUpdateTransform), _t.instance.remove(this.currentTransform.getHelper().name)), this.currentTransform = void 0, _t.instance.clear(), this.cameras.forEach((e) => {
43660
+ this.three.dispatchEvent({ type: ce.CLEAR_OBJECT }), _e.removeAllGroups(), this.clearLightHelpers(), this.clearControls(), this.currentTransform !== void 0 && (this.currentTransform.removeEventListener("objectChange", this.onUpdateTransform), _t.instance.remove(this.currentTransform.getHelper().name)), this.currentTransform = void 0, _t.instance.clear(), this.cameras.forEach((e) => {
43639
43661
  this.editorCameras.indexOf(e.name) < 0 && this.three.dispatchEvent({ type: ce.REMOVE_CAMERA, value: e });
43640
43662
  }), this.currentCamera = this.debugCamera, this.currentScene = void 0, this.scenes.forEach((e) => {
43641
43663
  this.three.dispatchEvent({ type: ce.REMOVE_SCENE, value: e });
43642
43664
  }), this.scenes.clear();
43643
43665
  }
43666
+ setGridVisibility(e) {
43667
+ this.gridVisibility = e, this.saveExpandedGridVisibility(), this.grid.visible = e;
43668
+ }
43644
43669
  // Playback
43645
43670
  update() {
43646
43671
  this.renderer && (this.renderer instanceof ga ? this.renderer?.clear() : this.renderer instanceof $o && this.renderer?.clearAsync()), this.controls.forEach((e) => e.update()), this.cameraHelpers.forEach((e) => e.update()), this.lightHelpers.forEach((e) => {
@@ -44259,7 +44284,7 @@ const zh = {
44259
44284
  children: []
44260
44285
  };
44261
44286
  function uP(a) {
44262
- const [e, t] = Ce(zh);
44287
+ const [e, t] = Ae(zh);
44263
44288
  wn(() => {
44264
44289
  function r(l) {
44265
44290
  t(l.value);
@@ -44448,7 +44473,7 @@ class dP extends qa {
44448
44473
  },
44449
44474
  {
44450
44475
  type: "boolean",
44451
- title: "Clear Management",
44476
+ title: "Color Management",
44452
44477
  value: or.enabled,
44453
44478
  onChange: (t, s) => {
44454
44479
  or.enabled = s, e();
@@ -44558,7 +44583,7 @@ class dP extends qa {
44558
44583
  }
44559
44584
  }
44560
44585
  function pP(a) {
44561
- const [e] = Ce([]), [t] = Ce([]), [s, i] = Ce(0), n = (c) => {
44586
+ const [e] = Ae([]), [t] = Ae([]), [s, i] = Ae(0), n = (c) => {
44562
44587
  const h = c.value;
44563
44588
  e.push(h), t.push(
44564
44589
  /* @__PURE__ */ M.jsx(
@@ -44636,7 +44661,7 @@ function pP(a) {
44636
44661
  /* @__PURE__ */ M.jsx("div", { className: "scenes", children: t }, s),
44637
44662
  /* @__PURE__ */ M.jsx(uP, { three: a.three }),
44638
44663
  /* @__PURE__ */ M.jsx(dP, { three: a.three }),
44639
- /* @__PURE__ */ M.jsx(Pe, { three: a.three })
44664
+ /* @__PURE__ */ M.jsx(_e, { three: a.three })
44640
44665
  ] });
44641
44666
  }
44642
44667
  function fP(a) {