@tomorrowevening/hermes 0.0.142 → 0.0.143

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
- import { Texture as Ah, OrthographicCamera as Rh, Scene as mu, MeshBasicMaterial as _n, BufferGeometry as xr, Float32BufferAttribute as gn, Mesh as Y, LinearSRGBColorSpace as Ra, ObjectLoader as nx, AnimationMixer as rx, AnimationClip as ax, EventDispatcher as gu, Clock as Nm, Group as Wo, RepeatWrapping as Ud, Color as Tn, ColorManagement as er, RenderTarget as ox, FrontSide as lx, BackSide as Pm, DoubleSide as yu, ZeroFactor as Fm, OneFactor as Dm, SrcColorFactor as Om, OneMinusSrcColorFactor as Im, SrcAlphaFactor as Bm, OneMinusSrcAlphaFactor as Lm, DstAlphaFactor as Um, OneMinusDstAlphaFactor as km, DstColorFactor as zm, OneMinusDstColorFactor as Gm, SrcAlphaSaturateFactor as cx, ConstantColorFactor as Vm, OneMinusConstantColorFactor as Hm, ConstantAlphaFactor as Wm, OneMinusConstantAlphaFactor as $m, AddEquation as hx, SubtractEquation as ux, ReverseSubtractEquation as dx, MinEquation as px, MaxEquation as fx, NoBlending as mx, NormalBlending as gx, AdditiveBlending as yx, SubtractiveBlending as xx, MultiplyBlending as _x, CustomBlending as bx, Line as Ls, LineBasicMaterial as xu, Controls as jm, Vector3 as Z, MOUSE as lr, TOUCH as tr, Quaternion as Jt, Spherical as Nh, Vector2 as yt, Ray as Tx, Plane as Sx, MathUtils as vx, ShaderMaterial as qm, GLSL3 as wx, PlaneGeometry as Ym, Raycaster as Na, Object3D as _r, CylinderGeometry as kt, BoxGeometry as bt, OctahedronGeometry as Za, TorusGeometry as Ir, SphereGeometry as Xm, Euler as Zm, Matrix4 as Al, CatmullRomCurve3 as kd, AxesHelper as Ex, MeshDepthMaterial as Cx, MeshNormalMaterial as Mx, Sphere as Ax, Box3 as Rx, Vector4 as Nx, WebGLRenderer as ha, PerspectiveCamera as zd, CameraHelper as Px, SkinnedMesh as Fx, SpotLightHelper as Dx, PointLightHelper as Ox, HemisphereLightHelper as Ix, DirectionalLightHelper as Bx, SkeletonHelper as Lx, SRGBColorSpace as Gd, NoToneMapping as Vd, NoColorSpace as Ux, LinearToneMapping as kx, ReinhardToneMapping as zx, CineonToneMapping as Gx, ACESFilmicToneMapping as Vx, AgXToneMapping as Hx, NeutralToneMapping as Wx, CustomToneMapping as $x } from "three";
2
- import Km, { useState as Re, useRef as We, useEffect as Sn, useMemo as ba, Component as za, createRef as Ai, forwardRef as jx } from "react";
1
+ import { Texture as Ah, OrthographicCamera as Rh, Scene as mu, MeshBasicMaterial as _n, BufferGeometry as bn, Float32BufferAttribute as gn, Mesh as Y, LinearSRGBColorSpace as Ra, ObjectLoader as nx, AnimationMixer as rx, AnimationClip as ax, EventDispatcher as gu, Clock as Nm, Group as Wo, RepeatWrapping as Ud, Color as Sn, ColorManagement as tr, RenderTarget as ox, FrontSide as lx, BackSide as Pm, DoubleSide as yu, ZeroFactor as Fm, OneFactor as Dm, SrcColorFactor as Om, OneMinusSrcColorFactor as Im, SrcAlphaFactor as Bm, OneMinusSrcAlphaFactor as Lm, DstAlphaFactor as Um, OneMinusDstAlphaFactor as km, DstColorFactor as zm, OneMinusDstColorFactor as Gm, SrcAlphaSaturateFactor as cx, ConstantColorFactor as Vm, OneMinusConstantColorFactor as Hm, ConstantAlphaFactor as Wm, OneMinusConstantAlphaFactor as $m, AddEquation as hx, SubtractEquation as ux, ReverseSubtractEquation as dx, MinEquation as px, MaxEquation as fx, NoBlending as mx, NormalBlending as gx, AdditiveBlending as yx, SubtractiveBlending as xx, MultiplyBlending as _x, CustomBlending as bx, Line as Ls, LineBasicMaterial as xu, Controls as jm, Vector3 as Z, MOUSE as cr, TOUCH as sr, Quaternion as Jt, Spherical as Nh, Vector2 as yt, Ray as Tx, Plane as Sx, MathUtils as vx, ShaderMaterial as qm, GLSL3 as wx, PlaneGeometry as Ym, Raycaster as Na, Object3D as _r, CylinderGeometry as kt, BoxGeometry as bt, OctahedronGeometry as Za, TorusGeometry as Ir, SphereGeometry as Xm, Euler as Zm, Matrix4 as Al, CatmullRomCurve3 as kd, AxesHelper as Ex, MeshDepthMaterial as Cx, MeshNormalMaterial as Mx, Sphere as Ax, Box3 as Rx, Vector4 as Nx, WebGLRenderer as ha, PerspectiveCamera as zd, CameraHelper as Px, SkinnedMesh as Fx, SpotLightHelper as Dx, PointLightHelper as Ox, HemisphereLightHelper as Ix, DirectionalLightHelper as Bx, SkeletonHelper as Lx, SRGBColorSpace as Gd, NoToneMapping as Vd, NoColorSpace as Ux, LinearToneMapping as kx, ReinhardToneMapping as zx, CineonToneMapping as Gx, ACESFilmicToneMapping as Vx, AgXToneMapping as Hx, NeutralToneMapping as Wx, CustomToneMapping as $x } from "three";
2
+ import Km, { useState as Re, useRef as We, useEffect as vn, useMemo as ba, Component as za, createRef as Ai, forwardRef as jx } from "react";
3
3
  const nl = () => {
4
4
  }, KN = () => {
5
5
  };
