@albi_scando/as-design-system-threejs-lib 1.1.4 → 1.1.5

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.
@@ -281,9 +281,9 @@ const IA = {
281
281
  </svg>`
282
282
  };
283
283
  `${btoa(wc.CUSTOM_CROSSHAIR)}`;
284
- const vA = {
284
+ const xA = {
285
285
  CANVAS: "canvas"
286
- }, xo = {
286
+ }, vo = {
287
287
  CLICK: "click"
288
288
  }, Wi = {
289
289
  POINTER_DOWN: "pointerdown",
@@ -349,8 +349,8 @@ const Eo = {
349
349
  DARK: "dark",
350
350
  DARK_PURPLE: "dark-purple"
351
351
  }, pa = (s) => {
352
- xA(), document.body.classList.add(s);
353
- }, xA = () => {
352
+ vA(), document.body.classList.add(s);
353
+ }, vA = () => {
354
354
  document.body.classList.remove(...Object.values(Yc));
355
355
  }, Xc = "base-button", Zc = `<button part="button">
356
356
  <slot></slot>
@@ -3301,8 +3301,8 @@ class un {
3301
3301
  * @return {Matrix3} A reference to this matrix.
3302
3302
  */
3303
3303
  multiplyMatrices(t, e) {
3304
- const i = t.elements, n = e.elements, r = this.elements, a = i[0], o = i[3], h = i[6], l = i[1], A = i[4], c = i[7], u = i[2], d = i[5], p = i[8], m = n[0], g = n[3], f = n[6], M = n[1], S = n[4], v = n[7], T = n[2], _ = n[5], w = n[8];
3305
- return r[0] = a * m + o * M + h * T, r[3] = a * g + o * S + h * _, r[6] = a * f + o * v + h * w, r[1] = l * m + A * M + c * T, r[4] = l * g + A * S + c * _, r[7] = l * f + A * v + c * w, r[2] = u * m + d * M + p * T, r[5] = u * g + d * S + p * _, r[8] = u * f + d * v + p * w, this;
3304
+ const i = t.elements, n = e.elements, r = this.elements, a = i[0], o = i[3], h = i[6], l = i[1], A = i[4], c = i[7], u = i[2], d = i[5], p = i[8], m = n[0], g = n[3], f = n[6], M = n[1], S = n[4], x = n[7], T = n[2], _ = n[5], w = n[8];
3305
+ return r[0] = a * m + o * M + h * T, r[3] = a * g + o * S + h * _, r[6] = a * f + o * x + h * w, r[1] = l * m + A * M + c * T, r[4] = l * g + A * S + c * _, r[7] = l * f + A * x + c * w, r[2] = u * m + d * M + p * T, r[5] = u * g + d * S + p * _, r[8] = u * f + d * x + p * w, this;
3306
3306
  }
3307
3307
  /**
3308
3308
  * Multiplies every component of the matrix by the given scalar.
@@ -3400,7 +3400,7 @@ class un {
3400
3400
  * @return {Matrix3} A reference to this matrix.
3401
3401
  */
3402
3402
  scale(t, e) {
3403
- return this.premultiply(va.makeScale(t, e)), this;
3403
+ return this.premultiply(xa.makeScale(t, e)), this;
3404
3404
  }
3405
3405
  /**
3406
3406
  * Rotates this matrix by the given angle.
@@ -3409,7 +3409,7 @@ class un {
3409
3409
  * @return {Matrix3} A reference to this matrix.
3410
3410
  */
3411
3411
  rotate(t) {
3412
- return this.premultiply(va.makeRotation(-t)), this;
3412
+ return this.premultiply(xa.makeRotation(-t)), this;
3413
3413
  }
3414
3414
  /**
3415
3415
  * Translates this matrix by the given scalar values.
@@ -3419,7 +3419,7 @@ class un {
3419
3419
  * @return {Matrix3} A reference to this matrix.
3420
3420
  */
3421
3421
  translate(t, e) {
3422
- return this.premultiply(va.makeTranslation(t, e)), this;
3422
+ return this.premultiply(xa.makeTranslation(t, e)), this;
3423
3423
  }
3424
3424
  // for 2D Transforms
3425
3425
  /**
@@ -3537,7 +3537,7 @@ class un {
3537
3537
  return new this.constructor().fromArray(this.elements);
3538
3538
  }
3539
3539
  }
3540
- const va = /* @__PURE__ */ new un(), Zl = /* @__PURE__ */ new un().set(
3540
+ const xa = /* @__PURE__ */ new un(), Zl = /* @__PURE__ */ new un().set(
3541
3541
  0.4123908,
3542
3542
  0.3575843,
3543
3543
  0.1804808,
@@ -3704,7 +3704,7 @@ class Cu {
3704
3704
  }
3705
3705
  }
3706
3706
  let Iu = 0;
3707
- class vu {
3707
+ class xu {
3708
3708
  /**
3709
3709
  * Constructs a new video texture.
3710
3710
  *
@@ -3755,15 +3755,15 @@ class vu {
3755
3755
  if (Array.isArray(n)) {
3756
3756
  r = [];
3757
3757
  for (let a = 0, o = n.length; a < o; a++)
3758
- n[a].isDataTexture ? r.push(xa(n[a].image)) : r.push(xa(n[a]));
3758
+ n[a].isDataTexture ? r.push(va(n[a].image)) : r.push(va(n[a]));
3759
3759
  } else
3760
- r = xa(n);
3760
+ r = va(n);
3761
3761
  i.url = r;
3762
3762
  }
3763
3763
  return e || (t.images[this.uuid] = i), i;
3764
3764
  }
3765
3765
  }
3766
- function xa(s) {
3766
+ function va(s) {
3767
3767
  return typeof HTMLImageElement < "u" && s instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && s instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && s instanceof ImageBitmap ? Cu.getDataURL(s) : s.data ? {
3768
3768
  data: Array.from(s.data),
3769
3769
  width: s.width,
@@ -3771,7 +3771,7 @@ function xa(s) {
3771
3771
  type: s.data.constructor.name
3772
3772
  } : (Me("Texture: Unable to serialize Texture."), {});
3773
3773
  }
3774
- let xu = 0;
3774
+ let vu = 0;
3775
3775
  const Ea = /* @__PURE__ */ new V();
3776
3776
  class Ei extends Aa {
3777
3777
  /**
@@ -3789,7 +3789,7 @@ class Ei extends Aa {
3789
3789
  * @param {string} [colorSpace=NoColorSpace] - The color space.
3790
3790
  */
3791
3791
  constructor(t = Ei.DEFAULT_IMAGE, e = Ei.DEFAULT_MAPPING, i = 1001, n = 1001, r = 1006, a = 1008, o = 1023, h = 1009, l = Ei.DEFAULT_ANISOTROPY, A = "") {
3792
- super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: xu++ }), this.uuid = Ks(), this.name = "", this.source = new vu(t), this.mipmaps = [], this.mapping = e, this.channel = 0, this.wrapS = i, this.wrapT = n, this.magFilter = r, this.minFilter = a, this.anisotropy = l, this.format = o, this.internalFormat = null, this.type = h, this.offset = new Qe(0, 0), this.repeat = new Qe(1, 1), this.center = new Qe(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new un(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = A, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(t && t.depth && t.depth > 1), this.pmremVersion = 0;
3792
+ super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: vu++ }), this.uuid = Ks(), this.name = "", this.source = new xu(t), this.mipmaps = [], this.mapping = e, this.channel = 0, this.wrapS = i, this.wrapT = n, this.magFilter = r, this.minFilter = a, this.anisotropy = l, this.format = o, this.internalFormat = null, this.type = h, this.offset = new Qe(0, 0), this.repeat = new Qe(1, 1), this.center = new Qe(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new un(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = A, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(t && t.depth && t.depth > 1), this.pmremVersion = 0;
3793
3793
  }
3794
3794
  /**
3795
3795
  * The width of the texture in pixels.
@@ -4283,8 +4283,8 @@ class tr {
4283
4283
  if (Math.abs(h + A) < 0.1 && Math.abs(l + d) < 0.1 && Math.abs(u + p) < 0.1 && Math.abs(o + c + m - 3) < 0.1)
4284
4284
  return this.set(1, 0, 0, 0), this;
4285
4285
  e = Math.PI;
4286
- const f = (o + 1) / 2, M = (c + 1) / 2, S = (m + 1) / 2, v = (h + A) / 4, T = (l + d) / 4, _ = (u + p) / 4;
4287
- return f > M && f > S ? f < 0.01 ? (i = 0, n = 0.707106781, r = 0.707106781) : (i = Math.sqrt(f), n = v / i, r = T / i) : M > S ? M < 0.01 ? (i = 0.707106781, n = 0, r = 0.707106781) : (n = Math.sqrt(M), i = v / n, r = _ / n) : S < 0.01 ? (i = 0.707106781, n = 0.707106781, r = 0) : (r = Math.sqrt(S), i = T / r, n = _ / r), this.set(i, n, r, e), this;
4286
+ const f = (o + 1) / 2, M = (c + 1) / 2, S = (m + 1) / 2, x = (h + A) / 4, T = (l + d) / 4, _ = (u + p) / 4;
4287
+ return f > M && f > S ? f < 0.01 ? (i = 0, n = 0.707106781, r = 0.707106781) : (i = Math.sqrt(f), n = x / i, r = T / i) : M > S ? M < 0.01 ? (i = 0.707106781, n = 0, r = 0.707106781) : (n = Math.sqrt(M), i = x / n, r = _ / n) : S < 0.01 ? (i = 0.707106781, n = 0.707106781, r = 0) : (r = Math.sqrt(S), i = T / r, n = _ / r), this.set(i, n, r, e), this;
4288
4288
  }
4289
4289
  let g = Math.sqrt((p - u) * (p - u) + (l - d) * (l - d) + (A - h) * (A - h));
4290
4290
  return Math.abs(g) < 1e-3 && (g = 1), this.x = (p - u) / g, this.y = (l - d) / g, this.z = (A - h) / g, this.w = Math.acos((o + c + m - 1) / 2), this;
@@ -4822,8 +4822,8 @@ class pi {
4822
4822
  * @return {Matrix4} A reference to this matrix.
4823
4823
  */
4824
4824
  multiplyMatrices(t, e) {
4825
- const i = t.elements, n = e.elements, r = this.elements, a = i[0], o = i[4], h = i[8], l = i[12], A = i[1], c = i[5], u = i[9], d = i[13], p = i[2], m = i[6], g = i[10], f = i[14], M = i[3], S = i[7], v = i[11], T = i[15], _ = n[0], w = n[4], P = n[8], E = n[12], x = n[1], b = n[5], z = n[9], F = n[13], U = n[2], W = n[6], Y = n[10], $ = n[14], H = n[3], rt = n[7], ht = n[11], mt = n[15];
4826
- return r[0] = a * _ + o * x + h * U + l * H, r[4] = a * w + o * b + h * W + l * rt, r[8] = a * P + o * z + h * Y + l * ht, r[12] = a * E + o * F + h * $ + l * mt, r[1] = A * _ + c * x + u * U + d * H, r[5] = A * w + c * b + u * W + d * rt, r[9] = A * P + c * z + u * Y + d * ht, r[13] = A * E + c * F + u * $ + d * mt, r[2] = p * _ + m * x + g * U + f * H, r[6] = p * w + m * b + g * W + f * rt, r[10] = p * P + m * z + g * Y + f * ht, r[14] = p * E + m * F + g * $ + f * mt, r[3] = M * _ + S * x + v * U + T * H, r[7] = M * w + S * b + v * W + T * rt, r[11] = M * P + S * z + v * Y + T * ht, r[15] = M * E + S * F + v * $ + T * mt, this;
4825
+ const i = t.elements, n = e.elements, r = this.elements, a = i[0], o = i[4], h = i[8], l = i[12], A = i[1], c = i[5], u = i[9], d = i[13], p = i[2], m = i[6], g = i[10], f = i[14], M = i[3], S = i[7], x = i[11], T = i[15], _ = n[0], w = n[4], P = n[8], E = n[12], v = n[1], b = n[5], z = n[9], F = n[13], U = n[2], W = n[6], Y = n[10], $ = n[14], H = n[3], rt = n[7], ht = n[11], mt = n[15];
4826
+ return r[0] = a * _ + o * v + h * U + l * H, r[4] = a * w + o * b + h * W + l * rt, r[8] = a * P + o * z + h * Y + l * ht, r[12] = a * E + o * F + h * $ + l * mt, r[1] = A * _ + c * v + u * U + d * H, r[5] = A * w + c * b + u * W + d * rt, r[9] = A * P + c * z + u * Y + d * ht, r[13] = A * E + c * F + u * $ + d * mt, r[2] = p * _ + m * v + g * U + f * H, r[6] = p * w + m * b + g * W + f * rt, r[10] = p * P + m * z + g * Y + f * ht, r[14] = p * E + m * F + g * $ + f * mt, r[3] = M * _ + S * v + x * U + T * H, r[7] = M * w + S * b + x * W + T * rt, r[11] = M * P + S * z + x * Y + T * ht, r[15] = M * E + S * F + x * $ + T * mt, this;
4827
4827
  }
4828
4828
  /**
4829
4829
  * Multiplies every component of the matrix by the given scalar.
@@ -4843,8 +4843,8 @@ class pi {
4843
4843
  * @return {number} The determinant.
4844
4844
  */
4845
4845
  determinant() {
4846
- const t = this.elements, e = t[0], i = t[4], n = t[8], r = t[12], a = t[1], o = t[5], h = t[9], l = t[13], A = t[2], c = t[6], u = t[10], d = t[14], p = t[3], m = t[7], g = t[11], f = t[15], M = h * d - l * u, S = o * d - l * c, v = o * u - h * c, T = a * d - l * A, _ = a * u - h * A, w = a * c - o * A;
4847
- return e * (m * M - g * S + f * v) - i * (p * M - g * T + f * _) + n * (p * S - m * T + f * w) - r * (p * v - m * _ + g * w);
4846
+ const t = this.elements, e = t[0], i = t[4], n = t[8], r = t[12], a = t[1], o = t[5], h = t[9], l = t[13], A = t[2], c = t[6], u = t[10], d = t[14], p = t[3], m = t[7], g = t[11], f = t[15], M = h * d - l * u, S = o * d - l * c, x = o * u - h * c, T = a * d - l * A, _ = a * u - h * A, w = a * c - o * A;
4847
+ return e * (m * M - g * S + f * x) - i * (p * M - g * T + f * _) + n * (p * S - m * T + f * w) - r * (p * x - m * _ + g * w);
4848
4848
  }
4849
4849
  /**
4850
4850
  * Transposes this matrix in place.
@@ -4877,10 +4877,10 @@ class pi {
4877
4877
  * @return {Matrix4} A reference to this matrix.
4878
4878
  */
4879
4879
  invert() {
4880
- const t = this.elements, e = t[0], i = t[1], n = t[2], r = t[3], a = t[4], o = t[5], h = t[6], l = t[7], A = t[8], c = t[9], u = t[10], d = t[11], p = t[12], m = t[13], g = t[14], f = t[15], M = e * o - i * a, S = e * h - n * a, v = e * l - r * a, T = i * h - n * o, _ = i * l - r * o, w = n * l - r * h, P = A * m - c * p, E = A * g - u * p, x = A * f - d * p, b = c * g - u * m, z = c * f - d * m, F = u * f - d * g, U = M * F - S * z + v * b + T * x - _ * E + w * P;
4880
+ const t = this.elements, e = t[0], i = t[1], n = t[2], r = t[3], a = t[4], o = t[5], h = t[6], l = t[7], A = t[8], c = t[9], u = t[10], d = t[11], p = t[12], m = t[13], g = t[14], f = t[15], M = e * o - i * a, S = e * h - n * a, x = e * l - r * a, T = i * h - n * o, _ = i * l - r * o, w = n * l - r * h, P = A * m - c * p, E = A * g - u * p, v = A * f - d * p, b = c * g - u * m, z = c * f - d * m, F = u * f - d * g, U = M * F - S * z + x * b + T * v - _ * E + w * P;
4881
4881
  if (U === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
4882
4882
  const W = 1 / U;
4883
- return t[0] = (o * F - h * z + l * b) * W, t[1] = (n * z - i * F - r * b) * W, t[2] = (m * w - g * _ + f * T) * W, t[3] = (u * _ - c * w - d * T) * W, t[4] = (h * x - a * F - l * E) * W, t[5] = (e * F - n * x + r * E) * W, t[6] = (g * v - p * w - f * S) * W, t[7] = (A * w - u * v + d * S) * W, t[8] = (a * z - o * x + l * P) * W, t[9] = (i * x - e * z - r * P) * W, t[10] = (p * _ - m * v + f * M) * W, t[11] = (c * v - A * _ - d * M) * W, t[12] = (o * E - a * b - h * P) * W, t[13] = (e * b - i * E + n * P) * W, t[14] = (m * S - p * T - g * M) * W, t[15] = (A * T - c * S + u * M) * W, this;
4883
+ return t[0] = (o * F - h * z + l * b) * W, t[1] = (n * z - i * F - r * b) * W, t[2] = (m * w - g * _ + f * T) * W, t[3] = (u * _ - c * w - d * T) * W, t[4] = (h * v - a * F - l * E) * W, t[5] = (e * F - n * v + r * E) * W, t[6] = (g * x - p * w - f * S) * W, t[7] = (A * w - u * x + d * S) * W, t[8] = (a * z - o * v + l * P) * W, t[9] = (i * v - e * z - r * P) * W, t[10] = (p * _ - m * x + f * M) * W, t[11] = (c * x - A * _ - d * M) * W, t[12] = (o * E - a * b - h * P) * W, t[13] = (e * b - i * E + n * P) * W, t[14] = (m * S - p * T - g * M) * W, t[15] = (A * T - c * S + u * M) * W, this;
4884
4884
  }
4885
4885
  /**
4886
4886
  * Multiplies the columns of this matrix by the given vector.
@@ -5131,8 +5131,8 @@ class pi {
5131
5131
  * @return {Matrix4} A reference to this matrix.
5132
5132
  */
5133
5133
  compose(t, e, i) {
5134
- const n = this.elements, r = e._x, a = e._y, o = e._z, h = e._w, l = r + r, A = a + a, c = o + o, u = r * l, d = r * A, p = r * c, m = a * A, g = a * c, f = o * c, M = h * l, S = h * A, v = h * c, T = i.x, _ = i.y, w = i.z;
5135
- return n[0] = (1 - (m + f)) * T, n[1] = (d + v) * T, n[2] = (p - S) * T, n[3] = 0, n[4] = (d - v) * _, n[5] = (1 - (u + f)) * _, n[6] = (g + M) * _, n[7] = 0, n[8] = (p + S) * w, n[9] = (g - M) * w, n[10] = (1 - (u + m)) * w, n[11] = 0, n[12] = t.x, n[13] = t.y, n[14] = t.z, n[15] = 1, this;
5134
+ const n = this.elements, r = e._x, a = e._y, o = e._z, h = e._w, l = r + r, A = a + a, c = o + o, u = r * l, d = r * A, p = r * c, m = a * A, g = a * c, f = o * c, M = h * l, S = h * A, x = h * c, T = i.x, _ = i.y, w = i.z;
5135
+ return n[0] = (1 - (m + f)) * T, n[1] = (d + x) * T, n[2] = (p - S) * T, n[3] = 0, n[4] = (d - x) * _, n[5] = (1 - (u + f)) * _, n[6] = (g + M) * _, n[7] = 0, n[8] = (p + S) * w, n[9] = (g - M) * w, n[10] = (1 - (u + m)) * w, n[11] = 0, n[12] = t.x, n[13] = t.y, n[14] = t.z, n[15] = 1, this;
5136
5136
  }
5137
5137
  /**
5138
5138
  * Decomposes this matrix into its position, rotation and scale components
@@ -8418,10 +8418,10 @@ class ws extends Aa {
8418
8418
  for (let P = 0; P < i.count; P++)
8419
8419
  o[P] = new V(), h[P] = new V();
8420
8420
  const l = new V(), A = new V(), c = new V(), u = new Qe(), d = new Qe(), p = new Qe(), m = new V(), g = new V();
8421
- function f(P, E, x) {
8422
- l.fromBufferAttribute(i, P), A.fromBufferAttribute(i, E), c.fromBufferAttribute(i, x), u.fromBufferAttribute(r, P), d.fromBufferAttribute(r, E), p.fromBufferAttribute(r, x), A.sub(l), c.sub(l), d.sub(u), p.sub(u);
8421
+ function f(P, E, v) {
8422
+ l.fromBufferAttribute(i, P), A.fromBufferAttribute(i, E), c.fromBufferAttribute(i, v), u.fromBufferAttribute(r, P), d.fromBufferAttribute(r, E), p.fromBufferAttribute(r, v), A.sub(l), c.sub(l), d.sub(u), p.sub(u);
8423
8423
  const b = 1 / (d.x * p.y - p.x * d.y);
8424
- isFinite(b) && (m.copy(A).multiplyScalar(p.y).addScaledVector(c, -d.y).multiplyScalar(b), g.copy(c).multiplyScalar(d.x).addScaledVector(A, -p.x).multiplyScalar(b), o[P].add(m), o[E].add(m), o[x].add(m), h[P].add(g), h[E].add(g), h[x].add(g));
8424
+ isFinite(b) && (m.copy(A).multiplyScalar(p.y).addScaledVector(c, -d.y).multiplyScalar(b), g.copy(c).multiplyScalar(d.x).addScaledVector(A, -p.x).multiplyScalar(b), o[P].add(m), o[E].add(m), o[v].add(m), h[P].add(g), h[E].add(g), h[v].add(g));
8425
8425
  }
8426
8426
  let M = this.groups;
8427
8427
  M.length === 0 && (M = [{
@@ -8429,7 +8429,7 @@ class ws extends Aa {
8429
8429
  count: t.count
8430
8430
  }]);
8431
8431
  for (let P = 0, E = M.length; P < E; ++P) {
8432
- const x = M[P], b = x.start, z = x.count;
8432
+ const v = M[P], b = v.start, z = v.count;
8433
8433
  for (let F = b, U = b + z; F < U; F += 3)
8434
8434
  f(
8435
8435
  t.getX(F + 0),
@@ -8437,16 +8437,16 @@ class ws extends Aa {
8437
8437
  t.getX(F + 2)
8438
8438
  );
8439
8439
  }
8440
- const S = new V(), v = new V(), T = new V(), _ = new V();
8440
+ const S = new V(), x = new V(), T = new V(), _ = new V();
8441
8441
  function w(P) {
8442
8442
  T.fromBufferAttribute(n, P), _.copy(T);
8443
8443
  const E = o[P];
8444
- S.copy(E), S.sub(T.multiplyScalar(T.dot(E))).normalize(), v.crossVectors(_, E);
8445
- const x = v.dot(h[P]) < 0 ? -1 : 1;
8446
- a.setXYZW(P, S.x, S.y, S.z, x);
8444
+ S.copy(E), S.sub(T.multiplyScalar(T.dot(E))).normalize(), x.crossVectors(_, E);
8445
+ const v = x.dot(h[P]) < 0 ? -1 : 1;
8446
+ a.setXYZW(P, S.x, S.y, S.z, v);
8447
8447
  }
8448
8448
  for (let P = 0, E = M.length; P < E; ++P) {
8449
- const x = M[P], b = x.start, z = x.count;
8449
+ const v = M[P], b = v.start, z = v.count;
8450
8450
  for (let F = b, U = b + z; F < U; F += 3)
8451
8451
  w(t.getX(F + 0)), w(t.getX(F + 1)), w(t.getX(F + 2));
8452
8452
  }
@@ -9069,7 +9069,7 @@ class Fu extends hl {
9069
9069
  return super.copy(t), this.color.copy(t.color), this.map = t.map, this.lightMap = t.lightMap, this.lightMapIntensity = t.lightMapIntensity, this.aoMap = t.aoMap, this.aoMapIntensity = t.aoMapIntensity, this.specularMap = t.specularMap, this.alphaMap = t.alphaMap, this.envMap = t.envMap, this.envMapRotation.copy(t.envMapRotation), this.combine = t.combine, this.reflectivity = t.reflectivity, this.refractionRatio = t.refractionRatio, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this.wireframeLinecap = t.wireframeLinecap, this.wireframeLinejoin = t.wireframeLinejoin, this.fog = t.fog, this;
9070
9070
  }
9071
9071
  }
9072
- const nh = /* @__PURE__ */ new pi(), mn = /* @__PURE__ */ new Ou(), Ir = /* @__PURE__ */ new wA(), sh = /* @__PURE__ */ new V(), vr = /* @__PURE__ */ new V(), xr = /* @__PURE__ */ new V(), Er = /* @__PURE__ */ new V(), Ua = /* @__PURE__ */ new V(), Sr = /* @__PURE__ */ new V(), rh = /* @__PURE__ */ new V(), yr = /* @__PURE__ */ new V();
9072
+ const nh = /* @__PURE__ */ new pi(), mn = /* @__PURE__ */ new Ou(), Ir = /* @__PURE__ */ new wA(), sh = /* @__PURE__ */ new V(), xr = /* @__PURE__ */ new V(), vr = /* @__PURE__ */ new V(), Er = /* @__PURE__ */ new V(), Ua = /* @__PURE__ */ new V(), Sr = /* @__PURE__ */ new V(), rh = /* @__PURE__ */ new V(), yr = /* @__PURE__ */ new V();
9073
9073
  class RA extends ni {
9074
9074
  /**
9075
9075
  * Constructs a new mesh.
@@ -9139,32 +9139,32 @@ class RA extends ni {
9139
9139
  if (Array.isArray(a))
9140
9140
  for (let p = 0, m = u.length; p < m; p++) {
9141
9141
  const g = u[p], f = a[g.materialIndex], M = Math.max(g.start, d.start), S = Math.min(o.count, Math.min(g.start + g.count, d.start + d.count));
9142
- for (let v = M, T = S; v < T; v += 3) {
9143
- const _ = o.getX(v), w = o.getX(v + 1), P = o.getX(v + 2);
9144
- n = Mr(this, f, t, i, l, A, c, _, w, P), n && (n.faceIndex = Math.floor(v / 3), n.face.materialIndex = g.materialIndex, e.push(n));
9142
+ for (let x = M, T = S; x < T; x += 3) {
9143
+ const _ = o.getX(x), w = o.getX(x + 1), P = o.getX(x + 2);
9144
+ n = Mr(this, f, t, i, l, A, c, _, w, P), n && (n.faceIndex = Math.floor(x / 3), n.face.materialIndex = g.materialIndex, e.push(n));
9145
9145
  }
9146
9146
  }
9147
9147
  else {
9148
9148
  const p = Math.max(0, d.start), m = Math.min(o.count, d.start + d.count);
9149
9149
  for (let g = p, f = m; g < f; g += 3) {
9150
- const M = o.getX(g), S = o.getX(g + 1), v = o.getX(g + 2);
9151
- n = Mr(this, a, t, i, l, A, c, M, S, v), n && (n.faceIndex = Math.floor(g / 3), e.push(n));
9150
+ const M = o.getX(g), S = o.getX(g + 1), x = o.getX(g + 2);
9151
+ n = Mr(this, a, t, i, l, A, c, M, S, x), n && (n.faceIndex = Math.floor(g / 3), e.push(n));
9152
9152
  }
9153
9153
  }
9154
9154
  else if (h !== void 0)
9155
9155
  if (Array.isArray(a))
9156
9156
  for (let p = 0, m = u.length; p < m; p++) {
9157
9157
  const g = u[p], f = a[g.materialIndex], M = Math.max(g.start, d.start), S = Math.min(h.count, Math.min(g.start + g.count, d.start + d.count));
9158
- for (let v = M, T = S; v < T; v += 3) {
9159
- const _ = v, w = v + 1, P = v + 2;
9160
- n = Mr(this, f, t, i, l, A, c, _, w, P), n && (n.faceIndex = Math.floor(v / 3), n.face.materialIndex = g.materialIndex, e.push(n));
9158
+ for (let x = M, T = S; x < T; x += 3) {
9159
+ const _ = x, w = x + 1, P = x + 2;
9160
+ n = Mr(this, f, t, i, l, A, c, _, w, P), n && (n.faceIndex = Math.floor(x / 3), n.face.materialIndex = g.materialIndex, e.push(n));
9161
9161
  }
9162
9162
  }
9163
9163
  else {
9164
9164
  const p = Math.max(0, d.start), m = Math.min(h.count, d.start + d.count);
9165
9165
  for (let g = p, f = m; g < f; g += 3) {
9166
- const M = g, S = g + 1, v = g + 2;
9167
- n = Mr(this, a, t, i, l, A, c, M, S, v), n && (n.faceIndex = Math.floor(g / 3), e.push(n));
9166
+ const M = g, S = g + 1, x = g + 2;
9167
+ n = Mr(this, a, t, i, l, A, c, M, S, x), n && (n.faceIndex = Math.floor(g / 3), e.push(n));
9168
9168
  }
9169
9169
  }
9170
9170
  }
@@ -9181,11 +9181,11 @@ function Bu(s, t, e, i, n, r, a, o) {
9181
9181
  };
9182
9182
  }
9183
9183
  function Mr(s, t, e, i, n, r, a, o, h, l) {
9184
- s.getVertexPosition(o, vr), s.getVertexPosition(h, xr), s.getVertexPosition(l, Er);
9185
- const A = Bu(s, t, e, i, vr, xr, Er, rh);
9184
+ s.getVertexPosition(o, xr), s.getVertexPosition(h, vr), s.getVertexPosition(l, Er);
9185
+ const A = Bu(s, t, e, i, xr, vr, Er, rh);
9186
9186
  if (A) {
9187
9187
  const c = new V();
9188
- ui.getBarycoord(rh, vr, xr, Er, c), n && (A.uv = ui.getInterpolatedAttribute(n, o, h, l, c, new Qe())), r && (A.uv1 = ui.getInterpolatedAttribute(r, o, h, l, c, new Qe())), a && (A.normal = ui.getInterpolatedAttribute(a, o, h, l, c, new V()), A.normal.dot(i.direction) > 0 && A.normal.multiplyScalar(-1));
9188
+ ui.getBarycoord(rh, xr, vr, Er, c), n && (A.uv = ui.getInterpolatedAttribute(n, o, h, l, c, new Qe())), r && (A.uv1 = ui.getInterpolatedAttribute(r, o, h, l, c, new Qe())), a && (A.normal = ui.getInterpolatedAttribute(a, o, h, l, c, new V()), A.normal.dot(i.direction) > 0 && A.normal.multiplyScalar(-1));
9189
9189
  const u = {
9190
9190
  a: o,
9191
9191
  b: h,
@@ -9193,7 +9193,7 @@ function Mr(s, t, e, i, n, r, a, o, h, l) {
9193
9193
  normal: new V(),
9194
9194
  materialIndex: 0
9195
9195
  };
9196
- ui.getNormal(vr, xr, Er, u.normal), A.face = u, A.barycoord = c;
9196
+ ui.getNormal(xr, vr, Er, u.normal), A.face = u, A.barycoord = c;
9197
9197
  }
9198
9198
  return A;
9199
9199
  }
@@ -9251,40 +9251,40 @@ class Bn extends ws {
9251
9251
  let f = 0;
9252
9252
  M(), a === !1 && (t > 0 && S(!0), e > 0 && S(!1)), this.setIndex(A), this.setAttribute("position", new On(c, 3)), this.setAttribute("normal", new On(u, 3)), this.setAttribute("uv", new On(d, 2));
9253
9253
  function M() {
9254
- const v = new V(), T = new V();
9254
+ const x = new V(), T = new V();
9255
9255
  let _ = 0;
9256
9256
  const w = (e - t) / i;
9257
9257
  for (let P = 0; P <= r; P++) {
9258
- const E = [], x = P / r, b = x * (e - t) + t;
9258
+ const E = [], v = P / r, b = v * (e - t) + t;
9259
9259
  for (let z = 0; z <= n; z++) {
9260
9260
  const F = z / n, U = F * h + o, W = Math.sin(U), Y = Math.cos(U);
9261
- T.x = b * W, T.y = -x * i + g, T.z = b * Y, c.push(T.x, T.y, T.z), v.set(W, w, Y).normalize(), u.push(v.x, v.y, v.z), d.push(F, 1 - x), E.push(p++);
9261
+ T.x = b * W, T.y = -v * i + g, T.z = b * Y, c.push(T.x, T.y, T.z), x.set(W, w, Y).normalize(), u.push(x.x, x.y, x.z), d.push(F, 1 - v), E.push(p++);
9262
9262
  }
9263
9263
  m.push(E);
9264
9264
  }
9265
9265
  for (let P = 0; P < n; P++)
9266
9266
  for (let E = 0; E < r; E++) {
9267
- const x = m[E][P], b = m[E + 1][P], z = m[E + 1][P + 1], F = m[E][P + 1];
9268
- (t > 0 || E !== 0) && (A.push(x, b, F), _ += 3), (e > 0 || E !== r - 1) && (A.push(b, z, F), _ += 3);
9267
+ const v = m[E][P], b = m[E + 1][P], z = m[E + 1][P + 1], F = m[E][P + 1];
9268
+ (t > 0 || E !== 0) && (A.push(v, b, F), _ += 3), (e > 0 || E !== r - 1) && (A.push(b, z, F), _ += 3);
9269
9269
  }
9270
9270
  l.addGroup(f, _, 0), f += _;
9271
9271
  }
9272
- function S(v) {
9272
+ function S(x) {
9273
9273
  const T = p, _ = new Qe(), w = new V();
9274
9274
  let P = 0;
9275
- const E = v === !0 ? t : e, x = v === !0 ? 1 : -1;
9275
+ const E = x === !0 ? t : e, v = x === !0 ? 1 : -1;
9276
9276
  for (let z = 1; z <= n; z++)
9277
- c.push(0, g * x, 0), u.push(0, x, 0), d.push(0.5, 0.5), p++;
9277
+ c.push(0, g * v, 0), u.push(0, v, 0), d.push(0.5, 0.5), p++;
9278
9278
  const b = p;
9279
9279
  for (let z = 0; z <= n; z++) {
9280
9280
  const F = z / n * h + o, U = Math.cos(F), W = Math.sin(F);
9281
- w.x = E * W, w.y = g * x, w.z = E * U, c.push(w.x, w.y, w.z), u.push(0, x, 0), _.x = U * 0.5 + 0.5, _.y = W * 0.5 * x + 0.5, d.push(_.x, _.y), p++;
9281
+ w.x = E * W, w.y = g * v, w.z = E * U, c.push(w.x, w.y, w.z), u.push(0, v, 0), _.x = U * 0.5 + 0.5, _.y = W * 0.5 * v + 0.5, d.push(_.x, _.y), p++;
9282
9282
  }
9283
9283
  for (let z = 0; z < n; z++) {
9284
9284
  const F = T + z, U = b + z;
9285
- v === !0 ? A.push(U, U + 1, F) : A.push(U + 1, U, F), P += 3;
9285
+ x === !0 ? A.push(U, U + 1, F) : A.push(U + 1, U, F), P += 3;
9286
9286
  }
9287
- l.addGroup(f, P, v === !0 ? 1 : 2), f += P;
9287
+ l.addGroup(f, P, x === !0 ? 1 : 2), f += P;
9288
9288
  }
9289
9289
  }
9290
9290
  copy(t) {
@@ -9499,8 +9499,8 @@ class Xu extends ws {
9499
9499
  }
9500
9500
  for (let m = 0; m < i; m++)
9501
9501
  for (let g = 0; g < e; g++) {
9502
- const f = m * p + g, M = m * p + g + 1, S = (m + 1) * p + g + 1, v = (m + 1) * p + g;
9503
- n.push(f, M, v), n.push(M, S, v);
9502
+ const f = m * p + g, M = m * p + g + 1, S = (m + 1) * p + g + 1, x = (m + 1) * p + g;
9503
+ n.push(f, M, x), n.push(M, S, x);
9504
9504
  }
9505
9505
  this.setIndex(n), this.setAttribute("position", new On(r, 3)), this.setAttribute("normal", new On(a, 3)), this.setAttribute("uv", new On(o, 2));
9506
9506
  }
@@ -10386,10 +10386,10 @@ class Id extends Vi {
10386
10386
  t.unpin(), t.pin({ edges: [ce.LEFT, ce.TOP] }), t.setLengthConstraints(ce.LEFT), t.object.position.add(this.top);
10387
10387
  }
10388
10388
  }
10389
- const vd = new V(0, 0, 1);
10390
- class xd extends Vi {
10389
+ const xd = new V(0, 0, 1);
10390
+ class vd extends Vi {
10391
10391
  constructor(t = {}) {
10392
- super(t), this.top.applyAxisAngle(vd, Math.PI * 3 / 2);
10392
+ super(t), this.top.applyAxisAngle(xd, Math.PI * 3 / 2);
10393
10393
  }
10394
10394
  buildGeometry(t) {
10395
10395
  const e = nr(t);
@@ -10417,7 +10417,7 @@ function yd(s, t) {
10417
10417
  let i;
10418
10418
  switch (e.flagpoleType) {
10419
10419
  case Tn.HORIZONTAL:
10420
- i = new xd(e);
10420
+ i = new vd(e);
10421
10421
  break;
10422
10422
  case Tn.OUTRIGGER:
10423
10423
  i = new Sd(e);
@@ -10447,7 +10447,7 @@ const Di = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10447
10447
  buildFlag: pd,
10448
10448
  buildFlagpole: yd
10449
10449
  }, Symbol.toStringTag, { value: "Module" }));
10450
- const ul = "179", Is = { ROTATE: 0, DOLLY: 1, PAN: 2 }, ps = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, Md = 0, ph = 1, bd = 2, FA = 1, _d = 2, Ui = 3, An = 0, He = 1, zi = 2, on = 0, vs = 1, mh = 2, Ch = 3, Ih = 4, Td = 5, wn = 100, wd = 101, Rd = 102, Pd = 103, Dd = 104, Ld = 200, Nd = 201, Od = 202, Fd = 203, So = 204, yo = 205, Bd = 206, Ud = 207, zd = 208, kd = 209, Gd = 210, Hd = 211, Vd = 212, Wd = 213, Yd = 214, Mo = 0, bo = 1, _o = 2, Ss = 3, To = 4, wo = 5, Ro = 6, Po = 7, BA = 0, Xd = 1, Zd = 2, ln = 0, jd = 1, Jd = 2, Qd = 3, qd = 4, Kd = 5, $d = 6, tf = 7, UA = 300, ys = 301, Ms = 302, Do = 303, Lo = 304, ca = 306, No = 1e3, Dn = 1001, Oo = 1002, mi = 1003, ef = 1004, wr = 1005, vi = 1006, ka = 1007, Ln = 1008, yi = 1009, zA = 1010, kA = 1011, Zs = 1012, dl = 1013, Un = 1014, ki = 1015, sr = 1016, fl = 1017, gl = 1018, js = 1020, GA = 35902, HA = 1021, VA = 1022, fi = 1023, Js = 1026, Qs = 1027, WA = 1028, pl = 1029, YA = 1030, ml = 1031, Cl = 1033, Kr = 33776, $r = 33777, ta = 33778, ea = 33779, Fo = 35840, Bo = 35841, Uo = 35842, zo = 35843, ko = 36196, Go = 37492, Ho = 37496, Vo = 37808, Wo = 37809, Yo = 37810, Xo = 37811, Zo = 37812, jo = 37813, Jo = 37814, Qo = 37815, qo = 37816, Ko = 37817, $o = 37818, tl = 37819, el = 37820, il = 37821, ia = 36492, nl = 36494, sl = 36495, XA = 36283, rl = 36284, al = 36285, ol = 36286, nf = 3200, sf = 3201, ZA = 0, rf = 1, rn = "", Le = "srgb", bs = "srgb-linear", oa = "linear", Kt = "srgb", ts = 7680, vh = 519, af = 512, of = 513, lf = 514, jA = 515, hf = 516, Af = 517, cf = 518, uf = 519, xh = 35044, Eh = "300 es", xi = 2e3, la = 2001;
10450
+ const ul = "179", Is = { ROTATE: 0, DOLLY: 1, PAN: 2 }, ps = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, Md = 0, ph = 1, bd = 2, FA = 1, _d = 2, Ui = 3, An = 0, He = 1, zi = 2, on = 0, xs = 1, mh = 2, Ch = 3, Ih = 4, Td = 5, wn = 100, wd = 101, Rd = 102, Pd = 103, Dd = 104, Ld = 200, Nd = 201, Od = 202, Fd = 203, So = 204, yo = 205, Bd = 206, Ud = 207, zd = 208, kd = 209, Gd = 210, Hd = 211, Vd = 212, Wd = 213, Yd = 214, Mo = 0, bo = 1, _o = 2, Ss = 3, To = 4, wo = 5, Ro = 6, Po = 7, BA = 0, Xd = 1, Zd = 2, ln = 0, jd = 1, Jd = 2, Qd = 3, qd = 4, Kd = 5, $d = 6, tf = 7, UA = 300, ys = 301, Ms = 302, Do = 303, Lo = 304, ca = 306, No = 1e3, Dn = 1001, Oo = 1002, mi = 1003, ef = 1004, wr = 1005, xi = 1006, ka = 1007, Ln = 1008, yi = 1009, zA = 1010, kA = 1011, Zs = 1012, dl = 1013, Un = 1014, ki = 1015, sr = 1016, fl = 1017, gl = 1018, js = 1020, GA = 35902, HA = 1021, VA = 1022, fi = 1023, Js = 1026, Qs = 1027, WA = 1028, pl = 1029, YA = 1030, ml = 1031, Cl = 1033, Kr = 33776, $r = 33777, ta = 33778, ea = 33779, Fo = 35840, Bo = 35841, Uo = 35842, zo = 35843, ko = 36196, Go = 37492, Ho = 37496, Vo = 37808, Wo = 37809, Yo = 37810, Xo = 37811, Zo = 37812, jo = 37813, Jo = 37814, Qo = 37815, qo = 37816, Ko = 37817, $o = 37818, tl = 37819, el = 37820, il = 37821, ia = 36492, nl = 36494, sl = 36495, XA = 36283, rl = 36284, al = 36285, ol = 36286, nf = 3200, sf = 3201, ZA = 0, rf = 1, rn = "", Le = "srgb", bs = "srgb-linear", oa = "linear", Kt = "srgb", ts = 7680, xh = 519, af = 512, of = 513, lf = 514, jA = 515, hf = 516, Af = 517, cf = 518, uf = 519, vh = 35044, Eh = "300 es", vi = 2e3, la = 2001;
10451
10451
  class Gn {
10452
10452
  /**
10453
10453
  * Adds the given event listener to the given event type.
@@ -11143,8 +11143,8 @@ class zn {
11143
11143
  const T = Math.sqrt(S), _ = Math.atan2(T, f * M);
11144
11144
  g = Math.sin(g * _) / T, o = Math.sin(o * _) / T;
11145
11145
  }
11146
- const v = o * M;
11147
- if (h = h * g + u * v, l = l * g + d * v, A = A * g + p * v, c = c * g + m * v, g === 1 - o) {
11146
+ const x = o * M;
11147
+ if (h = h * g + u * x, l = l * g + d * x, A = A * g + p * x, c = c * g + m * x, g === 1 - o) {
11148
11148
  const T = 1 / Math.sqrt(h * h + l * l + A * A + c * c);
11149
11149
  h *= T, l *= T, A *= T, c *= T;
11150
11150
  }
@@ -12444,8 +12444,8 @@ class Ft {
12444
12444
  * @return {Matrix3} A reference to this matrix.
12445
12445
  */
12446
12446
  multiplyMatrices(t, e) {
12447
- const i = t.elements, n = e.elements, r = this.elements, a = i[0], o = i[3], h = i[6], l = i[1], A = i[4], c = i[7], u = i[2], d = i[5], p = i[8], m = n[0], g = n[3], f = n[6], M = n[1], S = n[4], v = n[7], T = n[2], _ = n[5], w = n[8];
12448
- return r[0] = a * m + o * M + h * T, r[3] = a * g + o * S + h * _, r[6] = a * f + o * v + h * w, r[1] = l * m + A * M + c * T, r[4] = l * g + A * S + c * _, r[7] = l * f + A * v + c * w, r[2] = u * m + d * M + p * T, r[5] = u * g + d * S + p * _, r[8] = u * f + d * v + p * w, this;
12447
+ const i = t.elements, n = e.elements, r = this.elements, a = i[0], o = i[3], h = i[6], l = i[1], A = i[4], c = i[7], u = i[2], d = i[5], p = i[8], m = n[0], g = n[3], f = n[6], M = n[1], S = n[4], x = n[7], T = n[2], _ = n[5], w = n[8];
12448
+ return r[0] = a * m + o * M + h * T, r[3] = a * g + o * S + h * _, r[6] = a * f + o * x + h * w, r[1] = l * m + A * M + c * T, r[4] = l * g + A * S + c * _, r[7] = l * f + A * x + c * w, r[2] = u * m + d * M + p * T, r[5] = u * g + d * S + p * _, r[8] = u * f + d * x + p * w, this;
12449
12449
  }
12450
12450
  /**
12451
12451
  * Multiplies every component of the matrix by the given scalar.
@@ -12694,7 +12694,7 @@ function gf() {
12694
12694
  return s.style.display = "block", s;
12695
12695
  }
12696
12696
  const yh = {};
12697
- function xs(s) {
12697
+ function vs(s) {
12698
12698
  s in yh || (yh[s] = !0, console.warn(s));
12699
12699
  }
12700
12700
  function pf(s, t, e) {
@@ -12791,10 +12791,10 @@ function mf() {
12791
12791
  },
12792
12792
  // Deprecated
12793
12793
  fromWorkingColorSpace: function(n, r) {
12794
- return xs("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."), s.workingToColorSpace(n, r);
12794
+ return vs("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."), s.workingToColorSpace(n, r);
12795
12795
  },
12796
12796
  toWorkingColorSpace: function(n, r) {
12797
- return xs("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."), s.colorSpaceToWorking(n, r);
12797
+ return vs("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."), s.colorSpaceToWorking(n, r);
12798
12798
  }
12799
12799
  }, t = [0.64, 0.33, 0.3, 0.6, 0.15, 0.06], e = [0.2126, 0.7152, 0.0722], i = [0.3127, 0.329];
12800
12800
  return s.define({
@@ -12945,7 +12945,7 @@ function Wa(s) {
12945
12945
  type: s.data.constructor.name
12946
12946
  } : (console.warn("THREE.Texture: Unable to serialize Texture."), {});
12947
12947
  }
12948
- let vf = 0;
12948
+ let xf = 0;
12949
12949
  const Ya = /* @__PURE__ */ new O();
12950
12950
  class Re extends Gn {
12951
12951
  /**
@@ -12962,8 +12962,8 @@ class Re extends Gn {
12962
12962
  * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
12963
12963
  * @param {string} [colorSpace=NoColorSpace] - The color space.
12964
12964
  */
12965
- constructor(t = Re.DEFAULT_IMAGE, e = Re.DEFAULT_MAPPING, i = Dn, n = Dn, r = vi, a = Ln, o = fi, h = yi, l = Re.DEFAULT_ANISOTROPY, A = rn) {
12966
- super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: vf++ }), this.uuid = rr(), this.name = "", this.source = new Il(t), this.mipmaps = [], this.mapping = e, this.channel = 0, this.wrapS = i, this.wrapT = n, this.magFilter = r, this.minFilter = a, this.anisotropy = l, this.format = o, this.internalFormat = null, this.type = h, this.offset = new Nt(0, 0), this.repeat = new Nt(1, 1), this.center = new Nt(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new Ft(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = A, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(t && t.depth && t.depth > 1), this.pmremVersion = 0;
12965
+ constructor(t = Re.DEFAULT_IMAGE, e = Re.DEFAULT_MAPPING, i = Dn, n = Dn, r = xi, a = Ln, o = fi, h = yi, l = Re.DEFAULT_ANISOTROPY, A = rn) {
12966
+ super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: xf++ }), this.uuid = rr(), this.name = "", this.source = new Il(t), this.mipmaps = [], this.mapping = e, this.channel = 0, this.wrapS = i, this.wrapT = n, this.magFilter = r, this.minFilter = a, this.anisotropy = l, this.format = o, this.internalFormat = null, this.type = h, this.offset = new Nt(0, 0), this.repeat = new Nt(1, 1), this.center = new Nt(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new Ft(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = A, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(t && t.depth && t.depth > 1), this.pmremVersion = 0;
12967
12967
  }
12968
12968
  /**
12969
12969
  * The width of the texture in pixels.
@@ -13457,8 +13457,8 @@ class ue {
13457
13457
  if (Math.abs(A + u) < 0.1 && Math.abs(c + m) < 0.1 && Math.abs(p + g) < 0.1 && Math.abs(l + d + f - 3) < 0.1)
13458
13458
  return this.set(1, 0, 0, 0), this;
13459
13459
  e = Math.PI;
13460
- const S = (l + 1) / 2, v = (d + 1) / 2, T = (f + 1) / 2, _ = (A + u) / 4, w = (c + m) / 4, P = (p + g) / 4;
13461
- return S > v && S > T ? S < 0.01 ? (i = 0, n = 0.707106781, r = 0.707106781) : (i = Math.sqrt(S), n = _ / i, r = w / i) : v > T ? v < 0.01 ? (i = 0.707106781, n = 0, r = 0.707106781) : (n = Math.sqrt(v), i = _ / n, r = P / n) : T < 0.01 ? (i = 0.707106781, n = 0.707106781, r = 0) : (r = Math.sqrt(T), i = w / r, n = P / r), this.set(i, n, r, e), this;
13460
+ const S = (l + 1) / 2, x = (d + 1) / 2, T = (f + 1) / 2, _ = (A + u) / 4, w = (c + m) / 4, P = (p + g) / 4;
13461
+ return S > x && S > T ? S < 0.01 ? (i = 0, n = 0.707106781, r = 0.707106781) : (i = Math.sqrt(S), n = _ / i, r = w / i) : x > T ? x < 0.01 ? (i = 0.707106781, n = 0, r = 0.707106781) : (n = Math.sqrt(x), i = _ / n, r = P / n) : T < 0.01 ? (i = 0.707106781, n = 0.707106781, r = 0) : (r = Math.sqrt(T), i = w / r, n = P / r), this.set(i, n, r, e), this;
13462
13462
  }
13463
13463
  let M = Math.sqrt((g - p) * (g - p) + (c - m) * (c - m) + (u - A) * (u - A));
13464
13464
  return Math.abs(M) < 1e-3 && (M = 1), this.x = (g - p) / M, this.y = (c - m) / M, this.z = (u - A) / M, this.w = Math.acos((l + d + f - 1) / 2), this;
@@ -13708,7 +13708,7 @@ class ue {
13708
13708
  yield this.x, yield this.y, yield this.z, yield this.w;
13709
13709
  }
13710
13710
  }
13711
- class xf extends Gn {
13711
+ class vf extends Gn {
13712
13712
  /**
13713
13713
  * Render target options.
13714
13714
  *
@@ -13744,7 +13744,7 @@ class xf extends Gn {
13744
13744
  super(), i = Object.assign({
13745
13745
  generateMipmaps: !1,
13746
13746
  internalFormat: null,
13747
- minFilter: vi,
13747
+ minFilter: xi,
13748
13748
  depthBuffer: !0,
13749
13749
  stencilBuffer: !1,
13750
13750
  resolveDepthBuffer: !0,
@@ -13764,7 +13764,7 @@ class xf extends Gn {
13764
13764
  }
13765
13765
  _setTextureOptions(t = {}) {
13766
13766
  const e = {
13767
- minFilter: vi,
13767
+ minFilter: xi,
13768
13768
  generateMipmaps: !1,
13769
13769
  flipY: !1,
13770
13770
  internalFormat: null
@@ -13849,7 +13849,7 @@ class xf extends Gn {
13849
13849
  this.dispatchEvent({ type: "dispose" });
13850
13850
  }
13851
13851
  }
13852
- class kn extends xf {
13852
+ class kn extends vf {
13853
13853
  /**
13854
13854
  * Constructs a new 3D render target.
13855
13855
  *
@@ -14325,7 +14325,7 @@ function Xa(s, t, e, i, n) {
14325
14325
  return !0;
14326
14326
  }
14327
14327
  const Sf = /* @__PURE__ */ new Rs(), Gs = /* @__PURE__ */ new O(), Za = /* @__PURE__ */ new O();
14328
- class vl {
14328
+ class xl {
14329
14329
  /**
14330
14330
  * Constructs a new sphere.
14331
14331
  *
@@ -15088,8 +15088,8 @@ class ge {
15088
15088
  * @return {Matrix4} A reference to this matrix.
15089
15089
  */
15090
15090
  multiplyMatrices(t, e) {
15091
- const i = t.elements, n = e.elements, r = this.elements, a = i[0], o = i[4], h = i[8], l = i[12], A = i[1], c = i[5], u = i[9], d = i[13], p = i[2], m = i[6], g = i[10], f = i[14], M = i[3], S = i[7], v = i[11], T = i[15], _ = n[0], w = n[4], P = n[8], E = n[12], x = n[1], b = n[5], z = n[9], F = n[13], U = n[2], W = n[6], Y = n[10], $ = n[14], H = n[3], rt = n[7], ht = n[11], mt = n[15];
15092
- return r[0] = a * _ + o * x + h * U + l * H, r[4] = a * w + o * b + h * W + l * rt, r[8] = a * P + o * z + h * Y + l * ht, r[12] = a * E + o * F + h * $ + l * mt, r[1] = A * _ + c * x + u * U + d * H, r[5] = A * w + c * b + u * W + d * rt, r[9] = A * P + c * z + u * Y + d * ht, r[13] = A * E + c * F + u * $ + d * mt, r[2] = p * _ + m * x + g * U + f * H, r[6] = p * w + m * b + g * W + f * rt, r[10] = p * P + m * z + g * Y + f * ht, r[14] = p * E + m * F + g * $ + f * mt, r[3] = M * _ + S * x + v * U + T * H, r[7] = M * w + S * b + v * W + T * rt, r[11] = M * P + S * z + v * Y + T * ht, r[15] = M * E + S * F + v * $ + T * mt, this;
15091
+ const i = t.elements, n = e.elements, r = this.elements, a = i[0], o = i[4], h = i[8], l = i[12], A = i[1], c = i[5], u = i[9], d = i[13], p = i[2], m = i[6], g = i[10], f = i[14], M = i[3], S = i[7], x = i[11], T = i[15], _ = n[0], w = n[4], P = n[8], E = n[12], v = n[1], b = n[5], z = n[9], F = n[13], U = n[2], W = n[6], Y = n[10], $ = n[14], H = n[3], rt = n[7], ht = n[11], mt = n[15];
15092
+ return r[0] = a * _ + o * v + h * U + l * H, r[4] = a * w + o * b + h * W + l * rt, r[8] = a * P + o * z + h * Y + l * ht, r[12] = a * E + o * F + h * $ + l * mt, r[1] = A * _ + c * v + u * U + d * H, r[5] = A * w + c * b + u * W + d * rt, r[9] = A * P + c * z + u * Y + d * ht, r[13] = A * E + c * F + u * $ + d * mt, r[2] = p * _ + m * v + g * U + f * H, r[6] = p * w + m * b + g * W + f * rt, r[10] = p * P + m * z + g * Y + f * ht, r[14] = p * E + m * F + g * $ + f * mt, r[3] = M * _ + S * v + x * U + T * H, r[7] = M * w + S * b + x * W + T * rt, r[11] = M * P + S * z + x * Y + T * ht, r[15] = M * E + S * F + x * $ + T * mt, this;
15093
15093
  }
15094
15094
  /**
15095
15095
  * Multiplies every component of the matrix by the given scalar.
@@ -15143,10 +15143,10 @@ class ge {
15143
15143
  * @return {Matrix4} A reference to this matrix.
15144
15144
  */
15145
15145
  invert() {
15146
- const t = this.elements, e = t[0], i = t[1], n = t[2], r = t[3], a = t[4], o = t[5], h = t[6], l = t[7], A = t[8], c = t[9], u = t[10], d = t[11], p = t[12], m = t[13], g = t[14], f = t[15], M = c * g * l - m * u * l + m * h * d - o * g * d - c * h * f + o * u * f, S = p * u * l - A * g * l - p * h * d + a * g * d + A * h * f - a * u * f, v = A * m * l - p * c * l + p * o * d - a * m * d - A * o * f + a * c * f, T = p * c * h - A * m * h - p * o * u + a * m * u + A * o * g - a * c * g, _ = e * M + i * S + n * v + r * T;
15146
+ const t = this.elements, e = t[0], i = t[1], n = t[2], r = t[3], a = t[4], o = t[5], h = t[6], l = t[7], A = t[8], c = t[9], u = t[10], d = t[11], p = t[12], m = t[13], g = t[14], f = t[15], M = c * g * l - m * u * l + m * h * d - o * g * d - c * h * f + o * u * f, S = p * u * l - A * g * l - p * h * d + a * g * d + A * h * f - a * u * f, x = A * m * l - p * c * l + p * o * d - a * m * d - A * o * f + a * c * f, T = p * c * h - A * m * h - p * o * u + a * m * u + A * o * g - a * c * g, _ = e * M + i * S + n * x + r * T;
15147
15147
  if (_ === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
15148
15148
  const w = 1 / _;
15149
- return t[0] = M * w, t[1] = (m * u * r - c * g * r - m * n * d + i * g * d + c * n * f - i * u * f) * w, t[2] = (o * g * r - m * h * r + m * n * l - i * g * l - o * n * f + i * h * f) * w, t[3] = (c * h * r - o * u * r - c * n * l + i * u * l + o * n * d - i * h * d) * w, t[4] = S * w, t[5] = (A * g * r - p * u * r + p * n * d - e * g * d - A * n * f + e * u * f) * w, t[6] = (p * h * r - a * g * r - p * n * l + e * g * l + a * n * f - e * h * f) * w, t[7] = (a * u * r - A * h * r + A * n * l - e * u * l - a * n * d + e * h * d) * w, t[8] = v * w, t[9] = (p * c * r - A * m * r - p * i * d + e * m * d + A * i * f - e * c * f) * w, t[10] = (a * m * r - p * o * r + p * i * l - e * m * l - a * i * f + e * o * f) * w, t[11] = (A * o * r - a * c * r - A * i * l + e * c * l + a * i * d - e * o * d) * w, t[12] = T * w, t[13] = (A * m * n - p * c * n + p * i * u - e * m * u - A * i * g + e * c * g) * w, t[14] = (p * o * n - a * m * n - p * i * h + e * m * h + a * i * g - e * o * g) * w, t[15] = (a * c * n - A * o * n + A * i * h - e * c * h - a * i * u + e * o * u) * w, this;
15149
+ return t[0] = M * w, t[1] = (m * u * r - c * g * r - m * n * d + i * g * d + c * n * f - i * u * f) * w, t[2] = (o * g * r - m * h * r + m * n * l - i * g * l - o * n * f + i * h * f) * w, t[3] = (c * h * r - o * u * r - c * n * l + i * u * l + o * n * d - i * h * d) * w, t[4] = S * w, t[5] = (A * g * r - p * u * r + p * n * d - e * g * d - A * n * f + e * u * f) * w, t[6] = (p * h * r - a * g * r - p * n * l + e * g * l + a * n * f - e * h * f) * w, t[7] = (a * u * r - A * h * r + A * n * l - e * u * l - a * n * d + e * h * d) * w, t[8] = x * w, t[9] = (p * c * r - A * m * r - p * i * d + e * m * d + A * i * f - e * c * f) * w, t[10] = (a * m * r - p * o * r + p * i * l - e * m * l - a * i * f + e * o * f) * w, t[11] = (A * o * r - a * c * r - A * i * l + e * c * l + a * i * d - e * o * d) * w, t[12] = T * w, t[13] = (A * m * n - p * c * n + p * i * u - e * m * u - A * i * g + e * c * g) * w, t[14] = (p * o * n - a * m * n - p * i * h + e * m * h + a * i * g - e * o * g) * w, t[15] = (a * c * n - A * o * n + A * i * h - e * c * h - a * i * u + e * o * u) * w, this;
15150
15150
  }
15151
15151
  /**
15152
15152
  * Multiplies the columns of this matrix by the given vector.
@@ -15397,8 +15397,8 @@ class ge {
15397
15397
  * @return {Matrix4} A reference to this matrix.
15398
15398
  */
15399
15399
  compose(t, e, i) {
15400
- const n = this.elements, r = e._x, a = e._y, o = e._z, h = e._w, l = r + r, A = a + a, c = o + o, u = r * l, d = r * A, p = r * c, m = a * A, g = a * c, f = o * c, M = h * l, S = h * A, v = h * c, T = i.x, _ = i.y, w = i.z;
15401
- return n[0] = (1 - (m + f)) * T, n[1] = (d + v) * T, n[2] = (p - S) * T, n[3] = 0, n[4] = (d - v) * _, n[5] = (1 - (u + f)) * _, n[6] = (g + M) * _, n[7] = 0, n[8] = (p + S) * w, n[9] = (g - M) * w, n[10] = (1 - (u + m)) * w, n[11] = 0, n[12] = t.x, n[13] = t.y, n[14] = t.z, n[15] = 1, this;
15400
+ const n = this.elements, r = e._x, a = e._y, o = e._z, h = e._w, l = r + r, A = a + a, c = o + o, u = r * l, d = r * A, p = r * c, m = a * A, g = a * c, f = o * c, M = h * l, S = h * A, x = h * c, T = i.x, _ = i.y, w = i.z;
15401
+ return n[0] = (1 - (m + f)) * T, n[1] = (d + x) * T, n[2] = (p - S) * T, n[3] = 0, n[4] = (d - x) * _, n[5] = (1 - (u + f)) * _, n[6] = (g + M) * _, n[7] = 0, n[8] = (p + S) * w, n[9] = (g - M) * w, n[10] = (1 - (u + m)) * w, n[11] = 0, n[12] = t.x, n[13] = t.y, n[14] = t.z, n[15] = 1, this;
15402
15402
  }
15403
15403
  /**
15404
15404
  * Decomposes this matrix into its position, rotation and scale components
@@ -15435,12 +15435,12 @@ class ge {
15435
15435
  * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
15436
15436
  * @return {Matrix4} A reference to this matrix.
15437
15437
  */
15438
- makePerspective(t, e, i, n, r, a, o = xi, h = !1) {
15438
+ makePerspective(t, e, i, n, r, a, o = vi, h = !1) {
15439
15439
  const l = this.elements, A = 2 * r / (e - t), c = 2 * r / (i - n), u = (e + t) / (e - t), d = (i + n) / (i - n);
15440
15440
  let p, m;
15441
15441
  if (h)
15442
15442
  p = r / (a - r), m = a * r / (a - r);
15443
- else if (o === xi)
15443
+ else if (o === vi)
15444
15444
  p = -(a + r) / (a - r), m = -2 * a * r / (a - r);
15445
15445
  else if (o === la)
15446
15446
  p = -a / (a - r), m = -a * r / (a - r);
@@ -15462,12 +15462,12 @@ class ge {
15462
15462
  * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
15463
15463
  * @return {Matrix4} A reference to this matrix.
15464
15464
  */
15465
- makeOrthographic(t, e, i, n, r, a, o = xi, h = !1) {
15465
+ makeOrthographic(t, e, i, n, r, a, o = vi, h = !1) {
15466
15466
  const l = this.elements, A = 2 / (e - t), c = 2 / (i - n), u = -(e + t) / (e - t), d = -(i + n) / (i - n);
15467
15467
  let p, m;
15468
15468
  if (h)
15469
15469
  p = 1 / (a - r), m = a / (a - r);
15470
- else if (o === xi)
15470
+ else if (o === vi)
15471
15471
  p = -2 / (a - r), m = -(a + r) / (a - r);
15472
15472
  else if (o === la)
15473
15473
  p = -1 / (a - r), m = -r / (a - r);
@@ -17358,7 +17358,7 @@ class ar extends Gn {
17358
17358
  * Constructs a new material.
17359
17359
  */
17360
17360
  constructor() {
17361
- super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: Rf++ }), this.uuid = rr(), this.name = "", this.type = "Material", this.blending = vs, this.side = An, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = So, this.blendDst = yo, this.blendEquation = wn, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Wt(0, 0, 0), this.blendAlpha = 0, this.depthFunc = Ss, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = vh, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = ts, this.stencilZFail = ts, this.stencilZPass = ts, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
17361
+ super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: Rf++ }), this.uuid = rr(), this.name = "", this.type = "Material", this.blending = xs, this.side = An, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = So, this.blendDst = yo, this.blendEquation = wn, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Wt(0, 0, 0), this.blendAlpha = 0, this.depthFunc = Ss, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = xh, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = ts, this.stencilZFail = ts, this.stencilZPass = ts, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
17362
17362
  }
17363
17363
  /**
17364
17364
  * Sets the alpha value to be used when running an alpha test. The material
@@ -17457,7 +17457,7 @@ class ar extends Gn {
17457
17457
  generator: "Material.toJSON"
17458
17458
  }
17459
17459
  };
17460
- i.uuid = this.uuid, i.type = this.type, this.name !== "" && (i.name = this.name), this.color && this.color.isColor && (i.color = this.color.getHex()), this.roughness !== void 0 && (i.roughness = this.roughness), this.metalness !== void 0 && (i.metalness = this.metalness), this.sheen !== void 0 && (i.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (i.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (i.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (i.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (i.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (i.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (i.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (i.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (i.shininess = this.shininess), this.clearcoat !== void 0 && (i.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (i.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (i.clearcoatMap = this.clearcoatMap.toJSON(t).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (i.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(t).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (i.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(t).uuid, i.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.dispersion !== void 0 && (i.dispersion = this.dispersion), this.iridescence !== void 0 && (i.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (i.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (i.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (i.iridescenceMap = this.iridescenceMap.toJSON(t).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (i.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(t).uuid), this.anisotropy !== void 0 && (i.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (i.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (i.anisotropyMap = this.anisotropyMap.toJSON(t).uuid), this.map && this.map.isTexture && (i.map = this.map.toJSON(t).uuid), this.matcap && this.matcap.isTexture && (i.matcap = this.matcap.toJSON(t).uuid), this.alphaMap && this.alphaMap.isTexture && (i.alphaMap = this.alphaMap.toJSON(t).uuid), this.lightMap && this.lightMap.isTexture && (i.lightMap = this.lightMap.toJSON(t).uuid, i.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (i.aoMap = this.aoMap.toJSON(t).uuid, i.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (i.bumpMap = this.bumpMap.toJSON(t).uuid, i.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (i.normalMap = this.normalMap.toJSON(t).uuid, i.normalMapType = this.normalMapType, i.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (i.displacementMap = this.displacementMap.toJSON(t).uuid, i.displacementScale = this.displacementScale, i.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (i.roughnessMap = this.roughnessMap.toJSON(t).uuid), this.metalnessMap && this.metalnessMap.isTexture && (i.metalnessMap = this.metalnessMap.toJSON(t).uuid), this.emissiveMap && this.emissiveMap.isTexture && (i.emissiveMap = this.emissiveMap.toJSON(t).uuid), this.specularMap && this.specularMap.isTexture && (i.specularMap = this.specularMap.toJSON(t).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (i.specularIntensityMap = this.specularIntensityMap.toJSON(t).uuid), this.specularColorMap && this.specularColorMap.isTexture && (i.specularColorMap = this.specularColorMap.toJSON(t).uuid), this.envMap && this.envMap.isTexture && (i.envMap = this.envMap.toJSON(t).uuid, this.combine !== void 0 && (i.combine = this.combine)), this.envMapRotation !== void 0 && (i.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (i.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (i.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (i.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (i.gradientMap = this.gradientMap.toJSON(t).uuid), this.transmission !== void 0 && (i.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (i.transmissionMap = this.transmissionMap.toJSON(t).uuid), this.thickness !== void 0 && (i.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (i.thicknessMap = this.thicknessMap.toJSON(t).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (i.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (i.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (i.size = this.size), this.shadowSide !== null && (i.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (i.sizeAttenuation = this.sizeAttenuation), this.blending !== vs && (i.blending = this.blending), this.side !== An && (i.side = this.side), this.vertexColors === !0 && (i.vertexColors = !0), this.opacity < 1 && (i.opacity = this.opacity), this.transparent === !0 && (i.transparent = !0), this.blendSrc !== So && (i.blendSrc = this.blendSrc), this.blendDst !== yo && (i.blendDst = this.blendDst), this.blendEquation !== wn && (i.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (i.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (i.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (i.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (i.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (i.blendAlpha = this.blendAlpha), this.depthFunc !== Ss && (i.depthFunc = this.depthFunc), this.depthTest === !1 && (i.depthTest = this.depthTest), this.depthWrite === !1 && (i.depthWrite = this.depthWrite), this.colorWrite === !1 && (i.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (i.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== vh && (i.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (i.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (i.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== ts && (i.stencilFail = this.stencilFail), this.stencilZFail !== ts && (i.stencilZFail = this.stencilZFail), this.stencilZPass !== ts && (i.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (i.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (i.rotation = this.rotation), this.polygonOffset === !0 && (i.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (i.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (i.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (i.linewidth = this.linewidth), this.dashSize !== void 0 && (i.dashSize = this.dashSize), this.gapSize !== void 0 && (i.gapSize = this.gapSize), this.scale !== void 0 && (i.scale = this.scale), this.dithering === !0 && (i.dithering = !0), this.alphaTest > 0 && (i.alphaTest = this.alphaTest), this.alphaHash === !0 && (i.alphaHash = !0), this.alphaToCoverage === !0 && (i.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (i.premultipliedAlpha = !0), this.forceSinglePass === !0 && (i.forceSinglePass = !0), this.wireframe === !0 && (i.wireframe = !0), this.wireframeLinewidth > 1 && (i.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (i.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (i.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (i.flatShading = !0), this.visible === !1 && (i.visible = !1), this.toneMapped === !1 && (i.toneMapped = !1), this.fog === !1 && (i.fog = !1), Object.keys(this.userData).length > 0 && (i.userData = this.userData);
17460
+ i.uuid = this.uuid, i.type = this.type, this.name !== "" && (i.name = this.name), this.color && this.color.isColor && (i.color = this.color.getHex()), this.roughness !== void 0 && (i.roughness = this.roughness), this.metalness !== void 0 && (i.metalness = this.metalness), this.sheen !== void 0 && (i.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (i.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (i.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (i.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (i.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (i.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (i.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (i.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (i.shininess = this.shininess), this.clearcoat !== void 0 && (i.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (i.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (i.clearcoatMap = this.clearcoatMap.toJSON(t).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (i.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(t).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (i.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(t).uuid, i.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.dispersion !== void 0 && (i.dispersion = this.dispersion), this.iridescence !== void 0 && (i.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (i.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (i.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (i.iridescenceMap = this.iridescenceMap.toJSON(t).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (i.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(t).uuid), this.anisotropy !== void 0 && (i.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (i.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (i.anisotropyMap = this.anisotropyMap.toJSON(t).uuid), this.map && this.map.isTexture && (i.map = this.map.toJSON(t).uuid), this.matcap && this.matcap.isTexture && (i.matcap = this.matcap.toJSON(t).uuid), this.alphaMap && this.alphaMap.isTexture && (i.alphaMap = this.alphaMap.toJSON(t).uuid), this.lightMap && this.lightMap.isTexture && (i.lightMap = this.lightMap.toJSON(t).uuid, i.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (i.aoMap = this.aoMap.toJSON(t).uuid, i.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (i.bumpMap = this.bumpMap.toJSON(t).uuid, i.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (i.normalMap = this.normalMap.toJSON(t).uuid, i.normalMapType = this.normalMapType, i.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (i.displacementMap = this.displacementMap.toJSON(t).uuid, i.displacementScale = this.displacementScale, i.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (i.roughnessMap = this.roughnessMap.toJSON(t).uuid), this.metalnessMap && this.metalnessMap.isTexture && (i.metalnessMap = this.metalnessMap.toJSON(t).uuid), this.emissiveMap && this.emissiveMap.isTexture && (i.emissiveMap = this.emissiveMap.toJSON(t).uuid), this.specularMap && this.specularMap.isTexture && (i.specularMap = this.specularMap.toJSON(t).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (i.specularIntensityMap = this.specularIntensityMap.toJSON(t).uuid), this.specularColorMap && this.specularColorMap.isTexture && (i.specularColorMap = this.specularColorMap.toJSON(t).uuid), this.envMap && this.envMap.isTexture && (i.envMap = this.envMap.toJSON(t).uuid, this.combine !== void 0 && (i.combine = this.combine)), this.envMapRotation !== void 0 && (i.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (i.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (i.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (i.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (i.gradientMap = this.gradientMap.toJSON(t).uuid), this.transmission !== void 0 && (i.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (i.transmissionMap = this.transmissionMap.toJSON(t).uuid), this.thickness !== void 0 && (i.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (i.thicknessMap = this.thicknessMap.toJSON(t).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (i.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (i.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (i.size = this.size), this.shadowSide !== null && (i.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (i.sizeAttenuation = this.sizeAttenuation), this.blending !== xs && (i.blending = this.blending), this.side !== An && (i.side = this.side), this.vertexColors === !0 && (i.vertexColors = !0), this.opacity < 1 && (i.opacity = this.opacity), this.transparent === !0 && (i.transparent = !0), this.blendSrc !== So && (i.blendSrc = this.blendSrc), this.blendDst !== yo && (i.blendDst = this.blendDst), this.blendEquation !== wn && (i.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (i.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (i.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (i.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (i.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (i.blendAlpha = this.blendAlpha), this.depthFunc !== Ss && (i.depthFunc = this.depthFunc), this.depthTest === !1 && (i.depthTest = this.depthTest), this.depthWrite === !1 && (i.depthWrite = this.depthWrite), this.colorWrite === !1 && (i.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (i.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== xh && (i.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (i.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (i.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== ts && (i.stencilFail = this.stencilFail), this.stencilZFail !== ts && (i.stencilZFail = this.stencilZFail), this.stencilZPass !== ts && (i.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (i.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (i.rotation = this.rotation), this.polygonOffset === !0 && (i.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (i.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (i.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (i.linewidth = this.linewidth), this.dashSize !== void 0 && (i.dashSize = this.dashSize), this.gapSize !== void 0 && (i.gapSize = this.gapSize), this.scale !== void 0 && (i.scale = this.scale), this.dithering === !0 && (i.dithering = !0), this.alphaTest > 0 && (i.alphaTest = this.alphaTest), this.alphaHash === !0 && (i.alphaHash = !0), this.alphaToCoverage === !0 && (i.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (i.premultipliedAlpha = !0), this.forceSinglePass === !0 && (i.forceSinglePass = !0), this.wireframe === !0 && (i.wireframe = !0), this.wireframeLinewidth > 1 && (i.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (i.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (i.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (i.flatShading = !0), this.visible === !1 && (i.visible = !1), this.toneMapped === !1 && (i.toneMapped = !1), this.fog === !1 && (i.fog = !1), Object.keys(this.userData).length > 0 && (i.userData = this.userData);
17461
17461
  function n(r) {
17462
17462
  const a = [];
17463
17463
  for (const o in r) {
@@ -17519,7 +17519,7 @@ class ar extends Gn {
17519
17519
  t === !0 && this.version++;
17520
17520
  }
17521
17521
  }
17522
- class xl extends ar {
17522
+ class vl extends ar {
17523
17523
  /**
17524
17524
  * Constructs a new mesh basic material.
17525
17525
  *
@@ -17549,7 +17549,7 @@ class Si {
17549
17549
  constructor(t, e, i = !1) {
17550
17550
  if (Array.isArray(t))
17551
17551
  throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");
17552
- this.isBufferAttribute = !0, Object.defineProperty(this, "id", { value: Pf++ }), this.name = "", this.array = t, this.itemSize = e, this.count = t !== void 0 ? t.length / e : 0, this.normalized = i, this.usage = xh, this.updateRanges = [], this.gpuType = ki, this.version = 0;
17552
+ this.isBufferAttribute = !0, Object.defineProperty(this, "id", { value: Pf++ }), this.name = "", this.array = t, this.itemSize = e, this.count = t !== void 0 ? t.length / e : 0, this.normalized = i, this.usage = vh, this.updateRanges = [], this.gpuType = ki, this.version = 0;
17553
17553
  }
17554
17554
  /**
17555
17555
  * A callback function that is executed after the renderer has transferred the attribute
@@ -17857,7 +17857,7 @@ class Si {
17857
17857
  array: Array.from(this.array),
17858
17858
  normalized: this.normalized
17859
17859
  };
17860
- return this.name !== "" && (t.name = this.name), this.usage !== xh && (t.usage = this.usage), t;
17860
+ return this.name !== "" && (t.name = this.name), this.usage !== vh && (t.usage = this.usage), t;
17861
17861
  }
17862
17862
  }
17863
17863
  class tc extends Si {
@@ -18173,7 +18173,7 @@ class Hn extends Gn {
18173
18173
  * You may need to recompute the bounding sphere if the geometry vertices are modified.
18174
18174
  */
18175
18175
  computeBoundingSphere() {
18176
- this.boundingSphere === null && (this.boundingSphere = new vl());
18176
+ this.boundingSphere === null && (this.boundingSphere = new xl());
18177
18177
  const t = this.attributes.position, e = this.morphAttributes.position;
18178
18178
  if (t && t.isGLBufferAttribute) {
18179
18179
  console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.", this), this.boundingSphere.set(new O(), 1 / 0);
@@ -18218,10 +18218,10 @@ class Hn extends Gn {
18218
18218
  for (let P = 0; P < i.count; P++)
18219
18219
  o[P] = new O(), h[P] = new O();
18220
18220
  const l = new O(), A = new O(), c = new O(), u = new Nt(), d = new Nt(), p = new Nt(), m = new O(), g = new O();
18221
- function f(P, E, x) {
18222
- l.fromBufferAttribute(i, P), A.fromBufferAttribute(i, E), c.fromBufferAttribute(i, x), u.fromBufferAttribute(r, P), d.fromBufferAttribute(r, E), p.fromBufferAttribute(r, x), A.sub(l), c.sub(l), d.sub(u), p.sub(u);
18221
+ function f(P, E, v) {
18222
+ l.fromBufferAttribute(i, P), A.fromBufferAttribute(i, E), c.fromBufferAttribute(i, v), u.fromBufferAttribute(r, P), d.fromBufferAttribute(r, E), p.fromBufferAttribute(r, v), A.sub(l), c.sub(l), d.sub(u), p.sub(u);
18223
18223
  const b = 1 / (d.x * p.y - p.x * d.y);
18224
- isFinite(b) && (m.copy(A).multiplyScalar(p.y).addScaledVector(c, -d.y).multiplyScalar(b), g.copy(c).multiplyScalar(d.x).addScaledVector(A, -p.x).multiplyScalar(b), o[P].add(m), o[E].add(m), o[x].add(m), h[P].add(g), h[E].add(g), h[x].add(g));
18224
+ isFinite(b) && (m.copy(A).multiplyScalar(p.y).addScaledVector(c, -d.y).multiplyScalar(b), g.copy(c).multiplyScalar(d.x).addScaledVector(A, -p.x).multiplyScalar(b), o[P].add(m), o[E].add(m), o[v].add(m), h[P].add(g), h[E].add(g), h[v].add(g));
18225
18225
  }
18226
18226
  let M = this.groups;
18227
18227
  M.length === 0 && (M = [{
@@ -18229,7 +18229,7 @@ class Hn extends Gn {
18229
18229
  count: t.count
18230
18230
  }]);
18231
18231
  for (let P = 0, E = M.length; P < E; ++P) {
18232
- const x = M[P], b = x.start, z = x.count;
18232
+ const v = M[P], b = v.start, z = v.count;
18233
18233
  for (let F = b, U = b + z; F < U; F += 3)
18234
18234
  f(
18235
18235
  t.getX(F + 0),
@@ -18237,16 +18237,16 @@ class Hn extends Gn {
18237
18237
  t.getX(F + 2)
18238
18238
  );
18239
18239
  }
18240
- const S = new O(), v = new O(), T = new O(), _ = new O();
18240
+ const S = new O(), x = new O(), T = new O(), _ = new O();
18241
18241
  function w(P) {
18242
18242
  T.fromBufferAttribute(n, P), _.copy(T);
18243
18243
  const E = o[P];
18244
- S.copy(E), S.sub(T.multiplyScalar(T.dot(E))).normalize(), v.crossVectors(_, E);
18245
- const b = v.dot(h[P]) < 0 ? -1 : 1;
18244
+ S.copy(E), S.sub(T.multiplyScalar(T.dot(E))).normalize(), x.crossVectors(_, E);
18245
+ const b = x.dot(h[P]) < 0 ? -1 : 1;
18246
18246
  a.setXYZW(P, S.x, S.y, S.z, b);
18247
18247
  }
18248
18248
  for (let P = 0, E = M.length; P < E; ++P) {
18249
- const x = M[P], b = x.start, z = x.count;
18249
+ const v = M[P], b = v.start, z = v.count;
18250
18250
  for (let F = b, U = b + z; F < U; F += 3)
18251
18251
  w(t.getX(F + 0)), w(t.getX(F + 1)), w(t.getX(F + 2));
18252
18252
  }
@@ -18427,7 +18427,7 @@ class Hn extends Gn {
18427
18427
  this.dispatchEvent({ type: "dispose" });
18428
18428
  }
18429
18429
  }
18430
- const Oh = /* @__PURE__ */ new ge(), vn = /* @__PURE__ */ new qA(), zr = /* @__PURE__ */ new vl(), Fh = /* @__PURE__ */ new O(), kr = /* @__PURE__ */ new O(), Gr = /* @__PURE__ */ new O(), Hr = /* @__PURE__ */ new O(), oo = /* @__PURE__ */ new O(), Vr = /* @__PURE__ */ new O(), Bh = /* @__PURE__ */ new O(), Wr = /* @__PURE__ */ new O();
18430
+ const Oh = /* @__PURE__ */ new ge(), xn = /* @__PURE__ */ new qA(), zr = /* @__PURE__ */ new xl(), Fh = /* @__PURE__ */ new O(), kr = /* @__PURE__ */ new O(), Gr = /* @__PURE__ */ new O(), Hr = /* @__PURE__ */ new O(), oo = /* @__PURE__ */ new O(), Vr = /* @__PURE__ */ new O(), Bh = /* @__PURE__ */ new O(), Wr = /* @__PURE__ */ new O();
18431
18431
  class gi extends ye {
18432
18432
  /**
18433
18433
  * Constructs a new mesh.
@@ -18435,7 +18435,7 @@ class gi extends ye {
18435
18435
  * @param {BufferGeometry} [geometry] - The mesh geometry.
18436
18436
  * @param {Material|Array<Material>} [material] - The mesh material.
18437
18437
  */
18438
- constructor(t = new Hn(), e = new xl()) {
18438
+ constructor(t = new Hn(), e = new vl()) {
18439
18439
  super(), this.isMesh = !0, this.type = "Mesh", this.geometry = t, this.material = e, this.morphTargetDictionary = void 0, this.morphTargetInfluences = void 0, this.count = 1, this.updateMorphTargets();
18440
18440
  }
18441
18441
  copy(t, e) {
@@ -18488,7 +18488,7 @@ class gi extends ye {
18488
18488
  */
18489
18489
  raycast(t, e) {
18490
18490
  const i = this.geometry, n = this.material, r = this.matrixWorld;
18491
- n !== void 0 && (i.boundingSphere === null && i.computeBoundingSphere(), zr.copy(i.boundingSphere), zr.applyMatrix4(r), vn.copy(t.ray).recast(t.near), !(zr.containsPoint(vn.origin) === !1 && (vn.intersectSphere(zr, Fh) === null || vn.origin.distanceToSquared(Fh) > (t.far - t.near) ** 2)) && (Oh.copy(r).invert(), vn.copy(t.ray).applyMatrix4(Oh), !(i.boundingBox !== null && vn.intersectsBox(i.boundingBox) === !1) && this._computeIntersections(t, e, vn)));
18491
+ n !== void 0 && (i.boundingSphere === null && i.computeBoundingSphere(), zr.copy(i.boundingSphere), zr.applyMatrix4(r), xn.copy(t.ray).recast(t.near), !(zr.containsPoint(xn.origin) === !1 && (xn.intersectSphere(zr, Fh) === null || xn.origin.distanceToSquared(Fh) > (t.far - t.near) ** 2)) && (Oh.copy(r).invert(), xn.copy(t.ray).applyMatrix4(Oh), !(i.boundingBox !== null && xn.intersectsBox(i.boundingBox) === !1) && this._computeIntersections(t, e, xn)));
18492
18492
  }
18493
18493
  _computeIntersections(t, e, i) {
18494
18494
  let n;
@@ -18497,32 +18497,32 @@ class gi extends ye {
18497
18497
  if (Array.isArray(a))
18498
18498
  for (let p = 0, m = u.length; p < m; p++) {
18499
18499
  const g = u[p], f = a[g.materialIndex], M = Math.max(g.start, d.start), S = Math.min(o.count, Math.min(g.start + g.count, d.start + d.count));
18500
- for (let v = M, T = S; v < T; v += 3) {
18501
- const _ = o.getX(v), w = o.getX(v + 1), P = o.getX(v + 2);
18502
- n = Yr(this, f, t, i, l, A, c, _, w, P), n && (n.faceIndex = Math.floor(v / 3), n.face.materialIndex = g.materialIndex, e.push(n));
18500
+ for (let x = M, T = S; x < T; x += 3) {
18501
+ const _ = o.getX(x), w = o.getX(x + 1), P = o.getX(x + 2);
18502
+ n = Yr(this, f, t, i, l, A, c, _, w, P), n && (n.faceIndex = Math.floor(x / 3), n.face.materialIndex = g.materialIndex, e.push(n));
18503
18503
  }
18504
18504
  }
18505
18505
  else {
18506
18506
  const p = Math.max(0, d.start), m = Math.min(o.count, d.start + d.count);
18507
18507
  for (let g = p, f = m; g < f; g += 3) {
18508
- const M = o.getX(g), S = o.getX(g + 1), v = o.getX(g + 2);
18509
- n = Yr(this, a, t, i, l, A, c, M, S, v), n && (n.faceIndex = Math.floor(g / 3), e.push(n));
18508
+ const M = o.getX(g), S = o.getX(g + 1), x = o.getX(g + 2);
18509
+ n = Yr(this, a, t, i, l, A, c, M, S, x), n && (n.faceIndex = Math.floor(g / 3), e.push(n));
18510
18510
  }
18511
18511
  }
18512
18512
  else if (h !== void 0)
18513
18513
  if (Array.isArray(a))
18514
18514
  for (let p = 0, m = u.length; p < m; p++) {
18515
18515
  const g = u[p], f = a[g.materialIndex], M = Math.max(g.start, d.start), S = Math.min(h.count, Math.min(g.start + g.count, d.start + d.count));
18516
- for (let v = M, T = S; v < T; v += 3) {
18517
- const _ = v, w = v + 1, P = v + 2;
18518
- n = Yr(this, f, t, i, l, A, c, _, w, P), n && (n.faceIndex = Math.floor(v / 3), n.face.materialIndex = g.materialIndex, e.push(n));
18516
+ for (let x = M, T = S; x < T; x += 3) {
18517
+ const _ = x, w = x + 1, P = x + 2;
18518
+ n = Yr(this, f, t, i, l, A, c, _, w, P), n && (n.faceIndex = Math.floor(x / 3), n.face.materialIndex = g.materialIndex, e.push(n));
18519
18519
  }
18520
18520
  }
18521
18521
  else {
18522
18522
  const p = Math.max(0, d.start), m = Math.min(h.count, d.start + d.count);
18523
18523
  for (let g = p, f = m; g < f; g += 3) {
18524
- const M = g, S = g + 1, v = g + 2;
18525
- n = Yr(this, a, t, i, l, A, c, M, S, v), n && (n.faceIndex = Math.floor(g / 3), e.push(n));
18524
+ const M = g, S = g + 1, x = g + 2;
18525
+ n = Yr(this, a, t, i, l, A, c, M, S, x), n && (n.faceIndex = Math.floor(g / 3), e.push(n));
18526
18526
  }
18527
18527
  }
18528
18528
  }
@@ -18580,14 +18580,14 @@ class Ps extends Hn {
18580
18580
  const h = [], l = [], A = [], c = [];
18581
18581
  let u = 0, d = 0;
18582
18582
  p("z", "y", "x", -1, -1, i, e, t, a, r, 0), p("z", "y", "x", 1, -1, i, e, -t, a, r, 1), p("x", "z", "y", 1, 1, t, i, e, n, a, 2), p("x", "z", "y", 1, -1, t, i, -e, n, a, 3), p("x", "y", "z", 1, -1, t, e, i, n, r, 4), p("x", "y", "z", -1, -1, t, e, -i, n, r, 5), this.setIndex(h), this.setAttribute("position", new Fn(l, 3)), this.setAttribute("normal", new Fn(A, 3)), this.setAttribute("uv", new Fn(c, 2));
18583
- function p(m, g, f, M, S, v, T, _, w, P, E) {
18584
- const x = v / w, b = T / P, z = v / 2, F = T / 2, U = _ / 2, W = w + 1, Y = P + 1;
18583
+ function p(m, g, f, M, S, x, T, _, w, P, E) {
18584
+ const v = x / w, b = T / P, z = x / 2, F = T / 2, U = _ / 2, W = w + 1, Y = P + 1;
18585
18585
  let $ = 0, H = 0;
18586
18586
  const rt = new O();
18587
18587
  for (let ht = 0; ht < Y; ht++) {
18588
18588
  const mt = ht * b - F;
18589
18589
  for (let Ut = 0; Ut < W; Ut++) {
18590
- const re = Ut * x - z;
18590
+ const re = Ut * v - z;
18591
18591
  rt[m] = re * M, rt[g] = mt * S, rt[f] = U, l.push(rt.x, rt.y, rt.z), rt[m] = 0, rt[g] = 0, rt[f] = _ > 0 ? 1 : -1, A.push(rt.x, rt.y, rt.z), c.push(Ut / w), c.push(1 - ht / P), $ += 1;
18592
18592
  }
18593
18593
  }
@@ -18716,7 +18716,7 @@ class nc extends ye {
18716
18716
  * Constructs a new camera.
18717
18717
  */
18718
18718
  constructor() {
18719
- super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new ge(), this.projectionMatrix = new ge(), this.projectionMatrixInverse = new ge(), this.coordinateSystem = xi, this._reversedDepth = !1;
18719
+ super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new ge(), this.projectionMatrix = new ge(), this.projectionMatrixInverse = new ge(), this.coordinateSystem = vi, this._reversedDepth = !1;
18720
18720
  }
18721
18721
  /**
18722
18722
  * The flag that indicates whether the camera uses a reversed depth buffer.
@@ -18949,7 +18949,7 @@ class Uf extends ye {
18949
18949
  updateCoordinateSystem() {
18950
18950
  const t = this.coordinateSystem, e = this.children.concat(), [i, n, r, a, o, h] = e;
18951
18951
  for (const l of e) this.remove(l);
18952
- if (t === xi)
18952
+ if (t === vi)
18953
18953
  i.up.set(0, 1, 0), i.lookAt(1, 0, 0), n.up.set(0, 1, 0), n.lookAt(-1, 0, 0), r.up.set(0, 0, -1), r.lookAt(0, 1, 0), a.up.set(0, 0, 1), a.lookAt(0, -1, 0), o.up.set(0, 1, 0), o.lookAt(0, 0, 1), h.up.set(0, 1, 0), h.lookAt(0, 0, -1);
18954
18954
  else if (t === la)
18955
18955
  i.up.set(0, -1, 0), i.lookAt(-1, 0, 0), n.up.set(0, -1, 0), n.lookAt(1, 0, 0), r.up.set(0, 0, 1), r.lookAt(0, 1, 0), a.up.set(0, 0, -1), a.lookAt(0, -1, 0), o.up.set(0, -1, 0), o.lookAt(0, 0, 1), h.up.set(0, -1, 0), h.lookAt(0, 0, -1);
@@ -19083,7 +19083,7 @@ class zf extends kn {
19083
19083
  });
19084
19084
  r.uniforms.tEquirect.value = e;
19085
19085
  const a = new gi(n, r), o = e.minFilter;
19086
- return e.minFilter === Ln && (e.minFilter = vi), new Uf(1, 10, this).update(t, a), e.minFilter = o, a.geometry.dispose(), a.material.dispose(), this;
19086
+ return e.minFilter === Ln && (e.minFilter = xi), new Uf(1, 10, this).update(t, a), e.minFilter = o, a.geometry.dispose(), a.material.dispose(), this;
19087
19087
  }
19088
19088
  /**
19089
19089
  * Clears this cube render target.
@@ -19484,7 +19484,7 @@ class nn {
19484
19484
  return new this.constructor().copy(this);
19485
19485
  }
19486
19486
  }
19487
- const xn = /* @__PURE__ */ new vl(), Vf = /* @__PURE__ */ new Nt(0.5, 0.5), Xr = /* @__PURE__ */ new O();
19487
+ const vn = /* @__PURE__ */ new xl(), Vf = /* @__PURE__ */ new Nt(0.5, 0.5), Xr = /* @__PURE__ */ new O();
19488
19488
  class Sl {
19489
19489
  /**
19490
19490
  * Constructs a new frustum.
@@ -19534,14 +19534,14 @@ class Sl {
19534
19534
  * @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
19535
19535
  * @return {Frustum} A reference to this frustum.
19536
19536
  */
19537
- setFromProjectionMatrix(t, e = xi, i = !1) {
19538
- const n = this.planes, r = t.elements, a = r[0], o = r[1], h = r[2], l = r[3], A = r[4], c = r[5], u = r[6], d = r[7], p = r[8], m = r[9], g = r[10], f = r[11], M = r[12], S = r[13], v = r[14], T = r[15];
19537
+ setFromProjectionMatrix(t, e = vi, i = !1) {
19538
+ const n = this.planes, r = t.elements, a = r[0], o = r[1], h = r[2], l = r[3], A = r[4], c = r[5], u = r[6], d = r[7], p = r[8], m = r[9], g = r[10], f = r[11], M = r[12], S = r[13], x = r[14], T = r[15];
19539
19539
  if (n[0].setComponents(l - a, d - A, f - p, T - M).normalize(), n[1].setComponents(l + a, d + A, f + p, T + M).normalize(), n[2].setComponents(l + o, d + c, f + m, T + S).normalize(), n[3].setComponents(l - o, d - c, f - m, T - S).normalize(), i)
19540
- n[4].setComponents(h, u, g, v).normalize(), n[5].setComponents(l - h, d - u, f - g, T - v).normalize();
19541
- else if (n[4].setComponents(l - h, d - u, f - g, T - v).normalize(), e === xi)
19542
- n[5].setComponents(l + h, d + u, f + g, T + v).normalize();
19540
+ n[4].setComponents(h, u, g, x).normalize(), n[5].setComponents(l - h, d - u, f - g, T - x).normalize();
19541
+ else if (n[4].setComponents(l - h, d - u, f - g, T - x).normalize(), e === vi)
19542
+ n[5].setComponents(l + h, d + u, f + g, T + x).normalize();
19543
19543
  else if (e === la)
19544
- n[5].setComponents(h, u, g, v).normalize();
19544
+ n[5].setComponents(h, u, g, x).normalize();
19545
19545
  else
19546
19546
  throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: " + e);
19547
19547
  return this;
@@ -19556,12 +19556,12 @@ class Sl {
19556
19556
  */
19557
19557
  intersectsObject(t) {
19558
19558
  if (t.boundingSphere !== void 0)
19559
- t.boundingSphere === null && t.computeBoundingSphere(), xn.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);
19559
+ t.boundingSphere === null && t.computeBoundingSphere(), vn.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);
19560
19560
  else {
19561
19561
  const e = t.geometry;
19562
- e.boundingSphere === null && e.computeBoundingSphere(), xn.copy(e.boundingSphere).applyMatrix4(t.matrixWorld);
19562
+ e.boundingSphere === null && e.computeBoundingSphere(), vn.copy(e.boundingSphere).applyMatrix4(t.matrixWorld);
19563
19563
  }
19564
- return this.intersectsSphere(xn);
19564
+ return this.intersectsSphere(vn);
19565
19565
  }
19566
19566
  /**
19567
19567
  * Returns `true` if the given sprite is intersecting this frustum.
@@ -19570,9 +19570,9 @@ class Sl {
19570
19570
  * @return {boolean} Whether the sprite is intersecting this frustum or not.
19571
19571
  */
19572
19572
  intersectsSprite(t) {
19573
- xn.center.set(0, 0, 0);
19573
+ vn.center.set(0, 0, 0);
19574
19574
  const e = Vf.distanceTo(t.center);
19575
- return xn.radius = 0.7071067811865476 + e, xn.applyMatrix4(t.matrixWorld), this.intersectsSphere(xn);
19575
+ return vn.radius = 0.7071067811865476 + e, vn.applyMatrix4(t.matrixWorld), this.intersectsSphere(vn);
19576
19576
  }
19577
19577
  /**
19578
19578
  * Returns `true` if the given bounding sphere is intersecting this frustum.
@@ -19692,14 +19692,14 @@ class or extends Hn {
19692
19692
  for (let f = 0; f < A; f++) {
19693
19693
  const M = f * u - a;
19694
19694
  for (let S = 0; S < l; S++) {
19695
- const v = S * c - r;
19696
- p.push(v, -M, 0), m.push(0, 0, 1), g.push(S / o), g.push(1 - f / h);
19695
+ const x = S * c - r;
19696
+ p.push(x, -M, 0), m.push(0, 0, 1), g.push(S / o), g.push(1 - f / h);
19697
19697
  }
19698
19698
  }
19699
19699
  for (let f = 0; f < h; f++)
19700
19700
  for (let M = 0; M < o; M++) {
19701
- const S = M + l * f, v = M + l * (f + 1), T = M + 1 + l * (f + 1), _ = M + 1 + l * f;
19702
- d.push(S, v, _), d.push(v, T, _);
19701
+ const S = M + l * f, x = M + l * (f + 1), T = M + 1 + l * (f + 1), _ = M + 1 + l * f;
19702
+ d.push(S, x, _), d.push(x, T, _);
19703
19703
  }
19704
19704
  this.setIndex(d), this.setAttribute("position", new Fn(p, 3)), this.setAttribute("normal", new Fn(m, 3)), this.setAttribute("uv", new Fn(g, 2));
19705
19705
  }
@@ -21003,10 +21003,10 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve
21003
21003
  if ( clipped ) discard;
21004
21004
  #endif
21005
21005
  #endif
21006
- #endif`, vg = `#if NUM_CLIPPING_PLANES > 0
21006
+ #endif`, xg = `#if NUM_CLIPPING_PLANES > 0
21007
21007
  varying vec3 vClipPosition;
21008
21008
  uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
21009
- #endif`, xg = `#if NUM_CLIPPING_PLANES > 0
21009
+ #endif`, vg = `#if NUM_CLIPPING_PLANES > 0
21010
21010
  varying vec3 vClipPosition;
21011
21011
  #endif`, Eg = `#if NUM_CLIPPING_PLANES > 0
21012
21012
  vClipPosition = - mvPosition.xyz;
@@ -22176,12 +22176,12 @@ IncidentLight directLight;
22176
22176
  ivec3 morphUV = ivec3( x, y, morphTargetIndex );
22177
22177
  return texelFetch( morphTargetsTexture, morphUV, 0 );
22178
22178
  }
22179
- #endif`, vp = `#ifdef USE_MORPHTARGETS
22179
+ #endif`, xp = `#ifdef USE_MORPHTARGETS
22180
22180
  transformed *= morphTargetBaseInfluence;
22181
22181
  for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
22182
22182
  if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
22183
22183
  }
22184
- #endif`, xp = `float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
22184
+ #endif`, vp = `float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
22185
22185
  #ifdef FLAT_SHADED
22186
22186
  vec3 fdx = dFdx( vViewPosition );
22187
22187
  vec3 fdy = dFdy( vViewPosition );
@@ -23599,7 +23599,7 @@ void main() {
23599
23599
  #include <envmap_vertex>
23600
23600
  #include <shadowmap_vertex>
23601
23601
  #include <fog_vertex>
23602
- }`, vm = `#define LAMBERT
23602
+ }`, xm = `#define LAMBERT
23603
23603
  uniform vec3 diffuse;
23604
23604
  uniform vec3 emissive;
23605
23605
  uniform float opacity;
@@ -23656,7 +23656,7 @@ void main() {
23656
23656
  #include <fog_fragment>
23657
23657
  #include <premultiplied_alpha_fragment>
23658
23658
  #include <dithering_fragment>
23659
- }`, xm = `#define MATCAP
23659
+ }`, vm = `#define MATCAP
23660
23660
  varying vec3 vViewPosition;
23661
23661
  #include <common>
23662
23662
  #include <batching_pars_vertex>
@@ -24308,8 +24308,8 @@ void main() {
24308
24308
  iridescence_fragment: mg,
24309
24309
  bumpmap_pars_fragment: Cg,
24310
24310
  clipping_planes_fragment: Ig,
24311
- clipping_planes_pars_fragment: vg,
24312
- clipping_planes_pars_vertex: xg,
24311
+ clipping_planes_pars_fragment: xg,
24312
+ clipping_planes_pars_vertex: vg,
24313
24313
  clipping_planes_vertex: Eg,
24314
24314
  color_fragment: Sg,
24315
24315
  color_pars_fragment: yg,
@@ -24362,8 +24362,8 @@ void main() {
24362
24362
  morphcolor_vertex: mp,
24363
24363
  morphnormal_vertex: Cp,
24364
24364
  morphtarget_pars_vertex: Ip,
24365
- morphtarget_vertex: vp,
24366
- normal_fragment_begin: xp,
24365
+ morphtarget_vertex: xp,
24366
+ normal_fragment_begin: vp,
24367
24367
  normal_fragment_maps: Ep,
24368
24368
  normal_pars_fragment: Sp,
24369
24369
  normal_pars_vertex: yp,
@@ -24416,8 +24416,8 @@ void main() {
24416
24416
  meshbasic_vert: mm,
24417
24417
  meshbasic_frag: Cm,
24418
24418
  meshlambert_vert: Im,
24419
- meshlambert_frag: vm,
24420
- meshmatcap_vert: xm,
24419
+ meshlambert_frag: xm,
24420
+ meshmatcap_vert: vm,
24421
24421
  meshmatcap_frag: Em,
24422
24422
  meshnormal_vert: Sm,
24423
24423
  meshnormal_frag: ym,
@@ -24876,18 +24876,18 @@ function Um(s, t, e, i, n, r, a) {
24876
24876
  const o = new Wt(0);
24877
24877
  let h = r === !0 ? 0 : 1, l, A, c = null, u = 0, d = null;
24878
24878
  function p(S) {
24879
- let v = S.isScene === !0 ? S.background : null;
24880
- return v && v.isTexture && (v = (S.backgroundBlurriness > 0 ? e : t).get(v)), v;
24879
+ let x = S.isScene === !0 ? S.background : null;
24880
+ return x && x.isTexture && (x = (S.backgroundBlurriness > 0 ? e : t).get(x)), x;
24881
24881
  }
24882
24882
  function m(S) {
24883
- let v = !1;
24883
+ let x = !1;
24884
24884
  const T = p(S);
24885
- T === null ? f(o, h) : T && T.isColor && (f(T, 1), v = !0);
24885
+ T === null ? f(o, h) : T && T.isColor && (f(T, 1), x = !0);
24886
24886
  const _ = s.xr.getEnvironmentBlendMode();
24887
- _ === "additive" ? i.buffers.color.setClear(0, 0, 0, 1, a) : _ === "alpha-blend" && i.buffers.color.setClear(0, 0, 0, 0, a), (s.autoClear || v) && (i.buffers.depth.setTest(!0), i.buffers.depth.setMask(!0), i.buffers.color.setMask(!0), s.clear(s.autoClearColor, s.autoClearDepth, s.autoClearStencil));
24887
+ _ === "additive" ? i.buffers.color.setClear(0, 0, 0, 1, a) : _ === "alpha-blend" && i.buffers.color.setClear(0, 0, 0, 0, a), (s.autoClear || x) && (i.buffers.depth.setTest(!0), i.buffers.depth.setMask(!0), i.buffers.color.setMask(!0), s.clear(s.autoClearColor, s.autoClearDepth, s.autoClearStencil));
24888
24888
  }
24889
- function g(S, v) {
24890
- const T = p(v);
24889
+ function g(S, x) {
24890
+ const T = p(x);
24891
24891
  T && (T.isCubeTexture || T.mapping === ca) ? (A === void 0 && (A = new gi(
24892
24892
  new Ps(1, 1, 1),
24893
24893
  new cn({
@@ -24907,7 +24907,7 @@ function Um(s, t, e, i, n, r, a) {
24907
24907
  get: function() {
24908
24908
  return this.uniforms.envMap.value;
24909
24909
  }
24910
- }), n.update(A)), En.copy(v.backgroundRotation), En.x *= -1, En.y *= -1, En.z *= -1, T.isCubeTexture && T.isRenderTargetTexture === !1 && (En.y *= -1, En.z *= -1), A.material.uniforms.envMap.value = T, A.material.uniforms.flipEnvMap.value = T.isCubeTexture && T.isRenderTargetTexture === !1 ? -1 : 1, A.material.uniforms.backgroundBlurriness.value = v.backgroundBlurriness, A.material.uniforms.backgroundIntensity.value = v.backgroundIntensity, A.material.uniforms.backgroundRotation.value.setFromMatrix4(Bm.makeRotationFromEuler(En)), A.material.toneMapped = Zt.getTransfer(T.colorSpace) !== Kt, (c !== T || u !== T.version || d !== s.toneMapping) && (A.material.needsUpdate = !0, c = T, u = T.version, d = s.toneMapping), A.layers.enableAll(), S.unshift(A, A.geometry, A.material, 0, 0, null)) : T && T.isTexture && (l === void 0 && (l = new gi(
24910
+ }), n.update(A)), En.copy(x.backgroundRotation), En.x *= -1, En.y *= -1, En.z *= -1, T.isCubeTexture && T.isRenderTargetTexture === !1 && (En.y *= -1, En.z *= -1), A.material.uniforms.envMap.value = T, A.material.uniforms.flipEnvMap.value = T.isCubeTexture && T.isRenderTargetTexture === !1 ? -1 : 1, A.material.uniforms.backgroundBlurriness.value = x.backgroundBlurriness, A.material.uniforms.backgroundIntensity.value = x.backgroundIntensity, A.material.uniforms.backgroundRotation.value.setFromMatrix4(Bm.makeRotationFromEuler(En)), A.material.toneMapped = Zt.getTransfer(T.colorSpace) !== Kt, (c !== T || u !== T.version || d !== s.toneMapping) && (A.material.needsUpdate = !0, c = T, u = T.version, d = s.toneMapping), A.layers.enableAll(), S.unshift(A, A.geometry, A.material, 0, 0, null)) : T && T.isTexture && (l === void 0 && (l = new gi(
24911
24911
  new or(2, 2),
24912
24912
  new cn({
24913
24913
  name: "BackgroundMaterial",
@@ -24924,10 +24924,10 @@ function Um(s, t, e, i, n, r, a) {
24924
24924
  get: function() {
24925
24925
  return this.uniforms.t2D.value;
24926
24926
  }
24927
- }), n.update(l)), l.material.uniforms.t2D.value = T, l.material.uniforms.backgroundIntensity.value = v.backgroundIntensity, l.material.toneMapped = Zt.getTransfer(T.colorSpace) !== Kt, T.matrixAutoUpdate === !0 && T.updateMatrix(), l.material.uniforms.uvTransform.value.copy(T.matrix), (c !== T || u !== T.version || d !== s.toneMapping) && (l.material.needsUpdate = !0, c = T, u = T.version, d = s.toneMapping), l.layers.enableAll(), S.unshift(l, l.geometry, l.material, 0, 0, null));
24927
+ }), n.update(l)), l.material.uniforms.t2D.value = T, l.material.uniforms.backgroundIntensity.value = x.backgroundIntensity, l.material.toneMapped = Zt.getTransfer(T.colorSpace) !== Kt, T.matrixAutoUpdate === !0 && T.updateMatrix(), l.material.uniforms.uvTransform.value.copy(T.matrix), (c !== T || u !== T.version || d !== s.toneMapping) && (l.material.needsUpdate = !0, c = T, u = T.version, d = s.toneMapping), l.layers.enableAll(), S.unshift(l, l.geometry, l.material, 0, 0, null));
24928
24928
  }
24929
- function f(S, v) {
24930
- S.getRGB(Zr, ic(s)), i.buffers.color.setClear(Zr.r, Zr.g, Zr.b, v, a);
24929
+ function f(S, x) {
24930
+ S.getRGB(Zr, ic(s)), i.buffers.color.setClear(Zr.r, Zr.g, Zr.b, x, a);
24931
24931
  }
24932
24932
  function M() {
24933
24933
  A !== void 0 && (A.geometry.dispose(), A.material.dispose(), A = void 0), l !== void 0 && (l.geometry.dispose(), l.material.dispose(), l = void 0);
@@ -24936,8 +24936,8 @@ function Um(s, t, e, i, n, r, a) {
24936
24936
  getClearColor: function() {
24937
24937
  return o;
24938
24938
  },
24939
- setClearColor: function(S, v = 1) {
24940
- o.set(S), h = v, f(o, h);
24939
+ setClearColor: function(S, x = 1) {
24940
+ o.set(S), h = x, f(o, h);
24941
24941
  },
24942
24942
  getClearAlpha: function() {
24943
24943
  return h;
@@ -24953,30 +24953,30 @@ function Um(s, t, e, i, n, r, a) {
24953
24953
  function zm(s, t) {
24954
24954
  const e = s.getParameter(s.MAX_VERTEX_ATTRIBS), i = {}, n = u(null);
24955
24955
  let r = n, a = !1;
24956
- function o(x, b, z, F, U) {
24956
+ function o(v, b, z, F, U) {
24957
24957
  let W = !1;
24958
24958
  const Y = c(F, z, b);
24959
- r !== Y && (r = Y, l(r.object)), W = d(x, F, z, U), W && p(x, F, z, U), U !== null && t.update(U, s.ELEMENT_ARRAY_BUFFER), (W || a) && (a = !1, v(x, b, z, F), U !== null && s.bindBuffer(s.ELEMENT_ARRAY_BUFFER, t.get(U).buffer));
24959
+ r !== Y && (r = Y, l(r.object)), W = d(v, F, z, U), W && p(v, F, z, U), U !== null && t.update(U, s.ELEMENT_ARRAY_BUFFER), (W || a) && (a = !1, x(v, b, z, F), U !== null && s.bindBuffer(s.ELEMENT_ARRAY_BUFFER, t.get(U).buffer));
24960
24960
  }
24961
24961
  function h() {
24962
24962
  return s.createVertexArray();
24963
24963
  }
24964
- function l(x) {
24965
- return s.bindVertexArray(x);
24964
+ function l(v) {
24965
+ return s.bindVertexArray(v);
24966
24966
  }
24967
- function A(x) {
24968
- return s.deleteVertexArray(x);
24967
+ function A(v) {
24968
+ return s.deleteVertexArray(v);
24969
24969
  }
24970
- function c(x, b, z) {
24970
+ function c(v, b, z) {
24971
24971
  const F = z.wireframe === !0;
24972
- let U = i[x.id];
24973
- U === void 0 && (U = {}, i[x.id] = U);
24972
+ let U = i[v.id];
24973
+ U === void 0 && (U = {}, i[v.id] = U);
24974
24974
  let W = U[b.id];
24975
24975
  W === void 0 && (W = {}, U[b.id] = W);
24976
24976
  let Y = W[F];
24977
24977
  return Y === void 0 && (Y = u(h()), W[F] = Y), Y;
24978
24978
  }
24979
- function u(x) {
24979
+ function u(v) {
24980
24980
  const b = [], z = [], F = [];
24981
24981
  for (let U = 0; U < e; U++)
24982
24982
  b[U] = 0, z[U] = 0, F[U] = 0;
@@ -24988,12 +24988,12 @@ function zm(s, t) {
24988
24988
  newAttributes: b,
24989
24989
  enabledAttributes: z,
24990
24990
  attributeDivisors: F,
24991
- object: x,
24991
+ object: v,
24992
24992
  attributes: {},
24993
24993
  index: null
24994
24994
  };
24995
24995
  }
24996
- function d(x, b, z, F) {
24996
+ function d(v, b, z, F) {
24997
24997
  const U = r.attributes, W = b.attributes;
24998
24998
  let Y = 0;
24999
24999
  const $ = z.getAttributes();
@@ -25001,52 +25001,52 @@ function zm(s, t) {
25001
25001
  if ($[H].location >= 0) {
25002
25002
  const ht = U[H];
25003
25003
  let mt = W[H];
25004
- if (mt === void 0 && (H === "instanceMatrix" && x.instanceMatrix && (mt = x.instanceMatrix), H === "instanceColor" && x.instanceColor && (mt = x.instanceColor)), ht === void 0 || ht.attribute !== mt || mt && ht.data !== mt.data) return !0;
25004
+ if (mt === void 0 && (H === "instanceMatrix" && v.instanceMatrix && (mt = v.instanceMatrix), H === "instanceColor" && v.instanceColor && (mt = v.instanceColor)), ht === void 0 || ht.attribute !== mt || mt && ht.data !== mt.data) return !0;
25005
25005
  Y++;
25006
25006
  }
25007
25007
  return r.attributesNum !== Y || r.index !== F;
25008
25008
  }
25009
- function p(x, b, z, F) {
25009
+ function p(v, b, z, F) {
25010
25010
  const U = {}, W = b.attributes;
25011
25011
  let Y = 0;
25012
25012
  const $ = z.getAttributes();
25013
25013
  for (const H in $)
25014
25014
  if ($[H].location >= 0) {
25015
25015
  let ht = W[H];
25016
- ht === void 0 && (H === "instanceMatrix" && x.instanceMatrix && (ht = x.instanceMatrix), H === "instanceColor" && x.instanceColor && (ht = x.instanceColor));
25016
+ ht === void 0 && (H === "instanceMatrix" && v.instanceMatrix && (ht = v.instanceMatrix), H === "instanceColor" && v.instanceColor && (ht = v.instanceColor));
25017
25017
  const mt = {};
25018
25018
  mt.attribute = ht, ht && ht.data && (mt.data = ht.data), U[H] = mt, Y++;
25019
25019
  }
25020
25020
  r.attributes = U, r.attributesNum = Y, r.index = F;
25021
25021
  }
25022
25022
  function m() {
25023
- const x = r.newAttributes;
25024
- for (let b = 0, z = x.length; b < z; b++)
25025
- x[b] = 0;
25023
+ const v = r.newAttributes;
25024
+ for (let b = 0, z = v.length; b < z; b++)
25025
+ v[b] = 0;
25026
25026
  }
25027
- function g(x) {
25028
- f(x, 0);
25027
+ function g(v) {
25028
+ f(v, 0);
25029
25029
  }
25030
- function f(x, b) {
25030
+ function f(v, b) {
25031
25031
  const z = r.newAttributes, F = r.enabledAttributes, U = r.attributeDivisors;
25032
- z[x] = 1, F[x] === 0 && (s.enableVertexAttribArray(x), F[x] = 1), U[x] !== b && (s.vertexAttribDivisor(x, b), U[x] = b);
25032
+ z[v] = 1, F[v] === 0 && (s.enableVertexAttribArray(v), F[v] = 1), U[v] !== b && (s.vertexAttribDivisor(v, b), U[v] = b);
25033
25033
  }
25034
25034
  function M() {
25035
- const x = r.newAttributes, b = r.enabledAttributes;
25035
+ const v = r.newAttributes, b = r.enabledAttributes;
25036
25036
  for (let z = 0, F = b.length; z < F; z++)
25037
- b[z] !== x[z] && (s.disableVertexAttribArray(z), b[z] = 0);
25037
+ b[z] !== v[z] && (s.disableVertexAttribArray(z), b[z] = 0);
25038
25038
  }
25039
- function S(x, b, z, F, U, W, Y) {
25040
- Y === !0 ? s.vertexAttribIPointer(x, b, z, U, W) : s.vertexAttribPointer(x, b, z, F, U, W);
25039
+ function S(v, b, z, F, U, W, Y) {
25040
+ Y === !0 ? s.vertexAttribIPointer(v, b, z, U, W) : s.vertexAttribPointer(v, b, z, F, U, W);
25041
25041
  }
25042
- function v(x, b, z, F) {
25042
+ function x(v, b, z, F) {
25043
25043
  m();
25044
25044
  const U = F.attributes, W = z.getAttributes(), Y = b.defaultAttributeValues;
25045
25045
  for (const $ in W) {
25046
25046
  const H = W[$];
25047
25047
  if (H.location >= 0) {
25048
25048
  let rt = U[$];
25049
- if (rt === void 0 && ($ === "instanceMatrix" && x.instanceMatrix && (rt = x.instanceMatrix), $ === "instanceColor" && x.instanceColor && (rt = x.instanceColor)), rt !== void 0) {
25049
+ if (rt === void 0 && ($ === "instanceMatrix" && v.instanceMatrix && (rt = v.instanceMatrix), $ === "instanceColor" && v.instanceColor && (rt = v.instanceColor)), rt !== void 0) {
25050
25050
  const ht = rt.normalized, mt = rt.itemSize, Ut = t.get(rt);
25051
25051
  if (Ut === void 0) continue;
25052
25052
  const re = Ut.buffer, te = Ut.type, j = Ut.bytesPerElement, ot = te === s.INT || te === s.UNSIGNED_INT || rt.gpuType === dl;
@@ -25055,7 +25055,7 @@ function zm(s, t) {
25055
25055
  if (nt.isInstancedInterleavedBuffer) {
25056
25056
  for (let Dt = 0; Dt < H.locationSize; Dt++)
25057
25057
  f(H.location + Dt, nt.meshPerAttribute);
25058
- x.isInstancedMesh !== !0 && F._maxInstanceCount === void 0 && (F._maxInstanceCount = nt.meshPerAttribute * nt.count);
25058
+ v.isInstancedMesh !== !0 && F._maxInstanceCount === void 0 && (F._maxInstanceCount = nt.meshPerAttribute * nt.count);
25059
25059
  } else
25060
25060
  for (let Dt = 0; Dt < H.locationSize; Dt++)
25061
25061
  g(H.location + Dt);
@@ -25074,7 +25074,7 @@ function zm(s, t) {
25074
25074
  if (rt.isInstancedBufferAttribute) {
25075
25075
  for (let nt = 0; nt < H.locationSize; nt++)
25076
25076
  f(H.location + nt, rt.meshPerAttribute);
25077
- x.isInstancedMesh !== !0 && F._maxInstanceCount === void 0 && (F._maxInstanceCount = rt.meshPerAttribute * rt.count);
25077
+ v.isInstancedMesh !== !0 && F._maxInstanceCount === void 0 && (F._maxInstanceCount = rt.meshPerAttribute * rt.count);
25078
25078
  } else
25079
25079
  for (let nt = 0; nt < H.locationSize; nt++)
25080
25080
  g(H.location + nt);
@@ -25113,36 +25113,36 @@ function zm(s, t) {
25113
25113
  }
25114
25114
  function T() {
25115
25115
  P();
25116
- for (const x in i) {
25117
- const b = i[x];
25116
+ for (const v in i) {
25117
+ const b = i[v];
25118
25118
  for (const z in b) {
25119
25119
  const F = b[z];
25120
25120
  for (const U in F)
25121
25121
  A(F[U].object), delete F[U];
25122
25122
  delete b[z];
25123
25123
  }
25124
- delete i[x];
25124
+ delete i[v];
25125
25125
  }
25126
25126
  }
25127
- function _(x) {
25128
- if (i[x.id] === void 0) return;
25129
- const b = i[x.id];
25127
+ function _(v) {
25128
+ if (i[v.id] === void 0) return;
25129
+ const b = i[v.id];
25130
25130
  for (const z in b) {
25131
25131
  const F = b[z];
25132
25132
  for (const U in F)
25133
25133
  A(F[U].object), delete F[U];
25134
25134
  delete b[z];
25135
25135
  }
25136
- delete i[x.id];
25136
+ delete i[v.id];
25137
25137
  }
25138
- function w(x) {
25138
+ function w(v) {
25139
25139
  for (const b in i) {
25140
25140
  const z = i[b];
25141
- if (z[x.id] === void 0) continue;
25142
- const F = z[x.id];
25141
+ if (z[v.id] === void 0) continue;
25142
+ const F = z[v.id];
25143
25143
  for (const U in F)
25144
25144
  A(F[U].object), delete F[U];
25145
- delete z[x.id];
25145
+ delete z[v.id];
25146
25146
  }
25147
25147
  }
25148
25148
  function P() {
@@ -25228,7 +25228,7 @@ function Gm(s, t, e, i) {
25228
25228
  let l = e.precision !== void 0 ? e.precision : "highp";
25229
25229
  const A = h(l);
25230
25230
  A !== l && (console.warn("THREE.WebGLRenderer:", l, "not supported, using", A, "instead."), l = A);
25231
- const c = e.logarithmicDepthBuffer === !0, u = e.reversedDepthBuffer === !0 && t.has("EXT_clip_control"), d = s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS), p = s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS), m = s.getParameter(s.MAX_TEXTURE_SIZE), g = s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE), f = s.getParameter(s.MAX_VERTEX_ATTRIBS), M = s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS), S = s.getParameter(s.MAX_VARYING_VECTORS), v = s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS), T = p > 0, _ = s.getParameter(s.MAX_SAMPLES);
25231
+ const c = e.logarithmicDepthBuffer === !0, u = e.reversedDepthBuffer === !0 && t.has("EXT_clip_control"), d = s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS), p = s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS), m = s.getParameter(s.MAX_TEXTURE_SIZE), g = s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE), f = s.getParameter(s.MAX_VERTEX_ATTRIBS), M = s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS), S = s.getParameter(s.MAX_VARYING_VECTORS), x = s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS), T = p > 0, _ = s.getParameter(s.MAX_SAMPLES);
25232
25232
  return {
25233
25233
  isWebGL2: !0,
25234
25234
  // keeping this for backwards compatibility
@@ -25246,7 +25246,7 @@ function Gm(s, t, e, i) {
25246
25246
  maxAttributes: f,
25247
25247
  maxVertexUniforms: M,
25248
25248
  maxVaryings: S,
25249
- maxFragmentUniforms: v,
25249
+ maxFragmentUniforms: x,
25250
25250
  vertexTextures: T,
25251
25251
  maxSamples: _
25252
25252
  };
@@ -25272,11 +25272,11 @@ function Hm(s) {
25272
25272
  r ? A(null) : l();
25273
25273
  else {
25274
25274
  const M = r ? 0 : i, S = M * 4;
25275
- let v = f.clippingState || null;
25276
- h.value = v, v = A(p, u, S, d);
25275
+ let x = f.clippingState || null;
25276
+ h.value = x, x = A(p, u, S, d);
25277
25277
  for (let T = 0; T !== S; ++T)
25278
- v[T] = e[T];
25279
- f.clippingState = v, this.numIntersection = m ? this.numPlanes : 0, this.numPlanes += M;
25278
+ x[T] = e[T];
25279
+ f.clippingState = x, this.numIntersection = m ? this.numPlanes : 0, this.numPlanes += M;
25280
25280
  }
25281
25281
  };
25282
25282
  function l() {
@@ -25289,8 +25289,8 @@ function Hm(s) {
25289
25289
  if (g = h.value, p !== !0 || g === null) {
25290
25290
  const f = d + m * 4, M = u.matrixWorldInverse;
25291
25291
  o.getNormalMatrix(M), (g === null || g.length < f) && (g = new Float32Array(f));
25292
- for (let S = 0, v = d; S !== m; ++S, v += 4)
25293
- a.copy(c[S]).applyMatrix4(M, o), a.normal.toArray(g, v), g[v + 3] = a.constant;
25292
+ for (let S = 0, x = d; S !== m; ++S, x += 4)
25293
+ a.copy(c[S]).applyMatrix4(M, o), a.normal.toArray(g, x), g[x + 3] = a.constant;
25294
25294
  }
25295
25295
  h.value = g, h.needsUpdate = !0;
25296
25296
  }
@@ -25446,8 +25446,8 @@ class Jh {
25446
25446
  }
25447
25447
  _allocateTargets() {
25448
25448
  const t = 3 * Math.max(this._cubeSize, 112), e = 4 * this._cubeSize, i = {
25449
- magFilter: vi,
25450
- minFilter: vi,
25449
+ magFilter: xi,
25450
+ minFilter: xi,
25451
25451
  generateMipmaps: !1,
25452
25452
  type: sr,
25453
25453
  format: fi,
@@ -25468,7 +25468,7 @@ class Jh {
25468
25468
  _sceneToCubeUV(t, e, i, n, r) {
25469
25469
  const h = new Ge(90, 1, e, i), l = [1, -1, 1, 1, 1, 1], A = [1, 1, 1, -1, -1, -1], c = this._renderer, u = c.autoClear, d = c.toneMapping;
25470
25470
  c.getClearColor(Zh), c.toneMapping = ln, c.autoClear = !1, c.state.buffers.depth.getReversed() && (c.setRenderTarget(n), c.clearDepth(), c.setRenderTarget(null));
25471
- const m = new xl({
25471
+ const m = new vl({
25472
25472
  name: "PMREM.Background",
25473
25473
  side: He,
25474
25474
  depthWrite: !1,
@@ -25478,10 +25478,10 @@ class Jh {
25478
25478
  const M = t.background;
25479
25479
  M ? M.isColor && (m.color.copy(M), t.background = null, f = !0) : (m.color.copy(Zh), f = !0);
25480
25480
  for (let S = 0; S < 6; S++) {
25481
- const v = S % 3;
25482
- v === 0 ? (h.up.set(0, l[S], 0), h.position.set(r.x, r.y, r.z), h.lookAt(r.x + A[S], r.y, r.z)) : v === 1 ? (h.up.set(0, 0, l[S]), h.position.set(r.x, r.y, r.z), h.lookAt(r.x, r.y + A[S], r.z)) : (h.up.set(0, l[S], 0), h.position.set(r.x, r.y, r.z), h.lookAt(r.x, r.y, r.z + A[S]));
25481
+ const x = S % 3;
25482
+ x === 0 ? (h.up.set(0, l[S], 0), h.position.set(r.x, r.y, r.z), h.lookAt(r.x + A[S], r.y, r.z)) : x === 1 ? (h.up.set(0, 0, l[S]), h.position.set(r.x, r.y, r.z), h.lookAt(r.x, r.y + A[S], r.z)) : (h.up.set(0, l[S], 0), h.position.set(r.x, r.y, r.z), h.lookAt(r.x, r.y, r.z + A[S]));
25483
25483
  const T = this._cubeSize;
25484
- jr(n, v * T, S > 2 ? T : 0, T, T), c.setRenderTarget(n), f && c.render(g, h), c.render(t, h);
25484
+ jr(n, x * T, S > 2 ? T : 0, T, T), c.setRenderTarget(n), f && c.render(g, h), c.render(t, h);
25485
25485
  }
25486
25486
  g.geometry.dispose(), g.material.dispose(), c.toneMapping = d, c.autoClear = u, t.background = M;
25487
25487
  }
@@ -25555,8 +25555,8 @@ class Jh {
25555
25555
  u.envMap.value = t.texture, u.samples.value = g, u.weights.value = f, u.latitudinal.value = a === "latitudinal", o && (u.poleAxis.value = o);
25556
25556
  const { _lodMax: S } = this;
25557
25557
  u.dTheta.value = p, u.mipInt.value = S - i;
25558
- const v = this._sizeLods[n], T = 3 * v * (n > S - ms ? n - S + ms : 0), _ = 4 * (this._cubeSize - v);
25559
- jr(e, T, _, 3 * v, 2 * v), h.setRenderTarget(e), h.render(c, uo);
25558
+ const x = this._sizeLods[n], T = 3 * x * (n > S - ms ? n - S + ms : 0), _ = 4 * (this._cubeSize - x);
25559
+ jr(e, T, _, 3 * x, 2 * x), h.setRenderTarget(e), h.render(c, uo);
25560
25560
  }
25561
25561
  }
25562
25562
  function Ym(s) {
@@ -25568,7 +25568,7 @@ function Ym(s) {
25568
25568
  e.push(o);
25569
25569
  let h = 1 / o;
25570
25570
  a > s - ms ? h = Xh[a - s + ms - 1] : a === 0 && (h = 0), i.push(h);
25571
- const l = 1 / (o - 2), A = -l, c = 1 + l, u = [A, A, c, A, c, c, A, A, c, c, A, c], d = 6, p = 6, m = 3, g = 2, f = 1, M = new Float32Array(m * p * d), S = new Float32Array(g * p * d), v = new Float32Array(f * p * d);
25571
+ const l = 1 / (o - 2), A = -l, c = 1 + l, u = [A, A, c, A, c, c, A, A, c, c, A, c], d = 6, p = 6, m = 3, g = 2, f = 1, M = new Float32Array(m * p * d), S = new Float32Array(g * p * d), x = new Float32Array(f * p * d);
25572
25572
  for (let _ = 0; _ < d; _++) {
25573
25573
  const w = _ % 3 * 2 / 3 - 1, P = _ > 2 ? 0 : -1, E = [
25574
25574
  w,
@@ -25591,11 +25591,11 @@ function Ym(s) {
25591
25591
  0
25592
25592
  ];
25593
25593
  M.set(E, m * p * _), S.set(u, g * p * _);
25594
- const x = [_, _, _, _, _, _];
25595
- v.set(x, f * p * _);
25594
+ const v = [_, _, _, _, _, _];
25595
+ x.set(v, f * p * _);
25596
25596
  }
25597
25597
  const T = new Hn();
25598
- T.setAttribute("position", new Si(M, m)), T.setAttribute("uv", new Si(S, g)), T.setAttribute("faceIndex", new Si(v, f)), t.push(T), n > ms && n--;
25598
+ T.setAttribute("position", new Si(M, m)), T.setAttribute("uv", new Si(S, g)), T.setAttribute("faceIndex", new Si(x, f)), t.push(T), n > ms && n--;
25599
25599
  }
25600
25600
  return { lodPlanes: t, sizeLods: e, sigmas: i };
25601
25601
  }
@@ -25898,7 +25898,7 @@ function jm(s) {
25898
25898
  },
25899
25899
  get: function(i) {
25900
25900
  const n = e(i);
25901
- return n === null && xs("THREE.WebGLRenderer: " + i + " extension not supported."), n;
25901
+ return n === null && vs("THREE.WebGLRenderer: " + i + " extension not supported."), n;
25902
25902
  }
25903
25903
  };
25904
25904
  }
@@ -25927,14 +25927,14 @@ function Jm(s, t, e, i) {
25927
25927
  if (d !== null) {
25928
25928
  const M = d.array;
25929
25929
  m = d.version;
25930
- for (let S = 0, v = M.length; S < v; S += 3) {
25930
+ for (let S = 0, x = M.length; S < x; S += 3) {
25931
25931
  const T = M[S + 0], _ = M[S + 1], w = M[S + 2];
25932
25932
  u.push(T, _, _, w, w, T);
25933
25933
  }
25934
25934
  } else if (p !== void 0) {
25935
25935
  const M = p.array;
25936
25936
  m = p.version;
25937
- for (let S = 0, v = M.length / 3 - 1; S < v; S += 3) {
25937
+ for (let S = 0, x = M.length / 3 - 1; S < x; S += 3) {
25938
25938
  const T = S + 0, _ = S + 1, w = S + 2;
25939
25939
  u.push(T, _, _, w, w, T);
25940
25940
  }
@@ -26057,13 +26057,13 @@ function Km(s, t, e) {
26057
26057
  const d = o.morphAttributes.position !== void 0, p = o.morphAttributes.normal !== void 0, m = o.morphAttributes.color !== void 0, g = o.morphAttributes.position || [], f = o.morphAttributes.normal || [], M = o.morphAttributes.color || [];
26058
26058
  let S = 0;
26059
26059
  d === !0 && (S = 1), p === !0 && (S = 2), m === !0 && (S = 3);
26060
- let v = o.attributes.position.count * S, T = 1;
26061
- v > t.maxTextureSize && (T = Math.ceil(v / t.maxTextureSize), v = t.maxTextureSize);
26062
- const _ = new Float32Array(v * T * 4 * c), w = new QA(_, v, T, c);
26060
+ let x = o.attributes.position.count * S, T = 1;
26061
+ x > t.maxTextureSize && (T = Math.ceil(x / t.maxTextureSize), x = t.maxTextureSize);
26062
+ const _ = new Float32Array(x * T * 4 * c), w = new QA(_, x, T, c);
26063
26063
  w.type = ki, w.needsUpdate = !0;
26064
26064
  const P = S * 4;
26065
- for (let x = 0; x < c; x++) {
26066
- const b = g[x], z = f[x], F = M[x], U = v * T * 4 * x;
26065
+ for (let v = 0; v < c; v++) {
26066
+ const b = g[v], z = f[v], F = M[v], U = x * T * 4 * v;
26067
26067
  for (let W = 0; W < b.count; W++) {
26068
26068
  const Y = W * P;
26069
26069
  d === !0 && (n.fromBufferAttribute(b, W), _[U + Y + 0] = n.x, _[U + Y + 1] = n.y, _[U + Y + 2] = n.z, _[U + Y + 3] = 0), p === !0 && (n.fromBufferAttribute(z, W), _[U + Y + 4] = n.x, _[U + Y + 5] = n.y, _[U + Y + 6] = n.z, _[U + Y + 7] = 0), m === !0 && (n.fromBufferAttribute(F, W), _[U + Y + 8] = n.x, _[U + Y + 9] = n.y, _[U + Y + 10] = n.z, _[U + Y + 11] = F.itemSize === 4 ? n.w : 1);
@@ -26072,7 +26072,7 @@ function Km(s, t, e) {
26072
26072
  u = {
26073
26073
  count: c,
26074
26074
  texture: w,
26075
- size: new Nt(v, T)
26075
+ size: new Nt(x, T)
26076
26076
  }, i.set(o, u), o.addEventListener("dispose", E);
26077
26077
  }
26078
26078
  if (a.isInstancedMesh === !0 && a.morphTexture !== null)
@@ -26131,7 +26131,7 @@ function Ie(s, t) {
26131
26131
  if (s[e] !== t[e]) return !1;
26132
26132
  return !0;
26133
26133
  }
26134
- function ve(s, t) {
26134
+ function xe(s, t) {
26135
26135
  for (let e = 0, i = t.length; e < i; e++)
26136
26136
  s[e] = t[e];
26137
26137
  }
@@ -26152,7 +26152,7 @@ function eC(s, t) {
26152
26152
  (e[0] !== t.x || e[1] !== t.y) && (s.uniform2f(this.addr, t.x, t.y), e[0] = t.x, e[1] = t.y);
26153
26153
  else {
26154
26154
  if (Ie(e, t)) return;
26155
- s.uniform2fv(this.addr, t), ve(e, t);
26155
+ s.uniform2fv(this.addr, t), xe(e, t);
26156
26156
  }
26157
26157
  }
26158
26158
  function iC(s, t) {
@@ -26163,7 +26163,7 @@ function iC(s, t) {
26163
26163
  (e[0] !== t.r || e[1] !== t.g || e[2] !== t.b) && (s.uniform3f(this.addr, t.r, t.g, t.b), e[0] = t.r, e[1] = t.g, e[2] = t.b);
26164
26164
  else {
26165
26165
  if (Ie(e, t)) return;
26166
- s.uniform3fv(this.addr, t), ve(e, t);
26166
+ s.uniform3fv(this.addr, t), xe(e, t);
26167
26167
  }
26168
26168
  }
26169
26169
  function nC(s, t) {
@@ -26172,37 +26172,37 @@ function nC(s, t) {
26172
26172
  (e[0] !== t.x || e[1] !== t.y || e[2] !== t.z || e[3] !== t.w) && (s.uniform4f(this.addr, t.x, t.y, t.z, t.w), e[0] = t.x, e[1] = t.y, e[2] = t.z, e[3] = t.w);
26173
26173
  else {
26174
26174
  if (Ie(e, t)) return;
26175
- s.uniform4fv(this.addr, t), ve(e, t);
26175
+ s.uniform4fv(this.addr, t), xe(e, t);
26176
26176
  }
26177
26177
  }
26178
26178
  function sC(s, t) {
26179
26179
  const e = this.cache, i = t.elements;
26180
26180
  if (i === void 0) {
26181
26181
  if (Ie(e, t)) return;
26182
- s.uniformMatrix2fv(this.addr, !1, t), ve(e, t);
26182
+ s.uniformMatrix2fv(this.addr, !1, t), xe(e, t);
26183
26183
  } else {
26184
26184
  if (Ie(e, i)) return;
26185
- sA.set(i), s.uniformMatrix2fv(this.addr, !1, sA), ve(e, i);
26185
+ sA.set(i), s.uniformMatrix2fv(this.addr, !1, sA), xe(e, i);
26186
26186
  }
26187
26187
  }
26188
26188
  function rC(s, t) {
26189
26189
  const e = this.cache, i = t.elements;
26190
26190
  if (i === void 0) {
26191
26191
  if (Ie(e, t)) return;
26192
- s.uniformMatrix3fv(this.addr, !1, t), ve(e, t);
26192
+ s.uniformMatrix3fv(this.addr, !1, t), xe(e, t);
26193
26193
  } else {
26194
26194
  if (Ie(e, i)) return;
26195
- nA.set(i), s.uniformMatrix3fv(this.addr, !1, nA), ve(e, i);
26195
+ nA.set(i), s.uniformMatrix3fv(this.addr, !1, nA), xe(e, i);
26196
26196
  }
26197
26197
  }
26198
26198
  function aC(s, t) {
26199
26199
  const e = this.cache, i = t.elements;
26200
26200
  if (i === void 0) {
26201
26201
  if (Ie(e, t)) return;
26202
- s.uniformMatrix4fv(this.addr, !1, t), ve(e, t);
26202
+ s.uniformMatrix4fv(this.addr, !1, t), xe(e, t);
26203
26203
  } else {
26204
26204
  if (Ie(e, i)) return;
26205
- iA.set(i), s.uniformMatrix4fv(this.addr, !1, iA), ve(e, i);
26205
+ iA.set(i), s.uniformMatrix4fv(this.addr, !1, iA), xe(e, i);
26206
26206
  }
26207
26207
  }
26208
26208
  function oC(s, t) {
@@ -26215,7 +26215,7 @@ function lC(s, t) {
26215
26215
  (e[0] !== t.x || e[1] !== t.y) && (s.uniform2i(this.addr, t.x, t.y), e[0] = t.x, e[1] = t.y);
26216
26216
  else {
26217
26217
  if (Ie(e, t)) return;
26218
- s.uniform2iv(this.addr, t), ve(e, t);
26218
+ s.uniform2iv(this.addr, t), xe(e, t);
26219
26219
  }
26220
26220
  }
26221
26221
  function hC(s, t) {
@@ -26224,7 +26224,7 @@ function hC(s, t) {
26224
26224
  (e[0] !== t.x || e[1] !== t.y || e[2] !== t.z) && (s.uniform3i(this.addr, t.x, t.y, t.z), e[0] = t.x, e[1] = t.y, e[2] = t.z);
26225
26225
  else {
26226
26226
  if (Ie(e, t)) return;
26227
- s.uniform3iv(this.addr, t), ve(e, t);
26227
+ s.uniform3iv(this.addr, t), xe(e, t);
26228
26228
  }
26229
26229
  }
26230
26230
  function AC(s, t) {
@@ -26233,7 +26233,7 @@ function AC(s, t) {
26233
26233
  (e[0] !== t.x || e[1] !== t.y || e[2] !== t.z || e[3] !== t.w) && (s.uniform4i(this.addr, t.x, t.y, t.z, t.w), e[0] = t.x, e[1] = t.y, e[2] = t.z, e[3] = t.w);
26234
26234
  else {
26235
26235
  if (Ie(e, t)) return;
26236
- s.uniform4iv(this.addr, t), ve(e, t);
26236
+ s.uniform4iv(this.addr, t), xe(e, t);
26237
26237
  }
26238
26238
  }
26239
26239
  function cC(s, t) {
@@ -26246,7 +26246,7 @@ function uC(s, t) {
26246
26246
  (e[0] !== t.x || e[1] !== t.y) && (s.uniform2ui(this.addr, t.x, t.y), e[0] = t.x, e[1] = t.y);
26247
26247
  else {
26248
26248
  if (Ie(e, t)) return;
26249
- s.uniform2uiv(this.addr, t), ve(e, t);
26249
+ s.uniform2uiv(this.addr, t), xe(e, t);
26250
26250
  }
26251
26251
  }
26252
26252
  function dC(s, t) {
@@ -26255,7 +26255,7 @@ function dC(s, t) {
26255
26255
  (e[0] !== t.x || e[1] !== t.y || e[2] !== t.z) && (s.uniform3ui(this.addr, t.x, t.y, t.z), e[0] = t.x, e[1] = t.y, e[2] = t.z);
26256
26256
  else {
26257
26257
  if (Ie(e, t)) return;
26258
- s.uniform3uiv(this.addr, t), ve(e, t);
26258
+ s.uniform3uiv(this.addr, t), xe(e, t);
26259
26259
  }
26260
26260
  }
26261
26261
  function fC(s, t) {
@@ -26264,7 +26264,7 @@ function fC(s, t) {
26264
26264
  (e[0] !== t.x || e[1] !== t.y || e[2] !== t.z || e[3] !== t.w) && (s.uniform4ui(this.addr, t.x, t.y, t.z, t.w), e[0] = t.x, e[1] = t.y, e[2] = t.z, e[3] = t.w);
26265
26265
  else {
26266
26266
  if (Ie(e, t)) return;
26267
- s.uniform4uiv(this.addr, t), ve(e, t);
26267
+ s.uniform4uiv(this.addr, t), xe(e, t);
26268
26268
  }
26269
26269
  }
26270
26270
  function gC(s, t, e) {
@@ -26370,10 +26370,10 @@ function IC(s) {
26370
26370
  return CC;
26371
26371
  }
26372
26372
  }
26373
- function vC(s, t) {
26373
+ function xC(s, t) {
26374
26374
  s.uniform1fv(this.addr, t);
26375
26375
  }
26376
- function xC(s, t) {
26376
+ function vC(s, t) {
26377
26377
  const e = Ds(t, this.size, 2);
26378
26378
  s.uniform2fv(this.addr, e);
26379
26379
  }
@@ -26423,35 +26423,35 @@ function NC(s, t) {
26423
26423
  }
26424
26424
  function OC(s, t, e) {
26425
26425
  const i = this.cache, n = t.length, r = ua(e, n);
26426
- Ie(i, r) || (s.uniform1iv(this.addr, r), ve(i, r));
26426
+ Ie(i, r) || (s.uniform1iv(this.addr, r), xe(i, r));
26427
26427
  for (let a = 0; a !== n; ++a)
26428
26428
  e.setTexture2D(t[a] || uc, r[a]);
26429
26429
  }
26430
26430
  function FC(s, t, e) {
26431
26431
  const i = this.cache, n = t.length, r = ua(e, n);
26432
- Ie(i, r) || (s.uniform1iv(this.addr, r), ve(i, r));
26432
+ Ie(i, r) || (s.uniform1iv(this.addr, r), xe(i, r));
26433
26433
  for (let a = 0; a !== n; ++a)
26434
26434
  e.setTexture3D(t[a] || fc, r[a]);
26435
26435
  }
26436
26436
  function BC(s, t, e) {
26437
26437
  const i = this.cache, n = t.length, r = ua(e, n);
26438
- Ie(i, r) || (s.uniform1iv(this.addr, r), ve(i, r));
26438
+ Ie(i, r) || (s.uniform1iv(this.addr, r), xe(i, r));
26439
26439
  for (let a = 0; a !== n; ++a)
26440
26440
  e.setTextureCube(t[a] || gc, r[a]);
26441
26441
  }
26442
26442
  function UC(s, t, e) {
26443
26443
  const i = this.cache, n = t.length, r = ua(e, n);
26444
- Ie(i, r) || (s.uniform1iv(this.addr, r), ve(i, r));
26444
+ Ie(i, r) || (s.uniform1iv(this.addr, r), xe(i, r));
26445
26445
  for (let a = 0; a !== n; ++a)
26446
26446
  e.setTexture2DArray(t[a] || dc, r[a]);
26447
26447
  }
26448
26448
  function zC(s) {
26449
26449
  switch (s) {
26450
26450
  case 5126:
26451
- return vC;
26451
+ return xC;
26452
26452
  // FLOAT
26453
26453
  case 35664:
26454
- return xC;
26454
+ return vC;
26455
26455
  // _VEC2
26456
26456
  case 35665:
26457
26457
  return EC;
@@ -27089,7 +27089,7 @@ function AI(s, t, e, i) {
27089
27089
  ].join(`
27090
27090
  `) + `
27091
27091
  ` + f);
27092
- const S = M + g + a, v = M + f + o, T = aA(n, n.VERTEX_SHADER, S), _ = aA(n, n.FRAGMENT_SHADER, v);
27092
+ const S = M + g + a, x = M + f + o, T = aA(n, n.VERTEX_SHADER, S), _ = aA(n, n.FRAGMENT_SHADER, x);
27093
27093
  n.attachShader(m, T), n.attachShader(m, _), e.index0AttributeName !== void 0 ? n.bindAttribLocation(m, 0, e.index0AttributeName) : e.morphTargets === !0 && n.bindAttribLocation(m, 0, "position"), n.linkProgram(m);
27094
27094
  function w(b) {
27095
27095
  if (s.debug.checkShaderErrors) {
@@ -27135,9 +27135,9 @@ Program Info Log: ` + W + `
27135
27135
  this.getAttributes = function() {
27136
27136
  return E === void 0 && w(this), E;
27137
27137
  };
27138
- let x = e.rendererExtensionParallelShaderCompile === !1;
27138
+ let v = e.rendererExtensionParallelShaderCompile === !1;
27139
27139
  return this.isReady = function() {
27140
- return x === !1 && (x = n.getProgramParameter(m, WC)), x;
27140
+ return v === !1 && (v = n.getProgramParameter(m, WC)), v;
27141
27141
  }, this.destroy = function() {
27142
27142
  i.releaseStatesOfProgram(this), n.deleteProgram(m), this.program = void 0;
27143
27143
  }, this.type = e.shaderType, this.name = e.shaderName, this.id = YC++, this.cacheKey = t, this.usedTimes = 1, this.program = m, this.vertexShader = T, this.fragmentShader = _, this;
@@ -27205,7 +27205,7 @@ function fI(s, t, e, i, n, r, a) {
27205
27205
  function m(E) {
27206
27206
  return l.add(E), E === 0 ? "uv" : `uv${E}`;
27207
27207
  }
27208
- function g(E, x, b, z, F) {
27208
+ function g(E, v, b, z, F) {
27209
27209
  const U = z.fog, W = F.geometry, Y = E.isMeshStandardMaterial ? z.environment : null, $ = (E.isMeshStandardMaterial ? e : t).get(E.envMap || Y), H = $ && $.mapping === ca ? $.image.height : null, rt = p[E.type];
27210
27210
  E.precision !== null && (d = n.getMaxPrecision(E.precision), d !== E.precision && console.warn("THREE.WebGLProgram.getParameters:", E.precision, "not supported, using", d, "instead."));
27211
27211
  const ht = W.morphAttributes.position || W.morphAttributes.normal || W.morphAttributes.color, mt = ht !== void 0 ? ht.length : 0;
@@ -27217,7 +27217,7 @@ function fI(s, t, e, i, n, r, a) {
27217
27217
  re = Jt.vertexShader, te = Jt.fragmentShader;
27218
27218
  } else
27219
27219
  re = E.vertexShader, te = E.fragmentShader, h.update(E), j = h.getVertexShaderID(E), ot = h.getFragmentShaderID(E);
27220
- const nt = s.getRenderTarget(), bt = s.state.buffers.depth.getReversed(), _t = F.isInstancedMesh === !0, Dt = F.isBatchedMesh === !0, de = !!E.map, Yt = !!E.matcap, R = !!$, ie = !!E.aoMap, yt = !!E.lightMap, jt = !!E.bumpMap, Et = !!E.normalMap, ae = !!E.displacementMap, ft = !!E.emissiveMap, zt = !!E.metalnessMap, xe = !!E.roughnessMap, fe = E.anisotropy > 0, y = E.clearcoat > 0, C = E.dispersion > 0, B = E.iridescence > 0, Z = E.sheen > 0, Q = E.transmission > 0, X = fe && !!E.anisotropyMap, xt = y && !!E.clearcoatMap, it = y && !!E.clearcoatNormalMap, Ct = y && !!E.clearcoatRoughnessMap, It = B && !!E.iridescenceMap, tt = B && !!E.iridescenceThicknessMap, ct = Z && !!E.sheenColorMap, wt = Z && !!E.sheenRoughnessMap, vt = !!E.specularMap, lt = !!E.specularColorMap, Ot = !!E.specularIntensityMap, D = Q && !!E.transmissionMap, et = Q && !!E.thicknessMap, st = !!E.gradientMap, dt = !!E.alphaMap, q = E.alphaTest > 0, J = !!E.alphaHash, pt = !!E.extensions;
27220
+ const nt = s.getRenderTarget(), bt = s.state.buffers.depth.getReversed(), _t = F.isInstancedMesh === !0, Dt = F.isBatchedMesh === !0, de = !!E.map, Yt = !!E.matcap, R = !!$, ie = !!E.aoMap, yt = !!E.lightMap, jt = !!E.bumpMap, Et = !!E.normalMap, ae = !!E.displacementMap, ft = !!E.emissiveMap, zt = !!E.metalnessMap, ve = !!E.roughnessMap, fe = E.anisotropy > 0, y = E.clearcoat > 0, C = E.dispersion > 0, B = E.iridescence > 0, Z = E.sheen > 0, Q = E.transmission > 0, X = fe && !!E.anisotropyMap, vt = y && !!E.clearcoatMap, it = y && !!E.clearcoatNormalMap, Ct = y && !!E.clearcoatRoughnessMap, It = B && !!E.iridescenceMap, tt = B && !!E.iridescenceThicknessMap, ct = Z && !!E.sheenColorMap, wt = Z && !!E.sheenRoughnessMap, xt = !!E.specularMap, lt = !!E.specularColorMap, Ot = !!E.specularIntensityMap, D = Q && !!E.transmissionMap, et = Q && !!E.thicknessMap, st = !!E.gradientMap, dt = !!E.alphaMap, q = E.alphaTest > 0, J = !!E.alphaHash, pt = !!E.extensions;
27221
27221
  let Lt = ln;
27222
27222
  E.toneMapped && (nt === null || nt.isXRRenderTarget === !0) && (Lt = s.toneMapping);
27223
27223
  const ne = {
@@ -27254,11 +27254,11 @@ function fI(s, t, e, i, n, r, a) {
27254
27254
  normalMapObjectSpace: Et && E.normalMapType === rf,
27255
27255
  normalMapTangentSpace: Et && E.normalMapType === ZA,
27256
27256
  metalnessMap: zt,
27257
- roughnessMap: xe,
27257
+ roughnessMap: ve,
27258
27258
  anisotropy: fe,
27259
27259
  anisotropyMap: X,
27260
27260
  clearcoat: y,
27261
- clearcoatMap: xt,
27261
+ clearcoatMap: vt,
27262
27262
  clearcoatNormalMap: it,
27263
27263
  clearcoatRoughnessMap: Ct,
27264
27264
  dispersion: C,
@@ -27268,14 +27268,14 @@ function fI(s, t, e, i, n, r, a) {
27268
27268
  sheen: Z,
27269
27269
  sheenColorMap: ct,
27270
27270
  sheenRoughnessMap: wt,
27271
- specularMap: vt,
27271
+ specularMap: xt,
27272
27272
  specularColorMap: lt,
27273
27273
  specularIntensityMap: Ot,
27274
27274
  transmission: Q,
27275
27275
  transmissionMap: D,
27276
27276
  thicknessMap: et,
27277
27277
  gradientMap: st,
27278
- opaque: E.transparent === !1 && E.blending === vs && E.alphaToCoverage === !1,
27278
+ opaque: E.transparent === !1 && E.blending === xs && E.alphaToCoverage === !1,
27279
27279
  alphaMap: dt,
27280
27280
  alphaTest: q,
27281
27281
  alphaHash: J,
@@ -27289,16 +27289,16 @@ function fI(s, t, e, i, n, r, a) {
27289
27289
  displacementMapUv: ae && m(E.displacementMap.channel),
27290
27290
  emissiveMapUv: ft && m(E.emissiveMap.channel),
27291
27291
  metalnessMapUv: zt && m(E.metalnessMap.channel),
27292
- roughnessMapUv: xe && m(E.roughnessMap.channel),
27292
+ roughnessMapUv: ve && m(E.roughnessMap.channel),
27293
27293
  anisotropyMapUv: X && m(E.anisotropyMap.channel),
27294
- clearcoatMapUv: xt && m(E.clearcoatMap.channel),
27294
+ clearcoatMapUv: vt && m(E.clearcoatMap.channel),
27295
27295
  clearcoatNormalMapUv: it && m(E.clearcoatNormalMap.channel),
27296
27296
  clearcoatRoughnessMapUv: Ct && m(E.clearcoatRoughnessMap.channel),
27297
27297
  iridescenceMapUv: It && m(E.iridescenceMap.channel),
27298
27298
  iridescenceThicknessMapUv: tt && m(E.iridescenceThicknessMap.channel),
27299
27299
  sheenColorMapUv: ct && m(E.sheenColorMap.channel),
27300
27300
  sheenRoughnessMapUv: wt && m(E.sheenRoughnessMap.channel),
27301
- specularMapUv: vt && m(E.specularMap.channel),
27301
+ specularMapUv: xt && m(E.specularMap.channel),
27302
27302
  specularColorMapUv: lt && m(E.specularColorMap.channel),
27303
27303
  specularIntensityMapUv: Ot && m(E.specularIntensityMap.channel),
27304
27304
  transmissionMapUv: D && m(E.transmissionMap.channel),
@@ -27322,17 +27322,17 @@ function fI(s, t, e, i, n, r, a) {
27322
27322
  morphColors: W.morphAttributes.color !== void 0,
27323
27323
  morphTargetsCount: mt,
27324
27324
  morphTextureStride: Ut,
27325
- numDirLights: x.directional.length,
27326
- numPointLights: x.point.length,
27327
- numSpotLights: x.spot.length,
27328
- numSpotLightMaps: x.spotLightMap.length,
27329
- numRectAreaLights: x.rectArea.length,
27330
- numHemiLights: x.hemi.length,
27331
- numDirLightShadows: x.directionalShadowMap.length,
27332
- numPointLightShadows: x.pointShadowMap.length,
27333
- numSpotLightShadows: x.spotShadowMap.length,
27334
- numSpotLightShadowsWithMaps: x.numSpotLightShadowsWithMaps,
27335
- numLightProbes: x.numLightProbes,
27325
+ numDirLights: v.directional.length,
27326
+ numPointLights: v.point.length,
27327
+ numSpotLights: v.spot.length,
27328
+ numSpotLightMaps: v.spotLightMap.length,
27329
+ numRectAreaLights: v.rectArea.length,
27330
+ numHemiLights: v.hemi.length,
27331
+ numDirLightShadows: v.directionalShadowMap.length,
27332
+ numPointLightShadows: v.pointShadowMap.length,
27333
+ numSpotLightShadows: v.spotShadowMap.length,
27334
+ numSpotLightShadowsWithMaps: v.numSpotLightShadowsWithMaps,
27335
+ numLightProbes: v.numLightProbes,
27336
27336
  numClippingPlanes: a.numPlanes,
27337
27337
  numClipIntersection: a.numIntersection,
27338
27338
  dithering: E.dithering,
@@ -27355,43 +27355,43 @@ function fI(s, t, e, i, n, r, a) {
27355
27355
  return ne.vertexUv1s = l.has(1), ne.vertexUv2s = l.has(2), ne.vertexUv3s = l.has(3), l.clear(), ne;
27356
27356
  }
27357
27357
  function f(E) {
27358
- const x = [];
27359
- if (E.shaderID ? x.push(E.shaderID) : (x.push(E.customVertexShaderID), x.push(E.customFragmentShaderID)), E.defines !== void 0)
27358
+ const v = [];
27359
+ if (E.shaderID ? v.push(E.shaderID) : (v.push(E.customVertexShaderID), v.push(E.customFragmentShaderID)), E.defines !== void 0)
27360
27360
  for (const b in E.defines)
27361
- x.push(b), x.push(E.defines[b]);
27362
- return E.isRawShaderMaterial === !1 && (M(x, E), S(x, E), x.push(s.outputColorSpace)), x.push(E.customProgramCacheKey), x.join();
27361
+ v.push(b), v.push(E.defines[b]);
27362
+ return E.isRawShaderMaterial === !1 && (M(v, E), S(v, E), v.push(s.outputColorSpace)), v.push(E.customProgramCacheKey), v.join();
27363
27363
  }
27364
- function M(E, x) {
27365
- E.push(x.precision), E.push(x.outputColorSpace), E.push(x.envMapMode), E.push(x.envMapCubeUVHeight), E.push(x.mapUv), E.push(x.alphaMapUv), E.push(x.lightMapUv), E.push(x.aoMapUv), E.push(x.bumpMapUv), E.push(x.normalMapUv), E.push(x.displacementMapUv), E.push(x.emissiveMapUv), E.push(x.metalnessMapUv), E.push(x.roughnessMapUv), E.push(x.anisotropyMapUv), E.push(x.clearcoatMapUv), E.push(x.clearcoatNormalMapUv), E.push(x.clearcoatRoughnessMapUv), E.push(x.iridescenceMapUv), E.push(x.iridescenceThicknessMapUv), E.push(x.sheenColorMapUv), E.push(x.sheenRoughnessMapUv), E.push(x.specularMapUv), E.push(x.specularColorMapUv), E.push(x.specularIntensityMapUv), E.push(x.transmissionMapUv), E.push(x.thicknessMapUv), E.push(x.combine), E.push(x.fogExp2), E.push(x.sizeAttenuation), E.push(x.morphTargetsCount), E.push(x.morphAttributeCount), E.push(x.numDirLights), E.push(x.numPointLights), E.push(x.numSpotLights), E.push(x.numSpotLightMaps), E.push(x.numHemiLights), E.push(x.numRectAreaLights), E.push(x.numDirLightShadows), E.push(x.numPointLightShadows), E.push(x.numSpotLightShadows), E.push(x.numSpotLightShadowsWithMaps), E.push(x.numLightProbes), E.push(x.shadowMapType), E.push(x.toneMapping), E.push(x.numClippingPlanes), E.push(x.numClipIntersection), E.push(x.depthPacking);
27364
+ function M(E, v) {
27365
+ E.push(v.precision), E.push(v.outputColorSpace), E.push(v.envMapMode), E.push(v.envMapCubeUVHeight), E.push(v.mapUv), E.push(v.alphaMapUv), E.push(v.lightMapUv), E.push(v.aoMapUv), E.push(v.bumpMapUv), E.push(v.normalMapUv), E.push(v.displacementMapUv), E.push(v.emissiveMapUv), E.push(v.metalnessMapUv), E.push(v.roughnessMapUv), E.push(v.anisotropyMapUv), E.push(v.clearcoatMapUv), E.push(v.clearcoatNormalMapUv), E.push(v.clearcoatRoughnessMapUv), E.push(v.iridescenceMapUv), E.push(v.iridescenceThicknessMapUv), E.push(v.sheenColorMapUv), E.push(v.sheenRoughnessMapUv), E.push(v.specularMapUv), E.push(v.specularColorMapUv), E.push(v.specularIntensityMapUv), E.push(v.transmissionMapUv), E.push(v.thicknessMapUv), E.push(v.combine), E.push(v.fogExp2), E.push(v.sizeAttenuation), E.push(v.morphTargetsCount), E.push(v.morphAttributeCount), E.push(v.numDirLights), E.push(v.numPointLights), E.push(v.numSpotLights), E.push(v.numSpotLightMaps), E.push(v.numHemiLights), E.push(v.numRectAreaLights), E.push(v.numDirLightShadows), E.push(v.numPointLightShadows), E.push(v.numSpotLightShadows), E.push(v.numSpotLightShadowsWithMaps), E.push(v.numLightProbes), E.push(v.shadowMapType), E.push(v.toneMapping), E.push(v.numClippingPlanes), E.push(v.numClipIntersection), E.push(v.depthPacking);
27366
27366
  }
27367
- function S(E, x) {
27368
- o.disableAll(), x.supportsVertexTextures && o.enable(0), x.instancing && o.enable(1), x.instancingColor && o.enable(2), x.instancingMorph && o.enable(3), x.matcap && o.enable(4), x.envMap && o.enable(5), x.normalMapObjectSpace && o.enable(6), x.normalMapTangentSpace && o.enable(7), x.clearcoat && o.enable(8), x.iridescence && o.enable(9), x.alphaTest && o.enable(10), x.vertexColors && o.enable(11), x.vertexAlphas && o.enable(12), x.vertexUv1s && o.enable(13), x.vertexUv2s && o.enable(14), x.vertexUv3s && o.enable(15), x.vertexTangents && o.enable(16), x.anisotropy && o.enable(17), x.alphaHash && o.enable(18), x.batching && o.enable(19), x.dispersion && o.enable(20), x.batchingColor && o.enable(21), x.gradientMap && o.enable(22), E.push(o.mask), o.disableAll(), x.fog && o.enable(0), x.useFog && o.enable(1), x.flatShading && o.enable(2), x.logarithmicDepthBuffer && o.enable(3), x.reversedDepthBuffer && o.enable(4), x.skinning && o.enable(5), x.morphTargets && o.enable(6), x.morphNormals && o.enable(7), x.morphColors && o.enable(8), x.premultipliedAlpha && o.enable(9), x.shadowMapEnabled && o.enable(10), x.doubleSided && o.enable(11), x.flipSided && o.enable(12), x.useDepthPacking && o.enable(13), x.dithering && o.enable(14), x.transmission && o.enable(15), x.sheen && o.enable(16), x.opaque && o.enable(17), x.pointsUvs && o.enable(18), x.decodeVideoTexture && o.enable(19), x.decodeVideoTextureEmissive && o.enable(20), x.alphaToCoverage && o.enable(21), E.push(o.mask);
27367
+ function S(E, v) {
27368
+ o.disableAll(), v.supportsVertexTextures && o.enable(0), v.instancing && o.enable(1), v.instancingColor && o.enable(2), v.instancingMorph && o.enable(3), v.matcap && o.enable(4), v.envMap && o.enable(5), v.normalMapObjectSpace && o.enable(6), v.normalMapTangentSpace && o.enable(7), v.clearcoat && o.enable(8), v.iridescence && o.enable(9), v.alphaTest && o.enable(10), v.vertexColors && o.enable(11), v.vertexAlphas && o.enable(12), v.vertexUv1s && o.enable(13), v.vertexUv2s && o.enable(14), v.vertexUv3s && o.enable(15), v.vertexTangents && o.enable(16), v.anisotropy && o.enable(17), v.alphaHash && o.enable(18), v.batching && o.enable(19), v.dispersion && o.enable(20), v.batchingColor && o.enable(21), v.gradientMap && o.enable(22), E.push(o.mask), o.disableAll(), v.fog && o.enable(0), v.useFog && o.enable(1), v.flatShading && o.enable(2), v.logarithmicDepthBuffer && o.enable(3), v.reversedDepthBuffer && o.enable(4), v.skinning && o.enable(5), v.morphTargets && o.enable(6), v.morphNormals && o.enable(7), v.morphColors && o.enable(8), v.premultipliedAlpha && o.enable(9), v.shadowMapEnabled && o.enable(10), v.doubleSided && o.enable(11), v.flipSided && o.enable(12), v.useDepthPacking && o.enable(13), v.dithering && o.enable(14), v.transmission && o.enable(15), v.sheen && o.enable(16), v.opaque && o.enable(17), v.pointsUvs && o.enable(18), v.decodeVideoTexture && o.enable(19), v.decodeVideoTextureEmissive && o.enable(20), v.alphaToCoverage && o.enable(21), E.push(o.mask);
27369
27369
  }
27370
- function v(E) {
27371
- const x = p[E.type];
27370
+ function x(E) {
27371
+ const v = p[E.type];
27372
27372
  let b;
27373
- if (x) {
27374
- const z = Ii[x];
27373
+ if (v) {
27374
+ const z = Ii[v];
27375
27375
  b = Of.clone(z.uniforms);
27376
27376
  } else
27377
27377
  b = E.uniforms;
27378
27378
  return b;
27379
27379
  }
27380
- function T(E, x) {
27380
+ function T(E, v) {
27381
27381
  let b;
27382
27382
  for (let z = 0, F = A.length; z < F; z++) {
27383
27383
  const U = A[z];
27384
- if (U.cacheKey === x) {
27384
+ if (U.cacheKey === v) {
27385
27385
  b = U, ++b.usedTimes;
27386
27386
  break;
27387
27387
  }
27388
27388
  }
27389
- return b === void 0 && (b = new AI(s, x, E, r), A.push(b)), b;
27389
+ return b === void 0 && (b = new AI(s, v, E, r), A.push(b)), b;
27390
27390
  }
27391
27391
  function _(E) {
27392
27392
  if (--E.usedTimes === 0) {
27393
- const x = A.indexOf(E);
27394
- A[x] = A[A.length - 1], A.pop(), E.destroy();
27393
+ const v = A.indexOf(E);
27394
+ A[v] = A[A.length - 1], A.pop(), E.destroy();
27395
27395
  }
27396
27396
  }
27397
27397
  function w(E) {
@@ -27403,7 +27403,7 @@ function fI(s, t, e, i, n, r, a) {
27403
27403
  return {
27404
27404
  getParameters: g,
27405
27405
  getProgramCacheKey: f,
27406
- getUniforms: v,
27406
+ getUniforms: x,
27407
27407
  acquireProgram: T,
27408
27408
  releaseProgram: _,
27409
27409
  releaseShaderCache: w,
@@ -27603,8 +27603,8 @@ function II() {
27603
27603
  }
27604
27604
  };
27605
27605
  }
27606
- let vI = 0;
27607
- function xI(s, t) {
27606
+ let xI = 0;
27607
+ function vI(s, t) {
27608
27608
  return (t.castShadow ? 2 : 0) - (s.castShadow ? 2 : 0) + (t.map ? 1 : 0) - (s.map ? 1 : 0);
27609
27609
  }
27610
27610
  function EI(s) {
@@ -27649,9 +27649,9 @@ function EI(s) {
27649
27649
  function o(l) {
27650
27650
  let A = 0, c = 0, u = 0;
27651
27651
  for (let E = 0; E < 9; E++) i.probe[E].set(0, 0, 0);
27652
- let d = 0, p = 0, m = 0, g = 0, f = 0, M = 0, S = 0, v = 0, T = 0, _ = 0, w = 0;
27653
- l.sort(xI);
27654
- for (let E = 0, x = l.length; E < x; E++) {
27652
+ let d = 0, p = 0, m = 0, g = 0, f = 0, M = 0, S = 0, x = 0, T = 0, _ = 0, w = 0;
27653
+ l.sort(vI);
27654
+ for (let E = 0, v = l.length; E < v; E++) {
27655
27655
  const b = l[E], z = b.color, F = b.intensity, U = b.distance, W = b.shadow && b.shadow.map ? b.shadow.map.texture : null;
27656
27656
  if (b.isAmbientLight)
27657
27657
  A += z.r * F, c += z.g * F, u += z.b * F;
@@ -27672,7 +27672,7 @@ function EI(s) {
27672
27672
  const $ = b.shadow;
27673
27673
  if (b.map && (i.spotLightMap[T] = b.map, T++, $.updateMatrices(b), b.castShadow && _++), i.spotLightMatrix[m] = $.matrix, b.castShadow) {
27674
27674
  const H = e.get(b);
27675
- H.shadowIntensity = $.intensity, H.shadowBias = $.bias, H.shadowNormalBias = $.normalBias, H.shadowRadius = $.radius, H.shadowMapSize = $.mapSize, i.spotShadow[m] = H, i.spotShadowMap[m] = W, v++;
27675
+ H.shadowIntensity = $.intensity, H.shadowBias = $.bias, H.shadowNormalBias = $.normalBias, H.shadowRadius = $.radius, H.shadowMapSize = $.mapSize, i.spotShadow[m] = H, i.spotShadowMap[m] = W, x++;
27676
27676
  }
27677
27677
  m++;
27678
27678
  } else if (b.isRectAreaLight) {
@@ -27692,7 +27692,7 @@ function EI(s) {
27692
27692
  }
27693
27693
  g > 0 && (s.has("OES_texture_float_linear") === !0 ? (i.rectAreaLTC1 = at.LTC_FLOAT_1, i.rectAreaLTC2 = at.LTC_FLOAT_2) : (i.rectAreaLTC1 = at.LTC_HALF_1, i.rectAreaLTC2 = at.LTC_HALF_2)), i.ambient[0] = A, i.ambient[1] = c, i.ambient[2] = u;
27694
27694
  const P = i.hash;
27695
- (P.directionalLength !== d || P.pointLength !== p || P.spotLength !== m || P.rectAreaLength !== g || P.hemiLength !== f || P.numDirectionalShadows !== M || P.numPointShadows !== S || P.numSpotShadows !== v || P.numSpotMaps !== T || P.numLightProbes !== w) && (i.directional.length = d, i.spot.length = m, i.rectArea.length = g, i.point.length = p, i.hemi.length = f, i.directionalShadow.length = M, i.directionalShadowMap.length = M, i.pointShadow.length = S, i.pointShadowMap.length = S, i.spotShadow.length = v, i.spotShadowMap.length = v, i.directionalShadowMatrix.length = M, i.pointShadowMatrix.length = S, i.spotLightMatrix.length = v + T - _, i.spotLightMap.length = T, i.numSpotLightShadowsWithMaps = _, i.numLightProbes = w, P.directionalLength = d, P.pointLength = p, P.spotLength = m, P.rectAreaLength = g, P.hemiLength = f, P.numDirectionalShadows = M, P.numPointShadows = S, P.numSpotShadows = v, P.numSpotMaps = T, P.numLightProbes = w, i.version = vI++);
27695
+ (P.directionalLength !== d || P.pointLength !== p || P.spotLength !== m || P.rectAreaLength !== g || P.hemiLength !== f || P.numDirectionalShadows !== M || P.numPointShadows !== S || P.numSpotShadows !== x || P.numSpotMaps !== T || P.numLightProbes !== w) && (i.directional.length = d, i.spot.length = m, i.rectArea.length = g, i.point.length = p, i.hemi.length = f, i.directionalShadow.length = M, i.directionalShadowMap.length = M, i.pointShadow.length = S, i.pointShadowMap.length = S, i.spotShadow.length = x, i.spotShadowMap.length = x, i.directionalShadowMatrix.length = M, i.pointShadowMatrix.length = S, i.spotLightMatrix.length = x + T - _, i.spotLightMap.length = T, i.numSpotLightShadowsWithMaps = _, i.numLightProbes = w, P.directionalLength = d, P.pointLength = p, P.spotLength = m, P.rectAreaLength = g, P.hemiLength = f, P.numDirectionalShadows = M, P.numPointShadows = S, P.numSpotShadows = x, P.numSpotMaps = T, P.numLightProbes = w, i.version = xI++);
27696
27696
  }
27697
27697
  function h(l, A) {
27698
27698
  let c = 0, u = 0, d = 0, p = 0, m = 0;
@@ -27700,20 +27700,20 @@ function EI(s) {
27700
27700
  for (let f = 0, M = l.length; f < M; f++) {
27701
27701
  const S = l[f];
27702
27702
  if (S.isDirectionalLight) {
27703
- const v = i.directional[c];
27704
- v.direction.setFromMatrixPosition(S.matrixWorld), n.setFromMatrixPosition(S.target.matrixWorld), v.direction.sub(n), v.direction.transformDirection(g), c++;
27703
+ const x = i.directional[c];
27704
+ x.direction.setFromMatrixPosition(S.matrixWorld), n.setFromMatrixPosition(S.target.matrixWorld), x.direction.sub(n), x.direction.transformDirection(g), c++;
27705
27705
  } else if (S.isSpotLight) {
27706
- const v = i.spot[d];
27707
- v.position.setFromMatrixPosition(S.matrixWorld), v.position.applyMatrix4(g), v.direction.setFromMatrixPosition(S.matrixWorld), n.setFromMatrixPosition(S.target.matrixWorld), v.direction.sub(n), v.direction.transformDirection(g), d++;
27706
+ const x = i.spot[d];
27707
+ x.position.setFromMatrixPosition(S.matrixWorld), x.position.applyMatrix4(g), x.direction.setFromMatrixPosition(S.matrixWorld), n.setFromMatrixPosition(S.target.matrixWorld), x.direction.sub(n), x.direction.transformDirection(g), d++;
27708
27708
  } else if (S.isRectAreaLight) {
27709
- const v = i.rectArea[p];
27710
- v.position.setFromMatrixPosition(S.matrixWorld), v.position.applyMatrix4(g), a.identity(), r.copy(S.matrixWorld), r.premultiply(g), a.extractRotation(r), v.halfWidth.set(S.width * 0.5, 0, 0), v.halfHeight.set(0, S.height * 0.5, 0), v.halfWidth.applyMatrix4(a), v.halfHeight.applyMatrix4(a), p++;
27709
+ const x = i.rectArea[p];
27710
+ x.position.setFromMatrixPosition(S.matrixWorld), x.position.applyMatrix4(g), a.identity(), r.copy(S.matrixWorld), r.premultiply(g), a.extractRotation(r), x.halfWidth.set(S.width * 0.5, 0, 0), x.halfHeight.set(0, S.height * 0.5, 0), x.halfWidth.applyMatrix4(a), x.halfHeight.applyMatrix4(a), p++;
27711
27711
  } else if (S.isPointLight) {
27712
- const v = i.point[u];
27713
- v.position.setFromMatrixPosition(S.matrixWorld), v.position.applyMatrix4(g), u++;
27712
+ const x = i.point[u];
27713
+ x.position.setFromMatrixPosition(S.matrixWorld), x.position.applyMatrix4(g), u++;
27714
27714
  } else if (S.isHemisphereLight) {
27715
- const v = i.hemi[m];
27716
- v.direction.setFromMatrixPosition(S.matrixWorld), v.direction.transformDirection(g), m++;
27715
+ const x = i.hemi[m];
27716
+ x.direction.setFromMatrixPosition(S.matrixWorld), x.direction.transformDirection(g), m++;
27717
27717
  }
27718
27718
  }
27719
27719
  }
@@ -27828,7 +27828,7 @@ function bI(s, t, e) {
27828
27828
  let f = this.type;
27829
27829
  this.render = function(_, w, P) {
27830
27830
  if (g.enabled === !1 || g.autoUpdate === !1 && g.needsUpdate === !1 || _.length === 0) return;
27831
- const E = s.getRenderTarget(), x = s.getActiveCubeFace(), b = s.getActiveMipmapLevel(), z = s.state;
27831
+ const E = s.getRenderTarget(), v = s.getActiveCubeFace(), b = s.getActiveMipmapLevel(), z = s.state;
27832
27832
  z.setBlending(on), z.buffers.depth.getReversed() ? z.buffers.color.setClear(0, 0, 0, 0) : z.buffers.color.setClear(1, 1, 1, 1), z.buffers.depth.setTest(!0), z.setScissorTest(!1);
27833
27833
  const F = f !== Ui && this.type === Ui, U = f === Ui && this.type !== Ui;
27834
27834
  for (let W = 0, Y = _.length; W < Y; W++) {
@@ -27853,37 +27853,37 @@ function bI(s, t, e) {
27853
27853
  r.y * Ut.y,
27854
27854
  r.x * Ut.z,
27855
27855
  r.y * Ut.w
27856
- ), z.viewport(a), H.updateMatrices($, mt), i = H.getFrustum(), v(w, P, H.camera, $, this.type);
27856
+ ), z.viewport(a), H.updateMatrices($, mt), i = H.getFrustum(), x(w, P, H.camera, $, this.type);
27857
27857
  }
27858
27858
  H.isPointLightShadow !== !0 && this.type === Ui && M(H, P), H.needsUpdate = !1;
27859
27859
  }
27860
- f = this.type, g.needsUpdate = !1, s.setRenderTarget(E, x, b);
27860
+ f = this.type, g.needsUpdate = !1, s.setRenderTarget(E, v, b);
27861
27861
  };
27862
27862
  function M(_, w) {
27863
27863
  const P = t.update(m);
27864
27864
  u.defines.VSM_SAMPLES !== _.blurSamples && (u.defines.VSM_SAMPLES = _.blurSamples, d.defines.VSM_SAMPLES = _.blurSamples, u.needsUpdate = !0, d.needsUpdate = !0), _.mapPass === null && (_.mapPass = new kn(n.x, n.y)), u.uniforms.shadow_pass.value = _.map.texture, u.uniforms.resolution.value = _.mapSize, u.uniforms.radius.value = _.radius, s.setRenderTarget(_.mapPass), s.clear(), s.renderBufferDirect(w, null, P, u, m, null), d.uniforms.shadow_pass.value = _.mapPass.texture, d.uniforms.resolution.value = _.mapSize, d.uniforms.radius.value = _.radius, s.setRenderTarget(_.map), s.clear(), s.renderBufferDirect(w, null, P, d, m, null);
27865
27865
  }
27866
27866
  function S(_, w, P, E) {
27867
- let x = null;
27867
+ let v = null;
27868
27868
  const b = P.isPointLight === !0 ? _.customDistanceMaterial : _.customDepthMaterial;
27869
27869
  if (b !== void 0)
27870
- x = b;
27871
- else if (x = P.isPointLight === !0 ? h : o, s.localClippingEnabled && w.clipShadows === !0 && Array.isArray(w.clippingPlanes) && w.clippingPlanes.length !== 0 || w.displacementMap && w.displacementScale !== 0 || w.alphaMap && w.alphaTest > 0 || w.map && w.alphaTest > 0 || w.alphaToCoverage === !0) {
27872
- const z = x.uuid, F = w.uuid;
27870
+ v = b;
27871
+ else if (v = P.isPointLight === !0 ? h : o, s.localClippingEnabled && w.clipShadows === !0 && Array.isArray(w.clippingPlanes) && w.clippingPlanes.length !== 0 || w.displacementMap && w.displacementScale !== 0 || w.alphaMap && w.alphaTest > 0 || w.map && w.alphaTest > 0 || w.alphaToCoverage === !0) {
27872
+ const z = v.uuid, F = w.uuid;
27873
27873
  let U = l[z];
27874
27874
  U === void 0 && (U = {}, l[z] = U);
27875
27875
  let W = U[F];
27876
- W === void 0 && (W = x.clone(), U[F] = W, w.addEventListener("dispose", T)), x = W;
27876
+ W === void 0 && (W = v.clone(), U[F] = W, w.addEventListener("dispose", T)), v = W;
27877
27877
  }
27878
- if (x.visible = w.visible, x.wireframe = w.wireframe, E === Ui ? x.side = w.shadowSide !== null ? w.shadowSide : w.side : x.side = w.shadowSide !== null ? w.shadowSide : c[w.side], x.alphaMap = w.alphaMap, x.alphaTest = w.alphaToCoverage === !0 ? 0.5 : w.alphaTest, x.map = w.map, x.clipShadows = w.clipShadows, x.clippingPlanes = w.clippingPlanes, x.clipIntersection = w.clipIntersection, x.displacementMap = w.displacementMap, x.displacementScale = w.displacementScale, x.displacementBias = w.displacementBias, x.wireframeLinewidth = w.wireframeLinewidth, x.linewidth = w.linewidth, P.isPointLight === !0 && x.isMeshDistanceMaterial === !0) {
27879
- const z = s.properties.get(x);
27878
+ if (v.visible = w.visible, v.wireframe = w.wireframe, E === Ui ? v.side = w.shadowSide !== null ? w.shadowSide : w.side : v.side = w.shadowSide !== null ? w.shadowSide : c[w.side], v.alphaMap = w.alphaMap, v.alphaTest = w.alphaToCoverage === !0 ? 0.5 : w.alphaTest, v.map = w.map, v.clipShadows = w.clipShadows, v.clippingPlanes = w.clippingPlanes, v.clipIntersection = w.clipIntersection, v.displacementMap = w.displacementMap, v.displacementScale = w.displacementScale, v.displacementBias = w.displacementBias, v.wireframeLinewidth = w.wireframeLinewidth, v.linewidth = w.linewidth, P.isPointLight === !0 && v.isMeshDistanceMaterial === !0) {
27879
+ const z = s.properties.get(v);
27880
27880
  z.light = P;
27881
27881
  }
27882
- return x;
27882
+ return v;
27883
27883
  }
27884
- function v(_, w, P, E, x) {
27884
+ function x(_, w, P, E, v) {
27885
27885
  if (_.visible === !1) return;
27886
- if (_.layers.test(w.layers) && (_.isMesh || _.isLine || _.isPoints) && (_.castShadow || _.receiveShadow && x === Ui) && (!_.frustumCulled || i.intersectsObject(_))) {
27886
+ if (_.layers.test(w.layers) && (_.isMesh || _.isLine || _.isPoints) && (_.castShadow || _.receiveShadow && v === Ui) && (!_.frustumCulled || i.intersectsObject(_))) {
27887
27887
  _.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse, _.matrixWorld);
27888
27888
  const F = t.update(_), U = _.material;
27889
27889
  if (Array.isArray(U)) {
@@ -27891,24 +27891,24 @@ function bI(s, t, e) {
27891
27891
  for (let Y = 0, $ = W.length; Y < $; Y++) {
27892
27892
  const H = W[Y], rt = U[H.materialIndex];
27893
27893
  if (rt && rt.visible) {
27894
- const ht = S(_, rt, E, x);
27894
+ const ht = S(_, rt, E, v);
27895
27895
  _.onBeforeShadow(s, _, w, P, F, ht, H), s.renderBufferDirect(P, null, F, ht, _, H), _.onAfterShadow(s, _, w, P, F, ht, H);
27896
27896
  }
27897
27897
  }
27898
27898
  } else if (U.visible) {
27899
- const W = S(_, U, E, x);
27899
+ const W = S(_, U, E, v);
27900
27900
  _.onBeforeShadow(s, _, w, P, F, W, null), s.renderBufferDirect(P, null, F, W, _, null), _.onAfterShadow(s, _, w, P, F, W, null);
27901
27901
  }
27902
27902
  }
27903
27903
  const z = _.children;
27904
27904
  for (let F = 0, U = z.length; F < U; F++)
27905
- v(z[F], w, P, E, x);
27905
+ x(z[F], w, P, E, v);
27906
27906
  }
27907
27907
  function T(_) {
27908
27908
  _.target.removeEventListener("dispose", T);
27909
27909
  for (const P in l) {
27910
- const E = l[P], x = _.target.uuid;
27911
- x in E && (E[x].dispose(), delete E[x]);
27910
+ const E = l[P], v = _.target.uuid;
27911
+ v in E && (E[v].dispose(), delete E[v]);
27912
27912
  }
27913
27913
  }
27914
27914
  }
@@ -28034,7 +28034,7 @@ function TI(s, t) {
28034
28034
  };
28035
28035
  }
28036
28036
  const r = new e(), a = new i(), o = new n(), h = /* @__PURE__ */ new WeakMap(), l = /* @__PURE__ */ new WeakMap();
28037
- let A = {}, c = {}, u = /* @__PURE__ */ new WeakMap(), d = [], p = null, m = !1, g = null, f = null, M = null, S = null, v = null, T = null, _ = null, w = new Wt(0, 0, 0), P = 0, E = !1, x = null, b = null, z = null, F = null, U = null;
28037
+ let A = {}, c = {}, u = /* @__PURE__ */ new WeakMap(), d = [], p = null, m = !1, g = null, f = null, M = null, S = null, x = null, T = null, _ = null, w = new Wt(0, 0, 0), P = 0, E = !1, v = null, b = null, z = null, F = null, U = null;
28038
28038
  const W = s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
28039
28039
  let Y = !1, $ = 0;
28040
28040
  const H = s.getParameter(s.VERSION);
@@ -28106,9 +28106,9 @@ function TI(s, t) {
28106
28106
  }
28107
28107
  if (m === !1 && (nt(s.BLEND), m = !0), D !== Td) {
28108
28108
  if (D !== g || Jt !== E) {
28109
- if ((f !== wn || v !== wn) && (s.blendEquation(s.FUNC_ADD), f = wn, v = wn), Jt)
28109
+ if ((f !== wn || x !== wn) && (s.blendEquation(s.FUNC_ADD), f = wn, x = wn), Jt)
28110
28110
  switch (D) {
28111
- case vs:
28111
+ case xs:
28112
28112
  s.blendFuncSeparate(s.ONE, s.ONE_MINUS_SRC_ALPHA, s.ONE, s.ONE_MINUS_SRC_ALPHA);
28113
28113
  break;
28114
28114
  case mh:
@@ -28126,7 +28126,7 @@ function TI(s, t) {
28126
28126
  }
28127
28127
  else
28128
28128
  switch (D) {
28129
- case vs:
28129
+ case xs:
28130
28130
  s.blendFuncSeparate(s.SRC_ALPHA, s.ONE_MINUS_SRC_ALPHA, s.ONE, s.ONE_MINUS_SRC_ALPHA);
28131
28131
  break;
28132
28132
  case mh:
@@ -28146,17 +28146,17 @@ function TI(s, t) {
28146
28146
  }
28147
28147
  return;
28148
28148
  }
28149
- q = q || et, J = J || st, pt = pt || dt, (et !== f || q !== v) && (s.blendEquationSeparate(Yt[et], Yt[q]), f = et, v = q), (st !== M || dt !== S || J !== T || pt !== _) && (s.blendFuncSeparate(R[st], R[dt], R[J], R[pt]), M = st, S = dt, T = J, _ = pt), (Lt.equals(w) === !1 || ne !== P) && (s.blendColor(Lt.r, Lt.g, Lt.b, ne), w.copy(Lt), P = ne), g = D, E = !1;
28149
+ q = q || et, J = J || st, pt = pt || dt, (et !== f || q !== x) && (s.blendEquationSeparate(Yt[et], Yt[q]), f = et, x = q), (st !== M || dt !== S || J !== T || pt !== _) && (s.blendFuncSeparate(R[st], R[dt], R[J], R[pt]), M = st, S = dt, T = J, _ = pt), (Lt.equals(w) === !1 || ne !== P) && (s.blendColor(Lt.r, Lt.g, Lt.b, ne), w.copy(Lt), P = ne), g = D, E = !1;
28150
28150
  }
28151
28151
  function yt(D, et) {
28152
28152
  D.side === zi ? bt(s.CULL_FACE) : nt(s.CULL_FACE);
28153
28153
  let st = D.side === He;
28154
- et && (st = !st), jt(st), D.blending === vs && D.transparent === !1 ? ie(on) : ie(D.blending, D.blendEquation, D.blendSrc, D.blendDst, D.blendEquationAlpha, D.blendSrcAlpha, D.blendDstAlpha, D.blendColor, D.blendAlpha, D.premultipliedAlpha), a.setFunc(D.depthFunc), a.setTest(D.depthTest), a.setMask(D.depthWrite), r.setMask(D.colorWrite);
28154
+ et && (st = !st), jt(st), D.blending === xs && D.transparent === !1 ? ie(on) : ie(D.blending, D.blendEquation, D.blendSrc, D.blendDst, D.blendEquationAlpha, D.blendSrcAlpha, D.blendDstAlpha, D.blendColor, D.blendAlpha, D.premultipliedAlpha), a.setFunc(D.depthFunc), a.setTest(D.depthTest), a.setMask(D.depthWrite), r.setMask(D.colorWrite);
28155
28155
  const dt = D.stencilWrite;
28156
28156
  o.setTest(dt), dt && (o.setMask(D.stencilWriteMask), o.setFunc(D.stencilFunc, D.stencilRef, D.stencilFuncMask), o.setOp(D.stencilFail, D.stencilZFail, D.stencilZPass)), ft(D.polygonOffset, D.polygonOffsetFactor, D.polygonOffsetUnits), D.alphaToCoverage === !0 ? nt(s.SAMPLE_ALPHA_TO_COVERAGE) : bt(s.SAMPLE_ALPHA_TO_COVERAGE);
28157
28157
  }
28158
28158
  function jt(D) {
28159
- x !== D && (D ? s.frontFace(s.CW) : s.frontFace(s.CCW), x = D);
28159
+ v !== D && (D ? s.frontFace(s.CW) : s.frontFace(s.CCW), v = D);
28160
28160
  }
28161
28161
  function Et(D) {
28162
28162
  D !== Md ? (nt(s.CULL_FACE), D !== b && (D === ph ? s.cullFace(s.BACK) : D === bd ? s.cullFace(s.FRONT) : s.cullFace(s.FRONT_AND_BACK))) : bt(s.CULL_FACE), b = D;
@@ -28170,7 +28170,7 @@ function TI(s, t) {
28170
28170
  function zt(D) {
28171
28171
  D ? nt(s.SCISSOR_TEST) : bt(s.SCISSOR_TEST);
28172
28172
  }
28173
- function xe(D) {
28173
+ function ve(D) {
28174
28174
  D === void 0 && (D = s.TEXTURE0 + W - 1), rt !== D && (s.activeTexture(D), rt = D);
28175
28175
  }
28176
28176
  function fe(D, et, st) {
@@ -28217,7 +28217,7 @@ function TI(s, t) {
28217
28217
  console.error("THREE.WebGLState:", D);
28218
28218
  }
28219
28219
  }
28220
- function xt() {
28220
+ function vt() {
28221
28221
  try {
28222
28222
  s.compressedTexSubImage3D(...arguments);
28223
28223
  } catch (D) {
@@ -28258,7 +28258,7 @@ function TI(s, t) {
28258
28258
  function wt(D) {
28259
28259
  te.equals(D) === !1 && (s.viewport(D.x, D.y, D.z, D.w), te.copy(D));
28260
28260
  }
28261
- function vt(D, et) {
28261
+ function xt(D, et) {
28262
28262
  let st = l.get(et);
28263
28263
  st === void 0 && (st = /* @__PURE__ */ new WeakMap(), l.set(et, st));
28264
28264
  let dt = st.get(D);
@@ -28269,7 +28269,7 @@ function TI(s, t) {
28269
28269
  h.get(et) !== dt && (s.uniformBlockBinding(et, dt, D.__bindingPointIndex), h.set(et, dt));
28270
28270
  }
28271
28271
  function Ot() {
28272
- s.disable(s.BLEND), s.disable(s.CULL_FACE), s.disable(s.DEPTH_TEST), s.disable(s.POLYGON_OFFSET_FILL), s.disable(s.SCISSOR_TEST), s.disable(s.STENCIL_TEST), s.disable(s.SAMPLE_ALPHA_TO_COVERAGE), s.blendEquation(s.FUNC_ADD), s.blendFunc(s.ONE, s.ZERO), s.blendFuncSeparate(s.ONE, s.ZERO, s.ONE, s.ZERO), s.blendColor(0, 0, 0, 0), s.colorMask(!0, !0, !0, !0), s.clearColor(0, 0, 0, 0), s.depthMask(!0), s.depthFunc(s.LESS), a.setReversed(!1), s.clearDepth(1), s.stencilMask(4294967295), s.stencilFunc(s.ALWAYS, 0, 4294967295), s.stencilOp(s.KEEP, s.KEEP, s.KEEP), s.clearStencil(0), s.cullFace(s.BACK), s.frontFace(s.CCW), s.polygonOffset(0, 0), s.activeTexture(s.TEXTURE0), s.bindFramebuffer(s.FRAMEBUFFER, null), s.bindFramebuffer(s.DRAW_FRAMEBUFFER, null), s.bindFramebuffer(s.READ_FRAMEBUFFER, null), s.useProgram(null), s.lineWidth(1), s.scissor(0, 0, s.canvas.width, s.canvas.height), s.viewport(0, 0, s.canvas.width, s.canvas.height), A = {}, rt = null, ht = {}, c = {}, u = /* @__PURE__ */ new WeakMap(), d = [], p = null, m = !1, g = null, f = null, M = null, S = null, v = null, T = null, _ = null, w = new Wt(0, 0, 0), P = 0, E = !1, x = null, b = null, z = null, F = null, U = null, re.set(0, 0, s.canvas.width, s.canvas.height), te.set(0, 0, s.canvas.width, s.canvas.height), r.reset(), a.reset(), o.reset();
28272
+ s.disable(s.BLEND), s.disable(s.CULL_FACE), s.disable(s.DEPTH_TEST), s.disable(s.POLYGON_OFFSET_FILL), s.disable(s.SCISSOR_TEST), s.disable(s.STENCIL_TEST), s.disable(s.SAMPLE_ALPHA_TO_COVERAGE), s.blendEquation(s.FUNC_ADD), s.blendFunc(s.ONE, s.ZERO), s.blendFuncSeparate(s.ONE, s.ZERO, s.ONE, s.ZERO), s.blendColor(0, 0, 0, 0), s.colorMask(!0, !0, !0, !0), s.clearColor(0, 0, 0, 0), s.depthMask(!0), s.depthFunc(s.LESS), a.setReversed(!1), s.clearDepth(1), s.stencilMask(4294967295), s.stencilFunc(s.ALWAYS, 0, 4294967295), s.stencilOp(s.KEEP, s.KEEP, s.KEEP), s.clearStencil(0), s.cullFace(s.BACK), s.frontFace(s.CCW), s.polygonOffset(0, 0), s.activeTexture(s.TEXTURE0), s.bindFramebuffer(s.FRAMEBUFFER, null), s.bindFramebuffer(s.DRAW_FRAMEBUFFER, null), s.bindFramebuffer(s.READ_FRAMEBUFFER, null), s.useProgram(null), s.lineWidth(1), s.scissor(0, 0, s.canvas.width, s.canvas.height), s.viewport(0, 0, s.canvas.width, s.canvas.height), A = {}, rt = null, ht = {}, c = {}, u = /* @__PURE__ */ new WeakMap(), d = [], p = null, m = !1, g = null, f = null, M = null, S = null, x = null, T = null, _ = null, w = new Wt(0, 0, 0), P = 0, E = !1, v = null, b = null, z = null, F = null, U = null, re.set(0, 0, s.canvas.width, s.canvas.height), te.set(0, 0, s.canvas.width, s.canvas.height), r.reset(), a.reset(), o.reset();
28273
28273
  }
28274
28274
  return {
28275
28275
  buffers: {
@@ -28289,21 +28289,21 @@ function TI(s, t) {
28289
28289
  setLineWidth: ae,
28290
28290
  setPolygonOffset: ft,
28291
28291
  setScissorTest: zt,
28292
- activeTexture: xe,
28292
+ activeTexture: ve,
28293
28293
  bindTexture: fe,
28294
28294
  unbindTexture: y,
28295
28295
  compressedTexImage2D: C,
28296
28296
  compressedTexImage3D: B,
28297
28297
  texImage2D: It,
28298
28298
  texImage3D: tt,
28299
- updateUBOMapping: vt,
28299
+ updateUBOMapping: xt,
28300
28300
  uniformBlockBinding: lt,
28301
28301
  texStorage2D: it,
28302
28302
  texStorage3D: Ct,
28303
28303
  texSubImage2D: Z,
28304
28304
  texSubImage3D: Q,
28305
28305
  compressedTexSubImage2D: X,
28306
- compressedTexSubImage3D: xt,
28306
+ compressedTexSubImage3D: vt,
28307
28307
  scissor: ct,
28308
28308
  viewport: wt,
28309
28309
  reset: Ot
@@ -28329,10 +28329,10 @@ function wI(s, t, e, i, n, r, a) {
28329
28329
  const Q = fe(y);
28330
28330
  if ((Q.width > B || Q.height > B) && (Z = B / Math.max(Q.width, Q.height)), Z < 1)
28331
28331
  if (typeof HTMLImageElement < "u" && y instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && y instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && y instanceof ImageBitmap || typeof VideoFrame < "u" && y instanceof VideoFrame) {
28332
- const X = Math.floor(Z * Q.width), xt = Math.floor(Z * Q.height);
28333
- c === void 0 && (c = p(X, xt));
28334
- const it = C ? p(X, xt) : c;
28335
- return it.width = X, it.height = xt, it.getContext("2d").drawImage(y, 0, 0, X, xt), console.warn("THREE.WebGLRenderer: Texture has been resized from (" + Q.width + "x" + Q.height + ") to (" + X + "x" + xt + ")."), it;
28332
+ const X = Math.floor(Z * Q.width), vt = Math.floor(Z * Q.height);
28333
+ c === void 0 && (c = p(X, vt));
28334
+ const it = C ? p(X, vt) : c;
28335
+ return it.width = X, it.height = vt, it.getContext("2d").drawImage(y, 0, 0, X, vt), console.warn("THREE.WebGLRenderer: Texture has been resized from (" + Q.width + "x" + Q.height + ") to (" + X + "x" + vt + ")."), it;
28336
28336
  } else
28337
28337
  return "data" in y && console.warn("THREE.WebGLRenderer: Image in DataTexture is too big (" + Q.width + "x" + Q.height + ")."), y;
28338
28338
  return y;
@@ -28353,17 +28353,17 @@ function wI(s, t, e, i, n, r, a) {
28353
28353
  }
28354
28354
  let X = C;
28355
28355
  if (C === s.RED && (B === s.FLOAT && (X = s.R32F), B === s.HALF_FLOAT && (X = s.R16F), B === s.UNSIGNED_BYTE && (X = s.R8)), C === s.RED_INTEGER && (B === s.UNSIGNED_BYTE && (X = s.R8UI), B === s.UNSIGNED_SHORT && (X = s.R16UI), B === s.UNSIGNED_INT && (X = s.R32UI), B === s.BYTE && (X = s.R8I), B === s.SHORT && (X = s.R16I), B === s.INT && (X = s.R32I)), C === s.RG && (B === s.FLOAT && (X = s.RG32F), B === s.HALF_FLOAT && (X = s.RG16F), B === s.UNSIGNED_BYTE && (X = s.RG8)), C === s.RG_INTEGER && (B === s.UNSIGNED_BYTE && (X = s.RG8UI), B === s.UNSIGNED_SHORT && (X = s.RG16UI), B === s.UNSIGNED_INT && (X = s.RG32UI), B === s.BYTE && (X = s.RG8I), B === s.SHORT && (X = s.RG16I), B === s.INT && (X = s.RG32I)), C === s.RGB_INTEGER && (B === s.UNSIGNED_BYTE && (X = s.RGB8UI), B === s.UNSIGNED_SHORT && (X = s.RGB16UI), B === s.UNSIGNED_INT && (X = s.RGB32UI), B === s.BYTE && (X = s.RGB8I), B === s.SHORT && (X = s.RGB16I), B === s.INT && (X = s.RGB32I)), C === s.RGBA_INTEGER && (B === s.UNSIGNED_BYTE && (X = s.RGBA8UI), B === s.UNSIGNED_SHORT && (X = s.RGBA16UI), B === s.UNSIGNED_INT && (X = s.RGBA32UI), B === s.BYTE && (X = s.RGBA8I), B === s.SHORT && (X = s.RGBA16I), B === s.INT && (X = s.RGBA32I)), C === s.RGB && B === s.UNSIGNED_INT_5_9_9_9_REV && (X = s.RGB9_E5), C === s.RGBA) {
28356
- const xt = Q ? oa : Zt.getTransfer(Z);
28357
- B === s.FLOAT && (X = s.RGBA32F), B === s.HALF_FLOAT && (X = s.RGBA16F), B === s.UNSIGNED_BYTE && (X = xt === Kt ? s.SRGB8_ALPHA8 : s.RGBA8), B === s.UNSIGNED_SHORT_4_4_4_4 && (X = s.RGBA4), B === s.UNSIGNED_SHORT_5_5_5_1 && (X = s.RGB5_A1);
28356
+ const vt = Q ? oa : Zt.getTransfer(Z);
28357
+ B === s.FLOAT && (X = s.RGBA32F), B === s.HALF_FLOAT && (X = s.RGBA16F), B === s.UNSIGNED_BYTE && (X = vt === Kt ? s.SRGB8_ALPHA8 : s.RGBA8), B === s.UNSIGNED_SHORT_4_4_4_4 && (X = s.RGBA4), B === s.UNSIGNED_SHORT_5_5_5_1 && (X = s.RGB5_A1);
28358
28358
  }
28359
28359
  return (X === s.R16F || X === s.R32F || X === s.RG16F || X === s.RG32F || X === s.RGBA16F || X === s.RGBA32F) && t.get("EXT_color_buffer_float"), X;
28360
28360
  }
28361
- function v(y, C) {
28361
+ function x(y, C) {
28362
28362
  let B;
28363
28363
  return y ? C === null || C === Un || C === js ? B = s.DEPTH24_STENCIL8 : C === ki ? B = s.DEPTH32F_STENCIL8 : C === Zs && (B = s.DEPTH24_STENCIL8, console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")) : C === null || C === Un || C === js ? B = s.DEPTH_COMPONENT24 : C === ki ? B = s.DEPTH_COMPONENT32F : C === Zs && (B = s.DEPTH_COMPONENT16), B;
28364
28364
  }
28365
28365
  function T(y, C) {
28366
- return g(y) === !0 || y.isFramebufferTexture && y.minFilter !== mi && y.minFilter !== vi ? Math.log2(Math.max(C.width, C.height)) + 1 : y.mipmaps !== void 0 && y.mipmaps.length > 0 ? y.mipmaps.length : y.isCompressedTexture && Array.isArray(y.image) ? C.mipmaps.length : 1;
28366
+ return g(y) === !0 || y.isFramebufferTexture && y.minFilter !== mi && y.minFilter !== xi ? Math.log2(Math.max(C.width, C.height)) + 1 : y.mipmaps !== void 0 && y.mipmaps.length > 0 ? y.mipmaps.length : y.isCompressedTexture && Array.isArray(y.image) ? C.mipmaps.length : 1;
28367
28367
  }
28368
28368
  function _(y) {
28369
28369
  const C = y.target;
@@ -28371,7 +28371,7 @@ function wI(s, t, e, i, n, r, a) {
28371
28371
  }
28372
28372
  function w(y) {
28373
28373
  const C = y.target;
28374
- C.removeEventListener("dispose", w), x(C);
28374
+ C.removeEventListener("dispose", w), v(C);
28375
28375
  }
28376
28376
  function P(y) {
28377
28377
  const C = i.get(y);
@@ -28389,7 +28389,7 @@ function wI(s, t, e, i, n, r, a) {
28389
28389
  const B = y.source, Z = u.get(B);
28390
28390
  delete Z[C.__cacheKey], a.memory.textures--;
28391
28391
  }
28392
- function x(y) {
28392
+ function v(y) {
28393
28393
  const C = i.get(y);
28394
28394
  if (y.depthTexture && (y.depthTexture.dispose(), i.remove(y.depthTexture)), y.isWebGLCubeRenderTarget)
28395
28395
  for (let Z = 0; Z < 6; Z++) {
@@ -28475,7 +28475,7 @@ function wI(s, t, e, i, n, r, a) {
28475
28475
  [mi]: s.NEAREST,
28476
28476
  [ef]: s.NEAREST_MIPMAP_NEAREST,
28477
28477
  [wr]: s.NEAREST_MIPMAP_LINEAR,
28478
- [vi]: s.LINEAR,
28478
+ [xi]: s.LINEAR,
28479
28479
  [ka]: s.LINEAR_MIPMAP_NEAREST,
28480
28480
  [Ln]: s.LINEAR_MIPMAP_LINEAR
28481
28481
  }, mt = {
@@ -28489,7 +28489,7 @@ function wI(s, t, e, i, n, r, a) {
28489
28489
  [Af]: s.NOTEQUAL
28490
28490
  };
28491
28491
  function Ut(y, C) {
28492
- if (C.type === ki && t.has("OES_texture_float_linear") === !1 && (C.magFilter === vi || C.magFilter === ka || C.magFilter === wr || C.magFilter === Ln || C.minFilter === vi || C.minFilter === ka || C.minFilter === wr || C.minFilter === Ln) && console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), s.texParameteri(y, s.TEXTURE_WRAP_S, rt[C.wrapS]), s.texParameteri(y, s.TEXTURE_WRAP_T, rt[C.wrapT]), (y === s.TEXTURE_3D || y === s.TEXTURE_2D_ARRAY) && s.texParameteri(y, s.TEXTURE_WRAP_R, rt[C.wrapR]), s.texParameteri(y, s.TEXTURE_MAG_FILTER, ht[C.magFilter]), s.texParameteri(y, s.TEXTURE_MIN_FILTER, ht[C.minFilter]), C.compareFunction && (s.texParameteri(y, s.TEXTURE_COMPARE_MODE, s.COMPARE_REF_TO_TEXTURE), s.texParameteri(y, s.TEXTURE_COMPARE_FUNC, mt[C.compareFunction])), t.has("EXT_texture_filter_anisotropic") === !0) {
28492
+ if (C.type === ki && t.has("OES_texture_float_linear") === !1 && (C.magFilter === xi || C.magFilter === ka || C.magFilter === wr || C.magFilter === Ln || C.minFilter === xi || C.minFilter === ka || C.minFilter === wr || C.minFilter === Ln) && console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), s.texParameteri(y, s.TEXTURE_WRAP_S, rt[C.wrapS]), s.texParameteri(y, s.TEXTURE_WRAP_T, rt[C.wrapT]), (y === s.TEXTURE_3D || y === s.TEXTURE_2D_ARRAY) && s.texParameteri(y, s.TEXTURE_WRAP_R, rt[C.wrapR]), s.texParameteri(y, s.TEXTURE_MAG_FILTER, ht[C.magFilter]), s.texParameteri(y, s.TEXTURE_MIN_FILTER, ht[C.minFilter]), C.compareFunction && (s.texParameteri(y, s.TEXTURE_COMPARE_MODE, s.COMPARE_REF_TO_TEXTURE), s.texParameteri(y, s.TEXTURE_COMPARE_FUNC, mt[C.compareFunction])), t.has("EXT_texture_filter_anisotropic") === !0) {
28493
28493
  if (C.magFilter === mi || C.minFilter !== wr && C.minFilter !== Ln || C.type === ki && t.has("OES_texture_float_linear") === !1) return;
28494
28494
  if (C.anisotropy > 1 || i.get(C).__currentAnisotropy) {
28495
28495
  const B = t.get("EXT_texture_filter_anisotropic");
@@ -28509,8 +28509,8 @@ function wI(s, t, e, i, n, r, a) {
28509
28509
  texture: s.createTexture(),
28510
28510
  usedTimes: 0
28511
28511
  }, a.memory.textures++, B = !0), Q[X].usedTimes++;
28512
- const xt = Q[y.__cacheKey];
28513
- xt !== void 0 && (Q[y.__cacheKey].usedTimes--, xt.usedTimes === 0 && E(C)), y.__cacheKey = X, y.__webglTexture = Q[X].texture;
28512
+ const vt = Q[y.__cacheKey];
28513
+ vt !== void 0 && (Q[y.__cacheKey].usedTimes--, vt.usedTimes === 0 && E(C)), y.__cacheKey = X, y.__webglTexture = Q[X].texture;
28514
28514
  }
28515
28515
  return B;
28516
28516
  }
@@ -28523,19 +28523,19 @@ function wI(s, t, e, i, n, r, a) {
28523
28523
  e.texSubImage2D(s.TEXTURE_2D, 0, 0, 0, C.width, C.height, B, Z, C.data);
28524
28524
  else {
28525
28525
  X.sort((tt, ct) => tt.start - ct.start);
28526
- let xt = 0;
28526
+ let vt = 0;
28527
28527
  for (let tt = 1; tt < X.length; tt++) {
28528
- const ct = X[xt], wt = X[tt], vt = ct.start + ct.count, lt = te(wt.start, C.width, 4), Ot = te(ct.start, C.width, 4);
28529
- wt.start <= vt + 1 && lt === Ot && te(wt.start + wt.count - 1, C.width, 4) === lt ? ct.count = Math.max(
28528
+ const ct = X[vt], wt = X[tt], xt = ct.start + ct.count, lt = te(wt.start, C.width, 4), Ot = te(ct.start, C.width, 4);
28529
+ wt.start <= xt + 1 && lt === Ot && te(wt.start + wt.count - 1, C.width, 4) === lt ? ct.count = Math.max(
28530
28530
  ct.count,
28531
28531
  wt.start + wt.count - ct.start
28532
- ) : (++xt, X[xt] = wt);
28532
+ ) : (++vt, X[vt] = wt);
28533
28533
  }
28534
- X.length = xt + 1;
28534
+ X.length = vt + 1;
28535
28535
  const it = s.getParameter(s.UNPACK_ROW_LENGTH), Ct = s.getParameter(s.UNPACK_SKIP_PIXELS), It = s.getParameter(s.UNPACK_SKIP_ROWS);
28536
28536
  s.pixelStorei(s.UNPACK_ROW_LENGTH, C.width);
28537
28537
  for (let tt = 0, ct = X.length; tt < ct; tt++) {
28538
- const wt = X[tt], vt = Math.floor(wt.start / 4), lt = Math.ceil(wt.count / 4), Ot = vt % C.width, D = Math.floor(vt / C.width), et = lt, st = 1;
28538
+ const wt = X[tt], xt = Math.floor(wt.start / 4), lt = Math.ceil(wt.count / 4), Ot = xt % C.width, D = Math.floor(xt / C.width), et = lt, st = 1;
28539
28539
  s.pixelStorei(s.UNPACK_SKIP_PIXELS, Ot), s.pixelStorei(s.UNPACK_SKIP_ROWS, D), e.texSubImage2D(s.TEXTURE_2D, 0, Ot, D, et, st, B, Z, C.data);
28540
28540
  }
28541
28541
  y.clearUpdateRanges(), s.pixelStorei(s.UNPACK_ROW_LENGTH, it), s.pixelStorei(s.UNPACK_SKIP_PIXELS, Ct), s.pixelStorei(s.UNPACK_SKIP_ROWS, It);
@@ -28546,31 +28546,31 @@ function wI(s, t, e, i, n, r, a) {
28546
28546
  (C.isDataArrayTexture || C.isCompressedArrayTexture) && (Z = s.TEXTURE_2D_ARRAY), C.isData3DTexture && (Z = s.TEXTURE_3D);
28547
28547
  const Q = re(y, C), X = C.source;
28548
28548
  e.bindTexture(Z, y.__webglTexture, s.TEXTURE0 + B);
28549
- const xt = i.get(X);
28550
- if (X.version !== xt.__version || Q === !0) {
28549
+ const vt = i.get(X);
28550
+ if (X.version !== vt.__version || Q === !0) {
28551
28551
  e.activeTexture(s.TEXTURE0 + B);
28552
28552
  const it = Zt.getPrimaries(Zt.workingColorSpace), Ct = C.colorSpace === rn ? null : Zt.getPrimaries(C.colorSpace), It = C.colorSpace === rn || it === Ct ? s.NONE : s.BROWSER_DEFAULT_WEBGL;
28553
28553
  s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, C.flipY), s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, C.premultiplyAlpha), s.pixelStorei(s.UNPACK_ALIGNMENT, C.unpackAlignment), s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL, It);
28554
28554
  let tt = m(C.image, !1, n.maxTextureSize);
28555
- tt = xe(C, tt);
28555
+ tt = ve(C, tt);
28556
28556
  const ct = r.convert(C.format, C.colorSpace), wt = r.convert(C.type);
28557
- let vt = S(C.internalFormat, ct, wt, C.colorSpace, C.isVideoTexture);
28557
+ let xt = S(C.internalFormat, ct, wt, C.colorSpace, C.isVideoTexture);
28558
28558
  Ut(Z, C);
28559
28559
  let lt;
28560
- const Ot = C.mipmaps, D = C.isVideoTexture !== !0, et = xt.__version === void 0 || Q === !0, st = X.dataReady, dt = T(C, tt);
28560
+ const Ot = C.mipmaps, D = C.isVideoTexture !== !0, et = vt.__version === void 0 || Q === !0, st = X.dataReady, dt = T(C, tt);
28561
28561
  if (C.isDepthTexture)
28562
- vt = v(C.format === Qs, C.type), et && (D ? e.texStorage2D(s.TEXTURE_2D, 1, vt, tt.width, tt.height) : e.texImage2D(s.TEXTURE_2D, 0, vt, tt.width, tt.height, 0, ct, wt, null));
28562
+ xt = x(C.format === Qs, C.type), et && (D ? e.texStorage2D(s.TEXTURE_2D, 1, xt, tt.width, tt.height) : e.texImage2D(s.TEXTURE_2D, 0, xt, tt.width, tt.height, 0, ct, wt, null));
28563
28563
  else if (C.isDataTexture)
28564
28564
  if (Ot.length > 0) {
28565
- D && et && e.texStorage2D(s.TEXTURE_2D, dt, vt, Ot[0].width, Ot[0].height);
28565
+ D && et && e.texStorage2D(s.TEXTURE_2D, dt, xt, Ot[0].width, Ot[0].height);
28566
28566
  for (let q = 0, J = Ot.length; q < J; q++)
28567
- lt = Ot[q], D ? st && e.texSubImage2D(s.TEXTURE_2D, q, 0, 0, lt.width, lt.height, ct, wt, lt.data) : e.texImage2D(s.TEXTURE_2D, q, vt, lt.width, lt.height, 0, ct, wt, lt.data);
28567
+ lt = Ot[q], D ? st && e.texSubImage2D(s.TEXTURE_2D, q, 0, 0, lt.width, lt.height, ct, wt, lt.data) : e.texImage2D(s.TEXTURE_2D, q, xt, lt.width, lt.height, 0, ct, wt, lt.data);
28568
28568
  C.generateMipmaps = !1;
28569
28569
  } else
28570
- D ? (et && e.texStorage2D(s.TEXTURE_2D, dt, vt, tt.width, tt.height), st && j(C, tt, ct, wt)) : e.texImage2D(s.TEXTURE_2D, 0, vt, tt.width, tt.height, 0, ct, wt, tt.data);
28570
+ D ? (et && e.texStorage2D(s.TEXTURE_2D, dt, xt, tt.width, tt.height), st && j(C, tt, ct, wt)) : e.texImage2D(s.TEXTURE_2D, 0, xt, tt.width, tt.height, 0, ct, wt, tt.data);
28571
28571
  else if (C.isCompressedTexture)
28572
28572
  if (C.isCompressedArrayTexture) {
28573
- D && et && e.texStorage3D(s.TEXTURE_2D_ARRAY, dt, vt, Ot[0].width, Ot[0].height, tt.depth);
28573
+ D && et && e.texStorage3D(s.TEXTURE_2D_ARRAY, dt, xt, Ot[0].width, Ot[0].height, tt.depth);
28574
28574
  for (let q = 0, J = Ot.length; q < J; q++)
28575
28575
  if (lt = Ot[q], C.format !== fi)
28576
28576
  if (ct !== null)
@@ -28589,19 +28589,19 @@ function wI(s, t, e, i, n, r, a) {
28589
28589
  } else
28590
28590
  e.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY, q, 0, 0, 0, lt.width, lt.height, tt.depth, ct, lt.data);
28591
28591
  } else
28592
- e.compressedTexImage3D(s.TEXTURE_2D_ARRAY, q, vt, lt.width, lt.height, tt.depth, 0, lt.data, 0, 0);
28592
+ e.compressedTexImage3D(s.TEXTURE_2D_ARRAY, q, xt, lt.width, lt.height, tt.depth, 0, lt.data, 0, 0);
28593
28593
  else
28594
28594
  console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");
28595
28595
  else
28596
- D ? st && e.texSubImage3D(s.TEXTURE_2D_ARRAY, q, 0, 0, 0, lt.width, lt.height, tt.depth, ct, wt, lt.data) : e.texImage3D(s.TEXTURE_2D_ARRAY, q, vt, lt.width, lt.height, tt.depth, 0, ct, wt, lt.data);
28596
+ D ? st && e.texSubImage3D(s.TEXTURE_2D_ARRAY, q, 0, 0, 0, lt.width, lt.height, tt.depth, ct, wt, lt.data) : e.texImage3D(s.TEXTURE_2D_ARRAY, q, xt, lt.width, lt.height, tt.depth, 0, ct, wt, lt.data);
28597
28597
  } else {
28598
- D && et && e.texStorage2D(s.TEXTURE_2D, dt, vt, Ot[0].width, Ot[0].height);
28598
+ D && et && e.texStorage2D(s.TEXTURE_2D, dt, xt, Ot[0].width, Ot[0].height);
28599
28599
  for (let q = 0, J = Ot.length; q < J; q++)
28600
- lt = Ot[q], C.format !== fi ? ct !== null ? D ? st && e.compressedTexSubImage2D(s.TEXTURE_2D, q, 0, 0, lt.width, lt.height, ct, lt.data) : e.compressedTexImage2D(s.TEXTURE_2D, q, vt, lt.width, lt.height, 0, lt.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : D ? st && e.texSubImage2D(s.TEXTURE_2D, q, 0, 0, lt.width, lt.height, ct, wt, lt.data) : e.texImage2D(s.TEXTURE_2D, q, vt, lt.width, lt.height, 0, ct, wt, lt.data);
28600
+ lt = Ot[q], C.format !== fi ? ct !== null ? D ? st && e.compressedTexSubImage2D(s.TEXTURE_2D, q, 0, 0, lt.width, lt.height, ct, lt.data) : e.compressedTexImage2D(s.TEXTURE_2D, q, xt, lt.width, lt.height, 0, lt.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : D ? st && e.texSubImage2D(s.TEXTURE_2D, q, 0, 0, lt.width, lt.height, ct, wt, lt.data) : e.texImage2D(s.TEXTURE_2D, q, xt, lt.width, lt.height, 0, ct, wt, lt.data);
28601
28601
  }
28602
28602
  else if (C.isDataArrayTexture)
28603
28603
  if (D) {
28604
- if (et && e.texStorage3D(s.TEXTURE_2D_ARRAY, dt, vt, tt.width, tt.height, tt.depth), st)
28604
+ if (et && e.texStorage3D(s.TEXTURE_2D_ARRAY, dt, xt, tt.width, tt.height, tt.depth), st)
28605
28605
  if (C.layerUpdates.size > 0) {
28606
28606
  const q = Yh(tt.width, tt.height, C.format, C.type);
28607
28607
  for (const J of C.layerUpdates) {
@@ -28615,35 +28615,35 @@ function wI(s, t, e, i, n, r, a) {
28615
28615
  } else
28616
28616
  e.texSubImage3D(s.TEXTURE_2D_ARRAY, 0, 0, 0, 0, tt.width, tt.height, tt.depth, ct, wt, tt.data);
28617
28617
  } else
28618
- e.texImage3D(s.TEXTURE_2D_ARRAY, 0, vt, tt.width, tt.height, tt.depth, 0, ct, wt, tt.data);
28618
+ e.texImage3D(s.TEXTURE_2D_ARRAY, 0, xt, tt.width, tt.height, tt.depth, 0, ct, wt, tt.data);
28619
28619
  else if (C.isData3DTexture)
28620
- D ? (et && e.texStorage3D(s.TEXTURE_3D, dt, vt, tt.width, tt.height, tt.depth), st && e.texSubImage3D(s.TEXTURE_3D, 0, 0, 0, 0, tt.width, tt.height, tt.depth, ct, wt, tt.data)) : e.texImage3D(s.TEXTURE_3D, 0, vt, tt.width, tt.height, tt.depth, 0, ct, wt, tt.data);
28620
+ D ? (et && e.texStorage3D(s.TEXTURE_3D, dt, xt, tt.width, tt.height, tt.depth), st && e.texSubImage3D(s.TEXTURE_3D, 0, 0, 0, 0, tt.width, tt.height, tt.depth, ct, wt, tt.data)) : e.texImage3D(s.TEXTURE_3D, 0, xt, tt.width, tt.height, tt.depth, 0, ct, wt, tt.data);
28621
28621
  else if (C.isFramebufferTexture) {
28622
28622
  if (et)
28623
28623
  if (D)
28624
- e.texStorage2D(s.TEXTURE_2D, dt, vt, tt.width, tt.height);
28624
+ e.texStorage2D(s.TEXTURE_2D, dt, xt, tt.width, tt.height);
28625
28625
  else {
28626
28626
  let q = tt.width, J = tt.height;
28627
28627
  for (let pt = 0; pt < dt; pt++)
28628
- e.texImage2D(s.TEXTURE_2D, pt, vt, q, J, 0, ct, wt, null), q >>= 1, J >>= 1;
28628
+ e.texImage2D(s.TEXTURE_2D, pt, xt, q, J, 0, ct, wt, null), q >>= 1, J >>= 1;
28629
28629
  }
28630
28630
  } else if (Ot.length > 0) {
28631
28631
  if (D && et) {
28632
28632
  const q = fe(Ot[0]);
28633
- e.texStorage2D(s.TEXTURE_2D, dt, vt, q.width, q.height);
28633
+ e.texStorage2D(s.TEXTURE_2D, dt, xt, q.width, q.height);
28634
28634
  }
28635
28635
  for (let q = 0, J = Ot.length; q < J; q++)
28636
- lt = Ot[q], D ? st && e.texSubImage2D(s.TEXTURE_2D, q, 0, 0, ct, wt, lt) : e.texImage2D(s.TEXTURE_2D, q, vt, ct, wt, lt);
28636
+ lt = Ot[q], D ? st && e.texSubImage2D(s.TEXTURE_2D, q, 0, 0, ct, wt, lt) : e.texImage2D(s.TEXTURE_2D, q, xt, ct, wt, lt);
28637
28637
  C.generateMipmaps = !1;
28638
28638
  } else if (D) {
28639
28639
  if (et) {
28640
28640
  const q = fe(tt);
28641
- e.texStorage2D(s.TEXTURE_2D, dt, vt, q.width, q.height);
28641
+ e.texStorage2D(s.TEXTURE_2D, dt, xt, q.width, q.height);
28642
28642
  }
28643
28643
  st && e.texSubImage2D(s.TEXTURE_2D, 0, 0, 0, ct, wt, tt);
28644
28644
  } else
28645
- e.texImage2D(s.TEXTURE_2D, 0, vt, ct, wt, tt);
28646
- g(C) && f(Z), xt.__version = X.version, C.onUpdate && C.onUpdate(C);
28645
+ e.texImage2D(s.TEXTURE_2D, 0, xt, ct, wt, tt);
28646
+ g(C) && f(Z), vt.__version = X.version, C.onUpdate && C.onUpdate(C);
28647
28647
  }
28648
28648
  y.__version = C.version;
28649
28649
  }
@@ -28654,12 +28654,12 @@ function wI(s, t, e, i, n, r, a) {
28654
28654
  const X = i.get(Q);
28655
28655
  if (Q.version !== X.__version || Z === !0) {
28656
28656
  e.activeTexture(s.TEXTURE0 + B);
28657
- const xt = Zt.getPrimaries(Zt.workingColorSpace), it = C.colorSpace === rn ? null : Zt.getPrimaries(C.colorSpace), Ct = C.colorSpace === rn || xt === it ? s.NONE : s.BROWSER_DEFAULT_WEBGL;
28657
+ const vt = Zt.getPrimaries(Zt.workingColorSpace), it = C.colorSpace === rn ? null : Zt.getPrimaries(C.colorSpace), Ct = C.colorSpace === rn || vt === it ? s.NONE : s.BROWSER_DEFAULT_WEBGL;
28658
28658
  s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, C.flipY), s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, C.premultiplyAlpha), s.pixelStorei(s.UNPACK_ALIGNMENT, C.unpackAlignment), s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL, Ct);
28659
28659
  const It = C.isCompressedTexture || C.image[0].isCompressedTexture, tt = C.image[0] && C.image[0].isDataTexture, ct = [];
28660
28660
  for (let J = 0; J < 6; J++)
28661
- !It && !tt ? ct[J] = m(C.image[J], !0, n.maxCubemapSize) : ct[J] = tt ? C.image[J].image : C.image[J], ct[J] = xe(C, ct[J]);
28662
- const wt = ct[0], vt = r.convert(C.format, C.colorSpace), lt = r.convert(C.type), Ot = S(C.internalFormat, vt, lt, C.colorSpace), D = C.isVideoTexture !== !0, et = X.__version === void 0 || Z === !0, st = Q.dataReady;
28661
+ !It && !tt ? ct[J] = m(C.image[J], !0, n.maxCubemapSize) : ct[J] = tt ? C.image[J].image : C.image[J], ct[J] = ve(C, ct[J]);
28662
+ const wt = ct[0], xt = r.convert(C.format, C.colorSpace), lt = r.convert(C.type), Ot = S(C.internalFormat, xt, lt, C.colorSpace), D = C.isVideoTexture !== !0, et = X.__version === void 0 || Z === !0, st = Q.dataReady;
28663
28663
  let dt = T(C, wt);
28664
28664
  Ut(s.TEXTURE_CUBE_MAP, C);
28665
28665
  let q;
@@ -28669,7 +28669,7 @@ function wI(s, t, e, i, n, r, a) {
28669
28669
  q = ct[J].mipmaps;
28670
28670
  for (let pt = 0; pt < q.length; pt++) {
28671
28671
  const Lt = q[pt];
28672
- C.format !== fi ? vt !== null ? D ? st && e.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt, 0, 0, Lt.width, Lt.height, vt, Lt.data) : e.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt, Ot, Lt.width, Lt.height, 0, Lt.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : D ? st && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt, 0, 0, Lt.width, Lt.height, vt, lt, Lt.data) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt, Ot, Lt.width, Lt.height, 0, vt, lt, Lt.data);
28672
+ C.format !== fi ? xt !== null ? D ? st && e.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt, 0, 0, Lt.width, Lt.height, xt, Lt.data) : e.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt, Ot, Lt.width, Lt.height, 0, Lt.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : D ? st && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt, 0, 0, Lt.width, Lt.height, xt, lt, Lt.data) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt, Ot, Lt.width, Lt.height, 0, xt, lt, Lt.data);
28673
28673
  }
28674
28674
  }
28675
28675
  } else {
@@ -28680,16 +28680,16 @@ function wI(s, t, e, i, n, r, a) {
28680
28680
  }
28681
28681
  for (let J = 0; J < 6; J++)
28682
28682
  if (tt) {
28683
- D ? st && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, 0, 0, 0, ct[J].width, ct[J].height, vt, lt, ct[J].data) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, 0, Ot, ct[J].width, ct[J].height, 0, vt, lt, ct[J].data);
28683
+ D ? st && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, 0, 0, 0, ct[J].width, ct[J].height, xt, lt, ct[J].data) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, 0, Ot, ct[J].width, ct[J].height, 0, xt, lt, ct[J].data);
28684
28684
  for (let pt = 0; pt < q.length; pt++) {
28685
28685
  const ne = q[pt].image[J].image;
28686
- D ? st && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt + 1, 0, 0, ne.width, ne.height, vt, lt, ne.data) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt + 1, Ot, ne.width, ne.height, 0, vt, lt, ne.data);
28686
+ D ? st && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt + 1, 0, 0, ne.width, ne.height, xt, lt, ne.data) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt + 1, Ot, ne.width, ne.height, 0, xt, lt, ne.data);
28687
28687
  }
28688
28688
  } else {
28689
- D ? st && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, 0, 0, 0, vt, lt, ct[J]) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, 0, Ot, vt, lt, ct[J]);
28689
+ D ? st && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, 0, 0, 0, xt, lt, ct[J]) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, 0, Ot, xt, lt, ct[J]);
28690
28690
  for (let pt = 0; pt < q.length; pt++) {
28691
28691
  const Lt = q[pt];
28692
- D ? st && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt + 1, 0, 0, vt, lt, Lt.image[J]) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt + 1, Ot, vt, lt, Lt.image[J]);
28692
+ D ? st && e.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt + 1, 0, 0, xt, lt, Lt.image[J]) : e.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X + J, pt + 1, Ot, xt, lt, Lt.image[J]);
28693
28693
  }
28694
28694
  }
28695
28695
  }
@@ -28698,21 +28698,21 @@ function wI(s, t, e, i, n, r, a) {
28698
28698
  y.__version = C.version;
28699
28699
  }
28700
28700
  function bt(y, C, B, Z, Q, X) {
28701
- const xt = r.convert(B.format, B.colorSpace), it = r.convert(B.type), Ct = S(B.internalFormat, xt, it, B.colorSpace), It = i.get(C), tt = i.get(B);
28701
+ const vt = r.convert(B.format, B.colorSpace), it = r.convert(B.type), Ct = S(B.internalFormat, vt, it, B.colorSpace), It = i.get(C), tt = i.get(B);
28702
28702
  if (tt.__renderTarget = C, !It.__hasExternalTextures) {
28703
28703
  const ct = Math.max(1, C.width >> X), wt = Math.max(1, C.height >> X);
28704
- Q === s.TEXTURE_3D || Q === s.TEXTURE_2D_ARRAY ? e.texImage3D(Q, X, Ct, ct, wt, C.depth, 0, xt, it, null) : e.texImage2D(Q, X, Ct, ct, wt, 0, xt, it, null);
28704
+ Q === s.TEXTURE_3D || Q === s.TEXTURE_2D_ARRAY ? e.texImage3D(Q, X, Ct, ct, wt, C.depth, 0, vt, it, null) : e.texImage2D(Q, X, Ct, ct, wt, 0, vt, it, null);
28705
28705
  }
28706
28706
  e.bindFramebuffer(s.FRAMEBUFFER, y), ft(C) ? o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, Z, Q, tt.__webglTexture, 0, ae(C)) : (Q === s.TEXTURE_2D || Q >= s.TEXTURE_CUBE_MAP_POSITIVE_X && Q <= s.TEXTURE_CUBE_MAP_NEGATIVE_Z) && s.framebufferTexture2D(s.FRAMEBUFFER, Z, Q, tt.__webglTexture, X), e.bindFramebuffer(s.FRAMEBUFFER, null);
28707
28707
  }
28708
28708
  function _t(y, C, B) {
28709
28709
  if (s.bindRenderbuffer(s.RENDERBUFFER, y), C.depthBuffer) {
28710
- const Z = C.depthTexture, Q = Z && Z.isDepthTexture ? Z.type : null, X = v(C.stencilBuffer, Q), xt = C.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, it = ae(C);
28711
- ft(C) ? o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, it, X, C.width, C.height) : B ? s.renderbufferStorageMultisample(s.RENDERBUFFER, it, X, C.width, C.height) : s.renderbufferStorage(s.RENDERBUFFER, X, C.width, C.height), s.framebufferRenderbuffer(s.FRAMEBUFFER, xt, s.RENDERBUFFER, y);
28710
+ const Z = C.depthTexture, Q = Z && Z.isDepthTexture ? Z.type : null, X = x(C.stencilBuffer, Q), vt = C.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, it = ae(C);
28711
+ ft(C) ? o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, it, X, C.width, C.height) : B ? s.renderbufferStorageMultisample(s.RENDERBUFFER, it, X, C.width, C.height) : s.renderbufferStorage(s.RENDERBUFFER, X, C.width, C.height), s.framebufferRenderbuffer(s.FRAMEBUFFER, vt, s.RENDERBUFFER, y);
28712
28712
  } else {
28713
28713
  const Z = C.textures;
28714
28714
  for (let Q = 0; Q < Z.length; Q++) {
28715
- const X = Z[Q], xt = r.convert(X.format, X.colorSpace), it = r.convert(X.type), Ct = S(X.internalFormat, xt, it, X.colorSpace), It = ae(C);
28715
+ const X = Z[Q], vt = r.convert(X.format, X.colorSpace), it = r.convert(X.type), Ct = S(X.internalFormat, vt, it, X.colorSpace), It = ae(C);
28716
28716
  B && ft(C) === !1 ? s.renderbufferStorageMultisample(s.RENDERBUFFER, It, Ct, C.width, C.height) : ft(C) ? o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, It, Ct, C.width, C.height) : s.renderbufferStorage(s.RENDERBUFFER, Ct, C.width, C.height);
28717
28717
  }
28718
28718
  }
@@ -28775,8 +28775,8 @@ function wI(s, t, e, i, n, r, a) {
28775
28775
  function R(y) {
28776
28776
  const C = y.texture, B = i.get(y), Z = i.get(C);
28777
28777
  y.addEventListener("dispose", w);
28778
- const Q = y.textures, X = y.isWebGLCubeRenderTarget === !0, xt = Q.length > 1;
28779
- if (xt || (Z.__webglTexture === void 0 && (Z.__webglTexture = s.createTexture()), Z.__version = C.version, a.memory.textures++), X) {
28778
+ const Q = y.textures, X = y.isWebGLCubeRenderTarget === !0, vt = Q.length > 1;
28779
+ if (vt || (Z.__webglTexture === void 0 && (Z.__webglTexture = s.createTexture()), Z.__version = C.version, a.memory.textures++), X) {
28780
28780
  B.__webglFramebuffer = [];
28781
28781
  for (let it = 0; it < 6; it++)
28782
28782
  if (C.mipmaps && C.mipmaps.length > 0) {
@@ -28792,7 +28792,7 @@ function wI(s, t, e, i, n, r, a) {
28792
28792
  B.__webglFramebuffer[it] = s.createFramebuffer();
28793
28793
  } else
28794
28794
  B.__webglFramebuffer = s.createFramebuffer();
28795
- if (xt)
28795
+ if (vt)
28796
28796
  for (let it = 0, Ct = Q.length; it < Ct; it++) {
28797
28797
  const It = i.get(Q[it]);
28798
28798
  It.__webglTexture === void 0 && (It.__webglTexture = s.createTexture(), a.memory.textures++);
@@ -28817,7 +28817,7 @@ function wI(s, t, e, i, n, r, a) {
28817
28817
  else
28818
28818
  bt(B.__webglFramebuffer[it], y, C, s.COLOR_ATTACHMENT0, s.TEXTURE_CUBE_MAP_POSITIVE_X + it, 0);
28819
28819
  g(C) && f(s.TEXTURE_CUBE_MAP), e.unbindTexture();
28820
- } else if (xt) {
28820
+ } else if (vt) {
28821
28821
  for (let it = 0, Ct = Q.length; it < Ct; it++) {
28822
28822
  const It = Q[it], tt = i.get(It);
28823
28823
  let ct = s.TEXTURE_2D;
@@ -28840,8 +28840,8 @@ function wI(s, t, e, i, n, r, a) {
28840
28840
  for (let B = 0, Z = C.length; B < Z; B++) {
28841
28841
  const Q = C[B];
28842
28842
  if (g(Q)) {
28843
- const X = M(y), xt = i.get(Q).__webglTexture;
28844
- e.bindTexture(X, xt), f(X), e.unbindTexture();
28843
+ const X = M(y), vt = i.get(Q).__webglTexture;
28844
+ e.bindTexture(X, vt), f(X), e.unbindTexture();
28845
28845
  }
28846
28846
  }
28847
28847
  }
@@ -28851,16 +28851,16 @@ function wI(s, t, e, i, n, r, a) {
28851
28851
  if (ft(y) === !1) {
28852
28852
  const C = y.textures, B = y.width, Z = y.height;
28853
28853
  let Q = s.COLOR_BUFFER_BIT;
28854
- const X = y.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, xt = i.get(y), it = C.length > 1;
28854
+ const X = y.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, vt = i.get(y), it = C.length > 1;
28855
28855
  if (it)
28856
28856
  for (let It = 0; It < C.length; It++)
28857
- e.bindFramebuffer(s.FRAMEBUFFER, xt.__webglMultisampledFramebuffer), s.framebufferRenderbuffer(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0 + It, s.RENDERBUFFER, null), e.bindFramebuffer(s.FRAMEBUFFER, xt.__webglFramebuffer), s.framebufferTexture2D(s.DRAW_FRAMEBUFFER, s.COLOR_ATTACHMENT0 + It, s.TEXTURE_2D, null, 0);
28858
- e.bindFramebuffer(s.READ_FRAMEBUFFER, xt.__webglMultisampledFramebuffer);
28857
+ e.bindFramebuffer(s.FRAMEBUFFER, vt.__webglMultisampledFramebuffer), s.framebufferRenderbuffer(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0 + It, s.RENDERBUFFER, null), e.bindFramebuffer(s.FRAMEBUFFER, vt.__webglFramebuffer), s.framebufferTexture2D(s.DRAW_FRAMEBUFFER, s.COLOR_ATTACHMENT0 + It, s.TEXTURE_2D, null, 0);
28858
+ e.bindFramebuffer(s.READ_FRAMEBUFFER, vt.__webglMultisampledFramebuffer);
28859
28859
  const Ct = y.texture.mipmaps;
28860
- Ct && Ct.length > 0 ? e.bindFramebuffer(s.DRAW_FRAMEBUFFER, xt.__webglFramebuffer[0]) : e.bindFramebuffer(s.DRAW_FRAMEBUFFER, xt.__webglFramebuffer);
28860
+ Ct && Ct.length > 0 ? e.bindFramebuffer(s.DRAW_FRAMEBUFFER, vt.__webglFramebuffer[0]) : e.bindFramebuffer(s.DRAW_FRAMEBUFFER, vt.__webglFramebuffer);
28861
28861
  for (let It = 0; It < C.length; It++) {
28862
28862
  if (y.resolveDepthBuffer && (y.depthBuffer && (Q |= s.DEPTH_BUFFER_BIT), y.stencilBuffer && y.resolveStencilBuffer && (Q |= s.STENCIL_BUFFER_BIT)), it) {
28863
- s.framebufferRenderbuffer(s.READ_FRAMEBUFFER, s.COLOR_ATTACHMENT0, s.RENDERBUFFER, xt.__webglColorRenderbuffer[It]);
28863
+ s.framebufferRenderbuffer(s.READ_FRAMEBUFFER, s.COLOR_ATTACHMENT0, s.RENDERBUFFER, vt.__webglColorRenderbuffer[It]);
28864
28864
  const tt = i.get(C[It]).__webglTexture;
28865
28865
  s.framebufferTexture2D(s.DRAW_FRAMEBUFFER, s.COLOR_ATTACHMENT0, s.TEXTURE_2D, tt, 0);
28866
28866
  }
@@ -28868,11 +28868,11 @@ function wI(s, t, e, i, n, r, a) {
28868
28868
  }
28869
28869
  if (e.bindFramebuffer(s.READ_FRAMEBUFFER, null), e.bindFramebuffer(s.DRAW_FRAMEBUFFER, null), it)
28870
28870
  for (let It = 0; It < C.length; It++) {
28871
- e.bindFramebuffer(s.FRAMEBUFFER, xt.__webglMultisampledFramebuffer), s.framebufferRenderbuffer(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0 + It, s.RENDERBUFFER, xt.__webglColorRenderbuffer[It]);
28871
+ e.bindFramebuffer(s.FRAMEBUFFER, vt.__webglMultisampledFramebuffer), s.framebufferRenderbuffer(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0 + It, s.RENDERBUFFER, vt.__webglColorRenderbuffer[It]);
28872
28872
  const tt = i.get(C[It]).__webglTexture;
28873
- e.bindFramebuffer(s.FRAMEBUFFER, xt.__webglFramebuffer), s.framebufferTexture2D(s.DRAW_FRAMEBUFFER, s.COLOR_ATTACHMENT0 + It, s.TEXTURE_2D, tt, 0);
28873
+ e.bindFramebuffer(s.FRAMEBUFFER, vt.__webglFramebuffer), s.framebufferTexture2D(s.DRAW_FRAMEBUFFER, s.COLOR_ATTACHMENT0 + It, s.TEXTURE_2D, tt, 0);
28874
28874
  }
28875
- e.bindFramebuffer(s.DRAW_FRAMEBUFFER, xt.__webglMultisampledFramebuffer);
28875
+ e.bindFramebuffer(s.DRAW_FRAMEBUFFER, vt.__webglMultisampledFramebuffer);
28876
28876
  } else if (y.depthBuffer && y.resolveDepthBuffer === !1 && h) {
28877
28877
  const C = y.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT;
28878
28878
  s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER, [C]);
@@ -28890,7 +28890,7 @@ function wI(s, t, e, i, n, r, a) {
28890
28890
  const C = a.render.frame;
28891
28891
  A.get(y) !== C && (A.set(y, C), y.update());
28892
28892
  }
28893
- function xe(y, C) {
28893
+ function ve(y, C) {
28894
28894
  const B = y.colorSpace, Z = y.format, Q = y.type;
28895
28895
  return y.isCompressedTexture === !0 || y.isVideoTexture === !0 || B !== bs && B !== rn && (Zt.getTransfer(B) === Kt ? (Z !== fi || Q !== yi) && console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : console.error("THREE.WebGLTextures: Unsupported texture color space:", B)), C;
28896
28896
  }
@@ -29094,36 +29094,36 @@ class NI extends Gn {
29094
29094
  let n = null, r = 1, a = null, o = "local-floor", h = 1, l = null, A = null, c = null, u = null, d = null, p = null;
29095
29095
  const m = new LI(), g = {}, f = e.getContextAttributes();
29096
29096
  let M = null, S = null;
29097
- const v = [], T = [], _ = new Nt();
29097
+ const x = [], T = [], _ = new Nt();
29098
29098
  let w = null;
29099
29099
  const P = new Ge();
29100
29100
  P.viewport = new ue();
29101
29101
  const E = new Ge();
29102
29102
  E.viewport = new ue();
29103
- const x = [P, E], b = new tg();
29103
+ const v = [P, E], b = new tg();
29104
29104
  let z = null, F = null;
29105
29105
  this.cameraAutoUpdate = !0, this.enabled = !1, this.isPresenting = !1, this.getController = function(j) {
29106
- let ot = v[j];
29107
- return ot === void 0 && (ot = new lo(), v[j] = ot), ot.getTargetRaySpace();
29106
+ let ot = x[j];
29107
+ return ot === void 0 && (ot = new lo(), x[j] = ot), ot.getTargetRaySpace();
29108
29108
  }, this.getControllerGrip = function(j) {
29109
- let ot = v[j];
29110
- return ot === void 0 && (ot = new lo(), v[j] = ot), ot.getGripSpace();
29109
+ let ot = x[j];
29110
+ return ot === void 0 && (ot = new lo(), x[j] = ot), ot.getGripSpace();
29111
29111
  }, this.getHand = function(j) {
29112
- let ot = v[j];
29113
- return ot === void 0 && (ot = new lo(), v[j] = ot), ot.getHandSpace();
29112
+ let ot = x[j];
29113
+ return ot === void 0 && (ot = new lo(), x[j] = ot), ot.getHandSpace();
29114
29114
  };
29115
29115
  function U(j) {
29116
29116
  const ot = T.indexOf(j.inputSource);
29117
29117
  if (ot === -1)
29118
29118
  return;
29119
- const nt = v[ot];
29119
+ const nt = x[ot];
29120
29120
  nt !== void 0 && (nt.update(j.inputSource, j.frame, l || a), nt.dispatchEvent({ type: j.type, data: j.inputSource }));
29121
29121
  }
29122
29122
  function W() {
29123
29123
  n.removeEventListener("select", U), n.removeEventListener("selectstart", U), n.removeEventListener("selectend", U), n.removeEventListener("squeeze", U), n.removeEventListener("squeezestart", U), n.removeEventListener("squeezeend", U), n.removeEventListener("end", W), n.removeEventListener("inputsourceschange", Y);
29124
- for (let j = 0; j < v.length; j++) {
29124
+ for (let j = 0; j < x.length; j++) {
29125
29125
  const ot = T[j];
29126
- ot !== null && (T[j] = null, v[j].disconnect(ot));
29126
+ ot !== null && (T[j] = null, x[j].disconnect(ot));
29127
29127
  }
29128
29128
  z = null, F = null, m.reset();
29129
29129
  for (const j in g)
@@ -29202,13 +29202,13 @@ class NI extends Gn {
29202
29202
  function Y(j) {
29203
29203
  for (let ot = 0; ot < j.removed.length; ot++) {
29204
29204
  const nt = j.removed[ot], bt = T.indexOf(nt);
29205
- bt >= 0 && (T[bt] = null, v[bt].disconnect(nt));
29205
+ bt >= 0 && (T[bt] = null, x[bt].disconnect(nt));
29206
29206
  }
29207
29207
  for (let ot = 0; ot < j.added.length; ot++) {
29208
29208
  const nt = j.added[ot];
29209
29209
  let bt = T.indexOf(nt);
29210
29210
  if (bt === -1) {
29211
- for (let Dt = 0; Dt < v.length; Dt++)
29211
+ for (let Dt = 0; Dt < x.length; Dt++)
29212
29212
  if (Dt >= T.length) {
29213
29213
  T.push(nt), bt = Dt;
29214
29214
  break;
@@ -29218,7 +29218,7 @@ class NI extends Gn {
29218
29218
  }
29219
29219
  if (bt === -1) break;
29220
29220
  }
29221
- const _t = v[bt];
29221
+ const _t = x[bt];
29222
29222
  _t && _t.connect(nt);
29223
29223
  }
29224
29224
  }
@@ -29229,8 +29229,8 @@ class NI extends Gn {
29229
29229
  if (ot.matrixWorld.decompose(j.position, j.quaternion, j.scale), j.translateX(zt), j.translateZ(ft), j.matrixWorld.compose(j.position, j.quaternion, j.scale), j.matrixWorldInverse.copy(j.matrixWorld).invert(), _t[10] === -1)
29230
29230
  j.projectionMatrix.copy(ot.projectionMatrix), j.projectionMatrixInverse.copy(ot.projectionMatrixInverse);
29231
29231
  else {
29232
- const xe = de + ft, fe = Yt + ft, y = Et - zt, C = ae + (bt - zt), B = R * Yt / fe * xe, Z = ie * Yt / fe * xe;
29233
- j.projectionMatrix.makePerspective(y, C, B, Z, xe, fe), j.projectionMatrixInverse.copy(j.projectionMatrix).invert();
29232
+ const ve = de + ft, fe = Yt + ft, y = Et - zt, C = ae + (bt - zt), B = R * Yt / fe * ve, Z = ie * Yt / fe * ve;
29233
+ j.projectionMatrix.makePerspective(y, C, B, Z, ve, fe), j.projectionMatrixInverse.copy(j.projectionMatrix).invert();
29234
29234
  }
29235
29235
  }
29236
29236
  function ht(j, ot) {
@@ -29286,8 +29286,8 @@ class NI extends Gn {
29286
29286
  jt.depthStencilTexture
29287
29287
  ), t.setRenderTarget(S));
29288
29288
  }
29289
- let yt = x[Yt];
29290
- yt === void 0 && (yt = new Ge(), yt.layers.enable(Yt), yt.viewport = new ue(), x[Yt] = yt), yt.matrix.fromArray(R.transform.matrix), yt.matrix.decompose(yt.position, yt.quaternion, yt.scale), yt.projectionMatrix.fromArray(R.projectionMatrix), yt.projectionMatrixInverse.copy(yt.projectionMatrix).invert(), yt.viewport.set(ie.x, ie.y, ie.width, ie.height), Yt === 0 && (b.matrix.copy(yt.matrix), b.matrix.decompose(b.position, b.quaternion, b.scale)), bt === !0 && b.cameras.push(yt);
29289
+ let yt = v[Yt];
29290
+ yt === void 0 && (yt = new Ge(), yt.layers.enable(Yt), yt.viewport = new ue(), v[Yt] = yt), yt.matrix.fromArray(R.transform.matrix), yt.matrix.decompose(yt.position, yt.quaternion, yt.scale), yt.projectionMatrix.fromArray(R.projectionMatrix), yt.projectionMatrixInverse.copy(yt.projectionMatrix).invert(), yt.viewport.set(ie.x, ie.y, ie.width, ie.height), Yt === 0 && (b.matrix.copy(yt.matrix), b.matrix.decompose(b.position, b.quaternion, b.scale)), bt === !0 && b.cameras.push(yt);
29291
29291
  }
29292
29292
  const _t = n.enabledFeatures;
29293
29293
  if (_t && _t.includes("depth-sensing") && n.depthUsage == "gpu-optimized" && c) {
@@ -29305,8 +29305,8 @@ class NI extends Gn {
29305
29305
  }
29306
29306
  }
29307
29307
  }
29308
- for (let nt = 0; nt < v.length; nt++) {
29309
- const bt = T[nt], _t = v[nt];
29308
+ for (let nt = 0; nt < x.length; nt++) {
29309
+ const bt = T[nt], _t = x[nt];
29310
29310
  bt !== null && _t !== void 0 && _t.update(bt, ot, l || a);
29311
29311
  }
29312
29312
  Ut && Ut(j, ot), ot.detectedPlanes && i.dispatchEvent({ type: "planesdetected", data: ot }), p = null;
@@ -29326,13 +29326,13 @@ function FI(s, t) {
29326
29326
  function i(g, f) {
29327
29327
  f.color.getRGB(g.fogColor.value, ic(s)), f.isFog ? (g.fogNear.value = f.near, g.fogFar.value = f.far) : f.isFogExp2 && (g.fogDensity.value = f.density);
29328
29328
  }
29329
- function n(g, f, M, S, v) {
29330
- f.isMeshBasicMaterial || f.isMeshLambertMaterial ? r(g, f) : f.isMeshToonMaterial ? (r(g, f), c(g, f)) : f.isMeshPhongMaterial ? (r(g, f), A(g, f)) : f.isMeshStandardMaterial ? (r(g, f), u(g, f), f.isMeshPhysicalMaterial && d(g, f, v)) : f.isMeshMatcapMaterial ? (r(g, f), p(g, f)) : f.isMeshDepthMaterial ? r(g, f) : f.isMeshDistanceMaterial ? (r(g, f), m(g, f)) : f.isMeshNormalMaterial ? r(g, f) : f.isLineBasicMaterial ? (a(g, f), f.isLineDashedMaterial && o(g, f)) : f.isPointsMaterial ? h(g, f, M, S) : f.isSpriteMaterial ? l(g, f) : f.isShadowMaterial ? (g.color.value.copy(f.color), g.opacity.value = f.opacity) : f.isShaderMaterial && (f.uniformsNeedUpdate = !1);
29329
+ function n(g, f, M, S, x) {
29330
+ f.isMeshBasicMaterial || f.isMeshLambertMaterial ? r(g, f) : f.isMeshToonMaterial ? (r(g, f), c(g, f)) : f.isMeshPhongMaterial ? (r(g, f), A(g, f)) : f.isMeshStandardMaterial ? (r(g, f), u(g, f), f.isMeshPhysicalMaterial && d(g, f, x)) : f.isMeshMatcapMaterial ? (r(g, f), p(g, f)) : f.isMeshDepthMaterial ? r(g, f) : f.isMeshDistanceMaterial ? (r(g, f), m(g, f)) : f.isMeshNormalMaterial ? r(g, f) : f.isLineBasicMaterial ? (a(g, f), f.isLineDashedMaterial && o(g, f)) : f.isPointsMaterial ? h(g, f, M, S) : f.isSpriteMaterial ? l(g, f) : f.isShadowMaterial ? (g.color.value.copy(f.color), g.opacity.value = f.opacity) : f.isShaderMaterial && (f.uniformsNeedUpdate = !1);
29331
29331
  }
29332
29332
  function r(g, f) {
29333
29333
  g.opacity.value = f.opacity, f.color && g.diffuse.value.copy(f.color), f.emissive && g.emissive.value.copy(f.emissive).multiplyScalar(f.emissiveIntensity), f.map && (g.map.value = f.map, e(f.map, g.mapTransform)), f.alphaMap && (g.alphaMap.value = f.alphaMap, e(f.alphaMap, g.alphaMapTransform)), f.bumpMap && (g.bumpMap.value = f.bumpMap, e(f.bumpMap, g.bumpMapTransform), g.bumpScale.value = f.bumpScale, f.side === He && (g.bumpScale.value *= -1)), f.normalMap && (g.normalMap.value = f.normalMap, e(f.normalMap, g.normalMapTransform), g.normalScale.value.copy(f.normalScale), f.side === He && g.normalScale.value.negate()), f.displacementMap && (g.displacementMap.value = f.displacementMap, e(f.displacementMap, g.displacementMapTransform), g.displacementScale.value = f.displacementScale, g.displacementBias.value = f.displacementBias), f.emissiveMap && (g.emissiveMap.value = f.emissiveMap, e(f.emissiveMap, g.emissiveMapTransform)), f.specularMap && (g.specularMap.value = f.specularMap, e(f.specularMap, g.specularMapTransform)), f.alphaTest > 0 && (g.alphaTest.value = f.alphaTest);
29334
- const M = t.get(f), S = M.envMap, v = M.envMapRotation;
29335
- S && (g.envMap.value = S, Sn.copy(v), Sn.x *= -1, Sn.y *= -1, Sn.z *= -1, S.isCubeTexture && S.isRenderTargetTexture === !1 && (Sn.y *= -1, Sn.z *= -1), g.envMapRotation.value.setFromMatrix4(OI.makeRotationFromEuler(Sn)), g.flipEnvMap.value = S.isCubeTexture && S.isRenderTargetTexture === !1 ? -1 : 1, g.reflectivity.value = f.reflectivity, g.ior.value = f.ior, g.refractionRatio.value = f.refractionRatio), f.lightMap && (g.lightMap.value = f.lightMap, g.lightMapIntensity.value = f.lightMapIntensity, e(f.lightMap, g.lightMapTransform)), f.aoMap && (g.aoMap.value = f.aoMap, g.aoMapIntensity.value = f.aoMapIntensity, e(f.aoMap, g.aoMapTransform));
29334
+ const M = t.get(f), S = M.envMap, x = M.envMapRotation;
29335
+ S && (g.envMap.value = S, Sn.copy(x), Sn.x *= -1, Sn.y *= -1, Sn.z *= -1, S.isCubeTexture && S.isRenderTargetTexture === !1 && (Sn.y *= -1, Sn.z *= -1), g.envMapRotation.value.setFromMatrix4(OI.makeRotationFromEuler(Sn)), g.flipEnvMap.value = S.isCubeTexture && S.isRenderTargetTexture === !1 ? -1 : 1, g.reflectivity.value = f.reflectivity, g.ior.value = f.ior, g.refractionRatio.value = f.refractionRatio), f.lightMap && (g.lightMap.value = f.lightMap, g.lightMapIntensity.value = f.lightMapIntensity, e(f.lightMap, g.lightMapTransform)), f.aoMap && (g.aoMap.value = f.aoMap, g.aoMapIntensity.value = f.aoMapIntensity, e(f.aoMap, g.aoMapTransform));
29336
29336
  }
29337
29337
  function a(g, f) {
29338
29338
  g.diffuse.value.copy(f.color), g.opacity.value = f.opacity, f.map && (g.map.value = f.map, e(f.map, g.mapTransform));
@@ -29374,12 +29374,12 @@ function BI(s, t, e, i) {
29374
29374
  let n = {}, r = {}, a = [];
29375
29375
  const o = s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);
29376
29376
  function h(M, S) {
29377
- const v = S.program;
29378
- i.uniformBlockBinding(M, v);
29377
+ const x = S.program;
29378
+ i.uniformBlockBinding(M, x);
29379
29379
  }
29380
29380
  function l(M, S) {
29381
- let v = n[M.id];
29382
- v === void 0 && (p(M), v = A(M), n[M.id] = v, M.addEventListener("dispose", g));
29381
+ let x = n[M.id];
29382
+ x === void 0 && (p(M), x = A(M), n[M.id] = x, M.addEventListener("dispose", g));
29383
29383
  const T = S.program;
29384
29384
  i.updateUBOMapping(M, T);
29385
29385
  const _ = t.render.frame;
@@ -29388,8 +29388,8 @@ function BI(s, t, e, i) {
29388
29388
  function A(M) {
29389
29389
  const S = c();
29390
29390
  M.__bindingPointIndex = S;
29391
- const v = s.createBuffer(), T = M.__size, _ = M.usage;
29392
- return s.bindBuffer(s.UNIFORM_BUFFER, v), s.bufferData(s.UNIFORM_BUFFER, T, _), s.bindBuffer(s.UNIFORM_BUFFER, null), s.bindBufferBase(s.UNIFORM_BUFFER, S, v), v;
29391
+ const x = s.createBuffer(), T = M.__size, _ = M.usage;
29392
+ return s.bindBuffer(s.UNIFORM_BUFFER, x), s.bufferData(s.UNIFORM_BUFFER, T, _), s.bindBuffer(s.UNIFORM_BUFFER, null), s.bindBufferBase(s.UNIFORM_BUFFER, S, x), x;
29393
29393
  }
29394
29394
  function c() {
29395
29395
  for (let M = 0; M < o; M++)
@@ -29398,11 +29398,11 @@ function BI(s, t, e, i) {
29398
29398
  return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."), 0;
29399
29399
  }
29400
29400
  function u(M) {
29401
- const S = n[M.id], v = M.uniforms, T = M.__cache;
29401
+ const S = n[M.id], x = M.uniforms, T = M.__cache;
29402
29402
  s.bindBuffer(s.UNIFORM_BUFFER, S);
29403
- for (let _ = 0, w = v.length; _ < w; _++) {
29404
- const P = Array.isArray(v[_]) ? v[_] : [v[_]];
29405
- for (let E = 0, x = P.length; E < x; E++) {
29403
+ for (let _ = 0, w = x.length; _ < w; _++) {
29404
+ const P = Array.isArray(x[_]) ? x[_] : [x[_]];
29405
+ for (let E = 0, v = P.length; E < v; E++) {
29406
29406
  const b = P[E];
29407
29407
  if (d(b, _, E, T) === !0) {
29408
29408
  const z = b.__offset, F = Array.isArray(b.value) ? b.value : [b.value];
@@ -29417,8 +29417,8 @@ function BI(s, t, e, i) {
29417
29417
  }
29418
29418
  s.bindBuffer(s.UNIFORM_BUFFER, null);
29419
29419
  }
29420
- function d(M, S, v, T) {
29421
- const _ = M.value, w = S + "_" + v;
29420
+ function d(M, S, x, T) {
29421
+ const _ = M.value, w = S + "_" + x;
29422
29422
  if (T[w] === void 0)
29423
29423
  return typeof _ == "number" || typeof _ == "boolean" ? T[w] = _ : T[w] = _.clone(), !0;
29424
29424
  {
@@ -29433,20 +29433,20 @@ function BI(s, t, e, i) {
29433
29433
  }
29434
29434
  function p(M) {
29435
29435
  const S = M.uniforms;
29436
- let v = 0;
29436
+ let x = 0;
29437
29437
  const T = 16;
29438
29438
  for (let w = 0, P = S.length; w < P; w++) {
29439
29439
  const E = Array.isArray(S[w]) ? S[w] : [S[w]];
29440
- for (let x = 0, b = E.length; x < b; x++) {
29441
- const z = E[x], F = Array.isArray(z.value) ? z.value : [z.value];
29440
+ for (let v = 0, b = E.length; v < b; v++) {
29441
+ const z = E[v], F = Array.isArray(z.value) ? z.value : [z.value];
29442
29442
  for (let U = 0, W = F.length; U < W; U++) {
29443
- const Y = F[U], $ = m(Y), H = v % T, rt = H % $.boundary, ht = H + rt;
29444
- v += rt, ht !== 0 && T - ht < $.storage && (v += T - ht), z.__data = new Float32Array($.storage / Float32Array.BYTES_PER_ELEMENT), z.__offset = v, v += $.storage;
29443
+ const Y = F[U], $ = m(Y), H = x % T, rt = H % $.boundary, ht = H + rt;
29444
+ x += rt, ht !== 0 && T - ht < $.storage && (x += T - ht), z.__data = new Float32Array($.storage / Float32Array.BYTES_PER_ELEMENT), z.__offset = x, x += $.storage;
29445
29445
  }
29446
29446
  }
29447
29447
  }
29448
- const _ = v % T;
29449
- return _ > 0 && (v += T - _), M.__size = v, M.__cache = {}, this;
29448
+ const _ = x % T;
29449
+ return _ > 0 && (x += T - _), M.__size = x, M.__cache = {}, this;
29450
29450
  }
29451
29451
  function m(M) {
29452
29452
  const S = {
@@ -29460,8 +29460,8 @@ function BI(s, t, e, i) {
29460
29460
  function g(M) {
29461
29461
  const S = M.target;
29462
29462
  S.removeEventListener("dispose", g);
29463
- const v = a.indexOf(S.__bindingPointIndex);
29464
- a.splice(v, 1), s.deleteBuffer(n[S.id]), delete n[S.id], delete r[S.id];
29463
+ const x = a.indexOf(S.__bindingPointIndex);
29464
+ a.splice(x, 1), s.deleteBuffer(n[S.id]), delete n[S.id], delete r[S.id];
29465
29465
  }
29466
29466
  function f() {
29467
29467
  for (const M in n)
@@ -29517,10 +29517,10 @@ class mc {
29517
29517
  */
29518
29518
  onShaderError: null
29519
29519
  }, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.toneMapping = ln, this.toneMappingExposure = 1, this.transmissionResolutionScale = 1;
29520
- const v = this;
29520
+ const x = this;
29521
29521
  let T = !1;
29522
29522
  this._outputColorSpace = Le;
29523
- let _ = 0, w = 0, P = null, E = -1, x = null;
29523
+ let _ = 0, w = 0, P = null, E = -1, v = null;
29524
29524
  const b = new ue(), z = new ue();
29525
29525
  let F = null;
29526
29526
  const U = new Wt(0);
@@ -29557,12 +29557,12 @@ class mc {
29557
29557
  } catch (I) {
29558
29558
  throw console.error("THREE.WebGLRenderer: " + I.message), I;
29559
29559
  }
29560
- let yt, jt, Et, ae, ft, zt, xe, fe, y, C, B, Z, Q, X, xt, it, Ct, It, tt, ct, wt, vt, lt, Ot;
29560
+ let yt, jt, Et, ae, ft, zt, ve, fe, y, C, B, Z, Q, X, vt, it, Ct, It, tt, ct, wt, xt, lt, Ot;
29561
29561
  function D() {
29562
- yt = new jm(R), yt.init(), vt = new RI(R, yt), jt = new Gm(R, yt, t, vt), Et = new TI(R, yt), jt.reversedDepthBuffer && u && Et.buffers.depth.setReversed(!0), ae = new qm(R), ft = new gI(), zt = new wI(R, yt, Et, ft, jt, vt, ae), xe = new Vm(v), fe = new Zm(v), y = new ng(R), lt = new zm(R, y), C = new Jm(R, y, ae, lt), B = new $m(R, C, y, ae), tt = new Km(R, jt, zt), it = new Hm(ft), Z = new fI(v, xe, fe, yt, jt, lt, it), Q = new FI(v, ft), X = new mI(), xt = new SI(yt), It = new Um(v, xe, fe, Et, B, d, h), Ct = new bI(v, B, jt), Ot = new BI(R, ae, jt, Et), ct = new km(R, yt, ae), wt = new Qm(R, yt, ae), ae.programs = Z.programs, v.capabilities = jt, v.extensions = yt, v.properties = ft, v.renderLists = X, v.shadowMap = Ct, v.state = Et, v.info = ae;
29562
+ yt = new jm(R), yt.init(), xt = new RI(R, yt), jt = new Gm(R, yt, t, xt), Et = new TI(R, yt), jt.reversedDepthBuffer && u && Et.buffers.depth.setReversed(!0), ae = new qm(R), ft = new gI(), zt = new wI(R, yt, Et, ft, jt, xt, ae), ve = new Vm(x), fe = new Zm(x), y = new ng(R), lt = new zm(R, y), C = new Jm(R, y, ae, lt), B = new $m(R, C, y, ae), tt = new Km(R, jt, zt), it = new Hm(ft), Z = new fI(x, ve, fe, yt, jt, lt, it), Q = new FI(x, ft), X = new mI(), vt = new SI(yt), It = new Um(x, ve, fe, Et, B, d, h), Ct = new bI(x, B, jt), Ot = new BI(R, ae, jt, Et), ct = new km(R, yt, ae), wt = new Qm(R, yt, ae), ae.programs = Z.programs, x.capabilities = jt, x.extensions = yt, x.properties = ft, x.renderLists = X, x.shadowMap = Ct, x.state = Et, x.info = ae;
29563
29563
  }
29564
29564
  D();
29565
- const et = new NI(v, R);
29565
+ const et = new NI(x, R);
29566
29566
  this.xr = et, this.getContext = function() {
29567
29567
  return R;
29568
29568
  }, this.getContextAttributes = function() {
@@ -29637,7 +29637,7 @@ class mc {
29637
29637
  }, this.clearStencil = function() {
29638
29638
  this.clear(!1, !1, !0);
29639
29639
  }, this.dispose = function() {
29640
- e.removeEventListener("webglcontextlost", st, !1), e.removeEventListener("webglcontextrestored", dt, !1), e.removeEventListener("webglcontextcreationerror", q, !1), It.dispose(), X.dispose(), xt.dispose(), ft.dispose(), xe.dispose(), fe.dispose(), B.dispose(), lt.dispose(), Ot.dispose(), Z.dispose(), et.dispose(), et.removeEventListener("sessionstart", Ci), et.removeEventListener("sessionend", wl), dn.stop();
29640
+ e.removeEventListener("webglcontextlost", st, !1), e.removeEventListener("webglcontextrestored", dt, !1), e.removeEventListener("webglcontextcreationerror", q, !1), It.dispose(), X.dispose(), vt.dispose(), ft.dispose(), ve.dispose(), fe.dispose(), B.dispose(), lt.dispose(), Ot.dispose(), Z.dispose(), et.dispose(), et.removeEventListener("sessionstart", Ci), et.removeEventListener("sessionend", wl), dn.stop();
29641
29641
  };
29642
29642
  function st(I) {
29643
29643
  I.preventDefault(), console.log("THREE.WebGLRenderer: Context Lost."), T = !0;
@@ -29687,7 +29687,7 @@ class mc {
29687
29687
  } else N.isPoints ? ee.setMode(R.POINTS) : N.isSprite && ee.setMode(R.TRIANGLES);
29688
29688
  if (N.isBatchedMesh)
29689
29689
  if (N._multiDrawInstances !== null)
29690
- xs("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."), ee.renderMultiDrawInstances(N._multiDrawStarts, N._multiDrawCounts, N._multiDrawCount, N._multiDrawInstances);
29690
+ vs("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."), ee.renderMultiDrawInstances(N._multiDrawStarts, N._multiDrawCounts, N._multiDrawCount, N._multiDrawInstances);
29691
29691
  else if (yt.get("WEBGL_multi_draw"))
29692
29692
  ee.renderMultiDraw(N._multiDrawStarts, N._multiDrawCounts, N._multiDrawCount);
29693
29693
  else {
@@ -29707,7 +29707,7 @@ class mc {
29707
29707
  I.transparent === !0 && I.side === zi && I.forceSinglePass === !1 ? (I.side = He, I.needsUpdate = !0, hr(I, L, k), I.side = An, I.needsUpdate = !0, hr(I, L, k), I.side = zi) : hr(I, L, k);
29708
29708
  }
29709
29709
  this.compile = function(I, L, k = null) {
29710
- k === null && (k = I), f = xt.get(k), f.init(L), S.push(f), k.traverseVisible(function(N) {
29710
+ k === null && (k = I), f = vt.get(k), f.init(L), S.push(f), k.traverseVisible(function(N) {
29711
29711
  N.isLight && N.layers.test(L.layers) && (f.pushLight(N), N.castShadow && f.pushShadow(N));
29712
29712
  }), I !== k && I.traverseVisible(function(N) {
29713
29713
  N.isLight && N.layers.test(L.layers) && (f.pushLight(N), N.castShadow && f.pushShadow(N));
@@ -29760,11 +29760,11 @@ class mc {
29760
29760
  return;
29761
29761
  }
29762
29762
  if (T === !0) return;
29763
- if (I.matrixWorldAutoUpdate === !0 && I.updateMatrixWorld(), L.parent === null && L.matrixWorldAutoUpdate === !0 && L.updateMatrixWorld(), et.enabled === !0 && et.isPresenting === !0 && (et.cameraAutoUpdate === !0 && et.updateCamera(L), L = et.getCamera()), I.isScene === !0 && I.onBeforeRender(v, I, L, P), f = xt.get(I, S.length), f.init(L), S.push(f), nt.multiplyMatrices(L.projectionMatrix, L.matrixWorldInverse), te.setFromProjectionMatrix(nt, xi, L.reversedDepth), ot = this.localClippingEnabled, j = it.init(this.clippingPlanes, ot), g = X.get(I, M.length), g.init(), M.push(g), et.enabled === !0 && et.isPresenting === !0) {
29764
- const K = v.xr.getDepthSensingMesh();
29765
- K !== null && da(K, L, -1 / 0, v.sortObjects);
29763
+ if (I.matrixWorldAutoUpdate === !0 && I.updateMatrixWorld(), L.parent === null && L.matrixWorldAutoUpdate === !0 && L.updateMatrixWorld(), et.enabled === !0 && et.isPresenting === !0 && (et.cameraAutoUpdate === !0 && et.updateCamera(L), L = et.getCamera()), I.isScene === !0 && I.onBeforeRender(x, I, L, P), f = vt.get(I, S.length), f.init(L), S.push(f), nt.multiplyMatrices(L.projectionMatrix, L.matrixWorldInverse), te.setFromProjectionMatrix(nt, vi, L.reversedDepth), ot = this.localClippingEnabled, j = it.init(this.clippingPlanes, ot), g = X.get(I, M.length), g.init(), M.push(g), et.enabled === !0 && et.isPresenting === !0) {
29764
+ const K = x.xr.getDepthSensingMesh();
29765
+ K !== null && da(K, L, -1 / 0, x.sortObjects);
29766
29766
  }
29767
- da(I, L, 0, v.sortObjects), g.finish(), v.sortObjects === !0 && g.sort(rt, ht), de = et.enabled === !1 || et.isPresenting === !1 || et.hasDepthSensing() === !1, de && It.addToRenderList(g, I), this.info.render.frame++, j === !0 && it.beginShadows();
29767
+ da(I, L, 0, x.sortObjects), g.finish(), x.sortObjects === !0 && g.sort(rt, ht), de = et.enabled === !1 || et.isPresenting === !1 || et.hasDepthSensing() === !1, de && It.addToRenderList(g, I), this.info.render.frame++, j === !0 && it.beginShadows();
29768
29768
  const k = f.state.shadowsArray;
29769
29769
  Ct.render(k, I, L), j === !0 && it.endShadows(), this.info.autoReset === !0 && this.info.reset();
29770
29770
  const G = g.opaque, N = g.transmissive;
@@ -29782,7 +29782,7 @@ class mc {
29782
29782
  }
29783
29783
  } else
29784
29784
  N.length > 0 && Pl(G, N, I, L), de && It.render(I), Rl(g, I, L);
29785
- P !== null && w === 0 && (zt.updateMultisampleRenderTarget(P), zt.updateRenderTargetMipmap(P)), I.isScene === !0 && I.onAfterRender(v, I, L), lt.resetDefaultState(), E = -1, x = null, S.pop(), S.length > 0 ? (f = S[S.length - 1], j === !0 && it.setGlobalState(v.clippingPlanes, f.state.camera)) : f = null, M.pop(), M.length > 0 ? g = M[M.length - 1] : g = null;
29785
+ P !== null && w === 0 && (zt.updateMultisampleRenderTarget(P), zt.updateRenderTargetMipmap(P)), I.isScene === !0 && I.onAfterRender(x, I, L), lt.resetDefaultState(), E = -1, v = null, S.pop(), S.length > 0 ? (f = S[S.length - 1], j === !0 && it.setGlobalState(x.clippingPlanes, f.state.camera)) : f = null, M.pop(), M.length > 0 ? g = M[M.length - 1] : g = null;
29786
29786
  };
29787
29787
  function da(I, L, k, G) {
29788
29788
  if (I.visible === !1) return;
@@ -29816,7 +29816,7 @@ class mc {
29816
29816
  }
29817
29817
  function Rl(I, L, k, G) {
29818
29818
  const N = I.opaque, K = I.transmissive, At = I.transparent;
29819
- f.setupLightsView(k), j === !0 && it.setGlobalState(v.clippingPlanes, k), G && Et.viewport(b.copy(G)), N.length > 0 && lr(N, L, k), K.length > 0 && lr(K, L, k), At.length > 0 && lr(At, L, k), Et.buffers.depth.setTest(!0), Et.buffers.depth.setMask(!0), Et.buffers.color.setMask(!0), Et.setPolygonOffset(!1);
29819
+ f.setupLightsView(k), j === !0 && it.setGlobalState(x.clippingPlanes, k), G && Et.viewport(b.copy(G)), N.length > 0 && lr(N, L, k), K.length > 0 && lr(K, L, k), At.length > 0 && lr(At, L, k), Et.buffers.depth.setTest(!0), Et.buffers.depth.setMask(!0), Et.buffers.color.setMask(!0), Et.setPolygonOffset(!1);
29820
29820
  }
29821
29821
  function Pl(I, L, k, G) {
29822
29822
  if ((k.isScene === !0 ? k.overrideMaterial : null) !== null)
@@ -29832,13 +29832,13 @@ class mc {
29832
29832
  colorSpace: Zt.workingColorSpace
29833
29833
  }));
29834
29834
  const K = f.state.transmissionRenderTarget[G.id], At = G.viewport || b;
29835
- K.setSize(At.z * v.transmissionResolutionScale, At.w * v.transmissionResolutionScale);
29836
- const gt = v.getRenderTarget(), ut = v.getActiveCubeFace(), Tt = v.getActiveMipmapLevel();
29837
- v.setRenderTarget(K), v.getClearColor(U), W = v.getClearAlpha(), W < 1 && v.setClearColor(16777215, 0.5), v.clear(), de && It.render(k);
29838
- const Rt = v.toneMapping;
29839
- v.toneMapping = ln;
29835
+ K.setSize(At.z * x.transmissionResolutionScale, At.w * x.transmissionResolutionScale);
29836
+ const gt = x.getRenderTarget(), ut = x.getActiveCubeFace(), Tt = x.getActiveMipmapLevel();
29837
+ x.setRenderTarget(K), x.getClearColor(U), W = x.getClearAlpha(), W < 1 && x.setClearColor(16777215, 0.5), x.clear(), de && It.render(k);
29838
+ const Rt = x.toneMapping;
29839
+ x.toneMapping = ln;
29840
29840
  const St = G.viewport;
29841
- if (G.viewport !== void 0 && (G.viewport = void 0), f.setupLightsView(G), j === !0 && it.setGlobalState(v.clippingPlanes, G), lr(I, k, G), zt.updateMultisampleRenderTarget(K), zt.updateRenderTargetMipmap(K), yt.has("WEBGL_multisampled_render_to_texture") === !1) {
29841
+ if (G.viewport !== void 0 && (G.viewport = void 0), f.setupLightsView(G), j === !0 && it.setGlobalState(x.clippingPlanes, G), lr(I, k, G), zt.updateMultisampleRenderTarget(K), zt.updateRenderTargetMipmap(K), yt.has("WEBGL_multisampled_render_to_texture") === !1) {
29842
29842
  let Gt = !1;
29843
29843
  for (let qt = 0, he = L.length; qt < he; qt++) {
29844
29844
  const se = L[qt], ee = se.object, Mt = se.geometry, oe = se.material, Xt = se.group;
@@ -29849,7 +29849,7 @@ class mc {
29849
29849
  }
29850
29850
  Gt === !0 && (zt.updateMultisampleRenderTarget(K), zt.updateRenderTargetMipmap(K));
29851
29851
  }
29852
- v.setRenderTarget(gt, ut, Tt), v.setClearColor(U, W), St !== void 0 && (G.viewport = St), v.toneMapping = Rt;
29852
+ x.setRenderTarget(gt, ut, Tt), x.setClearColor(U, W), St !== void 0 && (G.viewport = St), x.toneMapping = Rt;
29853
29853
  }
29854
29854
  function lr(I, L, k) {
29855
29855
  const G = L.isScene === !0 ? L.overrideMaterial : null;
@@ -29860,19 +29860,19 @@ class mc {
29860
29860
  }
29861
29861
  }
29862
29862
  function Dl(I, L, k, G, N, K) {
29863
- I.onBeforeRender(v, L, k, G, N, K), I.modelViewMatrix.multiplyMatrices(k.matrixWorldInverse, I.matrixWorld), I.normalMatrix.getNormalMatrix(I.modelViewMatrix), N.onBeforeRender(v, L, k, G, I, K), N.transparent === !0 && N.side === zi && N.forceSinglePass === !1 ? (N.side = He, N.needsUpdate = !0, v.renderBufferDirect(k, L, G, N, I, K), N.side = An, N.needsUpdate = !0, v.renderBufferDirect(k, L, G, N, I, K), N.side = zi) : v.renderBufferDirect(k, L, G, N, I, K), I.onAfterRender(v, L, k, G, N, K);
29863
+ I.onBeforeRender(x, L, k, G, N, K), I.modelViewMatrix.multiplyMatrices(k.matrixWorldInverse, I.matrixWorld), I.normalMatrix.getNormalMatrix(I.modelViewMatrix), N.onBeforeRender(x, L, k, G, I, K), N.transparent === !0 && N.side === zi && N.forceSinglePass === !1 ? (N.side = He, N.needsUpdate = !0, x.renderBufferDirect(k, L, G, N, I, K), N.side = An, N.needsUpdate = !0, x.renderBufferDirect(k, L, G, N, I, K), N.side = zi) : x.renderBufferDirect(k, L, G, N, I, K), I.onAfterRender(x, L, k, G, N, K);
29864
29864
  }
29865
29865
  function hr(I, L, k) {
29866
29866
  L.isScene !== !0 && (L = Dt);
29867
29867
  const G = ft.get(I), N = f.state.lights, K = f.state.shadowsArray, At = N.state.version, gt = Z.getParameters(I, N.state, K, L, k), ut = Z.getProgramCacheKey(gt);
29868
29868
  let Tt = G.programs;
29869
- G.environment = I.isMeshStandardMaterial ? L.environment : null, G.fog = L.fog, G.envMap = (I.isMeshStandardMaterial ? fe : xe).get(I.envMap || G.environment), G.envMapRotation = G.environment !== null && I.envMap === null ? L.environmentRotation : I.envMapRotation, Tt === void 0 && (I.addEventListener("dispose", J), Tt = /* @__PURE__ */ new Map(), G.programs = Tt);
29869
+ G.environment = I.isMeshStandardMaterial ? L.environment : null, G.fog = L.fog, G.envMap = (I.isMeshStandardMaterial ? fe : ve).get(I.envMap || G.environment), G.envMapRotation = G.environment !== null && I.envMap === null ? L.environmentRotation : I.envMapRotation, Tt === void 0 && (I.addEventListener("dispose", J), Tt = /* @__PURE__ */ new Map(), G.programs = Tt);
29870
29870
  let Rt = Tt.get(ut);
29871
29871
  if (Rt !== void 0) {
29872
29872
  if (G.currentProgram === Rt && G.lightsStateVersion === At)
29873
29873
  return Nl(I, gt), Rt;
29874
29874
  } else
29875
- gt.uniforms = Z.getUniforms(I), I.onBeforeCompile(gt, v), Rt = Z.acquireProgram(gt, ut), Tt.set(ut, Rt), G.uniforms = gt.uniforms;
29875
+ gt.uniforms = Z.getUniforms(I), I.onBeforeCompile(gt, x), Rt = Z.acquireProgram(gt, ut), Tt.set(ut, Rt), G.uniforms = gt.uniforms;
29876
29876
  const St = G.uniforms;
29877
29877
  return (!I.isShaderMaterial && !I.isRawShaderMaterial || I.clipping === !0) && (St.clippingPlanes = it.uniform), Nl(I, gt), G.needsLights = Mc(I), G.lightsStateVersion = At, G.needsLights && (St.ambientLightColor.value = N.state.ambient, St.lightProbe.value = N.state.probe, St.directionalLights.value = N.state.directional, St.directionalLightShadows.value = N.state.directionalShadow, St.spotLights.value = N.state.spot, St.spotLightShadows.value = N.state.spotShadow, St.rectAreaLights.value = N.state.rectArea, St.ltc_1.value = N.state.rectAreaLTC1, St.ltc_2.value = N.state.rectAreaLTC2, St.pointLights.value = N.state.point, St.pointLightShadows.value = N.state.pointShadow, St.hemisphereLights.value = N.state.hemi, St.directionalShadowMap.value = N.state.directionalShadowMap, St.directionalShadowMatrix.value = N.state.directionalShadowMatrix, St.spotShadowMap.value = N.state.spotShadowMap, St.spotLightMatrix.value = N.state.spotLightMatrix, St.spotLightMap.value = N.state.spotLightMap, St.pointShadowMap.value = N.state.pointShadowMap, St.pointShadowMatrix.value = N.state.pointShadowMatrix), G.currentProgram = Rt, G.uniformsList = null, Rt;
29878
29878
  }
@@ -29889,12 +29889,12 @@ class mc {
29889
29889
  }
29890
29890
  function Sc(I, L, k, G, N) {
29891
29891
  L.isScene !== !0 && (L = Dt), zt.resetTextureUnits();
29892
- const K = L.fog, At = G.isMeshStandardMaterial ? L.environment : null, gt = P === null ? v.outputColorSpace : P.isXRRenderTarget === !0 ? P.texture.colorSpace : bs, ut = (G.isMeshStandardMaterial ? fe : xe).get(G.envMap || At), Tt = G.vertexColors === !0 && !!k.attributes.color && k.attributes.color.itemSize === 4, Rt = !!k.attributes.tangent && (!!G.normalMap || G.anisotropy > 0), St = !!k.morphAttributes.position, Gt = !!k.morphAttributes.normal, qt = !!k.morphAttributes.color;
29892
+ const K = L.fog, At = G.isMeshStandardMaterial ? L.environment : null, gt = P === null ? x.outputColorSpace : P.isXRRenderTarget === !0 ? P.texture.colorSpace : bs, ut = (G.isMeshStandardMaterial ? fe : ve).get(G.envMap || At), Tt = G.vertexColors === !0 && !!k.attributes.color && k.attributes.color.itemSize === 4, Rt = !!k.attributes.tangent && (!!G.normalMap || G.anisotropy > 0), St = !!k.morphAttributes.position, Gt = !!k.morphAttributes.normal, qt = !!k.morphAttributes.color;
29893
29893
  let he = ln;
29894
- G.toneMapped && (P === null || P.isXRRenderTarget === !0) && (he = v.toneMapping);
29894
+ G.toneMapped && (P === null || P.isXRRenderTarget === !0) && (he = x.toneMapping);
29895
29895
  const se = k.morphAttributes.position || k.morphAttributes.normal || k.morphAttributes.color, ee = se !== void 0 ? se.length : 0, Mt = ft.get(G), oe = f.state.lights;
29896
- if (j === !0 && (ot === !0 || I !== x)) {
29897
- const Pe = I === x && G.id === E;
29896
+ if (j === !0 && (ot === !0 || I !== v)) {
29897
+ const Pe = I === v && G.id === E;
29898
29898
  it.setState(G, I, Pe);
29899
29899
  }
29900
29900
  let Xt = !1;
@@ -29903,14 +29903,14 @@ class mc {
29903
29903
  Xt === !0 && (Ve = hr(G, L, N));
29904
29904
  let Vn = !1, We = !1, Ls = !1;
29905
29905
  const le = Ve.getUniforms(), qe = Mt.uniforms;
29906
- if (Et.useProgram(Ve.program) && (Vn = !0, We = !0, Ls = !0), G.id !== E && (E = G.id, We = !0), Vn || x !== I) {
29906
+ if (Et.useProgram(Ve.program) && (Vn = !0, We = !0, Ls = !0), G.id !== E && (E = G.id, We = !0), Vn || v !== I) {
29907
29907
  Et.buffers.depth.getReversed() && I.reversedDepth !== !0 && (I._reversedDepth = !0, I.updateProjectionMatrix()), le.setValue(R, "projectionMatrix", I.projectionMatrix), le.setValue(R, "viewMatrix", I.matrixWorldInverse);
29908
29908
  const Ne = le.map.cameraPosition;
29909
29909
  Ne !== void 0 && Ne.setValue(R, bt.setFromMatrixPosition(I.matrixWorld)), jt.logarithmicDepthBuffer && le.setValue(
29910
29910
  R,
29911
29911
  "logDepthBufFC",
29912
29912
  2 / (Math.log(I.far + 1) / Math.LN2)
29913
- ), (G.isMeshPhongMaterial || G.isMeshToonMaterial || G.isMeshLambertMaterial || G.isMeshBasicMaterial || G.isMeshStandardMaterial || G.isShaderMaterial) && le.setValue(R, "isOrthographic", I.isOrthographicCamera === !0), x !== I && (x = I, We = !0, Ls = !0);
29913
+ ), (G.isMeshPhongMaterial || G.isMeshToonMaterial || G.isMeshLambertMaterial || G.isMeshBasicMaterial || G.isMeshStandardMaterial || G.isShaderMaterial) && le.setValue(R, "isOrthographic", I.isOrthographicCamera === !0), v !== I && (v = I, We = !0, Ls = !0);
29914
29914
  }
29915
29915
  if (N.isSkinnedMesh) {
29916
29916
  le.setOptional(R, N, "bindMatrix"), le.setOptional(R, N, "bindMatrixInverse");
@@ -29919,7 +29919,7 @@ class mc {
29919
29919
  }
29920
29920
  N.isBatchedMesh && (le.setOptional(R, N, "batchingTexture"), le.setValue(R, "batchingTexture", N._matricesTexture, zt), le.setOptional(R, N, "batchingIdTexture"), le.setValue(R, "batchingIdTexture", N._indirectTexture, zt), le.setOptional(R, N, "batchingColorTexture"), N._colorsTexture !== null && le.setValue(R, "batchingColorTexture", N._colorsTexture, zt));
29921
29921
  const Ke = k.morphAttributes;
29922
- if ((Ke.position !== void 0 || Ke.normal !== void 0 || Ke.color !== void 0) && tt.update(N, k, Ve), (We || Mt.receiveShadow !== N.receiveShadow) && (Mt.receiveShadow = N.receiveShadow, le.setValue(R, "receiveShadow", N.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && (qe.envMap.value = ut, qe.flipEnvMap.value = ut.isCubeTexture && ut.isRenderTargetTexture === !1 ? -1 : 1), G.isMeshStandardMaterial && G.envMap === null && L.environment !== null && (qe.envMapIntensity.value = L.environmentIntensity), We && (le.setValue(R, "toneMappingExposure", v.toneMappingExposure), Mt.needsLights && yc(qe, Ls), K && G.fog === !0 && Q.refreshFogUniforms(qe, K), Q.refreshMaterialUniforms(qe, G, H, $, f.state.transmissionRenderTarget[I.id]), sa.upload(R, Ll(Mt), qe, zt)), G.isShaderMaterial && G.uniformsNeedUpdate === !0 && (sa.upload(R, Ll(Mt), qe, zt), G.uniformsNeedUpdate = !1), G.isSpriteMaterial && le.setValue(R, "center", N.center), le.setValue(R, "modelViewMatrix", N.modelViewMatrix), le.setValue(R, "normalMatrix", N.normalMatrix), le.setValue(R, "modelMatrix", N.matrixWorld), G.isShaderMaterial || G.isRawShaderMaterial) {
29922
+ if ((Ke.position !== void 0 || Ke.normal !== void 0 || Ke.color !== void 0) && tt.update(N, k, Ve), (We || Mt.receiveShadow !== N.receiveShadow) && (Mt.receiveShadow = N.receiveShadow, le.setValue(R, "receiveShadow", N.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && (qe.envMap.value = ut, qe.flipEnvMap.value = ut.isCubeTexture && ut.isRenderTargetTexture === !1 ? -1 : 1), G.isMeshStandardMaterial && G.envMap === null && L.environment !== null && (qe.envMapIntensity.value = L.environmentIntensity), We && (le.setValue(R, "toneMappingExposure", x.toneMappingExposure), Mt.needsLights && yc(qe, Ls), K && G.fog === !0 && Q.refreshFogUniforms(qe, K), Q.refreshMaterialUniforms(qe, G, H, $, f.state.transmissionRenderTarget[I.id]), sa.upload(R, Ll(Mt), qe, zt)), G.isShaderMaterial && G.uniformsNeedUpdate === !0 && (sa.upload(R, Ll(Mt), qe, zt), G.uniformsNeedUpdate = !1), G.isSpriteMaterial && le.setValue(R, "center", N.center), le.setValue(R, "modelViewMatrix", N.modelViewMatrix), le.setValue(R, "normalMatrix", N.normalMatrix), le.setValue(R, "modelMatrix", N.matrixWorld), G.isShaderMaterial || G.isRawShaderMaterial) {
29923
29923
  const Pe = G.uniformsGroups;
29924
29924
  for (let Ne = 0, fa = Pe.length; Ne < fa; Ne++) {
29925
29925
  const fn = Pe[Ne];
@@ -30005,7 +30005,7 @@ class mc {
30005
30005
  console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
30006
30006
  return;
30007
30007
  }
30008
- L >= 0 && L <= I.width - G && k >= 0 && k <= I.height - N && (I.textures.length > 1 && R.readBuffer(R.COLOR_ATTACHMENT0 + gt), R.readPixels(L, k, G, N, vt.convert(Rt), vt.convert(St), K));
30008
+ L >= 0 && L <= I.width - G && k >= 0 && k <= I.height - N && (I.textures.length > 1 && R.readBuffer(R.COLOR_ATTACHMENT0 + gt), R.readPixels(L, k, G, N, xt.convert(Rt), xt.convert(St), K));
30009
30009
  } finally {
30010
30010
  const Tt = P !== null ? ft.get(P).__webglFramebuffer : null;
30011
30011
  Et.bindFramebuffer(R.FRAMEBUFFER, Tt);
@@ -30024,7 +30024,7 @@ class mc {
30024
30024
  if (!jt.textureTypeReadable(St))
30025
30025
  throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");
30026
30026
  const Gt = R.createBuffer();
30027
- R.bindBuffer(R.PIXEL_PACK_BUFFER, Gt), R.bufferData(R.PIXEL_PACK_BUFFER, K.byteLength, R.STREAM_READ), I.textures.length > 1 && R.readBuffer(R.COLOR_ATTACHMENT0 + gt), R.readPixels(L, k, G, N, vt.convert(Rt), vt.convert(St), 0);
30027
+ R.bindBuffer(R.PIXEL_PACK_BUFFER, Gt), R.bufferData(R.PIXEL_PACK_BUFFER, K.byteLength, R.STREAM_READ), I.textures.length > 1 && R.readBuffer(R.COLOR_ATTACHMENT0 + gt), R.readPixels(L, k, G, N, xt.convert(Rt), xt.convert(St), 0);
30028
30028
  const qt = P !== null ? ft.get(P).__webglFramebuffer : null;
30029
30029
  Et.bindFramebuffer(R.FRAMEBUFFER, qt);
30030
30030
  const he = R.fenceSync(R.SYNC_GPU_COMMANDS_COMPLETE, 0);
@@ -30037,7 +30037,7 @@ class mc {
30037
30037
  };
30038
30038
  const _c = R.createFramebuffer(), Tc = R.createFramebuffer();
30039
30039
  this.copyTextureToTexture = function(I, L, k = null, G = null, N = 0, K = null) {
30040
- K === null && (N !== 0 ? (xs("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."), K = N, N = 0) : K = 0);
30040
+ K === null && (N !== 0 ? (vs("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."), K = N, N = 0) : K = 0);
30041
30041
  let At, gt, ut, Tt, Rt, St, Gt, qt, he;
30042
30042
  const se = I.isCompressedTexture ? I.mipmaps[K] : I.image;
30043
30043
  if (k !== null)
@@ -30047,7 +30047,7 @@ class mc {
30047
30047
  At = Math.floor(se.width * Ke), gt = Math.floor(se.height * Ke), I.isDataArrayTexture ? ut = se.depth : I.isData3DTexture ? ut = Math.floor(se.depth * Ke) : ut = 1, Tt = 0, Rt = 0, St = 0;
30048
30048
  }
30049
30049
  G !== null ? (Gt = G.x, qt = G.y, he = G.z) : (Gt = 0, qt = 0, he = 0);
30050
- const ee = vt.convert(L.format), Mt = vt.convert(L.type);
30050
+ const ee = xt.convert(L.format), Mt = xt.convert(L.type);
30051
30051
  let oe;
30052
30052
  L.isData3DTexture ? (zt.setTexture3D(L, 0), oe = R.TEXTURE_3D) : L.isDataArrayTexture || L.isCompressedArrayTexture ? (zt.setTexture2DArray(L, 0), oe = R.TEXTURE_2D_ARRAY) : (zt.setTexture2D(L, 0), oe = R.TEXTURE_2D), R.pixelStorei(R.UNPACK_FLIP_Y_WEBGL, L.flipY), R.pixelStorei(R.UNPACK_PREMULTIPLY_ALPHA_WEBGL, L.premultiplyAlpha), R.pixelStorei(R.UNPACK_ALIGNMENT, L.unpackAlignment);
30053
30053
  const Xt = R.getParameter(R.UNPACK_ROW_LENGTH), Ve = R.getParameter(R.UNPACK_IMAGE_HEIGHT), Vn = R.getParameter(R.UNPACK_SKIP_PIXELS), We = R.getParameter(R.UNPACK_SKIP_ROWS), Ls = R.getParameter(R.UNPACK_SKIP_IMAGES);
@@ -30069,7 +30069,7 @@ class mc {
30069
30069
  qe ? I.isDataTexture || I.isData3DTexture ? R.texSubImage3D(oe, K, Gt, qt, he, At, gt, ut, ee, Mt, se.data) : L.isCompressedArrayTexture ? R.compressedTexSubImage3D(oe, K, Gt, qt, he, At, gt, ut, ee, se.data) : R.texSubImage3D(oe, K, Gt, qt, he, At, gt, ut, ee, Mt, se) : I.isDataTexture ? R.texSubImage2D(R.TEXTURE_2D, K, Gt, qt, At, gt, ee, Mt, se.data) : I.isCompressedTexture ? R.compressedTexSubImage2D(R.TEXTURE_2D, K, Gt, qt, se.width, se.height, ee, se.data) : R.texSubImage2D(R.TEXTURE_2D, K, Gt, qt, At, gt, ee, Mt, se);
30070
30070
  R.pixelStorei(R.UNPACK_ROW_LENGTH, Xt), R.pixelStorei(R.UNPACK_IMAGE_HEIGHT, Ve), R.pixelStorei(R.UNPACK_SKIP_PIXELS, Vn), R.pixelStorei(R.UNPACK_SKIP_ROWS, We), R.pixelStorei(R.UNPACK_SKIP_IMAGES, Ls), K === 0 && L.generateMipmaps && R.generateMipmap(oe), Et.unbindTexture();
30071
30071
  }, this.copyTextureToTexture3D = function(I, L, k = null, G = null, N = 0) {
30072
- return xs('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'), this.copyTextureToTexture(I, L, k, G, N);
30072
+ return vs('WebGLRenderer: copyTextureToTexture3D function has been deprecated. Use "copyTextureToTexture" instead.'), this.copyTextureToTexture(I, L, k, G, N);
30073
30073
  }, this.initRenderTarget = function(I) {
30074
30074
  ft.get(I).__webglFramebuffer === void 0 && zt.setupRenderTarget(I);
30075
30075
  }, this.initTexture = function(I) {
@@ -30088,7 +30088,7 @@ class mc {
30088
30088
  * @readonly
30089
30089
  */
30090
30090
  get coordinateSystem() {
30091
- return xi;
30091
+ return vi;
30092
30092
  }
30093
30093
  /**
30094
30094
  * Defines the output color space of the renderer.
@@ -30561,7 +30561,7 @@ function qI(s) {
30561
30561
  }
30562
30562
  const Ic = {
30563
30563
  LANGUAGE_CHANGE_CONFIRMED: IA.LANGUAGE_CHANGE_CONFIRMED
30564
- }, KI = /* @__PURE__ */ new Set([Qt.ENGLISH_UNITED_KINGDOM]), $I = Qt.ENGLISH_UNITED_KINGDOM, vo = {
30564
+ }, KI = /* @__PURE__ */ new Set([Qt.ENGLISH_UNITED_KINGDOM]), $I = Qt.ENGLISH_UNITED_KINGDOM, xo = {
30565
30565
  selected: $I,
30566
30566
  options: KI
30567
30567
  }, t0 = `<section class="root">
@@ -30574,8 +30574,8 @@ const Ic = {
30574
30574
  headline="Switch language?"
30575
30575
  ></confirmation-dialog>
30576
30576
  </section>
30577
- `, e0 = ":host{display:block;width:100%;height:100%}.root{position:relative;width:100%;height:100%;overflow:hidden}canvas{position:absolute;inset:0;display:block;touch-action:none}.menu-container{position:absolute;bottom:25%;left:50%}", vc = new CSSStyleSheet();
30578
- vc.replaceSync(e0);
30577
+ `, e0 = ":host{display:block;width:100%;height:100%}.root{position:relative;width:100%;height:100%;overflow:hidden}canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}.menu-container{position:absolute;bottom:clamp(1rem,12vh,25%);left:50%}@media(max-width:768px){.menu-container{bottom:max(1rem,env(safe-area-inset-bottom) + 1rem)}}", xc = new CSSStyleSheet();
30578
+ xc.replaceSync(e0);
30579
30579
  const ra = {
30580
30580
  LANGUAGES: "languages",
30581
30581
  SELECTED: "selected"
@@ -30616,14 +30616,14 @@ class Tl extends HTMLElement {
30616
30616
  _isIntroCameraAnimating = !1;
30617
30617
  _isIntroCameraHolding = !1;
30618
30618
  // ─── Languages ─────────────────────────────────────────────────────────────
30619
- options = vo.options;
30619
+ options = xo.options;
30620
30620
  flags = [];
30621
30621
  /**
30622
30622
  * Single source of truth for which language is currently selected.
30623
30623
  * Everything else (rotation, BarMenu) is derived from this.
30624
30624
  */
30625
- selected = vo.selected;
30626
- selectedTmp = vo.selected;
30625
+ selected = xo.selected;
30626
+ selectedTmp = xo.selected;
30627
30627
  // ─── UI ────────────────────────────────────────────────────────────────────
30628
30628
  _menuContainer;
30629
30629
  _menuIntroStartScale = 0.72;
@@ -30640,7 +30640,7 @@ class Tl extends HTMLElement {
30640
30640
  // Constructor
30641
30641
  // ─────────────────────────────────────────────────────────────────────────
30642
30642
  constructor() {
30643
- super(), this.shadowRoot = this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets.push(vc);
30643
+ super(), this.shadowRoot = this.attachShadow({ mode: "open" }), this.shadowRoot.adoptedStyleSheets.push(xc);
30644
30644
  }
30645
30645
  // ─────────────────────────────────────────────────────────────────────────
30646
30646
  // Attribute handling
@@ -30694,7 +30694,7 @@ class Tl extends HTMLElement {
30694
30694
  setupHtmlElements() {
30695
30695
  this.shadowRoot.innerHTML = t0, this._root = this.shadowRoot.querySelector(".root") ?? (() => {
30696
30696
  throw new Error(`${this.constructor.name}: root element not found`);
30697
- })(), this._canvas = this.shadowRoot.querySelector(vA.CANVAS) ?? (() => {
30697
+ })(), this._canvas = this.shadowRoot.querySelector(xA.CANVAS) ?? (() => {
30698
30698
  throw new Error(`${this.constructor.name}: canvas element not found`);
30699
30699
  })(), this._confirmationDialog = this.shadowRoot.querySelector(bn.selector) ?? (() => {
30700
30700
  throw new Error(
@@ -30903,7 +30903,7 @@ class Tl extends HTMLElement {
30903
30903
  const e = document.createElement(
30904
30904
  Bl.selector
30905
30905
  );
30906
- e.textContent = ga.get(t)?.autonyms ?? t, e.addEventListener(xo.CLICK, () => {
30906
+ e.textContent = ga.get(t)?.autonyms ?? t, e.addEventListener(vo.CLICK, () => {
30907
30907
  this.barMenuButtonClickHandler();
30908
30908
  }), this._languageButtons.push(e), this._barMenu.appendChild(e);
30909
30909
  }), this._barMenu.visibleButtons = 1, this._barMenu.cyclicalNavigation = !0, requestAnimationFrame(() => {
@@ -31000,7 +31000,7 @@ const i0 = "as-language-picker", c0 = /* @__PURE__ */ Object.freeze(/* @__PURE__
31000
31000
  LanguagePickerComponent: Tl,
31001
31001
  OBSERVED_ATTRIBUTES: ra,
31002
31002
  selector: i0
31003
- }, Symbol.toStringTag, { value: "Module" })), xc = {
31003
+ }, Symbol.toStringTag, { value: "Module" })), vc = {
31004
31004
  THEME_CHANGE_CONFIRMED: IA.THEME_CHANGE_CONFIRMED
31005
31005
  }, qr = {
31006
31006
  RIGHT: new O(1, 0, 0),
@@ -31158,7 +31158,7 @@ class ii extends HTMLElement {
31158
31158
  setupHtmlElements() {
31159
31159
  this.shadowRoot.innerHTML = CA, this._root = this.shadowRoot.querySelector(".root") ?? (() => {
31160
31160
  throw new Error("ThemeCubeComponent: .root not found");
31161
- })(), this._canvas = this.shadowRoot.querySelector(vA.CANVAS) ?? (() => {
31161
+ })(), this._canvas = this.shadowRoot.querySelector(xA.CANVAS) ?? (() => {
31162
31162
  throw new Error("ThemeCubeComponent: canvas not found");
31163
31163
  })(), this._confirmationDialog = this.shadowRoot.querySelector(bn.selector) ?? (() => {
31164
31164
  throw new Error("ThemeCubeComponent: confirmation-dialog not found");
@@ -31209,7 +31209,7 @@ class ii extends HTMLElement {
31209
31209
  _setupCube() {
31210
31210
  const t = Object.keys(qr).length;
31211
31211
  this._cubeMaterials = Array.from({ length: t }, (e, i) => {
31212
- const n = this._getThemeIdForFace(i), r = this._resolveThemeFaceVisual(n), a = new xl({ color: "#ece9e4" });
31212
+ const n = this._getThemeIdForFace(i), r = this._resolveThemeFaceVisual(n), a = new vl({ color: "#ece9e4" });
31213
31213
  return this._setMaterialTexture(a, n, r), a;
31214
31214
  }), this._cubeGeometry = new Ps(
31215
31215
  ii.CUBE_SIDE_LENGTH,
@@ -31218,7 +31218,7 @@ class ii extends HTMLElement {
31218
31218
  ), this._cube = new gi(this._cubeGeometry, this._cubeMaterials), this._cube.rotation.x = this._rotX, this._cube.rotation.y = this._rotY, this._scene.add(this._cube);
31219
31219
  }
31220
31220
  _setupApplyButton() {
31221
- this._applyBtn.addEventListener(xo.CLICK, this._handleApplyClick);
31221
+ this._applyBtn.addEventListener(vo.CLICK, this._handleApplyClick);
31222
31222
  }
31223
31223
  _handleApplyClick = () => {
31224
31224
  this._applyTheme();
@@ -31323,7 +31323,7 @@ class ii extends HTMLElement {
31323
31323
  pa(this._selected);
31324
31324
  return;
31325
31325
  }
31326
- xA();
31326
+ vA();
31327
31327
  }
31328
31328
  _stopAutoSpinFromInteraction() {
31329
31329
  this._idleSeconds = 0, this._autoSpinEnabled = !1, this._autoVelX = 0, this._autoVelY = 0;
@@ -31351,7 +31351,7 @@ class ii extends HTMLElement {
31351
31351
  }
31352
31352
  _unbindEvents() {
31353
31353
  this._applyBtn?.removeEventListener(
31354
- xo.CLICK,
31354
+ vo.CLICK,
31355
31355
  this._handleApplyClick
31356
31356
  ), this._canvas?.removeEventListener(
31357
31357
  Wi.POINTER_DOWN,
@@ -31387,7 +31387,7 @@ class ii extends HTMLElement {
31387
31387
  this._isConfirmationDialogOpen = !1;
31388
31388
  const t = this._confirmationDialog.value;
31389
31389
  t == null || t === this._selected || (this._selected = t, pa(this._selected), this._updatePreviewDialog(this._selected), this.dispatchEvent(
31390
- new CustomEvent(xc.THEME_CHANGE_CONFIRMED, {
31390
+ new CustomEvent(vc.THEME_CHANGE_CONFIRMED, {
31391
31391
  detail: { selected: this._selected },
31392
31392
  bubbles: !0,
31393
31393
  composed: !0
@@ -31409,7 +31409,7 @@ class ii extends HTMLElement {
31409
31409
  }
31410
31410
  const a0 = "theme-picker", u0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
31411
31411
  __proto__: null,
31412
- COMPONENT_CUSTOM_MESSAGES: xc,
31412
+ COMPONENT_CUSTOM_MESSAGES: vc,
31413
31413
  ThemeCubeComponent: ii,
31414
31414
  selector: a0
31415
31415
  }, Symbol.toStringTag, { value: "Module" }));