scatter3d-anywidget 0.1.8__py3-none-any.whl → 0.1.9__py3-none-any.whl

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.
@@ -214,8 +214,8 @@ function fc(i, e, t) {
214
214
  const n = t.mode === "lasso";
215
215
  i.addBtn.style.display = n ? "" : "none", i.removeBtn.style.display = n ? "" : "none", Yi(i.rotateBtn, e, t.mode === "rotate"), Yi(i.lassoBtn, e, t.mode === "lasso"), Yi(i.addBtn, e, n && t.operation === "add"), Yi(i.removeBtn, e, n && t.operation === "remove", "remove");
216
216
  }
217
- const Ea = "182", pi = { ROTATE: 0, DOLLY: 1, PAN: 2 }, fi = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, pc = 0, Ya = 1, mc = 2, br = 1, gc = 2, Ui = 3, Dn = 0, It = 1, fn = 2, mn = 0, mi = 1, $a = 2, Za = 3, ja = 4, _c = 5, Vn = 100, xc = 101, vc = 102, Mc = 103, Sc = 104, yc = 200, Ec = 201, bc = 202, Tc = 203, As = 204, ws = 205, Ac = 206, wc = 207, Rc = 208, Cc = 209, Pc = 210, Dc = 211, Lc = 212, Ic = 213, Uc = 214, Rs = 0, Cs = 1, Ps = 2, _i = 3, Ds = 4, Ls = 5, Is = 6, Us = 7, sl = 0, Nc = 1, Fc = 2, nn = 0, al = 1, ol = 2, ll = 3, cl = 4, ul = 5, hl = 6, dl = 7, fl = 300, Wn = 301, xi = 302, Ns = 303, Fs = 304, Vr = 306, Os = 1e3, pn = 1001, Bs = 1002, St = 1003, Oc = 1004, $i = 1005, Tt = 1006, Yr = 1007, Hn = 1008, Gt = 1009, pl = 1010, ml = 1011, Oi = 1012, ba = 1013, an = 1014, en = 1015, _n = 1016, Ta = 1017, Aa = 1018, Bi = 1020, gl = 35902, _l = 35899, xl = 1021, vl = 1022, $t = 1023, xn = 1026, Gn = 1027, Ml = 1028, wa = 1029, vi = 1030, Ra = 1031, Ca = 1033, Tr = 33776, Ar = 33777, wr = 33778, Rr = 33779, zs = 35840, Vs = 35841, ks = 35842, Hs = 35843, Gs = 36196, Ws = 37492, Xs = 37496, qs = 37488, Ys = 37489, $s = 37490, Zs = 37491, js = 37808, Ks = 37809, Js = 37810, Qs = 37811, ea = 37812, ta = 37813, na = 37814, ia = 37815, ra = 37816, sa = 37817, aa = 37818, oa = 37819, la = 37820, ca = 37821, ua = 36492, ha = 36494, da = 36495, fa = 36283, pa = 36284, ma = 36285, ga = 36286, Bc = 3200, zc = 0, Vc = 1, Rn = "", zt = "srgb", Mi = "srgb-linear", Ir = "linear", et = "srgb", Zn = 7680, Ka = 519, kc = 512, Hc = 513, Gc = 514, Pa = 515, Wc = 516, Xc = 517, Da = 518, qc = 519, _a = 35044, Ja = "300 es", tn = 2e3, Ur = 2001;
218
- function Sl(i) {
217
+ const Ea = "182", pi = { ROTATE: 0, DOLLY: 1, PAN: 2 }, fi = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, pc = 0, Ya = 1, mc = 2, br = 1, gc = 2, Ui = 3, Dn = 0, It = 1, fn = 2, mn = 0, mi = 1, $a = 2, Za = 3, ja = 4, _c = 5, kn = 100, xc = 101, vc = 102, Sc = 103, Mc = 104, yc = 200, Ec = 201, bc = 202, Tc = 203, As = 204, ws = 205, Ac = 206, wc = 207, Rc = 208, Cc = 209, Pc = 210, Dc = 211, Lc = 212, Ic = 213, Uc = 214, Rs = 0, Cs = 1, Ps = 2, _i = 3, Ds = 4, Ls = 5, Is = 6, Us = 7, sl = 0, Nc = 1, Fc = 2, nn = 0, al = 1, ol = 2, ll = 3, cl = 4, ul = 5, hl = 6, dl = 7, fl = 300, Wn = 301, xi = 302, Ns = 303, Fs = 304, kr = 306, Os = 1e3, pn = 1001, Bs = 1002, Mt = 1003, Oc = 1004, $i = 1005, Tt = 1006, Yr = 1007, Hn = 1008, Gt = 1009, pl = 1010, ml = 1011, Oi = 1012, ba = 1013, an = 1014, en = 1015, _n = 1016, Ta = 1017, Aa = 1018, Bi = 1020, gl = 35902, _l = 35899, xl = 1021, vl = 1022, $t = 1023, xn = 1026, Gn = 1027, Sl = 1028, wa = 1029, vi = 1030, Ra = 1031, Ca = 1033, Tr = 33776, Ar = 33777, wr = 33778, Rr = 33779, zs = 35840, ks = 35841, Vs = 35842, Hs = 35843, Gs = 36196, Ws = 37492, Xs = 37496, qs = 37488, Ys = 37489, $s = 37490, Zs = 37491, js = 37808, Ks = 37809, Js = 37810, Qs = 37811, ea = 37812, ta = 37813, na = 37814, ia = 37815, ra = 37816, sa = 37817, aa = 37818, oa = 37819, la = 37820, ca = 37821, ua = 36492, ha = 36494, da = 36495, fa = 36283, pa = 36284, ma = 36285, ga = 36286, Bc = 3200, zc = 0, kc = 1, Rn = "", zt = "srgb", Si = "srgb-linear", Ir = "linear", et = "srgb", Zn = 7680, Ka = 519, Vc = 512, Hc = 513, Gc = 514, Pa = 515, Wc = 516, Xc = 517, Da = 518, qc = 519, _a = 35044, Ja = "300 es", tn = 2e3, Ur = 2001;
218
+ function Ml(i) {
219
219
  for (let e = i.length - 1; e >= 0; --e)
220
220
  if (i[e] >= 65535) return !0;
221
221
  return !1;
@@ -2119,7 +2119,7 @@ class U {
2119
2119
  }
2120
2120
  }
2121
2121
  const Zr = /* @__PURE__ */ new U(), eo = /* @__PURE__ */ new Xn();
2122
- class Ve {
2122
+ class ke {
2123
2123
  /**
2124
2124
  * Constructs a new 3x3 matrix. The arguments are supposed to be
2125
2125
  * in row-major order. If no arguments are provided, the constructor
@@ -2136,7 +2136,7 @@ class Ve {
2136
2136
  * @param {number} [n33] - 3-3 matrix element.
2137
2137
  */
2138
2138
  constructor(e, t, n, r, s, a, o, l, c) {
2139
- Ve.prototype.isMatrix3 = !0, this.elements = [
2139
+ ke.prototype.isMatrix3 = !0, this.elements = [
2140
2140
  1,
2141
2141
  0,
2142
2142
  0,
@@ -2489,7 +2489,7 @@ class Ve {
2489
2489
  return new this.constructor().fromArray(this.elements);
2490
2490
  }
2491
2491
  }
2492
- const jr = /* @__PURE__ */ new Ve(), to = /* @__PURE__ */ new Ve().set(
2492
+ const jr = /* @__PURE__ */ new ke(), to = /* @__PURE__ */ new ke().set(
2493
2493
  0.4123908,
2494
2494
  0.3575843,
2495
2495
  0.1804808,
@@ -2499,7 +2499,7 @@ const jr = /* @__PURE__ */ new Ve(), to = /* @__PURE__ */ new Ve().set(
2499
2499
  0.0193308,
2500
2500
  0.1191948,
2501
2501
  0.9505322
2502
- ), no = /* @__PURE__ */ new Ve().set(
2502
+ ), no = /* @__PURE__ */ new ke().set(
2503
2503
  3.2409699,
2504
2504
  -1.5373832,
2505
2505
  -0.4986108,
@@ -2513,7 +2513,7 @@ const jr = /* @__PURE__ */ new Ve(), to = /* @__PURE__ */ new Ve().set(
2513
2513
  function Kc() {
2514
2514
  const i = {
2515
2515
  enabled: !0,
2516
- workingColorSpace: Mi,
2516
+ workingColorSpace: Si,
2517
2517
  /**
2518
2518
  * Implementations of supported color spaces.
2519
2519
  *
@@ -2576,7 +2576,7 @@ function Kc() {
2576
2576
  }
2577
2577
  }, e = [0.64, 0.33, 0.3, 0.6, 0.15, 0.06], t = [0.2126, 0.7152, 0.0722], n = [0.3127, 0.329];
2578
2578
  return i.define({
2579
- [Mi]: {
2579
+ [Si]: {
2580
2580
  primaries: e,
2581
2581
  whitePoint: n,
2582
2582
  transfer: Ir,
@@ -2741,7 +2741,7 @@ class At extends qn {
2741
2741
  * @param {string} [colorSpace=NoColorSpace] - The color space.
2742
2742
  */
2743
2743
  constructor(e = At.DEFAULT_IMAGE, t = At.DEFAULT_MAPPING, n = pn, r = pn, s = Tt, a = Hn, o = $t, l = Gt, c = At.DEFAULT_ANISOTROPY, h = Rn) {
2744
- super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: eu++ }), this.uuid = Pn(), this.name = "", this.source = new La(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = n, this.wrapT = r, this.magFilter = s, this.minFilter = a, this.anisotropy = c, this.format = o, this.internalFormat = null, this.type = l, this.offset = new Ne(0, 0), this.repeat = new Ne(1, 1), this.center = new Ne(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new Ve(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = h, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
2744
+ super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: eu++ }), this.uuid = Pn(), this.name = "", this.source = new La(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = n, this.wrapT = r, this.magFilter = s, this.minFilter = a, this.anisotropy = c, this.format = o, this.internalFormat = null, this.type = l, this.offset = new Ne(0, 0), this.repeat = new Ne(1, 1), this.center = new Ne(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new ke(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = h, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
2745
2745
  }
2746
2746
  /**
2747
2747
  * The width of the texture in pixels.
@@ -3649,7 +3649,7 @@ class yl extends At {
3649
3649
  * @param {number} [depth=1] - The depth of the texture.
3650
3650
  */
3651
3651
  constructor(e = null, t = 1, n = 1, r = 1) {
3652
- super(null), this.isDataArrayTexture = !0, this.image = { data: e, width: t, height: n, depth: r }, this.magFilter = St, this.minFilter = St, this.wrapR = pn, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1, this.layerUpdates = /* @__PURE__ */ new Set();
3652
+ super(null), this.isDataArrayTexture = !0, this.image = { data: e, width: t, height: n, depth: r }, this.magFilter = Mt, this.minFilter = Mt, this.wrapR = pn, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1, this.layerUpdates = /* @__PURE__ */ new Set();
3653
3653
  }
3654
3654
  /**
3655
3655
  * Describes that a specific layer of the texture needs to be updated.
@@ -3680,10 +3680,10 @@ class nu extends At {
3680
3680
  * @param {number} [depth=1] - The depth of the texture.
3681
3681
  */
3682
3682
  constructor(e = null, t = 1, n = 1, r = 1) {
3683
- super(null), this.isData3DTexture = !0, this.image = { data: e, width: t, height: n, depth: r }, this.magFilter = St, this.minFilter = St, this.wrapR = pn, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
3683
+ super(null), this.isData3DTexture = !0, this.image = { data: e, width: t, height: n, depth: r }, this.magFilter = Mt, this.minFilter = Mt, this.wrapR = pn, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
3684
3684
  }
3685
3685
  }
3686
- class ki {
3686
+ class Vi {
3687
3687
  /**
3688
3688
  * Constructs a new bounding box.
3689
3689
  *
@@ -3950,28 +3950,28 @@ class ki {
3950
3950
  intersectsTriangle(e) {
3951
3951
  if (this.isEmpty())
3952
3952
  return !1;
3953
- this.getCenter(bi), ji.subVectors(this.max, bi), Kn.subVectors(e.a, bi), Jn.subVectors(e.b, bi), Qn.subVectors(e.c, bi), Sn.subVectors(Jn, Kn), yn.subVectors(Qn, Jn), Un.subVectors(Kn, Qn);
3953
+ this.getCenter(bi), ji.subVectors(this.max, bi), Kn.subVectors(e.a, bi), Jn.subVectors(e.b, bi), Qn.subVectors(e.c, bi), Mn.subVectors(Jn, Kn), yn.subVectors(Qn, Jn), Un.subVectors(Kn, Qn);
3954
3954
  let t = [
3955
3955
  0,
3956
- -Sn.z,
3957
- Sn.y,
3956
+ -Mn.z,
3957
+ Mn.y,
3958
3958
  0,
3959
3959
  -yn.z,
3960
3960
  yn.y,
3961
3961
  0,
3962
3962
  -Un.z,
3963
3963
  Un.y,
3964
- Sn.z,
3964
+ Mn.z,
3965
3965
  0,
3966
- -Sn.x,
3966
+ -Mn.x,
3967
3967
  yn.z,
3968
3968
  0,
3969
3969
  -yn.x,
3970
3970
  Un.z,
3971
3971
  0,
3972
3972
  -Un.x,
3973
- -Sn.y,
3974
- Sn.x,
3973
+ -Mn.y,
3974
+ Mn.x,
3975
3975
  0,
3976
3976
  -yn.y,
3977
3977
  yn.x,
@@ -3980,7 +3980,7 @@ class ki {
3980
3980
  Un.x,
3981
3981
  0
3982
3982
  ];
3983
- return !Qr(t, Kn, Jn, Qn, ji) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !Qr(t, Kn, Jn, Qn, ji)) ? !1 : (Ki.crossVectors(Sn, yn), t = [Ki.x, Ki.y, Ki.z], Qr(t, Kn, Jn, Qn, ji));
3983
+ return !Qr(t, Kn, Jn, Qn, ji) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !Qr(t, Kn, Jn, Qn, ji)) ? !1 : (Ki.crossVectors(Mn, yn), t = [Ki.x, Ki.y, Ki.z], Qr(t, Kn, Jn, Qn, ji));
3984
3984
  }
3985
3985
  /**
3986
3986
  * Clamps the given point within the bounds of this box.
@@ -4092,7 +4092,7 @@ const ln = [
4092
4092
  /* @__PURE__ */ new U(),
4093
4093
  /* @__PURE__ */ new U(),
4094
4094
  /* @__PURE__ */ new U()
4095
- ], Xt = /* @__PURE__ */ new U(), Zi = /* @__PURE__ */ new ki(), Kn = /* @__PURE__ */ new U(), Jn = /* @__PURE__ */ new U(), Qn = /* @__PURE__ */ new U(), Sn = /* @__PURE__ */ new U(), yn = /* @__PURE__ */ new U(), Un = /* @__PURE__ */ new U(), bi = /* @__PURE__ */ new U(), ji = /* @__PURE__ */ new U(), Ki = /* @__PURE__ */ new U(), Nn = /* @__PURE__ */ new U();
4095
+ ], Xt = /* @__PURE__ */ new U(), Zi = /* @__PURE__ */ new Vi(), Kn = /* @__PURE__ */ new U(), Jn = /* @__PURE__ */ new U(), Qn = /* @__PURE__ */ new U(), Mn = /* @__PURE__ */ new U(), yn = /* @__PURE__ */ new U(), Un = /* @__PURE__ */ new U(), bi = /* @__PURE__ */ new U(), ji = /* @__PURE__ */ new U(), Ki = /* @__PURE__ */ new U(), Nn = /* @__PURE__ */ new U();
4096
4096
  function Qr(i, e, t, n, r) {
4097
4097
  for (let s = 0, a = i.length - 3; s <= a; s += 3) {
4098
4098
  Nn.fromArray(i, s);
@@ -4102,7 +4102,7 @@ function Qr(i, e, t, n, r) {
4102
4102
  }
4103
4103
  return !0;
4104
4104
  }
4105
- const iu = /* @__PURE__ */ new ki(), Ti = /* @__PURE__ */ new U(), es = /* @__PURE__ */ new U();
4105
+ const iu = /* @__PURE__ */ new Vi(), Ti = /* @__PURE__ */ new U(), es = /* @__PURE__ */ new U();
4106
4106
  class Hi {
4107
4107
  /**
4108
4108
  * Constructs a new sphere.
@@ -4868,8 +4868,8 @@ class ut {
4868
4868
  * @return {Matrix4} A reference to this matrix.
4869
4869
  */
4870
4870
  multiplyMatrices(e, t) {
4871
- const n = e.elements, r = t.elements, s = this.elements, a = n[0], o = n[4], l = n[8], c = n[12], h = n[1], u = n[5], d = n[9], p = n[13], _ = n[2], x = n[6], m = n[10], f = n[14], b = n[3], T = n[7], y = n[11], A = n[15], R = r[0], C = r[4], F = r[8], M = r[12], S = r[1], D = r[5], z = r[9], B = r[13], G = r[2], X = r[6], k = r[10], H = r[14], $ = r[3], ie = r[7], se = r[11], re = r[15];
4872
- return s[0] = a * R + o * S + l * G + c * $, s[4] = a * C + o * D + l * X + c * ie, s[8] = a * F + o * z + l * k + c * se, s[12] = a * M + o * B + l * H + c * re, s[1] = h * R + u * S + d * G + p * $, s[5] = h * C + u * D + d * X + p * ie, s[9] = h * F + u * z + d * k + p * se, s[13] = h * M + u * B + d * H + p * re, s[2] = _ * R + x * S + m * G + f * $, s[6] = _ * C + x * D + m * X + f * ie, s[10] = _ * F + x * z + m * k + f * se, s[14] = _ * M + x * B + m * H + f * re, s[3] = b * R + T * S + y * G + A * $, s[7] = b * C + T * D + y * X + A * ie, s[11] = b * F + T * z + y * k + A * se, s[15] = b * M + T * B + y * H + A * re, this;
4871
+ const n = e.elements, r = t.elements, s = this.elements, a = n[0], o = n[4], l = n[8], c = n[12], h = n[1], u = n[5], d = n[9], p = n[13], _ = n[2], x = n[6], m = n[10], f = n[14], b = n[3], T = n[7], y = n[11], A = n[15], R = r[0], C = r[4], F = r[8], S = r[12], M = r[1], D = r[5], z = r[9], B = r[13], G = r[2], X = r[6], V = r[10], H = r[14], $ = r[3], ie = r[7], se = r[11], re = r[15];
4872
+ return s[0] = a * R + o * M + l * G + c * $, s[4] = a * C + o * D + l * X + c * ie, s[8] = a * F + o * z + l * V + c * se, s[12] = a * S + o * B + l * H + c * re, s[1] = h * R + u * M + d * G + p * $, s[5] = h * C + u * D + d * X + p * ie, s[9] = h * F + u * z + d * V + p * se, s[13] = h * S + u * B + d * H + p * re, s[2] = _ * R + x * M + m * G + f * $, s[6] = _ * C + x * D + m * X + f * ie, s[10] = _ * F + x * z + m * V + f * se, s[14] = _ * S + x * B + m * H + f * re, s[3] = b * R + T * M + y * G + A * $, s[7] = b * C + T * D + y * X + A * ie, s[11] = b * F + T * z + y * V + A * se, s[15] = b * S + T * B + y * H + A * re, this;
4873
4873
  }
4874
4874
  /**
4875
4875
  * Multiplies every component of the matrix by the given scalar.
@@ -5644,7 +5644,7 @@ class yt extends qn {
5644
5644
  * @type {Matrix3}
5645
5645
  */
5646
5646
  normalMatrix: {
5647
- value: new Ve()
5647
+ value: new ke()
5648
5648
  }
5649
5649
  }), this.matrix = new ut(), this.matrixWorld = new ut(), this.matrixAutoUpdate = yt.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = yt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new Ia(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.customDepthMaterial = void 0, this.customDistanceMaterial = void 0, this.userData = {};
5650
5650
  }
@@ -7140,7 +7140,7 @@ class Yn extends qn {
7140
7140
  * Constructs a new material.
7141
7141
  */
7142
7142
  constructor() {
7143
- super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: uu++ }), this.uuid = Pn(), this.name = "", this.type = "Material", this.blending = mi, this.side = Dn, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = As, this.blendDst = ws, this.blendEquation = Vn, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Ze(0, 0, 0), this.blendAlpha = 0, this.depthFunc = _i, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = Ka, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Zn, this.stencilZFail = Zn, this.stencilZPass = Zn, 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;
7143
+ super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: uu++ }), this.uuid = Pn(), this.name = "", this.type = "Material", this.blending = mi, this.side = Dn, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = As, this.blendDst = ws, this.blendEquation = kn, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Ze(0, 0, 0), this.blendAlpha = 0, this.depthFunc = _i, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = Ka, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Zn, this.stencilZFail = Zn, this.stencilZPass = Zn, 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;
7144
7144
  }
7145
7145
  /**
7146
7146
  * Sets the alpha value to be used when running an alpha test. The material
@@ -7239,7 +7239,7 @@ class Yn extends qn {
7239
7239
  generator: "Material.toJSON"
7240
7240
  }
7241
7241
  };
7242
- n.uuid = this.uuid, n.type = this.type, this.name !== "" && (n.name = this.name), this.color && this.color.isColor && (n.color = this.color.getHex()), this.roughness !== void 0 && (n.roughness = this.roughness), this.metalness !== void 0 && (n.metalness = this.metalness), this.sheen !== void 0 && (n.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (n.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (n.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (n.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (n.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (n.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (n.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (n.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (n.shininess = this.shininess), this.clearcoat !== void 0 && (n.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (n.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (n.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (n.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (n.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, n.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (n.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (n.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (n.dispersion = this.dispersion), this.iridescence !== void 0 && (n.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (n.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (n.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (n.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (n.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (n.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (n.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (n.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (n.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (n.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (n.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (n.lightMap = this.lightMap.toJSON(e).uuid, n.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (n.aoMap = this.aoMap.toJSON(e).uuid, n.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (n.bumpMap = this.bumpMap.toJSON(e).uuid, n.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (n.normalMap = this.normalMap.toJSON(e).uuid, n.normalMapType = this.normalMapType, n.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (n.displacementMap = this.displacementMap.toJSON(e).uuid, n.displacementScale = this.displacementScale, n.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (n.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (n.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (n.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (n.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (n.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (n.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (n.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (n.combine = this.combine)), this.envMapRotation !== void 0 && (n.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (n.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (n.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (n.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (n.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (n.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (n.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (n.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (n.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (n.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (n.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (n.size = this.size), this.shadowSide !== null && (n.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (n.sizeAttenuation = this.sizeAttenuation), this.blending !== mi && (n.blending = this.blending), this.side !== Dn && (n.side = this.side), this.vertexColors === !0 && (n.vertexColors = !0), this.opacity < 1 && (n.opacity = this.opacity), this.transparent === !0 && (n.transparent = !0), this.blendSrc !== As && (n.blendSrc = this.blendSrc), this.blendDst !== ws && (n.blendDst = this.blendDst), this.blendEquation !== Vn && (n.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (n.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (n.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (n.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (n.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (n.blendAlpha = this.blendAlpha), this.depthFunc !== _i && (n.depthFunc = this.depthFunc), this.depthTest === !1 && (n.depthTest = this.depthTest), this.depthWrite === !1 && (n.depthWrite = this.depthWrite), this.colorWrite === !1 && (n.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (n.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== Ka && (n.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (n.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (n.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== Zn && (n.stencilFail = this.stencilFail), this.stencilZFail !== Zn && (n.stencilZFail = this.stencilZFail), this.stencilZPass !== Zn && (n.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (n.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (n.rotation = this.rotation), this.polygonOffset === !0 && (n.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (n.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (n.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (n.linewidth = this.linewidth), this.dashSize !== void 0 && (n.dashSize = this.dashSize), this.gapSize !== void 0 && (n.gapSize = this.gapSize), this.scale !== void 0 && (n.scale = this.scale), this.dithering === !0 && (n.dithering = !0), this.alphaTest > 0 && (n.alphaTest = this.alphaTest), this.alphaHash === !0 && (n.alphaHash = !0), this.alphaToCoverage === !0 && (n.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (n.premultipliedAlpha = !0), this.forceSinglePass === !0 && (n.forceSinglePass = !0), this.allowOverride === !1 && (n.allowOverride = !1), this.wireframe === !0 && (n.wireframe = !0), this.wireframeLinewidth > 1 && (n.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (n.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (n.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (n.flatShading = !0), this.visible === !1 && (n.visible = !1), this.toneMapped === !1 && (n.toneMapped = !1), this.fog === !1 && (n.fog = !1), Object.keys(this.userData).length > 0 && (n.userData = this.userData);
7242
+ n.uuid = this.uuid, n.type = this.type, this.name !== "" && (n.name = this.name), this.color && this.color.isColor && (n.color = this.color.getHex()), this.roughness !== void 0 && (n.roughness = this.roughness), this.metalness !== void 0 && (n.metalness = this.metalness), this.sheen !== void 0 && (n.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (n.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (n.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (n.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (n.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (n.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (n.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (n.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (n.shininess = this.shininess), this.clearcoat !== void 0 && (n.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (n.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (n.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (n.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (n.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, n.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (n.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (n.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (n.dispersion = this.dispersion), this.iridescence !== void 0 && (n.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (n.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (n.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (n.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (n.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (n.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (n.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (n.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (n.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (n.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (n.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (n.lightMap = this.lightMap.toJSON(e).uuid, n.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (n.aoMap = this.aoMap.toJSON(e).uuid, n.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (n.bumpMap = this.bumpMap.toJSON(e).uuid, n.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (n.normalMap = this.normalMap.toJSON(e).uuid, n.normalMapType = this.normalMapType, n.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (n.displacementMap = this.displacementMap.toJSON(e).uuid, n.displacementScale = this.displacementScale, n.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (n.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (n.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (n.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (n.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (n.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (n.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (n.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (n.combine = this.combine)), this.envMapRotation !== void 0 && (n.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (n.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (n.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (n.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (n.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (n.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (n.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (n.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (n.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (n.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (n.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (n.size = this.size), this.shadowSide !== null && (n.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (n.sizeAttenuation = this.sizeAttenuation), this.blending !== mi && (n.blending = this.blending), this.side !== Dn && (n.side = this.side), this.vertexColors === !0 && (n.vertexColors = !0), this.opacity < 1 && (n.opacity = this.opacity), this.transparent === !0 && (n.transparent = !0), this.blendSrc !== As && (n.blendSrc = this.blendSrc), this.blendDst !== ws && (n.blendDst = this.blendDst), this.blendEquation !== kn && (n.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (n.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (n.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (n.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (n.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (n.blendAlpha = this.blendAlpha), this.depthFunc !== _i && (n.depthFunc = this.depthFunc), this.depthTest === !1 && (n.depthTest = this.depthTest), this.depthWrite === !1 && (n.depthWrite = this.depthWrite), this.colorWrite === !1 && (n.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (n.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== Ka && (n.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (n.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (n.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== Zn && (n.stencilFail = this.stencilFail), this.stencilZFail !== Zn && (n.stencilZFail = this.stencilZFail), this.stencilZPass !== Zn && (n.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (n.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (n.rotation = this.rotation), this.polygonOffset === !0 && (n.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (n.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (n.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (n.linewidth = this.linewidth), this.dashSize !== void 0 && (n.dashSize = this.dashSize), this.gapSize !== void 0 && (n.gapSize = this.gapSize), this.scale !== void 0 && (n.scale = this.scale), this.dithering === !0 && (n.dithering = !0), this.alphaTest > 0 && (n.alphaTest = this.alphaTest), this.alphaHash === !0 && (n.alphaHash = !0), this.alphaToCoverage === !0 && (n.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (n.premultipliedAlpha = !0), this.forceSinglePass === !0 && (n.forceSinglePass = !0), this.allowOverride === !1 && (n.allowOverride = !1), this.wireframe === !0 && (n.wireframe = !0), this.wireframeLinewidth > 1 && (n.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (n.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (n.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (n.flatShading = !0), this.visible === !1 && (n.visible = !1), this.toneMapped === !1 && (n.toneMapped = !1), this.fog === !1 && (n.fog = !1), Object.keys(this.userData).length > 0 && (n.userData = this.userData);
7243
7243
  function r(s) {
7244
7244
  const a = [];
7245
7245
  for (const o in s) {
@@ -7320,7 +7320,7 @@ class bl extends Yn {
7320
7320
  }
7321
7321
  const mt = /* @__PURE__ */ new U(), ir = /* @__PURE__ */ new Ne();
7322
7322
  let hu = 0;
7323
- class Mt {
7323
+ class St {
7324
7324
  /**
7325
7325
  * Constructs a new buffer attribute.
7326
7326
  *
@@ -7642,7 +7642,7 @@ class Mt {
7642
7642
  return this.name !== "" && (e.name = this.name), this.usage !== _a && (e.usage = this.usage), e;
7643
7643
  }
7644
7644
  }
7645
- class Tl extends Mt {
7645
+ class Tl extends St {
7646
7646
  /**
7647
7647
  * Constructs a new buffer attribute.
7648
7648
  *
@@ -7654,7 +7654,7 @@ class Tl extends Mt {
7654
7654
  super(new Uint16Array(e), t, n);
7655
7655
  }
7656
7656
  }
7657
- class Al extends Mt {
7657
+ class Al extends St {
7658
7658
  /**
7659
7659
  * Constructs a new buffer attribute.
7660
7660
  *
@@ -7666,7 +7666,7 @@ class Al extends Mt {
7666
7666
  super(new Uint32Array(e), t, n);
7667
7667
  }
7668
7668
  }
7669
- class sn extends Mt {
7669
+ class sn extends St {
7670
7670
  /**
7671
7671
  * Constructs a new buffer attribute.
7672
7672
  *
@@ -7679,7 +7679,7 @@ class sn extends Mt {
7679
7679
  }
7680
7680
  }
7681
7681
  let du = 0;
7682
- const kt = /* @__PURE__ */ new ut(), fs = /* @__PURE__ */ new yt(), si = /* @__PURE__ */ new U(), Bt = /* @__PURE__ */ new ki(), wi = /* @__PURE__ */ new ki(), vt = /* @__PURE__ */ new U();
7682
+ const Vt = /* @__PURE__ */ new ut(), fs = /* @__PURE__ */ new yt(), si = /* @__PURE__ */ new U(), Bt = /* @__PURE__ */ new Vi(), wi = /* @__PURE__ */ new Vi(), vt = /* @__PURE__ */ new U();
7683
7683
  class Ut extends qn {
7684
7684
  /**
7685
7685
  * Constructs a new geometry.
@@ -7702,7 +7702,7 @@ class Ut extends qn {
7702
7702
  * @return {BufferGeometry} A reference to this instance.
7703
7703
  */
7704
7704
  setIndex(e) {
7705
- return Array.isArray(e) ? this.index = new (Sl(e) ? Al : Tl)(e, 1) : this.index = e, this;
7705
+ return Array.isArray(e) ? this.index = new (Ml(e) ? Al : Tl)(e, 1) : this.index = e, this;
7706
7706
  }
7707
7707
  /**
7708
7708
  * Sets the given indirect attribute to this geometry.
@@ -7802,7 +7802,7 @@ class Ut extends qn {
7802
7802
  t !== void 0 && (t.applyMatrix4(e), t.needsUpdate = !0);
7803
7803
  const n = this.attributes.normal;
7804
7804
  if (n !== void 0) {
7805
- const s = new Ve().getNormalMatrix(e);
7805
+ const s = new ke().getNormalMatrix(e);
7806
7806
  n.applyNormalMatrix(s), n.needsUpdate = !0;
7807
7807
  }
7808
7808
  const r = this.attributes.tangent;
@@ -7815,7 +7815,7 @@ class Ut extends qn {
7815
7815
  * @return {BufferGeometry} A reference to this instance.
7816
7816
  */
7817
7817
  applyQuaternion(e) {
7818
- return kt.makeRotationFromQuaternion(e), this.applyMatrix4(kt), this;
7818
+ return Vt.makeRotationFromQuaternion(e), this.applyMatrix4(Vt), this;
7819
7819
  }
7820
7820
  /**
7821
7821
  * Rotates the geometry about the X axis. This is typically done as a one time
@@ -7826,7 +7826,7 @@ class Ut extends qn {
7826
7826
  * @return {BufferGeometry} A reference to this instance.
7827
7827
  */
7828
7828
  rotateX(e) {
7829
- return kt.makeRotationX(e), this.applyMatrix4(kt), this;
7829
+ return Vt.makeRotationX(e), this.applyMatrix4(Vt), this;
7830
7830
  }
7831
7831
  /**
7832
7832
  * Rotates the geometry about the Y axis. This is typically done as a one time
@@ -7837,7 +7837,7 @@ class Ut extends qn {
7837
7837
  * @return {BufferGeometry} A reference to this instance.
7838
7838
  */
7839
7839
  rotateY(e) {
7840
- return kt.makeRotationY(e), this.applyMatrix4(kt), this;
7840
+ return Vt.makeRotationY(e), this.applyMatrix4(Vt), this;
7841
7841
  }
7842
7842
  /**
7843
7843
  * Rotates the geometry about the Z axis. This is typically done as a one time
@@ -7848,7 +7848,7 @@ class Ut extends qn {
7848
7848
  * @return {BufferGeometry} A reference to this instance.
7849
7849
  */
7850
7850
  rotateZ(e) {
7851
- return kt.makeRotationZ(e), this.applyMatrix4(kt), this;
7851
+ return Vt.makeRotationZ(e), this.applyMatrix4(Vt), this;
7852
7852
  }
7853
7853
  /**
7854
7854
  * Translates the geometry. This is typically done as a one time
@@ -7861,7 +7861,7 @@ class Ut extends qn {
7861
7861
  * @return {BufferGeometry} A reference to this instance.
7862
7862
  */
7863
7863
  translate(e, t, n) {
7864
- return kt.makeTranslation(e, t, n), this.applyMatrix4(kt), this;
7864
+ return Vt.makeTranslation(e, t, n), this.applyMatrix4(Vt), this;
7865
7865
  }
7866
7866
  /**
7867
7867
  * Scales the geometry. This is typically done as a one time
@@ -7874,7 +7874,7 @@ class Ut extends qn {
7874
7874
  * @return {BufferGeometry} A reference to this instance.
7875
7875
  */
7876
7876
  scale(e, t, n) {
7877
- return kt.makeScale(e, t, n), this.applyMatrix4(kt), this;
7877
+ return Vt.makeScale(e, t, n), this.applyMatrix4(Vt), this;
7878
7878
  }
7879
7879
  /**
7880
7880
  * Rotates the geometry to face a point in 3D space. This is typically done as a one time
@@ -7931,7 +7931,7 @@ class Ut extends qn {
7931
7931
  * You may need to recompute the bounding box if the geometry vertices are modified.
7932
7932
  */
7933
7933
  computeBoundingBox() {
7934
- this.boundingBox === null && (this.boundingBox = new ki());
7934
+ this.boundingBox === null && (this.boundingBox = new Vi());
7935
7935
  const e = this.attributes.position, t = this.morphAttributes.position;
7936
7936
  if (e && e.isGLBufferAttribute) {
7937
7937
  qe("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.", this), this.boundingBox.set(
@@ -7996,23 +7996,23 @@ class Ut extends qn {
7996
7996
  return;
7997
7997
  }
7998
7998
  const n = t.position, r = t.normal, s = t.uv;
7999
- this.hasAttribute("tangent") === !1 && this.setAttribute("tangent", new Mt(new Float32Array(4 * n.count), 4));
7999
+ this.hasAttribute("tangent") === !1 && this.setAttribute("tangent", new St(new Float32Array(4 * n.count), 4));
8000
8000
  const a = this.getAttribute("tangent"), o = [], l = [];
8001
8001
  for (let F = 0; F < n.count; F++)
8002
8002
  o[F] = new U(), l[F] = new U();
8003
8003
  const c = new U(), h = new U(), u = new U(), d = new Ne(), p = new Ne(), _ = new Ne(), x = new U(), m = new U();
8004
- function f(F, M, S) {
8005
- c.fromBufferAttribute(n, F), h.fromBufferAttribute(n, M), u.fromBufferAttribute(n, S), d.fromBufferAttribute(s, F), p.fromBufferAttribute(s, M), _.fromBufferAttribute(s, S), h.sub(c), u.sub(c), p.sub(d), _.sub(d);
8004
+ function f(F, S, M) {
8005
+ c.fromBufferAttribute(n, F), h.fromBufferAttribute(n, S), u.fromBufferAttribute(n, M), d.fromBufferAttribute(s, F), p.fromBufferAttribute(s, S), _.fromBufferAttribute(s, M), h.sub(c), u.sub(c), p.sub(d), _.sub(d);
8006
8006
  const D = 1 / (p.x * _.y - _.x * p.y);
8007
- isFinite(D) && (x.copy(h).multiplyScalar(_.y).addScaledVector(u, -p.y).multiplyScalar(D), m.copy(u).multiplyScalar(p.x).addScaledVector(h, -_.x).multiplyScalar(D), o[F].add(x), o[M].add(x), o[S].add(x), l[F].add(m), l[M].add(m), l[S].add(m));
8007
+ isFinite(D) && (x.copy(h).multiplyScalar(_.y).addScaledVector(u, -p.y).multiplyScalar(D), m.copy(u).multiplyScalar(p.x).addScaledVector(h, -_.x).multiplyScalar(D), o[F].add(x), o[S].add(x), o[M].add(x), l[F].add(m), l[S].add(m), l[M].add(m));
8008
8008
  }
8009
8009
  let b = this.groups;
8010
8010
  b.length === 0 && (b = [{
8011
8011
  start: 0,
8012
8012
  count: e.count
8013
8013
  }]);
8014
- for (let F = 0, M = b.length; F < M; ++F) {
8015
- const S = b[F], D = S.start, z = S.count;
8014
+ for (let F = 0, S = b.length; F < S; ++F) {
8015
+ const M = b[F], D = M.start, z = M.count;
8016
8016
  for (let B = D, G = D + z; B < G; B += 3)
8017
8017
  f(
8018
8018
  e.getX(B + 0),
@@ -8023,13 +8023,13 @@ class Ut extends qn {
8023
8023
  const T = new U(), y = new U(), A = new U(), R = new U();
8024
8024
  function C(F) {
8025
8025
  A.fromBufferAttribute(r, F), R.copy(A);
8026
- const M = o[F];
8027
- T.copy(M), T.sub(A.multiplyScalar(A.dot(M))).normalize(), y.crossVectors(R, M);
8026
+ const S = o[F];
8027
+ T.copy(S), T.sub(A.multiplyScalar(A.dot(S))).normalize(), y.crossVectors(R, S);
8028
8028
  const D = y.dot(l[F]) < 0 ? -1 : 1;
8029
8029
  a.setXYZW(F, T.x, T.y, T.z, D);
8030
8030
  }
8031
- for (let F = 0, M = b.length; F < M; ++F) {
8032
- const S = b[F], D = S.start, z = S.count;
8031
+ for (let F = 0, S = b.length; F < S; ++F) {
8032
+ const M = b[F], D = M.start, z = M.count;
8033
8033
  for (let B = D, G = D + z; B < G; B += 3)
8034
8034
  C(e.getX(B + 0)), C(e.getX(B + 1)), C(e.getX(B + 2));
8035
8035
  }
@@ -8045,7 +8045,7 @@ class Ut extends qn {
8045
8045
  if (t !== void 0) {
8046
8046
  let n = this.getAttribute("normal");
8047
8047
  if (n === void 0)
8048
- n = new Mt(new Float32Array(t.count * 3), 3), this.setAttribute("normal", n);
8048
+ n = new St(new Float32Array(t.count * 3), 3), this.setAttribute("normal", n);
8049
8049
  else
8050
8050
  for (let d = 0, p = n.count; d < p; d++)
8051
8051
  n.setXYZ(d, 0, 0, 0);
@@ -8085,7 +8085,7 @@ class Ut extends qn {
8085
8085
  for (let f = 0; f < h; f++)
8086
8086
  d[_++] = c[p++];
8087
8087
  }
8088
- return new Mt(d, h, u);
8088
+ return new St(d, h, u);
8089
8089
  }
8090
8090
  if (this.index === null)
8091
8091
  return Fe("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."), this;
@@ -8211,7 +8211,7 @@ class Ut extends qn {
8211
8211
  }
8212
8212
  }
8213
8213
  const ho = /* @__PURE__ */ new ut(), Fn = /* @__PURE__ */ new Gi(), rr = /* @__PURE__ */ new Hi(), fo = /* @__PURE__ */ new U(), sr = /* @__PURE__ */ new U(), ar = /* @__PURE__ */ new U(), or = /* @__PURE__ */ new U(), ps = /* @__PURE__ */ new U(), lr = /* @__PURE__ */ new U(), po = /* @__PURE__ */ new U(), cr = /* @__PURE__ */ new U();
8214
- class Mn extends yt {
8214
+ class Sn extends yt {
8215
8215
  /**
8216
8216
  * Constructs a new mesh.
8217
8217
  *
@@ -8363,23 +8363,23 @@ class Wi extends Ut {
8363
8363
  const l = [], c = [], h = [], u = [];
8364
8364
  let d = 0, p = 0;
8365
8365
  _("z", "y", "x", -1, -1, n, t, e, a, s, 0), _("z", "y", "x", 1, -1, n, t, -e, a, s, 1), _("x", "z", "y", 1, 1, e, n, t, r, a, 2), _("x", "z", "y", 1, -1, e, n, -t, r, a, 3), _("x", "y", "z", 1, -1, e, t, n, r, s, 4), _("x", "y", "z", -1, -1, e, t, -n, r, s, 5), this.setIndex(l), this.setAttribute("position", new sn(c, 3)), this.setAttribute("normal", new sn(h, 3)), this.setAttribute("uv", new sn(u, 2));
8366
- function _(x, m, f, b, T, y, A, R, C, F, M) {
8367
- const S = y / C, D = A / F, z = y / 2, B = A / 2, G = R / 2, X = C + 1, k = F + 1;
8366
+ function _(x, m, f, b, T, y, A, R, C, F, S) {
8367
+ const M = y / C, D = A / F, z = y / 2, B = A / 2, G = R / 2, X = C + 1, V = F + 1;
8368
8368
  let H = 0, $ = 0;
8369
8369
  const ie = new U();
8370
- for (let se = 0; se < k; se++) {
8370
+ for (let se = 0; se < V; se++) {
8371
8371
  const re = se * D - B;
8372
8372
  for (let Le = 0; Le < X; Le++) {
8373
- const we = Le * S - z;
8373
+ const we = Le * M - z;
8374
8374
  ie[x] = we * b, ie[m] = re * T, ie[f] = G, c.push(ie.x, ie.y, ie.z), ie[x] = 0, ie[m] = 0, ie[f] = R > 0 ? 1 : -1, h.push(ie.x, ie.y, ie.z), u.push(Le / C), u.push(1 - se / F), H += 1;
8375
8375
  }
8376
8376
  }
8377
8377
  for (let se = 0; se < F; se++)
8378
8378
  for (let re = 0; re < C; re++) {
8379
- const Le = d + re + X * se, we = d + re + X * (se + 1), ke = d + (re + 1) + X * (se + 1), tt = d + (re + 1) + X * se;
8380
- l.push(Le, we, tt), l.push(we, ke, tt), $ += 6;
8379
+ const Le = d + re + X * se, we = d + re + X * (se + 1), Ve = d + (re + 1) + X * (se + 1), tt = d + (re + 1) + X * se;
8380
+ l.push(Le, we, tt), l.push(we, Ve, tt), $ += 6;
8381
8381
  }
8382
- o.addGroup(p, $, M), p += $, d += H;
8382
+ o.addGroup(p, $, S), p += $, d += H;
8383
8383
  }
8384
8384
  }
8385
8385
  copy(e) {
@@ -8396,7 +8396,7 @@ class Wi extends Ut {
8396
8396
  return new Wi(e.width, e.height, e.depth, e.widthSegments, e.heightSegments, e.depthSegments);
8397
8397
  }
8398
8398
  }
8399
- function Si(i) {
8399
+ function Mi(i) {
8400
8400
  const e = {};
8401
8401
  for (const t in i) {
8402
8402
  e[t] = {};
@@ -8410,7 +8410,7 @@ function Si(i) {
8410
8410
  function Ct(i) {
8411
8411
  const e = {};
8412
8412
  for (let t = 0; t < i.length; t++) {
8413
- const n = Si(i[t]);
8413
+ const n = Mi(i[t]);
8414
8414
  for (const r in n)
8415
8415
  e[r] = n[r];
8416
8416
  }
@@ -8426,7 +8426,7 @@ function wl(i) {
8426
8426
  const e = i.getRenderTarget();
8427
8427
  return e === null ? i.outputColorSpace : e.isXRRenderTarget === !0 ? e.texture.colorSpace : $e.workingColorSpace;
8428
8428
  }
8429
- const mu = { clone: Si, merge: Ct };
8429
+ const mu = { clone: Mi, merge: Ct };
8430
8430
  var gu = `void main() {
8431
8431
  gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
8432
8432
  }`, _u = `void main() {
@@ -8455,7 +8455,7 @@ class Zt extends Yn {
8455
8455
  }, this.index0AttributeName = void 0, this.uniformsNeedUpdate = !1, this.glslVersion = null, e !== void 0 && this.setValues(e);
8456
8456
  }
8457
8457
  copy(e) {
8458
- return super.copy(e), this.fragmentShader = e.fragmentShader, this.vertexShader = e.vertexShader, this.uniforms = Si(e.uniforms), this.uniformsGroups = pu(e.uniformsGroups), this.defines = Object.assign({}, e.defines), this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.fog = e.fog, this.lights = e.lights, this.clipping = e.clipping, this.extensions = Object.assign({}, e.extensions), this.glslVersion = e.glslVersion, this.defaultAttributeValues = Object.assign({}, e.defaultAttributeValues), this.index0AttributeName = e.index0AttributeName, this.uniformsNeedUpdate = e.uniformsNeedUpdate, this;
8458
+ return super.copy(e), this.fragmentShader = e.fragmentShader, this.vertexShader = e.vertexShader, this.uniforms = Mi(e.uniforms), this.uniformsGroups = pu(e.uniformsGroups), this.defines = Object.assign({}, e.defines), this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.fog = e.fog, this.lights = e.lights, this.clipping = e.clipping, this.extensions = Object.assign({}, e.extensions), this.glslVersion = e.glslVersion, this.defaultAttributeValues = Object.assign({}, e.defaultAttributeValues), this.index0AttributeName = e.index0AttributeName, this.uniformsNeedUpdate = e.uniformsNeedUpdate, this;
8459
8459
  }
8460
8460
  toJSON(e) {
8461
8461
  const t = super.toJSON(e);
@@ -8858,14 +8858,14 @@ class Pl extends rn {
8858
8858
  )
8859
8859
  }, r = new Wi(5, 5, 5), s = new Zt({
8860
8860
  name: "CubemapFromEquirect",
8861
- uniforms: Si(n.uniforms),
8861
+ uniforms: Mi(n.uniforms),
8862
8862
  vertexShader: n.vertexShader,
8863
8863
  fragmentShader: n.fragmentShader,
8864
8864
  side: It,
8865
8865
  blending: mn
8866
8866
  });
8867
8867
  s.uniforms.tEquirect.value = t;
8868
- const a = new Mn(r, s), o = t.minFilter;
8868
+ const a = new Sn(r, s), o = t.minFilter;
8869
8869
  return t.minFilter === Hn && (t.minFilter = Tt), new xu(1, 10, this).update(e, a), t.minFilter = o, a.geometry.dispose(), a.material.dispose(), this;
8870
8870
  }
8871
8871
  /**
@@ -9006,7 +9006,7 @@ class ms {
9006
9006
  return e.joints[t.jointName];
9007
9007
  }
9008
9008
  }
9009
- class Mu extends yt {
9009
+ class Su extends yt {
9010
9010
  /**
9011
9011
  * Constructs a new scene.
9012
9012
  */
@@ -9021,7 +9021,7 @@ class Mu extends yt {
9021
9021
  return this.fog !== null && (t.object.fog = this.fog.toJSON()), this.backgroundBlurriness > 0 && (t.object.backgroundBlurriness = this.backgroundBlurriness), this.backgroundIntensity !== 1 && (t.object.backgroundIntensity = this.backgroundIntensity), t.object.backgroundRotation = this.backgroundRotation.toArray(), this.environmentIntensity !== 1 && (t.object.environmentIntensity = this.environmentIntensity), t.object.environmentRotation = this.environmentRotation.toArray(), t;
9022
9022
  }
9023
9023
  }
9024
- class Su {
9024
+ class Mu {
9025
9025
  /**
9026
9026
  * Constructs a new interleaved buffer.
9027
9027
  *
@@ -9376,7 +9376,7 @@ class Or {
9376
9376
  for (let s = 0; s < this.itemSize; s++)
9377
9377
  t.push(this.data.array[r + s]);
9378
9378
  }
9379
- return new Mt(new this.array.constructor(t), this.itemSize, this.normalized);
9379
+ return new St(new this.array.constructor(t), this.itemSize, this.normalized);
9380
9380
  } else
9381
9381
  return e.interleavedBuffers === void 0 && (e.interleavedBuffers = {}), e.interleavedBuffers[this.data.uuid] === void 0 && (e.interleavedBuffers[this.data.uuid] = this.data.clone(e)), new Or(e.interleavedBuffers[this.data.uuid], this.itemSize, this.offset, this.normalized);
9382
9382
  }
@@ -9462,7 +9462,7 @@ class yu extends yt {
9462
9462
  0,
9463
9463
  0,
9464
9464
  1
9465
- ]), n = new Su(t, 5);
9465
+ ]), n = new Mu(t, 5);
9466
9466
  li.setIndex([0, 1, 2, 0, 2, 3]), li.setAttribute("position", new Or(n, 3, 0, !1)), li.setAttribute("uv", new Or(n, 2, 3, !1));
9467
9467
  }
9468
9468
  this.geometry = li, this.material = e, this.center = new Ne(0.5, 0.5), this.count = 1;
@@ -9516,11 +9516,11 @@ class Eu extends At {
9516
9516
  * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
9517
9517
  * @param {string} [colorSpace=NoColorSpace] - The color space.
9518
9518
  */
9519
- constructor(e = null, t = 1, n = 1, r, s, a, o, l, c = St, h = St, u, d) {
9519
+ constructor(e = null, t = 1, n = 1, r, s, a, o, l, c = Mt, h = Mt, u, d) {
9520
9520
  super(null, a, o, l, c, h, r, s, u, d), this.isDataTexture = !0, this.image = { data: e, width: t, height: n }, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
9521
9521
  }
9522
9522
  }
9523
- const _s = /* @__PURE__ */ new U(), bu = /* @__PURE__ */ new U(), Tu = /* @__PURE__ */ new Ve();
9523
+ const _s = /* @__PURE__ */ new U(), bu = /* @__PURE__ */ new U(), Tu = /* @__PURE__ */ new ke();
9524
9524
  class wn {
9525
9525
  /**
9526
9526
  * Constructs a new plane.
@@ -9888,7 +9888,7 @@ class Ul extends Yn {
9888
9888
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.linewidth = e.linewidth, this.linecap = e.linecap, this.linejoin = e.linejoin, this.fog = e.fog, this;
9889
9889
  }
9890
9890
  }
9891
- const Br = /* @__PURE__ */ new U(), zr = /* @__PURE__ */ new U(), vo = /* @__PURE__ */ new ut(), Di = /* @__PURE__ */ new Gi(), mr = /* @__PURE__ */ new Hi(), xs = /* @__PURE__ */ new U(), Mo = /* @__PURE__ */ new U();
9891
+ const Br = /* @__PURE__ */ new U(), zr = /* @__PURE__ */ new U(), vo = /* @__PURE__ */ new ut(), Di = /* @__PURE__ */ new Gi(), mr = /* @__PURE__ */ new Hi(), xs = /* @__PURE__ */ new U(), So = /* @__PURE__ */ new U();
9892
9892
  class wu extends yt {
9893
9893
  /**
9894
9894
  * Constructs a new line.
@@ -9973,7 +9973,7 @@ class wu extends yt {
9973
9973
  }
9974
9974
  function gr(i, e, t, n, r, s, a) {
9975
9975
  const o = i.geometry.attributes.position;
9976
- if (Br.fromBufferAttribute(o, r), zr.fromBufferAttribute(o, s), t.distanceSqToSegment(Br, zr, xs, Mo) > n) return;
9976
+ if (Br.fromBufferAttribute(o, r), zr.fromBufferAttribute(o, s), t.distanceSqToSegment(Br, zr, xs, So) > n) return;
9977
9977
  xs.applyMatrix4(i.matrixWorld);
9978
9978
  const c = e.ray.origin.distanceTo(xs);
9979
9979
  if (!(c < e.near || c > e.far))
@@ -9981,7 +9981,7 @@ function gr(i, e, t, n, r, s, a) {
9981
9981
  distance: c,
9982
9982
  // What do we want? intersection point on the ray or on the segment??
9983
9983
  // point: raycaster.ray.at( distance ),
9984
- point: Mo.clone().applyMatrix4(i.matrixWorld),
9984
+ point: So.clone().applyMatrix4(i.matrixWorld),
9985
9985
  index: a,
9986
9986
  face: null,
9987
9987
  faceIndex: null,
@@ -10006,7 +10006,7 @@ class Ru extends Yn {
10006
10006
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.alphaMap = e.alphaMap, this.size = e.size, this.sizeAttenuation = e.sizeAttenuation, this.fog = e.fog, this;
10007
10007
  }
10008
10008
  }
10009
- const So = /* @__PURE__ */ new ut(), va = /* @__PURE__ */ new Gi(), _r = /* @__PURE__ */ new Hi(), xr = /* @__PURE__ */ new U();
10009
+ const Mo = /* @__PURE__ */ new ut(), va = /* @__PURE__ */ new Gi(), _r = /* @__PURE__ */ new Hi(), xr = /* @__PURE__ */ new U();
10010
10010
  class Cu extends yt {
10011
10011
  /**
10012
10012
  * Constructs a new point cloud.
@@ -10029,7 +10029,7 @@ class Cu extends yt {
10029
10029
  raycast(e, t) {
10030
10030
  const n = this.geometry, r = this.matrixWorld, s = e.params.Points.threshold, a = n.drawRange;
10031
10031
  if (n.boundingSphere === null && n.computeBoundingSphere(), _r.copy(n.boundingSphere), _r.applyMatrix4(r), _r.radius += s, e.ray.intersectsSphere(_r) === !1) return;
10032
- So.copy(r).invert(), va.copy(e.ray).applyMatrix4(So);
10032
+ Mo.copy(r).invert(), va.copy(e.ray).applyMatrix4(Mo);
10033
10033
  const o = s / ((this.scale.x + this.scale.y + this.scale.z) / 3), l = o * o, c = n.index, u = n.attributes.position;
10034
10034
  if (c !== null) {
10035
10035
  const d = Math.max(0, a.start), p = Math.min(c.count, a.start + a.count);
@@ -10098,7 +10098,7 @@ class Pu extends At {
10098
10098
  super(e, t, n, r, s, a, o, l, c), this.isCanvasTexture = !0, this.needsUpdate = !0;
10099
10099
  }
10100
10100
  }
10101
- class Vi extends At {
10101
+ class ki extends At {
10102
10102
  /**
10103
10103
  * Constructs a new depth texture.
10104
10104
  *
@@ -10114,7 +10114,7 @@ class Vi extends At {
10114
10114
  * @param {number} [format=DepthFormat] - The texture format.
10115
10115
  * @param {number} [depth=1] - The depth of the texture.
10116
10116
  */
10117
- constructor(e, t, n = an, r, s, a, o = St, l = St, c, h = xn, u = 1) {
10117
+ constructor(e, t, n = an, r, s, a, o = Mt, l = Mt, c, h = xn, u = 1) {
10118
10118
  if (h !== xn && h !== Gn)
10119
10119
  throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
10120
10120
  const d = { width: e, height: t, depth: u };
@@ -10128,7 +10128,7 @@ class Vi extends At {
10128
10128
  return this.compareFunction !== null && (t.compareFunction = this.compareFunction), t;
10129
10129
  }
10130
10130
  }
10131
- class Du extends Vi {
10131
+ class Du extends ki {
10132
10132
  /**
10133
10133
  * Constructs a new cube depth texture.
10134
10134
  *
@@ -10142,7 +10142,7 @@ class Du extends Vi {
10142
10142
  * @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
10143
10143
  * @param {number} [format=DepthFormat] - The texture format.
10144
10144
  */
10145
- constructor(e, t = an, n = Wn, r, s, a = St, o = St, l, c = xn) {
10145
+ constructor(e, t = an, n = Wn, r, s, a = Mt, o = Mt, l, c = xn) {
10146
10146
  const h = { width: e, height: e, depth: 1 }, u = [h, h, h, h, h, h];
10147
10147
  super(e, e, t, n, r, s, a, o, l, c), this.image = u, this.isCubeDepthTexture = !0, this.isCubeTexture = !0;
10148
10148
  }
@@ -10171,7 +10171,7 @@ class Nl extends At {
10171
10171
  return super.copy(e), this.sourceTexture = e.sourceTexture, this;
10172
10172
  }
10173
10173
  }
10174
- class kr extends Ut {
10174
+ class Vr extends Ut {
10175
10175
  /**
10176
10176
  * Constructs a new plane geometry.
10177
10177
  *
@@ -10213,7 +10213,7 @@ class kr extends Ut {
10213
10213
  * @return {PlaneGeometry} A new instance.
10214
10214
  */
10215
10215
  static fromJSON(e) {
10216
- return new kr(e.width, e.height, e.widthSegments, e.heightSegments);
10216
+ return new Vr(e.width, e.height, e.widthSegments, e.heightSegments);
10217
10217
  }
10218
10218
  }
10219
10219
  class Lu extends Zt {
@@ -10457,7 +10457,7 @@ class Bu {
10457
10457
  * @return {Array<Raycaster~Intersection>} An array holding the intersection points.
10458
10458
  */
10459
10459
  intersectObject(e, t = !0, n = []) {
10460
- return Ma(e, this, n, t), n.sort(bo), n;
10460
+ return Sa(e, this, n, t), n.sort(bo), n;
10461
10461
  }
10462
10462
  /**
10463
10463
  * Checks all intersection between the ray and the objects with or without
@@ -10471,19 +10471,19 @@ class Bu {
10471
10471
  */
10472
10472
  intersectObjects(e, t = !0, n = []) {
10473
10473
  for (let r = 0, s = e.length; r < s; r++)
10474
- Ma(e[r], this, n, t);
10474
+ Sa(e[r], this, n, t);
10475
10475
  return n.sort(bo), n;
10476
10476
  }
10477
10477
  }
10478
10478
  function bo(i, e) {
10479
10479
  return i.distance - e.distance;
10480
10480
  }
10481
- function Ma(i, e, t, n) {
10481
+ function Sa(i, e, t, n) {
10482
10482
  let r = !0;
10483
10483
  if (i.layers.test(e.layers) && i.raycast(e, t) === !1 && (r = !1), r === !0 && n === !0) {
10484
10484
  const s = i.children;
10485
10485
  for (let a = 0, o = s.length; a < o; a++)
10486
- Ma(s[a], e, t, !0);
10486
+ Sa(s[a], e, t, !0);
10487
10487
  }
10488
10488
  }
10489
10489
  class To {
@@ -10600,12 +10600,12 @@ class zu extends qn {
10600
10600
  }
10601
10601
  }
10602
10602
  function Ao(i, e, t, n) {
10603
- const r = Vu(n);
10603
+ const r = ku(n);
10604
10604
  switch (t) {
10605
10605
  // https://registry.khronos.org/OpenGL-Refpages/es3.0/html/glTexImage2D.xhtml
10606
10606
  case xl:
10607
10607
  return i * e;
10608
- case Ml:
10608
+ case Sl:
10609
10609
  return i * e / r.components * r.byteLength;
10610
10610
  case wa:
10611
10611
  return i * e / r.components * r.byteLength;
@@ -10627,11 +10627,11 @@ function Ao(i, e, t, n) {
10627
10627
  case Rr:
10628
10628
  return Math.floor((i + 3) / 4) * Math.floor((e + 3) / 4) * 16;
10629
10629
  // https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_pvrtc/
10630
- case Vs:
10630
+ case ks:
10631
10631
  case Hs:
10632
10632
  return Math.max(i, 16) * Math.max(e, 8) / 4;
10633
10633
  case zs:
10634
- case ks:
10634
+ case Vs:
10635
10635
  return Math.max(i, 8) * Math.max(e, 8) / 2;
10636
10636
  // https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_etc/
10637
10637
  case Gs:
@@ -10689,7 +10689,7 @@ function Ao(i, e, t, n) {
10689
10689
  `Unable to determine texture byte length for ${t} format.`
10690
10690
  );
10691
10691
  }
10692
- function Vu(i) {
10692
+ function ku(i) {
10693
10693
  switch (i) {
10694
10694
  case Gt:
10695
10695
  case pl:
@@ -10735,7 +10735,7 @@ function Ol() {
10735
10735
  }
10736
10736
  };
10737
10737
  }
10738
- function ku(i) {
10738
+ function Vu(i) {
10739
10739
  const e = /* @__PURE__ */ new WeakMap();
10740
10740
  function t(o, l) {
10741
10741
  const c = o.array, h = o.usage, u = c.byteLength, d = i.createBuffer();
@@ -11328,7 +11328,7 @@ vec4 sRGBTransferEOTF( in vec4 value ) {
11328
11328
  }
11329
11329
  vec4 sRGBTransferOETF( in vec4 value ) {
11330
11330
  return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
11331
- }`, Mh = `#ifdef USE_ENVMAP
11331
+ }`, Sh = `#ifdef USE_ENVMAP
11332
11332
  #ifdef ENV_WORLDPOS
11333
11333
  vec3 cameraToFrag;
11334
11334
  if ( isOrthographic ) {
@@ -11357,7 +11357,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
11357
11357
  #elif defined( ENVMAP_BLENDING_ADD )
11358
11358
  outgoingLight += envColor.xyz * specularStrength * reflectivity;
11359
11359
  #endif
11360
- #endif`, Sh = `#ifdef USE_ENVMAP
11360
+ #endif`, Mh = `#ifdef USE_ENVMAP
11361
11361
  uniform float envMapIntensity;
11362
11362
  uniform float flipEnvMap;
11363
11363
  uniform mat3 envMapRotation;
@@ -11729,7 +11729,7 @@ material.roughness = min( material.roughness, 1.0 );
11729
11729
  material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
11730
11730
  material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
11731
11731
  material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
11732
- #endif`, Vh = `uniform sampler2D dfgLUT;
11732
+ #endif`, kh = `uniform sampler2D dfgLUT;
11733
11733
  struct PhysicalMaterial {
11734
11734
  vec3 diffuseColor;
11735
11735
  vec3 diffuseContribution;
@@ -12077,7 +12077,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia
12077
12077
  #define RE_IndirectSpecular RE_IndirectSpecular_Physical
12078
12078
  float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
12079
12079
  return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
12080
- }`, kh = `
12080
+ }`, Vh = `
12081
12081
  vec3 geometryPosition = - vViewPosition;
12082
12082
  vec3 geometryNormal = normal;
12083
12083
  vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
@@ -12510,14 +12510,14 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const
12510
12510
  mvPosition = modelViewMatrix * mvPosition;
12511
12511
  gl_Position = projectionMatrix * mvPosition;`, vd = `#ifdef DITHERING
12512
12512
  gl_FragColor.rgb = dithering( gl_FragColor.rgb );
12513
- #endif`, Md = `#ifdef DITHERING
12513
+ #endif`, Sd = `#ifdef DITHERING
12514
12514
  vec3 dithering( vec3 color ) {
12515
12515
  float grid_position = rand( gl_FragCoord.xy );
12516
12516
  vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
12517
12517
  dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
12518
12518
  return color + dither_shift_RGB;
12519
12519
  }
12520
- #endif`, Sd = `float roughnessFactor = roughness;
12520
+ #endif`, Md = `float roughnessFactor = roughness;
12521
12521
  #ifdef USE_ROUGHNESSMAP
12522
12522
  vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
12523
12523
  roughnessFactor *= texelRoughness.g;
@@ -13338,7 +13338,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`, Nd = `#ifdef USE_TRANSM
13338
13338
  #endif
13339
13339
  #ifdef USE_THICKNESSMAP
13340
13340
  vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
13341
- #endif`, Vd = `#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
13341
+ #endif`, kd = `#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
13342
13342
  vec4 worldPosition = vec4( transformed, 1.0 );
13343
13343
  #ifdef USE_BATCHING
13344
13344
  worldPosition = batchingMatrix * worldPosition;
@@ -13348,7 +13348,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`, Nd = `#ifdef USE_TRANSM
13348
13348
  #endif
13349
13349
  worldPosition = modelMatrix * worldPosition;
13350
13350
  #endif`;
13351
- const kd = `varying vec2 vUv;
13351
+ const Vd = `varying vec2 vUv;
13352
13352
  uniform mat3 uvTransform;
13353
13353
  void main() {
13354
13354
  vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
@@ -14349,7 +14349,7 @@ void main() {
14349
14349
  #include <tonemapping_fragment>
14350
14350
  #include <colorspace_fragment>
14351
14351
  #include <fog_fragment>
14352
- }`, Mf = `uniform float rotation;
14352
+ }`, Sf = `uniform float rotation;
14353
14353
  uniform vec2 center;
14354
14354
  #include <common>
14355
14355
  #include <uv_pars_vertex>
@@ -14373,7 +14373,7 @@ void main() {
14373
14373
  #include <logdepthbuf_vertex>
14374
14374
  #include <clipping_planes_vertex>
14375
14375
  #include <fog_vertex>
14376
- }`, Sf = `uniform vec3 diffuse;
14376
+ }`, Mf = `uniform vec3 diffuse;
14377
14377
  uniform float opacity;
14378
14378
  #include <common>
14379
14379
  #include <uv_pars_fragment>
@@ -14431,8 +14431,8 @@ void main() {
14431
14431
  emissivemap_pars_fragment: _h,
14432
14432
  colorspace_fragment: xh,
14433
14433
  colorspace_pars_fragment: vh,
14434
- envmap_fragment: Mh,
14435
- envmap_common_pars_fragment: Sh,
14434
+ envmap_fragment: Sh,
14435
+ envmap_common_pars_fragment: Mh,
14436
14436
  envmap_pars_fragment: yh,
14437
14437
  envmap_pars_vertex: Eh,
14438
14438
  envmap_physical_pars_fragment: Uh,
@@ -14451,8 +14451,8 @@ void main() {
14451
14451
  lights_phong_fragment: Oh,
14452
14452
  lights_phong_pars_fragment: Bh,
14453
14453
  lights_physical_fragment: zh,
14454
- lights_physical_pars_fragment: Vh,
14455
- lights_fragment_begin: kh,
14454
+ lights_physical_pars_fragment: kh,
14455
+ lights_fragment_begin: Vh,
14456
14456
  lights_fragment_maps: Hh,
14457
14457
  lights_fragment_end: Gh,
14458
14458
  logdepthbuf_fragment: Wh,
@@ -14485,8 +14485,8 @@ void main() {
14485
14485
  premultiplied_alpha_fragment: _d,
14486
14486
  project_vertex: xd,
14487
14487
  dithering_fragment: vd,
14488
- dithering_pars_fragment: Md,
14489
- roughnessmap_fragment: Sd,
14488
+ dithering_pars_fragment: Sd,
14489
+ roughnessmap_fragment: Md,
14490
14490
  roughnessmap_pars_fragment: yd,
14491
14491
  shadowmap_pars_fragment: Ed,
14492
14492
  shadowmap_pars_vertex: bd,
@@ -14505,8 +14505,8 @@ void main() {
14505
14505
  uv_pars_fragment: Od,
14506
14506
  uv_pars_vertex: Bd,
14507
14507
  uv_vertex: zd,
14508
- worldpos_vertex: Vd,
14509
- background_vert: kd,
14508
+ worldpos_vertex: kd,
14509
+ background_vert: Vd,
14510
14510
  background_frag: Hd,
14511
14511
  backgroundCube_vert: Gd,
14512
14512
  backgroundCube_frag: Wd,
@@ -14538,25 +14538,25 @@ void main() {
14538
14538
  points_frag: _f,
14539
14539
  shadow_vert: xf,
14540
14540
  shadow_frag: vf,
14541
- sprite_vert: Mf,
14542
- sprite_frag: Sf
14541
+ sprite_vert: Sf,
14542
+ sprite_frag: Mf
14543
14543
  }, he = {
14544
14544
  common: {
14545
14545
  diffuse: { value: /* @__PURE__ */ new Ze(16777215) },
14546
14546
  opacity: { value: 1 },
14547
14547
  map: { value: null },
14548
- mapTransform: { value: /* @__PURE__ */ new Ve() },
14548
+ mapTransform: { value: /* @__PURE__ */ new ke() },
14549
14549
  alphaMap: { value: null },
14550
- alphaMapTransform: { value: /* @__PURE__ */ new Ve() },
14550
+ alphaMapTransform: { value: /* @__PURE__ */ new ke() },
14551
14551
  alphaTest: { value: 0 }
14552
14552
  },
14553
14553
  specularmap: {
14554
14554
  specularMap: { value: null },
14555
- specularMapTransform: { value: /* @__PURE__ */ new Ve() }
14555
+ specularMapTransform: { value: /* @__PURE__ */ new ke() }
14556
14556
  },
14557
14557
  envmap: {
14558
14558
  envMap: { value: null },
14559
- envMapRotation: { value: /* @__PURE__ */ new Ve() },
14559
+ envMapRotation: { value: /* @__PURE__ */ new ke() },
14560
14560
  flipEnvMap: { value: -1 },
14561
14561
  reflectivity: { value: 1 },
14562
14562
  // basic, lambert, phong
@@ -14570,40 +14570,40 @@ void main() {
14570
14570
  aomap: {
14571
14571
  aoMap: { value: null },
14572
14572
  aoMapIntensity: { value: 1 },
14573
- aoMapTransform: { value: /* @__PURE__ */ new Ve() }
14573
+ aoMapTransform: { value: /* @__PURE__ */ new ke() }
14574
14574
  },
14575
14575
  lightmap: {
14576
14576
  lightMap: { value: null },
14577
14577
  lightMapIntensity: { value: 1 },
14578
- lightMapTransform: { value: /* @__PURE__ */ new Ve() }
14578
+ lightMapTransform: { value: /* @__PURE__ */ new ke() }
14579
14579
  },
14580
14580
  bumpmap: {
14581
14581
  bumpMap: { value: null },
14582
- bumpMapTransform: { value: /* @__PURE__ */ new Ve() },
14582
+ bumpMapTransform: { value: /* @__PURE__ */ new ke() },
14583
14583
  bumpScale: { value: 1 }
14584
14584
  },
14585
14585
  normalmap: {
14586
14586
  normalMap: { value: null },
14587
- normalMapTransform: { value: /* @__PURE__ */ new Ve() },
14587
+ normalMapTransform: { value: /* @__PURE__ */ new ke() },
14588
14588
  normalScale: { value: /* @__PURE__ */ new Ne(1, 1) }
14589
14589
  },
14590
14590
  displacementmap: {
14591
14591
  displacementMap: { value: null },
14592
- displacementMapTransform: { value: /* @__PURE__ */ new Ve() },
14592
+ displacementMapTransform: { value: /* @__PURE__ */ new ke() },
14593
14593
  displacementScale: { value: 1 },
14594
14594
  displacementBias: { value: 0 }
14595
14595
  },
14596
14596
  emissivemap: {
14597
14597
  emissiveMap: { value: null },
14598
- emissiveMapTransform: { value: /* @__PURE__ */ new Ve() }
14598
+ emissiveMapTransform: { value: /* @__PURE__ */ new ke() }
14599
14599
  },
14600
14600
  metalnessmap: {
14601
14601
  metalnessMap: { value: null },
14602
- metalnessMapTransform: { value: /* @__PURE__ */ new Ve() }
14602
+ metalnessMapTransform: { value: /* @__PURE__ */ new ke() }
14603
14603
  },
14604
14604
  roughnessmap: {
14605
14605
  roughnessMap: { value: null },
14606
- roughnessMapTransform: { value: /* @__PURE__ */ new Ve() }
14606
+ roughnessMapTransform: { value: /* @__PURE__ */ new ke() }
14607
14607
  },
14608
14608
  gradientmap: {
14609
14609
  gradientMap: { value: null }
@@ -14688,9 +14688,9 @@ void main() {
14688
14688
  scale: { value: 1 },
14689
14689
  map: { value: null },
14690
14690
  alphaMap: { value: null },
14691
- alphaMapTransform: { value: /* @__PURE__ */ new Ve() },
14691
+ alphaMapTransform: { value: /* @__PURE__ */ new ke() },
14692
14692
  alphaTest: { value: 0 },
14693
- uvTransform: { value: /* @__PURE__ */ new Ve() }
14693
+ uvTransform: { value: /* @__PURE__ */ new ke() }
14694
14694
  },
14695
14695
  sprite: {
14696
14696
  diffuse: { value: /* @__PURE__ */ new Ze(16777215) },
@@ -14698,9 +14698,9 @@ void main() {
14698
14698
  center: { value: /* @__PURE__ */ new Ne(0.5, 0.5) },
14699
14699
  rotation: { value: 0 },
14700
14700
  map: { value: null },
14701
- mapTransform: { value: /* @__PURE__ */ new Ve() },
14701
+ mapTransform: { value: /* @__PURE__ */ new ke() },
14702
14702
  alphaMap: { value: null },
14703
- alphaMapTransform: { value: /* @__PURE__ */ new Ve() },
14703
+ alphaMapTransform: { value: /* @__PURE__ */ new ke() },
14704
14704
  alphaTest: { value: 0 }
14705
14705
  }
14706
14706
  }, Jt = {
@@ -14867,7 +14867,7 @@ void main() {
14867
14867
  },
14868
14868
  background: {
14869
14869
  uniforms: {
14870
- uvTransform: { value: /* @__PURE__ */ new Ve() },
14870
+ uvTransform: { value: /* @__PURE__ */ new ke() },
14871
14871
  t2D: { value: null },
14872
14872
  backgroundIntensity: { value: 1 }
14873
14873
  },
@@ -14880,7 +14880,7 @@ void main() {
14880
14880
  flipEnvMap: { value: -1 },
14881
14881
  backgroundBlurriness: { value: 0 },
14882
14882
  backgroundIntensity: { value: 1 },
14883
- backgroundRotation: { value: /* @__PURE__ */ new Ve() }
14883
+ backgroundRotation: { value: /* @__PURE__ */ new ke() }
14884
14884
  },
14885
14885
  vertexShader: He.backgroundCube_vert,
14886
14886
  fragmentShader: He.backgroundCube_frag
@@ -14933,48 +14933,48 @@ Jt.physical = {
14933
14933
  {
14934
14934
  clearcoat: { value: 0 },
14935
14935
  clearcoatMap: { value: null },
14936
- clearcoatMapTransform: { value: /* @__PURE__ */ new Ve() },
14936
+ clearcoatMapTransform: { value: /* @__PURE__ */ new ke() },
14937
14937
  clearcoatNormalMap: { value: null },
14938
- clearcoatNormalMapTransform: { value: /* @__PURE__ */ new Ve() },
14938
+ clearcoatNormalMapTransform: { value: /* @__PURE__ */ new ke() },
14939
14939
  clearcoatNormalScale: { value: /* @__PURE__ */ new Ne(1, 1) },
14940
14940
  clearcoatRoughness: { value: 0 },
14941
14941
  clearcoatRoughnessMap: { value: null },
14942
- clearcoatRoughnessMapTransform: { value: /* @__PURE__ */ new Ve() },
14942
+ clearcoatRoughnessMapTransform: { value: /* @__PURE__ */ new ke() },
14943
14943
  dispersion: { value: 0 },
14944
14944
  iridescence: { value: 0 },
14945
14945
  iridescenceMap: { value: null },
14946
- iridescenceMapTransform: { value: /* @__PURE__ */ new Ve() },
14946
+ iridescenceMapTransform: { value: /* @__PURE__ */ new ke() },
14947
14947
  iridescenceIOR: { value: 1.3 },
14948
14948
  iridescenceThicknessMinimum: { value: 100 },
14949
14949
  iridescenceThicknessMaximum: { value: 400 },
14950
14950
  iridescenceThicknessMap: { value: null },
14951
- iridescenceThicknessMapTransform: { value: /* @__PURE__ */ new Ve() },
14951
+ iridescenceThicknessMapTransform: { value: /* @__PURE__ */ new ke() },
14952
14952
  sheen: { value: 0 },
14953
14953
  sheenColor: { value: /* @__PURE__ */ new Ze(0) },
14954
14954
  sheenColorMap: { value: null },
14955
- sheenColorMapTransform: { value: /* @__PURE__ */ new Ve() },
14955
+ sheenColorMapTransform: { value: /* @__PURE__ */ new ke() },
14956
14956
  sheenRoughness: { value: 1 },
14957
14957
  sheenRoughnessMap: { value: null },
14958
- sheenRoughnessMapTransform: { value: /* @__PURE__ */ new Ve() },
14958
+ sheenRoughnessMapTransform: { value: /* @__PURE__ */ new ke() },
14959
14959
  transmission: { value: 0 },
14960
14960
  transmissionMap: { value: null },
14961
- transmissionMapTransform: { value: /* @__PURE__ */ new Ve() },
14961
+ transmissionMapTransform: { value: /* @__PURE__ */ new ke() },
14962
14962
  transmissionSamplerSize: { value: /* @__PURE__ */ new Ne() },
14963
14963
  transmissionSamplerMap: { value: null },
14964
14964
  thickness: { value: 0 },
14965
14965
  thicknessMap: { value: null },
14966
- thicknessMapTransform: { value: /* @__PURE__ */ new Ve() },
14966
+ thicknessMapTransform: { value: /* @__PURE__ */ new ke() },
14967
14967
  attenuationDistance: { value: 0 },
14968
14968
  attenuationColor: { value: /* @__PURE__ */ new Ze(0) },
14969
14969
  specularColor: { value: /* @__PURE__ */ new Ze(1, 1, 1) },
14970
14970
  specularColorMap: { value: null },
14971
- specularColorMapTransform: { value: /* @__PURE__ */ new Ve() },
14971
+ specularColorMapTransform: { value: /* @__PURE__ */ new ke() },
14972
14972
  specularIntensity: { value: 1 },
14973
14973
  specularIntensityMap: { value: null },
14974
- specularIntensityMapTransform: { value: /* @__PURE__ */ new Ve() },
14974
+ specularIntensityMapTransform: { value: /* @__PURE__ */ new ke() },
14975
14975
  anisotropyVector: { value: /* @__PURE__ */ new Ne() },
14976
14976
  anisotropyMap: { value: null },
14977
- anisotropyMapTransform: { value: /* @__PURE__ */ new Ve() }
14977
+ anisotropyMapTransform: { value: /* @__PURE__ */ new ke() }
14978
14978
  }
14979
14979
  ]),
14980
14980
  vertexShader: He.meshphysical_vert,
@@ -14997,11 +14997,11 @@ function Ef(i, e, t, n, r, s, a) {
14997
14997
  }
14998
14998
  function m(T, y) {
14999
14999
  const A = _(y);
15000
- A && (A.isCubeTexture || A.mapping === Vr) ? (h === void 0 && (h = new Mn(
15000
+ A && (A.isCubeTexture || A.mapping === kr) ? (h === void 0 && (h = new Sn(
15001
15001
  new Wi(1, 1, 1),
15002
15002
  new Zt({
15003
15003
  name: "BackgroundCubeMaterial",
15004
- uniforms: Si(Jt.backgroundCube.uniforms),
15004
+ uniforms: Mi(Jt.backgroundCube.uniforms),
15005
15005
  vertexShader: Jt.backgroundCube.vertexShader,
15006
15006
  fragmentShader: Jt.backgroundCube.fragmentShader,
15007
15007
  side: It,
@@ -15016,11 +15016,11 @@ function Ef(i, e, t, n, r, s, a) {
15016
15016
  get: function() {
15017
15017
  return this.uniforms.envMap.value;
15018
15018
  }
15019
- }), r.update(h)), Bn.copy(y.backgroundRotation), Bn.x *= -1, Bn.y *= -1, Bn.z *= -1, A.isCubeTexture && A.isRenderTargetTexture === !1 && (Bn.y *= -1, Bn.z *= -1), h.material.uniforms.envMap.value = A, h.material.uniforms.flipEnvMap.value = A.isCubeTexture && A.isRenderTargetTexture === !1 ? -1 : 1, h.material.uniforms.backgroundBlurriness.value = y.backgroundBlurriness, h.material.uniforms.backgroundIntensity.value = y.backgroundIntensity, h.material.uniforms.backgroundRotation.value.setFromMatrix4(yf.makeRotationFromEuler(Bn)), h.material.toneMapped = $e.getTransfer(A.colorSpace) !== et, (u !== A || d !== A.version || p !== i.toneMapping) && (h.material.needsUpdate = !0, u = A, d = A.version, p = i.toneMapping), h.layers.enableAll(), T.unshift(h, h.geometry, h.material, 0, 0, null)) : A && A.isTexture && (c === void 0 && (c = new Mn(
15020
- new kr(2, 2),
15019
+ }), r.update(h)), Bn.copy(y.backgroundRotation), Bn.x *= -1, Bn.y *= -1, Bn.z *= -1, A.isCubeTexture && A.isRenderTargetTexture === !1 && (Bn.y *= -1, Bn.z *= -1), h.material.uniforms.envMap.value = A, h.material.uniforms.flipEnvMap.value = A.isCubeTexture && A.isRenderTargetTexture === !1 ? -1 : 1, h.material.uniforms.backgroundBlurriness.value = y.backgroundBlurriness, h.material.uniforms.backgroundIntensity.value = y.backgroundIntensity, h.material.uniforms.backgroundRotation.value.setFromMatrix4(yf.makeRotationFromEuler(Bn)), h.material.toneMapped = $e.getTransfer(A.colorSpace) !== et, (u !== A || d !== A.version || p !== i.toneMapping) && (h.material.needsUpdate = !0, u = A, d = A.version, p = i.toneMapping), h.layers.enableAll(), T.unshift(h, h.geometry, h.material, 0, 0, null)) : A && A.isTexture && (c === void 0 && (c = new Sn(
15020
+ new Vr(2, 2),
15021
15021
  new Zt({
15022
15022
  name: "BackgroundMaterial",
15023
- uniforms: Si(Jt.background.uniforms),
15023
+ uniforms: Mi(Jt.background.uniforms),
15024
15024
  vertexShader: Jt.background.vertexShader,
15025
15025
  fragmentShader: Jt.background.fragmentShader,
15026
15026
  side: Dn,
@@ -15062,30 +15062,30 @@ function Ef(i, e, t, n, r, s, a) {
15062
15062
  function bf(i, e) {
15063
15063
  const t = i.getParameter(i.MAX_VERTEX_ATTRIBS), n = {}, r = d(null);
15064
15064
  let s = r, a = !1;
15065
- function o(S, D, z, B, G) {
15065
+ function o(M, D, z, B, G) {
15066
15066
  let X = !1;
15067
- const k = u(B, z, D);
15068
- s !== k && (s = k, c(s.object)), X = p(S, B, z, G), X && _(S, B, z, G), G !== null && e.update(G, i.ELEMENT_ARRAY_BUFFER), (X || a) && (a = !1, y(S, D, z, B), G !== null && i.bindBuffer(i.ELEMENT_ARRAY_BUFFER, e.get(G).buffer));
15067
+ const V = u(B, z, D);
15068
+ s !== V && (s = V, c(s.object)), X = p(M, B, z, G), X && _(M, B, z, G), G !== null && e.update(G, i.ELEMENT_ARRAY_BUFFER), (X || a) && (a = !1, y(M, D, z, B), G !== null && i.bindBuffer(i.ELEMENT_ARRAY_BUFFER, e.get(G).buffer));
15069
15069
  }
15070
15070
  function l() {
15071
15071
  return i.createVertexArray();
15072
15072
  }
15073
- function c(S) {
15074
- return i.bindVertexArray(S);
15073
+ function c(M) {
15074
+ return i.bindVertexArray(M);
15075
15075
  }
15076
- function h(S) {
15077
- return i.deleteVertexArray(S);
15076
+ function h(M) {
15077
+ return i.deleteVertexArray(M);
15078
15078
  }
15079
- function u(S, D, z) {
15079
+ function u(M, D, z) {
15080
15080
  const B = z.wireframe === !0;
15081
- let G = n[S.id];
15082
- G === void 0 && (G = {}, n[S.id] = G);
15081
+ let G = n[M.id];
15082
+ G === void 0 && (G = {}, n[M.id] = G);
15083
15083
  let X = G[D.id];
15084
15084
  X === void 0 && (X = {}, G[D.id] = X);
15085
- let k = X[B];
15086
- return k === void 0 && (k = d(l()), X[B] = k), k;
15085
+ let V = X[B];
15086
+ return V === void 0 && (V = d(l()), X[B] = V), V;
15087
15087
  }
15088
- function d(S) {
15088
+ function d(M) {
15089
15089
  const D = [], z = [], B = [];
15090
15090
  for (let G = 0; G < t; G++)
15091
15091
  D[G] = 0, z[G] = 0, B[G] = 0;
@@ -15097,74 +15097,74 @@ function bf(i, e) {
15097
15097
  newAttributes: D,
15098
15098
  enabledAttributes: z,
15099
15099
  attributeDivisors: B,
15100
- object: S,
15100
+ object: M,
15101
15101
  attributes: {},
15102
15102
  index: null
15103
15103
  };
15104
15104
  }
15105
- function p(S, D, z, B) {
15105
+ function p(M, D, z, B) {
15106
15106
  const G = s.attributes, X = D.attributes;
15107
- let k = 0;
15107
+ let V = 0;
15108
15108
  const H = z.getAttributes();
15109
15109
  for (const $ in H)
15110
15110
  if (H[$].location >= 0) {
15111
15111
  const se = G[$];
15112
15112
  let re = X[$];
15113
- if (re === void 0 && ($ === "instanceMatrix" && S.instanceMatrix && (re = S.instanceMatrix), $ === "instanceColor" && S.instanceColor && (re = S.instanceColor)), se === void 0 || se.attribute !== re || re && se.data !== re.data) return !0;
15114
- k++;
15113
+ if (re === void 0 && ($ === "instanceMatrix" && M.instanceMatrix && (re = M.instanceMatrix), $ === "instanceColor" && M.instanceColor && (re = M.instanceColor)), se === void 0 || se.attribute !== re || re && se.data !== re.data) return !0;
15114
+ V++;
15115
15115
  }
15116
- return s.attributesNum !== k || s.index !== B;
15116
+ return s.attributesNum !== V || s.index !== B;
15117
15117
  }
15118
- function _(S, D, z, B) {
15118
+ function _(M, D, z, B) {
15119
15119
  const G = {}, X = D.attributes;
15120
- let k = 0;
15120
+ let V = 0;
15121
15121
  const H = z.getAttributes();
15122
15122
  for (const $ in H)
15123
15123
  if (H[$].location >= 0) {
15124
15124
  let se = X[$];
15125
- se === void 0 && ($ === "instanceMatrix" && S.instanceMatrix && (se = S.instanceMatrix), $ === "instanceColor" && S.instanceColor && (se = S.instanceColor));
15125
+ se === void 0 && ($ === "instanceMatrix" && M.instanceMatrix && (se = M.instanceMatrix), $ === "instanceColor" && M.instanceColor && (se = M.instanceColor));
15126
15126
  const re = {};
15127
- re.attribute = se, se && se.data && (re.data = se.data), G[$] = re, k++;
15127
+ re.attribute = se, se && se.data && (re.data = se.data), G[$] = re, V++;
15128
15128
  }
15129
- s.attributes = G, s.attributesNum = k, s.index = B;
15129
+ s.attributes = G, s.attributesNum = V, s.index = B;
15130
15130
  }
15131
15131
  function x() {
15132
- const S = s.newAttributes;
15133
- for (let D = 0, z = S.length; D < z; D++)
15134
- S[D] = 0;
15132
+ const M = s.newAttributes;
15133
+ for (let D = 0, z = M.length; D < z; D++)
15134
+ M[D] = 0;
15135
15135
  }
15136
- function m(S) {
15137
- f(S, 0);
15136
+ function m(M) {
15137
+ f(M, 0);
15138
15138
  }
15139
- function f(S, D) {
15139
+ function f(M, D) {
15140
15140
  const z = s.newAttributes, B = s.enabledAttributes, G = s.attributeDivisors;
15141
- z[S] = 1, B[S] === 0 && (i.enableVertexAttribArray(S), B[S] = 1), G[S] !== D && (i.vertexAttribDivisor(S, D), G[S] = D);
15141
+ z[M] = 1, B[M] === 0 && (i.enableVertexAttribArray(M), B[M] = 1), G[M] !== D && (i.vertexAttribDivisor(M, D), G[M] = D);
15142
15142
  }
15143
15143
  function b() {
15144
- const S = s.newAttributes, D = s.enabledAttributes;
15144
+ const M = s.newAttributes, D = s.enabledAttributes;
15145
15145
  for (let z = 0, B = D.length; z < B; z++)
15146
- D[z] !== S[z] && (i.disableVertexAttribArray(z), D[z] = 0);
15146
+ D[z] !== M[z] && (i.disableVertexAttribArray(z), D[z] = 0);
15147
15147
  }
15148
- function T(S, D, z, B, G, X, k) {
15149
- k === !0 ? i.vertexAttribIPointer(S, D, z, G, X) : i.vertexAttribPointer(S, D, z, B, G, X);
15148
+ function T(M, D, z, B, G, X, V) {
15149
+ V === !0 ? i.vertexAttribIPointer(M, D, z, G, X) : i.vertexAttribPointer(M, D, z, B, G, X);
15150
15150
  }
15151
- function y(S, D, z, B) {
15151
+ function y(M, D, z, B) {
15152
15152
  x();
15153
- const G = B.attributes, X = z.getAttributes(), k = D.defaultAttributeValues;
15153
+ const G = B.attributes, X = z.getAttributes(), V = D.defaultAttributeValues;
15154
15154
  for (const H in X) {
15155
15155
  const $ = X[H];
15156
15156
  if ($.location >= 0) {
15157
15157
  let ie = G[H];
15158
- if (ie === void 0 && (H === "instanceMatrix" && S.instanceMatrix && (ie = S.instanceMatrix), H === "instanceColor" && S.instanceColor && (ie = S.instanceColor)), ie !== void 0) {
15158
+ if (ie === void 0 && (H === "instanceMatrix" && M.instanceMatrix && (ie = M.instanceMatrix), H === "instanceColor" && M.instanceColor && (ie = M.instanceColor)), ie !== void 0) {
15159
15159
  const se = ie.normalized, re = ie.itemSize, Le = e.get(ie);
15160
15160
  if (Le === void 0) continue;
15161
- const we = Le.buffer, ke = Le.type, tt = Le.bytesPerElement, q = ke === i.INT || ke === i.UNSIGNED_INT || ie.gpuType === ba;
15161
+ const we = Le.buffer, Ve = Le.type, tt = Le.bytesPerElement, q = Ve === i.INT || Ve === i.UNSIGNED_INT || ie.gpuType === ba;
15162
15162
  if (ie.isInterleavedBufferAttribute) {
15163
15163
  const J = ie.data, xe = J.stride, ze = ie.offset;
15164
15164
  if (J.isInstancedInterleavedBuffer) {
15165
15165
  for (let Z = 0; Z < $.locationSize; Z++)
15166
15166
  f($.location + Z, J.meshPerAttribute);
15167
- S.isInstancedMesh !== !0 && B._maxInstanceCount === void 0 && (B._maxInstanceCount = J.meshPerAttribute * J.count);
15167
+ M.isInstancedMesh !== !0 && B._maxInstanceCount === void 0 && (B._maxInstanceCount = J.meshPerAttribute * J.count);
15168
15168
  } else
15169
15169
  for (let Z = 0; Z < $.locationSize; Z++)
15170
15170
  m($.location + Z);
@@ -15173,7 +15173,7 @@ function bf(i, e) {
15173
15173
  T(
15174
15174
  $.location + Z,
15175
15175
  re / $.locationSize,
15176
- ke,
15176
+ Ve,
15177
15177
  se,
15178
15178
  xe * tt,
15179
15179
  (ze + re / $.locationSize * Z) * tt,
@@ -15183,7 +15183,7 @@ function bf(i, e) {
15183
15183
  if (ie.isInstancedBufferAttribute) {
15184
15184
  for (let J = 0; J < $.locationSize; J++)
15185
15185
  f($.location + J, ie.meshPerAttribute);
15186
- S.isInstancedMesh !== !0 && B._maxInstanceCount === void 0 && (B._maxInstanceCount = ie.meshPerAttribute * ie.count);
15186
+ M.isInstancedMesh !== !0 && B._maxInstanceCount === void 0 && (B._maxInstanceCount = ie.meshPerAttribute * ie.count);
15187
15187
  } else
15188
15188
  for (let J = 0; J < $.locationSize; J++)
15189
15189
  m($.location + J);
@@ -15192,15 +15192,15 @@ function bf(i, e) {
15192
15192
  T(
15193
15193
  $.location + J,
15194
15194
  re / $.locationSize,
15195
- ke,
15195
+ Ve,
15196
15196
  se,
15197
15197
  re * tt,
15198
15198
  re / $.locationSize * J * tt,
15199
15199
  q
15200
15200
  );
15201
15201
  }
15202
- } else if (k !== void 0) {
15203
- const se = k[H];
15202
+ } else if (V !== void 0) {
15203
+ const se = V[H];
15204
15204
  if (se !== void 0)
15205
15205
  switch (se.length) {
15206
15206
  case 2:
@@ -15222,48 +15222,48 @@ function bf(i, e) {
15222
15222
  }
15223
15223
  function A() {
15224
15224
  F();
15225
- for (const S in n) {
15226
- const D = n[S];
15225
+ for (const M in n) {
15226
+ const D = n[M];
15227
15227
  for (const z in D) {
15228
15228
  const B = D[z];
15229
15229
  for (const G in B)
15230
15230
  h(B[G].object), delete B[G];
15231
15231
  delete D[z];
15232
15232
  }
15233
- delete n[S];
15233
+ delete n[M];
15234
15234
  }
15235
15235
  }
15236
- function R(S) {
15237
- if (n[S.id] === void 0) return;
15238
- const D = n[S.id];
15236
+ function R(M) {
15237
+ if (n[M.id] === void 0) return;
15238
+ const D = n[M.id];
15239
15239
  for (const z in D) {
15240
15240
  const B = D[z];
15241
15241
  for (const G in B)
15242
15242
  h(B[G].object), delete B[G];
15243
15243
  delete D[z];
15244
15244
  }
15245
- delete n[S.id];
15245
+ delete n[M.id];
15246
15246
  }
15247
- function C(S) {
15247
+ function C(M) {
15248
15248
  for (const D in n) {
15249
15249
  const z = n[D];
15250
- if (z[S.id] === void 0) continue;
15251
- const B = z[S.id];
15250
+ if (z[M.id] === void 0) continue;
15251
+ const B = z[M.id];
15252
15252
  for (const G in B)
15253
15253
  h(B[G].object), delete B[G];
15254
- delete z[S.id];
15254
+ delete z[M.id];
15255
15255
  }
15256
15256
  }
15257
15257
  function F() {
15258
- M(), a = !0, s !== r && (s = r, c(s.object));
15258
+ S(), a = !0, s !== r && (s = r, c(s.object));
15259
15259
  }
15260
- function M() {
15260
+ function S() {
15261
15261
  r.geometry = null, r.program = null, r.wireframe = !1;
15262
15262
  }
15263
15263
  return {
15264
15264
  setup: o,
15265
15265
  reset: F,
15266
- resetDefaultState: M,
15266
+ resetDefaultState: S,
15267
15267
  dispose: A,
15268
15268
  releaseStatesOfGeometry: R,
15269
15269
  releaseStatesOfProgram: C,
@@ -15363,7 +15363,7 @@ function Af(i, e, t, n) {
15363
15363
  function wf(i) {
15364
15364
  const e = this;
15365
15365
  let t = null, n = 0, r = !1, s = !1;
15366
- const a = new wn(), o = new Ve(), l = { value: null, needsUpdate: !1 };
15366
+ const a = new wn(), o = new ke(), l = { value: null, needsUpdate: !1 };
15367
15367
  this.uniform = l, this.numPlanes = 0, this.numIntersection = 0, this.init = function(u, d) {
15368
15368
  const p = u.length !== 0 || d || // enable state of previous frame - the clipping code has to
15369
15369
  // run another frame in order to reset the state:
@@ -15443,8 +15443,8 @@ function Rf(i) {
15443
15443
  dispose: s
15444
15444
  };
15445
15445
  }
15446
- const Cn = 4, wo = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], kn = 20, Cf = 256, Li = /* @__PURE__ */ new Fl(), Ro = /* @__PURE__ */ new Ze();
15447
- let vs = null, Ms = 0, Ss = 0, ys = !1;
15446
+ const Cn = 4, wo = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], Vn = 20, Cf = 256, Li = /* @__PURE__ */ new Fl(), Ro = /* @__PURE__ */ new Ze();
15447
+ let vs = null, Ss = 0, Ms = 0, ys = !1;
15448
15448
  const Pf = /* @__PURE__ */ new U();
15449
15449
  class Co {
15450
15450
  /**
@@ -15475,7 +15475,7 @@ class Co {
15475
15475
  size: a = 256,
15476
15476
  position: o = Pf
15477
15477
  } = s;
15478
- vs = this._renderer.getRenderTarget(), Ms = this._renderer.getActiveCubeFace(), Ss = this._renderer.getActiveMipmapLevel(), ys = this._renderer.xr.enabled, this._renderer.xr.enabled = !1, this._setSize(a);
15478
+ vs = this._renderer.getRenderTarget(), Ss = this._renderer.getActiveCubeFace(), Ms = this._renderer.getActiveMipmapLevel(), ys = this._renderer.xr.enabled, this._renderer.xr.enabled = !1, this._setSize(a);
15479
15479
  const l = this._allocateTargets();
15480
15480
  return l.depthBuffer = !0, this._sceneToCubeUV(e, n, r, l, o), t > 0 && this._blur(l, 0, 0, t), this._applyPMREM(l), this._cleanup(l), l;
15481
15481
  }
@@ -15535,10 +15535,10 @@ class Co {
15535
15535
  this._lodMeshes[e].geometry.dispose();
15536
15536
  }
15537
15537
  _cleanup(e) {
15538
- this._renderer.setRenderTarget(vs, Ms, Ss), this._renderer.xr.enabled = ys, e.scissorTest = !1, di(e, 0, 0, e.width, e.height);
15538
+ this._renderer.setRenderTarget(vs, Ss, Ms), this._renderer.xr.enabled = ys, e.scissorTest = !1, di(e, 0, 0, e.width, e.height);
15539
15539
  }
15540
15540
  _fromTexture(e, t) {
15541
- e.mapping === Wn || e.mapping === xi ? this._setSize(e.image.length === 0 ? 16 : e.image[0].width || e.image[0].image.width) : this._setSize(e.image.width / 4), vs = this._renderer.getRenderTarget(), Ms = this._renderer.getActiveCubeFace(), Ss = this._renderer.getActiveMipmapLevel(), ys = this._renderer.xr.enabled, this._renderer.xr.enabled = !1;
15541
+ e.mapping === Wn || e.mapping === xi ? this._setSize(e.image.length === 0 ? 16 : e.image[0].width || e.image[0].image.width) : this._setSize(e.image.width / 4), vs = this._renderer.getRenderTarget(), Ss = this._renderer.getActiveCubeFace(), Ms = this._renderer.getActiveMipmapLevel(), ys = this._renderer.xr.enabled, this._renderer.xr.enabled = !1;
15542
15542
  const n = t || this._allocateTargets();
15543
15543
  return this._textureToCubeUV(e, n), this._applyPMREM(n), this._cleanup(n), n;
15544
15544
  }
@@ -15549,7 +15549,7 @@ class Co {
15549
15549
  generateMipmaps: !1,
15550
15550
  type: _n,
15551
15551
  format: $t,
15552
- colorSpace: Mi,
15552
+ colorSpace: Si,
15553
15553
  depthBuffer: !1
15554
15554
  }, r = Po(e, t, n);
15555
15555
  if (this._pingPongRenderTarget === null || this._pingPongRenderTarget.width !== e || this._pingPongRenderTarget.height !== t) {
@@ -15560,12 +15560,12 @@ class Co {
15560
15560
  return r;
15561
15561
  }
15562
15562
  _compileMaterial(e) {
15563
- const t = new Mn(new Ut(), e);
15563
+ const t = new Sn(new Ut(), e);
15564
15564
  this._renderer.compile(t, Li);
15565
15565
  }
15566
15566
  _sceneToCubeUV(e, t, n, r, s) {
15567
15567
  const l = new Ht(90, 1, t, n), c = [1, -1, 1, 1, 1, 1], h = [1, 1, 1, -1, -1, -1], u = this._renderer, d = u.autoClear, p = u.toneMapping;
15568
- u.getClearColor(Ro), u.toneMapping = nn, u.autoClear = !1, u.state.buffers.depth.getReversed() && (u.setRenderTarget(r), u.clearDepth(), u.setRenderTarget(null)), this._backgroundBox === null && (this._backgroundBox = new Mn(
15568
+ u.getClearColor(Ro), u.toneMapping = nn, u.autoClear = !1, u.state.buffers.depth.getReversed() && (u.setRenderTarget(r), u.clearDepth(), u.setRenderTarget(null)), this._backgroundBox === null && (this._backgroundBox = new Sn(
15569
15569
  new Wi(),
15570
15570
  new bl({
15571
15571
  name: "PMREM.Background",
@@ -15664,13 +15664,13 @@ class Co {
15664
15664
  );
15665
15665
  const h = 3, u = this._lodMeshes[r];
15666
15666
  u.material = c;
15667
- const d = c.uniforms, p = this._sizeLods[n] - 1, _ = isFinite(s) ? Math.PI / (2 * p) : 2 * Math.PI / (2 * kn - 1), x = s / _, m = isFinite(s) ? 1 + Math.floor(h * x) : kn;
15668
- m > kn && Fe(`sigmaRadians, ${s}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${kn}`);
15667
+ const d = c.uniforms, p = this._sizeLods[n] - 1, _ = isFinite(s) ? Math.PI / (2 * p) : 2 * Math.PI / (2 * Vn - 1), x = s / _, m = isFinite(s) ? 1 + Math.floor(h * x) : Vn;
15668
+ m > Vn && Fe(`sigmaRadians, ${s}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${Vn}`);
15669
15669
  const f = [];
15670
15670
  let b = 0;
15671
- for (let C = 0; C < kn; ++C) {
15672
- const F = C / x, M = Math.exp(-F * F / 2);
15673
- f.push(M), C === 0 ? b += M : C < m && (b += 2 * M);
15671
+ for (let C = 0; C < Vn; ++C) {
15672
+ const F = C / x, S = Math.exp(-F * F / 2);
15673
+ f.push(S), C === 0 ? b += S : C < m && (b += 2 * S);
15674
15674
  }
15675
15675
  for (let C = 0; C < f.length; C++)
15676
15676
  f[C] = f[C] / b;
@@ -15692,7 +15692,7 @@ function Df(i) {
15692
15692
  a > i - Cn ? l = wo[a - i + Cn - 1] : a === 0 && (l = 0), t.push(l);
15693
15693
  const c = 1 / (o - 2), h = -c, u = 1 + c, d = [h, h, u, h, u, u, h, h, u, u, h, u], p = 6, _ = 6, x = 3, m = 2, f = 1, b = new Float32Array(x * _ * p), T = new Float32Array(m * _ * p), y = new Float32Array(f * _ * p);
15694
15694
  for (let R = 0; R < p; R++) {
15695
- const C = R % 3 * 2 / 3 - 1, F = R > 2 ? 0 : -1, M = [
15695
+ const C = R % 3 * 2 / 3 - 1, F = R > 2 ? 0 : -1, S = [
15696
15696
  C,
15697
15697
  F,
15698
15698
  0,
@@ -15712,18 +15712,18 @@ function Df(i) {
15712
15712
  F + 1,
15713
15713
  0
15714
15714
  ];
15715
- b.set(M, x * _ * R), T.set(d, m * _ * R);
15716
- const S = [R, R, R, R, R, R];
15717
- y.set(S, f * _ * R);
15715
+ b.set(S, x * _ * R), T.set(d, m * _ * R);
15716
+ const M = [R, R, R, R, R, R];
15717
+ y.set(M, f * _ * R);
15718
15718
  }
15719
15719
  const A = new Ut();
15720
- A.setAttribute("position", new Mt(b, x)), A.setAttribute("uv", new Mt(T, m)), A.setAttribute("faceIndex", new Mt(y, f)), n.push(new Mn(A, null)), r > Cn && r--;
15720
+ A.setAttribute("position", new St(b, x)), A.setAttribute("uv", new St(T, m)), A.setAttribute("faceIndex", new St(y, f)), n.push(new Sn(A, null)), r > Cn && r--;
15721
15721
  }
15722
15722
  return { lodMeshes: n, sizeLods: e, sigmas: t };
15723
15723
  }
15724
15724
  function Po(i, e, t) {
15725
15725
  const n = new rn(i, e, t);
15726
- return n.texture.mapping = Vr, n.texture.name = "PMREM.cubeUv", n.scissorTest = !0, n;
15726
+ return n.texture.mapping = kr, n.texture.name = "PMREM.cubeUv", n.scissorTest = !0, n;
15727
15727
  }
15728
15728
  function di(i, e, t, n, r) {
15729
15729
  i.viewport.set(e, t, n, r), i.scissor.set(e, t, n, r);
@@ -15861,11 +15861,11 @@ function Lf(i, e, t) {
15861
15861
  });
15862
15862
  }
15863
15863
  function If(i, e, t) {
15864
- const n = new Float32Array(kn), r = new U(0, 1, 0);
15864
+ const n = new Float32Array(Vn), r = new U(0, 1, 0);
15865
15865
  return new Zt({
15866
15866
  name: "SphericalGaussianBlur",
15867
15867
  defines: {
15868
- n: kn,
15868
+ n: Vn,
15869
15869
  CUBEUV_TEXEL_WIDTH: 1 / e,
15870
15870
  CUBEUV_TEXEL_HEIGHT: 1 / t,
15871
15871
  CUBEUV_MAX_MIP: `${i}.0`
@@ -16178,7 +16178,7 @@ function Ff(i, e, t, n) {
16178
16178
  }
16179
16179
  } else
16180
16180
  return;
16181
- const m = new (Sl(d) ? Al : Tl)(d, 1);
16181
+ const m = new (Ml(d) ? Al : Tl)(d, 1);
16182
16182
  m.version = x;
16183
16183
  const f = s.get(u);
16184
16184
  f && e.remove(f), s.set(u, m);
@@ -16288,8 +16288,8 @@ function zf(i, e, t) {
16288
16288
  const c = a.morphTargetInfluences, h = o.morphAttributes.position || o.morphAttributes.normal || o.morphAttributes.color, u = h !== void 0 ? h.length : 0;
16289
16289
  let d = n.get(o);
16290
16290
  if (d === void 0 || d.count !== u) {
16291
- let M = function() {
16292
- C.dispose(), n.delete(o), o.removeEventListener("dispose", M);
16291
+ let S = function() {
16292
+ C.dispose(), n.delete(o), o.removeEventListener("dispose", S);
16293
16293
  };
16294
16294
  d !== void 0 && d.texture.dispose();
16295
16295
  const p = o.morphAttributes.position !== void 0, _ = o.morphAttributes.normal !== void 0, x = o.morphAttributes.color !== void 0, m = o.morphAttributes.position || [], f = o.morphAttributes.normal || [], b = o.morphAttributes.color || [];
@@ -16300,18 +16300,18 @@ function zf(i, e, t) {
16300
16300
  const R = new Float32Array(y * A * 4 * u), C = new yl(R, y, A, u);
16301
16301
  C.type = en, C.needsUpdate = !0;
16302
16302
  const F = T * 4;
16303
- for (let S = 0; S < u; S++) {
16304
- const D = m[S], z = f[S], B = b[S], G = y * A * 4 * S;
16303
+ for (let M = 0; M < u; M++) {
16304
+ const D = m[M], z = f[M], B = b[M], G = y * A * 4 * M;
16305
16305
  for (let X = 0; X < D.count; X++) {
16306
- const k = X * F;
16307
- p === !0 && (r.fromBufferAttribute(D, X), R[G + k + 0] = r.x, R[G + k + 1] = r.y, R[G + k + 2] = r.z, R[G + k + 3] = 0), _ === !0 && (r.fromBufferAttribute(z, X), R[G + k + 4] = r.x, R[G + k + 5] = r.y, R[G + k + 6] = r.z, R[G + k + 7] = 0), x === !0 && (r.fromBufferAttribute(B, X), R[G + k + 8] = r.x, R[G + k + 9] = r.y, R[G + k + 10] = r.z, R[G + k + 11] = B.itemSize === 4 ? r.w : 1);
16306
+ const V = X * F;
16307
+ p === !0 && (r.fromBufferAttribute(D, X), R[G + V + 0] = r.x, R[G + V + 1] = r.y, R[G + V + 2] = r.z, R[G + V + 3] = 0), _ === !0 && (r.fromBufferAttribute(z, X), R[G + V + 4] = r.x, R[G + V + 5] = r.y, R[G + V + 6] = r.z, R[G + V + 7] = 0), x === !0 && (r.fromBufferAttribute(B, X), R[G + V + 8] = r.x, R[G + V + 9] = r.y, R[G + V + 10] = r.z, R[G + V + 11] = B.itemSize === 4 ? r.w : 1);
16308
16308
  }
16309
16309
  }
16310
16310
  d = {
16311
16311
  count: u,
16312
16312
  texture: C,
16313
16313
  size: new Ne(y, A)
16314
- }, n.set(o, d), o.addEventListener("dispose", M);
16314
+ }, n.set(o, d), o.addEventListener("dispose", S);
16315
16315
  }
16316
16316
  if (a.isInstancedMesh === !0 && a.morphTexture !== null)
16317
16317
  l.getUniforms().setValue(i, "morphTexture", a.morphTexture, t);
@@ -16328,7 +16328,7 @@ function zf(i, e, t) {
16328
16328
  update: s
16329
16329
  };
16330
16330
  }
16331
- function Vf(i, e, t, n) {
16331
+ function kf(i, e, t, n) {
16332
16332
  let r = /* @__PURE__ */ new WeakMap();
16333
16333
  function s(l) {
16334
16334
  const c = n.render.frame, h = l.geometry, u = e.get(l, h);
@@ -16350,7 +16350,7 @@ function Vf(i, e, t, n) {
16350
16350
  dispose: a
16351
16351
  };
16352
16352
  }
16353
- const kf = {
16353
+ const Vf = {
16354
16354
  [al]: "LINEAR_TONE_MAPPING",
16355
16355
  [ol]: "REINHARD_TONE_MAPPING",
16356
16356
  [ll]: "CINEON_TONE_MAPPING",
@@ -16430,7 +16430,7 @@ function Hf(i, e, t, n, r) {
16430
16430
  ),
16431
16431
  depthTest: !1,
16432
16432
  depthWrite: !1
16433
- }), c = new Mn(o, l), h = new Fl(-1, 1, 1, -1, 0, 1);
16433
+ }), c = new Sn(o, l), h = new Fl(-1, 1, 1, -1, 0, 1);
16434
16434
  let u = null, d = null, p = !1, _, x = null, m = [], f = !1;
16435
16435
  this.setSize = function(b, T) {
16436
16436
  s.setSize(b, T), a.setSize(b, T);
@@ -16466,7 +16466,7 @@ function Hf(i, e, t, n, r) {
16466
16466
  }
16467
16467
  if (u !== b.outputColorSpace || d !== b.toneMapping) {
16468
16468
  u = b.outputColorSpace, d = b.toneMapping, l.defines = {}, $e.getTransfer(u) === et && (l.defines.SRGB_TRANSFER = "");
16469
- const R = kf[d];
16469
+ const R = Vf[d];
16470
16470
  R && (l.defines[R] = ""), l.needsUpdate = !0;
16471
16471
  }
16472
16472
  l.uniforms.tDiffuse.value = y.texture, b.setRenderTarget(x), b.render(c, h), x = null, p = !1;
@@ -16476,7 +16476,7 @@ function Hf(i, e, t, n, r) {
16476
16476
  s.dispose(), a.dispose(), o.dispose(), l.dispose();
16477
16477
  };
16478
16478
  }
16479
- const Bl = /* @__PURE__ */ new At(), Sa = /* @__PURE__ */ new Vi(1, 1), zl = /* @__PURE__ */ new yl(), Vl = /* @__PURE__ */ new nu(), kl = /* @__PURE__ */ new Cl(), Io = [], Uo = [], No = new Float32Array(16), Fo = new Float32Array(9), Oo = new Float32Array(4);
16479
+ const Bl = /* @__PURE__ */ new At(), Ma = /* @__PURE__ */ new ki(1, 1), zl = /* @__PURE__ */ new yl(), kl = /* @__PURE__ */ new nu(), Vl = /* @__PURE__ */ new Cl(), Io = [], Uo = [], No = new Float32Array(16), Fo = new Float32Array(9), Oo = new Float32Array(4);
16480
16480
  function yi(i, e, t) {
16481
16481
  const n = i[0];
16482
16482
  if (n <= 0 || n > 0) return i;
@@ -16635,15 +16635,15 @@ function rp(i, e, t) {
16635
16635
  const n = this.cache, r = t.allocateTextureUnit();
16636
16636
  n[0] !== r && (i.uniform1i(this.addr, r), n[0] = r);
16637
16637
  let s;
16638
- this.type === i.SAMPLER_2D_SHADOW ? (Sa.compareFunction = t.isReversedDepthBuffer() ? Da : Pa, s = Sa) : s = Bl, t.setTexture2D(e || s, r);
16638
+ this.type === i.SAMPLER_2D_SHADOW ? (Ma.compareFunction = t.isReversedDepthBuffer() ? Da : Pa, s = Ma) : s = Bl, t.setTexture2D(e || s, r);
16639
16639
  }
16640
16640
  function sp(i, e, t) {
16641
16641
  const n = this.cache, r = t.allocateTextureUnit();
16642
- n[0] !== r && (i.uniform1i(this.addr, r), n[0] = r), t.setTexture3D(e || Vl, r);
16642
+ n[0] !== r && (i.uniform1i(this.addr, r), n[0] = r), t.setTexture3D(e || kl, r);
16643
16643
  }
16644
16644
  function ap(i, e, t) {
16645
16645
  const n = this.cache, r = t.allocateTextureUnit();
16646
- n[0] !== r && (i.uniform1i(this.addr, r), n[0] = r), t.setTextureCube(e || kl, r);
16646
+ n[0] !== r && (i.uniform1i(this.addr, r), n[0] = r), t.setTextureCube(e || Vl, r);
16647
16647
  }
16648
16648
  function op(i, e, t) {
16649
16649
  const n = this.cache, r = t.allocateTextureUnit();
@@ -16773,10 +16773,10 @@ function xp(i, e) {
16773
16773
  function vp(i, e) {
16774
16774
  i.uniform4iv(this.addr, e);
16775
16775
  }
16776
- function Mp(i, e) {
16776
+ function Sp(i, e) {
16777
16777
  i.uniform1uiv(this.addr, e);
16778
16778
  }
16779
- function Sp(i, e) {
16779
+ function Mp(i, e) {
16780
16780
  i.uniform2uiv(this.addr, e);
16781
16781
  }
16782
16782
  function yp(i, e) {
@@ -16789,7 +16789,7 @@ function bp(i, e, t) {
16789
16789
  const n = this.cache, r = e.length, s = Gr(t, r);
16790
16790
  _t(n, s) || (i.uniform1iv(this.addr, s), xt(n, s));
16791
16791
  let a;
16792
- this.type === i.SAMPLER_2D_SHADOW ? a = Sa : a = Bl;
16792
+ this.type === i.SAMPLER_2D_SHADOW ? a = Ma : a = Bl;
16793
16793
  for (let o = 0; o !== r; ++o)
16794
16794
  t.setTexture2D(e[o] || a, s[o]);
16795
16795
  }
@@ -16797,13 +16797,13 @@ function Tp(i, e, t) {
16797
16797
  const n = this.cache, r = e.length, s = Gr(t, r);
16798
16798
  _t(n, s) || (i.uniform1iv(this.addr, s), xt(n, s));
16799
16799
  for (let a = 0; a !== r; ++a)
16800
- t.setTexture3D(e[a] || Vl, s[a]);
16800
+ t.setTexture3D(e[a] || kl, s[a]);
16801
16801
  }
16802
16802
  function Ap(i, e, t) {
16803
16803
  const n = this.cache, r = e.length, s = Gr(t, r);
16804
16804
  _t(n, s) || (i.uniform1iv(this.addr, s), xt(n, s));
16805
16805
  for (let a = 0; a !== r; ++a)
16806
- t.setTextureCube(e[a] || kl, s[a]);
16806
+ t.setTextureCube(e[a] || Vl, s[a]);
16807
16807
  }
16808
16808
  function wp(i, e, t) {
16809
16809
  const n = this.cache, r = e.length, s = Gr(t, r);
@@ -16851,10 +16851,10 @@ function Rp(i) {
16851
16851
  return vp;
16852
16852
  // _VEC4
16853
16853
  case 5125:
16854
- return Mp;
16854
+ return Sp;
16855
16855
  // UINT
16856
16856
  case 36294:
16857
- return Sp;
16857
+ return Mp;
16858
16858
  // _VEC2
16859
16859
  case 36295:
16860
16860
  return yp;
@@ -16989,10 +16989,10 @@ function Np(i, e) {
16989
16989
  return n.join(`
16990
16990
  `);
16991
16991
  }
16992
- const Vo = /* @__PURE__ */ new Ve();
16992
+ const ko = /* @__PURE__ */ new ke();
16993
16993
  function Fp(i) {
16994
- $e._getMatrix(Vo, $e.workingColorSpace, i);
16995
- const e = `mat3( ${Vo.elements.map((t) => t.toFixed(4))} )`;
16994
+ $e._getMatrix(ko, $e.workingColorSpace, i);
16995
+ const e = `mat3( ${ko.elements.map((t) => t.toFixed(4))} )`;
16996
16996
  switch ($e.getTransfer(i)) {
16997
16997
  case Ir:
16998
16998
  return [e, "LinearTransferOETF"];
@@ -17002,7 +17002,7 @@ function Fp(i) {
17002
17002
  return Fe("WebGLProgram: Unsupported color space: ", i), [e, "LinearTransferOETF"];
17003
17003
  }
17004
17004
  }
17005
- function ko(i, e, t) {
17005
+ function Vo(i, e, t) {
17006
17006
  const n = i.getShaderParameter(e, i.COMPILE_STATUS), s = (i.getShaderInfoLog(e) || "").trim();
17007
17007
  if (n && s === "") return "";
17008
17008
  const a = /ERROR: 0:(\d+)/.exec(s);
@@ -17038,10 +17038,10 @@ function zp(i, e) {
17038
17038
  const t = Bp[e];
17039
17039
  return t === void 0 ? (Fe("WebGLProgram: Unsupported toneMapping:", e), "vec3 " + i + "( vec3 color ) { return LinearToneMapping( color ); }") : "vec3 " + i + "( vec3 color ) { return " + t + "ToneMapping( color ); }";
17040
17040
  }
17041
- const Mr = /* @__PURE__ */ new U();
17042
- function Vp() {
17043
- $e.getLuminanceCoefficients(Mr);
17044
- const i = Mr.x.toFixed(4), e = Mr.y.toFixed(4), t = Mr.z.toFixed(4);
17041
+ const Sr = /* @__PURE__ */ new U();
17042
+ function kp() {
17043
+ $e.getLuminanceCoefficients(Sr);
17044
+ const i = Sr.x.toFixed(4), e = Sr.y.toFixed(4), t = Sr.z.toFixed(4);
17045
17045
  return [
17046
17046
  "float luminance( const in vec3 rgb ) {",
17047
17047
  ` const vec3 weights = vec3( ${i}, ${e}, ${t} );`,
@@ -17050,7 +17050,7 @@ function Vp() {
17050
17050
  ].join(`
17051
17051
  `);
17052
17052
  }
17053
- function kp(i) {
17053
+ function Vp(i) {
17054
17054
  return [
17055
17055
  i.extensionClipCullDistance ? "#extension GL_ANGLE_clip_cull_distance : require" : "",
17056
17056
  i.extensionMultiDraw ? "#extension GL_ANGLE_multi_draw : require" : ""
@@ -17149,7 +17149,7 @@ function jp(i) {
17149
17149
  const Kp = {
17150
17150
  [Wn]: "ENVMAP_TYPE_CUBE",
17151
17151
  [xi]: "ENVMAP_TYPE_CUBE",
17152
- [Vr]: "ENVMAP_TYPE_CUBE_UV"
17152
+ [kr]: "ENVMAP_TYPE_CUBE_UV"
17153
17153
  };
17154
17154
  function Jp(i) {
17155
17155
  return i.envMap === !1 ? "ENVMAP_TYPE_CUBE" : Kp[i.envMapMode] || "ENVMAP_TYPE_CUBE";
@@ -17177,7 +17177,7 @@ function im(i) {
17177
17177
  function rm(i, e, t, n) {
17178
17178
  const r = i.getContext(), s = t.defines;
17179
17179
  let a = t.vertexShader, o = t.fragmentShader;
17180
- const l = jp(t), c = Jp(t), h = em(t), u = nm(t), d = im(t), p = kp(t), _ = Hp(s), x = r.createProgram();
17180
+ const l = jp(t), c = Jp(t), h = em(t), u = nm(t), d = im(t), p = Vp(t), _ = Hp(s), x = r.createProgram();
17181
17181
  let m, f, b = t.glslVersion ? "#version " + t.glslVersion + `
17182
17182
  ` : "";
17183
17183
  t.isRawShaderMaterial ? (m = [
@@ -17404,7 +17404,7 @@ function rm(i, e, t, n) {
17404
17404
  He.colorspace_pars_fragment,
17405
17405
  // this code is required here because it is used by the various encoding/decoding function defined below
17406
17406
  Op("linearToOutputTexel", t.outputColorSpace),
17407
- Vp(),
17407
+ kp(),
17408
17408
  t.useDepthPacking ? "#define DEPTH_PACKING " + t.depthPacking : "",
17409
17409
  `
17410
17410
  `
@@ -17438,13 +17438,13 @@ function rm(i, e, t, n) {
17438
17438
  r.attachShader(x, A), r.attachShader(x, R), t.index0AttributeName !== void 0 ? r.bindAttribLocation(x, 0, t.index0AttributeName) : t.morphTargets === !0 && r.bindAttribLocation(x, 0, "position"), r.linkProgram(x);
17439
17439
  function C(D) {
17440
17440
  if (i.debug.checkShaderErrors) {
17441
- const z = r.getProgramInfoLog(x) || "", B = r.getShaderInfoLog(A) || "", G = r.getShaderInfoLog(R) || "", X = z.trim(), k = B.trim(), H = G.trim();
17441
+ const z = r.getProgramInfoLog(x) || "", B = r.getShaderInfoLog(A) || "", G = r.getShaderInfoLog(R) || "", X = z.trim(), V = B.trim(), H = G.trim();
17442
17442
  let $ = !0, ie = !0;
17443
17443
  if (r.getProgramParameter(x, r.LINK_STATUS) === !1)
17444
17444
  if ($ = !1, typeof i.debug.onShaderError == "function")
17445
17445
  i.debug.onShaderError(r, x, A, R);
17446
17446
  else {
17447
- const se = ko(r, A, "vertex"), re = ko(r, R, "fragment");
17447
+ const se = Vo(r, A, "vertex"), re = Vo(r, R, "fragment");
17448
17448
  qe(
17449
17449
  "THREE.WebGLProgram: Shader Error " + r.getError() + " - VALIDATE_STATUS " + r.getProgramParameter(x, r.VALIDATE_STATUS) + `
17450
17450
 
@@ -17456,12 +17456,12 @@ Program Info Log: ` + X + `
17456
17456
  ` + re
17457
17457
  );
17458
17458
  }
17459
- else X !== "" ? Fe("WebGLProgram: Program Info Log:", X) : (k === "" || H === "") && (ie = !1);
17459
+ else X !== "" ? Fe("WebGLProgram: Program Info Log:", X) : (V === "" || H === "") && (ie = !1);
17460
17460
  ie && (D.diagnostics = {
17461
17461
  runnable: $,
17462
17462
  programLog: X,
17463
17463
  vertexShader: {
17464
- log: k,
17464
+ log: V,
17465
17465
  prefix: m
17466
17466
  },
17467
17467
  fragmentShader: {
@@ -17470,19 +17470,19 @@ Program Info Log: ` + X + `
17470
17470
  }
17471
17471
  });
17472
17472
  }
17473
- r.deleteShader(A), r.deleteShader(R), F = new Pr(r, x), M = Gp(r, x);
17473
+ r.deleteShader(A), r.deleteShader(R), F = new Pr(r, x), S = Gp(r, x);
17474
17474
  }
17475
17475
  let F;
17476
17476
  this.getUniforms = function() {
17477
17477
  return F === void 0 && C(this), F;
17478
17478
  };
17479
- let M;
17479
+ let S;
17480
17480
  this.getAttributes = function() {
17481
- return M === void 0 && C(this), M;
17481
+ return S === void 0 && C(this), S;
17482
17482
  };
17483
- let S = t.rendererExtensionParallelShaderCompile === !1;
17483
+ let M = t.rendererExtensionParallelShaderCompile === !1;
17484
17484
  return this.isReady = function() {
17485
- return S === !1 && (S = r.getProgramParameter(x, Ip)), S;
17485
+ return M === !1 && (M = r.getProgramParameter(x, Ip)), M;
17486
17486
  }, this.destroy = function() {
17487
17487
  n.releaseStatesOfProgram(this), r.deleteProgram(x), this.program = void 0;
17488
17488
  }, this.type = t.shaderType, this.name = t.shaderName, this.id = Up++, this.cacheKey = e, this.usedTimes = 1, this.program = x, this.vertexShader = A, this.fragmentShader = R, this;
@@ -17547,43 +17547,43 @@ function lm(i, e, t, n, r, s, a) {
17547
17547
  ShadowMaterial: "shadow",
17548
17548
  SpriteMaterial: "sprite"
17549
17549
  };
17550
- function x(M) {
17551
- return c.add(M), M === 0 ? "uv" : `uv${M}`;
17550
+ function x(S) {
17551
+ return c.add(S), S === 0 ? "uv" : `uv${S}`;
17552
17552
  }
17553
- function m(M, S, D, z, B) {
17554
- const G = z.fog, X = B.geometry, k = M.isMeshStandardMaterial ? z.environment : null, H = (M.isMeshStandardMaterial ? t : e).get(M.envMap || k), $ = H && H.mapping === Vr ? H.image.height : null, ie = _[M.type];
17555
- M.precision !== null && (p = r.getMaxPrecision(M.precision), p !== M.precision && Fe("WebGLProgram.getParameters:", M.precision, "not supported, using", p, "instead."));
17553
+ function m(S, M, D, z, B) {
17554
+ const G = z.fog, X = B.geometry, V = S.isMeshStandardMaterial ? z.environment : null, H = (S.isMeshStandardMaterial ? t : e).get(S.envMap || V), $ = H && H.mapping === kr ? H.image.height : null, ie = _[S.type];
17555
+ S.precision !== null && (p = r.getMaxPrecision(S.precision), p !== S.precision && Fe("WebGLProgram.getParameters:", S.precision, "not supported, using", p, "instead."));
17556
17556
  const se = X.morphAttributes.position || X.morphAttributes.normal || X.morphAttributes.color, re = se !== void 0 ? se.length : 0;
17557
17557
  let Le = 0;
17558
17558
  X.morphAttributes.position !== void 0 && (Le = 1), X.morphAttributes.normal !== void 0 && (Le = 2), X.morphAttributes.color !== void 0 && (Le = 3);
17559
- let we, ke, tt, q;
17559
+ let we, Ve, tt, q;
17560
17560
  if (ie) {
17561
17561
  const Je = Jt[ie];
17562
- we = Je.vertexShader, ke = Je.fragmentShader;
17562
+ we = Je.vertexShader, Ve = Je.fragmentShader;
17563
17563
  } else
17564
- we = M.vertexShader, ke = M.fragmentShader, l.update(M), tt = l.getVertexShaderID(M), q = l.getFragmentShaderID(M);
17565
- const J = i.getRenderTarget(), xe = i.state.buffers.depth.getReversed(), ze = B.isInstancedMesh === !0, Z = B.isBatchedMesh === !0, me = !!M.map, ve = !!M.matcap, de = !!H, Re = !!M.aoMap, Oe = !!M.lightMap, De = !!M.bumpMap, je = !!M.normalMap, w = !!M.displacementMap, ft = !!M.emissiveMap, Ye = !!M.metalnessMap, nt = !!M.roughnessMap, Ee = M.anisotropy > 0, E = M.clearcoat > 0, g = M.dispersion > 0, L = M.iridescence > 0, Y = M.sheen > 0, K = M.transmission > 0, W = Ee && !!M.anisotropyMap, Te = E && !!M.clearcoatMap, oe = E && !!M.clearcoatNormalMap, ye = E && !!M.clearcoatRoughnessMap, Ue = L && !!M.iridescenceMap, ee = L && !!M.iridescenceThicknessMap, ce = Y && !!M.sheenColorMap, Se = Y && !!M.sheenRoughnessMap, be = !!M.specularMap, le = !!M.specularColorMap, Ge = !!M.specularIntensityMap, P = K && !!M.transmissionMap, pe = K && !!M.thicknessMap, te = !!M.gradientMap, ge = !!M.alphaMap, Q = M.alphaTest > 0, j = !!M.alphaHash, ae = !!M.extensions;
17564
+ we = S.vertexShader, Ve = S.fragmentShader, l.update(S), tt = l.getVertexShaderID(S), q = l.getFragmentShaderID(S);
17565
+ const J = i.getRenderTarget(), xe = i.state.buffers.depth.getReversed(), ze = B.isInstancedMesh === !0, Z = B.isBatchedMesh === !0, me = !!S.map, ve = !!S.matcap, de = !!H, Re = !!S.aoMap, Oe = !!S.lightMap, De = !!S.bumpMap, je = !!S.normalMap, w = !!S.displacementMap, ft = !!S.emissiveMap, Ye = !!S.metalnessMap, nt = !!S.roughnessMap, Ee = S.anisotropy > 0, E = S.clearcoat > 0, g = S.dispersion > 0, L = S.iridescence > 0, Y = S.sheen > 0, K = S.transmission > 0, W = Ee && !!S.anisotropyMap, Te = E && !!S.clearcoatMap, oe = E && !!S.clearcoatNormalMap, ye = E && !!S.clearcoatRoughnessMap, Ue = L && !!S.iridescenceMap, ee = L && !!S.iridescenceThicknessMap, ce = Y && !!S.sheenColorMap, Me = Y && !!S.sheenRoughnessMap, be = !!S.specularMap, le = !!S.specularColorMap, Ge = !!S.specularIntensityMap, P = K && !!S.transmissionMap, pe = K && !!S.thicknessMap, te = !!S.gradientMap, ge = !!S.alphaMap, Q = S.alphaTest > 0, j = !!S.alphaHash, ae = !!S.extensions;
17566
17566
  let Be = nn;
17567
- M.toneMapped && (J === null || J.isXRRenderTarget === !0) && (Be = i.toneMapping);
17567
+ S.toneMapped && (J === null || J.isXRRenderTarget === !0) && (Be = i.toneMapping);
17568
17568
  const ot = {
17569
17569
  shaderID: ie,
17570
- shaderType: M.type,
17571
- shaderName: M.name,
17570
+ shaderType: S.type,
17571
+ shaderName: S.name,
17572
17572
  vertexShader: we,
17573
- fragmentShader: ke,
17574
- defines: M.defines,
17573
+ fragmentShader: Ve,
17574
+ defines: S.defines,
17575
17575
  customVertexShaderID: tt,
17576
17576
  customFragmentShaderID: q,
17577
- isRawShaderMaterial: M.isRawShaderMaterial === !0,
17578
- glslVersion: M.glslVersion,
17577
+ isRawShaderMaterial: S.isRawShaderMaterial === !0,
17578
+ glslVersion: S.glslVersion,
17579
17579
  precision: p,
17580
17580
  batching: Z,
17581
17581
  batchingColor: Z && B._colorsTexture !== null,
17582
17582
  instancing: ze,
17583
17583
  instancingColor: ze && B.instanceColor !== null,
17584
17584
  instancingMorph: ze && B.morphTexture !== null,
17585
- outputColorSpace: J === null ? i.outputColorSpace : J.isXRRenderTarget === !0 ? J.texture.colorSpace : Mi,
17586
- alphaToCoverage: !!M.alphaToCoverage,
17585
+ outputColorSpace: J === null ? i.outputColorSpace : J.isXRRenderTarget === !0 ? J.texture.colorSpace : Si,
17586
+ alphaToCoverage: !!S.alphaToCoverage,
17587
17587
  map: me,
17588
17588
  matcap: ve,
17589
17589
  envMap: de,
@@ -17595,8 +17595,8 @@ function lm(i, e, t, n, r, s, a) {
17595
17595
  normalMap: je,
17596
17596
  displacementMap: w,
17597
17597
  emissiveMap: ft,
17598
- normalMapObjectSpace: je && M.normalMapType === Vc,
17599
- normalMapTangentSpace: je && M.normalMapType === zc,
17598
+ normalMapObjectSpace: je && S.normalMapType === kc,
17599
+ normalMapTangentSpace: je && S.normalMapType === zc,
17600
17600
  metalnessMap: Ye,
17601
17601
  roughnessMap: nt,
17602
17602
  anisotropy: Ee,
@@ -17611,7 +17611,7 @@ function lm(i, e, t, n, r, s, a) {
17611
17611
  iridescenceThicknessMap: ee,
17612
17612
  sheen: Y,
17613
17613
  sheenColorMap: ce,
17614
- sheenRoughnessMap: Se,
17614
+ sheenRoughnessMap: Me,
17615
17615
  specularMap: be,
17616
17616
  specularColorMap: le,
17617
17617
  specularIntensityMap: Ge,
@@ -17619,45 +17619,45 @@ function lm(i, e, t, n, r, s, a) {
17619
17619
  transmissionMap: P,
17620
17620
  thicknessMap: pe,
17621
17621
  gradientMap: te,
17622
- opaque: M.transparent === !1 && M.blending === mi && M.alphaToCoverage === !1,
17622
+ opaque: S.transparent === !1 && S.blending === mi && S.alphaToCoverage === !1,
17623
17623
  alphaMap: ge,
17624
17624
  alphaTest: Q,
17625
17625
  alphaHash: j,
17626
- combine: M.combine,
17626
+ combine: S.combine,
17627
17627
  //
17628
- mapUv: me && x(M.map.channel),
17629
- aoMapUv: Re && x(M.aoMap.channel),
17630
- lightMapUv: Oe && x(M.lightMap.channel),
17631
- bumpMapUv: De && x(M.bumpMap.channel),
17632
- normalMapUv: je && x(M.normalMap.channel),
17633
- displacementMapUv: w && x(M.displacementMap.channel),
17634
- emissiveMapUv: ft && x(M.emissiveMap.channel),
17635
- metalnessMapUv: Ye && x(M.metalnessMap.channel),
17636
- roughnessMapUv: nt && x(M.roughnessMap.channel),
17637
- anisotropyMapUv: W && x(M.anisotropyMap.channel),
17638
- clearcoatMapUv: Te && x(M.clearcoatMap.channel),
17639
- clearcoatNormalMapUv: oe && x(M.clearcoatNormalMap.channel),
17640
- clearcoatRoughnessMapUv: ye && x(M.clearcoatRoughnessMap.channel),
17641
- iridescenceMapUv: Ue && x(M.iridescenceMap.channel),
17642
- iridescenceThicknessMapUv: ee && x(M.iridescenceThicknessMap.channel),
17643
- sheenColorMapUv: ce && x(M.sheenColorMap.channel),
17644
- sheenRoughnessMapUv: Se && x(M.sheenRoughnessMap.channel),
17645
- specularMapUv: be && x(M.specularMap.channel),
17646
- specularColorMapUv: le && x(M.specularColorMap.channel),
17647
- specularIntensityMapUv: Ge && x(M.specularIntensityMap.channel),
17648
- transmissionMapUv: P && x(M.transmissionMap.channel),
17649
- thicknessMapUv: pe && x(M.thicknessMap.channel),
17650
- alphaMapUv: ge && x(M.alphaMap.channel),
17628
+ mapUv: me && x(S.map.channel),
17629
+ aoMapUv: Re && x(S.aoMap.channel),
17630
+ lightMapUv: Oe && x(S.lightMap.channel),
17631
+ bumpMapUv: De && x(S.bumpMap.channel),
17632
+ normalMapUv: je && x(S.normalMap.channel),
17633
+ displacementMapUv: w && x(S.displacementMap.channel),
17634
+ emissiveMapUv: ft && x(S.emissiveMap.channel),
17635
+ metalnessMapUv: Ye && x(S.metalnessMap.channel),
17636
+ roughnessMapUv: nt && x(S.roughnessMap.channel),
17637
+ anisotropyMapUv: W && x(S.anisotropyMap.channel),
17638
+ clearcoatMapUv: Te && x(S.clearcoatMap.channel),
17639
+ clearcoatNormalMapUv: oe && x(S.clearcoatNormalMap.channel),
17640
+ clearcoatRoughnessMapUv: ye && x(S.clearcoatRoughnessMap.channel),
17641
+ iridescenceMapUv: Ue && x(S.iridescenceMap.channel),
17642
+ iridescenceThicknessMapUv: ee && x(S.iridescenceThicknessMap.channel),
17643
+ sheenColorMapUv: ce && x(S.sheenColorMap.channel),
17644
+ sheenRoughnessMapUv: Me && x(S.sheenRoughnessMap.channel),
17645
+ specularMapUv: be && x(S.specularMap.channel),
17646
+ specularColorMapUv: le && x(S.specularColorMap.channel),
17647
+ specularIntensityMapUv: Ge && x(S.specularIntensityMap.channel),
17648
+ transmissionMapUv: P && x(S.transmissionMap.channel),
17649
+ thicknessMapUv: pe && x(S.thicknessMap.channel),
17650
+ alphaMapUv: ge && x(S.alphaMap.channel),
17651
17651
  //
17652
17652
  vertexTangents: !!X.attributes.tangent && (je || Ee),
17653
- vertexColors: M.vertexColors,
17654
- vertexAlphas: M.vertexColors === !0 && !!X.attributes.color && X.attributes.color.itemSize === 4,
17653
+ vertexColors: S.vertexColors,
17654
+ vertexAlphas: S.vertexColors === !0 && !!X.attributes.color && X.attributes.color.itemSize === 4,
17655
17655
  pointsUvs: B.isPoints === !0 && !!X.attributes.uv && (me || ge),
17656
17656
  fog: !!G,
17657
- useFog: M.fog === !0,
17657
+ useFog: S.fog === !0,
17658
17658
  fogExp2: !!G && G.isFogExp2,
17659
- flatShading: M.flatShading === !0 && M.wireframe === !1,
17660
- sizeAttenuation: M.sizeAttenuation === !0,
17659
+ flatShading: S.flatShading === !0 && S.wireframe === !1,
17660
+ sizeAttenuation: S.sizeAttenuation === !0,
17661
17661
  logarithmicDepthBuffer: d,
17662
17662
  reversedDepthBuffer: xe,
17663
17663
  skinning: B.isSkinnedMesh === !0,
@@ -17666,73 +17666,73 @@ function lm(i, e, t, n, r, s, a) {
17666
17666
  morphColors: X.morphAttributes.color !== void 0,
17667
17667
  morphTargetsCount: re,
17668
17668
  morphTextureStride: Le,
17669
- numDirLights: S.directional.length,
17670
- numPointLights: S.point.length,
17671
- numSpotLights: S.spot.length,
17672
- numSpotLightMaps: S.spotLightMap.length,
17673
- numRectAreaLights: S.rectArea.length,
17674
- numHemiLights: S.hemi.length,
17675
- numDirLightShadows: S.directionalShadowMap.length,
17676
- numPointLightShadows: S.pointShadowMap.length,
17677
- numSpotLightShadows: S.spotShadowMap.length,
17678
- numSpotLightShadowsWithMaps: S.numSpotLightShadowsWithMaps,
17679
- numLightProbes: S.numLightProbes,
17669
+ numDirLights: M.directional.length,
17670
+ numPointLights: M.point.length,
17671
+ numSpotLights: M.spot.length,
17672
+ numSpotLightMaps: M.spotLightMap.length,
17673
+ numRectAreaLights: M.rectArea.length,
17674
+ numHemiLights: M.hemi.length,
17675
+ numDirLightShadows: M.directionalShadowMap.length,
17676
+ numPointLightShadows: M.pointShadowMap.length,
17677
+ numSpotLightShadows: M.spotShadowMap.length,
17678
+ numSpotLightShadowsWithMaps: M.numSpotLightShadowsWithMaps,
17679
+ numLightProbes: M.numLightProbes,
17680
17680
  numClippingPlanes: a.numPlanes,
17681
17681
  numClipIntersection: a.numIntersection,
17682
- dithering: M.dithering,
17682
+ dithering: S.dithering,
17683
17683
  shadowMapEnabled: i.shadowMap.enabled && D.length > 0,
17684
17684
  shadowMapType: i.shadowMap.type,
17685
17685
  toneMapping: Be,
17686
- decodeVideoTexture: me && M.map.isVideoTexture === !0 && $e.getTransfer(M.map.colorSpace) === et,
17687
- decodeVideoTextureEmissive: ft && M.emissiveMap.isVideoTexture === !0 && $e.getTransfer(M.emissiveMap.colorSpace) === et,
17688
- premultipliedAlpha: M.premultipliedAlpha,
17689
- doubleSided: M.side === fn,
17690
- flipSided: M.side === It,
17691
- useDepthPacking: M.depthPacking >= 0,
17692
- depthPacking: M.depthPacking || 0,
17693
- index0AttributeName: M.index0AttributeName,
17694
- extensionClipCullDistance: ae && M.extensions.clipCullDistance === !0 && n.has("WEBGL_clip_cull_distance"),
17695
- extensionMultiDraw: (ae && M.extensions.multiDraw === !0 || Z) && n.has("WEBGL_multi_draw"),
17686
+ decodeVideoTexture: me && S.map.isVideoTexture === !0 && $e.getTransfer(S.map.colorSpace) === et,
17687
+ decodeVideoTextureEmissive: ft && S.emissiveMap.isVideoTexture === !0 && $e.getTransfer(S.emissiveMap.colorSpace) === et,
17688
+ premultipliedAlpha: S.premultipliedAlpha,
17689
+ doubleSided: S.side === fn,
17690
+ flipSided: S.side === It,
17691
+ useDepthPacking: S.depthPacking >= 0,
17692
+ depthPacking: S.depthPacking || 0,
17693
+ index0AttributeName: S.index0AttributeName,
17694
+ extensionClipCullDistance: ae && S.extensions.clipCullDistance === !0 && n.has("WEBGL_clip_cull_distance"),
17695
+ extensionMultiDraw: (ae && S.extensions.multiDraw === !0 || Z) && n.has("WEBGL_multi_draw"),
17696
17696
  rendererExtensionParallelShaderCompile: n.has("KHR_parallel_shader_compile"),
17697
- customProgramCacheKey: M.customProgramCacheKey()
17697
+ customProgramCacheKey: S.customProgramCacheKey()
17698
17698
  };
17699
17699
  return ot.vertexUv1s = c.has(1), ot.vertexUv2s = c.has(2), ot.vertexUv3s = c.has(3), c.clear(), ot;
17700
17700
  }
17701
- function f(M) {
17702
- const S = [];
17703
- if (M.shaderID ? S.push(M.shaderID) : (S.push(M.customVertexShaderID), S.push(M.customFragmentShaderID)), M.defines !== void 0)
17704
- for (const D in M.defines)
17705
- S.push(D), S.push(M.defines[D]);
17706
- return M.isRawShaderMaterial === !1 && (b(S, M), T(S, M), S.push(i.outputColorSpace)), S.push(M.customProgramCacheKey), S.join();
17701
+ function f(S) {
17702
+ const M = [];
17703
+ if (S.shaderID ? M.push(S.shaderID) : (M.push(S.customVertexShaderID), M.push(S.customFragmentShaderID)), S.defines !== void 0)
17704
+ for (const D in S.defines)
17705
+ M.push(D), M.push(S.defines[D]);
17706
+ return S.isRawShaderMaterial === !1 && (b(M, S), T(M, S), M.push(i.outputColorSpace)), M.push(S.customProgramCacheKey), M.join();
17707
17707
  }
17708
- function b(M, S) {
17709
- M.push(S.precision), M.push(S.outputColorSpace), M.push(S.envMapMode), M.push(S.envMapCubeUVHeight), M.push(S.mapUv), M.push(S.alphaMapUv), M.push(S.lightMapUv), M.push(S.aoMapUv), M.push(S.bumpMapUv), M.push(S.normalMapUv), M.push(S.displacementMapUv), M.push(S.emissiveMapUv), M.push(S.metalnessMapUv), M.push(S.roughnessMapUv), M.push(S.anisotropyMapUv), M.push(S.clearcoatMapUv), M.push(S.clearcoatNormalMapUv), M.push(S.clearcoatRoughnessMapUv), M.push(S.iridescenceMapUv), M.push(S.iridescenceThicknessMapUv), M.push(S.sheenColorMapUv), M.push(S.sheenRoughnessMapUv), M.push(S.specularMapUv), M.push(S.specularColorMapUv), M.push(S.specularIntensityMapUv), M.push(S.transmissionMapUv), M.push(S.thicknessMapUv), M.push(S.combine), M.push(S.fogExp2), M.push(S.sizeAttenuation), M.push(S.morphTargetsCount), M.push(S.morphAttributeCount), M.push(S.numDirLights), M.push(S.numPointLights), M.push(S.numSpotLights), M.push(S.numSpotLightMaps), M.push(S.numHemiLights), M.push(S.numRectAreaLights), M.push(S.numDirLightShadows), M.push(S.numPointLightShadows), M.push(S.numSpotLightShadows), M.push(S.numSpotLightShadowsWithMaps), M.push(S.numLightProbes), M.push(S.shadowMapType), M.push(S.toneMapping), M.push(S.numClippingPlanes), M.push(S.numClipIntersection), M.push(S.depthPacking);
17708
+ function b(S, M) {
17709
+ S.push(M.precision), S.push(M.outputColorSpace), S.push(M.envMapMode), S.push(M.envMapCubeUVHeight), S.push(M.mapUv), S.push(M.alphaMapUv), S.push(M.lightMapUv), S.push(M.aoMapUv), S.push(M.bumpMapUv), S.push(M.normalMapUv), S.push(M.displacementMapUv), S.push(M.emissiveMapUv), S.push(M.metalnessMapUv), S.push(M.roughnessMapUv), S.push(M.anisotropyMapUv), S.push(M.clearcoatMapUv), S.push(M.clearcoatNormalMapUv), S.push(M.clearcoatRoughnessMapUv), S.push(M.iridescenceMapUv), S.push(M.iridescenceThicknessMapUv), S.push(M.sheenColorMapUv), S.push(M.sheenRoughnessMapUv), S.push(M.specularMapUv), S.push(M.specularColorMapUv), S.push(M.specularIntensityMapUv), S.push(M.transmissionMapUv), S.push(M.thicknessMapUv), S.push(M.combine), S.push(M.fogExp2), S.push(M.sizeAttenuation), S.push(M.morphTargetsCount), S.push(M.morphAttributeCount), S.push(M.numDirLights), S.push(M.numPointLights), S.push(M.numSpotLights), S.push(M.numSpotLightMaps), S.push(M.numHemiLights), S.push(M.numRectAreaLights), S.push(M.numDirLightShadows), S.push(M.numPointLightShadows), S.push(M.numSpotLightShadows), S.push(M.numSpotLightShadowsWithMaps), S.push(M.numLightProbes), S.push(M.shadowMapType), S.push(M.toneMapping), S.push(M.numClippingPlanes), S.push(M.numClipIntersection), S.push(M.depthPacking);
17710
17710
  }
17711
- function T(M, S) {
17712
- o.disableAll(), S.instancing && o.enable(0), S.instancingColor && o.enable(1), S.instancingMorph && o.enable(2), S.matcap && o.enable(3), S.envMap && o.enable(4), S.normalMapObjectSpace && o.enable(5), S.normalMapTangentSpace && o.enable(6), S.clearcoat && o.enable(7), S.iridescence && o.enable(8), S.alphaTest && o.enable(9), S.vertexColors && o.enable(10), S.vertexAlphas && o.enable(11), S.vertexUv1s && o.enable(12), S.vertexUv2s && o.enable(13), S.vertexUv3s && o.enable(14), S.vertexTangents && o.enable(15), S.anisotropy && o.enable(16), S.alphaHash && o.enable(17), S.batching && o.enable(18), S.dispersion && o.enable(19), S.batchingColor && o.enable(20), S.gradientMap && o.enable(21), M.push(o.mask), o.disableAll(), S.fog && o.enable(0), S.useFog && o.enable(1), S.flatShading && o.enable(2), S.logarithmicDepthBuffer && o.enable(3), S.reversedDepthBuffer && o.enable(4), S.skinning && o.enable(5), S.morphTargets && o.enable(6), S.morphNormals && o.enable(7), S.morphColors && o.enable(8), S.premultipliedAlpha && o.enable(9), S.shadowMapEnabled && o.enable(10), S.doubleSided && o.enable(11), S.flipSided && o.enable(12), S.useDepthPacking && o.enable(13), S.dithering && o.enable(14), S.transmission && o.enable(15), S.sheen && o.enable(16), S.opaque && o.enable(17), S.pointsUvs && o.enable(18), S.decodeVideoTexture && o.enable(19), S.decodeVideoTextureEmissive && o.enable(20), S.alphaToCoverage && o.enable(21), M.push(o.mask);
17711
+ function T(S, M) {
17712
+ o.disableAll(), M.instancing && o.enable(0), M.instancingColor && o.enable(1), M.instancingMorph && o.enable(2), M.matcap && o.enable(3), M.envMap && o.enable(4), M.normalMapObjectSpace && o.enable(5), M.normalMapTangentSpace && o.enable(6), M.clearcoat && o.enable(7), M.iridescence && o.enable(8), M.alphaTest && o.enable(9), M.vertexColors && o.enable(10), M.vertexAlphas && o.enable(11), M.vertexUv1s && o.enable(12), M.vertexUv2s && o.enable(13), M.vertexUv3s && o.enable(14), M.vertexTangents && o.enable(15), M.anisotropy && o.enable(16), M.alphaHash && o.enable(17), M.batching && o.enable(18), M.dispersion && o.enable(19), M.batchingColor && o.enable(20), M.gradientMap && o.enable(21), S.push(o.mask), o.disableAll(), M.fog && o.enable(0), M.useFog && o.enable(1), M.flatShading && o.enable(2), M.logarithmicDepthBuffer && o.enable(3), M.reversedDepthBuffer && o.enable(4), M.skinning && o.enable(5), M.morphTargets && o.enable(6), M.morphNormals && o.enable(7), M.morphColors && o.enable(8), M.premultipliedAlpha && o.enable(9), M.shadowMapEnabled && o.enable(10), M.doubleSided && o.enable(11), M.flipSided && o.enable(12), M.useDepthPacking && o.enable(13), M.dithering && o.enable(14), M.transmission && o.enable(15), M.sheen && o.enable(16), M.opaque && o.enable(17), M.pointsUvs && o.enable(18), M.decodeVideoTexture && o.enable(19), M.decodeVideoTextureEmissive && o.enable(20), M.alphaToCoverage && o.enable(21), S.push(o.mask);
17713
17713
  }
17714
- function y(M) {
17715
- const S = _[M.type];
17714
+ function y(S) {
17715
+ const M = _[S.type];
17716
17716
  let D;
17717
- if (S) {
17718
- const z = Jt[S];
17717
+ if (M) {
17718
+ const z = Jt[M];
17719
17719
  D = mu.clone(z.uniforms);
17720
17720
  } else
17721
- D = M.uniforms;
17721
+ D = S.uniforms;
17722
17722
  return D;
17723
17723
  }
17724
- function A(M, S) {
17725
- let D = u.get(S);
17726
- return D !== void 0 ? ++D.usedTimes : (D = new rm(i, S, M, s), h.push(D), u.set(S, D)), D;
17724
+ function A(S, M) {
17725
+ let D = u.get(M);
17726
+ return D !== void 0 ? ++D.usedTimes : (D = new rm(i, M, S, s), h.push(D), u.set(M, D)), D;
17727
17727
  }
17728
- function R(M) {
17729
- if (--M.usedTimes === 0) {
17730
- const S = h.indexOf(M);
17731
- h[S] = h[h.length - 1], h.pop(), u.delete(M.cacheKey), M.destroy();
17728
+ function R(S) {
17729
+ if (--S.usedTimes === 0) {
17730
+ const M = h.indexOf(S);
17731
+ h[M] = h[h.length - 1], h.pop(), u.delete(S.cacheKey), S.destroy();
17732
17732
  }
17733
17733
  }
17734
- function C(M) {
17735
- l.remove(M);
17734
+ function C(S) {
17735
+ l.remove(S);
17736
17736
  }
17737
17737
  function F() {
17738
17738
  l.dispose();
@@ -17985,28 +17985,28 @@ function gm(i) {
17985
17985
  const r = new U(), s = new ut(), a = new ut();
17986
17986
  function o(c) {
17987
17987
  let h = 0, u = 0, d = 0;
17988
- for (let M = 0; M < 9; M++) n.probe[M].set(0, 0, 0);
17988
+ for (let S = 0; S < 9; S++) n.probe[S].set(0, 0, 0);
17989
17989
  let p = 0, _ = 0, x = 0, m = 0, f = 0, b = 0, T = 0, y = 0, A = 0, R = 0, C = 0;
17990
17990
  c.sort(mm);
17991
- for (let M = 0, S = c.length; M < S; M++) {
17992
- const D = c[M], z = D.color, B = D.intensity, G = D.distance;
17991
+ for (let S = 0, M = c.length; S < M; S++) {
17992
+ const D = c[S], z = D.color, B = D.intensity, G = D.distance;
17993
17993
  let X = null;
17994
17994
  if (D.shadow && D.shadow.map && (D.shadow.map.texture.format === vi ? X = D.shadow.map.texture : X = D.shadow.map.depthTexture || D.shadow.map.texture), D.isAmbientLight)
17995
17995
  h += z.r * B, u += z.g * B, d += z.b * B;
17996
17996
  else if (D.isLightProbe) {
17997
- for (let k = 0; k < 9; k++)
17998
- n.probe[k].addScaledVector(D.sh.coefficients[k], B);
17997
+ for (let V = 0; V < 9; V++)
17998
+ n.probe[V].addScaledVector(D.sh.coefficients[V], B);
17999
17999
  C++;
18000
18000
  } else if (D.isDirectionalLight) {
18001
- const k = e.get(D);
18002
- if (k.color.copy(D.color).multiplyScalar(D.intensity), D.castShadow) {
18001
+ const V = e.get(D);
18002
+ if (V.color.copy(D.color).multiplyScalar(D.intensity), D.castShadow) {
18003
18003
  const H = D.shadow, $ = t.get(D);
18004
18004
  $.shadowIntensity = H.intensity, $.shadowBias = H.bias, $.shadowNormalBias = H.normalBias, $.shadowRadius = H.radius, $.shadowMapSize = H.mapSize, n.directionalShadow[p] = $, n.directionalShadowMap[p] = X, n.directionalShadowMatrix[p] = D.shadow.matrix, b++;
18005
18005
  }
18006
- n.directional[p] = k, p++;
18006
+ n.directional[p] = V, p++;
18007
18007
  } else if (D.isSpotLight) {
18008
- const k = e.get(D);
18009
- k.position.setFromMatrixPosition(D.matrixWorld), k.color.copy(z).multiplyScalar(B), k.distance = G, k.coneCos = Math.cos(D.angle), k.penumbraCos = Math.cos(D.angle * (1 - D.penumbra)), k.decay = D.decay, n.spot[x] = k;
18008
+ const V = e.get(D);
18009
+ V.position.setFromMatrixPosition(D.matrixWorld), V.color.copy(z).multiplyScalar(B), V.distance = G, V.coneCos = Math.cos(D.angle), V.penumbraCos = Math.cos(D.angle * (1 - D.penumbra)), V.decay = D.decay, n.spot[x] = V;
18010
18010
  const H = D.shadow;
18011
18011
  if (D.map && (n.spotLightMap[A] = D.map, A++, H.updateMatrices(D), D.castShadow && R++), n.spotLightMatrix[x] = H.matrix, D.castShadow) {
18012
18012
  const $ = t.get(D);
@@ -18014,18 +18014,18 @@ function gm(i) {
18014
18014
  }
18015
18015
  x++;
18016
18016
  } else if (D.isRectAreaLight) {
18017
- const k = e.get(D);
18018
- k.color.copy(z).multiplyScalar(B), k.halfWidth.set(D.width * 0.5, 0, 0), k.halfHeight.set(0, D.height * 0.5, 0), n.rectArea[m] = k, m++;
18017
+ const V = e.get(D);
18018
+ V.color.copy(z).multiplyScalar(B), V.halfWidth.set(D.width * 0.5, 0, 0), V.halfHeight.set(0, D.height * 0.5, 0), n.rectArea[m] = V, m++;
18019
18019
  } else if (D.isPointLight) {
18020
- const k = e.get(D);
18021
- if (k.color.copy(D.color).multiplyScalar(D.intensity), k.distance = D.distance, k.decay = D.decay, D.castShadow) {
18020
+ const V = e.get(D);
18021
+ if (V.color.copy(D.color).multiplyScalar(D.intensity), V.distance = D.distance, V.decay = D.decay, D.castShadow) {
18022
18022
  const H = D.shadow, $ = t.get(D);
18023
18023
  $.shadowIntensity = H.intensity, $.shadowBias = H.bias, $.shadowNormalBias = H.normalBias, $.shadowRadius = H.radius, $.shadowMapSize = H.mapSize, $.shadowCameraNear = H.camera.near, $.shadowCameraFar = H.camera.far, n.pointShadow[_] = $, n.pointShadowMap[_] = X, n.pointShadowMatrix[_] = D.shadow.matrix, T++;
18024
18024
  }
18025
- n.point[_] = k, _++;
18025
+ n.point[_] = V, _++;
18026
18026
  } else if (D.isHemisphereLight) {
18027
- const k = e.get(D);
18028
- k.skyColor.copy(D.color).multiplyScalar(B), k.groundColor.copy(D.groundColor).multiplyScalar(B), n.hemi[f] = k, f++;
18027
+ const V = e.get(D);
18028
+ V.skyColor.copy(D.color).multiplyScalar(B), V.groundColor.copy(D.groundColor).multiplyScalar(B), n.hemi[f] = V, f++;
18029
18029
  }
18030
18030
  }
18031
18031
  m > 0 && (i.has("OES_texture_float_linear") === !0 ? (n.rectAreaLTC1 = he.LTC_FLOAT_1, n.rectAreaLTC2 = he.LTC_FLOAT_2) : (n.rectAreaLTC1 = he.LTC_HALF_1, n.rectAreaLTC2 = he.LTC_HALF_2)), n.ambient[0] = h, n.ambient[1] = u, n.ambient[2] = d;
@@ -18136,14 +18136,14 @@ void main() {
18136
18136
  squared_mean = squared_mean / samples;
18137
18137
  float std_dev = sqrt( max( 0.0, squared_mean - mean * mean ) );
18138
18138
  gl_FragColor = vec4( mean, std_dev, 0.0, 1.0 );
18139
- }`, Mm = [
18139
+ }`, Sm = [
18140
18140
  /* @__PURE__ */ new U(1, 0, 0),
18141
18141
  /* @__PURE__ */ new U(-1, 0, 0),
18142
18142
  /* @__PURE__ */ new U(0, 1, 0),
18143
18143
  /* @__PURE__ */ new U(0, -1, 0),
18144
18144
  /* @__PURE__ */ new U(0, 0, 1),
18145
18145
  /* @__PURE__ */ new U(0, 0, -1)
18146
- ], Sm = [
18146
+ ], Mm = [
18147
18147
  /* @__PURE__ */ new U(0, -1, 0),
18148
18148
  /* @__PURE__ */ new U(0, -1, 0),
18149
18149
  /* @__PURE__ */ new U(0, 0, 1),
@@ -18169,27 +18169,27 @@ function ym(i, e, t) {
18169
18169
  const _ = new Ut();
18170
18170
  _.setAttribute(
18171
18171
  "position",
18172
- new Mt(
18172
+ new St(
18173
18173
  new Float32Array([-1, -1, 0.5, 3, -1, 0.5, -1, 3, 0.5]),
18174
18174
  3
18175
18175
  )
18176
18176
  );
18177
- const x = new Mn(_, d), m = this;
18177
+ const x = new Sn(_, d), m = this;
18178
18178
  this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type = br;
18179
18179
  let f = this.type;
18180
18180
  this.render = function(R, C, F) {
18181
18181
  if (m.enabled === !1 || m.autoUpdate === !1 && m.needsUpdate === !1 || R.length === 0) return;
18182
18182
  R.type === gc && (Fe("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."), R.type = br);
18183
- const M = i.getRenderTarget(), S = i.getActiveCubeFace(), D = i.getActiveMipmapLevel(), z = i.state;
18183
+ const S = i.getRenderTarget(), M = i.getActiveCubeFace(), D = i.getActiveMipmapLevel(), z = i.state;
18184
18184
  z.setBlending(mn), z.buffers.depth.getReversed() === !0 ? z.buffers.color.setClear(0, 0, 0, 0) : z.buffers.color.setClear(1, 1, 1, 1), z.buffers.depth.setTest(!0), z.setScissorTest(!1);
18185
18185
  const B = f !== this.type;
18186
18186
  B && C.traverse(function(G) {
18187
18187
  G.material && (Array.isArray(G.material) ? G.material.forEach((X) => X.needsUpdate = !0) : G.material.needsUpdate = !0);
18188
18188
  });
18189
18189
  for (let G = 0, X = R.length; G < X; G++) {
18190
- const k = R[G], H = k.shadow;
18190
+ const V = R[G], H = V.shadow;
18191
18191
  if (H === void 0) {
18192
- Fe("WebGLShadowMap:", k, "has no shadow.");
18192
+ Fe("WebGLShadowMap:", V, "has no shadow.");
18193
18193
  continue;
18194
18194
  }
18195
18195
  if (H.autoUpdate === !1 && H.needsUpdate === !1) continue;
@@ -18197,7 +18197,7 @@ function ym(i, e, t) {
18197
18197
  const $ = H.getFrameExtents();
18198
18198
  if (r.multiply($), s.copy(H.mapSize), (r.x > h || r.y > h) && (r.x > h && (s.x = Math.floor(h / $.x), r.x = s.x * $.x, H.mapSize.x = s.x), r.y > h && (s.y = Math.floor(h / $.y), r.y = s.y * $.y, H.mapSize.y = s.y)), H.map === null || B === !0) {
18199
18199
  if (H.map !== null && (H.map.depthTexture !== null && (H.map.depthTexture.dispose(), H.map.depthTexture = null), H.map.dispose()), this.type === Ui) {
18200
- if (k.isPointLight) {
18200
+ if (V.isPointLight) {
18201
18201
  Fe("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");
18202
18202
  continue;
18203
18203
  }
@@ -18207,11 +18207,11 @@ function ym(i, e, t) {
18207
18207
  minFilter: Tt,
18208
18208
  magFilter: Tt,
18209
18209
  generateMipmaps: !1
18210
- }), H.map.texture.name = k.name + ".shadowMap", H.map.depthTexture = new Vi(r.x, r.y, en), H.map.depthTexture.name = k.name + ".shadowMapDepth", H.map.depthTexture.format = xn, H.map.depthTexture.compareFunction = null, H.map.depthTexture.minFilter = St, H.map.depthTexture.magFilter = St;
18210
+ }), H.map.texture.name = V.name + ".shadowMap", H.map.depthTexture = new ki(r.x, r.y, en), H.map.depthTexture.name = V.name + ".shadowMapDepth", H.map.depthTexture.format = xn, H.map.depthTexture.compareFunction = null, H.map.depthTexture.minFilter = Mt, H.map.depthTexture.magFilter = Mt;
18211
18211
  } else {
18212
- k.isPointLight ? (H.map = new Pl(r.x), H.map.depthTexture = new Du(r.x, an)) : (H.map = new rn(r.x, r.y), H.map.depthTexture = new Vi(r.x, r.y, an)), H.map.depthTexture.name = k.name + ".shadowMap", H.map.depthTexture.format = xn;
18212
+ V.isPointLight ? (H.map = new Pl(r.x), H.map.depthTexture = new Du(r.x, an)) : (H.map = new rn(r.x, r.y), H.map.depthTexture = new ki(r.x, r.y, an)), H.map.depthTexture.name = V.name + ".shadowMap", H.map.depthTexture.format = xn;
18213
18213
  const se = i.state.buffers.depth.getReversed();
18214
- this.type === br ? (H.map.depthTexture.compareFunction = se ? Da : Pa, H.map.depthTexture.minFilter = Tt, H.map.depthTexture.magFilter = Tt) : (H.map.depthTexture.compareFunction = null, H.map.depthTexture.minFilter = St, H.map.depthTexture.magFilter = St);
18214
+ this.type === br ? (H.map.depthTexture.compareFunction = se ? Da : Pa, H.map.depthTexture.minFilter = Tt, H.map.depthTexture.magFilter = Tt) : (H.map.depthTexture.compareFunction = null, H.map.depthTexture.minFilter = Mt, H.map.depthTexture.magFilter = Mt);
18215
18215
  }
18216
18216
  H.camera.updateProjectionMatrix();
18217
18217
  }
@@ -18229,16 +18229,16 @@ function ym(i, e, t) {
18229
18229
  s.y * re.w
18230
18230
  ), z.viewport(a);
18231
18231
  }
18232
- if (k.isPointLight) {
18233
- const re = H.camera, Le = H.matrix, we = k.distance || re.far;
18234
- we !== re.far && (re.far = we, re.updateProjectionMatrix()), Ii.setFromMatrixPosition(k.matrixWorld), re.position.copy(Ii), bs.copy(re.position), bs.add(Mm[se]), re.up.copy(Sm[se]), re.lookAt(bs), re.updateMatrixWorld(), Le.makeTranslation(-Ii.x, -Ii.y, -Ii.z), Zo.multiplyMatrices(re.projectionMatrix, re.matrixWorldInverse), H._frustum.setFromProjectionMatrix(Zo, re.coordinateSystem, re.reversedDepth);
18232
+ if (V.isPointLight) {
18233
+ const re = H.camera, Le = H.matrix, we = V.distance || re.far;
18234
+ we !== re.far && (re.far = we, re.updateProjectionMatrix()), Ii.setFromMatrixPosition(V.matrixWorld), re.position.copy(Ii), bs.copy(re.position), bs.add(Sm[se]), re.up.copy(Mm[se]), re.lookAt(bs), re.updateMatrixWorld(), Le.makeTranslation(-Ii.x, -Ii.y, -Ii.z), Zo.multiplyMatrices(re.projectionMatrix, re.matrixWorldInverse), H._frustum.setFromProjectionMatrix(Zo, re.coordinateSystem, re.reversedDepth);
18235
18235
  } else
18236
- H.updateMatrices(k);
18237
- n = H.getFrustum(), y(C, F, H.camera, k, this.type);
18236
+ H.updateMatrices(V);
18237
+ n = H.getFrustum(), y(C, F, H.camera, V, this.type);
18238
18238
  }
18239
18239
  H.isPointLightShadow !== !0 && this.type === Ui && b(H, F), H.needsUpdate = !1;
18240
18240
  }
18241
- f = this.type, m.needsUpdate = !1, i.setRenderTarget(M, S, D);
18241
+ f = this.type, m.needsUpdate = !1, i.setRenderTarget(S, M, D);
18242
18242
  };
18243
18243
  function b(R, C) {
18244
18244
  const F = e.update(x);
@@ -18247,52 +18247,52 @@ function ym(i, e, t) {
18247
18247
  type: _n
18248
18248
  })), d.uniforms.shadow_pass.value = R.map.depthTexture, d.uniforms.resolution.value = R.mapSize, d.uniforms.radius.value = R.radius, i.setRenderTarget(R.mapPass), i.clear(), i.renderBufferDirect(C, null, F, d, x, null), p.uniforms.shadow_pass.value = R.mapPass.texture, p.uniforms.resolution.value = R.mapSize, p.uniforms.radius.value = R.radius, i.setRenderTarget(R.map), i.clear(), i.renderBufferDirect(C, null, F, p, x, null);
18249
18249
  }
18250
- function T(R, C, F, M) {
18251
- let S = null;
18250
+ function T(R, C, F, S) {
18251
+ let M = null;
18252
18252
  const D = F.isPointLight === !0 ? R.customDistanceMaterial : R.customDepthMaterial;
18253
18253
  if (D !== void 0)
18254
- S = D;
18255
- else if (S = F.isPointLight === !0 ? l : o, i.localClippingEnabled && C.clipShadows === !0 && Array.isArray(C.clippingPlanes) && C.clippingPlanes.length !== 0 || C.displacementMap && C.displacementScale !== 0 || C.alphaMap && C.alphaTest > 0 || C.map && C.alphaTest > 0 || C.alphaToCoverage === !0) {
18256
- const z = S.uuid, B = C.uuid;
18254
+ M = D;
18255
+ else if (M = F.isPointLight === !0 ? l : o, i.localClippingEnabled && C.clipShadows === !0 && Array.isArray(C.clippingPlanes) && C.clippingPlanes.length !== 0 || C.displacementMap && C.displacementScale !== 0 || C.alphaMap && C.alphaTest > 0 || C.map && C.alphaTest > 0 || C.alphaToCoverage === !0) {
18256
+ const z = M.uuid, B = C.uuid;
18257
18257
  let G = c[z];
18258
18258
  G === void 0 && (G = {}, c[z] = G);
18259
18259
  let X = G[B];
18260
- X === void 0 && (X = S.clone(), G[B] = X, C.addEventListener("dispose", A)), S = X;
18260
+ X === void 0 && (X = M.clone(), G[B] = X, C.addEventListener("dispose", A)), M = X;
18261
18261
  }
18262
- if (S.visible = C.visible, S.wireframe = C.wireframe, M === Ui ? S.side = C.shadowSide !== null ? C.shadowSide : C.side : S.side = C.shadowSide !== null ? C.shadowSide : u[C.side], S.alphaMap = C.alphaMap, S.alphaTest = C.alphaToCoverage === !0 ? 0.5 : C.alphaTest, S.map = C.map, S.clipShadows = C.clipShadows, S.clippingPlanes = C.clippingPlanes, S.clipIntersection = C.clipIntersection, S.displacementMap = C.displacementMap, S.displacementScale = C.displacementScale, S.displacementBias = C.displacementBias, S.wireframeLinewidth = C.wireframeLinewidth, S.linewidth = C.linewidth, F.isPointLight === !0 && S.isMeshDistanceMaterial === !0) {
18263
- const z = i.properties.get(S);
18262
+ if (M.visible = C.visible, M.wireframe = C.wireframe, S === Ui ? M.side = C.shadowSide !== null ? C.shadowSide : C.side : M.side = C.shadowSide !== null ? C.shadowSide : u[C.side], M.alphaMap = C.alphaMap, M.alphaTest = C.alphaToCoverage === !0 ? 0.5 : C.alphaTest, M.map = C.map, M.clipShadows = C.clipShadows, M.clippingPlanes = C.clippingPlanes, M.clipIntersection = C.clipIntersection, M.displacementMap = C.displacementMap, M.displacementScale = C.displacementScale, M.displacementBias = C.displacementBias, M.wireframeLinewidth = C.wireframeLinewidth, M.linewidth = C.linewidth, F.isPointLight === !0 && M.isMeshDistanceMaterial === !0) {
18263
+ const z = i.properties.get(M);
18264
18264
  z.light = F;
18265
18265
  }
18266
- return S;
18266
+ return M;
18267
18267
  }
18268
- function y(R, C, F, M, S) {
18268
+ function y(R, C, F, S, M) {
18269
18269
  if (R.visible === !1) return;
18270
- if (R.layers.test(C.layers) && (R.isMesh || R.isLine || R.isPoints) && (R.castShadow || R.receiveShadow && S === Ui) && (!R.frustumCulled || n.intersectsObject(R))) {
18270
+ if (R.layers.test(C.layers) && (R.isMesh || R.isLine || R.isPoints) && (R.castShadow || R.receiveShadow && M === Ui) && (!R.frustumCulled || n.intersectsObject(R))) {
18271
18271
  R.modelViewMatrix.multiplyMatrices(F.matrixWorldInverse, R.matrixWorld);
18272
18272
  const B = e.update(R), G = R.material;
18273
18273
  if (Array.isArray(G)) {
18274
18274
  const X = B.groups;
18275
- for (let k = 0, H = X.length; k < H; k++) {
18276
- const $ = X[k], ie = G[$.materialIndex];
18275
+ for (let V = 0, H = X.length; V < H; V++) {
18276
+ const $ = X[V], ie = G[$.materialIndex];
18277
18277
  if (ie && ie.visible) {
18278
- const se = T(R, ie, M, S);
18278
+ const se = T(R, ie, S, M);
18279
18279
  R.onBeforeShadow(i, R, C, F, B, se, $), i.renderBufferDirect(F, null, B, se, R, $), R.onAfterShadow(i, R, C, F, B, se, $);
18280
18280
  }
18281
18281
  }
18282
18282
  } else if (G.visible) {
18283
- const X = T(R, G, M, S);
18283
+ const X = T(R, G, S, M);
18284
18284
  R.onBeforeShadow(i, R, C, F, B, X, null), i.renderBufferDirect(F, null, B, X, R, null), R.onAfterShadow(i, R, C, F, B, X, null);
18285
18285
  }
18286
18286
  }
18287
18287
  const z = R.children;
18288
18288
  for (let B = 0, G = z.length; B < G; B++)
18289
- y(z[B], C, F, M, S);
18289
+ y(z[B], C, F, S, M);
18290
18290
  }
18291
18291
  function A(R) {
18292
18292
  R.target.removeEventListener("dispose", A);
18293
18293
  for (const F in c) {
18294
- const M = c[F], S = R.target.uuid;
18295
- S in M && (M[S].dispose(), delete M[S]);
18294
+ const S = c[F], M = R.target.uuid;
18295
+ M in S && (S[M].dispose(), delete S[M]);
18296
18296
  }
18297
18297
  }
18298
18298
  }
@@ -18418,13 +18418,13 @@ function bm(i, e) {
18418
18418
  };
18419
18419
  }
18420
18420
  const s = new t(), a = new n(), o = new r(), l = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap();
18421
- let h = {}, u = {}, d = /* @__PURE__ */ new WeakMap(), p = [], _ = null, x = !1, m = null, f = null, b = null, T = null, y = null, A = null, R = null, C = new Ze(0, 0, 0), F = 0, M = !1, S = null, D = null, z = null, B = null, G = null;
18421
+ let h = {}, u = {}, d = /* @__PURE__ */ new WeakMap(), p = [], _ = null, x = !1, m = null, f = null, b = null, T = null, y = null, A = null, R = null, C = new Ze(0, 0, 0), F = 0, S = !1, M = null, D = null, z = null, B = null, G = null;
18422
18422
  const X = i.getParameter(i.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
18423
- let k = !1, H = 0;
18423
+ let V = !1, H = 0;
18424
18424
  const $ = i.getParameter(i.VERSION);
18425
- $.indexOf("WebGL") !== -1 ? (H = parseFloat(/^WebGL (\d)/.exec($)[1]), k = H >= 1) : $.indexOf("OpenGL ES") !== -1 && (H = parseFloat(/^OpenGL ES (\d)/.exec($)[1]), k = H >= 2);
18425
+ $.indexOf("WebGL") !== -1 ? (H = parseFloat(/^WebGL (\d)/.exec($)[1]), V = H >= 1) : $.indexOf("OpenGL ES") !== -1 && (H = parseFloat(/^OpenGL ES (\d)/.exec($)[1]), V = H >= 2);
18426
18426
  let ie = null, se = {};
18427
- const re = i.getParameter(i.SCISSOR_BOX), Le = i.getParameter(i.VIEWPORT), we = new pt().fromArray(re), ke = new pt().fromArray(Le);
18427
+ const re = i.getParameter(i.SCISSOR_BOX), Le = i.getParameter(i.VIEWPORT), we = new pt().fromArray(re), Ve = new pt().fromArray(Le);
18428
18428
  function tt(P, pe, te, ge) {
18429
18429
  const Q = new Uint8Array(4), j = i.createTexture();
18430
18430
  i.bindTexture(P, j), i.texParameteri(P, i.TEXTURE_MIN_FILTER, i.NEAREST), i.texParameteri(P, i.TEXTURE_MAG_FILTER, i.NEAREST);
@@ -18461,11 +18461,11 @@ function bm(i, e) {
18461
18461
  return _ !== P ? (i.useProgram(P), _ = P, !0) : !1;
18462
18462
  }
18463
18463
  const ve = {
18464
- [Vn]: i.FUNC_ADD,
18464
+ [kn]: i.FUNC_ADD,
18465
18465
  [xc]: i.FUNC_SUBTRACT,
18466
18466
  [vc]: i.FUNC_REVERSE_SUBTRACT
18467
18467
  };
18468
- ve[Mc] = i.MIN, ve[Sc] = i.MAX;
18468
+ ve[Sc] = i.MIN, ve[Mc] = i.MAX;
18469
18469
  const de = {
18470
18470
  [yc]: i.ZERO,
18471
18471
  [Ec]: i.ONE,
@@ -18489,8 +18489,8 @@ function bm(i, e) {
18489
18489
  return;
18490
18490
  }
18491
18491
  if (x === !1 && (J(i.BLEND), x = !0), P !== _c) {
18492
- if (P !== m || Je !== M) {
18493
- if ((f !== Vn || y !== Vn) && (i.blendEquation(i.FUNC_ADD), f = Vn, y = Vn), Je)
18492
+ if (P !== m || Je !== S) {
18493
+ if ((f !== kn || y !== kn) && (i.blendEquation(i.FUNC_ADD), f = kn, y = kn), Je)
18494
18494
  switch (P) {
18495
18495
  case mi:
18496
18496
  i.blendFuncSeparate(i.ONE, i.ONE_MINUS_SRC_ALPHA, i.ONE, i.ONE_MINUS_SRC_ALPHA);
@@ -18526,11 +18526,11 @@ function bm(i, e) {
18526
18526
  qe("WebGLState: Invalid blending: ", P);
18527
18527
  break;
18528
18528
  }
18529
- b = null, T = null, A = null, R = null, C.set(0, 0, 0), F = 0, m = P, M = Je;
18529
+ b = null, T = null, A = null, R = null, C.set(0, 0, 0), F = 0, m = P, S = Je;
18530
18530
  }
18531
18531
  return;
18532
18532
  }
18533
- Q = Q || pe, j = j || te, ae = ae || ge, (pe !== f || Q !== y) && (i.blendEquationSeparate(ve[pe], ve[Q]), f = pe, y = Q), (te !== b || ge !== T || j !== A || ae !== R) && (i.blendFuncSeparate(de[te], de[ge], de[j], de[ae]), b = te, T = ge, A = j, R = ae), (Be.equals(C) === !1 || ot !== F) && (i.blendColor(Be.r, Be.g, Be.b, ot), C.copy(Be), F = ot), m = P, M = !1;
18533
+ Q = Q || pe, j = j || te, ae = ae || ge, (pe !== f || Q !== y) && (i.blendEquationSeparate(ve[pe], ve[Q]), f = pe, y = Q), (te !== b || ge !== T || j !== A || ae !== R) && (i.blendFuncSeparate(de[te], de[ge], de[j], de[ae]), b = te, T = ge, A = j, R = ae), (Be.equals(C) === !1 || ot !== F) && (i.blendColor(Be.r, Be.g, Be.b, ot), C.copy(Be), F = ot), m = P, S = !1;
18534
18534
  }
18535
18535
  function Oe(P, pe) {
18536
18536
  P.side === fn ? xe(i.CULL_FACE) : J(i.CULL_FACE);
@@ -18540,13 +18540,13 @@ function bm(i, e) {
18540
18540
  o.setTest(ge), ge && (o.setMask(P.stencilWriteMask), o.setFunc(P.stencilFunc, P.stencilRef, P.stencilFuncMask), o.setOp(P.stencilFail, P.stencilZFail, P.stencilZPass)), ft(P.polygonOffset, P.polygonOffsetFactor, P.polygonOffsetUnits), P.alphaToCoverage === !0 ? J(i.SAMPLE_ALPHA_TO_COVERAGE) : xe(i.SAMPLE_ALPHA_TO_COVERAGE);
18541
18541
  }
18542
18542
  function De(P) {
18543
- S !== P && (P ? i.frontFace(i.CW) : i.frontFace(i.CCW), S = P);
18543
+ M !== P && (P ? i.frontFace(i.CW) : i.frontFace(i.CCW), M = P);
18544
18544
  }
18545
18545
  function je(P) {
18546
18546
  P !== pc ? (J(i.CULL_FACE), P !== D && (P === Ya ? i.cullFace(i.BACK) : P === mc ? i.cullFace(i.FRONT) : i.cullFace(i.FRONT_AND_BACK))) : xe(i.CULL_FACE), D = P;
18547
18547
  }
18548
18548
  function w(P) {
18549
- P !== z && (k && i.lineWidth(P), z = P);
18549
+ P !== z && (V && i.lineWidth(P), z = P);
18550
18550
  }
18551
18551
  function ft(P, pe, te) {
18552
18552
  P ? (J(i.POLYGON_OFFSET_FILL), (B !== pe || G !== te) && (i.polygonOffset(pe, te), B = pe, G = te)) : xe(i.POLYGON_OFFSET_FILL);
@@ -18639,8 +18639,8 @@ function bm(i, e) {
18639
18639
  function ce(P) {
18640
18640
  we.equals(P) === !1 && (i.scissor(P.x, P.y, P.z, P.w), we.copy(P));
18641
18641
  }
18642
- function Se(P) {
18643
- ke.equals(P) === !1 && (i.viewport(P.x, P.y, P.z, P.w), ke.copy(P));
18642
+ function Me(P) {
18643
+ Ve.equals(P) === !1 && (i.viewport(P.x, P.y, P.z, P.w), Ve.copy(P));
18644
18644
  }
18645
18645
  function be(P, pe) {
18646
18646
  let te = c.get(pe);
@@ -18653,7 +18653,7 @@ function bm(i, e) {
18653
18653
  l.get(pe) !== ge && (i.uniformBlockBinding(pe, ge, P.__bindingPointIndex), l.set(pe, ge));
18654
18654
  }
18655
18655
  function Ge() {
18656
- i.disable(i.BLEND), i.disable(i.CULL_FACE), i.disable(i.DEPTH_TEST), i.disable(i.POLYGON_OFFSET_FILL), i.disable(i.SCISSOR_TEST), i.disable(i.STENCIL_TEST), i.disable(i.SAMPLE_ALPHA_TO_COVERAGE), i.blendEquation(i.FUNC_ADD), i.blendFunc(i.ONE, i.ZERO), i.blendFuncSeparate(i.ONE, i.ZERO, i.ONE, i.ZERO), i.blendColor(0, 0, 0, 0), i.colorMask(!0, !0, !0, !0), i.clearColor(0, 0, 0, 0), i.depthMask(!0), i.depthFunc(i.LESS), a.setReversed(!1), i.clearDepth(1), i.stencilMask(4294967295), i.stencilFunc(i.ALWAYS, 0, 4294967295), i.stencilOp(i.KEEP, i.KEEP, i.KEEP), i.clearStencil(0), i.cullFace(i.BACK), i.frontFace(i.CCW), i.polygonOffset(0, 0), i.activeTexture(i.TEXTURE0), i.bindFramebuffer(i.FRAMEBUFFER, null), i.bindFramebuffer(i.DRAW_FRAMEBUFFER, null), i.bindFramebuffer(i.READ_FRAMEBUFFER, null), i.useProgram(null), i.lineWidth(1), i.scissor(0, 0, i.canvas.width, i.canvas.height), i.viewport(0, 0, i.canvas.width, i.canvas.height), h = {}, ie = null, se = {}, u = {}, d = /* @__PURE__ */ new WeakMap(), p = [], _ = null, x = !1, m = null, f = null, b = null, T = null, y = null, A = null, R = null, C = new Ze(0, 0, 0), F = 0, M = !1, S = null, D = null, z = null, B = null, G = null, we.set(0, 0, i.canvas.width, i.canvas.height), ke.set(0, 0, i.canvas.width, i.canvas.height), s.reset(), a.reset(), o.reset();
18656
+ i.disable(i.BLEND), i.disable(i.CULL_FACE), i.disable(i.DEPTH_TEST), i.disable(i.POLYGON_OFFSET_FILL), i.disable(i.SCISSOR_TEST), i.disable(i.STENCIL_TEST), i.disable(i.SAMPLE_ALPHA_TO_COVERAGE), i.blendEquation(i.FUNC_ADD), i.blendFunc(i.ONE, i.ZERO), i.blendFuncSeparate(i.ONE, i.ZERO, i.ONE, i.ZERO), i.blendColor(0, 0, 0, 0), i.colorMask(!0, !0, !0, !0), i.clearColor(0, 0, 0, 0), i.depthMask(!0), i.depthFunc(i.LESS), a.setReversed(!1), i.clearDepth(1), i.stencilMask(4294967295), i.stencilFunc(i.ALWAYS, 0, 4294967295), i.stencilOp(i.KEEP, i.KEEP, i.KEEP), i.clearStencil(0), i.cullFace(i.BACK), i.frontFace(i.CCW), i.polygonOffset(0, 0), i.activeTexture(i.TEXTURE0), i.bindFramebuffer(i.FRAMEBUFFER, null), i.bindFramebuffer(i.DRAW_FRAMEBUFFER, null), i.bindFramebuffer(i.READ_FRAMEBUFFER, null), i.useProgram(null), i.lineWidth(1), i.scissor(0, 0, i.canvas.width, i.canvas.height), i.viewport(0, 0, i.canvas.width, i.canvas.height), h = {}, ie = null, se = {}, u = {}, d = /* @__PURE__ */ new WeakMap(), p = [], _ = null, x = !1, m = null, f = null, b = null, T = null, y = null, A = null, R = null, C = new Ze(0, 0, 0), F = 0, S = !1, M = null, D = null, z = null, B = null, G = null, we.set(0, 0, i.canvas.width, i.canvas.height), Ve.set(0, 0, i.canvas.width, i.canvas.height), s.reset(), a.reset(), o.reset();
18657
18657
  }
18658
18658
  return {
18659
18659
  buffers: {
@@ -18689,7 +18689,7 @@ function bm(i, e) {
18689
18689
  compressedTexSubImage2D: W,
18690
18690
  compressedTexSubImage3D: Te,
18691
18691
  scissor: ce,
18692
- viewport: Se,
18692
+ viewport: Me,
18693
18693
  reset: Ge
18694
18694
  };
18695
18695
  }
@@ -18744,7 +18744,7 @@ function Tm(i, e, t, n, r, s, a) {
18744
18744
  return E ? g === null || g === an || g === Bi ? L = i.DEPTH24_STENCIL8 : g === en ? L = i.DEPTH32F_STENCIL8 : g === Oi && (L = i.DEPTH24_STENCIL8, Fe("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")) : g === null || g === an || g === Bi ? L = i.DEPTH_COMPONENT24 : g === en ? L = i.DEPTH_COMPONENT32F : g === Oi && (L = i.DEPTH_COMPONENT16), L;
18745
18745
  }
18746
18746
  function A(E, g) {
18747
- return m(E) === !0 || E.isFramebufferTexture && E.minFilter !== St && E.minFilter !== Tt ? Math.log2(Math.max(g.width, g.height)) + 1 : E.mipmaps !== void 0 && E.mipmaps.length > 0 ? E.mipmaps.length : E.isCompressedTexture && Array.isArray(E.image) ? g.mipmaps.length : 1;
18747
+ return m(E) === !0 || E.isFramebufferTexture && E.minFilter !== Mt && E.minFilter !== Tt ? Math.log2(Math.max(g.width, g.height)) + 1 : E.mipmaps !== void 0 && E.mipmaps.length > 0 ? E.mipmaps.length : E.isCompressedTexture && Array.isArray(E.image) ? g.mipmaps.length : 1;
18748
18748
  }
18749
18749
  function R(E) {
18750
18750
  const g = E.target;
@@ -18752,7 +18752,7 @@ function Tm(i, e, t, n, r, s, a) {
18752
18752
  }
18753
18753
  function C(E) {
18754
18754
  const g = E.target;
18755
- g.removeEventListener("dispose", C), S(g);
18755
+ g.removeEventListener("dispose", C), M(g);
18756
18756
  }
18757
18757
  function F(E) {
18758
18758
  const g = n.get(E);
@@ -18760,17 +18760,17 @@ function Tm(i, e, t, n, r, s, a) {
18760
18760
  const L = E.source, Y = d.get(L);
18761
18761
  if (Y) {
18762
18762
  const K = Y[g.__cacheKey];
18763
- K.usedTimes--, K.usedTimes === 0 && M(E), Object.keys(Y).length === 0 && d.delete(L);
18763
+ K.usedTimes--, K.usedTimes === 0 && S(E), Object.keys(Y).length === 0 && d.delete(L);
18764
18764
  }
18765
18765
  n.remove(E);
18766
18766
  }
18767
- function M(E) {
18767
+ function S(E) {
18768
18768
  const g = n.get(E);
18769
18769
  i.deleteTexture(g.__webglTexture);
18770
18770
  const L = E.source, Y = d.get(L);
18771
18771
  delete Y[g.__cacheKey], a.memory.textures--;
18772
18772
  }
18773
- function S(E) {
18773
+ function M(E) {
18774
18774
  const g = n.get(E);
18775
18775
  if (E.depthTexture && (E.depthTexture.dispose(), n.remove(E.depthTexture)), E.isWebGLCubeRenderTarget)
18776
18776
  for (let Y = 0; Y < 6; Y++) {
@@ -18824,7 +18824,7 @@ function Tm(i, e, t, n, r, s, a) {
18824
18824
  } else E.isExternalTexture && (L.__webglTexture = E.sourceTexture ? E.sourceTexture : null);
18825
18825
  t.bindTexture(i.TEXTURE_2D, L.__webglTexture, i.TEXTURE0 + g);
18826
18826
  }
18827
- function k(E, g) {
18827
+ function V(E, g) {
18828
18828
  const L = n.get(E);
18829
18829
  if (E.isRenderTargetTexture === !1 && E.version > 0 && L.__version !== E.version) {
18830
18830
  q(L, E, g);
@@ -18853,14 +18853,14 @@ function Tm(i, e, t, n, r, s, a) {
18853
18853
  [pn]: i.CLAMP_TO_EDGE,
18854
18854
  [Bs]: i.MIRRORED_REPEAT
18855
18855
  }, se = {
18856
- [St]: i.NEAREST,
18856
+ [Mt]: i.NEAREST,
18857
18857
  [Oc]: i.NEAREST_MIPMAP_NEAREST,
18858
18858
  [$i]: i.NEAREST_MIPMAP_LINEAR,
18859
18859
  [Tt]: i.LINEAR,
18860
18860
  [Yr]: i.LINEAR_MIPMAP_NEAREST,
18861
18861
  [Hn]: i.LINEAR_MIPMAP_LINEAR
18862
18862
  }, re = {
18863
- [kc]: i.NEVER,
18863
+ [Vc]: i.NEVER,
18864
18864
  [qc]: i.ALWAYS,
18865
18865
  [Hc]: i.LESS,
18866
18866
  [Pa]: i.LEQUAL,
@@ -18871,7 +18871,7 @@ function Tm(i, e, t, n, r, s, a) {
18871
18871
  };
18872
18872
  function Le(E, g) {
18873
18873
  if (g.type === en && e.has("OES_texture_float_linear") === !1 && (g.magFilter === Tt || g.magFilter === Yr || g.magFilter === $i || g.magFilter === Hn || g.minFilter === Tt || g.minFilter === Yr || g.minFilter === $i || g.minFilter === Hn) && Fe("WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), i.texParameteri(E, i.TEXTURE_WRAP_S, ie[g.wrapS]), i.texParameteri(E, i.TEXTURE_WRAP_T, ie[g.wrapT]), (E === i.TEXTURE_3D || E === i.TEXTURE_2D_ARRAY) && i.texParameteri(E, i.TEXTURE_WRAP_R, ie[g.wrapR]), i.texParameteri(E, i.TEXTURE_MAG_FILTER, se[g.magFilter]), i.texParameteri(E, i.TEXTURE_MIN_FILTER, se[g.minFilter]), g.compareFunction && (i.texParameteri(E, i.TEXTURE_COMPARE_MODE, i.COMPARE_REF_TO_TEXTURE), i.texParameteri(E, i.TEXTURE_COMPARE_FUNC, re[g.compareFunction])), e.has("EXT_texture_filter_anisotropic") === !0) {
18874
- if (g.magFilter === St || g.minFilter !== $i && g.minFilter !== Hn || g.type === en && e.has("OES_texture_float_linear") === !1) return;
18874
+ if (g.magFilter === Mt || g.minFilter !== $i && g.minFilter !== Hn || g.type === en && e.has("OES_texture_float_linear") === !1) return;
18875
18875
  if (g.anisotropy > 1 || n.get(g).__currentAnisotropy) {
18876
18876
  const L = e.get("EXT_texture_filter_anisotropic");
18877
18877
  i.texParameterf(E, L.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(g.anisotropy, r.getMaxAnisotropy())), n.get(g).__currentAnisotropy = g.anisotropy;
@@ -18891,11 +18891,11 @@ function Tm(i, e, t, n, r, s, a) {
18891
18891
  usedTimes: 0
18892
18892
  }, a.memory.textures++, L = !0), K[W].usedTimes++;
18893
18893
  const Te = K[E.__cacheKey];
18894
- Te !== void 0 && (K[E.__cacheKey].usedTimes--, Te.usedTimes === 0 && M(g)), E.__cacheKey = W, E.__webglTexture = K[W].texture;
18894
+ Te !== void 0 && (K[E.__cacheKey].usedTimes--, Te.usedTimes === 0 && S(g)), E.__cacheKey = W, E.__webglTexture = K[W].texture;
18895
18895
  }
18896
18896
  return L;
18897
18897
  }
18898
- function ke(E, g, L) {
18898
+ function Ve(E, g, L) {
18899
18899
  return Math.floor(Math.floor(E / L) / g);
18900
18900
  }
18901
18901
  function tt(E, g, L, Y) {
@@ -18906,17 +18906,17 @@ function Tm(i, e, t, n, r, s, a) {
18906
18906
  W.sort((ee, ce) => ee.start - ce.start);
18907
18907
  let Te = 0;
18908
18908
  for (let ee = 1; ee < W.length; ee++) {
18909
- const ce = W[Te], Se = W[ee], be = ce.start + ce.count, le = ke(Se.start, g.width, 4), Ge = ke(ce.start, g.width, 4);
18910
- Se.start <= be + 1 && le === Ge && ke(Se.start + Se.count - 1, g.width, 4) === le ? ce.count = Math.max(
18909
+ const ce = W[Te], Me = W[ee], be = ce.start + ce.count, le = Ve(Me.start, g.width, 4), Ge = Ve(ce.start, g.width, 4);
18910
+ Me.start <= be + 1 && le === Ge && Ve(Me.start + Me.count - 1, g.width, 4) === le ? ce.count = Math.max(
18911
18911
  ce.count,
18912
- Se.start + Se.count - ce.start
18913
- ) : (++Te, W[Te] = Se);
18912
+ Me.start + Me.count - ce.start
18913
+ ) : (++Te, W[Te] = Me);
18914
18914
  }
18915
18915
  W.length = Te + 1;
18916
18916
  const oe = i.getParameter(i.UNPACK_ROW_LENGTH), ye = i.getParameter(i.UNPACK_SKIP_PIXELS), Ue = i.getParameter(i.UNPACK_SKIP_ROWS);
18917
18917
  i.pixelStorei(i.UNPACK_ROW_LENGTH, g.width);
18918
18918
  for (let ee = 0, ce = W.length; ee < ce; ee++) {
18919
- const Se = W[ee], be = Math.floor(Se.start / 4), le = Math.ceil(Se.count / 4), Ge = be % g.width, P = Math.floor(be / g.width), pe = le, te = 1;
18919
+ const Me = W[ee], be = Math.floor(Me.start / 4), le = Math.ceil(Me.count / 4), Ge = be % g.width, P = Math.floor(be / g.width), pe = le, te = 1;
18920
18920
  i.pixelStorei(i.UNPACK_SKIP_PIXELS, Ge), i.pixelStorei(i.UNPACK_SKIP_ROWS, P), t.texSubImage2D(i.TEXTURE_2D, 0, Ge, P, pe, te, L, Y, g.data);
18921
18921
  }
18922
18922
  E.clearUpdateRanges(), i.pixelStorei(i.UNPACK_ROW_LENGTH, oe), i.pixelStorei(i.UNPACK_SKIP_PIXELS, ye), i.pixelStorei(i.UNPACK_SKIP_ROWS, Ue);
@@ -18934,21 +18934,21 @@ function Tm(i, e, t, n, r, s, a) {
18934
18934
  i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL, g.flipY), i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL, g.premultiplyAlpha), i.pixelStorei(i.UNPACK_ALIGNMENT, g.unpackAlignment), i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL, Ue);
18935
18935
  let ee = x(g.image, !1, r.maxTextureSize);
18936
18936
  ee = nt(g, ee);
18937
- const ce = s.convert(g.format, g.colorSpace), Se = s.convert(g.type);
18938
- let be = T(g.internalFormat, ce, Se, g.colorSpace, g.isVideoTexture);
18937
+ const ce = s.convert(g.format, g.colorSpace), Me = s.convert(g.type);
18938
+ let be = T(g.internalFormat, ce, Me, g.colorSpace, g.isVideoTexture);
18939
18939
  Le(Y, g);
18940
18940
  let le;
18941
18941
  const Ge = g.mipmaps, P = g.isVideoTexture !== !0, pe = Te.__version === void 0 || K === !0, te = W.dataReady, ge = A(g, ee);
18942
18942
  if (g.isDepthTexture)
18943
- be = y(g.format === Gn, g.type), pe && (P ? t.texStorage2D(i.TEXTURE_2D, 1, be, ee.width, ee.height) : t.texImage2D(i.TEXTURE_2D, 0, be, ee.width, ee.height, 0, ce, Se, null));
18943
+ be = y(g.format === Gn, g.type), pe && (P ? t.texStorage2D(i.TEXTURE_2D, 1, be, ee.width, ee.height) : t.texImage2D(i.TEXTURE_2D, 0, be, ee.width, ee.height, 0, ce, Me, null));
18944
18944
  else if (g.isDataTexture)
18945
18945
  if (Ge.length > 0) {
18946
18946
  P && pe && t.texStorage2D(i.TEXTURE_2D, ge, be, Ge[0].width, Ge[0].height);
18947
18947
  for (let Q = 0, j = Ge.length; Q < j; Q++)
18948
- le = Ge[Q], P ? te && t.texSubImage2D(i.TEXTURE_2D, Q, 0, 0, le.width, le.height, ce, Se, le.data) : t.texImage2D(i.TEXTURE_2D, Q, be, le.width, le.height, 0, ce, Se, le.data);
18948
+ le = Ge[Q], P ? te && t.texSubImage2D(i.TEXTURE_2D, Q, 0, 0, le.width, le.height, ce, Me, le.data) : t.texImage2D(i.TEXTURE_2D, Q, be, le.width, le.height, 0, ce, Me, le.data);
18949
18949
  g.generateMipmaps = !1;
18950
18950
  } else
18951
- P ? (pe && t.texStorage2D(i.TEXTURE_2D, ge, be, ee.width, ee.height), te && tt(g, ee, ce, Se)) : t.texImage2D(i.TEXTURE_2D, 0, be, ee.width, ee.height, 0, ce, Se, ee.data);
18951
+ P ? (pe && t.texStorage2D(i.TEXTURE_2D, ge, be, ee.width, ee.height), te && tt(g, ee, ce, Me)) : t.texImage2D(i.TEXTURE_2D, 0, be, ee.width, ee.height, 0, ce, Me, ee.data);
18952
18952
  else if (g.isCompressedTexture)
18953
18953
  if (g.isCompressedArrayTexture) {
18954
18954
  P && pe && t.texStorage3D(i.TEXTURE_2D_ARRAY, ge, be, Ge[0].width, Ge[0].height, ee.depth);
@@ -18974,11 +18974,11 @@ function Tm(i, e, t, n, r, s, a) {
18974
18974
  else
18975
18975
  Fe("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");
18976
18976
  else
18977
- P ? te && t.texSubImage3D(i.TEXTURE_2D_ARRAY, Q, 0, 0, 0, le.width, le.height, ee.depth, ce, Se, le.data) : t.texImage3D(i.TEXTURE_2D_ARRAY, Q, be, le.width, le.height, ee.depth, 0, ce, Se, le.data);
18977
+ P ? te && t.texSubImage3D(i.TEXTURE_2D_ARRAY, Q, 0, 0, 0, le.width, le.height, ee.depth, ce, Me, le.data) : t.texImage3D(i.TEXTURE_2D_ARRAY, Q, be, le.width, le.height, ee.depth, 0, ce, Me, le.data);
18978
18978
  } else {
18979
18979
  P && pe && t.texStorage2D(i.TEXTURE_2D, ge, be, Ge[0].width, Ge[0].height);
18980
18980
  for (let Q = 0, j = Ge.length; Q < j; Q++)
18981
- le = Ge[Q], g.format !== $t ? ce !== null ? P ? te && t.compressedTexSubImage2D(i.TEXTURE_2D, Q, 0, 0, le.width, le.height, ce, le.data) : t.compressedTexImage2D(i.TEXTURE_2D, Q, be, le.width, le.height, 0, le.data) : Fe("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : P ? te && t.texSubImage2D(i.TEXTURE_2D, Q, 0, 0, le.width, le.height, ce, Se, le.data) : t.texImage2D(i.TEXTURE_2D, Q, be, le.width, le.height, 0, ce, Se, le.data);
18981
+ le = Ge[Q], g.format !== $t ? ce !== null ? P ? te && t.compressedTexSubImage2D(i.TEXTURE_2D, Q, 0, 0, le.width, le.height, ce, le.data) : t.compressedTexImage2D(i.TEXTURE_2D, Q, be, le.width, le.height, 0, le.data) : Fe("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : P ? te && t.texSubImage2D(i.TEXTURE_2D, Q, 0, 0, le.width, le.height, ce, Me, le.data) : t.texImage2D(i.TEXTURE_2D, Q, be, le.width, le.height, 0, ce, Me, le.data);
18982
18982
  }
18983
18983
  else if (g.isDataArrayTexture)
18984
18984
  if (P) {
@@ -18990,15 +18990,15 @@ function Tm(i, e, t, n, r, s, a) {
18990
18990
  j * Q / ee.data.BYTES_PER_ELEMENT,
18991
18991
  (j + 1) * Q / ee.data.BYTES_PER_ELEMENT
18992
18992
  );
18993
- t.texSubImage3D(i.TEXTURE_2D_ARRAY, 0, 0, 0, j, ee.width, ee.height, 1, ce, Se, ae);
18993
+ t.texSubImage3D(i.TEXTURE_2D_ARRAY, 0, 0, 0, j, ee.width, ee.height, 1, ce, Me, ae);
18994
18994
  }
18995
18995
  g.clearLayerUpdates();
18996
18996
  } else
18997
- t.texSubImage3D(i.TEXTURE_2D_ARRAY, 0, 0, 0, 0, ee.width, ee.height, ee.depth, ce, Se, ee.data);
18997
+ t.texSubImage3D(i.TEXTURE_2D_ARRAY, 0, 0, 0, 0, ee.width, ee.height, ee.depth, ce, Me, ee.data);
18998
18998
  } else
18999
- t.texImage3D(i.TEXTURE_2D_ARRAY, 0, be, ee.width, ee.height, ee.depth, 0, ce, Se, ee.data);
18999
+ t.texImage3D(i.TEXTURE_2D_ARRAY, 0, be, ee.width, ee.height, ee.depth, 0, ce, Me, ee.data);
19000
19000
  else if (g.isData3DTexture)
19001
- P ? (pe && t.texStorage3D(i.TEXTURE_3D, ge, be, ee.width, ee.height, ee.depth), te && t.texSubImage3D(i.TEXTURE_3D, 0, 0, 0, 0, ee.width, ee.height, ee.depth, ce, Se, ee.data)) : t.texImage3D(i.TEXTURE_3D, 0, be, ee.width, ee.height, ee.depth, 0, ce, Se, ee.data);
19001
+ P ? (pe && t.texStorage3D(i.TEXTURE_3D, ge, be, ee.width, ee.height, ee.depth), te && t.texSubImage3D(i.TEXTURE_3D, 0, 0, 0, 0, ee.width, ee.height, ee.depth, ce, Me, ee.data)) : t.texImage3D(i.TEXTURE_3D, 0, be, ee.width, ee.height, ee.depth, 0, ce, Me, ee.data);
19002
19002
  else if (g.isFramebufferTexture) {
19003
19003
  if (pe)
19004
19004
  if (P)
@@ -19006,7 +19006,7 @@ function Tm(i, e, t, n, r, s, a) {
19006
19006
  else {
19007
19007
  let Q = ee.width, j = ee.height;
19008
19008
  for (let ae = 0; ae < ge; ae++)
19009
- t.texImage2D(i.TEXTURE_2D, ae, be, Q, j, 0, ce, Se, null), Q >>= 1, j >>= 1;
19009
+ t.texImage2D(i.TEXTURE_2D, ae, be, Q, j, 0, ce, Me, null), Q >>= 1, j >>= 1;
19010
19010
  }
19011
19011
  } else if (Ge.length > 0) {
19012
19012
  if (P && pe) {
@@ -19014,16 +19014,16 @@ function Tm(i, e, t, n, r, s, a) {
19014
19014
  t.texStorage2D(i.TEXTURE_2D, ge, be, Q.width, Q.height);
19015
19015
  }
19016
19016
  for (let Q = 0, j = Ge.length; Q < j; Q++)
19017
- le = Ge[Q], P ? te && t.texSubImage2D(i.TEXTURE_2D, Q, 0, 0, ce, Se, le) : t.texImage2D(i.TEXTURE_2D, Q, be, ce, Se, le);
19017
+ le = Ge[Q], P ? te && t.texSubImage2D(i.TEXTURE_2D, Q, 0, 0, ce, Me, le) : t.texImage2D(i.TEXTURE_2D, Q, be, ce, Me, le);
19018
19018
  g.generateMipmaps = !1;
19019
19019
  } else if (P) {
19020
19020
  if (pe) {
19021
19021
  const Q = Ee(ee);
19022
19022
  t.texStorage2D(i.TEXTURE_2D, ge, be, Q.width, Q.height);
19023
19023
  }
19024
- te && t.texSubImage2D(i.TEXTURE_2D, 0, 0, 0, ce, Se, ee);
19024
+ te && t.texSubImage2D(i.TEXTURE_2D, 0, 0, 0, ce, Me, ee);
19025
19025
  } else
19026
- t.texImage2D(i.TEXTURE_2D, 0, be, ce, Se, ee);
19026
+ t.texImage2D(i.TEXTURE_2D, 0, be, ce, Me, ee);
19027
19027
  m(g) && f(Y), Te.__version = W.version, g.onUpdate && g.onUpdate(g);
19028
19028
  }
19029
19029
  E.__version = g.version;
@@ -19040,12 +19040,12 @@ function Tm(i, e, t, n, r, s, a) {
19040
19040
  const Ue = g.isCompressedTexture || g.image[0].isCompressedTexture, ee = g.image[0] && g.image[0].isDataTexture, ce = [];
19041
19041
  for (let j = 0; j < 6; j++)
19042
19042
  !Ue && !ee ? ce[j] = x(g.image[j], !0, r.maxCubemapSize) : ce[j] = ee ? g.image[j].image : g.image[j], ce[j] = nt(g, ce[j]);
19043
- const Se = ce[0], be = s.convert(g.format, g.colorSpace), le = s.convert(g.type), Ge = T(g.internalFormat, be, le, g.colorSpace), P = g.isVideoTexture !== !0, pe = W.__version === void 0 || Y === !0, te = K.dataReady;
19044
- let ge = A(g, Se);
19043
+ const Me = ce[0], be = s.convert(g.format, g.colorSpace), le = s.convert(g.type), Ge = T(g.internalFormat, be, le, g.colorSpace), P = g.isVideoTexture !== !0, pe = W.__version === void 0 || Y === !0, te = K.dataReady;
19044
+ let ge = A(g, Me);
19045
19045
  Le(i.TEXTURE_CUBE_MAP, g);
19046
19046
  let Q;
19047
19047
  if (Ue) {
19048
- P && pe && t.texStorage2D(i.TEXTURE_CUBE_MAP, ge, Ge, Se.width, Se.height);
19048
+ P && pe && t.texStorage2D(i.TEXTURE_CUBE_MAP, ge, Ge, Me.width, Me.height);
19049
19049
  for (let j = 0; j < 6; j++) {
19050
19050
  Q = ce[j].mipmaps;
19051
19051
  for (let ae = 0; ae < Q.length; ae++) {
@@ -19081,8 +19081,8 @@ function Tm(i, e, t, n, r, s, a) {
19081
19081
  function xe(E, g, L, Y, K, W) {
19082
19082
  const Te = s.convert(L.format, L.colorSpace), oe = s.convert(L.type), ye = T(L.internalFormat, Te, oe, L.colorSpace), Ue = n.get(g), ee = n.get(L);
19083
19083
  if (ee.__renderTarget = g, !Ue.__hasExternalTextures) {
19084
- const ce = Math.max(1, g.width >> W), Se = Math.max(1, g.height >> W);
19085
- K === i.TEXTURE_3D || K === i.TEXTURE_2D_ARRAY ? t.texImage3D(K, W, ye, ce, Se, g.depth, 0, Te, oe, null) : t.texImage2D(K, W, ye, ce, Se, 0, Te, oe, null);
19084
+ const ce = Math.max(1, g.width >> W), Me = Math.max(1, g.height >> W);
19085
+ K === i.TEXTURE_3D || K === i.TEXTURE_2D_ARRAY ? t.texImage3D(K, W, ye, ce, Me, g.depth, 0, Te, oe, null) : t.texImage2D(K, W, ye, ce, Me, 0, Te, oe, null);
19086
19086
  }
19087
19087
  t.bindFramebuffer(i.FRAMEBUFFER, E), ft(g) ? o.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER, Y, K, ee.__webglTexture, 0, w(g)) : (K === i.TEXTURE_2D || K >= i.TEXTURE_CUBE_MAP_POSITIVE_X && K <= i.TEXTURE_CUBE_MAP_NEGATIVE_Z) && i.framebufferTexture2D(i.FRAMEBUFFER, Y, K, ee.__webglTexture, W), t.bindFramebuffer(i.FRAMEBUFFER, null);
19088
19088
  }
@@ -19110,8 +19110,8 @@ function Tm(i, e, t, n, r, s, a) {
19110
19110
  const Ue = s.convert(g.depthTexture.format), ee = s.convert(g.depthTexture.type);
19111
19111
  let ce;
19112
19112
  g.depthTexture.format === xn ? ce = i.DEPTH_COMPONENT24 : g.depthTexture.format === Gn && (ce = i.DEPTH24_STENCIL8);
19113
- for (let Se = 0; Se < 6; Se++)
19114
- i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Se, 0, ce, g.width, g.height, 0, Ue, ee, null);
19113
+ for (let Me = 0; Me < 6; Me++)
19114
+ i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X + Me, 0, ce, g.width, g.height, 0, Ue, ee, null);
19115
19115
  }
19116
19116
  } else
19117
19117
  X(g.depthTexture, 0);
@@ -19197,8 +19197,8 @@ function Tm(i, e, t, n, r, s, a) {
19197
19197
  for (let oe = 0; oe < K.length; oe++) {
19198
19198
  const ye = K[oe];
19199
19199
  L.__webglColorRenderbuffer[oe] = i.createRenderbuffer(), i.bindRenderbuffer(i.RENDERBUFFER, L.__webglColorRenderbuffer[oe]);
19200
- const Ue = s.convert(ye.format, ye.colorSpace), ee = s.convert(ye.type), ce = T(ye.internalFormat, Ue, ee, ye.colorSpace, E.isXRRenderTarget === !0), Se = w(E);
19201
- i.renderbufferStorageMultisample(i.RENDERBUFFER, Se, ce, E.width, E.height), i.framebufferRenderbuffer(i.FRAMEBUFFER, i.COLOR_ATTACHMENT0 + oe, i.RENDERBUFFER, L.__webglColorRenderbuffer[oe]);
19200
+ const Ue = s.convert(ye.format, ye.colorSpace), ee = s.convert(ye.type), ce = T(ye.internalFormat, Ue, ee, ye.colorSpace, E.isXRRenderTarget === !0), Me = w(E);
19201
+ i.renderbufferStorageMultisample(i.RENDERBUFFER, Me, ce, E.width, E.height), i.framebufferRenderbuffer(i.FRAMEBUFFER, i.COLOR_ATTACHMENT0 + oe, i.RENDERBUFFER, L.__webglColorRenderbuffer[oe]);
19202
19202
  }
19203
19203
  i.bindRenderbuffer(i.RENDERBUFFER, null), E.depthBuffer && (L.__webglDepthRenderbuffer = i.createRenderbuffer(), ze(L.__webglDepthRenderbuffer, E, !0)), t.bindFramebuffer(i.FRAMEBUFFER, null);
19204
19204
  }
@@ -19287,12 +19287,12 @@ function Tm(i, e, t, n, r, s, a) {
19287
19287
  }
19288
19288
  function nt(E, g) {
19289
19289
  const L = E.colorSpace, Y = E.format, K = E.type;
19290
- return E.isCompressedTexture === !0 || E.isVideoTexture === !0 || L !== Mi && L !== Rn && ($e.getTransfer(L) === et ? (Y !== $t || K !== Gt) && Fe("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : qe("WebGLTextures: Unsupported texture color space:", L)), g;
19290
+ return E.isCompressedTexture === !0 || E.isVideoTexture === !0 || L !== Si && L !== Rn && ($e.getTransfer(L) === et ? (Y !== $t || K !== Gt) && Fe("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : qe("WebGLTextures: Unsupported texture color space:", L)), g;
19291
19291
  }
19292
19292
  function Ee(E) {
19293
19293
  return typeof HTMLImageElement < "u" && E instanceof HTMLImageElement ? (c.width = E.naturalWidth || E.width, c.height = E.naturalHeight || E.height) : typeof VideoFrame < "u" && E instanceof VideoFrame ? (c.width = E.displayWidth, c.height = E.displayHeight) : (c.width = E.width, c.height = E.height), c;
19294
19294
  }
19295
- this.allocateTextureUnit = B, this.resetTextureUnits = z, this.setTexture2D = X, this.setTexture2DArray = k, this.setTexture3D = H, this.setTextureCube = $, this.rebindTextures = ve, this.setupRenderTarget = de, this.updateRenderTargetMipmap = Re, this.updateMultisampleRenderTarget = je, this.setupDepthRenderbuffer = me, this.setupFrameBufferTexture = xe, this.useMultisampledRTT = ft, this.isReversedDepthBuffer = function() {
19295
+ this.allocateTextureUnit = B, this.resetTextureUnits = z, this.setTexture2D = X, this.setTexture2DArray = V, this.setTexture3D = H, this.setTextureCube = $, this.rebindTextures = ve, this.setupRenderTarget = de, this.updateRenderTargetMipmap = Re, this.updateMultisampleRenderTarget = je, this.setupDepthRenderbuffer = me, this.setupFrameBufferTexture = xe, this.useMultisampledRTT = ft, this.isReversedDepthBuffer = function() {
19296
19296
  return t.buffers.depth.getReversed();
19297
19297
  };
19298
19298
  }
@@ -19317,7 +19317,7 @@ function Am(i, e) {
19317
19317
  if (n === $t) return i.RGBA;
19318
19318
  if (n === xn) return i.DEPTH_COMPONENT;
19319
19319
  if (n === Gn) return i.DEPTH_STENCIL;
19320
- if (n === Ml) return i.RED;
19320
+ if (n === Sl) return i.RED;
19321
19321
  if (n === wa) return i.RED_INTEGER;
19322
19322
  if (n === vi) return i.RG;
19323
19323
  if (n === Ra) return i.RG_INTEGER;
@@ -19338,11 +19338,11 @@ function Am(i, e) {
19338
19338
  if (n === Rr) return s.COMPRESSED_RGBA_S3TC_DXT5_EXT;
19339
19339
  } else
19340
19340
  return null;
19341
- if (n === zs || n === Vs || n === ks || n === Hs)
19341
+ if (n === zs || n === ks || n === Vs || n === Hs)
19342
19342
  if (s = e.get("WEBGL_compressed_texture_pvrtc"), s !== null) {
19343
19343
  if (n === zs) return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
19344
- if (n === Vs) return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
19345
- if (n === ks) return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
19344
+ if (n === ks) return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;
19345
+ if (n === Vs) return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
19346
19346
  if (n === Hs) return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;
19347
19347
  } else
19348
19348
  return null;
@@ -19454,7 +19454,7 @@ class Cm {
19454
19454
  depthHeight: { value: t.w }
19455
19455
  }
19456
19456
  });
19457
- this.mesh = new Mn(new kr(20, 20), n);
19457
+ this.mesh = new Sn(new Vr(20, 20), n);
19458
19458
  }
19459
19459
  return this.mesh;
19460
19460
  }
@@ -19488,11 +19488,11 @@ class Pm extends qn {
19488
19488
  let T = null, y = null;
19489
19489
  const A = [], R = [], C = new Ne();
19490
19490
  let F = null;
19491
- const M = new Ht();
19492
- M.viewport = new pt();
19493
19491
  const S = new Ht();
19494
19492
  S.viewport = new pt();
19495
- const D = [M, S], z = new Ou();
19493
+ const M = new Ht();
19494
+ M.viewport = new pt();
19495
+ const D = [S, M], z = new Ou();
19496
19496
  let B = null, G = null;
19497
19497
  this.cameraAutoUpdate = !0, this.enabled = !1, this.isPresenting = !1, this.getController = function(q) {
19498
19498
  let J = A[q];
@@ -19511,8 +19511,8 @@ class Pm extends qn {
19511
19511
  const xe = A[J];
19512
19512
  xe !== void 0 && (xe.update(q.inputSource, q.frame, c || a), xe.dispatchEvent({ type: q.type, data: q.inputSource }));
19513
19513
  }
19514
- function k() {
19515
- r.removeEventListener("select", X), r.removeEventListener("selectstart", X), r.removeEventListener("selectend", X), r.removeEventListener("squeeze", X), r.removeEventListener("squeezestart", X), r.removeEventListener("squeezeend", X), r.removeEventListener("end", k), r.removeEventListener("inputsourceschange", H);
19514
+ function V() {
19515
+ r.removeEventListener("select", X), r.removeEventListener("selectstart", X), r.removeEventListener("selectend", X), r.removeEventListener("squeeze", X), r.removeEventListener("squeezestart", X), r.removeEventListener("squeezeend", X), r.removeEventListener("end", V), r.removeEventListener("inputsourceschange", H);
19516
19516
  for (let q = 0; q < A.length; q++) {
19517
19517
  const J = R[q];
19518
19518
  J !== null && (R[q] = null, A[q].disconnect(J));
@@ -19540,7 +19540,7 @@ class Pm extends qn {
19540
19540
  return r;
19541
19541
  }, this.setSession = async function(q) {
19542
19542
  if (r = q, r !== null) {
19543
- if (T = e.getRenderTarget(), r.addEventListener("select", X), r.addEventListener("selectstart", X), r.addEventListener("selectend", X), r.addEventListener("squeeze", X), r.addEventListener("squeezestart", X), r.addEventListener("squeezeend", X), r.addEventListener("end", k), r.addEventListener("inputsourceschange", H), b.xrCompatible !== !0 && await t.makeXRCompatible(), F = e.getPixelRatio(), e.getSize(C), x && "createProjectionLayer" in XRWebGLBinding.prototype) {
19543
+ if (T = e.getRenderTarget(), r.addEventListener("select", X), r.addEventListener("selectstart", X), r.addEventListener("selectend", X), r.addEventListener("squeeze", X), r.addEventListener("squeezestart", X), r.addEventListener("squeezeend", X), r.addEventListener("end", V), r.addEventListener("inputsourceschange", H), b.xrCompatible !== !0 && await t.makeXRCompatible(), F = e.getPixelRatio(), e.getSize(C), x && "createProjectionLayer" in XRWebGLBinding.prototype) {
19544
19544
  let xe = null, ze = null, Z = null;
19545
19545
  b.depth && (Z = b.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24, xe = b.stencil ? Gn : xn, ze = b.stencil ? Bi : an);
19546
19546
  const me = {
@@ -19554,7 +19554,7 @@ class Pm extends qn {
19554
19554
  {
19555
19555
  format: $t,
19556
19556
  type: Gt,
19557
- depthTexture: new Vi(d.textureWidth, d.textureHeight, ze, void 0, void 0, void 0, void 0, void 0, void 0, xe),
19557
+ depthTexture: new ki(d.textureWidth, d.textureHeight, ze, void 0, void 0, void 0, void 0, void 0, void 0, xe),
19558
19558
  stencilBuffer: b.stencil,
19559
19559
  colorSpace: e.outputColorSpace,
19560
19560
  samples: b.antialias ? 4 : 0,
@@ -19631,15 +19631,15 @@ class Pm extends qn {
19631
19631
  this.updateCamera = function(q) {
19632
19632
  if (r === null) return;
19633
19633
  let J = q.near, xe = q.far;
19634
- m.texture !== null && (m.depthNear > 0 && (J = m.depthNear), m.depthFar > 0 && (xe = m.depthFar)), z.near = S.near = M.near = J, z.far = S.far = M.far = xe, (B !== z.near || G !== z.far) && (r.updateRenderState({
19634
+ m.texture !== null && (m.depthNear > 0 && (J = m.depthNear), m.depthFar > 0 && (xe = m.depthFar)), z.near = M.near = S.near = J, z.far = M.far = S.far = xe, (B !== z.near || G !== z.far) && (r.updateRenderState({
19635
19635
  depthNear: z.near,
19636
19636
  depthFar: z.far
19637
- }), B = z.near, G = z.far), z.layers.mask = q.layers.mask | 6, M.layers.mask = z.layers.mask & 3, S.layers.mask = z.layers.mask & 5;
19637
+ }), B = z.near, G = z.far), z.layers.mask = q.layers.mask | 6, S.layers.mask = z.layers.mask & 3, M.layers.mask = z.layers.mask & 5;
19638
19638
  const ze = q.parent, Z = z.cameras;
19639
19639
  re(z, ze);
19640
19640
  for (let me = 0; me < Z.length; me++)
19641
19641
  re(Z[me], ze);
19642
- Z.length === 2 ? se(z, M, S) : z.projectionMatrix.copy(M.projectionMatrix), Le(q, z, ze);
19642
+ Z.length === 2 ? se(z, S, M) : z.projectionMatrix.copy(S.projectionMatrix), Le(q, z, ze);
19643
19643
  };
19644
19644
  function Le(q, J, xe) {
19645
19645
  xe === null ? q.matrix.copy(J.matrixWorld) : (q.matrix.copy(xe.matrixWorld), q.matrix.invert(), q.matrix.multiply(J.matrixWorld)), q.matrix.decompose(q.position, q.quaternion, q.scale), q.updateMatrixWorld(!0), q.projectionMatrix.copy(J.projectionMatrix), q.projectionMatrixInverse.copy(J.projectionMatrixInverse), q.isPerspectiveCamera && (q.fov = xa * 2 * Math.atan(1 / q.projectionMatrix.elements[5]), q.zoom = 1);
@@ -19659,7 +19659,7 @@ class Pm extends qn {
19659
19659
  return f[q];
19660
19660
  };
19661
19661
  let we = null;
19662
- function ke(q, J) {
19662
+ function Ve(q, J) {
19663
19663
  if (h = J.getViewerPose(c || a), _ = J, h !== null) {
19664
19664
  const xe = h.views;
19665
19665
  p !== null && (e.setRenderTargetFramebuffer(y, p.framebuffer), e.setRenderTarget(y));
@@ -19707,7 +19707,7 @@ class Pm extends qn {
19707
19707
  we && we(q, J), J.detectedPlanes && n.dispatchEvent({ type: "planesdetected", data: J }), _ = null;
19708
19708
  }
19709
19709
  const tt = new Ol();
19710
- tt.setAnimationLoop(ke), this.setAnimationLoop = function(q) {
19710
+ tt.setAnimationLoop(Ve), this.setAnimationLoop = function(q) {
19711
19711
  we = q;
19712
19712
  }, this.dispose = function() {
19713
19713
  };
@@ -19797,14 +19797,14 @@ function Im(i, e, t, n) {
19797
19797
  i.bindBuffer(i.UNIFORM_BUFFER, T);
19798
19798
  for (let R = 0, C = y.length; R < C; R++) {
19799
19799
  const F = Array.isArray(y[R]) ? y[R] : [y[R]];
19800
- for (let M = 0, S = F.length; M < S; M++) {
19801
- const D = F[M];
19802
- if (p(D, R, M, A) === !0) {
19800
+ for (let S = 0, M = F.length; S < M; S++) {
19801
+ const D = F[S];
19802
+ if (p(D, R, S, A) === !0) {
19803
19803
  const z = D.__offset, B = Array.isArray(D.value) ? D.value : [D.value];
19804
19804
  let G = 0;
19805
19805
  for (let X = 0; X < B.length; X++) {
19806
- const k = B[X], H = x(k);
19807
- typeof k == "number" || typeof k == "boolean" ? (D.__data[0] = k, i.bufferSubData(i.UNIFORM_BUFFER, z + G, D.__data)) : k.isMatrix3 ? (D.__data[0] = k.elements[0], D.__data[1] = k.elements[1], D.__data[2] = k.elements[2], D.__data[3] = 0, D.__data[4] = k.elements[3], D.__data[5] = k.elements[4], D.__data[6] = k.elements[5], D.__data[7] = 0, D.__data[8] = k.elements[6], D.__data[9] = k.elements[7], D.__data[10] = k.elements[8], D.__data[11] = 0) : (k.toArray(D.__data, G), G += H.storage / Float32Array.BYTES_PER_ELEMENT);
19806
+ const V = B[X], H = x(V);
19807
+ typeof V == "number" || typeof V == "boolean" ? (D.__data[0] = V, i.bufferSubData(i.UNIFORM_BUFFER, z + G, D.__data)) : V.isMatrix3 ? (D.__data[0] = V.elements[0], D.__data[1] = V.elements[1], D.__data[2] = V.elements[2], D.__data[3] = 0, D.__data[4] = V.elements[3], D.__data[5] = V.elements[4], D.__data[6] = V.elements[5], D.__data[7] = 0, D.__data[8] = V.elements[6], D.__data[9] = V.elements[7], D.__data[10] = V.elements[8], D.__data[11] = 0) : (V.toArray(D.__data, G), G += H.storage / Float32Array.BYTES_PER_ELEMENT);
19808
19808
  }
19809
19809
  i.bufferSubData(i.UNIFORM_BUFFER, z, D.__data);
19810
19810
  }
@@ -19831,11 +19831,11 @@ function Im(i, e, t, n) {
19831
19831
  let y = 0;
19832
19832
  const A = 16;
19833
19833
  for (let C = 0, F = T.length; C < F; C++) {
19834
- const M = Array.isArray(T[C]) ? T[C] : [T[C]];
19835
- for (let S = 0, D = M.length; S < D; S++) {
19836
- const z = M[S], B = Array.isArray(z.value) ? z.value : [z.value];
19834
+ const S = Array.isArray(T[C]) ? T[C] : [T[C]];
19835
+ for (let M = 0, D = S.length; M < D; M++) {
19836
+ const z = S[M], B = Array.isArray(z.value) ? z.value : [z.value];
19837
19837
  for (let G = 0, X = B.length; G < X; G++) {
19838
- const k = B[G], H = x(k), $ = y % A, ie = $ % H.boundary, se = $ + ie;
19838
+ const V = B[G], H = x(V), $ = y % A, ie = $ % H.boundary, se = $ + ie;
19839
19839
  y += ie, se !== 0 && A - se < H.storage && (y += A - se), z.__data = new Float32Array(H.storage / Float32Array.BYTES_PER_ELEMENT), z.__offset = y, y += H.storage;
19840
19840
  }
19841
19841
  }
@@ -20443,14 +20443,14 @@ class Fm {
20443
20443
  */
20444
20444
  onShaderError: null
20445
20445
  }, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.toneMapping = nn, this.toneMappingExposure = 1, this.transmissionResolutionScale = 1;
20446
- const M = this;
20447
- let S = !1;
20446
+ const S = this;
20447
+ let M = !1;
20448
20448
  this._outputColorSpace = zt;
20449
20449
  let D = 0, z = 0, B = null, G = -1, X = null;
20450
- const k = new pt(), H = new pt();
20450
+ const V = new pt(), H = new pt();
20451
20451
  let $ = null;
20452
20452
  const ie = new Ze(0);
20453
- let se = 0, re = t.width, Le = t.height, we = 1, ke = null, tt = null;
20453
+ let se = 0, re = t.width, Le = t.height, we = 1, Ve = null, tt = null;
20454
20454
  const q = new pt(0, 0, re, Le), J = new pt(0, 0, re, Le);
20455
20455
  let xe = !1;
20456
20456
  const ze = new Il();
@@ -20483,12 +20483,12 @@ class Fm {
20483
20483
  } catch (v) {
20484
20484
  throw qe("WebGLRenderer: " + v.message), v;
20485
20485
  }
20486
- let Ye, nt, Ee, E, g, L, Y, K, W, Te, oe, ye, Ue, ee, ce, Se, be, le, Ge, P, pe, te, ge, Q;
20486
+ let Ye, nt, Ee, E, g, L, Y, K, W, Te, oe, ye, Ue, ee, ce, Me, be, le, Ge, P, pe, te, ge, Q;
20487
20487
  function j() {
20488
- Ye = new Nf(w), Ye.init(), te = new Am(w, Ye), nt = new Af(w, Ye, e, te), Ee = new bm(w, Ye), nt.reversedDepthBuffer && d && Ee.buffers.depth.setReversed(!0), E = new Bf(w), g = new cm(), L = new Tm(w, Ye, Ee, g, nt, te, E), Y = new Rf(M), K = new Uf(M), W = new ku(w), ge = new bf(w, W), Te = new Ff(w, W, E, ge), oe = new Vf(w, Te, W, E), Ge = new zf(w, nt, L), Se = new wf(g), ye = new lm(M, Y, K, Ye, nt, ge, Se), Ue = new Lm(M, g), ee = new hm(), ce = new _m(Ye), le = new Ef(M, Y, K, Ee, oe, _, l), be = new ym(M, oe, nt), Q = new Im(w, E, nt, Ee), P = new Tf(w, Ye, E), pe = new Of(w, Ye, E), E.programs = ye.programs, M.capabilities = nt, M.extensions = Ye, M.properties = g, M.renderLists = ee, M.shadowMap = be, M.state = Ee, M.info = E;
20488
+ Ye = new Nf(w), Ye.init(), te = new Am(w, Ye), nt = new Af(w, Ye, e, te), Ee = new bm(w, Ye), nt.reversedDepthBuffer && d && Ee.buffers.depth.setReversed(!0), E = new Bf(w), g = new cm(), L = new Tm(w, Ye, Ee, g, nt, te, E), Y = new Rf(S), K = new Uf(S), W = new Vu(w), ge = new bf(w, W), Te = new Ff(w, W, E, ge), oe = new kf(w, Te, W, E), Ge = new zf(w, nt, L), Me = new wf(g), ye = new lm(S, Y, K, Ye, nt, ge, Me), Ue = new Lm(S, g), ee = new hm(), ce = new _m(Ye), le = new Ef(S, Y, K, Ee, oe, _, l), be = new ym(S, oe, nt), Q = new Im(w, E, nt, Ee), P = new Tf(w, Ye, E), pe = new Of(w, Ye, E), E.programs = ye.programs, S.capabilities = nt, S.extensions = Ye, S.properties = g, S.renderLists = ee, S.shadowMap = be, S.state = Ee, S.info = E;
20489
20489
  }
20490
20490
  j(), x !== Gt && (F = new Hf(x, t.width, t.height, r, s));
20491
- const ae = new Pm(M, w);
20491
+ const ae = new Pm(S, w);
20492
20492
  this.xr = ae, this.getContext = function() {
20493
20493
  return w;
20494
20494
  }, this.getContextAttributes = function() {
@@ -20505,16 +20505,16 @@ class Fm {
20505
20505
  v !== void 0 && (we = v, this.setSize(re, Le, !1));
20506
20506
  }, this.getSize = function(v) {
20507
20507
  return v.set(re, Le);
20508
- }, this.setSize = function(v, I, V = !0) {
20508
+ }, this.setSize = function(v, I, k = !0) {
20509
20509
  if (ae.isPresenting) {
20510
20510
  Fe("WebGLRenderer: Can't change size while VR device is presenting.");
20511
20511
  return;
20512
20512
  }
20513
- re = v, Le = I, t.width = Math.floor(v * we), t.height = Math.floor(I * we), V === !0 && (t.style.width = v + "px", t.style.height = I + "px"), F !== null && F.setSize(t.width, t.height), this.setViewport(0, 0, v, I);
20513
+ re = v, Le = I, t.width = Math.floor(v * we), t.height = Math.floor(I * we), k === !0 && (t.style.width = v + "px", t.style.height = I + "px"), F !== null && F.setSize(t.width, t.height), this.setViewport(0, 0, v, I);
20514
20514
  }, this.getDrawingBufferSize = function(v) {
20515
20515
  return v.set(re * we, Le * we).floor();
20516
- }, this.setDrawingBufferSize = function(v, I, V) {
20517
- re = v, Le = I, we = V, t.width = Math.floor(v * V), t.height = Math.floor(I * V), this.setViewport(0, 0, v, I);
20516
+ }, this.setDrawingBufferSize = function(v, I, k) {
20517
+ re = v, Le = I, we = k, t.width = Math.floor(v * k), t.height = Math.floor(I * k), this.setViewport(0, 0, v, I);
20518
20518
  }, this.setEffects = function(v) {
20519
20519
  if (x === Gt) {
20520
20520
  console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");
@@ -20529,21 +20529,21 @@ class Fm {
20529
20529
  }
20530
20530
  F.setEffects(v || []);
20531
20531
  }, this.getCurrentViewport = function(v) {
20532
- return v.copy(k);
20532
+ return v.copy(V);
20533
20533
  }, this.getViewport = function(v) {
20534
20534
  return v.copy(q);
20535
- }, this.setViewport = function(v, I, V, O) {
20536
- v.isVector4 ? q.set(v.x, v.y, v.z, v.w) : q.set(v, I, V, O), Ee.viewport(k.copy(q).multiplyScalar(we).round());
20535
+ }, this.setViewport = function(v, I, k, O) {
20536
+ v.isVector4 ? q.set(v.x, v.y, v.z, v.w) : q.set(v, I, k, O), Ee.viewport(V.copy(q).multiplyScalar(we).round());
20537
20537
  }, this.getScissor = function(v) {
20538
20538
  return v.copy(J);
20539
- }, this.setScissor = function(v, I, V, O) {
20540
- v.isVector4 ? J.set(v.x, v.y, v.z, v.w) : J.set(v, I, V, O), Ee.scissor(H.copy(J).multiplyScalar(we).round());
20539
+ }, this.setScissor = function(v, I, k, O) {
20540
+ v.isVector4 ? J.set(v.x, v.y, v.z, v.w) : J.set(v, I, k, O), Ee.scissor(H.copy(J).multiplyScalar(we).round());
20541
20541
  }, this.getScissorTest = function() {
20542
20542
  return xe;
20543
20543
  }, this.setScissorTest = function(v) {
20544
20544
  Ee.setScissorTest(xe = v);
20545
20545
  }, this.setOpaqueSort = function(v) {
20546
- ke = v;
20546
+ Ve = v;
20547
20547
  }, this.setTransparentSort = function(v) {
20548
20548
  tt = v;
20549
20549
  }, this.getClearColor = function(v) {
@@ -20554,7 +20554,7 @@ class Fm {
20554
20554
  return le.getClearAlpha();
20555
20555
  }, this.setClearAlpha = function() {
20556
20556
  le.setClearAlpha(...arguments);
20557
- }, this.clear = function(v = !0, I = !0, V = !0) {
20557
+ }, this.clear = function(v = !0, I = !0, k = !0) {
20558
20558
  let O = 0;
20559
20559
  if (v) {
20560
20560
  let N = !1;
@@ -20563,12 +20563,12 @@ class Fm {
20563
20563
  N = m.has(ue);
20564
20564
  }
20565
20565
  if (N) {
20566
- const ue = B.texture.type, _e = f.has(ue), fe = le.getClearColor(), Me = le.getClearAlpha(), Ae = fe.r, Ie = fe.g, Ce = fe.b;
20567
- _e ? (b[0] = Ae, b[1] = Ie, b[2] = Ce, b[3] = Me, w.clearBufferuiv(w.COLOR, 0, b)) : (T[0] = Ae, T[1] = Ie, T[2] = Ce, T[3] = Me, w.clearBufferiv(w.COLOR, 0, T));
20566
+ const ue = B.texture.type, _e = f.has(ue), fe = le.getClearColor(), Se = le.getClearAlpha(), Ae = fe.r, Ie = fe.g, Ce = fe.b;
20567
+ _e ? (b[0] = Ae, b[1] = Ie, b[2] = Ce, b[3] = Se, w.clearBufferuiv(w.COLOR, 0, b)) : (T[0] = Ae, T[1] = Ie, T[2] = Ce, T[3] = Se, w.clearBufferiv(w.COLOR, 0, T));
20568
20568
  } else
20569
20569
  O |= w.COLOR_BUFFER_BIT;
20570
20570
  }
20571
- I && (O |= w.DEPTH_BUFFER_BIT), V && (O |= w.STENCIL_BUFFER_BIT, this.state.buffers.stencil.setMask(4294967295)), w.clear(O);
20571
+ I && (O |= w.DEPTH_BUFFER_BIT), k && (O |= w.STENCIL_BUFFER_BIT, this.state.buffers.stencil.setMask(4294967295)), w.clear(O);
20572
20572
  }, this.clearColor = function() {
20573
20573
  this.clear(!0, !1, !1);
20574
20574
  }, this.clearDepth = function() {
@@ -20579,12 +20579,12 @@ class Fm {
20579
20579
  t.removeEventListener("webglcontextlost", Be, !1), t.removeEventListener("webglcontextrestored", ot, !1), t.removeEventListener("webglcontextcreationerror", Je, !1), le.dispose(), ee.dispose(), ce.dispose(), g.dispose(), Y.dispose(), K.dispose(), oe.dispose(), ge.dispose(), Q.dispose(), ye.dispose(), ae.dispose(), ae.removeEventListener("sessionstart", Oa), ae.removeEventListener("sessionend", Ba), Ln.stop();
20580
20580
  };
20581
20581
  function Be(v) {
20582
- v.preventDefault(), Fr("WebGLRenderer: Context Lost."), S = !0;
20582
+ v.preventDefault(), Fr("WebGLRenderer: Context Lost."), M = !0;
20583
20583
  }
20584
20584
  function ot() {
20585
- Fr("WebGLRenderer: Context Restored."), S = !1;
20586
- const v = E.autoReset, I = be.enabled, V = be.autoUpdate, O = be.needsUpdate, N = be.type;
20587
- j(), E.autoReset = v, be.enabled = I, be.autoUpdate = V, be.needsUpdate = O, be.type = N;
20585
+ Fr("WebGLRenderer: Context Restored."), M = !1;
20586
+ const v = E.autoReset, I = be.enabled, k = be.autoUpdate, O = be.needsUpdate, N = be.type;
20587
+ j(), E.autoReset = v, be.enabled = I, be.autoUpdate = k, be.needsUpdate = O, be.type = N;
20588
20588
  }
20589
20589
  function Je(v) {
20590
20590
  qe("WebGLRenderer: A WebGL context could not be created. Reason: ", v.statusMessage);
@@ -20598,27 +20598,27 @@ class Fm {
20598
20598
  }
20599
20599
  function Yl(v) {
20600
20600
  const I = g.get(v).programs;
20601
- I !== void 0 && (I.forEach(function(V) {
20602
- ye.releaseProgram(V);
20601
+ I !== void 0 && (I.forEach(function(k) {
20602
+ ye.releaseProgram(k);
20603
20603
  }), v.isShaderMaterial && ye.releaseShaderCache(v));
20604
20604
  }
20605
- this.renderBufferDirect = function(v, I, V, O, N, ue) {
20605
+ this.renderBufferDirect = function(v, I, k, O, N, ue) {
20606
20606
  I === null && (I = Oe);
20607
- const _e = N.isMesh && N.matrixWorld.determinant() < 0, fe = Zl(v, I, V, O, N);
20607
+ const _e = N.isMesh && N.matrixWorld.determinant() < 0, fe = Zl(v, I, k, O, N);
20608
20608
  Ee.setMaterial(O, _e);
20609
- let Me = V.index, Ae = 1;
20609
+ let Se = k.index, Ae = 1;
20610
20610
  if (O.wireframe === !0) {
20611
- if (Me = Te.getWireframeAttribute(V), Me === void 0) return;
20611
+ if (Se = Te.getWireframeAttribute(k), Se === void 0) return;
20612
20612
  Ae = 2;
20613
20613
  }
20614
- const Ie = V.drawRange, Ce = V.attributes.position;
20614
+ const Ie = k.drawRange, Ce = k.attributes.position;
20615
20615
  let We = Ie.start * Ae, it = (Ie.start + Ie.count) * Ae;
20616
- ue !== null && (We = Math.max(We, ue.start * Ae), it = Math.min(it, (ue.start + ue.count) * Ae)), Me !== null ? (We = Math.max(We, 0), it = Math.min(it, Me.count)) : Ce != null && (We = Math.max(We, 0), it = Math.min(it, Ce.count));
20616
+ ue !== null && (We = Math.max(We, ue.start * Ae), it = Math.min(it, (ue.start + ue.count) * Ae)), Se !== null ? (We = Math.max(We, 0), it = Math.min(it, Se.count)) : Ce != null && (We = Math.max(We, 0), it = Math.min(it, Ce.count));
20617
20617
  const ht = it - We;
20618
20618
  if (ht < 0 || ht === 1 / 0) return;
20619
- ge.setup(N, O, fe, V, Me);
20619
+ ge.setup(N, O, fe, k, Se);
20620
20620
  let dt, at = P;
20621
- if (Me !== null && (dt = W.get(Me), at = pe, at.setIndex(dt)), N.isMesh)
20621
+ if (Se !== null && (dt = W.get(Se), at = pe, at.setIndex(dt)), N.isMesh)
20622
20622
  O.wireframe === !0 ? (Ee.setLineWidth(O.wireframeLinewidth * je()), at.setMode(w.LINES)) : at.setMode(w.TRIANGLES);
20623
20623
  else if (N.isLine) {
20624
20624
  let Pe = O.linewidth;
@@ -20630,25 +20630,25 @@ class Fm {
20630
20630
  else if (Ye.get("WEBGL_multi_draw"))
20631
20631
  at.renderMultiDraw(N._multiDrawStarts, N._multiDrawCounts, N._multiDrawCount);
20632
20632
  else {
20633
- const Pe = N._multiDrawStarts, Qe = N._multiDrawCounts, Ke = N._multiDrawCount, Nt = Me ? W.get(Me).bytesPerElement : 1, $n = g.get(O).currentProgram.getUniforms();
20633
+ const Pe = N._multiDrawStarts, Qe = N._multiDrawCounts, Ke = N._multiDrawCount, Nt = Se ? W.get(Se).bytesPerElement : 1, $n = g.get(O).currentProgram.getUniforms();
20634
20634
  for (let Ft = 0; Ft < Ke; Ft++)
20635
20635
  $n.setValue(w, "_gl_DrawID", Ft), at.render(Pe[Ft] / Nt, Qe[Ft]);
20636
20636
  }
20637
20637
  else if (N.isInstancedMesh)
20638
20638
  at.renderInstances(We, ht, N.count);
20639
- else if (V.isInstancedBufferGeometry) {
20640
- const Pe = V._maxInstanceCount !== void 0 ? V._maxInstanceCount : 1 / 0, Qe = Math.min(V.instanceCount, Pe);
20639
+ else if (k.isInstancedBufferGeometry) {
20640
+ const Pe = k._maxInstanceCount !== void 0 ? k._maxInstanceCount : 1 / 0, Qe = Math.min(k.instanceCount, Pe);
20641
20641
  at.renderInstances(We, ht, Qe);
20642
20642
  } else
20643
20643
  at.render(We, ht);
20644
20644
  };
20645
- function Fa(v, I, V) {
20646
- v.transparent === !0 && v.side === fn && v.forceSinglePass === !1 ? (v.side = It, v.needsUpdate = !0, qi(v, I, V), v.side = Dn, v.needsUpdate = !0, qi(v, I, V), v.side = fn) : qi(v, I, V);
20645
+ function Fa(v, I, k) {
20646
+ v.transparent === !0 && v.side === fn && v.forceSinglePass === !1 ? (v.side = It, v.needsUpdate = !0, qi(v, I, k), v.side = Dn, v.needsUpdate = !0, qi(v, I, k), v.side = fn) : qi(v, I, k);
20647
20647
  }
20648
- this.compile = function(v, I, V = null) {
20649
- V === null && (V = v), A = ce.get(V), A.init(I), C.push(A), V.traverseVisible(function(N) {
20648
+ this.compile = function(v, I, k = null) {
20649
+ k === null && (k = v), A = ce.get(k), A.init(I), C.push(A), k.traverseVisible(function(N) {
20650
20650
  N.isLight && N.layers.test(I.layers) && (A.pushLight(N), N.castShadow && A.pushShadow(N));
20651
- }), v !== V && v.traverseVisible(function(N) {
20651
+ }), v !== k && v.traverseVisible(function(N) {
20652
20652
  N.isLight && N.layers.test(I.layers) && (A.pushLight(N), N.castShadow && A.pushShadow(N));
20653
20653
  }), A.setupLights();
20654
20654
  const O = /* @__PURE__ */ new Set();
@@ -20660,13 +20660,13 @@ class Fm {
20660
20660
  if (Array.isArray(ue))
20661
20661
  for (let _e = 0; _e < ue.length; _e++) {
20662
20662
  const fe = ue[_e];
20663
- Fa(fe, V, N), O.add(fe);
20663
+ Fa(fe, k, N), O.add(fe);
20664
20664
  }
20665
20665
  else
20666
- Fa(ue, V, N), O.add(ue);
20666
+ Fa(ue, k, N), O.add(ue);
20667
20667
  }), A = C.pop(), O;
20668
- }, this.compileAsync = function(v, I, V = null) {
20669
- const O = this.compile(v, I, V);
20668
+ }, this.compileAsync = function(v, I, k = null) {
20669
+ const O = this.compile(v, I, k);
20670
20670
  return new Promise((N) => {
20671
20671
  function ue() {
20672
20672
  if (O.forEach(function(_e) {
@@ -20698,38 +20698,38 @@ class Fm {
20698
20698
  qe("WebGLRenderer.render: camera is not an instance of THREE.Camera.");
20699
20699
  return;
20700
20700
  }
20701
- if (S === !0) return;
20702
- const V = ae.enabled === !0 && ae.isPresenting === !0, O = F !== null && (B === null || V) && F.begin(M, B);
20703
- if (v.matrixWorldAutoUpdate === !0 && v.updateMatrixWorld(), I.parent === null && I.matrixWorldAutoUpdate === !0 && I.updateMatrixWorld(), ae.enabled === !0 && ae.isPresenting === !0 && (F === null || F.isCompositing() === !1) && (ae.cameraAutoUpdate === !0 && ae.updateCamera(I), I = ae.getCamera()), v.isScene === !0 && v.onBeforeRender(M, v, I, B), A = ce.get(v, C.length), A.init(I), C.push(A), ve.multiplyMatrices(I.projectionMatrix, I.matrixWorldInverse), ze.setFromProjectionMatrix(ve, tn, I.reversedDepth), me = this.localClippingEnabled, Z = Se.init(this.clippingPlanes, me), y = ee.get(v, R.length), y.init(), R.push(y), ae.enabled === !0 && ae.isPresenting === !0) {
20704
- const _e = M.xr.getDepthSensingMesh();
20705
- _e !== null && Xr(_e, I, -1 / 0, M.sortObjects);
20701
+ if (M === !0) return;
20702
+ const k = ae.enabled === !0 && ae.isPresenting === !0, O = F !== null && (B === null || k) && F.begin(S, B);
20703
+ if (v.matrixWorldAutoUpdate === !0 && v.updateMatrixWorld(), I.parent === null && I.matrixWorldAutoUpdate === !0 && I.updateMatrixWorld(), ae.enabled === !0 && ae.isPresenting === !0 && (F === null || F.isCompositing() === !1) && (ae.cameraAutoUpdate === !0 && ae.updateCamera(I), I = ae.getCamera()), v.isScene === !0 && v.onBeforeRender(S, v, I, B), A = ce.get(v, C.length), A.init(I), C.push(A), ve.multiplyMatrices(I.projectionMatrix, I.matrixWorldInverse), ze.setFromProjectionMatrix(ve, tn, I.reversedDepth), me = this.localClippingEnabled, Z = Me.init(this.clippingPlanes, me), y = ee.get(v, R.length), y.init(), R.push(y), ae.enabled === !0 && ae.isPresenting === !0) {
20704
+ const _e = S.xr.getDepthSensingMesh();
20705
+ _e !== null && Xr(_e, I, -1 / 0, S.sortObjects);
20706
20706
  }
20707
- Xr(v, I, 0, M.sortObjects), y.finish(), M.sortObjects === !0 && y.sort(ke, tt), De = ae.enabled === !1 || ae.isPresenting === !1 || ae.hasDepthSensing() === !1, De && le.addToRenderList(y, v), this.info.render.frame++, Z === !0 && Se.beginShadows();
20707
+ Xr(v, I, 0, S.sortObjects), y.finish(), S.sortObjects === !0 && y.sort(Ve, tt), De = ae.enabled === !1 || ae.isPresenting === !1 || ae.hasDepthSensing() === !1, De && le.addToRenderList(y, v), this.info.render.frame++, Z === !0 && Me.beginShadows();
20708
20708
  const N = A.state.shadowsArray;
20709
- if (be.render(N, v, I), Z === !0 && Se.endShadows(), this.info.autoReset === !0 && this.info.reset(), (O && F.hasRenderPass()) === !1) {
20709
+ if (be.render(N, v, I), Z === !0 && Me.endShadows(), this.info.autoReset === !0 && this.info.reset(), (O && F.hasRenderPass()) === !1) {
20710
20710
  const _e = y.opaque, fe = y.transmissive;
20711
20711
  if (A.setupLights(), I.isArrayCamera) {
20712
- const Me = I.cameras;
20712
+ const Se = I.cameras;
20713
20713
  if (fe.length > 0)
20714
- for (let Ae = 0, Ie = Me.length; Ae < Ie; Ae++) {
20715
- const Ce = Me[Ae];
20716
- Va(_e, fe, v, Ce);
20714
+ for (let Ae = 0, Ie = Se.length; Ae < Ie; Ae++) {
20715
+ const Ce = Se[Ae];
20716
+ ka(_e, fe, v, Ce);
20717
20717
  }
20718
20718
  De && le.render(v);
20719
- for (let Ae = 0, Ie = Me.length; Ae < Ie; Ae++) {
20720
- const Ce = Me[Ae];
20719
+ for (let Ae = 0, Ie = Se.length; Ae < Ie; Ae++) {
20720
+ const Ce = Se[Ae];
20721
20721
  za(y, v, Ce, Ce.viewport);
20722
20722
  }
20723
20723
  } else
20724
- fe.length > 0 && Va(_e, fe, v, I), De && le.render(v), za(y, v, I);
20724
+ fe.length > 0 && ka(_e, fe, v, I), De && le.render(v), za(y, v, I);
20725
20725
  }
20726
- B !== null && z === 0 && (L.updateMultisampleRenderTarget(B), L.updateRenderTargetMipmap(B)), O && F.end(M), v.isScene === !0 && v.onAfterRender(M, v, I), ge.resetDefaultState(), G = -1, X = null, C.pop(), C.length > 0 ? (A = C[C.length - 1], Z === !0 && Se.setGlobalState(M.clippingPlanes, A.state.camera)) : A = null, R.pop(), R.length > 0 ? y = R[R.length - 1] : y = null;
20726
+ B !== null && z === 0 && (L.updateMultisampleRenderTarget(B), L.updateRenderTargetMipmap(B)), O && F.end(S), v.isScene === !0 && v.onAfterRender(S, v, I), ge.resetDefaultState(), G = -1, X = null, C.pop(), C.length > 0 ? (A = C[C.length - 1], Z === !0 && Me.setGlobalState(S.clippingPlanes, A.state.camera)) : A = null, R.pop(), R.length > 0 ? y = R[R.length - 1] : y = null;
20727
20727
  };
20728
- function Xr(v, I, V, O) {
20728
+ function Xr(v, I, k, O) {
20729
20729
  if (v.visible === !1) return;
20730
20730
  if (v.layers.test(I.layers)) {
20731
20731
  if (v.isGroup)
20732
- V = v.renderOrder;
20732
+ k = v.renderOrder;
20733
20733
  else if (v.isLOD)
20734
20734
  v.autoUpdate === !0 && v.update(I);
20735
20735
  else if (v.isLight)
@@ -20738,29 +20738,29 @@ class Fm {
20738
20738
  if (!v.frustumCulled || ze.intersectsSprite(v)) {
20739
20739
  O && Re.setFromMatrixPosition(v.matrixWorld).applyMatrix4(ve);
20740
20740
  const _e = oe.update(v), fe = v.material;
20741
- fe.visible && y.push(v, _e, fe, V, Re.z, null);
20741
+ fe.visible && y.push(v, _e, fe, k, Re.z, null);
20742
20742
  }
20743
20743
  } else if ((v.isMesh || v.isLine || v.isPoints) && (!v.frustumCulled || ze.intersectsObject(v))) {
20744
20744
  const _e = oe.update(v), fe = v.material;
20745
20745
  if (O && (v.boundingSphere !== void 0 ? (v.boundingSphere === null && v.computeBoundingSphere(), Re.copy(v.boundingSphere.center)) : (_e.boundingSphere === null && _e.computeBoundingSphere(), Re.copy(_e.boundingSphere.center)), Re.applyMatrix4(v.matrixWorld).applyMatrix4(ve)), Array.isArray(fe)) {
20746
- const Me = _e.groups;
20747
- for (let Ae = 0, Ie = Me.length; Ae < Ie; Ae++) {
20748
- const Ce = Me[Ae], We = fe[Ce.materialIndex];
20749
- We && We.visible && y.push(v, _e, We, V, Re.z, Ce);
20746
+ const Se = _e.groups;
20747
+ for (let Ae = 0, Ie = Se.length; Ae < Ie; Ae++) {
20748
+ const Ce = Se[Ae], We = fe[Ce.materialIndex];
20749
+ We && We.visible && y.push(v, _e, We, k, Re.z, Ce);
20750
20750
  }
20751
- } else fe.visible && y.push(v, _e, fe, V, Re.z, null);
20751
+ } else fe.visible && y.push(v, _e, fe, k, Re.z, null);
20752
20752
  }
20753
20753
  }
20754
20754
  const ue = v.children;
20755
20755
  for (let _e = 0, fe = ue.length; _e < fe; _e++)
20756
- Xr(ue[_e], I, V, O);
20756
+ Xr(ue[_e], I, k, O);
20757
20757
  }
20758
- function za(v, I, V, O) {
20758
+ function za(v, I, k, O) {
20759
20759
  const { opaque: N, transmissive: ue, transparent: _e } = v;
20760
- A.setupLightsView(V), Z === !0 && Se.setGlobalState(M.clippingPlanes, V), O && Ee.viewport(k.copy(O)), N.length > 0 && Xi(N, I, V), ue.length > 0 && Xi(ue, I, V), _e.length > 0 && Xi(_e, I, V), Ee.buffers.depth.setTest(!0), Ee.buffers.depth.setMask(!0), Ee.buffers.color.setMask(!0), Ee.setPolygonOffset(!1);
20760
+ A.setupLightsView(k), Z === !0 && Me.setGlobalState(S.clippingPlanes, k), O && Ee.viewport(V.copy(O)), N.length > 0 && Xi(N, I, k), ue.length > 0 && Xi(ue, I, k), _e.length > 0 && Xi(_e, I, k), Ee.buffers.depth.setTest(!0), Ee.buffers.depth.setMask(!0), Ee.buffers.color.setMask(!0), Ee.setPolygonOffset(!1);
20761
20761
  }
20762
- function Va(v, I, V, O) {
20763
- if ((V.isScene === !0 ? V.overrideMaterial : null) !== null)
20762
+ function ka(v, I, k, O) {
20763
+ if ((k.isScene === !0 ? k.overrideMaterial : null) !== null)
20764
20764
  return;
20765
20765
  if (A.state.transmissionRenderTarget[O.id] === void 0) {
20766
20766
  const We = Ye.has("EXT_color_buffer_half_float") || Ye.has("EXT_color_buffer_float");
@@ -20775,50 +20775,50 @@ class Fm {
20775
20775
  colorSpace: $e.workingColorSpace
20776
20776
  });
20777
20777
  }
20778
- const ue = A.state.transmissionRenderTarget[O.id], _e = O.viewport || k;
20779
- ue.setSize(_e.z * M.transmissionResolutionScale, _e.w * M.transmissionResolutionScale);
20780
- const fe = M.getRenderTarget(), Me = M.getActiveCubeFace(), Ae = M.getActiveMipmapLevel();
20781
- M.setRenderTarget(ue), M.getClearColor(ie), se = M.getClearAlpha(), se < 1 && M.setClearColor(16777215, 0.5), M.clear(), De && le.render(V);
20782
- const Ie = M.toneMapping;
20783
- M.toneMapping = nn;
20778
+ const ue = A.state.transmissionRenderTarget[O.id], _e = O.viewport || V;
20779
+ ue.setSize(_e.z * S.transmissionResolutionScale, _e.w * S.transmissionResolutionScale);
20780
+ const fe = S.getRenderTarget(), Se = S.getActiveCubeFace(), Ae = S.getActiveMipmapLevel();
20781
+ S.setRenderTarget(ue), S.getClearColor(ie), se = S.getClearAlpha(), se < 1 && S.setClearColor(16777215, 0.5), S.clear(), De && le.render(k);
20782
+ const Ie = S.toneMapping;
20783
+ S.toneMapping = nn;
20784
20784
  const Ce = O.viewport;
20785
- if (O.viewport !== void 0 && (O.viewport = void 0), A.setupLightsView(O), Z === !0 && Se.setGlobalState(M.clippingPlanes, O), Xi(v, V, O), L.updateMultisampleRenderTarget(ue), L.updateRenderTargetMipmap(ue), Ye.has("WEBGL_multisampled_render_to_texture") === !1) {
20785
+ if (O.viewport !== void 0 && (O.viewport = void 0), A.setupLightsView(O), Z === !0 && Me.setGlobalState(S.clippingPlanes, O), Xi(v, k, O), L.updateMultisampleRenderTarget(ue), L.updateRenderTargetMipmap(ue), Ye.has("WEBGL_multisampled_render_to_texture") === !1) {
20786
20786
  let We = !1;
20787
20787
  for (let it = 0, ht = I.length; it < ht; it++) {
20788
20788
  const dt = I[it], { object: at, geometry: Pe, material: Qe, group: Ke } = dt;
20789
20789
  if (Qe.side === fn && at.layers.test(O.layers)) {
20790
20790
  const Nt = Qe.side;
20791
- Qe.side = It, Qe.needsUpdate = !0, ka(at, V, O, Pe, Qe, Ke), Qe.side = Nt, Qe.needsUpdate = !0, We = !0;
20791
+ Qe.side = It, Qe.needsUpdate = !0, Va(at, k, O, Pe, Qe, Ke), Qe.side = Nt, Qe.needsUpdate = !0, We = !0;
20792
20792
  }
20793
20793
  }
20794
20794
  We === !0 && (L.updateMultisampleRenderTarget(ue), L.updateRenderTargetMipmap(ue));
20795
20795
  }
20796
- M.setRenderTarget(fe, Me, Ae), M.setClearColor(ie, se), Ce !== void 0 && (O.viewport = Ce), M.toneMapping = Ie;
20796
+ S.setRenderTarget(fe, Se, Ae), S.setClearColor(ie, se), Ce !== void 0 && (O.viewport = Ce), S.toneMapping = Ie;
20797
20797
  }
20798
- function Xi(v, I, V) {
20798
+ function Xi(v, I, k) {
20799
20799
  const O = I.isScene === !0 ? I.overrideMaterial : null;
20800
20800
  for (let N = 0, ue = v.length; N < ue; N++) {
20801
- const _e = v[N], { object: fe, geometry: Me, group: Ae } = _e;
20801
+ const _e = v[N], { object: fe, geometry: Se, group: Ae } = _e;
20802
20802
  let Ie = _e.material;
20803
- Ie.allowOverride === !0 && O !== null && (Ie = O), fe.layers.test(V.layers) && ka(fe, I, V, Me, Ie, Ae);
20803
+ Ie.allowOverride === !0 && O !== null && (Ie = O), fe.layers.test(k.layers) && Va(fe, I, k, Se, Ie, Ae);
20804
20804
  }
20805
20805
  }
20806
- function ka(v, I, V, O, N, ue) {
20807
- v.onBeforeRender(M, I, V, O, N, ue), v.modelViewMatrix.multiplyMatrices(V.matrixWorldInverse, v.matrixWorld), v.normalMatrix.getNormalMatrix(v.modelViewMatrix), N.onBeforeRender(M, I, V, O, v, ue), N.transparent === !0 && N.side === fn && N.forceSinglePass === !1 ? (N.side = It, N.needsUpdate = !0, M.renderBufferDirect(V, I, O, N, v, ue), N.side = Dn, N.needsUpdate = !0, M.renderBufferDirect(V, I, O, N, v, ue), N.side = fn) : M.renderBufferDirect(V, I, O, N, v, ue), v.onAfterRender(M, I, V, O, N, ue);
20806
+ function Va(v, I, k, O, N, ue) {
20807
+ v.onBeforeRender(S, I, k, O, N, ue), v.modelViewMatrix.multiplyMatrices(k.matrixWorldInverse, v.matrixWorld), v.normalMatrix.getNormalMatrix(v.modelViewMatrix), N.onBeforeRender(S, I, k, O, v, ue), N.transparent === !0 && N.side === fn && N.forceSinglePass === !1 ? (N.side = It, N.needsUpdate = !0, S.renderBufferDirect(k, I, O, N, v, ue), N.side = Dn, N.needsUpdate = !0, S.renderBufferDirect(k, I, O, N, v, ue), N.side = fn) : S.renderBufferDirect(k, I, O, N, v, ue), v.onAfterRender(S, I, k, O, N, ue);
20808
20808
  }
20809
- function qi(v, I, V) {
20809
+ function qi(v, I, k) {
20810
20810
  I.isScene !== !0 && (I = Oe);
20811
- const O = g.get(v), N = A.state.lights, ue = A.state.shadowsArray, _e = N.state.version, fe = ye.getParameters(v, N.state, ue, I, V), Me = ye.getProgramCacheKey(fe);
20811
+ const O = g.get(v), N = A.state.lights, ue = A.state.shadowsArray, _e = N.state.version, fe = ye.getParameters(v, N.state, ue, I, k), Se = ye.getProgramCacheKey(fe);
20812
20812
  let Ae = O.programs;
20813
20813
  O.environment = v.isMeshStandardMaterial ? I.environment : null, O.fog = I.fog, O.envMap = (v.isMeshStandardMaterial ? K : Y).get(v.envMap || O.environment), O.envMapRotation = O.environment !== null && v.envMap === null ? I.environmentRotation : v.envMapRotation, Ae === void 0 && (v.addEventListener("dispose", jt), Ae = /* @__PURE__ */ new Map(), O.programs = Ae);
20814
- let Ie = Ae.get(Me);
20814
+ let Ie = Ae.get(Se);
20815
20815
  if (Ie !== void 0) {
20816
20816
  if (O.currentProgram === Ie && O.lightsStateVersion === _e)
20817
20817
  return Ga(v, fe), Ie;
20818
20818
  } else
20819
- fe.uniforms = ye.getUniforms(v), v.onBeforeCompile(fe, M), Ie = ye.acquireProgram(fe, Me), Ae.set(Me, Ie), O.uniforms = fe.uniforms;
20819
+ fe.uniforms = ye.getUniforms(v), v.onBeforeCompile(fe, S), Ie = ye.acquireProgram(fe, Se), Ae.set(Se, Ie), O.uniforms = fe.uniforms;
20820
20820
  const Ce = O.uniforms;
20821
- return (!v.isShaderMaterial && !v.isRawShaderMaterial || v.clipping === !0) && (Ce.clippingPlanes = Se.uniform), Ga(v, fe), O.needsLights = Kl(v), O.lightsStateVersion = _e, O.needsLights && (Ce.ambientLightColor.value = N.state.ambient, Ce.lightProbe.value = N.state.probe, Ce.directionalLights.value = N.state.directional, Ce.directionalLightShadows.value = N.state.directionalShadow, Ce.spotLights.value = N.state.spot, Ce.spotLightShadows.value = N.state.spotShadow, Ce.rectAreaLights.value = N.state.rectArea, Ce.ltc_1.value = N.state.rectAreaLTC1, Ce.ltc_2.value = N.state.rectAreaLTC2, Ce.pointLights.value = N.state.point, Ce.pointLightShadows.value = N.state.pointShadow, Ce.hemisphereLights.value = N.state.hemi, Ce.directionalShadowMap.value = N.state.directionalShadowMap, Ce.directionalShadowMatrix.value = N.state.directionalShadowMatrix, Ce.spotShadowMap.value = N.state.spotShadowMap, Ce.spotLightMatrix.value = N.state.spotLightMatrix, Ce.spotLightMap.value = N.state.spotLightMap, Ce.pointShadowMap.value = N.state.pointShadowMap, Ce.pointShadowMatrix.value = N.state.pointShadowMatrix), O.currentProgram = Ie, O.uniformsList = null, Ie;
20821
+ return (!v.isShaderMaterial && !v.isRawShaderMaterial || v.clipping === !0) && (Ce.clippingPlanes = Me.uniform), Ga(v, fe), O.needsLights = Kl(v), O.lightsStateVersion = _e, O.needsLights && (Ce.ambientLightColor.value = N.state.ambient, Ce.lightProbe.value = N.state.probe, Ce.directionalLights.value = N.state.directional, Ce.directionalLightShadows.value = N.state.directionalShadow, Ce.spotLights.value = N.state.spot, Ce.spotLightShadows.value = N.state.spotShadow, Ce.rectAreaLights.value = N.state.rectArea, Ce.ltc_1.value = N.state.rectAreaLTC1, Ce.ltc_2.value = N.state.rectAreaLTC2, Ce.pointLights.value = N.state.point, Ce.pointLightShadows.value = N.state.pointShadow, Ce.hemisphereLights.value = N.state.hemi, Ce.directionalShadowMap.value = N.state.directionalShadowMap, Ce.directionalShadowMatrix.value = N.state.directionalShadowMatrix, Ce.spotShadowMap.value = N.state.spotShadowMap, Ce.spotLightMatrix.value = N.state.spotLightMatrix, Ce.spotLightMap.value = N.state.spotLightMap, Ce.pointShadowMap.value = N.state.pointShadowMap, Ce.pointShadowMatrix.value = N.state.pointShadowMatrix), O.currentProgram = Ie, O.uniformsList = null, Ie;
20822
20822
  }
20823
20823
  function Ha(v) {
20824
20824
  if (v.uniformsList === null) {
@@ -20828,21 +20828,21 @@ class Fm {
20828
20828
  return v.uniformsList;
20829
20829
  }
20830
20830
  function Ga(v, I) {
20831
- const V = g.get(v);
20832
- V.outputColorSpace = I.outputColorSpace, V.batching = I.batching, V.batchingColor = I.batchingColor, V.instancing = I.instancing, V.instancingColor = I.instancingColor, V.instancingMorph = I.instancingMorph, V.skinning = I.skinning, V.morphTargets = I.morphTargets, V.morphNormals = I.morphNormals, V.morphColors = I.morphColors, V.morphTargetsCount = I.morphTargetsCount, V.numClippingPlanes = I.numClippingPlanes, V.numIntersection = I.numClipIntersection, V.vertexAlphas = I.vertexAlphas, V.vertexTangents = I.vertexTangents, V.toneMapping = I.toneMapping;
20831
+ const k = g.get(v);
20832
+ k.outputColorSpace = I.outputColorSpace, k.batching = I.batching, k.batchingColor = I.batchingColor, k.instancing = I.instancing, k.instancingColor = I.instancingColor, k.instancingMorph = I.instancingMorph, k.skinning = I.skinning, k.morphTargets = I.morphTargets, k.morphNormals = I.morphNormals, k.morphColors = I.morphColors, k.morphTargetsCount = I.morphTargetsCount, k.numClippingPlanes = I.numClippingPlanes, k.numIntersection = I.numClipIntersection, k.vertexAlphas = I.vertexAlphas, k.vertexTangents = I.vertexTangents, k.toneMapping = I.toneMapping;
20833
20833
  }
20834
- function Zl(v, I, V, O, N) {
20834
+ function Zl(v, I, k, O, N) {
20835
20835
  I.isScene !== !0 && (I = Oe), L.resetTextureUnits();
20836
- const ue = I.fog, _e = O.isMeshStandardMaterial ? I.environment : null, fe = B === null ? M.outputColorSpace : B.isXRRenderTarget === !0 ? B.texture.colorSpace : Mi, Me = (O.isMeshStandardMaterial ? K : Y).get(O.envMap || _e), Ae = O.vertexColors === !0 && !!V.attributes.color && V.attributes.color.itemSize === 4, Ie = !!V.attributes.tangent && (!!O.normalMap || O.anisotropy > 0), Ce = !!V.morphAttributes.position, We = !!V.morphAttributes.normal, it = !!V.morphAttributes.color;
20836
+ const ue = I.fog, _e = O.isMeshStandardMaterial ? I.environment : null, fe = B === null ? S.outputColorSpace : B.isXRRenderTarget === !0 ? B.texture.colorSpace : Si, Se = (O.isMeshStandardMaterial ? K : Y).get(O.envMap || _e), Ae = O.vertexColors === !0 && !!k.attributes.color && k.attributes.color.itemSize === 4, Ie = !!k.attributes.tangent && (!!O.normalMap || O.anisotropy > 0), Ce = !!k.morphAttributes.position, We = !!k.morphAttributes.normal, it = !!k.morphAttributes.color;
20837
20837
  let ht = nn;
20838
- O.toneMapped && (B === null || B.isXRRenderTarget === !0) && (ht = M.toneMapping);
20839
- const dt = V.morphAttributes.position || V.morphAttributes.normal || V.morphAttributes.color, at = dt !== void 0 ? dt.length : 0, Pe = g.get(O), Qe = A.state.lights;
20838
+ O.toneMapped && (B === null || B.isXRRenderTarget === !0) && (ht = S.toneMapping);
20839
+ const dt = k.morphAttributes.position || k.morphAttributes.normal || k.morphAttributes.color, at = dt !== void 0 ? dt.length : 0, Pe = g.get(O), Qe = A.state.lights;
20840
20840
  if (Z === !0 && (me === !0 || v !== X)) {
20841
20841
  const wt = v === X && O.id === G;
20842
- Se.setState(O, v, wt);
20842
+ Me.setState(O, v, wt);
20843
20843
  }
20844
20844
  let Ke = !1;
20845
- O.version === Pe.__version ? (Pe.needsLights && Pe.lightsStateVersion !== Qe.state.version || Pe.outputColorSpace !== fe || N.isBatchedMesh && Pe.batching === !1 || !N.isBatchedMesh && Pe.batching === !0 || N.isBatchedMesh && Pe.batchingColor === !0 && N.colorTexture === null || N.isBatchedMesh && Pe.batchingColor === !1 && N.colorTexture !== null || N.isInstancedMesh && Pe.instancing === !1 || !N.isInstancedMesh && Pe.instancing === !0 || N.isSkinnedMesh && Pe.skinning === !1 || !N.isSkinnedMesh && Pe.skinning === !0 || N.isInstancedMesh && Pe.instancingColor === !0 && N.instanceColor === null || N.isInstancedMesh && Pe.instancingColor === !1 && N.instanceColor !== null || N.isInstancedMesh && Pe.instancingMorph === !0 && N.morphTexture === null || N.isInstancedMesh && Pe.instancingMorph === !1 && N.morphTexture !== null || Pe.envMap !== Me || O.fog === !0 && Pe.fog !== ue || Pe.numClippingPlanes !== void 0 && (Pe.numClippingPlanes !== Se.numPlanes || Pe.numIntersection !== Se.numIntersection) || Pe.vertexAlphas !== Ae || Pe.vertexTangents !== Ie || Pe.morphTargets !== Ce || Pe.morphNormals !== We || Pe.morphColors !== it || Pe.toneMapping !== ht || Pe.morphTargetsCount !== at) && (Ke = !0) : (Ke = !0, Pe.__version = O.version);
20845
+ O.version === Pe.__version ? (Pe.needsLights && Pe.lightsStateVersion !== Qe.state.version || Pe.outputColorSpace !== fe || N.isBatchedMesh && Pe.batching === !1 || !N.isBatchedMesh && Pe.batching === !0 || N.isBatchedMesh && Pe.batchingColor === !0 && N.colorTexture === null || N.isBatchedMesh && Pe.batchingColor === !1 && N.colorTexture !== null || N.isInstancedMesh && Pe.instancing === !1 || !N.isInstancedMesh && Pe.instancing === !0 || N.isSkinnedMesh && Pe.skinning === !1 || !N.isSkinnedMesh && Pe.skinning === !0 || N.isInstancedMesh && Pe.instancingColor === !0 && N.instanceColor === null || N.isInstancedMesh && Pe.instancingColor === !1 && N.instanceColor !== null || N.isInstancedMesh && Pe.instancingMorph === !0 && N.morphTexture === null || N.isInstancedMesh && Pe.instancingMorph === !1 && N.morphTexture !== null || Pe.envMap !== Se || O.fog === !0 && Pe.fog !== ue || Pe.numClippingPlanes !== void 0 && (Pe.numClippingPlanes !== Me.numPlanes || Pe.numIntersection !== Me.numIntersection) || Pe.vertexAlphas !== Ae || Pe.vertexTangents !== Ie || Pe.morphTargets !== Ce || Pe.morphNormals !== We || Pe.morphColors !== it || Pe.toneMapping !== ht || Pe.morphTargetsCount !== at) && (Ke = !0) : (Ke = !0, Pe.__version = O.version);
20846
20846
  let Nt = Pe.currentProgram;
20847
20847
  Ke === !0 && (Nt = qi(O, I, N));
20848
20848
  let $n = !1, Ft = !1, Ei = !1;
@@ -20862,8 +20862,8 @@ class Fm {
20862
20862
  wt && (wt.boneTexture === null && wt.computeBoneTexture(), lt.setValue(w, "boneTexture", wt.boneTexture, L));
20863
20863
  }
20864
20864
  N.isBatchedMesh && (lt.setOptional(w, N, "batchingTexture"), lt.setValue(w, "batchingTexture", N._matricesTexture, L), lt.setOptional(w, N, "batchingIdTexture"), lt.setValue(w, "batchingIdTexture", N._indirectTexture, L), lt.setOptional(w, N, "batchingColorTexture"), N._colorsTexture !== null && lt.setValue(w, "batchingColorTexture", N._colorsTexture, L));
20865
- const Vt = V.morphAttributes;
20866
- if ((Vt.position !== void 0 || Vt.normal !== void 0 || Vt.color !== void 0) && Ge.update(N, V, Nt), (Ft || Pe.receiveShadow !== N.receiveShadow) && (Pe.receiveShadow = N.receiveShadow, lt.setValue(w, "receiveShadow", N.receiveShadow)), O.isMeshGouraudMaterial && O.envMap !== null && (Pt.envMap.value = Me, Pt.flipEnvMap.value = Me.isCubeTexture && Me.isRenderTargetTexture === !1 ? -1 : 1), O.isMeshStandardMaterial && O.envMap === null && I.environment !== null && (Pt.envMapIntensity.value = I.environmentIntensity), Pt.dfgLUT !== void 0 && (Pt.dfgLUT.value = Nm()), Ft && (lt.setValue(w, "toneMappingExposure", M.toneMappingExposure), Pe.needsLights && jl(Pt, Ei), ue && O.fog === !0 && Ue.refreshFogUniforms(Pt, ue), Ue.refreshMaterialUniforms(Pt, O, we, Le, A.state.transmissionRenderTarget[v.id]), Pr.upload(w, Ha(Pe), Pt, L)), O.isShaderMaterial && O.uniformsNeedUpdate === !0 && (Pr.upload(w, Ha(Pe), Pt, L), O.uniformsNeedUpdate = !1), O.isSpriteMaterial && lt.setValue(w, "center", N.center), lt.setValue(w, "modelViewMatrix", N.modelViewMatrix), lt.setValue(w, "normalMatrix", N.normalMatrix), lt.setValue(w, "modelMatrix", N.matrixWorld), O.isShaderMaterial || O.isRawShaderMaterial) {
20865
+ const kt = k.morphAttributes;
20866
+ if ((kt.position !== void 0 || kt.normal !== void 0 || kt.color !== void 0) && Ge.update(N, k, Nt), (Ft || Pe.receiveShadow !== N.receiveShadow) && (Pe.receiveShadow = N.receiveShadow, lt.setValue(w, "receiveShadow", N.receiveShadow)), O.isMeshGouraudMaterial && O.envMap !== null && (Pt.envMap.value = Se, Pt.flipEnvMap.value = Se.isCubeTexture && Se.isRenderTargetTexture === !1 ? -1 : 1), O.isMeshStandardMaterial && O.envMap === null && I.environment !== null && (Pt.envMapIntensity.value = I.environmentIntensity), Pt.dfgLUT !== void 0 && (Pt.dfgLUT.value = Nm()), Ft && (lt.setValue(w, "toneMappingExposure", S.toneMappingExposure), Pe.needsLights && jl(Pt, Ei), ue && O.fog === !0 && Ue.refreshFogUniforms(Pt, ue), Ue.refreshMaterialUniforms(Pt, O, we, Le, A.state.transmissionRenderTarget[v.id]), Pr.upload(w, Ha(Pe), Pt, L)), O.isShaderMaterial && O.uniformsNeedUpdate === !0 && (Pr.upload(w, Ha(Pe), Pt, L), O.uniformsNeedUpdate = !1), O.isSpriteMaterial && lt.setValue(w, "center", N.center), lt.setValue(w, "modelViewMatrix", N.modelViewMatrix), lt.setValue(w, "normalMatrix", N.normalMatrix), lt.setValue(w, "modelMatrix", N.matrixWorld), O.isShaderMaterial || O.isRawShaderMaterial) {
20867
20867
  const wt = O.uniformsGroups;
20868
20868
  for (let Dt = 0, qr = wt.length; Dt < qr; Dt++) {
20869
20869
  const In = wt[Dt];
@@ -20884,21 +20884,21 @@ class Fm {
20884
20884
  return z;
20885
20885
  }, this.getRenderTarget = function() {
20886
20886
  return B;
20887
- }, this.setRenderTargetTextures = function(v, I, V) {
20887
+ }, this.setRenderTargetTextures = function(v, I, k) {
20888
20888
  const O = g.get(v);
20889
- O.__autoAllocateDepthBuffer = v.resolveDepthBuffer === !1, O.__autoAllocateDepthBuffer === !1 && (O.__useRenderToTexture = !1), g.get(v.texture).__webglTexture = I, g.get(v.depthTexture).__webglTexture = O.__autoAllocateDepthBuffer ? void 0 : V, O.__hasExternalTextures = !0;
20889
+ O.__autoAllocateDepthBuffer = v.resolveDepthBuffer === !1, O.__autoAllocateDepthBuffer === !1 && (O.__useRenderToTexture = !1), g.get(v.texture).__webglTexture = I, g.get(v.depthTexture).__webglTexture = O.__autoAllocateDepthBuffer ? void 0 : k, O.__hasExternalTextures = !0;
20890
20890
  }, this.setRenderTargetFramebuffer = function(v, I) {
20891
- const V = g.get(v);
20892
- V.__webglFramebuffer = I, V.__useDefaultFramebuffer = I === void 0;
20891
+ const k = g.get(v);
20892
+ k.__webglFramebuffer = I, k.__useDefaultFramebuffer = I === void 0;
20893
20893
  };
20894
20894
  const Jl = w.createFramebuffer();
20895
- this.setRenderTarget = function(v, I = 0, V = 0) {
20896
- B = v, D = I, z = V;
20895
+ this.setRenderTarget = function(v, I = 0, k = 0) {
20896
+ B = v, D = I, z = k;
20897
20897
  let O = null, N = !1, ue = !1;
20898
20898
  if (v) {
20899
20899
  const fe = g.get(v);
20900
20900
  if (fe.__useDefaultFramebuffer !== void 0) {
20901
- Ee.bindFramebuffer(w.FRAMEBUFFER, fe.__webglFramebuffer), k.copy(v.viewport), H.copy(v.scissor), $ = v.scissorTest, Ee.viewport(k), Ee.scissor(H), Ee.setScissorTest($), G = -1;
20901
+ Ee.bindFramebuffer(w.FRAMEBUFFER, fe.__webglFramebuffer), V.copy(v.viewport), H.copy(v.scissor), $ = v.scissorTest, Ee.viewport(V), Ee.scissor(H), Ee.setScissorTest($), G = -1;
20902
20902
  return;
20903
20903
  } else if (fe.__webglFramebuffer === void 0)
20904
20904
  L.setupRenderTarget(v);
@@ -20912,34 +20912,34 @@ class Fm {
20912
20912
  L.setupDepthRenderbuffer(v);
20913
20913
  }
20914
20914
  }
20915
- const Me = v.texture;
20916
- (Me.isData3DTexture || Me.isDataArrayTexture || Me.isCompressedArrayTexture) && (ue = !0);
20915
+ const Se = v.texture;
20916
+ (Se.isData3DTexture || Se.isDataArrayTexture || Se.isCompressedArrayTexture) && (ue = !0);
20917
20917
  const Ae = g.get(v).__webglFramebuffer;
20918
- v.isWebGLCubeRenderTarget ? (Array.isArray(Ae[I]) ? O = Ae[I][V] : O = Ae[I], N = !0) : v.samples > 0 && L.useMultisampledRTT(v) === !1 ? O = g.get(v).__webglMultisampledFramebuffer : Array.isArray(Ae) ? O = Ae[V] : O = Ae, k.copy(v.viewport), H.copy(v.scissor), $ = v.scissorTest;
20918
+ v.isWebGLCubeRenderTarget ? (Array.isArray(Ae[I]) ? O = Ae[I][k] : O = Ae[I], N = !0) : v.samples > 0 && L.useMultisampledRTT(v) === !1 ? O = g.get(v).__webglMultisampledFramebuffer : Array.isArray(Ae) ? O = Ae[k] : O = Ae, V.copy(v.viewport), H.copy(v.scissor), $ = v.scissorTest;
20919
20919
  } else
20920
- k.copy(q).multiplyScalar(we).floor(), H.copy(J).multiplyScalar(we).floor(), $ = xe;
20921
- if (V !== 0 && (O = Jl), Ee.bindFramebuffer(w.FRAMEBUFFER, O) && Ee.drawBuffers(v, O), Ee.viewport(k), Ee.scissor(H), Ee.setScissorTest($), N) {
20920
+ V.copy(q).multiplyScalar(we).floor(), H.copy(J).multiplyScalar(we).floor(), $ = xe;
20921
+ if (k !== 0 && (O = Jl), Ee.bindFramebuffer(w.FRAMEBUFFER, O) && Ee.drawBuffers(v, O), Ee.viewport(V), Ee.scissor(H), Ee.setScissorTest($), N) {
20922
20922
  const fe = g.get(v.texture);
20923
- w.framebufferTexture2D(w.FRAMEBUFFER, w.COLOR_ATTACHMENT0, w.TEXTURE_CUBE_MAP_POSITIVE_X + I, fe.__webglTexture, V);
20923
+ w.framebufferTexture2D(w.FRAMEBUFFER, w.COLOR_ATTACHMENT0, w.TEXTURE_CUBE_MAP_POSITIVE_X + I, fe.__webglTexture, k);
20924
20924
  } else if (ue) {
20925
20925
  const fe = I;
20926
- for (let Me = 0; Me < v.textures.length; Me++) {
20927
- const Ae = g.get(v.textures[Me]);
20928
- w.framebufferTextureLayer(w.FRAMEBUFFER, w.COLOR_ATTACHMENT0 + Me, Ae.__webglTexture, V, fe);
20926
+ for (let Se = 0; Se < v.textures.length; Se++) {
20927
+ const Ae = g.get(v.textures[Se]);
20928
+ w.framebufferTextureLayer(w.FRAMEBUFFER, w.COLOR_ATTACHMENT0 + Se, Ae.__webglTexture, k, fe);
20929
20929
  }
20930
- } else if (v !== null && V !== 0) {
20930
+ } else if (v !== null && k !== 0) {
20931
20931
  const fe = g.get(v.texture);
20932
- w.framebufferTexture2D(w.FRAMEBUFFER, w.COLOR_ATTACHMENT0, w.TEXTURE_2D, fe.__webglTexture, V);
20932
+ w.framebufferTexture2D(w.FRAMEBUFFER, w.COLOR_ATTACHMENT0, w.TEXTURE_2D, fe.__webglTexture, k);
20933
20933
  }
20934
20934
  G = -1;
20935
- }, this.readRenderTargetPixels = function(v, I, V, O, N, ue, _e, fe = 0) {
20935
+ }, this.readRenderTargetPixels = function(v, I, k, O, N, ue, _e, fe = 0) {
20936
20936
  if (!(v && v.isWebGLRenderTarget)) {
20937
20937
  qe("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
20938
20938
  return;
20939
20939
  }
20940
- let Me = g.get(v).__webglFramebuffer;
20941
- if (v.isWebGLCubeRenderTarget && _e !== void 0 && (Me = Me[_e]), Me) {
20942
- Ee.bindFramebuffer(w.FRAMEBUFFER, Me);
20940
+ let Se = g.get(v).__webglFramebuffer;
20941
+ if (v.isWebGLCubeRenderTarget && _e !== void 0 && (Se = Se[_e]), Se) {
20942
+ Ee.bindFramebuffer(w.FRAMEBUFFER, Se);
20943
20943
  try {
20944
20944
  const Ae = v.textures[fe], Ie = Ae.format, Ce = Ae.type;
20945
20945
  if (!nt.textureFormatReadable(Ie)) {
@@ -20950,46 +20950,46 @@ class Fm {
20950
20950
  qe("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
20951
20951
  return;
20952
20952
  }
20953
- I >= 0 && I <= v.width - O && V >= 0 && V <= v.height - N && (v.textures.length > 1 && w.readBuffer(w.COLOR_ATTACHMENT0 + fe), w.readPixels(I, V, O, N, te.convert(Ie), te.convert(Ce), ue));
20953
+ I >= 0 && I <= v.width - O && k >= 0 && k <= v.height - N && (v.textures.length > 1 && w.readBuffer(w.COLOR_ATTACHMENT0 + fe), w.readPixels(I, k, O, N, te.convert(Ie), te.convert(Ce), ue));
20954
20954
  } finally {
20955
20955
  const Ae = B !== null ? g.get(B).__webglFramebuffer : null;
20956
20956
  Ee.bindFramebuffer(w.FRAMEBUFFER, Ae);
20957
20957
  }
20958
20958
  }
20959
- }, this.readRenderTargetPixelsAsync = async function(v, I, V, O, N, ue, _e, fe = 0) {
20959
+ }, this.readRenderTargetPixelsAsync = async function(v, I, k, O, N, ue, _e, fe = 0) {
20960
20960
  if (!(v && v.isWebGLRenderTarget))
20961
20961
  throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
20962
- let Me = g.get(v).__webglFramebuffer;
20963
- if (v.isWebGLCubeRenderTarget && _e !== void 0 && (Me = Me[_e]), Me)
20964
- if (I >= 0 && I <= v.width - O && V >= 0 && V <= v.height - N) {
20965
- Ee.bindFramebuffer(w.FRAMEBUFFER, Me);
20962
+ let Se = g.get(v).__webglFramebuffer;
20963
+ if (v.isWebGLCubeRenderTarget && _e !== void 0 && (Se = Se[_e]), Se)
20964
+ if (I >= 0 && I <= v.width - O && k >= 0 && k <= v.height - N) {
20965
+ Ee.bindFramebuffer(w.FRAMEBUFFER, Se);
20966
20966
  const Ae = v.textures[fe], Ie = Ae.format, Ce = Ae.type;
20967
20967
  if (!nt.textureFormatReadable(Ie))
20968
20968
  throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");
20969
20969
  if (!nt.textureTypeReadable(Ce))
20970
20970
  throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");
20971
20971
  const We = w.createBuffer();
20972
- w.bindBuffer(w.PIXEL_PACK_BUFFER, We), w.bufferData(w.PIXEL_PACK_BUFFER, ue.byteLength, w.STREAM_READ), v.textures.length > 1 && w.readBuffer(w.COLOR_ATTACHMENT0 + fe), w.readPixels(I, V, O, N, te.convert(Ie), te.convert(Ce), 0);
20972
+ w.bindBuffer(w.PIXEL_PACK_BUFFER, We), w.bufferData(w.PIXEL_PACK_BUFFER, ue.byteLength, w.STREAM_READ), v.textures.length > 1 && w.readBuffer(w.COLOR_ATTACHMENT0 + fe), w.readPixels(I, k, O, N, te.convert(Ie), te.convert(Ce), 0);
20973
20973
  const it = B !== null ? g.get(B).__webglFramebuffer : null;
20974
20974
  Ee.bindFramebuffer(w.FRAMEBUFFER, it);
20975
20975
  const ht = w.fenceSync(w.SYNC_GPU_COMMANDS_COMPLETE, 0);
20976
20976
  return w.flush(), await $c(w, ht, 4), w.bindBuffer(w.PIXEL_PACK_BUFFER, We), w.getBufferSubData(w.PIXEL_PACK_BUFFER, 0, ue), w.deleteBuffer(We), w.deleteSync(ht), ue;
20977
20977
  } else
20978
20978
  throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.");
20979
- }, this.copyFramebufferToTexture = function(v, I = null, V = 0) {
20980
- const O = Math.pow(2, -V), N = Math.floor(v.image.width * O), ue = Math.floor(v.image.height * O), _e = I !== null ? I.x : 0, fe = I !== null ? I.y : 0;
20981
- L.setTexture2D(v, 0), w.copyTexSubImage2D(w.TEXTURE_2D, V, 0, 0, _e, fe, N, ue), Ee.unbindTexture();
20979
+ }, this.copyFramebufferToTexture = function(v, I = null, k = 0) {
20980
+ const O = Math.pow(2, -k), N = Math.floor(v.image.width * O), ue = Math.floor(v.image.height * O), _e = I !== null ? I.x : 0, fe = I !== null ? I.y : 0;
20981
+ L.setTexture2D(v, 0), w.copyTexSubImage2D(w.TEXTURE_2D, k, 0, 0, _e, fe, N, ue), Ee.unbindTexture();
20982
20982
  };
20983
20983
  const Ql = w.createFramebuffer(), ec = w.createFramebuffer();
20984
- this.copyTextureToTexture = function(v, I, V = null, O = null, N = 0, ue = null) {
20984
+ this.copyTextureToTexture = function(v, I, k = null, O = null, N = 0, ue = null) {
20985
20985
  ue === null && (N !== 0 ? (zi("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."), ue = N, N = 0) : ue = 0);
20986
- let _e, fe, Me, Ae, Ie, Ce, We, it, ht;
20986
+ let _e, fe, Se, Ae, Ie, Ce, We, it, ht;
20987
20987
  const dt = v.isCompressedTexture ? v.mipmaps[ue] : v.image;
20988
- if (V !== null)
20989
- _e = V.max.x - V.min.x, fe = V.max.y - V.min.y, Me = V.isBox3 ? V.max.z - V.min.z : 1, Ae = V.min.x, Ie = V.min.y, Ce = V.isBox3 ? V.min.z : 0;
20988
+ if (k !== null)
20989
+ _e = k.max.x - k.min.x, fe = k.max.y - k.min.y, Se = k.isBox3 ? k.max.z - k.min.z : 1, Ae = k.min.x, Ie = k.min.y, Ce = k.isBox3 ? k.min.z : 0;
20990
20990
  else {
20991
- const Vt = Math.pow(2, -N);
20992
- _e = Math.floor(dt.width * Vt), fe = Math.floor(dt.height * Vt), v.isDataArrayTexture ? Me = dt.depth : v.isData3DTexture ? Me = Math.floor(dt.depth * Vt) : Me = 1, Ae = 0, Ie = 0, Ce = 0;
20991
+ const kt = Math.pow(2, -N);
20992
+ _e = Math.floor(dt.width * kt), fe = Math.floor(dt.height * kt), v.isDataArrayTexture ? Se = dt.depth : v.isData3DTexture ? Se = Math.floor(dt.depth * kt) : Se = 1, Ae = 0, Ie = 0, Ce = 0;
20993
20993
  }
20994
20994
  O !== null ? (We = O.x, it = O.y, ht = O.z) : (We = 0, it = 0, ht = 0);
20995
20995
  const at = te.convert(I.format), Pe = te.convert(I.type);
@@ -20999,19 +20999,19 @@ class Fm {
20999
20999
  w.pixelStorei(w.UNPACK_ROW_LENGTH, dt.width), w.pixelStorei(w.UNPACK_IMAGE_HEIGHT, dt.height), w.pixelStorei(w.UNPACK_SKIP_PIXELS, Ae), w.pixelStorei(w.UNPACK_SKIP_ROWS, Ie), w.pixelStorei(w.UNPACK_SKIP_IMAGES, Ce);
21000
21000
  const lt = v.isDataArrayTexture || v.isData3DTexture, Pt = I.isDataArrayTexture || I.isData3DTexture;
21001
21001
  if (v.isDepthTexture) {
21002
- const Vt = g.get(v), wt = g.get(I), Dt = g.get(Vt.__renderTarget), qr = g.get(wt.__renderTarget);
21002
+ const kt = g.get(v), wt = g.get(I), Dt = g.get(kt.__renderTarget), qr = g.get(wt.__renderTarget);
21003
21003
  Ee.bindFramebuffer(w.READ_FRAMEBUFFER, Dt.__webglFramebuffer), Ee.bindFramebuffer(w.DRAW_FRAMEBUFFER, qr.__webglFramebuffer);
21004
- for (let In = 0; In < Me; In++)
21004
+ for (let In = 0; In < Se; In++)
21005
21005
  lt && (w.framebufferTextureLayer(w.READ_FRAMEBUFFER, w.COLOR_ATTACHMENT0, g.get(v).__webglTexture, N, Ce + In), w.framebufferTextureLayer(w.DRAW_FRAMEBUFFER, w.COLOR_ATTACHMENT0, g.get(I).__webglTexture, ue, ht + In)), w.blitFramebuffer(Ae, Ie, _e, fe, We, it, _e, fe, w.DEPTH_BUFFER_BIT, w.NEAREST);
21006
21006
  Ee.bindFramebuffer(w.READ_FRAMEBUFFER, null), Ee.bindFramebuffer(w.DRAW_FRAMEBUFFER, null);
21007
21007
  } else if (N !== 0 || v.isRenderTargetTexture || g.has(v)) {
21008
- const Vt = g.get(v), wt = g.get(I);
21008
+ const kt = g.get(v), wt = g.get(I);
21009
21009
  Ee.bindFramebuffer(w.READ_FRAMEBUFFER, Ql), Ee.bindFramebuffer(w.DRAW_FRAMEBUFFER, ec);
21010
- for (let Dt = 0; Dt < Me; Dt++)
21011
- lt ? w.framebufferTextureLayer(w.READ_FRAMEBUFFER, w.COLOR_ATTACHMENT0, Vt.__webglTexture, N, Ce + Dt) : w.framebufferTexture2D(w.READ_FRAMEBUFFER, w.COLOR_ATTACHMENT0, w.TEXTURE_2D, Vt.__webglTexture, N), Pt ? w.framebufferTextureLayer(w.DRAW_FRAMEBUFFER, w.COLOR_ATTACHMENT0, wt.__webglTexture, ue, ht + Dt) : w.framebufferTexture2D(w.DRAW_FRAMEBUFFER, w.COLOR_ATTACHMENT0, w.TEXTURE_2D, wt.__webglTexture, ue), N !== 0 ? w.blitFramebuffer(Ae, Ie, _e, fe, We, it, _e, fe, w.COLOR_BUFFER_BIT, w.NEAREST) : Pt ? w.copyTexSubImage3D(Qe, ue, We, it, ht + Dt, Ae, Ie, _e, fe) : w.copyTexSubImage2D(Qe, ue, We, it, Ae, Ie, _e, fe);
21010
+ for (let Dt = 0; Dt < Se; Dt++)
21011
+ lt ? w.framebufferTextureLayer(w.READ_FRAMEBUFFER, w.COLOR_ATTACHMENT0, kt.__webglTexture, N, Ce + Dt) : w.framebufferTexture2D(w.READ_FRAMEBUFFER, w.COLOR_ATTACHMENT0, w.TEXTURE_2D, kt.__webglTexture, N), Pt ? w.framebufferTextureLayer(w.DRAW_FRAMEBUFFER, w.COLOR_ATTACHMENT0, wt.__webglTexture, ue, ht + Dt) : w.framebufferTexture2D(w.DRAW_FRAMEBUFFER, w.COLOR_ATTACHMENT0, w.TEXTURE_2D, wt.__webglTexture, ue), N !== 0 ? w.blitFramebuffer(Ae, Ie, _e, fe, We, it, _e, fe, w.COLOR_BUFFER_BIT, w.NEAREST) : Pt ? w.copyTexSubImage3D(Qe, ue, We, it, ht + Dt, Ae, Ie, _e, fe) : w.copyTexSubImage2D(Qe, ue, We, it, Ae, Ie, _e, fe);
21012
21012
  Ee.bindFramebuffer(w.READ_FRAMEBUFFER, null), Ee.bindFramebuffer(w.DRAW_FRAMEBUFFER, null);
21013
21013
  } else
21014
- Pt ? v.isDataTexture || v.isData3DTexture ? w.texSubImage3D(Qe, ue, We, it, ht, _e, fe, Me, at, Pe, dt.data) : I.isCompressedArrayTexture ? w.compressedTexSubImage3D(Qe, ue, We, it, ht, _e, fe, Me, at, dt.data) : w.texSubImage3D(Qe, ue, We, it, ht, _e, fe, Me, at, Pe, dt) : v.isDataTexture ? w.texSubImage2D(w.TEXTURE_2D, ue, We, it, _e, fe, at, Pe, dt.data) : v.isCompressedTexture ? w.compressedTexSubImage2D(w.TEXTURE_2D, ue, We, it, dt.width, dt.height, at, dt.data) : w.texSubImage2D(w.TEXTURE_2D, ue, We, it, _e, fe, at, Pe, dt);
21014
+ Pt ? v.isDataTexture || v.isData3DTexture ? w.texSubImage3D(Qe, ue, We, it, ht, _e, fe, Se, at, Pe, dt.data) : I.isCompressedArrayTexture ? w.compressedTexSubImage3D(Qe, ue, We, it, ht, _e, fe, Se, at, dt.data) : w.texSubImage3D(Qe, ue, We, it, ht, _e, fe, Se, at, Pe, dt) : v.isDataTexture ? w.texSubImage2D(w.TEXTURE_2D, ue, We, it, _e, fe, at, Pe, dt.data) : v.isCompressedTexture ? w.compressedTexSubImage2D(w.TEXTURE_2D, ue, We, it, dt.width, dt.height, at, dt.data) : w.texSubImage2D(w.TEXTURE_2D, ue, We, it, _e, fe, at, Pe, dt);
21015
21015
  w.pixelStorei(w.UNPACK_ROW_LENGTH, Ke), w.pixelStorei(w.UNPACK_IMAGE_HEIGHT, Nt), w.pixelStorei(w.UNPACK_SKIP_PIXELS, $n), w.pixelStorei(w.UNPACK_SKIP_ROWS, Ft), w.pixelStorei(w.UNPACK_SKIP_IMAGES, Ei), ue === 0 && I.generateMipmaps && w.generateMipmap(Qe), Ee.unbindTexture();
21016
21016
  }, this.initRenderTarget = function(v) {
21017
21017
  g.get(v).__webglFramebuffer === void 0 && L.setupRenderTarget(v);
@@ -21048,7 +21048,7 @@ class Fm {
21048
21048
  t.drawingBufferColorSpace = $e._getDrawingBufferColorSpace(e), t.unpackColorSpace = $e._getUnpackColorSpace();
21049
21049
  }
21050
21050
  }
21051
- const jo = { type: "change" }, Ua = { type: "start" }, Hl = { type: "end" }, Sr = new Gi(), Ko = new wn(), Om = Math.cos(70 * jc.DEG2RAD), gt = new U(), Lt = 2 * Math.PI, st = {
21051
+ const jo = { type: "change" }, Ua = { type: "start" }, Hl = { type: "end" }, Mr = new Gi(), Ko = new wn(), Om = Math.cos(70 * jc.DEG2RAD), gt = new U(), Lt = 2 * Math.PI, st = {
21052
21052
  NONE: -1,
21053
21053
  ROTATE: 0,
21054
21054
  DOLLY: 1,
@@ -21066,7 +21066,7 @@ class Bm extends zu {
21066
21066
  * @param {?HTMLElement} domElement - The HTML element used for event listeners.
21067
21067
  */
21068
21068
  constructor(e, t = null) {
21069
- super(e, t), this.state = st.NONE, this.target = new U(), this.cursor = new U(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: pi.ROTATE, MIDDLE: pi.DOLLY, RIGHT: pi.PAN }, this.touches = { ONE: fi.ROTATE, TWO: fi.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new U(), this._lastQuaternion = new Xn(), this._lastTargetPosition = new U(), this._quat = new Xn().setFromUnitVectors(e.up, new U(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new To(), this._sphericalDelta = new To(), this._scale = 1, this._panOffset = new U(), this._rotateStart = new Ne(), this._rotateEnd = new Ne(), this._rotateDelta = new Ne(), this._panStart = new Ne(), this._panEnd = new Ne(), this._panDelta = new Ne(), this._dollyStart = new Ne(), this._dollyEnd = new Ne(), this._dollyDelta = new Ne(), this._dollyDirection = new U(), this._mouse = new Ne(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Vm.bind(this), this._onPointerDown = zm.bind(this), this._onPointerUp = km.bind(this), this._onContextMenu = $m.bind(this), this._onMouseWheel = Wm.bind(this), this._onKeyDown = Xm.bind(this), this._onTouchStart = qm.bind(this), this._onTouchMove = Ym.bind(this), this._onMouseDown = Hm.bind(this), this._onMouseMove = Gm.bind(this), this._interceptControlDown = Zm.bind(this), this._interceptControlUp = jm.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
21069
+ super(e, t), this.state = st.NONE, this.target = new U(), this.cursor = new U(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: pi.ROTATE, MIDDLE: pi.DOLLY, RIGHT: pi.PAN }, this.touches = { ONE: fi.ROTATE, TWO: fi.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new U(), this._lastQuaternion = new Xn(), this._lastTargetPosition = new U(), this._quat = new Xn().setFromUnitVectors(e.up, new U(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new To(), this._sphericalDelta = new To(), this._scale = 1, this._panOffset = new U(), this._rotateStart = new Ne(), this._rotateEnd = new Ne(), this._rotateDelta = new Ne(), this._panStart = new Ne(), this._panEnd = new Ne(), this._panDelta = new Ne(), this._dollyStart = new Ne(), this._dollyEnd = new Ne(), this._dollyDelta = new Ne(), this._dollyDirection = new U(), this._mouse = new Ne(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = km.bind(this), this._onPointerDown = zm.bind(this), this._onPointerUp = Vm.bind(this), this._onContextMenu = $m.bind(this), this._onMouseWheel = Wm.bind(this), this._onKeyDown = Xm.bind(this), this._onTouchStart = qm.bind(this), this._onTouchMove = Ym.bind(this), this._onMouseDown = Hm.bind(this), this._onMouseMove = Gm.bind(this), this._interceptControlDown = Zm.bind(this), this._interceptControlUp = jm.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
21070
21070
  }
21071
21071
  connect(e) {
21072
21072
  super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -21157,7 +21157,7 @@ class Bm extends zu {
21157
21157
  c.unproject(this.object), this.object.position.sub(c).add(o), this.object.updateMatrixWorld(), a = gt.length();
21158
21158
  } else
21159
21159
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
21160
- a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position) : (Sr.origin.copy(this.object.position), Sr.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Sr.direction)) < Om ? this.object.lookAt(this.target) : (Ko.setFromNormalAndCoplanarPoint(this.object.up, this.target), Sr.intersectPlane(Ko, this.target))));
21160
+ a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position) : (Mr.origin.copy(this.object.position), Mr.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Mr.direction)) < Om ? this.object.lookAt(this.target) : (Ko.setFromNormalAndCoplanarPoint(this.object.up, this.target), Mr.intersectPlane(Ko, this.target))));
21161
21161
  } else if (this.object.isOrthographicCamera) {
21162
21162
  const a = this.object.zoom;
21163
21163
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), a !== this.object.zoom && (this.object.updateProjectionMatrix(), s = !0);
@@ -21357,10 +21357,10 @@ class Bm extends zu {
21357
21357
  function zm(i) {
21358
21358
  this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(i.pointerId), this.domElement.ownerDocument.addEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(i) && (this._addPointer(i), i.pointerType === "touch" ? this._onTouchStart(i) : this._onMouseDown(i)));
21359
21359
  }
21360
- function Vm(i) {
21360
+ function km(i) {
21361
21361
  this.enabled !== !1 && (i.pointerType === "touch" ? this._onTouchMove(i) : this._onMouseMove(i));
21362
21362
  }
21363
- function km(i) {
21363
+ function Vm(i) {
21364
21364
  switch (this._removePointer(i), this._pointers.length) {
21365
21365
  case 0:
21366
21366
  this.domElement.releasePointerCapture(i.pointerId), this.domElement.ownerDocument.removeEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Hl), this.state = st.NONE;
@@ -21674,16 +21674,16 @@ function dg(i, e, t) {
21674
21674
  i.appendChild(n.domElement);
21675
21675
  const r = hg(e, "background", "#ffffff");
21676
21676
  n.setClearColor(new Ze(r), 1);
21677
- const s = new Mu(), a = new Ht(45, 1, 0.01, 1e3);
21677
+ const s = new Su(), a = new Ht(45, 1, 0.01, 1e3);
21678
21678
  a.position.set(0, 0, 10), s.add(new Fu(16777215, 0.8));
21679
21679
  const o = new Bm(a, n.domElement);
21680
21680
  o.enableDamping = !0, o.dampingFactor = 0.08;
21681
21681
  const l = new Ut(), c = Qo(e.get(ne.xyzBytes));
21682
- let h = new Mt(c, 3);
21682
+ let h = new St(c, 3);
21683
21683
  l.setAttribute("position", h);
21684
- let u = h.count, d = new Float32Array(u * 3), p = new Mt(d, 3);
21684
+ let u = h.count, d = new Float32Array(u * 3), p = new St(d, 3);
21685
21685
  l.setAttribute("color", p);
21686
- let _ = new Float32Array(u), x = new Mt(_, 1);
21686
+ let _ = new Float32Array(u), x = new St(_, 1);
21687
21687
  l.setAttribute("size", x);
21688
21688
  function m() {
21689
21689
  const Z = l.boundingSphere;
@@ -21745,9 +21745,9 @@ function dg(i, e, t) {
21745
21745
  }
21746
21746
  const F = new Ni();
21747
21747
  s.add(F);
21748
- function M(Z) {
21748
+ function S(Z) {
21749
21749
  const me = new Ut(), ve = new Float32Array(6);
21750
- me.setAttribute("position", new Mt(ve, 3));
21750
+ me.setAttribute("position", new St(ve, 3));
21751
21751
  const de = new Ul({
21752
21752
  color: Z,
21753
21753
  transparent: !0,
@@ -21755,8 +21755,8 @@ function dg(i, e, t) {
21755
21755
  });
21756
21756
  return new wu(me, de);
21757
21757
  }
21758
- const S = M(sg), D = M(ag), z = M(og);
21759
- F.add(S, D, z);
21758
+ const M = S(sg), D = S(ag), z = S(og);
21759
+ F.add(M, D, z);
21760
21760
  function B(Z) {
21761
21761
  let me = -1 / 0;
21762
21762
  for (let ve = 0; ve < Z.length; ve++) {
@@ -21774,7 +21774,7 @@ function dg(i, e, t) {
21774
21774
  function X() {
21775
21775
  return el(e.get(ne.axisLabelSize), 0.05);
21776
21776
  }
21777
- function k(Z, me) {
21777
+ function V(Z, me) {
21778
21778
  const ve = document.createElement("canvas"), de = 256;
21779
21779
  ve.width = de, ve.height = de;
21780
21780
  const Re = ve.getContext("2d");
@@ -21793,13 +21793,13 @@ function dg(i, e, t) {
21793
21793
  }), w = new yu(je);
21794
21794
  return w.scale.set(me, me, 1), w;
21795
21795
  }
21796
- let H = k("x", X()), $ = k("y", X()), ie = k("z", X());
21796
+ let H = V("x", X()), $ = V("y", X()), ie = V("z", X());
21797
21797
  F.add(H, $, ie);
21798
21798
  function se() {
21799
21799
  const Z = e.get(ne.showAxes) === !0;
21800
21800
  if (F.visible = Z, !Z) return;
21801
21801
  const ve = l.getAttribute("position").array, { max: de } = B(ve);
21802
- G(S, 0, 0, 0, de, 0, 0), G(z, 0, 0, 0, 0, de, 0), G(D, 0, 0, 0, 0, 0, de);
21802
+ G(M, 0, 0, 0, de, 0, 0), G(z, 0, 0, 0, 0, de, 0), G(D, 0, 0, 0, 0, 0, de);
21803
21803
  const Re = de * 0.03;
21804
21804
  H.position.set(de + Re, 0, 0), $.position.set(0, 0, de + Re), ie.position.set(0, de + Re, 0);
21805
21805
  }
@@ -21810,11 +21810,11 @@ function dg(i, e, t) {
21810
21810
  ve.map?.dispose(), ve.dispose();
21811
21811
  }
21812
21812
  const Z = X();
21813
- H = k("x", Z), $ = k("y", Z), ie = k("z", Z), F.add(H, $, ie), se();
21813
+ H = V("x", Z), $ = V("y", Z), ie = V("z", Z), F.add(H, $, ie), se();
21814
21814
  }
21815
21815
  function Le() {
21816
21816
  const Z = Qo(e.get(ne.xyzBytes));
21817
- h.array.length !== Z.length ? (u = h.count, d = new Float32Array(u * 3), p = new Mt(d, 3), l.setAttribute("color", p), _ = new Float32Array(u), x = new Mt(_, 1), l.setAttribute("size", x)) : (h.array.set(Z), h.needsUpdate = !0), l.computeBoundingSphere(), m(), se();
21817
+ h.array.length !== Z.length ? (u = h.count, d = new Float32Array(u * 3), p = new St(d, 3), l.setAttribute("color", p), _ = new Float32Array(u), x = new St(_, 1), l.setAttribute("size", x)) : (h.array.set(Z), h.needsUpdate = !0), l.computeBoundingSphere(), m(), se();
21818
21818
  }
21819
21819
  function we() {
21820
21820
  const Z = Jo(e.get(ne.codedValues));
@@ -21854,7 +21854,7 @@ function dg(i, e, t) {
21854
21854
  );
21855
21855
  je.set(Oe), De.needsUpdate = !0;
21856
21856
  }
21857
- function ke() {
21857
+ function Ve() {
21858
21858
  const Z = Jo(e.get(ne.codedValues));
21859
21859
  if (u = l.getAttribute("position").count, Z.length !== u)
21860
21860
  throw new Error(
@@ -21923,7 +21923,7 @@ function dg(i, e, t) {
21923
21923
  setSize: tt,
21924
21924
  setPointsFromModel: Le,
21925
21925
  setColorsFromModel: we,
21926
- setSizesFromModel: ke,
21926
+ setSizesFromModel: Ve,
21927
21927
  pickPointIndex: C,
21928
21928
  setAxesFromModel: se,
21929
21929
  rebuildAxisLabels: re,
@@ -21933,29 +21933,59 @@ function dg(i, e, t) {
21933
21933
  };
21934
21934
  }
21935
21935
  function fg(i) {
21936
- const { model: e, three: t, refreshLegendUI: n, onTooltipResponseChange: r } = i, s = () => {
21937
- t.setPointsFromModel(), t.setColorsFromModel(), t.setSizesFromModel();
21938
- }, a = () => {
21939
- t.setSizesFromModel();
21940
- }, o = () => {
21941
- n(), t.setColorsFromModel(), t.setSizesFromModel();
21942
- }, l = () => {
21943
- t.setColorsFromModel(), t.setSizesFromModel();
21944
- }, c = () => {
21945
- const p = e.get(ne.lassoResult);
21946
- p && p.status === "error" && console.error("Lasso error:", p.message);
21947
- };
21936
+ const { model: e, three: t, refreshLegendUI: n, onTooltipResponseChange: r } = i;
21937
+ let s = !1, a = !1;
21938
+ function o(T) {
21939
+ if (!(T instanceof Error)) return !1;
21940
+ const y = T.message;
21941
+ return y.startsWith("No color for code=") || y.startsWith("coded_values_t length") || y.startsWith('active_category_t="') || // active not found in labels
21942
+ y.includes("not found in labels_t");
21943
+ }
21944
+ function l() {
21945
+ try {
21946
+ return t.setColorsFromModel(), t.setSizesFromModel(), !0;
21947
+ } catch (T) {
21948
+ if (o(T)) return !1;
21949
+ throw T;
21950
+ }
21951
+ }
21952
+ function c() {
21953
+ s || (s = !0, queueMicrotask(() => {
21954
+ if (s = !1, l()) {
21955
+ a = !1;
21956
+ return;
21957
+ }
21958
+ a ? (a = !1, console.warn(
21959
+ "[bindings] transient recolor mismatch did not converge after retry; skipping"
21960
+ )) : (a = !0, c());
21961
+ }));
21962
+ }
21948
21963
  function h() {
21949
- return e.get(ne.showAxes) === !0;
21964
+ l() || c();
21950
21965
  }
21951
21966
  const u = () => {
21952
- t.setAxesFromModel(), h() && t.rebuildAxisLabels?.();
21967
+ t.setPointsFromModel(), h();
21953
21968
  }, d = () => {
21954
- h() && t.rebuildAxisLabels?.();
21969
+ t.setSizesFromModel();
21970
+ }, p = () => {
21971
+ n(), h();
21972
+ }, _ = () => {
21973
+ h();
21974
+ }, x = () => {
21975
+ const T = e.get(ne.lassoResult);
21976
+ T && T.status === "error" && console.error("Lasso error:", T.message);
21955
21977
  };
21956
- return e.on(ct(ne.tooltipResponse), r), e.on(ct(ne.xyzBytes), s), e.on(ct(ne.pointSize), a), e.on(ct(ne.codedValues), l), e.on(ct(ne.labels), o), e.on(ct(ne.colors), o), e.on(ct(ne.missingColor), o), e.on(ct(ne.showAxes), u), e.on(ct(ne.axisLabelSize), d), e.on(ct(ne.lassoResult), c), e.on(ct(ne.activeCategory), o), {
21978
+ function m() {
21979
+ return e.get(ne.showAxes) === !0;
21980
+ }
21981
+ const f = () => {
21982
+ t.setAxesFromModel(), m() && t.rebuildAxisLabels?.();
21983
+ }, b = () => {
21984
+ m() && t.rebuildAxisLabels?.();
21985
+ };
21986
+ return e.on(ct(ne.tooltipResponse), r), e.on(ct(ne.xyzBytes), u), e.on(ct(ne.pointSize), d), e.on(ct(ne.codedValues), _), e.on(ct(ne.labels), p), e.on(ct(ne.colors), p), e.on(ct(ne.missingColor), p), e.on(ct(ne.showAxes), f), e.on(ct(ne.axisLabelSize), b), e.on(ct(ne.lassoResult), x), e.on(ct(ne.activeCategory), p), {
21957
21987
  dispose: () => {
21958
- e.off(ct(ne.tooltipResponse), r), e.off(ct(ne.xyzBytes), s), e.off(ct(ne.pointSize), a), e.off(ct(ne.codedValues), l), e.off(ct(ne.labels), o), e.off(ct(ne.colors), o), e.off(ct(ne.missingColor), o), e.off(ct(ne.showAxes), u), e.off(ct(ne.axisLabelSize), d), e.off(ct(ne.lassoResult), c), e.off(ct(ne.activeCategory), o);
21988
+ e.off(ct(ne.tooltipResponse), r), e.off(ct(ne.xyzBytes), u), e.off(ct(ne.pointSize), d), e.off(ct(ne.codedValues), _), e.off(ct(ne.labels), p), e.off(ct(ne.colors), p), e.off(ct(ne.missingColor), p), e.off(ct(ne.showAxes), f), e.off(ct(ne.axisLabelSize), b), e.off(ct(ne.lassoResult), x), e.off(ct(ne.activeCategory), p);
21959
21989
  }
21960
21990
  };
21961
21991
  }
@@ -22112,17 +22142,17 @@ function _g(i) {
22112
22142
  maskBytes: F.length,
22113
22143
  polygonNdcPoints: y.length
22114
22144
  });
22115
- const M = new DataView(
22145
+ const S = new DataView(
22116
22146
  F.buffer.slice(F.byteOffset, F.byteOffset + F.byteLength)
22117
22147
  );
22118
- e.set(ne.lassoMask, M);
22119
- const S = {
22148
+ e.set(ne.lassoMask, S);
22149
+ const M = {
22120
22150
  kind: "lasso_commit",
22121
22151
  op: R,
22122
22152
  label: A,
22123
22153
  request_id: C
22124
22154
  };
22125
- e.set(ne.lassoRequest, S);
22155
+ e.set(ne.lassoRequest, M);
22126
22156
  let D;
22127
22157
  try {
22128
22158
  D = e.save_changes();
@@ -22264,7 +22294,7 @@ function vg(i) {
22264
22294
  }
22265
22295
  };
22266
22296
  }
22267
- function Mg(i) {
22297
+ function Sg(i) {
22268
22298
  function e() {
22269
22299
  i.style.display = "none";
22270
22300
  }
@@ -22290,7 +22320,7 @@ function Mg(i) {
22290
22320
  }
22291
22321
  return { hide: e, showAt: a, showLoadingAt: r, showErrorAt: s };
22292
22322
  }
22293
- function Sg(i, e) {
22323
+ function Mg(i, e) {
22294
22324
  const t = document.createElement("div");
22295
22325
  t.dataset.testid = "legend", i.appendChild(t), i.style.position = "absolute", i.style.zIndex = String(e.legendOverlay.zIndex), i.style.pointerEvents = "auto", t.style.pointerEvents = "auto", t.style.boxSizing = "border-box", t.style.background = e.legendOverlay.bg, t.style.border = e.legendOverlay.border, t.style.borderRadius = `${e.legendOverlay.borderRadiusPx}px`, t.style.padding = `${e.legendOverlay.paddingPx}px`, t.style.boxShadow = e.legendOverlay.boxShadow, t.style.maxWidth = `${e.legendOverlay.maxWidthPx}px`, t.style.maxHeight = `${e.legendOverlay.maxHeightPx}px`, t.style.overflow = "auto";
22296
22326
  let n = null;
@@ -22666,7 +22696,7 @@ function zg(i) {
22666
22696
  const e = i.getRootNode?.();
22667
22697
  return !!(e instanceof ShadowRoot && e.host instanceof HTMLElement ? e.host : i).closest?.('[data-cell-role="output"], .output-area');
22668
22698
  }
22669
- function Vg(i, e, t) {
22699
+ function kg(i, e, t) {
22670
22700
  const n = {
22671
22701
  boundPointerEvents: [],
22672
22702
  modelChangeHandlers: [],
@@ -22682,7 +22712,7 @@ function Vg(i, e, t) {
22682
22712
  pixelWidth: we.width,
22683
22713
  pixelHeight: we.height
22684
22714
  }, we;
22685
- }, _ = tc(u), x = ac(), m = new AbortController(), f = Mg(o), b = dc(a, c);
22715
+ }, _ = tc(u), x = ac(), m = new AbortController(), f = Sg(o), b = dc(a, c);
22686
22716
  function T(re) {
22687
22717
  b.messageEl.textContent = re, b.messageEl.style.display = "";
22688
22718
  }
@@ -22696,19 +22726,19 @@ function Vg(i, e, t) {
22696
22726
  }
22697
22727
  const C = document.createElement("div");
22698
22728
  C.dataset.testid = "legend-host", l.appendChild(C);
22699
- const F = Sg(C, qa), M = wg({
22729
+ const F = Mg(C, qa), S = wg({
22700
22730
  model: r,
22701
22731
  view: F,
22702
22732
  transportReady: R
22703
22733
  });
22704
- M.scheduleRefresh();
22705
- function S() {
22734
+ S.scheduleRefresh();
22735
+ function M() {
22706
22736
  const re = r.get(ne.interactionMode) === "lasso" ? "lasso" : "rotate";
22707
22737
  if (re === "rotate")
22708
22738
  Lr(x, { kind: "rotate" });
22709
22739
  else {
22710
- const ke = x.mode.kind === "lasso" ? x.mode.operation : "add";
22711
- Lr(x, { kind: "lasso", operation: ke });
22740
+ const Ve = x.mode.kind === "lasso" ? x.mode.operation : "add";
22741
+ Lr(x, { kind: "lasso", operation: Ve });
22712
22742
  }
22713
22743
  const Le = x.mode.kind === "lasso" ? x.mode.operation : "add", we = {
22714
22744
  mode: re,
@@ -22723,7 +22753,7 @@ function Vg(i, e, t) {
22723
22753
  state: x,
22724
22754
  root: s,
22725
22755
  canvas: u,
22726
- syncUiFromState: S,
22756
+ syncUiFromState: M,
22727
22757
  signal: m.signal,
22728
22758
  transportReady: R,
22729
22759
  showMessage: T,
@@ -22740,7 +22770,7 @@ function Vg(i, e, t) {
22740
22770
  }), B = fg({
22741
22771
  model: r,
22742
22772
  three: h,
22743
- refreshLegendUI: M.scheduleRefresh,
22773
+ refreshLegendUI: S.scheduleRefresh,
22744
22774
  onTooltipResponseChange: z.onTooltipResponseChange
22745
22775
  });
22746
22776
  r.set(ne.clientReady, !0);
@@ -22756,7 +22786,7 @@ function Vg(i, e, t) {
22756
22786
  resizeCanvas: p
22757
22787
  });
22758
22788
  let X = null;
22759
- const k = [];
22789
+ const V = [];
22760
22790
  if (zg(e)) {
22761
22791
  X = Bg({
22762
22792
  hostEl: e,
@@ -22764,14 +22794,14 @@ function Vg(i, e, t) {
22764
22794
  getDesiredPx: function() {
22765
22795
  if (!A.isReady())
22766
22796
  return c.widget.defaultHeightPx;
22767
- const ke = r.get(ne.widgetHeightPx);
22768
- if (!(typeof ke == "number" && Number.isFinite(ke) && ke > 0))
22797
+ const Ve = r.get(ne.widgetHeightPx);
22798
+ if (!(typeof Ve == "number" && Number.isFinite(Ve) && Ve > 0))
22769
22799
  throw new Error(
22770
22800
  `widget_height_px_t must be a finite number > 0 once transport is ready, got ${String(
22771
- ke
22801
+ Ve
22772
22802
  )}`
22773
22803
  );
22774
- return ke;
22804
+ return Ve;
22775
22805
  },
22776
22806
  onApplied: () => {
22777
22807
  G.applyNow();
@@ -22780,11 +22810,11 @@ function Vg(i, e, t) {
22780
22810
  const Le = A.onReadyChange(() => {
22781
22811
  X?.applyNow();
22782
22812
  });
22783
- k.push(Le);
22813
+ V.push(Le);
22784
22814
  const we = () => {
22785
22815
  X?.applyNow();
22786
22816
  };
22787
- r.on(ct(ne.widgetHeightPx), we), k.push(
22817
+ r.on(ct(ne.widgetHeightPx), we), V.push(
22788
22818
  () => r.off(ct(ne.widgetHeightPx), we)
22789
22819
  );
22790
22820
  }
@@ -22793,15 +22823,15 @@ function Vg(i, e, t) {
22793
22823
  dpr: x.dpr,
22794
22824
  pixelWidth: x.pixelWidth,
22795
22825
  pixelHeight: x.pixelHeight
22796
- }, S();
22826
+ }, M();
22797
22827
  };
22798
22828
  function $() {
22799
22829
  let Le = 0;
22800
22830
  const we = () => {
22801
22831
  Le += 1, G.applyNow();
22802
- const ke = l.getBoundingClientRect();
22803
- if (ke.width > 0 && ke.height > 0 && x.pixelWidth > 0 && x.pixelHeight > 0 && x.dpr > 0) {
22804
- S(), n.hostRect = { width: ke.width, height: ke.height }, n.overlaySize = {
22832
+ const Ve = l.getBoundingClientRect();
22833
+ if (Ve.width > 0 && Ve.height > 0 && x.pixelWidth > 0 && x.pixelHeight > 0 && x.dpr > 0) {
22834
+ M(), n.hostRect = { width: Ve.width, height: Ve.height }, n.overlaySize = {
22805
22835
  width: u.width,
22806
22836
  height: u.height
22807
22837
  }, n.stateSize = {
@@ -22814,7 +22844,7 @@ function Vg(i, e, t) {
22814
22844
  Le < 60 ? requestAnimationFrame(we) : console.warn(
22815
22845
  "[scatter3d] never reached valid layout size on first render",
22816
22846
  {
22817
- host: { w: ke.width, h: ke.height },
22847
+ host: { w: Ve.width, h: Ve.height },
22818
22848
  state: {
22819
22849
  dpr: x.dpr,
22820
22850
  pw: x.pixelWidth,
@@ -22834,8 +22864,8 @@ function Vg(i, e, t) {
22834
22864
  return (t?.startRaf ?? !1) && ie.start(), {
22835
22865
  cleanup: () => {
22836
22866
  ie.stop();
22837
- for (const re of k) re();
22838
- m.abort(), M.dispose(), F.dispose(), C.remove(), B.dispose(), D.dispose(), z.dispose(), X?.dispose(), G.dispose(), h.dispose(), A.dispose(), u.remove();
22867
+ for (const re of V) re();
22868
+ m.abort(), S.dispose(), F.dispose(), C.remove(), B.dispose(), D.dispose(), z.dispose(), X?.dispose(), G.dispose(), h.dispose(), A.dispose(), u.remove();
22839
22869
  },
22840
22870
  forceResize: H,
22841
22871
  root: s,
@@ -22844,15 +22874,15 @@ function Vg(i, e, t) {
22844
22874
  debug: n
22845
22875
  };
22846
22876
  }
22847
- function kg({ model: i, el: e }) {
22877
+ function Vg({ model: i, el: e }) {
22848
22878
  rl.get(e)?.();
22849
- const n = Vg(i, e, { startRaf: !0 });
22879
+ const n = kg(i, e, { startRaf: !0 });
22850
22880
  rl.set(e, n.cleanup);
22851
22881
  }
22852
- const Hg = { render: kg };
22882
+ const Hg = { render: Vg };
22853
22883
  export {
22854
- Vg as buildWidget,
22884
+ kg as buildWidget,
22855
22885
  Hg as default,
22856
- kg as render
22886
+ Vg as render
22857
22887
  };
22858
22888
  //# sourceMappingURL=scatter3d.js.map