scatter3d-anywidget 0.1.5__py3-none-any.whl → 0.1.7__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.
- scatter3d/scatter3d.py +63 -42
- scatter3d/static/scatter3d.js +519 -496
- scatter3d/static/scatter3d.js.map +1 -1
- scatter3d/widget_test.py +26 -5
- {scatter3d_anywidget-0.1.5.dist-info → scatter3d_anywidget-0.1.7.dist-info}/METADATA +1 -1
- scatter3d_anywidget-0.1.7.dist-info/RECORD +8 -0
- {scatter3d_anywidget-0.1.5.dist-info → scatter3d_anywidget-0.1.7.dist-info}/WHEEL +1 -1
- scatter3d_anywidget-0.1.5.dist-info/RECORD +0 -8
scatter3d/static/scatter3d.js
CHANGED
|
@@ -939,29 +939,29 @@ class Xn {
|
|
|
939
939
|
* @see {@link Quaternion#slerp}
|
|
940
940
|
*/
|
|
941
941
|
static slerpFlat(e, t, n, r, s, a, o) {
|
|
942
|
-
let l = n[r + 0], c = n[r + 1],
|
|
942
|
+
let l = n[r + 0], c = n[r + 1], h = n[r + 2], u = n[r + 3], d = s[a + 0], p = s[a + 1], _ = s[a + 2], x = s[a + 3];
|
|
943
943
|
if (o <= 0) {
|
|
944
|
-
e[t + 0] = l, e[t + 1] = c, e[t + 2] =
|
|
944
|
+
e[t + 0] = l, e[t + 1] = c, e[t + 2] = h, e[t + 3] = u;
|
|
945
945
|
return;
|
|
946
946
|
}
|
|
947
947
|
if (o >= 1) {
|
|
948
948
|
e[t + 0] = d, e[t + 1] = p, e[t + 2] = _, e[t + 3] = x;
|
|
949
949
|
return;
|
|
950
950
|
}
|
|
951
|
-
if (
|
|
952
|
-
let m = l * d + c * p +
|
|
951
|
+
if (u !== x || l !== d || c !== p || h !== _) {
|
|
952
|
+
let m = l * d + c * p + h * _ + u * x;
|
|
953
953
|
m < 0 && (d = -d, p = -p, _ = -_, x = -x, m = -m);
|
|
954
954
|
let f = 1 - o;
|
|
955
955
|
if (m < 0.9995) {
|
|
956
956
|
const b = Math.acos(m), T = Math.sin(b);
|
|
957
|
-
f = Math.sin(f * b) / T, o = Math.sin(o * b) / T, l = l * f + d * o, c = c * f + p * o,
|
|
957
|
+
f = Math.sin(f * b) / T, o = Math.sin(o * b) / T, l = l * f + d * o, c = c * f + p * o, h = h * f + _ * o, u = u * f + x * o;
|
|
958
958
|
} else {
|
|
959
|
-
l = l * f + d * o, c = c * f + p * o,
|
|
960
|
-
const b = 1 / Math.sqrt(l * l + c * c +
|
|
961
|
-
l *= b, c *= b,
|
|
959
|
+
l = l * f + d * o, c = c * f + p * o, h = h * f + _ * o, u = u * f + x * o;
|
|
960
|
+
const b = 1 / Math.sqrt(l * l + c * c + h * h + u * u);
|
|
961
|
+
l *= b, c *= b, h *= b, u *= b;
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
|
-
e[t] = l, e[t + 1] = c, e[t + 2] =
|
|
964
|
+
e[t] = l, e[t + 1] = c, e[t + 2] = h, e[t + 3] = u;
|
|
965
965
|
}
|
|
966
966
|
/**
|
|
967
967
|
* Multiplies two quaternions. This implementation assumes the quaternion data are managed
|
|
@@ -977,8 +977,8 @@ class Xn {
|
|
|
977
977
|
* @see {@link Quaternion#multiplyQuaternions}.
|
|
978
978
|
*/
|
|
979
979
|
static multiplyQuaternionsFlat(e, t, n, r, s, a) {
|
|
980
|
-
const o = n[r], l = n[r + 1], c = n[r + 2],
|
|
981
|
-
return e[t] = o * _ +
|
|
980
|
+
const o = n[r], l = n[r + 1], c = n[r + 2], h = n[r + 3], u = s[a], d = s[a + 1], p = s[a + 2], _ = s[a + 3];
|
|
981
|
+
return e[t] = o * _ + h * u + l * p - c * d, e[t + 1] = l * _ + h * d + c * u - o * p, e[t + 2] = c * _ + h * p + o * d - l * u, e[t + 3] = h * _ - o * u - l * d - c * p, e;
|
|
982
982
|
}
|
|
983
983
|
/**
|
|
984
984
|
* The x value of this quaternion.
|
|
@@ -1066,25 +1066,25 @@ class Xn {
|
|
|
1066
1066
|
* @return {Quaternion} A reference to this quaternion.
|
|
1067
1067
|
*/
|
|
1068
1068
|
setFromEuler(e, t = !0) {
|
|
1069
|
-
const n = e._x, r = e._y, s = e._z, a = e._order, o = Math.cos, l = Math.sin, c = o(n / 2),
|
|
1069
|
+
const n = e._x, r = e._y, s = e._z, a = e._order, o = Math.cos, l = Math.sin, c = o(n / 2), h = o(r / 2), u = o(s / 2), d = l(n / 2), p = l(r / 2), _ = l(s / 2);
|
|
1070
1070
|
switch (a) {
|
|
1071
1071
|
case "XYZ":
|
|
1072
|
-
this._x = d *
|
|
1072
|
+
this._x = d * h * u + c * p * _, this._y = c * p * u - d * h * _, this._z = c * h * _ + d * p * u, this._w = c * h * u - d * p * _;
|
|
1073
1073
|
break;
|
|
1074
1074
|
case "YXZ":
|
|
1075
|
-
this._x = d *
|
|
1075
|
+
this._x = d * h * u + c * p * _, this._y = c * p * u - d * h * _, this._z = c * h * _ - d * p * u, this._w = c * h * u + d * p * _;
|
|
1076
1076
|
break;
|
|
1077
1077
|
case "ZXY":
|
|
1078
|
-
this._x = d *
|
|
1078
|
+
this._x = d * h * u - c * p * _, this._y = c * p * u + d * h * _, this._z = c * h * _ + d * p * u, this._w = c * h * u - d * p * _;
|
|
1079
1079
|
break;
|
|
1080
1080
|
case "ZYX":
|
|
1081
|
-
this._x = d *
|
|
1081
|
+
this._x = d * h * u - c * p * _, this._y = c * p * u + d * h * _, this._z = c * h * _ - d * p * u, this._w = c * h * u + d * p * _;
|
|
1082
1082
|
break;
|
|
1083
1083
|
case "YZX":
|
|
1084
|
-
this._x = d *
|
|
1084
|
+
this._x = d * h * u + c * p * _, this._y = c * p * u + d * h * _, this._z = c * h * _ - d * p * u, this._w = c * h * u - d * p * _;
|
|
1085
1085
|
break;
|
|
1086
1086
|
case "XZY":
|
|
1087
|
-
this._x = d *
|
|
1087
|
+
this._x = d * h * u - c * p * _, this._y = c * p * u - d * h * _, this._z = c * h * _ + d * p * u, this._w = c * h * u + d * p * _;
|
|
1088
1088
|
break;
|
|
1089
1089
|
default:
|
|
1090
1090
|
Fe("Quaternion: .setFromEuler() encountered an unknown order: " + a);
|
|
@@ -1109,19 +1109,19 @@ class Xn {
|
|
|
1109
1109
|
* @return {Quaternion} A reference to this quaternion.
|
|
1110
1110
|
*/
|
|
1111
1111
|
setFromRotationMatrix(e) {
|
|
1112
|
-
const t = e.elements, n = t[0], r = t[4], s = t[8], a = t[1], o = t[5], l = t[9], c = t[2],
|
|
1112
|
+
const t = e.elements, n = t[0], r = t[4], s = t[8], a = t[1], o = t[5], l = t[9], c = t[2], h = t[6], u = t[10], d = n + o + u;
|
|
1113
1113
|
if (d > 0) {
|
|
1114
1114
|
const p = 0.5 / Math.sqrt(d + 1);
|
|
1115
|
-
this._w = 0.25 / p, this._x = (
|
|
1116
|
-
} else if (n > o && n >
|
|
1117
|
-
const p = 2 * Math.sqrt(1 + n - o -
|
|
1118
|
-
this._w = (
|
|
1119
|
-
} else if (o >
|
|
1120
|
-
const p = 2 * Math.sqrt(1 + o - n -
|
|
1121
|
-
this._w = (s - c) / p, this._x = (r + a) / p, this._y = 0.25 * p, this._z = (l +
|
|
1115
|
+
this._w = 0.25 / p, this._x = (h - l) * p, this._y = (s - c) * p, this._z = (a - r) * p;
|
|
1116
|
+
} else if (n > o && n > u) {
|
|
1117
|
+
const p = 2 * Math.sqrt(1 + n - o - u);
|
|
1118
|
+
this._w = (h - l) / p, this._x = 0.25 * p, this._y = (r + a) / p, this._z = (s + c) / p;
|
|
1119
|
+
} else if (o > u) {
|
|
1120
|
+
const p = 2 * Math.sqrt(1 + o - n - u);
|
|
1121
|
+
this._w = (s - c) / p, this._x = (r + a) / p, this._y = 0.25 * p, this._z = (l + h) / p;
|
|
1122
1122
|
} else {
|
|
1123
|
-
const p = 2 * Math.sqrt(1 +
|
|
1124
|
-
this._w = (a - r) / p, this._x = (s + c) / p, this._y = (l +
|
|
1123
|
+
const p = 2 * Math.sqrt(1 + u - n - o);
|
|
1124
|
+
this._w = (a - r) / p, this._x = (s + c) / p, this._y = (l + h) / p, this._z = 0.25 * p;
|
|
1125
1125
|
}
|
|
1126
1126
|
return this._onChangeCallback(), this;
|
|
1127
1127
|
}
|
|
@@ -1253,8 +1253,8 @@ class Xn {
|
|
|
1253
1253
|
* @return {Quaternion} A reference to this quaternion.
|
|
1254
1254
|
*/
|
|
1255
1255
|
multiplyQuaternions(e, t) {
|
|
1256
|
-
const n = e._x, r = e._y, s = e._z, a = e._w, o = t._x, l = t._y, c = t._z,
|
|
1257
|
-
return this._x = n *
|
|
1256
|
+
const n = e._x, r = e._y, s = e._z, a = e._w, o = t._x, l = t._y, c = t._z, h = t._w;
|
|
1257
|
+
return this._x = n * h + a * o + r * c - s * l, this._y = r * h + a * l + s * o - n * c, this._z = s * h + a * c + n * l - r * o, this._w = a * h - n * o - r * l - s * c, this._onChangeCallback(), this;
|
|
1258
1258
|
}
|
|
1259
1259
|
/**
|
|
1260
1260
|
* Performs a spherical linear interpolation between quaternions.
|
|
@@ -1270,8 +1270,8 @@ class Xn {
|
|
|
1270
1270
|
o < 0 && (n = -n, r = -r, s = -s, a = -a, o = -o);
|
|
1271
1271
|
let l = 1 - t;
|
|
1272
1272
|
if (o < 0.9995) {
|
|
1273
|
-
const c = Math.acos(o),
|
|
1274
|
-
l = Math.sin(l * c) /
|
|
1273
|
+
const c = Math.acos(o), h = Math.sin(c);
|
|
1274
|
+
l = Math.sin(l * c) / h, t = Math.sin(t * c) / h, this._x = this._x * l + n * t, this._y = this._y * l + r * t, this._z = this._z * l + s * t, this._w = this._w * l + a * t, this._onChangeCallback();
|
|
1275
1275
|
} else
|
|
1276
1276
|
this._x = this._x * l + n * t, this._y = this._y * l + r * t, this._z = this._z * l + s * t, this._w = this._w * l + a * t, this.normalize();
|
|
1277
1277
|
return this;
|
|
@@ -1627,8 +1627,8 @@ class U {
|
|
|
1627
1627
|
* @return {Vector3} A reference to this vector.
|
|
1628
1628
|
*/
|
|
1629
1629
|
applyQuaternion(e) {
|
|
1630
|
-
const t = this.x, n = this.y, r = this.z, s = e.x, a = e.y, o = e.z, l = e.w, c = 2 * (a * r - o * n),
|
|
1631
|
-
return this.x = t + l * c + a *
|
|
1630
|
+
const t = this.x, n = this.y, r = this.z, s = e.x, a = e.y, o = e.z, l = e.w, c = 2 * (a * r - o * n), h = 2 * (o * t - s * r), u = 2 * (s * n - a * t);
|
|
1631
|
+
return this.x = t + l * c + a * u - o * h, this.y = n + l * h + o * c - s * u, this.z = r + l * u + s * h - a * c, this;
|
|
1632
1632
|
}
|
|
1633
1633
|
/**
|
|
1634
1634
|
* Projects this vector from world space into the camera's normalized
|
|
@@ -2164,8 +2164,8 @@ class Ve {
|
|
|
2164
2164
|
* @return {Matrix3} A reference to this matrix.
|
|
2165
2165
|
*/
|
|
2166
2166
|
set(e, t, n, r, s, a, o, l, c) {
|
|
2167
|
-
const
|
|
2168
|
-
return
|
|
2167
|
+
const h = this.elements;
|
|
2168
|
+
return h[0] = e, h[1] = r, h[2] = o, h[3] = t, h[4] = s, h[5] = l, h[6] = n, h[7] = a, h[8] = c, this;
|
|
2169
2169
|
}
|
|
2170
2170
|
/**
|
|
2171
2171
|
* Sets this matrix to the 3x3 identity matrix.
|
|
@@ -2253,8 +2253,8 @@ class Ve {
|
|
|
2253
2253
|
* @return {Matrix3} A reference to this matrix.
|
|
2254
2254
|
*/
|
|
2255
2255
|
multiplyMatrices(e, t) {
|
|
2256
|
-
const n = e.elements, r = t.elements, s = this.elements, a = n[0], o = n[3], l = n[6], c = n[1],
|
|
2257
|
-
return s[0] = a * x + o * b + l * A, s[3] = a * m + o * T + l * R, s[6] = a * f + o * y + l * C, s[1] = c * x +
|
|
2256
|
+
const n = e.elements, r = t.elements, s = this.elements, a = n[0], o = n[3], l = n[6], c = n[1], h = n[4], u = n[7], d = n[2], p = n[5], _ = n[8], x = r[0], m = r[3], f = r[6], b = r[1], T = r[4], y = r[7], A = r[2], R = r[5], C = r[8];
|
|
2257
|
+
return s[0] = a * x + o * b + l * A, s[3] = a * m + o * T + l * R, s[6] = a * f + o * y + l * C, s[1] = c * x + h * b + u * A, s[4] = c * m + h * T + u * R, s[7] = c * f + h * y + u * C, s[2] = d * x + p * b + _ * A, s[5] = d * m + p * T + _ * R, s[8] = d * f + p * y + _ * C, this;
|
|
2258
2258
|
}
|
|
2259
2259
|
/**
|
|
2260
2260
|
* Multiplies every component of the matrix by the given scalar.
|
|
@@ -2272,8 +2272,8 @@ class Ve {
|
|
|
2272
2272
|
* @return {number} The determinant.
|
|
2273
2273
|
*/
|
|
2274
2274
|
determinant() {
|
|
2275
|
-
const e = this.elements, t = e[0], n = e[1], r = e[2], s = e[3], a = e[4], o = e[5], l = e[6], c = e[7],
|
|
2276
|
-
return t * a *
|
|
2275
|
+
const e = this.elements, t = e[0], n = e[1], r = e[2], s = e[3], a = e[4], o = e[5], l = e[6], c = e[7], h = e[8];
|
|
2276
|
+
return t * a * h - t * o * c - n * s * h + n * o * l + r * s * c - r * a * l;
|
|
2277
2277
|
}
|
|
2278
2278
|
/**
|
|
2279
2279
|
* Inverts this matrix, using the [analytic method](https://en.wikipedia.org/wiki/Invertible_matrix#Analytic_solution).
|
|
@@ -2283,10 +2283,10 @@ class Ve {
|
|
|
2283
2283
|
* @return {Matrix3} A reference to this matrix.
|
|
2284
2284
|
*/
|
|
2285
2285
|
invert() {
|
|
2286
|
-
const e = this.elements, t = e[0], n = e[1], r = e[2], s = e[3], a = e[4], o = e[5], l = e[6], c = e[7],
|
|
2286
|
+
const e = this.elements, t = e[0], n = e[1], r = e[2], s = e[3], a = e[4], o = e[5], l = e[6], c = e[7], h = e[8], u = h * a - o * c, d = o * l - h * s, p = c * s - a * l, _ = t * u + n * d + r * p;
|
|
2287
2287
|
if (_ === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
2288
2288
|
const x = 1 / _;
|
|
2289
|
-
return e[0] =
|
|
2289
|
+
return e[0] = u * x, e[1] = (r * c - h * n) * x, e[2] = (o * n - r * a) * x, e[3] = d * x, e[4] = (h * t - r * l) * x, e[5] = (r * s - o * t) * x, e[6] = p * x, e[7] = (n * l - c * t) * x, e[8] = (a * t - n * s) * x, this;
|
|
2290
2290
|
}
|
|
2291
2291
|
/**
|
|
2292
2292
|
* Transposes this matrix in place.
|
|
@@ -2740,8 +2740,8 @@ class At extends qn {
|
|
|
2740
2740
|
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
|
|
2741
2741
|
* @param {string} [colorSpace=NoColorSpace] - The color space.
|
|
2742
2742
|
*/
|
|
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,
|
|
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 =
|
|
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;
|
|
2745
2745
|
}
|
|
2746
2746
|
/**
|
|
2747
2747
|
* The width of the texture in pixels.
|
|
@@ -3230,16 +3230,16 @@ class pt {
|
|
|
3230
3230
|
*/
|
|
3231
3231
|
setAxisAngleFromRotationMatrix(e) {
|
|
3232
3232
|
let t, n, r, s;
|
|
3233
|
-
const l = e.elements, c = l[0],
|
|
3234
|
-
if (Math.abs(
|
|
3235
|
-
if (Math.abs(
|
|
3233
|
+
const l = e.elements, c = l[0], h = l[4], u = l[8], d = l[1], p = l[5], _ = l[9], x = l[2], m = l[6], f = l[10];
|
|
3234
|
+
if (Math.abs(h - d) < 0.01 && Math.abs(u - x) < 0.01 && Math.abs(_ - m) < 0.01) {
|
|
3235
|
+
if (Math.abs(h + d) < 0.1 && Math.abs(u + x) < 0.1 && Math.abs(_ + m) < 0.1 && Math.abs(c + p + f - 3) < 0.1)
|
|
3236
3236
|
return this.set(1, 0, 0, 0), this;
|
|
3237
3237
|
t = Math.PI;
|
|
3238
|
-
const T = (c + 1) / 2, y = (p + 1) / 2, A = (f + 1) / 2, R = (
|
|
3238
|
+
const T = (c + 1) / 2, y = (p + 1) / 2, A = (f + 1) / 2, R = (h + d) / 4, C = (u + x) / 4, F = (_ + m) / 4;
|
|
3239
3239
|
return T > y && T > A ? T < 0.01 ? (n = 0, r = 0.707106781, s = 0.707106781) : (n = Math.sqrt(T), r = R / n, s = C / n) : y > A ? y < 0.01 ? (n = 0.707106781, r = 0, s = 0.707106781) : (r = Math.sqrt(y), n = R / r, s = F / r) : A < 0.01 ? (n = 0.707106781, r = 0.707106781, s = 0) : (s = Math.sqrt(A), n = C / s, r = F / s), this.set(n, r, s, t), this;
|
|
3240
3240
|
}
|
|
3241
|
-
let b = Math.sqrt((m - _) * (m - _) + (
|
|
3242
|
-
return Math.abs(b) < 1e-3 && (b = 1), this.x = (m - _) / b, this.y = (
|
|
3241
|
+
let b = Math.sqrt((m - _) * (m - _) + (u - x) * (u - x) + (d - h) * (d - h));
|
|
3242
|
+
return Math.abs(b) < 1e-3 && (b = 1), this.x = (m - _) / b, this.y = (u - x) / b, this.z = (d - h) / b, this.w = Math.acos((c + p + f - 1) / 2), this;
|
|
3243
3243
|
}
|
|
3244
3244
|
/**
|
|
3245
3245
|
* Sets the vector components to the position elements of the
|
|
@@ -4096,8 +4096,8 @@ const ln = [
|
|
|
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);
|
|
4099
|
-
const o = r.x * Math.abs(Nn.x) + r.y * Math.abs(Nn.y) + r.z * Math.abs(Nn.z), l = e.dot(Nn), c = t.dot(Nn),
|
|
4100
|
-
if (Math.max(-Math.max(l, c,
|
|
4099
|
+
const o = r.x * Math.abs(Nn.x) + r.y * Math.abs(Nn.y) + r.z * Math.abs(Nn.z), l = e.dot(Nn), c = t.dot(Nn), h = n.dot(Nn);
|
|
4100
|
+
if (Math.max(-Math.max(l, c, h), Math.min(l, c, h)) > o)
|
|
4101
4101
|
return !1;
|
|
4102
4102
|
}
|
|
4103
4103
|
return !0;
|
|
@@ -4422,23 +4422,23 @@ class Gi {
|
|
|
4422
4422
|
*/
|
|
4423
4423
|
distanceSqToSegment(e, t, n, r) {
|
|
4424
4424
|
ts.copy(e).add(t).multiplyScalar(0.5), Ji.copy(t).sub(e).normalize(), En.copy(this.origin).sub(ts);
|
|
4425
|
-
const s = e.distanceTo(t) * 0.5, a = -this.direction.dot(Ji), o = En.dot(this.direction), l = -En.dot(Ji), c = En.lengthSq(),
|
|
4426
|
-
let
|
|
4427
|
-
if (
|
|
4428
|
-
if (
|
|
4425
|
+
const s = e.distanceTo(t) * 0.5, a = -this.direction.dot(Ji), o = En.dot(this.direction), l = -En.dot(Ji), c = En.lengthSq(), h = Math.abs(1 - a * a);
|
|
4426
|
+
let u, d, p, _;
|
|
4427
|
+
if (h > 0)
|
|
4428
|
+
if (u = a * l - o, d = a * o - l, _ = s * h, u >= 0)
|
|
4429
4429
|
if (d >= -_)
|
|
4430
4430
|
if (d <= _) {
|
|
4431
|
-
const x = 1 /
|
|
4432
|
-
|
|
4431
|
+
const x = 1 / h;
|
|
4432
|
+
u *= x, d *= x, p = u * (u + a * d + 2 * o) + d * (a * u + d + 2 * l) + c;
|
|
4433
4433
|
} else
|
|
4434
|
-
d = s,
|
|
4434
|
+
d = s, u = Math.max(0, -(a * d + o)), p = -u * u + d * (d + 2 * l) + c;
|
|
4435
4435
|
else
|
|
4436
|
-
d = -s,
|
|
4436
|
+
d = -s, u = Math.max(0, -(a * d + o)), p = -u * u + d * (d + 2 * l) + c;
|
|
4437
4437
|
else
|
|
4438
|
-
d <= -_ ? (
|
|
4438
|
+
d <= -_ ? (u = Math.max(0, -(-a * s + o)), d = u > 0 ? -s : Math.min(Math.max(-s, -l), s), p = -u * u + d * (d + 2 * l) + c) : d <= _ ? (u = 0, d = Math.min(Math.max(-s, -l), s), p = d * (d + 2 * l) + c) : (u = Math.max(0, -(a * s + o)), d = u > 0 ? s : Math.min(Math.max(-s, -l), s), p = -u * u + d * (d + 2 * l) + c);
|
|
4439
4439
|
else
|
|
4440
|
-
d = a > 0 ? -s : s,
|
|
4441
|
-
return n && n.copy(this.origin).addScaledVector(this.direction,
|
|
4440
|
+
d = a > 0 ? -s : s, u = Math.max(0, -(a * d + o)), p = -u * u + d * (d + 2 * l) + c;
|
|
4441
|
+
return n && n.copy(this.origin).addScaledVector(this.direction, u), r && r.copy(ts).addScaledVector(Ji, d), p;
|
|
4442
4442
|
}
|
|
4443
4443
|
/**
|
|
4444
4444
|
* Intersects this ray with the given sphere, returning the intersection
|
|
@@ -4510,8 +4510,8 @@ class Gi {
|
|
|
4510
4510
|
*/
|
|
4511
4511
|
intersectBox(e, t) {
|
|
4512
4512
|
let n, r, s, a, o, l;
|
|
4513
|
-
const c = 1 / this.direction.x,
|
|
4514
|
-
return c >= 0 ? (n = (e.min.x - d.x) * c, r = (e.max.x - d.x) * c) : (n = (e.max.x - d.x) * c, r = (e.min.x - d.x) * c),
|
|
4513
|
+
const c = 1 / this.direction.x, h = 1 / this.direction.y, u = 1 / this.direction.z, d = this.origin;
|
|
4514
|
+
return c >= 0 ? (n = (e.min.x - d.x) * c, r = (e.max.x - d.x) * c) : (n = (e.max.x - d.x) * c, r = (e.min.x - d.x) * c), h >= 0 ? (s = (e.min.y - d.y) * h, a = (e.max.y - d.y) * h) : (s = (e.max.y - d.y) * h, a = (e.min.y - d.y) * h), n > a || s > r || ((s > n || isNaN(n)) && (n = s), (a < r || isNaN(r)) && (r = a), u >= 0 ? (o = (e.min.z - d.z) * u, l = (e.max.z - d.z) * u) : (o = (e.max.z - d.z) * u, l = (e.min.z - d.z) * u), n > l || o > r) || ((o > n || n !== n) && (n = o), (l < r || r !== r) && (r = l), r < 0) ? null : this.at(n >= 0 ? n : r, t);
|
|
4515
4515
|
}
|
|
4516
4516
|
/**
|
|
4517
4517
|
* Returns `true` if this ray intersects with the given box.
|
|
@@ -4550,8 +4550,8 @@ class Gi {
|
|
|
4550
4550
|
const c = o * this.direction.dot(ns.cross(En));
|
|
4551
4551
|
if (c < 0 || l + c > a)
|
|
4552
4552
|
return null;
|
|
4553
|
-
const
|
|
4554
|
-
return
|
|
4553
|
+
const h = -o * En.dot(is);
|
|
4554
|
+
return h < 0 ? null : this.at(h / a, s);
|
|
4555
4555
|
}
|
|
4556
4556
|
/**
|
|
4557
4557
|
* Transforms this ray with the given 4x4 transformation matrix.
|
|
@@ -4603,7 +4603,7 @@ class ut {
|
|
|
4603
4603
|
* @param {number} [n43] - 4-3 matrix element.
|
|
4604
4604
|
* @param {number} [n44] - 4-4 matrix element.
|
|
4605
4605
|
*/
|
|
4606
|
-
constructor(e, t, n, r, s, a, o, l, c,
|
|
4606
|
+
constructor(e, t, n, r, s, a, o, l, c, h, u, d, p, _, x, m) {
|
|
4607
4607
|
ut.prototype.isMatrix4 = !0, this.elements = [
|
|
4608
4608
|
1,
|
|
4609
4609
|
0,
|
|
@@ -4621,7 +4621,7 @@ class ut {
|
|
|
4621
4621
|
0,
|
|
4622
4622
|
0,
|
|
4623
4623
|
1
|
|
4624
|
-
], e !== void 0 && this.set(e, t, n, r, s, a, o, l, c,
|
|
4624
|
+
], e !== void 0 && this.set(e, t, n, r, s, a, o, l, c, h, u, d, p, _, x, m);
|
|
4625
4625
|
}
|
|
4626
4626
|
/**
|
|
4627
4627
|
* Sets the elements of the matrix.The arguments are supposed to be
|
|
@@ -4645,9 +4645,9 @@ class ut {
|
|
|
4645
4645
|
* @param {number} [n44] - 4-4 matrix element.
|
|
4646
4646
|
* @return {Matrix4} A reference to this matrix.
|
|
4647
4647
|
*/
|
|
4648
|
-
set(e, t, n, r, s, a, o, l, c,
|
|
4648
|
+
set(e, t, n, r, s, a, o, l, c, h, u, d, p, _, x, m) {
|
|
4649
4649
|
const f = this.elements;
|
|
4650
|
-
return f[0] = e, f[4] = t, f[8] = n, f[12] = r, f[1] = s, f[5] = a, f[9] = o, f[13] = l, f[2] = c, f[6] =
|
|
4650
|
+
return f[0] = e, f[4] = t, f[8] = n, f[12] = r, f[1] = s, f[5] = a, f[9] = o, f[13] = l, f[2] = c, f[6] = h, f[10] = u, f[14] = d, f[3] = p, f[7] = _, f[11] = x, f[15] = m, this;
|
|
4651
4651
|
}
|
|
4652
4652
|
/**
|
|
4653
4653
|
* Sets this matrix to the 4x4 identity matrix.
|
|
@@ -4795,25 +4795,25 @@ class ut {
|
|
|
4795
4795
|
* @return {Matrix4} A reference to this matrix.
|
|
4796
4796
|
*/
|
|
4797
4797
|
makeRotationFromEuler(e) {
|
|
4798
|
-
const t = this.elements, n = e.x, r = e.y, s = e.z, a = Math.cos(n), o = Math.sin(n), l = Math.cos(r), c = Math.sin(r),
|
|
4798
|
+
const t = this.elements, n = e.x, r = e.y, s = e.z, a = Math.cos(n), o = Math.sin(n), l = Math.cos(r), c = Math.sin(r), h = Math.cos(s), u = Math.sin(s);
|
|
4799
4799
|
if (e.order === "XYZ") {
|
|
4800
|
-
const d = a *
|
|
4801
|
-
t[0] = l *
|
|
4800
|
+
const d = a * h, p = a * u, _ = o * h, x = o * u;
|
|
4801
|
+
t[0] = l * h, t[4] = -l * u, t[8] = c, t[1] = p + _ * c, t[5] = d - x * c, t[9] = -o * l, t[2] = x - d * c, t[6] = _ + p * c, t[10] = a * l;
|
|
4802
4802
|
} else if (e.order === "YXZ") {
|
|
4803
|
-
const d = l *
|
|
4804
|
-
t[0] = d + x * o, t[4] = _ * o - p, t[8] = a * c, t[1] = a *
|
|
4803
|
+
const d = l * h, p = l * u, _ = c * h, x = c * u;
|
|
4804
|
+
t[0] = d + x * o, t[4] = _ * o - p, t[8] = a * c, t[1] = a * u, t[5] = a * h, t[9] = -o, t[2] = p * o - _, t[6] = x + d * o, t[10] = a * l;
|
|
4805
4805
|
} else if (e.order === "ZXY") {
|
|
4806
|
-
const d = l *
|
|
4807
|
-
t[0] = d - x * o, t[4] = -a *
|
|
4806
|
+
const d = l * h, p = l * u, _ = c * h, x = c * u;
|
|
4807
|
+
t[0] = d - x * o, t[4] = -a * u, t[8] = _ + p * o, t[1] = p + _ * o, t[5] = a * h, t[9] = x - d * o, t[2] = -a * c, t[6] = o, t[10] = a * l;
|
|
4808
4808
|
} else if (e.order === "ZYX") {
|
|
4809
|
-
const d = a *
|
|
4810
|
-
t[0] = l *
|
|
4809
|
+
const d = a * h, p = a * u, _ = o * h, x = o * u;
|
|
4810
|
+
t[0] = l * h, t[4] = _ * c - p, t[8] = d * c + x, t[1] = l * u, t[5] = x * c + d, t[9] = p * c - _, t[2] = -c, t[6] = o * l, t[10] = a * l;
|
|
4811
4811
|
} else if (e.order === "YZX") {
|
|
4812
4812
|
const d = a * l, p = a * c, _ = o * l, x = o * c;
|
|
4813
|
-
t[0] = l *
|
|
4813
|
+
t[0] = l * h, t[4] = x - d * u, t[8] = _ * u + p, t[1] = u, t[5] = a * h, t[9] = -o * h, t[2] = -c * h, t[6] = p * u + _, t[10] = d - x * u;
|
|
4814
4814
|
} else if (e.order === "XZY") {
|
|
4815
4815
|
const d = a * l, p = a * c, _ = o * l, x = o * c;
|
|
4816
|
-
t[0] = l *
|
|
4816
|
+
t[0] = l * h, t[4] = -u, t[8] = c * h, t[1] = d * u + x, t[5] = a * h, t[9] = p * u - _, t[2] = _ * u - p, t[6] = o * h, t[10] = x * u + d;
|
|
4817
4817
|
}
|
|
4818
4818
|
return t[3] = 0, t[7] = 0, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
|
|
4819
4819
|
}
|
|
@@ -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],
|
|
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] =
|
|
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;
|
|
4873
4873
|
}
|
|
4874
4874
|
/**
|
|
4875
4875
|
* Multiplies every component of the matrix by the given scalar.
|
|
@@ -4889,7 +4889,7 @@ class ut {
|
|
|
4889
4889
|
* @return {number} The determinant.
|
|
4890
4890
|
*/
|
|
4891
4891
|
determinant() {
|
|
4892
|
-
const e = this.elements, t = e[0], n = e[4], r = e[8], s = e[12], a = e[1], o = e[5], l = e[9], c = e[13],
|
|
4892
|
+
const e = this.elements, t = e[0], n = e[4], r = e[8], s = e[12], a = e[1], o = e[5], l = e[9], c = e[13], h = e[2], u = e[6], d = e[10], p = e[14], _ = e[3], x = e[7], m = e[11], f = e[15], b = l * p - c * d, T = o * p - c * u, y = o * d - l * u, A = a * p - c * h, R = a * d - l * h, C = a * u - o * h;
|
|
4893
4893
|
return t * (x * b - m * T + f * y) - n * (_ * b - m * A + f * R) + r * (_ * T - x * A + f * C) - s * (_ * y - x * R + m * C);
|
|
4894
4894
|
}
|
|
4895
4895
|
/**
|
|
@@ -4923,10 +4923,10 @@ class ut {
|
|
|
4923
4923
|
* @return {Matrix4} A reference to this matrix.
|
|
4924
4924
|
*/
|
|
4925
4925
|
invert() {
|
|
4926
|
-
const e = this.elements, t = e[0], n = e[1], r = e[2], s = e[3], a = e[4], o = e[5], l = e[6], c = e[7],
|
|
4926
|
+
const e = this.elements, t = e[0], n = e[1], r = e[2], s = e[3], a = e[4], o = e[5], l = e[6], c = e[7], h = e[8], u = e[9], d = e[10], p = e[11], _ = e[12], x = e[13], m = e[14], f = e[15], b = u * m * c - x * d * c + x * l * p - o * m * p - u * l * f + o * d * f, T = _ * d * c - h * m * c - _ * l * p + a * m * p + h * l * f - a * d * f, y = h * x * c - _ * u * c + _ * o * p - a * x * p - h * o * f + a * u * f, A = _ * u * l - h * x * l - _ * o * d + a * x * d + h * o * m - a * u * m, R = t * b + n * T + r * y + s * A;
|
|
4927
4927
|
if (R === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
4928
4928
|
const C = 1 / R;
|
|
4929
|
-
return e[0] = b * C, e[1] = (x * d * s -
|
|
4929
|
+
return e[0] = b * C, e[1] = (x * d * s - u * m * s - x * r * p + n * m * p + u * r * f - n * d * f) * C, e[2] = (o * m * s - x * l * s + x * r * c - n * m * c - o * r * f + n * l * f) * C, e[3] = (u * l * s - o * d * s - u * r * c + n * d * c + o * r * p - n * l * p) * C, e[4] = T * C, e[5] = (h * m * s - _ * d * s + _ * r * p - t * m * p - h * r * f + t * d * f) * C, e[6] = (_ * l * s - a * m * s - _ * r * c + t * m * c + a * r * f - t * l * f) * C, e[7] = (a * d * s - h * l * s + h * r * c - t * d * c - a * r * p + t * l * p) * C, e[8] = y * C, e[9] = (_ * u * s - h * x * s - _ * n * p + t * x * p + h * n * f - t * u * f) * C, e[10] = (a * x * s - _ * o * s + _ * n * c - t * x * c - a * n * f + t * o * f) * C, e[11] = (h * o * s - a * u * s - h * n * c + t * u * c + a * n * p - t * o * p) * C, e[12] = A * C, e[13] = (h * x * r - _ * u * r + _ * n * d - t * x * d - h * n * m + t * u * m) * C, e[14] = (_ * o * r - a * x * r - _ * n * l + t * x * l + a * n * m - t * o * m) * C, e[15] = (a * u * r - h * o * r + h * n * l - t * u * l - a * n * d + t * o * d) * C, this;
|
|
4930
4930
|
}
|
|
4931
4931
|
/**
|
|
4932
4932
|
* Multiplies the columns of this matrix by the given vector.
|
|
@@ -5088,18 +5088,18 @@ class ut {
|
|
|
5088
5088
|
* @return {Matrix4} A reference to this matrix.
|
|
5089
5089
|
*/
|
|
5090
5090
|
makeRotationAxis(e, t) {
|
|
5091
|
-
const n = Math.cos(t), r = Math.sin(t), s = 1 - n, a = e.x, o = e.y, l = e.z, c = s * a,
|
|
5091
|
+
const n = Math.cos(t), r = Math.sin(t), s = 1 - n, a = e.x, o = e.y, l = e.z, c = s * a, h = s * o;
|
|
5092
5092
|
return this.set(
|
|
5093
5093
|
c * a + n,
|
|
5094
5094
|
c * o - r * l,
|
|
5095
5095
|
c * l + r * o,
|
|
5096
5096
|
0,
|
|
5097
5097
|
c * o + r * l,
|
|
5098
|
-
|
|
5099
|
-
|
|
5098
|
+
h * o + n,
|
|
5099
|
+
h * l - r * a,
|
|
5100
5100
|
0,
|
|
5101
5101
|
c * l - r * o,
|
|
5102
|
-
|
|
5102
|
+
h * l + r * a,
|
|
5103
5103
|
s * l * l + n,
|
|
5104
5104
|
0,
|
|
5105
5105
|
0,
|
|
@@ -5177,7 +5177,7 @@ class ut {
|
|
|
5177
5177
|
* @return {Matrix4} A reference to this matrix.
|
|
5178
5178
|
*/
|
|
5179
5179
|
compose(e, t, n) {
|
|
5180
|
-
const r = this.elements, s = t._x, a = t._y, o = t._z, l = t._w, c = s + s,
|
|
5180
|
+
const r = this.elements, s = t._x, a = t._y, o = t._z, l = t._w, c = s + s, h = a + a, u = o + o, d = s * c, p = s * h, _ = s * u, x = a * h, m = a * u, f = o * u, b = l * c, T = l * h, y = l * u, A = n.x, R = n.y, C = n.z;
|
|
5181
5181
|
return r[0] = (1 - (x + f)) * A, r[1] = (p + y) * A, r[2] = (_ - T) * A, r[3] = 0, r[4] = (p - y) * R, r[5] = (1 - (d + f)) * R, r[6] = (m + b) * R, r[7] = 0, r[8] = (_ + T) * C, r[9] = (m - b) * C, r[10] = (1 - (d + x)) * C, r[11] = 0, r[12] = e.x, r[13] = e.y, r[14] = e.z, r[15] = 1, this;
|
|
5182
5182
|
}
|
|
5183
5183
|
/**
|
|
@@ -5200,8 +5200,8 @@ class ut {
|
|
|
5200
5200
|
let s = ei.set(r[0], r[1], r[2]).length();
|
|
5201
5201
|
const a = ei.set(r[4], r[5], r[6]).length(), o = ei.set(r[8], r[9], r[10]).length();
|
|
5202
5202
|
this.determinant() < 0 && (s = -s), qt.copy(this);
|
|
5203
|
-
const c = 1 / s,
|
|
5204
|
-
return qt.elements[0] *= c, qt.elements[1] *= c, qt.elements[2] *= c, qt.elements[4] *=
|
|
5203
|
+
const c = 1 / s, h = 1 / a, u = 1 / o;
|
|
5204
|
+
return qt.elements[0] *= c, qt.elements[1] *= c, qt.elements[2] *= c, qt.elements[4] *= h, qt.elements[5] *= h, qt.elements[6] *= h, qt.elements[8] *= u, qt.elements[9] *= u, qt.elements[10] *= u, t.setFromRotationMatrix(qt), n.x = s, n.y = a, n.z = o, this;
|
|
5205
5205
|
}
|
|
5206
5206
|
/**
|
|
5207
5207
|
* Creates a perspective projection matrix. This is used internally by
|
|
@@ -5218,7 +5218,7 @@ class ut {
|
|
|
5218
5218
|
* @return {Matrix4} A reference to this matrix.
|
|
5219
5219
|
*/
|
|
5220
5220
|
makePerspective(e, t, n, r, s, a, o = tn, l = !1) {
|
|
5221
|
-
const c = this.elements,
|
|
5221
|
+
const c = this.elements, h = 2 * s / (t - e), u = 2 * s / (n - r), d = (t + e) / (t - e), p = (n + r) / (n - r);
|
|
5222
5222
|
let _, x;
|
|
5223
5223
|
if (l)
|
|
5224
5224
|
_ = s / (a - s), x = a * s / (a - s);
|
|
@@ -5228,7 +5228,7 @@ class ut {
|
|
|
5228
5228
|
_ = -a / (a - s), x = -a * s / (a - s);
|
|
5229
5229
|
else
|
|
5230
5230
|
throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: " + o);
|
|
5231
|
-
return c[0] =
|
|
5231
|
+
return c[0] = h, c[4] = 0, c[8] = d, c[12] = 0, c[1] = 0, c[5] = u, c[9] = p, c[13] = 0, c[2] = 0, c[6] = 0, c[10] = _, c[14] = x, c[3] = 0, c[7] = 0, c[11] = -1, c[15] = 0, this;
|
|
5232
5232
|
}
|
|
5233
5233
|
/**
|
|
5234
5234
|
* Creates a orthographic projection matrix. This is used internally by
|
|
@@ -5245,7 +5245,7 @@ class ut {
|
|
|
5245
5245
|
* @return {Matrix4} A reference to this matrix.
|
|
5246
5246
|
*/
|
|
5247
5247
|
makeOrthographic(e, t, n, r, s, a, o = tn, l = !1) {
|
|
5248
|
-
const c = this.elements,
|
|
5248
|
+
const c = this.elements, h = 2 / (t - e), u = 2 / (n - r), d = -(t + e) / (t - e), p = -(n + r) / (n - r);
|
|
5249
5249
|
let _, x;
|
|
5250
5250
|
if (l)
|
|
5251
5251
|
_ = 1 / (a - s), x = a / (a - s);
|
|
@@ -5255,7 +5255,7 @@ class ut {
|
|
|
5255
5255
|
_ = -1 / (a - s), x = -s / (a - s);
|
|
5256
5256
|
else
|
|
5257
5257
|
throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: " + o);
|
|
5258
|
-
return c[0] =
|
|
5258
|
+
return c[0] = h, c[4] = 0, c[8] = 0, c[12] = d, c[1] = 0, c[5] = u, c[9] = 0, c[13] = p, c[2] = 0, c[6] = 0, c[10] = _, c[14] = x, c[3] = 0, c[7] = 0, c[11] = 0, c[15] = 1, this;
|
|
5259
5259
|
}
|
|
5260
5260
|
/**
|
|
5261
5261
|
* Returns `true` if this matrix is equal with the given one.
|
|
@@ -5393,25 +5393,25 @@ class vn {
|
|
|
5393
5393
|
* @return {Euler} A reference to this Euler instance.
|
|
5394
5394
|
*/
|
|
5395
5395
|
setFromRotationMatrix(e, t = this._order, n = !0) {
|
|
5396
|
-
const r = e.elements, s = r[0], a = r[4], o = r[8], l = r[1], c = r[5],
|
|
5396
|
+
const r = e.elements, s = r[0], a = r[4], o = r[8], l = r[1], c = r[5], h = r[9], u = r[2], d = r[6], p = r[10];
|
|
5397
5397
|
switch (t) {
|
|
5398
5398
|
case "XYZ":
|
|
5399
|
-
this._y = Math.asin(Xe(o, -1, 1)), Math.abs(o) < 0.9999999 ? (this._x = Math.atan2(-
|
|
5399
|
+
this._y = Math.asin(Xe(o, -1, 1)), Math.abs(o) < 0.9999999 ? (this._x = Math.atan2(-h, p), this._z = Math.atan2(-a, s)) : (this._x = Math.atan2(d, c), this._z = 0);
|
|
5400
5400
|
break;
|
|
5401
5401
|
case "YXZ":
|
|
5402
|
-
this._x = Math.asin(-Xe(
|
|
5402
|
+
this._x = Math.asin(-Xe(h, -1, 1)), Math.abs(h) < 0.9999999 ? (this._y = Math.atan2(o, p), this._z = Math.atan2(l, c)) : (this._y = Math.atan2(-u, s), this._z = 0);
|
|
5403
5403
|
break;
|
|
5404
5404
|
case "ZXY":
|
|
5405
|
-
this._x = Math.asin(Xe(d, -1, 1)), Math.abs(d) < 0.9999999 ? (this._y = Math.atan2(-
|
|
5405
|
+
this._x = Math.asin(Xe(d, -1, 1)), Math.abs(d) < 0.9999999 ? (this._y = Math.atan2(-u, p), this._z = Math.atan2(-a, c)) : (this._y = 0, this._z = Math.atan2(l, s));
|
|
5406
5406
|
break;
|
|
5407
5407
|
case "ZYX":
|
|
5408
|
-
this._y = Math.asin(-Xe(
|
|
5408
|
+
this._y = Math.asin(-Xe(u, -1, 1)), Math.abs(u) < 0.9999999 ? (this._x = Math.atan2(d, p), this._z = Math.atan2(l, s)) : (this._x = 0, this._z = Math.atan2(-a, c));
|
|
5409
5409
|
break;
|
|
5410
5410
|
case "YZX":
|
|
5411
|
-
this._z = Math.asin(Xe(l, -1, 1)), Math.abs(l) < 0.9999999 ? (this._x = Math.atan2(-
|
|
5411
|
+
this._z = Math.asin(Xe(l, -1, 1)), Math.abs(l) < 0.9999999 ? (this._x = Math.atan2(-h, c), this._y = Math.atan2(-u, s)) : (this._x = 0, this._y = Math.atan2(o, p));
|
|
5412
5412
|
break;
|
|
5413
5413
|
case "XZY":
|
|
5414
|
-
this._z = Math.asin(-Xe(a, -1, 1)), Math.abs(a) < 0.9999999 ? (this._x = Math.atan2(d, c), this._y = Math.atan2(o, s)) : (this._x = Math.atan2(-
|
|
5414
|
+
this._z = Math.asin(-Xe(a, -1, 1)), Math.abs(a) < 0.9999999 ? (this._x = Math.atan2(d, c), this._y = Math.atan2(o, s)) : (this._x = Math.atan2(-h, p), this._y = 0);
|
|
5415
5415
|
break;
|
|
5416
5416
|
default:
|
|
5417
5417
|
Fe("Euler: .setFromRotationMatrix() encountered an unknown order: " + t);
|
|
@@ -6154,9 +6154,9 @@ class yt extends qn {
|
|
|
6154
6154
|
if (o !== void 0 && o.shapes !== void 0) {
|
|
6155
6155
|
const l = o.shapes;
|
|
6156
6156
|
if (Array.isArray(l))
|
|
6157
|
-
for (let c = 0,
|
|
6158
|
-
const
|
|
6159
|
-
s(e.shapes,
|
|
6157
|
+
for (let c = 0, h = l.length; c < h; c++) {
|
|
6158
|
+
const u = l[c];
|
|
6159
|
+
s(e.shapes, u);
|
|
6160
6160
|
}
|
|
6161
6161
|
else
|
|
6162
6162
|
s(e.shapes, l);
|
|
@@ -6183,15 +6183,15 @@ class yt extends qn {
|
|
|
6183
6183
|
}
|
|
6184
6184
|
}
|
|
6185
6185
|
if (t) {
|
|
6186
|
-
const o = a(e.geometries), l = a(e.materials), c = a(e.textures),
|
|
6187
|
-
o.length > 0 && (n.geometries = o), l.length > 0 && (n.materials = l), c.length > 0 && (n.textures = c),
|
|
6186
|
+
const o = a(e.geometries), l = a(e.materials), c = a(e.textures), h = a(e.images), u = a(e.shapes), d = a(e.skeletons), p = a(e.animations), _ = a(e.nodes);
|
|
6187
|
+
o.length > 0 && (n.geometries = o), l.length > 0 && (n.materials = l), c.length > 0 && (n.textures = c), h.length > 0 && (n.images = h), u.length > 0 && (n.shapes = u), d.length > 0 && (n.skeletons = d), p.length > 0 && (n.animations = p), _.length > 0 && (n.nodes = _);
|
|
6188
6188
|
}
|
|
6189
6189
|
return n.object = r, n;
|
|
6190
6190
|
function a(o) {
|
|
6191
6191
|
const l = [];
|
|
6192
6192
|
for (const c in o) {
|
|
6193
|
-
const
|
|
6194
|
-
delete
|
|
6193
|
+
const h = o[c];
|
|
6194
|
+
delete h.metadata, l.push(h);
|
|
6195
6195
|
}
|
|
6196
6196
|
return l;
|
|
6197
6197
|
}
|
|
@@ -6263,10 +6263,10 @@ class Wt {
|
|
|
6263
6263
|
*/
|
|
6264
6264
|
static getBarycoord(e, t, n, r, s) {
|
|
6265
6265
|
Yt.subVectors(r, t), hn.subVectors(n, t), ss.subVectors(e, t);
|
|
6266
|
-
const a = Yt.dot(Yt), o = Yt.dot(hn), l = Yt.dot(ss), c = hn.dot(hn),
|
|
6267
|
-
if (
|
|
6266
|
+
const a = Yt.dot(Yt), o = Yt.dot(hn), l = Yt.dot(ss), c = hn.dot(hn), h = hn.dot(ss), u = a * c - o * o;
|
|
6267
|
+
if (u === 0)
|
|
6268
6268
|
return s.set(0, 0, 0), null;
|
|
6269
|
-
const d = 1 /
|
|
6269
|
+
const d = 1 / u, p = (c * l - o * h) * d, _ = (a * h - o * l) * d;
|
|
6270
6270
|
return s.set(1 - p - _, _, p);
|
|
6271
6271
|
}
|
|
6272
6272
|
/**
|
|
@@ -6482,12 +6482,12 @@ class Wt {
|
|
|
6482
6482
|
if (l <= 0 && c <= 0)
|
|
6483
6483
|
return t.copy(n);
|
|
6484
6484
|
os.subVectors(e, r);
|
|
6485
|
-
const
|
|
6486
|
-
if (
|
|
6485
|
+
const h = ii.dot(os), u = ri.dot(os);
|
|
6486
|
+
if (h >= 0 && u <= h)
|
|
6487
6487
|
return t.copy(r);
|
|
6488
|
-
const d = l *
|
|
6489
|
-
if (d <= 0 && l >= 0 &&
|
|
6490
|
-
return a = l / (l -
|
|
6488
|
+
const d = l * u - h * c;
|
|
6489
|
+
if (d <= 0 && l >= 0 && h <= 0)
|
|
6490
|
+
return a = l / (l - h), t.copy(n).addScaledVector(ii, a);
|
|
6491
6491
|
ls.subVectors(e, s);
|
|
6492
6492
|
const p = ii.dot(ls), _ = ri.dot(ls);
|
|
6493
6493
|
if (_ >= 0 && p <= _)
|
|
@@ -6495,9 +6495,9 @@ class Wt {
|
|
|
6495
6495
|
const x = p * c - l * _;
|
|
6496
6496
|
if (x <= 0 && c >= 0 && _ <= 0)
|
|
6497
6497
|
return o = c / (c - _), t.copy(n).addScaledVector(ri, o);
|
|
6498
|
-
const m =
|
|
6499
|
-
if (m <= 0 &&
|
|
6500
|
-
return uo.subVectors(s, r), o = (
|
|
6498
|
+
const m = h * _ - p * u;
|
|
6499
|
+
if (m <= 0 && u - h >= 0 && p - _ >= 0)
|
|
6500
|
+
return uo.subVectors(s, r), o = (u - h) / (u - h + (p - _)), t.copy(r).addScaledVector(uo, o);
|
|
6501
6501
|
const f = 1 / (m + x + d);
|
|
6502
6502
|
return a = x * f, o = d * f, t.copy(n).addScaledVector(ii, a).addScaledVector(ri, o);
|
|
6503
6503
|
}
|
|
@@ -6910,25 +6910,25 @@ class Ze {
|
|
|
6910
6910
|
$e.workingToColorSpace(bt.copy(this), t);
|
|
6911
6911
|
const n = bt.r, r = bt.g, s = bt.b, a = Math.max(n, r, s), o = Math.min(n, r, s);
|
|
6912
6912
|
let l, c;
|
|
6913
|
-
const
|
|
6913
|
+
const h = (o + a) / 2;
|
|
6914
6914
|
if (o === a)
|
|
6915
6915
|
l = 0, c = 0;
|
|
6916
6916
|
else {
|
|
6917
|
-
const
|
|
6918
|
-
switch (c =
|
|
6917
|
+
const u = a - o;
|
|
6918
|
+
switch (c = h <= 0.5 ? u / (a + o) : u / (2 - a - o), a) {
|
|
6919
6919
|
case n:
|
|
6920
|
-
l = (r - s) /
|
|
6920
|
+
l = (r - s) / u + (r < s ? 6 : 0);
|
|
6921
6921
|
break;
|
|
6922
6922
|
case r:
|
|
6923
|
-
l = (s - n) /
|
|
6923
|
+
l = (s - n) / u + 2;
|
|
6924
6924
|
break;
|
|
6925
6925
|
case s:
|
|
6926
|
-
l = (n - r) /
|
|
6926
|
+
l = (n - r) / u + 4;
|
|
6927
6927
|
break;
|
|
6928
6928
|
}
|
|
6929
6929
|
l /= 6;
|
|
6930
6930
|
}
|
|
6931
|
-
return e.h = l, e.s = c, e.l =
|
|
6931
|
+
return e.h = l, e.s = c, e.l = h, e;
|
|
6932
6932
|
}
|
|
6933
6933
|
/**
|
|
6934
6934
|
* Returns the RGB values of this color and stores them into the given target object.
|
|
@@ -7976,7 +7976,7 @@ class Ut extends qn {
|
|
|
7976
7976
|
if (t)
|
|
7977
7977
|
for (let s = 0, a = t.length; s < a; s++) {
|
|
7978
7978
|
const o = t[s], l = this.morphTargetsRelative;
|
|
7979
|
-
for (let c = 0,
|
|
7979
|
+
for (let c = 0, h = o.count; c < h; c++)
|
|
7980
7980
|
vt.fromBufferAttribute(o, c), l && (si.fromBufferAttribute(e, c), vt.add(si)), r = Math.max(r, n.distanceToSquared(vt));
|
|
7981
7981
|
}
|
|
7982
7982
|
this.boundingSphere.radius = Math.sqrt(r), isNaN(this.boundingSphere.radius) && qe('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this);
|
|
@@ -8000,11 +8000,11 @@ class Ut extends qn {
|
|
|
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
|
-
const c = new U(),
|
|
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
8004
|
function f(F, M, S) {
|
|
8005
|
-
c.fromBufferAttribute(n, F),
|
|
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);
|
|
8006
8006
|
const D = 1 / (p.x * _.y - _.x * p.y);
|
|
8007
|
-
isFinite(D) && (x.copy(
|
|
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));
|
|
8008
8008
|
}
|
|
8009
8009
|
let b = this.groups;
|
|
8010
8010
|
b.length === 0 && (b = [{
|
|
@@ -8049,15 +8049,15 @@ class Ut extends qn {
|
|
|
8049
8049
|
else
|
|
8050
8050
|
for (let d = 0, p = n.count; d < p; d++)
|
|
8051
8051
|
n.setXYZ(d, 0, 0, 0);
|
|
8052
|
-
const r = new U(), s = new U(), a = new U(), o = new U(), l = new U(), c = new U(),
|
|
8052
|
+
const r = new U(), s = new U(), a = new U(), o = new U(), l = new U(), c = new U(), h = new U(), u = new U();
|
|
8053
8053
|
if (e)
|
|
8054
8054
|
for (let d = 0, p = e.count; d < p; d += 3) {
|
|
8055
8055
|
const _ = e.getX(d + 0), x = e.getX(d + 1), m = e.getX(d + 2);
|
|
8056
|
-
r.fromBufferAttribute(t, _), s.fromBufferAttribute(t, x), a.fromBufferAttribute(t, m),
|
|
8056
|
+
r.fromBufferAttribute(t, _), s.fromBufferAttribute(t, x), a.fromBufferAttribute(t, m), h.subVectors(a, s), u.subVectors(r, s), h.cross(u), o.fromBufferAttribute(n, _), l.fromBufferAttribute(n, x), c.fromBufferAttribute(n, m), o.add(h), l.add(h), c.add(h), n.setXYZ(_, o.x, o.y, o.z), n.setXYZ(x, l.x, l.y, l.z), n.setXYZ(m, c.x, c.y, c.z);
|
|
8057
8057
|
}
|
|
8058
8058
|
else
|
|
8059
8059
|
for (let d = 0, p = t.count; d < p; d += 3)
|
|
8060
|
-
r.fromBufferAttribute(t, d + 0), s.fromBufferAttribute(t, d + 1), a.fromBufferAttribute(t, d + 2),
|
|
8060
|
+
r.fromBufferAttribute(t, d + 0), s.fromBufferAttribute(t, d + 1), a.fromBufferAttribute(t, d + 2), h.subVectors(a, s), u.subVectors(r, s), h.cross(u), n.setXYZ(d + 0, h.x, h.y, h.z), n.setXYZ(d + 1, h.x, h.y, h.z), n.setXYZ(d + 2, h.x, h.y, h.z);
|
|
8061
8061
|
this.normalizeNormals(), n.needsUpdate = !0;
|
|
8062
8062
|
}
|
|
8063
8063
|
}
|
|
@@ -8078,14 +8078,14 @@ class Ut extends qn {
|
|
|
8078
8078
|
*/
|
|
8079
8079
|
toNonIndexed() {
|
|
8080
8080
|
function e(o, l) {
|
|
8081
|
-
const c = o.array,
|
|
8081
|
+
const c = o.array, h = o.itemSize, u = o.normalized, d = new c.constructor(l.length * h);
|
|
8082
8082
|
let p = 0, _ = 0;
|
|
8083
8083
|
for (let x = 0, m = l.length; x < m; x++) {
|
|
8084
|
-
o.isInterleavedBufferAttribute ? p = l[x] * o.data.stride + o.offset : p = l[x] *
|
|
8085
|
-
for (let f = 0; f <
|
|
8084
|
+
o.isInterleavedBufferAttribute ? p = l[x] * o.data.stride + o.offset : p = l[x] * h;
|
|
8085
|
+
for (let f = 0; f < h; f++)
|
|
8086
8086
|
d[_++] = c[p++];
|
|
8087
8087
|
}
|
|
8088
|
-
return new Mt(d,
|
|
8088
|
+
return new Mt(d, h, u);
|
|
8089
8089
|
}
|
|
8090
8090
|
if (this.index === null)
|
|
8091
8091
|
return Fe("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."), this;
|
|
@@ -8097,8 +8097,8 @@ class Ut extends qn {
|
|
|
8097
8097
|
const s = this.morphAttributes;
|
|
8098
8098
|
for (const o in s) {
|
|
8099
8099
|
const l = [], c = s[o];
|
|
8100
|
-
for (let
|
|
8101
|
-
const d = c[
|
|
8100
|
+
for (let h = 0, u = c.length; h < u; h++) {
|
|
8101
|
+
const d = c[h], p = e(d, n);
|
|
8102
8102
|
l.push(p);
|
|
8103
8103
|
}
|
|
8104
8104
|
t.morphAttributes[o] = l;
|
|
@@ -8144,12 +8144,12 @@ class Ut extends qn {
|
|
|
8144
8144
|
const r = {};
|
|
8145
8145
|
let s = !1;
|
|
8146
8146
|
for (const l in this.morphAttributes) {
|
|
8147
|
-
const c = this.morphAttributes[l],
|
|
8148
|
-
for (let
|
|
8149
|
-
const p = c[
|
|
8150
|
-
|
|
8147
|
+
const c = this.morphAttributes[l], h = [];
|
|
8148
|
+
for (let u = 0, d = c.length; u < d; u++) {
|
|
8149
|
+
const p = c[u];
|
|
8150
|
+
h.push(p.toJSON(e.data));
|
|
8151
8151
|
}
|
|
8152
|
-
|
|
8152
|
+
h.length > 0 && (r[l] = h, s = !0);
|
|
8153
8153
|
}
|
|
8154
8154
|
s && (e.data.morphAttributes = r, e.data.morphTargetsRelative = this.morphTargetsRelative);
|
|
8155
8155
|
const a = this.groups;
|
|
@@ -8179,21 +8179,21 @@ class Ut extends qn {
|
|
|
8179
8179
|
n !== null && this.setIndex(n.clone());
|
|
8180
8180
|
const r = e.attributes;
|
|
8181
8181
|
for (const c in r) {
|
|
8182
|
-
const
|
|
8183
|
-
this.setAttribute(c,
|
|
8182
|
+
const h = r[c];
|
|
8183
|
+
this.setAttribute(c, h.clone(t));
|
|
8184
8184
|
}
|
|
8185
8185
|
const s = e.morphAttributes;
|
|
8186
8186
|
for (const c in s) {
|
|
8187
|
-
const
|
|
8188
|
-
for (let d = 0, p =
|
|
8189
|
-
|
|
8190
|
-
this.morphAttributes[c] =
|
|
8187
|
+
const h = [], u = s[c];
|
|
8188
|
+
for (let d = 0, p = u.length; d < p; d++)
|
|
8189
|
+
h.push(u[d].clone(t));
|
|
8190
|
+
this.morphAttributes[c] = h;
|
|
8191
8191
|
}
|
|
8192
8192
|
this.morphTargetsRelative = e.morphTargetsRelative;
|
|
8193
8193
|
const a = e.groups;
|
|
8194
|
-
for (let c = 0,
|
|
8195
|
-
const
|
|
8196
|
-
this.addGroup(
|
|
8194
|
+
for (let c = 0, h = a.length; c < h; c++) {
|
|
8195
|
+
const u = a[c];
|
|
8196
|
+
this.addGroup(u.start, u.count, u.materialIndex);
|
|
8197
8197
|
}
|
|
8198
8198
|
const o = e.boundingBox;
|
|
8199
8199
|
o !== null && (this.boundingBox = o.clone());
|
|
@@ -8256,8 +8256,8 @@ class Mn extends yt {
|
|
|
8256
8256
|
if (s && o) {
|
|
8257
8257
|
lr.set(0, 0, 0);
|
|
8258
8258
|
for (let l = 0, c = s.length; l < c; l++) {
|
|
8259
|
-
const
|
|
8260
|
-
|
|
8259
|
+
const h = o[l], u = s[l];
|
|
8260
|
+
h !== 0 && (ps.fromBufferAttribute(u, e), a ? lr.addScaledVector(ps, h) : lr.addScaledVector(ps.sub(t), h));
|
|
8261
8261
|
}
|
|
8262
8262
|
t.add(lr);
|
|
8263
8263
|
}
|
|
@@ -8275,21 +8275,21 @@ class Mn extends yt {
|
|
|
8275
8275
|
}
|
|
8276
8276
|
_computeIntersections(e, t, n) {
|
|
8277
8277
|
let r;
|
|
8278
|
-
const s = this.geometry, a = this.material, o = s.index, l = s.attributes.position, c = s.attributes.uv,
|
|
8278
|
+
const s = this.geometry, a = this.material, o = s.index, l = s.attributes.position, c = s.attributes.uv, h = s.attributes.uv1, u = s.attributes.normal, d = s.groups, p = s.drawRange;
|
|
8279
8279
|
if (o !== null)
|
|
8280
8280
|
if (Array.isArray(a))
|
|
8281
8281
|
for (let _ = 0, x = d.length; _ < x; _++) {
|
|
8282
8282
|
const m = d[_], f = a[m.materialIndex], b = Math.max(m.start, p.start), T = Math.min(o.count, Math.min(m.start + m.count, p.start + p.count));
|
|
8283
8283
|
for (let y = b, A = T; y < A; y += 3) {
|
|
8284
8284
|
const R = o.getX(y), C = o.getX(y + 1), F = o.getX(y + 2);
|
|
8285
|
-
r = ur(this, f, e, n, c,
|
|
8285
|
+
r = ur(this, f, e, n, c, h, u, R, C, F), r && (r.faceIndex = Math.floor(y / 3), r.face.materialIndex = m.materialIndex, t.push(r));
|
|
8286
8286
|
}
|
|
8287
8287
|
}
|
|
8288
8288
|
else {
|
|
8289
8289
|
const _ = Math.max(0, p.start), x = Math.min(o.count, p.start + p.count);
|
|
8290
8290
|
for (let m = _, f = x; m < f; m += 3) {
|
|
8291
8291
|
const b = o.getX(m), T = o.getX(m + 1), y = o.getX(m + 2);
|
|
8292
|
-
r = ur(this, a, e, n, c,
|
|
8292
|
+
r = ur(this, a, e, n, c, h, u, b, T, y), r && (r.faceIndex = Math.floor(m / 3), t.push(r));
|
|
8293
8293
|
}
|
|
8294
8294
|
}
|
|
8295
8295
|
else if (l !== void 0)
|
|
@@ -8298,14 +8298,14 @@ class Mn extends yt {
|
|
|
8298
8298
|
const m = d[_], f = a[m.materialIndex], b = Math.max(m.start, p.start), T = Math.min(l.count, Math.min(m.start + m.count, p.start + p.count));
|
|
8299
8299
|
for (let y = b, A = T; y < A; y += 3) {
|
|
8300
8300
|
const R = y, C = y + 1, F = y + 2;
|
|
8301
|
-
r = ur(this, f, e, n, c,
|
|
8301
|
+
r = ur(this, f, e, n, c, h, u, R, C, F), r && (r.faceIndex = Math.floor(y / 3), r.face.materialIndex = m.materialIndex, t.push(r));
|
|
8302
8302
|
}
|
|
8303
8303
|
}
|
|
8304
8304
|
else {
|
|
8305
8305
|
const _ = Math.max(0, p.start), x = Math.min(l.count, p.start + p.count);
|
|
8306
8306
|
for (let m = _, f = x; m < f; m += 3) {
|
|
8307
8307
|
const b = m, T = m + 1, y = m + 2;
|
|
8308
|
-
r = ur(this, a, e, n, c,
|
|
8308
|
+
r = ur(this, a, e, n, c, h, u, b, T, y), r && (r.faceIndex = Math.floor(m / 3), t.push(r));
|
|
8309
8309
|
}
|
|
8310
8310
|
}
|
|
8311
8311
|
}
|
|
@@ -8323,10 +8323,10 @@ function fu(i, e, t, n, r, s, a, o) {
|
|
|
8323
8323
|
}
|
|
8324
8324
|
function ur(i, e, t, n, r, s, a, o, l, c) {
|
|
8325
8325
|
i.getVertexPosition(o, sr), i.getVertexPosition(l, ar), i.getVertexPosition(c, or);
|
|
8326
|
-
const
|
|
8327
|
-
if (
|
|
8328
|
-
const
|
|
8329
|
-
Wt.getBarycoord(po, sr, ar, or,
|
|
8326
|
+
const h = fu(i, e, t, n, sr, ar, or, po);
|
|
8327
|
+
if (h) {
|
|
8328
|
+
const u = new U();
|
|
8329
|
+
Wt.getBarycoord(po, sr, ar, or, u), r && (h.uv = Wt.getInterpolatedAttribute(r, o, l, c, u, new Ne())), s && (h.uv1 = Wt.getInterpolatedAttribute(s, o, l, c, u, new Ne())), a && (h.normal = Wt.getInterpolatedAttribute(a, o, l, c, u, new U()), h.normal.dot(n.direction) > 0 && h.normal.multiplyScalar(-1));
|
|
8330
8330
|
const d = {
|
|
8331
8331
|
a: o,
|
|
8332
8332
|
b: l,
|
|
@@ -8334,9 +8334,9 @@ function ur(i, e, t, n, r, s, a, o, l, c) {
|
|
|
8334
8334
|
normal: new U(),
|
|
8335
8335
|
materialIndex: 0
|
|
8336
8336
|
};
|
|
8337
|
-
Wt.getNormal(sr, ar, or, d.normal),
|
|
8337
|
+
Wt.getNormal(sr, ar, or, d.normal), h.face = d, h.barycoord = u;
|
|
8338
8338
|
}
|
|
8339
|
-
return
|
|
8339
|
+
return h;
|
|
8340
8340
|
}
|
|
8341
8341
|
class Wi extends Ut {
|
|
8342
8342
|
/**
|
|
@@ -8360,9 +8360,9 @@ class Wi extends Ut {
|
|
|
8360
8360
|
};
|
|
8361
8361
|
const o = this;
|
|
8362
8362
|
r = Math.floor(r), s = Math.floor(s), a = Math.floor(a);
|
|
8363
|
-
const l = [], c = [],
|
|
8363
|
+
const l = [], c = [], h = [], u = [];
|
|
8364
8364
|
let d = 0, p = 0;
|
|
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(
|
|
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
8366
|
function _(x, m, f, b, T, y, A, R, C, F, M) {
|
|
8367
8367
|
const S = y / C, D = A / F, z = y / 2, B = A / 2, G = R / 2, X = C + 1, k = F + 1;
|
|
8368
8368
|
let H = 0, $ = 0;
|
|
@@ -8371,7 +8371,7 @@ class Wi extends Ut {
|
|
|
8371
8371
|
const re = se * D - B;
|
|
8372
8372
|
for (let Le = 0; Le < X; Le++) {
|
|
8373
8373
|
const we = Le * S - z;
|
|
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,
|
|
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++)
|
|
@@ -8752,10 +8752,10 @@ class xu extends yt {
|
|
|
8752
8752
|
this.parent === null && this.updateMatrixWorld();
|
|
8753
8753
|
const { renderTarget: n, activeMipmapLevel: r } = this;
|
|
8754
8754
|
this.coordinateSystem !== e.coordinateSystem && (this.coordinateSystem = e.coordinateSystem, this.updateCoordinateSystem());
|
|
8755
|
-
const [s, a, o, l, c,
|
|
8755
|
+
const [s, a, o, l, c, h] = this.children, u = e.getRenderTarget(), d = e.getActiveCubeFace(), p = e.getActiveMipmapLevel(), _ = e.xr.enabled;
|
|
8756
8756
|
e.xr.enabled = !1;
|
|
8757
8757
|
const x = n.texture.generateMipmaps;
|
|
8758
|
-
n.texture.generateMipmaps = !1, e.setRenderTarget(n, 0, r), e.render(t, s), e.setRenderTarget(n, 1, r), e.render(t, a), e.setRenderTarget(n, 2, r), e.render(t, o), e.setRenderTarget(n, 3, r), e.render(t, l), e.setRenderTarget(n, 4, r), e.render(t, c), n.texture.generateMipmaps = x, e.setRenderTarget(n, 5, r), e.render(t,
|
|
8758
|
+
n.texture.generateMipmaps = !1, e.setRenderTarget(n, 0, r), e.render(t, s), e.setRenderTarget(n, 1, r), e.render(t, a), e.setRenderTarget(n, 2, r), e.render(t, o), e.setRenderTarget(n, 3, r), e.render(t, l), e.setRenderTarget(n, 4, r), e.render(t, c), n.texture.generateMipmaps = x, e.setRenderTarget(n, 5, r), e.render(t, h), e.setRenderTarget(u, d, p), e.xr.enabled = _, n.texture.needsPMREMUpdate = !0;
|
|
8759
8759
|
}
|
|
8760
8760
|
}
|
|
8761
8761
|
class Cl extends At {
|
|
@@ -8773,8 +8773,8 @@ class Cl extends At {
|
|
|
8773
8773
|
* @param {number} [anisotropy=Texture.DEFAULT_ANISOTROPY] - The anisotropy value.
|
|
8774
8774
|
* @param {string} [colorSpace=NoColorSpace] - The color space value.
|
|
8775
8775
|
*/
|
|
8776
|
-
constructor(e = [], t = Wn, n, r, s, a, o, l, c,
|
|
8777
|
-
super(e, t, n, r, s, a, o, l, c,
|
|
8776
|
+
constructor(e = [], t = Wn, n, r, s, a, o, l, c, h) {
|
|
8777
|
+
super(e, t, n, r, s, a, o, l, c, h), this.isCubeTexture = !0, this.flipY = !1;
|
|
8778
8778
|
}
|
|
8779
8779
|
/**
|
|
8780
8780
|
* Alias for {@link CubeTexture#image}.
|
|
@@ -8974,7 +8974,7 @@ class ms {
|
|
|
8974
8974
|
const m = t.getJointPose(x, n), f = this._getHandJoint(c, x);
|
|
8975
8975
|
m !== null && (f.matrix.fromArray(m.transform.matrix), f.matrix.decompose(f.position, f.rotation, f.scale), f.matrixWorldNeedsUpdate = !0, f.jointRadius = m.radius), f.visible = m !== null;
|
|
8976
8976
|
}
|
|
8977
|
-
const
|
|
8977
|
+
const h = c.joints["index-finger-tip"], u = c.joints["thumb-tip"], d = h.position.distanceTo(u.position), p = 0.02, _ = 5e-3;
|
|
8978
8978
|
c.inputState.pinching && d > p + _ ? (c.inputState.pinching = !1, this.dispatchEvent({
|
|
8979
8979
|
type: "pinchend",
|
|
8980
8980
|
handedness: e.handedness,
|
|
@@ -9516,8 +9516,8 @@ 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,
|
|
9520
|
-
super(null, a, o, l, c,
|
|
9519
|
+
constructor(e = null, t = 1, n = 1, r, s, a, o, l, c = St, h = St, u, d) {
|
|
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
9523
|
const _s = /* @__PURE__ */ new U(), bu = /* @__PURE__ */ new U(), Tu = /* @__PURE__ */ new Ve();
|
|
@@ -9782,8 +9782,8 @@ class Il {
|
|
|
9782
9782
|
* @return {Frustum} A reference to this frustum.
|
|
9783
9783
|
*/
|
|
9784
9784
|
setFromProjectionMatrix(e, t = tn, n = !1) {
|
|
9785
|
-
const r = this.planes, s = e.elements, a = s[0], o = s[1], l = s[2], c = s[3],
|
|
9786
|
-
if (r[0].setComponents(c - a, p -
|
|
9785
|
+
const r = this.planes, s = e.elements, a = s[0], o = s[1], l = s[2], c = s[3], h = s[4], u = s[5], d = s[6], p = s[7], _ = s[8], x = s[9], m = s[10], f = s[11], b = s[12], T = s[13], y = s[14], A = s[15];
|
|
9786
|
+
if (r[0].setComponents(c - a, p - h, f - _, A - b).normalize(), r[1].setComponents(c + a, p + h, f + _, A + b).normalize(), r[2].setComponents(c + o, p + u, f + x, A + T).normalize(), r[3].setComponents(c - o, p - u, f - x, A - T).normalize(), n)
|
|
9787
9787
|
r[4].setComponents(l, d, m, y).normalize(), r[5].setComponents(c - l, p - d, f - m, A - y).normalize();
|
|
9788
9788
|
else if (r[4].setComponents(c - l, p - d, f - m, A - y).normalize(), t === tn)
|
|
9789
9789
|
r[5].setComponents(c + l, p + d, f + m, A + y).normalize();
|
|
@@ -9930,15 +9930,15 @@ class wu extends yt {
|
|
|
9930
9930
|
const n = this.geometry, r = this.matrixWorld, s = e.params.Line.threshold, a = n.drawRange;
|
|
9931
9931
|
if (n.boundingSphere === null && n.computeBoundingSphere(), mr.copy(n.boundingSphere), mr.applyMatrix4(r), mr.radius += s, e.ray.intersectsSphere(mr) === !1) return;
|
|
9932
9932
|
vo.copy(r).invert(), Di.copy(e.ray).applyMatrix4(vo);
|
|
9933
|
-
const o = s / ((this.scale.x + this.scale.y + this.scale.z) / 3), l = o * o, c = this.isLineSegments ? 2 : 1,
|
|
9934
|
-
if (
|
|
9935
|
-
const p = Math.max(0, a.start), _ = Math.min(
|
|
9933
|
+
const o = s / ((this.scale.x + this.scale.y + this.scale.z) / 3), l = o * o, c = this.isLineSegments ? 2 : 1, h = n.index, d = n.attributes.position;
|
|
9934
|
+
if (h !== null) {
|
|
9935
|
+
const p = Math.max(0, a.start), _ = Math.min(h.count, a.start + a.count);
|
|
9936
9936
|
for (let x = p, m = _ - 1; x < m; x += c) {
|
|
9937
|
-
const f =
|
|
9937
|
+
const f = h.getX(x), b = h.getX(x + 1), T = gr(this, e, Di, l, f, b, x);
|
|
9938
9938
|
T && t.push(T);
|
|
9939
9939
|
}
|
|
9940
9940
|
if (this.isLineLoop) {
|
|
9941
|
-
const x =
|
|
9941
|
+
const x = h.getX(_ - 1), m = h.getX(p), f = gr(this, e, Di, l, x, m, _ - 1);
|
|
9942
9942
|
f && t.push(f);
|
|
9943
9943
|
}
|
|
9944
9944
|
} else {
|
|
@@ -10030,17 +10030,17 @@ class Cu extends yt {
|
|
|
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
10032
|
So.copy(r).invert(), va.copy(e.ray).applyMatrix4(So);
|
|
10033
|
-
const o = s / ((this.scale.x + this.scale.y + this.scale.z) / 3), l = o * o, c = n.index,
|
|
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);
|
|
10036
10036
|
for (let _ = d, x = p; _ < x; _++) {
|
|
10037
10037
|
const m = c.getX(_);
|
|
10038
|
-
xr.fromBufferAttribute(
|
|
10038
|
+
xr.fromBufferAttribute(u, m), yo(xr, m, l, r, e, t, this);
|
|
10039
10039
|
}
|
|
10040
10040
|
} else {
|
|
10041
|
-
const d = Math.max(0, a.start), p = Math.min(
|
|
10041
|
+
const d = Math.max(0, a.start), p = Math.min(u.count, a.start + a.count);
|
|
10042
10042
|
for (let _ = d, x = p; _ < x; _++)
|
|
10043
|
-
xr.fromBufferAttribute(
|
|
10043
|
+
xr.fromBufferAttribute(u, _), yo(xr, _, l, r, e, t, this);
|
|
10044
10044
|
}
|
|
10045
10045
|
}
|
|
10046
10046
|
/**
|
|
@@ -10114,11 +10114,11 @@ 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,
|
|
10118
|
-
if (
|
|
10117
|
+
constructor(e, t, n = an, r, s, a, o = St, l = St, c, h = xn, u = 1) {
|
|
10118
|
+
if (h !== xn && h !== Gn)
|
|
10119
10119
|
throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
|
|
10120
|
-
const d = { width: e, height: t, depth:
|
|
10121
|
-
super(d, r, s, a, o, l,
|
|
10120
|
+
const d = { width: e, height: t, depth: u };
|
|
10121
|
+
super(d, r, s, a, o, l, h, n, c), this.isDepthTexture = !0, this.flipY = !1, this.generateMipmaps = !1, this.compareFunction = null;
|
|
10122
10122
|
}
|
|
10123
10123
|
copy(e) {
|
|
10124
10124
|
return super.copy(e), this.source = new La(Object.assign({}, e.image)), this.compareFunction = e.compareFunction, this;
|
|
@@ -10143,8 +10143,8 @@ class Du extends Vi {
|
|
|
10143
10143
|
* @param {number} [format=DepthFormat] - The texture format.
|
|
10144
10144
|
*/
|
|
10145
10145
|
constructor(e, t = an, n = Wn, r, s, a = St, o = St, l, c = xn) {
|
|
10146
|
-
const
|
|
10147
|
-
super(e, e, t, n, r, s, a, o, l, c), this.image =
|
|
10146
|
+
const h = { width: e, height: e, depth: 1 }, u = [h, h, h, h, h, h];
|
|
10147
|
+
super(e, e, t, n, r, s, a, o, l, c), this.image = u, this.isCubeDepthTexture = !0, this.isCubeTexture = !0;
|
|
10148
10148
|
}
|
|
10149
10149
|
/**
|
|
10150
10150
|
* Alias for {@link CubeDepthTexture#image}.
|
|
@@ -10187,11 +10187,11 @@ class kr extends Ut {
|
|
|
10187
10187
|
widthSegments: n,
|
|
10188
10188
|
heightSegments: r
|
|
10189
10189
|
};
|
|
10190
|
-
const s = e / 2, a = t / 2, o = Math.floor(n), l = Math.floor(r), c = o + 1,
|
|
10191
|
-
for (let f = 0; f <
|
|
10190
|
+
const s = e / 2, a = t / 2, o = Math.floor(n), l = Math.floor(r), c = o + 1, h = l + 1, u = e / o, d = t / l, p = [], _ = [], x = [], m = [];
|
|
10191
|
+
for (let f = 0; f < h; f++) {
|
|
10192
10192
|
const b = f * d - a;
|
|
10193
10193
|
for (let T = 0; T < c; T++) {
|
|
10194
|
-
const y = T *
|
|
10194
|
+
const y = T * u - s;
|
|
10195
10195
|
_.push(y, -b, 0), x.push(0, 0, 1), m.push(T / o), m.push(1 - f / l);
|
|
10196
10196
|
}
|
|
10197
10197
|
}
|
|
@@ -10343,8 +10343,8 @@ class Fl extends Rl {
|
|
|
10343
10343
|
const e = (this.right - this.left) / (2 * this.zoom), t = (this.top - this.bottom) / (2 * this.zoom), n = (this.right + this.left) / 2, r = (this.top + this.bottom) / 2;
|
|
10344
10344
|
let s = n - e, a = n + e, o = r + t, l = r - t;
|
|
10345
10345
|
if (this.view !== null && this.view.enabled) {
|
|
10346
|
-
const c = (this.right - this.left) / this.view.fullWidth / this.zoom,
|
|
10347
|
-
s += c * this.view.offsetX, a = s + c * this.view.width, o -=
|
|
10346
|
+
const c = (this.right - this.left) / this.view.fullWidth / this.zoom, h = (this.top - this.bottom) / this.view.fullHeight / this.zoom;
|
|
10347
|
+
s += c * this.view.offsetX, a = s + c * this.view.width, o -= h * this.view.offsetY, l = o - h * this.view.height;
|
|
10348
10348
|
}
|
|
10349
10349
|
this.projectionMatrix.makeOrthographic(s, a, o, l, this.near, this.far, this.coordinateSystem, this.reversedDepth), this.projectionMatrixInverse.copy(this.projectionMatrix).invert();
|
|
10350
10350
|
}
|
|
@@ -10738,8 +10738,8 @@ function Ol() {
|
|
|
10738
10738
|
function ku(i) {
|
|
10739
10739
|
const e = /* @__PURE__ */ new WeakMap();
|
|
10740
10740
|
function t(o, l) {
|
|
10741
|
-
const c = o.array,
|
|
10742
|
-
i.bindBuffer(l, d), i.bufferData(l, c,
|
|
10741
|
+
const c = o.array, h = o.usage, u = c.byteLength, d = i.createBuffer();
|
|
10742
|
+
i.bindBuffer(l, d), i.bufferData(l, c, h), o.onUploadCallback();
|
|
10743
10743
|
let p;
|
|
10744
10744
|
if (c instanceof Float32Array)
|
|
10745
10745
|
p = i.FLOAT;
|
|
@@ -10766,30 +10766,30 @@ function ku(i) {
|
|
|
10766
10766
|
type: p,
|
|
10767
10767
|
bytesPerElement: c.BYTES_PER_ELEMENT,
|
|
10768
10768
|
version: o.version,
|
|
10769
|
-
size:
|
|
10769
|
+
size: u
|
|
10770
10770
|
};
|
|
10771
10771
|
}
|
|
10772
10772
|
function n(o, l, c) {
|
|
10773
|
-
const
|
|
10774
|
-
if (i.bindBuffer(c, o),
|
|
10775
|
-
i.bufferSubData(c, 0,
|
|
10773
|
+
const h = l.array, u = l.updateRanges;
|
|
10774
|
+
if (i.bindBuffer(c, o), u.length === 0)
|
|
10775
|
+
i.bufferSubData(c, 0, h);
|
|
10776
10776
|
else {
|
|
10777
|
-
|
|
10777
|
+
u.sort((p, _) => p.start - _.start);
|
|
10778
10778
|
let d = 0;
|
|
10779
|
-
for (let p = 1; p <
|
|
10780
|
-
const _ =
|
|
10779
|
+
for (let p = 1; p < u.length; p++) {
|
|
10780
|
+
const _ = u[d], x = u[p];
|
|
10781
10781
|
x.start <= _.start + _.count + 1 ? _.count = Math.max(
|
|
10782
10782
|
_.count,
|
|
10783
10783
|
x.start + x.count - _.start
|
|
10784
|
-
) : (++d,
|
|
10784
|
+
) : (++d, u[d] = x);
|
|
10785
10785
|
}
|
|
10786
|
-
|
|
10787
|
-
for (let p = 0, _ =
|
|
10788
|
-
const x =
|
|
10786
|
+
u.length = d + 1;
|
|
10787
|
+
for (let p = 0, _ = u.length; p < _; p++) {
|
|
10788
|
+
const x = u[p];
|
|
10789
10789
|
i.bufferSubData(
|
|
10790
10790
|
c,
|
|
10791
|
-
x.start *
|
|
10792
|
-
|
|
10791
|
+
x.start * h.BYTES_PER_ELEMENT,
|
|
10792
|
+
h,
|
|
10793
10793
|
x.start,
|
|
10794
10794
|
x.count
|
|
10795
10795
|
);
|
|
@@ -10808,8 +10808,8 @@ function ku(i) {
|
|
|
10808
10808
|
}
|
|
10809
10809
|
function a(o, l) {
|
|
10810
10810
|
if (o.isInterleavedBufferAttribute && (o = o.data), o.isGLBufferAttribute) {
|
|
10811
|
-
const
|
|
10812
|
-
(!
|
|
10811
|
+
const h = e.get(o);
|
|
10812
|
+
(!h || h.version < o.version) && e.set(o, {
|
|
10813
10813
|
buffer: o.buffer,
|
|
10814
10814
|
type: o.type,
|
|
10815
10815
|
bytesPerElement: o.elementSize,
|
|
@@ -14983,7 +14983,7 @@ Jt.physical = {
|
|
|
14983
14983
|
const vr = { r: 0, b: 0, g: 0 }, Bn = /* @__PURE__ */ new vn(), yf = /* @__PURE__ */ new ut();
|
|
14984
14984
|
function Ef(i, e, t, n, r, s, a) {
|
|
14985
14985
|
const o = new Ze(0);
|
|
14986
|
-
let l = s === !0 ? 0 : 1, c,
|
|
14986
|
+
let l = s === !0 ? 0 : 1, c, h, u = null, d = 0, p = null;
|
|
14987
14987
|
function _(T) {
|
|
14988
14988
|
let y = T.isScene === !0 ? T.background : null;
|
|
14989
14989
|
return y && y.isTexture && (y = (T.backgroundBlurriness > 0 ? t : e).get(y)), y;
|
|
@@ -14997,7 +14997,7 @@ 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) ? (
|
|
15000
|
+
A && (A.isCubeTexture || A.mapping === Vr) ? (h === void 0 && (h = new Mn(
|
|
15001
15001
|
new Wi(1, 1, 1),
|
|
15002
15002
|
new Zt({
|
|
15003
15003
|
name: "BackgroundCubeMaterial",
|
|
@@ -15010,13 +15010,13 @@ function Ef(i, e, t, n, r, s, a) {
|
|
|
15010
15010
|
fog: !1,
|
|
15011
15011
|
allowOverride: !1
|
|
15012
15012
|
})
|
|
15013
|
-
),
|
|
15013
|
+
), h.geometry.deleteAttribute("normal"), h.geometry.deleteAttribute("uv"), h.onBeforeRender = function(R, C, F) {
|
|
15014
15014
|
this.matrixWorld.copyPosition(F.matrixWorld);
|
|
15015
|
-
}, Object.defineProperty(
|
|
15015
|
+
}, Object.defineProperty(h.material, "envMap", {
|
|
15016
15016
|
get: function() {
|
|
15017
15017
|
return this.uniforms.envMap.value;
|
|
15018
15018
|
}
|
|
15019
|
-
}), r.update(
|
|
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
15020
|
new kr(2, 2),
|
|
15021
15021
|
new Zt({
|
|
15022
15022
|
name: "BackgroundMaterial",
|
|
@@ -15033,13 +15033,13 @@ function Ef(i, e, t, n, r, s, a) {
|
|
|
15033
15033
|
get: function() {
|
|
15034
15034
|
return this.uniforms.t2D.value;
|
|
15035
15035
|
}
|
|
15036
|
-
}), r.update(c)), c.material.uniforms.t2D.value = A, c.material.uniforms.backgroundIntensity.value = y.backgroundIntensity, c.material.toneMapped = $e.getTransfer(A.colorSpace) !== et, A.matrixAutoUpdate === !0 && A.updateMatrix(), c.material.uniforms.uvTransform.value.copy(A.matrix), (
|
|
15036
|
+
}), r.update(c)), c.material.uniforms.t2D.value = A, c.material.uniforms.backgroundIntensity.value = y.backgroundIntensity, c.material.toneMapped = $e.getTransfer(A.colorSpace) !== et, A.matrixAutoUpdate === !0 && A.updateMatrix(), c.material.uniforms.uvTransform.value.copy(A.matrix), (u !== A || d !== A.version || p !== i.toneMapping) && (c.material.needsUpdate = !0, u = A, d = A.version, p = i.toneMapping), c.layers.enableAll(), T.unshift(c, c.geometry, c.material, 0, 0, null));
|
|
15037
15037
|
}
|
|
15038
15038
|
function f(T, y) {
|
|
15039
15039
|
T.getRGB(vr, wl(i)), n.buffers.color.setClear(vr.r, vr.g, vr.b, y, a);
|
|
15040
15040
|
}
|
|
15041
15041
|
function b() {
|
|
15042
|
-
|
|
15042
|
+
h !== void 0 && (h.geometry.dispose(), h.material.dispose(), h = void 0), c !== void 0 && (c.geometry.dispose(), c.material.dispose(), c = void 0);
|
|
15043
15043
|
}
|
|
15044
15044
|
return {
|
|
15045
15045
|
getClearColor: function() {
|
|
@@ -15064,7 +15064,7 @@ function bf(i, e) {
|
|
|
15064
15064
|
let s = r, a = !1;
|
|
15065
15065
|
function o(S, D, z, B, G) {
|
|
15066
15066
|
let X = !1;
|
|
15067
|
-
const k =
|
|
15067
|
+
const k = u(B, z, D);
|
|
15068
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));
|
|
15069
15069
|
}
|
|
15070
15070
|
function l() {
|
|
@@ -15073,10 +15073,10 @@ function bf(i, e) {
|
|
|
15073
15073
|
function c(S) {
|
|
15074
15074
|
return i.bindVertexArray(S);
|
|
15075
15075
|
}
|
|
15076
|
-
function
|
|
15076
|
+
function h(S) {
|
|
15077
15077
|
return i.deleteVertexArray(S);
|
|
15078
15078
|
}
|
|
15079
|
-
function
|
|
15079
|
+
function u(S, D, z) {
|
|
15080
15080
|
const B = z.wireframe === !0;
|
|
15081
15081
|
let G = n[S.id];
|
|
15082
15082
|
G === void 0 && (G = {}, n[S.id] = G);
|
|
@@ -15227,7 +15227,7 @@ function bf(i, e) {
|
|
|
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
15233
|
delete n[S];
|
|
@@ -15239,7 +15239,7 @@ function bf(i, e) {
|
|
|
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
15245
|
delete n[S.id];
|
|
@@ -15250,7 +15250,7 @@ function bf(i, e) {
|
|
|
15250
15250
|
if (z[S.id] === void 0) continue;
|
|
15251
15251
|
const B = z[S.id];
|
|
15252
15252
|
for (const G in B)
|
|
15253
|
-
|
|
15253
|
+
h(B[G].object), delete B[G];
|
|
15254
15254
|
delete z[S.id];
|
|
15255
15255
|
}
|
|
15256
15256
|
}
|
|
@@ -15277,31 +15277,31 @@ function Tf(i, e, t) {
|
|
|
15277
15277
|
function r(c) {
|
|
15278
15278
|
n = c;
|
|
15279
15279
|
}
|
|
15280
|
-
function s(c,
|
|
15281
|
-
i.drawArrays(n, c,
|
|
15280
|
+
function s(c, h) {
|
|
15281
|
+
i.drawArrays(n, c, h), t.update(h, n, 1);
|
|
15282
15282
|
}
|
|
15283
|
-
function a(c,
|
|
15284
|
-
|
|
15283
|
+
function a(c, h, u) {
|
|
15284
|
+
u !== 0 && (i.drawArraysInstanced(n, c, h, u), t.update(h, n, u));
|
|
15285
15285
|
}
|
|
15286
|
-
function o(c,
|
|
15287
|
-
if (
|
|
15288
|
-
e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n, c, 0,
|
|
15286
|
+
function o(c, h, u) {
|
|
15287
|
+
if (u === 0) return;
|
|
15288
|
+
e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n, c, 0, h, 0, u);
|
|
15289
15289
|
let p = 0;
|
|
15290
|
-
for (let _ = 0; _ <
|
|
15291
|
-
p +=
|
|
15290
|
+
for (let _ = 0; _ < u; _++)
|
|
15291
|
+
p += h[_];
|
|
15292
15292
|
t.update(p, n, 1);
|
|
15293
15293
|
}
|
|
15294
|
-
function l(c,
|
|
15295
|
-
if (
|
|
15294
|
+
function l(c, h, u, d) {
|
|
15295
|
+
if (u === 0) return;
|
|
15296
15296
|
const p = e.get("WEBGL_multi_draw");
|
|
15297
15297
|
if (p === null)
|
|
15298
15298
|
for (let _ = 0; _ < c.length; _++)
|
|
15299
|
-
a(c[_],
|
|
15299
|
+
a(c[_], h[_], d[_]);
|
|
15300
15300
|
else {
|
|
15301
|
-
p.multiDrawArraysInstancedWEBGL(n, c, 0,
|
|
15301
|
+
p.multiDrawArraysInstancedWEBGL(n, c, 0, h, 0, d, 0, u);
|
|
15302
15302
|
let _ = 0;
|
|
15303
|
-
for (let x = 0; x <
|
|
15304
|
-
_ +=
|
|
15303
|
+
for (let x = 0; x < u; x++)
|
|
15304
|
+
_ += h[x] * d[x];
|
|
15305
15305
|
t.update(_, n, 1);
|
|
15306
15306
|
}
|
|
15307
15307
|
}
|
|
@@ -15335,9 +15335,9 @@ function Af(i, e, t, n) {
|
|
|
15335
15335
|
return C === "mediump" && i.getShaderPrecisionFormat(i.VERTEX_SHADER, i.MEDIUM_FLOAT).precision > 0 && i.getShaderPrecisionFormat(i.FRAGMENT_SHADER, i.MEDIUM_FLOAT).precision > 0 ? "mediump" : "lowp";
|
|
15336
15336
|
}
|
|
15337
15337
|
let c = t.precision !== void 0 ? t.precision : "highp";
|
|
15338
|
-
const
|
|
15339
|
-
|
|
15340
|
-
const
|
|
15338
|
+
const h = l(c);
|
|
15339
|
+
h !== c && (Fe("WebGLRenderer:", c, "not supported, using", h, "instead."), c = h);
|
|
15340
|
+
const u = t.logarithmicDepthBuffer === !0, d = t.reversedDepthBuffer === !0 && e.has("EXT_clip_control"), p = i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS), _ = i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS), x = i.getParameter(i.MAX_TEXTURE_SIZE), m = i.getParameter(i.MAX_CUBE_MAP_TEXTURE_SIZE), f = i.getParameter(i.MAX_VERTEX_ATTRIBS), b = i.getParameter(i.MAX_VERTEX_UNIFORM_VECTORS), T = i.getParameter(i.MAX_VARYING_VECTORS), y = i.getParameter(i.MAX_FRAGMENT_UNIFORM_VECTORS), A = i.getParameter(i.MAX_SAMPLES), R = i.getParameter(i.SAMPLES);
|
|
15341
15341
|
return {
|
|
15342
15342
|
isWebGL2: !0,
|
|
15343
15343
|
// keeping this for backwards compatibility
|
|
@@ -15346,7 +15346,7 @@ function Af(i, e, t, n) {
|
|
|
15346
15346
|
textureFormatReadable: a,
|
|
15347
15347
|
textureTypeReadable: o,
|
|
15348
15348
|
precision: c,
|
|
15349
|
-
logarithmicDepthBuffer:
|
|
15349
|
+
logarithmicDepthBuffer: u,
|
|
15350
15350
|
reversedDepthBuffer: d,
|
|
15351
15351
|
maxTextures: p,
|
|
15352
15352
|
maxVertexTextures: _,
|
|
@@ -15364,25 +15364,25 @@ function wf(i) {
|
|
|
15364
15364
|
const e = this;
|
|
15365
15365
|
let t = null, n = 0, r = !1, s = !1;
|
|
15366
15366
|
const a = new wn(), o = new Ve(), l = { value: null, needsUpdate: !1 };
|
|
15367
|
-
this.uniform = l, this.numPlanes = 0, this.numIntersection = 0, this.init = function(
|
|
15368
|
-
const p =
|
|
15367
|
+
this.uniform = l, this.numPlanes = 0, this.numIntersection = 0, this.init = function(u, d) {
|
|
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:
|
|
15370
15370
|
n !== 0 || r;
|
|
15371
|
-
return r = d, n =
|
|
15371
|
+
return r = d, n = u.length, p;
|
|
15372
15372
|
}, this.beginShadows = function() {
|
|
15373
|
-
s = !0,
|
|
15373
|
+
s = !0, h(null);
|
|
15374
15374
|
}, this.endShadows = function() {
|
|
15375
15375
|
s = !1;
|
|
15376
|
-
}, this.setGlobalState = function(
|
|
15377
|
-
t = u
|
|
15378
|
-
}, this.setState = function(
|
|
15379
|
-
const _ =
|
|
15376
|
+
}, this.setGlobalState = function(u, d) {
|
|
15377
|
+
t = h(u, d, 0);
|
|
15378
|
+
}, this.setState = function(u, d, p) {
|
|
15379
|
+
const _ = u.clippingPlanes, x = u.clipIntersection, m = u.clipShadows, f = i.get(u);
|
|
15380
15380
|
if (!r || _ === null || _.length === 0 || s && !m)
|
|
15381
|
-
s ?
|
|
15381
|
+
s ? h(null) : c();
|
|
15382
15382
|
else {
|
|
15383
15383
|
const b = s ? 0 : n, T = b * 4;
|
|
15384
15384
|
let y = f.clippingState || null;
|
|
15385
|
-
l.value = y, y =
|
|
15385
|
+
l.value = y, y = h(_, d, T, p);
|
|
15386
15386
|
for (let A = 0; A !== T; ++A)
|
|
15387
15387
|
y[A] = t[A];
|
|
15388
15388
|
f.clippingState = y, this.numIntersection = x ? this.numPlanes : 0, this.numPlanes += b;
|
|
@@ -15391,15 +15391,15 @@ function wf(i) {
|
|
|
15391
15391
|
function c() {
|
|
15392
15392
|
l.value !== t && (l.value = t, l.needsUpdate = n > 0), e.numPlanes = n, e.numIntersection = 0;
|
|
15393
15393
|
}
|
|
15394
|
-
function u
|
|
15395
|
-
const x =
|
|
15394
|
+
function h(u, d, p, _) {
|
|
15395
|
+
const x = u !== null ? u.length : 0;
|
|
15396
15396
|
let m = null;
|
|
15397
15397
|
if (x !== 0) {
|
|
15398
15398
|
if (m = l.value, _ !== !0 || m === null) {
|
|
15399
15399
|
const f = p + x * 4, b = d.matrixWorldInverse;
|
|
15400
15400
|
o.getNormalMatrix(b), (m === null || m.length < f) && (m = new Float32Array(f));
|
|
15401
15401
|
for (let T = 0, y = p; T !== x; ++T, y += 4)
|
|
15402
|
-
a.copy(
|
|
15402
|
+
a.copy(u[T]).applyMatrix4(b, o), a.normal.toArray(m, y), m[y + 3] = a.constant;
|
|
15403
15403
|
}
|
|
15404
15404
|
l.value = m, l.needsUpdate = !0;
|
|
15405
15405
|
}
|
|
@@ -15564,8 +15564,8 @@ class Co {
|
|
|
15564
15564
|
this._renderer.compile(t, Li);
|
|
15565
15565
|
}
|
|
15566
15566
|
_sceneToCubeUV(e, t, n, r, s) {
|
|
15567
|
-
const l = new Ht(90, 1, t, n), c = [1, -1, 1, 1, 1, 1],
|
|
15568
|
-
|
|
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(
|
|
15569
15569
|
new Wi(),
|
|
15570
15570
|
new bl({
|
|
15571
15571
|
name: "PMREM.Background",
|
|
@@ -15580,11 +15580,11 @@ class Co {
|
|
|
15580
15580
|
b ? b.isColor && (m.color.copy(b), e.background = null, f = !0) : (m.color.copy(Ro), f = !0);
|
|
15581
15581
|
for (let T = 0; T < 6; T++) {
|
|
15582
15582
|
const y = T % 3;
|
|
15583
|
-
y === 0 ? (l.up.set(0, c[T], 0), l.position.set(s.x, s.y, s.z), l.lookAt(s.x +
|
|
15583
|
+
y === 0 ? (l.up.set(0, c[T], 0), l.position.set(s.x, s.y, s.z), l.lookAt(s.x + h[T], s.y, s.z)) : y === 1 ? (l.up.set(0, 0, c[T]), l.position.set(s.x, s.y, s.z), l.lookAt(s.x, s.y + h[T], s.z)) : (l.up.set(0, c[T], 0), l.position.set(s.x, s.y, s.z), l.lookAt(s.x, s.y, s.z + h[T]));
|
|
15584
15584
|
const A = this._cubeSize;
|
|
15585
|
-
di(r, y * A, T > 2 ? A : 0, A, A),
|
|
15585
|
+
di(r, y * A, T > 2 ? A : 0, A, A), u.setRenderTarget(r), f && u.render(x, l), u.render(e, l);
|
|
15586
15586
|
}
|
|
15587
|
-
|
|
15587
|
+
u.toneMapping = p, u.autoClear = d, e.background = b;
|
|
15588
15588
|
}
|
|
15589
15589
|
_textureToCubeUV(e, t) {
|
|
15590
15590
|
const n = this._renderer, r = e.mapping === Wn || e.mapping === xi;
|
|
@@ -15618,7 +15618,7 @@ class Co {
|
|
|
15618
15618
|
_applyGGXFilter(e, t, n) {
|
|
15619
15619
|
const r = this._renderer, s = this._pingPongRenderTarget, a = this._ggxMaterial, o = this._lodMeshes[n];
|
|
15620
15620
|
o.material = a;
|
|
15621
|
-
const l = a.uniforms, c = n / (this._lodMeshes.length - 1),
|
|
15621
|
+
const l = a.uniforms, c = n / (this._lodMeshes.length - 1), h = t / (this._lodMeshes.length - 1), u = Math.sqrt(c * c - h * h), d = 0 + c * 1.25, p = u * d, { _lodMax: _ } = this, x = this._sizeLods[n], m = 3 * x * (n > _ - Cn ? n - _ + Cn : 0), f = 4 * (this._cubeSize - x);
|
|
15622
15622
|
l.envMap.value = e.texture, l.roughness.value = p, l.mipInt.value = _ - t, di(s, m, f, 3 * x, 2 * x), r.setRenderTarget(s), r.render(o, Li), l.envMap.value = s.texture, l.roughness.value = 0, l.mipInt.value = _ - n, di(e, m, f, 3 * x, 2 * x), r.setRenderTarget(e), r.render(o, Li);
|
|
15623
15623
|
}
|
|
15624
15624
|
/**
|
|
@@ -15662,9 +15662,9 @@ class Co {
|
|
|
15662
15662
|
a !== "latitudinal" && a !== "longitudinal" && qe(
|
|
15663
15663
|
"blur direction must be either latitudinal or longitudinal!"
|
|
15664
15664
|
);
|
|
15665
|
-
const
|
|
15666
|
-
|
|
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(
|
|
15665
|
+
const h = 3, u = this._lodMeshes[r];
|
|
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
15668
|
m > kn && Fe(`sigmaRadians, ${s}, is too large and will clip, as it requested ${m} samples when the maximum is set to ${kn}`);
|
|
15669
15669
|
const f = [];
|
|
15670
15670
|
let b = 0;
|
|
@@ -15678,7 +15678,7 @@ class Co {
|
|
|
15678
15678
|
const { _lodMax: T } = this;
|
|
15679
15679
|
d.dTheta.value = _, d.mipInt.value = T - n;
|
|
15680
15680
|
const y = this._sizeLods[r], A = 3 * y * (r > T - Cn ? r - T + Cn : 0), R = 4 * (this._cubeSize - y);
|
|
15681
|
-
di(t, A, R, 3 * y, 2 * y), l.setRenderTarget(t), l.render(
|
|
15681
|
+
di(t, A, R, 3 * y, 2 * y), l.setRenderTarget(t), l.render(u, Li);
|
|
15682
15682
|
}
|
|
15683
15683
|
}
|
|
15684
15684
|
function Df(i) {
|
|
@@ -15690,7 +15690,7 @@ function Df(i) {
|
|
|
15690
15690
|
e.push(o);
|
|
15691
15691
|
let l = 1 / o;
|
|
15692
15692
|
a > i - Cn ? l = wo[a - i + Cn - 1] : a === 0 && (l = 0), t.push(l);
|
|
15693
|
-
const c = 1 / (o - 2),
|
|
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
15695
|
const C = R % 3 * 2 / 3 - 1, F = R > 2 ? 0 : -1, M = [
|
|
15696
15696
|
C,
|
|
@@ -16082,17 +16082,17 @@ function Uf(i) {
|
|
|
16082
16082
|
let e = /* @__PURE__ */ new WeakMap(), t = null;
|
|
16083
16083
|
function n(o) {
|
|
16084
16084
|
if (o && o.isTexture) {
|
|
16085
|
-
const l = o.mapping, c = l === Ns || l === Fs,
|
|
16086
|
-
if (c ||
|
|
16087
|
-
let
|
|
16088
|
-
const d =
|
|
16085
|
+
const l = o.mapping, c = l === Ns || l === Fs, h = l === Wn || l === xi;
|
|
16086
|
+
if (c || h) {
|
|
16087
|
+
let u = e.get(o);
|
|
16088
|
+
const d = u !== void 0 ? u.texture.pmremVersion : 0;
|
|
16089
16089
|
if (o.isRenderTargetTexture && o.pmremVersion !== d)
|
|
16090
|
-
return t === null && (t = new Co(i)),
|
|
16091
|
-
if (
|
|
16092
|
-
return
|
|
16090
|
+
return t === null && (t = new Co(i)), u = c ? t.fromEquirectangular(o, u) : t.fromCubemap(o, u), u.texture.pmremVersion = o.pmremVersion, e.set(o, u), u.texture;
|
|
16091
|
+
if (u !== void 0)
|
|
16092
|
+
return u.texture;
|
|
16093
16093
|
{
|
|
16094
16094
|
const p = o.image;
|
|
16095
|
-
return c && p && p.height > 0 ||
|
|
16095
|
+
return c && p && p.height > 0 || h && p && r(p) ? (t === null && (t = new Co(i)), u = c ? t.fromEquirectangular(o) : t.fromCubemap(o), u.texture.pmremVersion = o.pmremVersion, e.set(o, u), o.addEventListener("dispose", s), u.texture) : null;
|
|
16096
16096
|
}
|
|
16097
16097
|
}
|
|
16098
16098
|
}
|
|
@@ -16101,8 +16101,8 @@ function Uf(i) {
|
|
|
16101
16101
|
function r(o) {
|
|
16102
16102
|
let l = 0;
|
|
16103
16103
|
const c = 6;
|
|
16104
|
-
for (let
|
|
16105
|
-
o[
|
|
16104
|
+
for (let h = 0; h < c; h++)
|
|
16105
|
+
o[h] !== void 0 && l++;
|
|
16106
16106
|
return l === c;
|
|
16107
16107
|
}
|
|
16108
16108
|
function s(o) {
|
|
@@ -16142,8 +16142,8 @@ function Nf(i) {
|
|
|
16142
16142
|
}
|
|
16143
16143
|
function Ff(i, e, t, n) {
|
|
16144
16144
|
const r = {}, s = /* @__PURE__ */ new WeakMap();
|
|
16145
|
-
function a(
|
|
16146
|
-
const d =
|
|
16145
|
+
function a(u) {
|
|
16146
|
+
const d = u.target;
|
|
16147
16147
|
d.index !== null && e.remove(d.index);
|
|
16148
16148
|
for (const _ in d.attributes)
|
|
16149
16149
|
e.remove(d.attributes[_]);
|
|
@@ -16151,16 +16151,16 @@ function Ff(i, e, t, n) {
|
|
|
16151
16151
|
const p = s.get(d);
|
|
16152
16152
|
p && (e.remove(p), s.delete(d)), n.releaseStatesOfGeometry(d), d.isInstancedBufferGeometry === !0 && delete d._maxInstanceCount, t.memory.geometries--;
|
|
16153
16153
|
}
|
|
16154
|
-
function o(
|
|
16154
|
+
function o(u, d) {
|
|
16155
16155
|
return r[d.id] === !0 || (d.addEventListener("dispose", a), r[d.id] = !0, t.memory.geometries++), d;
|
|
16156
16156
|
}
|
|
16157
|
-
function l(
|
|
16158
|
-
const d =
|
|
16157
|
+
function l(u) {
|
|
16158
|
+
const d = u.attributes;
|
|
16159
16159
|
for (const p in d)
|
|
16160
16160
|
e.update(d[p], i.ARRAY_BUFFER);
|
|
16161
16161
|
}
|
|
16162
|
-
function c(
|
|
16163
|
-
const d = [], p =
|
|
16162
|
+
function c(u) {
|
|
16163
|
+
const d = [], p = u.index, _ = u.attributes.position;
|
|
16164
16164
|
let x = 0;
|
|
16165
16165
|
if (p !== null) {
|
|
16166
16166
|
const b = p.array;
|
|
@@ -16180,22 +16180,22 @@ function Ff(i, e, t, n) {
|
|
|
16180
16180
|
return;
|
|
16181
16181
|
const m = new (Sl(d) ? Al : Tl)(d, 1);
|
|
16182
16182
|
m.version = x;
|
|
16183
|
-
const f = s.get(
|
|
16184
|
-
f && e.remove(f), s.set(
|
|
16183
|
+
const f = s.get(u);
|
|
16184
|
+
f && e.remove(f), s.set(u, m);
|
|
16185
16185
|
}
|
|
16186
|
-
function u
|
|
16187
|
-
const d = s.get(
|
|
16186
|
+
function h(u) {
|
|
16187
|
+
const d = s.get(u);
|
|
16188
16188
|
if (d) {
|
|
16189
|
-
const p =
|
|
16190
|
-
p !== null && d.version < p.version && c(
|
|
16189
|
+
const p = u.index;
|
|
16190
|
+
p !== null && d.version < p.version && c(u);
|
|
16191
16191
|
} else
|
|
16192
|
-
c(
|
|
16193
|
-
return s.get(
|
|
16192
|
+
c(u);
|
|
16193
|
+
return s.get(u);
|
|
16194
16194
|
}
|
|
16195
16195
|
return {
|
|
16196
16196
|
get: o,
|
|
16197
16197
|
update: l,
|
|
16198
|
-
getWireframeAttribute:
|
|
16198
|
+
getWireframeAttribute: h
|
|
16199
16199
|
};
|
|
16200
16200
|
}
|
|
16201
16201
|
function Of(i, e, t) {
|
|
@@ -16213,7 +16213,7 @@ function Of(i, e, t) {
|
|
|
16213
16213
|
function c(d, p, _) {
|
|
16214
16214
|
_ !== 0 && (i.drawElementsInstanced(n, p, s, d * a, _), t.update(p, n, _));
|
|
16215
16215
|
}
|
|
16216
|
-
function
|
|
16216
|
+
function h(d, p, _) {
|
|
16217
16217
|
if (_ === 0) return;
|
|
16218
16218
|
e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n, p, 0, s, d, 0, _);
|
|
16219
16219
|
let m = 0;
|
|
@@ -16221,7 +16221,7 @@ function Of(i, e, t) {
|
|
|
16221
16221
|
m += p[f];
|
|
16222
16222
|
t.update(m, n, 1);
|
|
16223
16223
|
}
|
|
16224
|
-
function
|
|
16224
|
+
function u(d, p, _, x) {
|
|
16225
16225
|
if (_ === 0) return;
|
|
16226
16226
|
const m = e.get("WEBGL_multi_draw");
|
|
16227
16227
|
if (m === null)
|
|
@@ -16235,7 +16235,7 @@ function Of(i, e, t) {
|
|
|
16235
16235
|
t.update(f, n, 1);
|
|
16236
16236
|
}
|
|
16237
16237
|
}
|
|
16238
|
-
this.setMode = r, this.setIndex = o, this.render = l, this.renderInstances = c, this.renderMultiDraw =
|
|
16238
|
+
this.setMode = r, this.setIndex = o, this.render = l, this.renderInstances = c, this.renderMultiDraw = h, this.renderMultiDrawInstances = u;
|
|
16239
16239
|
}
|
|
16240
16240
|
function Bf(i) {
|
|
16241
16241
|
const e = {
|
|
@@ -16285,9 +16285,9 @@ function Bf(i) {
|
|
|
16285
16285
|
function zf(i, e, t) {
|
|
16286
16286
|
const n = /* @__PURE__ */ new WeakMap(), r = new pt();
|
|
16287
16287
|
function s(a, o, l) {
|
|
16288
|
-
const c = a.morphTargetInfluences,
|
|
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
|
-
if (d === void 0 || d.count !==
|
|
16290
|
+
if (d === void 0 || d.count !== u) {
|
|
16291
16291
|
let M = function() {
|
|
16292
16292
|
C.dispose(), n.delete(o), o.removeEventListener("dispose", M);
|
|
16293
16293
|
};
|
|
@@ -16297,10 +16297,10 @@ function zf(i, e, t) {
|
|
|
16297
16297
|
p === !0 && (T = 1), _ === !0 && (T = 2), x === !0 && (T = 3);
|
|
16298
16298
|
let y = o.attributes.position.count * T, A = 1;
|
|
16299
16299
|
y > e.maxTextureSize && (A = Math.ceil(y / e.maxTextureSize), y = e.maxTextureSize);
|
|
16300
|
-
const R = new Float32Array(y * A * 4 *
|
|
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 <
|
|
16303
|
+
for (let S = 0; S < u; S++) {
|
|
16304
16304
|
const D = m[S], z = f[S], B = b[S], G = y * A * 4 * S;
|
|
16305
16305
|
for (let X = 0; X < D.count; X++) {
|
|
16306
16306
|
const k = X * F;
|
|
@@ -16308,7 +16308,7 @@ function zf(i, e, t) {
|
|
|
16308
16308
|
}
|
|
16309
16309
|
}
|
|
16310
16310
|
d = {
|
|
16311
|
-
count:
|
|
16311
|
+
count: u,
|
|
16312
16312
|
texture: C,
|
|
16313
16313
|
size: new Ne(y, A)
|
|
16314
16314
|
}, n.set(o, d), o.addEventListener("dispose", M);
|
|
@@ -16331,12 +16331,12 @@ function zf(i, e, t) {
|
|
|
16331
16331
|
function Vf(i, e, t, n) {
|
|
16332
16332
|
let r = /* @__PURE__ */ new WeakMap();
|
|
16333
16333
|
function s(l) {
|
|
16334
|
-
const c = n.render.frame,
|
|
16335
|
-
if (r.get(
|
|
16334
|
+
const c = n.render.frame, h = l.geometry, u = e.get(l, h);
|
|
16335
|
+
if (r.get(u) !== c && (e.update(u), r.set(u, c)), l.isInstancedMesh && (l.hasEventListener("dispose", o) === !1 && l.addEventListener("dispose", o), r.get(l) !== c && (t.update(l.instanceMatrix, i.ARRAY_BUFFER), l.instanceColor !== null && t.update(l.instanceColor, i.ARRAY_BUFFER), r.set(l, c))), l.isSkinnedMesh) {
|
|
16336
16336
|
const d = l.skeleton;
|
|
16337
16337
|
r.get(d) !== c && (d.update(), r.set(d, c));
|
|
16338
16338
|
}
|
|
16339
|
-
return
|
|
16339
|
+
return u;
|
|
16340
16340
|
}
|
|
16341
16341
|
function a() {
|
|
16342
16342
|
r = /* @__PURE__ */ new WeakMap();
|
|
@@ -16430,8 +16430,8 @@ function Hf(i, e, t, n, r) {
|
|
|
16430
16430
|
),
|
|
16431
16431
|
depthTest: !1,
|
|
16432
16432
|
depthWrite: !1
|
|
16433
|
-
}), c = new Mn(o, l),
|
|
16434
|
-
let
|
|
16433
|
+
}), c = new Mn(o, l), h = new Fl(-1, 1, 1, -1, 0, 1);
|
|
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);
|
|
16437
16437
|
for (let y = 0; y < m.length; y++) {
|
|
@@ -16464,12 +16464,12 @@ function Hf(i, e, t, n, r) {
|
|
|
16464
16464
|
y = A, A = F;
|
|
16465
16465
|
}
|
|
16466
16466
|
}
|
|
16467
|
-
if (
|
|
16468
|
-
|
|
16467
|
+
if (u !== b.outputColorSpace || d !== b.toneMapping) {
|
|
16468
|
+
u = b.outputColorSpace, d = b.toneMapping, l.defines = {}, $e.getTransfer(u) === et && (l.defines.SRGB_TRANSFER = "");
|
|
16469
16469
|
const R = kf[d];
|
|
16470
16470
|
R && (l.defines[R] = ""), l.needsUpdate = !0;
|
|
16471
16471
|
}
|
|
16472
|
-
l.uniforms.tDiffuse.value = y.texture, b.setRenderTarget(x), b.render(c,
|
|
16472
|
+
l.uniforms.tDiffuse.value = y.texture, b.setRenderTarget(x), b.render(c, h), x = null, p = !1;
|
|
16473
16473
|
}, this.isCompositing = function() {
|
|
16474
16474
|
return p;
|
|
16475
16475
|
}, this.dispose = function() {
|
|
@@ -16932,8 +16932,8 @@ function Lp(i, e, t) {
|
|
|
16932
16932
|
Bo(t, c === void 0 ? new Cp(o, i, e) : new Pp(o, i, e));
|
|
16933
16933
|
break;
|
|
16934
16934
|
} else {
|
|
16935
|
-
let
|
|
16936
|
-
|
|
16935
|
+
let u = t.map[o];
|
|
16936
|
+
u === void 0 && (u = new Dp(o), Bo(t, u)), t = u;
|
|
16937
16937
|
}
|
|
16938
16938
|
}
|
|
16939
16939
|
}
|
|
@@ -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),
|
|
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();
|
|
17181
17181
|
let m, f, b = t.glslVersion ? "#version " + t.glslVersion + `
|
|
17182
17182
|
` : "";
|
|
17183
17183
|
t.isRawShaderMaterial ? (m = [
|
|
@@ -17207,7 +17207,7 @@ function rm(i, e, t, n) {
|
|
|
17207
17207
|
t.useFog && t.fogExp2 ? "#define FOG_EXP2" : "",
|
|
17208
17208
|
t.map ? "#define USE_MAP" : "",
|
|
17209
17209
|
t.envMap ? "#define USE_ENVMAP" : "",
|
|
17210
|
-
t.envMap ? "#define " +
|
|
17210
|
+
t.envMap ? "#define " + h : "",
|
|
17211
17211
|
t.lightMap ? "#define USE_LIGHTMAP" : "",
|
|
17212
17212
|
t.aoMap ? "#define USE_AOMAP" : "",
|
|
17213
17213
|
t.bumpMap ? "#define USE_BUMPMAP" : "",
|
|
@@ -17337,8 +17337,8 @@ function rm(i, e, t, n) {
|
|
|
17337
17337
|
t.matcap ? "#define USE_MATCAP" : "",
|
|
17338
17338
|
t.envMap ? "#define USE_ENVMAP" : "",
|
|
17339
17339
|
t.envMap ? "#define " + c : "",
|
|
17340
|
-
t.envMap ? "#define " + u : "",
|
|
17341
17340
|
t.envMap ? "#define " + h : "",
|
|
17341
|
+
t.envMap ? "#define " + u : "",
|
|
17342
17342
|
d ? "#define CUBEUV_TEXEL_WIDTH " + d.texelWidth : "",
|
|
17343
17343
|
d ? "#define CUBEUV_TEXEL_HEIGHT " + d.texelHeight : "",
|
|
17344
17344
|
d ? "#define CUBEUV_MAX_MIP " + d.maxMip + ".0" : "",
|
|
@@ -17528,7 +17528,7 @@ class om {
|
|
|
17528
17528
|
}
|
|
17529
17529
|
}
|
|
17530
17530
|
function lm(i, e, t, n, r, s, a) {
|
|
17531
|
-
const o = new Ia(), l = new am(), c = /* @__PURE__ */ new Set(),
|
|
17531
|
+
const o = new Ia(), l = new am(), c = /* @__PURE__ */ new Set(), h = [], u = /* @__PURE__ */ new Map(), d = r.logarithmicDepthBuffer;
|
|
17532
17532
|
let p = r.precision;
|
|
17533
17533
|
const _ = {
|
|
17534
17534
|
MeshDepthMaterial: "depth",
|
|
@@ -17722,13 +17722,13 @@ function lm(i, e, t, n, r, s, a) {
|
|
|
17722
17722
|
return D;
|
|
17723
17723
|
}
|
|
17724
17724
|
function A(M, S) {
|
|
17725
|
-
let D =
|
|
17726
|
-
return D !== void 0 ? ++D.usedTimes : (D = new rm(i, S, 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;
|
|
17727
17727
|
}
|
|
17728
17728
|
function R(M) {
|
|
17729
17729
|
if (--M.usedTimes === 0) {
|
|
17730
|
-
const S =
|
|
17731
|
-
|
|
17730
|
+
const S = h.indexOf(M);
|
|
17731
|
+
h[S] = h[h.length - 1], h.pop(), u.delete(M.cacheKey), M.destroy();
|
|
17732
17732
|
}
|
|
17733
17733
|
}
|
|
17734
17734
|
function C(M) {
|
|
@@ -17745,7 +17745,7 @@ function lm(i, e, t, n, r, s, a) {
|
|
|
17745
17745
|
releaseProgram: R,
|
|
17746
17746
|
releaseShaderCache: C,
|
|
17747
17747
|
// Exposed for resource monitoring & error feedback via renderer.info:
|
|
17748
|
-
programs:
|
|
17748
|
+
programs: h,
|
|
17749
17749
|
dispose: F
|
|
17750
17750
|
};
|
|
17751
17751
|
}
|
|
@@ -17788,33 +17788,33 @@ function Yo() {
|
|
|
17788
17788
|
function s() {
|
|
17789
17789
|
e = 0, t.length = 0, n.length = 0, r.length = 0;
|
|
17790
17790
|
}
|
|
17791
|
-
function a(
|
|
17791
|
+
function a(u, d, p, _, x, m) {
|
|
17792
17792
|
let f = i[e];
|
|
17793
17793
|
return f === void 0 ? (f = {
|
|
17794
|
-
id:
|
|
17795
|
-
object:
|
|
17794
|
+
id: u.id,
|
|
17795
|
+
object: u,
|
|
17796
17796
|
geometry: d,
|
|
17797
17797
|
material: p,
|
|
17798
17798
|
groupOrder: _,
|
|
17799
|
-
renderOrder:
|
|
17799
|
+
renderOrder: u.renderOrder,
|
|
17800
17800
|
z: x,
|
|
17801
17801
|
group: m
|
|
17802
|
-
}, i[e] = f) : (f.id =
|
|
17802
|
+
}, i[e] = f) : (f.id = u.id, f.object = u, f.geometry = d, f.material = p, f.groupOrder = _, f.renderOrder = u.renderOrder, f.z = x, f.group = m), e++, f;
|
|
17803
17803
|
}
|
|
17804
|
-
function o(
|
|
17805
|
-
const f = a(
|
|
17804
|
+
function o(u, d, p, _, x, m) {
|
|
17805
|
+
const f = a(u, d, p, _, x, m);
|
|
17806
17806
|
p.transmission > 0 ? n.push(f) : p.transparent === !0 ? r.push(f) : t.push(f);
|
|
17807
17807
|
}
|
|
17808
|
-
function l(
|
|
17809
|
-
const f = a(
|
|
17808
|
+
function l(u, d, p, _, x, m) {
|
|
17809
|
+
const f = a(u, d, p, _, x, m);
|
|
17810
17810
|
p.transmission > 0 ? n.unshift(f) : p.transparent === !0 ? r.unshift(f) : t.unshift(f);
|
|
17811
17811
|
}
|
|
17812
|
-
function c(
|
|
17813
|
-
t.length > 1 && t.sort(
|
|
17812
|
+
function c(u, d) {
|
|
17813
|
+
t.length > 1 && t.sort(u || um), n.length > 1 && n.sort(d || qo), r.length > 1 && r.sort(d || qo);
|
|
17814
17814
|
}
|
|
17815
|
-
function
|
|
17816
|
-
for (let
|
|
17817
|
-
const p = i[
|
|
17815
|
+
function h() {
|
|
17816
|
+
for (let u = e, d = i.length; u < d; u++) {
|
|
17817
|
+
const p = i[u];
|
|
17818
17818
|
if (p.id === null) break;
|
|
17819
17819
|
p.id = null, p.object = null, p.geometry = null, p.material = null, p.group = null;
|
|
17820
17820
|
}
|
|
@@ -17826,7 +17826,7 @@ function Yo() {
|
|
|
17826
17826
|
init: s,
|
|
17827
17827
|
push: o,
|
|
17828
17828
|
unshift: l,
|
|
17829
|
-
finish:
|
|
17829
|
+
finish: h,
|
|
17830
17830
|
sort: c
|
|
17831
17831
|
};
|
|
17832
17832
|
}
|
|
@@ -17984,7 +17984,7 @@ function gm(i) {
|
|
|
17984
17984
|
for (let c = 0; c < 9; c++) n.probe.push(new U());
|
|
17985
17985
|
const r = new U(), s = new ut(), a = new ut();
|
|
17986
17986
|
function o(c) {
|
|
17987
|
-
let
|
|
17987
|
+
let h = 0, u = 0, d = 0;
|
|
17988
17988
|
for (let M = 0; M < 9; M++) n.probe[M].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);
|
|
@@ -17992,7 +17992,7 @@ function gm(i) {
|
|
|
17992
17992
|
const D = c[M], 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
17997
|
for (let k = 0; k < 9; k++)
|
|
17998
17998
|
n.probe[k].addScaledVector(D.sh.coefficients[k], B);
|
|
@@ -18028,18 +18028,18 @@ function gm(i) {
|
|
|
18028
18028
|
k.skyColor.copy(D.color).multiplyScalar(B), k.groundColor.copy(D.groundColor).multiplyScalar(B), n.hemi[f] = k, f++;
|
|
18029
18029
|
}
|
|
18030
18030
|
}
|
|
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] =
|
|
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;
|
|
18032
18032
|
const F = n.hash;
|
|
18033
18033
|
(F.directionalLength !== p || F.pointLength !== _ || F.spotLength !== x || F.rectAreaLength !== m || F.hemiLength !== f || F.numDirectionalShadows !== b || F.numPointShadows !== T || F.numSpotShadows !== y || F.numSpotMaps !== A || F.numLightProbes !== C) && (n.directional.length = p, n.spot.length = x, n.rectArea.length = m, n.point.length = _, n.hemi.length = f, n.directionalShadow.length = b, n.directionalShadowMap.length = b, n.pointShadow.length = T, n.pointShadowMap.length = T, n.spotShadow.length = y, n.spotShadowMap.length = y, n.directionalShadowMatrix.length = b, n.pointShadowMatrix.length = T, n.spotLightMatrix.length = y + A - R, n.spotLightMap.length = A, n.numSpotLightShadowsWithMaps = R, n.numLightProbes = C, F.directionalLength = p, F.pointLength = _, F.spotLength = x, F.rectAreaLength = m, F.hemiLength = f, F.numDirectionalShadows = b, F.numPointShadows = T, F.numSpotShadows = y, F.numSpotMaps = A, F.numLightProbes = C, n.version = pm++);
|
|
18034
18034
|
}
|
|
18035
|
-
function l(c,
|
|
18036
|
-
let
|
|
18037
|
-
const m =
|
|
18035
|
+
function l(c, h) {
|
|
18036
|
+
let u = 0, d = 0, p = 0, _ = 0, x = 0;
|
|
18037
|
+
const m = h.matrixWorldInverse;
|
|
18038
18038
|
for (let f = 0, b = c.length; f < b; f++) {
|
|
18039
18039
|
const T = c[f];
|
|
18040
18040
|
if (T.isDirectionalLight) {
|
|
18041
|
-
const y = n.directional[
|
|
18042
|
-
y.direction.setFromMatrixPosition(T.matrixWorld), r.setFromMatrixPosition(T.target.matrixWorld), y.direction.sub(r), y.direction.transformDirection(m),
|
|
18041
|
+
const y = n.directional[u];
|
|
18042
|
+
y.direction.setFromMatrixPosition(T.matrixWorld), r.setFromMatrixPosition(T.target.matrixWorld), y.direction.sub(r), y.direction.transformDirection(m), u++;
|
|
18043
18043
|
} else if (T.isSpotLight) {
|
|
18044
18044
|
const y = n.spot[p];
|
|
18045
18045
|
y.position.setFromMatrixPosition(T.matrixWorld), y.position.applyMatrix4(m), y.direction.setFromMatrixPosition(T.matrixWorld), r.setFromMatrixPosition(T.target.matrixWorld), y.direction.sub(r), y.direction.transformDirection(m), p++;
|
|
@@ -18063,20 +18063,20 @@ function gm(i) {
|
|
|
18063
18063
|
}
|
|
18064
18064
|
function $o(i) {
|
|
18065
18065
|
const e = new gm(i), t = [], n = [];
|
|
18066
|
-
function r(
|
|
18067
|
-
c.camera =
|
|
18066
|
+
function r(h) {
|
|
18067
|
+
c.camera = h, t.length = 0, n.length = 0;
|
|
18068
18068
|
}
|
|
18069
|
-
function s(
|
|
18070
|
-
t.push(
|
|
18069
|
+
function s(h) {
|
|
18070
|
+
t.push(h);
|
|
18071
18071
|
}
|
|
18072
|
-
function a(
|
|
18073
|
-
n.push(
|
|
18072
|
+
function a(h) {
|
|
18073
|
+
n.push(h);
|
|
18074
18074
|
}
|
|
18075
18075
|
function o() {
|
|
18076
18076
|
e.setup(t);
|
|
18077
18077
|
}
|
|
18078
|
-
function l(
|
|
18079
|
-
e.setupView(t,
|
|
18078
|
+
function l(h) {
|
|
18079
|
+
e.setupView(t, h);
|
|
18080
18080
|
}
|
|
18081
18081
|
const c = {
|
|
18082
18082
|
lightsArray: t,
|
|
@@ -18153,7 +18153,7 @@ void main() {
|
|
|
18153
18153
|
], Zo = /* @__PURE__ */ new ut(), Ii = /* @__PURE__ */ new U(), bs = /* @__PURE__ */ new U();
|
|
18154
18154
|
function ym(i, e, t) {
|
|
18155
18155
|
let n = new Il();
|
|
18156
|
-
const r = new Ne(), s = new Ne(), a = new pt(), o = new Iu(), l = new Uu(), c = {},
|
|
18156
|
+
const r = new Ne(), s = new Ne(), a = new pt(), o = new Iu(), l = new Uu(), c = {}, h = t.maxTextureSize, u = { [Dn]: It, [It]: Dn, [fn]: fn }, d = new Zt({
|
|
18157
18157
|
defines: {
|
|
18158
18158
|
VSM_SAMPLES: 8
|
|
18159
18159
|
},
|
|
@@ -18195,7 +18195,7 @@ function ym(i, e, t) {
|
|
|
18195
18195
|
if (H.autoUpdate === !1 && H.needsUpdate === !1) continue;
|
|
18196
18196
|
r.copy(H.mapSize);
|
|
18197
18197
|
const $ = H.getFrameExtents();
|
|
18198
|
-
if (r.multiply($), s.copy(H.mapSize), (r.x >
|
|
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
18200
|
if (k.isPointLight) {
|
|
18201
18201
|
Fe("WebGLShadowMap: VSM shadow maps are not supported for PointLights. Use PCF or BasicShadowMap instead.");
|
|
@@ -18259,7 +18259,7 @@ function ym(i, e, t) {
|
|
|
18259
18259
|
let X = G[B];
|
|
18260
18260
|
X === void 0 && (X = S.clone(), G[B] = X, C.addEventListener("dispose", A)), S = 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 :
|
|
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
18263
|
const z = i.properties.get(S);
|
|
18264
18264
|
z.light = F;
|
|
18265
18265
|
}
|
|
@@ -18418,7 +18418,7 @@ 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
|
|
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;
|
|
18422
18422
|
const X = i.getParameter(i.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
|
|
18423
18423
|
let k = !1, H = 0;
|
|
18424
18424
|
const $ = i.getParameter(i.VERSION);
|
|
@@ -18435,13 +18435,13 @@ function bm(i, e) {
|
|
|
18435
18435
|
const q = {};
|
|
18436
18436
|
q[i.TEXTURE_2D] = tt(i.TEXTURE_2D, i.TEXTURE_2D, 1), q[i.TEXTURE_CUBE_MAP] = tt(i.TEXTURE_CUBE_MAP, i.TEXTURE_CUBE_MAP_POSITIVE_X, 6), q[i.TEXTURE_2D_ARRAY] = tt(i.TEXTURE_2D_ARRAY, i.TEXTURE_2D_ARRAY, 1, 1), q[i.TEXTURE_3D] = tt(i.TEXTURE_3D, i.TEXTURE_3D, 1, 1), s.setClear(0, 0, 0, 1), a.setClear(1), o.setClear(0), J(i.DEPTH_TEST), a.setFunc(_i), De(!1), je(Ya), J(i.CULL_FACE), Re(mn);
|
|
18437
18437
|
function J(P) {
|
|
18438
|
-
|
|
18438
|
+
h[P] !== !0 && (i.enable(P), h[P] = !0);
|
|
18439
18439
|
}
|
|
18440
18440
|
function xe(P) {
|
|
18441
|
-
|
|
18441
|
+
h[P] !== !1 && (i.disable(P), h[P] = !1);
|
|
18442
18442
|
}
|
|
18443
18443
|
function ze(P, pe) {
|
|
18444
|
-
return
|
|
18444
|
+
return u[P] !== pe ? (i.bindFramebuffer(P, pe), u[P] = pe, P === i.DRAW_FRAMEBUFFER && (u[i.FRAMEBUFFER] = pe), P === i.FRAMEBUFFER && (u[i.DRAW_FRAMEBUFFER] = pe), !0) : !1;
|
|
18445
18445
|
}
|
|
18446
18446
|
function Z(P, pe) {
|
|
18447
18447
|
let te = p, ge = !1;
|
|
@@ -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),
|
|
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();
|
|
18657
18657
|
}
|
|
18658
18658
|
return {
|
|
18659
18659
|
buffers: {
|
|
@@ -18694,8 +18694,8 @@ function bm(i, e) {
|
|
|
18694
18694
|
};
|
|
18695
18695
|
}
|
|
18696
18696
|
function Tm(i, e, t, n, r, s, a) {
|
|
18697
|
-
const o = e.has("WEBGL_multisampled_render_to_texture") ? e.get("WEBGL_multisampled_render_to_texture") : null, l = typeof navigator > "u" ? !1 : /OculusBrowser/g.test(navigator.userAgent), c = new Ne(),
|
|
18698
|
-
let
|
|
18697
|
+
const o = e.has("WEBGL_multisampled_render_to_texture") ? e.get("WEBGL_multisampled_render_to_texture") : null, l = typeof navigator > "u" ? !1 : /OculusBrowser/g.test(navigator.userAgent), c = new Ne(), h = /* @__PURE__ */ new WeakMap();
|
|
18698
|
+
let u;
|
|
18699
18699
|
const d = /* @__PURE__ */ new WeakMap();
|
|
18700
18700
|
let p = !1;
|
|
18701
18701
|
try {
|
|
@@ -18711,8 +18711,8 @@ function Tm(i, e, t, n, r, s, a) {
|
|
|
18711
18711
|
if ((K.width > L || K.height > L) && (Y = L / Math.max(K.width, K.height)), Y < 1)
|
|
18712
18712
|
if (typeof HTMLImageElement < "u" && E instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && E instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && E instanceof ImageBitmap || typeof VideoFrame < "u" && E instanceof VideoFrame) {
|
|
18713
18713
|
const W = Math.floor(Y * K.width), Te = Math.floor(Y * K.height);
|
|
18714
|
-
|
|
18715
|
-
const oe = g ? _(W, Te) :
|
|
18714
|
+
u === void 0 && (u = _(W, Te));
|
|
18715
|
+
const oe = g ? _(W, Te) : u;
|
|
18716
18716
|
return oe.width = W, oe.height = Te, oe.getContext("2d").drawImage(E, 0, 0, W, Te), Fe("WebGLRenderer: Texture has been resized from (" + K.width + "x" + K.height + ") to (" + W + "x" + Te + ")."), oe;
|
|
18717
18717
|
} else
|
|
18718
18718
|
return "data" in E && Fe("WebGLRenderer: Image in DataTexture is too big (" + K.width + "x" + K.height + ")."), E;
|
|
@@ -18748,7 +18748,7 @@ function Tm(i, e, t, n, r, s, a) {
|
|
|
18748
18748
|
}
|
|
18749
18749
|
function R(E) {
|
|
18750
18750
|
const g = E.target;
|
|
18751
|
-
g.removeEventListener("dispose", R), F(g), g.isVideoTexture &&
|
|
18751
|
+
g.removeEventListener("dispose", R), F(g), g.isVideoTexture && h.delete(g);
|
|
18752
18752
|
}
|
|
18753
18753
|
function C(E) {
|
|
18754
18754
|
const g = E.target;
|
|
@@ -19283,7 +19283,7 @@ function Tm(i, e, t, n, r, s, a) {
|
|
|
19283
19283
|
}
|
|
19284
19284
|
function Ye(E) {
|
|
19285
19285
|
const g = a.render.frame;
|
|
19286
|
-
|
|
19286
|
+
h.get(E) !== g && (h.set(E, g), E.update());
|
|
19287
19287
|
}
|
|
19288
19288
|
function nt(E, g) {
|
|
19289
19289
|
const L = E.colorSpace, Y = E.format, K = E.type;
|
|
@@ -19483,7 +19483,7 @@ class Pm extends qn {
|
|
|
19483
19483
|
constructor(e, t) {
|
|
19484
19484
|
super();
|
|
19485
19485
|
const n = this;
|
|
19486
|
-
let r = null, s = 1, a = null, o = "local-floor", l = 1, c = null,
|
|
19486
|
+
let r = null, s = 1, a = null, o = "local-floor", l = 1, c = null, h = null, u = null, d = null, p = null, _ = null;
|
|
19487
19487
|
const x = typeof XRWebGLBinding < "u", m = new Cm(), f = {}, b = t.getContextAttributes();
|
|
19488
19488
|
let T = null, y = null;
|
|
19489
19489
|
const A = [], R = [], C = new Ne();
|
|
@@ -19520,7 +19520,7 @@ class Pm extends qn {
|
|
|
19520
19520
|
B = null, G = null, m.reset();
|
|
19521
19521
|
for (const q in f)
|
|
19522
19522
|
delete f[q];
|
|
19523
|
-
e.setRenderTarget(T), p = null, d = null,
|
|
19523
|
+
e.setRenderTarget(T), p = null, d = null, u = null, r = null, y = null, tt.stop(), n.isPresenting = !1, e.setPixelRatio(F), e.setSize(C.width, C.height, !1), n.dispatchEvent({ type: "sessionend" });
|
|
19524
19524
|
}
|
|
19525
19525
|
this.setFramebufferScaleFactor = function(q) {
|
|
19526
19526
|
s = q, n.isPresenting === !0 && Fe("WebXRManager: Cannot change framebuffer scale while presenting.");
|
|
@@ -19533,7 +19533,7 @@ class Pm extends qn {
|
|
|
19533
19533
|
}, this.getBaseLayer = function() {
|
|
19534
19534
|
return d !== null ? d : p;
|
|
19535
19535
|
}, this.getBinding = function() {
|
|
19536
|
-
return
|
|
19536
|
+
return u === null && x && (u = new XRWebGLBinding(r, t)), u;
|
|
19537
19537
|
}, this.getFrame = function() {
|
|
19538
19538
|
return _;
|
|
19539
19539
|
}, this.getSession = function() {
|
|
@@ -19548,7 +19548,7 @@ class Pm extends qn {
|
|
|
19548
19548
|
depthFormat: Z,
|
|
19549
19549
|
scaleFactor: s
|
|
19550
19550
|
};
|
|
19551
|
-
|
|
19551
|
+
u = this.getBinding(), d = u.createProjectionLayer(me), r.updateRenderState({ layers: [d] }), e.setPixelRatio(1), e.setSize(d.textureWidth, d.textureHeight, !1), y = new rn(
|
|
19552
19552
|
d.textureWidth,
|
|
19553
19553
|
d.textureHeight,
|
|
19554
19554
|
{
|
|
@@ -19660,8 +19660,8 @@ class Pm extends qn {
|
|
|
19660
19660
|
};
|
|
19661
19661
|
let we = null;
|
|
19662
19662
|
function ke(q, J) {
|
|
19663
|
-
if (
|
|
19664
|
-
const xe =
|
|
19663
|
+
if (h = J.getViewerPose(c || a), _ = J, h !== null) {
|
|
19664
|
+
const xe = h.views;
|
|
19665
19665
|
p !== null && (e.setRenderTargetFramebuffer(y, p.framebuffer), e.setRenderTarget(y));
|
|
19666
19666
|
let ze = !1;
|
|
19667
19667
|
xe.length !== z.cameras.length && (z.cameras.length = 0, ze = !0);
|
|
@@ -19671,7 +19671,7 @@ class Pm extends qn {
|
|
|
19671
19671
|
if (p !== null)
|
|
19672
19672
|
Oe = p.getViewport(Re);
|
|
19673
19673
|
else {
|
|
19674
|
-
const je =
|
|
19674
|
+
const je = u.getViewSubImage(d, Re);
|
|
19675
19675
|
Oe = je.viewport, de === 0 && (e.setRenderTargetTextures(
|
|
19676
19676
|
y,
|
|
19677
19677
|
je.colorTexture,
|
|
@@ -19683,18 +19683,18 @@ class Pm extends qn {
|
|
|
19683
19683
|
}
|
|
19684
19684
|
const Z = r.enabledFeatures;
|
|
19685
19685
|
if (Z && Z.includes("depth-sensing") && r.depthUsage == "gpu-optimized" && x) {
|
|
19686
|
-
|
|
19687
|
-
const de =
|
|
19686
|
+
u = n.getBinding();
|
|
19687
|
+
const de = u.getDepthInformation(xe[0]);
|
|
19688
19688
|
de && de.isValid && de.texture && m.init(de, r.renderState);
|
|
19689
19689
|
}
|
|
19690
19690
|
if (Z && Z.includes("camera-access") && x) {
|
|
19691
|
-
e.state.unbindTexture(),
|
|
19691
|
+
e.state.unbindTexture(), u = n.getBinding();
|
|
19692
19692
|
for (let de = 0; de < xe.length; de++) {
|
|
19693
19693
|
const Re = xe[de].camera;
|
|
19694
19694
|
if (Re) {
|
|
19695
19695
|
let Oe = f[Re];
|
|
19696
19696
|
Oe || (Oe = new Nl(), f[Re] = Oe);
|
|
19697
|
-
const De =
|
|
19697
|
+
const De = u.getCameraImage(Re);
|
|
19698
19698
|
Oe.sourceTexture = De;
|
|
19699
19699
|
}
|
|
19700
19700
|
}
|
|
@@ -19722,7 +19722,7 @@ function Lm(i, e) {
|
|
|
19722
19722
|
f.color.getRGB(m.fogColor.value, wl(i)), f.isFog ? (m.fogNear.value = f.near, m.fogFar.value = f.far) : f.isFogExp2 && (m.fogDensity.value = f.density);
|
|
19723
19723
|
}
|
|
19724
19724
|
function r(m, f, b, T, y) {
|
|
19725
|
-
f.isMeshBasicMaterial || f.isMeshLambertMaterial ? s(m, f) : f.isMeshToonMaterial ? (s(m, f),
|
|
19725
|
+
f.isMeshBasicMaterial || f.isMeshLambertMaterial ? s(m, f) : f.isMeshToonMaterial ? (s(m, f), u(m, f)) : f.isMeshPhongMaterial ? (s(m, f), h(m, f)) : f.isMeshStandardMaterial ? (s(m, f), d(m, f), f.isMeshPhysicalMaterial && p(m, f, y)) : f.isMeshMatcapMaterial ? (s(m, f), _(m, f)) : f.isMeshDepthMaterial ? s(m, f) : f.isMeshDistanceMaterial ? (s(m, f), x(m, f)) : f.isMeshNormalMaterial ? s(m, f) : f.isLineBasicMaterial ? (a(m, f), f.isLineDashedMaterial && o(m, f)) : f.isPointsMaterial ? l(m, f, b, T) : f.isSpriteMaterial ? c(m, f) : f.isShadowMaterial ? (m.color.value.copy(f.color), m.opacity.value = f.opacity) : f.isShaderMaterial && (f.uniformsNeedUpdate = !1);
|
|
19726
19726
|
}
|
|
19727
19727
|
function s(m, f) {
|
|
19728
19728
|
m.opacity.value = f.opacity, f.color && m.diffuse.value.copy(f.color), f.emissive && m.emissive.value.copy(f.emissive).multiplyScalar(f.emissiveIntensity), f.map && (m.map.value = f.map, t(f.map, m.mapTransform)), f.alphaMap && (m.alphaMap.value = f.alphaMap, t(f.alphaMap, m.alphaMapTransform)), f.bumpMap && (m.bumpMap.value = f.bumpMap, t(f.bumpMap, m.bumpMapTransform), m.bumpScale.value = f.bumpScale, f.side === It && (m.bumpScale.value *= -1)), f.normalMap && (m.normalMap.value = f.normalMap, t(f.normalMap, m.normalMapTransform), m.normalScale.value.copy(f.normalScale), f.side === It && m.normalScale.value.negate()), f.displacementMap && (m.displacementMap.value = f.displacementMap, t(f.displacementMap, m.displacementMapTransform), m.displacementScale.value = f.displacementScale, m.displacementBias.value = f.displacementBias), f.emissiveMap && (m.emissiveMap.value = f.emissiveMap, t(f.emissiveMap, m.emissiveMapTransform)), f.specularMap && (m.specularMap.value = f.specularMap, t(f.specularMap, m.specularMapTransform)), f.alphaTest > 0 && (m.alphaTest.value = f.alphaTest);
|
|
@@ -19741,10 +19741,10 @@ function Lm(i, e) {
|
|
|
19741
19741
|
function c(m, f) {
|
|
19742
19742
|
m.diffuse.value.copy(f.color), m.opacity.value = f.opacity, m.rotation.value = f.rotation, f.map && (m.map.value = f.map, t(f.map, m.mapTransform)), f.alphaMap && (m.alphaMap.value = f.alphaMap, t(f.alphaMap, m.alphaMapTransform)), f.alphaTest > 0 && (m.alphaTest.value = f.alphaTest);
|
|
19743
19743
|
}
|
|
19744
|
-
function
|
|
19744
|
+
function h(m, f) {
|
|
19745
19745
|
m.specular.value.copy(f.specular), m.shininess.value = Math.max(f.shininess, 1e-4);
|
|
19746
19746
|
}
|
|
19747
|
-
function
|
|
19747
|
+
function u(m, f) {
|
|
19748
19748
|
f.gradientMap && (m.gradientMap.value = f.gradientMap);
|
|
19749
19749
|
}
|
|
19750
19750
|
function d(m, f) {
|
|
@@ -19774,19 +19774,19 @@ function Im(i, e, t, n) {
|
|
|
19774
19774
|
}
|
|
19775
19775
|
function c(b, T) {
|
|
19776
19776
|
let y = r[b.id];
|
|
19777
|
-
y === void 0 && (_(b), y =
|
|
19777
|
+
y === void 0 && (_(b), y = h(b), r[b.id] = y, b.addEventListener("dispose", m));
|
|
19778
19778
|
const A = T.program;
|
|
19779
19779
|
n.updateUBOMapping(b, A);
|
|
19780
19780
|
const R = e.render.frame;
|
|
19781
19781
|
s[b.id] !== R && (d(b), s[b.id] = R);
|
|
19782
19782
|
}
|
|
19783
|
-
function
|
|
19784
|
-
const T =
|
|
19783
|
+
function h(b) {
|
|
19784
|
+
const T = u();
|
|
19785
19785
|
b.__bindingPointIndex = T;
|
|
19786
19786
|
const y = i.createBuffer(), A = b.__size, R = b.usage;
|
|
19787
19787
|
return i.bindBuffer(i.UNIFORM_BUFFER, y), i.bufferData(i.UNIFORM_BUFFER, A, R), i.bindBuffer(i.UNIFORM_BUFFER, null), i.bindBufferBase(i.UNIFORM_BUFFER, T, y), y;
|
|
19788
19788
|
}
|
|
19789
|
-
function
|
|
19789
|
+
function u() {
|
|
19790
19790
|
for (let b = 0; b < o; b++)
|
|
19791
19791
|
if (a.indexOf(b) === -1)
|
|
19792
19792
|
return a.push(b), b;
|
|
@@ -20403,8 +20403,8 @@ class Fm {
|
|
|
20403
20403
|
antialias: o = !1,
|
|
20404
20404
|
premultipliedAlpha: l = !0,
|
|
20405
20405
|
preserveDrawingBuffer: c = !1,
|
|
20406
|
-
powerPreference:
|
|
20407
|
-
failIfMajorPerformanceCaveat:
|
|
20406
|
+
powerPreference: h = "default",
|
|
20407
|
+
failIfMajorPerformanceCaveat: u = !1,
|
|
20408
20408
|
reversedDepthBuffer: d = !1,
|
|
20409
20409
|
outputBufferType: p = Gt
|
|
20410
20410
|
} = e;
|
|
@@ -20472,8 +20472,8 @@ class Fm {
|
|
|
20472
20472
|
antialias: o,
|
|
20473
20473
|
premultipliedAlpha: l,
|
|
20474
20474
|
preserveDrawingBuffer: c,
|
|
20475
|
-
powerPreference:
|
|
20476
|
-
failIfMajorPerformanceCaveat:
|
|
20475
|
+
powerPreference: h,
|
|
20476
|
+
failIfMajorPerformanceCaveat: u
|
|
20477
20477
|
};
|
|
20478
20478
|
if ("setAttribute" in t && t.setAttribute("data-engine", `three.js r${Ea}`), t.addEventListener("webglcontextlost", Be, !1), t.addEventListener("webglcontextrestored", ot, !1), t.addEventListener("webglcontextcreationerror", Je, !1), w === null) {
|
|
20479
20479
|
const I = "webgl2";
|
|
@@ -21595,12 +21595,12 @@ function ig(i) {
|
|
|
21595
21595
|
a[c] = n[0], a[c + 1] = n[1], a[c + 2] = n[2];
|
|
21596
21596
|
continue;
|
|
21597
21597
|
}
|
|
21598
|
-
const
|
|
21599
|
-
if (!
|
|
21598
|
+
const h = l - 1, u = t[h];
|
|
21599
|
+
if (!u)
|
|
21600
21600
|
throw new Error(
|
|
21601
|
-
`No color for code=${l} (palette length=${t.length}); expected palette[${
|
|
21601
|
+
`No color for code=${l} (palette length=${t.length}); expected palette[${h}]`
|
|
21602
21602
|
);
|
|
21603
|
-
const p = r !== null && l !== r ? ng(
|
|
21603
|
+
const p = r !== null && l !== r ? ng(u, s) : u;
|
|
21604
21604
|
a[c] = p[0], a[c + 1] = p[1], a[c + 2] = p[2];
|
|
21605
21605
|
}
|
|
21606
21606
|
return a;
|
|
@@ -21679,11 +21679,11 @@ function dg(i, e, t) {
|
|
|
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
|
|
21683
|
-
l.setAttribute("position",
|
|
21684
|
-
let
|
|
21682
|
+
let h = new Mt(c, 3);
|
|
21683
|
+
l.setAttribute("position", h);
|
|
21684
|
+
let u = h.count, d = new Float32Array(u * 3), p = new Mt(d, 3);
|
|
21685
21685
|
l.setAttribute("color", p);
|
|
21686
|
-
let _ = new Float32Array(
|
|
21686
|
+
let _ = new Float32Array(u), x = new Mt(_, 1);
|
|
21687
21687
|
l.setAttribute("size", x);
|
|
21688
21688
|
function m() {
|
|
21689
21689
|
const Z = l.boundingSphere;
|
|
@@ -21814,13 +21814,13 @@ function dg(i, e, t) {
|
|
|
21814
21814
|
}
|
|
21815
21815
|
function Le() {
|
|
21816
21816
|
const Z = Qo(e.get(ne.xyzBytes));
|
|
21817
|
-
|
|
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();
|
|
21818
21818
|
}
|
|
21819
21819
|
function we() {
|
|
21820
21820
|
const Z = Jo(e.get(ne.codedValues));
|
|
21821
|
-
if (
|
|
21821
|
+
if (u = l.getAttribute("position").count, Z.length !== u)
|
|
21822
21822
|
throw new Error(
|
|
21823
|
-
`coded_values_t length ${Z.length} != nPoints ${
|
|
21823
|
+
`coded_values_t length ${Z.length} != nPoints ${u}`
|
|
21824
21824
|
);
|
|
21825
21825
|
const me = cg(e.get(ne.colors), "colors_t"), ve = ug(e.get(ne.missingColor), "missing_color_t"), de = e.get(ne.activeCategory);
|
|
21826
21826
|
let Re = null;
|
|
@@ -21856,9 +21856,9 @@ function dg(i, e, t) {
|
|
|
21856
21856
|
}
|
|
21857
21857
|
function ke() {
|
|
21858
21858
|
const Z = Jo(e.get(ne.codedValues));
|
|
21859
|
-
if (
|
|
21859
|
+
if (u = l.getAttribute("position").count, Z.length !== u)
|
|
21860
21860
|
throw new Error(
|
|
21861
|
-
`coded_values_t length ${Z.length} != nPoints ${
|
|
21861
|
+
`coded_values_t length ${Z.length} != nPoints ${u}`
|
|
21862
21862
|
);
|
|
21863
21863
|
const me = f(), ve = e.get(ne.activeCategory);
|
|
21864
21864
|
let de = null;
|
|
@@ -21945,17 +21945,17 @@ function fg(i) {
|
|
|
21945
21945
|
const p = e.get(ne.lassoResult);
|
|
21946
21946
|
p && p.status === "error" && console.error("Lasso error:", p.message);
|
|
21947
21947
|
};
|
|
21948
|
-
function
|
|
21948
|
+
function h() {
|
|
21949
21949
|
return e.get(ne.showAxes) === !0;
|
|
21950
21950
|
}
|
|
21951
|
-
const
|
|
21952
|
-
t.setAxesFromModel(),
|
|
21951
|
+
const u = () => {
|
|
21952
|
+
t.setAxesFromModel(), h() && t.rebuildAxisLabels?.();
|
|
21953
21953
|
}, d = () => {
|
|
21954
|
-
|
|
21954
|
+
h() && t.rebuildAxisLabels?.();
|
|
21955
21955
|
};
|
|
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),
|
|
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), {
|
|
21957
21957
|
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),
|
|
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);
|
|
21959
21959
|
}
|
|
21960
21960
|
};
|
|
21961
21961
|
}
|
|
@@ -21974,7 +21974,7 @@ function pg(i) {
|
|
|
21974
21974
|
function mg(i) {
|
|
21975
21975
|
const { model: e, three: t, threeCanvas: n, view: r, isLassoMode: s, signal: a } = i;
|
|
21976
21976
|
let o = 0, l = null, c = null;
|
|
21977
|
-
const
|
|
21977
|
+
const h = (d) => {
|
|
21978
21978
|
if (s()) return;
|
|
21979
21979
|
const p = n.getBoundingClientRect(), _ = d.clientX - p.left, x = d.clientY - p.top, m = p.width > 0 ? _ / p.width : 0, f = p.height > 0 ? x / p.height : 0, b = m * 2 - 1, T = -(f * 2 - 1), y = t.pickPointIndex(b, T);
|
|
21980
21980
|
if (y == null) {
|
|
@@ -21988,7 +21988,7 @@ function mg(i) {
|
|
|
21988
21988
|
request_id: A
|
|
21989
21989
|
}), e.save_changes();
|
|
21990
21990
|
};
|
|
21991
|
-
return n.addEventListener("click",
|
|
21991
|
+
return n.addEventListener("click", h, { signal: a }), {
|
|
21992
21992
|
onTooltipResponseChange: () => {
|
|
21993
21993
|
const d = e.get(ne.tooltipResponse);
|
|
21994
21994
|
if (!pg(d)) return;
|
|
@@ -22029,8 +22029,8 @@ function _g(i) {
|
|
|
22029
22029
|
syncUiFromState: o,
|
|
22030
22030
|
signal: l,
|
|
22031
22031
|
transportReady: c,
|
|
22032
|
-
showMessage:
|
|
22033
|
-
clearMessage:
|
|
22032
|
+
showMessage: h,
|
|
22033
|
+
clearMessage: u,
|
|
22034
22034
|
debug: d
|
|
22035
22035
|
} = i;
|
|
22036
22036
|
if (!n || !n.el)
|
|
@@ -22043,7 +22043,7 @@ function _g(i) {
|
|
|
22043
22043
|
"Invariant violation: model must provide boolean trait category_editable_t (TRAITS.categoryEditable)."
|
|
22044
22044
|
);
|
|
22045
22045
|
function _(y) {
|
|
22046
|
-
|
|
22046
|
+
u(), e.set(ne.interactionMode, y.kind), e.save_changes(), y.kind === "rotate" ? Lr(r, { kind: "rotate" }) : Lr(r, { kind: "lasso", operation: y.operation }), o(), s.focus();
|
|
22047
22047
|
}
|
|
22048
22048
|
_({ kind: "rotate" });
|
|
22049
22049
|
function x() {
|
|
@@ -22064,12 +22064,12 @@ function _g(i) {
|
|
|
22064
22064
|
() => {
|
|
22065
22065
|
if (x()) {
|
|
22066
22066
|
if (!c()) {
|
|
22067
|
-
|
|
22067
|
+
h(
|
|
22068
22068
|
"Widget not interactive yet. Maybe you should run the cell to enable lasso."
|
|
22069
22069
|
);
|
|
22070
22070
|
return;
|
|
22071
22071
|
}
|
|
22072
|
-
|
|
22072
|
+
u(), _({ kind: "lasso", operation: "add" });
|
|
22073
22073
|
}
|
|
22074
22074
|
},
|
|
22075
22075
|
{ signal: l }
|
|
@@ -22128,7 +22128,7 @@ function _g(i) {
|
|
|
22128
22128
|
D = e.save_changes();
|
|
22129
22129
|
} catch (z) {
|
|
22130
22130
|
if ((z instanceof Error ? z.message : String(z)).includes("widget transport not ready")) {
|
|
22131
|
-
|
|
22131
|
+
h(
|
|
22132
22132
|
"Widget not interactive yet. Maybe you should run the cell to enable lasso."
|
|
22133
22133
|
), b("transport-not-ready");
|
|
22134
22134
|
return;
|
|
@@ -22231,7 +22231,7 @@ function xg(i) {
|
|
|
22231
22231
|
onFirstValidSize: a
|
|
22232
22232
|
} = i;
|
|
22233
22233
|
let o = 0, l = 0, c = !1;
|
|
22234
|
-
function
|
|
22234
|
+
function h(p, _) {
|
|
22235
22235
|
const x = Math.max(0, Math.round(p)), m = Math.max(0, Math.round(_));
|
|
22236
22236
|
if (x === 0 || m === 0 || !(o === 0 || l === 0) && Math.abs(x - o) < s && Math.abs(m - l) < s)
|
|
22237
22237
|
return;
|
|
@@ -22239,13 +22239,13 @@ function xg(i) {
|
|
|
22239
22239
|
const { devicePixelRatio: b, width: T, height: y } = r(x, m);
|
|
22240
22240
|
n.dpr = b, n.pixelWidth = T, n.pixelHeight = y, t.setSize(x, m, b), c || (c = !0, a?.(x, m, b));
|
|
22241
22241
|
}
|
|
22242
|
-
function
|
|
22242
|
+
function u() {
|
|
22243
22243
|
const p = e.getBoundingClientRect();
|
|
22244
|
-
|
|
22244
|
+
h(p.width, p.height);
|
|
22245
22245
|
}
|
|
22246
|
-
const d = ic(e, (p, _) =>
|
|
22247
|
-
return
|
|
22248
|
-
applyNow:
|
|
22246
|
+
const d = ic(e, (p, _) => h(p, _));
|
|
22247
|
+
return u(), {
|
|
22248
|
+
applyNow: u,
|
|
22249
22249
|
dispose: () => d()
|
|
22250
22250
|
};
|
|
22251
22251
|
}
|
|
@@ -22282,9 +22282,9 @@ function Mg(i) {
|
|
|
22282
22282
|
}
|
|
22283
22283
|
function a(o, l, c) {
|
|
22284
22284
|
n();
|
|
22285
|
-
for (const [
|
|
22285
|
+
for (const [h, u] of c) {
|
|
22286
22286
|
const d = document.createElement("div"), p = document.createElement("b");
|
|
22287
|
-
p.textContent =
|
|
22287
|
+
p.textContent = h, d.appendChild(p), d.append(`: ${u}`), i.appendChild(d);
|
|
22288
22288
|
}
|
|
22289
22289
|
t(o, l);
|
|
22290
22290
|
}
|
|
@@ -22317,12 +22317,12 @@ function Sg(i, e) {
|
|
|
22317
22317
|
const _ = d.target?.closest?.("[data-legend-label]");
|
|
22318
22318
|
_ && (_.dataset.hover = "1", a(_) || (_.style.background = e.legend.hoverRowBg));
|
|
22319
22319
|
}
|
|
22320
|
-
function
|
|
22320
|
+
function h(d) {
|
|
22321
22321
|
const _ = d.target?.closest?.("[data-legend-label]");
|
|
22322
22322
|
_ && (delete _.dataset.hover, o(_));
|
|
22323
22323
|
}
|
|
22324
|
-
t.addEventListener("click", l), t.addEventListener("mouseover", c), t.addEventListener("mouseout",
|
|
22325
|
-
function
|
|
22324
|
+
t.addEventListener("click", l), t.addEventListener("mouseover", c), t.addEventListener("mouseout", h);
|
|
22325
|
+
function u(d) {
|
|
22326
22326
|
t.innerHTML = "", t.style.font = e.legend.font, t.style.color = e.legend.textColor;
|
|
22327
22327
|
for (const p of d.items) {
|
|
22328
22328
|
const _ = document.createElement("div");
|
|
@@ -22337,11 +22337,11 @@ function Sg(i, e) {
|
|
|
22337
22337
|
}
|
|
22338
22338
|
return {
|
|
22339
22339
|
el: t,
|
|
22340
|
-
render:
|
|
22340
|
+
render: u,
|
|
22341
22341
|
onItemClick: r,
|
|
22342
22342
|
setPlacement: s,
|
|
22343
22343
|
dispose: () => {
|
|
22344
|
-
t.removeEventListener("click", l), t.removeEventListener("mouseover", c), t.removeEventListener("mouseout",
|
|
22344
|
+
t.removeEventListener("click", l), t.removeEventListener("mouseover", c), t.removeEventListener("mouseout", h), t.remove();
|
|
22345
22345
|
}
|
|
22346
22346
|
};
|
|
22347
22347
|
}
|
|
@@ -22382,53 +22382,76 @@ function Ag(i) {
|
|
|
22382
22382
|
}
|
|
22383
22383
|
function wg(i) {
|
|
22384
22384
|
const { model: e, view: t, transportReady: n } = i;
|
|
22385
|
-
function r(
|
|
22385
|
+
function r(d) {
|
|
22386
22386
|
try {
|
|
22387
|
-
const
|
|
22388
|
-
yg(
|
|
22389
|
-
console.warn(`[legend] save_changes failed (${
|
|
22387
|
+
const p = e.save_changes();
|
|
22388
|
+
yg(p) && p.then(void 0, (_) => {
|
|
22389
|
+
console.warn(`[legend] save_changes failed (${d})`, _);
|
|
22390
22390
|
});
|
|
22391
|
-
} catch (
|
|
22392
|
-
console.warn(`[legend] save_changes threw (${
|
|
22391
|
+
} catch (p) {
|
|
22392
|
+
console.warn(`[legend] save_changes threw (${d})`, p);
|
|
22393
22393
|
}
|
|
22394
22394
|
}
|
|
22395
22395
|
function s() {
|
|
22396
|
-
const
|
|
22397
|
-
if (
|
|
22396
|
+
const d = Eg(e.get(ne.labels), "labels_t"), p = bg(e.get(ne.colors), "colors_t");
|
|
22397
|
+
if (p.length !== d.length)
|
|
22398
22398
|
throw new Error(
|
|
22399
|
-
`Palette incomplete: labels_t length=${
|
|
22399
|
+
`Palette incomplete: labels_t length=${d.length} but colors_t length=${p.length}`
|
|
22400
22400
|
);
|
|
22401
|
-
const
|
|
22402
|
-
t.setPlacement({ side:
|
|
22403
|
-
mode:
|
|
22404
|
-
items:
|
|
22405
|
-
label:
|
|
22406
|
-
color:
|
|
22407
|
-
isActive:
|
|
22401
|
+
const _ = tl(e.get(ne.interactionMode)), x = nl(e.get(ne.activeCategory)), m = Tg(e.get(ne.legendSide)), f = Ag(e.get(ne.legendDock));
|
|
22402
|
+
t.setPlacement({ side: m, dock: f }), t.render({
|
|
22403
|
+
mode: _,
|
|
22404
|
+
items: d.map((b, T) => ({
|
|
22405
|
+
label: b,
|
|
22406
|
+
color: p[T],
|
|
22407
|
+
isActive: x !== null && b === x
|
|
22408
22408
|
}))
|
|
22409
22409
|
});
|
|
22410
22410
|
}
|
|
22411
|
-
|
|
22412
|
-
|
|
22411
|
+
let a = !1, o = !1;
|
|
22412
|
+
function l(d) {
|
|
22413
|
+
return d instanceof Error && d.message.startsWith("Palette incomplete:");
|
|
22414
|
+
}
|
|
22415
|
+
function c() {
|
|
22416
|
+
try {
|
|
22417
|
+
return s(), !0;
|
|
22418
|
+
} catch (d) {
|
|
22419
|
+
if (l(d)) return !1;
|
|
22420
|
+
throw d;
|
|
22421
|
+
}
|
|
22413
22422
|
}
|
|
22414
|
-
|
|
22423
|
+
function h() {
|
|
22424
|
+
a || (a = !0, queueMicrotask(() => {
|
|
22425
|
+
if (a = !1, c()) {
|
|
22426
|
+
o = !1;
|
|
22427
|
+
return;
|
|
22428
|
+
}
|
|
22429
|
+
o ? (o = !1, console.warn(
|
|
22430
|
+
"[legend] palette incomplete after retry; skipping refresh"
|
|
22431
|
+
)) : (o = !0, h());
|
|
22432
|
+
}));
|
|
22433
|
+
}
|
|
22434
|
+
function u() {
|
|
22435
|
+
h();
|
|
22436
|
+
}
|
|
22437
|
+
return t.onItemClick((d) => {
|
|
22415
22438
|
if (!n()) {
|
|
22416
22439
|
console.warn(
|
|
22417
22440
|
"[legend] transport not ready yet (expected in marimo until cell run)"
|
|
22418
22441
|
);
|
|
22419
22442
|
return;
|
|
22420
22443
|
}
|
|
22421
|
-
const
|
|
22422
|
-
if (
|
|
22423
|
-
if (
|
|
22424
|
-
e.set(ne.activeCategory,
|
|
22444
|
+
const p = tl(e.get(ne.interactionMode)), _ = nl(e.get(ne.activeCategory));
|
|
22445
|
+
if (p === "lasso") {
|
|
22446
|
+
if (_ !== null && d === _) return;
|
|
22447
|
+
e.set(ne.activeCategory, d), r("activeCategory");
|
|
22425
22448
|
return;
|
|
22426
22449
|
}
|
|
22427
|
-
|
|
22428
|
-
}), e.on(`change:${ne.labels}`,
|
|
22450
|
+
_ !== null && d === _ ? e.set(ne.activeCategory, null) : e.set(ne.activeCategory, d), r("activeCategory");
|
|
22451
|
+
}), e.on(`change:${ne.labels}`, u), e.on(`change:${ne.colors}`, u), e.on(`change:${ne.activeCategory}`, u), e.on(`change:${ne.interactionMode}`, u), e.on(`change:${ne.legendSide}`, u), e.on(`change:${ne.legendDock}`, u), {
|
|
22429
22452
|
refreshFromModel: s,
|
|
22430
22453
|
dispose: () => {
|
|
22431
|
-
e.off(`change:${ne.labels}`,
|
|
22454
|
+
e.off(`change:${ne.labels}`, u), e.off(`change:${ne.colors}`, u), e.off(`change:${ne.activeCategory}`, u), e.off(`change:${ne.interactionMode}`, u), e.off(`change:${ne.legendSide}`, u), e.off(`change:${ne.legendDock}`, u);
|
|
22432
22455
|
}
|
|
22433
22456
|
};
|
|
22434
22457
|
}
|
|
@@ -22473,7 +22496,7 @@ function Lg(i, e) {
|
|
|
22473
22496
|
let t = !1, n = -1 / 0, r = !1;
|
|
22474
22497
|
const s = /* @__PURE__ */ new Set(), a = () => {
|
|
22475
22498
|
i.get(ne.interactiveReady) === !0 && (t = !0);
|
|
22476
|
-
for (const
|
|
22499
|
+
for (const u of s) u();
|
|
22477
22500
|
};
|
|
22478
22501
|
i.on(`change:${ne.interactiveReady}`, a);
|
|
22479
22502
|
function o() {
|
|
@@ -22484,8 +22507,8 @@ function Lg(i, e) {
|
|
|
22484
22507
|
t = !0;
|
|
22485
22508
|
return;
|
|
22486
22509
|
}
|
|
22487
|
-
const
|
|
22488
|
-
if (!(
|
|
22510
|
+
const u = performance.now();
|
|
22511
|
+
if (!(u - n < 250) && (n = u, !r)) {
|
|
22489
22512
|
i.get(ne.clientReady) === !0 && i.set(ne.clientReady, !1), i.set(ne.clientReady, !0);
|
|
22490
22513
|
try {
|
|
22491
22514
|
r = !0;
|
|
@@ -22503,13 +22526,13 @@ function Lg(i, e) {
|
|
|
22503
22526
|
}
|
|
22504
22527
|
}
|
|
22505
22528
|
}
|
|
22506
|
-
function c(
|
|
22507
|
-
return s.add(
|
|
22529
|
+
function c(u) {
|
|
22530
|
+
return s.add(u), () => s.delete(u);
|
|
22508
22531
|
}
|
|
22509
|
-
function
|
|
22532
|
+
function h() {
|
|
22510
22533
|
i.off(`change:${ne.interactiveReady}`, a), s.clear();
|
|
22511
22534
|
}
|
|
22512
|
-
return { isReady: o, announceClientReadyOnce: l, onReadyChange: c, dispose:
|
|
22535
|
+
return { isReady: o, announceClientReadyOnce: l, onReadyChange: c, dispose: h };
|
|
22513
22536
|
}
|
|
22514
22537
|
function Ig(i) {
|
|
22515
22538
|
const { desiredPx: e, maxAllowedPx: t, overheadPx: n } = i;
|
|
@@ -22589,14 +22612,14 @@ function Bg(i) {
|
|
|
22589
22612
|
if (typeof n != "function")
|
|
22590
22613
|
throw new Error("height_controller: getDesiredPx must be a function");
|
|
22591
22614
|
{
|
|
22592
|
-
const
|
|
22593
|
-
if (!(typeof
|
|
22615
|
+
const u = n();
|
|
22616
|
+
if (!(typeof u == "number" && Number.isFinite(u)))
|
|
22594
22617
|
throw new Error(
|
|
22595
|
-
`height_controller: desiredPx must be finite number, got ${
|
|
22618
|
+
`height_controller: desiredPx must be finite number, got ${u}`
|
|
22596
22619
|
);
|
|
22597
|
-
if (
|
|
22620
|
+
if (u <= 0)
|
|
22598
22621
|
throw new Error(
|
|
22599
|
-
`height_controller: desiredPx must be > 0, got ${
|
|
22622
|
+
`height_controller: desiredPx must be > 0, got ${u}`
|
|
22600
22623
|
);
|
|
22601
22624
|
}
|
|
22602
22625
|
const s = Og(e);
|
|
@@ -22607,31 +22630,31 @@ function Bg(i) {
|
|
|
22607
22630
|
const a = s;
|
|
22608
22631
|
let o = !1;
|
|
22609
22632
|
const l = new ResizeObserver(() => {
|
|
22610
|
-
o ||
|
|
22633
|
+
o || h();
|
|
22611
22634
|
});
|
|
22612
22635
|
l.observe(a);
|
|
22613
22636
|
const c = new MutationObserver(() => {
|
|
22614
|
-
o ||
|
|
22637
|
+
o || h();
|
|
22615
22638
|
});
|
|
22616
22639
|
c.observe(a, {
|
|
22617
22640
|
attributes: !0,
|
|
22618
22641
|
attributeFilter: ["class", "style"]
|
|
22619
22642
|
});
|
|
22620
|
-
function
|
|
22621
|
-
const
|
|
22643
|
+
function h() {
|
|
22644
|
+
const u = ql(a), d = u === null ? 0 : Ng(a), p = n();
|
|
22622
22645
|
if (!(typeof p == "number" && Number.isFinite(p) && p > 0))
|
|
22623
22646
|
throw new Error(
|
|
22624
22647
|
`height_controller: desiredPx must be finite number > 0, got ${p}`
|
|
22625
22648
|
);
|
|
22626
22649
|
const _ = Ig({
|
|
22627
22650
|
desiredPx: p,
|
|
22628
|
-
maxAllowedPx:
|
|
22651
|
+
maxAllowedPx: u,
|
|
22629
22652
|
overheadPx: d
|
|
22630
22653
|
});
|
|
22631
22654
|
t.style.height = `${_}px`, t.style.minHeight = "", r?.(_);
|
|
22632
22655
|
}
|
|
22633
22656
|
return {
|
|
22634
|
-
applyNow:
|
|
22657
|
+
applyNow: h,
|
|
22635
22658
|
dispose: () => {
|
|
22636
22659
|
o = !0, l.disconnect(), c.disconnect();
|
|
22637
22660
|
}
|
|
@@ -22649,16 +22672,16 @@ function Vg(i, e, t) {
|
|
|
22649
22672
|
hostRect: { width: 0, height: 0 },
|
|
22650
22673
|
overlaySize: { width: 0, height: 0 },
|
|
22651
22674
|
stateSize: { dpr: 0, pixelWidth: 0, pixelHeight: 0 }
|
|
22652
|
-
}, r = Pg(i, n), { root: s, toolbar: a, tooltip: o, canvasHost: l } = nc(e), c = qa,
|
|
22653
|
-
|
|
22654
|
-
const { canvas:
|
|
22675
|
+
}, r = Pg(i, n), { root: s, toolbar: a, tooltip: o, canvasHost: l } = nc(e), c = qa, h = dg(l, r, c);
|
|
22676
|
+
h.domElement.style.position = "absolute", h.domElement.style.inset = "0", h.domElement.style.zIndex = "1";
|
|
22677
|
+
const { canvas: u, resizeCanvas: d } = rc(l), p = (re, Le) => {
|
|
22655
22678
|
const we = d(re, Le);
|
|
22656
22679
|
return n.stateSize = {
|
|
22657
22680
|
dpr: we.devicePixelRatio,
|
|
22658
22681
|
pixelWidth: we.width,
|
|
22659
22682
|
pixelHeight: we.height
|
|
22660
22683
|
}, we;
|
|
22661
|
-
}, _ = tc(
|
|
22684
|
+
}, _ = tc(u), x = ac(), m = new AbortController(), f = Mg(o), b = dc(a, c);
|
|
22662
22685
|
function T(re) {
|
|
22663
22686
|
b.messageEl.textContent = re, b.messageEl.style.display = "";
|
|
22664
22687
|
}
|
|
@@ -22690,15 +22713,15 @@ function Vg(i, e, t) {
|
|
|
22690
22713
|
mode: re,
|
|
22691
22714
|
operation: Le
|
|
22692
22715
|
};
|
|
22693
|
-
fc(b, c, we), we.mode === "lasso" && f.hide(), we.mode === "rotate" ? (
|
|
22716
|
+
fc(b, c, we), we.mode === "lasso" && f.hide(), we.mode === "rotate" ? (h.domElement.style.pointerEvents = "auto", u.style.pointerEvents = "none") : (h.domElement.style.pointerEvents = "none", u.style.pointerEvents = "auto");
|
|
22694
22717
|
}
|
|
22695
22718
|
const D = _g({
|
|
22696
22719
|
model: r,
|
|
22697
|
-
three:
|
|
22720
|
+
three: h,
|
|
22698
22721
|
bar: b,
|
|
22699
22722
|
state: x,
|
|
22700
22723
|
root: s,
|
|
22701
|
-
canvas:
|
|
22724
|
+
canvas: u,
|
|
22702
22725
|
syncUiFromState: S,
|
|
22703
22726
|
signal: m.signal,
|
|
22704
22727
|
transportReady: R,
|
|
@@ -22708,14 +22731,14 @@ function Vg(i, e, t) {
|
|
|
22708
22731
|
debug: globalThis.__scatter3d_test_debug ?? void 0
|
|
22709
22732
|
}), z = mg({
|
|
22710
22733
|
model: r,
|
|
22711
|
-
three:
|
|
22712
|
-
threeCanvas:
|
|
22734
|
+
three: h,
|
|
22735
|
+
threeCanvas: h.domElement,
|
|
22713
22736
|
view: f,
|
|
22714
22737
|
isLassoMode: () => x.mode.kind === "lasso",
|
|
22715
22738
|
signal: m.signal
|
|
22716
22739
|
}), B = fg({
|
|
22717
22740
|
model: r,
|
|
22718
|
-
three:
|
|
22741
|
+
three: h,
|
|
22719
22742
|
refreshLegendUI: M.refreshFromModel,
|
|
22720
22743
|
onTooltipResponseChange: z.onTooltipResponseChange
|
|
22721
22744
|
});
|
|
@@ -22724,10 +22747,10 @@ function Vg(i, e, t) {
|
|
|
22724
22747
|
r.save_changes();
|
|
22725
22748
|
} catch {
|
|
22726
22749
|
}
|
|
22727
|
-
|
|
22750
|
+
h.setPointsFromModel(), h.setColorsFromModel(), h.setSizesFromModel(), h.setAxesFromModel();
|
|
22728
22751
|
const G = xg({
|
|
22729
22752
|
canvasHost: l,
|
|
22730
|
-
three:
|
|
22753
|
+
three: h,
|
|
22731
22754
|
state: x,
|
|
22732
22755
|
resizeCanvas: p
|
|
22733
22756
|
});
|
|
@@ -22778,8 +22801,8 @@ function Vg(i, e, t) {
|
|
|
22778
22801
|
const ke = l.getBoundingClientRect();
|
|
22779
22802
|
if (ke.width > 0 && ke.height > 0 && x.pixelWidth > 0 && x.pixelHeight > 0 && x.dpr > 0) {
|
|
22780
22803
|
S(), n.hostRect = { width: ke.width, height: ke.height }, n.overlaySize = {
|
|
22781
|
-
width:
|
|
22782
|
-
height:
|
|
22804
|
+
width: u.width,
|
|
22805
|
+
height: u.height
|
|
22783
22806
|
}, n.stateSize = {
|
|
22784
22807
|
dpr: x.dpr,
|
|
22785
22808
|
pixelWidth: x.pixelWidth,
|
|
@@ -22804,19 +22827,19 @@ function Vg(i, e, t) {
|
|
|
22804
22827
|
$();
|
|
22805
22828
|
const ie = vg({
|
|
22806
22829
|
onFrame: () => {
|
|
22807
|
-
|
|
22830
|
+
h.render(), hc(x, _);
|
|
22808
22831
|
}
|
|
22809
22832
|
});
|
|
22810
22833
|
return (t?.startRaf ?? !1) && ie.start(), {
|
|
22811
22834
|
cleanup: () => {
|
|
22812
22835
|
ie.stop();
|
|
22813
22836
|
for (const re of k) re();
|
|
22814
|
-
m.abort(), M.dispose(), F.dispose(), C.remove(), B.dispose(), D.dispose(), z.dispose(), X?.dispose(), G.dispose(),
|
|
22837
|
+
m.abort(), M.dispose(), F.dispose(), C.remove(), B.dispose(), D.dispose(), z.dispose(), X?.dispose(), G.dispose(), h.dispose(), A.dispose(), u.remove();
|
|
22815
22838
|
},
|
|
22816
22839
|
forceResize: H,
|
|
22817
22840
|
root: s,
|
|
22818
22841
|
canvasHost: l,
|
|
22819
|
-
overlayCanvas:
|
|
22842
|
+
overlayCanvas: u,
|
|
22820
22843
|
debug: n
|
|
22821
22844
|
};
|
|
22822
22845
|
}
|