@@ -168,8 +168,8 @@ const e_ = ({ mobileTiers: a = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
168
168
  let X, [ve, , , , ue] = W > 1 ? $.map((_e) => [_e, Qx(q, _e[2])]).sort(([, _e], [, ot]) => _e - ot)[0][0] : $[0], ge = Number.MAX_VALUE;
169
169
  const { devicePixelRatio: ie } = window, we = c.width * ie * c.height * ie;
170
170
  for (const _e of ue) {
171
- const [ot, Lt] = _e, Dr = ot * Lt, Mn = Math.abs(we - Dr);
172
- Mn < ge && (ge = Mn, X = _e);
171
+ const [ot, Lt] = _e, Dr = ot * Lt, An = Math.abs(we - Dr);
172
+ An < ge && (ge = An, X = _e);
173
173
  }
174
174
  if (!X) return;
175
175
  const [, , ze, at] = X;
@@ -361,7 +361,7 @@ class $o {
361
361
  static renderToCanvas(e) {
362
362
  if (this.material === null) {
363
363
  this.camera = new Rh(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new mu(), this.material = new _n();
364
- const t = new xr();
364
+ const t = new bn();
365
365
  t.setAttribute("position", new gn([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3)), t.setAttribute("normal", new gn([0, 0, 1, 0, 0, 1], 3)), t.setAttribute("uv", new gn([0, 0, 2, 0, 0, 2], 2));
366
366
  const s = new Y(t, this.material);
367
367
  this.scene.add(s);
@@ -397,7 +397,7 @@ function nP(a) {
397
397
  });
398
398
  });
399
399
  }
400
- const Nn = _u([
400
+ const Pn = _u([
401
401
  "ctrlKey",
402
402
  "metaKey",
403
403
  "shiftKey",
@@ -463,12 +463,12 @@ function p_(a, e) {
463
463
  }
464
464
  const rP = {
465
465
  contextmenu: h_,
466
- mousedown: Nn,
467
- mousemove: Nn,
468
- mouseup: Nn,
469
- pointerdown: Nn,
470
- pointermove: Nn,
471
- pointerup: Nn,
466
+ mousedown: Pn,
467
+ mousemove: Pn,
468
+ mouseup: Pn,
469
+ pointerdown: Pn,
470
+ pointermove: Pn,
471
+ pointerup: Pn,
472
472
  touchstart: nc,
473
473
  touchmove: nc,
474
474
  touchend: nc,
@@ -1109,7 +1109,7 @@ function x_(a) {
1109
1109
  const e = a.type;
1110
1110
  return e.search("Helper") > -1 ? "icon_utils" : e.search("Camera") > -1 ? "camera" : e.search("Light") > -1 ? "light" : "obj3D";
1111
1111
  }
1112
- function Jn(a) {
1112
+ function er(a) {
1113
1113
  const e = {
1114
1114
  name: a.name,
1115
1115
  type: a.type,
@@ -1117,7 +1117,7 @@ function Jn(a) {
1117
1117
  children: []
1118
1118
  };
1119
1119
  return a.children.forEach((t) => {
1120
- e.children.push(Jn(t));
1120
+ e.children.push(er(t));
1121
1121
  }), e;
1122
1122
  }
1123
1123
  function __(a) {
@@ -1148,7 +1148,7 @@ function b_(a) {
1148
1148
  }
1149
1149
  return !1;
1150
1150
  }
1151
- function Pn(a) {
1151
+ function Fn(a) {
1152
1152
  const e = {};
1153
1153
  for (const t in a) {
1154
1154
  if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || b_(t)) continue;
@@ -1202,28 +1202,28 @@ function rc(a) {
1202
1202
  if (Array.isArray(s.material)) {
1203
1203
  const i = [];
1204
1204
  s.material.forEach((n) => {
1205
- i.push(Pn(n));
1205
+ i.push(Fn(n));
1206
1206
  }), e.material = i;
1207
1207
  } else
1208
- e.material = Pn(s.material);
1208
+ e.material = Fn(s.material);
1209
1209
  } else if (t.search("points") > -1) {
1210
1210
  const s = a;
1211
1211
  if (Array.isArray(s.material)) {
1212
1212
  const i = [];
1213
1213
  s.material.forEach((n) => {
1214
- i.push(Pn(n));
1214
+ i.push(Fn(n));
1215
1215
  }), e.material = i;
1216
1216
  } else
1217
- e.material = Pn(s.material);
1217
+ e.material = Fn(s.material);
1218
1218
  } else if (t.search("line") > -1) {
1219
1219
  const s = a;
1220
1220
  if (Array.isArray(s.material)) {
1221
1221
  const i = [];
1222
1222
  s.material.forEach((n) => {
1223
- i.push(Pn(n));
1223
+ i.push(Fn(n));
1224
1224
  }), e.material = i;
1225
1225
  } else
1226
- e.material = Pn(s.material);
1226
+ e.material = Fn(s.material);
1227
1227
  } else t.search("camera") > -1 ? a.type === "PerspectiveCamera" ? e.perspectiveCameraInfo = {
1228
1228
  fov: a.fov,
1229
1229
  zoom: a.zoom,
@@ -1444,7 +1444,7 @@ class mP extends bu {
1444
1444
  // Renderer
1445
1445
  setRenderer(e, t = null) {
1446
1446
  if (this.renderer = e, this.canvas = e.domElement, this.inputElement = t !== null ? t : this.canvas, !this.app.debugEnabled) return;
1447
- const s = `#${e.getClearColor(new Tn()).getHexString()}`;
1447
+ const s = `#${e.getClearColor(new Sn()).getHexString()}`;
1448
1448
  this.app.send({
1449
1449
  event: "addRenderer",
1450
1450
  target: "editor",
@@ -1457,7 +1457,7 @@ class mP extends bu {
1457
1457
  localClippingEnabled: e.localClippingEnabled,
1458
1458
  clearColor: s,
1459
1459
  clearAlpha: e.getClearAlpha(),
1460
- colorManagement: er.enabled,
1460
+ colorManagement: tr.enabled,
1461
1461
  toneMapping: e.toneMapping,
1462
1462
  toneMappingExposure: e.toneMappingExposure,
1463
1463
  type: e.isWebGLRenderer ? "WebGLRenderer" : "WebGPURenderer"
@@ -1475,7 +1475,7 @@ class mP extends bu {
1475
1475
  addScene(e) {
1476
1476
  if (e === void 0 || (this.scenes.set(e.name, e), !this.app.debugEnabled)) return;
1477
1477
  Yd(), Dh(e);
1478
- const t = Jn(e);
1478
+ const t = er(e);
1479
1479
  this.app.send({
1480
1480
  event: "addScene",
1481
1481
  target: "editor",
@@ -1486,7 +1486,7 @@ class mP extends bu {
1486
1486
  if (!this.app.debugEnabled) return;
1487
1487
  const t = this.scenes.get(e);
1488
1488
  if (t !== void 0) {
1489
- const s = Jn(t);
1489
+ const s = er(t);
1490
1490
  this.app.send({
1491
1491
  event: "refreshScene",
1492
1492
  target: "app",
@@ -1496,7 +1496,7 @@ class mP extends bu {
1496
1496
  }
1497
1497
  removeScene(e) {
1498
1498
  if (e === void 0 || (this.scenes.delete(e.name), !this.app.debugEnabled)) return;
1499
- const t = Jn(e);
1499
+ const t = er(e);
1500
1500
  this.app.send({
1501
1501
  event: "removeScene",
1502
1502
  target: "editor",
@@ -1515,7 +1515,7 @@ class mP extends bu {
1515
1515
  setScene(e) {
1516
1516
  if (e === void 0 || (this.scene = e, !this.app.debugEnabled)) return;
1517
1517
  this.renderer !== void 0 && ($o.renderer = this.renderer), Yd(), Dh(e);
1518
- const t = Jn(e);
1518
+ const t = er(e);
1519
1519
  this.app.send({
1520
1520
  event: "setScene",
1521
1521
  target: "editor",
@@ -1559,11 +1559,11 @@ class mP extends bu {
1559
1559
  this.app.send({
1560
1560
  event: "refreshScene",
1561
1561
  target: "editor",
1562
- data: Jn(this.scenes.get(e.data.name))
1562
+ data: er(this.scenes.get(e.data.name))
1563
1563
  });
1564
1564
  break;
1565
1565
  case "updateRenderer":
1566
- this.renderer && (this.renderer.autoClearColor = e.data.autoClearColor, this.renderer.outputColorSpace = e.data.outputColorSpace, this.renderer.localClippingEnabled = e.data.localClippingEnabled, this.renderer.setClearColor(e.data.clearColor, e.data.clearAlpha), this.renderer.toneMapping = e.data.toneMapping, this.renderer.toneMappingExposure = e.data.toneMappingExposure, er.enabled = e.data.colorManagement);
1566
+ this.renderer && (this.renderer.autoClearColor = e.data.autoClearColor, this.renderer.outputColorSpace = e.data.outputColorSpace, this.renderer.localClippingEnabled = e.data.localClippingEnabled, this.renderer.setClearColor(e.data.clearColor, e.data.clearAlpha), this.renderer.toneMapping = e.data.toneMapping, this.renderer.toneMappingExposure = e.data.toneMappingExposure, tr.enabled = e.data.colorManagement);
1567
1567
  break;
1568
1568
  }
1569
1569
  if (e.event === "updateGroup") {
@@ -1821,18 +1821,18 @@ function w_() {
1821
1821
  X < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1822
1822
  }
1823
1823
  }
1824
- var Dr = g.ReactCurrentDispatcher, Mn;
1824
+ var Dr = g.ReactCurrentDispatcher, An;
1825
1825
  function ja(S, z, j) {
1826
1826
  {
1827
- if (Mn === void 0)
1827
+ if (An === void 0)
1828
1828
  try {
1829
1829
  throw Error();
1830
1830
  } catch (Ce) {
1831
1831
  var te = Ce.stack.trim().match(/\n( *(at )?)/);
1832
- Mn = te && te[1] || "";
1832
+ An = te && te[1] || "";
1833
1833
  }
1834
1834
  return `
1835
- ` + Mn + S;
1835
+ ` + An + S;
1836
1836
  }
1837
1837
  }
1838
1838
  var Zl = !1, qa;
@@ -1908,7 +1908,7 @@ function w_() {
1908
1908
  } finally {
1909
1909
  Zl = !1, Dr.current = De, Lt(), Error.prepareStackTrace = Ce;
1910
1910
  }
1911
- var Rn = S ? S.displayName || S.name : "", $i = Rn ? ja(Rn) : "";
1911
+ var Nn = S ? S.displayName || S.name : "", $i = Nn ? ja(Nn) : "";
1912
1912
  return typeof S == "function" && qa.set(S, $i), $i;
1913
1913
  }
1914
1914
  function O0(S, z, j) {
@@ -2093,7 +2093,7 @@ function w_() {
2093
2093
  }
2094
2094
  }
2095
2095
  var Ql = g.ReactCurrentOwner, Pd = g.ReactDebugCurrentFrame;
2096
- function An(S) {
2096
+ function Rn(S) {
2097
2097
  if (S) {
2098
2098
  var z = S._owner, j = Ya(S.type, S._source, z ? z.type : null);
2099
2099
  Pd.setExtraStackFrame(j);
@@ -2143,7 +2143,7 @@ Check the top-level render call using <` + j + ">.");
2143
2143
  return;
2144
2144
  Dd[j] = !0;
2145
2145
  var te = "";
2146
- S && S._owner && S._owner !== Ql.current && (te = " It was passed a child from " + W(S._owner.type) + "."), An(S), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', j, te), An(null);
2146
+ S && S._owner && S._owner !== Ql.current && (te = " It was passed a child from " + W(S._owner.type) + "."), Rn(S), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', j, te), Rn(null);
2147
2147
  }
2148
2148
  }
2149
2149
  function Id(S, z) {
@@ -2195,11 +2195,11 @@ Check the top-level render call using <` + j + ">.");
2195
2195
  for (var z = Object.keys(S.props), j = 0; j < z.length; j++) {
2196
2196
  var te = z[j];
2197
2197
  if (te !== "children" && te !== "key") {
2198
- An(S), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", te), An(null);
2198
+ Rn(S), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", te), Rn(null);
2199
2199
  break;
2200
2200
  }
2201
2201
  }
2202
- S.ref !== null && (An(S), x("Invalid attribute `ref` supplied to `React.Fragment`."), An(null));
2202
+ S.ref !== null && (Rn(S), x("Invalid attribute `ref` supplied to `React.Fragment`."), Rn(null));
2203
2203
  }
2204
2204
  }
2205
2205
  var Bd = {};
@@ -2222,8 +2222,8 @@ Check the top-level render call using <` + j + ">.");
2222
2222
  if (ns !== void 0)
2223
2223
  if (te)
2224
2224
  if (Kl(ns)) {
2225
- for (var Rn = 0; Rn < ns.length; Rn++)
2226
- Id(ns[Rn], S);
2225
+ for (var Nn = 0; Nn < ns.length; Nn++)
2226
+ Id(ns[Nn], S);
2227
2227
  Object.freeze && Object.freeze(ns);
2228
2228
  } else
2229
2229
  x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
@@ -2433,7 +2433,7 @@ function sg(a) {
2433
2433
  const e = We(null), [t, s] = Re(!1), i = a.child !== void 0 && a.child.children.length > 0, n = [];
2434
2434
  return a.child !== void 0 && a.child.children.length > 0 && a.child.children.map((r, o) => {
2435
2435
  n.push(/* @__PURE__ */ C.jsx(sg, { app: a.app, child: r, three: a.three }, o));
2436
- }), Sn(() => {
2436
+ }), vn(() => {
2437
2437
  if (a.child) {
2438
2438
  const r = a.three.getScene(a.child.uuid);
2439
2439
  if (r !== null) {
@@ -2500,7 +2500,7 @@ function Qd(a) {
2500
2500
  }
2501
2501
  function ua(a) {
2502
2502
  const [e, t] = Re(a.defaultValue);
2503
- return Sn(() => {
2503
+ return vn(() => {
2504
2504
  let s = !1, i = -1, n = 0, r = a.defaultValue, o = !1;
2505
2505
  const l = (p) => {
2506
2506
  o = p.ctrlKey;
@@ -2566,7 +2566,7 @@ function yn(a) {
2566
2566
  onChange: (n) => {
2567
2567
  if (n.target.value.length === 0) return;
2568
2568
  const r = Number(n.target.value);
2569
- isNaN(r) || a.onChange !== void 0 && a.onChange(a.prop, r);
2569
+ isNaN(r) || (i(r), a.onChange !== void 0 && a.onChange(a.prop, r));
2570
2570
  }
2571
2571
  }
2572
2572
  ),
@@ -2650,7 +2650,7 @@ function F_(a) {
2650
2650
  const N = Number(i.current.value);
2651
2651
  y({ min: m.min, max: N }), u > N && d(rn(m.min, N, u)), p > N && f(rn(m.min, N, p));
2652
2652
  }
2653
- Sn(() => {
2653
+ vn(() => {
2654
2654
  r.current.style.left = `${Ph(m.min, m.max, u) * 100}%`, r.current.style.top = `${(1 - Ph(m.min, m.max, p)) * 100}%`;
2655
2655
  }, [m, u, p]);
2656
2656
  const A = a.step !== void 0 ? a.step : 0.01;
@@ -3830,7 +3830,7 @@ function da(a, e, t, s, i = "", n = !1) {
3830
3830
  value: e,
3831
3831
  disabled: n,
3832
3832
  onChange: (c, h) => {
3833
- const u = new Tn(h);
3833
+ const u = new Sn(h);
3834
3834
  s.updateObject(t.uuid, `material.${o}`, u);
3835
3835
  const d = s.getScene(t.uuid);
3836
3836
  if (d !== null) {
@@ -4162,7 +4162,7 @@ function cb(a) {
4162
4162
  }
4163
4163
  function jo(a) {
4164
4164
  let e = a.value;
4165
- e !== void 0 && (e.isColor !== void 0 ? e = Hd(a.value) : a.type === "color" && (e = Hd(new Tn().setStyle(a.value, Ra))));
4165
+ e !== void 0 && (e.isColor !== void 0 ? e = Hd(a.value) : a.type === "color" && (e = Hd(new Sn().setStyle(a.value, Ra))));
4166
4166
  const [t, s] = Re(e), i = We(null), n = (c) => {
4167
4167
  let h = c.target.value;
4168
4168
  if (a.type === "boolean")
@@ -4651,7 +4651,7 @@ class As {
4651
4651
  return t.delete(e[e.length - 1]);
4652
4652
  }
4653
4653
  }
4654
- const rg = "177", pb = 0, fb = 1, mb = 2, gb = 0, yb = 1, qo = 3, ii = 0, $t = 1, cr = 2, Tr = 0, ni = 1, ll = 2, cl = 3, hl = 4, Sa = 5, Es = 100, ag = 101, og = 102, xb = 103, _b = 104, Ri = 200, lg = 201, cg = 202, hg = 203, ul = 204, dl = 205, ug = 206, dg = 207, pg = 208, fg = 209, mg = 210, gg = 0, yg = 1, xg = 2, pl = 3, _g = 4, bg = 5, Tg = 6, Sg = 7, Nl = 0, bb = 1, Tb = 2, hr = 0, Sb = 1, vb = 2, wb = 3, Eb = 4, Cb = 6, Mb = 7, Su = 300, Fa = 301, fl = 302, vu = 303, wu = 304, Ih = 306, Sr = 1e3, Ii = 1001, vr = 1002, ut = 1003, vg = 1004, Da = 1005, is = 1006, Bh = 1007, ri = 1008, Dt = 1009, va = 1010, wa = 1011, sr = 1012, Rt = 1013, Ze = 1014, ss = 1015, cs = 1016, Ab = 1017, Rb = 1018, Li = 1020, wg = 35902, Nb = 1021, Eu = 1022, hs = 1023, Gs = 1026, ai = 1027, Cu = 1028, Mu = 1029, mn = 1030, Au = 1031, Pb = 1032, Ru = 1033, ac = 33776, Yo = 33777, Xo = 33778, Zo = 33779, np = 35840, rp = 35841, ap = 35842, op = 35843, lp = 36196, Lh = 37492, Uh = 37496, kh = 37808, zh = 37809, Gh = 37810, Vh = 37811, Hh = 37812, Wh = 37813, $h = 37814, jh = 37815, qh = 37816, Yh = 37817, Xh = 37818, Zh = 37819, Kh = 37820, Qh = 37821, oc = 36492, Fb = 36283, cp = 36284, hp = 36285, up = 36286, Ui = 0, Db = 1, ui = "", es = "srgb", ur = "srgb-linear", ml = "linear", se = "srgb", Ob = 0, on = 7680, Ib = 7681, Bb = 7682, Lb = 7683, Ub = 34055, kb = 34056, zb = 5386, Gb = 512, Vb = 513, Hb = 514, Wb = 515, $b = 516, jb = 517, qb = 518, Jh = 519, Eg = 512, Nu = 513, Cg = 514, Mg = 515, Ag = 516, Rg = 517, Ng = 518, Pg = 519, gl = 35044, ir = 35048, Vt = 2e3, ki = 2001;
4654
+ const rg = "177", pb = 0, fb = 1, mb = 2, gb = 0, yb = 1, qo = 3, ii = 0, $t = 1, hr = 2, Tr = 0, ni = 1, ll = 2, cl = 3, hl = 4, Sa = 5, Es = 100, ag = 101, og = 102, xb = 103, _b = 104, Ri = 200, lg = 201, cg = 202, hg = 203, ul = 204, dl = 205, ug = 206, dg = 207, pg = 208, fg = 209, mg = 210, gg = 0, yg = 1, xg = 2, pl = 3, _g = 4, bg = 5, Tg = 6, Sg = 7, Nl = 0, bb = 1, Tb = 2, ur = 0, Sb = 1, vb = 2, wb = 3, Eb = 4, Cb = 6, Mb = 7, Su = 300, Fa = 301, fl = 302, vu = 303, wu = 304, Ih = 306, Sr = 1e3, Ii = 1001, vr = 1002, ut = 1003, vg = 1004, Da = 1005, is = 1006, Bh = 1007, ri = 1008, Dt = 1009, va = 1010, wa = 1011, ir = 1012, Rt = 1013, Ze = 1014, ss = 1015, cs = 1016, Ab = 1017, Rb = 1018, Li = 1020, wg = 35902, Nb = 1021, Eu = 1022, hs = 1023, Gs = 1026, ai = 1027, Cu = 1028, Mu = 1029, mn = 1030, Au = 1031, Pb = 1032, Ru = 1033, ac = 33776, Yo = 33777, Xo = 33778, Zo = 33779, np = 35840, rp = 35841, ap = 35842, op = 35843, lp = 36196, Lh = 37492, Uh = 37496, kh = 37808, zh = 37809, Gh = 37810, Vh = 37811, Hh = 37812, Wh = 37813, $h = 37814, jh = 37815, qh = 37816, Yh = 37817, Xh = 37818, Zh = 37819, Kh = 37820, Qh = 37821, oc = 36492, Fb = 36283, cp = 36284, hp = 36285, up = 36286, Ui = 0, Db = 1, ui = "", es = "srgb", dr = "srgb-linear", ml = "linear", se = "srgb", Ob = 0, on = 7680, Ib = 7681, Bb = 7682, Lb = 7683, Ub = 34055, kb = 34056, zb = 5386, Gb = 512, Vb = 513, Hb = 514, Wb = 515, $b = 516, jb = 517, qb = 518, Jh = 519, Eg = 512, Nu = 513, Cg = 514, Mg = 515, Ag = 516, Rg = 517, Ng = 518, Pg = 519, gl = 35044, nr = 35048, Vt = 2e3, ki = 2001;
4655
4655
  class qt {
4656
4656
  /**
4657
4657
  * Constructs a new 3x3 matrix. The arguments are supposed to be
@@ -5063,7 +5063,7 @@ const pp = /* @__PURE__ */ new qt().set(
5063
5063
  function Xb() {
5064
5064
  const a = {
5065
5065
  enabled: !0,
5066
- workingColorSpace: ur,
5066
+ workingColorSpace: dr,
5067
5067
  /**
5068
5068
  * Implementations of supported color spaces.
5069
5069
  *
@@ -5084,7 +5084,7 @@ function Xb() {
5084
5084
  */
5085
5085
  spaces: {},
5086
5086
  convert: function(i, n, r) {
5087
- return this.enabled === !1 || n === r || !n || !r || (this.spaces[n].transfer === se && (i.r = oi(i.r), i.g = oi(i.g), i.b = oi(i.b)), this.spaces[n].primaries !== this.spaces[r].primaries && (i.applyMatrix3(this.spaces[n].toXYZ), i.applyMatrix3(this.spaces[r].fromXYZ)), this.spaces[r].transfer === se && (i.r = dr(i.r), i.g = dr(i.g), i.b = dr(i.b))), i;
5087
+ return this.enabled === !1 || n === r || !n || !r || (this.spaces[n].transfer === se && (i.r = oi(i.r), i.g = oi(i.g), i.b = oi(i.b)), this.spaces[n].primaries !== this.spaces[r].primaries && (i.applyMatrix3(this.spaces[n].toXYZ), i.applyMatrix3(this.spaces[r].fromXYZ)), this.spaces[r].transfer === se && (i.r = pr(i.r), i.g = pr(i.g), i.b = pr(i.b))), i;
5088
5088
  },
5089
5089
  workingToColorSpace: function(i, n) {
5090
5090
  return this.convert(i, this.workingColorSpace, n);
@@ -5123,7 +5123,7 @@ function Xb() {
5123
5123
  }
5124
5124
  }, e = [0.64, 0.33, 0.3, 0.6, 0.15, 0.06], t = [0.2126, 0.7152, 0.0722], s = [0.3127, 0.329];
5125
5125
  return a.define({
5126
- [ur]: {
5126
+ [dr]: {
5127
5127
  primaries: e,
5128
5128
  whitePoint: s,
5129
5129
  transfer: ml,
@@ -5148,7 +5148,7 @@ const Ue = /* @__PURE__ */ Xb();
5148
5148
  function oi(a) {
5149
5149
  return a < 0.04045 ? a * 0.0773993808 : Math.pow(a * 0.9478672986 + 0.0521327014, 2.4);
5150
5150
  }
5151
- function dr(a) {
5151
+ function pr(a) {
5152
5152
  return a < 31308e-7 ? a * 12.92 : 1.055 * Math.pow(a, 0.41666) - 0.055;
5153
5153
  }
5154
5154
  const Dg = {
@@ -5502,7 +5502,7 @@ class Se {
5502
5502
  * @return {Color} A reference to this color.
5503
5503
  */
5504
5504
  copyLinearToSRGB(e) {
5505
- return this.r = dr(e.r), this.g = dr(e.g), this.b = dr(e.b), this;
5505
+ return this.r = pr(e.r), this.g = pr(e.g), this.b = pr(e.b), this;
5506
5506
  }
5507
5507
  /**
5508
5508
  * Converts this color from `SRGBColorSpace` to `LinearSRGBColorSpace`.
@@ -7242,7 +7242,7 @@ class Be {
7242
7242
  * @return {Matrix4} A reference to this matrix.
7243
7243
  */
7244
7244
  extractRotation(e) {
7245
- const t = this.elements, s = e.elements, i = 1 / Fn.setFromMatrixColumn(e, 0).length(), n = 1 / Fn.setFromMatrixColumn(e, 1).length(), r = 1 / Fn.setFromMatrixColumn(e, 2).length();
7245
+ const t = this.elements, s = e.elements, i = 1 / Dn.setFromMatrixColumn(e, 0).length(), n = 1 / Dn.setFromMatrixColumn(e, 1).length(), r = 1 / Dn.setFromMatrixColumn(e, 2).length();
7246
7246
  return t[0] = s[0] * i, t[1] = s[1] * i, t[2] = s[2] * i, t[3] = 0, t[4] = s[4] * n, t[5] = s[5] * n, t[6] = s[6] * n, t[7] = 0, t[8] = s[8] * r, t[9] = s[9] * r, t[10] = s[10] * r, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
7247
7247
  }
7248
7248
  /**
@@ -7656,8 +7656,8 @@ class Be {
7656
7656
  */
7657
7657
  decompose(e, t, s) {
7658
7658
  const i = this.elements;
7659
- let n = Fn.set(i[0], i[1], i[2]).length();
7660
- const r = Fn.set(i[4], i[5], i[6]).length(), o = Fn.set(i[8], i[9], i[10]).length();
7659
+ let n = Dn.set(i[0], i[1], i[2]).length();
7660
+ const r = Dn.set(i[4], i[5], i[6]).length(), o = Dn.set(i[8], i[9], i[10]).length();
7661
7661
  this.determinant() < 0 && (n = -n), e.x = i[12], e.y = i[13], e.z = i[14], ys.copy(this);
7662
7662
  const c = 1 / n, h = 1 / r, u = 1 / o;
7663
7663
  return ys.elements[0] *= c, ys.elements[1] *= c, ys.elements[2] *= c, ys.elements[4] *= h, ys.elements[5] *= h, ys.elements[6] *= h, ys.elements[8] *= u, ys.elements[9] *= u, ys.elements[10] *= u, t.setFromRotationMatrix(ys), s.x = n, s.y = r, s.z = o, this;
@@ -7747,7 +7747,7 @@ class Be {
7747
7747
  return e[t] = s[0], e[t + 1] = s[1], e[t + 2] = s[2], e[t + 3] = s[3], e[t + 4] = s[4], e[t + 5] = s[5], e[t + 6] = s[6], e[t + 7] = s[7], e[t + 8] = s[8], e[t + 9] = s[9], e[t + 10] = s[10], e[t + 11] = s[11], e[t + 12] = s[12], e[t + 13] = s[13], e[t + 14] = s[14], e[t + 15] = s[15], e;
7748
7748
  }
7749
7749
  }
7750
- const Fn = /* @__PURE__ */ new R(), ys = /* @__PURE__ */ new Be(), Zb = /* @__PURE__ */ new R(0, 0, 0), Kb = /* @__PURE__ */ new R(1, 1, 1), _i = /* @__PURE__ */ new R(), Ja = /* @__PURE__ */ new R(), Yt = /* @__PURE__ */ new R();
7750
+ const Dn = /* @__PURE__ */ new R(), ys = /* @__PURE__ */ new Be(), Zb = /* @__PURE__ */ new R(0, 0, 0), Kb = /* @__PURE__ */ new R(1, 1, 1), _i = /* @__PURE__ */ new R(), Ja = /* @__PURE__ */ new R(), Yt = /* @__PURE__ */ new R();
7751
7751
  class ce {
7752
7752
  /**
7753
7753
  * Constructs a new 2D vector.
@@ -9339,7 +9339,7 @@ class cT extends Vi {
9339
9339
  t === us.VERTEX ? this.backend.createAttribute(e) : t === us.INDEX ? this.backend.createIndexAttribute(e) : t === us.STORAGE ? this.backend.createStorageAttribute(e) : t === us.INDIRECT && this.backend.createIndirectStorageAttribute(e), s.version = this._getBufferAttribute(e).version;
9340
9340
  else {
9341
9341
  const i = this._getBufferAttribute(e);
9342
- (s.version < i.version || i.usage === ir) && (this.backend.updateAttribute(e), s.version = i.version);
9342
+ (s.version < i.version || i.usage === nr) && (this.backend.updateAttribute(e), s.version = i.version);
9343
9343
  }
9344
9344
  }
9345
9345
  /**
@@ -10320,7 +10320,7 @@ function xp(a, e) {
10320
10320
  return a.groupOrder !== e.groupOrder ? a.groupOrder - e.groupOrder : a.renderOrder !== e.renderOrder ? a.renderOrder - e.renderOrder : a.z !== e.z ? e.z - a.z : a.id - e.id;
10321
10321
  }
10322
10322
  function _p(a) {
10323
- return (a.transmission > 0 || a.transmissionNode) && a.side === cr && a.forceSinglePass === !1;
10323
+ return (a.transmission > 0 || a.transmissionNode) && a.side === hr && a.forceSinglePass === !1;
10324
10324
  }
10325
10325
  class bT {
10326
10326
  /**
@@ -10496,7 +10496,7 @@ function Vg(a) {
10496
10496
  s.push(i.id);
10497
10497
  return Pu(s);
10498
10498
  }
10499
- let vn = class {
10499
+ let wn = class {
10500
10500
  /**
10501
10501
  * Adds the given event listener to the given event type.
10502
10502
  *
@@ -10824,8 +10824,8 @@ class wT {
10824
10824
  }
10825
10825
  }
10826
10826
  let ET = 0;
10827
- const Sp = /* @__PURE__ */ new R(), Dn = /* @__PURE__ */ new Rr(), qs = /* @__PURE__ */ new Be(), so = /* @__PURE__ */ new R(), zr = /* @__PURE__ */ new R(), CT = /* @__PURE__ */ new R(), MT = /* @__PURE__ */ new Rr(), vp = /* @__PURE__ */ new R(1, 0, 0), wp = /* @__PURE__ */ new R(0, 1, 0), Ep = /* @__PURE__ */ new R(0, 0, 1), Cp = { type: "added" }, AT = { type: "removed" }, On = { type: "childadded", child: null }, dc = { type: "childremoved", child: null };
10828
- class dt extends vn {
10827
+ const Sp = /* @__PURE__ */ new R(), On = /* @__PURE__ */ new Rr(), qs = /* @__PURE__ */ new Be(), so = /* @__PURE__ */ new R(), zr = /* @__PURE__ */ new R(), CT = /* @__PURE__ */ new R(), MT = /* @__PURE__ */ new Rr(), vp = /* @__PURE__ */ new R(1, 0, 0), wp = /* @__PURE__ */ new R(0, 1, 0), Ep = /* @__PURE__ */ new R(0, 0, 1), Cp = { type: "added" }, AT = { type: "removed" }, In = { type: "childadded", child: null }, dc = { type: "childremoved", child: null };
10828
+ class dt extends wn {
10829
10829
  /**
10830
10830
  * Constructs a new 3D object.
10831
10831
  */
@@ -11016,7 +11016,7 @@ class dt extends vn {
11016
11016
  * @return {Object3D} A reference to this instance.
11017
11017
  */
11018
11018
  rotateOnAxis(e, t) {
11019
- return Dn.setFromAxisAngle(e, t), this.quaternion.multiply(Dn), this;
11019
+ return On.setFromAxisAngle(e, t), this.quaternion.multiply(On), this;
11020
11020
  }
11021
11021
  /**
11022
11022
  * Rotates the 3D object along an axis in world space.
@@ -11026,7 +11026,7 @@ class dt extends vn {
11026
11026
  * @return {Object3D} A reference to this instance.
11027
11027
  */
11028
11028
  rotateOnWorldAxis(e, t) {
11029
- return Dn.setFromAxisAngle(e, t), this.quaternion.premultiply(Dn), this;
11029
+ return On.setFromAxisAngle(e, t), this.quaternion.premultiply(On), this;
11030
11030
  }
11031
11031
  /**
11032
11032
  * Rotates the 3D object around its X axis in local space.
@@ -11122,7 +11122,7 @@ class dt extends vn {
11122
11122
  lookAt(e, t, s) {
11123
11123
  e.isVector3 ? so.copy(e) : so.set(e, t, s);
11124
11124
  const i = this.parent;
11125
- this.updateWorldMatrix(!0, !1), zr.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? qs.lookAt(zr, so, this.up) : qs.lookAt(so, zr, this.up), this.quaternion.setFromRotationMatrix(qs), i && (qs.extractRotation(i.matrixWorld), Dn.setFromRotationMatrix(qs), this.quaternion.premultiply(Dn.invert()));
11125
+ this.updateWorldMatrix(!0, !1), zr.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? qs.lookAt(zr, so, this.up) : qs.lookAt(so, zr, this.up), this.quaternion.setFromRotationMatrix(qs), i && (qs.extractRotation(i.matrixWorld), On.setFromRotationMatrix(qs), this.quaternion.premultiply(On.invert()));
11126
11126
  }
11127
11127
  /**
11128
11128
  * Adds the given 3D object as a child to this 3D object. An arbitrary number of
@@ -11140,7 +11140,7 @@ class dt extends vn {
11140
11140
  this.add(arguments[t]);
11141
11141
  return this;
11142
11142
  }
11143
- return e === this ? (console.error("THREE.Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(Cp), On.child = e, this.dispatchEvent(On), On.child = null) : console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.", e), this);
11143
+ return e === this ? (console.error("THREE.Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(Cp), In.child = e, this.dispatchEvent(In), In.child = null) : console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.", e), this);
11144
11144
  }
11145
11145
  /**
11146
11146
  * Removes the given 3D object as child from this 3D object.
@@ -11191,7 +11191,7 @@ class dt extends vn {
11191
11191
  * @return {Object3D} A reference to this instance.
11192
11192
  */
11193
11193
  attach(e) {
11194
- return this.updateWorldMatrix(!0, !1), qs.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), qs.multiply(e.parent.matrixWorld)), e.applyMatrix4(qs), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(Cp), On.child = e, this.dispatchEvent(On), On.child = null, this;
11194
+ return this.updateWorldMatrix(!0, !1), qs.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), qs.multiply(e.parent.matrixWorld)), e.applyMatrix4(qs), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(Cp), In.child = e, this.dispatchEvent(In), In.child = null, this;
11195
11195
  }
11196
11196
  /**
11197
11197
  * Searches through the 3D object and its children, starting with the 3D object
@@ -11584,7 +11584,7 @@ class PT {
11584
11584
  this.chainMaps = {};
11585
11585
  }
11586
11586
  }
11587
- let In;
11587
+ let Bn;
11588
11588
  class FT {
11589
11589
  /**
11590
11590
  * Returns a data URI containing a representation of the given image.
@@ -11600,9 +11600,9 @@ class FT {
11600
11600
  if (e instanceof HTMLCanvasElement)
11601
11601
  s = e;
11602
11602
  else {
11603
- In === void 0 && (In = eu("canvas")), In.width = e.width, In.height = e.height;
11604
- const i = In.getContext("2d");
11605
- e instanceof ImageData ? i.putImageData(e, 0, 0) : i.drawImage(e, 0, 0, e.width, e.height), s = In;
11603
+ Bn === void 0 && (Bn = eu("canvas")), Bn.width = e.width, Bn.height = e.height;
11604
+ const i = Bn.getContext("2d");
11605
+ e instanceof ImageData ? i.putImageData(e, 0, 0) : i.drawImage(e, 0, 0, e.width, e.height), s = Bn;
11606
11606
  }
11607
11607
  return s.toDataURL(t);
11608
11608
  }
@@ -11699,7 +11699,7 @@ function pc(a) {
11699
11699
  }
11700
11700
  let OT = 0;
11701
11701
  const fc = /* @__PURE__ */ new R();
11702
- class wt extends vn {
11702
+ class wt extends wn {
11703
11703
  /**
11704
11704
  * Constructs a new texture.
11705
11705
  *
@@ -12144,7 +12144,7 @@ const io = {
12144
12144
  generate: "analyze"
12145
12145
  };
12146
12146
  let kT = 0;
12147
- class ae extends vn {
12147
+ class ae extends wn {
12148
12148
  static get type() {
12149
12149
  return "Node";
12150
12150
  }
@@ -12973,14 +12973,14 @@ class WT extends ae {
12973
12973
  }
12974
12974
  }
12975
12975
  let wr = null;
12976
- const nr = /* @__PURE__ */ new Map();
12976
+ const rr = /* @__PURE__ */ new Map();
12977
12977
  function D(a, e) {
12978
- if (nr.has(a)) {
12978
+ if (rr.has(a)) {
12979
12979
  console.warn(`THREE.TSL: Redefinition of method chaining '${a}'.`);
12980
12980
  return;
12981
12981
  }
12982
12982
  if (typeof e != "function") throw new Error(`THREE.TSL: Node element ${a} is not a function`);
12983
- nr.set(a, e);
12983
+ rr.set(a, e);
12984
12984
  }
12985
12985
  const Wg = (a) => a.replace(/r|s/g, "x").replace(/g|t/g, "y").replace(/b|p/g, "z").replace(/a|q/g, "w"), Pp = (a) => Wg(a).split("").sort().join(""), $g = {
12986
12986
  setup(a, e) {
@@ -12991,14 +12991,14 @@ const Wg = (a) => a.replace(/r|s/g, "x").replace(/g|t/g, "y").replace(/b|p/g, "z
12991
12991
  if (typeof e == "string" && a[e] === void 0) {
12992
12992
  if (a.isStackNode !== !0 && e === "assign")
12993
12993
  return (...s) => (wr.assign(t, ...s), t);
12994
- if (nr.has(e)) {
12995
- const s = nr.get(e);
12994
+ if (rr.has(e)) {
12995
+ const s = rr.get(e);
12996
12996
  return a.isStackNode ? (...i) => t.add(s(...i)) : (...i) => s(t, ...i);
12997
12997
  } else {
12998
12998
  if (e === "self")
12999
12999
  return a;
13000
- if (e.endsWith("Assign") && nr.has(e.slice(0, e.length - 6))) {
13001
- const s = nr.get(e.slice(0, e.length - 6));
13000
+ if (e.endsWith("Assign") && rr.has(e.slice(0, e.length - 6))) {
13001
+ const s = rr.get(e.slice(0, e.length - 6));
13002
13002
  return a.isStackNode ? (...i) => t.assign(i[0], s(...i)) : (...i) => t.assign(s(t, ...i));
13003
13003
  } else {
13004
13004
  if (/^[xyzwrgbastpq]{1,4}$/.test(e) === !0)
@@ -13049,9 +13049,9 @@ const Wg = (a) => a.replace(/r|s/g, "x").replace(/g|t/g, "y").replace(/b|p/g, "z
13049
13049
  let u;
13050
13050
  return r ? u = /[a-z]/i.test(r) ? r + "()" : r : u = a.type, o !== void 0 && h.length < o ? (console.error(`THREE.TSL: "${u}" parameter length is less than minimum required.`), h.concat(new Array(o - h.length).fill(0))) : l !== void 0 && h.length > l ? (console.error(`THREE.TSL: "${u}" parameter length exceeds limit.`), h.slice(0, l)) : h;
13051
13051
  }
13052
- return e === null ? n = (...h) => i(new a(...pr(c(h)))) : t !== null ? (t = U(t), n = (...h) => i(new a(e, ...pr(c(h)), t))) : n = (...h) => i(new a(e, ...pr(c(h)))), n.setParameterLength = (...h) => (h.length === 1 ? o = l = h[0] : h.length === 2 && ([o, l] = h), n), n.setName = (h) => (r = h, n), n;
13052
+ return e === null ? n = (...h) => i(new a(...fr(c(h)))) : t !== null ? (t = U(t), n = (...h) => i(new a(e, ...fr(c(h)), t))) : n = (...h) => i(new a(e, ...fr(c(h)))), n.setParameterLength = (...h) => (h.length === 1 ? o = l = h[0] : h.length === 2 && ([o, l] = h), n), n.setName = (h) => (r = h, n), n;
13053
13053
  }, XT = function(a, ...e) {
13054
- return U(new a(...pr(e)));
13054
+ return U(new a(...fr(e)));
13055
13055
  };
13056
13056
  class ZT extends ae {
13057
13057
  constructor(e, t) {
@@ -13143,7 +13143,7 @@ function pa(a, e) {
13143
13143
  const U = (a, e = null) => (
13144
13144
  /* new */
13145
13145
  $T(a, e)
13146
- ), Ol = (a, e = null) => new jT(a, e), pr = (a, e = null) => new qT(a, e), L = (...a) => new YT(...a), G = (...a) => new XT(...a);
13146
+ ), Ol = (a, e = null) => new jT(a, e), fr = (a, e = null) => new qT(a, e), L = (...a) => new YT(...a), G = (...a) => new XT(...a);
13147
13147
  let iS = 0;
13148
13148
  const B = (a, e = null) => {
13149
13149
  let t = null;
@@ -13178,7 +13178,7 @@ function Yg(a) {
13178
13178
  return wr && wr.add(a), a;
13179
13179
  }
13180
13180
  D("toStack", Yg);
13181
- const nS = new rt("color"), O = new rt("float", Dl.float), ke = new rt("int", Dl.ints), rS = new rt("uint", Dl.uint), zu = new rt("bool", Dl.bool), V = new rt("vec2"), Qs = new rt("ivec2"), aS = new rt("uvec2"), oS = new rt("bvec2"), I = new rt("vec3"), lS = new rt("ivec3"), cS = new rt("uvec3"), hS = new rt("bvec3"), re = new rt("vec4"), uS = new rt("ivec4"), dS = new rt("uvec4"), pS = new rt("bvec4"), Gu = new rt("mat2"), It = new rt("mat3"), fr = new rt("mat4");
13181
+ const nS = new rt("color"), O = new rt("float", Dl.float), ke = new rt("int", Dl.ints), rS = new rt("uint", Dl.uint), zu = new rt("bool", Dl.bool), V = new rt("vec2"), Qs = new rt("ivec2"), aS = new rt("uvec2"), oS = new rt("bvec2"), I = new rt("vec3"), lS = new rt("ivec3"), cS = new rt("uvec3"), hS = new rt("bvec3"), re = new rt("vec4"), uS = new rt("ivec4"), dS = new rt("uvec4"), pS = new rt("bvec4"), Gu = new rt("mat2"), It = new rt("mat3"), mr = new rt("mat4");
13182
13182
  D("toColor", nS);
13183
13183
  D("toFloat", O);
13184
13184
  D("toInt", ke);
@@ -13198,7 +13198,7 @@ D("toUVec4", dS);
13198
13198
  D("toBVec4", pS);
13199
13199
  D("toMat2", Gu);
13200
13200
  D("toMat3", It);
13201
- D("toMat4", fr);
13201
+ D("toMat4", mr);
13202
13202
  const fS = /* @__PURE__ */ L(Ga).setParameterLength(2), mS = (a, e) => U(new Hg(U(a), e));
13203
13203
  D("element", fS);
13204
13204
  D("convert", mS);
@@ -13435,7 +13435,7 @@ class Ae extends ae {
13435
13435
  return this.varying === !0 ? (t = e.getVaryingFromNode(this, this.name), t.needsInterpolation = !0) : t = e.getVarFromNode(this, this.name), e.getPropertyName(t);
13436
13436
  }
13437
13437
  }
13438
- const Kg = (a, e) => U(new Ae(a, e)), Tl = (a, e) => U(new Ae(a, e, !0)), Te = /* @__PURE__ */ G(Ae, "vec4", "DiffuseColor"), Bp = /* @__PURE__ */ G(Ae, "vec3", "EmissiveColor"), ei = /* @__PURE__ */ G(Ae, "float", "Roughness"), Sl = /* @__PURE__ */ G(Ae, "float", "Metalness"), su = /* @__PURE__ */ G(Ae, "float", "Clearcoat"), vl = /* @__PURE__ */ G(Ae, "float", "ClearcoatRoughness"), rr = /* @__PURE__ */ G(Ae, "vec3", "Sheen"), Hu = /* @__PURE__ */ G(Ae, "float", "SheenRoughness"), Wu = /* @__PURE__ */ G(Ae, "float", "Iridescence"), Qg = /* @__PURE__ */ G(Ae, "float", "IridescenceIOR"), Jg = /* @__PURE__ */ G(Ae, "float", "IridescenceThickness"), iu = /* @__PURE__ */ G(Ae, "float", "AlphaT"), ln = /* @__PURE__ */ G(Ae, "float", "Anisotropy"), Ko = /* @__PURE__ */ G(Ae, "vec3", "AnisotropyT"), mr = /* @__PURE__ */ G(Ae, "vec3", "AnisotropyB"), Qt = /* @__PURE__ */ G(Ae, "color", "SpecularColor"), wl = /* @__PURE__ */ G(Ae, "float", "SpecularF90"), nu = /* @__PURE__ */ G(Ae, "float", "Shininess"), Ea = /* @__PURE__ */ G(Ae, "vec4", "Output"), gc = /* @__PURE__ */ G(Ae, "float", "dashSize"), Lp = /* @__PURE__ */ G(Ae, "float", "gapSize"), Qo = /* @__PURE__ */ G(Ae, "float", "IOR"), ru = /* @__PURE__ */ G(Ae, "float", "Transmission"), ey = /* @__PURE__ */ G(Ae, "float", "Thickness"), ty = /* @__PURE__ */ G(Ae, "float", "AttenuationDistance"), sy = /* @__PURE__ */ G(Ae, "color", "AttenuationColor"), iy = /* @__PURE__ */ G(Ae, "float", "Dispersion");
13438
+ const Kg = (a, e) => U(new Ae(a, e)), Tl = (a, e) => U(new Ae(a, e, !0)), Te = /* @__PURE__ */ G(Ae, "vec4", "DiffuseColor"), Bp = /* @__PURE__ */ G(Ae, "vec3", "EmissiveColor"), ei = /* @__PURE__ */ G(Ae, "float", "Roughness"), Sl = /* @__PURE__ */ G(Ae, "float", "Metalness"), su = /* @__PURE__ */ G(Ae, "float", "Clearcoat"), vl = /* @__PURE__ */ G(Ae, "float", "ClearcoatRoughness"), ar = /* @__PURE__ */ G(Ae, "vec3", "Sheen"), Hu = /* @__PURE__ */ G(Ae, "float", "SheenRoughness"), Wu = /* @__PURE__ */ G(Ae, "float", "Iridescence"), Qg = /* @__PURE__ */ G(Ae, "float", "IridescenceIOR"), Jg = /* @__PURE__ */ G(Ae, "float", "IridescenceThickness"), iu = /* @__PURE__ */ G(Ae, "float", "AlphaT"), ln = /* @__PURE__ */ G(Ae, "float", "Anisotropy"), Ko = /* @__PURE__ */ G(Ae, "vec3", "AnisotropyT"), gr = /* @__PURE__ */ G(Ae, "vec3", "AnisotropyB"), Qt = /* @__PURE__ */ G(Ae, "color", "SpecularColor"), wl = /* @__PURE__ */ G(Ae, "float", "SpecularF90"), nu = /* @__PURE__ */ G(Ae, "float", "Shininess"), Ea = /* @__PURE__ */ G(Ae, "vec4", "Output"), gc = /* @__PURE__ */ G(Ae, "float", "dashSize"), Lp = /* @__PURE__ */ G(Ae, "float", "gapSize"), Qo = /* @__PURE__ */ G(Ae, "float", "IOR"), ru = /* @__PURE__ */ G(Ae, "float", "Transmission"), ey = /* @__PURE__ */ G(Ae, "float", "Thickness"), ty = /* @__PURE__ */ G(Ae, "float", "AttenuationDistance"), sy = /* @__PURE__ */ G(Ae, "color", "AttenuationColor"), iy = /* @__PURE__ */ G(Ae, "float", "Dispersion");
13439
13439
  class TS extends nt {
13440
13440
  static get type() {
13441
13441
  return "FunctionCallNode";
@@ -13491,7 +13491,7 @@ class TS extends nt {
13491
13491
  return `${s.build(e, "property")}( ${t.join(", ")} )`;
13492
13492
  }
13493
13493
  }
13494
- const SS = (a, ...e) => (e = e.length > 1 || e[0] && e[0].isNode === !0 ? pr(e) : Ol(e[0]), U(new TS(U(a), e)));
13494
+ const SS = (a, ...e) => (e = e.length > 1 || e[0] && e[0].isNode === !0 ? fr(e) : Ol(e[0]), U(new TS(U(a), e)));
13495
13495
  D("call", SS);
13496
13496
  const vS = {
13497
13497
  "==": "equal",
@@ -14311,7 +14311,7 @@ class Bv extends nt {
14311
14311
  }
14312
14312
  setup(e) {
14313
14313
  const t = this.colorNode || e.context.color, s = this.toneMapping;
14314
- if (s === hr) return t;
14314
+ if (s === ur) return t;
14315
14315
  let i = null;
14316
14316
  const n = e.renderer.library.getToneMappingFunction(s);
14317
14317
  return n !== null ? i = re(n(t.rgb, this.exposureNode), t.a) : (console.error("ToneMappingNode: Unsupported Tone Mapping configuration.", s), i = t), i;
@@ -14803,7 +14803,7 @@ class kv extends Bu {
14803
14803
  return this.instanced = e, this;
14804
14804
  }
14805
14805
  }
14806
- const Ju = (a, e = null, t = 0, s = 0) => U(new kv(a, e, t, s)), zv = (a, e = null, t = 0, s = 0) => Ju(a, e, t, s).setUsage(ir), Up = (a, e = null, t = 0, s = 0) => Ju(a, e, t, s).setInstanced(!0), kp = (a, e = null, t = 0, s = 0) => zv(a, e, t, s).setInstanced(!0);
14806
+ const Ju = (a, e = null, t = 0, s = 0) => U(new kv(a, e, t, s)), zv = (a, e = null, t = 0, s = 0) => Ju(a, e, t, s).setUsage(nr), Up = (a, e = null, t = 0, s = 0) => Ju(a, e, t, s).setInstanced(!0), kp = (a, e = null, t = 0, s = 0) => zv(a, e, t, s).setInstanced(!0);
14807
14807
  D("toAttribute", (a) => Ju(a.value));
14808
14808
  class Gv extends ae {
14809
14809
  static get type() {
@@ -14998,8 +14998,8 @@ class Zv extends nt {
14998
14998
  }
14999
14999
  setup({ context: e }) {
15000
15000
  let t = this.colorNode || e.color;
15001
- const s = (this.toneMapping !== null ? this.toneMapping : e.toneMapping) || hr, i = (this.outputColorSpace !== null ? this.outputColorSpace : e.outputColorSpace) || ui;
15002
- return s !== hr && (t = t.toneMapping(s)), i !== ui && i !== Ue.workingColorSpace && (t = t.workingToColorSpace(i)), t;
15001
+ const s = (this.toneMapping !== null ? this.toneMapping : e.toneMapping) || ur, i = (this.outputColorSpace !== null ? this.outputColorSpace : e.outputColorSpace) || ui;
15002
+ return s !== ur && (t = t.toneMapping(s)), i !== ui && i !== Ue.workingColorSpace && (t = t.workingToColorSpace(i)), t;
15003
15003
  }
15004
15004
  }
15005
15005
  const Kv = (a, e = null, t = null) => U(new Zv(U(a), e, t));
@@ -15400,7 +15400,7 @@ class nw extends ae {
15400
15400
  return e.addFlowTab(), r;
15401
15401
  }
15402
15402
  }
15403
- const Cs = (...a) => U(new nw(pr(a, "int"))).toStack(), rw = () => Cr("break").toStack();
15403
+ const Cs = (...a) => U(new nw(fr(a, "int"))).toStack(), rw = () => Cr("break").toStack();
15404
15404
  class Ha {
15405
15405
  /**
15406
15406
  * Constructs a new bounding box.
@@ -15668,7 +15668,7 @@ class Ha {
15668
15668
  intersectsTriangle(e) {
15669
15669
  if (this.isEmpty())
15670
15670
  return !1;
15671
- this.getCenter(Vr), ro.subVectors(this.max, Vr), Bn.subVectors(e.a, Vr), Ln.subVectors(e.b, Vr), Un.subVectors(e.c, Vr), bi.subVectors(Ln, Bn), Ti.subVectors(Un, Ln), qi.subVectors(Bn, Un);
15671
+ this.getCenter(Vr), ro.subVectors(this.max, Vr), Ln.subVectors(e.a, Vr), Un.subVectors(e.b, Vr), kn.subVectors(e.c, Vr), bi.subVectors(Un, Ln), Ti.subVectors(kn, Un), qi.subVectors(Ln, kn);
15672
15672
  let t = [
15673
15673
  0,
15674
15674
  -bi.z,
@@ -15698,7 +15698,7 @@ class Ha {
15698
15698
  qi.x,
15699
15699
  0
15700
15700
  ];
15701
- return !xc(t, Bn, Ln, Un, ro) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !xc(t, Bn, Ln, Un, ro)) ? !1 : (ao.crossVectors(bi, Ti), t = [ao.x, ao.y, ao.z], xc(t, Bn, Ln, Un, ro));
15701
+ return !xc(t, Ln, Un, kn, ro) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !xc(t, Ln, Un, kn, ro)) ? !1 : (ao.crossVectors(bi, Ti), t = [ao.x, ao.y, ao.z], xc(t, Ln, Un, kn, ro));
15702
15702
  }
15703
15703
  /**
15704
15704
  * Clamps the given point within the bounds of this box.
@@ -15810,7 +15810,7 @@ const Ys = [
15810
15810
  /* @__PURE__ */ new R(),
15811
15811
  /* @__PURE__ */ new R(),
15812
15812
  /* @__PURE__ */ new R()
15813
- ], xs = /* @__PURE__ */ new R(), no = /* @__PURE__ */ new Ha(), Bn = /* @__PURE__ */ new R(), Ln = /* @__PURE__ */ new R(), Un = /* @__PURE__ */ new R(), bi = /* @__PURE__ */ new R(), Ti = /* @__PURE__ */ new R(), qi = /* @__PURE__ */ new R(), Vr = /* @__PURE__ */ new R(), ro = /* @__PURE__ */ new R(), ao = /* @__PURE__ */ new R(), Yi = /* @__PURE__ */ new R();
15813
+ ], xs = /* @__PURE__ */ new R(), no = /* @__PURE__ */ new Ha(), Ln = /* @__PURE__ */ new R(), Un = /* @__PURE__ */ new R(), kn = /* @__PURE__ */ new R(), bi = /* @__PURE__ */ new R(), Ti = /* @__PURE__ */ new R(), qi = /* @__PURE__ */ new R(), Vr = /* @__PURE__ */ new R(), ro = /* @__PURE__ */ new R(), ao = /* @__PURE__ */ new R(), Yi = /* @__PURE__ */ new R();
15814
15814
  function xc(a, e, t, s, i) {
15815
15815
  for (let n = 0, r = a.length - 3; n <= r; n += 3) {
15816
15816
  Yi.fromArray(a, n);
@@ -16337,15 +16337,15 @@ class gs extends Pe {
16337
16337
  }
16338
16338
  }
16339
16339
  gs.DIRECTION;
16340
- const bn = /* @__PURE__ */ G(gs, gs.WORLD_MATRIX);
16340
+ const Tn = /* @__PURE__ */ G(gs, gs.WORLD_MATRIX);
16341
16341
  gs.POSITION;
16342
16342
  gs.SCALE;
16343
16343
  gs.VIEW_POSITION;
16344
16344
  gs.RADIUS;
16345
- const dw = /* @__PURE__ */ J(new qt()).onObjectUpdate(({ object: a }, e) => e.value.getNormalMatrix(a.matrixWorld)), kl = /* @__PURE__ */ B((a) => a.renderer.overrideNodes.modelViewMatrix || pw).once()().toVar("modelViewMatrix"), pw = /* @__PURE__ */ gi.mul(bn), Gp = /* @__PURE__ */ B((a) => (a.context.isHighPrecisionModelViewMatrix = !0, J("mat4").onObjectUpdate(({ object: e, camera: t }) => e.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse, e.matrixWorld)))).once()().toVar("highpModelViewMatrix"), Vp = /* @__PURE__ */ B((a) => {
16345
+ const dw = /* @__PURE__ */ J(new qt()).onObjectUpdate(({ object: a }, e) => e.value.getNormalMatrix(a.matrixWorld)), kl = /* @__PURE__ */ B((a) => a.renderer.overrideNodes.modelViewMatrix || pw).once()().toVar("modelViewMatrix"), pw = /* @__PURE__ */ gi.mul(Tn), Gp = /* @__PURE__ */ B((a) => (a.context.isHighPrecisionModelViewMatrix = !0, J("mat4").onObjectUpdate(({ object: e, camera: t }) => e.modelViewMatrix.multiplyMatrices(t.matrixWorldInverse, e.matrixWorld)))).once()().toVar("highpModelViewMatrix"), Vp = /* @__PURE__ */ B((a) => {
16346
16346
  const e = a.context.isHighPrecisionModelViewMatrix;
16347
16347
  return J("mat3").onObjectUpdate(({ object: t, camera: s }) => (e !== !0 && t.modelViewMatrix.multiplyMatrices(s.matrixWorldInverse, t.matrixWorld), t.normalMatrix.getNormalMatrix(t.modelViewMatrix)));
16348
- }).once()().toVar("highpModelNormalViewMatrix"), zl = /* @__PURE__ */ Gi("position", "vec3"), St = /* @__PURE__ */ zl.toVarying("positionLocal"), Hp = /* @__PURE__ */ zl.toVarying("positionPrevious"), La = /* @__PURE__ */ B((a) => bn.mul(St).xyz.toVarying(a.getNamespace("v_positionWorld")), "vec3").once("POSITION")(), Cy = /* @__PURE__ */ B((a) => St.transformDirection(bn).toVarying(a.getNamespace("v_positionWorldDirection")).normalize().toVar("positionWorldDirection"), "vec3").once("POSITION")(), st = /* @__PURE__ */ B((a) => a.context.setupPositionView().toVarying(a.getNamespace("v_positionView")), "vec3").once("POSITION")(), qe = /* @__PURE__ */ st.negate().toVarying("v_positionViewDirection").normalize().toVar("positionViewDirection");
16348
+ }).once()().toVar("highpModelNormalViewMatrix"), zl = /* @__PURE__ */ Gi("position", "vec3"), St = /* @__PURE__ */ zl.toVarying("positionLocal"), Hp = /* @__PURE__ */ zl.toVarying("positionPrevious"), La = /* @__PURE__ */ B((a) => Tn.mul(St).xyz.toVarying(a.getNamespace("v_positionWorld")), "vec3").once("POSITION")(), Cy = /* @__PURE__ */ B((a) => St.transformDirection(Tn).toVarying(a.getNamespace("v_positionWorldDirection")).normalize().toVar("positionWorldDirection"), "vec3").once("POSITION")(), st = /* @__PURE__ */ B((a) => a.context.setupPositionView().toVarying(a.getNamespace("v_positionView")), "vec3").once("POSITION")(), qe = /* @__PURE__ */ st.negate().toVarying("v_positionViewDirection").normalize().toVar("positionViewDirection");
16349
16349
  class fw extends nt {
16350
16350
  static get type() {
16351
16351
  return "EquirectUVNode";
@@ -16391,7 +16391,7 @@ const gw = /* @__PURE__ */ G(mw), Gl = /* @__PURE__ */ O(gw).mul(2).sub(1), Ay =
16391
16391
  }, "vec3").once()().toVar("transformedNormalView"), id = /* @__PURE__ */ tt.transformDirection(gi).toVar("transformedNormalWorld"), fa = /* @__PURE__ */ B((a) => {
16392
16392
  let e = a.context.setupClearcoatNormal().context({ getUV: null });
16393
16393
  return a.material.flatShading !== !0 && (e = e.mul(Gl)), e;
16394
- }, "vec3").once()().toVar("transformedClearcoatNormalView"), xw = /* @__PURE__ */ B(([a, e = bn]) => {
16394
+ }, "vec3").once()().toVar("transformedClearcoatNormalView"), xw = /* @__PURE__ */ B(([a, e = Tn]) => {
16395
16395
  const t = It(e), s = a.div(I(t[0].dot(t[0]), t[1].dot(t[1]), t[2].dot(t[2])));
16396
16396
  return t.mul(s).xyz;
16397
16397
  }), Ry = /* @__PURE__ */ B(([a], e) => {
@@ -16490,7 +16490,7 @@ class ww extends nt {
16490
16490
  n
16491
16491
  ).mul(s);
16492
16492
  } else {
16493
- const n = t, r = fr(re(1, 0, 0, 0), re(0, Ni(n.x), ws(n.x).negate(), 0), re(0, ws(n.x), Ni(n.x), 0), re(0, 0, 0, 1)), o = fr(re(Ni(n.y), 0, ws(n.y), 0), re(0, 1, 0, 0), re(ws(n.y).negate(), 0, Ni(n.y), 0), re(0, 0, 0, 1)), l = fr(re(Ni(n.z), ws(n.z).negate(), 0, 0), re(ws(n.z), Ni(n.z), 0, 0), re(0, 0, 1, 0), re(0, 0, 0, 1));
16493
+ const n = t, r = mr(re(1, 0, 0, 0), re(0, Ni(n.x), ws(n.x).negate(), 0), re(0, ws(n.x), Ni(n.x), 0), re(0, 0, 0, 1)), o = mr(re(Ni(n.y), 0, ws(n.y), 0), re(0, 1, 0, 0), re(ws(n.y).negate(), 0, Ni(n.y), 0), re(0, 0, 0, 1)), l = mr(re(Ni(n.z), ws(n.z).negate(), 0, 0), re(ws(n.z), Ni(n.z), 0, 0), re(0, 0, 1, 0), re(0, 0, 0, 1));
16494
16494
  return r.mul(o).mul(l).mul(re(s, 1)).xyz;
16495
16495
  }
16496
16496
  }
@@ -16557,7 +16557,7 @@ et.COORDINATE = "coordinate";
16557
16557
  et.VIEWPORT = "viewport";
16558
16558
  et.SIZE = "size";
16559
16559
  et.UV = "uv";
16560
- const gr = /* @__PURE__ */ G(et, et.UV), au = /* @__PURE__ */ G(et, et.SIZE), Vl = /* @__PURE__ */ G(et, et.COORDINATE), Ca = /* @__PURE__ */ G(et, et.VIEWPORT);
16560
+ const yr = /* @__PURE__ */ G(et, et.UV), au = /* @__PURE__ */ G(et, et.SIZE), Vl = /* @__PURE__ */ G(et, et.COORDINATE), Ca = /* @__PURE__ */ G(et, et.VIEWPORT);
16561
16561
  Ca.zw;
16562
16562
  Ca.xy;
16563
16563
  const Wa = (a = 0) => Gi("uv" + (a > 0 ? a : ""), "vec2");
@@ -16579,7 +16579,7 @@ class Ew extends ae {
16579
16579
  return e.format(`${e.getMethod("textureDimensions")}( ${s}, ${i} )`, this.getNodeType(e), t);
16580
16580
  }
16581
16581
  }
16582
- const yr = /* @__PURE__ */ L(Ew).setParameterLength(1, 2), Py = /* @__PURE__ */ new wt();
16582
+ const xr = /* @__PURE__ */ L(Ew).setParameterLength(1, 2), Py = /* @__PURE__ */ new wt();
16583
16583
  class Pr extends Va {
16584
16584
  static get type() {
16585
16585
  return "TextureNode";
@@ -16678,7 +16678,7 @@ class Pr extends Va {
16678
16678
  */
16679
16679
  setupUV(e, t) {
16680
16680
  const s = this.value;
16681
- return e.isFlipY() && (s.image instanceof ImageBitmap && s.flipY === !0 || s.isRenderTargetTexture === !0 || s.isFramebufferTexture === !0 || s.isDepthTexture === !0) && (this.sampler ? t = t.flipY() : t = t.setY(ke(yr(this, this.levelNode).y).sub(t.y).sub(1))), t;
16681
+ return e.isFlipY() && (s.image instanceof ImageBitmap && s.flipY === !0 || s.isRenderTargetTexture === !0 || s.isFramebufferTexture === !0 || s.isDepthTexture === !0) && (this.sampler ? t = t.flipY() : t = t.setY(ke(xr(this, this.levelNode).y).sub(t.y).sub(1))), t;
16682
16682
  }
16683
16683
  /**
16684
16684
  * Setups texture node by preparing the internal nodes for code generation.
@@ -16818,7 +16818,7 @@ class Pr extends Va {
16818
16818
  * @return {TextureSizeNode} The texture size.
16819
16819
  */
16820
16820
  size(e) {
16821
- return yr(this, e);
16821
+ return xr(this, e);
16822
16822
  }
16823
16823
  /**
16824
16824
  * Samples the texture with the given bias.
@@ -16912,7 +16912,7 @@ class Fy extends Pr {
16912
16912
  * @param {?Node} [levelNode=null] - The level node.
16913
16913
  * @param {?Texture} [framebufferTexture=null] - A framebuffer texture holding the viewport data. If not provided, a framebuffer texture is created automatically.
16914
16914
  */
16915
- constructor(e = gr, t = null, s = null) {
16915
+ constructor(e = yr, t = null, s = null) {
16916
16916
  s === null && (s = new Mw(), s.minFilter = ri), super(s, e, t), this.generateMipmaps = !1, this.isOutputTextureNode = !0, this.updateBeforeType = he.FRAME;
16917
16917
  }
16918
16918
  updateBefore(e) {
@@ -16940,7 +16940,7 @@ class Aw extends Fy {
16940
16940
  * @param {Node} [uvNode=screenUV] - The uv node.
16941
16941
  * @param {?Node} [levelNode=null] - The level node.
16942
16942
  */
16943
- constructor(e = gr, t = null) {
16943
+ constructor(e = yr, t = null) {
16944
16944
  bc === null && (bc = new Vs()), super(e, t, bc);
16945
16945
  }
16946
16946
  }
@@ -17202,7 +17202,7 @@ class Pi {
17202
17202
  return new this.constructor().copy(this);
17203
17203
  }
17204
17204
  }
17205
- class wn extends vn {
17205
+ class En extends wn {
17206
17206
  /**
17207
17207
  * Render target options.
17208
17208
  *
@@ -17354,11 +17354,11 @@ new R();
17354
17354
  new R();
17355
17355
  new me();
17356
17356
  new ce();
17357
- const Ow = new wn();
17358
- gr.flipX();
17357
+ const Ow = new En();
17358
+ yr.flipX();
17359
17359
  Ow.depthTexture = new Vs(1, 1);
17360
17360
  let Iw = 0;
17361
- class jt extends vn {
17361
+ class jt extends wn {
17362
17362
  /**
17363
17363
  * Constructs a new material.
17364
17364
  */
@@ -17803,8 +17803,8 @@ const Di = (a, e, t = null) => U(new $w(a, e, t)), ky = /* @__PURE__ */ B((a) =>
17803
17803
  let s = a.mul(ky.w).xyz;
17804
17804
  return t.material.flatShading !== !0 && (s = Rs(s, e)), s;
17805
17805
  }).once(), qw = jw($s.cross(zy), "v_bitangentView").normalize().toVar("bitangentView"), ma = /* @__PURE__ */ It(zy, qw, $s), Yw = /* @__PURE__ */ (() => {
17806
- let a = mr.cross(qe);
17807
- return a = a.cross(mr).normalize(), a = Ge(a, tt, ln.mul(ei.oneMinus()).oneMinus().pow2().pow2()).normalize(), a;
17806
+ let a = gr.cross(qe);
17807
+ return a = a.cross(gr).normalize(), a = Ge(a, tt, ln.mul(ei.oneMinus()).oneMinus().pow2().pow2()).normalize(), a;
17808
17808
  })(), Xw = /* @__PURE__ */ B((a) => {
17809
17809
  const { eye_pos: e, surf_norm: t, mapN: s, uv: i } = a, n = e.dFdx(), r = e.dFdy(), o = i.dFdx(), l = i.dFdy(), c = t, h = r.cross(c), u = c.cross(n), d = h.mul(o.x).add(u.mul(l.x)), p = h.mul(o.y).add(u.mul(l.y)), f = d.dot(d).max(p.dot(p)), m = Gl.mul(f.inverseSqrt());
17810
17810
  return Bt(d.mul(s.x, m), p.mul(s.y, m), c.mul(s.z)).normalize();
@@ -18118,19 +18118,19 @@ class OE extends ae {
18118
18118
  else {
18119
18119
  const l = new FE(s.array, 16, 1);
18120
18120
  this.buffer = l;
18121
- const c = s.usage === ir ? kp : Up, h = [
18121
+ const c = s.usage === nr ? kp : Up, h = [
18122
18122
  // F.Signature -> bufferAttribute( array, type, stride, offset )
18123
18123
  c(l, "vec4", 16, 0),
18124
18124
  c(l, "vec4", 16, 4),
18125
18125
  c(l, "vec4", 16, 8),
18126
18126
  c(l, "vec4", 16, 12)
18127
18127
  ];
18128
- n = fr(...h);
18128
+ n = mr(...h);
18129
18129
  }
18130
18130
  this.instanceMatrixNode = n;
18131
18131
  }
18132
18132
  if (i && r === null) {
18133
- const l = new DE(i.array, 3), c = i.usage === ir ? kp : Up;
18133
+ const l = new DE(i.array, 3), c = i.usage === nr ? kp : Up;
18134
18134
  this.bufferColor = l, r = I(c(l, "vec3", 3, 0)), this.instanceColorNode = r;
18135
18135
  }
18136
18136
  const o = n.mul(St).xyz;
@@ -18146,7 +18146,7 @@ class OE extends ae {
18146
18146
  * @param {NodeFrame} frame - The current node frame.
18147
18147
  */
18148
18148
  update() {
18149
- this.instanceMatrix.usage !== ir && this.buffer !== null && this.instanceMatrix.version !== this.buffer.version && (this.buffer.version = this.instanceMatrix.version), this.instanceColor && this.instanceColor.usage !== ir && this.bufferColor !== null && this.instanceColor.version !== this.bufferColor.version && (this.bufferColor.version = this.instanceColor.version);
18149
+ this.instanceMatrix.usage !== nr && this.buffer !== null && this.instanceMatrix.version !== this.buffer.version && (this.buffer.version = this.instanceMatrix.version), this.instanceColor && this.instanceColor.usage !== nr && this.bufferColor !== null && this.instanceColor.version !== this.bufferColor.version && (this.bufferColor.version = this.instanceColor.version);
18150
18150
  }
18151
18151
  }
18152
18152
  class IE extends OE {
@@ -18186,7 +18186,7 @@ class LE extends ae {
18186
18186
  setup(e) {
18187
18187
  this.batchingIdNode === null && (e.getDrawIndex() === null ? this.batchingIdNode = ed : this.batchingIdNode = tw);
18188
18188
  const s = B(([f]) => {
18189
- const m = ke(yr(Ss(this.batchMesh._indirectTexture), 0).x), y = ke(f).mod(m), g = ke(f).div(m);
18189
+ const m = ke(xr(Ss(this.batchMesh._indirectTexture), 0).x), y = ke(f).mod(m), g = ke(f).div(m);
18190
18190
  return Ss(this.batchMesh._indirectTexture, Qs(y, g)).x;
18191
18191
  }).setLayout({
18192
18192
  name: "getIndirectIndex",
@@ -18194,7 +18194,7 @@ class LE extends ae {
18194
18194
  inputs: [
18195
18195
  { name: "id", type: "int" }
18196
18196
  ]
18197
- })(ke(this.batchingIdNode)), i = this.batchMesh._matricesTexture, n = ke(yr(Ss(i), 0).x), r = O(s).mul(4).toInt().toVar(), o = r.mod(n), l = r.div(n), c = fr(
18197
+ })(ke(this.batchingIdNode)), i = this.batchMesh._matricesTexture, n = ke(xr(Ss(i), 0).x), r = O(s).mul(4).toInt().toVar(), o = r.mod(n), l = r.div(n), c = mr(
18198
18198
  Ss(i, Qs(o, l)),
18199
18199
  Ss(i, Qs(o.add(1), l)),
18200
18200
  Ss(i, Qs(o.add(2), l)),
@@ -18202,7 +18202,7 @@ class LE extends ae {
18202
18202
  ), h = this.batchMesh._colorsTexture;
18203
18203
  if (h !== null) {
18204
18204
  const m = B(([y]) => {
18205
- const g = ke(yr(Ss(h), 0).x), x = y, _ = x.mod(g), b = x.div(g);
18205
+ const g = ke(xr(Ss(h), 0).x), x = y, _ = x.mod(g), b = x.div(g);
18206
18206
  return Ss(h, Qs(_, b)).rgb;
18207
18207
  }).setLayout({
18208
18208
  name: "getBatchingColor",
@@ -19266,8 +19266,8 @@ class it extends jt {
19266
19266
  }
19267
19267
  }
19268
19268
  let nC = 0;
19269
- const rs = /* @__PURE__ */ new Be(), Cc = /* @__PURE__ */ new dt(), kn = /* @__PURE__ */ new R(), Kt = /* @__PURE__ */ new Ha(), Yr = /* @__PURE__ */ new Ha(), pt = /* @__PURE__ */ new R();
19270
- class yi extends vn {
19269
+ const rs = /* @__PURE__ */ new Be(), Cc = /* @__PURE__ */ new dt(), zn = /* @__PURE__ */ new R(), Kt = /* @__PURE__ */ new Ha(), Yr = /* @__PURE__ */ new Ha(), pt = /* @__PURE__ */ new R();
19270
+ class yi extends wn {
19271
19271
  /**
19272
19272
  * Constructs a new geometry.
19273
19273
  */
@@ -19479,7 +19479,7 @@ class yi extends vn {
19479
19479
  * @return {BufferGeometry} A reference to this instance.
19480
19480
  */
19481
19481
  center() {
19482
- return this.computeBoundingBox(), this.boundingBox.getCenter(kn).negate(), this.translate(kn.x, kn.y, kn.z), this;
19482
+ return this.computeBoundingBox(), this.boundingBox.getCenter(zn).negate(), this.translate(zn.x, zn.y, zn.z), this;
19483
19483
  }
19484
19484
  /**
19485
19485
  * Defines a geometry by creating a `position` attribute based on the given array of points. The array
@@ -19563,7 +19563,7 @@ class yi extends vn {
19563
19563
  for (let n = 0, r = t.length; n < r; n++) {
19564
19564
  const o = t[n], l = this.morphTargetsRelative;
19565
19565
  for (let c = 0, h = o.count; c < h; c++)
19566
- pt.fromBufferAttribute(o, c), l && (kn.fromBufferAttribute(e, c), pt.add(kn)), i = Math.max(i, s.distanceToSquared(pt));
19566
+ pt.fromBufferAttribute(o, c), l && (zn.fromBufferAttribute(e, c), pt.add(zn)), i = Math.max(i, s.distanceToSquared(pt));
19567
19567
  }
19568
19568
  this.boundingSphere.radius = Math.sqrt(i), isNaN(this.boundingSphere.radius) && console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this);
19569
19569
  }
@@ -20054,7 +20054,7 @@ class rC {
20054
20054
  return new this.constructor().copy(this);
20055
20055
  }
20056
20056
  }
20057
- const _s = /* @__PURE__ */ new R(), Zs = /* @__PURE__ */ new R(), Nc = /* @__PURE__ */ new R(), Ks = /* @__PURE__ */ new R(), zn = /* @__PURE__ */ new R(), Gn = /* @__PURE__ */ new R(), Jp = /* @__PURE__ */ new R(), Pc = /* @__PURE__ */ new R(), Fc = /* @__PURE__ */ new R(), Dc = /* @__PURE__ */ new R(), Oc = /* @__PURE__ */ new me(), Ic = /* @__PURE__ */ new me(), Bc = /* @__PURE__ */ new me();
20057
+ const _s = /* @__PURE__ */ new R(), Zs = /* @__PURE__ */ new R(), Nc = /* @__PURE__ */ new R(), Ks = /* @__PURE__ */ new R(), Gn = /* @__PURE__ */ new R(), Vn = /* @__PURE__ */ new R(), Jp = /* @__PURE__ */ new R(), Pc = /* @__PURE__ */ new R(), Fc = /* @__PURE__ */ new R(), Dc = /* @__PURE__ */ new R(), Oc = /* @__PURE__ */ new me(), Ic = /* @__PURE__ */ new me(), Bc = /* @__PURE__ */ new me();
20058
20058
  class Ms {
20059
20059
  /**
20060
20060
  * Constructs a new triangle.
@@ -20307,29 +20307,29 @@ class Ms {
20307
20307
  closestPointToPoint(e, t) {
20308
20308
  const s = this.a, i = this.b, n = this.c;
20309
20309
  let r, o;
20310
- zn.subVectors(i, s), Gn.subVectors(n, s), Pc.subVectors(e, s);
20311
- const l = zn.dot(Pc), c = Gn.dot(Pc);
20310
+ Gn.subVectors(i, s), Vn.subVectors(n, s), Pc.subVectors(e, s);
20311
+ const l = Gn.dot(Pc), c = Vn.dot(Pc);
20312
20312
  if (l <= 0 && c <= 0)
20313
20313
  return t.copy(s);
20314
20314
  Fc.subVectors(e, i);
20315
- const h = zn.dot(Fc), u = Gn.dot(Fc);
20315
+ const h = Gn.dot(Fc), u = Vn.dot(Fc);
20316
20316
  if (h >= 0 && u <= h)
20317
20317
  return t.copy(i);
20318
20318
  const d = l * u - h * c;
20319
20319
  if (d <= 0 && l >= 0 && h <= 0)
20320
- return r = l / (l - h), t.copy(s).addScaledVector(zn, r);
20320
+ return r = l / (l - h), t.copy(s).addScaledVector(Gn, r);
20321
20321
  Dc.subVectors(e, n);
20322
- const p = zn.dot(Dc), f = Gn.dot(Dc);
20322
+ const p = Gn.dot(Dc), f = Vn.dot(Dc);
20323
20323
  if (f >= 0 && p <= f)
20324
20324
  return t.copy(n);
20325
20325
  const m = p * c - l * f;
20326
20326
  if (m <= 0 && c >= 0 && f <= 0)
20327
- return o = c / (c - f), t.copy(s).addScaledVector(Gn, o);
20327
+ return o = c / (c - f), t.copy(s).addScaledVector(Vn, o);
20328
20328
  const y = h * f - p * u;
20329
20329
  if (y <= 0 && u - h >= 0 && p - f >= 0)
20330
20330
  return Jp.subVectors(n, i), o = (u - h) / (u - h + (p - f)), t.copy(i).addScaledVector(Jp, o);
20331
20331
  const g = 1 / (y + m + d);
20332
- return r = m * g, o = d * g, t.copy(s).addScaledVector(zn, r).addScaledVector(Gn, o);
20332
+ return r = m * g, o = d * g, t.copy(s).addScaledVector(Gn, r).addScaledVector(Vn, o);
20333
20333
  }
20334
20334
  /**
20335
20335
  * Returns `true` if this triangle is equal with the given one.
@@ -20700,7 +20700,7 @@ class pC extends Pr {
20700
20700
  */
20701
20701
  setupUV(e, t) {
20702
20702
  const s = this.value;
20703
- return e.isFlipY() && (s.isRenderTargetTexture === !0 || s.isFramebufferTexture === !0) && (this.sampler ? t = t.flipY() : t = t.setY(ke(yr(this, this.levelNode).y).sub(t.y).sub(1))), t;
20703
+ return e.isFlipY() && (s.isRenderTargetTexture === !0 || s.isFramebufferTexture === !0) && (this.sampler ? t = t.flipY() : t = t.setY(ke(xr(this, this.levelNode).y).sub(t.y).sub(1))), t;
20704
20704
  }
20705
20705
  /**
20706
20706
  * Generates the uv code snippet.
@@ -20786,7 +20786,7 @@ class $l extends nt {
20786
20786
  super("vec4"), this.scope = e, this.scene = t, this.camera = s, this.options = i, this._pixelRatio = 1, this._width = 1, this._height = 1;
20787
20787
  const n = new Vs();
20788
20788
  n.isRenderTargetTexture = !0, n.name = "depth";
20789
- const r = new wn(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: cs, ...i });
20789
+ const r = new En(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: cs, ...i });
20790
20790
  r.texture.name = "output", r.depthTexture = n, this.renderTarget = r, this._textures = {
20791
20791
  output: r.texture,
20792
20792
  depth: n
@@ -21556,12 +21556,12 @@ const df = /* @__PURE__ */ new WeakMap(), HC = /* @__PURE__ */ B(({ depthTexture
21556
21556
  e = new it(), e.colorNode = re(0, 0, 0, 1), e.depthNode = t, e.isShadowPassMaterial = !0, e.name = "ShadowMaterial", e.fog = !1, df.set(a, e);
21557
21557
  }
21558
21558
  return e;
21559
- }, pf = /* @__PURE__ */ new As(), Vn = [], ZC = (a, e, t, s) => {
21560
- Vn[0] = a, Vn[1] = e;
21561
- let i = pf.get(Vn);
21559
+ }, pf = /* @__PURE__ */ new As(), Hn = [], ZC = (a, e, t, s) => {
21560
+ Hn[0] = a, Hn[1] = e;
21561
+ let i = pf.get(Hn);
21562
21562
  return (i === void 0 || i.shadowType !== t || i.useVelocity !== s) && (i = (n, r, o, l, c, h, ...u) => {
21563
21563
  (n.castShadow === !0 || n.receiveShadow && t === qo) && (s && (Bg(n).useVelocity = !0), n.onBeforeShadow(a, n, o, e.camera, l, r.overrideMaterial, h), a.renderObject(n, r, o, l, c, h, ...u), n.onAfterShadow(a, n, o, e.camera, l, r.overrideMaterial, h));
21564
- }, i.shadowType = t, i.useVelocity = s, pf.set(Vn, i)), Vn[0] = null, Vn[1] = null, i;
21564
+ }, i.shadowType = t, i.useVelocity = s, pf.set(Hn, i)), Hn[0] = null, Hn[1] = null, i;
21565
21565
  }, KC = /* @__PURE__ */ B(({ samples: a, radius: e, size: t, shadowPass: s, depthLayer: i }) => {
21566
21566
  const n = O(0).toVar("meanVertical"), r = O(0).toVar("squareMeanVertical"), o = a.lessThanEqual(O(1)).select(O(0), O(2).div(a.sub(1))), l = a.lessThanEqual(O(1)).select(O(0), O(-1));
21567
21567
  Cs({ start: ke(0), end: ke(a), type: "int", condition: "<" }, ({ i: h }) => {
@@ -21776,7 +21776,7 @@ const eM = (a, e) => U(new Jy(a, e)), tM = /* @__PURE__ */ new Se(), Bs = /* @__
21776
21776
  const d = i.normalize(), p = V(1).div(c.mul(V(4, 2)));
21777
21777
  h.assign(a({ depthTexture: e, bd3D: d, dp: u, texelSize: p, shadow: s }));
21778
21778
  }), h;
21779
- }), ff = /* @__PURE__ */ new me(), Hn = /* @__PURE__ */ new ce(), Kr = /* @__PURE__ */ new ce();
21779
+ }), ff = /* @__PURE__ */ new me(), Wn = /* @__PURE__ */ new ce(), Kr = /* @__PURE__ */ new ce();
21780
21780
  class rM extends Jy {
21781
21781
  static get type() {
21782
21782
  return "PointShadowNode";
@@ -21834,24 +21834,24 @@ class rM extends Jy {
21834
21834
  */
21835
21835
  renderShadow(e) {
21836
21836
  const { shadow: t, shadowMap: s, light: i } = this, { renderer: n, scene: r } = e, o = t.getFrameExtents();
21837
- Kr.copy(t.mapSize), Kr.multiply(o), s.setSize(Kr.width, Kr.height), Hn.copy(t.mapSize);
21837
+ Kr.copy(t.mapSize), Kr.multiply(o), s.setSize(Kr.width, Kr.height), Wn.copy(t.mapSize);
21838
21838
  const l = n.autoClear, c = n.getClearColor(tM), h = n.getClearAlpha();
21839
21839
  n.autoClear = !1, n.setClearColor(t.clearColor, t.clearAlpha), n.clear();
21840
21840
  const u = t.getViewportCount();
21841
21841
  for (let d = 0; d < u; d++) {
21842
- const p = t.getViewport(d), f = Hn.x * p.x, m = Kr.y - Hn.y - Hn.y * p.y;
21842
+ const p = t.getViewport(d), f = Wn.x * p.x, m = Kr.y - Wn.y - Wn.y * p.y;
21843
21843
  ff.set(
21844
21844
  f,
21845
21845
  m,
21846
- Hn.x * p.z,
21847
- Hn.y * p.w
21846
+ Wn.x * p.z,
21847
+ Wn.y * p.w
21848
21848
  ), s.viewport.copy(ff), t.updateMatrices(i, d), n.render(r, t.camera);
21849
21849
  }
21850
21850
  n.autoClear = l, n.setClearColor(c, h);
21851
21851
  }
21852
21852
  }
21853
21853
  const aM = (a, e) => U(new rM(a, e));
21854
- class En extends Fr {
21854
+ class Cn extends Fr {
21855
21855
  static get type() {
21856
21856
  return "AnalyticLightNode";
21857
21857
  }
@@ -21959,7 +21959,7 @@ const e0 = /* @__PURE__ */ B(({ lightDistance: a, cutoffDistance: e, decayExpone
21959
21959
  }), o = a.mul(r);
21960
21960
  return { lightDirection: i, lightColor: o };
21961
21961
  };
21962
- class lM extends En {
21962
+ class lM extends Cn {
21963
21963
  static get type() {
21964
21964
  return "PointLightNode";
21965
21965
  }
@@ -22337,15 +22337,15 @@ class $a extends yi {
22337
22337
  return new $a(e.width, e.height, e.depth, e.widthSegments, e.heightSegments, e.depthSegments);
22338
22338
  }
22339
22339
  }
22340
- const ar = 4, bf = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], pn = 20, jc = /* @__PURE__ */ new ad(-1, 1, 1, -1, 0, 1), yM = /* @__PURE__ */ new ts(90, 1), Tf = /* @__PURE__ */ new Se();
22340
+ const or = 4, bf = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], pn = 20, jc = /* @__PURE__ */ new ad(-1, 1, 1, -1, 0, 1), yM = /* @__PURE__ */ new ts(90, 1), Tf = /* @__PURE__ */ new Se();
22341
22341
  let qc = null, Yc = 0, Xc = 0;
22342
- const cn = (1 + Math.sqrt(5)) / 2, Wn = 1 / cn, Sf = [
22343
- /* @__PURE__ */ new R(-cn, Wn, 0),
22344
- /* @__PURE__ */ new R(cn, Wn, 0),
22345
- /* @__PURE__ */ new R(-Wn, 0, cn),
22346
- /* @__PURE__ */ new R(Wn, 0, cn),
22347
- /* @__PURE__ */ new R(0, cn, -Wn),
22348
- /* @__PURE__ */ new R(0, cn, Wn),
22342
+ const cn = (1 + Math.sqrt(5)) / 2, $n = 1 / cn, Sf = [
22343
+ /* @__PURE__ */ new R(-cn, $n, 0),
22344
+ /* @__PURE__ */ new R(cn, $n, 0),
22345
+ /* @__PURE__ */ new R(-$n, 0, cn),
22346
+ /* @__PURE__ */ new R($n, 0, cn),
22347
+ /* @__PURE__ */ new R(0, cn, -$n),
22348
+ /* @__PURE__ */ new R(0, cn, $n),
22349
22349
  /* @__PURE__ */ new R(-1, 1, -1),
22350
22350
  /* @__PURE__ */ new R(1, 1, -1),
22351
22351
  /* @__PURE__ */ new R(-1, 1, 1),
@@ -22644,19 +22644,19 @@ class bM {
22644
22644
  e.texture.frame = (e.texture.frame || 0) + 1, d.envMap.value = e.texture, d.samples.value = y, d.weights.array = g, d.latitudinal.value = r === "latitudinal" ? 1 : 0, o && (d.poleAxis.value = o);
22645
22645
  const { _lodMax: _ } = this;
22646
22646
  d.dTheta.value = f, d.mipInt.value = _ - s;
22647
- const b = this._sizeLods[i], T = 3 * b * (i > _ - ar ? i - _ + ar : 0), E = 4 * (this._cubeSize - b);
22647
+ const b = this._sizeLods[i], T = 3 * b * (i > _ - or ? i - _ + or : 0), E = 4 * (this._cubeSize - b);
22648
22648
  vo(t, T, E, 3 * b, 2 * b), l.setRenderTarget(t), l.render(u, jc);
22649
22649
  }
22650
22650
  }
22651
22651
  function TM(a) {
22652
22652
  const e = [], t = [], s = [], i = [];
22653
22653
  let n = a;
22654
- const r = a - ar + 1 + bf.length;
22654
+ const r = a - or + 1 + bf.length;
22655
22655
  for (let o = 0; o < r; o++) {
22656
22656
  const l = Math.pow(2, n);
22657
22657
  t.push(l);
22658
22658
  let c = 1 / l;
22659
- o > a - ar ? c = bf[o - a + ar - 1] : o === 0 && (c = 0), s.push(c);
22659
+ o > a - or ? c = bf[o - a + or - 1] : o === 0 && (c = 0), s.push(c);
22660
22660
  const h = 1 / (l - 2), u = -h, d = 1 + h, p = [u, u, d, u, d, d, u, u, d, d, u, d], f = 6, m = 6, y = 3, g = 2, x = 1, _ = new Float32Array(y * m * f), b = new Float32Array(g * m * f), T = new Float32Array(x * m * f);
22661
22661
  for (let v = 0; v < f; v++) {
22662
22662
  const A = v % 3 * 2 / 3 - 1, N = v > 2 ? 0 : -1, k = [
@@ -22684,7 +22684,7 @@ function TM(a) {
22684
22684
  T.set($, x * m * H);
22685
22685
  }
22686
22686
  const E = new yi();
22687
- E.setAttribute("position", new ds(_, y)), E.setAttribute("uv", new ds(b, g)), E.setAttribute("faceIndex", new ds(T, x)), e.push(E), i.push(new fi(E, null)), n > ar && n--;
22687
+ E.setAttribute("position", new ds(_, y)), E.setAttribute("uv", new ds(b, g)), E.setAttribute("faceIndex", new ds(T, x)), e.push(E), i.push(new fi(E, null)), n > or && n--;
22688
22688
  }
22689
22689
  return { lodPlanes: e, sizeLods: t, sigmas: s, lodMeshes: i };
22690
22690
  }
@@ -22695,9 +22695,9 @@ function vf(a, e) {
22695
22695
  generateMipmaps: !1,
22696
22696
  type: cs,
22697
22697
  format: hs,
22698
- colorSpace: ur
22698
+ colorSpace: dr
22699
22699
  //depthBuffer: false
22700
- }, s = new wn(a, e, t);
22700
+ }, s = new En(a, e, t);
22701
22701
  return s.texture.mapping = Ih, s.texture.name = "PMREM.cubeUv", s.texture.isPMREMTexture = !0, s.scissorTest = !0, s;
22702
22702
  }
22703
22703
  function vo(a, e, t, s, i) {
@@ -22890,7 +22890,7 @@ const ka = /* @__PURE__ */ B(({ f0: a, f90: e, dotVH: t }) => {
22890
22890
  const { lightDirection: e, f0: t, f90: s, roughness: i, f: n, USE_IRIDESCENCE: r, USE_ANISOTROPY: o } = a, l = a.normalView || tt, c = i.pow2(), h = e.add(qe).normalize(), u = l.dot(e).clamp(), d = l.dot(qe).clamp(), p = l.dot(h).clamp(), f = qe.dot(h).clamp();
22891
22891
  let m = ka({ f0: t, f90: s, dotVH: f }), y, g;
22892
22892
  if (Op(r) && (m = Wu.mix(m, n)), Op(o)) {
22893
- const x = Ko.dot(e), _ = Ko.dot(qe), b = Ko.dot(h), T = mr.dot(e), E = mr.dot(qe), v = mr.dot(h);
22893
+ const x = Ko.dot(e), _ = Ko.dot(qe), b = Ko.dot(h), T = gr.dot(e), E = gr.dot(qe), v = gr.dot(h);
22894
22894
  y = NM({ alphaT: iu, alphaB: c, dotTV: _, dotBV: E, dotTL: x, dotBL: T, dotNV: d, dotNL: u }), g = DM({ alphaT: iu, alphaB: c, dotNH: p, dotTH: b, dotBH: v });
22895
22895
  } else
22896
22896
  y = RM({ alpha: c, dotNL: u, dotNV: d }), g = PM({ alpha: c, dotNH: p });
@@ -23192,7 +23192,7 @@ class HM extends jt {
23192
23192
  return Object.keys(s).length > 0 && (t.extensions = s), t;
23193
23193
  }
23194
23194
  }
23195
- class WM extends wn {
23195
+ class WM extends En {
23196
23196
  /**
23197
23197
  * Constructs a new 3D render target.
23198
23198
  *
@@ -23204,7 +23204,7 @@ class WM extends wn {
23204
23204
  super(e, t, s), this.isWebGLRenderTarget = !0;
23205
23205
  }
23206
23206
  }
23207
- const $n = -90, jn = 1;
23207
+ const jn = -90, qn = 1;
23208
23208
  class a0 extends dt {
23209
23209
  /**
23210
23210
  * Constructs a new cube camera.
@@ -23215,17 +23215,17 @@ class a0 extends dt {
23215
23215
  */
23216
23216
  constructor(e, t, s) {
23217
23217
  super(), this.type = "CubeCamera", this.renderTarget = s, this.coordinateSystem = null, this.activeMipmapLevel = 0;
23218
- const i = new ts($n, jn, e, t);
23218
+ const i = new ts(jn, qn, e, t);
23219
23219
  i.layers = this.layers, this.add(i);
23220
- const n = new ts($n, jn, e, t);
23220
+ const n = new ts(jn, qn, e, t);
23221
23221
  n.layers = this.layers, this.add(n);
23222
- const r = new ts($n, jn, e, t);
23222
+ const r = new ts(jn, qn, e, t);
23223
23223
  r.layers = this.layers, this.add(r);
23224
- const o = new ts($n, jn, e, t);
23224
+ const o = new ts(jn, qn, e, t);
23225
23225
  o.layers = this.layers, this.add(o);
23226
- const l = new ts($n, jn, e, t);
23226
+ const l = new ts(jn, qn, e, t);
23227
23227
  l.layers = this.layers, this.add(l);
23228
- const c = new ts($n, jn, e, t);
23228
+ const c = new ts(jn, qn, e, t);
23229
23229
  c.layers = this.layers, this.add(c);
23230
23230
  }
23231
23231
  /**
@@ -23986,7 +23986,7 @@ class u0 {
23986
23986
  * @return {RenderTarget} The render target.
23987
23987
  */
23988
23988
  createRenderTarget(e, t, s) {
23989
- return new wn(e, t, s);
23989
+ return new En(e, t, s);
23990
23990
  }
23991
23991
  /**
23992
23992
  * Factory method for creating an instance of {@link CubeRenderTarget} with the given
@@ -25375,7 +25375,7 @@ class ud {
25375
25375
  }
25376
25376
  }
25377
25377
  ud.isNodeFunctionInput = !0;
25378
- class gA extends En {
25378
+ class gA extends Cn {
25379
25379
  static get type() {
25380
25380
  return "DirectionalLightNode";
25381
25381
  }
@@ -25394,7 +25394,7 @@ class gA extends En {
25394
25394
  }
25395
25395
  const Qc = /* @__PURE__ */ new Be(), Eo = /* @__PURE__ */ new Be();
25396
25396
  let Qr = null;
25397
- class yA extends En {
25397
+ class yA extends Cn {
25398
25398
  static get type() {
25399
25399
  return "RectAreaLightNode";
25400
25400
  }
@@ -25438,7 +25438,7 @@ class yA extends En {
25438
25438
  Qr = e;
25439
25439
  }
25440
25440
  }
25441
- class dd extends En {
25441
+ class dd extends Cn {
25442
25442
  static get type() {
25443
25443
  return "SpotLightNode";
25444
25444
  }
@@ -25536,7 +25536,7 @@ class bA extends dd {
25536
25536
  return my(n.mul(-2).mul(r));
25537
25537
  }
25538
25538
  }
25539
- class TA extends En {
25539
+ class TA extends Cn {
25540
25540
  static get type() {
25541
25541
  return "AmbientLightNode";
25542
25542
  }
@@ -25552,7 +25552,7 @@ class TA extends En {
25552
25552
  e.irradiance.addAssign(this.colorNode);
25553
25553
  }
25554
25554
  }
25555
- class SA extends En {
25555
+ class SA extends Cn {
25556
25556
  static get type() {
25557
25557
  return "HemisphereLightNode";
25558
25558
  }
@@ -25578,7 +25578,7 @@ class SA extends En {
25578
25578
  e.context.irradiance.addAssign(o);
25579
25579
  }
25580
25580
  }
25581
- class vA extends En {
25581
+ class vA extends Cn {
25582
25582
  static get type() {
25583
25583
  return "LightProbeNode";
25584
25584
  }
@@ -25869,7 +25869,7 @@ const m0 = /* @__PURE__ */ B((a) => {
25869
25869
  ]
25870
25870
  }), BA = /* @__PURE__ */ B(({ lightDirection: a }) => {
25871
25871
  const e = a.add(qe).normalize(), t = tt.dot(a).clamp(), s = tt.dot(qe).clamp(), i = tt.dot(e).clamp(), n = OA({ roughness: Hu, dotNH: i }), r = IA({ dotNV: s, dotNL: t });
25872
- return rr.mul(n).mul(r);
25872
+ return ar.mul(n).mul(r);
25873
25873
  }), LA = /* @__PURE__ */ B(({ N: a, V: e, roughness: t }) => {
25874
25874
  const n = 78125e-7, r = a.dot(e).saturate(), o = V(t, r.oneMinus().sqrt());
25875
25875
  return o.assign(o.mul(0.984375).add(n)), o;
@@ -26075,7 +26075,7 @@ class g0 extends ql {
26075
26075
  // specularF90
26076
26076
  t,
26077
26077
  // positionWorld
26078
- bn,
26078
+ Tn,
26079
26079
  // modelMatrix
26080
26080
  gi,
26081
26081
  // viewMatrix
@@ -26151,7 +26151,7 @@ class g0 extends ql {
26151
26151
  indirectSpecular(e) {
26152
26152
  const { radiance: t, iblIrradiance: s, reflectedLight: i } = e.context;
26153
26153
  if (this.sheen === !0 && this.sheenSpecularIndirect.addAssign(s.mul(
26154
- rr,
26154
+ ar,
26155
26155
  qA({
26156
26156
  normal: tt,
26157
26157
  viewDir: qe,
@@ -26196,7 +26196,7 @@ class g0 extends ql {
26196
26196
  t.assign(n);
26197
26197
  }
26198
26198
  if (this.sheen === !0) {
26199
- const s = rr.r.max(rr.g).max(rr.b).mul(0.157).oneMinus(), i = t.mul(s).add(this.sheenSpecularDirect, this.sheenSpecularIndirect);
26199
+ const s = ar.r.max(ar.g).max(ar.b).mul(0.157).oneMinus(), i = t.mul(s).add(this.sheenSpecularDirect, this.sheenSpecularIndirect);
26200
26200
  t.assign(i);
26201
26201
  }
26202
26202
  }
@@ -26404,7 +26404,7 @@ class YA extends Vi {
26404
26404
  }
26405
26405
  } else {
26406
26406
  if (s.isTexture === !0)
26407
- return xe(s, gr.flipY()).setUpdateMatrix(!0);
26407
+ return xe(s, yr.flipY()).setUpdateMatrix(!0);
26408
26408
  s.isColor !== !0 && console.error("WebGPUNodes: Unsupported background configuration.", s);
26409
26409
  }
26410
26410
  }, i);
@@ -26507,7 +26507,7 @@ class YA extends Vi {
26507
26507
  * @return {Node} The output node.
26508
26508
  */
26509
26509
  getOutputNode(e) {
26510
- const t = this.renderer, s = this.getOutputCacheKey(), i = e.isArrayTexture ? fC(e, I(gr, Ul("gl_ViewID_OVR"))).renderOutput(t.toneMapping, t.currentColorSpace) : xe(e, gr).renderOutput(t.toneMapping, t.currentColorSpace);
26510
+ const t = this.renderer, s = this.getOutputCacheKey(), i = e.isArrayTexture ? fC(e, I(yr, Ul("gl_ViewID_OVR"))).renderOutput(t.toneMapping, t.currentColorSpace) : xe(e, yr).renderOutput(t.toneMapping, t.currentColorSpace);
26511
26511
  return zf.set(e, s), i;
26512
26512
  }
26513
26513
  /**
@@ -26964,7 +26964,7 @@ class tR {
26964
26964
  return e.joints[t.jointName];
26965
26965
  }
26966
26966
  }
26967
- class ga extends wn {
26967
+ class ga extends En {
26968
26968
  /**
26969
26969
  * Constructs a new XR render target.
26970
26970
  *
@@ -27108,7 +27108,7 @@ class gd extends yi {
27108
27108
  }
27109
27109
  }
27110
27110
  const Gf = /* @__PURE__ */ new R(), Vf = /* @__PURE__ */ new R();
27111
- class sR extends vn {
27111
+ class sR extends wn {
27112
27112
  /**
27113
27113
  * Constructs a new XR manager.
27114
27114
  *
@@ -27971,7 +27971,7 @@ class hR {
27971
27971
  colorBufferType: h = cs,
27972
27972
  multiview: u = !1
27973
27973
  } = t;
27974
- this.domElement = e.getDomElement(), this.backend = e, this.samples = l || o === !0 ? 4 : 0, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.alpha = i, this.logarithmicDepthBuffer = s, this.outputColorSpace = es, this.toneMapping = hr, this.toneMappingExposure = 1, this.sortObjects = !0, this.depth = n, this.stencil = r, this.info = new pT(), this.overrideNodes = {
27974
+ this.domElement = e.getDomElement(), this.backend = e, this.samples = l || o === !0 ? 4 : 0, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.alpha = i, this.logarithmicDepthBuffer = s, this.outputColorSpace = es, this.toneMapping = ur, this.toneMappingExposure = 1, this.sortObjects = !0, this.depth = n, this.stencil = r, this.info = new pT(), this.overrideNodes = {
27975
27975
  modelViewMatrix: null,
27976
27976
  modelNormalViewMatrix: null
27977
27977
  }, this.library = new y0(), this.lighting = new QA(), this._getFallback = c, this._pixelRatio = 1, this._width = this.domElement.width, this._height = this.domElement.height, this._viewport = new me(0, 0, this._width, this._height), this._scissor = new me(0, 0, this._width, this._height), this._scissorTest = !1, this._attributes = null, this._geometries = null, this._nodes = null, this._animation = null, this._bindings = null, this._objects = null, this._pipelines = null, this._bundles = null, this._renderLists = null, this._renderContexts = null, this._textures = null, this._background = null, this._quad = new od(new it()), this._quad.material.name = "Renderer_output", this._currentRenderContext = null, this._opaqueSort = null, this._transparentSort = null, this._frameBufferTarget = null;
@@ -28200,15 +28200,15 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
28200
28200
  */
28201
28201
  _getFrameBufferTarget() {
28202
28202
  const { currentToneMapping: e, currentColorSpace: t } = this;
28203
- if (e !== hr === !1 && t !== ur === !1) return null;
28203
+ if (e !== ur === !1 && t !== dr === !1) return null;
28204
28204
  const { width: n, height: r } = this.getDrawingBufferSize(Ro), { depth: o, stencil: l } = this;
28205
28205
  let c = this._frameBufferTarget;
28206
- c === null && (c = new wn(n, r, {
28206
+ c === null && (c = new En(n, r, {
28207
28207
  depthBuffer: o,
28208
28208
  stencilBuffer: l,
28209
28209
  type: this._colorBufferType,
28210
28210
  format: hs,
28211
- colorSpace: ur,
28211
+ colorSpace: dr,
28212
28212
  generateMipmaps: !1,
28213
28213
  minFilter: is,
28214
28214
  magFilter: is,
@@ -28643,7 +28643,7 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
28643
28643
  * @type {number}
28644
28644
  */
28645
28645
  get currentToneMapping() {
28646
- return this.isOutputTarget ? this.toneMapping : hr;
28646
+ return this.isOutputTarget ? this.toneMapping : ur;
28647
28647
  }
28648
28648
  /**
28649
28649
  * The current output color space of the renderer. When a render target is set,
@@ -28652,7 +28652,7 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
28652
28652
  * @type {string}
28653
28653
  */
28654
28654
  get currentColorSpace() {
28655
- return this.isOutputTarget ? this.outputColorSpace : ur;
28655
+ return this.isOutputTarget ? this.outputColorSpace : dr;
28656
28656
  }
28657
28657
  /**
28658
28658
  * Returns `true` if the rendering settings are set to screen output.
@@ -28980,7 +28980,7 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
28980
28980
  r.side = ii;
28981
28981
  this._renderObjects(e, s, i, n);
28982
28982
  for (const { material: r } of t)
28983
- r.side = cr;
28983
+ r.side = hr;
28984
28984
  } else
28985
28985
  this._renderObjects(e, s, i, n);
28986
28986
  }
@@ -29020,7 +29020,7 @@ Reason: ${e.reason}`), console.error(t), this._isDeviceLost = !0;
29020
29020
  const p = t.overrideMaterial;
29021
29021
  n.positionNode && n.positionNode.isNode && (h = p.positionNode, p.positionNode = n.positionNode), p.alphaTest = n.alphaTest, p.alphaMap = n.alphaMap, p.transparent = n.transparent || n.transmission > 0, p.isShadowPassMaterial && (p.side = n.shadowSide === null ? n.side : n.shadowSide, n.depthNode && n.depthNode.isNode && (d = p.depthNode, p.depthNode = n.depthNode), n.castShadowNode && n.castShadowNode.isNode && (u = p.colorNode, p.colorNode = n.castShadowNode), n.castShadowPositionNode && n.castShadowPositionNode.isNode && (h = p.positionNode, p.positionNode = n.castShadowPositionNode)), n = p;
29022
29022
  }
29023
- n.transparent === !0 && n.side === cr && n.forceSinglePass === !1 ? (n.side = $t, this._handleObjectFunction(e, n, t, s, o, r, l, "backSide"), n.side = ii, this._handleObjectFunction(e, n, t, s, o, r, l, c), n.side = cr) : this._handleObjectFunction(e, n, t, s, o, r, l, c), h !== void 0 && (t.overrideMaterial.positionNode = h), d !== void 0 && (t.overrideMaterial.depthNode = d), u !== void 0 && (t.overrideMaterial.colorNode = u), e.onAfterRender(this, t, s, i, n, r);
29023
+ n.transparent === !0 && n.side === hr && n.forceSinglePass === !1 ? (n.side = $t, this._handleObjectFunction(e, n, t, s, o, r, l, "backSide"), n.side = ii, this._handleObjectFunction(e, n, t, s, o, r, l, c), n.side = hr) : this._handleObjectFunction(e, n, t, s, o, r, l, c), h !== void 0 && (t.overrideMaterial.positionNode = h), d !== void 0 && (t.overrideMaterial.depthNode = d), u !== void 0 && (t.overrideMaterial.colorNode = u), e.onAfterRender(this, t, s, i, n, r);
29024
29024
  }
29025
29025
  /**
29026
29026
  * This method represents the default `_handleObjectFunction` implementation which creates
@@ -29619,7 +29619,7 @@ ${s.code}
29619
29619
  const l = {
29620
29620
  Float32Array: ss,
29621
29621
  Uint8Array: Dt,
29622
- Uint16Array: sr,
29622
+ Uint16Array: ir,
29623
29623
  Uint32Array: Ze,
29624
29624
  Int8Array: va,
29625
29625
  Int16Array: wa,
@@ -30265,7 +30265,7 @@ void main() {
30265
30265
  return n;
30266
30266
  }
30267
30267
  }
30268
- let rh = null, qn = null;
30268
+ let rh = null, Yn = null;
30269
30269
  class w0 {
30270
30270
  /**
30271
30271
  * Constructs a new backend.
@@ -30728,7 +30728,7 @@ class w0 {
30728
30728
  */
30729
30729
  getClearColor() {
30730
30730
  const e = this.renderer;
30731
- return qn = qn || new Iu(), e.getClearColor(qn), qn.getRGB(qn), qn;
30731
+ return Yn = Yn || new Iu(), e.getClearColor(Yn), Yn.getRGB(Yn), Yn;
30732
30732
  }
30733
30733
  /**
30734
30734
  * Returns the DOM element. If no DOM element exists, the backend
@@ -31264,7 +31264,7 @@ class CR {
31264
31264
  */
31265
31265
  setMaterial(e, t, s) {
31266
31266
  const { gl: i } = this;
31267
- e.side === cr ? this.disable(i.CULL_FACE) : this.enable(i.CULL_FACE);
31267
+ e.side === hr ? this.disable(i.CULL_FACE) : this.enable(i.CULL_FACE);
31268
31268
  let n = e.side === $t;
31269
31269
  t && (n = !n), this.setFlipSided(n), e.blending === ni && e.transparent === !1 ? this.setBlending(Tr) : this.setBlending(e.blending, e.blendEquation, e.blendSrc, e.blendDst, e.blendEquationAlpha, e.blendSrcAlpha, e.blendDstAlpha, e.premultipliedAlpha), this.setDepthFunc(e.depthFunc), this.setDepthTest(e.depthTest), this.setDepthMask(e.depthWrite), this.setColorMask(e.colorWrite);
31270
31270
  const r = e.stencilWrite;
@@ -31439,7 +31439,7 @@ class MR {
31439
31439
  if (e === wg) return s.UNSIGNED_INT_5_9_9_9_REV;
31440
31440
  if (e === va) return s.BYTE;
31441
31441
  if (e === wa) return s.SHORT;
31442
- if (e === sr) return s.UNSIGNED_SHORT;
31442
+ if (e === ir) return s.UNSIGNED_SHORT;
31443
31443
  if (e === Rt) return s.INT;
31444
31444
  if (e === Ze) return s.UNSIGNED_INT;
31445
31445
  if (e === ss) return s.FLOAT;
@@ -33253,7 +33253,7 @@ void main() {}`
33253
33253
  e && e.loseContext(), this.renderer.domElement.removeEventListener("webglcontextlost", this._onContextLost);
33254
33254
  }
33255
33255
  }
33256
- const or = {
33256
+ const lr = {
33257
33257
  PointList: "point-list",
33258
33258
  LineList: "line-list",
33259
33259
  LineStrip: "line-strip",
@@ -33631,7 +33631,7 @@ fn main( @location( 0 ) vTex : vec2<f32> ) -> @location( 0 ) vec4<f32> {
33631
33631
  targets: [{ format: e }]
33632
33632
  },
33633
33633
  primitive: {
33634
- topology: or.TriangleStrip,
33634
+ topology: lr.TriangleStrip,
33635
33635
  stripIndexFormat: Ar.Uint32
33636
33636
  },
33637
33637
  layout: "auto"
@@ -33658,7 +33658,7 @@ fn main( @location( 0 ) vTex : vec2<f32> ) -> @location( 0 ) vec4<f32> {
33658
33658
  targets: [{ format: e }]
33659
33659
  },
33660
33660
  primitive: {
33661
- topology: or.TriangleStrip,
33661
+ topology: lr.TriangleStrip,
33662
33662
  stripIndexFormat: Ar.Uint32
33663
33663
  },
33664
33664
  layout: "auto"
@@ -34417,7 +34417,7 @@ function pu(a, e = null) {
34417
34417
  case wa:
34418
34418
  r = w.RGBA16Sint;
34419
34419
  break;
34420
- case sr:
34420
+ case ir:
34421
34421
  r = w.RGBA16Uint;
34422
34422
  break;
34423
34423
  case Ze:
@@ -34456,7 +34456,7 @@ function pu(a, e = null) {
34456
34456
  case wa:
34457
34457
  r = w.R16Sint;
34458
34458
  break;
34459
- case sr:
34459
+ case ir:
34460
34460
  r = w.R16Uint;
34461
34461
  break;
34462
34462
  case Ze:
@@ -34486,7 +34486,7 @@ function pu(a, e = null) {
34486
34486
  case wa:
34487
34487
  r = w.RG16Sint;
34488
34488
  break;
34489
- case sr:
34489
+ case ir:
34490
34490
  r = w.RG16Uint;
34491
34491
  break;
34492
34492
  case Ze:
@@ -34510,7 +34510,7 @@ function pu(a, e = null) {
34510
34510
  break;
34511
34511
  case Gs:
34512
34512
  switch (s) {
34513
- case sr:
34513
+ case ir:
34514
34514
  r = w.Depth16Unorm;
34515
34515
  break;
34516
34516
  case Ze:
@@ -34686,7 +34686,7 @@ class qR extends d0 {
34686
34686
  return new jR(e);
34687
34687
  }
34688
34688
  }
34689
- const Yn = typeof self < "u" ? self.GPUShaderStage : { VERTEX: 1, FRAGMENT: 2, COMPUTE: 4 }, YR = {
34689
+ const Xn = typeof self < "u" ? self.GPUShaderStage : { VERTEX: 1, FRAGMENT: 2, COMPUTE: 4 }, YR = {
34690
34690
  [ti.READ_ONLY]: "read",
34691
34691
  [ti.WRITE_ONLY]: "write",
34692
34692
  [ti.READ_WRITE]: "read_write"
@@ -34695,9 +34695,9 @@ const Yn = typeof self < "u" ? self.GPUShaderStage : { VERTEX: 1, FRAGMENT: 2, C
34695
34695
  [Ii]: "clamp",
34696
34696
  [vr]: "mirror"
34697
34697
  }, Do = {
34698
- vertex: Yn ? Yn.VERTEX : 1,
34699
- fragment: Yn ? Yn.FRAGMENT : 2,
34700
- compute: Yn ? Yn.COMPUTE : 4
34698
+ vertex: Xn ? Xn.VERTEX : 1,
34699
+ fragment: Xn ? Xn.FRAGMENT : 2,
34700
+ compute: Xn ? Xn.COMPUTE : 4
34701
34701
  }, am = {
34702
34702
  instance: !0,
34703
34703
  swizzleAssign: !1,
@@ -35911,10 +35911,10 @@ class QR {
35911
35911
  * @return {string} The GPU primitive topology.
35912
35912
  */
35913
35913
  getPrimitiveTopology(e, t) {
35914
- if (e.isPoints) return or.PointList;
35915
- if (e.isLineSegments || e.isMesh && t.wireframe === !0) return or.LineList;
35916
- if (e.isLine) return or.LineStrip;
35917
- if (e.isMesh) return or.TriangleList;
35914
+ if (e.isPoints) return lr.PointList;
35915
+ if (e.isLineSegments || e.isMesh && t.wireframe === !0) return lr.LineList;
35916
+ if (e.isLine) return lr.LineStrip;
35917
+ if (e.isMesh) return lr.TriangleList;
35918
35918
  }
35919
35919
  /**
35920
35920
  * Returns a modified sample count from the given sample count value.
@@ -36707,7 +36707,7 @@ class n1 {
36707
36707
  case $t:
36708
36708
  i.frontFace = lh.CCW, i.cullMode = ch.Front;
36709
36709
  break;
36710
- case cr:
36710
+ case hr:
36711
36711
  i.frontFace = lh.CCW, i.cullMode = ch.None;
36712
36712
  break;
36713
36713
  default:
@@ -38276,7 +38276,7 @@ class p1 extends A0 {
38276
38276
  }
38277
38277
  if (this.useSheen) {
38278
38278
  const t = this.sheenNode ? I(this.sheenNode) : fE, s = this.sheenRoughnessNode ? O(this.sheenRoughnessNode) : mE;
38279
- rr.assign(t), Hu.assign(s);
38279
+ ar.assign(t), Hu.assign(s);
38280
38280
  }
38281
38281
  if (this.useIridescence) {
38282
38282
  const t = this.iridescenceNode ? O(this.iridescenceNode) : yE, s = this.iridescenceIORNode ? O(this.iridescenceIORNode) : xE, i = this.iridescenceThicknessNode ? O(this.iridescenceThicknessNode) : _E;
@@ -38288,7 +38288,7 @@ class p1 extends A0 {
38288
38288
  t.assign(V(1, 0));
38289
38289
  }).Else(() => {
38290
38290
  t.divAssign(V(ln)), ln.assign(ln.saturate());
38291
- }), iu.assign(ln.pow2().mix(ei.pow2(), 1)), Ko.assign(ma[0].mul(t.x).add(ma[1].mul(t.y))), mr.assign(ma[1].mul(t.x).sub(ma[0].mul(t.y)));
38291
+ }), iu.assign(ln.pow2().mix(ei.pow2(), 1)), Ko.assign(ma[0].mul(t.x).add(ma[1].mul(t.y))), gr.assign(ma[1].mul(t.x).sub(ma[0].mul(t.y)));
38292
38292
  }
38293
38293
  if (this.useTransmission) {
38294
38294
  const t = this.transmissionNode ? O(this.transmissionNode) : bE, s = this.thicknessNode ? O(this.thicknessNode) : TE, i = this.attenuationDistanceNode ? O(this.attenuationDistanceNode) : vE, n = this.attenuationColorNode ? I(this.attenuationColorNode) : wE;
@@ -38705,7 +38705,7 @@ class N0 extends it {
38705
38705
  */
38706
38706
  setupPositionView(e) {
38707
38707
  const { object: t, camera: s } = e, i = this.sizeAttenuation, { positionNode: n, rotationNode: r, scaleNode: o } = this, l = kl.mul(I(n || 0));
38708
- let c = V(bn[0].xyz.length(), bn[1].xyz.length());
38708
+ let c = V(Tn[0].xyz.length(), Tn[1].xyz.length());
38709
38709
  if (o !== null && (c = c.mul(V(o))), i === !1)
38710
38710
  if (s.isPerspectiveCamera)
38711
38711
  c = c.mul(l.z.negate());
@@ -38860,7 +38860,7 @@ class W1 extends it {
38860
38860
  return new G1();
38861
38861
  }
38862
38862
  }
38863
- class Cn extends dt {
38863
+ class Mn extends dt {
38864
38864
  /**
38865
38865
  * Constructs a new light.
38866
38866
  *
@@ -39049,7 +39049,7 @@ class $1 extends bd {
39049
39049
  n !== s.far && (s.far = n, s.updateProjectionMatrix()), sa.setFromMatrixPosition(e.matrixWorld), s.position.copy(sa), fh.copy(s.position), fh.add(this._cubeDirections[t]), s.up.copy(this._cubeUps[t]), s.lookAt(fh), s.updateMatrixWorld(), i.makeTranslation(-sa.x, -sa.y, -sa.z), hm.multiplyMatrices(s.projectionMatrix, s.matrixWorldInverse), this._frustum.setFromProjectionMatrix(hm);
39050
39050
  }
39051
39051
  }
39052
- class j1 extends Cn {
39052
+ class j1 extends Mn {
39053
39053
  /**
39054
39054
  * Constructs a new point light.
39055
39055
  *
@@ -39088,7 +39088,7 @@ class q1 extends bd {
39088
39088
  super(new ad(-5, 5, 5, -5, 0.5, 500)), this.isDirectionalLightShadow = !0;
39089
39089
  }
39090
39090
  }
39091
- class Y1 extends Cn {
39091
+ class Y1 extends Mn {
39092
39092
  /**
39093
39093
  * Constructs a new directional light.
39094
39094
  *
@@ -39105,7 +39105,7 @@ class Y1 extends Cn {
39105
39105
  return super.copy(e), this.target = e.target.clone(), this.shadow = e.shadow.clone(), this;
39106
39106
  }
39107
39107
  }
39108
- class X1 extends Cn {
39108
+ class X1 extends Mn {
39109
39109
  /**
39110
39110
  * Constructs a new area light.
39111
39111
  *
@@ -39152,7 +39152,7 @@ class Z1 extends bd {
39152
39152
  return super.copy(e), this.focus = e.focus, this;
39153
39153
  }
39154
39154
  }
39155
- class Td extends Cn {
39155
+ class Td extends Mn {
39156
39156
  /**
39157
39157
  * Constructs a new spot light.
39158
39158
  *
@@ -39185,7 +39185,7 @@ class Td extends Cn {
39185
39185
  return super.copy(e, t), this.distance = e.distance, this.angle = e.angle, this.penumbra = e.penumbra, this.decay = e.decay, this.target = e.target.clone(), this.shadow = e.shadow.clone(), this;
39186
39186
  }
39187
39187
  }
39188
- class K1 extends Cn {
39188
+ class K1 extends Mn {
39189
39189
  /**
39190
39190
  * Constructs a new ambient light.
39191
39191
  *
@@ -39196,7 +39196,7 @@ class K1 extends Cn {
39196
39196
  super(e, t), this.isAmbientLight = !0, this.type = "AmbientLight";
39197
39197
  }
39198
39198
  }
39199
- class Q1 extends Cn {
39199
+ class Q1 extends Mn {
39200
39200
  /**
39201
39201
  * Constructs a new hemisphere light.
39202
39202
  *
@@ -39380,7 +39380,7 @@ class J1 {
39380
39380
  t[0] = 0.282095, t[1] = 0.488603 * i, t[2] = 0.488603 * n, t[3] = 0.488603 * s, t[4] = 1.092548 * s * i, t[5] = 1.092548 * i * n, t[6] = 0.315392 * (3 * n * n - 1), t[7] = 1.092548 * s * n, t[8] = 0.546274 * (s * s - i * i);
39381
39381
  }
39382
39382
  }
39383
- class eN extends Cn {
39383
+ class eN extends Mn {
39384
39384
  /**
39385
39385
  * Constructs a new light probe.
39386
39386
  *
@@ -39489,11 +39489,11 @@ class nN extends Ls {
39489
39489
  * If this is not the set, the helper will take the color of the light.
39490
39490
  */
39491
39491
  constructor(e, t) {
39492
- const s = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], i = new xr();
39492
+ const s = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], i = new bn();
39493
39493
  i.setAttribute("position", new gn(s, 3)), i.computeBoundingSphere();
39494
39494
  const n = new xu({ fog: !1 });
39495
39495
  super(i, n), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
39496
- const r = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new xr();
39496
+ const r = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new bn();
39497
39497
  o.setAttribute("position", new gn(r, 3)), o.computeBoundingSphere(), this.add(new Y(o, new _n({ side: Pm, fog: !1 })));
39498
39498
  }
39499
39499
  updateMatrixWorld() {
@@ -39532,7 +39532,7 @@ class aN extends jm {
39532
39532
  * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
39533
39533
  */
39534
39534
  constructor(e, t = null) {
39535
- super(e, t), this.state = Fe.NONE, this.target = new Z(), this.cursor = new Z(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: lr.ROTATE, MIDDLE: lr.DOLLY, RIGHT: lr.PAN }, this.touches = { ONE: tr.ROTATE, TWO: tr.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new Z(), this._lastQuaternion = new Jt(), this._lastTargetPosition = new Z(), this._quat = new Jt().setFromUnitVectors(e.up, new Z(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Nh(), this._sphericalDelta = new Nh(), this._scale = 1, this._panOffset = new Z(), this._rotateStart = new yt(), this._rotateEnd = new yt(), this._rotateDelta = new yt(), this._panStart = new yt(), this._panEnd = new yt(), this._panDelta = new yt(), this._dollyStart = new yt(), this._dollyEnd = new yt(), this._dollyDelta = new yt(), this._dollyDirection = new Z(), this._mouse = new yt(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = lN.bind(this), this._onPointerDown = oN.bind(this), this._onPointerUp = cN.bind(this), this._onContextMenu = gN.bind(this), this._onMouseWheel = dN.bind(this), this._onKeyDown = pN.bind(this), this._onTouchStart = fN.bind(this), this._onTouchMove = mN.bind(this), this._onMouseDown = hN.bind(this), this._onMouseMove = uN.bind(this), this._interceptControlDown = yN.bind(this), this._interceptControlUp = xN.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
39535
+ super(e, t), this.state = Fe.NONE, this.target = new Z(), this.cursor = new Z(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: cr.ROTATE, MIDDLE: cr.DOLLY, RIGHT: cr.PAN }, this.touches = { ONE: sr.ROTATE, TWO: sr.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new Z(), this._lastQuaternion = new Jt(), this._lastTargetPosition = new Z(), this._quat = new Jt().setFromUnitVectors(e.up, new Z(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Nh(), this._sphericalDelta = new Nh(), this._scale = 1, this._panOffset = new Z(), this._rotateStart = new yt(), this._rotateEnd = new yt(), this._rotateDelta = new yt(), this._panStart = new yt(), this._panEnd = new yt(), this._panDelta = new yt(), this._dollyStart = new yt(), this._dollyEnd = new yt(), this._dollyDelta = new yt(), this._dollyDirection = new Z(), this._mouse = new yt(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = lN.bind(this), this._onPointerDown = oN.bind(this), this._onPointerUp = cN.bind(this), this._onContextMenu = gN.bind(this), this._onMouseWheel = dN.bind(this), this._onKeyDown = pN.bind(this), this._onTouchStart = fN.bind(this), this._onTouchMove = mN.bind(this), this._onMouseDown = hN.bind(this), this._onMouseMove = uN.bind(this), this._interceptControlDown = yN.bind(this), this._interceptControlUp = xN.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
39536
39536
  }
39537
39537
  connect(e) {
39538
39538
  super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -39853,11 +39853,11 @@ function hN(a) {
39853
39853
  e = -1;
39854
39854
  }
39855
39855
  switch (e) {
39856
- case lr.DOLLY:
39856
+ case cr.DOLLY:
39857
39857
  if (this.enableZoom === !1) return;
39858
39858
  this._handleMouseDownDolly(a), this.state = Fe.DOLLY;
39859
39859
  break;
39860
- case lr.ROTATE:
39860
+ case cr.ROTATE:
39861
39861
  if (a.ctrlKey || a.metaKey || a.shiftKey) {
39862
39862
  if (this.enablePan === !1) return;
39863
39863
  this._handleMouseDownPan(a), this.state = Fe.PAN;
@@ -39866,7 +39866,7 @@ function hN(a) {
39866
39866
  this._handleMouseDownRotate(a), this.state = Fe.ROTATE;
39867
39867
  }
39868
39868
  break;
39869
- case lr.PAN:
39869
+ case cr.PAN:
39870
39870
  if (a.ctrlKey || a.metaKey || a.shiftKey) {
39871
39871
  if (this.enableRotate === !1) return;
39872
39872
  this._handleMouseDownRotate(a), this.state = Fe.ROTATE;
@@ -39906,11 +39906,11 @@ function fN(a) {
39906
39906
  switch (this._trackPointer(a), this._pointers.length) {
39907
39907
  case 1:
39908
39908
  switch (this.touches.ONE) {
39909
- case tr.ROTATE:
39909
+ case sr.ROTATE:
39910
39910
  if (this.enableRotate === !1) return;
39911
39911
  this._handleTouchStartRotate(a), this.state = Fe.TOUCH_ROTATE;
39912
39912
  break;
39913
- case tr.PAN:
39913
+ case sr.PAN:
39914
39914
  if (this.enablePan === !1) return;
39915
39915
  this._handleTouchStartPan(a), this.state = Fe.TOUCH_PAN;
39916
39916
  break;
@@ -39920,11 +39920,11 @@ function fN(a) {
39920
39920
  break;
39921
39921
  case 2:
39922
39922
  switch (this.touches.TWO) {
39923
- case tr.DOLLY_PAN:
39923
+ case sr.DOLLY_PAN:
39924
39924
  if (this.enableZoom === !1 && this.enablePan === !1) return;
39925
39925
  this._handleTouchStartDollyPan(a), this.state = Fe.TOUCH_DOLLY_PAN;
39926
39926
  break;
39927
- case tr.DOLLY_ROTATE:
39927
+ case sr.DOLLY_ROTATE:
39928
39928
  if (this.enableZoom === !1 && this.enableRotate === !1) return;
39929
39929
  this._handleTouchStartDollyRotate(a), this.state = Fe.TOUCH_DOLLY_ROTATE;
39930
39930
  break;
@@ -40000,7 +40000,7 @@ const je = {
40000
40000
  TOUCH_ZOOM_OFFSET: 131072,
40001
40001
  TOUCH_ZOOM_SCREEN_PAN: 262144,
40002
40002
  TOUCH_ZOOM_ROTATE: 524288
40003
- }), Xn = {
40003
+ }), Zn = {
40004
40004
  NONE: 0,
40005
40005
  IN: 1,
40006
40006
  OUT: -1
@@ -40011,7 +40011,7 @@ function en(a) {
40011
40011
  function Mi(a) {
40012
40012
  return a.isOrthographicCamera;
40013
40013
  }
40014
- const Zn = Math.PI * 2, pm = Math.PI / 2, F0 = 1e-5, ia = Math.PI / 180;
40014
+ const Kn = Math.PI * 2, pm = Math.PI / 2, F0 = 1e-5, ia = Math.PI / 180;
40015
40015
  function Ts(a, e, t) {
40016
40016
  return Math.max(e, Math.min(t, a));
40017
40017
  }
@@ -40130,7 +40130,7 @@ class _N {
40130
40130
  }
40131
40131
  var xh;
40132
40132
  const bN = "2.10.1", Lo = 1 / 8, TN = /Mac/.test((xh = globalThis?.navigator) === null || xh === void 0 ? void 0 : xh.platform);
40133
- let ee, gm, Uo, _h, Gt, le, be, Kn, aa, Ds, Os, tn, ym, xm, as, oa, Qn, _m, bh, bm, Th, Sh, ko;
40133
+ let ee, gm, Uo, _h, Gt, le, be, Qn, aa, Ds, Os, tn, ym, xm, as, oa, Jn, _m, bh, bm, Th, Sh, ko;
40134
40134
  class ks extends _N {
40135
40135
  /**
40136
40136
  * Injects THREE as the dependency. You can then proceed to use CameraControls.
@@ -40173,7 +40173,7 @@ class ks extends _N {
40173
40173
  * @category Statics
40174
40174
  */
40175
40175
  static install(e) {
40176
- ee = e.THREE, gm = Object.freeze(new ee.Vector3(0, 0, 0)), Uo = Object.freeze(new ee.Vector3(0, 1, 0)), _h = Object.freeze(new ee.Vector3(0, 0, 1)), Gt = new ee.Vector2(), le = new ee.Vector3(), be = new ee.Vector3(), Kn = new ee.Vector3(), aa = new ee.Vector3(), Ds = new ee.Vector3(), Os = new ee.Vector3(), tn = new ee.Vector3(), ym = new ee.Vector3(), xm = new ee.Vector3(), as = new ee.Spherical(), oa = new ee.Spherical(), Qn = new ee.Box3(), _m = new ee.Box3(), bh = new ee.Sphere(), bm = new ee.Quaternion(), Th = new ee.Quaternion(), Sh = new ee.Matrix4(), ko = new ee.Raycaster();
40176
+ ee = e.THREE, gm = Object.freeze(new ee.Vector3(0, 0, 0)), Uo = Object.freeze(new ee.Vector3(0, 1, 0)), _h = Object.freeze(new ee.Vector3(0, 0, 1)), Gt = new ee.Vector2(), le = new ee.Vector3(), be = new ee.Vector3(), Qn = new ee.Vector3(), aa = new ee.Vector3(), Ds = new ee.Vector3(), Os = new ee.Vector3(), tn = new ee.Vector3(), ym = new ee.Vector3(), xm = new ee.Vector3(), as = new ee.Spherical(), oa = new ee.Spherical(), Jn = new ee.Box3(), _m = new ee.Box3(), bh = new ee.Sphere(), bm = new ee.Quaternion(), Th = new ee.Quaternion(), Sh = new ee.Matrix4(), ko = new ee.Raycaster();
40177
40177
  }
40178
40178
  /**
40179
40179
  * list all ACTIONs
@@ -40207,7 +40207,7 @@ class ks extends _N {
40207
40207
  */
40208
40208
  constructor(e, t) {
40209
40209
  super(), this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.minDistance = Number.EPSILON, this.maxDistance = 1 / 0, this.infinityDolly = !1, this.minZoom = 0.01, this.maxZoom = 1 / 0, this.smoothTime = 0.25, this.draggingSmoothTime = 0.125, this.maxSpeed = 1 / 0, this.azimuthRotateSpeed = 1, this.polarRotateSpeed = 1, this.dollySpeed = 1, this.dollyDragInverted = !1, this.truckSpeed = 2, this.dollyToCursor = !1, this.dragToOffset = !1, this.boundaryFriction = 0, this.restThreshold = 0.01, this.colliderMeshes = [], this.cancel = () => {
40210
- }, this._enabled = !0, this._state = P.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = Xn.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new ee.Vector3(), this._focalOffsetVelocity = new ee.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (g, x, _, b) => {
40210
+ }, this._enabled = !0, this._state = P.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = Zn.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new ee.Vector3(), this._focalOffsetVelocity = new ee.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (g, x, _, b) => {
40211
40211
  let T, E;
40212
40212
  if (en(this._camera)) {
40213
40213
  const v = le.copy(this._camera.position).sub(this._target), A = this._camera.getEffectiveFOV() * ia, N = v.length() * Math.tan(A * 0.5);
@@ -40219,7 +40219,7 @@ class ks extends _N {
40219
40219
  return;
40220
40220
  b ? (_ ? this.setFocalOffset(this._focalOffsetEnd.x + T, this._focalOffsetEnd.y, this._focalOffsetEnd.z, !0) : this.truck(T, 0, !0), this.forward(-E, !0)) : _ ? this.setFocalOffset(this._focalOffsetEnd.x + T, this._focalOffsetEnd.y + E, this._focalOffsetEnd.z, !0) : this.truck(T, E, !0);
40221
40221
  }, this._rotateInternal = (g, x) => {
40222
- const _ = Zn * this.azimuthRotateSpeed * g / this._elementRect.height, b = Zn * this.polarRotateSpeed * x / this._elementRect.height;
40222
+ const _ = Kn * this.azimuthRotateSpeed * g / this._elementRect.height, b = Kn * this.polarRotateSpeed * x / this._elementRect.height;
40223
40223
  this.rotate(_, b, !0);
40224
40224
  }, this._dollyInternal = (g, x, _) => {
40225
40225
  const b = Math.pow(0.95, -g * this.dollySpeed), T = this._sphericalEnd.radius, E = this._sphericalEnd.radius * b, v = Ts(E, this.minDistance, this.maxDistance), A = v - E;
@@ -40660,7 +40660,7 @@ class ks extends _N {
40660
40660
  * @category Methods
40661
40661
  */
40662
40662
  dollyTo(e, t = !1) {
40663
- return this._isUserControllingDolly = !1, this._lastDollyDirection = Xn.NONE, this._changedDolly = 0, this._dollyToNoClamp(Ts(e, this.minDistance, this.maxDistance), t);
40663
+ return this._isUserControllingDolly = !1, this._lastDollyDirection = Zn.NONE, this._changedDolly = 0, this._dollyToNoClamp(Ts(e, this.minDistance, this.maxDistance), t);
40664
40664
  }
40665
40665
  _dollyToNoClamp(e, t = !1) {
40666
40666
  const s = this._sphericalEnd.radius;
@@ -40790,7 +40790,7 @@ class ks extends _N {
40790
40790
  * @category Methods
40791
40791
  */
40792
40792
  fitToBox(e, t, { cover: s = !1, paddingLeft: i = 0, paddingRight: n = 0, paddingBottom: r = 0, paddingTop: o = 0 } = {}) {
40793
- const l = [], c = e.isBox3 ? Qn.copy(e) : Qn.setFromObject(e);
40793
+ const l = [], c = e.isBox3 ? Jn.copy(e) : Jn.setFromObject(e);
40794
40794
  c.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
40795
40795
  const h = fm(this._sphericalEnd.theta, pm), u = fm(this._sphericalEnd.phi, pm);
40796
40796
  l.push(this.rotateTo(h, u, t));
@@ -40837,7 +40837,7 @@ class ks extends _N {
40837
40837
  * @category Methods
40838
40838
  */
40839
40839
  setLookAt(e, t, s, i, n, r, o = !1) {
40840
- this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = Xn.NONE, this._changedDolly = 0;
40840
+ this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = Zn.NONE, this._changedDolly = 0;
40841
40841
  const l = be.set(i, n, r), c = le.set(e, t, s);
40842
40842
  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));
40843
40843
  const h = !o || Me(this._target.x, this._targetEnd.x, this.restThreshold) && Me(this._target.y, this._targetEnd.y, this.restThreshold) && Me(this._target.z, this._targetEnd.z, this.restThreshold) && Me(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Me(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && Me(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
@@ -40862,10 +40862,10 @@ class ks extends _N {
40862
40862
  * @category Methods
40863
40863
  */
40864
40864
  lerpLookAt(e, t, s, i, n, r, o, l, c, h, u, d, p, f = !1) {
40865
- this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = Xn.NONE, this._changedDolly = 0;
40865
+ this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = Zn.NONE, this._changedDolly = 0;
40866
40866
  const m = le.set(i, n, r), y = be.set(e, t, s);
40867
40867
  as.setFromVector3(y.sub(m).applyQuaternion(this._yAxisUpSpace));
40868
- const g = Kn.set(h, u, d), x = be.set(o, l, c);
40868
+ const g = Qn.set(h, u, d), x = be.set(o, l, c);
40869
40869
  oa.setFromVector3(x.sub(g).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(m.lerp(g, p));
40870
40870
  const _ = oa.theta - as.theta, b = oa.phi - as.phi, T = oa.radius - as.radius;
40871
40871
  this._sphericalEnd.set(as.radius + T * p, as.phi + b * p, as.theta + _ * p), this.normalizeRotations(), this._needsUpdate = !0, f || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
@@ -41018,7 +41018,7 @@ class ks extends _N {
41018
41018
  * @category Methods
41019
41019
  */
41020
41020
  normalizeRotations() {
41021
- this._sphericalEnd.theta = this._sphericalEnd.theta % Zn, this._sphericalEnd.theta < 0 && (this._sphericalEnd.theta += Zn), this._spherical.theta += Zn * Math.round((this._sphericalEnd.theta - this._spherical.theta) / Zn);
41021
+ this._sphericalEnd.theta = this._sphericalEnd.theta % Kn, this._sphericalEnd.theta < 0 && (this._sphericalEnd.theta += Kn), this._spherical.theta += Kn * Math.round((this._sphericalEnd.theta - this._spherical.theta) / Kn);
41022
41022
  }
41023
41023
  /**
41024
41024
  * stop all transitions.
@@ -41119,7 +41119,7 @@ class ks extends _N {
41119
41119
  if (en(this._camera) && this._changedDolly !== 0) {
41120
41120
  const u = this._spherical.radius - this._lastDistance, d = this._camera, p = this._getCameraDirection(aa), f = le.copy(p).cross(d.up).normalize();
41121
41121
  f.lengthSq() === 0 && (f.x = 1);
41122
- const m = be.crossVectors(f, p), y = this._sphericalEnd.radius * Math.tan(d.getEffectiveFOV() * ia * 0.5), x = (this._sphericalEnd.radius - u - this._sphericalEnd.radius) / this._sphericalEnd.radius, _ = Kn.copy(this._targetEnd).add(f.multiplyScalar(this._dollyControlCoord.x * y * d.aspect)).add(m.multiplyScalar(this._dollyControlCoord.y * y)), b = le.copy(this._targetEnd).lerp(_, x), T = this._lastDollyDirection === Xn.IN && this._spherical.radius <= this.minDistance, E = this._lastDollyDirection === Xn.OUT && this.maxDistance <= this._spherical.radius;
41122
+ const m = be.crossVectors(f, p), y = this._sphericalEnd.radius * Math.tan(d.getEffectiveFOV() * ia * 0.5), x = (this._sphericalEnd.radius - u - this._sphericalEnd.radius) / this._sphericalEnd.radius, _ = Qn.copy(this._targetEnd).add(f.multiplyScalar(this._dollyControlCoord.x * y * d.aspect)).add(m.multiplyScalar(this._dollyControlCoord.y * y)), b = le.copy(this._targetEnd).lerp(_, x), T = this._lastDollyDirection === Zn.IN && this._spherical.radius <= this.minDistance, E = this._lastDollyDirection === Zn.OUT && this.maxDistance <= this._spherical.radius;
41123
41123
  if (this.infinityDolly && (T || E)) {
41124
41124
  this._sphericalEnd.radius -= u, this._spherical.radius -= u;
41125
41125
  const A = be.copy(p).multiplyScalar(-u);
@@ -41129,7 +41129,7 @@ class ks extends _N {
41129
41129
  const v = be.subVectors(b, this._targetEnd);
41130
41130
  this._targetEnd.copy(b), this._target.add(v), this._changedDolly -= u, Le(this._changedDolly) && (this._changedDolly = 0);
41131
41131
  } else if (Mi(this._camera) && this._changedZoom !== 0) {
41132
- const u = this._zoom - this._lastZoom, d = this._camera, p = le.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (d.near + d.far) / (d.near - d.far)).unproject(d), f = be.set(0, 0, -1).applyQuaternion(d.quaternion), m = Kn.copy(p).add(f.multiplyScalar(-p.dot(d.up))), g = -(this._zoom - u - this._zoom) / this._zoom, x = this._getCameraDirection(aa), _ = this._targetEnd.dot(x), b = le.copy(this._targetEnd).lerp(m, g), T = b.dot(x), E = x.multiplyScalar(T - _);
41132
+ const u = this._zoom - this._lastZoom, d = this._camera, p = le.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (d.near + d.far) / (d.near - d.far)).unproject(d), f = be.set(0, 0, -1).applyQuaternion(d.quaternion), m = Qn.copy(p).add(f.multiplyScalar(-p.dot(d.up))), g = -(this._zoom - u - this._zoom) / this._zoom, x = this._getCameraDirection(aa), _ = this._targetEnd.dot(x), b = le.copy(this._targetEnd).lerp(m, g), T = b.dot(x), E = x.multiplyScalar(T - _);
41133
41133
  b.sub(E), this._boundary.clampPoint(b, b);
41134
41134
  const v = be.subVectors(b, this._targetEnd);
41135
41135
  this._targetEnd.copy(b), this._target.add(v), this._changedZoom -= u, Le(this._changedZoom) && (this._changedZoom = 0);
@@ -41226,7 +41226,7 @@ class ks extends _N {
41226
41226
  const i = t.lengthSq();
41227
41227
  if (i === 0)
41228
41228
  return e;
41229
- const n = be.copy(t).add(e), o = this._boundary.clampPoint(n, Kn).sub(n), l = o.lengthSq();
41229
+ const n = be.copy(t).add(e), o = this._boundary.clampPoint(n, Qn).sub(n), l = o.lengthSq();
41230
41230
  if (l === 0)
41231
41231
  return e.add(t);
41232
41232
  if (l === i)
@@ -41257,7 +41257,7 @@ class ks extends _N {
41257
41257
  for (let i = 0; i < 4; i++) {
41258
41258
  const n = be.copy(this._nearPlaneCorners[i]);
41259
41259
  n.applyMatrix4(Sh);
41260
- const r = Kn.addVectors(this._target, n);
41260
+ const r = Qn.addVectors(this._target, n);
41261
41261
  ko.set(r, s), ko.far = this._spherical.radius + 1;
41262
41262
  const o = ko.intersectObjects(this.colliderMeshes);
41263
41263
  o.length !== 0 && o[0].distance < e && (e = o[0].distance);
@@ -41320,9 +41320,9 @@ class ks extends _N {
41320
41320
  }
41321
41321
  static createBoundingSphere(e, t = new ee.Sphere()) {
41322
41322
  const s = t, i = s.center;
41323
- Qn.makeEmpty(), e.traverseVisible((r) => {
41324
- r.isMesh && Qn.expandByObject(r);
41325
- }), Qn.getCenter(i);
41323
+ Jn.makeEmpty(), e.traverseVisible((r) => {
41324
+ r.isMesh && Jn.expandByObject(r);
41325
+ }), Jn.getCenter(i);
41326
41326
  let n = 0;
41327
41327
  return e.traverseVisible((r) => {
41328
41328
  if (!r.isMesh)
@@ -41486,7 +41486,7 @@ class wN extends qm {
41486
41486
  value: e?.divisions !== void 0 ? e?.divisions : 10
41487
41487
  },
41488
41488
  uColor: {
41489
- value: e?.color !== void 0 ? e?.color : new Tn(16777215)
41489
+ value: e?.color !== void 0 ? e?.color : new Sn(16777215)
41490
41490
  },
41491
41491
  uDistance: {
41492
41492
  value: e?.distance !== void 0 ? e?.distance : 1e4
@@ -41869,7 +41869,7 @@ class BN extends _r {
41869
41869
  m.translate(0, 0.05, 0);
41870
41870
  const y = new bt(0.08, 0.08, 0.08);
41871
41871
  y.translate(0, 0.04, 0);
41872
- const g = new xr();
41872
+ const g = new bn();
41873
41873
  g.setAttribute("position", new gn([0, 0, 0, 1, 0, 0], 3));
41874
41874
  const x = new kt(75e-4, 75e-4, 0.5, 3);
41875
41875
  x.translate(0, 0.25, 0);
@@ -41878,7 +41878,7 @@ class BN extends _r {
41878
41878
  return ue.rotateY(Math.PI / 2), ue.rotateX(Math.PI / 2), ue;
41879
41879
  }
41880
41880
  function b() {
41881
- const X = new xr();
41881
+ const X = new bn();
41882
41882
  return X.setAttribute("position", new gn([0, 0, 0, 1, 1, 1], 3)), X;
41883
41883
  }
41884
41884
  const T = {
@@ -42155,7 +42155,7 @@ class Pt extends gu {
42155
42155
  let t = this.controls.get(e);
42156
42156
  if (t === void 0) {
42157
42157
  const s = document.querySelector(".clickable");
42158
- t = new RN(this.activeCamera, s), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
42158
+ t = new RN(this.activeCamera, s), t.getHelper().name = e, t.setSize(0.25), t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
42159
42159
  this.dispatchEvent({ type: Pt.DRAG_START });
42160
42160
  }), t.addEventListener("mouseUp", () => {
42161
42161
  this.dispatchEvent({ type: Pt.DRAG_END });
@@ -42223,8 +42223,8 @@ class Mh extends _r {
42223
42223
  parentGroup;
42224
42224
  group;
42225
42225
  constructor(e, t) {
42226
- const s = new Tn(Bi(0.5, 1, Math.random()), Bi(0.5, 1, Math.random()), Bi(0.5, 1, Math.random()));
42227
- super(), this.name = e, this.lineMaterial = new xu({ color: s }), this.line = new Ls(new xr(), this.lineMaterial), this.line.name = "line", this.line.visible = !1, this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = s, this.draggable = new _r(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new Y(new Xm(1.5), new _n({ color: s })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new Na(), this.raycaster.params.Line.threshold = 3, this.enable();
42226
+ const s = new Sn(Bi(0.5, 1, Math.random()), Bi(0.5, 1, Math.random()), Bi(0.5, 1, Math.random()));
42227
+ super(), this.name = e, this.lineMaterial = new xu({ color: s }), this.line = new Ls(new bn(), this.lineMaterial), this.line.name = "line", this.line.visible = !1, this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = s, this.draggable = new _r(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new Y(new Xm(1.5), new _n({ color: s })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new Na(), this.raycaster.params.Line.threshold = 3, this.enable();
42228
42228
  }
42229
42229
  enable() {
42230
42230
  document.addEventListener("pointerdown", this.onMouseClick);
@@ -42288,11 +42288,12 @@ class Mh extends _r {
42288
42288
  removeSelectedPt = () => {
42289
42289
  this._transform?.object !== void 0 && this.removePoint(this._transform?.object);
42290
42290
  };
42291
+ updateLastPoint(e) {
42292
+ const t = this.draggable.children.length;
42293
+ t > 0 && (this.draggable.children[t - 1].position.copy(e), this.updateSpline());
42294
+ }
42291
42295
  updateSpline = () => {
42292
- if (this.points.length < 1) return;
42293
- this.curve = new kd(this.points, this.closed, this.curveType, this.tension);
42294
- const e = this.getPoints();
42295
- this.line.geometry.setFromPoints(e), this.curvePos.position.copy(this.getPointAt(this._curvePercentage));
42296
+ this.points.length < 2 || (this.curve = new kd(this.points, this.closed, this.curveType, this.tension), this.line.geometry.dispose(), this.line.geometry = new bn().setFromPoints(this.curve.getPoints(this.subdivide)), this.curvePos.position.copy(this.getPointAt(this._curvePercentage)));
42296
42297
  };
42297
42298
  // Handlers
42298
42299
  onMouseClick = (e) => {
@@ -42309,9 +42310,6 @@ class Mh extends _r {
42309
42310
  getPointAt(e) {
42310
42311
  return this.curve.points.length > 1 ? this.curve.getPointAt(e) : this.curve.points.length === 1 ? this.curve.points[0] : new Z();
42311
42312
  }
42312
- getPoints() {
42313
- return this.curve.points.length > 1 ? this.curve.getPoints(this.subdivide) : this.points;
42314
- }
42315
42313
  getTangentAt(e) {
42316
42314
  return this.curve.getTangentAt(e);
42317
42315
  }
@@ -42415,7 +42413,7 @@ class Mh extends _r {
42415
42413
  prop: "Subdivide",
42416
42414
  type: "range",
42417
42415
  min: 1,
42418
- max: 100,
42416
+ max: 1e3,
42419
42417
  step: 1,
42420
42418
  value: this.subdivide
42421
42419
  },
@@ -42549,10 +42547,6 @@ class kN extends _r {
42549
42547
  this.group = Ne.addEditorGroup({
42550
42548
  title: this.name,
42551
42549
  items: [
42552
- {
42553
- type: "button",
42554
- prop: "New Spline"
42555
- },
42556
42550
  {
42557
42551
  type: "field",
42558
42552
  prop: "Spline Data",
@@ -42563,6 +42557,10 @@ class kN extends _r {
42563
42557
  type: "button",
42564
42558
  prop: "Import Spline"
42565
42559
  },
42560
+ {
42561
+ type: "button",
42562
+ prop: "New Spline"
42563
+ },
42566
42564
  {
42567
42565
  type: "boolean",
42568
42566
  prop: "Show Points",
@@ -42652,14 +42650,15 @@ class kN extends _r {
42652
42650
  const n = new Mh(s, this.camera);
42653
42651
  n.addPoints(i), this.addSpline(n), Ho++;
42654
42652
  };
42653
+ isMouseDown = !1;
42655
42654
  enableClickToDraw() {
42656
42655
  document.querySelectorAll(".clickable").forEach((e) => {
42657
- e.addEventListener("mousedown", this.onClickCanvas);
42656
+ e.addEventListener("mousedown", this.onClickCanvas), e.addEventListener("mousemove", this.onMouseMove), e.addEventListener("mouseup", this.onMouseUp);
42658
42657
  });
42659
42658
  }
42660
42659
  disableClickToDraw() {
42661
42660
  document.querySelectorAll(".clickable").forEach((e) => {
42662
- e.removeEventListener("mousedown", this.onClickCanvas);
42661
+ e.removeEventListener("mousedown", this.onClickCanvas), e.removeEventListener("mousemove", this.onMouseMove), e.removeEventListener("mouseup", this.onMouseUp);
42663
42662
  });
42664
42663
  }
42665
42664
  onClickCanvas = (e) => {
@@ -42668,45 +42667,46 @@ class kN extends _r {
42668
42667
  console.warn("Spline Editor - 3D Camera not supported in Draw Mode");
42669
42668
  return;
42670
42669
  }
42671
- const t = this._camera, s = t.zoom, n = e.target.getBoundingClientRect();
42672
- let r = (e.clientX - n.left) / n.width * 2 - 1, o = -((e.clientY - n.top) / n.height) * 2 + 1;
42670
+ const s = e.target.getBoundingClientRect(), i = (e.clientX - s.left) / s.width * 2 - 1, n = -((e.clientY - s.top) / s.height) * 2 + 1;
42673
42671
  if (ht.instance) {
42674
- const g = new Na();
42675
- g.setFromCamera(new yt(r, o), t);
42676
- const x = g.intersectObjects(ht.instance.helpersContainer.children, !0);
42677
- for (let _ = 0; _ < x.length; _++) {
42678
- const b = x[_];
42679
- if (!(b.object.isLine || b.object.isTransformControlsPlane) && b.object.isObject3D)
42672
+ const o = new Na();
42673
+ o.setFromCamera(new yt(i, n), this._camera);
42674
+ const l = o.intersectObjects(ht.instance.helpersContainer.children, !0);
42675
+ for (let c = 0; c < l.length; c++) {
42676
+ const h = l[c];
42677
+ if (!(h.object.isLine || h.object.isTransformControlsPlane) && h.object.isObject3D)
42680
42678
  return;
42681
42679
  }
42682
42680
  }
42683
- const l = Math.PI / 2, c = t.rotation.x === -6123233995736766e-32 && t.rotation.y === 0 && t.rotation.z === 0, h = t.rotation.x === -Math.PI && t.rotation.y === 12246467991473532e-32 && t.rotation.z === Math.PI, u = t.rotation.x === -6162975822039155e-48 && t.rotation.y === -l && t.rotation.z === 0, d = t.rotation.x === -6162975822039155e-48 && t.rotation.y === l && t.rotation.z === 0, p = t.rotation.x === -1.5707953264174506 && t.rotation.y === 0 && t.rotation.z === 0, f = t.rotation.x === 1.5707953264174506 && t.rotation.y === 0 && t.rotation.z === 0;
42684
- if (!c) {
42685
- if (h)
42686
- r *= -1;
42687
- else if (!u) {
42688
- if (d)
42689
- r *= -1;
42690
- else if (p)
42691
- o *= -1;
42692
- else if (!f) {
42693
- console.warn("Spline Editor - Camera not supported (try 2D-cameras):", this._camera.name);
42694
- return;
42695
- }
42696
- }
42697
- }
42698
- const m = n.width / 2 / s, y = n.height / 2 / s;
42681
+ this.currentSpline === null && (this.currentSpline = this.createSpline());
42682
+ const r = this.mouseToSplinePos(i, n, s.width, s.height);
42683
+ this.currentSpline?.addPoint(r), this.isMouseDown = !0;
42684
+ };
42685
+ onMouseMove = (e) => {
42686
+ if (!this.isMouseDown) return;
42687
+ const s = e.target.getBoundingClientRect(), i = (e.clientX - s.left) / s.width * 2 - 1, n = -((e.clientY - s.top) / s.height) * 2 + 1, r = this.mouseToSplinePos(i, n, s.width, s.height);
42688
+ this.currentSpline?.updateLastPoint(r);
42689
+ };
42690
+ onMouseUp = () => {
42691
+ this.isMouseDown = !1;
42692
+ };
42693
+ mouseToSplinePos(e, t, s, i) {
42694
+ const n = new Z(), r = Math.PI / 2, o = this._camera, l = o.zoom, c = o.rotation.x === -6123233995736766e-32 && o.rotation.y === 0 && o.rotation.z === 0, h = o.rotation.x === -Math.PI && o.rotation.y === 12246467991473532e-32 && o.rotation.z === Math.PI, u = o.rotation.x === -6162975822039155e-48 && o.rotation.y === -r && o.rotation.z === 0, d = o.rotation.x === -6162975822039155e-48 && o.rotation.y === r && o.rotation.z === 0, p = o.rotation.x === -1.5707953264174506 && o.rotation.y === 0 && o.rotation.z === 0, f = o.rotation.x === 1.5707953264174506 && o.rotation.y === 0 && o.rotation.z === 0;
42695
+ let m = e, y = t;
42696
+ h || d ? m *= -1 : p && (y *= -1);
42697
+ const g = s / 2 / l, x = i / 2 / l;
42699
42698
  if (this.currentSpline === null && (this.currentSpline = this.createSpline()), c || h) {
42700
- const g = r * m + t.position.x, x = o * y + t.position.y;
42701
- this.currentSpline?.addPoint(new Z(g, x, 0));
42699
+ const _ = m * g + o.position.x, b = y * x + o.position.y;
42700
+ n.set(_, b, 0);
42702
42701
  } else if (u || d) {
42703
- const g = r * m + t.position.z, x = o * y + t.position.y;
42704
- this.currentSpline?.addPoint(new Z(0, x, g));
42702
+ const _ = m * g + o.position.z, b = y * x + o.position.y;
42703
+ n.set(0, b, _);
42705
42704
  } else if (p || f) {
42706
- const g = r * m + t.position.x, x = o * y + t.position.z;
42707
- this.currentSpline?.addPoint(new Z(g, 0, x));
42705
+ const _ = m * g + o.position.x, b = y * x + o.position.z;
42706
+ n.set(_, 0, b);
42708
42707
  }
42709
- };
42708
+ return n;
42709
+ }
42710
42710
  get camera() {
42711
42711
  return this._camera;
42712
42712
  }
@@ -43543,7 +43543,7 @@ function HN(a, e, t) {
43543
43543
  type: "color",
43544
43544
  value: c,
43545
43545
  onChange: (h, u) => {
43546
- const d = new Tn(u);
43546
+ const d = new Sn(u);
43547
43547
  t.updateObject(a.uuid, h, d);
43548
43548
  const p = t.getScene(a.uuid);
43549
43549
  if (p !== null) {
@@ -43655,7 +43655,7 @@ function WN(a) {
43655
43655
  }
43656
43656
  }
43657
43657
  }
43658
- return Sn(() => () => {
43658
+ return vn(() => () => {
43659
43659
  h !== void 0 && hi(h);
43660
43660
  }, []), /* @__PURE__ */ C.jsx(
43661
43661
  fs,
@@ -43686,7 +43686,7 @@ const fu = {
43686
43686
  let gt = { ...fu };
43687
43687
  function $N(a) {
43688
43688
  const [e, t] = Re(-1);
43689
- Sn(() => {
43689
+ vn(() => {
43690
43690
  function r(l) {
43691
43691
  gt = { ...l.value }, t(Date.now());
43692
43692
  }
@@ -43760,7 +43760,7 @@ class jN extends za {
43760
43760
  autoClearStencil = !0;
43761
43761
  outputColorSpace = Gd;
43762
43762
  localClippingEnabled = !1;
43763
- clearColor = new Tn(0);
43763
+ clearColor = new Sn(0);
43764
43764
  clearAlpha = 1;
43765
43765
  toneMapping = Vd;
43766
43766
  toneMappingExposure = 1;
@@ -43782,7 +43782,7 @@ class jN extends za {
43782
43782
  }
43783
43783
  onAddRenderer = (e) => {
43784
43784
  const t = e.value;
43785
- if (this.autoClear = t.autoClear, this.autoClearColor = t.autoClearColor, this.autoClearDepth = t.autoClearDepth, this.autoClearStencil = t.autoClearStencil, this.outputColorSpace = t.outputColorSpace, this.localClippingEnabled = t.localClippingEnabled, this.clearAlpha = t.clearAlpha, this.type = t.type, this.toneMapping = t.toneMapping, this.toneMappingExposure = t.toneMappingExposure, this.clearColor.setStyle(t.clearColor, Ra), er.enabled = t.colorManagement, ht.instance) {
43785
+ if (this.autoClear = t.autoClear, this.autoClearColor = t.autoClearColor, this.autoClearDepth = t.autoClearDepth, this.autoClearStencil = t.autoClearStencil, this.outputColorSpace = t.outputColorSpace, this.localClippingEnabled = t.localClippingEnabled, this.clearAlpha = t.clearAlpha, this.type = t.type, this.toneMapping = t.toneMapping, this.toneMappingExposure = t.toneMappingExposure, this.clearColor.setStyle(t.clearColor, Ra), tr.enabled = t.colorManagement, ht.instance) {
43786
43786
  const s = ht.instance.renderer;
43787
43787
  s && (s.autoClearColor = this.autoClearColor, s.outputColorSpace = this.outputColorSpace, s.localClippingEnabled = this.localClippingEnabled, s.toneMapping = this.toneMapping, s.toneMappingExposure = this.toneMappingExposure, s.setClearColor(t.clearColor, this.clearAlpha));
43788
43788
  }
@@ -43801,7 +43801,7 @@ class jN extends za {
43801
43801
  localClippingEnabled: this.localClippingEnabled,
43802
43802
  clearAlpha: this.clearAlpha,
43803
43803
  clearColor: this.clearColor.getStyle(),
43804
- colorManagement: er.enabled,
43804
+ colorManagement: tr.enabled,
43805
43805
  toneMapping: this.toneMapping,
43806
43806
  toneMappingExposure: this.toneMappingExposure
43807
43807
  }));
@@ -43876,9 +43876,9 @@ class jN extends za {
43876
43876
  {
43877
43877
  type: "boolean",
43878
43878
  title: "Clear Management",
43879
- value: er.enabled,
43879
+ value: tr.enabled,
43880
43880
  onChange: (t, s) => {
43881
- er.enabled = s, e();
43881
+ tr.enabled = s, e();
43882
43882
  }
43883
43883
  },
43884
43884
  {
@@ -44024,7 +44024,7 @@ function qN(a) {
44024
44024
  return;
44025
44025
  }
44026
44026
  };
44027
- return Sn(() => (a.app.addEventListener(K.ADD_SCENE, n), a.app.addEventListener(K.REFRESH_SCENE, r), a.app.addEventListener(K.REMOVE_SCENE, o), () => {
44027
+ return vn(() => (a.app.addEventListener(K.ADD_SCENE, n), a.app.addEventListener(K.REFRESH_SCENE, r), a.app.addEventListener(K.REMOVE_SCENE, o), () => {
44028
44028
  a.app.removeEventListener(K.ADD_SCENE, n), a.app.removeEventListener(K.REFRESH_SCENE, r), a.app.removeEventListener(K.REMOVE_SCENE, o);
44029
44029
  }), []), /* @__PURE__ */ C.jsxs("div", { id: "SidePanel", children: [
44030
44030
  /* @__PURE__ */ C.jsx("div", { className: "scenes", children: t }, s),
@@ -44034,7 +44034,7 @@ function qN(a) {
44034
44034
  ] });
44035
44035
  }
44036
44036
  function xP(a) {
44037
- return Sn(() => {
44037
+ return vn(() => {
44038
44038
  function e(o) {
44039
44039
  let l = null;
44040
44040
  return a.three.scenes.forEach((c) => {