shaders 2.0.669 → 2.0.670

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.
@@ -2,7 +2,7 @@ var SL = Object.defineProperty;
2
2
  var ML = (t, e, r) => e in t ? SL(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var Ly = (t, e, r) => ML(t, typeof e != "symbol" ? e + "" : e, r);
4
4
  import { jsxs as _L, jsx as ze } from "react/jsx-runtime";
5
- import { createContext as NL, useRef as Re, useMemo as k, useEffect as $, useContext as Be } from "react";
5
+ import { createContext as NL, useRef as Re, useMemo as B, useEffect as $, useContext as Be } from "react";
6
6
  var AL = Object.defineProperty, CL = (t, e) => {
7
7
  for (var r in e) AL(t, r, {
8
8
  get: e[r],
@@ -408,10 +408,10 @@ var Qe = class LN {
408
408
  return;
409
409
  }
410
410
  if (c !== f || l !== d || h !== m || u !== p) {
411
- let g = 1 - o, y = l * d + h * m + u * p + c * f, v = y >= 0 ? 1 : -1, S = 1 - y * y;
412
- if (S > 2 ** -52) {
413
- let M = Math.sqrt(S), w = Math.atan2(M, y * v);
414
- g = Math.sin(g * w) / M, o = Math.sin(o * w) / M;
411
+ let g = 1 - o, y = l * d + h * m + u * p + c * f, v = y >= 0 ? 1 : -1, w = 1 - y * y;
412
+ if (w > 2 ** -52) {
413
+ let M = Math.sqrt(w), S = Math.atan2(M, y * v);
414
+ g = Math.sin(g * S) / M, o = Math.sin(o * S) / M;
415
415
  }
416
416
  let T = o * v;
417
417
  if (l = l * g + d * T, h = h * g + m * T, u = u * g + p * T, c = c * g + f * T, g === 1 - o) {
@@ -899,8 +899,8 @@ var Ys = class zN {
899
899
  return this.multiplyMatrices(e, this);
900
900
  }
901
901
  multiplyMatrices(e, r) {
902
- let i = e.elements, s = r.elements, n = this.elements, a = i[0], o = i[3], l = i[6], h = i[1], u = i[4], c = i[7], d = i[2], m = i[5], p = i[8], f = s[0], g = s[3], y = s[6], v = s[1], S = s[4], T = s[7], M = s[2], w = s[5], _ = s[8];
903
- return n[0] = a * f + o * v + l * M, n[3] = a * g + o * S + l * w, n[6] = a * y + o * T + l * _, n[1] = h * f + u * v + c * M, n[4] = h * g + u * S + c * w, n[7] = h * y + u * T + c * _, n[2] = d * f + m * v + p * M, n[5] = d * g + m * S + p * w, n[8] = d * y + m * T + p * _, this;
902
+ let i = e.elements, s = r.elements, n = this.elements, a = i[0], o = i[3], l = i[6], h = i[1], u = i[4], c = i[7], d = i[2], m = i[5], p = i[8], f = s[0], g = s[3], y = s[6], v = s[1], w = s[4], T = s[7], M = s[2], S = s[5], N = s[8];
903
+ return n[0] = a * f + o * v + l * M, n[3] = a * g + o * w + l * S, n[6] = a * y + o * T + l * N, n[1] = h * f + u * v + c * M, n[4] = h * g + u * w + c * S, n[7] = h * y + u * T + c * N, n[2] = d * f + m * v + p * M, n[5] = d * g + m * w + p * S, n[8] = d * y + m * T + p * N, this;
904
904
  }
905
905
  multiplyScalar(e) {
906
906
  let r = this.elements;
@@ -1381,8 +1381,8 @@ var nt = class kN {
1381
1381
  if (Math.abs(u - d) < a && Math.abs(c - f) < a && Math.abs(p - g) < a) {
1382
1382
  if (Math.abs(u + d) < o && Math.abs(c + f) < o && Math.abs(p + g) < o && Math.abs(h + m + y - 3) < o) return this.set(1, 0, 0, 0), this;
1383
1383
  r = Math.PI;
1384
- let S = (h + 1) / 2, T = (m + 1) / 2, M = (y + 1) / 2, w = (u + d) / 4, _ = (c + f) / 4, A = (p + g) / 4;
1385
- return S > T && S > M ? S < a ? (i = 0, s = 0.707106781, n = 0.707106781) : (i = Math.sqrt(S), s = w / i, n = _ / i) : T > M ? T < a ? (i = 0.707106781, s = 0, n = 0.707106781) : (s = Math.sqrt(T), i = w / s, n = A / s) : M < a ? (i = 0.707106781, s = 0.707106781, n = 0) : (n = Math.sqrt(M), i = _ / n, s = A / n), this.set(i, s, n, r), this;
1384
+ let w = (h + 1) / 2, T = (m + 1) / 2, M = (y + 1) / 2, S = (u + d) / 4, N = (c + f) / 4, A = (p + g) / 4;
1385
+ return w > T && w > M ? w < a ? (i = 0, s = 0.707106781, n = 0.707106781) : (i = Math.sqrt(w), s = S / i, n = N / i) : T > M ? T < a ? (i = 0.707106781, s = 0, n = 0.707106781) : (s = Math.sqrt(T), i = S / s, n = A / s) : M < a ? (i = 0.707106781, s = 0.707106781, n = 0) : (n = Math.sqrt(M), i = N / n, s = A / n), this.set(i, s, n, r), this;
1386
1386
  }
1387
1387
  let v = Math.sqrt((g - p) * (g - p) + (c - f) * (c - f) + (d - u) * (d - u));
1388
1388
  return Math.abs(v) < 1e-3 && (v = 1), this.x = (g - p) / v, this.y = (c - f) / v, this.z = (d - u) / v, this.w = Math.acos((h + m + y - 1) / 2), this;
@@ -2014,8 +2014,8 @@ var QL = class {
2014
2014
  return this.multiplyMatrices(e, this);
2015
2015
  }
2016
2016
  multiplyMatrices(e, r) {
2017
- let i = e.elements, s = r.elements, n = this.elements, a = i[0], o = i[4], l = i[8], h = i[12], u = i[1], c = i[5], d = i[9], m = i[13], p = i[2], f = i[6], g = i[10], y = i[14], v = i[3], S = i[7], T = i[11], M = i[15], w = s[0], _ = s[4], A = s[8], B = s[12], ee = s[1], K = s[5], ie = s[9], se = s[13], ne = s[2], Te = s[6], pe = s[10], _e = s[14], xe = s[3], we = s[7], ye = s[11], ve = s[15];
2018
- return n[0] = a * w + o * ee + l * ne + h * xe, n[4] = a * _ + o * K + l * Te + h * we, n[8] = a * A + o * ie + l * pe + h * ye, n[12] = a * B + o * se + l * _e + h * ve, n[1] = u * w + c * ee + d * ne + m * xe, n[5] = u * _ + c * K + d * Te + m * we, n[9] = u * A + c * ie + d * pe + m * ye, n[13] = u * B + c * se + d * _e + m * ve, n[2] = p * w + f * ee + g * ne + y * xe, n[6] = p * _ + f * K + g * Te + y * we, n[10] = p * A + f * ie + g * pe + y * ye, n[14] = p * B + f * se + g * _e + y * ve, n[3] = v * w + S * ee + T * ne + M * xe, n[7] = v * _ + S * K + T * Te + M * we, n[11] = v * A + S * ie + T * pe + M * ye, n[15] = v * B + S * se + T * _e + M * ve, this;
2017
+ let i = e.elements, s = r.elements, n = this.elements, a = i[0], o = i[4], l = i[8], h = i[12], u = i[1], c = i[5], d = i[9], m = i[13], p = i[2], f = i[6], g = i[10], y = i[14], v = i[3], w = i[7], T = i[11], M = i[15], S = s[0], N = s[4], A = s[8], U = s[12], ee = s[1], K = s[5], ie = s[9], se = s[13], ne = s[2], Te = s[6], pe = s[10], _e = s[14], xe = s[3], we = s[7], ye = s[11], ve = s[15];
2018
+ return n[0] = a * S + o * ee + l * ne + h * xe, n[4] = a * N + o * K + l * Te + h * we, n[8] = a * A + o * ie + l * pe + h * ye, n[12] = a * U + o * se + l * _e + h * ve, n[1] = u * S + c * ee + d * ne + m * xe, n[5] = u * N + c * K + d * Te + m * we, n[9] = u * A + c * ie + d * pe + m * ye, n[13] = u * U + c * se + d * _e + m * ve, n[2] = p * S + f * ee + g * ne + y * xe, n[6] = p * N + f * K + g * Te + y * we, n[10] = p * A + f * ie + g * pe + y * ye, n[14] = p * U + f * se + g * _e + y * ve, n[3] = v * S + w * ee + T * ne + M * xe, n[7] = v * N + w * K + T * Te + M * we, n[11] = v * A + w * ie + T * pe + M * ye, n[15] = v * U + w * se + T * _e + M * ve, this;
2019
2019
  }
2020
2020
  multiplyScalar(e) {
2021
2021
  let r = this.elements;
@@ -2034,10 +2034,10 @@ var QL = class {
2034
2034
  return e.isVector3 ? (s[12] = e.x, s[13] = e.y, s[14] = e.z) : (s[12] = e, s[13] = r, s[14] = i), this;
2035
2035
  }
2036
2036
  invert() {
2037
- let e = this.elements, r = e[0], i = e[1], s = e[2], n = e[3], a = e[4], o = e[5], l = e[6], h = e[7], u = e[8], c = e[9], d = e[10], m = e[11], p = e[12], f = e[13], g = e[14], y = e[15], v = c * g * h - f * d * h + f * l * m - o * g * m - c * l * y + o * d * y, S = p * d * h - u * g * h - p * l * m + a * g * m + u * l * y - a * d * y, T = u * f * h - p * c * h + p * o * m - a * f * m - u * o * y + a * c * y, M = p * c * l - u * f * l - p * o * d + a * f * d + u * o * g - a * c * g, w = r * v + i * S + s * T + n * M;
2038
- if (w === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
2039
- let _ = 1 / w;
2040
- return e[0] = v * _, e[1] = (f * d * n - c * g * n - f * s * m + i * g * m + c * s * y - i * d * y) * _, e[2] = (o * g * n - f * l * n + f * s * h - i * g * h - o * s * y + i * l * y) * _, e[3] = (c * l * n - o * d * n - c * s * h + i * d * h + o * s * m - i * l * m) * _, e[4] = S * _, e[5] = (u * g * n - p * d * n + p * s * m - r * g * m - u * s * y + r * d * y) * _, e[6] = (p * l * n - a * g * n - p * s * h + r * g * h + a * s * y - r * l * y) * _, e[7] = (a * d * n - u * l * n + u * s * h - r * d * h - a * s * m + r * l * m) * _, e[8] = T * _, e[9] = (p * c * n - u * f * n - p * i * m + r * f * m + u * i * y - r * c * y) * _, e[10] = (a * f * n - p * o * n + p * i * h - r * f * h - a * i * y + r * o * y) * _, e[11] = (u * o * n - a * c * n - u * i * h + r * c * h + a * i * m - r * o * m) * _, e[12] = M * _, e[13] = (u * f * s - p * c * s + p * i * d - r * f * d - u * i * g + r * c * g) * _, e[14] = (p * o * s - a * f * s - p * i * l + r * f * l + a * i * g - r * o * g) * _, e[15] = (a * c * s - u * o * s + u * i * l - r * c * l - a * i * d + r * o * d) * _, this;
2037
+ let e = this.elements, r = e[0], i = e[1], s = e[2], n = e[3], a = e[4], o = e[5], l = e[6], h = e[7], u = e[8], c = e[9], d = e[10], m = e[11], p = e[12], f = e[13], g = e[14], y = e[15], v = c * g * h - f * d * h + f * l * m - o * g * m - c * l * y + o * d * y, w = p * d * h - u * g * h - p * l * m + a * g * m + u * l * y - a * d * y, T = u * f * h - p * c * h + p * o * m - a * f * m - u * o * y + a * c * y, M = p * c * l - u * f * l - p * o * d + a * f * d + u * o * g - a * c * g, S = r * v + i * w + s * T + n * M;
2038
+ if (S === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
2039
+ let N = 1 / S;
2040
+ return e[0] = v * N, e[1] = (f * d * n - c * g * n - f * s * m + i * g * m + c * s * y - i * d * y) * N, e[2] = (o * g * n - f * l * n + f * s * h - i * g * h - o * s * y + i * l * y) * N, e[3] = (c * l * n - o * d * n - c * s * h + i * d * h + o * s * m - i * l * m) * N, e[4] = w * N, e[5] = (u * g * n - p * d * n + p * s * m - r * g * m - u * s * y + r * d * y) * N, e[6] = (p * l * n - a * g * n - p * s * h + r * g * h + a * s * y - r * l * y) * N, e[7] = (a * d * n - u * l * n + u * s * h - r * d * h - a * s * m + r * l * m) * N, e[8] = T * N, e[9] = (p * c * n - u * f * n - p * i * m + r * f * m + u * i * y - r * c * y) * N, e[10] = (a * f * n - p * o * n + p * i * h - r * f * h - a * i * y + r * o * y) * N, e[11] = (u * o * n - a * c * n - u * i * h + r * c * h + a * i * m - r * o * m) * N, e[12] = M * N, e[13] = (u * f * s - p * c * s + p * i * d - r * f * d - u * i * g + r * c * g) * N, e[14] = (p * o * s - a * f * s - p * i * l + r * f * l + a * i * g - r * o * g) * N, e[15] = (a * c * s - u * o * s + u * i * l - r * c * l - a * i * d + r * o * d) * N, this;
2041
2041
  }
2042
2042
  scale(e) {
2043
2043
  let r = this.elements, i = e.x, s = e.y, n = e.z;
@@ -2073,8 +2073,8 @@ var QL = class {
2073
2073
  return this.set(1, i, n, 0, e, 1, a, 0, r, s, 1, 0, 0, 0, 0, 1), this;
2074
2074
  }
2075
2075
  compose(e, r, i) {
2076
- let s = this.elements, n = r._x, a = r._y, o = r._z, l = r._w, h = n + n, u = a + a, c = o + o, d = n * h, m = n * u, p = n * c, f = a * u, g = a * c, y = o * c, v = l * h, S = l * u, T = l * c, M = i.x, w = i.y, _ = i.z;
2077
- return s[0] = (1 - (f + y)) * M, s[1] = (m + T) * M, s[2] = (p - S) * M, s[3] = 0, s[4] = (m - T) * w, s[5] = (1 - (d + y)) * w, s[6] = (g + v) * w, s[7] = 0, s[8] = (p + S) * _, s[9] = (g - v) * _, s[10] = (1 - (d + f)) * _, s[11] = 0, s[12] = e.x, s[13] = e.y, s[14] = e.z, s[15] = 1, this;
2076
+ let s = this.elements, n = r._x, a = r._y, o = r._z, l = r._w, h = n + n, u = a + a, c = o + o, d = n * h, m = n * u, p = n * c, f = a * u, g = a * c, y = o * c, v = l * h, w = l * u, T = l * c, M = i.x, S = i.y, N = i.z;
2077
+ return s[0] = (1 - (f + y)) * M, s[1] = (m + T) * M, s[2] = (p - w) * M, s[3] = 0, s[4] = (m - T) * S, s[5] = (1 - (d + y)) * S, s[6] = (g + v) * S, s[7] = 0, s[8] = (p + w) * N, s[9] = (g - v) * N, s[10] = (1 - (d + f)) * N, s[11] = 0, s[12] = e.x, s[13] = e.y, s[14] = e.z, s[15] = 1, this;
2078
2078
  }
2079
2079
  decompose(e, r, i) {
2080
2080
  let s = this.elements, n = th.set(s[0], s[1], s[2]).length(), a = th.set(s[4], s[5], s[6]).length(), o = th.set(s[8], s[9], s[10]).length();
@@ -3380,31 +3380,31 @@ var Fu = class WN extends $o {
3380
3380
  let a = this.getAttribute("tangent"), o = [], l = [];
3381
3381
  for (let A = 0; A < i.count; A++) o[A] = new L(), l[A] = new L();
3382
3382
  let h = new L(), u = new L(), c = new L(), d = new Qe(), m = new Qe(), p = new Qe(), f = new L(), g = new L();
3383
- function y(A, B, ee) {
3384
- h.fromBufferAttribute(i, A), u.fromBufferAttribute(i, B), c.fromBufferAttribute(i, ee), d.fromBufferAttribute(n, A), m.fromBufferAttribute(n, B), p.fromBufferAttribute(n, ee), u.sub(h), c.sub(h), m.sub(d), p.sub(d);
3383
+ function y(A, U, ee) {
3384
+ h.fromBufferAttribute(i, A), u.fromBufferAttribute(i, U), c.fromBufferAttribute(i, ee), d.fromBufferAttribute(n, A), m.fromBufferAttribute(n, U), p.fromBufferAttribute(n, ee), u.sub(h), c.sub(h), m.sub(d), p.sub(d);
3385
3385
  let K = 1 / (m.x * p.y - p.x * m.y);
3386
- isFinite(K) && (f.copy(u).multiplyScalar(p.y).addScaledVector(c, -m.y).multiplyScalar(K), g.copy(c).multiplyScalar(m.x).addScaledVector(u, -p.x).multiplyScalar(K), o[A].add(f), o[B].add(f), o[ee].add(f), l[A].add(g), l[B].add(g), l[ee].add(g));
3386
+ isFinite(K) && (f.copy(u).multiplyScalar(p.y).addScaledVector(c, -m.y).multiplyScalar(K), g.copy(c).multiplyScalar(m.x).addScaledVector(u, -p.x).multiplyScalar(K), o[A].add(f), o[U].add(f), o[ee].add(f), l[A].add(g), l[U].add(g), l[ee].add(g));
3387
3387
  }
3388
3388
  let v = this.groups;
3389
3389
  v.length === 0 && (v = [{
3390
3390
  start: 0,
3391
3391
  count: e.count
3392
3392
  }]);
3393
- for (let A = 0, B = v.length; A < B; ++A) {
3393
+ for (let A = 0, U = v.length; A < U; ++A) {
3394
3394
  let ee = v[A], K = ee.start, ie = ee.count;
3395
3395
  for (let se = K, ne = K + ie; se < ne; se += 3) y(e.getX(se + 0), e.getX(se + 1), e.getX(se + 2));
3396
3396
  }
3397
- let S = new L(), T = new L(), M = new L(), w = new L();
3398
- function _(A) {
3399
- M.fromBufferAttribute(s, A), w.copy(M);
3400
- let B = o[A];
3401
- S.copy(B), S.sub(M.multiplyScalar(M.dot(B))).normalize(), T.crossVectors(w, B);
3397
+ let w = new L(), T = new L(), M = new L(), S = new L();
3398
+ function N(A) {
3399
+ M.fromBufferAttribute(s, A), S.copy(M);
3400
+ let U = o[A];
3401
+ w.copy(U), w.sub(M.multiplyScalar(M.dot(U))).normalize(), T.crossVectors(S, U);
3402
3402
  let ee = T.dot(l[A]), K = ee < 0 ? -1 : 1;
3403
- a.setXYZW(A, S.x, S.y, S.z, K);
3403
+ a.setXYZW(A, w.x, w.y, w.z, K);
3404
3404
  }
3405
- for (let A = 0, B = v.length; A < B; ++A) {
3405
+ for (let A = 0, U = v.length; A < U; ++A) {
3406
3406
  let ee = v[A], K = ee.start, ie = ee.count;
3407
- for (let se = K, ne = K + ie; se < ne; se += 3) _(e.getX(se + 0)), _(e.getX(se + 1)), _(e.getX(se + 2));
3407
+ for (let se = K, ne = K + ie; se < ne; se += 3) N(e.getX(se + 0)), N(e.getX(se + 1)), N(e.getX(se + 2));
3408
3408
  }
3409
3409
  }
3410
3410
  computeVertexNormals() {
@@ -3572,31 +3572,31 @@ var jn = class extends Ti {
3572
3572
  _computeIntersections(e, r, i) {
3573
3573
  let s, n = this.geometry, a = this.material, o = n.index, l = n.attributes.position, h = n.attributes.uv, u = n.attributes.uv1, c = n.attributes.normal, d = n.groups, m = n.drawRange;
3574
3574
  if (o !== null) if (Array.isArray(a)) for (let p = 0, f = d.length; p < f; p++) {
3575
- let g = d[p], y = a[g.materialIndex], v = Math.max(g.start, m.start), S = Math.min(o.count, Math.min(g.start + g.count, m.start + m.count));
3576
- for (let T = v, M = S; T < M; T += 3) {
3577
- let w = o.getX(T), _ = o.getX(T + 1), A = o.getX(T + 2);
3578
- s = pp(this, y, e, i, h, u, c, w, _, A), s && (s.faceIndex = Math.floor(T / 3), s.face.materialIndex = g.materialIndex, r.push(s));
3575
+ let g = d[p], y = a[g.materialIndex], v = Math.max(g.start, m.start), w = Math.min(o.count, Math.min(g.start + g.count, m.start + m.count));
3576
+ for (let T = v, M = w; T < M; T += 3) {
3577
+ let S = o.getX(T), N = o.getX(T + 1), A = o.getX(T + 2);
3578
+ s = pp(this, y, e, i, h, u, c, S, N, A), s && (s.faceIndex = Math.floor(T / 3), s.face.materialIndex = g.materialIndex, r.push(s));
3579
3579
  }
3580
3580
  }
3581
3581
  else {
3582
3582
  let p = Math.max(0, m.start), f = Math.min(o.count, m.start + m.count);
3583
3583
  for (let g = p, y = f; g < y; g += 3) {
3584
- let v = o.getX(g), S = o.getX(g + 1), T = o.getX(g + 2);
3585
- s = pp(this, a, e, i, h, u, c, v, S, T), s && (s.faceIndex = Math.floor(g / 3), r.push(s));
3584
+ let v = o.getX(g), w = o.getX(g + 1), T = o.getX(g + 2);
3585
+ s = pp(this, a, e, i, h, u, c, v, w, T), s && (s.faceIndex = Math.floor(g / 3), r.push(s));
3586
3586
  }
3587
3587
  }
3588
3588
  else if (l !== void 0) if (Array.isArray(a)) for (let p = 0, f = d.length; p < f; p++) {
3589
- let g = d[p], y = a[g.materialIndex], v = Math.max(g.start, m.start), S = Math.min(l.count, Math.min(g.start + g.count, m.start + m.count));
3590
- for (let T = v, M = S; T < M; T += 3) {
3591
- let w = T, _ = T + 1, A = T + 2;
3592
- s = pp(this, y, e, i, h, u, c, w, _, A), s && (s.faceIndex = Math.floor(T / 3), s.face.materialIndex = g.materialIndex, r.push(s));
3589
+ let g = d[p], y = a[g.materialIndex], v = Math.max(g.start, m.start), w = Math.min(l.count, Math.min(g.start + g.count, m.start + m.count));
3590
+ for (let T = v, M = w; T < M; T += 3) {
3591
+ let S = T, N = T + 1, A = T + 2;
3592
+ s = pp(this, y, e, i, h, u, c, S, N, A), s && (s.faceIndex = Math.floor(T / 3), s.face.materialIndex = g.materialIndex, r.push(s));
3593
3593
  }
3594
3594
  }
3595
3595
  else {
3596
3596
  let p = Math.max(0, m.start), f = Math.min(l.count, m.start + m.count);
3597
3597
  for (let g = p, y = f; g < y; g += 3) {
3598
- let v = g, S = g + 1, T = g + 2;
3599
- s = pp(this, a, e, i, h, u, c, v, S, T), s && (s.faceIndex = Math.floor(g / 3), r.push(s));
3598
+ let v = g, w = g + 1, T = g + 2;
3599
+ s = pp(this, a, e, i, h, u, c, v, w, T), s && (s.faceIndex = Math.floor(g / 3), r.push(s));
3600
3600
  }
3601
3601
  }
3602
3602
  }
@@ -3643,20 +3643,20 @@ var w1 = class HN extends Fu {
3643
3643
  s = Math.floor(s), n = Math.floor(n), a = Math.floor(a);
3644
3644
  let l = [], h = [], u = [], c = [], d = 0, m = 0;
3645
3645
  p("z", "y", "x", -1, -1, i, r, e, a, n, 0), p("z", "y", "x", 1, -1, i, r, -e, a, n, 1), p("x", "z", "y", 1, 1, e, i, r, s, a, 2), p("x", "z", "y", 1, -1, e, i, -r, s, a, 3), p("x", "y", "z", 1, -1, e, r, i, s, n, 4), p("x", "y", "z", -1, -1, e, r, -i, s, n, 5), this.setIndex(l), this.setAttribute("position", new Bi(h, 3)), this.setAttribute("normal", new Bi(u, 3)), this.setAttribute("uv", new Bi(c, 2));
3646
- function p(f, g, y, v, S, T, M, w, _, A, B) {
3647
- let ee = T / _, K = M / A, ie = T / 2, se = M / 2, ne = w / 2, Te = _ + 1, pe = A + 1, _e = 0, xe = 0, we = new L();
3646
+ function p(f, g, y, v, w, T, M, S, N, A, U) {
3647
+ let ee = T / N, K = M / A, ie = T / 2, se = M / 2, ne = S / 2, Te = N + 1, pe = A + 1, _e = 0, xe = 0, we = new L();
3648
3648
  for (let ye = 0; ye < pe; ye++) {
3649
3649
  let ve = ye * K - se;
3650
3650
  for (let et = 0; et < Te; et++) {
3651
3651
  let _t = et * ee - ie;
3652
- we[f] = _t * v, we[g] = ve * S, we[y] = ne, h.push(we.x, we.y, we.z), we[f] = 0, we[g] = 0, we[y] = w > 0 ? 1 : -1, u.push(we.x, we.y, we.z), c.push(et / _), c.push(1 - ye / A), _e += 1;
3652
+ we[f] = _t * v, we[g] = ve * w, we[y] = ne, h.push(we.x, we.y, we.z), we[f] = 0, we[g] = 0, we[y] = S > 0 ? 1 : -1, u.push(we.x, we.y, we.z), c.push(et / N), c.push(1 - ye / A), _e += 1;
3653
3653
  }
3654
3654
  }
3655
- for (let ye = 0; ye < A; ye++) for (let ve = 0; ve < _; ve++) {
3655
+ for (let ye = 0; ye < A; ye++) for (let ve = 0; ve < N; ve++) {
3656
3656
  let et = d + ve + Te * ye, _t = d + ve + Te * (ye + 1), Dt = d + (ve + 1) + Te * (ye + 1), Ye = d + (ve + 1) + Te * ye;
3657
3657
  l.push(et, _t, Ye), l.push(_t, Dt, Ye), xe += 6;
3658
3658
  }
3659
- o.addGroup(m, xe, B), m += xe, d += _e;
3659
+ o.addGroup(m, xe, U), m += xe, d += _e;
3660
3660
  }
3661
3661
  }
3662
3662
  copy(e) {
@@ -4280,9 +4280,9 @@ var M1 = class {
4280
4280
  return this;
4281
4281
  }
4282
4282
  setFromProjectionMatrix(e, r = Wi) {
4283
- let i = this.planes, s = e.elements, n = s[0], a = s[1], o = s[2], l = s[3], h = s[4], u = s[5], c = s[6], d = s[7], m = s[8], p = s[9], f = s[10], g = s[11], y = s[12], v = s[13], S = s[14], T = s[15];
4284
- if (i[0].setComponents(l - n, d - h, g - m, T - y).normalize(), i[1].setComponents(l + n, d + h, g + m, T + y).normalize(), i[2].setComponents(l + a, d + u, g + p, T + v).normalize(), i[3].setComponents(l - a, d - u, g - p, T - v).normalize(), i[4].setComponents(l - o, d - c, g - f, T - S).normalize(), r === Wi) i[5].setComponents(l + o, d + c, g + f, T + S).normalize();
4285
- else if (r === $n) i[5].setComponents(o, c, f, S).normalize();
4283
+ let i = this.planes, s = e.elements, n = s[0], a = s[1], o = s[2], l = s[3], h = s[4], u = s[5], c = s[6], d = s[7], m = s[8], p = s[9], f = s[10], g = s[11], y = s[12], v = s[13], w = s[14], T = s[15];
4284
+ if (i[0].setComponents(l - n, d - h, g - m, T - y).normalize(), i[1].setComponents(l + n, d + h, g + m, T + y).normalize(), i[2].setComponents(l + a, d + u, g + p, T + v).normalize(), i[3].setComponents(l - a, d - u, g - p, T - v).normalize(), i[4].setComponents(l - o, d - c, g - f, T - w).normalize(), r === Wi) i[5].setComponents(l + o, d + c, g + f, T + w).normalize();
4285
+ else if (r === $n) i[5].setComponents(o, c, f, w).normalize();
4286
4286
  else throw Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: " + r);
4287
4287
  return this;
4288
4288
  }
@@ -4421,30 +4421,30 @@ var MF = class JN {
4421
4421
  let h = this;
4422
4422
  s = Math.floor(s), n = Math.floor(n);
4423
4423
  let u = [], c = [], d = [], m = [], p = 0, f = [], g = i / 2, y = 0;
4424
- v(), a === !1 && (e > 0 && S(!0), r > 0 && S(!1)), this.setIndex(u), this.setAttribute("position", new Bi(c, 3)), this.setAttribute("normal", new Bi(d, 3)), this.setAttribute("uv", new Bi(m, 2));
4424
+ v(), a === !1 && (e > 0 && w(!0), r > 0 && w(!1)), this.setIndex(u), this.setAttribute("position", new Bi(c, 3)), this.setAttribute("normal", new Bi(d, 3)), this.setAttribute("uv", new Bi(m, 2));
4425
4425
  function v() {
4426
- let T = new L(), M = new L(), w = 0, _ = (r - e) / i;
4426
+ let T = new L(), M = new L(), S = 0, N = (r - e) / i;
4427
4427
  for (let A = 0; A <= n; A++) {
4428
- let B = [], ee = A / n, K = ee * (r - e) + e;
4428
+ let U = [], ee = A / n, K = ee * (r - e) + e;
4429
4429
  for (let ie = 0; ie <= s; ie++) {
4430
4430
  let se = ie / s, ne = se * l + o, Te = Math.sin(ne), pe = Math.cos(ne);
4431
- M.x = K * Te, M.y = -ee * i + g, M.z = K * pe, c.push(M.x, M.y, M.z), T.set(Te, _, pe).normalize(), d.push(T.x, T.y, T.z), m.push(se, 1 - ee), B.push(p++);
4431
+ M.x = K * Te, M.y = -ee * i + g, M.z = K * pe, c.push(M.x, M.y, M.z), T.set(Te, N, pe).normalize(), d.push(T.x, T.y, T.z), m.push(se, 1 - ee), U.push(p++);
4432
4432
  }
4433
- f.push(B);
4433
+ f.push(U);
4434
4434
  }
4435
- for (let A = 0; A < s; A++) for (let B = 0; B < n; B++) {
4436
- let ee = f[B][A], K = f[B + 1][A], ie = f[B + 1][A + 1], se = f[B][A + 1];
4437
- (e > 0 || B !== 0) && (u.push(ee, K, se), w += 3), (r > 0 || B !== n - 1) && (u.push(K, ie, se), w += 3);
4435
+ for (let A = 0; A < s; A++) for (let U = 0; U < n; U++) {
4436
+ let ee = f[U][A], K = f[U + 1][A], ie = f[U + 1][A + 1], se = f[U][A + 1];
4437
+ (e > 0 || U !== 0) && (u.push(ee, K, se), S += 3), (r > 0 || U !== n - 1) && (u.push(K, ie, se), S += 3);
4438
4438
  }
4439
- h.addGroup(y, w, 0), y += w;
4439
+ h.addGroup(y, S, 0), y += S;
4440
4440
  }
4441
- function S(T) {
4442
- let M = p, w = new Qe(), _ = new L(), A = 0, B = T === !0 ? e : r, ee = T === !0 ? 1 : -1;
4441
+ function w(T) {
4442
+ let M = p, S = new Qe(), N = new L(), A = 0, U = T === !0 ? e : r, ee = T === !0 ? 1 : -1;
4443
4443
  for (let ie = 1; ie <= s; ie++) c.push(0, g * ee, 0), d.push(0, ee, 0), m.push(0.5, 0.5), p++;
4444
4444
  let K = p;
4445
4445
  for (let ie = 0; ie <= s; ie++) {
4446
4446
  let se = ie / s, ne = se * l + o, Te = Math.cos(ne), pe = Math.sin(ne);
4447
- _.x = B * pe, _.y = g * ee, _.z = B * Te, c.push(_.x, _.y, _.z), d.push(0, ee, 0), w.x = Te * 0.5 + 0.5, w.y = pe * 0.5 * ee + 0.5, m.push(w.x, w.y), p++;
4447
+ N.x = U * pe, N.y = g * ee, N.z = U * Te, c.push(N.x, N.y, N.z), d.push(0, ee, 0), S.x = Te * 0.5 + 0.5, S.y = pe * 0.5 * ee + 0.5, m.push(S.x, S.y), p++;
4448
4448
  }
4449
4449
  for (let ie = 0; ie < s; ie++) {
4450
4450
  let se = M + ie, ne = K + ie;
@@ -4470,14 +4470,14 @@ var MF = class JN {
4470
4470
  let n = e / 2, a = r / 2, o = Math.floor(i), l = Math.floor(s), h = o + 1, u = l + 1, c = e / o, d = r / l, m = [], p = [], f = [], g = [];
4471
4471
  for (let y = 0; y < u; y++) {
4472
4472
  let v = y * d - a;
4473
- for (let S = 0; S < h; S++) {
4474
- let T = S * c - n;
4475
- p.push(T, -v, 0), f.push(0, 0, 1), g.push(S / o), g.push(1 - y / l);
4473
+ for (let w = 0; w < h; w++) {
4474
+ let T = w * c - n;
4475
+ p.push(T, -v, 0), f.push(0, 0, 1), g.push(w / o), g.push(1 - y / l);
4476
4476
  }
4477
4477
  }
4478
4478
  for (let y = 0; y < l; y++) for (let v = 0; v < o; v++) {
4479
- let S = v + h * y, T = v + h * (y + 1), M = v + 1 + h * (y + 1), w = v + 1 + h * y;
4480
- m.push(S, T, w), m.push(T, M, w);
4479
+ let w = v + h * y, T = v + h * (y + 1), M = v + 1 + h * (y + 1), S = v + 1 + h * y;
4480
+ m.push(w, T, S), m.push(T, M, S);
4481
4481
  }
4482
4482
  this.setIndex(m), this.setAttribute("position", new Bi(p, 3)), this.setAttribute("normal", new Bi(f, 3)), this.setAttribute("uv", new Bi(g, 2));
4483
4483
  }
@@ -4500,17 +4500,17 @@ var MF = class JN {
4500
4500
  }, r = Math.max(3, Math.floor(r)), i = Math.max(2, Math.floor(i));
4501
4501
  let l = Math.min(a + o, Math.PI), h = 0, u = [], c = new L(), d = new L(), m = [], p = [], f = [], g = [];
4502
4502
  for (let y = 0; y <= i; y++) {
4503
- let v = [], S = y / i, T = 0;
4503
+ let v = [], w = y / i, T = 0;
4504
4504
  y === 0 && a === 0 ? T = 0.5 / r : y === i && l === Math.PI && (T = -0.5 / r);
4505
4505
  for (let M = 0; M <= r; M++) {
4506
- let w = M / r;
4507
- c.x = -e * Math.cos(s + w * n) * Math.sin(a + S * o), c.y = e * Math.cos(a + S * o), c.z = e * Math.sin(s + w * n) * Math.sin(a + S * o), p.push(c.x, c.y, c.z), d.copy(c).normalize(), f.push(d.x, d.y, d.z), g.push(w + T, 1 - S), v.push(h++);
4506
+ let S = M / r;
4507
+ c.x = -e * Math.cos(s + S * n) * Math.sin(a + w * o), c.y = e * Math.cos(a + w * o), c.z = e * Math.sin(s + S * n) * Math.sin(a + w * o), p.push(c.x, c.y, c.z), d.copy(c).normalize(), f.push(d.x, d.y, d.z), g.push(S + T, 1 - w), v.push(h++);
4508
4508
  }
4509
4509
  u.push(v);
4510
4510
  }
4511
4511
  for (let y = 0; y < i; y++) for (let v = 0; v < r; v++) {
4512
- let S = u[y][v + 1], T = u[y][v], M = u[y + 1][v], w = u[y + 1][v + 1];
4513
- (y !== 0 || a > 0) && m.push(S, T, w), (y !== i - 1 || l < Math.PI) && m.push(T, M, w);
4512
+ let w = u[y][v + 1], T = u[y][v], M = u[y + 1][v], S = u[y + 1][v + 1];
4513
+ (y !== 0 || a > 0) && m.push(w, T, S), (y !== i - 1 || l < Math.PI) && m.push(T, M, S);
4514
4514
  }
4515
4515
  this.setIndex(m), this.setAttribute("position", new Bi(p, 3)), this.setAttribute("normal", new Bi(f, 3)), this.setAttribute("uv", new Bi(g, 2));
4516
4516
  }
@@ -5827,8 +5827,8 @@ function Bg(t) {
5827
5827
  return Pu && Pu.add(t), t;
5828
5828
  }
5829
5829
  j("toStack", Bg);
5830
- const T2 = new Pr("color"), N = new Pr("float", zg.float), E = new Pr("int", zg.ints), fe = new Pr("uint", zg.uint), Wn = new Pr("bool", zg.bool), te = new Pr("vec2"), kr = new Pr("ivec2"), w2 = new Pr("uvec2"), S2 = new Pr("bvec2"), I = new Pr("vec3"), M2 = new Pr("ivec3"), Cc = new Pr("uvec3"), I1 = new Pr("bvec3"), Se = new Pr("vec4"), _2 = new Pr("ivec4"), N2 = new Pr("uvec4"), A2 = new Pr("bvec4"), kg = new Pr("mat2"), _i = new Pr("mat3"), Al = new Pr("mat4"), vz = (t = "") => X(new Sn(t, "string")), Tz = (t) => X(new Sn(t, "ArrayBuffer"));
5831
- j("toColor", T2), j("toFloat", N), j("toInt", E), j("toUint", fe), j("toBool", Wn), j("toVec2", te), j("toIVec2", kr), j("toUVec2", w2), j("toBVec2", S2), j("toVec3", I), j("toIVec3", M2), j("toUVec3", Cc), j("toBVec3", I1), j("toVec4", Se), j("toIVec4", _2), j("toUVec4", N2), j("toBVec4", A2), j("toMat2", kg), j("toMat3", _i), j("toMat4", Al);
5830
+ const T2 = new Pr("color"), _ = new Pr("float", zg.float), E = new Pr("int", zg.ints), fe = new Pr("uint", zg.uint), Wn = new Pr("bool", zg.bool), te = new Pr("vec2"), kr = new Pr("ivec2"), w2 = new Pr("uvec2"), S2 = new Pr("bvec2"), I = new Pr("vec3"), M2 = new Pr("ivec3"), Cc = new Pr("uvec3"), I1 = new Pr("bvec3"), Se = new Pr("vec4"), _2 = new Pr("ivec4"), N2 = new Pr("uvec4"), A2 = new Pr("bvec4"), kg = new Pr("mat2"), _i = new Pr("mat3"), Al = new Pr("mat4"), vz = (t = "") => X(new Sn(t, "string")), Tz = (t) => X(new Sn(t, "ArrayBuffer"));
5831
+ j("toColor", T2), j("toFloat", _), j("toInt", E), j("toUint", fe), j("toBool", Wn), j("toVec2", te), j("toIVec2", kr), j("toUVec2", w2), j("toBVec2", S2), j("toVec3", I), j("toIVec3", M2), j("toUVec3", Cc), j("toBVec3", I1), j("toVec4", Se), j("toIVec4", _2), j("toUVec4", N2), j("toBVec4", A2), j("toMat2", kg), j("toMat3", _i), j("toMat4", Al);
5832
5832
  const C2 = /* @__PURE__ */ Z(ku).setParameterLength(2), E2 = (t, e) => X(new g2(X(t), e)), wz = (t, e) => X(new lb(X(t), e));
5833
5833
  j("element", C2), j("convert", E2);
5834
5834
  const Sz = (t) => (console.warn("THREE.TSL: append() has been renamed to Stack()."), Bg(t));
@@ -5998,11 +5998,11 @@ var Az = class extends lr {
5998
5998
  };
5999
5999
  if (Array.isArray(s)) {
6000
6000
  if (s.length > i.length) console.error("THREE.TSL: The number of provided parameters exceeds the expected number of inputs in 'Fn()'."), s.length = i.length;
6001
- else if (s.length < i.length) for (console.error("THREE.TSL: The number of provided parameters is less than the expected number of inputs in 'Fn()'."); s.length < i.length; ) s.push(N(0));
6001
+ else if (s.length < i.length) for (console.error("THREE.TSL: The number of provided parameters is less than the expected number of inputs in 'Fn()'."); s.length < i.length; ) s.push(_(0));
6002
6002
  for (let o = 0; o < s.length; o++) e.push(n(s[o], i[o]));
6003
6003
  } else for (let o of i) {
6004
6004
  let l = s[o.name];
6005
- l === void 0 ? (console.error(`THREE.TSL: Input '${o.name}' not found in 'Fn()'.`), e.push(n(N(0), o))) : e.push(n(l, o));
6005
+ l === void 0 ? (console.error(`THREE.TSL: Input '${o.name}' not found in 'Fn()'.`), e.push(n(_(0), o))) : e.push(n(l, o));
6006
6006
  }
6007
6007
  return `${r.build(t, "property")}( ${e.join(", ")} )`;
6008
6008
  }
@@ -6089,7 +6089,7 @@ const yr = /* @__PURE__ */ Z(br, "+").setParameterLength(2, 1 / 0).setName("add"
6089
6089
  j("add", yr), j("sub", it), j("mul", De), j("div", Gs), j("mod", fm), j("equal", U1), j("notEqual", F2), j("lessThan", z2), j("greaterThan", D1), j("lessThanEqual", B2), j("greaterThanEqual", k2), j("and", U2), j("or", D2), j("not", $2), j("xor", G2), j("bitAnd", j2), j("bitNot", W2), j("bitOr", H2), j("bitXor", q2), j("shiftLeft", X2), j("shiftRight", Y2), j("incrementBefore", Z2), j("decrementBefore", J2), j("increment", K2), j("decrement", Q2);
6090
6090
  const eA = (t, e) => (console.warn('THREE.TSL: "remainder()" is deprecated. Use "mod( int( ... ) )" instead.'), fm(t, e)), tA = (t, e) => (console.warn('THREE.TSL: "modInt()" is deprecated. Use "mod( int( ... ) )" instead.'), fm(E(t), E(e)));
6091
6091
  j("remainder", eA), j("modInt", tA);
6092
- var U = class kt extends lr {
6092
+ var k = class kt extends lr {
6093
6093
  static get type() {
6094
6094
  return "MathNode";
6095
6095
  }
@@ -6138,8 +6138,8 @@ var U = class kt extends lr {
6138
6138
  super.deserialize(e), this.method = e.method;
6139
6139
  }
6140
6140
  };
6141
- U.ALL = "all", U.ANY = "any", U.RADIANS = "radians", U.DEGREES = "degrees", U.EXP = "exp", U.EXP2 = "exp2", U.LOG = "log", U.LOG2 = "log2", U.SQRT = "sqrt", U.INVERSE_SQRT = "inversesqrt", U.FLOOR = "floor", U.CEIL = "ceil", U.NORMALIZE = "normalize", U.FRACT = "fract", U.SIN = "sin", U.COS = "cos", U.TAN = "tan", U.ASIN = "asin", U.ACOS = "acos", U.ATAN = "atan", U.ABS = "abs", U.SIGN = "sign", U.LENGTH = "length", U.NEGATE = "negate", U.ONE_MINUS = "oneMinus", U.DFDX = "dFdx", U.DFDY = "dFdy", U.ROUND = "round", U.RECIPROCAL = "reciprocal", U.TRUNC = "trunc", U.FWIDTH = "fwidth", U.TRANSPOSE = "transpose", U.BITCAST = "bitcast", U.EQUALS = "equals", U.MIN = "min", U.MAX = "max", U.STEP = "step", U.REFLECT = "reflect", U.DISTANCE = "distance", U.DIFFERENCE = "difference", U.DOT = "dot", U.CROSS = "cross", U.POW = "pow", U.TRANSFORM_DIRECTION = "transformDirection", U.MIX = "mix", U.CLAMP = "clamp", U.REFRACT = "refract", U.SMOOTHSTEP = "smoothstep", U.FACEFORWARD = "faceforward";
6142
- const rA = /* @__PURE__ */ N(1e-6), Ez = /* @__PURE__ */ N(1e6), tg = /* @__PURE__ */ N(Math.PI), Rz = /* @__PURE__ */ N(Math.PI * 2), iA = /* @__PURE__ */ Z(U, U.ALL).setParameterLength(1), sA = /* @__PURE__ */ Z(U, U.ANY).setParameterLength(1), nA = /* @__PURE__ */ Z(U, U.RADIANS).setParameterLength(1), aA = /* @__PURE__ */ Z(U, U.DEGREES).setParameterLength(1), $1 = /* @__PURE__ */ Z(U, U.EXP).setParameterLength(1), fc = /* @__PURE__ */ Z(U, U.EXP2).setParameterLength(1), Gg = /* @__PURE__ */ Z(U, U.LOG).setParameterLength(1), Ln = /* @__PURE__ */ Z(U, U.LOG2).setParameterLength(1), Qn = /* @__PURE__ */ Z(U, U.SQRT).setParameterLength(1), G1 = /* @__PURE__ */ Z(U, U.INVERSE_SQRT).setParameterLength(1), Fn = /* @__PURE__ */ Z(U, U.FLOOR).setParameterLength(1), jg = /* @__PURE__ */ Z(U, U.CEIL).setParameterLength(1), Fa = /* @__PURE__ */ Z(U, U.NORMALIZE).setParameterLength(1), Ha = /* @__PURE__ */ Z(U, U.FRACT).setParameterLength(1), ms = /* @__PURE__ */ Z(U, U.SIN).setParameterLength(1), ya = /* @__PURE__ */ Z(U, U.COS).setParameterLength(1), oA = /* @__PURE__ */ Z(U, U.TAN).setParameterLength(1), lA = /* @__PURE__ */ Z(U, U.ASIN).setParameterLength(1), j1 = /* @__PURE__ */ Z(U, U.ACOS).setParameterLength(1), W1 = /* @__PURE__ */ Z(U, U.ATAN).setParameterLength(1, 2), Lt = /* @__PURE__ */ Z(U, U.ABS).setParameterLength(1), em = /* @__PURE__ */ Z(U, U.SIGN).setParameterLength(1), zn = /* @__PURE__ */ Z(U, U.LENGTH).setParameterLength(1), uA = /* @__PURE__ */ Z(U, U.NEGATE).setParameterLength(1), hA = /* @__PURE__ */ Z(U, U.ONE_MINUS).setParameterLength(1), H1 = /* @__PURE__ */ Z(U, U.DFDX).setParameterLength(1), q1 = /* @__PURE__ */ Z(U, U.DFDY).setParameterLength(1), cA = /* @__PURE__ */ Z(U, U.ROUND).setParameterLength(1), dA = /* @__PURE__ */ Z(U, U.RECIPROCAL).setParameterLength(1), X1 = /* @__PURE__ */ Z(U, U.TRUNC).setParameterLength(1), mA = /* @__PURE__ */ Z(U, U.FWIDTH).setParameterLength(1), pA = /* @__PURE__ */ Z(U, U.TRANSPOSE).setParameterLength(1), Pz = /* @__PURE__ */ Z(U, U.BITCAST).setParameterLength(2), fA = (t, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), U1(t, e)), Xi = /* @__PURE__ */ Z(U, U.MIN).setParameterLength(2, 1 / 0), tr = /* @__PURE__ */ Z(U, U.MAX).setParameterLength(2, 1 / 0), Wg = /* @__PURE__ */ Z(U, U.STEP).setParameterLength(2), gA = /* @__PURE__ */ Z(U, U.REFLECT).setParameterLength(2), yA = /* @__PURE__ */ Z(U, U.DISTANCE).setParameterLength(2), xA = /* @__PURE__ */ Z(U, U.DIFFERENCE).setParameterLength(2), Go = /* @__PURE__ */ Z(U, U.DOT).setParameterLength(2), Hg = /* @__PURE__ */ Z(U, U.CROSS).setParameterLength(2), gn = /* @__PURE__ */ Z(U, U.POW).setParameterLength(2), Y1 = /* @__PURE__ */ Z(U, U.POW, 2).setParameterLength(1), bA = /* @__PURE__ */ Z(U, U.POW, 3).setParameterLength(1), vA = /* @__PURE__ */ Z(U, U.POW, 4).setParameterLength(1), TA = /* @__PURE__ */ Z(U, U.TRANSFORM_DIRECTION).setParameterLength(2), wA = (t) => De(em(t), gn(Lt(t), 1 / 3)), Z1 = (t) => Go(t, t), gt = /* @__PURE__ */ Z(U, U.MIX).setParameterLength(3), Hn = (t, e = 0, r = 1) => X(new U(U.CLAMP, X(t), X(e), X(r))), J1 = (t) => Hn(t), K1 = /* @__PURE__ */ Z(U, U.REFRACT).setParameterLength(3), qn = /* @__PURE__ */ Z(U, U.SMOOTHSTEP).setParameterLength(3), Q1 = /* @__PURE__ */ Z(U, U.FACEFORWARD).setParameterLength(3), SA = /* @__PURE__ */ V(([t]) => {
6141
+ k.ALL = "all", k.ANY = "any", k.RADIANS = "radians", k.DEGREES = "degrees", k.EXP = "exp", k.EXP2 = "exp2", k.LOG = "log", k.LOG2 = "log2", k.SQRT = "sqrt", k.INVERSE_SQRT = "inversesqrt", k.FLOOR = "floor", k.CEIL = "ceil", k.NORMALIZE = "normalize", k.FRACT = "fract", k.SIN = "sin", k.COS = "cos", k.TAN = "tan", k.ASIN = "asin", k.ACOS = "acos", k.ATAN = "atan", k.ABS = "abs", k.SIGN = "sign", k.LENGTH = "length", k.NEGATE = "negate", k.ONE_MINUS = "oneMinus", k.DFDX = "dFdx", k.DFDY = "dFdy", k.ROUND = "round", k.RECIPROCAL = "reciprocal", k.TRUNC = "trunc", k.FWIDTH = "fwidth", k.TRANSPOSE = "transpose", k.BITCAST = "bitcast", k.EQUALS = "equals", k.MIN = "min", k.MAX = "max", k.STEP = "step", k.REFLECT = "reflect", k.DISTANCE = "distance", k.DIFFERENCE = "difference", k.DOT = "dot", k.CROSS = "cross", k.POW = "pow", k.TRANSFORM_DIRECTION = "transformDirection", k.MIX = "mix", k.CLAMP = "clamp", k.REFRACT = "refract", k.SMOOTHSTEP = "smoothstep", k.FACEFORWARD = "faceforward";
6142
+ const rA = /* @__PURE__ */ _(1e-6), Ez = /* @__PURE__ */ _(1e6), tg = /* @__PURE__ */ _(Math.PI), Rz = /* @__PURE__ */ _(Math.PI * 2), iA = /* @__PURE__ */ Z(k, k.ALL).setParameterLength(1), sA = /* @__PURE__ */ Z(k, k.ANY).setParameterLength(1), nA = /* @__PURE__ */ Z(k, k.RADIANS).setParameterLength(1), aA = /* @__PURE__ */ Z(k, k.DEGREES).setParameterLength(1), $1 = /* @__PURE__ */ Z(k, k.EXP).setParameterLength(1), fc = /* @__PURE__ */ Z(k, k.EXP2).setParameterLength(1), Gg = /* @__PURE__ */ Z(k, k.LOG).setParameterLength(1), Ln = /* @__PURE__ */ Z(k, k.LOG2).setParameterLength(1), Qn = /* @__PURE__ */ Z(k, k.SQRT).setParameterLength(1), G1 = /* @__PURE__ */ Z(k, k.INVERSE_SQRT).setParameterLength(1), Fn = /* @__PURE__ */ Z(k, k.FLOOR).setParameterLength(1), jg = /* @__PURE__ */ Z(k, k.CEIL).setParameterLength(1), Fa = /* @__PURE__ */ Z(k, k.NORMALIZE).setParameterLength(1), Ha = /* @__PURE__ */ Z(k, k.FRACT).setParameterLength(1), ms = /* @__PURE__ */ Z(k, k.SIN).setParameterLength(1), ya = /* @__PURE__ */ Z(k, k.COS).setParameterLength(1), oA = /* @__PURE__ */ Z(k, k.TAN).setParameterLength(1), lA = /* @__PURE__ */ Z(k, k.ASIN).setParameterLength(1), j1 = /* @__PURE__ */ Z(k, k.ACOS).setParameterLength(1), W1 = /* @__PURE__ */ Z(k, k.ATAN).setParameterLength(1, 2), Lt = /* @__PURE__ */ Z(k, k.ABS).setParameterLength(1), em = /* @__PURE__ */ Z(k, k.SIGN).setParameterLength(1), zn = /* @__PURE__ */ Z(k, k.LENGTH).setParameterLength(1), uA = /* @__PURE__ */ Z(k, k.NEGATE).setParameterLength(1), hA = /* @__PURE__ */ Z(k, k.ONE_MINUS).setParameterLength(1), H1 = /* @__PURE__ */ Z(k, k.DFDX).setParameterLength(1), q1 = /* @__PURE__ */ Z(k, k.DFDY).setParameterLength(1), cA = /* @__PURE__ */ Z(k, k.ROUND).setParameterLength(1), dA = /* @__PURE__ */ Z(k, k.RECIPROCAL).setParameterLength(1), X1 = /* @__PURE__ */ Z(k, k.TRUNC).setParameterLength(1), mA = /* @__PURE__ */ Z(k, k.FWIDTH).setParameterLength(1), pA = /* @__PURE__ */ Z(k, k.TRANSPOSE).setParameterLength(1), Pz = /* @__PURE__ */ Z(k, k.BITCAST).setParameterLength(2), fA = (t, e) => (console.warn('THREE.TSL: "equals" is deprecated. Use "equal" inside a vector instead, like: "bvec*( equal( ... ) )"'), U1(t, e)), Xi = /* @__PURE__ */ Z(k, k.MIN).setParameterLength(2, 1 / 0), tr = /* @__PURE__ */ Z(k, k.MAX).setParameterLength(2, 1 / 0), Wg = /* @__PURE__ */ Z(k, k.STEP).setParameterLength(2), gA = /* @__PURE__ */ Z(k, k.REFLECT).setParameterLength(2), yA = /* @__PURE__ */ Z(k, k.DISTANCE).setParameterLength(2), xA = /* @__PURE__ */ Z(k, k.DIFFERENCE).setParameterLength(2), Go = /* @__PURE__ */ Z(k, k.DOT).setParameterLength(2), Hg = /* @__PURE__ */ Z(k, k.CROSS).setParameterLength(2), gn = /* @__PURE__ */ Z(k, k.POW).setParameterLength(2), Y1 = /* @__PURE__ */ Z(k, k.POW, 2).setParameterLength(1), bA = /* @__PURE__ */ Z(k, k.POW, 3).setParameterLength(1), vA = /* @__PURE__ */ Z(k, k.POW, 4).setParameterLength(1), TA = /* @__PURE__ */ Z(k, k.TRANSFORM_DIRECTION).setParameterLength(2), wA = (t) => De(em(t), gn(Lt(t), 1 / 3)), Z1 = (t) => Go(t, t), gt = /* @__PURE__ */ Z(k, k.MIX).setParameterLength(3), Hn = (t, e = 0, r = 1) => X(new k(k.CLAMP, X(t), X(e), X(r))), J1 = (t) => Hn(t), K1 = /* @__PURE__ */ Z(k, k.REFRACT).setParameterLength(3), qn = /* @__PURE__ */ Z(k, k.SMOOTHSTEP).setParameterLength(3), Q1 = /* @__PURE__ */ Z(k, k.FACEFORWARD).setParameterLength(3), SA = /* @__PURE__ */ V(([t]) => {
6143
6143
  let e = Go(t.xy, te(12.9898, 78.233)), r = fm(e, tg);
6144
6144
  return Ha(ms(r).mul(43758.5453));
6145
6145
  }), MA = (t, e, r) => gt(e, r, t), _A = (t, e, r) => qn(e, r, t), NA = (t, e) => (console.warn('THREE.TSL: "atan2" is overloaded. Use "atan" instead.'), W1(t, e)), Iz = Q1, Vz = G1;
@@ -6563,7 +6563,7 @@ var WA = class extends Ce {
6563
6563
  static get type() {
6564
6564
  return "RemapNode";
6565
6565
  }
6566
- constructor(t, e, r, i = N(0), s = N(1)) {
6566
+ constructor(t, e, r, i = _(0), s = _(1)) {
6567
6567
  super(), this.node = t, this.inLowNode = e, this.inHighNode = r, this.outLowNode = i, this.outHighNode = s, this.doClamp = !0;
6568
6568
  }
6569
6569
  setup() {
@@ -6771,10 +6771,10 @@ var Xn = class extends pm {
6771
6771
  {
6772
6772
  let n = t.getDataFromNode(this), a = n.propertyName;
6773
6773
  if (a === void 0) {
6774
- let { uvNode: h, levelNode: u, biasNode: c, compareNode: d, depthNode: m, gradNode: p } = i, f = this.generateUV(t, h), g = u ? u.build(t, "float") : null, y = c ? c.build(t, "float") : null, v = m ? m.build(t, "int") : null, S = d ? d.build(t, "float") : null, T = p ? [p[0].build(t, "vec2"), p[1].build(t, "vec2")] : null, M = t.getVarFromNode(this);
6774
+ let { uvNode: h, levelNode: u, biasNode: c, compareNode: d, depthNode: m, gradNode: p } = i, f = this.generateUV(t, h), g = u ? u.build(t, "float") : null, y = c ? c.build(t, "float") : null, v = m ? m.build(t, "int") : null, w = d ? d.build(t, "float") : null, T = p ? [p[0].build(t, "vec2"), p[1].build(t, "vec2")] : null, M = t.getVarFromNode(this);
6775
6775
  a = t.getPropertyName(M);
6776
- let w = this.generateSnippet(t, s, f, g, y, v, S, T);
6777
- t.addLineFlowCode(`${a} = ${w}`, this), n.snippet = w, n.propertyName = a;
6776
+ let S = this.generateSnippet(t, s, f, g, y, v, w, T);
6777
+ t.addLineFlowCode(`${a} = ${S}`, this), n.snippet = S, n.propertyName = a;
6778
6778
  }
6779
6779
  let o = a, l = this.getNodeType(t);
6780
6780
  return t.needsToWorkingColorSpace(r) && (o = Xg(za(o, l), r.colorSpace).setup(t).build(t, l)), t.format(o, l, e);
@@ -7020,7 +7020,7 @@ var xB = class extends Ce {
7020
7020
  return e.coordinateSystem === Wi && r.side === 1 ? "false" : t.getFrontFacing();
7021
7021
  }
7022
7022
  };
7023
- const sC = /* @__PURE__ */ ue(xB), vm = /* @__PURE__ */ N(sC).mul(2).sub(1), Zg = /* @__PURE__ */ Ba("normal", "vec3"), Yi = /* @__PURE__ */ V((t) => t.geometry.hasAttribute("normal") === !1 ? (console.warn('THREE.TSL: Vertex attribute "normal" not found on geometry.'), I(0, 1, 0)) : Zg, "vec3").once()().toVar("normalLocal"), nC = /* @__PURE__ */ mr.dFdx().cross(mr.dFdy()).normalize().toVar("normalFlat"), Tn = /* @__PURE__ */ V((t) => {
7023
+ const sC = /* @__PURE__ */ ue(xB), vm = /* @__PURE__ */ _(sC).mul(2).sub(1), Zg = /* @__PURE__ */ Ba("normal", "vec3"), Yi = /* @__PURE__ */ V((t) => t.geometry.hasAttribute("normal") === !1 ? (console.warn('THREE.TSL: Vertex attribute "normal" not found on geometry.'), I(0, 1, 0)) : Zg, "vec3").once()().toVar("normalLocal"), nC = /* @__PURE__ */ mr.dFdx().cross(mr.dFdy()).normalize().toVar("normalFlat"), Tn = /* @__PURE__ */ V((t) => {
7024
7024
  let e;
7025
7025
  return e = t.material.flatShading === !0 ? nC : Ts(av(Yi), "v_normalView").normalize(), e;
7026
7026
  }, "vec3").once()().toVar("normalView"), Tm = /* @__PURE__ */ V((t) => {
@@ -7178,8 +7178,8 @@ const yb = /* @__PURE__ */ Z(RB).setParameterLength(1, 2), PB = V(({ textureNode
7178
7178
  let r = (s) => t.cache().context({
7179
7179
  getUV: (n) => s(n.uvNode || Ht()),
7180
7180
  forceUVContext: !0
7181
- }), i = N(r((s) => s));
7182
- return te(N(r((s) => s.add(s.dFdx()))).sub(i), N(r((s) => s.add(s.dFdy()))).sub(i)).mul(e);
7181
+ }), i = _(r((s) => s));
7182
+ return te(_(r((s) => s.add(s.dFdx()))).sub(i), _(r((s) => s.add(s.dFdy()))).sub(i)).mul(e);
7183
7183
  }), IB = V((t) => {
7184
7184
  let { surf_pos: e, surf_norm: r, dHdxy: i } = t, s = e.dFdx().normalize(), n = e.dFdy().normalize(), a = r, o = n.cross(a), l = a.cross(s), h = s.dot(o).mul(vm), u = h.sign().mul(i.x.mul(o).add(i.y.mul(l)));
7185
7185
  return h.abs().mul(r).sub(u).normalize();
@@ -7232,7 +7232,7 @@ var re = class Kt extends Ce {
7232
7232
  } else if (i === Kt.OPACITY) {
7233
7233
  let n = this.getFloat(i);
7234
7234
  s = r.alphaMap && r.alphaMap.isTexture === !0 ? n.mul(this.getTexture("alpha")) : n;
7235
- } else if (i === Kt.SPECULAR_STRENGTH) s = r.specularMap && r.specularMap.isTexture === !0 ? this.getTexture("specular").r : N(1);
7235
+ } else if (i === Kt.SPECULAR_STRENGTH) s = r.specularMap && r.specularMap.isTexture === !0 ? this.getTexture("specular").r : _(1);
7236
7236
  else if (i === Kt.SPECULAR_INTENSITY) {
7237
7237
  let n = this.getFloat(i);
7238
7238
  s = r.specularIntensityMap && r.specularIntensityMap.isTexture === !0 ? n.mul(this.getTexture(i).a) : n;
@@ -7281,7 +7281,7 @@ var re = class Kt extends Ce {
7281
7281
  } else if (i === Kt.IOR) s = this.getFloat(i);
7282
7282
  else if (i === Kt.LIGHT_MAP) s = this.getTexture(i).rgb.mul(this.getFloat("lightMapIntensity"));
7283
7283
  else if (i === Kt.AO) s = this.getTexture(i).r.sub(1).mul(this.getFloat("aoMapIntensity")).add(1);
7284
- else if (i === Kt.LINE_DASH_OFFSET) s = r.dashOffset ? this.getFloat(i) : N(0);
7284
+ else if (i === Kt.LINE_DASH_OFFSET) s = r.dashOffset ? this.getFloat(i) : _(0);
7285
7285
  else {
7286
7286
  let n = this.getNodeType(e);
7287
7287
  s = this.getCache(i, n);
@@ -7386,11 +7386,11 @@ var UB = class extends Ce {
7386
7386
  name: "id",
7387
7387
  type: "int"
7388
7388
  }]
7389
- }), r = e(E(this.batchingIdNode)), i = this.batchMesh._matricesTexture, s = E(Eo(ir(i), 0).x), n = N(r).mul(4).toInt().toVar(), a = n.mod(s), o = n.div(s), l = Al(ir(i, kr(a, o)), ir(i, kr(a.add(1), o)), ir(i, kr(a.add(2), o)), ir(i, kr(a.add(3), o))), h = this.batchMesh._colorsTexture;
7389
+ }), r = e(E(this.batchingIdNode)), i = this.batchMesh._matricesTexture, s = E(Eo(ir(i), 0).x), n = _(r).mul(4).toInt().toVar(), a = n.mod(s), o = n.div(s), l = Al(ir(i, kr(a, o)), ir(i, kr(a.add(1), o)), ir(i, kr(a.add(2), o)), ir(i, kr(a.add(3), o))), h = this.batchMesh._colorsTexture;
7390
7390
  if (h !== null) {
7391
7391
  let m = V(([f]) => {
7392
- let g = E(Eo(ir(h), 0).x), y = f, v = y.mod(g), S = y.div(g);
7393
- return ir(h, kr(v, S)).rgb;
7392
+ let g = E(Eo(ir(h), 0).x), y = f, v = y.mod(g), w = y.div(g);
7393
+ return ir(h, kr(v, w)).rgb;
7394
7394
  }).setLayout({
7395
7395
  name: "getBatchingColor",
7396
7396
  type: "vec3",
@@ -7584,7 +7584,7 @@ var HB = class extends Ce {
7584
7584
  let y = {
7585
7585
  start: u,
7586
7586
  end: c
7587
- }, v = y.start, S = y.end, T, M = () => p.includes("<") ? "+=" : "-=";
7587
+ }, v = y.start, w = y.end, T, M = () => p.includes("<") ? "+=" : "-=";
7588
7588
  if (f != null) switch (typeof f) {
7589
7589
  case "function":
7590
7590
  T = t.flowStagesNode(e.updateNode, "void").code.replace(/\t|;/g, "");
@@ -7599,8 +7599,8 @@ var HB = class extends Ce {
7599
7599
  f.isNode ? T = d + " " + M() + " " + f.build(t) : (console.error("THREE.TSL: 'Loop( { update: ... } )' is not a function, string or number."), T = "break /* invalid update */");
7600
7600
  }
7601
7601
  else f = m === "int" || m === "uint" ? p.includes("<") ? "++" : "--" : M() + " 1.", T = d + " " + f;
7602
- let w = t.getVar(m, d) + " = " + v, _ = d + " " + p + " " + S;
7603
- g = `for ( ${w}; ${_}; ${T} )`;
7602
+ let S = t.getVar(m, d) + " = " + v, N = d + " " + p + " " + w;
7603
+ g = `for ( ${S}; ${N}; ${T} )`;
7604
7604
  }
7605
7605
  t.addFlowCode((a === 0 ? `
7606
7606
  ` : "") + t.tab + g + ` {
@@ -7635,10 +7635,10 @@ function YB(t) {
7635
7635
  f.type = fs, f.needsUpdate = !0;
7636
7636
  let g = u * 4;
7637
7637
  for (let v = 0; v < n; v++) {
7638
- let S = o[v], T = l[v], M = h[v], w = c * d * 4 * v;
7639
- for (let _ = 0; _ < S.count; _++) {
7640
- let A = _ * g;
7641
- e === !0 && (ss.fromBufferAttribute(S, _), p[w + A + 0] = ss.x, p[w + A + 1] = ss.y, p[w + A + 2] = ss.z, p[w + A + 3] = 0), r === !0 && (ss.fromBufferAttribute(T, _), p[w + A + 4] = ss.x, p[w + A + 5] = ss.y, p[w + A + 6] = ss.z, p[w + A + 7] = 0), i === !0 && (ss.fromBufferAttribute(M, _), p[w + A + 8] = ss.x, p[w + A + 9] = ss.y, p[w + A + 10] = ss.z, p[w + A + 11] = M.itemSize === 4 ? ss.w : 1);
7638
+ let w = o[v], T = l[v], M = h[v], S = c * d * 4 * v;
7639
+ for (let N = 0; N < w.count; N++) {
7640
+ let A = N * g;
7641
+ e === !0 && (ss.fromBufferAttribute(w, N), p[S + A + 0] = ss.x, p[S + A + 1] = ss.y, p[S + A + 2] = ss.z, p[S + A + 3] = 0), r === !0 && (ss.fromBufferAttribute(T, N), p[S + A + 4] = ss.x, p[S + A + 5] = ss.y, p[S + A + 6] = ss.z, p[S + A + 7] = 0), i === !0 && (ss.fromBufferAttribute(M, N), p[S + A + 8] = ss.x, p[S + A + 9] = ss.y, p[S + A + 10] = ss.z, p[S + A + 11] = M.itemSize === 4 ? ss.w : 1);
7642
7642
  }
7643
7643
  }
7644
7644
  a = {
@@ -7662,7 +7662,7 @@ var ZB = class extends Ce {
7662
7662
  r === !0 && ar.mulAssign(this.morphBaseInfluence), i === !0 && Yi.mulAssign(this.morphBaseInfluence);
7663
7663
  let h = E(l.width);
7664
7664
  yt(n, ({ i: u }) => {
7665
- let c = N(0).toVar();
7665
+ let c = _(0).toVar();
7666
7666
  this.mesh.count > 1 && this.mesh.morphTexture !== null && this.mesh.morphTexture !== void 0 ? c.assign(ir(this.mesh.morphTexture, kr(E(u).add(1), E(Ro))).r) : c.assign(It("morphTargetInfluences", "float").element(u).toVar()), Ge(c.notEqual(0), () => {
7667
7667
  r === !0 && ar.addAssign(Kw({
7668
7668
  bufferMap: a,
@@ -7723,7 +7723,7 @@ var Ec = class extends Ce {
7723
7723
  radiance: I().toVar("radiance"),
7724
7724
  irradiance: I().toVar("irradiance"),
7725
7725
  iblIrradiance: I().toVar("iblIrradiance"),
7726
- ambientOcclusion: N(1).toVar("ambientOcclusion"),
7726
+ ambientOcclusion: _(1).toVar("ambientOcclusion"),
7727
7727
  reflectedLight: a,
7728
7728
  backdrop: t,
7729
7729
  backdropAlpha: e
@@ -7843,7 +7843,7 @@ const ic = (t, e, r) => t.add(e).div(e.sub(r)), ak = (t, e, r) => e.sub(r).mul(t
7843
7843
  return i.div(s);
7844
7844
  }, ok = (t, e, r) => {
7845
7845
  let i = t.mul(Gg(r.div(e)));
7846
- return N(Math.E).pow(i).mul(e).negate();
7846
+ return _(Math.E).pow(i).mul(e).negate();
7847
7847
  }, uE = /* @__PURE__ */ Z(Ra, Ra.DEPTH_BASE), yv = /* @__PURE__ */ ue(Ra, Ra.DEPTH), sg = /* @__PURE__ */ Z(Ra, Ra.LINEAR_DEPTH).setParameterLength(0, 1), lk = /* @__PURE__ */ sg(pv());
7848
7848
  yv.assign = (t) => uE(t);
7849
7849
  var Po = class Lf extends Ce {
@@ -7860,7 +7860,7 @@ var Po = class Lf extends Ce {
7860
7860
  }
7861
7861
  setupAlphaToCoverage(e, r) {
7862
7862
  return V(() => {
7863
- let i = N().toVar("distanceToPlane"), s = N().toVar("distanceToGradient"), n = N(1).toVar("clipOpacity"), a = r.length;
7863
+ let i = _().toVar("distanceToPlane"), s = _().toVar("distanceToGradient"), n = _(1).toVar("clipOpacity"), a = r.length;
7864
7864
  if (this.hardwareClipping === !1 && a > 0) {
7865
7865
  let l = Ls(r);
7866
7866
  yt(a, ({ i: h }) => {
@@ -7870,7 +7870,7 @@ var Po = class Lf extends Ce {
7870
7870
  }
7871
7871
  let o = e.length;
7872
7872
  if (o > 0) {
7873
- let l = Ls(e), h = N(1).toVar("intersectionClipOpacity");
7873
+ let l = Ls(e), h = _(1).toVar("intersectionClipOpacity");
7874
7874
  yt(o, ({ i: u }) => {
7875
7875
  let c = l.element(u);
7876
7876
  i.assign(mr.dot(c.xyz).negate().add(c.w)), s.assign(i.fwidth().div(2)), h.mulAssign(qn(s.negate(), s, i).oneMinus());
@@ -7912,7 +7912,7 @@ var Po = class Lf extends Ce {
7912
7912
  };
7913
7913
  Po.ALPHA_TO_COVERAGE = "alphaToCoverage", Po.DEFAULT = "default", Po.HARDWARE = "hardware";
7914
7914
  const uk = () => X(new Po()), hk = () => X(new Po(Po.ALPHA_TO_COVERAGE)), ck = () => X(new Po(Po.HARDWARE)), Qw = /* @__PURE__ */ V(([t]) => Ha(De(1e4, ms(De(17, t.x).add(De(0.1, t.y)))).mul(yr(0.1, Lt(ms(De(13, t.y).add(t.x))))))), eS = /* @__PURE__ */ V(([t]) => Qw(te(Qw(t.xy), t.z))), dk = /* @__PURE__ */ V(([t]) => {
7915
- let e = tr(zn(H1(t.xyz)), zn(q1(t.xyz))), r = N(1).div(N(0.05).mul(e)).toVar("pixScale"), i = te(fc(Fn(Ln(r))), fc(jg(Ln(r)))), s = te(eS(Fn(i.x.mul(t.xyz))), eS(Fn(i.y.mul(t.xyz)))), n = Ha(Ln(r)), a = yr(De(n.oneMinus(), s.x), De(n, s.y)), o = Xi(n, n.oneMinus()), l = I(a.mul(a).div(De(2, o).mul(it(1, o))), a.sub(De(0.5, o)).div(it(1, o)), it(1, it(1, a).mul(it(1, a)).div(De(2, o).mul(it(1, o))))), h = a.lessThan(o.oneMinus()).select(a.lessThan(o).select(l.x, l.y), l.z);
7915
+ let e = tr(zn(H1(t.xyz)), zn(q1(t.xyz))), r = _(1).div(_(0.05).mul(e)).toVar("pixScale"), i = te(fc(Fn(Ln(r))), fc(jg(Ln(r)))), s = te(eS(Fn(i.x.mul(t.xyz))), eS(Fn(i.y.mul(t.xyz)))), n = Ha(Ln(r)), a = yr(De(n.oneMinus(), s.x), De(n, s.y)), o = Xi(n, n.oneMinus()), l = I(a.mul(a).div(De(2, o).mul(it(1, o))), a.sub(De(0.5, o)).div(it(1, o)), it(1, it(1, a).mul(it(1, a)).div(De(2, o).mul(it(1, o))))), h = a.lessThan(o.oneMinus()).select(a.lessThan(o).select(l.x, l.y), l.z);
7916
7916
  return Hn(h, 1e-6, 1);
7917
7917
  }).setLayout({
7918
7918
  name: "getAlphaHashThreshold",
@@ -8038,10 +8038,10 @@ var or = class extends ki {
8038
8038
  this.maskNode !== null && Wn(this.maskNode).not().discard();
8039
8039
  let r = this.colorNode ? Se(this.colorNode) : vC;
8040
8040
  this.vertexColors === !0 && e.hasAttribute("color") && (r = r.mul(hE())), t.instanceColor && (r = Zd("vec3", "vInstanceColor").mul(r)), t.isBatchedMesh && t._colorsTexture && (r = Zd("vec3", "vBatchColor").mul(r)), lt.assign(r);
8041
- let i = this.opacityNode ? N(this.opacityNode) : hv;
8041
+ let i = this.opacityNode ? _(this.opacityNode) : hv;
8042
8042
  lt.a.assign(lt.a.mul(i));
8043
8043
  let s = null;
8044
- (this.alphaTestNode !== null || this.alphaTest > 0) && (s = this.alphaTestNode === null ? bC : N(this.alphaTestNode), lt.a.lessThanEqual(s).discard()), this.alphaHash === !0 && lt.a.lessThan(dk(ar)).discard(), this.transparent === !1 && this.blending === 1 && this.alphaToCoverage === !1 ? lt.a.assign(1) : s === null && lt.a.lessThanEqual(0).discard();
8044
+ (this.alphaTestNode !== null || this.alphaTest > 0) && (s = this.alphaTestNode === null ? bC : _(this.alphaTestNode), lt.a.lessThanEqual(s).discard()), this.alphaHash === !0 && lt.a.lessThan(dk(ar)).discard(), this.transparent === !1 && this.blending === 1 && this.alphaToCoverage === !1 ? lt.a.assign(1) : s === null && lt.a.lessThanEqual(0).discard();
8045
8045
  }
8046
8046
  setupVariants() {
8047
8047
  }
@@ -8141,7 +8141,7 @@ var yk = class extends or {
8141
8141
  super(), this.isLineDashedNodeMaterial = !0, this.setDefaultValues(gk), this.dashOffset = 0, this.offsetNode = null, this.dashScaleNode = null, this.dashSizeNode = null, this.gapSizeNode = null, this.setValues(t);
8142
8142
  }
8143
8143
  setupVariants() {
8144
- let t = this.offsetNode ? N(this.offsetNode) : HC, e = this.dashScaleNode ? N(this.dashScaleNode) : GC, r = this.dashSizeNode ? N(this.dashSizeNode) : jC, i = this.gapSizeNode ? N(this.gapSizeNode) : WC;
8144
+ let t = this.offsetNode ? _(this.offsetNode) : HC, e = this.dashScaleNode ? _(this.dashScaleNode) : GC, r = this.dashSizeNode ? _(this.dashSizeNode) : jC, i = this.gapSizeNode ? _(this.gapSizeNode) : WC;
8145
8145
  Rf.assign(r), cb.assign(i);
8146
8146
  let s = Ts(Ba("lineDistance").mul(e));
8147
8147
  (t ? s.add(t) : s).mod(Rf.add(cb)).greaterThan(Rf).discard();
@@ -8168,7 +8168,7 @@ var wk = class extends or {
8168
8168
  super(), this.isMeshNormalNodeMaterial = !0, this.setDefaultValues(Tk), this.setValues(t);
8169
8169
  }
8170
8170
  setupDiffuseColor() {
8171
- let t = this.opacityNode ? N(this.opacityNode) : hv;
8171
+ let t = this.opacityNode ? _(this.opacityNode) : hv;
8172
8172
  lt.assign(Xg(Se(cE(nr), t), Gi));
8173
8173
  }
8174
8174
  }, Sk = class extends lr {
@@ -8266,7 +8266,7 @@ var bv = class extends Ec {
8266
8266
  super(), this.lightMapNode = t;
8267
8267
  }
8268
8268
  setup(t) {
8269
- let e = N(1 / Math.PI);
8269
+ let e = _(1 / Math.PI);
8270
8270
  t.context.irradianceLightMap = this.lightMapNode.mul(e);
8271
8271
  }
8272
8272
  }, ty = class {
@@ -8338,7 +8338,7 @@ var gE = class extends or {
8338
8338
  const yc = /* @__PURE__ */ V(({ f0: t, f90: e, dotVH: r }) => {
8339
8339
  let i = r.mul(-5.55473).sub(6.98316).mul(r).exp2();
8340
8340
  return t.mul(i.oneMinus()).add(e.mul(i));
8341
- }), Iu = /* @__PURE__ */ V((t) => t.diffuseColor.mul(1 / Math.PI)), Ck = () => N(0.25), Ek = /* @__PURE__ */ V(({ dotNH: t }) => Qf.mul(N(0.5)).add(1).mul(N(1 / Math.PI)).mul(t.pow(Qf))), Rk = /* @__PURE__ */ V(({ lightDirection: t }) => {
8341
+ }), Iu = /* @__PURE__ */ V((t) => t.diffuseColor.mul(1 / Math.PI)), Ck = () => _(0.25), Ek = /* @__PURE__ */ V(({ dotNH: t }) => Qf.mul(_(0.5)).add(1).mul(_(1 / Math.PI)).mul(t.pow(Qf))), Rk = /* @__PURE__ */ V(({ lightDirection: t }) => {
8342
8342
  let e = t.add($t).normalize(), r = nr.dot(e).clamp(), i = $t.dot(e).clamp(), s = yc({
8343
8343
  f0: $i,
8344
8344
  f90: 1,
@@ -8391,7 +8391,7 @@ var Ok = class extends or {
8391
8391
  return new yE();
8392
8392
  }
8393
8393
  setupVariants() {
8394
- let t = (this.shininessNode ? N(this.shininessNode) : TC).max(1e-4);
8394
+ let t = (this.shininessNode ? _(this.shininessNode) : TC).max(1e-4);
8395
8395
  Qf.assign(t);
8396
8396
  let e = this.specularNode || SC;
8397
8397
  $i.assign(e);
@@ -8401,7 +8401,7 @@ var Ok = class extends or {
8401
8401
  }
8402
8402
  };
8403
8403
  const xE = /* @__PURE__ */ V((t) => {
8404
- if (t.geometry.hasAttribute("normal") === !1) return N(0);
8404
+ if (t.geometry.hasAttribute("normal") === !1) return _(0);
8405
8405
  let e = Tn.dFdx().abs().max(Tn.dFdy().abs());
8406
8406
  return e.x.max(e.y).max(e.z);
8407
8407
  }), vv = /* @__PURE__ */ V((t) => {
@@ -8488,7 +8488,7 @@ const xE = /* @__PURE__ */ V((t) => {
8488
8488
  name: "dotNH",
8489
8489
  type: "float"
8490
8490
  }]
8491
- }), Fk = /* @__PURE__ */ N(1 / Math.PI), zk = /* @__PURE__ */ V(({ alphaT: t, alphaB: e, dotNH: r, dotTH: i, dotBH: s }) => {
8491
+ }), Fk = /* @__PURE__ */ _(1 / Math.PI), zk = /* @__PURE__ */ V(({ alphaT: t, alphaB: e, dotNH: r, dotTH: i, dotBH: s }) => {
8492
8492
  let n = t.mul(e), a = I(e.mul(i), t.mul(s), n.mul(r)), o = a.dot(a), l = n.div(o);
8493
8493
  return Fk.mul(n.mul(l.pow2()));
8494
8494
  }).setLayout({
@@ -8528,12 +8528,12 @@ const xE = /* @__PURE__ */ V((t) => {
8528
8528
  dotVH: p
8529
8529
  }), g, y;
8530
8530
  if (Xd(a) && (f = Dg.mix(f, n)), Xd(o)) {
8531
- let v = Rd.dot(e), S = Rd.dot($t), T = Rd.dot(u), M = Cl.dot(e), w = Cl.dot($t), _ = Cl.dot(u);
8531
+ let v = Rd.dot(e), w = Rd.dot($t), T = Rd.dot(u), M = Cl.dot(e), S = Cl.dot($t), N = Cl.dot(u);
8532
8532
  g = Lk({
8533
8533
  alphaT: Kf,
8534
8534
  alphaB: h,
8535
- dotTV: S,
8536
- dotBV: w,
8535
+ dotTV: w,
8536
+ dotBV: S,
8537
8537
  dotTL: v,
8538
8538
  dotBL: M,
8539
8539
  dotNV: d,
@@ -8543,7 +8543,7 @@ const xE = /* @__PURE__ */ V((t) => {
8543
8543
  alphaB: h,
8544
8544
  dotNH: m,
8545
8545
  dotTH: T,
8546
- dotBH: _
8546
+ dotBH: N
8547
8547
  });
8548
8548
  } else g = bE({
8549
8549
  alpha: h,
@@ -8594,8 +8594,8 @@ const xE = /* @__PURE__ */ V((t) => {
8594
8594
  }
8595
8595
  ]
8596
8596
  }), Bk = /* @__PURE__ */ V(({ roughness: t, dotNH: e }) => {
8597
- let r = t.pow2(), i = N(1).div(r), s = e.pow2(), n = s.oneMinus().max(78125e-7);
8598
- return N(2).add(i).mul(n.pow(i.mul(0.5))).div(2 * Math.PI);
8597
+ let r = t.pow2(), i = _(1).div(r), s = e.pow2(), n = s.oneMinus().max(78125e-7);
8598
+ return _(2).add(i).mul(n.pow(i.mul(0.5))).div(2 * Math.PI);
8599
8599
  }).setLayout({
8600
8600
  name: "D_Charlie",
8601
8601
  type: "float",
@@ -8606,7 +8606,7 @@ const xE = /* @__PURE__ */ V((t) => {
8606
8606
  name: "dotNH",
8607
8607
  type: "float"
8608
8608
  }]
8609
- }), kk = /* @__PURE__ */ V(({ dotNV: t, dotNL: e }) => N(1).div(N(4).mul(e.add(t).sub(e.mul(t))))).setLayout({
8609
+ }), kk = /* @__PURE__ */ V(({ dotNV: t, dotNL: e }) => _(1).div(_(4).mul(e.add(t).sub(e.mul(t))))).setLayout({
8610
8610
  name: "V_Neubelt",
8611
8611
  type: "float",
8612
8612
  inputs: [{
@@ -8671,20 +8671,20 @@ const xE = /* @__PURE__ */ V((t) => {
8671
8671
  }), rS = /* @__PURE__ */ V(({ N: t, V: e, P: r, mInv: i, p0: s, p1: n, p2: a, p3: o }) => {
8672
8672
  let l = n.sub(s).toVar(), h = o.sub(s).toVar(), u = l.cross(h), c = I().toVar();
8673
8673
  return Ge(u.dot(r.sub(s)).greaterThanEqual(0), () => {
8674
- let d = e.sub(t.mul(e.dot(t))).normalize(), m = t.cross(d).negate(), p = i.mul(_i(d, m, t).transpose()).toVar(), f = p.mul(s.sub(r)).normalize().toVar(), g = p.mul(n.sub(r)).normalize().toVar(), y = p.mul(a.sub(r)).normalize().toVar(), v = p.mul(o.sub(r)).normalize().toVar(), S = I(0).toVar();
8675
- S.addAssign(bp({
8674
+ let d = e.sub(t.mul(e.dot(t))).normalize(), m = t.cross(d).negate(), p = i.mul(_i(d, m, t).transpose()).toVar(), f = p.mul(s.sub(r)).normalize().toVar(), g = p.mul(n.sub(r)).normalize().toVar(), y = p.mul(a.sub(r)).normalize().toVar(), v = p.mul(o.sub(r)).normalize().toVar(), w = I(0).toVar();
8675
+ w.addAssign(bp({
8676
8676
  v1: f,
8677
8677
  v2: g
8678
- })), S.addAssign(bp({
8678
+ })), w.addAssign(bp({
8679
8679
  v1: g,
8680
8680
  v2: y
8681
- })), S.addAssign(bp({
8681
+ })), w.addAssign(bp({
8682
8682
  v1: y,
8683
8683
  v2: v
8684
- })), S.addAssign(bp({
8684
+ })), w.addAssign(bp({
8685
8685
  v1: v,
8686
8686
  v2: f
8687
- })), c.assign(I($k({ f: S })));
8687
+ })), c.assign(I($k({ f: w })));
8688
8688
  }), c;
8689
8689
  }).setLayout({
8690
8690
  name: "LTC_Evaluate",
@@ -8726,7 +8726,7 @@ const xE = /* @__PURE__ */ V((t) => {
8726
8726
  }), ry = 1 / 6, SE = (t) => De(ry, De(t, De(t, t.negate().add(3)).sub(3)).add(1)), vb = (t) => De(ry, De(t, De(t, De(3, t).sub(6))).add(4)), ME = (t) => De(ry, De(t, De(t, De(-3, t).add(3)).add(3)).add(1)), Tb = (t) => De(ry, gn(t, 3)), iS = (t) => SE(t).add(vb(t)), sS = (t) => ME(t).add(Tb(t)), nS = (t) => yr(-1, vb(t).div(SE(t).add(vb(t)))), aS = (t) => yr(1, Tb(t).div(ME(t).add(Tb(t)))), oS = (t, e, r) => {
8727
8727
  let i = t.uvNode, s = De(i, e.zw).add(0.5), n = Fn(s), a = Ha(s), o = iS(a.x), l = sS(a.x), h = nS(a.x), u = aS(a.x), c = nS(a.y), d = aS(a.y), m = te(n.x.add(h), n.y.add(c)).sub(0.5).mul(e.xy), p = te(n.x.add(u), n.y.add(c)).sub(0.5).mul(e.xy), f = te(n.x.add(h), n.y.add(d)).sub(0.5).mul(e.xy), g = te(n.x.add(u), n.y.add(d)).sub(0.5).mul(e.xy), y = iS(a.y).mul(yr(o.mul(t.sample(m).level(r)), l.mul(t.sample(p).level(r)))), v = sS(a.y).mul(yr(o.mul(t.sample(f).level(r)), l.mul(t.sample(g).level(r))));
8728
8728
  return y.add(v);
8729
- }, _E = /* @__PURE__ */ V(([t, e = N(3)]) => {
8729
+ }, _E = /* @__PURE__ */ V(([t, e = _(3)]) => {
8730
8730
  let r = te(t.size(E(e))), i = te(t.size(E(e.add(1)))), s = Gs(1, r), n = Gs(1, i), a = oS(t, Se(s, r), Fn(e)), o = oS(t, Se(n, i), jg(e));
8731
8731
  return Ha(e).mix(a, o);
8732
8732
  }), lS = /* @__PURE__ */ V(([t, e, r, i, s]) => {
@@ -8794,32 +8794,32 @@ const xE = /* @__PURE__ */ V((t) => {
8794
8794
  let f, g;
8795
8795
  if (p) {
8796
8796
  f = Se().toVar(), g = I().toVar();
8797
- let M = u.sub(1).mul(p.mul(0.025)), w = I(u.sub(M), u, u.add(M));
8797
+ let M = u.sub(1).mul(p.mul(0.025)), S = I(u.sub(M), u, u.add(M));
8798
8798
  yt({
8799
8799
  start: 0,
8800
8800
  end: 3
8801
- }, ({ i: _ }) => {
8802
- let A = w.element(_), B = lS(t, e, c, A, o), ee = a.add(B), K = h.mul(l.mul(Se(ee, 1))), ie = te(K.xy.div(K.w)).toVar();
8801
+ }, ({ i: N }) => {
8802
+ let A = S.element(N), U = lS(t, e, c, A, o), ee = a.add(U), K = h.mul(l.mul(Se(ee, 1))), ie = te(K.xy.div(K.w)).toVar();
8803
8803
  ie.addAssign(1), ie.divAssign(2), ie.assign(te(ie.x, ie.y.oneMinus()));
8804
8804
  let se = uS(ie, r, A);
8805
- f.element(_).assign(se.element(_)), f.a.addAssign(se.a), g.element(_).assign(i.element(_).mul(hS(zn(B), d, m).element(_)));
8805
+ f.element(N).assign(se.element(N)), f.a.addAssign(se.a), g.element(N).assign(i.element(N).mul(hS(zn(U), d, m).element(N)));
8806
8806
  }), f.a.divAssign(3);
8807
8807
  } else {
8808
- let M = lS(t, e, c, u, o), w = a.add(M), _ = h.mul(l.mul(Se(w, 1))), A = te(_.xy.div(_.w)).toVar();
8808
+ let M = lS(t, e, c, u, o), S = a.add(M), N = h.mul(l.mul(Se(S, 1))), A = te(N.xy.div(N.w)).toVar();
8809
8809
  A.addAssign(1), A.divAssign(2), A.assign(te(A.x, A.y.oneMinus())), f = uS(A, r, u), g = i.mul(hS(zn(M), d, m));
8810
8810
  }
8811
- let y = g.rgb.mul(f.rgb), v = t.dot(e).clamp(), S = I(TE({
8811
+ let y = g.rgb.mul(f.rgb), v = t.dot(e).clamp(), w = I(TE({
8812
8812
  dotNV: v,
8813
8813
  specularColor: s,
8814
8814
  specularF90: n,
8815
8815
  roughness: r
8816
8816
  })), T = g.r.add(g.g, g.b).div(3);
8817
- return Se(S.oneMinus().mul(y), f.a.oneMinus().mul(T).oneMinus());
8817
+ return Se(w.oneMinus().mul(y), f.a.oneMinus().mul(T).oneMinus());
8818
8818
  }), qk = /* @__PURE__ */ _i(3.2404542, -0.969266, 0.0556434, -1.5371385, 1.8760108, -0.2040259, -0.4985314, 0.041556, 1.0572252), Xk = (t) => {
8819
8819
  let e = t.sqrt();
8820
8820
  return I(1).add(e).div(I(1).sub(e));
8821
8821
  }, cS = (t, e) => t.sub(e).div(t.add(e)).pow2(), Yk = (t, e) => {
8822
- let r = t.mul(2 * Math.PI * 1e-9), i = I(54856e-17, 44201e-17, 52481e-17), s = I(1681e3, 1795300, 2208400), n = I(43278e5, 93046e5, 66121e5), a = N(9747e-17 * Math.sqrt(2 * Math.PI * 45282e5)).mul(r.mul(2239900).add(e.x).cos()).mul(r.pow2().mul(-45282e5).exp()), o = i.mul(n.mul(2 * Math.PI).sqrt()).mul(s.mul(r).add(e).cos()).mul(r.pow2().negate().mul(n).exp());
8822
+ let r = t.mul(2 * Math.PI * 1e-9), i = I(54856e-17, 44201e-17, 52481e-17), s = I(1681e3, 1795300, 2208400), n = I(43278e5, 93046e5, 66121e5), a = _(9747e-17 * Math.sqrt(2 * Math.PI * 45282e5)).mul(r.mul(2239900).add(e.x).cos()).mul(r.pow2().mul(-45282e5).exp()), o = i.mul(n.mul(2 * Math.PI).sqrt()).mul(s.mul(r).add(e).cos()).mul(r.pow2().negate().mul(n).exp());
8823
8823
  return o = I(o.x.add(a), o.y, o.z).div(10685e-11), qk.mul(o);
8824
8824
  }, Zk = /* @__PURE__ */ V(({ outsideIOR: t, eta2: e, cosTheta1: r, thinFilmThickness: i, baseF0: s }) => {
8825
8825
  let n = gt(t, e, qn(0, 0.03, i)), a = t.div(n).pow2().mul(r.pow2().oneMinus()), o = a.oneMinus();
@@ -8828,20 +8828,20 @@ const xE = /* @__PURE__ */ V((t) => {
8828
8828
  f0: h,
8829
8829
  f90: 1,
8830
8830
  dotVH: r
8831
- }), c = u.oneMinus(), d = n.lessThan(t).select(Math.PI, 0), m = N(Math.PI).sub(d), p = Xk(s.clamp(0, 0.9999)), f = cS(p, n.toVec3()), g = yc({
8831
+ }), c = u.oneMinus(), d = n.lessThan(t).select(Math.PI, 0), m = _(Math.PI).sub(d), p = Xk(s.clamp(0, 0.9999)), f = cS(p, n.toVec3()), g = yc({
8832
8832
  f0: f,
8833
8833
  f90: 1,
8834
8834
  dotVH: l
8835
- }), y = I(p.x.lessThan(n).select(Math.PI, 0), p.y.lessThan(n).select(Math.PI, 0), p.z.lessThan(n).select(Math.PI, 0)), v = n.mul(i, l, 2), S = I(m).add(y), T = u.mul(g).clamp(1e-5, 0.9999), M = T.sqrt(), w = c.pow2().mul(g).div(I(1).sub(T)), _ = u.add(w), A = _.toVar(), B = w.sub(c).toVar();
8835
+ }), y = I(p.x.lessThan(n).select(Math.PI, 0), p.y.lessThan(n).select(Math.PI, 0), p.z.lessThan(n).select(Math.PI, 0)), v = n.mul(i, l, 2), w = I(m).add(y), T = u.mul(g).clamp(1e-5, 0.9999), M = T.sqrt(), S = c.pow2().mul(g).div(I(1).sub(T)), N = u.add(S), A = N.toVar(), U = S.sub(c).toVar();
8836
8836
  return yt({
8837
8837
  start: 1,
8838
8838
  end: 2,
8839
8839
  condition: "<=",
8840
8840
  name: "m"
8841
8841
  }, ({ m: ee }) => {
8842
- B.mulAssign(M);
8843
- let K = Yk(N(ee).mul(v), N(ee).mul(S)).mul(2);
8844
- A.addAssign(B.mul(K));
8842
+ U.mulAssign(M);
8843
+ let K = Yk(_(ee).mul(v), _(ee).mul(w)).mul(2);
8844
+ A.addAssign(U.mul(K));
8845
8845
  }), A.max(I(0));
8846
8846
  }).setLayout({
8847
8847
  name: "evalIridescence",
@@ -8869,9 +8869,9 @@ const xE = /* @__PURE__ */ V((t) => {
8869
8869
  }
8870
8870
  ]
8871
8871
  }), Jk = /* @__PURE__ */ V(({ normal: t, viewDir: e, roughness: r }) => {
8872
- let i = t.dot(e).saturate(), s = r.pow2(), n = Wr(r.lessThan(0.25), N(-339.2).mul(s).add(N(161.4).mul(r)).sub(25.9), N(-8.48).mul(s).add(N(14.3).mul(r)).sub(9.95)), a = Wr(r.lessThan(0.25), N(44).mul(s).sub(N(23.7).mul(r)).add(3.26), N(1.97).mul(s).sub(N(3.27).mul(r)).add(0.72));
8873
- return Wr(r.lessThan(0.25), 0, N(0.1).mul(r).sub(0.025)).add(n.mul(i).add(a).exp()).mul(1 / Math.PI).saturate();
8874
- }), d0 = I(0.04), m0 = N(1);
8872
+ let i = t.dot(e).saturate(), s = r.pow2(), n = Wr(r.lessThan(0.25), _(-339.2).mul(s).add(_(161.4).mul(r)).sub(25.9), _(-8.48).mul(s).add(_(14.3).mul(r)).sub(9.95)), a = Wr(r.lessThan(0.25), _(44).mul(s).sub(_(23.7).mul(r)).add(3.26), _(1.97).mul(s).sub(_(3.27).mul(r)).add(0.72));
8873
+ return Wr(r.lessThan(0.25), 0, _(0.1).mul(r).sub(0.025)).add(n.mul(i).add(a).exp()).mul(1 / Math.PI).saturate();
8874
+ }), d0 = I(0.04), m0 = _(1);
8875
8875
  var NE = class extends ty {
8876
8876
  constructor(t = !1, e = !1, r = !1, i = !1, s = !1, n = !1) {
8877
8877
  super(), this.clearcoat = t, this.sheen = e, this.iridescence = r, this.anisotropy = i, this.transmission = s, this.dispersion = n, this.clearcoatRadiance = null, this.clearcoatSpecularDirect = null, this.clearcoatSpecularIndirect = null, this.sheenSpecularDirect = null, this.sheenSpecularIndirect = null, this.iridescenceFresnel = null, this.iridescenceF0 = null;
@@ -8880,7 +8880,7 @@ var NE = class extends ty {
8880
8880
  if (this.clearcoat === !0 && (this.clearcoatRadiance = I().toVar("clearcoatRadiance"), this.clearcoatSpecularDirect = I().toVar("clearcoatSpecularDirect"), this.clearcoatSpecularIndirect = I().toVar("clearcoatSpecularIndirect")), this.sheen === !0 && (this.sheenSpecularDirect = I().toVar("sheenSpecularDirect"), this.sheenSpecularIndirect = I().toVar("sheenSpecularIndirect")), this.iridescence === !0) {
8881
8881
  let e = nr.dot($t).clamp();
8882
8882
  this.iridescenceFresnel = Zk({
8883
- outsideIOR: N(1),
8883
+ outsideIOR: _(1),
8884
8884
  eta2: V1,
8885
8885
  cosTheta1: e,
8886
8886
  thinFilmThickness: O1,
@@ -9000,8 +9000,8 @@ var NE = class extends ty {
9000
9000
  }
9001
9001
  }
9002
9002
  };
9003
- const dS = /* @__PURE__ */ N(1), wb = /* @__PURE__ */ N(-2), vp = /* @__PURE__ */ N(0.8), p0 = /* @__PURE__ */ N(-1), Tp = /* @__PURE__ */ N(0.4), f0 = /* @__PURE__ */ N(2), wp = /* @__PURE__ */ N(0.305), g0 = /* @__PURE__ */ N(3), mS = /* @__PURE__ */ N(0.21), Kk = /* @__PURE__ */ N(4), pS = /* @__PURE__ */ N(4), Qk = /* @__PURE__ */ N(16), e4 = /* @__PURE__ */ V(([t]) => {
9004
- let e = I(Lt(t)).toVar(), r = N(-1).toVar();
9003
+ const dS = /* @__PURE__ */ _(1), wb = /* @__PURE__ */ _(-2), vp = /* @__PURE__ */ _(0.8), p0 = /* @__PURE__ */ _(-1), Tp = /* @__PURE__ */ _(0.4), f0 = /* @__PURE__ */ _(2), wp = /* @__PURE__ */ _(0.305), g0 = /* @__PURE__ */ _(3), mS = /* @__PURE__ */ _(0.21), Kk = /* @__PURE__ */ _(4), pS = /* @__PURE__ */ _(4), Qk = /* @__PURE__ */ _(16), e4 = /* @__PURE__ */ V(([t]) => {
9004
+ let e = I(Lt(t)).toVar(), r = _(-1).toVar();
9005
9005
  return Ge(e.x.greaterThan(e.z), () => {
9006
9006
  Ge(e.x.greaterThan(e.y), () => {
9007
9007
  r.assign(Wr(t.x.greaterThan(0), 0, 3));
@@ -9048,7 +9048,7 @@ const dS = /* @__PURE__ */ N(1), wb = /* @__PURE__ */ N(-2), vp = /* @__PURE__ *
9048
9048
  type: "float"
9049
9049
  }]
9050
9050
  }), r4 = /* @__PURE__ */ V(([t]) => {
9051
- let e = N(0).toVar();
9051
+ let e = _(0).toVar();
9052
9052
  return Ge(t.greaterThanEqual(vp), () => {
9053
9053
  e.assign(dS.sub(t).mul(p0.sub(wb)).div(dS.sub(vp)).add(wb));
9054
9054
  }).ElseIf(t.greaterThanEqual(Tp), () => {
@@ -9058,7 +9058,7 @@ const dS = /* @__PURE__ */ N(1), wb = /* @__PURE__ */ N(-2), vp = /* @__PURE__ *
9058
9058
  }).ElseIf(t.greaterThanEqual(mS), () => {
9059
9059
  e.assign(wp.sub(t).mul(Kk.sub(g0)).div(wp.sub(mS)).add(g0));
9060
9060
  }).Else(() => {
9061
- e.assign(N(-2).mul(Ln(De(1.16, t))));
9061
+ e.assign(_(-2).mul(Ln(De(1.16, t))));
9062
9062
  }), e;
9063
9063
  }).setLayout({
9064
9064
  name: "roughnessToMip",
@@ -9095,15 +9095,15 @@ const dS = /* @__PURE__ */ N(1), wb = /* @__PURE__ */ N(-2), vp = /* @__PURE__ *
9095
9095
  type: "float"
9096
9096
  }]
9097
9097
  }), CE = /* @__PURE__ */ V(([t, e, r, i, s, n]) => {
9098
- let a = N(r), o = I(e), l = Hn(r4(a), wb, n), h = Ha(l), u = Fn(l), c = I(Sb(t, o, u, i, s, n)).toVar();
9098
+ let a = _(r), o = I(e), l = Hn(r4(a), wb, n), h = Ha(l), u = Fn(l), c = I(Sb(t, o, u, i, s, n)).toVar();
9099
9099
  return Ge(h.notEqual(0), () => {
9100
9100
  let d = I(Sb(t, o, u.add(1), i, s, n)).toVar();
9101
9101
  c.assign(gt(c, d, h));
9102
9102
  }), c;
9103
9103
  }), Sb = /* @__PURE__ */ V(([t, e, r, i, s, n]) => {
9104
- let a = N(r).toVar(), o = I(e), l = N(e4(o)).toVar(), h = N(tr(pS.sub(a), 0)).toVar();
9104
+ let a = _(r).toVar(), o = I(e), l = _(e4(o)).toVar(), h = _(tr(pS.sub(a), 0)).toVar();
9105
9105
  a.assign(tr(a, pS));
9106
- let u = N(fc(a)).toVar(), c = te(t4(o, l).mul(u.sub(2)).add(1)).toVar();
9106
+ let u = _(fc(a)).toVar(), c = te(t4(o, l).mul(u.sub(2)).add(1)).toVar();
9107
9107
  return Ge(l.greaterThan(2), () => {
9108
9108
  c.y.addAssign(u), l.subAssign(3);
9109
9109
  }), c.x.addAssign(l.mul(u)), c.x.addAssign(h.mul(De(3, Qk))), c.y.addAssign(De(4, fc(n).sub(u))), c.x.mulAssign(i), c.y.mulAssign(s), t.sample(c).grad(te(), te());
@@ -9132,7 +9132,7 @@ const dS = /* @__PURE__ */ N(1), wb = /* @__PURE__ */ N(-2), vp = /* @__PURE__ *
9132
9132
  Ge(p.greaterThanEqual(n), () => {
9133
9133
  iE();
9134
9134
  });
9135
- let f = N(a.mul(N(p))).toVar();
9135
+ let f = _(a.mul(_(p))).toVar();
9136
9136
  m.addAssign(s.element(p).mul(y0({
9137
9137
  theta: f.mul(-1),
9138
9138
  axis: d,
@@ -9338,15 +9338,15 @@ var a4 = class {
9338
9338
  p > 20 && console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);
9339
9339
  let f = [], g = 0;
9340
9340
  for (let M = 0; M < 20; ++M) {
9341
- let w = M / m, _ = Math.exp(-w * w / 2);
9342
- f.push(_), M === 0 ? g += _ : M < p && (g += 2 * _);
9341
+ let S = M / m, N = Math.exp(-S * S / 2);
9342
+ f.push(N), M === 0 ? g += N : M < p && (g += 2 * N);
9343
9343
  }
9344
9344
  for (let M = 0; M < f.length; M++) f[M] = f[M] / g;
9345
9345
  t.texture.frame = (t.texture.frame || 0) + 1, u.envMap.value = t.texture, u.samples.value = p, u.weights.array = f, u.latitudinal.value = n === "latitudinal" ? 1 : 0, a && (u.poleAxis.value = a);
9346
9346
  let { _lodMax: y } = this;
9347
9347
  u.dTheta.value = d, u.mipInt.value = y - r;
9348
- let v = this._sizeLods[i], S = 3 * v * (i > y - 4 ? i - y + 4 : 0), T = 4 * (this._cubeSize - v);
9349
- Sp(e, S, T, 3 * v, 2 * v), o.setRenderTarget(e), o.render(h, x0);
9348
+ let v = this._sizeLods[i], w = 3 * v * (i > y - 4 ? i - y + 4 : 0), T = 4 * (this._cubeSize - v);
9349
+ Sp(e, w, T, 3 * v, 2 * v), o.setRenderTarget(e), o.render(h, x0);
9350
9350
  }
9351
9351
  };
9352
9352
  function o4(t) {
@@ -9371,36 +9371,36 @@ function o4(t) {
9371
9371
  d
9372
9372
  ], p = new Float32Array(108), f = new Float32Array(72), g = new Float32Array(36);
9373
9373
  for (let v = 0; v < 6; v++) {
9374
- let S = v % 3 * 2 / 3 - 1, T = v > 2 ? 0 : -1, M = [
9375
- S,
9374
+ let w = v % 3 * 2 / 3 - 1, T = v > 2 ? 0 : -1, M = [
9375
+ w,
9376
9376
  T,
9377
9377
  0,
9378
- S + 2 / 3,
9378
+ w + 2 / 3,
9379
9379
  T,
9380
9380
  0,
9381
- S + 2 / 3,
9381
+ w + 2 / 3,
9382
9382
  T + 1,
9383
9383
  0,
9384
- S,
9384
+ w,
9385
9385
  T,
9386
9386
  0,
9387
- S + 2 / 3,
9387
+ w + 2 / 3,
9388
9388
  T + 1,
9389
9389
  0,
9390
- S,
9390
+ w,
9391
9391
  T + 1,
9392
9392
  0
9393
- ], w = n4[v];
9394
- p.set(M, 18 * w), f.set(m, 12 * w);
9395
- let _ = [
9396
- w,
9397
- w,
9398
- w,
9399
- w,
9400
- w,
9401
- w
9393
+ ], S = n4[v];
9394
+ p.set(M, 18 * S), f.set(m, 12 * S);
9395
+ let N = [
9396
+ S,
9397
+ S,
9398
+ S,
9399
+ S,
9400
+ S,
9401
+ S
9402
9402
  ];
9403
- g.set(_, 6 * w);
9403
+ g.set(N, 6 * S);
9404
9404
  }
9405
9405
  let y = new Fu();
9406
9406
  y.setAttribute("position", new vs(p, 3)), y.setAttribute("uv", new vs(f, 2)), y.setAttribute("faceIndex", new vs(g, 1)), e.push(y), s.push(new jn(y, null)), n > 4 && n--;
@@ -9431,7 +9431,7 @@ function Sv(t) {
9431
9431
  return e.depthTest = !1, e.depthWrite = !1, e.blending = 0, e.name = `PMREM_${t}`, e;
9432
9432
  }
9433
9433
  function l4(t, e, r) {
9434
- let i = Ls(Array(20).fill(0)), s = Me(new L(0, 1, 0)), n = Me(0), a = N(20), o = Me(0), l = Me(1), h = Je(null), u = Me(0), c = N(1 / e), d = N(1 / r), m = N(t), p = {
9434
+ let i = Ls(Array(20).fill(0)), s = Me(new L(0, 1, 0)), n = Me(0), a = _(20), o = Me(0), l = Me(1), h = Je(null), u = Me(0), c = _(1 / e), d = _(1 / r), m = _(t), p = {
9435
9435
  n: a,
9436
9436
  latitudinal: o,
9437
9437
  weights: i,
@@ -9557,7 +9557,7 @@ const SS = (t, e) => {
9557
9557
  };
9558
9558
  }, g4 = (t) => ({
9559
9559
  getUV: () => t,
9560
- getTextureLevel: () => N(1)
9560
+ getTextureLevel: () => _(1)
9561
9561
  }), y4 = /* @__PURE__ */ new s2();
9562
9562
  var PE = class extends or {
9563
9563
  static get type() {
@@ -9578,9 +9578,9 @@ var PE = class extends or {
9578
9578
  $i.assign(t), Qd.assign(1);
9579
9579
  }
9580
9580
  setupVariants() {
9581
- let t = this.metalnessNode ? N(this.metalnessNode) : NC;
9581
+ let t = this.metalnessNode ? _(this.metalnessNode) : NC;
9582
9582
  Jd.assign(t);
9583
- let e = this.roughnessNode ? N(this.roughnessNode) : _C;
9583
+ let e = this.roughnessNode ? _(this.roughnessNode) : _C;
9584
9584
  e = vv({ roughness: e }), Pn.assign(e), this.setupSpecular(), lt.assign(Se(lt.rgb.mul(t.oneMinus()), lt.a));
9585
9585
  }
9586
9586
  copy(t) {
@@ -9614,7 +9614,7 @@ var b4 = class extends PE {
9614
9614
  return this.dispersion > 0 || this.dispersionNode !== null;
9615
9615
  }
9616
9616
  setupSpecular() {
9617
- let t = this.iorNode ? N(this.iorNode) : UC;
9617
+ let t = this.iorNode ? _(this.iorNode) : UC;
9618
9618
  Pd.assign(t), $i.assign(gt(Xi(Y1(Pd.sub(1).div(Pd.add(1))).mul(MC), I(1)).mul(xb), lt.rgb, Jd)), Qd.assign(gt(xb, 1, Jd));
9619
9619
  }
9620
9620
  setupLightingModel() {
@@ -9622,15 +9622,15 @@ var b4 = class extends PE {
9622
9622
  }
9623
9623
  setupVariants(t) {
9624
9624
  if (super.setupVariants(t), this.useClearcoat) {
9625
- let e = this.clearcoatNode ? N(this.clearcoatNode) : CC, r = this.clearcoatRoughnessNode ? N(this.clearcoatRoughnessNode) : EC;
9625
+ let e = this.clearcoatNode ? _(this.clearcoatNode) : CC, r = this.clearcoatRoughnessNode ? _(this.clearcoatRoughnessNode) : EC;
9626
9626
  Jf.assign(e), Kd.assign(vv({ roughness: r }));
9627
9627
  }
9628
9628
  if (this.useSheen) {
9629
- let e = this.sheenNode ? I(this.sheenNode) : IC, r = this.sheenRoughnessNode ? N(this.sheenRoughnessNode) : VC;
9629
+ let e = this.sheenNode ? I(this.sheenNode) : IC, r = this.sheenRoughnessNode ? _(this.sheenRoughnessNode) : VC;
9630
9630
  wl.assign(e), Ug.assign(r);
9631
9631
  }
9632
9632
  if (this.useIridescence) {
9633
- let e = this.iridescenceNode ? N(this.iridescenceNode) : LC, r = this.iridescenceIORNode ? N(this.iridescenceIORNode) : FC, i = this.iridescenceThicknessNode ? N(this.iridescenceThicknessNode) : zC;
9633
+ let e = this.iridescenceNode ? _(this.iridescenceNode) : LC, r = this.iridescenceIORNode ? _(this.iridescenceIORNode) : FC, i = this.iridescenceThicknessNode ? _(this.iridescenceThicknessNode) : zC;
9634
9634
  Dg.assign(e), V1.assign(r), O1.assign(i);
9635
9635
  }
9636
9636
  if (this.useAnisotropy) {
@@ -9642,9 +9642,9 @@ var b4 = class extends PE {
9642
9642
  }), Kf.assign(go.pow2().mix(Pn.pow2(), 1)), Rd.assign(Sl[0].mul(e.x).add(Sl[1].mul(e.y))), Cl.assign(Sl[1].mul(e.x).sub(Sl[0].mul(e.y)));
9643
9643
  }
9644
9644
  if (this.useTransmission) {
9645
- let e = this.transmissionNode ? N(this.transmissionNode) : BC, r = this.thicknessNode ? N(this.thicknessNode) : kC, i = this.attenuationDistanceNode ? N(this.attenuationDistanceNode) : DC, s = this.attenuationColorNode ? I(this.attenuationColorNode) : $C;
9645
+ let e = this.transmissionNode ? _(this.transmissionNode) : BC, r = this.thicknessNode ? _(this.thicknessNode) : kC, i = this.attenuationDistanceNode ? _(this.attenuationDistanceNode) : DC, s = this.attenuationColorNode ? I(this.attenuationColorNode) : $C;
9646
9646
  if (eg.assign(e), L1.assign(r), F1.assign(i), z1.assign(s), this.useDispersion) {
9647
- let n = this.dispersionNode ? N(this.dispersionNode) : XC;
9647
+ let n = this.dispersionNode ? _(this.dispersionNode) : XC;
9648
9648
  B1.assign(n);
9649
9649
  }
9650
9650
  }
@@ -9666,7 +9666,7 @@ const v4 = /* @__PURE__ */ V(({ normal: t, lightDirection: e, builder: r }) => {
9666
9666
  return I(n.r);
9667
9667
  } else {
9668
9668
  let n = s.fwidth().mul(0.5);
9669
- return gt(I(0.7), I(1), qn(N(0.7).sub(n.x), N(0.7).add(n.x), s.x));
9669
+ return gt(I(0.7), I(1), qn(_(0.7).sub(n.x), _(0.7).add(n.x), s.x));
9670
9670
  }
9671
9671
  });
9672
9672
  var T4 = class extends ty {
@@ -9751,7 +9751,7 @@ var VE = class extends or {
9751
9751
  let { object: e, camera: r } = t, i = this.sizeAttenuation, { positionNode: s, rotationNode: n, scaleNode: a } = this, o = Du.mul(I(s || 0)), l = te(zs[0].xyz.length(), zs[1].xyz.length());
9752
9752
  if (a !== null && (l = l.mul(te(a))), i === !1) if (r.isPerspectiveCamera) l = l.mul(o.z.negate());
9753
9753
  else {
9754
- let d = N(2).div(Uu.element(1).element(1));
9754
+ let d = _(2).div(Uu.element(1).element(1));
9755
9755
  l = l.mul(d.mul(2));
9756
9756
  }
9757
9757
  let h = bm.xy;
@@ -9760,7 +9760,7 @@ var VE = class extends or {
9760
9760
  h = h.sub(d.sub(0.5));
9761
9761
  }
9762
9762
  h = h.mul(l);
9763
- let u = N(n || PC), c = iy(h, u);
9763
+ let u = _(n || PC), c = iy(h, u);
9764
9764
  return Se(o.xy.add(c), o.zw);
9765
9765
  }
9766
9766
  copy(t) {
@@ -9790,7 +9790,7 @@ var R4 = class extends VE {
9790
9790
  if (t.material.isNodeMaterial !== !0) return e;
9791
9791
  let { rotationNode: r, scaleNode: i, sizeNode: s } = this, n = bm.xy.toVar(), a = rc.z.div(rc.w);
9792
9792
  if (r && r.isNode) {
9793
- let l = N(r);
9793
+ let l = _(r);
9794
9794
  n.assign(iy(n, l));
9795
9795
  }
9796
9796
  let o = s === null ? qC : te(s);
@@ -9804,7 +9804,7 @@ var R4 = class extends VE {
9804
9804
  }
9805
9805
  }, P4 = class extends ty {
9806
9806
  constructor() {
9807
- super(), this.shadowNode = N(1).toVar("shadowMask");
9807
+ super(), this.shadowNode = _(1).toVar("shadowMask");
9808
9808
  }
9809
9809
  direct({ lightNode: t }) {
9810
9810
  t.shadowNode !== null && this.shadowNode.mulAssign(t.shadowNode);
@@ -10767,16 +10767,16 @@ const UE = /* @__PURE__ */ Z(hU), cU = /* @__PURE__ */ V(([t]) => {
10767
10767
  type: "vec3"
10768
10768
  }]
10769
10769
  }), gU = /* @__PURE__ */ V(([t, e, r]) => {
10770
- let i = I(t).toVar(), s = N(1.4).toVar(), n = N(0).toVar(), a = I(i).toVar();
10770
+ let i = I(t).toVar(), s = _(1.4).toVar(), n = _(0).toVar(), a = I(i).toVar();
10771
10771
  return yt({
10772
- start: N(0),
10773
- end: N(3),
10772
+ start: _(0),
10773
+ end: _(3),
10774
10774
  type: "float",
10775
10775
  condition: "<="
10776
10776
  }, () => {
10777
10777
  let o = I(fU(a.mul(2))).toVar();
10778
- i.addAssign(o.add(r.mul(N(0.1).mul(e)))), a.mulAssign(1.8), s.mulAssign(1.5), i.mulAssign(1.2);
10779
- let l = N(xa(i.z.add(xa(i.x.add(xa(i.y)))))).toVar();
10778
+ i.addAssign(o.add(r.mul(_(0.1).mul(e)))), a.mulAssign(1.8), s.mulAssign(1.5), i.mulAssign(1.2);
10779
+ let l = _(xa(i.z.add(xa(i.x.add(xa(i.y)))))).toVar();
10780
10780
  n.addAssign(l.div(s)), a.addAssign(0.14);
10781
10781
  }), n;
10782
10782
  }).setLayout({
@@ -10845,7 +10845,7 @@ var PU = class extends Ce {
10845
10845
  static get type() {
10846
10846
  return "SpriteSheetUVNode";
10847
10847
  }
10848
- constructor(t, e = Ht(), r = N(0)) {
10848
+ constructor(t, e = Ht(), r = _(0)) {
10849
10849
  super("vec2"), this.countNode = t, this.uvNode = e, this.frameNode = r;
10850
10850
  }
10851
10851
  setup() {
@@ -10858,7 +10858,7 @@ var VU = class extends Ce {
10858
10858
  static get type() {
10859
10859
  return "TriplanarTexturesNode";
10860
10860
  }
10861
- constructor(t, e = null, r = null, i = N(1), s = ar, n = Yi) {
10861
+ constructor(t, e = null, r = null, i = _(1), s = ar, n = Yi) {
10862
10862
  super("vec4"), this.textureXNode = t, this.textureYNode = e, this.textureZNode = r, this.scaleNode = i, this.positionNode = s, this.normalNode = n;
10863
10863
  }
10864
10864
  setup() {
@@ -11044,8 +11044,8 @@ const jE = (t, ...e) => X(new $U(X(t), ...e)), GU = (t, ...e) => t.isTextureNode
11044
11044
  let r = e.mul(Se(t, 1)), i = r.xy.div(r.w).mul(0.5).add(0.5).toVar();
11045
11045
  return te(i.x, i.y.oneMinus());
11046
11046
  }), WU = /* @__PURE__ */ V(([t, e, r]) => {
11047
- let i = Eo(ir(e)), s = kr(t.mul(i)).toVar(), n = ir(e, s).toVar(), a = ir(e, s.sub(kr(2, 0))).toVar(), o = ir(e, s.sub(kr(1, 0))).toVar(), l = ir(e, s.add(kr(1, 0))).toVar(), h = ir(e, s.add(kr(2, 0))).toVar(), u = ir(e, s.add(kr(0, 2))).toVar(), c = ir(e, s.add(kr(0, 1))).toVar(), d = ir(e, s.sub(kr(0, 1))).toVar(), m = ir(e, s.sub(kr(0, 2))).toVar(), p = Lt(it(N(2).mul(o).sub(a), n)).toVar(), f = Lt(it(N(2).mul(l).sub(h), n)).toVar(), g = Lt(it(N(2).mul(c).sub(u), n)).toVar(), y = Lt(it(N(2).mul(d).sub(m), n)).toVar(), v = kh(t, n, r).toVar(), S = p.lessThan(f).select(v.sub(kh(t.sub(te(N(1).div(i.x), 0)), o, r)), v.negate().add(kh(t.add(te(N(1).div(i.x), 0)), l, r))), T = g.lessThan(y).select(v.sub(kh(t.add(te(0, N(1).div(i.y))), c, r)), v.negate().add(kh(t.sub(te(0, N(1).div(i.y))), d, r)));
11048
- return Fa(Hg(S, T));
11047
+ let i = Eo(ir(e)), s = kr(t.mul(i)).toVar(), n = ir(e, s).toVar(), a = ir(e, s.sub(kr(2, 0))).toVar(), o = ir(e, s.sub(kr(1, 0))).toVar(), l = ir(e, s.add(kr(1, 0))).toVar(), h = ir(e, s.add(kr(2, 0))).toVar(), u = ir(e, s.add(kr(0, 2))).toVar(), c = ir(e, s.add(kr(0, 1))).toVar(), d = ir(e, s.sub(kr(0, 1))).toVar(), m = ir(e, s.sub(kr(0, 2))).toVar(), p = Lt(it(_(2).mul(o).sub(a), n)).toVar(), f = Lt(it(_(2).mul(l).sub(h), n)).toVar(), g = Lt(it(_(2).mul(c).sub(u), n)).toVar(), y = Lt(it(_(2).mul(d).sub(m), n)).toVar(), v = kh(t, n, r).toVar(), w = p.lessThan(f).select(v.sub(kh(t.sub(te(_(1).div(i.x), 0)), o, r)), v.negate().add(kh(t.add(te(_(1).div(i.x), 0)), l, r))), T = g.lessThan(y).select(v.sub(kh(t.add(te(0, _(1).div(i.y))), c, r)), v.negate().add(kh(t.sub(te(0, _(1).div(i.y))), d, r)));
11048
+ return Fa(Hg(w, T));
11049
11049
  });
11050
11050
  var HU = class extends Qh {
11051
11051
  constructor(t, e, r = Float32Array) {
@@ -11293,13 +11293,13 @@ const n6 = /* @__PURE__ */ ue(s6), ZE = /* @__PURE__ */ V(([t, e]) => Xi(1, t.on
11293
11293
  }), l6 = /* @__PURE__ */ V(([t]) => (Ge(t.a.equal(0), () => Se(0)), Se(t.rgb.div(t.a), t.a)), {
11294
11294
  color: "vec4",
11295
11295
  return: "vec4"
11296
- }), u6 = (...t) => (console.warn('THREE.TSL: "burn" has been renamed. Use "blendBurn" instead.'), ZE(t)), h6 = (...t) => (console.warn('THREE.TSL: "dodge" has been renamed. Use "blendDodge" instead.'), JE(t)), c6 = (...t) => (console.warn('THREE.TSL: "screen" has been renamed. Use "blendScreen" instead.'), KE(t)), d6 = (...t) => (console.warn('THREE.TSL: "overlay" has been renamed. Use "blendOverlay" instead.'), QE(t)), m6 = /* @__PURE__ */ V(([t]) => Nv(t.rgb)), p6 = /* @__PURE__ */ V(([t, e = N(1)]) => e.mix(Nv(t.rgb), t.rgb)), f6 = /* @__PURE__ */ V(([t, e = N(1)]) => {
11296
+ }), u6 = (...t) => (console.warn('THREE.TSL: "burn" has been renamed. Use "blendBurn" instead.'), ZE(t)), h6 = (...t) => (console.warn('THREE.TSL: "dodge" has been renamed. Use "blendDodge" instead.'), JE(t)), c6 = (...t) => (console.warn('THREE.TSL: "screen" has been renamed. Use "blendScreen" instead.'), KE(t)), d6 = (...t) => (console.warn('THREE.TSL: "overlay" has been renamed. Use "blendOverlay" instead.'), QE(t)), m6 = /* @__PURE__ */ V(([t]) => Nv(t.rgb)), p6 = /* @__PURE__ */ V(([t, e = _(1)]) => e.mix(Nv(t.rgb), t.rgb)), f6 = /* @__PURE__ */ V(([t, e = _(1)]) => {
11297
11297
  let r = yr(t.r, t.g, t.b).div(3), i = t.r.max(t.g.max(t.b)), s = i.sub(r).mul(e).mul(-3);
11298
11298
  return gt(t.rgb, i, s);
11299
- }), g6 = /* @__PURE__ */ V(([t, e = N(1)]) => {
11299
+ }), g6 = /* @__PURE__ */ V(([t, e = _(1)]) => {
11300
11300
  let r = I(0.57735, 0.57735, 0.57735), i = e.cos();
11301
11301
  return I(t.rgb.mul(i).add(r.cross(t.rgb).mul(e.sin()).add(r.mul(Go(r, t.rgb).mul(i.oneMinus())))));
11302
- }), Nv = (t, e = I(Pt.getLuminanceCoefficients(new L()))) => Go(t, e), y6 = /* @__PURE__ */ V(([t, e = I(1), r = I(0), i = I(1), s = N(1), n = I(Pt.getLuminanceCoefficients(new L(), _l))]) => {
11302
+ }), Nv = (t, e = I(Pt.getLuminanceCoefficients(new L()))) => Go(t, e), y6 = /* @__PURE__ */ V(([t, e = I(1), r = I(0), i = I(1), s = _(1), n = I(Pt.getLuminanceCoefficients(new L(), _l))]) => {
11303
11303
  let a = t.rgb.dot(I(n)), o = tr(t.rgb.mul(e).add(r), 0).toVar(), l = o.pow(i).toVar();
11304
11304
  return Ge(o.r.greaterThan(0), () => {
11305
11305
  o.r.assign(l.r);
@@ -11469,7 +11469,7 @@ var S6 = class extends Lo {
11469
11469
  _createMaterial() {
11470
11470
  let t = new or();
11471
11471
  t.isMeshToonOutlineMaterial = !0, t.name = "Toon_Outline", t.side = 1;
11472
- let e = Yi.negate(), r = Uu.mul(Du), i = N(1), s = r.mul(Se(ar, 1)), n = r.mul(Se(ar.add(e), 1)), a = Fa(s.sub(n));
11472
+ let e = Yi.negate(), r = Uu.mul(Du), i = _(1), s = r.mul(Se(ar, 1)), n = r.mul(Se(ar.add(e), 1)), a = Fa(s.sub(n));
11473
11473
  return t.vertexNode = s.add(a.mul(this.thicknessNode).mul(s.w).mul(i)), t.colorNode = Se(this.colorNode, this.alphaNode), t;
11474
11474
  }
11475
11475
  _getOutlineMaterial(t) {
@@ -11529,9 +11529,9 @@ const M6 = (t, e, r = new ct(0, 0, 0), i = 3e-3, s = 1) => X(new S6(t, e, X(r),
11529
11529
  }]
11530
11530
  }), N6 = /* @__PURE__ */ _i(I(1.6605, -0.1246, -0.0182), I(-0.5876, 1.1329, -0.1006), I(-0.0728, -83e-4, 1.1187)), A6 = /* @__PURE__ */ _i(I(0.6274, 0.0691, 0.0164), I(0.3293, 0.9195, 0.088), I(0.0433, 0.0113, 0.8956)), C6 = /* @__PURE__ */ V(([t]) => {
11531
11531
  let e = I(t).toVar(), r = I(e.mul(e)).toVar(), i = I(r.mul(r)).toVar();
11532
- return N(15.5).mul(i.mul(r)).sub(De(40.14, i.mul(e))).add(De(31.96, i).sub(De(6.868, r.mul(e))).add(De(0.4298, r).add(De(0.1191, e).sub(232e-5))));
11532
+ return _(15.5).mul(i.mul(r)).sub(De(40.14, i.mul(e))).add(De(31.96, i).sub(De(6.868, r.mul(e))).add(De(0.4298, r).add(De(0.1191, e).sub(232e-5))));
11533
11533
  }), aR = /* @__PURE__ */ V(([t, e]) => {
11534
- let r = I(t).toVar(), i = _i(I(0.856627153315983, 0.137318972929847, 0.11189821299995), I(0.0951212405381588, 0.761241990602591, 0.0767994186031903), I(0.0482516061458583, 0.101439036467562, 0.811302368396859)), s = _i(I(1.1271005818144368, -0.1413297634984383, -0.14132976349843826), I(-0.11060664309660323, 1.157823702216272, -0.11060664309660294), I(-0.016493938717834573, -0.016493938717834257, 1.2519364065950405)), n = N(-12.47393), a = N(4.026069);
11534
+ let r = I(t).toVar(), i = _i(I(0.856627153315983, 0.137318972929847, 0.11189821299995), I(0.0951212405381588, 0.761241990602591, 0.0767994186031903), I(0.0482516061458583, 0.101439036467562, 0.811302368396859)), s = _i(I(1.1271005818144368, -0.1413297634984383, -0.14132976349843826), I(-0.11060664309660323, 1.157823702216272, -0.11060664309660294), I(-0.016493938717834573, -0.016493938717834257, 1.2519364065950405)), n = _(-12.47393), a = _(4.026069);
11535
11535
  return r.mulAssign(e), r.assign(A6.mul(r)), r.assign(i.mul(r)), r.assign(tr(r, 1e-10)), r.assign(Ln(r)), r.assign(r.sub(n).div(a.sub(n))), r.assign(Hn(r, 0, 1)), r.assign(C6(r)), r.assign(s.mul(r)), r.assign(gn(tr(I(0), r), I(2.2))), r.assign(N6.mul(r)), r.assign(Hn(r, 0, 1)), r;
11536
11536
  }).setLayout({
11537
11537
  name: "agxToneMapping",
@@ -11544,7 +11544,7 @@ const M6 = (t, e, r = new ct(0, 0, 0), i = 3e-3, s = 1) => X(new S6(t, e, X(r),
11544
11544
  type: "float"
11545
11545
  }]
11546
11546
  }), oR = /* @__PURE__ */ V(([t, e]) => {
11547
- let r = N(0.76), i = N(0.15);
11547
+ let r = _(0.76), i = _(0.15);
11548
11548
  t = t.mul(e);
11549
11549
  let s = Xi(t.r, Xi(t.g, t.b)), n = Wr(s.lessThan(0.08), s.sub(De(6.25, s.mul(s))), 0.04);
11550
11550
  t.subAssign(n);
@@ -11655,7 +11655,7 @@ var O6 = class extends Ce {
11655
11655
  return this.value && this.value.isNode ? this.value.getNodeType(t) : "float";
11656
11656
  }
11657
11657
  setup() {
11658
- return this.value && this.value.isNode ? this.value : N();
11658
+ return this.value && this.value.isNode ? this.value : _();
11659
11659
  }
11660
11660
  serialize(t) {
11661
11661
  super.serialize(t), this.value === null ? t.value = null : this.inputType === "ArrayBuffer" ? t.value = m2(this.value) : t.value = this.value ? this.value.toJSON(t.meta).uuid : null, t.inputType = this.inputType, t.outputType = this.outputType;
@@ -11788,7 +11788,7 @@ var F6 = class extends Ce {
11788
11788
  }
11789
11789
  getDefaultOutputNode() {
11790
11790
  let t = this.getDefaultOutput().value;
11791
- return t && t.isNode ? t : N();
11791
+ return t && t.isNode ? t : _();
11792
11792
  }
11793
11793
  getDefaultOutput() {
11794
11794
  return this._exec()._output;
@@ -11860,7 +11860,7 @@ var U6 = class extends Ce {
11860
11860
  static get type() {
11861
11861
  return "RangeNode";
11862
11862
  }
11863
- constructor(t = N(), e = N()) {
11863
+ constructor(t = _(), e = _()) {
11864
11864
  super(), this.minNode = t, this.maxNode = e;
11865
11865
  }
11866
11866
  getVectorLength(t) {
@@ -11886,7 +11886,7 @@ var U6 = class extends Ce {
11886
11886
  let u = new Qh(l, 4);
11887
11887
  t.geometry.setAttribute("__range" + this.id, u), r = rg(u).convert(h);
11888
11888
  }
11889
- } else r = N(0);
11889
+ } else r = _(0);
11890
11890
  return r;
11891
11891
  }
11892
11892
  };
@@ -12176,10 +12176,10 @@ const RS = /* @__PURE__ */ new WeakMap(), pR = /* @__PURE__ */ V(({ depthTexture
12176
12176
  }, n = It("mapSize", "vec2", r).setGroup(Ae), a = te(1).div(n), o = a.x, l = a.y, h = e.xy, u = Ha(h.mul(n).add(0.5));
12177
12177
  return h.subAssign(u.mul(a)), yr(s(h, e.z), s(h.add(te(o, 0)), e.z), s(h.add(te(0, l)), e.z), s(h.add(a), e.z), gt(s(h.add(te(o.negate(), 0)), e.z), s(h.add(te(o.mul(2), 0)), e.z), u.x), gt(s(h.add(te(o.negate(), l)), e.z), s(h.add(te(o.mul(2), l)), e.z), u.x), gt(s(h.add(te(0, l.negate())), e.z), s(h.add(te(0, l.mul(2))), e.z), u.y), gt(s(h.add(te(o, l.negate())), e.z), s(h.add(te(o, l.mul(2))), e.z), u.y), gt(gt(s(h.add(te(o.negate(), l.negate())), e.z), s(h.add(te(o.mul(2), l.negate())), e.z), u.x), gt(s(h.add(te(o.negate(), l.mul(2))), e.z), s(h.add(te(o.mul(2), l.mul(2))), e.z), u.x), u.y)).mul(1 / 9);
12178
12178
  }), yR = /* @__PURE__ */ V(({ depthTexture: t, shadowCoord: e, depthLayer: r }) => {
12179
- let i = N(1).toVar(), s = Je(t).sample(e.xy);
12179
+ let i = _(1).toVar(), s = Je(t).sample(e.xy);
12180
12180
  t.isArrayTexture && (s = s.depth(r)), s = s.rg;
12181
12181
  let n = Wg(e.z, s.x);
12182
- return Ge(n.notEqual(N(1)), () => {
12182
+ return Ge(n.notEqual(_(1)), () => {
12183
12183
  let a = e.z.sub(s.x), o = tr(0, s.y.mul(s.y)), l = o.div(o.add(a.mul(a)));
12184
12184
  l = Hn(it(l, 0.3).div(0.6499999999999999)), i.assign(Hn(tr(n, l)));
12185
12185
  }), i;
@@ -12203,27 +12203,27 @@ const RS = /* @__PURE__ */ new WeakMap(), pR = /* @__PURE__ */ V(({ depthTexture
12203
12203
  (n.castShadow === !0 || n.receiveShadow && r === 3) && (i && (d2(n).useVelocity = !0), n.onBeforeShadow(t, n, o, e.camera, l, a.overrideMaterial, u), t.renderObject(n, a, o, l, h, u, ...c), n.onAfterShadow(t, n, o, e.camera, l, a.overrideMaterial, u));
12204
12204
  }, s.shadowType = r, s.useVelocity = i, PS.set(dh, s)), dh[0] = null, dh[1] = null, s;
12205
12205
  }, _D = /* @__PURE__ */ V(({ samples: t, radius: e, size: r, shadowPass: i, depthLayer: s }) => {
12206
- let n = N(0).toVar("meanVertical"), a = N(0).toVar("squareMeanVertical"), o = t.lessThanEqual(N(1)).select(N(0), N(2).div(t.sub(1))), l = t.lessThanEqual(N(1)).select(N(0), N(-1));
12206
+ let n = _(0).toVar("meanVertical"), a = _(0).toVar("squareMeanVertical"), o = t.lessThanEqual(_(1)).select(_(0), _(2).div(t.sub(1))), l = t.lessThanEqual(_(1)).select(_(0), _(-1));
12207
12207
  yt({
12208
12208
  start: E(0),
12209
12209
  end: E(t),
12210
12210
  type: "int",
12211
12211
  condition: "<"
12212
12212
  }, ({ i: u }) => {
12213
- let c = l.add(N(u).mul(o)), d = i.sample(yr(_m.xy, te(0, c).mul(e)).div(r));
12213
+ let c = l.add(_(u).mul(o)), d = i.sample(yr(_m.xy, te(0, c).mul(e)).div(r));
12214
12214
  i.value.isArrayTexture && (d = d.depth(s)), d = d.x, n.addAssign(d), a.addAssign(d.mul(d));
12215
12215
  }), n.divAssign(t), a.divAssign(t);
12216
12216
  let h = Qn(a.sub(n.mul(n)));
12217
12217
  return te(n, h);
12218
12218
  }), ND = /* @__PURE__ */ V(({ samples: t, radius: e, size: r, shadowPass: i, depthLayer: s }) => {
12219
- let n = N(0).toVar("meanHorizontal"), a = N(0).toVar("squareMeanHorizontal"), o = t.lessThanEqual(N(1)).select(N(0), N(2).div(t.sub(1))), l = t.lessThanEqual(N(1)).select(N(0), N(-1));
12219
+ let n = _(0).toVar("meanHorizontal"), a = _(0).toVar("squareMeanHorizontal"), o = t.lessThanEqual(_(1)).select(_(0), _(2).div(t.sub(1))), l = t.lessThanEqual(_(1)).select(_(0), _(-1));
12220
12220
  yt({
12221
12221
  start: E(0),
12222
12222
  end: E(t),
12223
12223
  type: "int",
12224
12224
  condition: "<"
12225
12225
  }, ({ i: u }) => {
12226
- let c = l.add(N(u).mul(o)), d = i.sample(yr(_m.xy, te(c, 0).mul(e)).div(r));
12226
+ let c = l.add(_(u).mul(o)), d = i.sample(yr(_m.xy, te(c, 0).mul(e)).div(r));
12227
12227
  i.value.isArrayTexture && (d = d.depth(s)), n.addAssign(d.x), a.addAssign(yr(d.y.mul(d.y), d.x.mul(d.x)));
12228
12228
  }), n.divAssign(t), a.divAssign(t);
12229
12229
  let h = Qn(a.sub(n.mul(n)));
@@ -12250,7 +12250,7 @@ var vR = class extends pD {
12250
12250
  shadow: s,
12251
12251
  depthLayer: n
12252
12252
  });
12253
- return a.select(o, N(1));
12253
+ return a.select(o, _(1));
12254
12254
  }
12255
12255
  setupShadowCoord(t, e) {
12256
12256
  let { shadow: r } = this, { renderer: i } = t, s = It("bias", "float", r).setGroup(Ae), n = e, a;
@@ -12301,16 +12301,16 @@ var vR = class extends pD {
12301
12301
  n.isArrayTexture && (g = g.depth(this.depthLayer));
12302
12302
  let y = Je(this.vsmShadowMapVertical.texture);
12303
12303
  n.isArrayTexture && (y = y.depth(this.depthLayer));
12304
- let v = It("blurSamples", "float", i).setGroup(Ae), S = It("radius", "float", i).setGroup(Ae), T = It("mapSize", "vec2", i).setGroup(Ae), M = this.vsmMaterialVertical || (this.vsmMaterialVertical = new or());
12304
+ let v = It("blurSamples", "float", i).setGroup(Ae), w = It("radius", "float", i).setGroup(Ae), T = It("mapSize", "vec2", i).setGroup(Ae), M = this.vsmMaterialVertical || (this.vsmMaterialVertical = new or());
12305
12305
  M.fragmentNode = _D({
12306
12306
  samples: v,
12307
- radius: S,
12307
+ radius: w,
12308
12308
  size: T,
12309
12309
  shadowPass: g,
12310
12310
  depthLayer: this.depthLayer
12311
12311
  }).context(t.getSharedContext()), M.name = "VSMVertical", M = this.vsmMaterialHorizontal || (this.vsmMaterialHorizontal = new or()), M.fragmentNode = ND({
12312
12312
  samples: v,
12313
- radius: S,
12313
+ radius: w,
12314
12314
  size: T,
12315
12315
  shadowPass: y,
12316
12316
  depthLayer: this.depthLayer
@@ -12389,7 +12389,7 @@ const TR = (t, e) => X(new vR(t, e)), CD = /* @__PURE__ */ new ct(), un = /* @__
12389
12389
  let n = It("radius", "float", s).setGroup(Ae), a = te(-1, 1).mul(n).mul(i.y);
12390
12390
  return Je(t, un(e.add(a.xyy), i.y)).compare(r).add(Je(t, un(e.add(a.yyy), i.y)).compare(r)).add(Je(t, un(e.add(a.xyx), i.y)).compare(r)).add(Je(t, un(e.add(a.yyx), i.y)).compare(r)).add(Je(t, un(e, i.y)).compare(r)).add(Je(t, un(e.add(a.xxy), i.y)).compare(r)).add(Je(t, un(e.add(a.yxy), i.y)).compare(r)).add(Je(t, un(e.add(a.xxx), i.y)).compare(r)).add(Je(t, un(e.add(a.yxx), i.y)).compare(r)).mul(1 / 9);
12391
12391
  }), ED = /* @__PURE__ */ V(({ filterFn: t, depthTexture: e, shadowCoord: r, shadow: i }) => {
12392
- let s = r.xyz.toVar(), n = s.length(), a = Me("float").setGroup(Ae).onRenderUpdate(() => i.camera.near), o = Me("float").setGroup(Ae).onRenderUpdate(() => i.camera.far), l = It("bias", "float", i).setGroup(Ae), h = Me(i.mapSize).setGroup(Ae), u = N(1).toVar();
12392
+ let s = r.xyz.toVar(), n = s.length(), a = Me("float").setGroup(Ae).onRenderUpdate(() => i.camera.near), o = Me("float").setGroup(Ae).onRenderUpdate(() => i.camera.far), l = It("bias", "float", i).setGroup(Ae), h = Me(i.mapSize).setGroup(Ae), u = _(1).toVar();
12393
12393
  return Ge(n.sub(o).lessThanEqual(0).and(n.sub(a).greaterThanEqual(0)), () => {
12394
12394
  let c = n.sub(a).div(o.sub(a)).toVar();
12395
12395
  c.addAssign(l);
@@ -12522,12 +12522,12 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12522
12522
  }), VD = V(([t = Ht()], { renderer: e, material: r }) => {
12523
12523
  let i = Z1(t.mul(2).sub(1)), s;
12524
12524
  if (r.alphaToCoverage && e.samples > 1) {
12525
- let n = N(i.fwidth()).toVar();
12525
+ let n = _(i.fwidth()).toVar();
12526
12526
  s = qn(n.oneMinus(), n.add(1), i).oneMinus();
12527
12527
  } else s = Wr(i.greaterThan(1), 0, 1);
12528
12528
  return s;
12529
12529
  }), Ld = /* @__PURE__ */ V(([t, e, r]) => {
12530
- let i = N(r).toVar(), s = N(e).toVar(), n = Wn(t).toVar();
12530
+ let i = _(r).toVar(), s = _(e).toVar(), n = Wn(t).toVar();
12531
12531
  return Wr(n, s, i);
12532
12532
  }).setLayout({
12533
12533
  name: "mx_select",
@@ -12547,7 +12547,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12547
12547
  }
12548
12548
  ]
12549
12549
  }), ag = /* @__PURE__ */ V(([t, e]) => {
12550
- let r = Wn(e).toVar(), i = N(t).toVar();
12550
+ let r = Wn(e).toVar(), i = _(t).toVar();
12551
12551
  return Wr(r, i.negate(), i);
12552
12552
  }).setLayout({
12553
12553
  name: "mx_negate_if",
@@ -12560,7 +12560,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12560
12560
  type: "bool"
12561
12561
  }]
12562
12562
  }), fr = /* @__PURE__ */ V(([t]) => {
12563
- let e = N(t).toVar();
12563
+ let e = _(t).toVar();
12564
12564
  return E(Fn(e));
12565
12565
  }).setLayout({
12566
12566
  name: "mx_floor",
@@ -12570,10 +12570,10 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12570
12570
  type: "float"
12571
12571
  }]
12572
12572
  }), jt = /* @__PURE__ */ V(([t, e]) => {
12573
- let r = N(t).toVar();
12574
- return e.assign(fr(r)), r.sub(N(e));
12573
+ let r = _(t).toVar();
12574
+ return e.assign(fr(r)), r.sub(_(e));
12575
12575
  }), OD = /* @__PURE__ */ V(([t, e, r, i, s, n]) => {
12576
- let a = N(n).toVar(), o = N(s).toVar(), l = N(i).toVar(), h = N(r).toVar(), u = N(e).toVar(), c = N(t).toVar(), d = N(it(1, o)).toVar();
12576
+ let a = _(n).toVar(), o = _(s).toVar(), l = _(i).toVar(), h = _(r).toVar(), u = _(e).toVar(), c = _(t).toVar(), d = _(it(1, o)).toVar();
12577
12577
  return it(1, a).mul(c.mul(d).add(u.mul(o))).add(a.mul(h.mul(d).add(l.mul(o))));
12578
12578
  }).setLayout({
12579
12579
  name: "mx_bilerp_0",
@@ -12605,7 +12605,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12605
12605
  }
12606
12606
  ]
12607
12607
  }), LD = /* @__PURE__ */ V(([t, e, r, i, s, n]) => {
12608
- let a = N(n).toVar(), o = N(s).toVar(), l = I(i).toVar(), h = I(r).toVar(), u = I(e).toVar(), c = I(t).toVar(), d = N(it(1, o)).toVar();
12608
+ let a = _(n).toVar(), o = _(s).toVar(), l = I(i).toVar(), h = I(r).toVar(), u = I(e).toVar(), c = I(t).toVar(), d = _(it(1, o)).toVar();
12609
12609
  return it(1, a).mul(c.mul(d).add(u.mul(o))).add(a.mul(h.mul(d).add(l.mul(o))));
12610
12610
  }).setLayout({
12611
12611
  name: "mx_bilerp_1",
@@ -12637,8 +12637,8 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12637
12637
  }
12638
12638
  ]
12639
12639
  }), NR = /* @__PURE__ */ hi([OD, LD]), FD = /* @__PURE__ */ V(([t, e, r, i, s, n, a, o, l, h, u]) => {
12640
- let c = N(u).toVar(), d = N(h).toVar(), m = N(l).toVar(), p = N(o).toVar(), f = N(a).toVar(), g = N(n).toVar(), y = N(s).toVar(), v = N(i).toVar(), S = N(r).toVar(), T = N(e).toVar(), M = N(t).toVar(), w = N(it(1, m)).toVar(), _ = N(it(1, d)).toVar();
12641
- return N(it(1, c)).toVar().mul(_.mul(M.mul(w).add(T.mul(m))).add(d.mul(S.mul(w).add(v.mul(m))))).add(c.mul(_.mul(y.mul(w).add(g.mul(m))).add(d.mul(f.mul(w).add(p.mul(m))))));
12640
+ let c = _(u).toVar(), d = _(h).toVar(), m = _(l).toVar(), p = _(o).toVar(), f = _(a).toVar(), g = _(n).toVar(), y = _(s).toVar(), v = _(i).toVar(), w = _(r).toVar(), T = _(e).toVar(), M = _(t).toVar(), S = _(it(1, m)).toVar(), N = _(it(1, d)).toVar();
12641
+ return _(it(1, c)).toVar().mul(N.mul(M.mul(S).add(T.mul(m))).add(d.mul(w.mul(S).add(v.mul(m))))).add(c.mul(N.mul(y.mul(S).add(g.mul(m))).add(d.mul(f.mul(S).add(p.mul(m))))));
12642
12642
  }).setLayout({
12643
12643
  name: "mx_trilerp_0",
12644
12644
  type: "float",
@@ -12689,8 +12689,8 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12689
12689
  }
12690
12690
  ]
12691
12691
  }), zD = /* @__PURE__ */ V(([t, e, r, i, s, n, a, o, l, h, u]) => {
12692
- let c = N(u).toVar(), d = N(h).toVar(), m = N(l).toVar(), p = I(o).toVar(), f = I(a).toVar(), g = I(n).toVar(), y = I(s).toVar(), v = I(i).toVar(), S = I(r).toVar(), T = I(e).toVar(), M = I(t).toVar(), w = N(it(1, m)).toVar(), _ = N(it(1, d)).toVar();
12693
- return N(it(1, c)).toVar().mul(_.mul(M.mul(w).add(T.mul(m))).add(d.mul(S.mul(w).add(v.mul(m))))).add(c.mul(_.mul(y.mul(w).add(g.mul(m))).add(d.mul(f.mul(w).add(p.mul(m))))));
12692
+ let c = _(u).toVar(), d = _(h).toVar(), m = _(l).toVar(), p = I(o).toVar(), f = I(a).toVar(), g = I(n).toVar(), y = I(s).toVar(), v = I(i).toVar(), w = I(r).toVar(), T = I(e).toVar(), M = I(t).toVar(), S = _(it(1, m)).toVar(), N = _(it(1, d)).toVar();
12693
+ return _(it(1, c)).toVar().mul(N.mul(M.mul(S).add(T.mul(m))).add(d.mul(w.mul(S).add(v.mul(m))))).add(c.mul(N.mul(y.mul(S).add(g.mul(m))).add(d.mul(f.mul(S).add(p.mul(m))))));
12694
12694
  }).setLayout({
12695
12695
  name: "mx_trilerp_1",
12696
12696
  type: "vec3",
@@ -12741,7 +12741,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12741
12741
  }
12742
12742
  ]
12743
12743
  }), AR = /* @__PURE__ */ hi([FD, zD]), BD = /* @__PURE__ */ V(([t, e, r]) => {
12744
- let i = N(r).toVar(), s = N(e).toVar(), n = fe(t).toVar(), a = fe(n.bitAnd(fe(7))).toVar(), o = N(Ld(a.lessThan(fe(4)), s, i)).toVar(), l = N(De(2, Ld(a.lessThan(fe(4)), i, s))).toVar();
12744
+ let i = _(r).toVar(), s = _(e).toVar(), n = fe(t).toVar(), a = fe(n.bitAnd(fe(7))).toVar(), o = _(Ld(a.lessThan(fe(4)), s, i)).toVar(), l = _(De(2, Ld(a.lessThan(fe(4)), i, s))).toVar();
12745
12745
  return ag(o, Wn(a.bitAnd(fe(1)))).add(ag(l, Wn(a.bitAnd(fe(2)))));
12746
12746
  }).setLayout({
12747
12747
  name: "mx_gradient_float_0",
@@ -12761,7 +12761,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12761
12761
  }
12762
12762
  ]
12763
12763
  }), kD = /* @__PURE__ */ V(([t, e, r, i]) => {
12764
- let s = N(i).toVar(), n = N(r).toVar(), a = N(e).toVar(), o = fe(t).toVar(), l = fe(o.bitAnd(fe(15))).toVar(), h = N(Ld(l.lessThan(fe(8)), a, n)).toVar(), u = N(Ld(l.lessThan(fe(4)), n, Ld(l.equal(fe(12)).or(l.equal(fe(14))), a, s))).toVar();
12764
+ let s = _(i).toVar(), n = _(r).toVar(), a = _(e).toVar(), o = fe(t).toVar(), l = fe(o.bitAnd(fe(15))).toVar(), h = _(Ld(l.lessThan(fe(8)), a, n)).toVar(), u = _(Ld(l.lessThan(fe(4)), n, Ld(l.equal(fe(12)).or(l.equal(fe(14))), a, s))).toVar();
12765
12765
  return ag(h, Wn(l.bitAnd(fe(1)))).add(ag(u, Wn(l.bitAnd(fe(2)))));
12766
12766
  }).setLayout({
12767
12767
  name: "mx_gradient_float_1",
@@ -12785,7 +12785,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12785
12785
  }
12786
12786
  ]
12787
12787
  }), ei = /* @__PURE__ */ hi([BD, kD]), UD = /* @__PURE__ */ V(([t, e, r]) => {
12788
- let i = N(r).toVar(), s = N(e).toVar(), n = Cc(t).toVar();
12788
+ let i = _(r).toVar(), s = _(e).toVar(), n = Cc(t).toVar();
12789
12789
  return I(ei(n.x, s, i), ei(n.y, s, i), ei(n.z, s, i));
12790
12790
  }).setLayout({
12791
12791
  name: "mx_gradient_vec3_0",
@@ -12805,7 +12805,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12805
12805
  }
12806
12806
  ]
12807
12807
  }), DD = /* @__PURE__ */ V(([t, e, r, i]) => {
12808
- let s = N(i).toVar(), n = N(r).toVar(), a = N(e).toVar(), o = Cc(t).toVar();
12808
+ let s = _(i).toVar(), n = _(r).toVar(), a = _(e).toVar(), o = Cc(t).toVar();
12809
12809
  return I(ei(o.x, a, n, s), ei(o.y, a, n, s), ei(o.z, a, n, s));
12810
12810
  }).setLayout({
12811
12811
  name: "mx_gradient_vec3_1",
@@ -12829,7 +12829,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12829
12829
  }
12830
12830
  ]
12831
12831
  }), Es = /* @__PURE__ */ hi([UD, DD]), $D = /* @__PURE__ */ V(([t]) => {
12832
- let e = N(t).toVar();
12832
+ let e = _(t).toVar();
12833
12833
  return De(0.6616, e);
12834
12834
  }).setLayout({
12835
12835
  name: "mx_gradient_scale2d_0",
@@ -12839,7 +12839,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12839
12839
  type: "float"
12840
12840
  }]
12841
12841
  }), GD = /* @__PURE__ */ V(([t]) => {
12842
- let e = N(t).toVar();
12842
+ let e = _(t).toVar();
12843
12843
  return De(0.982, e);
12844
12844
  }).setLayout({
12845
12845
  name: "mx_gradient_scale3d_0",
@@ -12905,7 +12905,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12905
12905
  ]
12906
12906
  }), wi = /* @__PURE__ */ V(([t]) => {
12907
12907
  let e = fe(t).toVar();
12908
- return N(e).div(N(fe(E(4294967295))));
12908
+ return _(e).div(_(fe(E(4294967295))));
12909
12909
  }).setLayout({
12910
12910
  name: "mx_bits_to_01",
12911
12911
  type: "float",
@@ -12914,7 +12914,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
12914
12914
  type: "uint"
12915
12915
  }]
12916
12916
  }), Bn = /* @__PURE__ */ V(([t]) => {
12917
- let e = N(t).toVar();
12917
+ let e = _(t).toVar();
12918
12918
  return e.mul(e).mul(e).mul(e.mul(e.mul(6).sub(15)).add(10));
12919
12919
  }).setLayout({
12920
12920
  name: "mx_fade",
@@ -13058,7 +13058,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13058
13058
  }
13059
13059
  ]
13060
13060
  }), Rs = /* @__PURE__ */ hi([JD, KD]), QD = /* @__PURE__ */ V(([t]) => {
13061
- let e = te(t).toVar(), r = E().toVar(), i = E().toVar(), s = N(jt(e.x, r)).toVar(), n = N(jt(e.y, i)).toVar(), a = N(Bn(s)).toVar(), o = N(Bn(n)).toVar(), l = N(NR(ei(wt(r, i), s, n), ei(wt(r.add(E(1)), i), s.sub(1), n), ei(wt(r, i.add(E(1))), s, n.sub(1)), ei(wt(r.add(E(1)), i.add(E(1))), s.sub(1), n.sub(1)), a, o)).toVar();
13061
+ let e = te(t).toVar(), r = E().toVar(), i = E().toVar(), s = _(jt(e.x, r)).toVar(), n = _(jt(e.y, i)).toVar(), a = _(Bn(s)).toVar(), o = _(Bn(n)).toVar(), l = _(NR(ei(wt(r, i), s, n), ei(wt(r.add(E(1)), i), s.sub(1), n), ei(wt(r, i.add(E(1))), s, n.sub(1)), ei(wt(r.add(E(1)), i.add(E(1))), s.sub(1), n.sub(1)), a, o)).toVar();
13062
13062
  return CR(l);
13063
13063
  }).setLayout({
13064
13064
  name: "mx_perlin_noise_float_0",
@@ -13068,7 +13068,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13068
13068
  type: "vec2"
13069
13069
  }]
13070
13070
  }), e8 = /* @__PURE__ */ V(([t]) => {
13071
- let e = I(t).toVar(), r = E().toVar(), i = E().toVar(), s = E().toVar(), n = N(jt(e.x, r)).toVar(), a = N(jt(e.y, i)).toVar(), o = N(jt(e.z, s)).toVar(), l = N(Bn(n)).toVar(), h = N(Bn(a)).toVar(), u = N(Bn(o)).toVar(), c = N(AR(ei(wt(r, i, s), n, a, o), ei(wt(r.add(E(1)), i, s), n.sub(1), a, o), ei(wt(r, i.add(E(1)), s), n, a.sub(1), o), ei(wt(r.add(E(1)), i.add(E(1)), s), n.sub(1), a.sub(1), o), ei(wt(r, i, s.add(E(1))), n, a, o.sub(1)), ei(wt(r.add(E(1)), i, s.add(E(1))), n.sub(1), a, o.sub(1)), ei(wt(r, i.add(E(1)), s.add(E(1))), n, a.sub(1), o.sub(1)), ei(wt(r.add(E(1)), i.add(E(1)), s.add(E(1))), n.sub(1), a.sub(1), o.sub(1)), l, h, u)).toVar();
13071
+ let e = I(t).toVar(), r = E().toVar(), i = E().toVar(), s = E().toVar(), n = _(jt(e.x, r)).toVar(), a = _(jt(e.y, i)).toVar(), o = _(jt(e.z, s)).toVar(), l = _(Bn(n)).toVar(), h = _(Bn(a)).toVar(), u = _(Bn(o)).toVar(), c = _(AR(ei(wt(r, i, s), n, a, o), ei(wt(r.add(E(1)), i, s), n.sub(1), a, o), ei(wt(r, i.add(E(1)), s), n, a.sub(1), o), ei(wt(r.add(E(1)), i.add(E(1)), s), n.sub(1), a.sub(1), o), ei(wt(r, i, s.add(E(1))), n, a, o.sub(1)), ei(wt(r.add(E(1)), i, s.add(E(1))), n.sub(1), a, o.sub(1)), ei(wt(r, i.add(E(1)), s.add(E(1))), n, a.sub(1), o.sub(1)), ei(wt(r.add(E(1)), i.add(E(1)), s.add(E(1))), n.sub(1), a.sub(1), o.sub(1)), l, h, u)).toVar();
13072
13072
  return ER(c);
13073
13073
  }).setLayout({
13074
13074
  name: "mx_perlin_noise_float_1",
@@ -13078,7 +13078,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13078
13078
  type: "vec3"
13079
13079
  }]
13080
13080
  }), zv = /* @__PURE__ */ hi([QD, e8]), t8 = /* @__PURE__ */ V(([t]) => {
13081
- let e = te(t).toVar(), r = E().toVar(), i = E().toVar(), s = N(jt(e.x, r)).toVar(), n = N(jt(e.y, i)).toVar(), a = N(Bn(s)).toVar(), o = N(Bn(n)).toVar(), l = I(NR(Es(Rs(r, i), s, n), Es(Rs(r.add(E(1)), i), s.sub(1), n), Es(Rs(r, i.add(E(1))), s, n.sub(1)), Es(Rs(r.add(E(1)), i.add(E(1))), s.sub(1), n.sub(1)), a, o)).toVar();
13081
+ let e = te(t).toVar(), r = E().toVar(), i = E().toVar(), s = _(jt(e.x, r)).toVar(), n = _(jt(e.y, i)).toVar(), a = _(Bn(s)).toVar(), o = _(Bn(n)).toVar(), l = I(NR(Es(Rs(r, i), s, n), Es(Rs(r.add(E(1)), i), s.sub(1), n), Es(Rs(r, i.add(E(1))), s, n.sub(1)), Es(Rs(r.add(E(1)), i.add(E(1))), s.sub(1), n.sub(1)), a, o)).toVar();
13082
13082
  return CR(l);
13083
13083
  }).setLayout({
13084
13084
  name: "mx_perlin_noise_vec3_0",
@@ -13088,7 +13088,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13088
13088
  type: "vec2"
13089
13089
  }]
13090
13090
  }), r8 = /* @__PURE__ */ V(([t]) => {
13091
- let e = I(t).toVar(), r = E().toVar(), i = E().toVar(), s = E().toVar(), n = N(jt(e.x, r)).toVar(), a = N(jt(e.y, i)).toVar(), o = N(jt(e.z, s)).toVar(), l = N(Bn(n)).toVar(), h = N(Bn(a)).toVar(), u = N(Bn(o)).toVar(), c = I(AR(Es(Rs(r, i, s), n, a, o), Es(Rs(r.add(E(1)), i, s), n.sub(1), a, o), Es(Rs(r, i.add(E(1)), s), n, a.sub(1), o), Es(Rs(r.add(E(1)), i.add(E(1)), s), n.sub(1), a.sub(1), o), Es(Rs(r, i, s.add(E(1))), n, a, o.sub(1)), Es(Rs(r.add(E(1)), i, s.add(E(1))), n.sub(1), a, o.sub(1)), Es(Rs(r, i.add(E(1)), s.add(E(1))), n, a.sub(1), o.sub(1)), Es(Rs(r.add(E(1)), i.add(E(1)), s.add(E(1))), n.sub(1), a.sub(1), o.sub(1)), l, h, u)).toVar();
13091
+ let e = I(t).toVar(), r = E().toVar(), i = E().toVar(), s = E().toVar(), n = _(jt(e.x, r)).toVar(), a = _(jt(e.y, i)).toVar(), o = _(jt(e.z, s)).toVar(), l = _(Bn(n)).toVar(), h = _(Bn(a)).toVar(), u = _(Bn(o)).toVar(), c = I(AR(Es(Rs(r, i, s), n, a, o), Es(Rs(r.add(E(1)), i, s), n.sub(1), a, o), Es(Rs(r, i.add(E(1)), s), n, a.sub(1), o), Es(Rs(r.add(E(1)), i.add(E(1)), s), n.sub(1), a.sub(1), o), Es(Rs(r, i, s.add(E(1))), n, a, o.sub(1)), Es(Rs(r.add(E(1)), i, s.add(E(1))), n.sub(1), a, o.sub(1)), Es(Rs(r, i.add(E(1)), s.add(E(1))), n, a.sub(1), o.sub(1)), Es(Rs(r.add(E(1)), i.add(E(1)), s.add(E(1))), n.sub(1), a.sub(1), o.sub(1)), l, h, u)).toVar();
13092
13092
  return ER(c);
13093
13093
  }).setLayout({
13094
13094
  name: "mx_perlin_noise_vec3_1",
@@ -13098,7 +13098,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13098
13098
  type: "vec3"
13099
13099
  }]
13100
13100
  }), Bv = /* @__PURE__ */ hi([t8, r8]), i8 = /* @__PURE__ */ V(([t]) => {
13101
- let e = N(t).toVar(), r = E(fr(e)).toVar();
13101
+ let e = _(t).toVar(), r = E(fr(e)).toVar();
13102
13102
  return wi(wt(r));
13103
13103
  }).setLayout({
13104
13104
  name: "mx_cell_noise_float_0",
@@ -13143,7 +13143,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13143
13143
  n8,
13144
13144
  a8
13145
13145
  ]), l8 = /* @__PURE__ */ V(([t]) => {
13146
- let e = N(t).toVar(), r = E(fr(e)).toVar();
13146
+ let e = _(t).toVar(), r = E(fr(e)).toVar();
13147
13147
  return I(wi(wt(r, E(0))), wi(wt(r, E(1))), wi(wt(r, E(2))));
13148
13148
  }).setLayout({
13149
13149
  name: "mx_cell_noise_vec3_0",
@@ -13188,7 +13188,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13188
13188
  h8,
13189
13189
  c8
13190
13190
  ]), og = /* @__PURE__ */ V(([t, e, r, i]) => {
13191
- let s = N(i).toVar(), n = N(r).toVar(), a = E(e).toVar(), o = I(t).toVar(), l = N(0).toVar(), h = N(1).toVar();
13191
+ let s = _(i).toVar(), n = _(r).toVar(), a = E(e).toVar(), o = I(t).toVar(), l = _(0).toVar(), h = _(1).toVar();
13192
13192
  return yt(a, () => {
13193
13193
  l.addAssign(h.mul(zv(o))), h.mulAssign(s), o.mulAssign(n);
13194
13194
  }), l;
@@ -13214,7 +13214,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13214
13214
  }
13215
13215
  ]
13216
13216
  }), IR = /* @__PURE__ */ V(([t, e, r, i]) => {
13217
- let s = N(i).toVar(), n = N(r).toVar(), a = E(e).toVar(), o = I(t).toVar(), l = I(0).toVar(), h = N(1).toVar();
13217
+ let s = _(i).toVar(), n = _(r).toVar(), a = E(e).toVar(), o = I(t).toVar(), l = I(0).toVar(), h = _(1).toVar();
13218
13218
  return yt(a, () => {
13219
13219
  l.addAssign(h.mul(Bv(o))), h.mulAssign(s), o.mulAssign(n);
13220
13220
  }), l;
@@ -13240,7 +13240,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13240
13240
  }
13241
13241
  ]
13242
13242
  }), d8 = /* @__PURE__ */ V(([t, e, r, i]) => {
13243
- let s = N(i).toVar(), n = N(r).toVar(), a = E(e).toVar(), o = I(t).toVar();
13243
+ let s = _(i).toVar(), n = _(r).toVar(), a = E(e).toVar(), o = I(t).toVar();
13244
13244
  return te(og(o, a, n, s), og(o.add(I(E(19), E(193), E(17))), a, n, s));
13245
13245
  }).setLayout({
13246
13246
  name: "mx_fractal_noise_vec2",
@@ -13264,7 +13264,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13264
13264
  }
13265
13265
  ]
13266
13266
  }), m8 = /* @__PURE__ */ V(([t, e, r, i]) => {
13267
- let s = N(i).toVar(), n = N(r).toVar(), a = E(e).toVar(), o = I(t).toVar(), l = I(IR(o, a, n, s)).toVar(), h = N(og(o.add(I(E(19), E(193), E(17))), a, n, s)).toVar();
13267
+ let s = _(i).toVar(), n = _(r).toVar(), a = E(e).toVar(), o = I(t).toVar(), l = I(IR(o, a, n, s)).toVar(), h = _(og(o.add(I(E(19), E(193), E(17))), a, n, s)).toVar();
13268
13268
  return Se(l, h);
13269
13269
  }).setLayout({
13270
13270
  name: "mx_fractal_noise_vec4",
@@ -13288,9 +13288,9 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13288
13288
  }
13289
13289
  ]
13290
13290
  }), p8 = /* @__PURE__ */ V(([t, e, r, i, s, n, a]) => {
13291
- let o = E(a).toVar(), l = N(n).toVar(), h = E(s).toVar(), u = E(i).toVar(), c = E(r).toVar(), d = E(e).toVar(), m = te(t).toVar(), p = I(PR(te(d.add(u), c.add(h)))).toVar(), f = te(p.x, p.y).toVar();
13291
+ let o = E(a).toVar(), l = _(n).toVar(), h = E(s).toVar(), u = E(i).toVar(), c = E(r).toVar(), d = E(e).toVar(), m = te(t).toVar(), p = I(PR(te(d.add(u), c.add(h)))).toVar(), f = te(p.x, p.y).toVar();
13292
13292
  f.subAssign(0.5), f.mulAssign(l), f.addAssign(0.5);
13293
- let g = te(te(N(d), N(c)).add(f)).toVar(), y = te(g.sub(m)).toVar();
13293
+ let g = te(te(_(d), _(c)).add(f)).toVar(), y = te(g.sub(m)).toVar();
13294
13294
  return Ge(o.equal(E(2)), () => Lt(y.x).add(Lt(y.y))), Ge(o.equal(E(3)), () => tr(Lt(y.x), Lt(y.y))), Go(y, y);
13295
13295
  }).setLayout({
13296
13296
  name: "mx_worley_distance_0",
@@ -13326,9 +13326,9 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13326
13326
  }
13327
13327
  ]
13328
13328
  }), f8 = /* @__PURE__ */ V(([t, e, r, i, s, n, a, o, l]) => {
13329
- let h = E(l).toVar(), u = N(o).toVar(), c = E(a).toVar(), d = E(n).toVar(), m = E(s).toVar(), p = E(i).toVar(), f = E(r).toVar(), g = E(e).toVar(), y = I(t).toVar(), v = I(PR(I(g.add(m), f.add(d), p.add(c)))).toVar();
13329
+ let h = E(l).toVar(), u = _(o).toVar(), c = E(a).toVar(), d = E(n).toVar(), m = E(s).toVar(), p = E(i).toVar(), f = E(r).toVar(), g = E(e).toVar(), y = I(t).toVar(), v = I(PR(I(g.add(m), f.add(d), p.add(c)))).toVar();
13330
13330
  v.subAssign(0.5), v.mulAssign(u), v.addAssign(0.5);
13331
- let S = I(I(N(g), N(f), N(p)).add(v)).toVar(), T = I(S.sub(y)).toVar();
13331
+ let w = I(I(_(g), _(f), _(p)).add(v)).toVar(), T = I(w.sub(y)).toVar();
13332
13332
  return Ge(h.equal(E(2)), () => Lt(T.x).add(Lt(T.y)).add(Lt(T.z))), Ge(h.equal(E(3)), () => tr(Lt(T.x), Lt(T.y), Lt(T.z))), Go(T, T);
13333
13333
  }).setLayout({
13334
13334
  name: "mx_worley_distance_1",
@@ -13372,7 +13372,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13372
13372
  }
13373
13373
  ]
13374
13374
  }), Rc = /* @__PURE__ */ hi([p8, f8]), g8 = /* @__PURE__ */ V(([t, e, r]) => {
13375
- let i = E(r).toVar(), s = N(e).toVar(), n = te(t).toVar(), a = E().toVar(), o = E().toVar(), l = te(jt(n.x, a), jt(n.y, o)).toVar(), h = N(1e6).toVar();
13375
+ let i = E(r).toVar(), s = _(e).toVar(), n = te(t).toVar(), a = E().toVar(), o = E().toVar(), l = te(jt(n.x, a), jt(n.y, o)).toVar(), h = _(1e6).toVar();
13376
13376
  return yt({
13377
13377
  start: -1,
13378
13378
  end: E(1),
@@ -13385,7 +13385,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13385
13385
  name: "y",
13386
13386
  condition: "<="
13387
13387
  }, ({ y: c }) => {
13388
- let d = N(Rc(l, u, c, a, o, s, i)).toVar();
13388
+ let d = _(Rc(l, u, c, a, o, s, i)).toVar();
13389
13389
  h.assign(Xi(h, d));
13390
13390
  });
13391
13391
  }), Ge(i.equal(E(0)), () => {
@@ -13409,7 +13409,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13409
13409
  }
13410
13410
  ]
13411
13411
  }), y8 = /* @__PURE__ */ V(([t, e, r]) => {
13412
- let i = E(r).toVar(), s = N(e).toVar(), n = te(t).toVar(), a = E().toVar(), o = E().toVar(), l = te(jt(n.x, a), jt(n.y, o)).toVar(), h = te(1e6, 1e6).toVar();
13412
+ let i = E(r).toVar(), s = _(e).toVar(), n = te(t).toVar(), a = E().toVar(), o = E().toVar(), l = te(jt(n.x, a), jt(n.y, o)).toVar(), h = te(1e6, 1e6).toVar();
13413
13413
  return yt({
13414
13414
  start: -1,
13415
13415
  end: E(1),
@@ -13422,7 +13422,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13422
13422
  name: "y",
13423
13423
  condition: "<="
13424
13424
  }, ({ y: c }) => {
13425
- let d = N(Rc(l, u, c, a, o, s, i)).toVar();
13425
+ let d = _(Rc(l, u, c, a, o, s, i)).toVar();
13426
13426
  Ge(d.lessThan(h.x), () => {
13427
13427
  h.y.assign(h.x), h.x.assign(d);
13428
13428
  }).ElseIf(d.lessThan(h.y), () => {
@@ -13450,7 +13450,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13450
13450
  }
13451
13451
  ]
13452
13452
  }), x8 = /* @__PURE__ */ V(([t, e, r]) => {
13453
- let i = E(r).toVar(), s = N(e).toVar(), n = te(t).toVar(), a = E().toVar(), o = E().toVar(), l = te(jt(n.x, a), jt(n.y, o)).toVar(), h = I(1e6, 1e6, 1e6).toVar();
13453
+ let i = E(r).toVar(), s = _(e).toVar(), n = te(t).toVar(), a = E().toVar(), o = E().toVar(), l = te(jt(n.x, a), jt(n.y, o)).toVar(), h = I(1e6, 1e6, 1e6).toVar();
13454
13454
  return yt({
13455
13455
  start: -1,
13456
13456
  end: E(1),
@@ -13463,7 +13463,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13463
13463
  name: "y",
13464
13464
  condition: "<="
13465
13465
  }, ({ y: c }) => {
13466
- let d = N(Rc(l, u, c, a, o, s, i)).toVar();
13466
+ let d = _(Rc(l, u, c, a, o, s, i)).toVar();
13467
13467
  Ge(d.lessThan(h.x), () => {
13468
13468
  h.z.assign(h.y), h.y.assign(h.x), h.x.assign(d);
13469
13469
  }).ElseIf(d.lessThan(h.y), () => {
@@ -13493,7 +13493,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13493
13493
  }
13494
13494
  ]
13495
13495
  }), b8 = /* @__PURE__ */ V(([t, e, r]) => {
13496
- let i = E(r).toVar(), s = N(e).toVar(), n = I(t).toVar(), a = E().toVar(), o = E().toVar(), l = E().toVar(), h = I(jt(n.x, a), jt(n.y, o), jt(n.z, l)).toVar(), u = N(1e6).toVar();
13496
+ let i = E(r).toVar(), s = _(e).toVar(), n = I(t).toVar(), a = E().toVar(), o = E().toVar(), l = E().toVar(), h = I(jt(n.x, a), jt(n.y, o), jt(n.z, l)).toVar(), u = _(1e6).toVar();
13497
13497
  return yt({
13498
13498
  start: -1,
13499
13499
  end: E(1),
@@ -13512,7 +13512,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13512
13512
  name: "z",
13513
13513
  condition: "<="
13514
13514
  }, ({ z: m }) => {
13515
- let p = N(Rc(h, c, d, m, a, o, l, s, i)).toVar();
13515
+ let p = _(Rc(h, c, d, m, a, o, l, s, i)).toVar();
13516
13516
  u.assign(Xi(u, p));
13517
13517
  });
13518
13518
  });
@@ -13537,7 +13537,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13537
13537
  }
13538
13538
  ]
13539
13539
  }), v8 = /* @__PURE__ */ hi([g8, b8]), T8 = /* @__PURE__ */ V(([t, e, r]) => {
13540
- let i = E(r).toVar(), s = N(e).toVar(), n = I(t).toVar(), a = E().toVar(), o = E().toVar(), l = E().toVar(), h = I(jt(n.x, a), jt(n.y, o), jt(n.z, l)).toVar(), u = te(1e6, 1e6).toVar();
13540
+ let i = E(r).toVar(), s = _(e).toVar(), n = I(t).toVar(), a = E().toVar(), o = E().toVar(), l = E().toVar(), h = I(jt(n.x, a), jt(n.y, o), jt(n.z, l)).toVar(), u = te(1e6, 1e6).toVar();
13541
13541
  return yt({
13542
13542
  start: -1,
13543
13543
  end: E(1),
@@ -13556,7 +13556,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13556
13556
  name: "z",
13557
13557
  condition: "<="
13558
13558
  }, ({ z: m }) => {
13559
- let p = N(Rc(h, c, d, m, a, o, l, s, i)).toVar();
13559
+ let p = _(Rc(h, c, d, m, a, o, l, s, i)).toVar();
13560
13560
  Ge(p.lessThan(u.x), () => {
13561
13561
  u.y.assign(u.x), u.x.assign(p);
13562
13562
  }).ElseIf(p.lessThan(u.y), () => {
@@ -13585,7 +13585,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13585
13585
  }
13586
13586
  ]
13587
13587
  }), w8 = /* @__PURE__ */ hi([y8, T8]), S8 = /* @__PURE__ */ V(([t, e, r]) => {
13588
- let i = E(r).toVar(), s = N(e).toVar(), n = I(t).toVar(), a = E().toVar(), o = E().toVar(), l = E().toVar(), h = I(jt(n.x, a), jt(n.y, o), jt(n.z, l)).toVar(), u = I(1e6, 1e6, 1e6).toVar();
13588
+ let i = E(r).toVar(), s = _(e).toVar(), n = I(t).toVar(), a = E().toVar(), o = E().toVar(), l = E().toVar(), h = I(jt(n.x, a), jt(n.y, o), jt(n.z, l)).toVar(), u = I(1e6, 1e6, 1e6).toVar();
13589
13589
  return yt({
13590
13590
  start: -1,
13591
13591
  end: E(1),
@@ -13604,7 +13604,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13604
13604
  name: "z",
13605
13605
  condition: "<="
13606
13606
  }, ({ z: m }) => {
13607
- let p = N(Rc(h, c, d, m, a, o, l, s, i)).toVar();
13607
+ let p = _(Rc(h, c, d, m, a, o, l, s, i)).toVar();
13608
13608
  Ge(p.lessThan(u.x), () => {
13609
13609
  u.z.assign(u.y), u.y.assign(u.x), u.x.assign(p);
13610
13610
  }).ElseIf(p.lessThan(u.y), () => {
@@ -13641,7 +13641,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13641
13641
  }).Else(() => {
13642
13642
  let s = t.x;
13643
13643
  s = s.sub(Fn(s)).mul(6).toVar();
13644
- let n = E(X1(s)), a = s.sub(N(n)), o = r.mul(e.oneMinus()), l = r.mul(e.mul(a).oneMinus()), h = r.mul(e.mul(a.oneMinus()).oneMinus());
13644
+ let n = E(X1(s)), a = s.sub(_(n)), o = r.mul(e.oneMinus()), l = r.mul(e.mul(a).oneMinus()), h = r.mul(e.mul(a.oneMinus()).oneMinus());
13645
13645
  Ge(n.equal(E(0)), () => {
13646
13646
  i.assign(I(r, h, o));
13647
13647
  }).ElseIf(n.equal(E(1)), () => {
@@ -13664,7 +13664,7 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13664
13664
  type: "vec3"
13665
13665
  }]
13666
13666
  }), N8 = /* @__PURE__ */ V(([t]) => {
13667
- let e = I(t).toVar(), r = N(e.x).toVar(), i = N(e.y).toVar(), s = N(e.z).toVar(), n = N(Xi(r, Xi(i, s))).toVar(), a = N(tr(r, tr(i, s))).toVar(), o = N(a.sub(n)).toVar(), l = N().toVar(), h = N().toVar(), u = N().toVar();
13667
+ let e = I(t).toVar(), r = _(e.x).toVar(), i = _(e.y).toVar(), s = _(e.z).toVar(), n = _(Xi(r, Xi(i, s))).toVar(), a = _(tr(r, tr(i, s))).toVar(), o = _(a.sub(n)).toVar(), l = _().toVar(), h = _().toVar(), u = _().toVar();
13668
13668
  return u.assign(a), Ge(a.greaterThan(0), () => {
13669
13669
  h.assign(o.div(a));
13670
13670
  }).Else(() => {
@@ -13700,12 +13700,12 @@ const ID = /* @__PURE__ */ V(([t = Ht()]) => {
13700
13700
  type: "vec3"
13701
13701
  }]
13702
13702
  }), VR = (t, e) => {
13703
- t = N(t), e = N(e);
13703
+ t = _(t), e = _(e);
13704
13704
  let r = te(e.dFdx(), e.dFdy()).length().mul(0.7071067811865476);
13705
13705
  return qn(t.sub(r), t.add(r), e);
13706
- }, OR = (t, e, r, i) => gt(t, e, r[i].clamp()), C8 = (t, e, r = Ht()) => OR(t, e, r, "x"), E8 = (t, e, r = Ht()) => OR(t, e, r, "y"), LR = (t, e, r, i, s) => gt(t, e, VR(r, i[s])), R8 = (t, e, r, i = Ht()) => LR(t, e, r, i, "x"), P8 = (t, e, r, i = Ht()) => LR(t, e, r, i, "y"), I8 = (t = 1, e = 0, r = Ht()) => r.mul(t).add(e), V8 = (t, e = 1) => (t = N(t), t.abs().pow(e).mul(t.sign())), O8 = (t, e = 1, r = 0.5) => N(t).sub(r).mul(e).add(r), L8 = (t = Ht(), e = 1, r = 0) => zv(t.convert("vec2|vec3")).mul(e).add(r), F8 = (t = Ht(), e = 1, r = 0) => Bv(t.convert("vec2|vec3")).mul(e).add(r), z8 = (t = Ht(), e = 1, r = 0) => (t = t.convert("vec2|vec3"), Se(Bv(t), zv(t.add(te(19, 73)))).mul(e).add(r)), B8 = (t = Ht(), e = 1) => v8(t.convert("vec2|vec3"), e, E(1)), k8 = (t = Ht(), e = 1) => w8(t.convert("vec2|vec3"), e, E(1)), U8 = (t = Ht(), e = 1) => M8(t.convert("vec2|vec3"), e, E(1)), D8 = (t = Ht()) => o8(t.convert("vec2|vec3")), $8 = (t = Ht(), e = 3, r = 2, i = 0.5, s = 1) => og(t, E(e), r, i).mul(s), G8 = (t = Ht(), e = 3, r = 2, i = 0.5, s = 1) => d8(t, E(e), r, i).mul(s), j8 = (t = Ht(), e = 3, r = 2, i = 0.5, s = 1) => IR(t, E(e), r, i).mul(s), W8 = (t = Ht(), e = 3, r = 2, i = 0.5, s = 1) => m8(t, E(e), r, i).mul(s), H8 = /* @__PURE__ */ V(([t, e, r]) => {
13707
- let i = Fa(t).toVar(), s = it(N(0.5).mul(e.sub(r)), Ea).div(i).toVar(), n = it(N(-0.5).mul(e.sub(r)), Ea).div(i).toVar(), a = I().toVar();
13708
- a.x = i.x.greaterThan(N(0)).select(s.x, n.x), a.y = i.y.greaterThan(N(0)).select(s.y, n.y), a.z = i.z.greaterThan(N(0)).select(s.z, n.z);
13706
+ }, OR = (t, e, r, i) => gt(t, e, r[i].clamp()), C8 = (t, e, r = Ht()) => OR(t, e, r, "x"), E8 = (t, e, r = Ht()) => OR(t, e, r, "y"), LR = (t, e, r, i, s) => gt(t, e, VR(r, i[s])), R8 = (t, e, r, i = Ht()) => LR(t, e, r, i, "x"), P8 = (t, e, r, i = Ht()) => LR(t, e, r, i, "y"), I8 = (t = 1, e = 0, r = Ht()) => r.mul(t).add(e), V8 = (t, e = 1) => (t = _(t), t.abs().pow(e).mul(t.sign())), O8 = (t, e = 1, r = 0.5) => _(t).sub(r).mul(e).add(r), L8 = (t = Ht(), e = 1, r = 0) => zv(t.convert("vec2|vec3")).mul(e).add(r), F8 = (t = Ht(), e = 1, r = 0) => Bv(t.convert("vec2|vec3")).mul(e).add(r), z8 = (t = Ht(), e = 1, r = 0) => (t = t.convert("vec2|vec3"), Se(Bv(t), zv(t.add(te(19, 73)))).mul(e).add(r)), B8 = (t = Ht(), e = 1) => v8(t.convert("vec2|vec3"), e, E(1)), k8 = (t = Ht(), e = 1) => w8(t.convert("vec2|vec3"), e, E(1)), U8 = (t = Ht(), e = 1) => M8(t.convert("vec2|vec3"), e, E(1)), D8 = (t = Ht()) => o8(t.convert("vec2|vec3")), $8 = (t = Ht(), e = 3, r = 2, i = 0.5, s = 1) => og(t, E(e), r, i).mul(s), G8 = (t = Ht(), e = 3, r = 2, i = 0.5, s = 1) => d8(t, E(e), r, i).mul(s), j8 = (t = Ht(), e = 3, r = 2, i = 0.5, s = 1) => IR(t, E(e), r, i).mul(s), W8 = (t = Ht(), e = 3, r = 2, i = 0.5, s = 1) => m8(t, E(e), r, i).mul(s), H8 = /* @__PURE__ */ V(([t, e, r]) => {
13707
+ let i = Fa(t).toVar(), s = it(_(0.5).mul(e.sub(r)), Ea).div(i).toVar(), n = it(_(-0.5).mul(e.sub(r)), Ea).div(i).toVar(), a = I().toVar();
13708
+ a.x = i.x.greaterThan(_(0)).select(s.x, n.x), a.y = i.y.greaterThan(_(0)).select(s.y, n.y), a.z = i.z.greaterThan(_(0)).select(s.z, n.z);
13709
13709
  let o = Xi(a.x, a.y, a.z).toVar();
13710
13710
  return Ea.add(i.mul(o)).toVar().sub(r);
13711
13711
  }), FR = /* @__PURE__ */ V(([t, e]) => {
@@ -13885,7 +13885,7 @@ var x = /* @__PURE__ */ Object.freeze({
13885
13885
  faceDirection: vm,
13886
13886
  faceForward: Q1,
13887
13887
  faceforward: Iz,
13888
- float: N,
13888
+ float: _,
13889
13889
  floor: Fn,
13890
13890
  fog: rm,
13891
13891
  fract: Ha,
@@ -15860,8 +15860,8 @@ function z$(t, e, r) {
15860
15860
  let i = BS.distanceTo(kS), s = e.projectionMatrix.elements, n = r.projectionMatrix.elements, a = s[14] / (s[10] - 1), o = s[14] / (s[10] + 1), l = (s[9] + 1) / s[5], h = (s[9] - 1) / s[5], u = (s[8] - 1) / s[0], c = (n[8] + 1) / n[0], d = a * u, m = a * c, p = i / (-u + c), f = p * -u;
15861
15861
  if (e.matrixWorld.decompose(t.position, t.quaternion, t.scale), t.translateX(f), t.translateZ(p), t.matrixWorld.compose(t.position, t.quaternion, t.scale), t.matrixWorldInverse.copy(t.matrixWorld).invert(), s[10] === -1) t.projectionMatrix.copy(e.projectionMatrix), t.projectionMatrixInverse.copy(e.projectionMatrixInverse);
15862
15862
  else {
15863
- let g = a + p, y = o + p, v = d - f, S = m + (i - f), T = l * o / y * g, M = h * o / y * g;
15864
- t.projectionMatrix.makePerspective(v, S, T, M, g, y), t.projectionMatrixInverse.copy(t.projectionMatrix).invert();
15863
+ let g = a + p, y = o + p, v = d - f, w = m + (i - f), T = l * o / y * g, M = h * o / y * g;
15864
+ t.projectionMatrix.makePerspective(v, w, T, M, g, y), t.projectionMatrixInverse.copy(t.projectionMatrix).invert();
15865
15865
  }
15866
15866
  }
15867
15867
  function US(t, e) {
@@ -15987,9 +15987,9 @@ var j$ = class {
15987
15987
  onShaderError: null,
15988
15988
  getShaderAsync: async (d, m, p) => {
15989
15989
  await this.compileAsync(d, m);
15990
- let f = this._renderLists.get(d, m), g = this._renderContexts.get(d, m, this._renderTarget), y = d.overrideMaterial || p.material, v = this._objects.get(p, y, d, m, f.lightsNode, g, g.clippingContext), { fragmentShader: S, vertexShader: T } = v.getNodeBuilderState();
15990
+ let f = this._renderLists.get(d, m), g = this._renderContexts.get(d, m, this._renderTarget), y = d.overrideMaterial || p.material, v = this._objects.get(p, y, d, m, f.lightsNode, g, g.clippingContext), { fragmentShader: w, vertexShader: T } = v.getNodeBuilderState();
15991
15991
  return {
15992
- fragmentShader: S,
15992
+ fragmentShader: w,
15993
15993
  vertexShader: T
15994
15994
  };
15995
15995
  }
@@ -16116,19 +16116,19 @@ Reason: ${t.reason}`), console.error(e), this._isDeviceLost = !0;
16116
16116
  t.matrixWorldAutoUpdate === !0 && t.updateMatrixWorld(), e.parent === null && e.matrixWorldAutoUpdate === !0 && e.updateMatrixWorld(), f.enabled === !0 && f.isPresenting === !0 && (f.cameraAutoUpdate === !0 && f.updateCamera(e), e = f.getCamera());
16117
16117
  let g = this._viewport, y = this._scissor, v = this._pixelRatio;
16118
16118
  d !== null && (g = d.viewport, y = d.scissor, v = 1), this.getDrawingBufferSize(Ip), V0.set(0, 0, Ip.width, Ip.height);
16119
- let S = g.minDepth === void 0 ? 0 : g.minDepth, T = g.maxDepth === void 0 ? 1 : g.maxDepth;
16120
- m.viewportValue.copy(g).multiplyScalar(v).floor(), m.viewportValue.width >>= c, m.viewportValue.height >>= c, m.viewportValue.minDepth = S, m.viewportValue.maxDepth = T, m.viewport = m.viewportValue.equals(V0) === !1, m.scissorValue.copy(y).multiplyScalar(v).floor(), m.scissor = this._scissorTest && m.scissorValue.equals(V0) === !1, m.scissorValue.width >>= c, m.scissorValue.height >>= c, m.clippingContext || (m.clippingContext = new zS()), m.clippingContext.updateGlobal(l, e), l.onBeforeRender(this, t, e, d);
16119
+ let w = g.minDepth === void 0 ? 0 : g.minDepth, T = g.maxDepth === void 0 ? 1 : g.maxDepth;
16120
+ m.viewportValue.copy(g).multiplyScalar(v).floor(), m.viewportValue.width >>= c, m.viewportValue.height >>= c, m.viewportValue.minDepth = w, m.viewportValue.maxDepth = T, m.viewport = m.viewportValue.equals(V0) === !1, m.scissorValue.copy(y).multiplyScalar(v).floor(), m.scissor = this._scissorTest && m.scissorValue.equals(V0) === !1, m.scissorValue.width >>= c, m.scissorValue.height >>= c, m.clippingContext || (m.clippingContext = new zS()), m.clippingContext.updateGlobal(l, e), l.onBeforeRender(this, t, e, d);
16121
16121
  let M = e.isArrayCamera ? L0 : O0;
16122
16122
  e.isArrayCamera || (Vp.multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse), M.setFromProjectionMatrix(Vp, p));
16123
- let w = this._renderLists.get(t, e);
16124
- if (w.begin(), this._projectObject(t, e, 0, w, m.clippingContext), w.finish(), this.sortObjects === !0 && w.sort(this._opaqueSort, this._transparentSort), d !== null) {
16123
+ let S = this._renderLists.get(t, e);
16124
+ if (S.begin(), this._projectObject(t, e, 0, S, m.clippingContext), S.finish(), this.sortObjects === !0 && S.sort(this._opaqueSort, this._transparentSort), d !== null) {
16125
16125
  this._textures.updateRenderTarget(d, c);
16126
16126
  let ie = this._textures.get(d);
16127
16127
  m.textures = ie.textures, m.depthTexture = ie.depthTexture, m.width = ie.width, m.height = ie.height, m.renderTarget = d, m.depth = d.depthBuffer, m.stencil = d.stencilBuffer;
16128
16128
  } else m.textures = null, m.depthTexture = null, m.width = this.domElement.width, m.height = this.domElement.height, m.depth = this.depth, m.stencil = this.stencil;
16129
- m.width >>= c, m.height >>= c, m.activeCubeFace = u, m.activeMipmapLevel = c, m.occlusionQueryCount = w.occlusionQueryCount, this._background.update(l, w, m), m.camera = e, this.backend.beginRender(m);
16130
- let { bundles: _, lightsNode: A, transparentDoublePass: B, transparent: ee, opaque: K } = w;
16131
- return _.length > 0 && this._renderBundles(_, l, A), this.opaque === !0 && K.length > 0 && this._renderObjects(K, e, l, A), this.transparent === !0 && ee.length > 0 && this._renderTransparents(ee, B, e, l, A), this.backend.finishRender(m), s.renderId = n, this._currentRenderContext = a, this._currentRenderObjectFunction = o, i !== null && (this.setRenderTarget(h, u, c), this._renderOutput(d)), l.onAfterRender(this, t, e, d), m;
16129
+ m.width >>= c, m.height >>= c, m.activeCubeFace = u, m.activeMipmapLevel = c, m.occlusionQueryCount = S.occlusionQueryCount, this._background.update(l, S, m), m.camera = e, this.backend.beginRender(m);
16130
+ let { bundles: N, lightsNode: A, transparentDoublePass: U, transparent: ee, opaque: K } = S;
16131
+ return N.length > 0 && this._renderBundles(N, l, A), this.opaque === !0 && K.length > 0 && this._renderObjects(K, e, l, A), this.transparent === !0 && ee.length > 0 && this._renderTransparents(ee, U, e, l, A), this.backend.finishRender(m), s.renderId = n, this._currentRenderContext = a, this._currentRenderObjectFunction = o, i !== null && (this.setRenderTarget(h, u, c), this._renderOutput(d)), l.onAfterRender(this, t, e, d), m;
16132
16132
  }
16133
16133
  _setXRLayerSize(t, e) {
16134
16134
  this._width = t, this._height = e, this.setViewport(0, 0, t, e);
@@ -17762,23 +17762,23 @@ var o9 = class {
17762
17762
  copyTextureToTexture(t, e, r = null, i = null, s = 0, n = 0) {
17763
17763
  let { gl: a, backend: o } = this, { state: l } = this.backend, { textureGPU: h, glTextureType: u, glType: c, glFormat: d } = o.get(e);
17764
17764
  l.bindTexture(u, h);
17765
- let m, p, f, g, y, v, S, T, M, w = t.isCompressedTexture ? t.mipmaps[n] : t.image;
17765
+ let m, p, f, g, y, v, w, T, M, S = t.isCompressedTexture ? t.mipmaps[n] : t.image;
17766
17766
  if (r !== null) m = r.max.x - r.min.x, p = r.max.y - r.min.y, f = r.isBox3 ? r.max.z - r.min.z : 1, g = r.min.x, y = r.min.y, v = r.isBox3 ? r.min.z : 0;
17767
17767
  else {
17768
17768
  let se = 2 ** -s;
17769
- m = Math.floor(w.width * se), p = Math.floor(w.height * se), f = t.isDataArrayTexture || t.isArrayTexture ? w.depth : t.isData3DTexture ? Math.floor(w.depth * se) : 1, g = 0, y = 0, v = 0;
17769
+ m = Math.floor(S.width * se), p = Math.floor(S.height * se), f = t.isDataArrayTexture || t.isArrayTexture ? S.depth : t.isData3DTexture ? Math.floor(S.depth * se) : 1, g = 0, y = 0, v = 0;
17770
17770
  }
17771
- i === null ? (S = 0, T = 0, M = 0) : (S = i.x, T = i.y, M = i.z), a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL, e.flipY), a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL, e.premultiplyAlpha), a.pixelStorei(a.UNPACK_ALIGNMENT, e.unpackAlignment);
17772
- let _ = a.getParameter(a.UNPACK_ROW_LENGTH), A = a.getParameter(a.UNPACK_IMAGE_HEIGHT), B = a.getParameter(a.UNPACK_SKIP_PIXELS), ee = a.getParameter(a.UNPACK_SKIP_ROWS), K = a.getParameter(a.UNPACK_SKIP_IMAGES);
17773
- a.pixelStorei(a.UNPACK_ROW_LENGTH, w.width), a.pixelStorei(a.UNPACK_IMAGE_HEIGHT, w.height), a.pixelStorei(a.UNPACK_SKIP_PIXELS, g), a.pixelStorei(a.UNPACK_SKIP_ROWS, y), a.pixelStorei(a.UNPACK_SKIP_IMAGES, v);
17771
+ i === null ? (w = 0, T = 0, M = 0) : (w = i.x, T = i.y, M = i.z), a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL, e.flipY), a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL, e.premultiplyAlpha), a.pixelStorei(a.UNPACK_ALIGNMENT, e.unpackAlignment);
17772
+ let N = a.getParameter(a.UNPACK_ROW_LENGTH), A = a.getParameter(a.UNPACK_IMAGE_HEIGHT), U = a.getParameter(a.UNPACK_SKIP_PIXELS), ee = a.getParameter(a.UNPACK_SKIP_ROWS), K = a.getParameter(a.UNPACK_SKIP_IMAGES);
17773
+ a.pixelStorei(a.UNPACK_ROW_LENGTH, S.width), a.pixelStorei(a.UNPACK_IMAGE_HEIGHT, S.height), a.pixelStorei(a.UNPACK_SKIP_PIXELS, g), a.pixelStorei(a.UNPACK_SKIP_ROWS, y), a.pixelStorei(a.UNPACK_SKIP_IMAGES, v);
17774
17774
  let ie = e.isDataArrayTexture || e.isData3DTexture || e.isArrayTexture;
17775
17775
  if (t.isRenderTargetTexture || t.isDepthTexture) {
17776
17776
  let se = o.get(t), ne = o.get(e), Te = o.get(se.renderTarget), pe = o.get(ne.renderTarget), _e = Te.framebuffers[se.cacheKey], xe = pe.framebuffers[ne.cacheKey];
17777
17777
  l.bindFramebuffer(a.READ_FRAMEBUFFER, _e), l.bindFramebuffer(a.DRAW_FRAMEBUFFER, xe);
17778
17778
  let we = a.COLOR_BUFFER_BIT;
17779
- t.isDepthTexture && (we = a.DEPTH_BUFFER_BIT), a.blitFramebuffer(g, y, m, p, S, T, m, p, we, a.NEAREST), l.bindFramebuffer(a.READ_FRAMEBUFFER, null), l.bindFramebuffer(a.DRAW_FRAMEBUFFER, null);
17780
- } else ie ? t.isDataTexture || t.isData3DTexture ? a.texSubImage3D(u, n, S, T, M, m, p, f, d, c, w.data) : e.isCompressedArrayTexture ? a.compressedTexSubImage3D(u, n, S, T, M, m, p, f, d, w.data) : a.texSubImage3D(u, n, S, T, M, m, p, f, d, c, w) : t.isDataTexture ? a.texSubImage2D(u, n, S, T, m, p, d, c, w.data) : t.isCompressedTexture ? a.compressedTexSubImage2D(u, n, S, T, w.width, w.height, d, w.data) : a.texSubImage2D(u, n, S, T, m, p, d, c, w);
17781
- a.pixelStorei(a.UNPACK_ROW_LENGTH, _), a.pixelStorei(a.UNPACK_IMAGE_HEIGHT, A), a.pixelStorei(a.UNPACK_SKIP_PIXELS, B), a.pixelStorei(a.UNPACK_SKIP_ROWS, ee), a.pixelStorei(a.UNPACK_SKIP_IMAGES, K), n === 0 && e.generateMipmaps && a.generateMipmap(u), l.unbindTexture();
17779
+ t.isDepthTexture && (we = a.DEPTH_BUFFER_BIT), a.blitFramebuffer(g, y, m, p, w, T, m, p, we, a.NEAREST), l.bindFramebuffer(a.READ_FRAMEBUFFER, null), l.bindFramebuffer(a.DRAW_FRAMEBUFFER, null);
17780
+ } else ie ? t.isDataTexture || t.isData3DTexture ? a.texSubImage3D(u, n, w, T, M, m, p, f, d, c, S.data) : e.isCompressedArrayTexture ? a.compressedTexSubImage3D(u, n, w, T, M, m, p, f, d, S.data) : a.texSubImage3D(u, n, w, T, M, m, p, f, d, c, S) : t.isDataTexture ? a.texSubImage2D(u, n, w, T, m, p, d, c, S.data) : t.isCompressedTexture ? a.compressedTexSubImage2D(u, n, w, T, S.width, S.height, d, S.data) : a.texSubImage2D(u, n, w, T, m, p, d, c, S);
17781
+ a.pixelStorei(a.UNPACK_ROW_LENGTH, N), a.pixelStorei(a.UNPACK_IMAGE_HEIGHT, A), a.pixelStorei(a.UNPACK_SKIP_PIXELS, U), a.pixelStorei(a.UNPACK_SKIP_ROWS, ee), a.pixelStorei(a.UNPACK_SKIP_IMAGES, K), n === 0 && e.generateMipmaps && a.generateMipmap(u), l.unbindTexture();
17782
17782
  }
17783
17783
  copyFramebufferToTexture(t, e, r) {
17784
17784
  let { gl: i } = this, { state: s } = this.backend, { textureGPU: n } = this.backend.get(t), { x: a, y: o, z: l, w: h } = r, u = t.isDepthTexture === !0 || e.renderTarget && e.renderTarget.samples > 0, c = e.renderTarget ? e.renderTarget.height : this.backend.getDrawingBufferSize().y;
@@ -18108,8 +18108,8 @@ var KS = class extends XR {
18108
18108
  let u = o.framebuffers[t.getCacheKey()], c = e.COLOR_BUFFER_BIT, d = o.msaaFrameBuffer, m = t.textures;
18109
18109
  r.bindFramebuffer(e.READ_FRAMEBUFFER, d), r.bindFramebuffer(e.DRAW_FRAMEBUFFER, u);
18110
18110
  for (let p = 0; p < m.length; p++) if (t.scissor) {
18111
- let { x: f, y: g, width: y, height: v } = t.scissorValue, S = t.height - v - g;
18112
- e.blitFramebuffer(f, S, f + y, S + v, f, S, f + y, S + v, c, e.NEAREST), this._supportsInvalidateFramebuffer === !0 && e.invalidateSubFramebuffer(e.READ_FRAMEBUFFER, o.invalidationArray, f, S, y, v);
18111
+ let { x: f, y: g, width: y, height: v } = t.scissorValue, w = t.height - v - g;
18112
+ e.blitFramebuffer(f, w, f + y, w + v, f, w, f + y, w + v, c, e.NEAREST), this._supportsInvalidateFramebuffer === !0 && e.invalidateSubFramebuffer(e.READ_FRAMEBUFFER, o.invalidationArray, f, w, y, v);
18113
18113
  } else e.blitFramebuffer(0, 0, t.width, t.height, 0, 0, t.width, t.height, c, e.NEAREST), this._supportsInvalidateFramebuffer === !0 && e.invalidateFramebuffer(e.READ_FRAMEBUFFER, o.invalidationArray);
18114
18114
  } else if (l === !1 && o.framebuffers) {
18115
18115
  let u = o.framebuffers[t.getCacheKey()];
@@ -18213,10 +18213,10 @@ var KS = class extends XR {
18213
18213
  l.setMaterial(i, c, n), l.useProgram(a);
18214
18214
  let d = this.get(t), m = d.staticVao;
18215
18215
  if (m === void 0 || d.geometryId !== t.geometry.id) {
18216
- let w = this._getVaoKey(t.getAttributes());
18217
- if (m = this.vaoCache[w], m === void 0) {
18218
- let _;
18219
- ({ vaoGPU: m, staticVao: _ } = this._createVao(t.getAttributes())), _ && (d.staticVao = m, d.geometryId = t.geometry.id);
18216
+ let S = this._getVaoKey(t.getAttributes());
18217
+ if (m = this.vaoCache[S], m === void 0) {
18218
+ let N;
18219
+ ({ vaoGPU: m, staticVao: N } = this._createVao(t.getAttributes())), N && (d.staticVao = m, d.geometryId = t.geometry.id);
18220
18220
  }
18221
18221
  }
18222
18222
  let p = t.getIndex(), f = p === null ? null : this.get(p).bufferGPU;
@@ -18224,49 +18224,49 @@ var KS = class extends XR {
18224
18224
  let g = h.lastOcclusionObject;
18225
18225
  if (g !== e && g !== void 0) {
18226
18226
  if (g !== null && g.occlusionTest === !0 && (o.endQuery(o.ANY_SAMPLES_PASSED), h.occlusionQueryIndex++), e.occlusionTest === !0) {
18227
- let w = o.createQuery();
18228
- o.beginQuery(o.ANY_SAMPLES_PASSED, w), h.occlusionQueries[h.occlusionQueryIndex] = w, h.occlusionQueryObjects[h.occlusionQueryIndex] = e;
18227
+ let S = o.createQuery();
18228
+ o.beginQuery(o.ANY_SAMPLES_PASSED, S), h.occlusionQueries[h.occlusionQueryIndex] = S, h.occlusionQueryObjects[h.occlusionQueryIndex] = e;
18229
18229
  }
18230
18230
  h.lastOcclusionObject = e;
18231
18231
  }
18232
18232
  let y = this.bufferRenderer;
18233
18233
  e.isPoints ? y.mode = o.POINTS : e.isLineSegments ? y.mode = o.LINES : e.isLine ? y.mode = o.LINE_STRIP : e.isLineLoop ? y.mode = o.LINE_LOOP : i.wireframe === !0 ? (l.setLineWidth(i.wireframeLinewidth * this.renderer.getPixelRatio()), y.mode = o.LINES) : y.mode = o.TRIANGLES;
18234
- let { vertexCount: v, instanceCount: S } = u, { firstVertex: T } = u;
18234
+ let { vertexCount: v, instanceCount: w } = u, { firstVertex: T } = u;
18235
18235
  if (y.object = e, p !== null) {
18236
18236
  T *= p.array.BYTES_PER_ELEMENT;
18237
- let w = this.get(p);
18238
- y.index = p.count, y.type = w.type;
18237
+ let S = this.get(p);
18238
+ y.index = p.count, y.type = S.type;
18239
18239
  } else y.index = 0;
18240
18240
  let M = () => {
18241
- e.isBatchedMesh ? e._multiDrawInstances === null ? this.hasFeature("WEBGL_multi_draw") ? y.renderMultiDraw(e._multiDrawStarts, e._multiDrawCounts, e._multiDrawCount) : La("THREE.WebGLRenderer: WEBGL_multi_draw not supported.") : (La("THREE.WebGLBackend: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."), y.renderMultiDrawInstances(e._multiDrawStarts, e._multiDrawCounts, e._multiDrawCount, e._multiDrawInstances)) : S > 1 ? y.renderInstances(T, v, S) : y.render(T, v);
18241
+ e.isBatchedMesh ? e._multiDrawInstances === null ? this.hasFeature("WEBGL_multi_draw") ? y.renderMultiDraw(e._multiDrawStarts, e._multiDrawCounts, e._multiDrawCount) : La("THREE.WebGLRenderer: WEBGL_multi_draw not supported.") : (La("THREE.WebGLBackend: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."), y.renderMultiDrawInstances(e._multiDrawStarts, e._multiDrawCounts, e._multiDrawCount, e._multiDrawInstances)) : w > 1 ? y.renderInstances(T, v, w) : y.render(T, v);
18242
18242
  };
18243
18243
  if (t.camera.isArrayCamera === !0 && t.camera.cameras.length > 0 && t.camera.isMultiViewCamera === !1) {
18244
- let w = this.get(t.camera), _ = t.camera.cameras, A = t.getBindingGroup("cameraIndex").bindings[0];
18245
- if (w.indexesGPU === void 0 || w.indexesGPU.length !== _.length) {
18244
+ let S = this.get(t.camera), N = t.camera.cameras, A = t.getBindingGroup("cameraIndex").bindings[0];
18245
+ if (S.indexesGPU === void 0 || S.indexesGPU.length !== N.length) {
18246
18246
  let ne = new Uint32Array([
18247
18247
  0,
18248
18248
  0,
18249
18249
  0,
18250
18250
  0
18251
18251
  ]), Te = [];
18252
- for (let pe = 0, _e = _.length; pe < _e; pe++) {
18252
+ for (let pe = 0, _e = N.length; pe < _e; pe++) {
18253
18253
  let xe = o.createBuffer();
18254
18254
  ne[0] = pe, o.bindBuffer(o.UNIFORM_BUFFER, xe), o.bufferData(o.UNIFORM_BUFFER, ne, o.STATIC_DRAW), Te.push(xe);
18255
18255
  }
18256
- w.indexesGPU = Te;
18256
+ S.indexesGPU = Te;
18257
18257
  }
18258
- let B = this.get(A), ee = this.renderer.getPixelRatio(), K = this._currentContext.renderTarget, ie = this._isRenderCameraDepthArray(this._currentContext), se = this._currentContext.activeCubeFace;
18258
+ let U = this.get(A), ee = this.renderer.getPixelRatio(), K = this._currentContext.renderTarget, ie = this._isRenderCameraDepthArray(this._currentContext), se = this._currentContext.activeCubeFace;
18259
18259
  if (ie) {
18260
18260
  let ne = this.get(K.depthTexture);
18261
18261
  if (ne.clearedRenderId !== this.renderer._nodes.nodeFrame.renderId) {
18262
18262
  ne.clearedRenderId = this.renderer._nodes.nodeFrame.renderId;
18263
18263
  let { stencilBuffer: Te } = K;
18264
- for (let pe = 0, _e = _.length; pe < _e; pe++) this.renderer._activeCubeFace = pe, this._currentContext.activeCubeFace = pe, this._setFramebuffer(this._currentContext), this.clear(!1, !0, Te, this._currentContext, !1);
18264
+ for (let pe = 0, _e = N.length; pe < _e; pe++) this.renderer._activeCubeFace = pe, this._currentContext.activeCubeFace = pe, this._setFramebuffer(this._currentContext), this.clear(!1, !0, Te, this._currentContext, !1);
18265
18265
  this.renderer._activeCubeFace = se, this._currentContext.activeCubeFace = se;
18266
18266
  }
18267
18267
  }
18268
- for (let ne = 0, Te = _.length; ne < Te; ne++) {
18269
- let pe = _[ne];
18268
+ for (let ne = 0, Te = N.length; ne < Te; ne++) {
18269
+ let pe = N[ne];
18270
18270
  if (e.layers.test(pe.layers)) {
18271
18271
  ie && (this.renderer._activeCubeFace = ne, this._currentContext.activeCubeFace = ne, this._setFramebuffer(this._currentContext));
18272
18272
  let _e = pe.viewport;
@@ -18274,7 +18274,7 @@ var KS = class extends XR {
18274
18274
  let xe = _e.x * ee, we = _e.y * ee, ye = _e.width * ee, ve = _e.height * ee;
18275
18275
  l.viewport(Math.floor(xe), Math.floor(t.context.height - ve - we), Math.floor(ye), Math.floor(ve));
18276
18276
  }
18277
- l.bindBufferBase(o.UNIFORM_BUFFER, B.index, w.indexesGPU[ne]), M();
18277
+ l.bindBufferBase(o.UNIFORM_BUFFER, U.index, S.indexesGPU[ne]), M();
18278
18278
  }
18279
18279
  this._currentContext.activeCubeFace = se, this.renderer._activeCubeFace = se;
18280
18280
  }
@@ -18486,19 +18486,19 @@ void main() {}`
18486
18486
  _setFramebuffer(t) {
18487
18487
  let { gl: e, state: r } = this, i = null;
18488
18488
  if (t.textures !== null) {
18489
- let s = t.renderTarget, n = this.get(s), { samples: a, depthBuffer: o, stencilBuffer: l } = s, h = s.isWebGLCubeRenderTarget === !0, u = s.isRenderTarget3D === !0, c = s.depth > 1, d = s.isXRRenderTarget === !0, m = d === !0 && s.hasExternalTextures === !0, p = n.msaaFrameBuffer, f = n.depthRenderbuffer, g = this.extensions.get("WEBGL_multisampled_render_to_texture"), y = this.extensions.get("OVR_multiview2"), v = this._useMultisampledExtension(s), S = FE(t), T;
18490
- if (h ? (n.cubeFramebuffers || (n.cubeFramebuffers = {}), T = n.cubeFramebuffers[S]) : d && m === !1 ? T = this._xrFramebuffer : (n.framebuffers || (n.framebuffers = {}), T = n.framebuffers[S]), T === void 0) {
18489
+ let s = t.renderTarget, n = this.get(s), { samples: a, depthBuffer: o, stencilBuffer: l } = s, h = s.isWebGLCubeRenderTarget === !0, u = s.isRenderTarget3D === !0, c = s.depth > 1, d = s.isXRRenderTarget === !0, m = d === !0 && s.hasExternalTextures === !0, p = n.msaaFrameBuffer, f = n.depthRenderbuffer, g = this.extensions.get("WEBGL_multisampled_render_to_texture"), y = this.extensions.get("OVR_multiview2"), v = this._useMultisampledExtension(s), w = FE(t), T;
18490
+ if (h ? (n.cubeFramebuffers || (n.cubeFramebuffers = {}), T = n.cubeFramebuffers[w]) : d && m === !1 ? T = this._xrFramebuffer : (n.framebuffers || (n.framebuffers = {}), T = n.framebuffers[w]), T === void 0) {
18491
18491
  T = e.createFramebuffer(), r.bindFramebuffer(e.FRAMEBUFFER, T);
18492
- let M = t.textures, w = [];
18492
+ let M = t.textures, S = [];
18493
18493
  if (h) {
18494
- n.cubeFramebuffers[S] = T;
18495
- let { textureGPU: A } = this.get(M[0]), B = this.renderer._activeCubeFace;
18496
- e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_CUBE_MAP_POSITIVE_X + B, A, 0);
18494
+ n.cubeFramebuffers[w] = T;
18495
+ let { textureGPU: A } = this.get(M[0]), U = this.renderer._activeCubeFace;
18496
+ e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_CUBE_MAP_POSITIVE_X + U, A, 0);
18497
18497
  } else {
18498
- n.framebuffers[S] = T;
18498
+ n.framebuffers[w] = T;
18499
18499
  for (let A = 0; A < M.length; A++) {
18500
- let B = M[A], ee = this.get(B);
18501
- ee.renderTarget = t.renderTarget, ee.cacheKey = S;
18500
+ let U = M[A], ee = this.get(U);
18501
+ ee.renderTarget = t.renderTarget, ee.cacheKey = w;
18502
18502
  let K = e.COLOR_ATTACHMENT0 + A;
18503
18503
  if (s.multiview) y.framebufferTextureMultisampleMultiviewOVR(e.FRAMEBUFFER, K, ee.textureGPU, 0, a, 0, 2);
18504
18504
  else if (u || c) {
@@ -18508,38 +18508,38 @@ void main() {}`
18508
18508
  }
18509
18509
  r.drawBuffers(t, T);
18510
18510
  }
18511
- let _ = l ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT;
18511
+ let N = l ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT;
18512
18512
  if (s.autoAllocateDepthBuffer === !0) {
18513
18513
  let A = e.createRenderbuffer();
18514
- this.textureUtils.setupRenderBufferStorage(A, t, 0, v), n.xrDepthRenderbuffer = A, w.push(l ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT), e.bindRenderbuffer(e.RENDERBUFFER, A), e.framebufferRenderbuffer(e.FRAMEBUFFER, _, e.RENDERBUFFER, A);
18514
+ this.textureUtils.setupRenderBufferStorage(A, t, 0, v), n.xrDepthRenderbuffer = A, S.push(l ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT), e.bindRenderbuffer(e.RENDERBUFFER, A), e.framebufferRenderbuffer(e.FRAMEBUFFER, N, e.RENDERBUFFER, A);
18515
18515
  } else if (t.depthTexture !== null) {
18516
- w.push(l ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT);
18516
+ S.push(l ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT);
18517
18517
  let A = this.get(t.depthTexture);
18518
- if (A.renderTarget = t.renderTarget, A.cacheKey = S, s.multiview) y.framebufferTextureMultisampleMultiviewOVR(e.FRAMEBUFFER, _, A.textureGPU, 0, a, 0, 2);
18519
- else if (m && v) g.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, _, e.TEXTURE_2D, A.textureGPU, 0, a);
18518
+ if (A.renderTarget = t.renderTarget, A.cacheKey = w, s.multiview) y.framebufferTextureMultisampleMultiviewOVR(e.FRAMEBUFFER, N, A.textureGPU, 0, a, 0, 2);
18519
+ else if (m && v) g.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, N, e.TEXTURE_2D, A.textureGPU, 0, a);
18520
18520
  else if (t.depthTexture.isArrayTexture) {
18521
- let B = this.renderer._activeCubeFace;
18522
- e.framebufferTextureLayer(e.FRAMEBUFFER, _, A.textureGPU, 0, B);
18523
- } else e.framebufferTexture2D(e.FRAMEBUFFER, _, e.TEXTURE_2D, A.textureGPU, 0);
18521
+ let U = this.renderer._activeCubeFace;
18522
+ e.framebufferTextureLayer(e.FRAMEBUFFER, N, A.textureGPU, 0, U);
18523
+ } else e.framebufferTexture2D(e.FRAMEBUFFER, N, e.TEXTURE_2D, A.textureGPU, 0);
18524
18524
  }
18525
- n.depthInvalidationArray = w;
18525
+ n.depthInvalidationArray = S;
18526
18526
  } else {
18527
18527
  if (this._isRenderCameraDepthArray(t)) {
18528
18528
  r.bindFramebuffer(e.FRAMEBUFFER, T);
18529
- let w = this.renderer._activeCubeFace, _ = this.get(t.depthTexture), A = l ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT;
18530
- e.framebufferTextureLayer(e.FRAMEBUFFER, A, _.textureGPU, 0, w);
18529
+ let S = this.renderer._activeCubeFace, N = this.get(t.depthTexture), A = l ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT;
18530
+ e.framebufferTextureLayer(e.FRAMEBUFFER, A, N.textureGPU, 0, S);
18531
18531
  }
18532
18532
  if (d || v || s.multiview) {
18533
18533
  r.bindFramebuffer(e.FRAMEBUFFER, T);
18534
- let w = this.get(t.textures[0]);
18535
- s.multiview ? y.framebufferTextureMultisampleMultiviewOVR(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, w.textureGPU, 0, a, 0, 2) : v ? g.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, w.textureGPU, 0, a) : e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, w.textureGPU, 0);
18536
- let _ = l ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT;
18534
+ let S = this.get(t.textures[0]);
18535
+ s.multiview ? y.framebufferTextureMultisampleMultiviewOVR(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, S.textureGPU, 0, a, 0, 2) : v ? g.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, S.textureGPU, 0, a) : e.framebufferTexture2D(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0, e.TEXTURE_2D, S.textureGPU, 0);
18536
+ let N = l ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT;
18537
18537
  if (s.autoAllocateDepthBuffer === !0) {
18538
18538
  let A = n.xrDepthRenderbuffer;
18539
- e.bindRenderbuffer(e.RENDERBUFFER, A), e.framebufferRenderbuffer(e.FRAMEBUFFER, _, e.RENDERBUFFER, A);
18539
+ e.bindRenderbuffer(e.RENDERBUFFER, A), e.framebufferRenderbuffer(e.FRAMEBUFFER, N, e.RENDERBUFFER, A);
18540
18540
  } else {
18541
18541
  let A = this.get(t.depthTexture);
18542
- s.multiview ? y.framebufferTextureMultisampleMultiviewOVR(e.FRAMEBUFFER, _, A.textureGPU, 0, a, 0, 2) : v ? g.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, _, e.TEXTURE_2D, A.textureGPU, 0, a) : e.framebufferTexture2D(e.FRAMEBUFFER, _, e.TEXTURE_2D, A.textureGPU, 0);
18542
+ s.multiview ? y.framebufferTextureMultisampleMultiviewOVR(e.FRAMEBUFFER, N, A.textureGPU, 0, a, 0, 2) : v ? g.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, N, e.TEXTURE_2D, A.textureGPU, 0, a) : e.framebufferTexture2D(e.FRAMEBUFFER, N, e.TEXTURE_2D, A.textureGPU, 0);
18543
18543
  }
18544
18544
  }
18545
18545
  }
@@ -18547,16 +18547,16 @@ void main() {}`
18547
18547
  if (p === void 0) {
18548
18548
  let M = [];
18549
18549
  p = e.createFramebuffer(), r.bindFramebuffer(e.FRAMEBUFFER, p);
18550
- let w = [], _ = t.textures;
18551
- for (let A = 0; A < _.length; A++) {
18552
- if (w[A] = e.createRenderbuffer(), e.bindRenderbuffer(e.RENDERBUFFER, w[A]), M.push(e.COLOR_ATTACHMENT0 + A), o) {
18550
+ let S = [], N = t.textures;
18551
+ for (let A = 0; A < N.length; A++) {
18552
+ if (S[A] = e.createRenderbuffer(), e.bindRenderbuffer(e.RENDERBUFFER, S[A]), M.push(e.COLOR_ATTACHMENT0 + A), o) {
18553
18553
  let K = l ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT;
18554
18554
  M.push(K);
18555
18555
  }
18556
- let B = t.textures[A], ee = this.get(B);
18557
- e.renderbufferStorageMultisample(e.RENDERBUFFER, a, ee.glInternalFormat, t.width, t.height), e.framebufferRenderbuffer(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0 + A, e.RENDERBUFFER, w[A]);
18556
+ let U = t.textures[A], ee = this.get(U);
18557
+ e.renderbufferStorageMultisample(e.RENDERBUFFER, a, ee.glInternalFormat, t.width, t.height), e.framebufferRenderbuffer(e.FRAMEBUFFER, e.COLOR_ATTACHMENT0 + A, e.RENDERBUFFER, S[A]);
18558
18558
  }
18559
- if (n.msaaFrameBuffer = p, n.msaaRenderbuffers = w, f === void 0) {
18559
+ if (n.msaaFrameBuffer = p, n.msaaRenderbuffers = S, f === void 0) {
18560
18560
  f = e.createRenderbuffer(), this.textureUtils.setupRenderBufferStorage(f, t, a), n.depthRenderbuffer = f;
18561
18561
  let A = l ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT;
18562
18562
  M.push(A);
@@ -20797,18 +20797,18 @@ var L9 = class {
20797
20797
  writeMask: g
20798
20798
  });
20799
20799
  }
20800
- let v = l.get(a).module, S = l.get(o).module, T = this._getPrimitiveState(r, s, i), M = this._getDepthCompare(i), w = u.getCurrentDepthStencilFormat(t.context), _ = this._getSampleCount(t.context), A = {
20800
+ let v = l.get(a).module, w = l.get(o).module, T = this._getPrimitiveState(r, s, i), M = this._getDepthCompare(i), S = u.getCurrentDepthStencilFormat(t.context), N = this._getSampleCount(t.context), A = {
20801
20801
  label: `renderPipeline_${i.name || i.type}_${i.id}`,
20802
20802
  vertex: Object.assign({}, v, { buffers: m }),
20803
- fragment: Object.assign({}, S, { targets: y }),
20803
+ fragment: Object.assign({}, w, { targets: y }),
20804
20804
  primitive: T,
20805
20805
  multisample: {
20806
- count: _,
20807
- alphaToCoverageEnabled: i.alphaToCoverage && _ > 1
20806
+ count: N,
20807
+ alphaToCoverageEnabled: i.alphaToCoverage && N > 1
20808
20808
  },
20809
20809
  layout: h.createPipelineLayout({ bindGroupLayouts: d })
20810
- }, B = {}, ee = t.context.depth, K = t.context.stencil;
20811
- if ((ee === !0 || K === !0) && (ee === !0 && (B.format = w, B.depthWriteEnabled = i.depthWrite, B.depthCompare = M), K === !0 && (B.stencilFront = f, B.stencilBack = {}, B.stencilReadMask = i.stencilFuncMask, B.stencilWriteMask = i.stencilWriteMask), i.polygonOffset === !0 && (B.depthBias = i.polygonOffsetUnits, B.depthBiasSlopeScale = i.polygonOffsetFactor, B.depthBiasClamp = 0), A.depthStencil = B), e === null) c.pipeline = h.createRenderPipeline(A);
20810
+ }, U = {}, ee = t.context.depth, K = t.context.stencil;
20811
+ if ((ee === !0 || K === !0) && (ee === !0 && (U.format = S, U.depthWriteEnabled = i.depthWrite, U.depthCompare = M), K === !0 && (U.stencilFront = f, U.stencilBack = {}, U.stencilReadMask = i.stencilFuncMask, U.stencilWriteMask = i.stencilWriteMask), i.polygonOffset === !0 && (U.depthBias = i.polygonOffsetUnits, U.depthBiasSlopeScale = i.polygonOffsetFactor, U.depthBiasClamp = 0), A.depthStencil = U), e === null) c.pipeline = h.createRenderPipeline(A);
20812
20812
  else {
20813
20813
  let ie = new Promise((se) => {
20814
20814
  h.createRenderPipelineAsync(A).then((ne) => {
@@ -21521,16 +21521,16 @@ var L9 = class {
21521
21521
  let d = (p, f) => {
21522
21522
  this.pipelineUtils.setPipeline(p, l), f.pipeline = l;
21523
21523
  let g = f.bindingGroups;
21524
- for (let v = 0, S = a.length; v < S; v++) {
21524
+ for (let v = 0, w = a.length; v < w; v++) {
21525
21525
  let T = a[v], M = this.get(T);
21526
21526
  g[T.index] !== T.id && (p.setBindGroup(T.index, M.group), g[T.index] = T.id);
21527
21527
  }
21528
21528
  if (u === !0 && f.index !== h) {
21529
- let v = this.get(h).buffer, S = h.array instanceof Uint16Array ? xc.Uint16 : xc.Uint32;
21530
- p.setIndexBuffer(v, S), f.index = h;
21529
+ let v = this.get(h).buffer, w = h.array instanceof Uint16Array ? xc.Uint16 : xc.Uint32;
21530
+ p.setIndexBuffer(v, w), f.index = h;
21531
21531
  }
21532
21532
  let y = t.getVertexBuffers();
21533
- for (let v = 0, S = y.length; v < S; v++) {
21533
+ for (let v = 0, w = y.length; v < w; v++) {
21534
21534
  let T = y[v];
21535
21535
  if (f.attributes[v] !== T) {
21536
21536
  let M = this.get(T).buffer;
@@ -21540,23 +21540,23 @@ var L9 = class {
21540
21540
  s.stencil === !0 && i.stencilWrite === !0 && o.currentStencilRef !== i.stencilRef && (p.setStencilReference(i.stencilRef), o.currentStencilRef = i.stencilRef);
21541
21541
  }, m = (p, f) => {
21542
21542
  if (d(p, f), r.isBatchedMesh === !0) {
21543
- let g = r._multiDrawStarts, y = r._multiDrawCounts, v = r._multiDrawCount, S = r._multiDrawInstances;
21544
- S !== null && La("THREE.WebGPUBackend: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection.");
21543
+ let g = r._multiDrawStarts, y = r._multiDrawCounts, v = r._multiDrawCount, w = r._multiDrawInstances;
21544
+ w !== null && La("THREE.WebGPUBackend: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection.");
21545
21545
  for (let T = 0; T < v; T++) {
21546
- let M = S ? S[T] : 1, w = M > 1 ? 0 : T;
21547
- u === !0 ? p.drawIndexed(y[T], M, g[T] / h.array.BYTES_PER_ELEMENT, 0, w) : p.draw(y[T], M, g[T], w), e.update(r, y[T], M);
21546
+ let M = w ? w[T] : 1, S = M > 1 ? 0 : T;
21547
+ u === !0 ? p.drawIndexed(y[T], M, g[T] / h.array.BYTES_PER_ELEMENT, 0, S) : p.draw(y[T], M, g[T], S), e.update(r, y[T], M);
21548
21548
  }
21549
21549
  } else if (u === !0) {
21550
- let { vertexCount: g, instanceCount: y, firstVertex: v } = c, S = t.getIndirect();
21551
- if (S !== null) {
21552
- let T = this.get(S).buffer;
21550
+ let { vertexCount: g, instanceCount: y, firstVertex: v } = c, w = t.getIndirect();
21551
+ if (w !== null) {
21552
+ let T = this.get(w).buffer;
21553
21553
  p.drawIndexedIndirect(T, 0);
21554
21554
  } else p.drawIndexed(g, y, v, 0, 0);
21555
21555
  e.update(r, g, y);
21556
21556
  } else {
21557
- let { vertexCount: g, instanceCount: y, firstVertex: v } = c, S = t.getIndirect();
21558
- if (S !== null) {
21559
- let T = this.get(S).buffer;
21557
+ let { vertexCount: g, instanceCount: y, firstVertex: v } = c, w = t.getIndirect();
21558
+ if (w !== null) {
21559
+ let T = this.get(w).buffer;
21560
21560
  p.drawIndirect(T, 0);
21561
21561
  } else p.draw(g, y, v, 0);
21562
21562
  e.update(r, g, y);
@@ -21565,29 +21565,29 @@ var L9 = class {
21565
21565
  if (t.camera.isArrayCamera && t.camera.cameras.length > 0) {
21566
21566
  let p = this.get(t.camera), f = t.camera.cameras, g = t.getBindingGroup("cameraIndex");
21567
21567
  if (p.indexesGPU === void 0 || p.indexesGPU.length !== f.length) {
21568
- let v = this.get(g), S = [], T = new Uint32Array([
21568
+ let v = this.get(g), w = [], T = new Uint32Array([
21569
21569
  0,
21570
21570
  0,
21571
21571
  0,
21572
21572
  0
21573
21573
  ]);
21574
- for (let M = 0, w = f.length; M < w; M++) {
21574
+ for (let M = 0, S = f.length; M < S; M++) {
21575
21575
  T[0] = M;
21576
- let _ = this.bindingUtils.createBindGroupIndex(T, v.layout);
21577
- S.push(_);
21576
+ let N = this.bindingUtils.createBindGroupIndex(T, v.layout);
21577
+ w.push(N);
21578
21578
  }
21579
- p.indexesGPU = S;
21579
+ p.indexesGPU = w;
21580
21580
  }
21581
21581
  let y = this.renderer.getPixelRatio();
21582
- for (let v = 0, S = f.length; v < S; v++) {
21582
+ for (let v = 0, w = f.length; v < w; v++) {
21583
21583
  let T = f[v];
21584
21584
  if (r.layers.test(T.layers)) {
21585
- let M = T.viewport, w = o.currentPass, _ = o.currentSets;
21585
+ let M = T.viewport, S = o.currentPass, N = o.currentSets;
21586
21586
  if (o.bundleEncoders) {
21587
- let A = o.bundleEncoders[v], B = o.bundleSets[v];
21588
- w = A, _ = B;
21587
+ let A = o.bundleEncoders[v], U = o.bundleSets[v];
21588
+ S = A, N = U;
21589
21589
  }
21590
- M && w.setViewport(Math.floor(M.x * y), Math.floor(M.y * y), Math.floor(M.width * y), Math.floor(M.height * y), s.viewportValue.minDepth, s.viewportValue.maxDepth), g && p.indexesGPU && (w.setBindGroup(g.index, p.indexesGPU[v]), _.bindingGroups[g.index] = g.id), m(w, _);
21590
+ M && S.setViewport(Math.floor(M.x * y), Math.floor(M.y * y), Math.floor(M.width * y), Math.floor(M.height * y), s.viewportValue.minDepth, s.viewportValue.maxDepth), g && p.indexesGPU && (S.setBindGroup(g.index, p.indexesGPU[v]), N.bindingGroups[g.index] = g.id), m(S, N);
21591
21591
  }
21592
21592
  }
21593
21593
  } else if (o.currentPass) {
@@ -23392,10 +23392,10 @@ class Cm {
23392
23392
  }
23393
23393
  if (c !== f || l !== d || h !== m || u !== p) {
23394
23394
  let g = 1 - o;
23395
- const y = l * d + h * m + u * p + c * f, v = y >= 0 ? 1 : -1, S = 1 - y * y;
23396
- if (S > Number.EPSILON) {
23397
- const M = Math.sqrt(S), w = Math.atan2(M, y * v);
23398
- g = Math.sin(g * w) / M, o = Math.sin(o * w) / M;
23395
+ const y = l * d + h * m + u * p + c * f, v = y >= 0 ? 1 : -1, w = 1 - y * y;
23396
+ if (w > Number.EPSILON) {
23397
+ const M = Math.sqrt(w), S = Math.atan2(M, y * v);
23398
+ g = Math.sin(g * S) / M, o = Math.sin(o * S) / M;
23399
23399
  }
23400
23400
  const T = o * v;
23401
23401
  if (l = l * g + d * T, h = h * g + m * T, u = u * g + p * T, c = c * g + f * T, g === 1 - o) {
@@ -24698,8 +24698,8 @@ class Zs {
24698
24698
  * @return {Matrix3} A reference to this matrix.
24699
24699
  */
24700
24700
  multiplyMatrices(e, r) {
24701
- const i = e.elements, s = r.elements, n = this.elements, a = i[0], o = i[3], l = i[6], h = i[1], u = i[4], c = i[7], d = i[2], m = i[5], p = i[8], f = s[0], g = s[3], y = s[6], v = s[1], S = s[4], T = s[7], M = s[2], w = s[5], _ = s[8];
24702
- return n[0] = a * f + o * v + l * M, n[3] = a * g + o * S + l * w, n[6] = a * y + o * T + l * _, n[1] = h * f + u * v + c * M, n[4] = h * g + u * S + c * w, n[7] = h * y + u * T + c * _, n[2] = d * f + m * v + p * M, n[5] = d * g + m * S + p * w, n[8] = d * y + m * T + p * _, this;
24701
+ const i = e.elements, s = r.elements, n = this.elements, a = i[0], o = i[3], l = i[6], h = i[1], u = i[4], c = i[7], d = i[2], m = i[5], p = i[8], f = s[0], g = s[3], y = s[6], v = s[1], w = s[4], T = s[7], M = s[2], S = s[5], N = s[8];
24702
+ return n[0] = a * f + o * v + l * M, n[3] = a * g + o * w + l * S, n[6] = a * y + o * T + l * N, n[1] = h * f + u * v + c * M, n[4] = h * g + u * w + c * S, n[7] = h * y + u * T + c * N, n[2] = d * f + m * v + p * M, n[5] = d * g + m * w + p * S, n[8] = d * y + m * T + p * N, this;
24703
24703
  }
24704
24704
  /**
24705
24705
  * Multiplies every component of the matrix by the given scalar.
@@ -25684,8 +25684,8 @@ class Ni {
25684
25684
  if (Math.abs(u + d) < 0.1 && Math.abs(c + f) < 0.1 && Math.abs(p + g) < 0.1 && Math.abs(h + m + y - 3) < 0.1)
25685
25685
  return this.set(1, 0, 0, 0), this;
25686
25686
  r = Math.PI;
25687
- const S = (h + 1) / 2, T = (m + 1) / 2, M = (y + 1) / 2, w = (u + d) / 4, _ = (c + f) / 4, A = (p + g) / 4;
25688
- return S > T && S > M ? S < 0.01 ? (i = 0, s = 0.707106781, n = 0.707106781) : (i = Math.sqrt(S), s = w / i, n = _ / i) : T > M ? T < 0.01 ? (i = 0.707106781, s = 0, n = 0.707106781) : (s = Math.sqrt(T), i = w / s, n = A / s) : M < 0.01 ? (i = 0.707106781, s = 0.707106781, n = 0) : (n = Math.sqrt(M), i = _ / n, s = A / n), this.set(i, s, n, r), this;
25687
+ const w = (h + 1) / 2, T = (m + 1) / 2, M = (y + 1) / 2, S = (u + d) / 4, N = (c + f) / 4, A = (p + g) / 4;
25688
+ return w > T && w > M ? w < 0.01 ? (i = 0, s = 0.707106781, n = 0.707106781) : (i = Math.sqrt(w), s = S / i, n = N / i) : T > M ? T < 0.01 ? (i = 0.707106781, s = 0, n = 0.707106781) : (s = Math.sqrt(T), i = S / s, n = A / s) : M < 0.01 ? (i = 0.707106781, s = 0.707106781, n = 0) : (n = Math.sqrt(M), i = N / n, s = A / n), this.set(i, s, n, r), this;
25689
25689
  }
25690
25690
  let v = Math.sqrt((g - p) * (g - p) + (c - f) * (c - f) + (d - u) * (d - u));
25691
25691
  return Math.abs(v) < 1e-3 && (v = 1), this.x = (g - p) / v, this.y = (c - f) / v, this.z = (d - u) / v, this.w = Math.acos((h + m + y - 1) / 2), this;
@@ -27290,8 +27290,8 @@ class Vt {
27290
27290
  * @return {Matrix4} A reference to this matrix.
27291
27291
  */
27292
27292
  multiplyMatrices(e, r) {
27293
- const i = e.elements, s = r.elements, n = this.elements, a = i[0], o = i[4], l = i[8], h = i[12], u = i[1], c = i[5], d = i[9], m = i[13], p = i[2], f = i[6], g = i[10], y = i[14], v = i[3], S = i[7], T = i[11], M = i[15], w = s[0], _ = s[4], A = s[8], B = s[12], ee = s[1], K = s[5], ie = s[9], se = s[13], ne = s[2], Te = s[6], pe = s[10], _e = s[14], xe = s[3], we = s[7], ye = s[11], ve = s[15];
27294
- return n[0] = a * w + o * ee + l * ne + h * xe, n[4] = a * _ + o * K + l * Te + h * we, n[8] = a * A + o * ie + l * pe + h * ye, n[12] = a * B + o * se + l * _e + h * ve, n[1] = u * w + c * ee + d * ne + m * xe, n[5] = u * _ + c * K + d * Te + m * we, n[9] = u * A + c * ie + d * pe + m * ye, n[13] = u * B + c * se + d * _e + m * ve, n[2] = p * w + f * ee + g * ne + y * xe, n[6] = p * _ + f * K + g * Te + y * we, n[10] = p * A + f * ie + g * pe + y * ye, n[14] = p * B + f * se + g * _e + y * ve, n[3] = v * w + S * ee + T * ne + M * xe, n[7] = v * _ + S * K + T * Te + M * we, n[11] = v * A + S * ie + T * pe + M * ye, n[15] = v * B + S * se + T * _e + M * ve, this;
27293
+ const i = e.elements, s = r.elements, n = this.elements, a = i[0], o = i[4], l = i[8], h = i[12], u = i[1], c = i[5], d = i[9], m = i[13], p = i[2], f = i[6], g = i[10], y = i[14], v = i[3], w = i[7], T = i[11], M = i[15], S = s[0], N = s[4], A = s[8], U = s[12], ee = s[1], K = s[5], ie = s[9], se = s[13], ne = s[2], Te = s[6], pe = s[10], _e = s[14], xe = s[3], we = s[7], ye = s[11], ve = s[15];
27294
+ return n[0] = a * S + o * ee + l * ne + h * xe, n[4] = a * N + o * K + l * Te + h * we, n[8] = a * A + o * ie + l * pe + h * ye, n[12] = a * U + o * se + l * _e + h * ve, n[1] = u * S + c * ee + d * ne + m * xe, n[5] = u * N + c * K + d * Te + m * we, n[9] = u * A + c * ie + d * pe + m * ye, n[13] = u * U + c * se + d * _e + m * ve, n[2] = p * S + f * ee + g * ne + y * xe, n[6] = p * N + f * K + g * Te + y * we, n[10] = p * A + f * ie + g * pe + y * ye, n[14] = p * U + f * se + g * _e + y * ve, n[3] = v * S + w * ee + T * ne + M * xe, n[7] = v * N + w * K + T * Te + M * we, n[11] = v * A + w * ie + T * pe + M * ye, n[15] = v * U + w * se + T * _e + M * ve, this;
27295
27295
  }
27296
27296
  /**
27297
27297
  * Multiplies every component of the matrix by the given scalar.
@@ -27345,10 +27345,10 @@ class Vt {
27345
27345
  * @return {Matrix4} A reference to this matrix.
27346
27346
  */
27347
27347
  invert() {
27348
- const e = this.elements, r = e[0], i = e[1], s = e[2], n = e[3], a = e[4], o = e[5], l = e[6], h = e[7], u = e[8], c = e[9], d = e[10], m = e[11], p = e[12], f = e[13], g = e[14], y = e[15], v = c * g * h - f * d * h + f * l * m - o * g * m - c * l * y + o * d * y, S = p * d * h - u * g * h - p * l * m + a * g * m + u * l * y - a * d * y, T = u * f * h - p * c * h + p * o * m - a * f * m - u * o * y + a * c * y, M = p * c * l - u * f * l - p * o * d + a * f * d + u * o * g - a * c * g, w = r * v + i * S + s * T + n * M;
27349
- if (w === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
27350
- const _ = 1 / w;
27351
- return e[0] = v * _, e[1] = (f * d * n - c * g * n - f * s * m + i * g * m + c * s * y - i * d * y) * _, e[2] = (o * g * n - f * l * n + f * s * h - i * g * h - o * s * y + i * l * y) * _, e[3] = (c * l * n - o * d * n - c * s * h + i * d * h + o * s * m - i * l * m) * _, e[4] = S * _, e[5] = (u * g * n - p * d * n + p * s * m - r * g * m - u * s * y + r * d * y) * _, e[6] = (p * l * n - a * g * n - p * s * h + r * g * h + a * s * y - r * l * y) * _, e[7] = (a * d * n - u * l * n + u * s * h - r * d * h - a * s * m + r * l * m) * _, e[8] = T * _, e[9] = (p * c * n - u * f * n - p * i * m + r * f * m + u * i * y - r * c * y) * _, e[10] = (a * f * n - p * o * n + p * i * h - r * f * h - a * i * y + r * o * y) * _, e[11] = (u * o * n - a * c * n - u * i * h + r * c * h + a * i * m - r * o * m) * _, e[12] = M * _, e[13] = (u * f * s - p * c * s + p * i * d - r * f * d - u * i * g + r * c * g) * _, e[14] = (p * o * s - a * f * s - p * i * l + r * f * l + a * i * g - r * o * g) * _, e[15] = (a * c * s - u * o * s + u * i * l - r * c * l - a * i * d + r * o * d) * _, this;
27348
+ const e = this.elements, r = e[0], i = e[1], s = e[2], n = e[3], a = e[4], o = e[5], l = e[6], h = e[7], u = e[8], c = e[9], d = e[10], m = e[11], p = e[12], f = e[13], g = e[14], y = e[15], v = c * g * h - f * d * h + f * l * m - o * g * m - c * l * y + o * d * y, w = p * d * h - u * g * h - p * l * m + a * g * m + u * l * y - a * d * y, T = u * f * h - p * c * h + p * o * m - a * f * m - u * o * y + a * c * y, M = p * c * l - u * f * l - p * o * d + a * f * d + u * o * g - a * c * g, S = r * v + i * w + s * T + n * M;
27349
+ if (S === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
27350
+ const N = 1 / S;
27351
+ return e[0] = v * N, e[1] = (f * d * n - c * g * n - f * s * m + i * g * m + c * s * y - i * d * y) * N, e[2] = (o * g * n - f * l * n + f * s * h - i * g * h - o * s * y + i * l * y) * N, e[3] = (c * l * n - o * d * n - c * s * h + i * d * h + o * s * m - i * l * m) * N, e[4] = w * N, e[5] = (u * g * n - p * d * n + p * s * m - r * g * m - u * s * y + r * d * y) * N, e[6] = (p * l * n - a * g * n - p * s * h + r * g * h + a * s * y - r * l * y) * N, e[7] = (a * d * n - u * l * n + u * s * h - r * d * h - a * s * m + r * l * m) * N, e[8] = T * N, e[9] = (p * c * n - u * f * n - p * i * m + r * f * m + u * i * y - r * c * y) * N, e[10] = (a * f * n - p * o * n + p * i * h - r * f * h - a * i * y + r * o * y) * N, e[11] = (u * o * n - a * c * n - u * i * h + r * c * h + a * i * m - r * o * m) * N, e[12] = M * N, e[13] = (u * f * s - p * c * s + p * i * d - r * f * d - u * i * g + r * c * g) * N, e[14] = (p * o * s - a * f * s - p * i * l + r * f * l + a * i * g - r * o * g) * N, e[15] = (a * c * s - u * o * s + u * i * l - r * c * l - a * i * d + r * o * d) * N, this;
27352
27352
  }
27353
27353
  /**
27354
27354
  * Multiplies the columns of this matrix by the given vector.
@@ -27599,8 +27599,8 @@ class Vt {
27599
27599
  * @return {Matrix4} A reference to this matrix.
27600
27600
  */
27601
27601
  compose(e, r, i) {
27602
- const s = this.elements, n = r._x, a = r._y, o = r._z, l = r._w, h = n + n, u = a + a, c = o + o, d = n * h, m = n * u, p = n * c, f = a * u, g = a * c, y = o * c, v = l * h, S = l * u, T = l * c, M = i.x, w = i.y, _ = i.z;
27603
- return s[0] = (1 - (f + y)) * M, s[1] = (m + T) * M, s[2] = (p - S) * M, s[3] = 0, s[4] = (m - T) * w, s[5] = (1 - (d + y)) * w, s[6] = (g + v) * w, s[7] = 0, s[8] = (p + S) * _, s[9] = (g - v) * _, s[10] = (1 - (d + f)) * _, s[11] = 0, s[12] = e.x, s[13] = e.y, s[14] = e.z, s[15] = 1, this;
27602
+ const s = this.elements, n = r._x, a = r._y, o = r._z, l = r._w, h = n + n, u = a + a, c = o + o, d = n * h, m = n * u, p = n * c, f = a * u, g = a * c, y = o * c, v = l * h, w = l * u, T = l * c, M = i.x, S = i.y, N = i.z;
27603
+ return s[0] = (1 - (f + y)) * M, s[1] = (m + T) * M, s[2] = (p - w) * M, s[3] = 0, s[4] = (m - T) * S, s[5] = (1 - (d + y)) * S, s[6] = (g + v) * S, s[7] = 0, s[8] = (p + w) * N, s[9] = (g - v) * N, s[10] = (1 - (d + f)) * N, s[11] = 0, s[12] = e.x, s[13] = e.y, s[14] = e.z, s[15] = 1, this;
27604
27604
  }
27605
27605
  /**
27606
27606
  * Decomposes this matrix into its position, rotation and scale components
@@ -30414,17 +30414,17 @@ class Ic extends ju {
30414
30414
  for (let A = 0; A < i.count; A++)
30415
30415
  o[A] = new G(), l[A] = new G();
30416
30416
  const h = new G(), u = new G(), c = new G(), d = new er(), m = new er(), p = new er(), f = new G(), g = new G();
30417
- function y(A, B, ee) {
30418
- h.fromBufferAttribute(i, A), u.fromBufferAttribute(i, B), c.fromBufferAttribute(i, ee), d.fromBufferAttribute(n, A), m.fromBufferAttribute(n, B), p.fromBufferAttribute(n, ee), u.sub(h), c.sub(h), m.sub(d), p.sub(d);
30417
+ function y(A, U, ee) {
30418
+ h.fromBufferAttribute(i, A), u.fromBufferAttribute(i, U), c.fromBufferAttribute(i, ee), d.fromBufferAttribute(n, A), m.fromBufferAttribute(n, U), p.fromBufferAttribute(n, ee), u.sub(h), c.sub(h), m.sub(d), p.sub(d);
30419
30419
  const K = 1 / (m.x * p.y - p.x * m.y);
30420
- isFinite(K) && (f.copy(u).multiplyScalar(p.y).addScaledVector(c, -m.y).multiplyScalar(K), g.copy(c).multiplyScalar(m.x).addScaledVector(u, -p.x).multiplyScalar(K), o[A].add(f), o[B].add(f), o[ee].add(f), l[A].add(g), l[B].add(g), l[ee].add(g));
30420
+ isFinite(K) && (f.copy(u).multiplyScalar(p.y).addScaledVector(c, -m.y).multiplyScalar(K), g.copy(c).multiplyScalar(m.x).addScaledVector(u, -p.x).multiplyScalar(K), o[A].add(f), o[U].add(f), o[ee].add(f), l[A].add(g), l[U].add(g), l[ee].add(g));
30421
30421
  }
30422
30422
  let v = this.groups;
30423
30423
  v.length === 0 && (v = [{
30424
30424
  start: 0,
30425
30425
  count: e.count
30426
30426
  }]);
30427
- for (let A = 0, B = v.length; A < B; ++A) {
30427
+ for (let A = 0, U = v.length; A < U; ++A) {
30428
30428
  const ee = v[A], K = ee.start, ie = ee.count;
30429
30429
  for (let se = K, ne = K + ie; se < ne; se += 3)
30430
30430
  y(
@@ -30433,18 +30433,18 @@ class Ic extends ju {
30433
30433
  e.getX(se + 2)
30434
30434
  );
30435
30435
  }
30436
- const S = new G(), T = new G(), M = new G(), w = new G();
30437
- function _(A) {
30438
- M.fromBufferAttribute(s, A), w.copy(M);
30439
- const B = o[A];
30440
- S.copy(B), S.sub(M.multiplyScalar(M.dot(B))).normalize(), T.crossVectors(w, B);
30436
+ const w = new G(), T = new G(), M = new G(), S = new G();
30437
+ function N(A) {
30438
+ M.fromBufferAttribute(s, A), S.copy(M);
30439
+ const U = o[A];
30440
+ w.copy(U), w.sub(M.multiplyScalar(M.dot(U))).normalize(), T.crossVectors(S, U);
30441
30441
  const K = T.dot(l[A]) < 0 ? -1 : 1;
30442
- a.setXYZW(A, S.x, S.y, S.z, K);
30442
+ a.setXYZW(A, w.x, w.y, w.z, K);
30443
30443
  }
30444
- for (let A = 0, B = v.length; A < B; ++A) {
30444
+ for (let A = 0, U = v.length; A < U; ++A) {
30445
30445
  const ee = v[A], K = ee.start, ie = ee.count;
30446
30446
  for (let se = K, ne = K + ie; se < ne; se += 3)
30447
- _(e.getX(se + 0)), _(e.getX(se + 1)), _(e.getX(se + 2));
30447
+ N(e.getX(se + 0)), N(e.getX(se + 1)), N(e.getX(se + 2));
30448
30448
  }
30449
30449
  }
30450
30450
  /**
@@ -30692,33 +30692,33 @@ class pg extends vn {
30692
30692
  if (o !== null)
30693
30693
  if (Array.isArray(a))
30694
30694
  for (let p = 0, f = d.length; p < f; p++) {
30695
- const g = d[p], y = a[g.materialIndex], v = Math.max(g.start, m.start), S = Math.min(o.count, Math.min(g.start + g.count, m.start + m.count));
30696
- for (let T = v, M = S; T < M; T += 3) {
30697
- const w = o.getX(T), _ = o.getX(T + 1), A = o.getX(T + 2);
30698
- s = Kp(this, y, e, i, h, u, c, w, _, A), s && (s.faceIndex = Math.floor(T / 3), s.face.materialIndex = g.materialIndex, r.push(s));
30695
+ const g = d[p], y = a[g.materialIndex], v = Math.max(g.start, m.start), w = Math.min(o.count, Math.min(g.start + g.count, m.start + m.count));
30696
+ for (let T = v, M = w; T < M; T += 3) {
30697
+ const S = o.getX(T), N = o.getX(T + 1), A = o.getX(T + 2);
30698
+ s = Kp(this, y, e, i, h, u, c, S, N, A), s && (s.faceIndex = Math.floor(T / 3), s.face.materialIndex = g.materialIndex, r.push(s));
30699
30699
  }
30700
30700
  }
30701
30701
  else {
30702
30702
  const p = Math.max(0, m.start), f = Math.min(o.count, m.start + m.count);
30703
30703
  for (let g = p, y = f; g < y; g += 3) {
30704
- const v = o.getX(g), S = o.getX(g + 1), T = o.getX(g + 2);
30705
- s = Kp(this, a, e, i, h, u, c, v, S, T), s && (s.faceIndex = Math.floor(g / 3), r.push(s));
30704
+ const v = o.getX(g), w = o.getX(g + 1), T = o.getX(g + 2);
30705
+ s = Kp(this, a, e, i, h, u, c, v, w, T), s && (s.faceIndex = Math.floor(g / 3), r.push(s));
30706
30706
  }
30707
30707
  }
30708
30708
  else if (l !== void 0)
30709
30709
  if (Array.isArray(a))
30710
30710
  for (let p = 0, f = d.length; p < f; p++) {
30711
- const g = d[p], y = a[g.materialIndex], v = Math.max(g.start, m.start), S = Math.min(l.count, Math.min(g.start + g.count, m.start + m.count));
30712
- for (let T = v, M = S; T < M; T += 3) {
30713
- const w = T, _ = T + 1, A = T + 2;
30714
- s = Kp(this, y, e, i, h, u, c, w, _, A), s && (s.faceIndex = Math.floor(T / 3), s.face.materialIndex = g.materialIndex, r.push(s));
30711
+ const g = d[p], y = a[g.materialIndex], v = Math.max(g.start, m.start), w = Math.min(l.count, Math.min(g.start + g.count, m.start + m.count));
30712
+ for (let T = v, M = w; T < M; T += 3) {
30713
+ const S = T, N = T + 1, A = T + 2;
30714
+ s = Kp(this, y, e, i, h, u, c, S, N, A), s && (s.faceIndex = Math.floor(T / 3), s.face.materialIndex = g.materialIndex, r.push(s));
30715
30715
  }
30716
30716
  }
30717
30717
  else {
30718
30718
  const p = Math.max(0, m.start), f = Math.min(l.count, m.start + m.count);
30719
30719
  for (let g = p, y = f; g < y; g += 3) {
30720
- const v = g, S = g + 1, T = g + 2;
30721
- s = Kp(this, a, e, i, h, u, c, v, S, T), s && (s.faceIndex = Math.floor(g / 3), r.push(s));
30720
+ const v = g, w = g + 1, T = g + 2;
30721
+ s = Kp(this, a, e, i, h, u, c, v, w, T), s && (s.faceIndex = Math.floor(g / 3), r.push(s));
30722
30722
  }
30723
30723
  }
30724
30724
  }
@@ -30776,23 +30776,23 @@ class Jv extends Ic {
30776
30776
  const l = [], h = [], u = [], c = [];
30777
30777
  let d = 0, m = 0;
30778
30778
  p("z", "y", "x", -1, -1, i, r, e, a, n, 0), p("z", "y", "x", 1, -1, i, r, -e, a, n, 1), p("x", "z", "y", 1, 1, e, i, r, s, a, 2), p("x", "z", "y", 1, -1, e, i, -r, s, a, 3), p("x", "y", "z", 1, -1, e, r, i, s, n, 4), p("x", "y", "z", -1, -1, e, r, -i, s, n, 5), this.setIndex(l), this.setAttribute("position", new nc(h, 3)), this.setAttribute("normal", new nc(u, 3)), this.setAttribute("uv", new nc(c, 2));
30779
- function p(f, g, y, v, S, T, M, w, _, A, B) {
30780
- const ee = T / _, K = M / A, ie = T / 2, se = M / 2, ne = w / 2, Te = _ + 1, pe = A + 1;
30779
+ function p(f, g, y, v, w, T, M, S, N, A, U) {
30780
+ const ee = T / N, K = M / A, ie = T / 2, se = M / 2, ne = S / 2, Te = N + 1, pe = A + 1;
30781
30781
  let _e = 0, xe = 0;
30782
30782
  const we = new G();
30783
30783
  for (let ye = 0; ye < pe; ye++) {
30784
30784
  const ve = ye * K - se;
30785
30785
  for (let et = 0; et < Te; et++) {
30786
30786
  const _t = et * ee - ie;
30787
- we[f] = _t * v, we[g] = ve * S, we[y] = ne, h.push(we.x, we.y, we.z), we[f] = 0, we[g] = 0, we[y] = w > 0 ? 1 : -1, u.push(we.x, we.y, we.z), c.push(et / _), c.push(1 - ye / A), _e += 1;
30787
+ we[f] = _t * v, we[g] = ve * w, we[y] = ne, h.push(we.x, we.y, we.z), we[f] = 0, we[g] = 0, we[y] = S > 0 ? 1 : -1, u.push(we.x, we.y, we.z), c.push(et / N), c.push(1 - ye / A), _e += 1;
30788
30788
  }
30789
30789
  }
30790
30790
  for (let ye = 0; ye < A; ye++)
30791
- for (let ve = 0; ve < _; ve++) {
30791
+ for (let ve = 0; ve < N; ve++) {
30792
30792
  const et = d + ve + Te * ye, _t = d + ve + Te * (ye + 1), Dt = d + (ve + 1) + Te * (ye + 1), Ye = d + (ve + 1) + Te * ye;
30793
30793
  l.push(et, _t, Ye), l.push(_t, Dt, Ye), xe += 6;
30794
30794
  }
30795
- o.addGroup(m, xe, B), m += xe, d += _e;
30795
+ o.addGroup(m, xe, U), m += xe, d += _e;
30796
30796
  }
30797
30797
  }
30798
30798
  copy(e) {
@@ -32194,21 +32194,21 @@ const Rl = {
32194
32194
  fragmentNode: ({ uniforms: t, childNode: e, onCleanup: r, onBeforeRender: i, dimensions: s }) => {
32195
32195
  let { vec2: n, vec3: a, vec4: o, floor: l, fract: h, dot: u, ceil: c, sqrt: d, screenUV: m, convertToTexture: p, texture: f } = Oe;
32196
32196
  if (!e) return o(0, 0, 0, 0);
32197
- let g = Math.round(s.width), y = Math.round(s.height), v = p(e, g, y), S = 1024, T = (Ai, ni, Ci) => {
32197
+ let g = Math.round(s.width), y = Math.round(s.height), v = p(e, g, y), w = 1024, T = (Ai, ni, Ci) => {
32198
32198
  let Ei = Ai.length, _s = Math.max(2, Math.ceil(Math.sqrt(Ei))), sa = Math.max(12, ni * 0.8), Fr = document.createElement("canvas");
32199
- Fr.width = S, Fr.height = S;
32199
+ Fr.width = w, Fr.height = w;
32200
32200
  let Ui = Fr.getContext("2d");
32201
32201
  Ui.fillStyle = "#000000", Ui.fillRect(0, 0, Fr.width, Fr.height), Ui.fillStyle = "#ffffff", Ui.font = `${sa}px ${Ci}`, Ui.textAlign = "center", Ui.textBaseline = "middle";
32202
- let ai = Math.max(32, ni * 2), ce = Math.floor(S / ai) * ai, le = Math.min(ai, ce / _s);
32202
+ let ai = Math.max(32, ni * 2), ce = Math.floor(w / ai) * ai, le = Math.min(ai, ce / _s);
32203
32203
  for (let dt = 0; dt < Ei; dt++) {
32204
32204
  let mt = Ai[dt], Ot = Math.floor(dt / _s), Bt = dt % _s, ur = Bt * le + le / 2, vt = Ot * le + le / 2;
32205
32205
  Ui.fillText(mt, ur, vt);
32206
32206
  }
32207
- let be = Ui.getImageData(0, 0, Fr.width, Fr.height), de = new Uint8Array(be.data), Ze = _s * le / S;
32207
+ let be = Ui.getImageData(0, 0, Fr.width, Fr.height), de = new Uint8Array(be.data), Ze = _s * le / w;
32208
32208
  return {
32209
32209
  data: de,
32210
- width: S,
32211
- height: S,
32210
+ width: w,
32211
+ height: w,
32212
32212
  atlasSize: _s,
32213
32213
  cellSize: ni,
32214
32214
  charCount: Ei,
@@ -32218,18 +32218,18 @@ const Rl = {
32218
32218
  };
32219
32219
  }, M = T(t.characters.uniform.value, t.cellSize.uniform.value, t.fontFamily.uniform.value);
32220
32220
  M = T(t.characters.uniform.value, t.cellSize.uniform.value, t.fontFamily.uniform.value);
32221
- let w = new im(M.data, S, S, qv, o3);
32222
- w.minFilter = Ws, w.magFilter = Ws, w.generateMipmaps = !1, w.needsUpdate = !0;
32223
- let _ = f(w), A = t.characters.uniform.value, B = t.cellSize.uniform.value, ee = t.fontFamily.uniform.value, K = 0;
32221
+ let S = new im(M.data, w, w, qv, o3);
32222
+ S.minFilter = Ws, S.magFilter = Ws, S.generateMipmaps = !1, S.needsUpdate = !0;
32223
+ let N = f(S), A = t.characters.uniform.value, U = t.cellSize.uniform.value, ee = t.fontFamily.uniform.value, K = 0;
32224
32224
  i(() => {
32225
32225
  let Ai = Date.now();
32226
32226
  if (Ai - K < 16) return;
32227
32227
  let ni = t.characters.uniform.value, Ci = t.cellSize.uniform.value, Ei = t.fontFamily.uniform.value;
32228
- (ni !== A || Ci !== B || Ei !== ee) && (console.log(`Updating atlas texture: cellSize ${B} → ${Ci}`), K = Ai, M = T(ni, Ci, Ei), w.image.data = M.data, w.needsUpdate = !0, ie.value = M.charCount, se.value = M.cellSize, ne.value = M.uvScale, A = ni, B = Ci, ee = Ei);
32228
+ (ni !== A || Ci !== U || Ei !== ee) && (console.log(`Updating atlas texture: cellSize ${U} → ${Ci}`), K = Ai, M = T(ni, Ci, Ei), S.image.data = M.data, S.needsUpdate = !0, ie.value = M.charCount, se.value = M.cellSize, ne.value = M.uvScale, A = ni, U = Ci, ee = Ei);
32229
32229
  }), r(() => {
32230
- w.dispose();
32230
+ S.dispose();
32231
32231
  });
32232
- let ie = zd(M.charCount), se = zd(M.cellSize), ne = zd(M.uvScale), Te = se.mul(1.5), pe = n(g, y).div(Te), _e = m.mul(pe), xe = l(_e), we = h(_e), ye = t.spacing.uniform, ve = we.mul(ye), et = Rb(1).sub(ye).mul(0.5), _t = ve.add(et), Dt = xe.add(n(0.5)).div(pe), Ye = v.sample(Dt), Xr = u(Ye.rgb, a(0.299, 0.587, 0.114)), Yr = ie, rr = Xr.mul(0.8).add(0.1), zt = rr.mul(Yr), wr = l(zt.min(Yr.sub(1e-4))), Sr = c(d(Yr)), Zr = wr.mod(Sr), Xt = l(wr.div(Sr)), Lr = Rb(1).div(Sr).mul(ne), di = n(Zr, Xt).mul(Lr).add(_t.mul(Lr)), Qi = _.sample(di);
32232
+ let ie = zd(M.charCount), se = zd(M.cellSize), ne = zd(M.uvScale), Te = se.mul(1.5), pe = n(g, y).div(Te), _e = m.mul(pe), xe = l(_e), we = h(_e), ye = t.spacing.uniform, ve = we.mul(ye), et = Rb(1).sub(ye).mul(0.5), _t = ve.add(et), Dt = xe.add(n(0.5)).div(pe), Ye = v.sample(Dt), Xr = u(Ye.rgb, a(0.299, 0.587, 0.114)), Yr = ie, rr = Xr.mul(0.8).add(0.1), zt = rr.mul(Yr), wr = l(zt.min(Yr.sub(1e-4))), Sr = c(d(Yr)), Zr = wr.mod(Sr), Xt = l(wr.div(Sr)), Lr = Rb(1).div(Sr).mul(ne), di = n(Zr, Xt).mul(Lr).add(_t.mul(Lr)), Qi = N.sample(di);
32233
32233
  return o(Qi.rgb.mul(Ye.rgb), Ye.a);
32234
32234
  }
32235
32235
  };
@@ -32844,16 +32844,16 @@ function M3(t, e, { kL: r = 1, kC: i = 1, kH: s = 1 } = {}) {
32844
32844
  c
32845
32845
  ])[1];
32846
32846
  l < 0 && (l = 0), d < 0 && (d = 0);
32847
- let m = (l + d) / 2, p = GM(m), f = 0.5 * (1 - Math.sqrt(p / (p + DM))), g = (1 + f) * a, y = (1 + f) * u, v = Math.sqrt(g ** 2 + o ** 2), S = Math.sqrt(y ** 2 + c ** 2), T = g === 0 && o === 0 ? 0 : Math.atan2(o, g), M = y === 0 && c === 0 ? 0 : Math.atan2(c, y);
32847
+ let m = (l + d) / 2, p = GM(m), f = 0.5 * (1 - Math.sqrt(p / (p + DM))), g = (1 + f) * a, y = (1 + f) * u, v = Math.sqrt(g ** 2 + o ** 2), w = Math.sqrt(y ** 2 + c ** 2), T = g === 0 && o === 0 ? 0 : Math.atan2(o, g), M = y === 0 && c === 0 ? 0 : Math.atan2(c, y);
32848
32848
  T < 0 && (T += 2 * yg), M < 0 && (M += 2 * yg), T *= $M, M *= $M;
32849
- let w = h - n, _ = S - v, A = M - T, B = T + M, ee = Math.abs(A), K;
32850
- v * S === 0 ? K = 0 : ee <= 180 ? K = A : A > 180 ? K = A - 360 : A < -180 ? K = A + 360 : Ss.warn("the unthinkable has happened");
32851
- let ie = 2 * Math.sqrt(S * v) * Math.sin(K * Nh / 2), se = (n + h) / 2, ne = (v + S) / 2, Te = GM(ne), pe;
32852
- pe = v * S === 0 ? B : ee <= 180 ? B / 2 : B < 360 ? (B + 360) / 2 : (B - 360) / 2;
32849
+ let S = h - n, N = w - v, A = M - T, U = T + M, ee = Math.abs(A), K;
32850
+ v * w === 0 ? K = 0 : ee <= 180 ? K = A : A > 180 ? K = A - 360 : A < -180 ? K = A + 360 : Ss.warn("the unthinkable has happened");
32851
+ let ie = 2 * Math.sqrt(w * v) * Math.sin(K * Nh / 2), se = (n + h) / 2, ne = (v + w) / 2, Te = GM(ne), pe;
32852
+ pe = v * w === 0 ? U : ee <= 180 ? U / 2 : U < 360 ? (U + 360) / 2 : (U - 360) / 2;
32853
32853
  let _e = (se - 50) ** 2, xe = 1 + 0.015 * _e / Math.sqrt(20 + _e), we = 1 + 0.045 * ne, ye = 1;
32854
32854
  ye -= 0.17 * Math.cos((pe - 30) * Nh), ye += 0.24 * Math.cos(2 * pe * Nh), ye += 0.32 * Math.cos((3 * pe + 6) * Nh), ye -= 0.2 * Math.cos((4 * pe - 63) * Nh);
32855
- let ve = 1 + 0.015 * ne * ye, et = 30 * Math.exp(-1 * ((pe - 275) / 25) ** 2), _t = 2 * Math.sqrt(Te / (Te + DM)), Dt = -1 * Math.sin(2 * et * Nh) * _t, Ye = (w / (r * xe)) ** 2;
32856
- return Ye += (_ / (i * we)) ** 2, Ye += (ie / (s * ve)) ** 2, Ye += Dt * (_ / (i * we)) * (ie / (s * ve)), Math.sqrt(Ye);
32855
+ let ve = 1 + 0.015 * ne * ye, et = 30 * Math.exp(-1 * ((pe - 275) / 25) ** 2), _t = 2 * Math.sqrt(Te / (Te + DM)), Dt = -1 * Math.sin(2 * et * Nh) * _t, Ye = (S / (r * xe)) ** 2;
32856
+ return Ye += (N / (i * we)) ** 2, Ye += (ie / (s * ve)) ** 2, Ye += Dt * (N / (i * we)) * (ie / (s * ve)), Math.sqrt(Ye);
32857
32857
  }
32858
32858
  const OK = [
32859
32859
  [
@@ -32990,10 +32990,10 @@ function UK(t, e, { l: r = 2, c: i = 1 } = {}) {
32990
32990
  o < 0 && (o = 0), d < 0 && (d = 0);
32991
32991
  let m = s - h, p = o - d, f = n - u, g = a - c, y = f ** 2 + g ** 2 - p ** 2, v = 0.511;
32992
32992
  s >= 16 && (v = 0.040975 * s / (1 + 0.01765 * s));
32993
- let S = 0.0638 * o / (1 + 0.0131 * o) + 0.638, T;
32993
+ let w = 0.0638 * o / (1 + 0.0131 * o) + 0.638, T;
32994
32994
  Number.isNaN(l) && (l = 0), T = l >= 164 && l <= 345 ? 0.56 + Math.abs(0.2 * Math.cos((l + 168) * jM)) : 0.36 + Math.abs(0.4 * Math.cos((l + 35) * jM));
32995
- let M = o ** 4, w = Math.sqrt(M / (M + 1900)), _ = S * (w * T + 1 - w), A = (m / (r * v)) ** 2;
32996
- return A += (p / (i * S)) ** 2, A += y / _ ** 2, Math.sqrt(A);
32995
+ let M = o ** 4, S = Math.sqrt(M / (M + 1900)), N = w * (S * T + 1 - S), A = (m / (r * v)) ** 2;
32996
+ return A += (p / (i * w)) ** 2, A += y / N ** 2, Math.sqrt(A);
32997
32997
  }
32998
32998
  var nT = new Pe({
32999
32999
  id: "xyz-abs-d65",
@@ -33437,7 +33437,7 @@ function jb(t, e) {
33437
33437
  return Zt(tQ, f.map((g, y) => g * e.dRgbInv[y])).map((g) => g / 100);
33438
33438
  }
33439
33439
  function O3(t, e) {
33440
- let r = t.map((S) => S * 100), i = I3(Zt(P3, r).map((S, T) => S * e.dRgb[T]), e.fl), s = i[0] + (-12 * i[1] + i[2]) / 11, n = (i[0] + i[1] - 2 * i[2]) / 9, a = (Math.atan2(n, s) % cx + cx) % cx, o = 0.25 * (Math.cos(a + 2) + 3.8), l = 5e4 / 13 * e.nc * e.ncb * rT(o * Math.sqrt(s ** 2 + n ** 2), i[0] + i[1] + 1.05 * i[2] + 0.305), h = In(l, 0.9) * (1.64 - 0.29 ** e.n) ** 0.73, u = e.nbb * (2 * i[0] + i[1] + 0.05 * i[2]), c = In(u / e.aW, 0.5 * e.c * e.z), d = 100 * In(c, 2), m = 4 / e.c * c * (e.aW + 4) * e.flRoot, p = h * c, f = p * e.flRoot, g = ta(a * sQ), y = aQ(g), v = 50 * In(e.c * h / (e.aW + 4), 1 / 2);
33440
+ let r = t.map((w) => w * 100), i = I3(Zt(P3, r).map((w, T) => w * e.dRgb[T]), e.fl), s = i[0] + (-12 * i[1] + i[2]) / 11, n = (i[0] + i[1] - 2 * i[2]) / 9, a = (Math.atan2(n, s) % cx + cx) % cx, o = 0.25 * (Math.cos(a + 2) + 3.8), l = 5e4 / 13 * e.nc * e.ncb * rT(o * Math.sqrt(s ** 2 + n ** 2), i[0] + i[1] + 1.05 * i[2] + 0.305), h = In(l, 0.9) * (1.64 - 0.29 ** e.n) ** 0.73, u = e.nbb * (2 * i[0] + i[1] + 0.05 * i[2]), c = In(u / e.aW, 0.5 * e.c * e.z), d = 100 * In(c, 2), m = 4 / e.c * c * (e.aW + 4) * e.flRoot, p = h * c, f = p * e.flRoot, g = ta(a * sQ), y = aQ(g), v = 50 * In(e.c * h / (e.aW + 4), 1 / 2);
33441
33441
  return {
33442
33442
  J: d,
33443
33443
  C: p,
@@ -33639,12 +33639,12 @@ function Bo(t, { method: e = Ss.gamut_mapping, space: r = void 0, deltaEMethod:
33639
33639
  });
33640
33640
  if (o(t, l) > s) {
33641
33641
  if (Object.keys(n).length === 3) {
33642
- let v = Pe.resolveCoord(n.channel), S = xs(Yt(t, v.space), v.id);
33643
- if (Fo(S) && (S = 0), S >= n.max) return Yt({
33642
+ let v = Pe.resolveCoord(n.channel), w = xs(Yt(t, v.space), v.id);
33643
+ if (Fo(w) && (w = 0), w >= n.max) return Yt({
33644
33644
  space: "xyz-d65",
33645
33645
  coords: zi.D65
33646
33646
  }, t.space);
33647
- if (S <= n.min) return Yt({
33647
+ if (w <= n.min) return Yt({
33648
33648
  space: "xyz-d65",
33649
33649
  coords: [
33650
33650
  0,
@@ -33654,8 +33654,8 @@ function Bo(t, { method: e = Ss.gamut_mapping, space: r = void 0, deltaEMethod:
33654
33654
  }, t.space);
33655
33655
  }
33656
33656
  let h = Pe.resolveCoord(e), u = h.space, c = h.id, d = Yt(t, u);
33657
- d.coords.forEach((v, S) => {
33658
- Fo(v) && (d.coords[S] = 0);
33657
+ d.coords.forEach((v, w) => {
33658
+ Fo(v) && (d.coords[w] = 0);
33659
33659
  });
33660
33660
  let m = h.range || h.refRange, p = m[0], f = fQ(s), g = p, y = xs(d, c);
33661
33661
  for (; y - g > f; ) {
@@ -33716,8 +33716,8 @@ function gQ(t, { space: e } = {}) {
33716
33716
  let f = Yt(p, e), g = Object.values(e.coords);
33717
33717
  return f.coords = f.coords.map((y, v) => {
33718
33718
  if ("range" in g[v]) {
33719
- let [S, T] = g[v].range;
33720
- return T3(S, y, T);
33719
+ let [w, T] = g[v].range;
33720
+ return T3(w, y, T);
33721
33721
  }
33722
33722
  return y;
33723
33723
  }), f;
@@ -36345,7 +36345,7 @@ const { vec2: see, vec4: nee } = Oe, Et = (t) => {
36345
36345
  }
36346
36346
  },
36347
36347
  fragmentNode: ({ uniforms: t }) => {
36348
- let { vec2: e, vec3: r, vec4: i, float: s, screenUV: n, smoothstep: a, sin: o, length: l, timerLocal: h, viewportSize: u, mix: c, pow: d, max: m, normalize: p, dot: f, reflect: g } = Oe, y = h().mul(t.speed.uniform).add(t.seed.uniform), v = t.colorA.uniform, S = t.colorB.uniform, T = t.colorC.uniform, M = t.size.uniform, w = t.conformity.uniform, _ = t.edgeWidth.uniform, A = t.edgeCurve.uniform, B = t.highlightIntensity.uniform, ee = t.highlightLightX.uniform, K = t.highlightLightY.uniform, ie = t.highlightLightZ.uniform, se = t.highlightColor.uniform, ne = s(0.5), Te = u.x.div(u.y), pe = e(n.x.mul(Te), n.y), _e = e(t.center.uniform.x.mul(Te), t.center.uniform.y.oneMinus()), xe = pe.sub(_e), we = l(xe), ye = M, ve = s(4), et = o(xe.x.mul(ve.mul(s(0.8))).add(y.mul(s(0.8)))).mul(o(xe.y.mul(ve.mul(s(0.7))).add(y.mul(s(0.6))))).add(o(xe.x.mul(ve.mul(s(1.2))).sub(xe.y.mul(ve.mul(s(0.9))).add(y.mul(s(0.4)))))).mul(s(0.15)).mul(w), _t = o(xe.x.mul(ve.mul(s(1.4))).sub(y.mul(s(0.5)))).mul(o(xe.y.mul(ve.mul(s(1.1))).add(y.mul(s(0.7))))).mul(s(0.12)).mul(w).mul(a(s(0.15), s(0.25), ne)), Dt = o(xe.x.mul(ve.mul(s(1.8))).add(xe.y.mul(ve.mul(s(1.6))).add(y.mul(s(0.3))))).add(o(xe.x.mul(ve.mul(s(0.6))).sub(y.mul(s(0.9))))).mul(s(0.1)).mul(w).mul(a(s(0.3), s(0.4), ne)), Ye = o(xe.x.mul(ve.mul(s(2.2))).add(y.mul(s(0.2)))).mul(o(xe.y.mul(ve.mul(s(1.9))).sub(y.mul(s(0.8))))).mul(s(0.08)).mul(w).mul(a(s(0.45), s(0.55), ne)), Xr = o(xe.x.mul(ve.mul(s(2.8))).sub(xe.y.mul(ve.mul(s(2.4))).add(y.mul(s(0.6))))).mul(s(0.06)).mul(w).mul(a(s(0.6), s(0.7), ne)), Yr = o(xe.x.mul(ve.mul(s(3.2))).add(y.mul(s(1.1)))).add(o(xe.y.mul(ve.mul(s(3.5))).sub(y.mul(s(0.4))))).mul(s(0.04)).mul(w).mul(a(s(0.75), s(0.85), ne)), rr = et.add(_t).add(Dt).add(Ye).add(Xr).add(Yr), zt = ye.add(rr), wr = a(zt.add(_), zt.sub(_), we), Sr = d(wr, A), Zr = l(xe), Xt = zt, Lr = a(s(0), Xt, Zr), di = s(1).sub(Lr.mul(s(0.1))), Qi = p(r(xe.x.mul(Lr.add(s(0.2))), xe.y.mul(Lr.add(s(0.2))), di)), Ai = p(r(ee, K, ie)), ni = r(s(0), s(0), s(1)), Ci = g(Ai.negate(), Qi), Ei = s(32), _s = m(s(0), f(Ci, ni)), sa = d(_s, Ei), Fr = Lr.mul(s(0.5)).add(s(0.5)), Ui = sa.mul(Fr), ai = Ui.mul(B).mul(Sr), ce = xe.x.mul(s(3)), le = xe.y.mul(s(3)), be = o(ce.add(y.mul(s(0.4)))).mul(o(le.add(y.mul(s(0.3))))).add(o(ce.mul(s(0.7)).add(le.mul(s(0.8))).add(y.mul(s(0.2))))).mul(s(0.5)).add(s(0.5)), de = o(ce.mul(s(1.3)).sub(y.mul(s(0.5)))).mul(o(le.mul(s(1.1)).add(y.mul(s(0.6))))).add(o(ce.mul(s(0.5)).sub(le.mul(s(0.6)).sub(y.mul(s(0.3)))))).mul(s(0.5)).add(s(0.5)), Ze = o(ce.mul(s(0.8)).add(le.mul(s(1.2)).add(y.mul(s(0.1))))).mul(s(0.3)).add(s(0.5)), dt = a(s(0.1), s(0.9), be), mt = a(s(0.08), s(0.99), de.mul(Ze)), Ot = c(v.rgb, S.rgb, dt), Bt = c(Ot, T.rgb, mt), ur = v.a.add(S.a).add(T.a).div(s(3)), vt = se.rgb.mul(ai), ot = Bt.add(vt);
36348
+ let { vec2: e, vec3: r, vec4: i, float: s, screenUV: n, smoothstep: a, sin: o, length: l, timerLocal: h, viewportSize: u, mix: c, pow: d, max: m, normalize: p, dot: f, reflect: g } = Oe, y = h().mul(t.speed.uniform).add(t.seed.uniform), v = t.colorA.uniform, w = t.colorB.uniform, T = t.colorC.uniform, M = t.size.uniform, S = t.conformity.uniform, N = t.edgeWidth.uniform, A = t.edgeCurve.uniform, U = t.highlightIntensity.uniform, ee = t.highlightLightX.uniform, K = t.highlightLightY.uniform, ie = t.highlightLightZ.uniform, se = t.highlightColor.uniform, ne = s(0.5), Te = u.x.div(u.y), pe = e(n.x.mul(Te), n.y), _e = e(t.center.uniform.x.mul(Te), t.center.uniform.y.oneMinus()), xe = pe.sub(_e), we = l(xe), ye = M, ve = s(4), et = o(xe.x.mul(ve.mul(s(0.8))).add(y.mul(s(0.8)))).mul(o(xe.y.mul(ve.mul(s(0.7))).add(y.mul(s(0.6))))).add(o(xe.x.mul(ve.mul(s(1.2))).sub(xe.y.mul(ve.mul(s(0.9))).add(y.mul(s(0.4)))))).mul(s(0.15)).mul(S), _t = o(xe.x.mul(ve.mul(s(1.4))).sub(y.mul(s(0.5)))).mul(o(xe.y.mul(ve.mul(s(1.1))).add(y.mul(s(0.7))))).mul(s(0.12)).mul(S).mul(a(s(0.15), s(0.25), ne)), Dt = o(xe.x.mul(ve.mul(s(1.8))).add(xe.y.mul(ve.mul(s(1.6))).add(y.mul(s(0.3))))).add(o(xe.x.mul(ve.mul(s(0.6))).sub(y.mul(s(0.9))))).mul(s(0.1)).mul(S).mul(a(s(0.3), s(0.4), ne)), Ye = o(xe.x.mul(ve.mul(s(2.2))).add(y.mul(s(0.2)))).mul(o(xe.y.mul(ve.mul(s(1.9))).sub(y.mul(s(0.8))))).mul(s(0.08)).mul(S).mul(a(s(0.45), s(0.55), ne)), Xr = o(xe.x.mul(ve.mul(s(2.8))).sub(xe.y.mul(ve.mul(s(2.4))).add(y.mul(s(0.6))))).mul(s(0.06)).mul(S).mul(a(s(0.6), s(0.7), ne)), Yr = o(xe.x.mul(ve.mul(s(3.2))).add(y.mul(s(1.1)))).add(o(xe.y.mul(ve.mul(s(3.5))).sub(y.mul(s(0.4))))).mul(s(0.04)).mul(S).mul(a(s(0.75), s(0.85), ne)), rr = et.add(_t).add(Dt).add(Ye).add(Xr).add(Yr), zt = ye.add(rr), wr = a(zt.add(N), zt.sub(N), we), Sr = d(wr, A), Zr = l(xe), Xt = zt, Lr = a(s(0), Xt, Zr), di = s(1).sub(Lr.mul(s(0.1))), Qi = p(r(xe.x.mul(Lr.add(s(0.2))), xe.y.mul(Lr.add(s(0.2))), di)), Ai = p(r(ee, K, ie)), ni = r(s(0), s(0), s(1)), Ci = g(Ai.negate(), Qi), Ei = s(32), _s = m(s(0), f(Ci, ni)), sa = d(_s, Ei), Fr = Lr.mul(s(0.5)).add(s(0.5)), Ui = sa.mul(Fr), ai = Ui.mul(U).mul(Sr), ce = xe.x.mul(s(3)), le = xe.y.mul(s(3)), be = o(ce.add(y.mul(s(0.4)))).mul(o(le.add(y.mul(s(0.3))))).add(o(ce.mul(s(0.7)).add(le.mul(s(0.8))).add(y.mul(s(0.2))))).mul(s(0.5)).add(s(0.5)), de = o(ce.mul(s(1.3)).sub(y.mul(s(0.5)))).mul(o(le.mul(s(1.1)).add(y.mul(s(0.6))))).add(o(ce.mul(s(0.5)).sub(le.mul(s(0.6)).sub(y.mul(s(0.3)))))).mul(s(0.5)).add(s(0.5)), Ze = o(ce.mul(s(0.8)).add(le.mul(s(1.2)).add(y.mul(s(0.1))))).mul(s(0.3)).add(s(0.5)), dt = a(s(0.1), s(0.9), be), mt = a(s(0.08), s(0.99), de.mul(Ze)), Ot = c(v.rgb, w.rgb, dt), Bt = c(Ot, T.rgb, mt), ur = v.a.add(w.a).add(T.a).div(s(3)), vt = se.rgb.mul(ai), ot = Bt.add(vt);
36349
36349
  return i(ot, ur.mul(Sr));
36350
36350
  }
36351
36351
  }, Vl = {
@@ -36388,8 +36388,8 @@ const { vec2: see, vec4: nee } = Oe, Et = (t) => {
36388
36388
  0.0625
36389
36389
  ], f = s(0);
36390
36390
  for (let g = 0; g < m.length; g++) {
36391
- let y = m[g].mul(d), v = a.add(y), S = n(p[g]), T = c.sample(v);
36392
- f = f.add(T.mul(S));
36391
+ let y = m[g].mul(d), v = a.add(y), w = n(p[g]), T = c.sample(v);
36392
+ f = f.add(T.mul(w));
36393
36393
  }
36394
36394
  return f;
36395
36395
  }
@@ -36538,12 +36538,12 @@ const { vec2: see, vec4: nee } = Oe, Et = (t) => {
36538
36538
  m.magFilter = ys, m.minFilter = ys, m.needsUpdate = !0;
36539
36539
  let p = new im(d, 128, 128, No, bc);
36540
36540
  p.magFilter = ys, p.minFilter = ys, p.needsUpdate = !0;
36541
- let f = l(m), g = l(p), y = a(0.5), v = a(0.5), S = a(0), T = a(0), M = 0.5, w = 0.5, _ = Date.now();
36541
+ let f = l(m), g = l(p), y = a(0.5), v = a(0.5), w = a(0), T = a(0), M = 0.5, S = 0.5, N = Date.now();
36542
36542
  e(({ pointer: Fr }) => {
36543
- let Ui = Date.now(), ai = Math.min((Ui - _) / 1e3, 0.016);
36544
- _ = Ui;
36545
- let ce = ai > 0 ? (Fr.x - M) / ai : 0, le = ai > 0 ? (Fr.y - w) / ai : 0;
36546
- S.value = S.value * 0.85 + ce * 0.15, T.value = T.value * 0.85 + le * 0.15, y.value = Fr.x, v.value = Fr.y;
36543
+ let Ui = Date.now(), ai = Math.min((Ui - N) / 1e3, 0.016);
36544
+ N = Ui;
36545
+ let ce = ai > 0 ? (Fr.x - M) / ai : 0, le = ai > 0 ? (Fr.y - S) / ai : 0;
36546
+ w.value = w.value * 0.85 + ce * 0.15, T.value = T.value * 0.85 + le * 0.15, y.value = Fr.x, v.value = Fr.y;
36547
36547
  let be = t.duration.uniform.value, de = t.intensity.uniform.value, Ze = t.radius.uniform.value * 0.05, dt = t.momentum.uniform.value, mt = new Float32Array(c), Ot = new Float32Array(d), Bt = 1 - ai / Math.max(be / 150 * 5, 1);
36548
36548
  for (let ur = 0; ur < 16384 * 2; ur++) mt[ur] = c[ur] * Bt;
36549
36549
  for (let ur = 0; ur < 128; ur++) for (let vt = 0; vt < 128; vt++) {
@@ -36557,20 +36557,20 @@ const { vec2: see, vec4: nee } = Oe, Et = (t) => {
36557
36557
  }
36558
36558
  }
36559
36559
  for (let ur = 0; ur < 128; ur++) for (let vt = 0; vt < 128; vt++) {
36560
- let ot = (ur * 128 + vt) * 2, pt = (vt + 0.5) / 128, Jr = (ur + 0.5) / 128, es = pt - Fr.x, Xo = Jr - Fr.y, na = Math.sqrt(es * es + Xo * Xo), aa = Math.sqrt(S.value * S.value + T.value * T.value), zc = Math.min(aa * aa * 20, 1), Yo = Ze * zc;
36560
+ let ot = (ur * 128 + vt) * 2, pt = (vt + 0.5) / 128, Jr = (ur + 0.5) / 128, es = pt - Fr.x, Xo = Jr - Fr.y, na = Math.sqrt(es * es + Xo * Xo), aa = Math.sqrt(w.value * w.value + T.value * T.value), zc = Math.min(aa * aa * 20, 1), Yo = Ze * zc;
36561
36561
  if (na < Yo * 2 && Math.abs(ce) + Math.abs(le) > 0.01) {
36562
36562
  let Za = Math.exp(-na * na / (Yo * Yo));
36563
- mt[ot] += S.value * Za * (de * 100) * ai * 0.01, mt[ot + 1] += T.value * Za * (de * 100) * ai * 0.01;
36563
+ mt[ot] += w.value * Za * (de * 100) * ai * 0.01, mt[ot + 1] += T.value * Za * (de * 100) * ai * 0.01;
36564
36564
  let Zu = Math.min(aa * 10, 1);
36565
36565
  Ot[ot] += Za * (de * 100) * ai * 0.01 * Zu, Ot[ot + 1] = 0;
36566
36566
  }
36567
36567
  mt[ot] = Math.max(-1, Math.min(1, mt[ot])), mt[ot + 1] = Math.max(-1, Math.min(1, mt[ot + 1])), Ot[ot] = Math.max(0, Math.min(1, Ot[ot])), Ot[ot + 1] = 0;
36568
36568
  }
36569
- c.set(mt), d.set(Ot), m.needsUpdate = !0, p.needsUpdate = !0, M = Fr.x, w = Fr.y;
36569
+ c.set(mt), d.set(Ot), m.needsUpdate = !0, p.needsUpdate = !0, M = Fr.x, S = Fr.y;
36570
36570
  }), r(() => {
36571
36571
  m.dispose(), p.dispose();
36572
36572
  });
36573
- let A = g.sample(o).x, B = i(n(1 / 128), n(1 / 128)), ee = g.sample(o.add(i(B.x, n(0)))).x, K = g.sample(o.add(i(n(0), B.y))).x, ie = g.sample(o.add(i(B.x.negate(), n(0)))).x, se = g.sample(o.add(i(n(0), B.y.negate()))).x, ne = A.add(ee).add(K).add(ie).add(se).mul(n(0.2)), Te = h(n(0), n(0.1), ne), pe = i(n(1 / 128), n(1 / 128)), _e = f.sample(o).xy, xe = f.sample(o.add(i(pe.x, n(0)))).xy, we = f.sample(o.add(i(n(0), pe.y))).xy, ye = f.sample(o.add(i(pe.x.negate(), n(0)))).xy, ve = f.sample(o.add(i(n(0), pe.y.negate()))).xy, et = _e.add(xe).add(we).add(ye).add(ve).mul(n(0.2)), _t = t.baseColor.uniform, Dt = t.upColor.uniform, Ye = t.downColor.uniform, Xr = t.leftColor.uniform, Yr = t.rightColor.uniform, rr = et.x.mul(et.x).add(et.y.mul(et.y)).sqrt(), zt = h(n(0.01), n(0.1), rr), wr = et.x.div(rr.add(n(1e-3))), Sr = et.y.div(rr.add(n(1e-3))), Zr = h(n(0), n(0.7), wr.max(n(0))), Xt = h(n(0), n(0.7), wr.negate().max(n(0))), Lr = h(n(0), n(0.7), Sr.max(n(0))), di = h(n(0), n(0.7), Sr.negate().max(n(0))), Qi = Xr.mul(Xt).add(Yr.mul(Zr)), Ai = Ye.mul(di).add(Dt.mul(Lr)), ni = Xt.add(Zr), Ci = Lr.add(di), Ei = ni.add(Ci).add(n(1e-3)), _s = Qi.mul(ni.div(Ei)).add(Ai.mul(Ci.div(Ei))), sa = u(_t, _s, zt);
36573
+ let A = g.sample(o).x, U = i(n(1 / 128), n(1 / 128)), ee = g.sample(o.add(i(U.x, n(0)))).x, K = g.sample(o.add(i(n(0), U.y))).x, ie = g.sample(o.add(i(U.x.negate(), n(0)))).x, se = g.sample(o.add(i(n(0), U.y.negate()))).x, ne = A.add(ee).add(K).add(ie).add(se).mul(n(0.2)), Te = h(n(0), n(0.1), ne), pe = i(n(1 / 128), n(1 / 128)), _e = f.sample(o).xy, xe = f.sample(o.add(i(pe.x, n(0)))).xy, we = f.sample(o.add(i(n(0), pe.y))).xy, ye = f.sample(o.add(i(pe.x.negate(), n(0)))).xy, ve = f.sample(o.add(i(n(0), pe.y.negate()))).xy, et = _e.add(xe).add(we).add(ye).add(ve).mul(n(0.2)), _t = t.baseColor.uniform, Dt = t.upColor.uniform, Ye = t.downColor.uniform, Xr = t.leftColor.uniform, Yr = t.rightColor.uniform, rr = et.x.mul(et.x).add(et.y.mul(et.y)).sqrt(), zt = h(n(0.01), n(0.1), rr), wr = et.x.div(rr.add(n(1e-3))), Sr = et.y.div(rr.add(n(1e-3))), Zr = h(n(0), n(0.7), wr.max(n(0))), Xt = h(n(0), n(0.7), wr.negate().max(n(0))), Lr = h(n(0), n(0.7), Sr.max(n(0))), di = h(n(0), n(0.7), Sr.negate().max(n(0))), Qi = Xr.mul(Xt).add(Yr.mul(Zr)), Ai = Ye.mul(di).add(Dt.mul(Lr)), ni = Xt.add(Zr), Ci = Lr.add(di), Ei = ni.add(Ci).add(n(1e-3)), _s = Qi.mul(ni.div(Ei)).add(Ai.mul(Ci.div(Ei))), sa = u(_t, _s, zt);
36574
36574
  return s(sa.rgb.mul(Te), sa.a.mul(Te));
36575
36575
  }
36576
36576
  }, zl = {
@@ -36735,7 +36735,7 @@ const { vec2: see, vec4: nee } = Oe, Et = (t) => {
36735
36735
  fragmentNode: ({ uniforms: t, childNode: e, dimensions: r }) => {
36736
36736
  let { vec2: i, vec3: s, vec4: n, float: a, screenUV: o, sin: l, fract: h, smoothstep: u, mix: c, length: d, convertToTexture: m } = Oe;
36737
36737
  if (!e) return n(0, 0, 0, 0);
36738
- let p = Math.round(r.width), f = Math.round(r.height), g = m(e, p, f), y = t.pixelSize.uniform, v = t.colorShift.uniform, S = t.scanlineIntensity.uniform, T = t.scanlineFrequency.uniform, M = t.brightness.uniform, w = t.contrast.uniform, _ = t.curvature.uniform, A = t.scaleToFill.uniform, B = A.greaterThan(a(0.5)).select(a(1).add(_.mul(a(2))), a(1)), ee = o.sub(i(0.5, 0.5)).div(B).add(i(0.5, 0.5)), K = ee.sub(i(0.5, 0.5)), ie = d(K), se = _.mul(ie.mul(ie)), ne = ee.add(K.mul(se)), Te = ne.x.lessThan(a(0)).or(ne.x.greaterThan(a(1))).or(ne.y.lessThan(a(0))).or(ne.y.greaterThan(a(1))), pe = v.mul(a(2e-3)), _e = ne.add(i(pe, a(0))), xe = ne, we = ne.sub(i(pe, a(0))), ye = g.sample(_e).r, ve = g.sample(xe).g, et = g.sample(we).b, _t = s(ye, ve, et), Dt = _t.sub(a(0.5)).mul(w).add(a(0.5)).mul(M), Ye = ne.y.mul(T), Xr = l(Ye.mul(a(3.14159 * 2))), Yr = a(1).sub(S.mul(Xr.mul(a(0.5)).add(a(0.5)))), rr = Dt.mul(Yr), zt = y.mul(a(0.5)), wr = h(ne.mul(zt)), Sr = l(wr.x.mul(a(6.28318))).mul(a(0.1)).add(a(0.95)), Zr = l(wr.x.mul(a(6.28318)).add(a(2.09))).mul(a(0.1)).add(a(0.95)), Xt = l(wr.x.mul(a(6.28318)).add(a(4.18))).mul(a(0.1)).add(a(0.95)), Lr = s(rr.r.mul(Sr), rr.g.mul(Zr), rr.b.mul(Xt)), di = d(K), Qi = u(a(0.8), a(0.3), di), Ai = Lr.mul(Qi), ni = c(s(0, 0, 0), Ai, Te.select(a(0), a(1)));
36738
+ let p = Math.round(r.width), f = Math.round(r.height), g = m(e, p, f), y = t.pixelSize.uniform, v = t.colorShift.uniform, w = t.scanlineIntensity.uniform, T = t.scanlineFrequency.uniform, M = t.brightness.uniform, S = t.contrast.uniform, N = t.curvature.uniform, A = t.scaleToFill.uniform, U = A.greaterThan(a(0.5)).select(a(1).add(N.mul(a(2))), a(1)), ee = o.sub(i(0.5, 0.5)).div(U).add(i(0.5, 0.5)), K = ee.sub(i(0.5, 0.5)), ie = d(K), se = N.mul(ie.mul(ie)), ne = ee.add(K.mul(se)), Te = ne.x.lessThan(a(0)).or(ne.x.greaterThan(a(1))).or(ne.y.lessThan(a(0))).or(ne.y.greaterThan(a(1))), pe = v.mul(a(2e-3)), _e = ne.add(i(pe, a(0))), xe = ne, we = ne.sub(i(pe, a(0))), ye = g.sample(_e).r, ve = g.sample(xe).g, et = g.sample(we).b, _t = s(ye, ve, et), Dt = _t.sub(a(0.5)).mul(S).add(a(0.5)).mul(M), Ye = ne.y.mul(T), Xr = l(Ye.mul(a(3.14159 * 2))), Yr = a(1).sub(w.mul(Xr.mul(a(0.5)).add(a(0.5)))), rr = Dt.mul(Yr), zt = y.mul(a(0.5)), wr = h(ne.mul(zt)), Sr = l(wr.x.mul(a(6.28318))).mul(a(0.1)).add(a(0.95)), Zr = l(wr.x.mul(a(6.28318)).add(a(2.09))).mul(a(0.1)).add(a(0.95)), Xt = l(wr.x.mul(a(6.28318)).add(a(4.18))).mul(a(0.1)).add(a(0.95)), Lr = s(rr.r.mul(Sr), rr.g.mul(Zr), rr.b.mul(Xt)), di = d(K), Qi = u(a(0.8), a(0.3), di), Ai = Lr.mul(Qi), ni = c(s(0, 0, 0), Ai, Te.select(a(0), a(1)));
36739
36739
  return n(ni, a(1));
36740
36740
  }
36741
36741
  }, Dl = {
@@ -36786,8 +36786,8 @@ const { vec2: see, vec4: nee } = Oe, Et = (t) => {
36786
36786
  fragmentNode: ({ uniforms: t, childNode: e }) => {
36787
36787
  let { vec2: r, vec3: i, vec4: s, floor: n, screenUV: a, viewportSize: o, dot: l, step: h, mix: u } = Oe;
36788
36788
  if (!e) return s(0);
36789
- let c = e, d = l(c.rgb, i(0.299, 0.587, 0.114)), m = d.mul(c.a), p = t.pixelSize.uniform, f = n(a.mul(o).div(p)), g = f.mod(r(4)), y = g.x, v = g.y, S = v.equal(0).select(y.equal(0).select(0 / 16, y.equal(1).select(8 / 16, y.equal(2).select(2 / 16, 10 / 16))), v.equal(1).select(y.equal(0).select(12 / 16, y.equal(1).select(4 / 16, y.equal(2).select(14 / 16, 6 / 16))), v.equal(2).select(y.equal(0).select(3 / 16, y.equal(1).select(11 / 16, y.equal(2).select(1 / 16, 9 / 16))), y.equal(0).select(15 / 16, y.equal(1).select(7 / 16, y.equal(2).select(13 / 16, 5 / 16)))))), T = t.threshold.uniform, M = h(S, m.add(T.sub(0.5))), w = u(t.colorA.uniform.rgb, t.colorB.uniform.rgb, M), _ = u(t.colorA.uniform.a, t.colorB.uniform.a, M);
36790
- return s(w, _);
36789
+ let c = e, d = l(c.rgb, i(0.299, 0.587, 0.114)), m = d.mul(c.a), p = t.pixelSize.uniform, f = n(a.mul(o).div(p)), g = f.mod(r(4)), y = g.x, v = g.y, w = v.equal(0).select(y.equal(0).select(0 / 16, y.equal(1).select(8 / 16, y.equal(2).select(2 / 16, 10 / 16))), v.equal(1).select(y.equal(0).select(12 / 16, y.equal(1).select(4 / 16, y.equal(2).select(14 / 16, 6 / 16))), v.equal(2).select(y.equal(0).select(3 / 16, y.equal(1).select(11 / 16, y.equal(2).select(1 / 16, 9 / 16))), y.equal(0).select(15 / 16, y.equal(1).select(7 / 16, y.equal(2).select(13 / 16, 5 / 16)))))), T = t.threshold.uniform, M = h(w, m.add(T.sub(0.5))), S = u(t.colorA.uniform.rgb, t.colorB.uniform.rgb, M), N = u(t.colorA.uniform.a, t.colorB.uniform.a, M);
36790
+ return s(S, N);
36791
36791
  }
36792
36792
  }, $l = {
36793
36793
  name: "DotGrid",
@@ -36837,7 +36837,7 @@ const { vec2: see, vec4: nee } = Oe, Et = (t) => {
36837
36837
  }
36838
36838
  },
36839
36839
  fragmentNode: ({ uniforms: t }) => {
36840
- let { screenUV: e, vec4: r, vec2: i, smoothstep: s, length: n, floor: a, float: o, viewportSize: l, time: h, sin: u, mix: c } = Oe, d = e, m = t.density.uniform, p = t.dotSize.uniform, f = t.color.uniform, g = t.twinkle.uniform, y = l, v = y.x.div(y.y), S = i(d.x.mul(v), d.y.oneMinus()), T = S.mul(m), M = T.sub(a(T)), w = n(M.sub(0.5)), _ = n(e3(S.mul(m))), A = o(1).sub(s(p.mul(0.5), p.mul(0.5).add(_.mul(0.5)), w)), B = a(T), ee = B.x.mul(12.9898).add(B.y.mul(78.233)).sin().mul(43758.5453).fract(), K = h.mul(2).add(ee.mul(6.28318)), ie = u(K).mul(0.5).add(0.5), se = c(o(1), ie, g), ne = A.mul(se);
36840
+ let { screenUV: e, vec4: r, vec2: i, smoothstep: s, length: n, floor: a, float: o, viewportSize: l, time: h, sin: u, mix: c } = Oe, d = e, m = t.density.uniform, p = t.dotSize.uniform, f = t.color.uniform, g = t.twinkle.uniform, y = l, v = y.x.div(y.y), w = i(d.x.mul(v), d.y.oneMinus()), T = w.mul(m), M = T.sub(a(T)), S = n(M.sub(0.5)), N = n(e3(w.mul(m))), A = o(1).sub(s(p.mul(0.5), p.mul(0.5).add(N.mul(0.5)), S)), U = a(T), ee = U.x.mul(12.9898).add(U.y.mul(78.233)).sin().mul(43758.5453).fract(), K = h.mul(2).add(ee.mul(6.28318)), ie = u(K).mul(0.5).add(0.5), se = c(o(1), ie, g), ne = A.mul(se);
36841
36841
  return r(f.rgb, ne);
36842
36842
  }
36843
36843
  }, Gl = {
@@ -36895,7 +36895,7 @@ const { vec2: see, vec4: nee } = Oe, Et = (t) => {
36895
36895
  fragmentNode: ({ uniforms: t, childNode: e, dimensions: r }) => {
36896
36896
  let { vec2: i, vec4: s, floor: n, mul: a, div: o, sub: l, add: h, convertToTexture: u, screenUV: c, uniform: d } = Oe;
36897
36897
  if (!e) return console.error("You must pass a child component into the Glass Tiles shader."), s(0);
36898
- let m = Math.round(r.width), p = Math.round(r.height), f = u(e, m, p), g = d(r.width / r.height), y = c, v = t.intensity.uniform, S = t.tileCount.uniform, T = i(g.greaterThanEqual(1).select(a(S, g), S), g.lessThan(1).select(o(S, g), S)), M = o(n(a(y, T)), T), w = l(y, M), _ = i(0.5, 0.5), A = a(v, 0.025), B = o(w, o(i(1), T)), ee = l(B, _), K = a(ee, A), ie = h(w, K), se = h(ie, M);
36898
+ let m = Math.round(r.width), p = Math.round(r.height), f = u(e, m, p), g = d(r.width / r.height), y = c, v = t.intensity.uniform, w = t.tileCount.uniform, T = i(g.greaterThanEqual(1).select(a(w, g), w), g.lessThan(1).select(o(w, g), w)), M = o(n(a(y, T)), T), S = l(y, M), N = i(0.5, 0.5), A = a(v, 0.025), U = o(S, o(i(1), T)), ee = l(U, N), K = a(ee, A), ie = h(S, K), se = h(ie, M);
36899
36899
  return s(f.sample(se));
36900
36900
  }
36901
36901
  }, ql = {
@@ -37127,8 +37127,8 @@ var Fm = class e5 {
37127
37127
  return this.multiplyMatrices(e, this);
37128
37128
  }
37129
37129
  multiplyMatrices(e, r) {
37130
- let i = e.elements, s = r.elements, n = this.elements, a = i[0], o = i[3], l = i[6], h = i[1], u = i[4], c = i[7], d = i[2], m = i[5], p = i[8], f = s[0], g = s[3], y = s[6], v = s[1], S = s[4], T = s[7], M = s[2], w = s[5], _ = s[8];
37131
- return n[0] = a * f + o * v + l * M, n[3] = a * g + o * S + l * w, n[6] = a * y + o * T + l * _, n[1] = h * f + u * v + c * M, n[4] = h * g + u * S + c * w, n[7] = h * y + u * T + c * _, n[2] = d * f + m * v + p * M, n[5] = d * g + m * S + p * w, n[8] = d * y + m * T + p * _, this;
37130
+ let i = e.elements, s = r.elements, n = this.elements, a = i[0], o = i[3], l = i[6], h = i[1], u = i[4], c = i[7], d = i[2], m = i[5], p = i[8], f = s[0], g = s[3], y = s[6], v = s[1], w = s[4], T = s[7], M = s[2], S = s[5], N = s[8];
37131
+ return n[0] = a * f + o * v + l * M, n[3] = a * g + o * w + l * S, n[6] = a * y + o * T + l * N, n[1] = h * f + u * v + c * M, n[4] = h * g + u * w + c * S, n[7] = h * y + u * T + c * N, n[2] = d * f + m * v + p * M, n[5] = d * g + m * w + p * S, n[8] = d * y + m * T + p * N, this;
37132
37132
  }
37133
37133
  multiplyScalar(e) {
37134
37134
  let r = this.elements;
@@ -37651,10 +37651,10 @@ var Mee = class r5 {
37651
37651
  return;
37652
37652
  }
37653
37653
  if (c !== f || l !== d || h !== m || u !== p) {
37654
- let g = 1 - o, y = l * d + h * m + u * p + c * f, v = y >= 0 ? 1 : -1, S = 1 - y * y;
37655
- if (S > 2 ** -52) {
37656
- let M = Math.sqrt(S), w = Math.atan2(M, y * v);
37657
- g = Math.sin(g * w) / M, o = Math.sin(o * w) / M;
37654
+ let g = 1 - o, y = l * d + h * m + u * p + c * f, v = y >= 0 ? 1 : -1, w = 1 - y * y;
37655
+ if (w > 2 ** -52) {
37656
+ let M = Math.sqrt(w), S = Math.atan2(M, y * v);
37657
+ g = Math.sin(g * S) / M, o = Math.sin(o * S) / M;
37658
37658
  }
37659
37659
  let T = o * v;
37660
37660
  if (l = l * g + d * T, h = h * g + m * T, u = u * g + p * T, c = c * g + f * T, g === 1 - o) {
@@ -38193,8 +38193,8 @@ var s5 = class Yb {
38193
38193
  return this.multiplyMatrices(e, this);
38194
38194
  }
38195
38195
  multiplyMatrices(e, r) {
38196
- let i = e.elements, s = r.elements, n = this.elements, a = i[0], o = i[4], l = i[8], h = i[12], u = i[1], c = i[5], d = i[9], m = i[13], p = i[2], f = i[6], g = i[10], y = i[14], v = i[3], S = i[7], T = i[11], M = i[15], w = s[0], _ = s[4], A = s[8], B = s[12], ee = s[1], K = s[5], ie = s[9], se = s[13], ne = s[2], Te = s[6], pe = s[10], _e = s[14], xe = s[3], we = s[7], ye = s[11], ve = s[15];
38197
- return n[0] = a * w + o * ee + l * ne + h * xe, n[4] = a * _ + o * K + l * Te + h * we, n[8] = a * A + o * ie + l * pe + h * ye, n[12] = a * B + o * se + l * _e + h * ve, n[1] = u * w + c * ee + d * ne + m * xe, n[5] = u * _ + c * K + d * Te + m * we, n[9] = u * A + c * ie + d * pe + m * ye, n[13] = u * B + c * se + d * _e + m * ve, n[2] = p * w + f * ee + g * ne + y * xe, n[6] = p * _ + f * K + g * Te + y * we, n[10] = p * A + f * ie + g * pe + y * ye, n[14] = p * B + f * se + g * _e + y * ve, n[3] = v * w + S * ee + T * ne + M * xe, n[7] = v * _ + S * K + T * Te + M * we, n[11] = v * A + S * ie + T * pe + M * ye, n[15] = v * B + S * se + T * _e + M * ve, this;
38196
+ let i = e.elements, s = r.elements, n = this.elements, a = i[0], o = i[4], l = i[8], h = i[12], u = i[1], c = i[5], d = i[9], m = i[13], p = i[2], f = i[6], g = i[10], y = i[14], v = i[3], w = i[7], T = i[11], M = i[15], S = s[0], N = s[4], A = s[8], U = s[12], ee = s[1], K = s[5], ie = s[9], se = s[13], ne = s[2], Te = s[6], pe = s[10], _e = s[14], xe = s[3], we = s[7], ye = s[11], ve = s[15];
38197
+ return n[0] = a * S + o * ee + l * ne + h * xe, n[4] = a * N + o * K + l * Te + h * we, n[8] = a * A + o * ie + l * pe + h * ye, n[12] = a * U + o * se + l * _e + h * ve, n[1] = u * S + c * ee + d * ne + m * xe, n[5] = u * N + c * K + d * Te + m * we, n[9] = u * A + c * ie + d * pe + m * ye, n[13] = u * U + c * se + d * _e + m * ve, n[2] = p * S + f * ee + g * ne + y * xe, n[6] = p * N + f * K + g * Te + y * we, n[10] = p * A + f * ie + g * pe + y * ye, n[14] = p * U + f * se + g * _e + y * ve, n[3] = v * S + w * ee + T * ne + M * xe, n[7] = v * N + w * K + T * Te + M * we, n[11] = v * A + w * ie + T * pe + M * ye, n[15] = v * U + w * se + T * _e + M * ve, this;
38198
38198
  }
38199
38199
  multiplyScalar(e) {
38200
38200
  let r = this.elements;
@@ -38213,10 +38213,10 @@ var s5 = class Yb {
38213
38213
  return e.isVector3 ? (s[12] = e.x, s[13] = e.y, s[14] = e.z) : (s[12] = e, s[13] = r, s[14] = i), this;
38214
38214
  }
38215
38215
  invert() {
38216
- let e = this.elements, r = e[0], i = e[1], s = e[2], n = e[3], a = e[4], o = e[5], l = e[6], h = e[7], u = e[8], c = e[9], d = e[10], m = e[11], p = e[12], f = e[13], g = e[14], y = e[15], v = c * g * h - f * d * h + f * l * m - o * g * m - c * l * y + o * d * y, S = p * d * h - u * g * h - p * l * m + a * g * m + u * l * y - a * d * y, T = u * f * h - p * c * h + p * o * m - a * f * m - u * o * y + a * c * y, M = p * c * l - u * f * l - p * o * d + a * f * d + u * o * g - a * c * g, w = r * v + i * S + s * T + n * M;
38217
- if (w === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
38218
- let _ = 1 / w;
38219
- return e[0] = v * _, e[1] = (f * d * n - c * g * n - f * s * m + i * g * m + c * s * y - i * d * y) * _, e[2] = (o * g * n - f * l * n + f * s * h - i * g * h - o * s * y + i * l * y) * _, e[3] = (c * l * n - o * d * n - c * s * h + i * d * h + o * s * m - i * l * m) * _, e[4] = S * _, e[5] = (u * g * n - p * d * n + p * s * m - r * g * m - u * s * y + r * d * y) * _, e[6] = (p * l * n - a * g * n - p * s * h + r * g * h + a * s * y - r * l * y) * _, e[7] = (a * d * n - u * l * n + u * s * h - r * d * h - a * s * m + r * l * m) * _, e[8] = T * _, e[9] = (p * c * n - u * f * n - p * i * m + r * f * m + u * i * y - r * c * y) * _, e[10] = (a * f * n - p * o * n + p * i * h - r * f * h - a * i * y + r * o * y) * _, e[11] = (u * o * n - a * c * n - u * i * h + r * c * h + a * i * m - r * o * m) * _, e[12] = M * _, e[13] = (u * f * s - p * c * s + p * i * d - r * f * d - u * i * g + r * c * g) * _, e[14] = (p * o * s - a * f * s - p * i * l + r * f * l + a * i * g - r * o * g) * _, e[15] = (a * c * s - u * o * s + u * i * l - r * c * l - a * i * d + r * o * d) * _, this;
38216
+ let e = this.elements, r = e[0], i = e[1], s = e[2], n = e[3], a = e[4], o = e[5], l = e[6], h = e[7], u = e[8], c = e[9], d = e[10], m = e[11], p = e[12], f = e[13], g = e[14], y = e[15], v = c * g * h - f * d * h + f * l * m - o * g * m - c * l * y + o * d * y, w = p * d * h - u * g * h - p * l * m + a * g * m + u * l * y - a * d * y, T = u * f * h - p * c * h + p * o * m - a * f * m - u * o * y + a * c * y, M = p * c * l - u * f * l - p * o * d + a * f * d + u * o * g - a * c * g, S = r * v + i * w + s * T + n * M;
38217
+ if (S === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
38218
+ let N = 1 / S;
38219
+ return e[0] = v * N, e[1] = (f * d * n - c * g * n - f * s * m + i * g * m + c * s * y - i * d * y) * N, e[2] = (o * g * n - f * l * n + f * s * h - i * g * h - o * s * y + i * l * y) * N, e[3] = (c * l * n - o * d * n - c * s * h + i * d * h + o * s * m - i * l * m) * N, e[4] = w * N, e[5] = (u * g * n - p * d * n + p * s * m - r * g * m - u * s * y + r * d * y) * N, e[6] = (p * l * n - a * g * n - p * s * h + r * g * h + a * s * y - r * l * y) * N, e[7] = (a * d * n - u * l * n + u * s * h - r * d * h - a * s * m + r * l * m) * N, e[8] = T * N, e[9] = (p * c * n - u * f * n - p * i * m + r * f * m + u * i * y - r * c * y) * N, e[10] = (a * f * n - p * o * n + p * i * h - r * f * h - a * i * y + r * o * y) * N, e[11] = (u * o * n - a * c * n - u * i * h + r * c * h + a * i * m - r * o * m) * N, e[12] = M * N, e[13] = (u * f * s - p * c * s + p * i * d - r * f * d - u * i * g + r * c * g) * N, e[14] = (p * o * s - a * f * s - p * i * l + r * f * l + a * i * g - r * o * g) * N, e[15] = (a * c * s - u * o * s + u * i * l - r * c * l - a * i * d + r * o * d) * N, this;
38220
38220
  }
38221
38221
  scale(e) {
38222
38222
  let r = this.elements, i = e.x, s = e.y, n = e.z;
@@ -38252,8 +38252,8 @@ var s5 = class Yb {
38252
38252
  return this.set(1, i, n, 0, e, 1, a, 0, r, s, 1, 0, 0, 0, 0, 1), this;
38253
38253
  }
38254
38254
  compose(e, r, i) {
38255
- let s = this.elements, n = r._x, a = r._y, o = r._z, l = r._w, h = n + n, u = a + a, c = o + o, d = n * h, m = n * u, p = n * c, f = a * u, g = a * c, y = o * c, v = l * h, S = l * u, T = l * c, M = i.x, w = i.y, _ = i.z;
38256
- return s[0] = (1 - (f + y)) * M, s[1] = (m + T) * M, s[2] = (p - S) * M, s[3] = 0, s[4] = (m - T) * w, s[5] = (1 - (d + y)) * w, s[6] = (g + v) * w, s[7] = 0, s[8] = (p + S) * _, s[9] = (g - v) * _, s[10] = (1 - (d + f)) * _, s[11] = 0, s[12] = e.x, s[13] = e.y, s[14] = e.z, s[15] = 1, this;
38255
+ let s = this.elements, n = r._x, a = r._y, o = r._z, l = r._w, h = n + n, u = a + a, c = o + o, d = n * h, m = n * u, p = n * c, f = a * u, g = a * c, y = o * c, v = l * h, w = l * u, T = l * c, M = i.x, S = i.y, N = i.z;
38256
+ return s[0] = (1 - (f + y)) * M, s[1] = (m + T) * M, s[2] = (p - w) * M, s[3] = 0, s[4] = (m - T) * S, s[5] = (1 - (d + y)) * S, s[6] = (g + v) * S, s[7] = 0, s[8] = (p + w) * N, s[9] = (g - v) * N, s[10] = (1 - (d + f)) * N, s[11] = 0, s[12] = e.x, s[13] = e.y, s[14] = e.z, s[15] = 1, this;
38257
38257
  }
38258
38258
  decompose(e, r, i) {
38259
38259
  let s = this.elements, n = Rh.set(s[0], s[1], s[2]).length(), a = Rh.set(s[4], s[5], s[6]).length(), o = Rh.set(s[8], s[9], s[10]).length();
@@ -38603,8 +38603,8 @@ var n5 = class a5 {
38603
38603
  if (Math.abs(u - d) < a && Math.abs(c - f) < a && Math.abs(p - g) < a) {
38604
38604
  if (Math.abs(u + d) < o && Math.abs(c + f) < o && Math.abs(p + g) < o && Math.abs(h + m + y - 3) < o) return this.set(1, 0, 0, 0), this;
38605
38605
  r = Math.PI;
38606
- let S = (h + 1) / 2, T = (m + 1) / 2, M = (y + 1) / 2, w = (u + d) / 4, _ = (c + f) / 4, A = (p + g) / 4;
38607
- return S > T && S > M ? S < a ? (i = 0, s = 0.707106781, n = 0.707106781) : (i = Math.sqrt(S), s = w / i, n = _ / i) : T > M ? T < a ? (i = 0.707106781, s = 0, n = 0.707106781) : (s = Math.sqrt(T), i = w / s, n = A / s) : M < a ? (i = 0.707106781, s = 0.707106781, n = 0) : (n = Math.sqrt(M), i = _ / n, s = A / n), this.set(i, s, n, r), this;
38606
+ let w = (h + 1) / 2, T = (m + 1) / 2, M = (y + 1) / 2, S = (u + d) / 4, N = (c + f) / 4, A = (p + g) / 4;
38607
+ return w > T && w > M ? w < a ? (i = 0, s = 0.707106781, n = 0.707106781) : (i = Math.sqrt(w), s = S / i, n = N / i) : T > M ? T < a ? (i = 0.707106781, s = 0, n = 0.707106781) : (s = Math.sqrt(T), i = S / s, n = A / s) : M < a ? (i = 0.707106781, s = 0.707106781, n = 0) : (n = Math.sqrt(M), i = N / n, s = A / n), this.set(i, s, n, r), this;
38608
38608
  }
38609
38609
  let v = Math.sqrt((g - p) * (g - p) + (c - f) * (c - f) + (d - u) * (d - u));
38610
38610
  return Math.abs(v) < 1e-3 && (v = 1), this.x = (g - p) / v, this.y = (c - f) / v, this.z = (d - u) / v, this.w = Math.acos((h + m + y - 1) / 2), this;
@@ -40528,7 +40528,7 @@ const Wie = /* @__PURE__ */ Js(([t]) => P5(t.rgb)), Hie = /* @__PURE__ */ Js(([t
40528
40528
  }
40529
40529
  },
40530
40530
  fragmentNode: ({ uniforms: t }) => {
40531
- let { vec2: e, vec4: r, fract: i, max: s, screenUV: n, viewportSize: a, fwidth: o, smoothstep: l } = Oe, h = a.x.div(a.y), u = e(n.x.mul(h), n.y.oneMinus()), c = t.cells.uniform, d = u.mul(c), m = i(d), p = t.thickness.uniform.mul(0.01), f = m.x.min(m.x.oneMinus()), g = m.y.min(m.y.oneMinus()), y = o(d), v = l(p.add(y.x), p, f), S = l(p.add(y.y), p, g), T = s(v, S);
40531
+ let { vec2: e, vec4: r, fract: i, max: s, screenUV: n, viewportSize: a, fwidth: o, smoothstep: l } = Oe, h = a.x.div(a.y), u = e(n.x.mul(h), n.y.oneMinus()), c = t.cells.uniform, d = u.mul(c), m = i(d), p = t.thickness.uniform.mul(0.01), f = m.x.min(m.x.oneMinus()), g = m.y.min(m.y.oneMinus()), y = o(d), v = l(p.add(y.x), p, f), w = l(p.add(y.y), p, g), T = s(v, w);
40532
40532
  return r(t.color.uniform.rgb, t.color.uniform.a.mul(T));
40533
40533
  }
40534
40534
  }, Ql = {
@@ -40608,12 +40608,12 @@ const Wie = /* @__PURE__ */ Js(([t]) => P5(t.rgb)), Hie = /* @__PURE__ */ Js(([t
40608
40608
  if (!r) return a(0, 0, 0, 0);
40609
40609
  let d = Math.round(s.width), m = Math.round(s.height), p = u(r, d, m), f = Math.max(8, Math.min(128, Math.floor(t.gridSize.uniform.value))), g = new Float32Array(f * f * 2), y = new im(g, f, f, No, bc);
40610
40610
  y.magFilter = ys, y.minFilter = ys, y.needsUpdate = !0;
40611
- let v = c(y), S = l(0.5), T = l(0.5), M = l(0), w = l(0), _ = 0.5, A = 0.5, B = Date.now();
40611
+ let v = c(y), w = l(0.5), T = l(0.5), M = l(0), S = l(0), N = 0.5, A = 0.5, U = Date.now();
40612
40612
  e(({ pointer: xe }) => {
40613
- let we = Date.now(), ye = Math.min((we - B) / 1e3, 0.016);
40614
- B = we;
40615
- let ve = ye > 0 ? (xe.x - _) / ye : 0, et = ye > 0 ? (xe.y - A) / ye : 0;
40616
- M.value = M.value * 0.85 + ve * 0.15, w.value = w.value * 0.85 + et * 0.15, S.value = xe.x, T.value = xe.y;
40613
+ let we = Date.now(), ye = Math.min((we - U) / 1e3, 0.016);
40614
+ U = we;
40615
+ let ve = ye > 0 ? (xe.x - N) / ye : 0, et = ye > 0 ? (xe.y - A) / ye : 0;
40616
+ M.value = M.value * 0.85 + ve * 0.15, S.value = S.value * 0.85 + et * 0.15, w.value = xe.x, T.value = xe.y;
40617
40617
  let _t = t.duration.uniform.value, Dt = t.intensity.uniform.value, Ye = t.radius.uniform.value * 0.05, Xr = t.swirl.uniform.value;
40618
40618
  for (let Yr = 0; Yr < f; Yr++) for (let rr = 0; rr < f; rr++) {
40619
40619
  let zt = (Yr * f + rr) * 2;
@@ -40621,14 +40621,14 @@ const Wie = /* @__PURE__ */ Js(([t]) => P5(t.rgb)), Hie = /* @__PURE__ */ Js(([t
40621
40621
  let wr = (rr + 0.5) / f, Sr = (Yr + 0.5) / f, Zr = wr - xe.x, Xt = Sr - xe.y, Lr = Math.sqrt(Zr * Zr + Xt * Xt);
40622
40622
  if (Lr < Ye * 2 && Math.abs(ve) + Math.abs(et) > 0.01) {
40623
40623
  let di = Math.exp(-Lr * Lr / (Ye * Ye));
40624
- if (g[zt] += M.value * di * Dt * ye * 0.5, g[zt + 1] += w.value * di * Dt * ye * 0.5, Xr > 0) {
40624
+ if (g[zt] += M.value * di * Dt * ye * 0.5, g[zt + 1] += S.value * di * Dt * ye * 0.5, Xr > 0) {
40625
40625
  let Qi = Math.atan2(Xt, Zr) + Math.PI * 0.5;
40626
40626
  g[zt] += Math.cos(Qi) * Xr * di * ye * 2, g[zt + 1] += Math.sin(Qi) * Xr * di * ye * 2;
40627
40627
  }
40628
40628
  }
40629
40629
  g[zt] = Math.max(-1, Math.min(1, g[zt])), g[zt + 1] = Math.max(-1, Math.min(1, g[zt + 1]));
40630
40630
  }
40631
- y.needsUpdate = !0, _ = xe.x, A = xe.y;
40631
+ y.needsUpdate = !0, N = xe.x, A = xe.y;
40632
40632
  }), i(() => {
40633
40633
  y.dispose();
40634
40634
  });
@@ -40756,7 +40756,7 @@ const Wie = /* @__PURE__ */ Js(([t]) => P5(t.rgb)), Hie = /* @__PURE__ */ Js(([t
40756
40756
  }
40757
40757
  },
40758
40758
  fragmentNode: ({ uniforms: t }) => {
40759
- let { vec2: e, mix: r, float: i, cos: s, sin: n, dot: a, radians: o, screenUV: l, abs: h, div: u } = Oe, c = o(t.angle.uniform), d = s(c), m = n(c), p = e(d, m), f = e(t.center.uniform[0], t.center.uniform[1].oneMinus()), g = l.sub(f), y = a(g, p), v = i(0.5).mul(h(d).add(h(m))), S = u(y, v.max(1e-6)), T = S.mul(0.5).add(0.5).clamp(i(0), i(1));
40759
+ let { vec2: e, mix: r, float: i, cos: s, sin: n, dot: a, radians: o, screenUV: l, abs: h, div: u } = Oe, c = o(t.angle.uniform), d = s(c), m = n(c), p = e(d, m), f = e(t.center.uniform[0], t.center.uniform[1].oneMinus()), g = l.sub(f), y = a(g, p), v = i(0.5).mul(h(d).add(h(m))), w = u(y, v.max(1e-6)), T = w.mul(0.5).add(0.5).clamp(i(0), i(1));
40760
40760
  return r(t.startColor.uniform, t.endColor.uniform, T);
40761
40761
  }
40762
40762
  }, au = {
@@ -40825,12 +40825,12 @@ const Wie = /* @__PURE__ */ Js(([t]) => P5(t.rgb)), Hie = /* @__PURE__ */ Js(([t
40825
40825
  if (!r) return a(0, 0, 0, 0);
40826
40826
  let d = Math.round(s.width), m = Math.round(s.height), p = u(r, d, m), f = new Float32Array(1024 * 2), g = new im(f, 32, 32, No, bc);
40827
40827
  g.magFilter = ys, g.minFilter = ys, g.needsUpdate = !0;
40828
- let y = c(g), v = l(0.5), S = l(0.5), T = l(0), M = l(0), w = 0.5, _ = 0.5, A = Date.now();
40828
+ let y = c(g), v = l(0.5), w = l(0.5), T = l(0), M = l(0), S = 0.5, N = 0.5, A = Date.now();
40829
40829
  e(({ pointer: ne }) => {
40830
40830
  let Te = Date.now(), pe = Math.min((Te - A) / 1e3, 0.016);
40831
40831
  A = Te;
40832
- let _e = pe > 0 ? (ne.x - w) / pe : 0, xe = pe > 0 ? (ne.y - _) / pe : 0;
40833
- T.value = T.value * 0.85 + _e * 0.15, M.value = M.value * 0.85 + xe * 0.15, v.value = ne.x, S.value = ne.y;
40832
+ let _e = pe > 0 ? (ne.x - S) / pe : 0, xe = pe > 0 ? (ne.y - N) / pe : 0;
40833
+ T.value = T.value * 0.85 + _e * 0.15, M.value = M.value * 0.85 + xe * 0.15, v.value = ne.x, w.value = ne.y;
40834
40834
  let we = t.duration.uniform.value, ye = t.intensity.uniform.value, ve = t.radius.uniform.value * 0.05, et = t.swirl.uniform.value;
40835
40835
  for (let _t = 0; _t < 32; _t++) for (let Dt = 0; Dt < 32; Dt++) {
40836
40836
  let Ye = (_t * 32 + Dt) * 2;
@@ -40845,11 +40845,11 @@ const Wie = /* @__PURE__ */ Js(([t]) => P5(t.rgb)), Hie = /* @__PURE__ */ Js(([t
40845
40845
  }
40846
40846
  f[Ye] = Math.max(-1, Math.min(1, f[Ye])), f[Ye + 1] = Math.max(-1, Math.min(1, f[Ye + 1]));
40847
40847
  }
40848
- g.needsUpdate = !0, w = ne.x, _ = ne.y;
40848
+ g.needsUpdate = !0, S = ne.x, N = ne.y;
40849
40849
  }), i(() => {
40850
40850
  g.dispose();
40851
40851
  });
40852
- let B = y.sample(h).xy, ee = o(0.2), K = o(-0.2), ie = B.clamp(n(K, K), n(ee, ee)), se = h.sub(ie);
40852
+ let U = y.sample(h).xy, ee = o(0.2), K = o(-0.2), ie = U.clamp(n(K, K), n(ee, ee)), se = h.sub(ie);
40853
40853
  return p.sample(se);
40854
40854
  }
40855
40855
  }, ou = {
@@ -41188,7 +41188,7 @@ const Zie = /* @__PURE__ */ me(Yie).setParameterLength(2), hu = {
41188
41188
  }
41189
41189
  },
41190
41190
  fragmentNode: ({ uniforms: t }) => {
41191
- let { vec2: e, vec4: r, sin: i, cos: s, abs: n, smoothstep: a, screenUV: o, viewportSize: l, time: h, radians: u, PI: c } = Oe, d = l.x.div(l.y), m = e(o.x.mul(d), o.y), p = e(t.position.uniform.x.mul(d), t.position.uniform.y), f = m.sub(p), g = u(t.angle.uniform), y = s(g), v = i(g), S = f.x.mul(y).sub(f.y.mul(v)), T = f.x.mul(v).add(f.y.mul(y)), M = h.mul(t.speed.uniform), w = S.mul(t.frequency.uniform).mul(c.mul(2)).add(M), _ = i(w).mul(t.amplitude.uniform), A = n(T.sub(_)), B = t.thickness.uniform.mul(0.5), ee = t.softness.uniform.mul(0.5), K = a(B.add(ee), B.sub(ee), A);
41191
+ let { vec2: e, vec4: r, sin: i, cos: s, abs: n, smoothstep: a, screenUV: o, viewportSize: l, time: h, radians: u, PI: c } = Oe, d = l.x.div(l.y), m = e(o.x.mul(d), o.y), p = e(t.position.uniform.x.mul(d), t.position.uniform.y), f = m.sub(p), g = u(t.angle.uniform), y = s(g), v = i(g), w = f.x.mul(y).sub(f.y.mul(v)), T = f.x.mul(v).add(f.y.mul(y)), M = h.mul(t.speed.uniform), S = w.mul(t.frequency.uniform).mul(c.mul(2)).add(M), N = i(S).mul(t.amplitude.uniform), A = n(T.sub(N)), U = t.thickness.uniform.mul(0.5), ee = t.softness.uniform.mul(0.5), K = a(U.add(ee), U.sub(ee), A);
41192
41192
  return r(t.color.uniform.rgb, t.color.uniform.a.mul(K));
41193
41193
  }
41194
41194
  }, gu = {
@@ -41295,7 +41295,7 @@ const Zie = /* @__PURE__ */ me(Yie).setParameterLength(2), hu = {
41295
41295
  }
41296
41296
  },
41297
41297
  fragmentNode: ({ uniforms: t }) => {
41298
- let { vec2: e, vec4: r, float: i, atan: s, length: n, clamp: a, fract: o, abs: l, mix: h, smoothstep: u, screenUV: c, time: d, fwidth: m, viewportSize: p } = Oe, f = p.x.div(p.y), g = e(c.x.mul(f), c.y), y = e(t.center.uniform.x.mul(f), t.center.uniform.y.oneMinus()), v = g.sub(y), S = d.mul(t.speed.uniform), T = n(v), M = T, w = s(v.y, v.x).sub(S), _ = i(6.283185307), A = w.div(_), B = M.mul(t.scale.uniform).add(A), ee = o(B), K = l(ee.sub(0.5)).mul(2), ie = a(t.strokeWidth.uniform, t.strokeFalloff.uniform.mul(5e-3), 1), se = a(t.strokeFalloff.uniform, 0, 1).mul(T).oneMinus(), ne = ie.mul(se), Te = m(B), pe = i(4).sub(u(0.05, 0.4, t.strokeWidth.uniform.mul(2)).mul(u(0.05, 0.4, t.strokeWidth.uniform.oneMinus().mul(2))).mul(3)), _e = h(pe.mul(Te), m(K), a(Te, 0, 1)), xe = u(ne.sub(_e).sub(t.softness.uniform), ne.add(_e).add(t.softness.uniform), K), we = h(t.colorBack.uniform, t.colorFront.uniform, xe);
41298
+ let { vec2: e, vec4: r, float: i, atan: s, length: n, clamp: a, fract: o, abs: l, mix: h, smoothstep: u, screenUV: c, time: d, fwidth: m, viewportSize: p } = Oe, f = p.x.div(p.y), g = e(c.x.mul(f), c.y), y = e(t.center.uniform.x.mul(f), t.center.uniform.y.oneMinus()), v = g.sub(y), w = d.mul(t.speed.uniform), T = n(v), M = T, S = s(v.y, v.x).sub(w), N = i(6.283185307), A = S.div(N), U = M.mul(t.scale.uniform).add(A), ee = o(U), K = l(ee.sub(0.5)).mul(2), ie = a(t.strokeWidth.uniform, t.strokeFalloff.uniform.mul(5e-3), 1), se = a(t.strokeFalloff.uniform, 0, 1).mul(T).oneMinus(), ne = ie.mul(se), Te = m(U), pe = i(4).sub(u(0.05, 0.4, t.strokeWidth.uniform.mul(2)).mul(u(0.05, 0.4, t.strokeWidth.uniform.oneMinus().mul(2))).mul(3)), _e = h(pe.mul(Te), m(K), a(Te, 0, 1)), xe = u(ne.sub(_e).sub(t.softness.uniform), ne.add(_e).add(t.softness.uniform), K), we = h(t.colorBack.uniform, t.colorFront.uniform, xe);
41299
41299
  return r(we.rgb, we.a);
41300
41300
  }
41301
41301
  }, xu = {
@@ -41428,7 +41428,7 @@ const Zie = /* @__PURE__ */ me(Yie).setParameterLength(2), hu = {
41428
41428
  fragmentNode: ({ uniforms: t, childNode: e, dimensions: r }) => {
41429
41429
  let { vec2: i, vec4: s, float: n, screenUV: a, convertToTexture: o, viewportSize: l, smoothstep: h, abs: u, sin: c, cos: d, radians: m } = Oe;
41430
41430
  if (!e) return s(0, 0, 0, 0);
41431
- let p = Math.round(r.width), f = Math.round(r.height), g = o(e, p, f), y = m(t.angle.uniform), v = d(y), S = c(y), T = a.sub(i(0.5, 0.5)), M = i(T.x.mul(v).sub(T.y.mul(S)), T.x.mul(S).add(T.y.mul(v))).add(i(0.5, 0.5)), w = t.focusDistance.uniform, _ = u(M.y.sub(w)), A = t.focusRange.uniform.div(2), B = h(A, A.add(0.1), _), ee = B.mul(t.blurIntensity.uniform).div(l.x.min(l.y)), K = [
41431
+ let p = Math.round(r.width), f = Math.round(r.height), g = o(e, p, f), y = m(t.angle.uniform), v = d(y), w = c(y), T = a.sub(i(0.5, 0.5)), M = i(T.x.mul(v).sub(T.y.mul(w)), T.x.mul(w).add(T.y.mul(v))).add(i(0.5, 0.5)), S = t.focusDistance.uniform, N = u(M.y.sub(S)), A = t.focusRange.uniform.div(2), U = h(A, A.add(0.1), N), ee = U.mul(t.blurIntensity.uniform).div(l.x.min(l.y)), K = [
41432
41432
  i(-1, -1),
41433
41433
  i(0, -1),
41434
41434
  i(1, -1),
@@ -41453,8 +41453,8 @@ const Zie = /* @__PURE__ */ me(Yie).setParameterLength(2), hu = {
41453
41453
  let _e = K[pe].mul(ee), xe = a.add(_e), we = n(ie[pe]), ye = g.sample(xe);
41454
41454
  se = se.add(ye.mul(we));
41455
41455
  }
41456
- let ne = g.sample(a), Te = n(1).sub(B);
41457
- return ne.mul(Te).add(se.mul(B));
41456
+ let ne = g.sample(a), Te = n(1).sub(U);
41457
+ return ne.mul(Te).add(se.mul(U));
41458
41458
  }
41459
41459
  }, Tu = {
41460
41460
  name: "Tint",
@@ -41496,7 +41496,7 @@ const Zie = /* @__PURE__ */ me(Yie).setParameterLength(2), hu = {
41496
41496
  fragmentNode: ({ uniforms: t, childNode: e, dimensions: r }) => {
41497
41497
  let { vec2: i, vec4: s, cos: n, sin: a, length: o, screenUV: l, convertToTexture: h } = Oe;
41498
41498
  if (!e) return console.error("You must pass a child component into the Twirl shader."), s(0);
41499
- let u = Math.round(r.width), c = Math.round(r.height), d = h(e, u, c), m = l, p = i(t.center.uniform.x, t.center.uniform.y.oneMinus()), f = m.sub(p), g = t.intensity.uniform.mul(o(f)), y = n(g), v = a(g), S = y.mul(f.x).sub(v.mul(f.y)), T = v.mul(f.x).add(y.mul(f.y)), M = i(S.add(p.x), T.add(p.y));
41499
+ let u = Math.round(r.width), c = Math.round(r.height), d = h(e, u, c), m = l, p = i(t.center.uniform.x, t.center.uniform.y.oneMinus()), f = m.sub(p), g = t.intensity.uniform.mul(o(f)), y = n(g), v = a(g), w = y.mul(f.x).sub(v.mul(f.y)), T = v.mul(f.x).add(y.mul(f.y)), M = i(w.add(p.x), T.add(p.y));
41500
41500
  return s(d.sample(M));
41501
41501
  }
41502
41502
  }, Su = {
@@ -41691,12 +41691,12 @@ function Tse() {
41691
41691
  nodes: /* @__PURE__ */ new Map(),
41692
41692
  rootId: null,
41693
41693
  idToNodeId: /* @__PURE__ */ new Map()
41694
- }, o = null, l = null, h = null, u = !1, c = !1, d = !1, m = null, p = !1, f = !0, g = 0, y = 0, v = !1, S = 0, T = 0, M = !1, w = 0.5, _ = 0.5, A = !1, B = !1, ee = !1, K = [], ie = !1, se = [], ne = !1, Te = /* @__PURE__ */ new Set(), pe = () => window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1, _e = (ce, le) => {
41694
+ }, o = null, l = null, h = null, u = !1, c = !1, d = !1, m = null, p = !1, f = !0, g = 0, y = 0, v = !1, w = 0, T = 0, M = !1, S = 0.5, N = 0.5, A = !1, U = !1, ee = !1, K = [], ie = !1, se = [], ne = !1, Te = /* @__PURE__ */ new Set(), pe = () => window.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1, _e = (ce, le) => {
41695
41695
  if (ce <= 0 || le <= 0 || ce === g && le === y) return;
41696
41696
  let be = performance.now();
41697
- if (be - S < 8) return;
41697
+ if (be - w < 8) return;
41698
41698
  let de = g, Ze = y;
41699
- g = ce, y = le, S = be, d || (d = !0), e.setSize(ce, le, !1);
41699
+ g = ce, y = le, w = be, d || (d = !0), e.setSize(ce, le, !1);
41700
41700
  let dt = ce / le, mt = 2 * dt;
41701
41701
  r.left = -mt / 2, r.right = mt / 2, r.top = 2 / 2, r.bottom = -2 / 2, r.updateProjectionMatrix(), s.scale.set(mt, 2, 1), (a.rootId && (de === 0 || Ze === 0) || a.rootId && d) && ve(), Xt().catch(console.warn);
41702
41702
  }, xe = (ce) => {
@@ -41719,7 +41719,7 @@ function Tse() {
41719
41719
  f && Lr();
41720
41720
  } else !p && be && di();
41721
41721
  }, ye = !1, ve = () => {
41722
- if (!a.rootId || !n || B) return;
41722
+ if (!a.rootId || !n || U) return;
41723
41723
  if (a.nodes.get(a.rootId)) {
41724
41724
  if (g === 0 || y === 0) {
41725
41725
  ye || (ye = !0, requestAnimationFrame(() => {
@@ -41727,14 +41727,14 @@ function Tse() {
41727
41727
  }));
41728
41728
  return;
41729
41729
  }
41730
- B = !0;
41730
+ U = !0;
41731
41731
  try {
41732
41732
  let le = /* @__PURE__ */ new Set(), be = Xr(a.rootId, /* @__PURE__ */ new Set(), le);
41733
41733
  be && n && ((Te.size !== le.size || ![...Te].every((Ze) => le.has(Ze)) || ![...le].every((Ze) => Te.has(Ze)) || M) && (n.fragmentNode = null, n.needsUpdate = !0, M = !1, Te = le), n.fragmentNode = be, n.needsUpdate = !0);
41734
41734
  } catch (le) {
41735
41735
  console.error("Error composing shader tree:", le);
41736
41736
  } finally {
41737
- B = !1;
41737
+ U = !1;
41738
41738
  }
41739
41739
  p && Xt().catch(console.warn);
41740
41740
  }
@@ -41897,8 +41897,8 @@ function Tse() {
41897
41897
  let le = {
41898
41898
  deltaTime: ce,
41899
41899
  pointer: {
41900
- x: w,
41901
- y: _
41900
+ x: S,
41901
+ y: N
41902
41902
  },
41903
41903
  pointerActive: A,
41904
41904
  dimensions: {
@@ -41915,8 +41915,8 @@ function Tse() {
41915
41915
  let le = {
41916
41916
  deltaTime: ce,
41917
41917
  pointer: {
41918
- x: w,
41919
- y: _
41918
+ x: S,
41919
+ y: N
41920
41920
  },
41921
41921
  pointerActive: A,
41922
41922
  dimensions: {
@@ -41934,7 +41934,7 @@ function Tse() {
41934
41934
  let ce = performance.now(), le = T > 0 ? (ce - T) / 1e3 : 0.016, be = Math.min(le, 0.1);
41935
41935
  T = ce, Sr(be);
41936
41936
  try {
41937
- if (B) return;
41937
+ if (U) return;
41938
41938
  e instanceof oM ? await e.renderAsync(i, r).then(() => {
41939
41939
  u && Zr(be);
41940
41940
  }).catch((de) => {
@@ -41959,7 +41959,7 @@ function Tse() {
41959
41959
  le = ce.touches[0].clientX, be = ce.touches[0].clientY;
41960
41960
  } else le = ce.clientX, be = ce.clientY;
41961
41961
  let de = t.getBoundingClientRect(), Ze = (le - de.left) / de.width, dt = (be - de.top) / de.height;
41962
- w = Ze, _ = dt;
41962
+ S = Ze, N = dt;
41963
41963
  }, Ai = (ce) => {
41964
41964
  Qi(ce);
41965
41965
  }, ni = (ce) => {
@@ -42023,7 +42023,7 @@ function Tse() {
42023
42023
  e.dispose();
42024
42024
  } catch {
42025
42025
  }
42026
- t = null, e = null, r = null, i = null, s = null, n = null, u = !1, c = !1, d = !1, m = null, g = 0, y = 0, p = !1, f = !0, w = 0.5, _ = 0.5, A = !1;
42026
+ t = null, e = null, r = null, i = null, s = null, n = null, u = !1, c = !1, d = !1, m = null, g = 0, y = 0, p = !1, f = !0, S = 0.5, N = 0.5, A = !1;
42027
42027
  },
42028
42028
  registerNode: Yr,
42029
42029
  removeNode: wr,
@@ -45264,10 +45264,10 @@ class Ga extends km {
45264
45264
  const a = e.getDataFromNode(this);
45265
45265
  let o = a.propertyName;
45266
45266
  if (o === void 0) {
45267
- const { uvNode: u, levelNode: c, biasNode: d, compareNode: m, depthNode: p, gradNode: f } = s, g = this.generateUV(e, u), y = c ? c.build(e, "float") : null, v = d ? d.build(e, "float") : null, S = p ? p.build(e, "int") : null, T = m ? m.build(e, "float") : null, M = f ? [f[0].build(e, "vec2"), f[1].build(e, "vec2")] : null, w = e.getVarFromNode(this);
45268
- o = e.getPropertyName(w);
45269
- const _ = this.generateSnippet(e, n, g, y, v, S, T, M);
45270
- e.addLineFlowCode(`${o} = ${_}`, this), a.snippet = _, a.propertyName = o;
45267
+ const { uvNode: u, levelNode: c, biasNode: d, compareNode: m, depthNode: p, gradNode: f } = s, g = this.generateUV(e, u), y = c ? c.build(e, "float") : null, v = d ? d.build(e, "float") : null, w = p ? p.build(e, "int") : null, T = m ? m.build(e, "float") : null, M = f ? [f[0].build(e, "vec2"), f[1].build(e, "vec2")] : null, S = e.getVarFromNode(this);
45268
+ o = e.getPropertyName(S);
45269
+ const N = this.generateSnippet(e, n, g, y, v, w, T, M);
45270
+ e.addLineFlowCode(`${o} = ${N}`, this), a.snippet = N, a.propertyName = o;
45271
45271
  }
45272
45272
  let l = o;
45273
45273
  const h = this.getNodeType(e);
@@ -46400,8 +46400,8 @@ class Soe extends Ee {
46400
46400
  ), u = this.batchMesh._colorsTexture;
46401
46401
  if (u !== null) {
46402
46402
  const f = F(([g]) => {
46403
- const y = R(Vo(sr(u), 0).x), v = g, S = v.mod(y), T = v.div(y);
46404
- return sr(u, $r(S, T)).rgb;
46403
+ const y = R(Vo(sr(u), 0).x), v = g, w = v.mod(y), T = v.div(y);
46404
+ return sr(u, $r(w, T)).rgb;
46405
46405
  }).setLayout({
46406
46406
  name: "getBatchingColor",
46407
46407
  type: "vec3",
@@ -46781,27 +46781,27 @@ class Eoe extends Ee {
46781
46781
  if (u)
46782
46782
  y = `while ( ${d} )`;
46783
46783
  else {
46784
- const v = { start: c, end: d }, S = v.start, T = v.end;
46784
+ const v = { start: c, end: d }, w = v.start, T = v.end;
46785
46785
  let M;
46786
- const w = () => f.includes("<") ? "+=" : "-=";
46786
+ const S = () => f.includes("<") ? "+=" : "-=";
46787
46787
  if (g != null)
46788
46788
  switch (typeof g) {
46789
46789
  case "function":
46790
46790
  M = e.flowStagesNode(r.updateNode, "void").code.replace(/\t|;/g, "");
46791
46791
  break;
46792
46792
  case "number":
46793
- M = m + " " + w() + " " + e.generateConst(p, g);
46793
+ M = m + " " + S() + " " + e.generateConst(p, g);
46794
46794
  break;
46795
46795
  case "string":
46796
46796
  M = m + " " + g;
46797
46797
  break;
46798
46798
  default:
46799
- g.isNode ? M = m + " " + w() + " " + g.build(e) : (console.error("THREE.TSL: 'Loop( { update: ... } )' is not a function, string or number."), M = "break /* invalid update */");
46799
+ g.isNode ? M = m + " " + S() + " " + g.build(e) : (console.error("THREE.TSL: 'Loop( { update: ... } )' is not a function, string or number."), M = "break /* invalid update */");
46800
46800
  }
46801
46801
  else
46802
- p === "int" || p === "uint" ? g = f.includes("<") ? "++" : "--" : g = w() + " 1.", M = m + " " + g;
46803
- const _ = e.getVar(p, m) + " = " + S, A = m + " " + f + " " + T;
46804
- y = `for ( ${_}; ${A}; ${M} )`;
46802
+ p === "int" || p === "uint" ? g = f.includes("<") ? "++" : "--" : g = S() + " 1.", M = m + " " + g;
46803
+ const N = e.getVar(p, m) + " = " + w, A = m + " " + f + " " + T;
46804
+ y = `for ( ${N}; ${A}; ${M} )`;
46805
46805
  }
46806
46806
  e.addFlowCode((o === 0 ? `
46807
46807
  ` : "") + e.tab + y + ` {
@@ -46840,10 +46840,10 @@ function Ioe(t) {
46840
46840
  f.type = bc, f.needsUpdate = !0;
46841
46841
  const g = u * 4;
46842
46842
  for (let v = 0; v < n; v++) {
46843
- const S = o[v], T = l[v], M = h[v], w = c * d * 4 * v;
46844
- for (let _ = 0; _ < S.count; _++) {
46845
- const A = _ * g;
46846
- e === !0 && (ls.fromBufferAttribute(S, _), p[w + A + 0] = ls.x, p[w + A + 1] = ls.y, p[w + A + 2] = ls.z, p[w + A + 3] = 0), r === !0 && (ls.fromBufferAttribute(T, _), p[w + A + 4] = ls.x, p[w + A + 5] = ls.y, p[w + A + 6] = ls.z, p[w + A + 7] = 0), i === !0 && (ls.fromBufferAttribute(M, _), p[w + A + 8] = ls.x, p[w + A + 9] = ls.y, p[w + A + 10] = ls.z, p[w + A + 11] = M.itemSize === 4 ? ls.w : 1);
46843
+ const w = o[v], T = l[v], M = h[v], S = c * d * 4 * v;
46844
+ for (let N = 0; N < w.count; N++) {
46845
+ const A = N * g;
46846
+ e === !0 && (ls.fromBufferAttribute(w, N), p[S + A + 0] = ls.x, p[S + A + 1] = ls.y, p[S + A + 2] = ls.z, p[S + A + 3] = 0), r === !0 && (ls.fromBufferAttribute(T, N), p[S + A + 4] = ls.x, p[S + A + 5] = ls.y, p[S + A + 6] = ls.z, p[S + A + 7] = 0), i === !0 && (ls.fromBufferAttribute(M, N), p[S + A + 8] = ls.x, p[S + A + 9] = ls.y, p[S + A + 10] = ls.z, p[S + A + 11] = M.itemSize === 4 ? ls.w : 1);
46847
46847
  }
46848
46848
  }
46849
46849
  a = {
@@ -47759,8 +47759,8 @@ const MV = /* @__PURE__ */ J(ile).setParameterLength(0, 1), _V = /* @__PURE__ */
47759
47759
  const { lightDirection: e, f0: r, f90: i, roughness: s, f: n, USE_IRIDESCENCE: a, USE_ANISOTROPY: o } = t, l = t.normalView || ja, h = s.pow2(), u = e.add(gs).normalize(), c = l.dot(e).clamp(), d = l.dot(gs).clamp(), m = l.dot(u).clamp(), p = gs.dot(u).clamp();
47760
47760
  let f = _V({ f0: r, f90: i, dotVH: p }), g, y;
47761
47761
  if (um(a) && (f = iP.mix(f, n)), um(o)) {
47762
- const v = Gf.dot(e), S = Gf.dot(gs), T = Gf.dot(u), M = uc.dot(e), w = uc.dot(gs), _ = uc.dot(u);
47763
- g = ale({ alphaT: a1, alphaB: h, dotTV: S, dotBV: w, dotTL: v, dotBL: M, dotNV: d, dotNL: c }), y = lle({ alphaT: a1, alphaB: h, dotNH: m, dotTH: T, dotBH: _ });
47762
+ const v = Gf.dot(e), w = Gf.dot(gs), T = Gf.dot(u), M = uc.dot(e), S = uc.dot(gs), N = uc.dot(u);
47763
+ g = ale({ alphaT: a1, alphaB: h, dotTV: w, dotBV: S, dotTL: v, dotBL: M, dotNV: d, dotNL: c }), y = lle({ alphaT: a1, alphaB: h, dotNH: m, dotTH: T, dotBH: N });
47764
47764
  } else
47765
47765
  g = AV({ alpha: h, dotNL: c, dotNV: d }), y = CV({ alpha: h, dotNH: m });
47766
47766
  return f.mul(g).mul(y);
@@ -48207,17 +48207,17 @@ class Tle {
48207
48207
  g > vl && console.warn(`sigmaRadians, ${n}, is too large and will clip, as it requested ${g} samples when the maximum is set to ${vl}`);
48208
48208
  const y = [];
48209
48209
  let v = 0;
48210
- for (let _ = 0; _ < vl; ++_) {
48211
- const A = _ / f, B = Math.exp(-A * A / 2);
48212
- y.push(B), _ === 0 ? v += B : _ < g && (v += 2 * B);
48210
+ for (let N = 0; N < vl; ++N) {
48211
+ const A = N / f, U = Math.exp(-A * A / 2);
48212
+ y.push(U), N === 0 ? v += U : N < g && (v += 2 * U);
48213
48213
  }
48214
- for (let _ = 0; _ < y.length; _++)
48215
- y[_] = y[_] / v;
48214
+ for (let N = 0; N < y.length; N++)
48215
+ y[N] = y[N] / v;
48216
48216
  e.texture.frame = (e.texture.frame || 0) + 1, d.envMap.value = e.texture, d.samples.value = g, d.weights.array = y, d.latitudinal.value = a === "latitudinal" ? 1 : 0, o && (d.poleAxis.value = o);
48217
- const { _lodMax: S } = this;
48218
- d.dTheta.value = p, d.mipInt.value = S - i;
48219
- const T = this._sizeLods[s], M = 3 * T * (s > S - Jh ? s - S + Jh : 0), w = 4 * (this._cubeSize - T);
48220
- yf(r, M, w, 3 * T, 2 * T), l.setRenderTarget(r), l.render(c, Px);
48217
+ const { _lodMax: w } = this;
48218
+ d.dTheta.value = p, d.mipInt.value = w - i;
48219
+ const T = this._sizeLods[s], M = 3 * T * (s > w - Jh ? s - w + Jh : 0), S = 4 * (this._cubeSize - T);
48220
+ yf(r, M, S, 3 * T, 2 * T), l.setRenderTarget(r), l.render(c, Px);
48221
48221
  }
48222
48222
  }
48223
48223
  function wle(t) {
@@ -48229,34 +48229,34 @@ function wle(t) {
48229
48229
  r.push(l);
48230
48230
  let h = 1 / l;
48231
48231
  o > t - Jh ? h = bN[o - t + Jh - 1] : o === 0 && (h = 0), i.push(h);
48232
- const u = 1 / (l - 2), c = -u, d = 1 + u, m = [c, c, d, c, d, d, c, c, d, d, c, d], p = 6, f = 6, g = 3, y = 2, v = 1, S = new Float32Array(g * f * p), T = new Float32Array(y * f * p), M = new Float32Array(v * f * p);
48233
- for (let _ = 0; _ < p; _++) {
48234
- const A = _ % 3 * 2 / 3 - 1, B = _ > 2 ? 0 : -1, ee = [
48232
+ const u = 1 / (l - 2), c = -u, d = 1 + u, m = [c, c, d, c, d, d, c, c, d, d, c, d], p = 6, f = 6, g = 3, y = 2, v = 1, w = new Float32Array(g * f * p), T = new Float32Array(y * f * p), M = new Float32Array(v * f * p);
48233
+ for (let N = 0; N < p; N++) {
48234
+ const A = N % 3 * 2 / 3 - 1, U = N > 2 ? 0 : -1, ee = [
48235
48235
  A,
48236
- B,
48236
+ U,
48237
48237
  0,
48238
48238
  A + 2 / 3,
48239
- B,
48239
+ U,
48240
48240
  0,
48241
48241
  A + 2 / 3,
48242
- B + 1,
48242
+ U + 1,
48243
48243
  0,
48244
48244
  A,
48245
- B,
48245
+ U,
48246
48246
  0,
48247
48247
  A + 2 / 3,
48248
- B + 1,
48248
+ U + 1,
48249
48249
  0,
48250
48250
  A,
48251
- B + 1,
48251
+ U + 1,
48252
48252
  0
48253
- ], K = vle[_];
48254
- S.set(ee, g * f * K), T.set(m, y * f * K);
48253
+ ], K = vle[N];
48254
+ w.set(ee, g * f * K), T.set(m, y * f * K);
48255
48255
  const ie = [K, K, K, K, K, K];
48256
48256
  M.set(ie, v * f * K);
48257
48257
  }
48258
- const w = new Ic();
48259
- w.setAttribute("position", new Ds(S, g)), w.setAttribute("uv", new Ds(T, y)), w.setAttribute("faceIndex", new Ds(M, v)), e.push(w), s.push(new pg(w, null)), n > Jh && n--;
48258
+ const S = new Ic();
48259
+ S.setAttribute("position", new Ds(w, g)), S.setAttribute("uv", new Ds(T, y)), S.setAttribute("faceIndex", new Ds(M, v)), e.push(S), s.push(new pg(S, null)), n > Jh && n--;
48260
48260
  }
48261
48261
  return { lodPlanes: e, sizeLods: r, sigmas: i, lodMeshes: s };
48262
48262
  }
@@ -49241,8 +49241,8 @@ const $V = (t, ...e) => Y(new Tue(Y(t), ...e)), wue = (t, ...e) => t.isTextureNo
49241
49241
  const r = e.mul(Le(t, 1)), i = r.xy.div(r.w).mul(0.5).add(0.5).toVar();
49242
49242
  return ae(i.x, i.y.oneMinus());
49243
49243
  }), Mue = /* @__PURE__ */ F(([t, e, r]) => {
49244
- const i = Vo(sr(e)), s = $r(t.mul(i)).toVar(), n = sr(e, s).toVar(), a = sr(e, s.sub($r(2, 0))).toVar(), o = sr(e, s.sub($r(1, 0))).toVar(), l = sr(e, s.add($r(1, 0))).toVar(), h = sr(e, s.add($r(2, 0))).toVar(), u = sr(e, s.add($r(0, 2))).toVar(), c = sr(e, s.add($r(0, 1))).toVar(), d = sr(e, s.sub($r(0, 1))).toVar(), m = sr(e, s.sub($r(0, 2))).toVar(), p = Ft(at(C(2).mul(o).sub(a), n)).toVar(), f = Ft(at(C(2).mul(l).sub(h), n)).toVar(), g = Ft(at(C(2).mul(c).sub(u), n)).toVar(), y = Ft(at(C(2).mul(d).sub(m), n)).toVar(), v = Dh(t, n, r).toVar(), S = p.lessThan(f).select(v.sub(Dh(t.sub(ae(C(1).div(i.x), 0)), o, r)), v.negate().add(Dh(t.add(ae(C(1).div(i.x), 0)), l, r))), T = g.lessThan(y).select(v.sub(Dh(t.add(ae(0, C(1).div(i.y))), c, r)), v.negate().add(Dh(t.sub(ae(0, C(1).div(i.y))), d, r)));
49245
- return Xu(Ny(S, T));
49244
+ const i = Vo(sr(e)), s = $r(t.mul(i)).toVar(), n = sr(e, s).toVar(), a = sr(e, s.sub($r(2, 0))).toVar(), o = sr(e, s.sub($r(1, 0))).toVar(), l = sr(e, s.add($r(1, 0))).toVar(), h = sr(e, s.add($r(2, 0))).toVar(), u = sr(e, s.add($r(0, 2))).toVar(), c = sr(e, s.add($r(0, 1))).toVar(), d = sr(e, s.sub($r(0, 1))).toVar(), m = sr(e, s.sub($r(0, 2))).toVar(), p = Ft(at(C(2).mul(o).sub(a), n)).toVar(), f = Ft(at(C(2).mul(l).sub(h), n)).toVar(), g = Ft(at(C(2).mul(c).sub(u), n)).toVar(), y = Ft(at(C(2).mul(d).sub(m), n)).toVar(), v = Dh(t, n, r).toVar(), w = p.lessThan(f).select(v.sub(Dh(t.sub(ae(C(1).div(i.x), 0)), o, r)), v.negate().add(Dh(t.add(ae(C(1).div(i.x), 0)), l, r))), T = g.lessThan(y).select(v.sub(Dh(t.add(ae(0, C(1).div(i.y))), c, r)), v.negate().add(Dh(t.sub(ae(0, C(1).div(i.y))), d, r)));
49245
+ return Xu(Ny(w, T));
49246
49246
  });
49247
49247
  class _ue extends ac {
49248
49248
  /**
@@ -51277,9 +51277,9 @@ class uO extends lce {
51277
51277
  a.isArrayTexture && (y = y.depth(this.depthLayer));
51278
51278
  let v = Ct(this.vsmShadowMapVertical.texture);
51279
51279
  a.isArrayTexture && (v = v.depth(this.depthLayer));
51280
- const S = Qt("blurSamples", "float", s).setGroup(Ke), T = Qt("radius", "float", s).setGroup(Ke), M = Qt("mapSize", "vec2", s).setGroup(Ke);
51281
- let w = this.vsmMaterialVertical || (this.vsmMaterialVertical = new Nc());
51282
- w.fragmentNode = bce({ samples: S, radius: T, size: M, shadowPass: y, depthLayer: this.depthLayer }).context(e.getSharedContext()), w.name = "VSMVertical", w = this.vsmMaterialHorizontal || (this.vsmMaterialHorizontal = new Nc()), w.fragmentNode = vce({ samples: S, radius: T, size: M, shadowPass: v, depthLayer: this.depthLayer }).context(e.getSharedContext()), w.name = "VSMHorizontal";
51280
+ const w = Qt("blurSamples", "float", s).setGroup(Ke), T = Qt("radius", "float", s).setGroup(Ke), M = Qt("mapSize", "vec2", s).setGroup(Ke);
51281
+ let S = this.vsmMaterialVertical || (this.vsmMaterialVertical = new Nc());
51282
+ S.fragmentNode = bce({ samples: w, radius: T, size: M, shadowPass: y, depthLayer: this.depthLayer }).context(e.getSharedContext()), S.name = "VSMVertical", S = this.vsmMaterialHorizontal || (this.vsmMaterialHorizontal = new Nc()), S.fragmentNode = vce({ samples: w, radius: T, size: M, shadowPass: v, depthLayer: this.depthLayer }).context(e.getSharedContext()), S.name = "VSMHorizontal";
51283
51283
  }
51284
51284
  const l = Qt("intensity", "float", s).setGroup(Ke), h = Qt("normalBias", "float", s).setGroup(Ke), u = uw(i).mul(hw.add(DI.mul(h))), c = this.setupShadowCoord(e, u), d = s.filterNode || this.getShadowFilterFn(r.shadowMap.type) || null;
51285
51285
  if (d === null)
@@ -51549,8 +51549,8 @@ const Nce = (t, e) => Y(new _ce(t, e)), dO = /* @__PURE__ */ F(({ lightDistance:
51549
51549
  { name: "t", type: "float" }
51550
51550
  ]
51551
51551
  }), mO = /* @__PURE__ */ ci([Rce, Pce]), Ice = /* @__PURE__ */ F(([t, e, r, i, s, n, a, o, l, h, u]) => {
51552
- const c = C(u).toVar(), d = C(h).toVar(), m = C(l).toVar(), p = C(o).toVar(), f = C(a).toVar(), g = C(n).toVar(), y = C(s).toVar(), v = C(i).toVar(), S = C(r).toVar(), T = C(e).toVar(), M = C(t).toVar(), w = C(at(1, m)).toVar(), _ = C(at(1, d)).toVar();
51553
- return C(at(1, c)).toVar().mul(_.mul(M.mul(w).add(T.mul(m))).add(d.mul(S.mul(w).add(v.mul(m))))).add(c.mul(_.mul(y.mul(w).add(g.mul(m))).add(d.mul(f.mul(w).add(p.mul(m))))));
51552
+ const c = C(u).toVar(), d = C(h).toVar(), m = C(l).toVar(), p = C(o).toVar(), f = C(a).toVar(), g = C(n).toVar(), y = C(s).toVar(), v = C(i).toVar(), w = C(r).toVar(), T = C(e).toVar(), M = C(t).toVar(), S = C(at(1, m)).toVar(), N = C(at(1, d)).toVar();
51553
+ return C(at(1, c)).toVar().mul(N.mul(M.mul(S).add(T.mul(m))).add(d.mul(w.mul(S).add(v.mul(m))))).add(c.mul(N.mul(y.mul(S).add(g.mul(m))).add(d.mul(f.mul(S).add(p.mul(m))))));
51554
51554
  }).setLayout({
51555
51555
  name: "mx_trilerp_0",
51556
51556
  type: "float",
@@ -51568,8 +51568,8 @@ const Nce = (t, e) => Y(new _ce(t, e)), dO = /* @__PURE__ */ F(({ lightDistance:
51568
51568
  { name: "r", type: "float" }
51569
51569
  ]
51570
51570
  }), Vce = /* @__PURE__ */ F(([t, e, r, i, s, n, a, o, l, h, u]) => {
51571
- const c = C(u).toVar(), d = C(h).toVar(), m = C(l).toVar(), p = z(o).toVar(), f = z(a).toVar(), g = z(n).toVar(), y = z(s).toVar(), v = z(i).toVar(), S = z(r).toVar(), T = z(e).toVar(), M = z(t).toVar(), w = C(at(1, m)).toVar(), _ = C(at(1, d)).toVar();
51572
- return C(at(1, c)).toVar().mul(_.mul(M.mul(w).add(T.mul(m))).add(d.mul(S.mul(w).add(v.mul(m))))).add(c.mul(_.mul(y.mul(w).add(g.mul(m))).add(d.mul(f.mul(w).add(p.mul(m))))));
51571
+ const c = C(u).toVar(), d = C(h).toVar(), m = C(l).toVar(), p = z(o).toVar(), f = z(a).toVar(), g = z(n).toVar(), y = z(s).toVar(), v = z(i).toVar(), w = z(r).toVar(), T = z(e).toVar(), M = z(t).toVar(), S = C(at(1, m)).toVar(), N = C(at(1, d)).toVar();
51572
+ return C(at(1, c)).toVar().mul(N.mul(M.mul(S).add(T.mul(m))).add(d.mul(w.mul(S).add(v.mul(m))))).add(c.mul(N.mul(y.mul(S).add(g.mul(m))).add(d.mul(f.mul(S).add(p.mul(m))))));
51573
51573
  }).setLayout({
51574
51574
  name: "mx_trilerp_1",
51575
51575
  type: "vec3",
@@ -51965,7 +51965,7 @@ const Nce = (t, e) => Y(new _ce(t, e)), dO = /* @__PURE__ */ F(({ lightDistance:
51965
51965
  }), cde = /* @__PURE__ */ F(([t, e, r, i, s, n, a, o, l]) => {
51966
51966
  const h = R(l).toVar(), u = C(o).toVar(), c = R(a).toVar(), d = R(n).toVar(), m = R(s).toVar(), p = R(i).toVar(), f = R(r).toVar(), g = R(e).toVar(), y = z(t).toVar(), v = z(xO(z(g.add(m), f.add(d), p.add(c)))).toVar();
51967
51967
  v.subAssign(0.5), v.mulAssign(u), v.addAssign(0.5);
51968
- const S = z(z(C(g), C(f), C(p)).add(v)).toVar(), T = z(S.sub(y)).toVar();
51968
+ const w = z(z(C(g), C(f), C(p)).add(v)).toVar(), T = z(w.sub(y)).toVar();
51969
51969
  return qe(h.equal(R(2)), () => Ft(T.x).add(Ft(T.y)).add(Ft(T.z))), qe(h.equal(R(3)), () => Hr(Ft(T.x), Ft(T.y), Ft(T.z))), Ho(T, T);
51970
51970
  }).setLayout({
51971
51971
  name: "mx_worley_distance_1",
@@ -53361,101 +53361,95 @@ const oe = NL(null), afe = ({
53361
53361
  className: i = "",
53362
53362
  ...s
53363
53363
  }) => {
53364
- const n = Re(null), a = k(() => "ombre-root-" + Math.random().toString(36).substring(7), []), o = Re(null);
53364
+ const n = Re(null), a = B(() => "ombre-root-" + Math.random().toString(36).substring(7), []), o = Re(null);
53365
53365
  o.current === null && (o.current = Tse());
53366
- const l = k(() => (T, M, w, _, A = null) => {
53367
- if (M === null) {
53366
+ const l = B(() => (w, T, M, S, N = null) => {
53367
+ if (T === null) {
53368
53368
  try {
53369
- o.current.removeNode(T);
53370
- } catch (B) {
53371
- console.warn("Error removing node:", B);
53369
+ o.current.removeNode(w);
53370
+ } catch (A) {
53371
+ console.warn("Error removing node:", A);
53372
53372
  }
53373
53373
  return;
53374
53374
  }
53375
53375
  try {
53376
- o.current.registerNode(T, M, w, _, A);
53377
- } catch (B) {
53378
- console.error("Error registering node:", B, { id: T, parentId: w, metadata: _ });
53376
+ o.current.registerNode(w, T, M, S, N);
53377
+ } catch (A) {
53378
+ console.error("Error registering node:", A, { id: w, parentId: M, metadata: S });
53379
53379
  }
53380
- }, []), h = k(() => (T, M, w) => {
53380
+ }, []), h = B(() => (w, T, M) => {
53381
53381
  try {
53382
- o.current.updateUniformValue(T, M, w);
53383
- } catch (_) {
53384
- console.warn("Error updating uniform:", _);
53382
+ o.current.updateUniformValue(w, T, M);
53383
+ } catch (S) {
53384
+ console.warn("Error updating uniform:", S);
53385
53385
  }
53386
- }, []), u = k(() => (T, M) => {
53386
+ }, []), u = B(() => (w, T) => {
53387
53387
  try {
53388
- o.current.updateNodeMetadata(T, M);
53389
- } catch (w) {
53390
- console.warn("Error updating metadata:", w);
53388
+ o.current.updateNodeMetadata(w, T);
53389
+ } catch (M) {
53390
+ console.warn("Error updating metadata:", M);
53391
53391
  }
53392
- }, []), c = k(() => ({
53392
+ }, []), c = B(() => ({
53393
53393
  ombreParentId: a,
53394
53394
  ombreNodeRegister: l,
53395
53395
  ombreUniformUpdate: h,
53396
53396
  ombreMetadataUpdate: u
53397
53397
  }), [a, l, h, u]), d = Re(!1), m = Re(!1), p = Re(!1), f = Re(!1), g = Re(null), y = async () => {
53398
- const T = n.current;
53399
- if (!(!T || d.current || m.current)) {
53398
+ const w = n.current;
53399
+ if (!(!w || d.current || m.current)) {
53400
53400
  console.log("[Shader] Initializing renderer..."), m.current = !0;
53401
53401
  try {
53402
- const M = o.current;
53403
- M.isInitialized() || await M.initialize({
53404
- canvas: T
53405
- }), M.registerNode(
53402
+ const T = o.current;
53403
+ T.isInitialized() || await T.initialize({
53404
+ canvas: w
53405
+ }), T.registerNode(
53406
53406
  a,
53407
53407
  // @ts-ignore
53408
- ({ childNode: w }) => w || jde(0, 0, 0, 0),
53408
+ ({ childNode: M }) => M || jde(0, 0, 0, 0),
53409
53409
  // Root node that passes through children
53410
53410
  null,
53411
53411
  // No parent (this is the root)
53412
53412
  null,
53413
53413
  // No metadata to pass
53414
53414
  {}
53415
- ), d.current = !0, m.current = !1, e || M.showLicenseWarning(), console.log("[Shader] Renderer initialized successfully");
53416
- } catch (M) {
53417
- throw console.error("[Shader] Initialization failed:", M), m.current = !1, M;
53415
+ ), d.current = !0, m.current = !1, e || T.showLicenseWarning(), console.log("[Shader] Renderer initialized successfully");
53416
+ } catch (T) {
53417
+ throw console.error("[Shader] Initialization failed:", T), m.current = !1, T;
53418
53418
  }
53419
53419
  }
53420
53420
  }, v = () => {
53421
- const T = n.current;
53422
- !T || g.current || (g.current = new IntersectionObserver((M) => {
53423
- const w = M[0];
53424
- if (!w) return;
53425
- const _ = T.getBoundingClientRect(), A = w.isIntersecting && _ && _.width > 0 && _.height > 0;
53426
- A && !f.current ? (console.log("[Shader] Canvas became visible, initializing..."), y().catch(console.error), f.current = !0) : !A && f.current && (console.log("[Shader] Canvas became hidden, cleaning up renderer..."), o.current.cleanup(), d.current = !1, m.current = !1, f.current = !1);
53427
- }, { threshold: 0 }), g.current.observe(T));
53421
+ const w = n.current;
53422
+ !w || g.current || (g.current = new IntersectionObserver((T) => {
53423
+ const M = T[0];
53424
+ if (!M) return;
53425
+ const S = w.getBoundingClientRect(), N = M.isIntersecting && S && S.width > 0 && S.height > 0;
53426
+ N && !f.current ? (console.log("[Shader] Canvas became visible, initializing..."), y().catch(console.error), f.current = !0) : !N && f.current && (console.log("[Shader] Canvas became hidden, cleaning up renderer..."), o.current.cleanup(), d.current = !1, m.current = !1, f.current = !1);
53427
+ }, { threshold: 0 }), g.current.observe(w));
53428
53428
  };
53429
- $(() => {
53429
+ return $(() => {
53430
53430
  p.current = !1;
53431
- const T = n.current;
53432
- if (!T)
53431
+ const w = n.current;
53432
+ if (!w)
53433
53433
  return;
53434
- const M = T.getBoundingClientRect();
53435
- return M.width > 0 && M.height > 0 ? (console.log("[Shader] Canvas visible on mount, initializing..."), y().catch(console.error), f.current = !0) : (console.log("[Shader] Canvas hidden on mount, setting up observer..."), f.current = !1), v(), () => {
53434
+ const T = w.getBoundingClientRect();
53435
+ return T.width > 0 && T.height > 0 ? (console.log("[Shader] Canvas visible on mount, initializing..."), y().catch(console.error), f.current = !0) : (console.log("[Shader] Canvas hidden on mount, setting up observer..."), f.current = !1), v(), () => {
53436
53436
  if (!p.current) {
53437
53437
  p.current = !0, g.current && (g.current.disconnect(), g.current = null);
53438
53438
  try {
53439
53439
  o.current.cleanup(), d.current = !1, m.current = !1, console.log("[Shader] Renderer cleaned up successfully");
53440
- } catch (_) {
53441
- console.warn("[Shader] Error during cleanup:", _);
53440
+ } catch (S) {
53441
+ console.warn("[Shader] Error during cleanup:", S);
53442
53442
  }
53443
53443
  }
53444
53444
  };
53445
- }, [a, e]);
53446
- const S = {
53447
- width: "1200px",
53448
- height: "800px",
53449
- ...typeof r == "object" ? r : {}
53450
- };
53451
- return /* @__PURE__ */ _L(oe.Provider, { value: c, children: [
53445
+ }, [a, e]), /* @__PURE__ */ _L(oe.Provider, { value: c, children: [
53452
53446
  /* @__PURE__ */ ze(
53453
53447
  "canvas",
53454
53448
  {
53455
53449
  "data-renderer": "ombre",
53456
53450
  ref: n,
53457
53451
  className: i,
53458
- style: S,
53452
+ style: r,
53459
53453
  ...s
53460
53454
  }
53461
53455
  ),
@@ -53490,9 +53484,9 @@ const ofe = (t) => {
53490
53484
  ombreNodeRegister: i,
53491
53485
  ombreUniformUpdate: s,
53492
53486
  ombreMetadataUpdate: n
53493
- } = e, a = k(() => t.id || `${Rl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Wde(t, SO), [t]), l = Re(null);
53487
+ } = e, a = B(() => t.id || `${Rl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Wde(t, SO), [t]), l = Re(null);
53494
53488
  l.current === null && (l.current = ke(Rl, o, a));
53495
- const h = k(() => ({
53489
+ const h = B(() => ({
53496
53490
  ...e,
53497
53491
  ombreParentId: a
53498
53492
  }), [e, a]);
@@ -53594,9 +53588,9 @@ const lfe = (t) => {
53594
53588
  ombreNodeRegister: i,
53595
53589
  ombreUniformUpdate: s,
53596
53590
  ombreMetadataUpdate: n
53597
- } = e, a = k(() => t.id || `${Il.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Hde(t, MO), [t]), l = Re(null);
53591
+ } = e, a = B(() => t.id || `${Il.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Hde(t, MO), [t]), l = Re(null);
53598
53592
  l.current === null && (l.current = ke(Il, o, a));
53599
- const h = k(() => ({
53593
+ const h = B(() => ({
53600
53594
  ...e,
53601
53595
  ombreParentId: a
53602
53596
  }), [e, a]);
@@ -53698,9 +53692,9 @@ const ufe = (t) => {
53698
53692
  ombreNodeRegister: i,
53699
53693
  ombreUniformUpdate: s,
53700
53694
  ombreMetadataUpdate: n
53701
- } = e, a = k(() => t.id || `${Vl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => qde(t, _O), [t]), l = Re(null);
53695
+ } = e, a = B(() => t.id || `${Vl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => qde(t, _O), [t]), l = Re(null);
53702
53696
  l.current === null && (l.current = ke(Vl, o, a));
53703
- const h = k(() => ({
53697
+ const h = B(() => ({
53704
53698
  ...e,
53705
53699
  ombreParentId: a
53706
53700
  }), [e, a]);
@@ -53802,9 +53796,9 @@ const hfe = (t) => {
53802
53796
  ombreNodeRegister: i,
53803
53797
  ombreUniformUpdate: s,
53804
53798
  ombreMetadataUpdate: n
53805
- } = e, a = k(() => t.id || `${Ol.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Xde(t, NO), [t]), l = Re(null);
53799
+ } = e, a = B(() => t.id || `${Ol.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Xde(t, NO), [t]), l = Re(null);
53806
53800
  l.current === null && (l.current = ke(Ol, o, a));
53807
- const h = k(() => ({
53801
+ const h = B(() => ({
53808
53802
  ...e,
53809
53803
  ombreParentId: a
53810
53804
  }), [e, a]);
@@ -53906,9 +53900,9 @@ const cfe = (t) => {
53906
53900
  ombreNodeRegister: i,
53907
53901
  ombreUniformUpdate: s,
53908
53902
  ombreMetadataUpdate: n
53909
- } = e, a = k(() => t.id || `${Ul.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Yde(t, AO), [t]), l = Re(null);
53903
+ } = e, a = B(() => t.id || `${Ul.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Yde(t, AO), [t]), l = Re(null);
53910
53904
  l.current === null && (l.current = ke(Ul, o, a));
53911
- const h = k(() => ({
53905
+ const h = B(() => ({
53912
53906
  ...e,
53913
53907
  ombreParentId: a
53914
53908
  }), [e, a]);
@@ -54010,9 +54004,9 @@ const dfe = (t) => {
54010
54004
  ombreNodeRegister: i,
54011
54005
  ombreUniformUpdate: s,
54012
54006
  ombreMetadataUpdate: n
54013
- } = e, a = k(() => t.id || `${Ll.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Zde(t, CO), [t]), l = Re(null);
54007
+ } = e, a = B(() => t.id || `${Ll.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Zde(t, CO), [t]), l = Re(null);
54014
54008
  l.current === null && (l.current = ke(Ll, o, a));
54015
- const h = k(() => ({
54009
+ const h = B(() => ({
54016
54010
  ...e,
54017
54011
  ombreParentId: a
54018
54012
  }), [e, a]);
@@ -54114,9 +54108,9 @@ const mfe = (t) => {
54114
54108
  ombreNodeRegister: i,
54115
54109
  ombreUniformUpdate: s,
54116
54110
  ombreMetadataUpdate: n
54117
- } = e, a = k(() => t.id || `${Fl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Jde(t, EO), [t]), l = Re(null);
54111
+ } = e, a = B(() => t.id || `${Fl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Jde(t, EO), [t]), l = Re(null);
54118
54112
  l.current === null && (l.current = ke(Fl, o, a));
54119
- const h = k(() => ({
54113
+ const h = B(() => ({
54120
54114
  ...e,
54121
54115
  ombreParentId: a
54122
54116
  }), [e, a]);
@@ -54218,9 +54212,9 @@ const pfe = (t) => {
54218
54212
  ombreNodeRegister: i,
54219
54213
  ombreUniformUpdate: s,
54220
54214
  ombreMetadataUpdate: n
54221
- } = e, a = k(() => t.id || `${zl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Kde(t, RO), [t]), l = Re(null);
54215
+ } = e, a = B(() => t.id || `${zl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Kde(t, RO), [t]), l = Re(null);
54222
54216
  l.current === null && (l.current = ke(zl, o, a));
54223
- const h = k(() => ({
54217
+ const h = B(() => ({
54224
54218
  ...e,
54225
54219
  ombreParentId: a
54226
54220
  }), [e, a]);
@@ -54322,9 +54316,9 @@ const ffe = (t) => {
54322
54316
  ombreNodeRegister: i,
54323
54317
  ombreUniformUpdate: s,
54324
54318
  ombreMetadataUpdate: n
54325
- } = e, a = k(() => t.id || `${Bl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Qde(t, PO), [t]), l = Re(null);
54319
+ } = e, a = B(() => t.id || `${Bl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Qde(t, PO), [t]), l = Re(null);
54326
54320
  l.current === null && (l.current = ke(Bl, o, a));
54327
- const h = k(() => ({
54321
+ const h = B(() => ({
54328
54322
  ...e,
54329
54323
  ombreParentId: a
54330
54324
  }), [e, a]);
@@ -54426,9 +54420,9 @@ const gfe = (t) => {
54426
54420
  ombreNodeRegister: i,
54427
54421
  ombreUniformUpdate: s,
54428
54422
  ombreMetadataUpdate: n
54429
- } = e, a = k(() => t.id || `${kl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => eme(t, IO), [t]), l = Re(null);
54423
+ } = e, a = B(() => t.id || `${kl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => eme(t, IO), [t]), l = Re(null);
54430
54424
  l.current === null && (l.current = ke(kl, o, a));
54431
- const h = k(() => ({
54425
+ const h = B(() => ({
54432
54426
  ...e,
54433
54427
  ombreParentId: a
54434
54428
  }), [e, a]);
@@ -54530,9 +54524,9 @@ const yfe = (t) => {
54530
54524
  ombreNodeRegister: i,
54531
54525
  ombreUniformUpdate: s,
54532
54526
  ombreMetadataUpdate: n
54533
- } = e, a = k(() => t.id || `${Dl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => tme(t, VO), [t]), l = Re(null);
54527
+ } = e, a = B(() => t.id || `${Dl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => tme(t, VO), [t]), l = Re(null);
54534
54528
  l.current === null && (l.current = ke(Dl, o, a));
54535
- const h = k(() => ({
54529
+ const h = B(() => ({
54536
54530
  ...e,
54537
54531
  ombreParentId: a
54538
54532
  }), [e, a]);
@@ -54634,9 +54628,9 @@ const xfe = (t) => {
54634
54628
  ombreNodeRegister: i,
54635
54629
  ombreUniformUpdate: s,
54636
54630
  ombreMetadataUpdate: n
54637
- } = e, a = k(() => t.id || `${$l.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => rme(t, OO), [t]), l = Re(null);
54631
+ } = e, a = B(() => t.id || `${$l.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => rme(t, OO), [t]), l = Re(null);
54638
54632
  l.current === null && (l.current = ke($l, o, a));
54639
- const h = k(() => ({
54633
+ const h = B(() => ({
54640
54634
  ...e,
54641
54635
  ombreParentId: a
54642
54636
  }), [e, a]);
@@ -54738,9 +54732,9 @@ const bfe = (t) => {
54738
54732
  ombreNodeRegister: i,
54739
54733
  ombreUniformUpdate: s,
54740
54734
  ombreMetadataUpdate: n
54741
- } = e, a = k(() => t.id || `${Gl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => ime(t, LO), [t]), l = Re(null);
54735
+ } = e, a = B(() => t.id || `${Gl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => ime(t, LO), [t]), l = Re(null);
54742
54736
  l.current === null && (l.current = ke(Gl, o, a));
54743
- const h = k(() => ({
54737
+ const h = B(() => ({
54744
54738
  ...e,
54745
54739
  ombreParentId: a
54746
54740
  }), [e, a]);
@@ -54842,9 +54836,9 @@ const vfe = (t) => {
54842
54836
  ombreNodeRegister: i,
54843
54837
  ombreUniformUpdate: s,
54844
54838
  ombreMetadataUpdate: n
54845
- } = e, a = k(() => t.id || `${jl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => sme(t, FO), [t]), l = Re(null);
54839
+ } = e, a = B(() => t.id || `${jl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => sme(t, FO), [t]), l = Re(null);
54846
54840
  l.current === null && (l.current = ke(jl, o, a));
54847
- const h = k(() => ({
54841
+ const h = B(() => ({
54848
54842
  ...e,
54849
54843
  ombreParentId: a
54850
54844
  }), [e, a]);
@@ -54946,9 +54940,9 @@ const Tfe = (t) => {
54946
54940
  ombreNodeRegister: i,
54947
54941
  ombreUniformUpdate: s,
54948
54942
  ombreMetadataUpdate: n
54949
- } = e, a = k(() => t.id || `${Wl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => nme(t, zO), [t]), l = Re(null);
54943
+ } = e, a = B(() => t.id || `${Wl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => nme(t, zO), [t]), l = Re(null);
54950
54944
  l.current === null && (l.current = ke(Wl, o, a));
54951
- const h = k(() => ({
54945
+ const h = B(() => ({
54952
54946
  ...e,
54953
54947
  ombreParentId: a
54954
54948
  }), [e, a]);
@@ -55050,9 +55044,9 @@ const wfe = (t) => {
55050
55044
  ombreNodeRegister: i,
55051
55045
  ombreUniformUpdate: s,
55052
55046
  ombreMetadataUpdate: n
55053
- } = e, a = k(() => t.id || `${Hl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => ame(t, BO), [t]), l = Re(null);
55047
+ } = e, a = B(() => t.id || `${Hl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => ame(t, BO), [t]), l = Re(null);
55054
55048
  l.current === null && (l.current = ke(Hl, o, a));
55055
- const h = k(() => ({
55049
+ const h = B(() => ({
55056
55050
  ...e,
55057
55051
  ombreParentId: a
55058
55052
  }), [e, a]);
@@ -55154,9 +55148,9 @@ const Sfe = (t) => {
55154
55148
  ombreNodeRegister: i,
55155
55149
  ombreUniformUpdate: s,
55156
55150
  ombreMetadataUpdate: n
55157
- } = e, a = k(() => t.id || `${ql.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => ome(t, kO), [t]), l = Re(null);
55151
+ } = e, a = B(() => t.id || `${ql.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => ome(t, kO), [t]), l = Re(null);
55158
55152
  l.current === null && (l.current = ke(ql, o, a));
55159
- const h = k(() => ({
55153
+ const h = B(() => ({
55160
55154
  ...e,
55161
55155
  ombreParentId: a
55162
55156
  }), [e, a]);
@@ -55258,9 +55252,9 @@ const Mfe = (t) => {
55258
55252
  ombreNodeRegister: i,
55259
55253
  ombreUniformUpdate: s,
55260
55254
  ombreMetadataUpdate: n
55261
- } = e, a = k(() => t.id || `${Xl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => lme(t, UO), [t]), l = Re(null);
55255
+ } = e, a = B(() => t.id || `${Xl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => lme(t, UO), [t]), l = Re(null);
55262
55256
  l.current === null && (l.current = ke(Xl, o, a));
55263
- const h = k(() => ({
55257
+ const h = B(() => ({
55264
55258
  ...e,
55265
55259
  ombreParentId: a
55266
55260
  }), [e, a]);
@@ -55362,9 +55356,9 @@ const _fe = (t) => {
55362
55356
  ombreNodeRegister: i,
55363
55357
  ombreUniformUpdate: s,
55364
55358
  ombreMetadataUpdate: n
55365
- } = e, a = k(() => t.id || `${Yl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => ume(t, DO), [t]), l = Re(null);
55359
+ } = e, a = B(() => t.id || `${Yl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => ume(t, DO), [t]), l = Re(null);
55366
55360
  l.current === null && (l.current = ke(Yl, o, a));
55367
- const h = k(() => ({
55361
+ const h = B(() => ({
55368
55362
  ...e,
55369
55363
  ombreParentId: a
55370
55364
  }), [e, a]);
@@ -55466,9 +55460,9 @@ const Nfe = (t) => {
55466
55460
  ombreNodeRegister: i,
55467
55461
  ombreUniformUpdate: s,
55468
55462
  ombreMetadataUpdate: n
55469
- } = e, a = k(() => t.id || `${Jl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => hme(t, $O), [t]), l = Re(null);
55463
+ } = e, a = B(() => t.id || `${Jl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => hme(t, $O), [t]), l = Re(null);
55470
55464
  l.current === null && (l.current = ke(Jl, o, a));
55471
- const h = k(() => ({
55465
+ const h = B(() => ({
55472
55466
  ...e,
55473
55467
  ombreParentId: a
55474
55468
  }), [e, a]);
@@ -55570,9 +55564,9 @@ const Afe = (t) => {
55570
55564
  ombreNodeRegister: i,
55571
55565
  ombreUniformUpdate: s,
55572
55566
  ombreMetadataUpdate: n
55573
- } = e, a = k(() => t.id || `${Kl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => cme(t, GO), [t]), l = Re(null);
55567
+ } = e, a = B(() => t.id || `${Kl.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => cme(t, GO), [t]), l = Re(null);
55574
55568
  l.current === null && (l.current = ke(Kl, o, a));
55575
- const h = k(() => ({
55569
+ const h = B(() => ({
55576
55570
  ...e,
55577
55571
  ombreParentId: a
55578
55572
  }), [e, a]);
@@ -55674,9 +55668,9 @@ const Cfe = (t) => {
55674
55668
  ombreNodeRegister: i,
55675
55669
  ombreUniformUpdate: s,
55676
55670
  ombreMetadataUpdate: n
55677
- } = e, a = k(() => t.id || `${Ql.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => dme(t, jO), [t]), l = Re(null);
55671
+ } = e, a = B(() => t.id || `${Ql.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => dme(t, jO), [t]), l = Re(null);
55678
55672
  l.current === null && (l.current = ke(Ql, o, a));
55679
- const h = k(() => ({
55673
+ const h = B(() => ({
55680
55674
  ...e,
55681
55675
  ombreParentId: a
55682
55676
  }), [e, a]);
@@ -55778,9 +55772,9 @@ const Efe = (t) => {
55778
55772
  ombreNodeRegister: i,
55779
55773
  ombreUniformUpdate: s,
55780
55774
  ombreMetadataUpdate: n
55781
- } = e, a = k(() => t.id || `${eu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => mme(t, WO), [t]), l = Re(null);
55775
+ } = e, a = B(() => t.id || `${eu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => mme(t, WO), [t]), l = Re(null);
55782
55776
  l.current === null && (l.current = ke(eu, o, a));
55783
- const h = k(() => ({
55777
+ const h = B(() => ({
55784
55778
  ...e,
55785
55779
  ombreParentId: a
55786
55780
  }), [e, a]);
@@ -55882,9 +55876,9 @@ const Rfe = (t) => {
55882
55876
  ombreNodeRegister: i,
55883
55877
  ombreUniformUpdate: s,
55884
55878
  ombreMetadataUpdate: n
55885
- } = e, a = k(() => t.id || `${tu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => pme(t, HO), [t]), l = Re(null);
55879
+ } = e, a = B(() => t.id || `${tu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => pme(t, HO), [t]), l = Re(null);
55886
55880
  l.current === null && (l.current = ke(tu, o, a));
55887
- const h = k(() => ({
55881
+ const h = B(() => ({
55888
55882
  ...e,
55889
55883
  ombreParentId: a
55890
55884
  }), [e, a]);
@@ -55986,9 +55980,9 @@ const Pfe = (t) => {
55986
55980
  ombreNodeRegister: i,
55987
55981
  ombreUniformUpdate: s,
55988
55982
  ombreMetadataUpdate: n
55989
- } = e, a = k(() => t.id || `${ru.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => fme(t, qO), [t]), l = Re(null);
55983
+ } = e, a = B(() => t.id || `${ru.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => fme(t, qO), [t]), l = Re(null);
55990
55984
  l.current === null && (l.current = ke(ru, o, a));
55991
- const h = k(() => ({
55985
+ const h = B(() => ({
55992
55986
  ...e,
55993
55987
  ombreParentId: a
55994
55988
  }), [e, a]);
@@ -56090,9 +56084,9 @@ const Ife = (t) => {
56090
56084
  ombreNodeRegister: i,
56091
56085
  ombreUniformUpdate: s,
56092
56086
  ombreMetadataUpdate: n
56093
- } = e, a = k(() => t.id || `${iu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => gme(t, XO), [t]), l = Re(null);
56087
+ } = e, a = B(() => t.id || `${iu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => gme(t, XO), [t]), l = Re(null);
56094
56088
  l.current === null && (l.current = ke(iu, o, a));
56095
- const h = k(() => ({
56089
+ const h = B(() => ({
56096
56090
  ...e,
56097
56091
  ombreParentId: a
56098
56092
  }), [e, a]);
@@ -56194,9 +56188,9 @@ const Vfe = (t) => {
56194
56188
  ombreNodeRegister: i,
56195
56189
  ombreUniformUpdate: s,
56196
56190
  ombreMetadataUpdate: n
56197
- } = e, a = k(() => t.id || `${su.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => yme(t, YO), [t]), l = Re(null);
56191
+ } = e, a = B(() => t.id || `${su.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => yme(t, YO), [t]), l = Re(null);
56198
56192
  l.current === null && (l.current = ke(su, o, a));
56199
- const h = k(() => ({
56193
+ const h = B(() => ({
56200
56194
  ...e,
56201
56195
  ombreParentId: a
56202
56196
  }), [e, a]);
@@ -56298,9 +56292,9 @@ const Ofe = (t) => {
56298
56292
  ombreNodeRegister: i,
56299
56293
  ombreUniformUpdate: s,
56300
56294
  ombreMetadataUpdate: n
56301
- } = e, a = k(() => t.id || `${nu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => xme(t, ZO), [t]), l = Re(null);
56295
+ } = e, a = B(() => t.id || `${nu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => xme(t, ZO), [t]), l = Re(null);
56302
56296
  l.current === null && (l.current = ke(nu, o, a));
56303
- const h = k(() => ({
56297
+ const h = B(() => ({
56304
56298
  ...e,
56305
56299
  ombreParentId: a
56306
56300
  }), [e, a]);
@@ -56402,9 +56396,9 @@ const Lfe = (t) => {
56402
56396
  ombreNodeRegister: i,
56403
56397
  ombreUniformUpdate: s,
56404
56398
  ombreMetadataUpdate: n
56405
- } = e, a = k(() => t.id || `${au.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => bme(t, JO), [t]), l = Re(null);
56399
+ } = e, a = B(() => t.id || `${au.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => bme(t, JO), [t]), l = Re(null);
56406
56400
  l.current === null && (l.current = ke(au, o, a));
56407
- const h = k(() => ({
56401
+ const h = B(() => ({
56408
56402
  ...e,
56409
56403
  ombreParentId: a
56410
56404
  }), [e, a]);
@@ -56506,9 +56500,9 @@ const Ffe = (t) => {
56506
56500
  ombreNodeRegister: i,
56507
56501
  ombreUniformUpdate: s,
56508
56502
  ombreMetadataUpdate: n
56509
- } = e, a = k(() => t.id || `${ou.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => vme(t, KO), [t]), l = Re(null);
56503
+ } = e, a = B(() => t.id || `${ou.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => vme(t, KO), [t]), l = Re(null);
56510
56504
  l.current === null && (l.current = ke(ou, o, a));
56511
- const h = k(() => ({
56505
+ const h = B(() => ({
56512
56506
  ...e,
56513
56507
  ombreParentId: a
56514
56508
  }), [e, a]);
@@ -56610,9 +56604,9 @@ const zfe = (t) => {
56610
56604
  ombreNodeRegister: i,
56611
56605
  ombreUniformUpdate: s,
56612
56606
  ombreMetadataUpdate: n
56613
- } = e, a = k(() => t.id || `${lu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Tme(t, QO), [t]), l = Re(null);
56607
+ } = e, a = B(() => t.id || `${lu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Tme(t, QO), [t]), l = Re(null);
56614
56608
  l.current === null && (l.current = ke(lu, o, a));
56615
- const h = k(() => ({
56609
+ const h = B(() => ({
56616
56610
  ...e,
56617
56611
  ombreParentId: a
56618
56612
  }), [e, a]);
@@ -56714,9 +56708,9 @@ const Bfe = (t) => {
56714
56708
  ombreNodeRegister: i,
56715
56709
  ombreUniformUpdate: s,
56716
56710
  ombreMetadataUpdate: n
56717
- } = e, a = k(() => t.id || `${uu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => wme(t, eL), [t]), l = Re(null);
56711
+ } = e, a = B(() => t.id || `${uu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => wme(t, eL), [t]), l = Re(null);
56718
56712
  l.current === null && (l.current = ke(uu, o, a));
56719
- const h = k(() => ({
56713
+ const h = B(() => ({
56720
56714
  ...e,
56721
56715
  ombreParentId: a
56722
56716
  }), [e, a]);
@@ -56818,9 +56812,9 @@ const kfe = (t) => {
56818
56812
  ombreNodeRegister: i,
56819
56813
  ombreUniformUpdate: s,
56820
56814
  ombreMetadataUpdate: n
56821
- } = e, a = k(() => t.id || `${hu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Sme(t, tL), [t]), l = Re(null);
56815
+ } = e, a = B(() => t.id || `${hu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Sme(t, tL), [t]), l = Re(null);
56822
56816
  l.current === null && (l.current = ke(hu, o, a));
56823
- const h = k(() => ({
56817
+ const h = B(() => ({
56824
56818
  ...e,
56825
56819
  ombreParentId: a
56826
56820
  }), [e, a]);
@@ -56922,9 +56916,9 @@ const Ufe = (t) => {
56922
56916
  ombreNodeRegister: i,
56923
56917
  ombreUniformUpdate: s,
56924
56918
  ombreMetadataUpdate: n
56925
- } = e, a = k(() => t.id || `${cu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Mme(t, rL), [t]), l = Re(null);
56919
+ } = e, a = B(() => t.id || `${cu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Mme(t, rL), [t]), l = Re(null);
56926
56920
  l.current === null && (l.current = ke(cu, o, a));
56927
- const h = k(() => ({
56921
+ const h = B(() => ({
56928
56922
  ...e,
56929
56923
  ombreParentId: a
56930
56924
  }), [e, a]);
@@ -57026,9 +57020,9 @@ const Dfe = (t) => {
57026
57020
  ombreNodeRegister: i,
57027
57021
  ombreUniformUpdate: s,
57028
57022
  ombreMetadataUpdate: n
57029
- } = e, a = k(() => t.id || `${du.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => _me(t, iL), [t]), l = Re(null);
57023
+ } = e, a = B(() => t.id || `${du.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => _me(t, iL), [t]), l = Re(null);
57030
57024
  l.current === null && (l.current = ke(du, o, a));
57031
- const h = k(() => ({
57025
+ const h = B(() => ({
57032
57026
  ...e,
57033
57027
  ombreParentId: a
57034
57028
  }), [e, a]);
@@ -57130,9 +57124,9 @@ const $fe = (t) => {
57130
57124
  ombreNodeRegister: i,
57131
57125
  ombreUniformUpdate: s,
57132
57126
  ombreMetadataUpdate: n
57133
- } = e, a = k(() => t.id || `${mu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Nme(t, sL), [t]), l = Re(null);
57127
+ } = e, a = B(() => t.id || `${mu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Nme(t, sL), [t]), l = Re(null);
57134
57128
  l.current === null && (l.current = ke(mu, o, a));
57135
- const h = k(() => ({
57129
+ const h = B(() => ({
57136
57130
  ...e,
57137
57131
  ombreParentId: a
57138
57132
  }), [e, a]);
@@ -57234,9 +57228,9 @@ const Gfe = (t) => {
57234
57228
  ombreNodeRegister: i,
57235
57229
  ombreUniformUpdate: s,
57236
57230
  ombreMetadataUpdate: n
57237
- } = e, a = k(() => t.id || `${pu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Ame(t, nL), [t]), l = Re(null);
57231
+ } = e, a = B(() => t.id || `${pu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Ame(t, nL), [t]), l = Re(null);
57238
57232
  l.current === null && (l.current = ke(pu, o, a));
57239
- const h = k(() => ({
57233
+ const h = B(() => ({
57240
57234
  ...e,
57241
57235
  ombreParentId: a
57242
57236
  }), [e, a]);
@@ -57338,9 +57332,9 @@ const jfe = (t) => {
57338
57332
  ombreNodeRegister: i,
57339
57333
  ombreUniformUpdate: s,
57340
57334
  ombreMetadataUpdate: n
57341
- } = e, a = k(() => t.id || `${fu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Cme(t, aL), [t]), l = Re(null);
57335
+ } = e, a = B(() => t.id || `${fu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Cme(t, aL), [t]), l = Re(null);
57342
57336
  l.current === null && (l.current = ke(fu, o, a));
57343
- const h = k(() => ({
57337
+ const h = B(() => ({
57344
57338
  ...e,
57345
57339
  ombreParentId: a
57346
57340
  }), [e, a]);
@@ -57442,9 +57436,9 @@ const Wfe = (t) => {
57442
57436
  ombreNodeRegister: i,
57443
57437
  ombreUniformUpdate: s,
57444
57438
  ombreMetadataUpdate: n
57445
- } = e, a = k(() => t.id || `${gu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Eme(t, oL), [t]), l = Re(null);
57439
+ } = e, a = B(() => t.id || `${gu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Eme(t, oL), [t]), l = Re(null);
57446
57440
  l.current === null && (l.current = ke(gu, o, a));
57447
- const h = k(() => ({
57441
+ const h = B(() => ({
57448
57442
  ...e,
57449
57443
  ombreParentId: a
57450
57444
  }), [e, a]);
@@ -57546,9 +57540,9 @@ const Hfe = (t) => {
57546
57540
  ombreNodeRegister: i,
57547
57541
  ombreUniformUpdate: s,
57548
57542
  ombreMetadataUpdate: n
57549
- } = e, a = k(() => t.id || `${yu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Rme(t, lL), [t]), l = Re(null);
57543
+ } = e, a = B(() => t.id || `${yu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Rme(t, lL), [t]), l = Re(null);
57550
57544
  l.current === null && (l.current = ke(yu, o, a));
57551
- const h = k(() => ({
57545
+ const h = B(() => ({
57552
57546
  ...e,
57553
57547
  ombreParentId: a
57554
57548
  }), [e, a]);
@@ -57650,9 +57644,9 @@ const qfe = (t) => {
57650
57644
  ombreNodeRegister: i,
57651
57645
  ombreUniformUpdate: s,
57652
57646
  ombreMetadataUpdate: n
57653
- } = e, a = k(() => t.id || `${xu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Pme(t, uL), [t]), l = Re(null);
57647
+ } = e, a = B(() => t.id || `${xu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Pme(t, uL), [t]), l = Re(null);
57654
57648
  l.current === null && (l.current = ke(xu, o, a));
57655
- const h = k(() => ({
57649
+ const h = B(() => ({
57656
57650
  ...e,
57657
57651
  ombreParentId: a
57658
57652
  }), [e, a]);
@@ -57754,9 +57748,9 @@ const Xfe = (t) => {
57754
57748
  ombreNodeRegister: i,
57755
57749
  ombreUniformUpdate: s,
57756
57750
  ombreMetadataUpdate: n
57757
- } = e, a = k(() => t.id || `${bu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Ime(t, hL), [t]), l = Re(null);
57751
+ } = e, a = B(() => t.id || `${bu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Ime(t, hL), [t]), l = Re(null);
57758
57752
  l.current === null && (l.current = ke(bu, o, a));
57759
- const h = k(() => ({
57753
+ const h = B(() => ({
57760
57754
  ...e,
57761
57755
  ombreParentId: a
57762
57756
  }), [e, a]);
@@ -57858,9 +57852,9 @@ const Yfe = (t) => {
57858
57852
  ombreNodeRegister: i,
57859
57853
  ombreUniformUpdate: s,
57860
57854
  ombreMetadataUpdate: n
57861
- } = e, a = k(() => t.id || `${vu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Vme(t, cL), [t]), l = Re(null);
57855
+ } = e, a = B(() => t.id || `${vu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Vme(t, cL), [t]), l = Re(null);
57862
57856
  l.current === null && (l.current = ke(vu, o, a));
57863
- const h = k(() => ({
57857
+ const h = B(() => ({
57864
57858
  ...e,
57865
57859
  ombreParentId: a
57866
57860
  }), [e, a]);
@@ -57962,9 +57956,9 @@ const Zfe = (t) => {
57962
57956
  ombreNodeRegister: i,
57963
57957
  ombreUniformUpdate: s,
57964
57958
  ombreMetadataUpdate: n
57965
- } = e, a = k(() => t.id || `${Tu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Ome(t, dL), [t]), l = Re(null);
57959
+ } = e, a = B(() => t.id || `${Tu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Ome(t, dL), [t]), l = Re(null);
57966
57960
  l.current === null && (l.current = ke(Tu, o, a));
57967
- const h = k(() => ({
57961
+ const h = B(() => ({
57968
57962
  ...e,
57969
57963
  ombreParentId: a
57970
57964
  }), [e, a]);
@@ -58066,9 +58060,9 @@ const Jfe = (t) => {
58066
58060
  ombreNodeRegister: i,
58067
58061
  ombreUniformUpdate: s,
58068
58062
  ombreMetadataUpdate: n
58069
- } = e, a = k(() => t.id || `${wu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Lme(t, mL), [t]), l = Re(null);
58063
+ } = e, a = B(() => t.id || `${wu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Lme(t, mL), [t]), l = Re(null);
58070
58064
  l.current === null && (l.current = ke(wu, o, a));
58071
- const h = k(() => ({
58065
+ const h = B(() => ({
58072
58066
  ...e,
58073
58067
  ombreParentId: a
58074
58068
  }), [e, a]);
@@ -58170,9 +58164,9 @@ const Kfe = (t) => {
58170
58164
  ombreNodeRegister: i,
58171
58165
  ombreUniformUpdate: s,
58172
58166
  ombreMetadataUpdate: n
58173
- } = e, a = k(() => t.id || `${Su.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Fme(t, pL), [t]), l = Re(null);
58167
+ } = e, a = B(() => t.id || `${Su.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Fme(t, pL), [t]), l = Re(null);
58174
58168
  l.current === null && (l.current = ke(Su, o, a));
58175
- const h = k(() => ({
58169
+ const h = B(() => ({
58176
58170
  ...e,
58177
58171
  ombreParentId: a
58178
58172
  }), [e, a]);
@@ -58274,9 +58268,9 @@ const Qfe = (t) => {
58274
58268
  ombreNodeRegister: i,
58275
58269
  ombreUniformUpdate: s,
58276
58270
  ombreMetadataUpdate: n
58277
- } = e, a = k(() => t.id || `${Mu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => zme(t, fL), [t]), l = Re(null);
58271
+ } = e, a = B(() => t.id || `${Mu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => zme(t, fL), [t]), l = Re(null);
58278
58272
  l.current === null && (l.current = ke(Mu, o, a));
58279
- const h = k(() => ({
58273
+ const h = B(() => ({
58280
58274
  ...e,
58281
58275
  ombreParentId: a
58282
58276
  }), [e, a]);
@@ -58378,9 +58372,9 @@ const ege = (t) => {
58378
58372
  ombreNodeRegister: i,
58379
58373
  ombreUniformUpdate: s,
58380
58374
  ombreMetadataUpdate: n
58381
- } = e, a = k(() => t.id || `${_u.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => Bme(t, gL), [t]), l = Re(null);
58375
+ } = e, a = B(() => t.id || `${_u.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => Bme(t, gL), [t]), l = Re(null);
58382
58376
  l.current === null && (l.current = ke(_u, o, a));
58383
- const h = k(() => ({
58377
+ const h = B(() => ({
58384
58378
  ...e,
58385
58379
  ombreParentId: a
58386
58380
  }), [e, a]);
@@ -58482,9 +58476,9 @@ const tge = (t) => {
58482
58476
  ombreNodeRegister: i,
58483
58477
  ombreUniformUpdate: s,
58484
58478
  ombreMetadataUpdate: n
58485
- } = e, a = k(() => t.id || `${Nu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = k(() => kme(t, yL), [t]), l = Re(null);
58479
+ } = e, a = B(() => t.id || `${Nu.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`, [t.id]), o = B(() => kme(t, yL), [t]), l = Re(null);
58486
58480
  l.current === null && (l.current = ke(Nu, o, a));
58487
- const h = k(() => ({
58481
+ const h = B(() => ({
58488
58482
  ...e,
58489
58483
  ombreParentId: a
58490
58484
  }), [e, a]);