pptx-svelte-viewer 2.20.4 → 2.20.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/{AiChatPanel-Bpx1xBL5.js → AiChatPanel-loOqMQN8.js} +471 -467
- package/dist/{GLTFLoader-CAjQhVgN.js → GLTFLoader-9vQ_XShd.js} +43 -44
- package/dist/{OrbitControls-B2ezETBF.js → OrbitControls-DRqFov_0.js} +5 -9
- package/dist/{awareness-CkFlr7xx.js → awareness-CrSnuSE_.js} +1 -1
- package/dist/{export-CEyYhd0_.js → export-BPyf11v8.js} +21477 -21273
- package/dist/index.js +1 -1
- package/dist/pptx-svelte-viewer.css +1 -1
- package/dist/{smartart-3d-BLqXYusO.js → smartart-3d-CX2GnyTe.js} +2 -2
- package/dist/{three.module-BLwnGxzY.js → three.module-BAfeCwYa.js} +890 -868
- package/dist/viewer/collab/collaboration.svelte.d.ts +5 -0
- package/dist/viewer/collab/collaboration.svelte.d.ts.map +1 -1
- package/dist/viewer/collab/components/props.d.ts +8 -0
- package/dist/viewer/collab/components/props.d.ts.map +1 -1
- package/dist/viewer/index.d.ts +5 -0
- package/dist/viewer/index.js +1 -1
- package/dist/{y-webrtc-Cph8DzuM.js → y-webrtc-Ctru8jg8.js} +37 -38
- package/dist/y-websocket-BgHVdw-O.js +125 -0
- package/dist/{yjs-CE9F053g.js → yjs-DbU20bpp.js} +383 -385
- package/package.json +6 -6
- package/dist/y-websocket-C6aE1Dkp.js +0 -115
|
@@ -10,7 +10,7 @@ var bv = "185", Tv = {
|
|
|
10
10
|
PAN: 1,
|
|
11
11
|
DOLLY_PAN: 2,
|
|
12
12
|
DOLLY_ROTATE: 3
|
|
13
|
-
}, Ev = 0, wv = 1, Cv = 2, Rv = 3, Iv = 0, Pv = 1, Lv = 2, Uv = 3, Nv = 0, Dv = 1, Ov = 2, Fv = 0, Bv = 1, zv = 2, Vv = 3, kv = 4, Gv = 5, Hv = 6, Wv = 100, Xv = 101, qv = 102, Yv = 103, Zv = 104, Jv = 200, Kv = 201, $v = 202, Qv = 203, jv = 204, e_ = 205, t_ = 206, i_ = 207, n_ = 208, r_ = 209, s_ = 210, a_ = 211, o_ = 212, l_ = 213, c_ = 214, h_ = 0, u_ = 1, d_ = 2, f_ = 3, p_ = 4, m_ = 5, g_ = 6, v_ = 7, __ = 0, y_ = 1, x_ = 2, M_ = 0, S_ = 1, b_ = 2, T_ = 3, A_ = 4, E_ = 5, w_ = 6, C_ = 7, jh = "attached", R_ = "detached", I_ = 300, P_ = 301, L_ = 302, U_ = 303, N_ = 304, D_ = 306, Cs = 1e3, Zt = 1001, Rs = 1002, Ct = 1003, cc = 1004, O_ = 1004, hc = 1005, F_ = 1005, St = 1006, uc = 1007, B_ = 1007, Cr = 1008, z_ = 1008, Fi = 1009, eu = 1010, tu = 1011, dc = 1012, iu = 1013, Bi = 1014, zi = 1015,
|
|
13
|
+
}, Ev = 0, wv = 1, Cv = 2, Rv = 3, Iv = 0, Pv = 1, Lv = 2, Uv = 3, Nv = 0, Dv = 1, Ov = 2, Fv = 0, Bv = 1, zv = 2, Vv = 3, kv = 4, Gv = 5, Hv = 6, Wv = 100, Xv = 101, qv = 102, Yv = 103, Zv = 104, Jv = 200, Kv = 201, $v = 202, Qv = 203, jv = 204, e_ = 205, t_ = 206, i_ = 207, n_ = 208, r_ = 209, s_ = 210, a_ = 211, o_ = 212, l_ = 213, c_ = 214, h_ = 0, u_ = 1, d_ = 2, f_ = 3, p_ = 4, m_ = 5, g_ = 6, v_ = 7, __ = 0, y_ = 1, x_ = 2, M_ = 0, S_ = 1, b_ = 2, T_ = 3, A_ = 4, E_ = 5, w_ = 6, C_ = 7, jh = "attached", R_ = "detached", I_ = 300, P_ = 301, L_ = 302, U_ = 303, N_ = 304, D_ = 306, Cs = 1e3, Zt = 1001, Rs = 1002, Ct = 1003, cc = 1004, O_ = 1004, hc = 1005, F_ = 1005, St = 1006, uc = 1007, B_ = 1007, Cr = 1008, z_ = 1008, Fi = 1009, eu = 1010, tu = 1011, dc = 1012, iu = 1013, Bi = 1014, zi = 1015, hn = 1016, fc = 1017, pc = 1018, mc = 1020, nu = 35902, ru = 35899, su = 1021, au = 1022, Vi = 1023, Sr = 1026, gc = 1027, vc = 1028, to = 1029, Is = 1030, _c = 1031, V_ = 1032, yc = 1033, ou = 33776, lu = 33777, cu = 33778, hu = 33779, uu = 35840, du = 35841, fu = 35842, pu = 35843, mu = 36196, gu = 37492, vu = 37496, _u = 37488, yu = 37489, xu = 37490, Mu = 37491, Su = 37808, bu = 37809, Tu = 37810, Au = 37811, Eu = 37812, wu = 37813, Cu = 37814, Ru = 37815, Iu = 37816, Pu = 37817, Lu = 37818, Uu = 37819, Nu = 37820, Du = 37821, Ou = 36492, Fu = 36494, Bu = 36495, zu = 36283, Vu = 36284, ku = 36285, Gu = 36286, k_ = 2200, Hu = 2201, Wu = 2202, Ps = 2300, Wa = 2301, $s = 2302, Co = 2303, kn = 2400, Gn = 2401, Ls = 2402, io = 2500, xc = 2501, G_ = 0, H_ = 1, W_ = 2, Xu = 3200, X_ = 3201, q_ = 3202, Y_ = 3203, Z_ = 0, J_ = 1, K_ = "", jt = "srgb", Xa = "srgb-linear", Us = "linear", Ns = "srgb", $_ = "", Q_ = "rg", j_ = "ga", e0 = 0, Qs = 7680, t0 = 7681, i0 = 7682, n0 = 7683, r0 = 34055, s0 = 34056, a0 = 5386, o0 = 512, l0 = 513, c0 = 514, h0 = 515, u0 = 516, d0 = 517, f0 = 518, p0 = 519, m0 = 512, g0 = 513, v0 = 514, _0 = 515, y0 = 516, x0 = 517, M0 = 518, S0 = 519, no = 35044, b0 = 35048, T0 = 35040, A0 = 35045, E0 = 35049, w0 = 35041, C0 = 35046, R0 = 35050, I0 = 35042, P0 = "100", L0 = "300 es", un = 2e3, U0 = 2001, N0 = {
|
|
14
14
|
COMPUTE: "compute",
|
|
15
15
|
RENDER: "render"
|
|
16
16
|
}, D0 = {
|
|
@@ -39,7 +39,7 @@ var Yu = {
|
|
|
39
39
|
Float32Array,
|
|
40
40
|
Float64Array
|
|
41
41
|
};
|
|
42
|
-
function
|
|
42
|
+
function Hn(e, t) {
|
|
43
43
|
return new Yu[e](t);
|
|
44
44
|
}
|
|
45
45
|
function Mc(e) {
|
|
@@ -89,7 +89,7 @@ function Pe(...e) {
|
|
|
89
89
|
i && i.isStackTrace ? console.error(i.getError(t)) : console.error(t, ...e);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function ln(...e) {
|
|
93
93
|
const t = e.join(" ");
|
|
94
94
|
t in Ro || (Ro[t] = !0, he(...e));
|
|
95
95
|
}
|
|
@@ -406,7 +406,7 @@ var Ku = {
|
|
|
406
406
|
"fd",
|
|
407
407
|
"fe",
|
|
408
408
|
"ff"
|
|
409
|
-
], Io = 1234567,
|
|
409
|
+
], Io = 1234567, cn = Math.PI / 180, qn = 180 / Math.PI;
|
|
410
410
|
function Jt() {
|
|
411
411
|
const e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, i = Math.random() * 4294967295 | 0, n = Math.random() * 4294967295 | 0;
|
|
412
412
|
return (Pt[e & 255] + Pt[e >> 8 & 255] + Pt[e >> 16 & 255] + Pt[e >> 24 & 255] + "-" + Pt[t & 255] + Pt[t >> 8 & 255] + "-" + Pt[t >> 16 & 15 | 64] + Pt[t >> 24 & 255] + "-" + Pt[i & 63 | 128] + Pt[i >> 8 & 255] + "-" + Pt[i >> 16 & 255] + Pt[i >> 24 & 255] + Pt[n & 255] + Pt[n >> 8 & 255] + Pt[n >> 16 & 255] + Pt[n >> 24 & 255]).toLowerCase();
|
|
@@ -453,7 +453,7 @@ function ad(e) {
|
|
|
453
453
|
return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
454
454
|
}
|
|
455
455
|
function od(e) {
|
|
456
|
-
return e *
|
|
456
|
+
return e * cn;
|
|
457
457
|
}
|
|
458
458
|
function ld(e) {
|
|
459
459
|
return e * qn;
|
|
@@ -468,7 +468,7 @@ function ud(e) {
|
|
|
468
468
|
return Math.pow(2, Math.floor(Math.log(e) / Math.LN2));
|
|
469
469
|
}
|
|
470
470
|
function dd(e, t, i, n, r) {
|
|
471
|
-
const s = Math.cos, a = Math.sin, o = s(i / 2), l = a(i / 2), c = s((t + n) / 2), h = a((t + n) / 2), d = s((t - n) / 2), u = a((t - n) / 2), f = s((n - t) / 2),
|
|
471
|
+
const s = Math.cos, a = Math.sin, o = s(i / 2), l = a(i / 2), c = s((t + n) / 2), h = a((t + n) / 2), d = s((t - n) / 2), u = a((t - n) / 2), f = s((n - t) / 2), m = a((n - t) / 2);
|
|
472
472
|
switch (r) {
|
|
473
473
|
case "XYX":
|
|
474
474
|
e.set(o * h, l * d, l * u, o * c);
|
|
@@ -480,13 +480,13 @@ function dd(e, t, i, n, r) {
|
|
|
480
480
|
e.set(l * d, l * u, o * h, o * c);
|
|
481
481
|
break;
|
|
482
482
|
case "XZX":
|
|
483
|
-
e.set(o * h, l *
|
|
483
|
+
e.set(o * h, l * m, l * f, o * c);
|
|
484
484
|
break;
|
|
485
485
|
case "YXY":
|
|
486
|
-
e.set(l * f, o * h, l *
|
|
486
|
+
e.set(l * f, o * h, l * m, o * c);
|
|
487
487
|
break;
|
|
488
488
|
case "ZYZ":
|
|
489
|
-
e.set(l *
|
|
489
|
+
e.set(l * m, l * f, o * h, o * c);
|
|
490
490
|
break;
|
|
491
491
|
default:
|
|
492
492
|
he("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: " + r);
|
|
@@ -533,7 +533,7 @@ function Ye(e, t) {
|
|
|
533
533
|
}
|
|
534
534
|
}
|
|
535
535
|
var V0 = {
|
|
536
|
-
DEG2RAD:
|
|
536
|
+
DEG2RAD: cn,
|
|
537
537
|
RAD2DEG: qn,
|
|
538
538
|
generateUUID: Jt,
|
|
539
539
|
clamp: Ve,
|
|
@@ -758,16 +758,16 @@ var V0 = {
|
|
|
758
758
|
this.isQuaternion = !0, this._x = e, this._y = t, this._z = i, this._w = n;
|
|
759
759
|
}
|
|
760
760
|
static slerpFlat(e, t, i, n, r, s, a) {
|
|
761
|
-
let o = i[n + 0], l = i[n + 1], c = i[n + 2], h = i[n + 3], d = r[s + 0], u = r[s + 1], f = r[s + 2],
|
|
762
|
-
if (h !==
|
|
763
|
-
let _ = o * d + l * u + c * f + h *
|
|
764
|
-
_ < 0 && (d = -d, u = -u, f = -f,
|
|
765
|
-
let
|
|
761
|
+
let o = i[n + 0], l = i[n + 1], c = i[n + 2], h = i[n + 3], d = r[s + 0], u = r[s + 1], f = r[s + 2], m = r[s + 3];
|
|
762
|
+
if (h !== m || o !== d || l !== u || c !== f) {
|
|
763
|
+
let _ = o * d + l * u + c * f + h * m;
|
|
764
|
+
_ < 0 && (d = -d, u = -u, f = -f, m = -m, _ = -_);
|
|
765
|
+
let g = 1 - a;
|
|
766
766
|
if (_ < 0.9995) {
|
|
767
767
|
const p = Math.acos(_), S = Math.sin(p);
|
|
768
|
-
|
|
768
|
+
g = Math.sin(g * p) / S, a = Math.sin(a * p) / S, o = o * g + d * a, l = l * g + u * a, c = c * g + f * a, h = h * g + m * a;
|
|
769
769
|
} else {
|
|
770
|
-
o = o *
|
|
770
|
+
o = o * g + d * a, l = l * g + u * a, c = c * g + f * a, h = h * g + m * a;
|
|
771
771
|
const p = 1 / Math.sqrt(o * o + l * l + c * c + h * h);
|
|
772
772
|
o *= p, l *= p, c *= p, h *= p;
|
|
773
773
|
}
|
|
@@ -1254,8 +1254,8 @@ var V0 = {
|
|
|
1254
1254
|
return this.multiplyMatrices(t, this);
|
|
1255
1255
|
}
|
|
1256
1256
|
multiplyMatrices(t, i) {
|
|
1257
|
-
const n = t.elements, r = i.elements, s = this.elements, a = n[0], o = n[3], l = n[6], c = n[1], h = n[4], d = n[7], u = n[2], f = n[5],
|
|
1258
|
-
return s[0] = a * _ + o * S + l * E, s[3] = a *
|
|
1257
|
+
const n = t.elements, r = i.elements, s = this.elements, a = n[0], o = n[3], l = n[6], c = n[1], h = n[4], d = n[7], u = n[2], f = n[5], m = n[8], _ = r[0], g = r[3], p = r[6], S = r[1], M = r[4], v = r[7], E = r[2], w = r[5], R = r[8];
|
|
1258
|
+
return s[0] = a * _ + o * S + l * E, s[3] = a * g + o * M + l * w, s[6] = a * p + o * v + l * R, s[1] = c * _ + h * S + d * E, s[4] = c * g + h * M + d * w, s[7] = c * p + h * v + d * R, s[2] = u * _ + f * S + m * E, s[5] = u * g + f * M + m * w, s[8] = u * p + f * v + m * R, this;
|
|
1259
1259
|
}
|
|
1260
1260
|
multiplyScalar(t) {
|
|
1261
1261
|
const i = this.elements;
|
|
@@ -1266,9 +1266,9 @@ var V0 = {
|
|
|
1266
1266
|
return i * a * h - i * o * c - n * s * h + n * o * l + r * s * c - r * a * l;
|
|
1267
1267
|
}
|
|
1268
1268
|
invert() {
|
|
1269
|
-
const t = this.elements, i = t[0], n = t[1], r = t[2], s = t[3], a = t[4], o = t[5], l = t[6], c = t[7], h = t[8], d = h * a - o * c, u = o * l - h * s, f = c * s - a * l,
|
|
1270
|
-
if (
|
|
1271
|
-
const _ = 1 /
|
|
1269
|
+
const t = this.elements, i = t[0], n = t[1], r = t[2], s = t[3], a = t[4], o = t[5], l = t[6], c = t[7], h = t[8], d = h * a - o * c, u = o * l - h * s, f = c * s - a * l, m = i * d + n * u + r * f;
|
|
1270
|
+
if (m === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
1271
|
+
const _ = 1 / m;
|
|
1272
1272
|
return t[0] = d * _, t[1] = (r * c - h * n) * _, t[2] = (o * n - r * a) * _, t[3] = u * _, t[4] = (h * i - r * l) * _, t[5] = (r * s - o * i) * _, t[6] = f * _, t[7] = (n * l - c * i) * _, t[8] = (a * i - n * s) * _, this;
|
|
1273
1273
|
}
|
|
1274
1274
|
transpose() {
|
|
@@ -1288,13 +1288,13 @@ var V0 = {
|
|
|
1288
1288
|
return this.set(n * l, n * c, -n * (l * a + c * o) + a + t, -r * c, r * l, -r * (-c * a + l * o) + o + i, 0, 0, 1), this;
|
|
1289
1289
|
}
|
|
1290
1290
|
scale(t, i) {
|
|
1291
|
-
return
|
|
1291
|
+
return ln("Matrix3: .scale() is deprecated. Use .makeScale() instead."), this.premultiply(ea.makeScale(t, i)), this;
|
|
1292
1292
|
}
|
|
1293
1293
|
rotate(t) {
|
|
1294
|
-
return
|
|
1294
|
+
return ln("Matrix3: .rotate() is deprecated. Use .makeRotation() instead."), this.premultiply(ea.makeRotation(-t)), this;
|
|
1295
1295
|
}
|
|
1296
1296
|
translate(t, i) {
|
|
1297
|
-
return
|
|
1297
|
+
return ln("Matrix3: .translate() is deprecated. Use .makeTranslation() instead."), this.premultiply(ea.makeTranslation(t, i)), this;
|
|
1298
1298
|
}
|
|
1299
1299
|
makeTranslation(t, i) {
|
|
1300
1300
|
return t.isVector2 ? this.set(1, 0, t.x, 0, 1, t.y, 0, 0, 1) : this.set(1, 0, t, 0, 1, i, 0, 0, 1), this;
|
|
@@ -1362,10 +1362,10 @@ function fd() {
|
|
|
1362
1362
|
return this.spaces[r].workingColorSpaceConfig.unpackColorSpace;
|
|
1363
1363
|
},
|
|
1364
1364
|
fromWorkingColorSpace: function(r, s) {
|
|
1365
|
-
return
|
|
1365
|
+
return ln("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."), e.workingToColorSpace(r, s);
|
|
1366
1366
|
},
|
|
1367
1367
|
toWorkingColorSpace: function(r, s) {
|
|
1368
|
-
return
|
|
1368
|
+
return ln("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."), e.colorSpaceToWorking(r, s);
|
|
1369
1369
|
}
|
|
1370
1370
|
}, t = [
|
|
1371
1371
|
0.64,
|
|
@@ -1408,15 +1408,15 @@ function Ti(e) {
|
|
|
1408
1408
|
function Xn(e) {
|
|
1409
1409
|
return e < 31308e-7 ? e * 12.92 : 1.055 * Math.pow(e, 0.41666) - 0.055;
|
|
1410
1410
|
}
|
|
1411
|
-
var
|
|
1411
|
+
var _n, pd = class {
|
|
1412
1412
|
static getDataURL(e, t = "image/png") {
|
|
1413
1413
|
if (/^data:/i.test(e.src) || typeof HTMLCanvasElement > "u") return e.src;
|
|
1414
1414
|
let i;
|
|
1415
1415
|
if (e instanceof HTMLCanvasElement) i = e;
|
|
1416
1416
|
else {
|
|
1417
|
-
|
|
1418
|
-
const n =
|
|
1419
|
-
e instanceof ImageData ? n.putImageData(e, 0, 0) : n.drawImage(e, 0, 0, e.width, e.height), i =
|
|
1417
|
+
_n === void 0 && (_n = br("canvas")), _n.width = e.width, _n.height = e.height;
|
|
1418
|
+
const n = _n.getContext("2d");
|
|
1419
|
+
e instanceof ImageData ? n.putImageData(e, 0, 0) : n.drawImage(e, 0, 0, e.width, e.height), i = _n;
|
|
1420
1420
|
}
|
|
1421
1421
|
return i.toDataURL(t);
|
|
1422
1422
|
}
|
|
@@ -1440,7 +1440,7 @@ var yn, pd = class {
|
|
|
1440
1440
|
} else
|
|
1441
1441
|
return he("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."), e;
|
|
1442
1442
|
}
|
|
1443
|
-
}, md = 0,
|
|
1443
|
+
}, md = 0, an = class {
|
|
1444
1444
|
constructor(e = null) {
|
|
1445
1445
|
this.isSource = !0, Object.defineProperty(this, "id", { value: md++ }), this.uuid = Jt(), this.data = e, this.dataReady = !0, this.version = 0;
|
|
1446
1446
|
}
|
|
@@ -1479,7 +1479,7 @@ function ta(e) {
|
|
|
1479
1479
|
}
|
|
1480
1480
|
var gd = 0, ia = /* @__PURE__ */ new C(), Rt = class As extends fi {
|
|
1481
1481
|
constructor(t = As.DEFAULT_IMAGE, i = As.DEFAULT_MAPPING, n = Zt, r = Zt, s = St, a = Cr, o = Vi, l = Fi, c = As.DEFAULT_ANISOTROPY, h = "") {
|
|
1482
|
-
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: gd++ }), this.uuid = Jt(), this.name = "", this.source = new
|
|
1482
|
+
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: gd++ }), this.uuid = Jt(), this.name = "", this.source = new an(t), this.mipmaps = [], this.mapping = i, 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 $(0, 0), this.repeat = new $(1, 1), this.center = new $(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new qe(), 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 = !!(t && t.depth && t.depth > 1), this.pmremVersion = 0, this.normalized = !1;
|
|
1483
1483
|
}
|
|
1484
1484
|
get width() {
|
|
1485
1485
|
return this.source.getSize(ia).x;
|
|
@@ -1577,7 +1577,6 @@ var gd = 0, ia = /* @__PURE__ */ new C(), Rt = class As extends fi {
|
|
|
1577
1577
|
break;
|
|
1578
1578
|
case Rs:
|
|
1579
1579
|
Math.abs(Math.floor(t.x) % 2) === 1 ? t.x = Math.ceil(t.x) - t.x : t.x = t.x - Math.floor(t.x);
|
|
1580
|
-
break;
|
|
1581
1580
|
}
|
|
1582
1581
|
if (t.y < 0 || t.y > 1) switch (this.wrapT) {
|
|
1583
1582
|
case Cs:
|
|
@@ -1588,7 +1587,6 @@ var gd = 0, ia = /* @__PURE__ */ new C(), Rt = class As extends fi {
|
|
|
1588
1587
|
break;
|
|
1589
1588
|
case Rs:
|
|
1590
1589
|
Math.abs(Math.floor(t.y) % 2) === 1 ? t.y = Math.ceil(t.y) - t.y : t.y = t.y - Math.floor(t.y);
|
|
1591
|
-
break;
|
|
1592
1590
|
}
|
|
1593
1591
|
return this.flipY && (t.y = 1 - t.y), t;
|
|
1594
1592
|
}
|
|
@@ -1722,16 +1720,16 @@ var pt = class Ec {
|
|
|
1722
1720
|
}
|
|
1723
1721
|
setAxisAngleFromRotationMatrix(t) {
|
|
1724
1722
|
let i, n, r, s;
|
|
1725
|
-
const l = t.elements, c = l[0], h = l[4], d = l[8], u = l[1], f = l[5],
|
|
1726
|
-
if (Math.abs(h - u) < 0.01 && Math.abs(d - _) < 0.01 && Math.abs(
|
|
1727
|
-
if (Math.abs(h + u) < 0.1 && Math.abs(d + _) < 0.1 && Math.abs(
|
|
1723
|
+
const l = t.elements, c = l[0], h = l[4], d = l[8], u = l[1], f = l[5], m = l[9], _ = l[2], g = l[6], p = l[10];
|
|
1724
|
+
if (Math.abs(h - u) < 0.01 && Math.abs(d - _) < 0.01 && Math.abs(m - g) < 0.01) {
|
|
1725
|
+
if (Math.abs(h + u) < 0.1 && Math.abs(d + _) < 0.1 && Math.abs(m + g) < 0.1 && Math.abs(c + f + p - 3) < 0.1)
|
|
1728
1726
|
return this.set(1, 0, 0, 0), this;
|
|
1729
1727
|
i = Math.PI;
|
|
1730
|
-
const M = (c + 1) / 2, v = (f + 1) / 2, E = (p + 1) / 2, w = (h + u) / 4, R = (d + _) / 4, y = (
|
|
1728
|
+
const M = (c + 1) / 2, v = (f + 1) / 2, E = (p + 1) / 2, w = (h + u) / 4, R = (d + _) / 4, y = (m + g) / 4;
|
|
1731
1729
|
return M > v && M > E ? M < 0.01 ? (n = 0, r = 0.707106781, s = 0.707106781) : (n = Math.sqrt(M), r = w / n, s = R / n) : v > E ? v < 0.01 ? (n = 0.707106781, r = 0, s = 0.707106781) : (r = Math.sqrt(v), n = w / r, s = y / r) : E < 0.01 ? (n = 0.707106781, r = 0.707106781, s = 0) : (s = Math.sqrt(E), n = R / s, r = y / s), this.set(n, r, s, i), this;
|
|
1732
1730
|
}
|
|
1733
|
-
let S = Math.sqrt((
|
|
1734
|
-
return Math.abs(S) < 1e-3 && (S = 1), this.x = (
|
|
1731
|
+
let S = Math.sqrt((g - m) * (g - m) + (d - _) * (d - _) + (u - h) * (u - h));
|
|
1732
|
+
return Math.abs(S) < 1e-3 && (S = 1), this.x = (g - m) / S, this.y = (d - _) / S, this.z = (u - h) / S, this.w = Math.acos((c + f + p - 1) / 2), this;
|
|
1735
1733
|
}
|
|
1736
1734
|
setFromMatrixPosition(t) {
|
|
1737
1735
|
const i = t.elements;
|
|
@@ -1875,7 +1873,7 @@ var pt = class Ec {
|
|
|
1875
1873
|
for (let t = 0, i = e.textures.length; t < i; t++) {
|
|
1876
1874
|
this.textures[t] = e.textures[t].clone(), this.textures[t].isRenderTargetTexture = !0, this.textures[t].renderTarget = this;
|
|
1877
1875
|
const n = Object.assign({}, e.textures[t].image);
|
|
1878
|
-
this.textures[t].source = new
|
|
1876
|
+
this.textures[t].source = new an(n);
|
|
1879
1877
|
}
|
|
1880
1878
|
return this.depthBuffer = e.depthBuffer, this.stencilBuffer = e.stencilBuffer, this.resolveDepthBuffer = e.resolveDepthBuffer, this.resolveStencilBuffer = e.resolveStencilBuffer, e.depthTexture !== null && (this.depthTexture = e.depthTexture.clone()), this.samples = e.samples, this.multiview = e.multiview, this.useArrayDepthTexture = e.useArrayDepthTexture, this;
|
|
1881
1879
|
}
|
|
@@ -1922,7 +1920,7 @@ var pt = class Ec {
|
|
|
1922
1920
|
static {
|
|
1923
1921
|
qa.prototype.isMatrix4 = !0;
|
|
1924
1922
|
}
|
|
1925
|
-
constructor(t, i, n, r, s, a, o, l, c, h, d, u, f,
|
|
1923
|
+
constructor(t, i, n, r, s, a, o, l, c, h, d, u, f, m, _, g) {
|
|
1926
1924
|
this.elements = [
|
|
1927
1925
|
1,
|
|
1928
1926
|
0,
|
|
@@ -1940,11 +1938,11 @@ var pt = class Ec {
|
|
|
1940
1938
|
0,
|
|
1941
1939
|
0,
|
|
1942
1940
|
1
|
|
1943
|
-
], t !== void 0 && this.set(t, i, n, r, s, a, o, l, c, h, d, u, f,
|
|
1941
|
+
], t !== void 0 && this.set(t, i, n, r, s, a, o, l, c, h, d, u, f, m, _, g);
|
|
1944
1942
|
}
|
|
1945
|
-
set(t, i, n, r, s, a, o, l, c, h, d, u, f,
|
|
1943
|
+
set(t, i, n, r, s, a, o, l, c, h, d, u, f, m, _, g) {
|
|
1946
1944
|
const p = this.elements;
|
|
1947
|
-
return p[0] = t, p[4] = i, p[8] = n, p[12] = r, p[1] = s, p[5] = a, p[9] = o, p[13] = l, p[2] = c, p[6] = h, p[10] = d, p[14] = u, p[3] = f, p[7] =
|
|
1945
|
+
return p[0] = t, p[4] = i, p[8] = n, p[12] = r, p[1] = s, p[5] = a, p[9] = o, p[13] = l, p[2] = c, p[6] = h, p[10] = d, p[14] = u, p[3] = f, p[7] = m, p[11] = _, p[15] = g, this;
|
|
1948
1946
|
}
|
|
1949
1947
|
identity() {
|
|
1950
1948
|
return this.set(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), this;
|
|
@@ -1972,29 +1970,29 @@ var pt = class Ec {
|
|
|
1972
1970
|
}
|
|
1973
1971
|
extractRotation(t) {
|
|
1974
1972
|
if (t.determinantAffine() === 0) return this.identity();
|
|
1975
|
-
const i = this.elements, n = t.elements, r = 1 /
|
|
1973
|
+
const i = this.elements, n = t.elements, r = 1 / yn.setFromMatrixColumn(t, 0).length(), s = 1 / yn.setFromMatrixColumn(t, 1).length(), a = 1 / yn.setFromMatrixColumn(t, 2).length();
|
|
1976
1974
|
return i[0] = n[0] * r, i[1] = n[1] * r, i[2] = n[2] * r, i[3] = 0, i[4] = n[4] * s, i[5] = n[5] * s, i[6] = n[6] * s, i[7] = 0, i[8] = n[8] * a, i[9] = n[9] * a, i[10] = n[10] * a, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, this;
|
|
1977
1975
|
}
|
|
1978
1976
|
makeRotationFromEuler(t) {
|
|
1979
1977
|
const i = this.elements, n = t.x, r = t.y, s = t.z, a = Math.cos(n), o = Math.sin(n), l = Math.cos(r), c = Math.sin(r), h = Math.cos(s), d = Math.sin(s);
|
|
1980
1978
|
if (t.order === "XYZ") {
|
|
1981
|
-
const u = a * h, f = a * d,
|
|
1982
|
-
i[0] = l * h, i[4] = -l * d, i[8] = c, i[1] = f +
|
|
1979
|
+
const u = a * h, f = a * d, m = o * h, _ = o * d;
|
|
1980
|
+
i[0] = l * h, i[4] = -l * d, i[8] = c, i[1] = f + m * c, i[5] = u - _ * c, i[9] = -o * l, i[2] = _ - u * c, i[6] = m + f * c, i[10] = a * l;
|
|
1983
1981
|
} else if (t.order === "YXZ") {
|
|
1984
|
-
const u = l * h, f = l * d,
|
|
1985
|
-
i[0] = u + _ * o, i[4] =
|
|
1982
|
+
const u = l * h, f = l * d, m = c * h, _ = c * d;
|
|
1983
|
+
i[0] = u + _ * o, i[4] = m * o - f, i[8] = a * c, i[1] = a * d, i[5] = a * h, i[9] = -o, i[2] = f * o - m, i[6] = _ + u * o, i[10] = a * l;
|
|
1986
1984
|
} else if (t.order === "ZXY") {
|
|
1987
|
-
const u = l * h, f = l * d,
|
|
1988
|
-
i[0] = u - _ * o, i[4] = -a * d, i[8] =
|
|
1985
|
+
const u = l * h, f = l * d, m = c * h, _ = c * d;
|
|
1986
|
+
i[0] = u - _ * o, i[4] = -a * d, i[8] = m + f * o, i[1] = f + m * o, i[5] = a * h, i[9] = _ - u * o, i[2] = -a * c, i[6] = o, i[10] = a * l;
|
|
1989
1987
|
} else if (t.order === "ZYX") {
|
|
1990
|
-
const u = a * h, f = a * d,
|
|
1991
|
-
i[0] = l * h, i[4] =
|
|
1988
|
+
const u = a * h, f = a * d, m = o * h, _ = o * d;
|
|
1989
|
+
i[0] = l * h, i[4] = m * c - f, i[8] = u * c + _, i[1] = l * d, i[5] = _ * c + u, i[9] = f * c - m, i[2] = -c, i[6] = o * l, i[10] = a * l;
|
|
1992
1990
|
} else if (t.order === "YZX") {
|
|
1993
|
-
const u = a * l, f = a * c,
|
|
1994
|
-
i[0] = l * h, i[4] = _ - u * d, i[8] =
|
|
1991
|
+
const u = a * l, f = a * c, m = o * l, _ = o * c;
|
|
1992
|
+
i[0] = l * h, i[4] = _ - u * d, i[8] = m * d + f, i[1] = d, i[5] = a * h, i[9] = -o * h, i[2] = -c * h, i[6] = f * d + m, i[10] = u - _ * d;
|
|
1995
1993
|
} else if (t.order === "XZY") {
|
|
1996
|
-
const u = a * l, f = a * c,
|
|
1997
|
-
i[0] = l * h, i[4] = -d, i[8] = c * h, i[1] = u * d + _, i[5] = a * h, i[9] = f * d -
|
|
1994
|
+
const u = a * l, f = a * c, m = o * l, _ = o * c;
|
|
1995
|
+
i[0] = l * h, i[4] = -d, i[8] = c * h, i[1] = u * d + _, i[5] = a * h, i[9] = f * d - m, i[2] = m * d - f, i[6] = o * h, i[10] = _ * d + u;
|
|
1998
1996
|
}
|
|
1999
1997
|
return i[3] = 0, i[7] = 0, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, this;
|
|
2000
1998
|
}
|
|
@@ -2012,16 +2010,16 @@ var pt = class Ec {
|
|
|
2012
2010
|
return this.multiplyMatrices(t, this);
|
|
2013
2011
|
}
|
|
2014
2012
|
multiplyMatrices(t, i) {
|
|
2015
|
-
const n = t.elements, r = i.elements, s = this.elements, a = n[0], o = n[4], l = n[8], c = n[12], h = n[1], d = n[5], u = n[9], f = n[13],
|
|
2016
|
-
return s[0] = a * w + o * U + l * k + c * ee, s[4] = a * R + o * I + l * G + c * ie, s[8] = a * y + o * F + l * q + c * ne, s[12] = a * T + o * X + l * z + c * ge, s[1] = h * w + d * U + u * k + f * ee, s[5] = h * R + d * I + u * G + f * ie, s[9] = h * y + d * F + u * q + f * ne, s[13] = h * T + d * X + u * z + f * ge, s[2] =
|
|
2013
|
+
const n = t.elements, r = i.elements, s = this.elements, a = n[0], o = n[4], l = n[8], c = n[12], h = n[1], d = n[5], u = n[9], f = n[13], m = n[2], _ = n[6], g = n[10], p = n[14], S = n[3], M = n[7], v = n[11], E = n[15], w = r[0], R = r[4], y = r[8], T = r[12], U = r[1], I = r[5], F = r[9], X = r[13], k = r[2], G = r[6], q = r[10], z = r[14], ee = r[3], ie = r[7], ne = r[11], ge = r[15];
|
|
2014
|
+
return s[0] = a * w + o * U + l * k + c * ee, s[4] = a * R + o * I + l * G + c * ie, s[8] = a * y + o * F + l * q + c * ne, s[12] = a * T + o * X + l * z + c * ge, s[1] = h * w + d * U + u * k + f * ee, s[5] = h * R + d * I + u * G + f * ie, s[9] = h * y + d * F + u * q + f * ne, s[13] = h * T + d * X + u * z + f * ge, s[2] = m * w + _ * U + g * k + p * ee, s[6] = m * R + _ * I + g * G + p * ie, s[10] = m * y + _ * F + g * q + p * ne, s[14] = m * T + _ * X + g * z + p * ge, s[3] = S * w + M * U + v * k + E * ee, s[7] = S * R + M * I + v * G + E * ie, s[11] = S * y + M * F + v * q + E * ne, s[15] = S * T + M * X + v * z + E * ge, this;
|
|
2017
2015
|
}
|
|
2018
2016
|
multiplyScalar(t) {
|
|
2019
2017
|
const i = this.elements;
|
|
2020
2018
|
return i[0] *= t, i[4] *= t, i[8] *= t, i[12] *= t, i[1] *= t, i[5] *= t, i[9] *= t, i[13] *= t, i[2] *= t, i[6] *= t, i[10] *= t, i[14] *= t, i[3] *= t, i[7] *= t, i[11] *= t, i[15] *= t, this;
|
|
2021
2019
|
}
|
|
2022
2020
|
determinant() {
|
|
2023
|
-
const t = this.elements, i = t[0], n = t[4], r = t[8], s = t[12], a = t[1], o = t[5], l = t[9], c = t[13], h = t[2], d = t[6], u = t[10], f = t[14],
|
|
2024
|
-
return i * (_ * S -
|
|
2021
|
+
const t = this.elements, i = t[0], n = t[4], r = t[8], s = t[12], a = t[1], o = t[5], l = t[9], c = t[13], h = t[2], d = t[6], u = t[10], f = t[14], m = t[3], _ = t[7], g = t[11], p = t[15], S = l * f - c * u, M = o * f - c * d, v = o * u - l * d, E = a * f - c * h, w = a * u - l * h, R = a * d - o * h;
|
|
2022
|
+
return i * (_ * S - g * M + p * v) - n * (m * S - g * E + p * w) + r * (m * M - _ * E + p * R) - s * (m * v - _ * w + g * R);
|
|
2025
2023
|
}
|
|
2026
2024
|
determinantAffine() {
|
|
2027
2025
|
const t = this.elements, i = t[0], n = t[4], r = t[8], s = t[1], a = t[5], o = t[9], l = t[2], c = t[6], h = t[10];
|
|
@@ -2037,10 +2035,10 @@ var pt = class Ec {
|
|
|
2037
2035
|
return t.isVector3 ? (r[12] = t.x, r[13] = t.y, r[14] = t.z) : (r[12] = t, r[13] = i, r[14] = n), this;
|
|
2038
2036
|
}
|
|
2039
2037
|
invert() {
|
|
2040
|
-
const t = this.elements, i = t[0], n = t[1], r = t[2], s = t[3], a = t[4], o = t[5], l = t[6], c = t[7], h = t[8], d = t[9], u = t[10], f = t[11],
|
|
2038
|
+
const t = this.elements, i = t[0], n = t[1], r = t[2], s = t[3], a = t[4], o = t[5], l = t[6], c = t[7], h = t[8], d = t[9], u = t[10], f = t[11], m = t[12], _ = t[13], g = t[14], p = t[15], S = i * o - n * a, M = i * l - r * a, v = i * c - s * a, E = n * l - r * o, w = n * c - s * o, R = r * c - s * l, y = h * _ - d * m, T = h * g - u * m, U = h * p - f * m, I = d * g - u * _, F = d * p - f * _, X = u * p - f * g, k = S * X - M * F + v * I + E * U - w * T + R * y;
|
|
2041
2039
|
if (k === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
2042
2040
|
const G = 1 / k;
|
|
2043
|
-
return t[0] = (o * X - l * F + c * I) * G, t[1] = (r * F - n * X - s * I) * G, t[2] = (_ * R -
|
|
2041
|
+
return t[0] = (o * X - l * F + c * I) * G, t[1] = (r * F - n * X - s * I) * G, t[2] = (_ * R - g * w + p * E) * G, t[3] = (u * w - d * R - f * E) * G, t[4] = (l * U - a * X - c * T) * G, t[5] = (i * X - r * U + s * T) * G, t[6] = (g * v - m * R - p * M) * G, t[7] = (h * R - u * v + f * M) * G, t[8] = (a * F - o * U + c * y) * G, t[9] = (n * U - i * F - s * y) * G, t[10] = (m * w - _ * v + p * S) * G, t[11] = (d * v - h * w - f * S) * G, t[12] = (o * T - a * I - l * y) * G, t[13] = (i * I - n * T + r * y) * G, t[14] = (_ * M - m * E - g * S) * G, t[15] = (h * E - d * M + u * S) * G, this;
|
|
2044
2042
|
}
|
|
2045
2043
|
scale(t) {
|
|
2046
2044
|
const i = this.elements, n = t.x, r = t.y, s = t.z;
|
|
@@ -2076,8 +2074,8 @@ var pt = class Ec {
|
|
|
2076
2074
|
return this.set(1, n, s, 0, t, 1, a, 0, i, r, 1, 0, 0, 0, 0, 1), this;
|
|
2077
2075
|
}
|
|
2078
2076
|
compose(t, i, n) {
|
|
2079
|
-
const r = this.elements, s = i._x, a = i._y, o = i._z, l = i._w, c = s + s, h = a + a, d = o + o, u = s * c, f = s * h,
|
|
2080
|
-
return r[0] = (1 - (_ + p)) * E, r[1] = (f + v) * E, r[2] = (
|
|
2077
|
+
const r = this.elements, s = i._x, a = i._y, o = i._z, l = i._w, c = s + s, h = a + a, d = o + o, u = s * c, f = s * h, m = s * d, _ = a * h, g = a * d, p = o * d, S = l * c, M = l * h, v = l * d, E = n.x, w = n.y, R = n.z;
|
|
2078
|
+
return r[0] = (1 - (_ + p)) * E, r[1] = (f + v) * E, r[2] = (m - M) * E, r[3] = 0, r[4] = (f - v) * w, r[5] = (1 - (u + p)) * w, r[6] = (g + S) * w, r[7] = 0, r[8] = (m + M) * R, r[9] = (g - S) * R, r[10] = (1 - (u + _)) * R, r[11] = 0, r[12] = t.x, r[13] = t.y, r[14] = t.z, r[15] = 1, this;
|
|
2081
2079
|
}
|
|
2082
2080
|
decompose(t, i, n) {
|
|
2083
2081
|
const r = this.elements;
|
|
@@ -2085,35 +2083,35 @@ var pt = class Ec {
|
|
|
2085
2083
|
const s = this.determinantAffine();
|
|
2086
2084
|
if (s === 0)
|
|
2087
2085
|
return n.set(1, 1, 1), i.identity(), this;
|
|
2088
|
-
let a =
|
|
2089
|
-
const o =
|
|
2086
|
+
let a = yn.set(r[0], r[1], r[2]).length();
|
|
2087
|
+
const o = yn.set(r[4], r[5], r[6]).length(), l = yn.set(r[8], r[9], r[10]).length();
|
|
2090
2088
|
s < 0 && (a = -a), ii.copy(this);
|
|
2091
2089
|
const c = 1 / a, h = 1 / o, d = 1 / l;
|
|
2092
2090
|
return ii.elements[0] *= c, ii.elements[1] *= c, ii.elements[2] *= c, ii.elements[4] *= h, ii.elements[5] *= h, ii.elements[6] *= h, ii.elements[8] *= d, ii.elements[9] *= d, ii.elements[10] *= d, i.setFromRotationMatrix(ii), n.x = a, n.y = o, n.z = l, this;
|
|
2093
2091
|
}
|
|
2094
|
-
makePerspective(t, i, n, r, s, a, o =
|
|
2092
|
+
makePerspective(t, i, n, r, s, a, o = un, l = !1) {
|
|
2095
2093
|
const c = this.elements, h = 2 * s / (i - t), d = 2 * s / (n - r), u = (i + t) / (i - t), f = (n + r) / (n - r);
|
|
2096
|
-
let
|
|
2094
|
+
let m, _;
|
|
2097
2095
|
if (l)
|
|
2098
|
-
|
|
2096
|
+
m = s / (a - s), _ = a * s / (a - s);
|
|
2099
2097
|
else if (o === 2e3)
|
|
2100
|
-
|
|
2098
|
+
m = -(a + s) / (a - s), _ = -2 * a * s / (a - s);
|
|
2101
2099
|
else if (o === 2001)
|
|
2102
|
-
|
|
2100
|
+
m = -a / (a - s), _ = -a * s / (a - s);
|
|
2103
2101
|
else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: " + o);
|
|
2104
|
-
return c[0] = h, c[4] = 0, c[8] = u, c[12] = 0, c[1] = 0, c[5] = d, c[9] = f, c[13] = 0, c[2] = 0, c[6] = 0, c[10] =
|
|
2102
|
+
return c[0] = h, c[4] = 0, c[8] = u, c[12] = 0, c[1] = 0, c[5] = d, c[9] = f, c[13] = 0, c[2] = 0, c[6] = 0, c[10] = m, c[14] = _, c[3] = 0, c[7] = 0, c[11] = -1, c[15] = 0, this;
|
|
2105
2103
|
}
|
|
2106
|
-
makeOrthographic(t, i, n, r, s, a, o =
|
|
2104
|
+
makeOrthographic(t, i, n, r, s, a, o = un, l = !1) {
|
|
2107
2105
|
const c = this.elements, h = 2 / (i - t), d = 2 / (n - r), u = -(i + t) / (i - t), f = -(n + r) / (n - r);
|
|
2108
|
-
let
|
|
2106
|
+
let m, _;
|
|
2109
2107
|
if (l)
|
|
2110
|
-
|
|
2108
|
+
m = 1 / (a - s), _ = a / (a - s);
|
|
2111
2109
|
else if (o === 2e3)
|
|
2112
|
-
|
|
2110
|
+
m = -2 / (a - s), _ = -(a + s) / (a - s);
|
|
2113
2111
|
else if (o === 2001)
|
|
2114
|
-
|
|
2112
|
+
m = -1 / (a - s), _ = -s / (a - s);
|
|
2115
2113
|
else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: " + o);
|
|
2116
|
-
return c[0] = h, c[4] = 0, c[8] = 0, c[12] = u, c[1] = 0, c[5] = d, c[9] = 0, c[13] = f, c[2] = 0, c[6] = 0, c[10] =
|
|
2114
|
+
return c[0] = h, c[4] = 0, c[8] = 0, c[12] = u, c[1] = 0, c[5] = d, c[9] = 0, c[13] = f, c[2] = 0, c[6] = 0, c[10] = m, c[14] = _, c[3] = 0, c[7] = 0, c[11] = 0, c[15] = 1, this;
|
|
2117
2115
|
}
|
|
2118
2116
|
equals(t) {
|
|
2119
2117
|
const i = this.elements, n = t.elements;
|
|
@@ -2128,7 +2126,7 @@ var pt = class Ec {
|
|
|
2128
2126
|
const n = this.elements;
|
|
2129
2127
|
return t[i] = n[0], t[i + 1] = n[1], t[i + 2] = n[2], t[i + 3] = n[3], t[i + 4] = n[4], t[i + 5] = n[5], t[i + 6] = n[6], t[i + 7] = n[7], t[i + 8] = n[8], t[i + 9] = n[9], t[i + 10] = n[10], t[i + 11] = n[11], t[i + 12] = n[12], t[i + 13] = n[13], t[i + 14] = n[14], t[i + 15] = n[15], t;
|
|
2130
2128
|
}
|
|
2131
|
-
},
|
|
2129
|
+
}, yn = /* @__PURE__ */ new C(), ii = /* @__PURE__ */ new He(), vd = /* @__PURE__ */ new C(0, 0, 0), _d = /* @__PURE__ */ new C(1, 1, 1), Ci = /* @__PURE__ */ new C(), Nr = /* @__PURE__ */ new C(), qt = /* @__PURE__ */ new C(), No = /* @__PURE__ */ new He(), Do = /* @__PURE__ */ new Wt(), Gi = class Cc {
|
|
2132
2130
|
constructor(t = 0, i = 0, n = 0, r = Cc.DEFAULT_ORDER) {
|
|
2133
2131
|
this.isEuler = !0, this._x = t, this._y = i, this._z = n, this._order = r;
|
|
2134
2132
|
}
|
|
@@ -2247,7 +2245,7 @@ var oo = class {
|
|
|
2247
2245
|
isEnabled(e) {
|
|
2248
2246
|
return (this.mask & (1 << e | 0)) !== 0;
|
|
2249
2247
|
}
|
|
2250
|
-
}, yd = 0, Oo = /* @__PURE__ */ new C(),
|
|
2248
|
+
}, yd = 0, Oo = /* @__PURE__ */ new C(), xn = /* @__PURE__ */ new Wt(), gi = /* @__PURE__ */ new He(), Dr = /* @__PURE__ */ new C(), tr = /* @__PURE__ */ new C(), xd = /* @__PURE__ */ new C(), Md = /* @__PURE__ */ new Wt(), Fo = /* @__PURE__ */ new C(1, 0, 0), Bo = /* @__PURE__ */ new C(0, 1, 0), zo = /* @__PURE__ */ new C(0, 0, 1), Vo = { type: "added" }, Sd = { type: "removed" }, Mn = {
|
|
2251
2249
|
type: "childadded",
|
|
2252
2250
|
child: null
|
|
2253
2251
|
}, na = {
|
|
@@ -2315,10 +2313,10 @@ var oo = class {
|
|
|
2315
2313
|
this.quaternion.copy(t);
|
|
2316
2314
|
}
|
|
2317
2315
|
rotateOnAxis(t, i) {
|
|
2318
|
-
return
|
|
2316
|
+
return xn.setFromAxisAngle(t, i), this.quaternion.multiply(xn), this;
|
|
2319
2317
|
}
|
|
2320
2318
|
rotateOnWorldAxis(t, i) {
|
|
2321
|
-
return
|
|
2319
|
+
return xn.setFromAxisAngle(t, i), this.quaternion.premultiply(xn), this;
|
|
2322
2320
|
}
|
|
2323
2321
|
rotateX(t) {
|
|
2324
2322
|
return this.rotateOnAxis(Fo, t);
|
|
@@ -2350,14 +2348,14 @@ var oo = class {
|
|
|
2350
2348
|
lookAt(t, i, n) {
|
|
2351
2349
|
t.isVector3 ? Dr.copy(t) : Dr.set(t, i, n);
|
|
2352
2350
|
const r = this.parent;
|
|
2353
|
-
this.updateWorldMatrix(!0, !1), tr.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? gi.lookAt(tr, Dr, this.up) : gi.lookAt(Dr, tr, this.up), this.quaternion.setFromRotationMatrix(gi), r && (gi.extractRotation(r.matrixWorld),
|
|
2351
|
+
this.updateWorldMatrix(!0, !1), tr.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? gi.lookAt(tr, Dr, this.up) : gi.lookAt(Dr, tr, this.up), this.quaternion.setFromRotationMatrix(gi), r && (gi.extractRotation(r.matrixWorld), xn.setFromRotationMatrix(gi), this.quaternion.premultiply(xn.invert()));
|
|
2354
2352
|
}
|
|
2355
2353
|
add(t) {
|
|
2356
2354
|
if (arguments.length > 1) {
|
|
2357
2355
|
for (let i = 0; i < arguments.length; i++) this.add(arguments[i]);
|
|
2358
2356
|
return this;
|
|
2359
2357
|
}
|
|
2360
|
-
return t === this ? (Pe("Object3D.add: object can't be added as a child of itself.", t), this) : (t && t.isObject3D ? (t.removeFromParent(), t.parent = this, this.children.push(t), t.dispatchEvent(Vo),
|
|
2358
|
+
return t === this ? (Pe("Object3D.add: object can't be added as a child of itself.", t), this) : (t && t.isObject3D ? (t.removeFromParent(), t.parent = this, this.children.push(t), t.dispatchEvent(Vo), Mn.child = t, this.dispatchEvent(Mn), Mn.child = null) : Pe("Object3D.add: object not an instance of THREE.Object3D.", t), this);
|
|
2361
2359
|
}
|
|
2362
2360
|
remove(t) {
|
|
2363
2361
|
if (arguments.length > 1) {
|
|
@@ -2375,7 +2373,7 @@ var oo = class {
|
|
|
2375
2373
|
return this.remove(...this.children);
|
|
2376
2374
|
}
|
|
2377
2375
|
attach(t) {
|
|
2378
|
-
return this.updateWorldMatrix(!0, !1), gi.copy(this.matrixWorld).invert(), t.parent !== null && (t.parent.updateWorldMatrix(!0, !1), gi.multiply(t.parent.matrixWorld)), t.applyMatrix4(gi), t.removeFromParent(), t.parent = this, this.children.push(t), t.updateWorldMatrix(!1, !0), t.dispatchEvent(Vo),
|
|
2376
|
+
return this.updateWorldMatrix(!0, !1), gi.copy(this.matrixWorld).invert(), t.parent !== null && (t.parent.updateWorldMatrix(!0, !1), gi.multiply(t.parent.matrixWorld)), t.applyMatrix4(gi), t.removeFromParent(), t.parent = this, this.children.push(t), t.updateWorldMatrix(!1, !0), t.dispatchEvent(Vo), Mn.child = t, this.dispatchEvent(Mn), Mn.child = null, this;
|
|
2379
2377
|
}
|
|
2380
2378
|
getObjectById(t) {
|
|
2381
2379
|
return this.getObjectByProperty("id", t);
|
|
@@ -2487,11 +2485,12 @@ var oo = class {
|
|
|
2487
2485
|
else s(t.shapes, l);
|
|
2488
2486
|
}
|
|
2489
2487
|
}
|
|
2490
|
-
if (this.isSkinnedMesh && (r.bindMode = this.bindMode, r.bindMatrix = this.bindMatrix.toArray(), this.skeleton !== void 0 && (s(t.skeletons, this.skeleton), r.skeleton = this.skeleton.uuid)), this.material !== void 0)
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2488
|
+
if (this.isSkinnedMesh && (r.bindMode = this.bindMode, r.bindMatrix = this.bindMatrix.toArray(), this.skeleton !== void 0 && (s(t.skeletons, this.skeleton), r.skeleton = this.skeleton.uuid)), this.material !== void 0)
|
|
2489
|
+
if (Array.isArray(this.material)) {
|
|
2490
|
+
const o = [];
|
|
2491
|
+
for (let l = 0, c = this.material.length; l < c; l++) o.push(s(t.materials, this.material[l]));
|
|
2492
|
+
r.material = o;
|
|
2493
|
+
} else r.material = s(t.materials, this.material);
|
|
2495
2494
|
if (this.children.length > 0) {
|
|
2496
2495
|
r.children = [];
|
|
2497
2496
|
for (let o = 0; o < this.children.length; o++) r.children.push(this.children[o].toJSON(t).object);
|
|
@@ -2504,8 +2503,8 @@ var oo = class {
|
|
|
2504
2503
|
}
|
|
2505
2504
|
}
|
|
2506
2505
|
if (i) {
|
|
2507
|
-
const o = a(t.geometries), l = a(t.materials), c = a(t.textures), h = a(t.images), d = a(t.shapes), u = a(t.skeletons), f = a(t.animations),
|
|
2508
|
-
o.length > 0 && (n.geometries = o), l.length > 0 && (n.materials = l), c.length > 0 && (n.textures = c), h.length > 0 && (n.images = h), d.length > 0 && (n.shapes = d), u.length > 0 && (n.skeletons = u), f.length > 0 && (n.animations = f),
|
|
2506
|
+
const o = a(t.geometries), l = a(t.materials), c = a(t.textures), h = a(t.images), d = a(t.shapes), u = a(t.skeletons), f = a(t.animations), m = a(t.nodes);
|
|
2507
|
+
o.length > 0 && (n.geometries = o), l.length > 0 && (n.materials = l), c.length > 0 && (n.textures = c), h.length > 0 && (n.images = h), d.length > 0 && (n.shapes = d), u.length > 0 && (n.skeletons = u), f.length > 0 && (n.animations = f), m.length > 0 && (n.nodes = m);
|
|
2509
2508
|
}
|
|
2510
2509
|
return n.object = r, n;
|
|
2511
2510
|
function a(o) {
|
|
@@ -2573,16 +2572,16 @@ var mr = class extends lt {
|
|
|
2573
2572
|
if (e && t.session.visibilityState !== "visible-blurred") {
|
|
2574
2573
|
if (l && e.hand) {
|
|
2575
2574
|
s = !0;
|
|
2576
|
-
for (const
|
|
2577
|
-
const
|
|
2578
|
-
|
|
2575
|
+
for (const u of e.hand.values()) {
|
|
2576
|
+
const f = t.getJointPose(u, i), m = this._getHandJoint(l, u);
|
|
2577
|
+
f !== null && (m.matrix.fromArray(f.transform.matrix), m.matrix.decompose(m.position, m.rotation, m.scale), m.matrixWorldNeedsUpdate = !0, m.jointRadius = f.radius), m.visible = f !== null;
|
|
2579
2578
|
}
|
|
2580
2579
|
const c = l.joints["index-finger-tip"], h = l.joints["thumb-tip"], d = c.position.distanceTo(h.position);
|
|
2581
2580
|
l.inputState.pinching && d > 0.025 ? (l.inputState.pinching = !1, this.dispatchEvent({
|
|
2582
2581
|
type: "pinchend",
|
|
2583
2582
|
handedness: e.handedness,
|
|
2584
2583
|
target: this
|
|
2585
|
-
})) : !l.inputState.pinching && d <= 0.
|
|
2584
|
+
})) : !l.inputState.pinching && d <= 0.015 && (l.inputState.pinching = !0, this.dispatchEvent({
|
|
2586
2585
|
type: "pinchstart",
|
|
2587
2586
|
handedness: e.handedness,
|
|
2588
2587
|
target: this
|
|
@@ -2870,7 +2869,6 @@ var xe = class {
|
|
|
2870
2869
|
break;
|
|
2871
2870
|
case r:
|
|
2872
2871
|
o = (i - n) / h + 4;
|
|
2873
|
-
break;
|
|
2874
2872
|
}
|
|
2875
2873
|
o /= 6;
|
|
2876
2874
|
}
|
|
@@ -2985,7 +2983,7 @@ var Td = class Ic {
|
|
|
2985
2983
|
const t = super.toJSON(e);
|
|
2986
2984
|
return this.fog !== null && (t.object.fog = this.fog.toJSON()), this.backgroundBlurriness > 0 && (t.object.backgroundBlurriness = this.backgroundBlurriness), this.backgroundIntensity !== 1 && (t.object.backgroundIntensity = this.backgroundIntensity), t.object.backgroundRotation = this.backgroundRotation.toArray(), this.environmentIntensity !== 1 && (t.object.environmentIntensity = this.environmentIntensity), t.object.environmentRotation = this.environmentRotation.toArray(), t;
|
|
2987
2985
|
}
|
|
2988
|
-
}, ni = /* @__PURE__ */ new C(), vi = /* @__PURE__ */ new C(), aa = /* @__PURE__ */ new C(), _i = /* @__PURE__ */ new C(),
|
|
2986
|
+
}, ni = /* @__PURE__ */ new C(), vi = /* @__PURE__ */ new C(), aa = /* @__PURE__ */ new C(), _i = /* @__PURE__ */ new C(), Sn = /* @__PURE__ */ new C(), bn = /* @__PURE__ */ new C(), ko = /* @__PURE__ */ new C(), oa = /* @__PURE__ */ new C(), la = /* @__PURE__ */ new C(), ca = /* @__PURE__ */ new C(), ha = /* @__PURE__ */ new pt(), ua = /* @__PURE__ */ new pt(), da = /* @__PURE__ */ new pt(), sn = class zn {
|
|
2989
2987
|
constructor(t = new C(), i = new C(), n = new C()) {
|
|
2990
2988
|
this.a = t, this.b = i, this.c = n;
|
|
2991
2989
|
}
|
|
@@ -2999,8 +2997,8 @@ var Td = class Ic {
|
|
|
2999
2997
|
const a = ni.dot(ni), o = ni.dot(vi), l = ni.dot(aa), c = vi.dot(vi), h = vi.dot(aa), d = a * c - o * o;
|
|
3000
2998
|
if (d === 0)
|
|
3001
2999
|
return s.set(0, 0, 0), null;
|
|
3002
|
-
const u = 1 / d, f = (c * l - o * h) * u,
|
|
3003
|
-
return s.set(1 - f -
|
|
3000
|
+
const u = 1 / d, f = (c * l - o * h) * u, m = (a * h - o * l) * u;
|
|
3001
|
+
return s.set(1 - f - m, m, f);
|
|
3004
3002
|
}
|
|
3005
3003
|
static containsPoint(t, i, n, r) {
|
|
3006
3004
|
return this.getBarycoord(t, i, n, r, _i) === null ? !1 : _i.x >= 0 && _i.y >= 0 && _i.x + _i.y <= 1;
|
|
@@ -3036,22 +3034,22 @@ var Td = class Ic {
|
|
|
3036
3034
|
return t.addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3);
|
|
3037
3035
|
}
|
|
3038
3036
|
getNormal(t) {
|
|
3039
|
-
return
|
|
3037
|
+
return zn.getNormal(this.a, this.b, this.c, t);
|
|
3040
3038
|
}
|
|
3041
3039
|
getPlane(t) {
|
|
3042
3040
|
return t.setFromCoplanarPoints(this.a, this.b, this.c);
|
|
3043
3041
|
}
|
|
3044
3042
|
getBarycoord(t, i) {
|
|
3045
|
-
return
|
|
3043
|
+
return zn.getBarycoord(t, this.a, this.b, this.c, i);
|
|
3046
3044
|
}
|
|
3047
3045
|
getInterpolation(t, i, n, r, s) {
|
|
3048
|
-
return
|
|
3046
|
+
return zn.getInterpolation(t, this.a, this.b, this.c, i, n, r, s);
|
|
3049
3047
|
}
|
|
3050
3048
|
containsPoint(t) {
|
|
3051
|
-
return
|
|
3049
|
+
return zn.containsPoint(t, this.a, this.b, this.c);
|
|
3052
3050
|
}
|
|
3053
3051
|
isFrontFacing(t) {
|
|
3054
|
-
return
|
|
3052
|
+
return zn.isFrontFacing(this.a, this.b, this.c, t);
|
|
3055
3053
|
}
|
|
3056
3054
|
intersectsBox(t) {
|
|
3057
3055
|
return t.intersectsTriangle(this);
|
|
@@ -3059,26 +3057,26 @@ var Td = class Ic {
|
|
|
3059
3057
|
closestPointToPoint(t, i) {
|
|
3060
3058
|
const n = this.a, r = this.b, s = this.c;
|
|
3061
3059
|
let a, o;
|
|
3062
|
-
|
|
3063
|
-
const l =
|
|
3060
|
+
Sn.subVectors(r, n), bn.subVectors(s, n), oa.subVectors(t, n);
|
|
3061
|
+
const l = Sn.dot(oa), c = bn.dot(oa);
|
|
3064
3062
|
if (l <= 0 && c <= 0) return i.copy(n);
|
|
3065
3063
|
la.subVectors(t, r);
|
|
3066
|
-
const h =
|
|
3064
|
+
const h = Sn.dot(la), d = bn.dot(la);
|
|
3067
3065
|
if (h >= 0 && d <= h) return i.copy(r);
|
|
3068
3066
|
const u = l * d - h * c;
|
|
3069
3067
|
if (u <= 0 && l >= 0 && h <= 0)
|
|
3070
|
-
return a = l / (l - h), i.copy(n).addScaledVector(
|
|
3068
|
+
return a = l / (l - h), i.copy(n).addScaledVector(Sn, a);
|
|
3071
3069
|
ca.subVectors(t, s);
|
|
3072
|
-
const f =
|
|
3073
|
-
if (
|
|
3074
|
-
const _ = f * c - l *
|
|
3075
|
-
if (_ <= 0 && c >= 0 &&
|
|
3076
|
-
return o = c / (c -
|
|
3077
|
-
const
|
|
3078
|
-
if (
|
|
3079
|
-
return ko.subVectors(s, r), o = (d - h) / (d - h + (f -
|
|
3080
|
-
const p = 1 / (
|
|
3081
|
-
return a = _ * p, o = u * p, i.copy(n).addScaledVector(
|
|
3070
|
+
const f = Sn.dot(ca), m = bn.dot(ca);
|
|
3071
|
+
if (m >= 0 && f <= m) return i.copy(s);
|
|
3072
|
+
const _ = f * c - l * m;
|
|
3073
|
+
if (_ <= 0 && c >= 0 && m <= 0)
|
|
3074
|
+
return o = c / (c - m), i.copy(n).addScaledVector(bn, o);
|
|
3075
|
+
const g = h * m - f * d;
|
|
3076
|
+
if (g <= 0 && d - h >= 0 && f - m >= 0)
|
|
3077
|
+
return ko.subVectors(s, r), o = (d - h) / (d - h + (f - m)), i.copy(r).addScaledVector(ko, o);
|
|
3078
|
+
const p = 1 / (g + _ + u);
|
|
3079
|
+
return a = _ * p, o = u * p, i.copy(n).addScaledVector(Sn, a).addScaledVector(bn, o);
|
|
3082
3080
|
}
|
|
3083
3081
|
equals(t) {
|
|
3084
3082
|
return t.a.equals(this.a) && t.b.equals(this.b) && t.c.equals(this.c);
|
|
@@ -3174,7 +3172,7 @@ var Td = class Ic {
|
|
|
3174
3172
|
}
|
|
3175
3173
|
intersectsTriangle(e) {
|
|
3176
3174
|
if (this.isEmpty()) return !1;
|
|
3177
|
-
this.getCenter(ir), Br.subVectors(this.max, ir),
|
|
3175
|
+
this.getCenter(ir), Br.subVectors(this.max, ir), Tn.subVectors(e.a, ir), An.subVectors(e.b, ir), En.subVectors(e.c, ir), Ii.subVectors(An, Tn), Pi.subVectors(En, An), Xi.subVectors(Tn, En);
|
|
3178
3176
|
let t = [
|
|
3179
3177
|
0,
|
|
3180
3178
|
-Ii.z,
|
|
@@ -3204,7 +3202,7 @@ var Td = class Ic {
|
|
|
3204
3202
|
Xi.x,
|
|
3205
3203
|
0
|
|
3206
3204
|
];
|
|
3207
|
-
return !fa(t, An, En,
|
|
3205
|
+
return !fa(t, Tn, An, En, Br) || (t = [
|
|
3208
3206
|
1,
|
|
3209
3207
|
0,
|
|
3210
3208
|
0,
|
|
@@ -3214,11 +3212,11 @@ var Td = class Ic {
|
|
|
3214
3212
|
0,
|
|
3215
3213
|
0,
|
|
3216
3214
|
1
|
|
3217
|
-
], !fa(t, An, En,
|
|
3215
|
+
], !fa(t, Tn, An, En, Br)) ? !1 : (zr.crossVectors(Ii, Pi), t = [
|
|
3218
3216
|
zr.x,
|
|
3219
3217
|
zr.y,
|
|
3220
3218
|
zr.z
|
|
3221
|
-
], fa(t, An, En,
|
|
3219
|
+
], fa(t, Tn, An, En, Br));
|
|
3222
3220
|
}
|
|
3223
3221
|
clampPoint(e, t) {
|
|
3224
3222
|
return t.copy(e).clamp(this.min, this.max);
|
|
@@ -3262,7 +3260,7 @@ var Td = class Ic {
|
|
|
3262
3260
|
/* @__PURE__ */ new C(),
|
|
3263
3261
|
/* @__PURE__ */ new C(),
|
|
3264
3262
|
/* @__PURE__ */ new C()
|
|
3265
|
-
], ri = /* @__PURE__ */ new C(), Fr = /* @__PURE__ */ new kt(),
|
|
3263
|
+
], ri = /* @__PURE__ */ new C(), Fr = /* @__PURE__ */ new kt(), Tn = /* @__PURE__ */ new C(), An = /* @__PURE__ */ new C(), En = /* @__PURE__ */ new C(), Ii = /* @__PURE__ */ new C(), Pi = /* @__PURE__ */ new C(), Xi = /* @__PURE__ */ new C(), ir = /* @__PURE__ */ new C(), Br = /* @__PURE__ */ new C(), zr = /* @__PURE__ */ new C(), qi = /* @__PURE__ */ new C();
|
|
3266
3264
|
function fa(e, t, i, n, r) {
|
|
3267
3265
|
for (let s = 0, a = e.length - 3; s <= a; s += 3) {
|
|
3268
3266
|
qi.fromArray(e, s);
|
|
@@ -3591,7 +3589,7 @@ var H0 = class {
|
|
|
3591
3589
|
fromJSON(e) {
|
|
3592
3590
|
return this.radius = e.radius, this.center.fromArray(e.center), this;
|
|
3593
3591
|
}
|
|
3594
|
-
}, Id = 0, Qt = /* @__PURE__ */ new He(), ma = /* @__PURE__ */ new lt(),
|
|
3592
|
+
}, Id = 0, Qt = /* @__PURE__ */ new He(), ma = /* @__PURE__ */ new lt(), wn = /* @__PURE__ */ new C(), Yt = /* @__PURE__ */ new kt(), rr = /* @__PURE__ */ new kt(), wt = /* @__PURE__ */ new C(), Ze = class Nc extends fi {
|
|
3595
3593
|
constructor() {
|
|
3596
3594
|
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: Id++ }), this.uuid = Jt(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.indirectOffset = 0, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = {
|
|
3597
3595
|
start: 0,
|
|
@@ -3668,7 +3666,7 @@ var H0 = class {
|
|
|
3668
3666
|
return ma.lookAt(t), ma.updateMatrix(), this.applyMatrix4(ma.matrix), this;
|
|
3669
3667
|
}
|
|
3670
3668
|
center() {
|
|
3671
|
-
return this.computeBoundingBox(), this.boundingBox.getCenter(
|
|
3669
|
+
return this.computeBoundingBox(), this.boundingBox.getCenter(wn).negate(), this.translate(wn.x, wn.y, wn.z), this;
|
|
3672
3670
|
}
|
|
3673
3671
|
setFromPoints(t) {
|
|
3674
3672
|
const i = this.getAttribute("position");
|
|
@@ -3724,7 +3722,7 @@ var H0 = class {
|
|
|
3724
3722
|
if (i) for (let s = 0, a = i.length; s < a; s++) {
|
|
3725
3723
|
const o = i[s], l = this.morphTargetsRelative;
|
|
3726
3724
|
for (let c = 0, h = o.count; c < h; c++)
|
|
3727
|
-
wt.fromBufferAttribute(o, c), l && (
|
|
3725
|
+
wt.fromBufferAttribute(o, c), l && (wn.fromBufferAttribute(t, c), wt.add(wn)), r = Math.max(r, n.distanceToSquared(wt));
|
|
3728
3726
|
}
|
|
3729
3727
|
this.boundingSphere.radius = Math.sqrt(r), isNaN(this.boundingSphere.radius) && Pe('BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.', this);
|
|
3730
3728
|
}
|
|
@@ -3741,11 +3739,11 @@ var H0 = class {
|
|
|
3741
3739
|
const o = [], l = [];
|
|
3742
3740
|
for (let y = 0; y < n.count; y++)
|
|
3743
3741
|
o[y] = new C(), l[y] = new C();
|
|
3744
|
-
const c = new C(), h = new C(), d = new C(), u = new $(), f = new $(),
|
|
3742
|
+
const c = new C(), h = new C(), d = new C(), u = new $(), f = new $(), m = new $(), _ = new C(), g = new C();
|
|
3745
3743
|
function p(y, T, U) {
|
|
3746
|
-
c.fromBufferAttribute(n, y), h.fromBufferAttribute(n, T), d.fromBufferAttribute(n, U), u.fromBufferAttribute(s, y), f.fromBufferAttribute(s, T),
|
|
3747
|
-
const I = 1 / (f.x *
|
|
3748
|
-
isFinite(I) && (_.copy(h).multiplyScalar(
|
|
3744
|
+
c.fromBufferAttribute(n, y), h.fromBufferAttribute(n, T), d.fromBufferAttribute(n, U), u.fromBufferAttribute(s, y), f.fromBufferAttribute(s, T), m.fromBufferAttribute(s, U), h.sub(c), d.sub(c), f.sub(u), m.sub(u);
|
|
3745
|
+
const I = 1 / (f.x * m.y - m.x * f.y);
|
|
3746
|
+
isFinite(I) && (_.copy(h).multiplyScalar(m.y).addScaledVector(d, -f.y).multiplyScalar(I), g.copy(d).multiplyScalar(f.x).addScaledVector(h, -m.x).multiplyScalar(I), o[y].add(_), o[T].add(_), o[U].add(_), l[y].add(g), l[T].add(g), l[U].add(g));
|
|
3749
3747
|
}
|
|
3750
3748
|
let S = this.groups;
|
|
3751
3749
|
S.length === 0 && (S = [{
|
|
@@ -3780,8 +3778,8 @@ var H0 = class {
|
|
|
3780
3778
|
else for (let u = 0, f = n.count; u < f; u++) n.setXYZ(u, 0, 0, 0);
|
|
3781
3779
|
const r = new C(), s = new C(), a = new C(), o = new C(), l = new C(), c = new C(), h = new C(), d = new C();
|
|
3782
3780
|
if (t) for (let u = 0, f = t.count; u < f; u += 3) {
|
|
3783
|
-
const
|
|
3784
|
-
r.fromBufferAttribute(i,
|
|
3781
|
+
const m = t.getX(u + 0), _ = t.getX(u + 1), g = t.getX(u + 2);
|
|
3782
|
+
r.fromBufferAttribute(i, m), s.fromBufferAttribute(i, _), a.fromBufferAttribute(i, g), h.subVectors(a, s), d.subVectors(r, s), h.cross(d), o.fromBufferAttribute(n, m), l.fromBufferAttribute(n, _), c.fromBufferAttribute(n, g), o.add(h), l.add(h), c.add(h), n.setXYZ(m, o.x, o.y, o.z), n.setXYZ(_, l.x, l.y, l.z), n.setXYZ(g, c.x, c.y, c.z);
|
|
3785
3783
|
}
|
|
3786
3784
|
else for (let u = 0, f = i.count; u < f; u += 3)
|
|
3787
3785
|
r.fromBufferAttribute(i, u + 0), s.fromBufferAttribute(i, u + 1), a.fromBufferAttribute(i, u + 2), h.subVectors(a, s), d.subVectors(r, s), h.cross(d), n.setXYZ(u + 0, h.x, h.y, h.z), n.setXYZ(u + 1, h.x, h.y, h.z), n.setXYZ(u + 2, h.x, h.y, h.z);
|
|
@@ -3796,10 +3794,10 @@ var H0 = class {
|
|
|
3796
3794
|
toNonIndexed() {
|
|
3797
3795
|
function t(o, l) {
|
|
3798
3796
|
const c = o.array, h = o.itemSize, d = o.normalized, u = new c.constructor(l.length * h);
|
|
3799
|
-
let f = 0,
|
|
3800
|
-
for (let _ = 0,
|
|
3797
|
+
let f = 0, m = 0;
|
|
3798
|
+
for (let _ = 0, g = l.length; _ < g; _++) {
|
|
3801
3799
|
o.isInterleavedBufferAttribute ? f = l[_] * o.data.stride + o.offset : f = l[_] * h;
|
|
3802
|
-
for (let p = 0; p < h; p++) u[
|
|
3800
|
+
for (let p = 0; p < h; p++) u[m++] = c[f++];
|
|
3803
3801
|
}
|
|
3804
3802
|
return new ht(u, h, d);
|
|
3805
3803
|
}
|
|
@@ -4147,10 +4145,10 @@ var H0 = class {
|
|
|
4147
4145
|
copy(e) {
|
|
4148
4146
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.alphaMap = e.alphaMap, this.rotation = e.rotation, this.sizeAttenuation = e.sizeAttenuation, this.fog = e.fog, this;
|
|
4149
4147
|
}
|
|
4150
|
-
},
|
|
4148
|
+
}, Cn, sr = /* @__PURE__ */ new C(), Rn = /* @__PURE__ */ new C(), In = /* @__PURE__ */ new C(), Pn = /* @__PURE__ */ new $(), ar = /* @__PURE__ */ new $(), Fc = /* @__PURE__ */ new He(), kr = /* @__PURE__ */ new C(), or = /* @__PURE__ */ new C(), Gr = /* @__PURE__ */ new C(), Go = /* @__PURE__ */ new $(), ga = /* @__PURE__ */ new $(), Ho = /* @__PURE__ */ new $(), Ld = class extends lt {
|
|
4151
4149
|
constructor(e = new Oc()) {
|
|
4152
|
-
if (super(), this.isSprite = !0, this.type = "Sprite",
|
|
4153
|
-
|
|
4150
|
+
if (super(), this.isSprite = !0, this.type = "Sprite", Cn === void 0) {
|
|
4151
|
+
Cn = new Ze();
|
|
4154
4152
|
const t = new Float32Array([
|
|
4155
4153
|
-0.5,
|
|
4156
4154
|
-0.5,
|
|
@@ -4173,26 +4171,26 @@ var H0 = class {
|
|
|
4173
4171
|
0,
|
|
4174
4172
|
1
|
|
4175
4173
|
]), i = new lo(t, 5);
|
|
4176
|
-
|
|
4174
|
+
Cn.setIndex([
|
|
4177
4175
|
0,
|
|
4178
4176
|
1,
|
|
4179
4177
|
2,
|
|
4180
4178
|
0,
|
|
4181
4179
|
2,
|
|
4182
4180
|
3
|
|
4183
|
-
]),
|
|
4181
|
+
]), Cn.setAttribute("position", new Os(i, 3, 0, !1)), Cn.setAttribute("uv", new Os(i, 2, 3, !1));
|
|
4184
4182
|
}
|
|
4185
|
-
this.geometry =
|
|
4183
|
+
this.geometry = Cn, this.material = e, this.center = new $(0.5, 0.5), this.count = 1;
|
|
4186
4184
|
}
|
|
4187
4185
|
raycast(e, t) {
|
|
4188
|
-
e.camera === null && Pe('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),
|
|
4186
|
+
e.camera === null && Pe('Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'), Rn.setFromMatrixScale(this.matrixWorld), Fc.copy(e.camera.matrixWorld), this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse, this.matrixWorld), In.setFromMatrixPosition(this.modelViewMatrix), e.camera.isPerspectiveCamera && this.material.sizeAttenuation === !1 && Rn.multiplyScalar(-In.z);
|
|
4189
4187
|
const i = this.material.rotation;
|
|
4190
4188
|
let n, r;
|
|
4191
4189
|
i !== 0 && (r = Math.cos(i), n = Math.sin(i));
|
|
4192
4190
|
const s = this.center;
|
|
4193
|
-
Hr(kr.set(-0.5, -0.5, 0),
|
|
4191
|
+
Hr(kr.set(-0.5, -0.5, 0), In, s, Rn, n, r), Hr(or.set(0.5, -0.5, 0), In, s, Rn, n, r), Hr(Gr.set(0.5, 0.5, 0), In, s, Rn, n, r), Go.set(0, 0), ga.set(1, 0), Ho.set(1, 1);
|
|
4194
4192
|
let a = e.ray.intersectTriangle(kr, or, Gr, !1, sr);
|
|
4195
|
-
if (a === null && (Hr(or.set(-0.5, 0.5, 0),
|
|
4193
|
+
if (a === null && (Hr(or.set(-0.5, 0.5, 0), In, s, Rn, n, r), ga.set(0, 1), a = e.ray.intersectTriangle(kr, Gr, or, !1, sr), a === null))
|
|
4196
4194
|
return;
|
|
4197
4195
|
const o = e.ray.origin.distanceTo(sr);
|
|
4198
4196
|
o < e.near || o > e.far || t.push({
|
|
@@ -4208,7 +4206,7 @@ var H0 = class {
|
|
|
4208
4206
|
}
|
|
4209
4207
|
};
|
|
4210
4208
|
function Hr(e, t, i, n, r, s) {
|
|
4211
|
-
|
|
4209
|
+
Pn.subVectors(e, i).addScalar(0.5).multiply(n), r !== void 0 ? (ar.x = s * Pn.x - r * Pn.y, ar.y = r * Pn.x + s * Pn.y) : ar.copy(Pn), e.copy(t), e.x += ar.x, e.y += ar.y, e.applyMatrix4(Fc);
|
|
4212
4210
|
}
|
|
4213
4211
|
var Wr = /* @__PURE__ */ new C(), Wo = /* @__PURE__ */ new C(), Ud = class extends lt {
|
|
4214
4212
|
constructor() {
|
|
@@ -4333,13 +4331,15 @@ var Wr = /* @__PURE__ */ new C(), Wo = /* @__PURE__ */ new C(), Ud = class exten
|
|
|
4333
4331
|
const r = e.distanceTo(t) * 0.5, s = -this.direction.dot(Xr), a = Li.dot(this.direction), o = -Li.dot(Xr), l = Li.lengthSq(), c = Math.abs(1 - s * s);
|
|
4334
4332
|
let h, d, u, f;
|
|
4335
4333
|
if (c > 0)
|
|
4336
|
-
if (h = s * o - a, d = s * a - o, f = r * c, h >= 0)
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4334
|
+
if (h = s * o - a, d = s * a - o, f = r * c, h >= 0)
|
|
4335
|
+
if (d >= -f)
|
|
4336
|
+
if (d <= f) {
|
|
4337
|
+
const m = 1 / c;
|
|
4338
|
+
h *= m, d *= m, u = h * (h + s * d + 2 * a) + d * (s * h + d + 2 * o) + l;
|
|
4339
|
+
} else
|
|
4340
|
+
d = r, h = Math.max(0, -(s * d + a)), u = -h * h + d * (d + 2 * o) + l;
|
|
4341
|
+
else
|
|
4342
|
+
d = -r, h = Math.max(0, -(s * d + a)), u = -h * h + d * (d + 2 * o) + l;
|
|
4343
4343
|
else d <= -f ? (h = Math.max(0, -(-s * r + a)), d = h > 0 ? -r : Math.min(Math.max(-r, -o), r), u = -h * h + d * (d + 2 * o) + l) : d <= f ? (h = 0, d = Math.min(Math.max(-r, -o), r), u = d * (d + 2 * o) + l) : (h = Math.max(0, -(s * r + a)), d = h > 0 ? r : Math.min(Math.max(-r, -o), r), u = -h * h + d * (d + 2 * o) + l);
|
|
4344
4344
|
else
|
|
4345
4345
|
d = s > 0 ? -r : r, h = Math.max(0, -(s * d + a)), u = -h * h + d * (d + 2 * o) + l;
|
|
@@ -4404,7 +4404,7 @@ var Wr = /* @__PURE__ */ new C(), Wo = /* @__PURE__ */ new C(), Ud = class exten
|
|
|
4404
4404
|
clone() {
|
|
4405
4405
|
return new this.constructor().copy(this);
|
|
4406
4406
|
}
|
|
4407
|
-
},
|
|
4407
|
+
}, pn = class extends Ot {
|
|
4408
4408
|
constructor(e) {
|
|
4409
4409
|
super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new xe(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new Gi(), this.combine = 0, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(e);
|
|
4410
4410
|
}
|
|
@@ -4412,7 +4412,7 @@ var Wr = /* @__PURE__ */ new C(), Wo = /* @__PURE__ */ new C(), Ud = class exten
|
|
|
4412
4412
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
|
|
4413
4413
|
}
|
|
4414
4414
|
}, Xo = /* @__PURE__ */ new He(), Yi = /* @__PURE__ */ new Rr(), Yr = /* @__PURE__ */ new Dt(), qo = /* @__PURE__ */ new C(), Zr = /* @__PURE__ */ new C(), Jr = /* @__PURE__ */ new C(), Kr = /* @__PURE__ */ new C(), xa = /* @__PURE__ */ new C(), $r = /* @__PURE__ */ new C(), Yo = /* @__PURE__ */ new C(), Qr = /* @__PURE__ */ new C(), Tt = class extends lt {
|
|
4415
|
-
constructor(e = new Ze(), t = new
|
|
4415
|
+
constructor(e = new Ze(), t = new pn()) {
|
|
4416
4416
|
super(), this.isMesh = !0, this.type = "Mesh", this.geometry = e, this.material = t, this.morphTargetDictionary = void 0, this.morphTargetInfluences = void 0, this.count = 1, this.updateMorphTargets();
|
|
4417
4417
|
}
|
|
4418
4418
|
copy(e, t) {
|
|
@@ -4452,34 +4452,36 @@ var Wr = /* @__PURE__ */ new C(), Wo = /* @__PURE__ */ new C(), Ud = class exten
|
|
|
4452
4452
|
_computeIntersections(e, t, i) {
|
|
4453
4453
|
let n;
|
|
4454
4454
|
const r = this.geometry, s = this.material, a = r.index, o = r.attributes.position, l = r.attributes.uv, c = r.attributes.uv1, h = r.attributes.normal, d = r.groups, u = r.drawRange;
|
|
4455
|
-
if (a !== null)
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4455
|
+
if (a !== null)
|
|
4456
|
+
if (Array.isArray(s)) for (let f = 0, m = d.length; f < m; f++) {
|
|
4457
|
+
const _ = d[f], g = s[_.materialIndex], p = Math.max(_.start, u.start), S = Math.min(a.count, Math.min(_.start + _.count, u.start + u.count));
|
|
4458
|
+
for (let M = p, v = S; M < v; M += 3) {
|
|
4459
|
+
const E = a.getX(M), w = a.getX(M + 1), R = a.getX(M + 2);
|
|
4460
|
+
n = jr(this, g, e, i, l, c, h, E, w, R), n && (n.faceIndex = Math.floor(M / 3), n.face.materialIndex = _.materialIndex, t.push(n));
|
|
4461
|
+
}
|
|
4460
4462
|
}
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4463
|
+
else {
|
|
4464
|
+
const f = Math.max(0, u.start), m = Math.min(a.count, u.start + u.count);
|
|
4465
|
+
for (let _ = f, g = m; _ < g; _ += 3) {
|
|
4466
|
+
const p = a.getX(_), S = a.getX(_ + 1), M = a.getX(_ + 2);
|
|
4467
|
+
n = jr(this, s, e, i, l, c, h, p, S, M), n && (n.faceIndex = Math.floor(_ / 3), t.push(n));
|
|
4468
|
+
}
|
|
4467
4469
|
}
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4470
|
+
else if (o !== void 0)
|
|
4471
|
+
if (Array.isArray(s)) for (let f = 0, m = d.length; f < m; f++) {
|
|
4472
|
+
const _ = d[f], g = s[_.materialIndex], p = Math.max(_.start, u.start), S = Math.min(o.count, Math.min(_.start + _.count, u.start + u.count));
|
|
4473
|
+
for (let M = p, v = S; M < v; M += 3) {
|
|
4474
|
+
const E = M, w = M + 1, R = M + 2;
|
|
4475
|
+
n = jr(this, g, e, i, l, c, h, E, w, R), n && (n.faceIndex = Math.floor(M / 3), n.face.materialIndex = _.materialIndex, t.push(n));
|
|
4476
|
+
}
|
|
4474
4477
|
}
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4478
|
+
else {
|
|
4479
|
+
const f = Math.max(0, u.start), m = Math.min(o.count, u.start + u.count);
|
|
4480
|
+
for (let _ = f, g = m; _ < g; _ += 3) {
|
|
4481
|
+
const p = _, S = _ + 1, M = _ + 2;
|
|
4482
|
+
n = jr(this, s, e, i, l, c, h, p, S, M), n && (n.faceIndex = Math.floor(_ / 3), t.push(n));
|
|
4483
|
+
}
|
|
4481
4484
|
}
|
|
4482
|
-
}
|
|
4483
4485
|
}
|
|
4484
4486
|
};
|
|
4485
4487
|
function Nd(e, t, i, n, r, s, a, o) {
|
|
@@ -4676,7 +4678,7 @@ var lr = /* @__PURE__ */ new pt(), Zo = /* @__PURE__ */ new pt(), Jo = /* @__PUR
|
|
|
4676
4678
|
const e = super.toJSON();
|
|
4677
4679
|
return e.meshPerAttribute = this.meshPerAttribute, e.isInstancedBufferAttribute = !0, e;
|
|
4678
4680
|
}
|
|
4679
|
-
},
|
|
4681
|
+
}, Ln = /* @__PURE__ */ new He(), jo = /* @__PURE__ */ new He(), ts = [], el = /* @__PURE__ */ new kt(), zd = /* @__PURE__ */ new He(), cr = /* @__PURE__ */ new Tt(), hr = /* @__PURE__ */ new Dt(), Vd = class extends Tt {
|
|
4680
4682
|
constructor(e, t, i) {
|
|
4681
4683
|
super(e, t), this.isInstancedMesh = !0, this.instanceMatrix = new Tr(new Float32Array(i * 16), 16), this.instanceColor = null, this.morphTexture = null, this.count = i, this.boundingBox = null, this.boundingSphere = null;
|
|
4682
4684
|
for (let n = 0; n < i; n++) this.setMatrixAt(n, zd);
|
|
@@ -4685,13 +4687,13 @@ var lr = /* @__PURE__ */ new pt(), Zo = /* @__PURE__ */ new pt(), Jo = /* @__PUR
|
|
|
4685
4687
|
const e = this.geometry, t = this.count;
|
|
4686
4688
|
this.boundingBox === null && (this.boundingBox = new kt()), e.boundingBox === null && e.computeBoundingBox(), this.boundingBox.makeEmpty();
|
|
4687
4689
|
for (let i = 0; i < t; i++)
|
|
4688
|
-
this.getMatrixAt(i,
|
|
4690
|
+
this.getMatrixAt(i, Ln), el.copy(e.boundingBox).applyMatrix4(Ln), this.boundingBox.union(el);
|
|
4689
4691
|
}
|
|
4690
4692
|
computeBoundingSphere() {
|
|
4691
4693
|
const e = this.geometry, t = this.count;
|
|
4692
4694
|
this.boundingSphere === null && (this.boundingSphere = new Dt()), e.boundingSphere === null && e.computeBoundingSphere(), this.boundingSphere.makeEmpty();
|
|
4693
4695
|
for (let i = 0; i < t; i++)
|
|
4694
|
-
this.getMatrixAt(i,
|
|
4696
|
+
this.getMatrixAt(i, Ln), hr.copy(e.boundingSphere).applyMatrix4(Ln), this.boundingSphere.union(hr);
|
|
4695
4697
|
}
|
|
4696
4698
|
copy(e, t) {
|
|
4697
4699
|
return super.copy(e, t), this.instanceMatrix.copy(e.instanceMatrix), e.morphTexture !== null && (this.morphTexture = e.morphTexture.clone()), e.instanceColor !== null && (this.instanceColor = e.instanceColor.clone()), this.count = e.count, e.boundingBox !== null && (this.boundingBox = e.boundingBox.clone()), e.boundingSphere !== null && (this.boundingSphere = e.boundingSphere.clone()), this;
|
|
@@ -4710,7 +4712,7 @@ var lr = /* @__PURE__ */ new pt(), Zo = /* @__PURE__ */ new pt(), Jo = /* @__PUR
|
|
|
4710
4712
|
const i = this.matrixWorld, n = this.count;
|
|
4711
4713
|
if (cr.geometry = this.geometry, cr.material = this.material, cr.material !== void 0 && (this.boundingSphere === null && this.computeBoundingSphere(), hr.copy(this.boundingSphere), hr.applyMatrix4(i), e.ray.intersectsSphere(hr) !== !1))
|
|
4712
4714
|
for (let r = 0; r < n; r++) {
|
|
4713
|
-
this.getMatrixAt(r,
|
|
4715
|
+
this.getMatrixAt(r, Ln), jo.multiplyMatrices(i, Ln), cr.matrixWorld = jo, cr.raycast(e, ts);
|
|
4714
4716
|
for (let s = 0, a = ts.length; s < a; s++) {
|
|
4715
4717
|
const o = ts[s];
|
|
4716
4718
|
o.instanceId = r, o.object = this, t.push(o);
|
|
@@ -4827,11 +4829,11 @@ var lr = /* @__PURE__ */ new pt(), Zo = /* @__PURE__ */ new pt(), Jo = /* @__PUR
|
|
|
4827
4829
|
for (let i = 0; i < 6; i++) t[i].copy(e.planes[i]);
|
|
4828
4830
|
return this;
|
|
4829
4831
|
}
|
|
4830
|
-
setFromProjectionMatrix(e, t =
|
|
4831
|
-
const n = this.planes, r = e.elements, s = r[0], a = r[1], o = r[2], l = r[3], c = r[4], h = r[5], d = r[6], u = r[7], f = r[8],
|
|
4832
|
-
if (n[0].setComponents(l - s, u - c,
|
|
4833
|
-
n[4].setComponents(o, d, _, M).normalize(), n[5].setComponents(l - o, u - d,
|
|
4834
|
-
else if (n[4].setComponents(l - o, u - d,
|
|
4832
|
+
setFromProjectionMatrix(e, t = un, i = !1) {
|
|
4833
|
+
const n = this.planes, r = e.elements, s = r[0], a = r[1], o = r[2], l = r[3], c = r[4], h = r[5], d = r[6], u = r[7], f = r[8], m = r[9], _ = r[10], g = r[11], p = r[12], S = r[13], M = r[14], v = r[15];
|
|
4834
|
+
if (n[0].setComponents(l - s, u - c, g - f, v - p).normalize(), n[1].setComponents(l + s, u + c, g + f, v + p).normalize(), n[2].setComponents(l + a, u + h, g + m, v + S).normalize(), n[3].setComponents(l - a, u - h, g - m, v - S).normalize(), i)
|
|
4835
|
+
n[4].setComponents(o, d, _, M).normalize(), n[5].setComponents(l - o, u - d, g - _, v - M).normalize();
|
|
4836
|
+
else if (n[4].setComponents(l - o, u - d, g - _, v - M).normalize(), t === 2e3) n[5].setComponents(l + o, u + d, g + _, v + M).normalize();
|
|
4835
4837
|
else if (t === 2001) n[5].setComponents(o, d, _, M).normalize();
|
|
4836
4838
|
else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: " + t);
|
|
4837
4839
|
return this;
|
|
@@ -4873,7 +4875,7 @@ var lr = /* @__PURE__ */ new pt(), Zo = /* @__PURE__ */ new pt(), Jo = /* @__PUR
|
|
|
4873
4875
|
}
|
|
4874
4876
|
}, tl = /* @__PURE__ */ new He(), Wd = class Vc {
|
|
4875
4877
|
constructor() {
|
|
4876
|
-
this.coordinateSystem =
|
|
4878
|
+
this.coordinateSystem = un, this._frustums = [], this._count = 0;
|
|
4877
4879
|
}
|
|
4878
4880
|
setFromArrayCamera(t) {
|
|
4879
4881
|
const i = t.cameras, n = this._frustums;
|
|
@@ -5098,9 +5100,9 @@ var jd = class extends Tt {
|
|
|
5098
5100
|
const h = t.getAttribute(c), d = i.getAttribute(c);
|
|
5099
5101
|
Qd(h, d, o);
|
|
5100
5102
|
const u = h.itemSize;
|
|
5101
|
-
for (let f = h.count,
|
|
5103
|
+
for (let f = h.count, m = l; f < m; f++) {
|
|
5102
5104
|
const _ = o + f;
|
|
5103
|
-
for (let
|
|
5105
|
+
for (let g = 0; g < u; g++) d.setComponent(_, g, 0);
|
|
5104
5106
|
}
|
|
5105
5107
|
d.needsUpdate = !0, d.addUpdateRange(o * u, l * u);
|
|
5106
5108
|
}
|
|
@@ -5132,7 +5134,7 @@ var jd = class extends Tt {
|
|
|
5132
5134
|
if (r.index !== null) {
|
|
5133
5135
|
if (o.indexStart !== t) {
|
|
5134
5136
|
const { indexStart: l, vertexStart: c, reservedIndexCount: h } = o, d = r.index, u = d.array, f = e - c;
|
|
5135
|
-
for (let
|
|
5137
|
+
for (let m = l; m < l + h; m++) u[m] = u[m] + f;
|
|
5136
5138
|
d.array.copyWithin(t, l, l + h), d.addUpdateRange(t, h), d.needsUpdate = !0, o.indexStart = t;
|
|
5137
5139
|
}
|
|
5138
5140
|
t += o.reservedIndexCount;
|
|
@@ -5140,8 +5142,8 @@ var jd = class extends Tt {
|
|
|
5140
5142
|
if (o.vertexStart !== e) {
|
|
5141
5143
|
const { vertexStart: l, reservedVertexCount: c } = o, h = r.attributes;
|
|
5142
5144
|
for (const d in h) {
|
|
5143
|
-
const u = h[d], { array: f, itemSize:
|
|
5144
|
-
f.copyWithin(e *
|
|
5145
|
+
const u = h[d], { array: f, itemSize: m } = u;
|
|
5146
|
+
f.copyWithin(e * m, l * m, (l + c) * m), u.addUpdateRange(e * m, c * m), u.needsUpdate = !0;
|
|
5145
5147
|
}
|
|
5146
5148
|
o.vertexStart = e;
|
|
5147
5149
|
}
|
|
@@ -5261,9 +5263,9 @@ var jd = class extends Tt {
|
|
|
5261
5263
|
const s = n.getIndex();
|
|
5262
5264
|
let a = s === null ? 1 : s.array.BYTES_PER_ELEMENT, o = 1;
|
|
5263
5265
|
r.wireframe && (o = 2, a = n.attributes.position.count > 65535 ? 4 : 2);
|
|
5264
|
-
const l = this._instanceInfo, c = this._multiDrawStarts, h = this._multiDrawCounts, d = this._geometryInfo, u = this.perObjectFrustumCulled, f = this._indirectTexture,
|
|
5266
|
+
const l = this._instanceInfo, c = this._multiDrawStarts, h = this._multiDrawCounts, d = this._geometryInfo, u = this.perObjectFrustumCulled, f = this._indirectTexture, m = f.image.data, _ = i.isArrayCamera ? Kd : Jd;
|
|
5265
5267
|
u && (i.isArrayCamera ? _.setFromArrayCamera(i) : (Gt.multiplyMatrices(i.projectionMatrix, i.matrixWorldInverse).multiply(this.matrixWorld), _.setFromProjectionMatrix(Gt, i.coordinateSystem, i.reversedDepth)));
|
|
5266
|
-
let
|
|
5268
|
+
let g = 0;
|
|
5267
5269
|
if (this.sortObjects) {
|
|
5268
5270
|
Gt.copy(this.matrixWorld).invert(), ur.setFromMatrixPosition(i.matrixWorld).applyMatrix4(Gt), il.set(0, 0, -1).transformDirection(i.matrixWorld).transformDirection(Gt);
|
|
5269
5271
|
for (let M = 0, v = l.length; M < v; M++) if (l[M].visible && l[M].active) {
|
|
@@ -5279,7 +5281,7 @@ var jd = class extends Tt {
|
|
|
5279
5281
|
S === null ? p.sort(r.transparent ? qd : Xd) : S.call(this, p, i);
|
|
5280
5282
|
for (let M = 0, v = p.length; M < v; M++) {
|
|
5281
5283
|
const E = p[M];
|
|
5282
|
-
c[
|
|
5284
|
+
c[g] = E.start * a * o, h[g] = E.count * o, m[g] = E.index, g++;
|
|
5283
5285
|
}
|
|
5284
5286
|
Aa.reset();
|
|
5285
5287
|
} else for (let p = 0, S = l.length; p < S; p++) if (l[p].visible && l[p].active) {
|
|
@@ -5287,10 +5289,10 @@ var jd = class extends Tt {
|
|
|
5287
5289
|
let v = !1;
|
|
5288
5290
|
if (u && (this.getMatrixAt(p, Gt), this.getBoundingSphereAt(M, Ji).applyMatrix4(Gt), v = !_.intersectsSphere(Ji)), !v) {
|
|
5289
5291
|
const E = d[M];
|
|
5290
|
-
c[
|
|
5292
|
+
c[g] = E.start * a * o, h[g] = E.count * o, m[g] = p, g++;
|
|
5291
5293
|
}
|
|
5292
5294
|
}
|
|
5293
|
-
f.needsUpdate = !0, this._multiDrawCount =
|
|
5295
|
+
f.needsUpdate = !0, this._multiDrawCount = g, this._visibilityChanged = !1;
|
|
5294
5296
|
}
|
|
5295
5297
|
onBeforeShadow(e, t, i, n, r, s) {
|
|
5296
5298
|
this.onBeforeRender(e, null, n, r, s);
|
|
@@ -5302,7 +5304,7 @@ var jd = class extends Tt {
|
|
|
5302
5304
|
copy(e) {
|
|
5303
5305
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.linewidth = e.linewidth, this.linecap = e.linecap, this.linejoin = e.linejoin, this.fog = e.fog, this;
|
|
5304
5306
|
}
|
|
5305
|
-
}, Fs = /* @__PURE__ */ new C(), Bs = /* @__PURE__ */ new C(), nl = /* @__PURE__ */ new He(), dr = /* @__PURE__ */ new Rr(), ss = /* @__PURE__ */ new Dt(), Ea = /* @__PURE__ */ new C(), rl = /* @__PURE__ */ new C(),
|
|
5307
|
+
}, Fs = /* @__PURE__ */ new C(), Bs = /* @__PURE__ */ new C(), nl = /* @__PURE__ */ new He(), dr = /* @__PURE__ */ new Rr(), ss = /* @__PURE__ */ new Dt(), Ea = /* @__PURE__ */ new C(), rl = /* @__PURE__ */ new C(), dn = class extends lt {
|
|
5306
5308
|
constructor(e = new Ze(), t = new Xt()) {
|
|
5307
5309
|
super(), this.isLine = !0, this.type = "Line", this.geometry = e, this.material = t, this.morphTargetDictionary = void 0, this.morphTargetInfluences = void 0, this.updateMorphTargets();
|
|
5308
5310
|
}
|
|
@@ -5326,17 +5328,17 @@ var jd = class extends Tt {
|
|
|
5326
5328
|
const a = r / ((this.scale.x + this.scale.y + this.scale.z) / 3), o = a * a, l = this.isLineSegments ? 2 : 1, c = i.index, h = i.attributes.position;
|
|
5327
5329
|
if (c !== null) {
|
|
5328
5330
|
const d = Math.max(0, s.start), u = Math.min(c.count, s.start + s.count);
|
|
5329
|
-
for (let f = d,
|
|
5330
|
-
const _ = c.getX(f),
|
|
5331
|
+
for (let f = d, m = u - 1; f < m; f += l) {
|
|
5332
|
+
const _ = c.getX(f), g = c.getX(f + 1), p = as(this, e, dr, o, _, g, f);
|
|
5331
5333
|
p && t.push(p);
|
|
5332
5334
|
}
|
|
5333
5335
|
if (this.isLineLoop) {
|
|
5334
|
-
const f = c.getX(u - 1),
|
|
5336
|
+
const f = c.getX(u - 1), m = c.getX(d), _ = as(this, e, dr, o, f, m, u - 1);
|
|
5335
5337
|
_ && t.push(_);
|
|
5336
5338
|
}
|
|
5337
5339
|
} else {
|
|
5338
5340
|
const d = Math.max(0, s.start), u = Math.min(h.count, s.start + s.count);
|
|
5339
|
-
for (let f = d,
|
|
5341
|
+
for (let f = d, m = u - 1; f < m; f += l) {
|
|
5340
5342
|
const _ = as(this, e, dr, o, f, f + 1, f);
|
|
5341
5343
|
_ && t.push(_);
|
|
5342
5344
|
}
|
|
@@ -5376,7 +5378,7 @@ function as(e, t, i, n, r, s, a) {
|
|
|
5376
5378
|
object: e
|
|
5377
5379
|
};
|
|
5378
5380
|
}
|
|
5379
|
-
var sl = /* @__PURE__ */ new C(), al = /* @__PURE__ */ new C(), Ai = class extends
|
|
5381
|
+
var sl = /* @__PURE__ */ new C(), al = /* @__PURE__ */ new C(), Ai = class extends dn {
|
|
5380
5382
|
constructor(e, t) {
|
|
5381
5383
|
super(e, t), this.isLineSegments = !0, this.type = "LineSegments";
|
|
5382
5384
|
}
|
|
@@ -5390,7 +5392,7 @@ var sl = /* @__PURE__ */ new C(), al = /* @__PURE__ */ new C(), Ai = class exten
|
|
|
5390
5392
|
} else he("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
|
|
5391
5393
|
return this;
|
|
5392
5394
|
}
|
|
5393
|
-
}, ef = class extends
|
|
5395
|
+
}, ef = class extends dn {
|
|
5394
5396
|
constructor(e, t) {
|
|
5395
5397
|
super(e, t), this.isLineLoop = !0, this.type = "LineLoop";
|
|
5396
5398
|
}
|
|
@@ -5416,8 +5418,8 @@ var sl = /* @__PURE__ */ new C(), al = /* @__PURE__ */ new C(), Ai = class exten
|
|
|
5416
5418
|
if (l !== null) {
|
|
5417
5419
|
const h = Math.max(0, s.start), d = Math.min(l.count, s.start + s.count);
|
|
5418
5420
|
for (let u = h, f = d; u < f; u++) {
|
|
5419
|
-
const
|
|
5420
|
-
ls.fromBufferAttribute(c,
|
|
5421
|
+
const m = l.getX(u);
|
|
5422
|
+
ls.fromBufferAttribute(c, m), ll(ls, m, o, n, e, t, this);
|
|
5421
5423
|
}
|
|
5422
5424
|
} else {
|
|
5423
5425
|
const h = Math.max(0, s.start), d = Math.min(c.count, s.start + s.count);
|
|
@@ -5553,7 +5555,7 @@ var nf = class extends Rt {
|
|
|
5553
5555
|
}, n, r, s, a, o, c, i, l), this.isDepthTexture = !0, this.flipY = !1, this.generateMipmaps = !1, this.compareFunction = null;
|
|
5554
5556
|
}
|
|
5555
5557
|
copy(e) {
|
|
5556
|
-
return super.copy(e), this.source = new
|
|
5558
|
+
return super.copy(e), this.source = new an(Object.assign({}, e.image)), this.compareFunction = e.compareFunction, this;
|
|
5557
5559
|
}
|
|
5558
5560
|
toJSON(e) {
|
|
5559
5561
|
const t = super.toJSON(e);
|
|
@@ -5602,15 +5604,15 @@ var nf = class extends Rt {
|
|
|
5602
5604
|
r = Math.floor(r), s = Math.floor(s), a = Math.floor(a);
|
|
5603
5605
|
const l = [], c = [], h = [], d = [];
|
|
5604
5606
|
let u = 0, f = 0;
|
|
5605
|
-
|
|
5606
|
-
function
|
|
5607
|
+
m("z", "y", "x", -1, -1, n, i, t, a, s, 0), m("z", "y", "x", 1, -1, n, i, -t, a, s, 1), m("x", "z", "y", 1, 1, t, n, i, r, a, 2), m("x", "z", "y", 1, -1, t, n, -i, r, a, 3), m("x", "y", "z", 1, -1, t, i, n, r, s, 4), m("x", "y", "z", -1, -1, t, i, -n, r, s, 5), this.setIndex(l), this.setAttribute("position", new be(c, 3)), this.setAttribute("normal", new be(h, 3)), this.setAttribute("uv", new be(d, 2));
|
|
5608
|
+
function m(_, g, p, S, M, v, E, w, R, y, T) {
|
|
5607
5609
|
const U = v / R, I = E / y, F = v / 2, X = E / 2, k = w / 2, G = R + 1, q = y + 1;
|
|
5608
5610
|
let z = 0, ee = 0;
|
|
5609
5611
|
const ie = new C();
|
|
5610
5612
|
for (let ne = 0; ne < q; ne++) {
|
|
5611
5613
|
const ge = ne * I - X;
|
|
5612
5614
|
for (let we = 0; we < G; we++)
|
|
5613
|
-
ie[_] = (we * U - F) * S, ie[
|
|
5615
|
+
ie[_] = (we * U - F) * S, ie[g] = ge * M, ie[p] = k, c.push(ie.x, ie.y, ie.z), ie[_] = 0, ie[g] = 0, ie[p] = w > 0 ? 1 : -1, h.push(ie.x, ie.y, ie.z), d.push(we / R), d.push(1 - ne / y), z += 1;
|
|
5614
5616
|
}
|
|
5615
5617
|
for (let ne = 0; ne < y; ne++) for (let ge = 0; ge < R; ge++) {
|
|
5616
5618
|
const we = u + ge + G * ne, st = u + ge + G * (ne + 1), at = u + (ge + 1) + G * (ne + 1), Y = u + (ge + 1) + G * ne;
|
|
@@ -5634,8 +5636,8 @@ var nf = class extends Rt {
|
|
|
5634
5636
|
radialSegments: r,
|
|
5635
5637
|
heightSegments: s
|
|
5636
5638
|
}, i = Math.max(0, i), n = Math.max(1, Math.floor(n)), r = Math.max(3, Math.floor(r)), s = Math.max(1, Math.floor(s));
|
|
5637
|
-
const a = [], o = [], l = [], c = [], h = i / 2, d = Math.PI / 2 * t, u = i, f = 2 * d + u,
|
|
5638
|
-
for (let S = 0; S <=
|
|
5639
|
+
const a = [], o = [], l = [], c = [], h = i / 2, d = Math.PI / 2 * t, u = i, f = 2 * d + u, m = n * 2 + s, _ = r + 1, g = new C(), p = new C();
|
|
5640
|
+
for (let S = 0; S <= m; S++) {
|
|
5639
5641
|
let M = 0, v = 0, E = 0, w = 0;
|
|
5640
5642
|
if (S <= n) {
|
|
5641
5643
|
const T = S / n, U = T * Math.PI / 2;
|
|
@@ -5649,10 +5651,10 @@ var nf = class extends Rt {
|
|
|
5649
5651
|
}
|
|
5650
5652
|
const R = Math.max(0, Math.min(1, M / f));
|
|
5651
5653
|
let y = 0;
|
|
5652
|
-
S === 0 ? y = 0.5 / r : S ===
|
|
5654
|
+
S === 0 ? y = 0.5 / r : S === m && (y = -0.5 / r);
|
|
5653
5655
|
for (let T = 0; T <= r; T++) {
|
|
5654
5656
|
const U = T / r, I = U * Math.PI * 2, F = Math.sin(I), X = Math.cos(I);
|
|
5655
|
-
p.x = -E * X, p.y = v, p.z = E * F, o.push(p.x, p.y, p.z),
|
|
5657
|
+
p.x = -E * X, p.y = v, p.z = E * F, o.push(p.x, p.y, p.z), g.set(-E * X, w, E * F), g.normalize(), l.push(g.x, g.y, g.z), c.push(U + y, R);
|
|
5656
5658
|
}
|
|
5657
5659
|
if (S > 0) {
|
|
5658
5660
|
const T = (S - 1) * _;
|
|
@@ -5708,8 +5710,8 @@ var nf = class extends Rt {
|
|
|
5708
5710
|
const c = this;
|
|
5709
5711
|
r = Math.floor(r), s = Math.floor(s);
|
|
5710
5712
|
const h = [], d = [], u = [], f = [];
|
|
5711
|
-
let
|
|
5712
|
-
const _ = [],
|
|
5713
|
+
let m = 0;
|
|
5714
|
+
const _ = [], g = n / 2;
|
|
5713
5715
|
let p = 0;
|
|
5714
5716
|
S(), a === !1 && (t > 0 && M(!0), i > 0 && M(!1)), this.setIndex(h), this.setAttribute("position", new be(d, 3)), this.setAttribute("normal", new be(u, 3)), this.setAttribute("uv", new be(f, 2));
|
|
5715
5717
|
function S() {
|
|
@@ -5720,7 +5722,7 @@ var nf = class extends Rt {
|
|
|
5720
5722
|
const T = [], U = y / s, I = U * (i - t) + t;
|
|
5721
5723
|
for (let F = 0; F <= r; F++) {
|
|
5722
5724
|
const X = F / r, k = X * l + o, G = Math.sin(k), q = Math.cos(k);
|
|
5723
|
-
E.x = I * G, E.y = -U * n +
|
|
5725
|
+
E.x = I * G, E.y = -U * n + g, E.z = I * q, d.push(E.x, E.y, E.z), v.set(G, R, q).normalize(), u.push(v.x, v.y, v.z), f.push(X, 1 - U), T.push(m++);
|
|
5724
5726
|
}
|
|
5725
5727
|
_.push(T);
|
|
5726
5728
|
}
|
|
@@ -5731,15 +5733,15 @@ var nf = class extends Rt {
|
|
|
5731
5733
|
c.addGroup(p, w, 0), p += w;
|
|
5732
5734
|
}
|
|
5733
5735
|
function M(v) {
|
|
5734
|
-
const E =
|
|
5736
|
+
const E = m, w = new $(), R = new C();
|
|
5735
5737
|
let y = 0;
|
|
5736
5738
|
const T = v === !0 ? t : i, U = v === !0 ? 1 : -1;
|
|
5737
5739
|
for (let F = 1; F <= r; F++)
|
|
5738
|
-
d.push(0,
|
|
5739
|
-
const I =
|
|
5740
|
+
d.push(0, g * U, 0), u.push(0, U, 0), f.push(0.5, 0.5), m++;
|
|
5741
|
+
const I = m;
|
|
5740
5742
|
for (let F = 0; F <= r; F++) {
|
|
5741
5743
|
const X = F / r * l + o, k = Math.cos(X), G = Math.sin(X);
|
|
5742
|
-
R.x = T * G, R.y =
|
|
5744
|
+
R.x = T * G, R.y = g * U, R.z = T * k, d.push(R.x, R.y, R.z), u.push(0, U, 0), w.x = k * 0.5 + 0.5, w.y = G * 0.5 * U + 0.5, f.push(w.x, w.y), m++;
|
|
5743
5745
|
}
|
|
5744
5746
|
for (let F = 0; F < r; F++) {
|
|
5745
5747
|
const X = E + F, k = I + F;
|
|
@@ -5805,10 +5807,10 @@ var nf = class extends Rt {
|
|
|
5805
5807
|
const S = new C();
|
|
5806
5808
|
for (let M = 0; M < s.length; M += 3) {
|
|
5807
5809
|
S.x = s[M + 0], S.y = s[M + 1], S.z = s[M + 2];
|
|
5808
|
-
const v =
|
|
5810
|
+
const v = g(S) / 2 / Math.PI + 0.5, E = p(S) / Math.PI + 0.5;
|
|
5809
5811
|
a.push(v, 1 - E);
|
|
5810
5812
|
}
|
|
5811
|
-
|
|
5813
|
+
m(), d();
|
|
5812
5814
|
}
|
|
5813
5815
|
function d() {
|
|
5814
5816
|
for (let S = 0; S < a.length; S += 6) {
|
|
@@ -5823,18 +5825,18 @@ var nf = class extends Rt {
|
|
|
5823
5825
|
const v = S * 3;
|
|
5824
5826
|
M.x = t[v + 0], M.y = t[v + 1], M.z = t[v + 2];
|
|
5825
5827
|
}
|
|
5826
|
-
function
|
|
5828
|
+
function m() {
|
|
5827
5829
|
const S = new C(), M = new C(), v = new C(), E = new C(), w = new $(), R = new $(), y = new $();
|
|
5828
5830
|
for (let T = 0, U = 0; T < s.length; T += 9, U += 6) {
|
|
5829
5831
|
S.set(s[T + 0], s[T + 1], s[T + 2]), M.set(s[T + 3], s[T + 4], s[T + 5]), v.set(s[T + 6], s[T + 7], s[T + 8]), w.set(a[U + 0], a[U + 1]), R.set(a[U + 2], a[U + 3]), y.set(a[U + 4], a[U + 5]), E.copy(S).add(M).add(v).divideScalar(3);
|
|
5830
|
-
const I =
|
|
5832
|
+
const I = g(E);
|
|
5831
5833
|
_(w, U + 0, S, I), _(R, U + 2, M, I), _(y, U + 4, v, I);
|
|
5832
5834
|
}
|
|
5833
5835
|
}
|
|
5834
5836
|
function _(S, M, v, E) {
|
|
5835
5837
|
E < 0 && S.x === 1 && (a[M] = S.x - 1), v.x === 0 && v.z === 0 && (a[M] = E / 2 / Math.PI + 0.5);
|
|
5836
5838
|
}
|
|
5837
|
-
function
|
|
5839
|
+
function g(S) {
|
|
5838
5840
|
return Math.atan2(S.z, -S.x);
|
|
5839
5841
|
}
|
|
5840
5842
|
function p(S) {
|
|
@@ -6034,7 +6036,7 @@ var nf = class extends Rt {
|
|
|
6034
6036
|
geometry: e,
|
|
6035
6037
|
thresholdAngle: t
|
|
6036
6038
|
}, e !== null) {
|
|
6037
|
-
const i = Math.pow(10, 4), n = Math.cos(
|
|
6039
|
+
const i = Math.pow(10, 4), n = Math.cos(cn * t), r = e.getIndex(), s = e.getAttribute("position"), a = r ? r.count : s.count, o = [
|
|
6038
6040
|
0,
|
|
6039
6041
|
0,
|
|
6040
6042
|
0
|
|
@@ -6045,20 +6047,20 @@ var nf = class extends Rt {
|
|
|
6045
6047
|
], c = new Array(3), h = {}, d = [];
|
|
6046
6048
|
for (let u = 0; u < a; u += 3) {
|
|
6047
6049
|
r ? (o[0] = r.getX(u), o[1] = r.getX(u + 1), o[2] = r.getX(u + 2)) : (o[0] = u, o[1] = u + 1, o[2] = u + 2);
|
|
6048
|
-
const { a: f, b:
|
|
6049
|
-
if (f.fromBufferAttribute(s, o[0]),
|
|
6050
|
-
for (let
|
|
6051
|
-
const p = (
|
|
6050
|
+
const { a: f, b: m, c: _ } = us;
|
|
6051
|
+
if (f.fromBufferAttribute(s, o[0]), m.fromBufferAttribute(s, o[1]), _.fromBufferAttribute(s, o[2]), us.getNormal(wa), c[0] = `${Math.round(f.x * i)},${Math.round(f.y * i)},${Math.round(f.z * i)}`, c[1] = `${Math.round(m.x * i)},${Math.round(m.y * i)},${Math.round(m.z * i)}`, c[2] = `${Math.round(_.x * i)},${Math.round(_.y * i)},${Math.round(_.z * i)}`, !(c[0] === c[1] || c[1] === c[2] || c[2] === c[0]))
|
|
6052
|
+
for (let g = 0; g < 3; g++) {
|
|
6053
|
+
const p = (g + 1) % 3, S = c[g], M = c[p], v = us[l[g]], E = us[l[p]], w = `${S}_${M}`, R = `${M}_${S}`;
|
|
6052
6054
|
R in h && h[R] ? (wa.dot(h[R].normal) <= n && (d.push(v.x, v.y, v.z), d.push(E.x, E.y, E.z)), h[R] = null) : w in h || (h[w] = {
|
|
6053
|
-
index0: o[
|
|
6055
|
+
index0: o[g],
|
|
6054
6056
|
index1: o[p],
|
|
6055
6057
|
normal: wa.clone()
|
|
6056
6058
|
});
|
|
6057
6059
|
}
|
|
6058
6060
|
}
|
|
6059
6061
|
for (const u in h) if (h[u]) {
|
|
6060
|
-
const { index0: f, index1:
|
|
6061
|
-
cs.fromBufferAttribute(s, f), hs.fromBufferAttribute(s,
|
|
6062
|
+
const { index0: f, index1: m } = h[u];
|
|
6063
|
+
cs.fromBufferAttribute(s, f), hs.fromBufferAttribute(s, m), d.push(cs.x, cs.y, cs.z), d.push(hs.x, hs.y, hs.z);
|
|
6062
6064
|
}
|
|
6063
6065
|
this.setAttribute("position", new be(d, 3));
|
|
6064
6066
|
}
|
|
@@ -6245,8 +6247,8 @@ var cl = /* @__PURE__ */ new C(), hl = /* @__PURE__ */ new C(), Ca = /* @__PURE_
|
|
|
6245
6247
|
const h = n[a % r], d = n[(a + 1) % r];
|
|
6246
6248
|
if (this.closed || a + 2 < r ? c = n[(a + 2) % r] : (cl.subVectors(n[r - 1], n[r - 2]).add(n[r - 1]), c = cl), this.curveType === "centripetal" || this.curveType === "chordal") {
|
|
6247
6249
|
const u = this.curveType === "chordal" ? 0.5 : 0.25;
|
|
6248
|
-
let f = Math.pow(l.distanceToSquared(h), u),
|
|
6249
|
-
|
|
6250
|
+
let f = Math.pow(l.distanceToSquared(h), u), m = Math.pow(h.distanceToSquared(d), u), _ = Math.pow(d.distanceToSquared(c), u);
|
|
6251
|
+
m < 1e-4 && (m = 1), f < 1e-4 && (f = m), _ < 1e-4 && (_ = m), Ca.initNonuniformCatmullRom(l.x, h.x, d.x, c.x, f, m, _), Ra.initNonuniformCatmullRom(l.y, h.y, d.y, c.y, f, m, _), Ia.initNonuniformCatmullRom(l.z, h.z, d.z, c.z, f, m, _);
|
|
6250
6252
|
} else this.curveType === "catmullrom" && (Ca.initCatmullRom(l.x, h.x, d.x, c.x, this.tension), Ra.initCatmullRom(l.y, h.y, d.y, c.y, this.tension), Ia.initCatmullRom(l.z, h.z, d.z, c.z, this.tension));
|
|
6251
6253
|
return i.set(Ca.calc(o), Ra.calc(o), Ia.calc(o)), i;
|
|
6252
6254
|
}
|
|
@@ -6675,8 +6677,8 @@ function Mf(e, t, i = 2) {
|
|
|
6675
6677
|
o = e[0], l = e[1];
|
|
6676
6678
|
let h = o, d = l;
|
|
6677
6679
|
for (let u = i; u < r; u += i) {
|
|
6678
|
-
const f = e[u],
|
|
6679
|
-
f < o && (o = f),
|
|
6680
|
+
const f = e[u], m = e[u + 1];
|
|
6681
|
+
f < o && (o = f), m < l && (l = m), f > h && (h = f), m > d && (d = m);
|
|
6680
6682
|
}
|
|
6681
6683
|
c = Math.max(h - o, d - l), c = c !== 0 ? 32767 / c : 0;
|
|
6682
6684
|
}
|
|
@@ -6688,7 +6690,7 @@ function nh(e, t, i, n, r) {
|
|
|
6688
6690
|
else for (let a = i - n; a >= t; a -= n) s = dl(a / n | 0, e[a], e[a + 1], s);
|
|
6689
6691
|
return s && Jn(s, s.next) && (wr(s), s = s.next), s;
|
|
6690
6692
|
}
|
|
6691
|
-
function
|
|
6693
|
+
function fn(e, t) {
|
|
6692
6694
|
if (!e) return e;
|
|
6693
6695
|
t || (t = e);
|
|
6694
6696
|
let i = e, n;
|
|
@@ -6711,7 +6713,7 @@ function Ar(e, t, i, n, r, s, a) {
|
|
|
6711
6713
|
continue;
|
|
6712
6714
|
}
|
|
6713
6715
|
if (e = c, e === o) {
|
|
6714
|
-
a ? a === 1 ? (e = Tf(
|
|
6716
|
+
a ? a === 1 ? (e = Tf(fn(e), t), Ar(e, t, i, n, r, s, 2)) : a === 2 && Af(e, t, i, n, r, s) : Ar(fn(e), t, i, n, r, s, 1);
|
|
6715
6717
|
break;
|
|
6716
6718
|
}
|
|
6717
6719
|
}
|
|
@@ -6720,28 +6722,28 @@ function Sf(e) {
|
|
|
6720
6722
|
const t = e.prev, i = e, n = e.next;
|
|
6721
6723
|
if (gt(t, i, n) >= 0) return !1;
|
|
6722
6724
|
const r = t.x, s = i.x, a = n.x, o = t.y, l = i.y, c = n.y, h = Math.min(r, s, a), d = Math.min(o, l, c), u = Math.max(r, s, a), f = Math.max(o, l, c);
|
|
6723
|
-
let
|
|
6724
|
-
for (;
|
|
6725
|
-
if (
|
|
6726
|
-
|
|
6725
|
+
let m = n.next;
|
|
6726
|
+
for (; m !== t; ) {
|
|
6727
|
+
if (m.x >= h && m.x <= u && m.y >= d && m.y <= f && vr(r, o, s, l, a, c, m.x, m.y) && gt(m.prev, m, m.next) >= 0) return !1;
|
|
6728
|
+
m = m.next;
|
|
6727
6729
|
}
|
|
6728
6730
|
return !0;
|
|
6729
6731
|
}
|
|
6730
6732
|
function bf(e, t, i, n) {
|
|
6731
6733
|
const r = e.prev, s = e, a = e.next;
|
|
6732
6734
|
if (gt(r, s, a) >= 0) return !1;
|
|
6733
|
-
const o = r.x, l = s.x, c = a.x, h = r.y, d = s.y, u = a.y, f = Math.min(o, l, c),
|
|
6735
|
+
const o = r.x, l = s.x, c = a.x, h = r.y, d = s.y, u = a.y, f = Math.min(o, l, c), m = Math.min(h, d, u), _ = Math.max(o, l, c), g = Math.max(h, d, u), p = Za(f, m, t, i, n), S = Za(_, g, t, i, n);
|
|
6734
6736
|
let M = e.prevZ, v = e.nextZ;
|
|
6735
6737
|
for (; M && M.z >= p && v && v.z <= S; ) {
|
|
6736
|
-
if (M.x >= f && M.x <= _ && M.y >=
|
|
6738
|
+
if (M.x >= f && M.x <= _ && M.y >= m && M.y <= g && M !== r && M !== a && vr(o, h, l, d, c, u, M.x, M.y) && gt(M.prev, M, M.next) >= 0 || (M = M.prevZ, v.x >= f && v.x <= _ && v.y >= m && v.y <= g && v !== r && v !== a && vr(o, h, l, d, c, u, v.x, v.y) && gt(v.prev, v, v.next) >= 0)) return !1;
|
|
6737
6739
|
v = v.nextZ;
|
|
6738
6740
|
}
|
|
6739
6741
|
for (; M && M.z >= p; ) {
|
|
6740
|
-
if (M.x >= f && M.x <= _ && M.y >=
|
|
6742
|
+
if (M.x >= f && M.x <= _ && M.y >= m && M.y <= g && M !== r && M !== a && vr(o, h, l, d, c, u, M.x, M.y) && gt(M.prev, M, M.next) >= 0) return !1;
|
|
6741
6743
|
M = M.prevZ;
|
|
6742
6744
|
}
|
|
6743
6745
|
for (; v && v.z <= S; ) {
|
|
6744
|
-
if (v.x >= f && v.x <= _ && v.y >=
|
|
6746
|
+
if (v.x >= f && v.x <= _ && v.y >= m && v.y <= g && v !== r && v !== a && vr(o, h, l, d, c, u, v.x, v.y) && gt(v.prev, v, v.next) >= 0) return !1;
|
|
6745
6747
|
v = v.nextZ;
|
|
6746
6748
|
}
|
|
6747
6749
|
return !0;
|
|
@@ -6752,7 +6754,7 @@ function Tf(e, t) {
|
|
|
6752
6754
|
const n = i.prev, r = i.next.next;
|
|
6753
6755
|
!Jn(n, r) && sh(n, i, i.next, r) && Er(n, r) && Er(r, n) && (t.push(n.i, i.i, r.i), wr(i), wr(i.next), i = e = r), i = i.next;
|
|
6754
6756
|
} while (i !== e);
|
|
6755
|
-
return
|
|
6757
|
+
return fn(i);
|
|
6756
6758
|
}
|
|
6757
6759
|
function Af(e, t, i, n, r, s) {
|
|
6758
6760
|
let a = e;
|
|
@@ -6761,7 +6763,7 @@ function Af(e, t, i, n, r, s) {
|
|
|
6761
6763
|
for (; o !== a.prev; ) {
|
|
6762
6764
|
if (a.i !== o.i && Nf(a, o)) {
|
|
6763
6765
|
let l = ah(a, o);
|
|
6764
|
-
a =
|
|
6766
|
+
a = fn(a, a.next), l = fn(l, l.next), Ar(a, t, i, n, r, s, 0), Ar(l, t, i, n, r, s, 0);
|
|
6765
6767
|
return;
|
|
6766
6768
|
}
|
|
6767
6769
|
o = o.next;
|
|
@@ -6787,7 +6789,7 @@ function Cf(e, t) {
|
|
|
6787
6789
|
const i = Rf(e, t);
|
|
6788
6790
|
if (!i) return t;
|
|
6789
6791
|
const n = ah(i, e);
|
|
6790
|
-
return
|
|
6792
|
+
return fn(n, n.next), fn(i, i.next);
|
|
6791
6793
|
}
|
|
6792
6794
|
function Rf(e, t) {
|
|
6793
6795
|
let i = t;
|
|
@@ -6983,7 +6985,7 @@ var zf = class lh extends Ze {
|
|
|
6983
6985
|
this.setAttribute("position", new be(r, 3)), this.setAttribute("uv", new be(s, 2)), this.computeVertexNormals();
|
|
6984
6986
|
function a(o) {
|
|
6985
6987
|
const l = [], c = i.curveSegments !== void 0 ? i.curveSegments : 12, h = i.steps !== void 0 ? i.steps : 1, d = i.depth !== void 0 ? i.depth : 1;
|
|
6986
|
-
let u = i.bevelEnabled !== void 0 ? i.bevelEnabled : !0, f = i.bevelThickness !== void 0 ? i.bevelThickness : 0.2,
|
|
6988
|
+
let u = i.bevelEnabled !== void 0 ? i.bevelEnabled : !0, f = i.bevelThickness !== void 0 ? i.bevelThickness : 0.2, m = i.bevelSize !== void 0 ? i.bevelSize : f - 0.1, _ = i.bevelOffset !== void 0 ? i.bevelOffset : 0, g = i.bevelSegments !== void 0 ? i.bevelSegments : 3;
|
|
6987
6989
|
const p = i.extrudePath, S = i.UVGenerator !== void 0 ? i.UVGenerator : Vf;
|
|
6988
6990
|
let M, v = !1, E, w, R, y;
|
|
6989
6991
|
if (p) {
|
|
@@ -6991,7 +6993,7 @@ var zf = class lh extends Ze {
|
|
|
6991
6993
|
const J = p.isCatmullRomCurve3 ? p.closed : !1;
|
|
6992
6994
|
E = p.computeFrenetFrames(h, J), w = new C(), R = new C(), y = new C();
|
|
6993
6995
|
}
|
|
6994
|
-
u || (
|
|
6996
|
+
u || (g = 0, f = 0, m = 0, _ = 0);
|
|
6995
6997
|
const T = o.extractPoints(c);
|
|
6996
6998
|
let U = T.shape;
|
|
6997
6999
|
const I = T.holes;
|
|
@@ -7052,11 +7054,11 @@ var zf = class lh extends Ze {
|
|
|
7052
7054
|
ie.push(ne), ge = ge.concat(ne);
|
|
7053
7055
|
}
|
|
7054
7056
|
let we;
|
|
7055
|
-
if (
|
|
7057
|
+
if (g === 0) we = Di.triangulateShape(k, I);
|
|
7056
7058
|
else {
|
|
7057
7059
|
const J = [], re = [];
|
|
7058
|
-
for (let ce = 0; ce <
|
|
7059
|
-
const _e = ce /
|
|
7060
|
+
for (let ce = 0; ce < g; ce++) {
|
|
7061
|
+
const _e = ce / g, ye = f * Math.cos(_e * Math.PI / 2), Le = m * Math.sin(_e * Math.PI / 2) + _;
|
|
7060
7062
|
for (let Ue = 0, We = k.length; Ue < We; Ue++) {
|
|
7061
7063
|
const Xe = G(k[Ue], ee[Ue], Le);
|
|
7062
7064
|
de(Xe.x, Xe.y, -ye), _e === 0 && J.push(Xe);
|
|
@@ -7074,7 +7076,7 @@ var zf = class lh extends Ze {
|
|
|
7074
7076
|
}
|
|
7075
7077
|
we = Di.triangulateShape(J, re);
|
|
7076
7078
|
}
|
|
7077
|
-
const st = we.length, at =
|
|
7079
|
+
const st = we.length, at = m + _;
|
|
7078
7080
|
for (let J = 0; J < q; J++) {
|
|
7079
7081
|
const re = u ? G(U[J], ge[J], at) : U[J];
|
|
7080
7082
|
v ? (R.copy(E.normals[0]).multiplyScalar(re.x), w.copy(E.binormals[0]).multiplyScalar(re.y), y.copy(M[0]).add(R).add(w), de(y.x, y.y, y.z)) : de(re.x, re.y, 0);
|
|
@@ -7083,8 +7085,8 @@ var zf = class lh extends Ze {
|
|
|
7083
7085
|
const ce = u ? G(U[re], ge[re], at) : U[re];
|
|
7084
7086
|
v ? (R.copy(E.normals[J]).multiplyScalar(ce.x), w.copy(E.binormals[J]).multiplyScalar(ce.y), y.copy(M[J]).add(R).add(w), de(y.x, y.y, y.z)) : de(ce.x, ce.y, d / h * J);
|
|
7085
7087
|
}
|
|
7086
|
-
for (let J =
|
|
7087
|
-
const re = J /
|
|
7088
|
+
for (let J = g - 1; J >= 0; J--) {
|
|
7089
|
+
const re = J / g, ce = f * Math.cos(re * Math.PI / 2), _e = m * Math.sin(re * Math.PI / 2) + _;
|
|
7088
7090
|
for (let ye = 0, Le = k.length; ye < Le; ye++) {
|
|
7089
7091
|
const Ue = G(k[ye], ee[ye], _e);
|
|
7090
7092
|
de(Ue.x, Ue.y, d + ce);
|
|
@@ -7107,7 +7109,7 @@ var zf = class lh extends Ze {
|
|
|
7107
7109
|
const ye = we[_e];
|
|
7108
7110
|
De(ye[2] + ce, ye[1] + ce, ye[0] + ce);
|
|
7109
7111
|
}
|
|
7110
|
-
re = h +
|
|
7112
|
+
re = h + g * 2, ce = q * re;
|
|
7111
7113
|
for (let _e = 0; _e < st; _e++) {
|
|
7112
7114
|
const ye = we[_e];
|
|
7113
7115
|
De(ye[0] + ce, ye[1] + ce, ye[2] + ce);
|
|
@@ -7140,7 +7142,7 @@ var zf = class lh extends Ze {
|
|
|
7140
7142
|
const _e = ce;
|
|
7141
7143
|
let ye = ce - 1;
|
|
7142
7144
|
ye < 0 && (ye = J.length - 1);
|
|
7143
|
-
for (let Le = 0, Ue = h +
|
|
7145
|
+
for (let Le = 0, Ue = h + g * 2; Le < Ue; Le++) {
|
|
7144
7146
|
const We = q * Le, Xe = q * (Le + 1);
|
|
7145
7147
|
Be(re + _e + We, re + ye + We, re + ye + Xe, re + _e + Xe);
|
|
7146
7148
|
}
|
|
@@ -7193,17 +7195,17 @@ var zf = class lh extends Ze {
|
|
|
7193
7195
|
];
|
|
7194
7196
|
},
|
|
7195
7197
|
generateSideWallUV: function(e, t, i, n, r, s) {
|
|
7196
|
-
const a = t[i * 3], o = t[i * 3 + 1], l = t[i * 3 + 2], c = t[n * 3], h = t[n * 3 + 1], d = t[n * 3 + 2], u = t[r * 3], f = t[r * 3 + 1],
|
|
7198
|
+
const a = t[i * 3], o = t[i * 3 + 1], l = t[i * 3 + 2], c = t[n * 3], h = t[n * 3 + 1], d = t[n * 3 + 2], u = t[r * 3], f = t[r * 3 + 1], m = t[r * 3 + 2], _ = t[s * 3], g = t[s * 3 + 1], p = t[s * 3 + 2];
|
|
7197
7199
|
return Math.abs(o - h) < Math.abs(a - c) ? [
|
|
7198
7200
|
new $(a, 1 - l),
|
|
7199
7201
|
new $(c, 1 - d),
|
|
7200
|
-
new $(u, 1 -
|
|
7202
|
+
new $(u, 1 - m),
|
|
7201
7203
|
new $(_, 1 - p)
|
|
7202
7204
|
] : [
|
|
7203
7205
|
new $(o, 1 - l),
|
|
7204
7206
|
new $(h, 1 - d),
|
|
7205
|
-
new $(f, 1 -
|
|
7206
|
-
new $(
|
|
7207
|
+
new $(f, 1 - m),
|
|
7208
|
+
new $(g, 1 - p)
|
|
7207
7209
|
];
|
|
7208
7210
|
}
|
|
7209
7211
|
};
|
|
@@ -7336,17 +7338,17 @@ var Gf = class ch extends Ir {
|
|
|
7336
7338
|
phiStart: n,
|
|
7337
7339
|
phiLength: r
|
|
7338
7340
|
}, i = Math.floor(i), r = Ve(r, 0, Math.PI * 2);
|
|
7339
|
-
const s = [], a = [], o = [], l = [], c = [], h = 1 / i, d = new C(), u = new $(), f = new C(),
|
|
7340
|
-
let
|
|
7341
|
+
const s = [], a = [], o = [], l = [], c = [], h = 1 / i, d = new C(), u = new $(), f = new C(), m = new C(), _ = new C();
|
|
7342
|
+
let g = 0, p = 0;
|
|
7341
7343
|
for (let S = 0; S <= t.length - 1; S++) switch (S) {
|
|
7342
7344
|
case 0:
|
|
7343
|
-
|
|
7345
|
+
g = t[S + 1].x - t[S].x, p = t[S + 1].y - t[S].y, f.x = p * 1, f.y = -g, f.z = p * 0, _.copy(f), f.normalize(), l.push(f.x, f.y, f.z);
|
|
7344
7346
|
break;
|
|
7345
7347
|
case t.length - 1:
|
|
7346
7348
|
l.push(_.x, _.y, _.z);
|
|
7347
7349
|
break;
|
|
7348
7350
|
default:
|
|
7349
|
-
|
|
7351
|
+
g = t[S + 1].x - t[S].x, p = t[S + 1].y - t[S].y, f.x = p * 1, f.y = -g, f.z = p * 0, m.copy(f), f.x += _.x, f.y += _.y, f.z += _.z, f.normalize(), l.push(f.x, f.y, f.z), _.copy(m);
|
|
7350
7352
|
}
|
|
7351
7353
|
for (let S = 0; S <= i; S++) {
|
|
7352
7354
|
const M = n + S * h * r, v = Math.sin(M), E = Math.cos(M);
|
|
@@ -7430,19 +7432,19 @@ var Gf = class ch extends Ir {
|
|
|
7430
7432
|
widthSegments: n,
|
|
7431
7433
|
heightSegments: r
|
|
7432
7434
|
};
|
|
7433
|
-
const s = t / 2, a = i / 2, o = Math.floor(n), l = Math.floor(r), c = o + 1, h = l + 1, d = t / o, u = i / l, f = [],
|
|
7435
|
+
const s = t / 2, a = i / 2, o = Math.floor(n), l = Math.floor(r), c = o + 1, h = l + 1, d = t / o, u = i / l, f = [], m = [], _ = [], g = [];
|
|
7434
7436
|
for (let p = 0; p < h; p++) {
|
|
7435
7437
|
const S = p * u - a;
|
|
7436
7438
|
for (let M = 0; M < c; M++) {
|
|
7437
7439
|
const v = M * d - s;
|
|
7438
|
-
|
|
7440
|
+
m.push(v, -S, 0), _.push(0, 0, 1), g.push(M / o), g.push(1 - p / l);
|
|
7439
7441
|
}
|
|
7440
7442
|
}
|
|
7441
7443
|
for (let p = 0; p < l; p++) for (let S = 0; S < o; S++) {
|
|
7442
7444
|
const M = S + c * p, v = S + c * (p + 1), E = S + 1 + c * (p + 1), w = S + 1 + c * p;
|
|
7443
7445
|
f.push(M, v, w), f.push(v, E, w);
|
|
7444
7446
|
}
|
|
7445
|
-
this.setIndex(f), this.setAttribute("position", new be(
|
|
7447
|
+
this.setIndex(f), this.setAttribute("position", new be(m, 3)), this.setAttribute("normal", new be(_, 3)), this.setAttribute("uv", new be(g, 2));
|
|
7446
7448
|
}
|
|
7447
7449
|
copy(t) {
|
|
7448
7450
|
return super.copy(t), this.parameters = Object.assign({}, t.parameters), this;
|
|
@@ -7462,18 +7464,18 @@ var Gf = class ch extends Ir {
|
|
|
7462
7464
|
}, n = Math.max(3, n), r = Math.max(1, r);
|
|
7463
7465
|
const o = [], l = [], c = [], h = [];
|
|
7464
7466
|
let d = t;
|
|
7465
|
-
const u = (i - t) / r, f = new C(),
|
|
7467
|
+
const u = (i - t) / r, f = new C(), m = new $();
|
|
7466
7468
|
for (let _ = 0; _ <= r; _++) {
|
|
7467
|
-
for (let
|
|
7468
|
-
const p = s +
|
|
7469
|
-
f.x = d * Math.cos(p), f.y = d * Math.sin(p), l.push(f.x, f.y, f.z), c.push(0, 0, 1),
|
|
7469
|
+
for (let g = 0; g <= n; g++) {
|
|
7470
|
+
const p = s + g / n * a;
|
|
7471
|
+
f.x = d * Math.cos(p), f.y = d * Math.sin(p), l.push(f.x, f.y, f.z), c.push(0, 0, 1), m.x = (f.x / i + 1) / 2, m.y = (f.y / i + 1) / 2, h.push(m.x, m.y);
|
|
7470
7472
|
}
|
|
7471
7473
|
d += u;
|
|
7472
7474
|
}
|
|
7473
7475
|
for (let _ = 0; _ < r; _++) {
|
|
7474
|
-
const
|
|
7476
|
+
const g = _ * (n + 1);
|
|
7475
7477
|
for (let p = 0; p < n; p++) {
|
|
7476
|
-
const S = p +
|
|
7478
|
+
const S = p + g, M = S, v = S + n + 1, E = S + n + 2, w = S + 1;
|
|
7477
7479
|
o.push(M, v, w), o.push(v, E, w);
|
|
7478
7480
|
}
|
|
7479
7481
|
}
|
|
@@ -7504,23 +7506,23 @@ var Gf = class ch extends Ir {
|
|
|
7504
7506
|
function c(h) {
|
|
7505
7507
|
const d = r.length / 3, u = h.extractPoints(i);
|
|
7506
7508
|
let f = u.shape;
|
|
7507
|
-
const
|
|
7509
|
+
const m = u.holes;
|
|
7508
7510
|
Di.isClockWise(f) === !1 && (f = f.reverse());
|
|
7509
|
-
for (let
|
|
7510
|
-
const S = g
|
|
7511
|
-
Di.isClockWise(S) === !0 && (g
|
|
7511
|
+
for (let g = 0, p = m.length; g < p; g++) {
|
|
7512
|
+
const S = m[g];
|
|
7513
|
+
Di.isClockWise(S) === !0 && (m[g] = S.reverse());
|
|
7512
7514
|
}
|
|
7513
|
-
const _ = Di.triangulateShape(f,
|
|
7514
|
-
for (let
|
|
7515
|
-
const S = g
|
|
7515
|
+
const _ = Di.triangulateShape(f, m);
|
|
7516
|
+
for (let g = 0, p = m.length; g < p; g++) {
|
|
7517
|
+
const S = m[g];
|
|
7516
7518
|
f = f.concat(S);
|
|
7517
7519
|
}
|
|
7518
|
-
for (let
|
|
7519
|
-
const S = f[
|
|
7520
|
+
for (let g = 0, p = f.length; g < p; g++) {
|
|
7521
|
+
const S = f[g];
|
|
7520
7522
|
r.push(S.x, S.y, 0), s.push(0, 0, 1), a.push(S.x, S.y);
|
|
7521
7523
|
}
|
|
7522
|
-
for (let
|
|
7523
|
-
const S = _[
|
|
7524
|
+
for (let g = 0, p = _.length; g < p; g++) {
|
|
7525
|
+
const S = _[g], M = S[0] + d, v = S[1] + d, E = S[2] + d;
|
|
7524
7526
|
n.push(M, v, E), l += 3;
|
|
7525
7527
|
}
|
|
7526
7528
|
}
|
|
@@ -7562,14 +7564,14 @@ var gh = class vh extends Ze {
|
|
|
7562
7564
|
}, i = Math.max(3, Math.floor(i)), n = Math.max(2, Math.floor(n));
|
|
7563
7565
|
const l = Math.min(a + o, Math.PI);
|
|
7564
7566
|
let c = 0;
|
|
7565
|
-
const h = [], d = new C(), u = new C(), f = [],
|
|
7567
|
+
const h = [], d = new C(), u = new C(), f = [], m = [], _ = [], g = [];
|
|
7566
7568
|
for (let p = 0; p <= n; p++) {
|
|
7567
7569
|
const S = [], M = p / n, v = a + M * o, E = t * Math.cos(v), w = Math.sqrt(t * t - E * E);
|
|
7568
7570
|
let R = 0;
|
|
7569
7571
|
p === 0 && a === 0 ? R = 0.5 / i : p === n && l === Math.PI && (R = -0.5 / i);
|
|
7570
7572
|
for (let y = 0; y <= i; y++) {
|
|
7571
7573
|
const T = y / i, U = r + T * s;
|
|
7572
|
-
d.x = -w * Math.cos(U), d.y = E, d.z = w * Math.sin(U),
|
|
7574
|
+
d.x = -w * Math.cos(U), d.y = E, d.z = w * Math.sin(U), m.push(d.x, d.y, d.z), u.copy(d).normalize(), _.push(u.x, u.y, u.z), g.push(T + R, 1 - M), S.push(c++);
|
|
7573
7575
|
}
|
|
7574
7576
|
h.push(S);
|
|
7575
7577
|
}
|
|
@@ -7577,7 +7579,7 @@ var gh = class vh extends Ze {
|
|
|
7577
7579
|
const M = h[p][S + 1], v = h[p][S], E = h[p + 1][S], w = h[p + 1][S + 1];
|
|
7578
7580
|
(p !== 0 || a > 0) && f.push(M, v, w), (p !== n - 1 || l < Math.PI) && f.push(v, E, w);
|
|
7579
7581
|
}
|
|
7580
|
-
this.setIndex(f), this.setAttribute("position", new be(
|
|
7582
|
+
this.setIndex(f), this.setAttribute("position", new be(m, 3)), this.setAttribute("normal", new be(_, 3)), this.setAttribute("uv", new be(g, 2));
|
|
7581
7583
|
}
|
|
7582
7584
|
copy(t) {
|
|
7583
7585
|
return super.copy(t), this.parameters = Object.assign({}, t.parameters), this;
|
|
@@ -7632,16 +7634,16 @@ var gh = class vh extends Ze {
|
|
|
7632
7634
|
thetaStart: a,
|
|
7633
7635
|
thetaLength: o
|
|
7634
7636
|
}, n = Math.floor(n), r = Math.floor(r);
|
|
7635
|
-
const l = [], c = [], h = [], d = [], u = new C(), f = new C(),
|
|
7637
|
+
const l = [], c = [], h = [], d = [], u = new C(), f = new C(), m = new C();
|
|
7636
7638
|
for (let _ = 0; _ <= n; _++) {
|
|
7637
|
-
const
|
|
7639
|
+
const g = a + _ / n * o;
|
|
7638
7640
|
for (let p = 0; p <= r; p++) {
|
|
7639
7641
|
const S = p / r * s;
|
|
7640
|
-
f.x = (t + i * Math.cos(
|
|
7642
|
+
f.x = (t + i * Math.cos(g)) * Math.cos(S), f.y = (t + i * Math.cos(g)) * Math.sin(S), f.z = i * Math.sin(g), c.push(f.x, f.y, f.z), u.x = t * Math.cos(S), u.y = t * Math.sin(S), m.subVectors(f, u).normalize(), h.push(m.x, m.y, m.z), d.push(p / r), d.push(_ / n);
|
|
7641
7643
|
}
|
|
7642
7644
|
}
|
|
7643
|
-
for (let _ = 1; _ <= n; _++) for (let
|
|
7644
|
-
const p = (r + 1) * _ +
|
|
7645
|
+
for (let _ = 1; _ <= n; _++) for (let g = 1; g <= r; g++) {
|
|
7646
|
+
const p = (r + 1) * _ + g - 1, S = (r + 1) * (_ - 1) + g - 1, M = (r + 1) * (_ - 1) + g, v = (r + 1) * _ + g;
|
|
7645
7647
|
l.push(p, S, v), l.push(S, M, v);
|
|
7646
7648
|
}
|
|
7647
7649
|
this.setIndex(l), this.setAttribute("position", new be(c, 3)), this.setAttribute("normal", new be(h, 3)), this.setAttribute("uv", new be(d, 2));
|
|
@@ -7662,10 +7664,10 @@ var gh = class vh extends Ze {
|
|
|
7662
7664
|
p: s,
|
|
7663
7665
|
q: a
|
|
7664
7666
|
}, n = Math.floor(n), r = Math.floor(r);
|
|
7665
|
-
const o = [], l = [], c = [], h = [], d = new C(), u = new C(), f = new C(),
|
|
7667
|
+
const o = [], l = [], c = [], h = [], d = new C(), u = new C(), f = new C(), m = new C(), _ = new C(), g = new C(), p = new C();
|
|
7666
7668
|
for (let M = 0; M <= n; ++M) {
|
|
7667
7669
|
const v = M / n * s * Math.PI * 2;
|
|
7668
|
-
S(v, s, a, t, f), S(v + 0.01, s, a, t,
|
|
7670
|
+
S(v, s, a, t, f), S(v + 0.01, s, a, t, m), g.subVectors(m, f), p.addVectors(m, f), _.crossVectors(g, p), p.crossVectors(_, g), _.normalize(), p.normalize();
|
|
7669
7671
|
for (let E = 0; E <= r; ++E) {
|
|
7670
7672
|
const w = E / r * Math.PI * 2, R = -i * Math.cos(w), y = i * Math.sin(w);
|
|
7671
7673
|
d.x = f.x + (R * p.x + y * _.x), d.y = f.y + (R * p.y + y * _.y), d.z = f.z + (R * p.z + y * _.z), l.push(d.x, d.y, d.z), u.subVectors(d, f).normalize(), c.push(u.x, u.y, u.z), h.push(M / n), h.push(E / r);
|
|
@@ -7700,13 +7702,13 @@ var gh = class vh extends Ze {
|
|
|
7700
7702
|
this.tangents = a.tangents, this.normals = a.normals, this.binormals = a.binormals;
|
|
7701
7703
|
const o = new C(), l = new C(), c = new $();
|
|
7702
7704
|
let h = new C();
|
|
7703
|
-
const d = [], u = [], f = [],
|
|
7704
|
-
_(), this.setIndex(
|
|
7705
|
+
const d = [], u = [], f = [], m = [];
|
|
7706
|
+
_(), this.setIndex(m), this.setAttribute("position", new be(d, 3)), this.setAttribute("normal", new be(u, 3)), this.setAttribute("uv", new be(f, 2));
|
|
7705
7707
|
function _() {
|
|
7706
|
-
for (let M = 0; M < i; M++)
|
|
7707
|
-
|
|
7708
|
+
for (let M = 0; M < i; M++) g(M);
|
|
7709
|
+
g(s === !1 ? i : 0), S(), p();
|
|
7708
7710
|
}
|
|
7709
|
-
function
|
|
7711
|
+
function g(M) {
|
|
7710
7712
|
h = t.getPointAt(M / i, h);
|
|
7711
7713
|
const v = a.normals[M], E = a.binormals[M];
|
|
7712
7714
|
for (let w = 0; w <= r; w++) {
|
|
@@ -7717,7 +7719,7 @@ var gh = class vh extends Ze {
|
|
|
7717
7719
|
function p() {
|
|
7718
7720
|
for (let M = 1; M <= i; M++) for (let v = 1; v <= r; v++) {
|
|
7719
7721
|
const E = (r + 1) * (M - 1) + (v - 1), w = (r + 1) * M + (v - 1), R = (r + 1) * M + v, y = (r + 1) * (M - 1) + v;
|
|
7720
|
-
|
|
7722
|
+
m.push(E, w, y), m.push(w, R, y);
|
|
7721
7723
|
}
|
|
7722
7724
|
}
|
|
7723
7725
|
function S() {
|
|
@@ -7749,9 +7751,9 @@ var gh = class vh extends Ze {
|
|
|
7749
7751
|
}]);
|
|
7750
7752
|
for (let l = 0, c = o.length; l < c; ++l) {
|
|
7751
7753
|
const h = o[l], d = h.start, u = h.count;
|
|
7752
|
-
for (let f = d,
|
|
7753
|
-
const
|
|
7754
|
-
n.fromBufferAttribute(s,
|
|
7754
|
+
for (let f = d, m = d + u; f < m; f += 3) for (let _ = 0; _ < 3; _++) {
|
|
7755
|
+
const g = a.getX(f + _), p = a.getX(f + (_ + 1) % 3);
|
|
7756
|
+
n.fromBufferAttribute(s, g), r.fromBufferAttribute(s, p), ml(n, r, i) === !0 && (t.push(n.x, n.y, n.z), t.push(r.x, r.y, r.z));
|
|
7755
7757
|
}
|
|
7756
7758
|
}
|
|
7757
7759
|
} else {
|
|
@@ -7809,12 +7811,14 @@ function Kn(e) {
|
|
|
7809
7811
|
t[i] = {};
|
|
7810
7812
|
for (const n in e[i]) {
|
|
7811
7813
|
const r = e[i][n];
|
|
7812
|
-
if (vl(r))
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7814
|
+
if (vl(r))
|
|
7815
|
+
r.isRenderTargetTexture ? (he("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."), t[i][n] = null) : t[i][n] = r.clone();
|
|
7816
|
+
else if (Array.isArray(r))
|
|
7817
|
+
if (vl(r[0])) {
|
|
7818
|
+
const s = [];
|
|
7819
|
+
for (let a = 0, o = r.length; a < o; a++) s[a] = r[a].clone();
|
|
7820
|
+
t[i][n] = s;
|
|
7821
|
+
} else t[i][n] = r.slice();
|
|
7818
7822
|
else t[i][n] = r;
|
|
7819
7823
|
}
|
|
7820
7824
|
}
|
|
@@ -8054,7 +8058,7 @@ var ep = {
|
|
|
8054
8058
|
return super.copy(e), this.scale = e.scale, this.dashSize = e.dashSize, this.gapSize = e.gapSize, this;
|
|
8055
8059
|
}
|
|
8056
8060
|
};
|
|
8057
|
-
function
|
|
8061
|
+
function on(e, t) {
|
|
8058
8062
|
return !e || e.constructor === t ? e : typeof t.BYTES_PER_ELEMENT == "number" ? new t(e) : Array.prototype.slice.call(e);
|
|
8059
8063
|
}
|
|
8060
8064
|
function wh(e) {
|
|
@@ -8096,13 +8100,13 @@ function hp(e, t, i, n, r = 30) {
|
|
|
8096
8100
|
for (let l = 0; l < s.tracks.length; ++l) {
|
|
8097
8101
|
const c = s.tracks[l], h = c.getValueSize(), d = [], u = [];
|
|
8098
8102
|
for (let f = 0; f < c.times.length; ++f) {
|
|
8099
|
-
const
|
|
8100
|
-
if (!(
|
|
8103
|
+
const m = c.times[f] * r;
|
|
8104
|
+
if (!(m < i || m >= n)) {
|
|
8101
8105
|
d.push(c.times[f]);
|
|
8102
8106
|
for (let _ = 0; _ < h; ++_) u.push(c.values[f * h + _]);
|
|
8103
8107
|
}
|
|
8104
8108
|
}
|
|
8105
|
-
d.length !== 0 && (c.times =
|
|
8109
|
+
d.length !== 0 && (c.times = on(d, c.times.constructor), c.values = on(u, c.values.constructor), a.push(c));
|
|
8106
8110
|
}
|
|
8107
8111
|
s.tracks = a;
|
|
8108
8112
|
let o = 1 / 0;
|
|
@@ -8126,21 +8130,21 @@ function up(e, t = 0, i = e, n = 30) {
|
|
|
8126
8130
|
let u = 0;
|
|
8127
8131
|
const f = c.getValueSize();
|
|
8128
8132
|
c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline && (u = f / 3);
|
|
8129
|
-
const
|
|
8133
|
+
const m = o.times.length - 1;
|
|
8130
8134
|
let _;
|
|
8131
8135
|
if (s <= o.times[0]) {
|
|
8132
8136
|
const p = h, S = d - h;
|
|
8133
8137
|
_ = o.values.slice(p, S);
|
|
8134
|
-
} else if (s >= o.times[
|
|
8135
|
-
const p =
|
|
8138
|
+
} else if (s >= o.times[m]) {
|
|
8139
|
+
const p = m * d + h, S = p + d - h;
|
|
8136
8140
|
_ = o.values.slice(p, S);
|
|
8137
8141
|
} else {
|
|
8138
8142
|
const p = o.createInterpolant(), S = h, M = d - h;
|
|
8139
8143
|
p.evaluate(s), _ = p.resultBuffer.slice(S, M);
|
|
8140
8144
|
}
|
|
8141
8145
|
l === "quaternion" && new Wt().fromArray(_).normalize().conjugate().toArray(_);
|
|
8142
|
-
const
|
|
8143
|
-
for (let p = 0; p <
|
|
8146
|
+
const g = c.times.length;
|
|
8147
|
+
for (let p = 0; p < g; ++p) {
|
|
8144
8148
|
const S = p * f + u;
|
|
8145
8149
|
if (l === "quaternion") Wt.multiplyQuaternionsFlat(c.values, S, _, 0, c.values, S);
|
|
8146
8150
|
else {
|
|
@@ -8153,7 +8157,7 @@ function up(e, t = 0, i = e, n = 30) {
|
|
|
8153
8157
|
}
|
|
8154
8158
|
var iy = class {
|
|
8155
8159
|
static convertArray(e, t) {
|
|
8156
|
-
return
|
|
8160
|
+
return on(e, t);
|
|
8157
8161
|
}
|
|
8158
8162
|
static isTypedArray(e) {
|
|
8159
8163
|
return Mc(e);
|
|
@@ -8239,15 +8243,15 @@ var iy = class {
|
|
|
8239
8243
|
}, dp = class extends Pr {
|
|
8240
8244
|
constructor(e, t, i, n) {
|
|
8241
8245
|
super(e, t, i, n), this._weightPrev = -0, this._offsetPrev = -0, this._weightNext = -0, this._offsetNext = -0, this.DefaultSettings_ = {
|
|
8242
|
-
endingStart:
|
|
8243
|
-
endingEnd:
|
|
8246
|
+
endingStart: kn,
|
|
8247
|
+
endingEnd: kn
|
|
8244
8248
|
};
|
|
8245
8249
|
}
|
|
8246
8250
|
intervalChanged_(e, t, i) {
|
|
8247
8251
|
const n = this.parameterPositions;
|
|
8248
8252
|
let r = e - 2, s = e + 1, a = n[r], o = n[s];
|
|
8249
8253
|
if (a === void 0) switch (this.getSettings_().endingStart) {
|
|
8250
|
-
case
|
|
8254
|
+
case Gn:
|
|
8251
8255
|
r = e, a = 2 * t - i;
|
|
8252
8256
|
break;
|
|
8253
8257
|
case Ls:
|
|
@@ -8257,7 +8261,7 @@ var iy = class {
|
|
|
8257
8261
|
r = e, a = i;
|
|
8258
8262
|
}
|
|
8259
8263
|
if (o === void 0) switch (this.getSettings_().endingEnd) {
|
|
8260
|
-
case
|
|
8264
|
+
case Gn:
|
|
8261
8265
|
s = e, o = 2 * i - t;
|
|
8262
8266
|
break;
|
|
8263
8267
|
case Ls:
|
|
@@ -8270,8 +8274,8 @@ var iy = class {
|
|
|
8270
8274
|
this._weightPrev = l / (t - a), this._weightNext = l / (o - i), this._offsetPrev = r * c, this._offsetNext = s * c;
|
|
8271
8275
|
}
|
|
8272
8276
|
interpolate_(e, t, i, n) {
|
|
8273
|
-
const r = this.resultBuffer, s = this.sampleValues, a = this.valueSize, o = e * a, l = o - a, c = this._offsetPrev, h = this._offsetNext, d = this._weightPrev, u = this._weightNext, f = (i - t) / (n - t),
|
|
8274
|
-
for (let v = 0; v !== a; ++v) r[v] =
|
|
8277
|
+
const r = this.resultBuffer, s = this.sampleValues, a = this.valueSize, o = e * a, l = o - a, c = this._offsetPrev, h = this._offsetNext, d = this._weightPrev, u = this._weightNext, f = (i - t) / (n - t), m = f * f, _ = m * f, g = -d * _ + 2 * d * m - d * f, p = (1 + d) * _ + (-1.5 - 2 * d) * m + (-0.5 + d) * f + 1, S = (-1 - u) * _ + (1.5 + u) * m + 0.5 * f, M = u * _ - u * m;
|
|
8278
|
+
for (let v = 0; v !== a; ++v) r[v] = g * s[c + v] + p * s[l + v] + S * s[o + v] + M * s[h + v];
|
|
8275
8279
|
return r;
|
|
8276
8280
|
}
|
|
8277
8281
|
}, Rh = class extends Pr {
|
|
@@ -8294,13 +8298,13 @@ var iy = class {
|
|
|
8294
8298
|
interpolate_(e, t, i, n) {
|
|
8295
8299
|
const r = this.resultBuffer, s = this.sampleValues, a = this.valueSize, o = e * a, l = o - a, c = this.inTangents, h = this.outTangents;
|
|
8296
8300
|
if (!c || !h) {
|
|
8297
|
-
const f = (i - t) / (n - t),
|
|
8298
|
-
for (let _ = 0; _ !== a; ++_) r[_] = s[l + _] *
|
|
8301
|
+
const f = (i - t) / (n - t), m = 1 - f;
|
|
8302
|
+
for (let _ = 0; _ !== a; ++_) r[_] = s[l + _] * m + s[o + _] * f;
|
|
8299
8303
|
return r;
|
|
8300
8304
|
}
|
|
8301
8305
|
const d = a * 2, u = e - 1;
|
|
8302
8306
|
for (let f = 0; f !== a; ++f) {
|
|
8303
|
-
const
|
|
8307
|
+
const m = s[l + f], _ = s[o + f], g = u * d + f * 2, p = h[g], S = h[g + 1], M = e * d + f * 2, v = c[M], E = c[M + 1];
|
|
8304
8308
|
let w = (i - t) / (n - t), R, y, T, U, I;
|
|
8305
8309
|
for (let F = 0; F < 8; F++) {
|
|
8306
8310
|
R = w * w, y = R * w, T = 1 - w, U = T * T, I = U * T;
|
|
@@ -8310,7 +8314,7 @@ var iy = class {
|
|
|
8310
8314
|
if (Math.abs(k) < 1e-10) break;
|
|
8311
8315
|
w = w - X / k, w = Math.max(0, Math.min(1, w));
|
|
8312
8316
|
}
|
|
8313
|
-
r[f] = I *
|
|
8317
|
+
r[f] = I * m + 3 * U * w * S + 3 * T * R * E + y * _;
|
|
8314
8318
|
}
|
|
8315
8319
|
return r;
|
|
8316
8320
|
}
|
|
@@ -8318,7 +8322,7 @@ var iy = class {
|
|
|
8318
8322
|
constructor(e, t, i, n) {
|
|
8319
8323
|
if (e === void 0) throw new Error("THREE.KeyframeTrack: track name is undefined");
|
|
8320
8324
|
if (t === void 0 || t.length === 0) throw new Error("THREE.KeyframeTrack: no keyframes in track named " + e);
|
|
8321
|
-
this.name = e, this.times =
|
|
8325
|
+
this.name = e, this.times = on(t, this.TimeBufferType), this.values = on(i, this.ValueBufferType), this.setInterpolation(n || this.DefaultInterpolation);
|
|
8322
8326
|
}
|
|
8323
8327
|
static toJSON(e) {
|
|
8324
8328
|
const t = e.constructor;
|
|
@@ -8327,8 +8331,8 @@ var iy = class {
|
|
|
8327
8331
|
else {
|
|
8328
8332
|
i = {
|
|
8329
8333
|
name: e.name,
|
|
8330
|
-
times:
|
|
8331
|
-
values:
|
|
8334
|
+
times: on(e.times, Array),
|
|
8335
|
+
values: on(e.values, Array)
|
|
8332
8336
|
};
|
|
8333
8337
|
const n = e.getInterpolation();
|
|
8334
8338
|
n !== e.DefaultInterpolation && (i.interpolation = n);
|
|
@@ -8362,12 +8366,12 @@ var iy = class {
|
|
|
8362
8366
|
break;
|
|
8363
8367
|
case Co:
|
|
8364
8368
|
t = this.InterpolantFactoryMethodBezier;
|
|
8365
|
-
break;
|
|
8366
8369
|
}
|
|
8367
8370
|
if (t === void 0) {
|
|
8368
8371
|
const i = "unsupported interpolation for " + this.ValueTypeName + " keyframe track named " + this.name;
|
|
8369
|
-
if (this.createInterpolant === void 0)
|
|
8370
|
-
|
|
8372
|
+
if (this.createInterpolant === void 0)
|
|
8373
|
+
if (e !== this.DefaultInterpolation) this.setInterpolation(this.DefaultInterpolation);
|
|
8374
|
+
else throw new Error(i);
|
|
8371
8375
|
return he("KeyframeTrack:", i), this;
|
|
8372
8376
|
}
|
|
8373
8377
|
return this.createInterpolant = t, this;
|
|
@@ -8448,18 +8452,19 @@ var iy = class {
|
|
|
8448
8452
|
for (let a = 1; a < r; ++a) {
|
|
8449
8453
|
let o = !1;
|
|
8450
8454
|
const l = e[a];
|
|
8451
|
-
if (l !== e[a + 1] && (a !== 1 || l !== e[0]))
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8455
|
+
if (l !== e[a + 1] && (a !== 1 || l !== e[0]))
|
|
8456
|
+
if (n)
|
|
8457
|
+
o = !0;
|
|
8458
|
+
else {
|
|
8459
|
+
const c = a * i, h = c - i, d = c + i;
|
|
8460
|
+
for (let u = 0; u !== i; ++u) {
|
|
8461
|
+
const f = t[c + u];
|
|
8462
|
+
if (f !== t[h + u] || f !== t[d + u]) {
|
|
8463
|
+
o = !0;
|
|
8464
|
+
break;
|
|
8465
|
+
}
|
|
8460
8466
|
}
|
|
8461
8467
|
}
|
|
8462
|
-
}
|
|
8463
8468
|
if (o) {
|
|
8464
8469
|
if (a !== s) {
|
|
8465
8470
|
e[s] = e[a];
|
|
@@ -8795,27 +8800,27 @@ var Mi = {}, yp = class extends Error {
|
|
|
8795
8800
|
if (l.status === 200 || l.status === 0) {
|
|
8796
8801
|
if (l.status === 0 && he("FileLoader: HTTP Status 0 received."), typeof ReadableStream > "u" || l.body === void 0 || l.body.getReader === void 0) return l;
|
|
8797
8802
|
const c = Mi[e], h = l.body.getReader(), d = l.headers.get("X-File-Size") || l.headers.get("Content-Length"), u = d ? parseInt(d) : 0, f = u !== 0;
|
|
8798
|
-
let
|
|
8799
|
-
const _ = new ReadableStream({ start(
|
|
8803
|
+
let m = 0;
|
|
8804
|
+
const _ = new ReadableStream({ start(g) {
|
|
8800
8805
|
p();
|
|
8801
8806
|
function p() {
|
|
8802
8807
|
h.read().then(({ done: S, value: M }) => {
|
|
8803
|
-
if (S)
|
|
8808
|
+
if (S) g.close();
|
|
8804
8809
|
else {
|
|
8805
|
-
|
|
8810
|
+
m += M.byteLength;
|
|
8806
8811
|
const v = new ProgressEvent("progress", {
|
|
8807
8812
|
lengthComputable: f,
|
|
8808
|
-
loaded:
|
|
8813
|
+
loaded: m,
|
|
8809
8814
|
total: u
|
|
8810
8815
|
});
|
|
8811
8816
|
for (let E = 0, w = c.length; E < w; E++) {
|
|
8812
8817
|
const R = c[E];
|
|
8813
8818
|
R.onProgress && R.onProgress(v);
|
|
8814
8819
|
}
|
|
8815
|
-
|
|
8820
|
+
g.enqueue(M), p();
|
|
8816
8821
|
}
|
|
8817
8822
|
}, (S) => {
|
|
8818
|
-
|
|
8823
|
+
g.error(S);
|
|
8819
8824
|
});
|
|
8820
8825
|
}
|
|
8821
8826
|
} });
|
|
@@ -8917,8 +8922,8 @@ var Mi = {}, yp = class extends Error {
|
|
|
8917
8922
|
const u = d.mipmaps.length / d.mipmapCount;
|
|
8918
8923
|
for (let f = 0; f < u; f++) {
|
|
8919
8924
|
s[f] = { mipmaps: [] };
|
|
8920
|
-
for (let
|
|
8921
|
-
s[f].mipmaps.push(d.mipmaps[f * d.mipmapCount +
|
|
8925
|
+
for (let m = 0; m < d.mipmapCount; m++)
|
|
8926
|
+
s[f].mipmaps.push(d.mipmaps[f * d.mipmapCount + m]), s[f].format = d.format, s[f].width = d.width, s[f].height = d.height;
|
|
8922
8927
|
}
|
|
8923
8928
|
a.image = s;
|
|
8924
8929
|
} else
|
|
@@ -8927,7 +8932,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
8927
8932
|
}, i, n);
|
|
8928
8933
|
return a;
|
|
8929
8934
|
}
|
|
8930
|
-
},
|
|
8935
|
+
}, Un = /* @__PURE__ */ new WeakMap(), Gs = class extends Kt {
|
|
8931
8936
|
constructor(e) {
|
|
8932
8937
|
super(e);
|
|
8933
8938
|
}
|
|
@@ -8940,8 +8945,8 @@ var Mi = {}, yp = class extends Error {
|
|
|
8940
8945
|
t && t(s), r.manager.itemEnd(e);
|
|
8941
8946
|
}, 0);
|
|
8942
8947
|
else {
|
|
8943
|
-
let h =
|
|
8944
|
-
h === void 0 && (h = [],
|
|
8948
|
+
let h = Un.get(s);
|
|
8949
|
+
h === void 0 && (h = [], Un.set(s, h)), h.push({
|
|
8945
8950
|
onLoad: t,
|
|
8946
8951
|
onError: n
|
|
8947
8952
|
});
|
|
@@ -8951,21 +8956,21 @@ var Mi = {}, yp = class extends Error {
|
|
|
8951
8956
|
const a = br("img");
|
|
8952
8957
|
function o() {
|
|
8953
8958
|
c(), t && t(this);
|
|
8954
|
-
const h =
|
|
8959
|
+
const h = Un.get(this) || [];
|
|
8955
8960
|
for (let d = 0; d < h.length; d++) {
|
|
8956
8961
|
const u = h[d];
|
|
8957
8962
|
u.onLoad && u.onLoad(this);
|
|
8958
8963
|
}
|
|
8959
|
-
|
|
8964
|
+
Un.delete(this), r.manager.itemEnd(e);
|
|
8960
8965
|
}
|
|
8961
8966
|
function l(h) {
|
|
8962
8967
|
c(), n && n(h), bi.remove(`image:${e}`);
|
|
8963
|
-
const d =
|
|
8968
|
+
const d = Un.get(this) || [];
|
|
8964
8969
|
for (let u = 0; u < d.length; u++) {
|
|
8965
8970
|
const f = d[u];
|
|
8966
8971
|
f.onError && f.onError(h);
|
|
8967
8972
|
}
|
|
8968
|
-
|
|
8973
|
+
Un.delete(this), r.manager.itemError(e), r.manager.itemEnd(e);
|
|
8969
8974
|
}
|
|
8970
8975
|
function c() {
|
|
8971
8976
|
a.removeEventListener("load", o, !1), a.removeEventListener("error", l, !1);
|
|
@@ -9024,7 +9029,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9024
9029
|
r.image = a, r.needsUpdate = !0, t !== void 0 && t(r);
|
|
9025
9030
|
}, i, n), r;
|
|
9026
9031
|
}
|
|
9027
|
-
},
|
|
9032
|
+
}, mn = class extends lt {
|
|
9028
9033
|
constructor(e, t = 1) {
|
|
9029
9034
|
super(), this.isLight = !0, this.type = "Light", this.color = new xe(e), this.intensity = t;
|
|
9030
9035
|
}
|
|
@@ -9038,7 +9043,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9038
9043
|
const t = super.toJSON(e);
|
|
9039
9044
|
return t.object.color = this.color.getHex(), t.object.intensity = this.intensity, t;
|
|
9040
9045
|
}
|
|
9041
|
-
}, xp = class extends
|
|
9046
|
+
}, xp = class extends mn {
|
|
9042
9047
|
constructor(e, t, i) {
|
|
9043
9048
|
super(e, i), this.isHemisphereLight = !0, this.type = "HemisphereLight", this.position.copy(lt.DEFAULT_UP), this.updateMatrix(), this.groundColor = new xe(t);
|
|
9044
9049
|
}
|
|
@@ -9084,7 +9089,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9084
9089
|
}
|
|
9085
9090
|
}, ps = /* @__PURE__ */ new C(), ms = /* @__PURE__ */ new Wt(), hi = /* @__PURE__ */ new C(), vo = class extends lt {
|
|
9086
9091
|
constructor() {
|
|
9087
|
-
super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new He(), this.projectionMatrix = new He(), this.projectionMatrixInverse = new He(), this.coordinateSystem =
|
|
9092
|
+
super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new He(), this.projectionMatrix = new He(), this.projectionMatrixInverse = new He(), this.coordinateSystem = un, this._reversedDepth = !1;
|
|
9088
9093
|
}
|
|
9089
9094
|
get reversedDepth() {
|
|
9090
9095
|
return this._reversedDepth;
|
|
@@ -9116,11 +9121,11 @@ var Mi = {}, yp = class extends Error {
|
|
|
9116
9121
|
this.fov = qn * 2 * Math.atan(t), this.updateProjectionMatrix();
|
|
9117
9122
|
}
|
|
9118
9123
|
getFocalLength() {
|
|
9119
|
-
const e = Math.tan(
|
|
9124
|
+
const e = Math.tan(cn * 0.5 * this.fov);
|
|
9120
9125
|
return 0.5 * this.getFilmHeight() / e;
|
|
9121
9126
|
}
|
|
9122
9127
|
getEffectiveFOV() {
|
|
9123
|
-
return qn * 2 * Math.atan(Math.tan(
|
|
9128
|
+
return qn * 2 * Math.atan(Math.tan(cn * 0.5 * this.fov) / this.zoom);
|
|
9124
9129
|
}
|
|
9125
9130
|
getFilmWidth() {
|
|
9126
9131
|
return this.filmGauge * Math.min(this.aspect, 1);
|
|
@@ -9150,7 +9155,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9150
9155
|
}
|
|
9151
9156
|
updateProjectionMatrix() {
|
|
9152
9157
|
const e = this.near;
|
|
9153
|
-
let t = e * Math.tan(
|
|
9158
|
+
let t = e * Math.tan(cn * 0.5 * this.fov) / this.zoom, i = 2 * t, n = this.aspect * i, r = -0.5 * n;
|
|
9154
9159
|
const s = this.view;
|
|
9155
9160
|
if (this.view !== null && this.view.enabled) {
|
|
9156
9161
|
const o = s.fullWidth, l = s.fullHeight;
|
|
@@ -9174,7 +9179,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9174
9179
|
copy(e) {
|
|
9175
9180
|
return super.copy(e), this.focus = e.focus, this;
|
|
9176
9181
|
}
|
|
9177
|
-
}, Sp = class extends
|
|
9182
|
+
}, Sp = class extends mn {
|
|
9178
9183
|
constructor(e, t, i = 0, n = Math.PI / 3, r = 0, s = 2) {
|
|
9179
9184
|
super(e, t), this.isSpotLight = !0, this.type = "SpotLight", this.position.copy(lt.DEFAULT_UP), this.updateMatrix(), this.target = new lt(), this.distance = i, this.angle = n, this.penumbra = r, this.decay = s, this.map = null, this.shadow = new Mp();
|
|
9180
9185
|
}
|
|
@@ -9198,7 +9203,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9198
9203
|
constructor() {
|
|
9199
9204
|
super(new Nt(90, 1, 0.5, 500)), this.isPointLightShadow = !0;
|
|
9200
9205
|
}
|
|
9201
|
-
}, Tp = class extends
|
|
9206
|
+
}, Tp = class extends mn {
|
|
9202
9207
|
constructor(e, t, i = 0, n = 2) {
|
|
9203
9208
|
super(e, t), this.isPointLight = !0, this.type = "PointLight", this.distance = i, this.decay = n, this.shadow = new bp();
|
|
9204
9209
|
}
|
|
@@ -9256,7 +9261,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9256
9261
|
constructor() {
|
|
9257
9262
|
super(new qs(-5, 5, 5, -5, 0.5, 500)), this.isDirectionalLightShadow = !0;
|
|
9258
9263
|
}
|
|
9259
|
-
}, Ep = class extends
|
|
9264
|
+
}, Ep = class extends mn {
|
|
9260
9265
|
constructor(e, t) {
|
|
9261
9266
|
super(e, t), this.isDirectionalLight = !0, this.type = "DirectionalLight", this.position.copy(lt.DEFAULT_UP), this.updateMatrix(), this.target = new lt(), this.shadow = new Ap();
|
|
9262
9267
|
}
|
|
@@ -9270,11 +9275,11 @@ var Mi = {}, yp = class extends Error {
|
|
|
9270
9275
|
const t = super.toJSON(e);
|
|
9271
9276
|
return t.object.shadow = this.shadow.toJSON(), t.object.target = this.target.uuid, t;
|
|
9272
9277
|
}
|
|
9273
|
-
}, wp = class extends
|
|
9278
|
+
}, wp = class extends mn {
|
|
9274
9279
|
constructor(e, t) {
|
|
9275
9280
|
super(e, t), this.isAmbientLight = !0, this.type = "AmbientLight";
|
|
9276
9281
|
}
|
|
9277
|
-
}, Cp = class extends
|
|
9282
|
+
}, Cp = class extends mn {
|
|
9278
9283
|
constructor(e, t, i = 10, n = 10) {
|
|
9279
9284
|
super(e, t), this.isRectAreaLight = !0, this.type = "RectAreaLight", this.width = i, this.height = n;
|
|
9280
9285
|
}
|
|
@@ -9310,7 +9315,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9310
9315
|
}
|
|
9311
9316
|
getIrradianceAt(e, t) {
|
|
9312
9317
|
const i = e.x, n = e.y, r = e.z, s = this.coefficients;
|
|
9313
|
-
return t.copy(s[0]).multiplyScalar(0.886227), t.addScaledVector(s[1],
|
|
9318
|
+
return t.copy(s[0]).multiplyScalar(0.886227), t.addScaledVector(s[1], 1.023328 * n), t.addScaledVector(s[2], 1.023328 * r), t.addScaledVector(s[3], 1.023328 * i), t.addScaledVector(s[4], 0.858086 * i * n), t.addScaledVector(s[5], 0.858086 * n * r), t.addScaledVector(s[6], 0.743125 * r * r - 0.247708), t.addScaledVector(s[7], 0.858086 * i * r), t.addScaledVector(s[8], 0.429043 * (i * i - n * n)), t;
|
|
9314
9319
|
}
|
|
9315
9320
|
add(e) {
|
|
9316
9321
|
for (let t = 0; t < 9; t++) this.coefficients[t].add(e.coefficients[t]);
|
|
@@ -9352,7 +9357,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9352
9357
|
const i = e.x, n = e.y, r = e.z;
|
|
9353
9358
|
t[0] = 0.282095, t[1] = 0.488603 * n, t[2] = 0.488603 * r, t[3] = 0.488603 * i, t[4] = 1.092548 * i * n, t[5] = 1.092548 * n * r, t[6] = 0.315392 * (3 * r * r - 1), t[7] = 1.092548 * i * r, t[8] = 0.546274 * (i * i - n * n);
|
|
9354
9359
|
}
|
|
9355
|
-
}, Rp = class extends
|
|
9360
|
+
}, Rp = class extends mn {
|
|
9356
9361
|
constructor(e = new Uh(), t = 1) {
|
|
9357
9362
|
super(void 0, t), this.isLightProbe = !0, this.sh = e;
|
|
9358
9363
|
}
|
|
@@ -9402,7 +9407,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9402
9407
|
MeshLambertMaterial: op,
|
|
9403
9408
|
MeshDepthMaterial: Ah,
|
|
9404
9409
|
MeshDistanceMaterial: Eh,
|
|
9405
|
-
MeshBasicMaterial:
|
|
9410
|
+
MeshBasicMaterial: pn,
|
|
9406
9411
|
MeshMatcapMaterial: lp,
|
|
9407
9412
|
LineDashedMaterial: cp,
|
|
9408
9413
|
LineBasicMaterial: Xt,
|
|
@@ -9410,7 +9415,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9410
9415
|
...bl
|
|
9411
9416
|
}[t];
|
|
9412
9417
|
let n;
|
|
9413
|
-
return i === void 0 ? (
|
|
9418
|
+
return i === void 0 ? (ln(`MaterialLoader: Unknown material type "${t}". Use .registerMaterial() before starting the deserialization process.`), n = new Ot()) : n = new i(), n;
|
|
9414
9419
|
}
|
|
9415
9420
|
static registerMaterial(t, i) {
|
|
9416
9421
|
bl[t] = i;
|
|
@@ -9452,17 +9457,17 @@ var Mi = {}, yp = class extends Error {
|
|
|
9452
9457
|
const t = {}, i = {};
|
|
9453
9458
|
function n(d, u) {
|
|
9454
9459
|
if (t[u] !== void 0) return t[u];
|
|
9455
|
-
const f = d.interleavedBuffers[u],
|
|
9456
|
-
return
|
|
9460
|
+
const f = d.interleavedBuffers[u], m = r(d, f.buffer), _ = Hn(f.type, m), g = new lo(_, f.stride);
|
|
9461
|
+
return g.uuid = f.uuid, t[u] = g, g;
|
|
9457
9462
|
}
|
|
9458
9463
|
function r(d, u) {
|
|
9459
9464
|
if (i[u] !== void 0) return i[u];
|
|
9460
|
-
const f = d.arrayBuffers[u],
|
|
9461
|
-
return i[u] =
|
|
9465
|
+
const f = d.arrayBuffers[u], m = new Uint32Array(f).buffer;
|
|
9466
|
+
return i[u] = m, m;
|
|
9462
9467
|
}
|
|
9463
9468
|
const s = e.isInstancedBufferGeometry ? new Pp() : new Ze(), a = e.data.index;
|
|
9464
9469
|
if (a !== void 0) {
|
|
9465
|
-
const d =
|
|
9470
|
+
const d = Hn(a.type, a.array);
|
|
9466
9471
|
s.setIndex(new ht(d, 1));
|
|
9467
9472
|
}
|
|
9468
9473
|
const o = e.data.attributes;
|
|
@@ -9470,28 +9475,28 @@ var Mi = {}, yp = class extends Error {
|
|
|
9470
9475
|
const u = o[d];
|
|
9471
9476
|
let f;
|
|
9472
9477
|
if (u.isInterleavedBufferAttribute) {
|
|
9473
|
-
const
|
|
9474
|
-
f = new Os(
|
|
9478
|
+
const m = n(e.data, u.data);
|
|
9479
|
+
f = new Os(m, u.itemSize, u.offset, u.normalized);
|
|
9475
9480
|
} else {
|
|
9476
|
-
const
|
|
9477
|
-
f = new (u.isInstancedBufferAttribute ? Tr : ht)(
|
|
9481
|
+
const m = Hn(u.type, u.array);
|
|
9482
|
+
f = new (u.isInstancedBufferAttribute ? Tr : ht)(m, u.itemSize, u.normalized);
|
|
9478
9483
|
}
|
|
9479
9484
|
u.name !== void 0 && (f.name = u.name), u.usage !== void 0 && f.setUsage(u.usage), s.setAttribute(d, f);
|
|
9480
9485
|
}
|
|
9481
9486
|
const l = e.data.morphAttributes;
|
|
9482
9487
|
if (l) for (const d in l) {
|
|
9483
9488
|
const u = l[d], f = [];
|
|
9484
|
-
for (let
|
|
9485
|
-
const
|
|
9489
|
+
for (let m = 0, _ = u.length; m < _; m++) {
|
|
9490
|
+
const g = u[m];
|
|
9486
9491
|
let p;
|
|
9487
|
-
if (
|
|
9488
|
-
const S = n(e.data,
|
|
9489
|
-
p = new Os(S,
|
|
9492
|
+
if (g.isInterleavedBufferAttribute) {
|
|
9493
|
+
const S = n(e.data, g.data);
|
|
9494
|
+
p = new Os(S, g.itemSize, g.offset, g.normalized);
|
|
9490
9495
|
} else {
|
|
9491
|
-
const S =
|
|
9492
|
-
p = new ht(S,
|
|
9496
|
+
const S = Hn(g.type, g.array);
|
|
9497
|
+
p = new ht(S, g.itemSize, g.normalized);
|
|
9493
9498
|
}
|
|
9494
|
-
|
|
9499
|
+
g.name !== void 0 && (p.name = g.name), f.push(p);
|
|
9495
9500
|
}
|
|
9496
9501
|
s.morphAttributes[d] = f;
|
|
9497
9502
|
}
|
|
@@ -9638,7 +9643,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9638
9643
|
const l = o;
|
|
9639
9644
|
return s(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(l) ? l : i.resourcePath + l);
|
|
9640
9645
|
} else return o.data ? {
|
|
9641
|
-
data:
|
|
9646
|
+
data: Hn(o.type, o.data),
|
|
9642
9647
|
width: o.width,
|
|
9643
9648
|
height: o.height
|
|
9644
9649
|
} : null;
|
|
@@ -9650,14 +9655,14 @@ var Mi = {}, yp = class extends Error {
|
|
|
9650
9655
|
const h = e[l], d = h.url;
|
|
9651
9656
|
if (Array.isArray(d)) {
|
|
9652
9657
|
const u = [];
|
|
9653
|
-
for (let f = 0,
|
|
9654
|
-
const _ = d[f],
|
|
9655
|
-
|
|
9658
|
+
for (let f = 0, m = d.length; f < m; f++) {
|
|
9659
|
+
const _ = d[f], g = a(_);
|
|
9660
|
+
g !== null && (g instanceof HTMLImageElement ? u.push(g) : u.push(new si(g.data, g.width, g.height)));
|
|
9656
9661
|
}
|
|
9657
|
-
n[h.uuid] = new
|
|
9662
|
+
n[h.uuid] = new an(u);
|
|
9658
9663
|
} else {
|
|
9659
9664
|
const u = a(h.url);
|
|
9660
|
-
n[h.uuid] = new
|
|
9665
|
+
n[h.uuid] = new an(u);
|
|
9661
9666
|
}
|
|
9662
9667
|
}
|
|
9663
9668
|
}
|
|
@@ -9671,7 +9676,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9671
9676
|
const a = s, o = /^(\/\/)|([a-z]+:(\/\/)?)/i.test(a) ? a : t.resourcePath + a;
|
|
9672
9677
|
return await n.loadAsync(o);
|
|
9673
9678
|
} else return s.data ? {
|
|
9674
|
-
data:
|
|
9679
|
+
data: Hn(s.type, s.data),
|
|
9675
9680
|
width: s.width,
|
|
9676
9681
|
height: s.height
|
|
9677
9682
|
} : null;
|
|
@@ -9686,10 +9691,10 @@ var Mi = {}, yp = class extends Error {
|
|
|
9686
9691
|
const u = l[h], f = await r(u);
|
|
9687
9692
|
f !== null && (f instanceof HTMLImageElement ? c.push(f) : c.push(new si(f.data, f.width, f.height)));
|
|
9688
9693
|
}
|
|
9689
|
-
i[o.uuid] = new
|
|
9694
|
+
i[o.uuid] = new an(c);
|
|
9690
9695
|
} else {
|
|
9691
9696
|
const c = await r(o.url);
|
|
9692
|
-
i[o.uuid] = new
|
|
9697
|
+
i[o.uuid] = new an(c);
|
|
9693
9698
|
}
|
|
9694
9699
|
}
|
|
9695
9700
|
}
|
|
@@ -9718,7 +9723,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9718
9723
|
if (d !== void 0) {
|
|
9719
9724
|
if (Array.isArray(d)) {
|
|
9720
9725
|
const u = [];
|
|
9721
|
-
for (let f = 0,
|
|
9726
|
+
for (let f = 0, m = d.length; f < m; f++) {
|
|
9722
9727
|
const _ = d[f];
|
|
9723
9728
|
i[_] === void 0 && he("ObjectLoader: Undefined material", _), u.push(i[_]);
|
|
9724
9729
|
}
|
|
@@ -9771,15 +9776,15 @@ var Mi = {}, yp = class extends Error {
|
|
|
9771
9776
|
break;
|
|
9772
9777
|
case "InstancedMesh":
|
|
9773
9778
|
c = a(e.geometry), h = o(e.material);
|
|
9774
|
-
const u = e.count, f = e.instanceMatrix,
|
|
9775
|
-
s = new Vd(c, h, u), s.instanceMatrix = new Tr(new Float32Array(f.array), 16),
|
|
9779
|
+
const u = e.count, f = e.instanceMatrix, m = e.instanceColor;
|
|
9780
|
+
s = new Vd(c, h, u), s.instanceMatrix = new Tr(new Float32Array(f.array), 16), m !== void 0 && (s.instanceColor = new Tr(new Float32Array(m.array), m.itemSize));
|
|
9776
9781
|
break;
|
|
9777
9782
|
case "BatchedMesh":
|
|
9778
9783
|
c = a(e.geometry), h = o(e.material), s = new jd(e.maxInstanceCount, e.maxVertexCount, e.maxIndexCount, h), s.geometry = c, s.perObjectFrustumCulled = e.perObjectFrustumCulled, s.sortObjects = e.sortObjects, s._drawRanges = e.drawRanges, s._reservedRanges = e.reservedRanges, s._geometryInfo = e.geometryInfo.map((_) => {
|
|
9779
|
-
let
|
|
9780
|
-
return _.boundingBox !== void 0 && (
|
|
9784
|
+
let g = null, p = null;
|
|
9785
|
+
return _.boundingBox !== void 0 && (g = new kt().fromJSON(_.boundingBox)), _.boundingSphere !== void 0 && (p = new Dt().fromJSON(_.boundingSphere)), {
|
|
9781
9786
|
..._,
|
|
9782
|
-
boundingBox:
|
|
9787
|
+
boundingBox: g,
|
|
9783
9788
|
boundingSphere: p
|
|
9784
9789
|
};
|
|
9785
9790
|
}), s._instanceInfo = e.instanceInfo, s._availableInstanceIds = e._availableInstanceIds, s._availableGeometryIds = e._availableGeometryIds, s._nextIndexStart = e.nextIndexStart, s._nextVertexStart = e.nextVertexStart, s._geometryCount = e.geometryCount, s._maxInstanceCount = e.maxInstanceCount, s._maxVertexCount = e.maxVertexCount, s._maxIndexCount = e.maxIndexCount, s._geometryInitialized = e.geometryInitialized, s._matricesTexture = l(e.matricesTexture.uuid), s._indirectTexture = l(e.indirectTexture.uuid), e.colorsTexture !== void 0 && (s._colorsTexture = l(e.colorsTexture.uuid)), e.boundingSphere !== void 0 && (s.boundingSphere = new Dt().fromJSON(e.boundingSphere)), e.boundingBox !== void 0 && (s.boundingBox = new kt().fromJSON(e.boundingBox));
|
|
@@ -9788,7 +9793,7 @@ var Mi = {}, yp = class extends Error {
|
|
|
9788
9793
|
s = new Ud();
|
|
9789
9794
|
break;
|
|
9790
9795
|
case "Line":
|
|
9791
|
-
s = new
|
|
9796
|
+
s = new dn(a(e.geometry), o(e.material));
|
|
9792
9797
|
break;
|
|
9793
9798
|
case "LineLoop":
|
|
9794
9799
|
s = new ef(a(e.geometry), o(e.material));
|
|
@@ -9827,8 +9832,8 @@ var Mi = {}, yp = class extends Error {
|
|
|
9827
9832
|
e.autoUpdate !== void 0 && (s.autoUpdate = e.autoUpdate);
|
|
9828
9833
|
const d = e.levels;
|
|
9829
9834
|
for (let u = 0; u < d.length; u++) {
|
|
9830
|
-
const f = d[u],
|
|
9831
|
-
|
|
9835
|
+
const f = d[u], m = s.getObjectByProperty("uuid", f.object);
|
|
9836
|
+
m !== void 0 && s.addLevel(m, f.distance, f.hysteresis);
|
|
9832
9837
|
}
|
|
9833
9838
|
}
|
|
9834
9839
|
return s;
|
|
@@ -9950,26 +9955,26 @@ var Mi = {}, yp = class extends Error {
|
|
|
9950
9955
|
const t = this._cache;
|
|
9951
9956
|
if (t.focus !== e.focus || t.fov !== e.fov || t.aspect !== e.aspect * this.aspect || t.near !== e.near || t.far !== e.far || t.zoom !== e.zoom || t.eyeSep !== this.eyeSep) {
|
|
9952
9957
|
t.focus = e.focus, t.fov = e.fov, t.aspect = e.aspect * this.aspect, t.near = e.near, t.far = e.far, t.zoom = e.zoom, t.eyeSep = this.eyeSep, $i.copy(e.projectionMatrix);
|
|
9953
|
-
const i = t.eyeSep / 2, n = i * t.near / t.focus, r = t.near * Math.tan(
|
|
9958
|
+
const i = t.eyeSep / 2, n = i * t.near / t.focus, r = t.near * Math.tan(cn * t.fov * 0.5) / t.zoom;
|
|
9954
9959
|
let s, a;
|
|
9955
9960
|
Cl.elements[12] = -i, wl.elements[12] = i, s = -r * t.aspect + n, a = r * t.aspect + n, $i.elements[0] = 2 * t.near / (a - s), $i.elements[8] = (a + s) / (a - s), this.cameraL.projectionMatrix.copy($i), s = -r * t.aspect - n, a = r * t.aspect - n, $i.elements[0] = 2 * t.near / (a - s), $i.elements[8] = (a + s) / (a - s), this.cameraR.projectionMatrix.copy($i);
|
|
9956
9961
|
}
|
|
9957
9962
|
this.cameraL.matrix.copy(e.matrixWorld).multiply(Cl), this.cameraL.matrixWorldNeedsUpdate = !0, this.cameraR.matrix.copy(e.matrixWorld).multiply(wl), this.cameraR.matrixWorldNeedsUpdate = !0;
|
|
9958
9963
|
}
|
|
9959
|
-
},
|
|
9964
|
+
}, Nn = -90, Dn = 1, Np = class extends lt {
|
|
9960
9965
|
constructor(e, t, i) {
|
|
9961
9966
|
super(), this.type = "CubeCamera", this.renderTarget = i, this.coordinateSystem = null, this.activeMipmapLevel = 0;
|
|
9962
|
-
const n = new Nt(
|
|
9967
|
+
const n = new Nt(Nn, Dn, e, t);
|
|
9963
9968
|
n.layers = this.layers, this.add(n);
|
|
9964
|
-
const r = new Nt(
|
|
9969
|
+
const r = new Nt(Nn, Dn, e, t);
|
|
9965
9970
|
r.layers = this.layers, this.add(r);
|
|
9966
|
-
const s = new Nt(
|
|
9971
|
+
const s = new Nt(Nn, Dn, e, t);
|
|
9967
9972
|
s.layers = this.layers, this.add(s);
|
|
9968
|
-
const a = new Nt(
|
|
9973
|
+
const a = new Nt(Nn, Dn, e, t);
|
|
9969
9974
|
a.layers = this.layers, this.add(a);
|
|
9970
|
-
const o = new Nt(
|
|
9975
|
+
const o = new Nt(Nn, Dn, e, t);
|
|
9971
9976
|
o.layers = this.layers, this.add(o);
|
|
9972
|
-
const l = new Nt(
|
|
9977
|
+
const l = new Nt(Nn, Dn, e, t);
|
|
9973
9978
|
l.layers = this.layers, this.add(l);
|
|
9974
9979
|
}
|
|
9975
9980
|
updateCoordinateSystem() {
|
|
@@ -9989,10 +9994,10 @@ var Mi = {}, yp = class extends Error {
|
|
|
9989
9994
|
this.coordinateSystem !== e.coordinateSystem && (this.coordinateSystem = e.coordinateSystem, this.updateCoordinateSystem());
|
|
9990
9995
|
const [r, s, a, o, l, c] = this.children, h = e.getRenderTarget(), d = e.getActiveCubeFace(), u = e.getActiveMipmapLevel(), f = e.xr.enabled;
|
|
9991
9996
|
e.xr.enabled = !1;
|
|
9992
|
-
const
|
|
9997
|
+
const m = i.texture.generateMipmaps;
|
|
9993
9998
|
i.texture.generateMipmaps = !1;
|
|
9994
9999
|
let _ = !1;
|
|
9995
|
-
e.isWebGLRenderer === !0 ? _ = e.state.buffers.depth.getReversed() : _ = e.reversedDepthBuffer, e.setRenderTarget(i, 0, n), _ && e.autoClear === !1 && e.clearDepth(), e.render(t, r), e.setRenderTarget(i, 1, n), _ && e.autoClear === !1 && e.clearDepth(), e.render(t, s), e.setRenderTarget(i, 2, n), _ && e.autoClear === !1 && e.clearDepth(), e.render(t, a), e.setRenderTarget(i, 3, n), _ && e.autoClear === !1 && e.clearDepth(), e.render(t, o), e.setRenderTarget(i, 4, n), _ && e.autoClear === !1 && e.clearDepth(), e.render(t, l), i.texture.generateMipmaps =
|
|
10000
|
+
e.isWebGLRenderer === !0 ? _ = e.state.buffers.depth.getReversed() : _ = e.reversedDepthBuffer, e.setRenderTarget(i, 0, n), _ && e.autoClear === !1 && e.clearDepth(), e.render(t, r), e.setRenderTarget(i, 1, n), _ && e.autoClear === !1 && e.clearDepth(), e.render(t, s), e.setRenderTarget(i, 2, n), _ && e.autoClear === !1 && e.clearDepth(), e.render(t, a), e.setRenderTarget(i, 3, n), _ && e.autoClear === !1 && e.clearDepth(), e.render(t, o), e.setRenderTarget(i, 4, n), _ && e.autoClear === !1 && e.clearDepth(), e.render(t, l), i.texture.generateMipmaps = m, e.setRenderTarget(i, 5, n), _ && e.autoClear === !1 && e.clearDepth(), e.render(t, c), e.setRenderTarget(h, d, u), e.xr.enabled = f, i.texture.needsPMREMUpdate = !0;
|
|
9996
10001
|
}
|
|
9997
10002
|
}, Dp = class extends Nt {
|
|
9998
10003
|
constructor(e = []) {
|
|
@@ -10367,12 +10372,12 @@ var Qi = /* @__PURE__ */ new C(), Na = /* @__PURE__ */ new Wt(), Bp = /* @__PURE
|
|
|
10367
10372
|
const e = this._bindings;
|
|
10368
10373
|
for (let t = this._targetGroup.nCachedObjects_, i = e.length; t !== i; ++t) e[t].unbind();
|
|
10369
10374
|
}
|
|
10370
|
-
}, ft = class
|
|
10375
|
+
}, ft = class Vn {
|
|
10371
10376
|
constructor(t, i, n) {
|
|
10372
|
-
this.path = i, this.parsedPath = n ||
|
|
10377
|
+
this.path = i, this.parsedPath = n || Vn.parseTrackName(i), this.node = Vn.findNode(t, this.parsedPath.nodeName), this.rootNode = t, this.getValue = this._getValue_unbound, this.setValue = this._setValue_unbound;
|
|
10373
10378
|
}
|
|
10374
10379
|
static create(t, i, n) {
|
|
10375
|
-
return t && t.isAnimationObjectGroup ? new
|
|
10380
|
+
return t && t.isAnimationObjectGroup ? new Vn.Composite(t, i, n) : new Vn(t, i, n);
|
|
10376
10381
|
}
|
|
10377
10382
|
static sanitizeNodeName(t) {
|
|
10378
10383
|
return t.replace(/\s/g, "_").replace(Hp, "");
|
|
@@ -10482,7 +10487,7 @@ var Qi = /* @__PURE__ */ new C(), Na = /* @__PURE__ */ new Wt(), Bp = /* @__PURE
|
|
|
10482
10487
|
let t = this.node;
|
|
10483
10488
|
const i = this.parsedPath, n = i.objectName, r = i.propertyName;
|
|
10484
10489
|
let s = i.propertyIndex;
|
|
10485
|
-
if (t || (t =
|
|
10490
|
+
if (t || (t = Vn.findNode(this.rootNode, i.nodeName), this.node = t), this.getValue = this._getValue_unavailable, this.setValue = this._setValue_unavailable, !t) {
|
|
10486
10491
|
he("PropertyBinding: No target node found for track: " + this.path + ".");
|
|
10487
10492
|
return;
|
|
10488
10493
|
}
|
|
@@ -10640,15 +10645,15 @@ var my = class {
|
|
|
10640
10645
|
let f = t[u];
|
|
10641
10646
|
if (f === void 0) {
|
|
10642
10647
|
f = o++, t[u] = f, e.push(d);
|
|
10643
|
-
for (let
|
|
10648
|
+
for (let m = 0, _ = s; m !== _; ++m) r[m].push(new ft(d, i[m], n[m]));
|
|
10644
10649
|
} else if (f < l) {
|
|
10645
10650
|
a = e[f];
|
|
10646
|
-
const
|
|
10647
|
-
t[_.uuid] = f, e[f] = _, t[u] =
|
|
10648
|
-
for (let
|
|
10649
|
-
const S = r[
|
|
10651
|
+
const m = --l, _ = e[m];
|
|
10652
|
+
t[_.uuid] = f, e[f] = _, t[u] = m, e[m] = d;
|
|
10653
|
+
for (let g = 0, p = s; g !== p; ++g) {
|
|
10654
|
+
const S = r[g], M = S[m];
|
|
10650
10655
|
let v = S[f];
|
|
10651
|
-
S[f] = M, v === void 0 && (v = new ft(d, i[
|
|
10656
|
+
S[f] = M, v === void 0 && (v = new ft(d, i[g], n[g])), S[m] = v;
|
|
10652
10657
|
}
|
|
10653
10658
|
} else e[f] !== a && Pe("AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.");
|
|
10654
10659
|
}
|
|
@@ -10663,8 +10668,8 @@ var my = class {
|
|
|
10663
10668
|
const h = r++, d = e[h];
|
|
10664
10669
|
t[d.uuid] = c, e[c] = d, t[l] = h, e[h] = o;
|
|
10665
10670
|
for (let u = 0, f = n; u !== f; ++u) {
|
|
10666
|
-
const
|
|
10667
|
-
|
|
10671
|
+
const m = i[u], _ = m[h], g = m[c];
|
|
10672
|
+
m[c] = _, m[h] = g;
|
|
10668
10673
|
}
|
|
10669
10674
|
}
|
|
10670
10675
|
}
|
|
@@ -10679,16 +10684,16 @@ var my = class {
|
|
|
10679
10684
|
if (delete t[l], c < r) {
|
|
10680
10685
|
const h = --r, d = e[h], u = --s, f = e[u];
|
|
10681
10686
|
t[d.uuid] = c, e[c] = d, t[f.uuid] = h, e[h] = f, e.pop();
|
|
10682
|
-
for (let
|
|
10683
|
-
const
|
|
10684
|
-
|
|
10687
|
+
for (let m = 0, _ = n; m !== _; ++m) {
|
|
10688
|
+
const g = i[m], p = g[h], S = g[u];
|
|
10689
|
+
g[c] = p, g[h] = S, g.pop();
|
|
10685
10690
|
}
|
|
10686
10691
|
} else {
|
|
10687
10692
|
const h = --s, d = e[h];
|
|
10688
10693
|
h > 0 && (t[d.uuid] = c), e[c] = d, e.pop();
|
|
10689
10694
|
for (let u = 0, f = n; u !== f; ++u) {
|
|
10690
|
-
const
|
|
10691
|
-
|
|
10695
|
+
const m = i[u];
|
|
10696
|
+
m[c] = m[h], m.pop();
|
|
10692
10697
|
}
|
|
10693
10698
|
}
|
|
10694
10699
|
}
|
|
@@ -10718,8 +10723,8 @@ var my = class {
|
|
|
10718
10723
|
constructor(e, t, i = null, n = t.blendMode) {
|
|
10719
10724
|
this._mixer = e, this._clip = t, this._localRoot = i, this.blendMode = n;
|
|
10720
10725
|
const r = t.tracks, s = r.length, a = new Array(s), o = {
|
|
10721
|
-
endingStart:
|
|
10722
|
-
endingEnd:
|
|
10726
|
+
endingStart: kn,
|
|
10727
|
+
endingEnd: kn
|
|
10723
10728
|
};
|
|
10724
10729
|
for (let l = 0; l !== s; ++l) {
|
|
10725
10730
|
const c = r[l].createInterpolant(null);
|
|
@@ -10910,7 +10915,7 @@ var my = class {
|
|
|
10910
10915
|
}
|
|
10911
10916
|
_setEndings(e, t, i) {
|
|
10912
10917
|
const n = this._interpolantSettings;
|
|
10913
|
-
i ? (n.endingStart =
|
|
10918
|
+
i ? (n.endingStart = Gn, n.endingEnd = Gn) : (e ? n.endingStart = this.zeroSlopeAtStart ? Gn : kn : n.endingStart = Ls, t ? n.endingEnd = this.zeroSlopeAtEnd ? Gn : kn : n.endingEnd = Ls);
|
|
10914
10919
|
}
|
|
10915
10920
|
_scheduleFading(e, t, i) {
|
|
10916
10921
|
const n = this._mixer, r = n.time;
|
|
@@ -10937,8 +10942,8 @@ var my = class {
|
|
|
10937
10942
|
f._cacheIndex === null && (++f.referenceCount, this._addInactiveBinding(f, o, u));
|
|
10938
10943
|
continue;
|
|
10939
10944
|
}
|
|
10940
|
-
const
|
|
10941
|
-
f = new kp(ft.create(i, u,
|
|
10945
|
+
const m = t && t._propertyBindings[h].binding.parsedPath;
|
|
10946
|
+
f = new kp(ft.create(i, u, m), d.ValueTypeName, d.getValueSize()), ++f.referenceCount, this._addInactiveBinding(f, o, u), s[h] = f;
|
|
10942
10947
|
}
|
|
10943
10948
|
a[h].resultBuffer = f.buffer;
|
|
10944
10949
|
}
|
|
@@ -11407,7 +11412,7 @@ var by = class {
|
|
|
11407
11412
|
equals(e) {
|
|
11408
11413
|
return e.min.equals(this.min) && e.max.equals(this.max);
|
|
11409
11414
|
}
|
|
11410
|
-
}, Ul = /* @__PURE__ */ new C(), vs = /* @__PURE__ */ new C(),
|
|
11415
|
+
}, Ul = /* @__PURE__ */ new C(), vs = /* @__PURE__ */ new C(), On = /* @__PURE__ */ new C(), Fn = /* @__PURE__ */ new C(), Da = /* @__PURE__ */ new C(), im = /* @__PURE__ */ new C(), nm = /* @__PURE__ */ new C(), wy = class {
|
|
11411
11416
|
constructor(e = new C(), t = new C()) {
|
|
11412
11417
|
this.start = e, this.end = t;
|
|
11413
11418
|
}
|
|
@@ -11447,22 +11452,22 @@ var by = class {
|
|
|
11447
11452
|
const n = 10000000000000001e-32;
|
|
11448
11453
|
let r, s;
|
|
11449
11454
|
const a = this.start, o = e.start, l = this.end, c = e.end;
|
|
11450
|
-
|
|
11451
|
-
const h =
|
|
11455
|
+
On.subVectors(l, a), Fn.subVectors(c, o), Da.subVectors(a, o);
|
|
11456
|
+
const h = On.dot(On), d = Fn.dot(Fn), u = Fn.dot(Da);
|
|
11452
11457
|
if (h <= n && d <= n)
|
|
11453
11458
|
return t.copy(a), i.copy(o), t.sub(i), t.dot(t);
|
|
11454
11459
|
if (h <= n)
|
|
11455
11460
|
r = 0, s = u / d, s = Ve(s, 0, 1);
|
|
11456
11461
|
else {
|
|
11457
|
-
const f =
|
|
11462
|
+
const f = On.dot(Da);
|
|
11458
11463
|
if (d <= n)
|
|
11459
11464
|
s = 0, r = Ve(-f / h, 0, 1);
|
|
11460
11465
|
else {
|
|
11461
|
-
const
|
|
11462
|
-
_ !== 0 ? r = Ve((
|
|
11466
|
+
const m = On.dot(Fn), _ = h * d - m * m;
|
|
11467
|
+
_ !== 0 ? r = Ve((m * u - f * d) / _, 0, 1) : r = 0, s = (m * r + u) / d, s < 0 ? (s = 0, r = Ve(-f / h, 0, 1)) : s > 1 && (s = 1, r = Ve((m - f) / h, 0, 1));
|
|
11463
11468
|
}
|
|
11464
11469
|
}
|
|
11465
|
-
return t.copy(a).addScaledVector(
|
|
11470
|
+
return t.copy(a).addScaledVector(On, r), i.copy(o).addScaledVector(Fn, s), t.distanceToSquared(i);
|
|
11466
11471
|
}
|
|
11467
11472
|
applyMatrix4(e) {
|
|
11468
11473
|
return this.start.applyMatrix4(e), this.end.applyMatrix4(e), this;
|
|
@@ -11573,7 +11578,7 @@ function Bh(e) {
|
|
|
11573
11578
|
}
|
|
11574
11579
|
var Iy = class extends Tt {
|
|
11575
11580
|
constructor(e, t, i) {
|
|
11576
|
-
const n = new gh(t, 4, 2), r = new
|
|
11581
|
+
const n = new gh(t, 4, 2), r = new pn({
|
|
11577
11582
|
wireframe: !0,
|
|
11578
11583
|
fog: !1,
|
|
11579
11584
|
toneMapped: !1
|
|
@@ -11590,7 +11595,7 @@ var Iy = class extends Tt {
|
|
|
11590
11595
|
constructor(e, t, i) {
|
|
11591
11596
|
super(), this.light = e, this.matrix = e.matrixWorld, this.matrixAutoUpdate = !1, this.color = i, this.type = "HemisphereLightHelper";
|
|
11592
11597
|
const n = new uh(t);
|
|
11593
|
-
n.rotateY(Math.PI * 0.5), this.material = new
|
|
11598
|
+
n.rotateY(Math.PI * 0.5), this.material = new pn({
|
|
11594
11599
|
wireframe: !0,
|
|
11595
11600
|
fog: !1,
|
|
11596
11601
|
toneMapped: !1
|
|
@@ -11621,8 +11626,8 @@ var Iy = class extends Tt {
|
|
|
11621
11626
|
const r = t / 2, s = e / t, a = e / 2, o = [], l = [];
|
|
11622
11627
|
for (let d = 0, u = 0, f = -a; d <= t; d++, f += s) {
|
|
11623
11628
|
o.push(-a, 0, f, a, 0, f), o.push(f, 0, -a, f, 0, a);
|
|
11624
|
-
const
|
|
11625
|
-
|
|
11629
|
+
const m = d === r ? i : n;
|
|
11630
|
+
m.toArray(l, u), u += 3, m.toArray(l, u), u += 3, m.toArray(l, u), u += 3, m.toArray(l, u), u += 3;
|
|
11626
11631
|
}
|
|
11627
11632
|
const c = new Ze();
|
|
11628
11633
|
c.setAttribute("position", new be(o, 3)), c.setAttribute("color", new be(l, 3));
|
|
@@ -11642,14 +11647,14 @@ var Iy = class extends Tt {
|
|
|
11642
11647
|
if (t > 1) for (let h = 0; h < t; h++) {
|
|
11643
11648
|
const d = h / t * (Math.PI * 2), u = Math.sin(d) * e, f = Math.cos(d) * e;
|
|
11644
11649
|
a.push(0, 0, 0), a.push(u, 0, f);
|
|
11645
|
-
const
|
|
11646
|
-
o.push(
|
|
11650
|
+
const m = h & 1 ? r : s;
|
|
11651
|
+
o.push(m.r, m.g, m.b), o.push(m.r, m.g, m.b);
|
|
11647
11652
|
}
|
|
11648
11653
|
for (let h = 0; h < i; h++) {
|
|
11649
11654
|
const d = h & 1 ? r : s, u = e - e / i * h;
|
|
11650
11655
|
for (let f = 0; f < n; f++) {
|
|
11651
|
-
let
|
|
11652
|
-
a.push(_, 0,
|
|
11656
|
+
let m = f / n * (Math.PI * 2), _ = Math.sin(m) * u, g = Math.cos(m) * u;
|
|
11657
|
+
a.push(_, 0, g), o.push(d.r, d.g, d.b), m = (f + 1) / n * (Math.PI * 2), _ = Math.sin(m) * u, g = Math.cos(m) * u, a.push(_, 0, g), o.push(d.r, d.g, d.b);
|
|
11653
11658
|
}
|
|
11654
11659
|
}
|
|
11655
11660
|
const l = new Ze();
|
|
@@ -11688,14 +11693,14 @@ var Iy = class extends Tt {
|
|
|
11688
11693
|
fog: !1,
|
|
11689
11694
|
toneMapped: !1
|
|
11690
11695
|
});
|
|
11691
|
-
this.lightPlane = new
|
|
11696
|
+
this.lightPlane = new dn(n, r), this.add(this.lightPlane), n = new Ze(), n.setAttribute("position", new be([
|
|
11692
11697
|
0,
|
|
11693
11698
|
0,
|
|
11694
11699
|
0,
|
|
11695
11700
|
0,
|
|
11696
11701
|
0,
|
|
11697
11702
|
1
|
|
11698
|
-
], 3)), this.targetLine = new
|
|
11703
|
+
], 3)), this.targetLine = new dn(n, r), this.add(this.targetLine), this.update();
|
|
11699
11704
|
}
|
|
11700
11705
|
dispose() {
|
|
11701
11706
|
this.lightPlane.geometry.dispose(), this.lightPlane.material.dispose(), this.targetLine.geometry.dispose(), this.targetLine.material.dispose();
|
|
@@ -11711,8 +11716,8 @@ var Iy = class extends Tt {
|
|
|
11711
11716
|
toneMapped: !1
|
|
11712
11717
|
}), n = [], r = [], s = {};
|
|
11713
11718
|
a("n1", "n2"), a("n2", "n4"), a("n4", "n3"), a("n3", "n1"), a("f1", "f2"), a("f2", "f4"), a("f4", "f3"), a("f3", "f1"), a("n1", "f1"), a("n2", "f2"), a("n3", "f3"), a("n4", "f4"), a("p", "n1"), a("p", "n2"), a("p", "n3"), a("p", "n4"), a("u1", "u2"), a("u2", "u3"), a("u3", "u1"), a("c", "t"), a("p", "c"), a("cn1", "cn2"), a("cn3", "cn4"), a("cf1", "cf2"), a("cf3", "cf4");
|
|
11714
|
-
function a(f,
|
|
11715
|
-
o(f), o(
|
|
11719
|
+
function a(f, m) {
|
|
11720
|
+
o(f), o(m);
|
|
11716
11721
|
}
|
|
11717
11722
|
function o(f) {
|
|
11718
11723
|
n.push(0, 0, 0), r.push(0, 0, 0), s[f] === void 0 && (s[f] = []), s[f].push(n.length / 3 - 1);
|
|
@@ -11735,7 +11740,7 @@ var Iy = class extends Tt {
|
|
|
11735
11740
|
else if (this.camera.coordinateSystem === 2001)
|
|
11736
11741
|
r = 0, s = 1;
|
|
11737
11742
|
else throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: " + this.camera.coordinateSystem);
|
|
11738
|
-
Mt("c", t, e, yt, 0, 0, r), Mt("t", t, e, yt, 0, 0, s), Mt("n1", t, e, yt, -1, -1, r), Mt("n2", t, e, yt, i, -1, r), Mt("n3", t, e, yt, -1, n, r), Mt("n4", t, e, yt, i, n, r), Mt("f1", t, e, yt, -1, -1, s), Mt("f2", t, e, yt, i, -1, s), Mt("f3", t, e, yt, -1, n, s), Mt("f4", t, e, yt, i, n, s), Mt("u1", t, e, yt, i * 0.7, n * 1.1, r), Mt("u2", t, e, yt, -
|
|
11743
|
+
Mt("c", t, e, yt, 0, 0, r), Mt("t", t, e, yt, 0, 0, s), Mt("n1", t, e, yt, -1, -1, r), Mt("n2", t, e, yt, i, -1, r), Mt("n3", t, e, yt, -1, n, r), Mt("n4", t, e, yt, i, n, r), Mt("f1", t, e, yt, -1, -1, s), Mt("f2", t, e, yt, i, -1, s), Mt("f3", t, e, yt, -1, n, s), Mt("f4", t, e, yt, i, n, s), Mt("u1", t, e, yt, i * 0.7, n * 1.1, r), Mt("u2", t, e, yt, -0.7, n * 1.1, r), Mt("u3", t, e, yt, 0, 2, r), Mt("cf1", t, e, yt, -1, 0, s), Mt("cf2", t, e, yt, i, 0, s), Mt("cf3", t, e, yt, 0, -1, s), Mt("cf4", t, e, yt, 0, n, s), Mt("cn1", t, e, yt, -1, 0, r), Mt("cn2", t, e, yt, i, 0, r), Mt("cn3", t, e, yt, 0, -1, r), Mt("cn4", t, e, yt, 0, n, r), e.getAttribute("position").needsUpdate = !0;
|
|
11739
11744
|
}
|
|
11740
11745
|
dispose() {
|
|
11741
11746
|
this.geometry.dispose(), this.material.dispose();
|
|
@@ -11861,7 +11866,7 @@ var Ms = /* @__PURE__ */ new kt(), Oy = class extends Ai {
|
|
|
11861
11866
|
dispose() {
|
|
11862
11867
|
this.geometry.dispose(), this.material.dispose();
|
|
11863
11868
|
}
|
|
11864
|
-
}, By = class extends
|
|
11869
|
+
}, By = class extends dn {
|
|
11865
11870
|
constructor(e, t = 1, i = 16776960) {
|
|
11866
11871
|
const n = i, r = [
|
|
11867
11872
|
1,
|
|
@@ -11913,7 +11918,7 @@ var Ms = /* @__PURE__ */ new kt(), Oy = class extends Ai {
|
|
|
11913
11918
|
-1,
|
|
11914
11919
|
0
|
|
11915
11920
|
], o = new Ze();
|
|
11916
|
-
o.setAttribute("position", new be(a, 3)), o.computeBoundingSphere(), this.add(new Tt(o, new
|
|
11921
|
+
o.setAttribute("position", new be(a, 3)), o.computeBoundingSphere(), this.add(new Tt(o, new pn({
|
|
11917
11922
|
color: n,
|
|
11918
11923
|
opacity: 0.2,
|
|
11919
11924
|
transparent: !0,
|
|
@@ -11936,10 +11941,10 @@ var Ms = /* @__PURE__ */ new kt(), Oy = class extends Ai {
|
|
|
11936
11941
|
0,
|
|
11937
11942
|
1,
|
|
11938
11943
|
0
|
|
11939
|
-
], 3)), Fa = new Zc(0.5, 1, 5, 1), Fa.translate(0, -0.5, 0)), this.position.copy(t), this.line = new
|
|
11944
|
+
], 3)), Fa = new Zc(0.5, 1, 5, 1), Fa.translate(0, -0.5, 0)), this.position.copy(t), this.line = new dn(Ss, new Xt({
|
|
11940
11945
|
color: n,
|
|
11941
11946
|
toneMapped: !1
|
|
11942
|
-
})), this.line.matrixAutoUpdate = !1, this.add(this.line), this.cone = new Tt(Fa, new
|
|
11947
|
+
})), this.line.matrixAutoUpdate = !1, this.add(this.line), this.cone = new Tt(Fa, new pn({
|
|
11943
11948
|
color: n,
|
|
11944
11949
|
toneMapped: !1
|
|
11945
11950
|
})), this.cone.matrixAutoUpdate = !1, this.add(this.cone), this.setDirection(e), this.setLength(i, r, s);
|
|
@@ -12044,8 +12049,8 @@ var Ms = /* @__PURE__ */ new kt(), Oy = class extends Ai {
|
|
|
12044
12049
|
let c = !1;
|
|
12045
12050
|
const h = l.length;
|
|
12046
12051
|
for (let d = 0, u = h - 1; d < h; u = d++) {
|
|
12047
|
-
const f = l[d],
|
|
12048
|
-
f.y > o.y !=
|
|
12052
|
+
const f = l[d], m = l[u];
|
|
12053
|
+
f.y > o.y != m.y > o.y && o.x < (m.x - f.x) * (o.y - f.y) / (m.y - f.y) + f.x && (c = !c);
|
|
12049
12054
|
}
|
|
12050
12055
|
return c;
|
|
12051
12056
|
}
|
|
@@ -12054,13 +12059,13 @@ var Ms = /* @__PURE__ */ new kt(), Oy = class extends Ai {
|
|
|
12054
12059
|
if (e(c, o)) return c;
|
|
12055
12060
|
const h = c.y, d = [], u = o.length;
|
|
12056
12061
|
for (let f = 0; f < u; f++) {
|
|
12057
|
-
const
|
|
12058
|
-
if (
|
|
12059
|
-
const
|
|
12060
|
-
d.push(
|
|
12062
|
+
const m = o[f], _ = o[(f + 1) % u];
|
|
12063
|
+
if (m.y > h != _.y > h) {
|
|
12064
|
+
const g = m.x + (h - m.y) * (_.x - m.x) / (_.y - m.y);
|
|
12065
|
+
d.push(g);
|
|
12061
12066
|
}
|
|
12062
12067
|
}
|
|
12063
|
-
return d.length > 1 && (d.sort((f,
|
|
12068
|
+
return d.length > 1 && (d.sort((f, m) => f - m), c.x = (d[0] + d[1]) / 2), c;
|
|
12064
12069
|
}
|
|
12065
12070
|
let i = this.userData.style && this.userData.style.fillRule || "nonzero";
|
|
12066
12071
|
i !== "nonzero" && i !== "evenodd" && (he('Fill-rule "' + i + '" is not supported, falling back to "nonzero".'), i = "nonzero");
|
|
@@ -12241,7 +12246,7 @@ function lm(e) {
|
|
|
12241
12246
|
};
|
|
12242
12247
|
case dc:
|
|
12243
12248
|
case tu:
|
|
12244
|
-
case
|
|
12249
|
+
case hn:
|
|
12245
12250
|
return {
|
|
12246
12251
|
byteLength: 2,
|
|
12247
12252
|
components: 1
|
|
@@ -12312,7 +12317,8 @@ function cm(e) {
|
|
|
12312
12317
|
let f;
|
|
12313
12318
|
if (c instanceof Float32Array) f = e.FLOAT;
|
|
12314
12319
|
else if (typeof Float16Array < "u" && c instanceof Float16Array) f = e.HALF_FLOAT;
|
|
12315
|
-
else if (c instanceof Uint16Array)
|
|
12320
|
+
else if (c instanceof Uint16Array)
|
|
12321
|
+
o.isFloat16BufferAttribute ? f = e.HALF_FLOAT : f = e.UNSIGNED_SHORT;
|
|
12316
12322
|
else if (c instanceof Int16Array) f = e.SHORT;
|
|
12317
12323
|
else if (c instanceof Uint32Array) f = e.UNSIGNED_INT;
|
|
12318
12324
|
else if (c instanceof Int32Array) f = e.INT;
|
|
@@ -12332,14 +12338,14 @@ function cm(e) {
|
|
|
12332
12338
|
const h = l.array, d = l.updateRanges;
|
|
12333
12339
|
if (e.bindBuffer(c, o), d.length === 0) e.bufferSubData(c, 0, h);
|
|
12334
12340
|
else {
|
|
12335
|
-
d.sort((f,
|
|
12341
|
+
d.sort((f, m) => f.start - m.start);
|
|
12336
12342
|
let u = 0;
|
|
12337
12343
|
for (let f = 1; f < d.length; f++) {
|
|
12338
|
-
const
|
|
12339
|
-
_.start <=
|
|
12344
|
+
const m = d[u], _ = d[f];
|
|
12345
|
+
_.start <= m.start + m.count + 1 ? m.count = Math.max(m.count, _.start + _.count - m.start) : (++u, d[u] = _);
|
|
12340
12346
|
}
|
|
12341
12347
|
d.length = u + 1;
|
|
12342
|
-
for (let f = 0,
|
|
12348
|
+
for (let f = 0, m = d.length; f < m; f++) {
|
|
12343
12349
|
const _ = d[f];
|
|
12344
12350
|
e.bufferSubData(c, _.start * h.BYTES_PER_ELEMENT, h, _.start, _.count);
|
|
12345
12351
|
}
|
|
@@ -16643,10 +16649,10 @@ function um(e, t, i, n, r, s) {
|
|
|
16643
16649
|
}
|
|
16644
16650
|
return M;
|
|
16645
16651
|
}
|
|
16646
|
-
function
|
|
16652
|
+
function m(S) {
|
|
16647
16653
|
let M = !1;
|
|
16648
16654
|
const v = f(S);
|
|
16649
|
-
v === null ?
|
|
16655
|
+
v === null ? g(a, o) : v && v.isColor && (g(v, 1), M = !0);
|
|
16650
16656
|
const E = e.xr.getEnvironmentBlendMode();
|
|
16651
16657
|
E === "additive" ? i.buffers.color.setClear(0, 0, 0, 1, s) : E === "alpha-blend" && i.buffers.color.setClear(0, 0, 0, 0, s), (e.autoClear || M) && (i.buffers.depth.setTest(!0), i.buffers.depth.setMask(!0), i.buffers.color.setMask(!0), e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil));
|
|
16652
16658
|
}
|
|
@@ -16680,7 +16686,7 @@ function um(e, t, i, n, r, s) {
|
|
|
16680
16686
|
return this.uniforms.t2D.value;
|
|
16681
16687
|
} }), n.update(l)), l.material.uniforms.t2D.value = v, l.material.uniforms.backgroundIntensity.value = M.backgroundIntensity, l.material.toneMapped = et.getTransfer(v.colorSpace) !== Ns, v.matrixAutoUpdate === !0 && v.updateMatrix(), l.material.uniforms.uvTransform.value.copy(v.matrix), (h !== v || d !== v.version || u !== e.toneMapping) && (l.material.needsUpdate = !0, h = v, d = v.version, u = e.toneMapping), l.layers.enableAll(), S.unshift(l, l.geometry, l.material, 0, 0, null));
|
|
16682
16688
|
}
|
|
16683
|
-
function
|
|
16689
|
+
function g(S, M) {
|
|
16684
16690
|
S.getRGB(bs, Sh(e)), i.buffers.color.setClear(bs.r, bs.g, bs.b, M, s);
|
|
16685
16691
|
}
|
|
16686
16692
|
function p() {
|
|
@@ -16691,15 +16697,15 @@ function um(e, t, i, n, r, s) {
|
|
|
16691
16697
|
return a;
|
|
16692
16698
|
},
|
|
16693
16699
|
setClearColor: function(S, M = 1) {
|
|
16694
|
-
a.set(S), o = M,
|
|
16700
|
+
a.set(S), o = M, g(a, o);
|
|
16695
16701
|
},
|
|
16696
16702
|
getClearAlpha: function() {
|
|
16697
16703
|
return o;
|
|
16698
16704
|
},
|
|
16699
16705
|
setClearAlpha: function(S) {
|
|
16700
|
-
o = S,
|
|
16706
|
+
o = S, g(a, o);
|
|
16701
16707
|
},
|
|
16702
|
-
render:
|
|
16708
|
+
render: m,
|
|
16703
16709
|
addToRenderList: _,
|
|
16704
16710
|
dispose: p
|
|
16705
16711
|
};
|
|
@@ -16710,7 +16716,7 @@ function dm(e, t) {
|
|
|
16710
16716
|
function o(I, F, X, k, G) {
|
|
16711
16717
|
let q = !1;
|
|
16712
16718
|
const z = d(I, k, X, F);
|
|
16713
|
-
s !== z && (s = z, c(s.object)), q = f(I, k, X, G), q &&
|
|
16719
|
+
s !== z && (s = z, c(s.object)), q = f(I, k, X, G), q && m(I, k, X, G), G !== null && t.update(G, e.ELEMENT_ARRAY_BUFFER), (q || a) && (a = !1, v(I, F, X, k), G !== null && e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, t.get(G).buffer));
|
|
16714
16720
|
}
|
|
16715
16721
|
function l() {
|
|
16716
16722
|
return e.createVertexArray();
|
|
@@ -16761,7 +16767,7 @@ function dm(e, t) {
|
|
|
16761
16767
|
}
|
|
16762
16768
|
return s.attributesNum !== z || s.index !== k;
|
|
16763
16769
|
}
|
|
16764
|
-
function
|
|
16770
|
+
function m(I, F, X, k) {
|
|
16765
16771
|
const G = {}, q = F.attributes;
|
|
16766
16772
|
let z = 0;
|
|
16767
16773
|
const ee = X.getAttributes();
|
|
@@ -16777,7 +16783,7 @@ function dm(e, t) {
|
|
|
16777
16783
|
const I = s.newAttributes;
|
|
16778
16784
|
for (let F = 0, X = I.length; F < X; F++) I[F] = 0;
|
|
16779
16785
|
}
|
|
16780
|
-
function
|
|
16786
|
+
function g(I) {
|
|
16781
16787
|
p(I, 0);
|
|
16782
16788
|
}
|
|
16783
16789
|
function p(I, F) {
|
|
@@ -16807,14 +16813,14 @@ function dm(e, t) {
|
|
|
16807
16813
|
if (de.isInstancedInterleavedBuffer) {
|
|
16808
16814
|
for (let Ne = 0; Ne < ie.locationSize; Ne++) p(ie.location + Ne, de.meshPerAttribute);
|
|
16809
16815
|
I.isInstancedMesh !== !0 && k._maxInstanceCount === void 0 && (k._maxInstanceCount = de.meshPerAttribute * de.count);
|
|
16810
|
-
} else for (let Ne = 0; Ne < ie.locationSize; Ne++)
|
|
16816
|
+
} else for (let Ne = 0; Ne < ie.locationSize; Ne++) g(ie.location + Ne);
|
|
16811
16817
|
e.bindBuffer(e.ARRAY_BUFFER, at);
|
|
16812
16818
|
for (let Ne = 0; Ne < ie.locationSize; Ne++) M(ie.location + Ne, we / ie.locationSize, Y, ge, De * oe, (Be + we / ie.locationSize * Ne) * oe, ve);
|
|
16813
16819
|
} else {
|
|
16814
16820
|
if (ne.isInstancedBufferAttribute) {
|
|
16815
16821
|
for (let de = 0; de < ie.locationSize; de++) p(ie.location + de, ne.meshPerAttribute);
|
|
16816
16822
|
I.isInstancedMesh !== !0 && k._maxInstanceCount === void 0 && (k._maxInstanceCount = ne.meshPerAttribute * ne.count);
|
|
16817
|
-
} else for (let de = 0; de < ie.locationSize; de++)
|
|
16823
|
+
} else for (let de = 0; de < ie.locationSize; de++) g(ie.location + de);
|
|
16818
16824
|
e.bindBuffer(e.ARRAY_BUFFER, at);
|
|
16819
16825
|
for (let de = 0; de < ie.locationSize; de++) M(ie.location + de, we / ie.locationSize, Y, ge, we * oe, we / ie.locationSize * de * oe, ve);
|
|
16820
16826
|
}
|
|
@@ -16910,7 +16916,7 @@ function dm(e, t) {
|
|
|
16910
16916
|
releaseStatesOfObject: y,
|
|
16911
16917
|
releaseStatesOfProgram: R,
|
|
16912
16918
|
initAttributes: _,
|
|
16913
|
-
enableAttribute:
|
|
16919
|
+
enableAttribute: g,
|
|
16914
16920
|
disableUnusedAttributes: S
|
|
16915
16921
|
};
|
|
16916
16922
|
}
|
|
@@ -16963,7 +16969,7 @@ function pm(e, t, i, n) {
|
|
|
16963
16969
|
h !== c && (he("WebGLRenderer:", c, "not supported, using", h, "instead."), c = h);
|
|
16964
16970
|
const d = i.logarithmicDepthBuffer === !0, u = i.reversedDepthBuffer === !0 && t.has("EXT_clip_control");
|
|
16965
16971
|
i.reversedDepthBuffer === !0 && u === !1 && he("WebGLRenderer: Unable to use reversed depth buffer due to missing EXT_clip_control extension. Fallback to default depth buffer.");
|
|
16966
|
-
const f = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),
|
|
16972
|
+
const f = e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS), m = e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS), _ = e.getParameter(e.MAX_TEXTURE_SIZE), g = e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE), p = e.getParameter(e.MAX_VERTEX_ATTRIBS), S = e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS), M = e.getParameter(e.MAX_VARYING_VECTORS), v = e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS), E = e.getParameter(e.MAX_SAMPLES), w = e.getParameter(e.SAMPLES);
|
|
16967
16973
|
return {
|
|
16968
16974
|
isWebGL2: !0,
|
|
16969
16975
|
getMaxAnisotropy: s,
|
|
@@ -16974,9 +16980,9 @@ function pm(e, t, i, n) {
|
|
|
16974
16980
|
logarithmicDepthBuffer: d,
|
|
16975
16981
|
reversedDepthBuffer: u,
|
|
16976
16982
|
maxTextures: f,
|
|
16977
|
-
maxVertexTextures:
|
|
16983
|
+
maxVertexTextures: m,
|
|
16978
16984
|
maxTextureSize: _,
|
|
16979
|
-
maxCubemapSize:
|
|
16985
|
+
maxCubemapSize: g,
|
|
16980
16986
|
maxAttributes: p,
|
|
16981
16987
|
maxVertexUniforms: S,
|
|
16982
16988
|
maxVaryings: M,
|
|
@@ -17002,12 +17008,13 @@ function mm(e) {
|
|
|
17002
17008
|
}, this.setGlobalState = function(d, u) {
|
|
17003
17009
|
i = h(d, u, 0);
|
|
17004
17010
|
}, this.setState = function(d, u, f) {
|
|
17005
|
-
const
|
|
17006
|
-
if (!r ||
|
|
17011
|
+
const m = d.clippingPlanes, _ = d.clipIntersection, g = d.clipShadows, p = e.get(d);
|
|
17012
|
+
if (!r || m === null || m.length === 0 || s && !g)
|
|
17013
|
+
s ? h(null) : c();
|
|
17007
17014
|
else {
|
|
17008
17015
|
const S = s ? 0 : n, M = S * 4;
|
|
17009
17016
|
let v = p.clippingState || null;
|
|
17010
|
-
l.value = v, v = h(
|
|
17017
|
+
l.value = v, v = h(m, u, M, f);
|
|
17011
17018
|
for (let E = 0; E !== M; ++E) v[E] = i[E];
|
|
17012
17019
|
p.clippingState = v, this.numIntersection = _ ? this.numPlanes : 0, this.numPlanes += S;
|
|
17013
17020
|
}
|
|
@@ -17015,19 +17022,19 @@ function mm(e) {
|
|
|
17015
17022
|
function c() {
|
|
17016
17023
|
l.value !== i && (l.value = i, l.needsUpdate = n > 0), t.numPlanes = n, t.numIntersection = 0;
|
|
17017
17024
|
}
|
|
17018
|
-
function h(d, u, f,
|
|
17025
|
+
function h(d, u, f, m) {
|
|
17019
17026
|
const _ = d !== null ? d.length : 0;
|
|
17020
|
-
let
|
|
17027
|
+
let g = null;
|
|
17021
17028
|
if (_ !== 0) {
|
|
17022
|
-
if (
|
|
17029
|
+
if (g = l.value, m !== !0 || g === null) {
|
|
17023
17030
|
const p = f + _ * 4, S = u.matrixWorldInverse;
|
|
17024
|
-
o.getNormalMatrix(S), (
|
|
17031
|
+
o.getNormalMatrix(S), (g === null || g.length < p) && (g = new Float32Array(p));
|
|
17025
17032
|
for (let M = 0, v = f; M !== _; ++M, v += 4)
|
|
17026
|
-
a.copy(d[M]).applyMatrix4(S, o), a.normal.toArray(
|
|
17033
|
+
a.copy(d[M]).applyMatrix4(S, o), a.normal.toArray(g, v), g[v + 3] = a.constant;
|
|
17027
17034
|
}
|
|
17028
|
-
l.value =
|
|
17035
|
+
l.value = g, l.needsUpdate = !0;
|
|
17029
17036
|
}
|
|
17030
|
-
return t.numPlanes = _, t.numIntersection = 0,
|
|
17037
|
+
return t.numPlanes = _, t.numIntersection = 0, g;
|
|
17031
17038
|
}
|
|
17032
17039
|
}
|
|
17033
17040
|
var Oi = 4, Vl = [
|
|
@@ -17037,7 +17044,7 @@ var Oi = 4, Vl = [
|
|
|
17037
17044
|
0.446,
|
|
17038
17045
|
0.526,
|
|
17039
17046
|
0.582
|
|
17040
|
-
],
|
|
17047
|
+
], Wn = 20, gm = 256, fr = /* @__PURE__ */ new qs(), kl = /* @__PURE__ */ new xe(), Ba = null, za = 0, Va = 0, ka = !1, vm = /* @__PURE__ */ new C(), Gl = class {
|
|
17041
17048
|
constructor(e) {
|
|
17042
17049
|
this._renderer = e, this._pingPongRenderTarget = null, this._lodMax = 0, this._cubeSize = 0, this._sizeLods = [], this._sigmas = [], this._lodMeshes = [], this._backgroundBox = null, this._cubemapMaterial = null, this._equirectMaterial = null, this._blurMaterial = null, this._ggxMaterial = null;
|
|
17043
17050
|
}
|
|
@@ -17070,7 +17077,7 @@ var Oi = 4, Vl = [
|
|
|
17070
17077
|
for (let e = 0; e < this._lodMeshes.length; e++) this._lodMeshes[e].geometry.dispose();
|
|
17071
17078
|
}
|
|
17072
17079
|
_cleanup(e) {
|
|
17073
|
-
this._renderer.setRenderTarget(Ba, za, Va), this._renderer.xr.enabled = ka, e.scissorTest = !1,
|
|
17080
|
+
this._renderer.setRenderTarget(Ba, za, Va), this._renderer.xr.enabled = ka, e.scissorTest = !1, Bn(e, 0, 0, e.width, e.height);
|
|
17074
17081
|
}
|
|
17075
17082
|
_fromTexture(e, t) {
|
|
17076
17083
|
e.mapping === 301 || e.mapping === 302 ? this._setSize(e.image.length === 0 ? 16 : e.image[0].width || e.image[0].image.width) : this._setSize(e.image.width / 4), Ba = this._renderer.getRenderTarget(), za = this._renderer.getActiveCubeFace(), Va = this._renderer.getActiveMipmapLevel(), ka = this._renderer.xr.enabled, this._renderer.xr.enabled = !1;
|
|
@@ -17082,7 +17089,7 @@ var Oi = 4, Vl = [
|
|
|
17082
17089
|
magFilter: St,
|
|
17083
17090
|
minFilter: St,
|
|
17084
17091
|
generateMipmaps: !1,
|
|
17085
|
-
type:
|
|
17092
|
+
type: hn,
|
|
17086
17093
|
format: Vi,
|
|
17087
17094
|
colorSpace: Xa,
|
|
17088
17095
|
depthBuffer: !1
|
|
@@ -17114,7 +17121,7 @@ var Oi = 4, Vl = [
|
|
|
17114
17121
|
-1,
|
|
17115
17122
|
-1
|
|
17116
17123
|
], l = this._renderer, c = l.autoClear, h = l.toneMapping;
|
|
17117
|
-
l.getClearColor(kl), l.toneMapping = 0, l.autoClear = !1, l.state.buffers.depth.getReversed() && (l.setRenderTarget(n), l.clearDepth(), l.setRenderTarget(null)), this._backgroundBox === null && (this._backgroundBox = new Tt(new Ws(), new
|
|
17124
|
+
l.getClearColor(kl), l.toneMapping = 0, l.autoClear = !1, l.state.buffers.depth.getReversed() && (l.setRenderTarget(n), l.clearDepth(), l.setRenderTarget(null)), this._backgroundBox === null && (this._backgroundBox = new Tt(new Ws(), new pn({
|
|
17118
17125
|
name: "PMREM.Background",
|
|
17119
17126
|
side: 1,
|
|
17120
17127
|
depthWrite: !1,
|
|
@@ -17122,15 +17129,15 @@ var Oi = 4, Vl = [
|
|
|
17122
17129
|
})));
|
|
17123
17130
|
const d = this._backgroundBox, u = d.material;
|
|
17124
17131
|
let f = !1;
|
|
17125
|
-
const
|
|
17126
|
-
|
|
17132
|
+
const m = e.background;
|
|
17133
|
+
m ? m.isColor && (u.color.copy(m), e.background = null, f = !0) : (u.color.copy(kl), f = !0);
|
|
17127
17134
|
for (let _ = 0; _ < 6; _++) {
|
|
17128
|
-
const
|
|
17129
|
-
|
|
17135
|
+
const g = _ % 3;
|
|
17136
|
+
g === 0 ? (s.up.set(0, a[_], 0), s.position.set(r.x, r.y, r.z), s.lookAt(r.x + o[_], r.y, r.z)) : g === 1 ? (s.up.set(0, 0, a[_]), s.position.set(r.x, r.y, r.z), s.lookAt(r.x, r.y + o[_], r.z)) : (s.up.set(0, a[_], 0), s.position.set(r.x, r.y, r.z), s.lookAt(r.x, r.y, r.z + o[_]));
|
|
17130
17137
|
const p = this._cubeSize;
|
|
17131
|
-
|
|
17138
|
+
Bn(n, g * p, _ > 2 ? p : 0, p, p), l.setRenderTarget(n), f && l.render(d, s), l.render(e, s);
|
|
17132
17139
|
}
|
|
17133
|
-
l.toneMapping = h, l.autoClear = c, e.background =
|
|
17140
|
+
l.toneMapping = h, l.autoClear = c, e.background = m;
|
|
17134
17141
|
}
|
|
17135
17142
|
_textureToCubeUV(e, t) {
|
|
17136
17143
|
const i = this._renderer, n = e.mapping === 301 || e.mapping === 302;
|
|
@@ -17140,7 +17147,7 @@ var Oi = 4, Vl = [
|
|
|
17140
17147
|
const a = r.uniforms;
|
|
17141
17148
|
a.envMap.value = e;
|
|
17142
17149
|
const o = this._cubeSize;
|
|
17143
|
-
|
|
17150
|
+
Bn(t, 0, 0, 3 * o, 2 * o), i.setRenderTarget(t), i.render(s, fr);
|
|
17144
17151
|
}
|
|
17145
17152
|
_applyPMREM(e) {
|
|
17146
17153
|
const t = this._renderer, i = t.autoClear;
|
|
@@ -17152,8 +17159,8 @@ var Oi = 4, Vl = [
|
|
|
17152
17159
|
_applyGGXFilter(e, t, i) {
|
|
17153
17160
|
const n = this._renderer, r = this._pingPongRenderTarget, s = this._ggxMaterial, a = this._lodMeshes[i];
|
|
17154
17161
|
a.material = s;
|
|
17155
|
-
const o = s.uniforms, l = i / (this._lodMeshes.length - 1), c = t / (this._lodMeshes.length - 1), h = Math.sqrt(l * l - c * c) * (0 + l * 1.25), { _lodMax: d } = this, u = this._sizeLods[i], f = 3 * u * (i > d - Oi ? i - d + Oi : 0),
|
|
17156
|
-
o.envMap.value = e.texture, o.roughness.value = h, o.mipInt.value = d - t,
|
|
17162
|
+
const o = s.uniforms, l = i / (this._lodMeshes.length - 1), c = t / (this._lodMeshes.length - 1), h = Math.sqrt(l * l - c * c) * (0 + l * 1.25), { _lodMax: d } = this, u = this._sizeLods[i], f = 3 * u * (i > d - Oi ? i - d + Oi : 0), m = 4 * (this._cubeSize - u);
|
|
17163
|
+
o.envMap.value = e.texture, o.roughness.value = h, o.mipInt.value = d - t, Bn(r, f, m, 3 * u, 2 * u), n.setRenderTarget(r), n.render(a, fr), o.envMap.value = r.texture, o.roughness.value = 0, o.mipInt.value = d - i, Bn(e, f, m, 3 * u, 2 * u), n.setRenderTarget(e), n.render(a, fr);
|
|
17157
17164
|
}
|
|
17158
17165
|
_blur(e, t, i, n, r) {
|
|
17159
17166
|
const s = this._pingPongRenderTarget;
|
|
@@ -17164,20 +17171,20 @@ var Oi = 4, Vl = [
|
|
|
17164
17171
|
s !== "latitudinal" && s !== "longitudinal" && Pe("blur direction must be either latitudinal or longitudinal!");
|
|
17165
17172
|
const c = 3, h = this._lodMeshes[n];
|
|
17166
17173
|
h.material = l;
|
|
17167
|
-
const d = l.uniforms, u = this._sizeLods[i] - 1, f = isFinite(r) ? Math.PI / (2 * u) : 2 * Math.PI /
|
|
17168
|
-
_ >
|
|
17169
|
-
const
|
|
17174
|
+
const d = l.uniforms, u = this._sizeLods[i] - 1, f = isFinite(r) ? Math.PI / (2 * u) : 2 * Math.PI / 39, m = r / f, _ = isFinite(r) ? 1 + Math.floor(c * m) : Wn;
|
|
17175
|
+
_ > Wn && he(`sigmaRadians, ${r}, is too large and will clip, as it requested ${_} samples when the maximum is set to ${Wn}`);
|
|
17176
|
+
const g = [];
|
|
17170
17177
|
let p = 0;
|
|
17171
|
-
for (let v = 0; v <
|
|
17172
|
-
const E = v /
|
|
17173
|
-
|
|
17178
|
+
for (let v = 0; v < Wn; ++v) {
|
|
17179
|
+
const E = v / m, w = Math.exp(-E * E / 2);
|
|
17180
|
+
g.push(w), v === 0 ? p += w : v < _ && (p += 2 * w);
|
|
17174
17181
|
}
|
|
17175
|
-
for (let v = 0; v <
|
|
17176
|
-
d.envMap.value = e.texture, d.samples.value = _, d.weights.value =
|
|
17182
|
+
for (let v = 0; v < g.length; v++) g[v] = g[v] / p;
|
|
17183
|
+
d.envMap.value = e.texture, d.samples.value = _, d.weights.value = g, d.latitudinal.value = s === "latitudinal", a && (d.poleAxis.value = a);
|
|
17177
17184
|
const { _lodMax: S } = this;
|
|
17178
17185
|
d.dTheta.value = f, d.mipInt.value = S - i;
|
|
17179
17186
|
const M = this._sizeLods[n];
|
|
17180
|
-
|
|
17187
|
+
Bn(t, 3 * M * (n > S - Oi ? n - S + Oi : 0), 4 * (this._cubeSize - M), 3 * M, 2 * M), o.setRenderTarget(t), o.render(h, fr);
|
|
17181
17188
|
}
|
|
17182
17189
|
};
|
|
17183
17190
|
function _m(e) {
|
|
@@ -17202,41 +17209,41 @@ function _m(e) {
|
|
|
17202
17209
|
d,
|
|
17203
17210
|
h,
|
|
17204
17211
|
d
|
|
17205
|
-
], f = 6,
|
|
17206
|
-
for (let
|
|
17207
|
-
const
|
|
17212
|
+
], f = 6, m = 3, _ = 2, g = 1, p = /* @__PURE__ */ new Float32Array(108), S = /* @__PURE__ */ new Float32Array(72), M = /* @__PURE__ */ new Float32Array(36);
|
|
17213
|
+
for (let E = 0; E < f; E++) {
|
|
17214
|
+
const w = E % 3 * 2 / 3 - 1, R = E > 2 ? 0 : -1, y = [
|
|
17215
|
+
w,
|
|
17208
17216
|
R,
|
|
17209
|
-
y,
|
|
17210
17217
|
0,
|
|
17211
|
-
|
|
17212
|
-
|
|
17218
|
+
w + 2 / 3,
|
|
17219
|
+
R,
|
|
17213
17220
|
0,
|
|
17214
|
-
|
|
17215
|
-
|
|
17221
|
+
w + 2 / 3,
|
|
17222
|
+
R + 1,
|
|
17216
17223
|
0,
|
|
17224
|
+
w,
|
|
17217
17225
|
R,
|
|
17218
|
-
y,
|
|
17219
17226
|
0,
|
|
17220
|
-
|
|
17221
|
-
|
|
17227
|
+
w + 2 / 3,
|
|
17228
|
+
R + 1,
|
|
17222
17229
|
0,
|
|
17223
|
-
|
|
17224
|
-
|
|
17230
|
+
w,
|
|
17231
|
+
R + 1,
|
|
17225
17232
|
0
|
|
17226
17233
|
];
|
|
17227
|
-
|
|
17228
|
-
const
|
|
17229
|
-
|
|
17230
|
-
|
|
17231
|
-
|
|
17232
|
-
|
|
17233
|
-
|
|
17234
|
-
|
|
17234
|
+
p.set(y, 18 * E), S.set(u, 12 * E);
|
|
17235
|
+
const T = [
|
|
17236
|
+
E,
|
|
17237
|
+
E,
|
|
17238
|
+
E,
|
|
17239
|
+
E,
|
|
17240
|
+
E,
|
|
17241
|
+
E
|
|
17235
17242
|
];
|
|
17236
|
-
|
|
17243
|
+
M.set(T, 6 * E);
|
|
17237
17244
|
}
|
|
17238
|
-
const
|
|
17239
|
-
|
|
17245
|
+
const v = new Ze();
|
|
17246
|
+
v.setAttribute("position", new ht(p, m)), v.setAttribute("uv", new ht(S, _)), v.setAttribute("faceIndex", new ht(M, g)), n.push(new Tt(v, null)), r > Oi && r--;
|
|
17240
17247
|
}
|
|
17241
17248
|
return {
|
|
17242
17249
|
lodMeshes: n,
|
|
@@ -17248,7 +17255,7 @@ function Hl(e, t, i) {
|
|
|
17248
17255
|
const n = new ei(e, t, i);
|
|
17249
17256
|
return n.texture.mapping = 306, n.texture.name = "PMREM.cubeUv", n.scissorTest = !0, n;
|
|
17250
17257
|
}
|
|
17251
|
-
function
|
|
17258
|
+
function Bn(e, t, i, n, r) {
|
|
17252
17259
|
e.viewport.set(t, i, n, r), e.scissor.set(t, i, n, r);
|
|
17253
17260
|
}
|
|
17254
17261
|
function ym(e, t, i) {
|
|
@@ -17377,11 +17384,11 @@ function ym(e, t, i) {
|
|
|
17377
17384
|
});
|
|
17378
17385
|
}
|
|
17379
17386
|
function xm(e, t, i) {
|
|
17380
|
-
const n = new Float32Array(
|
|
17387
|
+
const n = new Float32Array(Wn), r = new C(0, 1, 0);
|
|
17381
17388
|
return new ai({
|
|
17382
17389
|
name: "SphericalGaussianBlur",
|
|
17383
17390
|
defines: {
|
|
17384
|
-
n:
|
|
17391
|
+
n: Wn,
|
|
17385
17392
|
CUBEUV_TEXEL_WIDTH: 1 / t,
|
|
17386
17393
|
CUBEUV_TEXEL_HEIGHT: 1 / i,
|
|
17387
17394
|
CUBEUV_MAX_MIP: `${e}.0`
|
|
@@ -17665,31 +17672,32 @@ function Mm(e) {
|
|
|
17665
17672
|
function s(u) {
|
|
17666
17673
|
if (u && u.isTexture) {
|
|
17667
17674
|
const f = u.mapping;
|
|
17668
|
-
if (f === 303 || f === 304)
|
|
17669
|
-
|
|
17670
|
-
|
|
17671
|
-
|
|
17672
|
-
|
|
17673
|
-
|
|
17674
|
-
|
|
17675
|
-
|
|
17676
|
-
|
|
17677
|
-
|
|
17675
|
+
if (f === 303 || f === 304)
|
|
17676
|
+
if (t.has(u)) {
|
|
17677
|
+
const m = t.get(u).texture;
|
|
17678
|
+
return o(m, u.mapping);
|
|
17679
|
+
} else {
|
|
17680
|
+
const m = u.image;
|
|
17681
|
+
if (m && m.height > 0) {
|
|
17682
|
+
const _ = new kh(m.height);
|
|
17683
|
+
return _.fromEquirectangularTexture(e, u), t.set(u, _), u.addEventListener("dispose", c), o(_.texture, u.mapping);
|
|
17684
|
+
} else return null;
|
|
17685
|
+
}
|
|
17678
17686
|
}
|
|
17679
17687
|
return u;
|
|
17680
17688
|
}
|
|
17681
17689
|
function a(u) {
|
|
17682
17690
|
if (u && u.isTexture) {
|
|
17683
|
-
const f = u.mapping,
|
|
17684
|
-
if (
|
|
17685
|
-
let
|
|
17686
|
-
const p =
|
|
17691
|
+
const f = u.mapping, m = f === 303 || f === 304, _ = f === 301 || f === 302;
|
|
17692
|
+
if (m || _) {
|
|
17693
|
+
let g = i.get(u);
|
|
17694
|
+
const p = g !== void 0 ? g.texture.pmremVersion : 0;
|
|
17687
17695
|
if (u.isRenderTargetTexture && u.pmremVersion !== p)
|
|
17688
|
-
return n === null && (n = new Gl(e)),
|
|
17689
|
-
if (
|
|
17696
|
+
return n === null && (n = new Gl(e)), g = m ? n.fromEquirectangular(u, g) : n.fromCubemap(u, g), g.texture.pmremVersion = u.pmremVersion, i.set(u, g), g.texture;
|
|
17697
|
+
if (g !== void 0) return g.texture;
|
|
17690
17698
|
{
|
|
17691
17699
|
const S = u.image;
|
|
17692
|
-
return
|
|
17700
|
+
return m && S && S.height > 0 || _ && S && l(S) ? (n === null && (n = new Gl(e)), g = m ? n.fromEquirectangular(u) : n.fromCubemap(u), g.texture.pmremVersion = u.pmremVersion, i.set(u, g), u.addEventListener("dispose", h), g.texture) : null;
|
|
17693
17701
|
}
|
|
17694
17702
|
}
|
|
17695
17703
|
}
|
|
@@ -17700,21 +17708,21 @@ function Mm(e) {
|
|
|
17700
17708
|
}
|
|
17701
17709
|
function l(u) {
|
|
17702
17710
|
let f = 0;
|
|
17703
|
-
const
|
|
17704
|
-
for (let _ = 0; _ <
|
|
17705
|
-
return f ===
|
|
17711
|
+
const m = 6;
|
|
17712
|
+
for (let _ = 0; _ < m; _++) u[_] !== void 0 && f++;
|
|
17713
|
+
return f === m;
|
|
17706
17714
|
}
|
|
17707
17715
|
function c(u) {
|
|
17708
17716
|
const f = u.target;
|
|
17709
17717
|
f.removeEventListener("dispose", c);
|
|
17710
|
-
const
|
|
17711
|
-
|
|
17718
|
+
const m = t.get(f);
|
|
17719
|
+
m !== void 0 && (t.delete(f), m.dispose());
|
|
17712
17720
|
}
|
|
17713
17721
|
function h(u) {
|
|
17714
17722
|
const f = u.target;
|
|
17715
17723
|
f.removeEventListener("dispose", h);
|
|
17716
|
-
const
|
|
17717
|
-
|
|
17724
|
+
const m = i.get(f);
|
|
17725
|
+
m !== void 0 && (i.delete(f), m.dispose());
|
|
17718
17726
|
}
|
|
17719
17727
|
function d() {
|
|
17720
17728
|
t = /* @__PURE__ */ new WeakMap(), i = /* @__PURE__ */ new WeakMap(), n !== null && (n.dispose(), n = null);
|
|
@@ -17740,7 +17748,7 @@ function Sm(e) {
|
|
|
17740
17748
|
},
|
|
17741
17749
|
get: function(n) {
|
|
17742
17750
|
const r = i(n);
|
|
17743
|
-
return r === null &&
|
|
17751
|
+
return r === null && ln("WebGLRenderer: " + n + " extension not supported."), r;
|
|
17744
17752
|
}
|
|
17745
17753
|
};
|
|
17746
17754
|
}
|
|
@@ -17749,7 +17757,7 @@ function bm(e, t, i, n) {
|
|
|
17749
17757
|
function a(d) {
|
|
17750
17758
|
const u = d.target;
|
|
17751
17759
|
u.index !== null && t.remove(u.index);
|
|
17752
|
-
for (const
|
|
17760
|
+
for (const m in u.attributes) t.remove(u.attributes[m]);
|
|
17753
17761
|
u.removeEventListener("dispose", a), delete r[u.id];
|
|
17754
17762
|
const f = s.get(u);
|
|
17755
17763
|
f && (t.remove(f), s.delete(u)), n.releaseStatesOfGeometry(u), u.isInstancedBufferGeometry === !0 && delete u._maxInstanceCount, i.memory.geometries--;
|
|
@@ -17762,9 +17770,9 @@ function bm(e, t, i, n) {
|
|
|
17762
17770
|
for (const f in u) t.update(u[f], e.ARRAY_BUFFER);
|
|
17763
17771
|
}
|
|
17764
17772
|
function c(d) {
|
|
17765
|
-
const u = [], f = d.index,
|
|
17773
|
+
const u = [], f = d.index, m = d.attributes.position;
|
|
17766
17774
|
let _ = 0;
|
|
17767
|
-
if (
|
|
17775
|
+
if (m === void 0) return;
|
|
17768
17776
|
if (f !== null) {
|
|
17769
17777
|
const S = f.array;
|
|
17770
17778
|
_ = f.version;
|
|
@@ -17773,17 +17781,17 @@ function bm(e, t, i, n) {
|
|
|
17773
17781
|
u.push(E, w, w, R, R, E);
|
|
17774
17782
|
}
|
|
17775
17783
|
} else {
|
|
17776
|
-
const S =
|
|
17777
|
-
_ =
|
|
17784
|
+
const S = m.array;
|
|
17785
|
+
_ = m.version;
|
|
17778
17786
|
for (let M = 0, v = S.length / 3 - 1; M < v; M += 3) {
|
|
17779
17787
|
const E = M + 0, w = M + 1, R = M + 2;
|
|
17780
17788
|
u.push(E, w, w, R, R, E);
|
|
17781
17789
|
}
|
|
17782
17790
|
}
|
|
17783
|
-
const
|
|
17784
|
-
|
|
17791
|
+
const g = new (m.count >= 65535 ? Uc : Lc)(u, 1);
|
|
17792
|
+
g.version = _;
|
|
17785
17793
|
const p = s.get(d);
|
|
17786
|
-
p && t.remove(p), s.set(d,
|
|
17794
|
+
p && t.remove(p), s.set(d, g);
|
|
17787
17795
|
}
|
|
17788
17796
|
function h(d) {
|
|
17789
17797
|
const u = s.get(d);
|
|
@@ -17817,9 +17825,9 @@ function Tm(e, t, i) {
|
|
|
17817
17825
|
function h(d, u, f) {
|
|
17818
17826
|
if (f === 0) return;
|
|
17819
17827
|
t.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n, u, 0, s, d, 0, f);
|
|
17820
|
-
let
|
|
17821
|
-
for (let _ = 0; _ < f; _++)
|
|
17822
|
-
i.update(
|
|
17828
|
+
let m = 0;
|
|
17829
|
+
for (let _ = 0; _ < f; _++) m += u[_];
|
|
17830
|
+
i.update(m, n, 1);
|
|
17823
17831
|
}
|
|
17824
17832
|
this.setMode = r, this.setIndex = o, this.render = l, this.renderInstances = c, this.renderMultiDraw = h;
|
|
17825
17833
|
}
|
|
@@ -17853,7 +17861,6 @@ function Am(e) {
|
|
|
17853
17861
|
break;
|
|
17854
17862
|
default:
|
|
17855
17863
|
Pe("WebGLInfo: Unknown draw mode:", a);
|
|
17856
|
-
break;
|
|
17857
17864
|
}
|
|
17858
17865
|
}
|
|
17859
17866
|
function r() {
|
|
@@ -17878,19 +17885,19 @@ function Em(e, t, i) {
|
|
|
17878
17885
|
R.dispose(), n.delete(o), o.removeEventListener("dispose", T);
|
|
17879
17886
|
};
|
|
17880
17887
|
u !== void 0 && u.texture.dispose();
|
|
17881
|
-
const f = o.morphAttributes.position !== void 0,
|
|
17888
|
+
const f = o.morphAttributes.position !== void 0, m = o.morphAttributes.normal !== void 0, _ = o.morphAttributes.color !== void 0, g = o.morphAttributes.position || [], p = o.morphAttributes.normal || [], S = o.morphAttributes.color || [];
|
|
17882
17889
|
let M = 0;
|
|
17883
|
-
f === !0 && (M = 1),
|
|
17890
|
+
f === !0 && (M = 1), m === !0 && (M = 2), _ === !0 && (M = 3);
|
|
17884
17891
|
let v = o.attributes.position.count * M, E = 1;
|
|
17885
17892
|
v > t.maxTextureSize && (E = Math.ceil(v / t.maxTextureSize), v = t.maxTextureSize);
|
|
17886
17893
|
const w = new Float32Array(v * E * 4 * d), R = new so(w, v, E, d);
|
|
17887
17894
|
R.type = zi, R.needsUpdate = !0;
|
|
17888
17895
|
const y = M * 4;
|
|
17889
17896
|
for (let U = 0; U < d; U++) {
|
|
17890
|
-
const I =
|
|
17897
|
+
const I = g[U], F = p[U], X = S[U], k = v * E * 4 * U;
|
|
17891
17898
|
for (let G = 0; G < I.count; G++) {
|
|
17892
17899
|
const q = G * y;
|
|
17893
|
-
f === !0 && (r.fromBufferAttribute(I, G), w[k + q + 0] = r.x, w[k + q + 1] = r.y, w[k + q + 2] = r.z, w[k + q + 3] = 0),
|
|
17900
|
+
f === !0 && (r.fromBufferAttribute(I, G), w[k + q + 0] = r.x, w[k + q + 1] = r.y, w[k + q + 2] = r.z, w[k + q + 3] = 0), m === !0 && (r.fromBufferAttribute(F, G), w[k + q + 4] = r.x, w[k + q + 5] = r.y, w[k + q + 6] = r.z, w[k + q + 7] = 0), _ === !0 && (r.fromBufferAttribute(X, G), w[k + q + 8] = r.x, w[k + q + 9] = r.y, w[k + q + 10] = r.z, w[k + q + 11] = X.itemSize === 4 ? r.w : 1);
|
|
17894
17901
|
}
|
|
17895
17902
|
}
|
|
17896
17903
|
u = {
|
|
@@ -17903,8 +17910,8 @@ function Em(e, t, i) {
|
|
|
17903
17910
|
else {
|
|
17904
17911
|
let f = 0;
|
|
17905
17912
|
for (let _ = 0; _ < c.length; _++) f += c[_];
|
|
17906
|
-
const
|
|
17907
|
-
l.getUniforms().setValue(e, "morphTargetBaseInfluence",
|
|
17913
|
+
const m = o.morphTargetsRelative ? 1 : 1 - f;
|
|
17914
|
+
l.getUniforms().setValue(e, "morphTargetBaseInfluence", m), l.getUniforms().setValue(e, "morphTargetInfluences", c);
|
|
17908
17915
|
}
|
|
17909
17916
|
l.getUniforms().setValue(e, "morphTargetsTexture", u.texture, i), l.getUniforms().setValue(e, "morphTargetsTextureSize", u.size);
|
|
17910
17917
|
}
|
|
@@ -17949,7 +17956,7 @@ function Rm(e, t, i, n, r, s) {
|
|
|
17949
17956
|
samples: n ? 4 : 0,
|
|
17950
17957
|
depthTexture: r ? new Zn(t, i) : void 0
|
|
17951
17958
|
}), o = new ei(t, i, {
|
|
17952
|
-
type:
|
|
17959
|
+
type: hn,
|
|
17953
17960
|
depthBuffer: !1,
|
|
17954
17961
|
stencilBuffer: !1
|
|
17955
17962
|
}), l = new Ze();
|
|
@@ -18024,7 +18031,7 @@ function Rm(e, t, i, n, r, s) {
|
|
|
18024
18031
|
depthTest: !1,
|
|
18025
18032
|
depthWrite: !1
|
|
18026
18033
|
}), h = new Tt(l, c), d = new qs(-1, 1, 1, -1, 0, 1);
|
|
18027
|
-
let u = null, f = null,
|
|
18034
|
+
let u = null, f = null, m = !1, _, g = null, p = [], S = !1;
|
|
18028
18035
|
this.setSize = function(M, v) {
|
|
18029
18036
|
a.setSize(M, v), o.setSize(M, v);
|
|
18030
18037
|
for (let E = 0; E < p.length; E++) {
|
|
@@ -18039,8 +18046,8 @@ function Rm(e, t, i, n, r, s) {
|
|
|
18039
18046
|
R.setSize && R.setSize(v, E);
|
|
18040
18047
|
}
|
|
18041
18048
|
}, this.begin = function(M, v) {
|
|
18042
|
-
if (
|
|
18043
|
-
if (
|
|
18049
|
+
if (m || M.toneMapping === 0 && p.length === 0) return !1;
|
|
18050
|
+
if (g = v, v !== null) {
|
|
18044
18051
|
const E = v.width, w = v.height;
|
|
18045
18052
|
(a.width !== E || a.height !== w) && this.setSize(E, w);
|
|
18046
18053
|
}
|
|
@@ -18048,7 +18055,7 @@ function Rm(e, t, i, n, r, s) {
|
|
|
18048
18055
|
}, this.hasRenderPass = function() {
|
|
18049
18056
|
return S;
|
|
18050
18057
|
}, this.end = function(M, v) {
|
|
18051
|
-
M.toneMapping = _,
|
|
18058
|
+
M.toneMapping = _, m = !0;
|
|
18052
18059
|
let E = a, w = o;
|
|
18053
18060
|
for (let R = 0; R < p.length; R++) {
|
|
18054
18061
|
const y = p[R];
|
|
@@ -18062,9 +18069,9 @@ function Rm(e, t, i, n, r, s) {
|
|
|
18062
18069
|
const R = Cm[f];
|
|
18063
18070
|
R && (c.defines[R] = ""), c.needsUpdate = !0;
|
|
18064
18071
|
}
|
|
18065
|
-
c.uniforms.tDiffuse.value = E.texture, M.setRenderTarget(
|
|
18072
|
+
c.uniforms.tDiffuse.value = E.texture, M.setRenderTarget(g), M.render(h, d), g = null, m = !1;
|
|
18066
18073
|
}, this.isCompositing = function() {
|
|
18067
|
-
return
|
|
18074
|
+
return m;
|
|
18068
18075
|
}, this.dispose = function() {
|
|
18069
18076
|
a.depthTexture && a.depthTexture.dispose(), a.dispose(), o.dispose(), l.dispose(), c.dispose();
|
|
18070
18077
|
};
|
|
@@ -18698,26 +18705,26 @@ function Wg(e) {
|
|
|
18698
18705
|
function Xg(e, t, i, n) {
|
|
18699
18706
|
const r = e.getContext(), s = i.defines;
|
|
18700
18707
|
let a = i.vertexShader, o = i.fragmentShader;
|
|
18701
|
-
const l = Fg(i), c = zg(i), h = kg(i), d = Hg(i), u = Wg(i), f = Cg(i),
|
|
18702
|
-
let
|
|
18708
|
+
const l = Fg(i), c = zg(i), h = kg(i), d = Hg(i), u = Wg(i), f = Cg(i), m = Rg(s), _ = r.createProgram();
|
|
18709
|
+
let g, p, S = i.glslVersion ? "#version " + i.glslVersion + `
|
|
18703
18710
|
` : "";
|
|
18704
|
-
i.isRawShaderMaterial ? (
|
|
18711
|
+
i.isRawShaderMaterial ? (g = [
|
|
18705
18712
|
"#define SHADER_TYPE " + i.shaderType,
|
|
18706
18713
|
"#define SHADER_NAME " + i.shaderName,
|
|
18707
|
-
|
|
18714
|
+
m
|
|
18708
18715
|
].filter(_r).join(`
|
|
18709
|
-
`),
|
|
18716
|
+
`), g.length > 0 && (g += `
|
|
18710
18717
|
`), p = [
|
|
18711
18718
|
"#define SHADER_TYPE " + i.shaderType,
|
|
18712
18719
|
"#define SHADER_NAME " + i.shaderName,
|
|
18713
|
-
|
|
18720
|
+
m
|
|
18714
18721
|
].filter(_r).join(`
|
|
18715
18722
|
`), p.length > 0 && (p += `
|
|
18716
|
-
`)) : (
|
|
18723
|
+
`)) : (g = [
|
|
18717
18724
|
rc(i),
|
|
18718
18725
|
"#define SHADER_TYPE " + i.shaderType,
|
|
18719
18726
|
"#define SHADER_NAME " + i.shaderName,
|
|
18720
|
-
|
|
18727
|
+
m,
|
|
18721
18728
|
i.extensionClipCullDistance ? "#define USE_CLIP_DISTANCE" : "",
|
|
18722
18729
|
i.batching ? "#define USE_BATCHING" : "",
|
|
18723
18730
|
i.batchingColor ? "#define USE_BATCHING_COLOR" : "",
|
|
@@ -18849,7 +18856,7 @@ function Xg(e, t, i, n) {
|
|
|
18849
18856
|
rc(i),
|
|
18850
18857
|
"#define SHADER_TYPE " + i.shaderType,
|
|
18851
18858
|
"#define SHADER_NAME " + i.shaderName,
|
|
18852
|
-
|
|
18859
|
+
m,
|
|
18853
18860
|
i.useFog && i.fog ? "#define USE_FOG" : "",
|
|
18854
18861
|
i.useFog && i.fogExp2 ? "#define FOG_EXP2" : "",
|
|
18855
18862
|
i.alphaToCoverage ? "#define ALPHA_TO_COVERAGE" : "",
|
|
@@ -18930,14 +18937,14 @@ function Xg(e, t, i, n) {
|
|
|
18930
18937
|
`
|
|
18931
18938
|
].filter(_r).join(`
|
|
18932
18939
|
`)), a = eo(a), a = tc(a, i), a = ic(a, i), o = eo(o), o = tc(o, i), o = ic(o, i), a = nc(a), o = nc(o), i.isRawShaderMaterial !== !0 && (S = `#version 300 es
|
|
18933
|
-
`,
|
|
18940
|
+
`, g = [
|
|
18934
18941
|
f,
|
|
18935
18942
|
"#define attribute in",
|
|
18936
18943
|
"#define varying out",
|
|
18937
18944
|
"#define texture2D texture"
|
|
18938
18945
|
].join(`
|
|
18939
18946
|
`) + `
|
|
18940
|
-
` +
|
|
18947
|
+
` + g, p = [
|
|
18941
18948
|
"#define varying in",
|
|
18942
18949
|
i.glslVersion === "300 es" ? "" : "layout(location = 0) out highp vec4 pc_fragColor;",
|
|
18943
18950
|
i.glslVersion === "300 es" ? "" : "#define gl_FragColor pc_fragColor",
|
|
@@ -18954,7 +18961,7 @@ function Xg(e, t, i, n) {
|
|
|
18954
18961
|
].join(`
|
|
18955
18962
|
`) + `
|
|
18956
18963
|
` + p);
|
|
18957
|
-
const M = S +
|
|
18964
|
+
const M = S + g + a, v = S + p + o, E = Ql(r, r.VERTEX_SHADER, M), w = Ql(r, r.FRAGMENT_SHADER, v);
|
|
18958
18965
|
r.attachShader(_, E), r.attachShader(_, w), i.index0AttributeName !== void 0 ? r.bindAttribLocation(_, 0, i.index0AttributeName) : i.hasPositionAttribute === !0 && r.bindAttribLocation(_, 0, "position"), r.linkProgram(_);
|
|
18959
18966
|
function R(I) {
|
|
18960
18967
|
if (e.debug.checkShaderErrors) {
|
|
@@ -18979,7 +18986,7 @@ Program Info Log: ` + G + `
|
|
|
18979
18986
|
programLog: G,
|
|
18980
18987
|
vertexShader: {
|
|
18981
18988
|
log: q,
|
|
18982
|
-
prefix:
|
|
18989
|
+
prefix: g
|
|
18983
18990
|
},
|
|
18984
18991
|
fragmentShader: {
|
|
18985
18992
|
log: z,
|
|
@@ -19065,7 +19072,7 @@ function Kg(e, t, i, n, r, s) {
|
|
|
19065
19072
|
ShadowMaterial: "shadow",
|
|
19066
19073
|
SpriteMaterial: "sprite"
|
|
19067
19074
|
};
|
|
19068
|
-
function
|
|
19075
|
+
function m(y) {
|
|
19069
19076
|
return l.add(y), y === 0 ? "uv" : `uv${y}`;
|
|
19070
19077
|
}
|
|
19071
19078
|
function _(y, T, U, I, F, X) {
|
|
@@ -19146,29 +19153,29 @@ function Kg(e, t, i, n, r, s) {
|
|
|
19146
19153
|
alphaTest: Q,
|
|
19147
19154
|
alphaHash: Me,
|
|
19148
19155
|
combine: y.combine,
|
|
19149
|
-
mapUv: Je &&
|
|
19150
|
-
aoMapUv: ce &&
|
|
19151
|
-
lightMapUv: _e &&
|
|
19152
|
-
bumpMapUv: ye &&
|
|
19153
|
-
normalMapUv: Le &&
|
|
19154
|
-
displacementMapUv: Ue &&
|
|
19155
|
-
emissiveMapUv: We &&
|
|
19156
|
-
metalnessMapUv: Xe &&
|
|
19157
|
-
roughnessMapUv: P &&
|
|
19158
|
-
anisotropyMapUv: H &&
|
|
19159
|
-
clearcoatMapUv: K &&
|
|
19160
|
-
clearcoatNormalMapUv: se &&
|
|
19161
|
-
clearcoatRoughnessMapUv: ue &&
|
|
19162
|
-
iridescenceMapUv: D &&
|
|
19163
|
-
iridescenceThicknessMapUv: ae &&
|
|
19164
|
-
sheenColorMapUv: Se &&
|
|
19165
|
-
sheenRoughnessMapUv: Ce &&
|
|
19166
|
-
specularMapUv: te &&
|
|
19167
|
-
specularColorMapUv: Ie &&
|
|
19168
|
-
specularIntensityMapUv: Oe &&
|
|
19169
|
-
transmissionMapUv: Ge &&
|
|
19170
|
-
thicknessMapUv: it &&
|
|
19171
|
-
alphaMapUv: Z &&
|
|
19156
|
+
mapUv: Je && m(y.map.channel),
|
|
19157
|
+
aoMapUv: ce && m(y.aoMap.channel),
|
|
19158
|
+
lightMapUv: _e && m(y.lightMap.channel),
|
|
19159
|
+
bumpMapUv: ye && m(y.bumpMap.channel),
|
|
19160
|
+
normalMapUv: Le && m(y.normalMap.channel),
|
|
19161
|
+
displacementMapUv: Ue && m(y.displacementMap.channel),
|
|
19162
|
+
emissiveMapUv: We && m(y.emissiveMap.channel),
|
|
19163
|
+
metalnessMapUv: Xe && m(y.metalnessMap.channel),
|
|
19164
|
+
roughnessMapUv: P && m(y.roughnessMap.channel),
|
|
19165
|
+
anisotropyMapUv: H && m(y.anisotropyMap.channel),
|
|
19166
|
+
clearcoatMapUv: K && m(y.clearcoatMap.channel),
|
|
19167
|
+
clearcoatNormalMapUv: se && m(y.clearcoatNormalMap.channel),
|
|
19168
|
+
clearcoatRoughnessMapUv: ue && m(y.clearcoatRoughnessMap.channel),
|
|
19169
|
+
iridescenceMapUv: D && m(y.iridescenceMap.channel),
|
|
19170
|
+
iridescenceThicknessMapUv: ae && m(y.iridescenceThicknessMap.channel),
|
|
19171
|
+
sheenColorMapUv: Se && m(y.sheenColorMap.channel),
|
|
19172
|
+
sheenRoughnessMapUv: Ce && m(y.sheenRoughnessMap.channel),
|
|
19173
|
+
specularMapUv: te && m(y.specularMap.channel),
|
|
19174
|
+
specularColorMapUv: Ie && m(y.specularColorMap.channel),
|
|
19175
|
+
specularIntensityMapUv: Oe && m(y.specularIntensityMap.channel),
|
|
19176
|
+
transmissionMapUv: Ge && m(y.transmissionMap.channel),
|
|
19177
|
+
thicknessMapUv: it && m(y.thicknessMap.channel),
|
|
19178
|
+
alphaMapUv: Z && m(y.alphaMap.channel),
|
|
19172
19179
|
vertexTangents: !!G.attributes.tangent && (Le || mt),
|
|
19173
19180
|
vertexNormals: !!G.attributes.normal,
|
|
19174
19181
|
vertexColors: y.vertexColors,
|
|
@@ -19221,7 +19228,7 @@ function Kg(e, t, i, n, r, s) {
|
|
|
19221
19228
|
};
|
|
19222
19229
|
return pe.vertexUv1s = l.has(1), pe.vertexUv2s = l.has(2), pe.vertexUv3s = l.has(3), l.clear(), pe;
|
|
19223
19230
|
}
|
|
19224
|
-
function
|
|
19231
|
+
function g(y) {
|
|
19225
19232
|
const T = [];
|
|
19226
19233
|
if (y.shaderID ? T.push(y.shaderID) : (T.push(y.customVertexShaderID), T.push(y.customFragmentShaderID)), y.defines !== void 0) for (const U in y.defines)
|
|
19227
19234
|
T.push(U), T.push(y.defines[U]);
|
|
@@ -19260,7 +19267,7 @@ function Kg(e, t, i, n, r, s) {
|
|
|
19260
19267
|
}
|
|
19261
19268
|
return {
|
|
19262
19269
|
getParameters: _,
|
|
19263
|
-
getProgramCacheKey:
|
|
19270
|
+
getProgramCacheKey: g,
|
|
19264
19271
|
getUniforms: M,
|
|
19265
19272
|
acquireProgram: v,
|
|
19266
19273
|
releaseProgram: E,
|
|
@@ -19312,36 +19319,36 @@ function ac() {
|
|
|
19312
19319
|
let f = 0;
|
|
19313
19320
|
return u.isInstancedMesh && (f += 2), u.isSkinnedMesh && (f += 1), f;
|
|
19314
19321
|
}
|
|
19315
|
-
function o(u, f,
|
|
19322
|
+
function o(u, f, m, _, g, p) {
|
|
19316
19323
|
let S = e[t];
|
|
19317
19324
|
return S === void 0 ? (S = {
|
|
19318
19325
|
id: u.id,
|
|
19319
19326
|
object: u,
|
|
19320
19327
|
geometry: f,
|
|
19321
|
-
material:
|
|
19328
|
+
material: m,
|
|
19322
19329
|
materialVariant: a(u),
|
|
19323
19330
|
groupOrder: _,
|
|
19324
19331
|
renderOrder: u.renderOrder,
|
|
19325
|
-
z:
|
|
19332
|
+
z: g,
|
|
19326
19333
|
group: p
|
|
19327
|
-
}, e[t] = S) : (S.id = u.id, S.object = u, S.geometry = f, S.material =
|
|
19334
|
+
}, e[t] = S) : (S.id = u.id, S.object = u, S.geometry = f, S.material = m, S.materialVariant = a(u), S.groupOrder = _, S.renderOrder = u.renderOrder, S.z = g, S.group = p), t++, S;
|
|
19328
19335
|
}
|
|
19329
|
-
function l(u, f,
|
|
19330
|
-
const S = o(u, f,
|
|
19331
|
-
|
|
19336
|
+
function l(u, f, m, _, g, p) {
|
|
19337
|
+
const S = o(u, f, m, _, g, p);
|
|
19338
|
+
m.transmission > 0 ? n.push(S) : m.transparent === !0 ? r.push(S) : i.push(S);
|
|
19332
19339
|
}
|
|
19333
|
-
function c(u, f,
|
|
19334
|
-
const S = o(u, f,
|
|
19335
|
-
|
|
19340
|
+
function c(u, f, m, _, g, p) {
|
|
19341
|
+
const S = o(u, f, m, _, g, p);
|
|
19342
|
+
m.transmission > 0 ? n.unshift(S) : m.transparent === !0 ? r.unshift(S) : i.unshift(S);
|
|
19336
19343
|
}
|
|
19337
|
-
function h(u, f,
|
|
19338
|
-
i.length > 1 && i.sort(u || Qg), n.length > 1 && n.sort(f || sc), r.length > 1 && r.sort(f || sc),
|
|
19344
|
+
function h(u, f, m) {
|
|
19345
|
+
i.length > 1 && i.sort(u || Qg), n.length > 1 && n.sort(f || sc), r.length > 1 && r.sort(f || sc), m && (i.reverse(), n.reverse(), r.reverse());
|
|
19339
19346
|
}
|
|
19340
19347
|
function d() {
|
|
19341
19348
|
for (let u = t, f = e.length; u < f; u++) {
|
|
19342
|
-
const
|
|
19343
|
-
if (
|
|
19344
|
-
|
|
19349
|
+
const m = e[u];
|
|
19350
|
+
if (m.id === null) break;
|
|
19351
|
+
m.id = null, m.object = null, m.geometry = null, m.material = null, m.group = null;
|
|
19345
19352
|
}
|
|
19346
19353
|
}
|
|
19347
19354
|
return {
|
|
@@ -19415,7 +19422,6 @@ function ev() {
|
|
|
19415
19422
|
halfWidth: new C(),
|
|
19416
19423
|
halfHeight: new C()
|
|
19417
19424
|
};
|
|
19418
|
-
break;
|
|
19419
19425
|
}
|
|
19420
19426
|
return e[t.id] = i, i;
|
|
19421
19427
|
} };
|
|
@@ -19454,7 +19460,6 @@ function tv() {
|
|
|
19454
19460
|
shadowCameraNear: 1,
|
|
19455
19461
|
shadowCameraFar: 1e3
|
|
19456
19462
|
};
|
|
19457
|
-
break;
|
|
19458
19463
|
}
|
|
19459
19464
|
return e[t.id] = i, i;
|
|
19460
19465
|
} };
|
|
@@ -19509,7 +19514,7 @@ function rv(e) {
|
|
|
19509
19514
|
function o(c) {
|
|
19510
19515
|
let h = 0, d = 0, u = 0;
|
|
19511
19516
|
for (let T = 0; T < 9; T++) n.probe[T].set(0, 0, 0);
|
|
19512
|
-
let f = 0,
|
|
19517
|
+
let f = 0, m = 0, _ = 0, g = 0, p = 0, S = 0, M = 0, v = 0, E = 0, w = 0, R = 0;
|
|
19513
19518
|
c.sort(nv);
|
|
19514
19519
|
for (let T = 0, U = c.length; T < U; T++) {
|
|
19515
19520
|
const I = c[T], F = I.color, X = I.intensity, k = I.distance;
|
|
@@ -19537,43 +19542,43 @@ function rv(e) {
|
|
|
19537
19542
|
_++;
|
|
19538
19543
|
} else if (I.isRectAreaLight) {
|
|
19539
19544
|
const q = t.get(I);
|
|
19540
|
-
q.color.copy(F).multiplyScalar(X), q.halfWidth.set(I.width * 0.5, 0, 0), q.halfHeight.set(0, I.height * 0.5, 0), n.rectArea[
|
|
19545
|
+
q.color.copy(F).multiplyScalar(X), q.halfWidth.set(I.width * 0.5, 0, 0), q.halfHeight.set(0, I.height * 0.5, 0), n.rectArea[g] = q, g++;
|
|
19541
19546
|
} else if (I.isPointLight) {
|
|
19542
19547
|
const q = t.get(I);
|
|
19543
19548
|
if (q.color.copy(I.color).multiplyScalar(I.intensity), q.distance = I.distance, q.decay = I.decay, I.castShadow) {
|
|
19544
19549
|
const z = I.shadow, ee = i.get(I);
|
|
19545
|
-
ee.shadowIntensity = z.intensity, ee.shadowBias = z.bias, ee.shadowNormalBias = z.normalBias, ee.shadowRadius = z.radius, ee.shadowMapSize = z.mapSize, ee.shadowCameraNear = z.camera.near, ee.shadowCameraFar = z.camera.far, n.pointShadow[
|
|
19550
|
+
ee.shadowIntensity = z.intensity, ee.shadowBias = z.bias, ee.shadowNormalBias = z.normalBias, ee.shadowRadius = z.radius, ee.shadowMapSize = z.mapSize, ee.shadowCameraNear = z.camera.near, ee.shadowCameraFar = z.camera.far, n.pointShadow[m] = ee, n.pointShadowMap[m] = G, n.pointShadowMatrix[m] = I.shadow.matrix, M++;
|
|
19546
19551
|
}
|
|
19547
|
-
n.point[
|
|
19552
|
+
n.point[m] = q, m++;
|
|
19548
19553
|
} else if (I.isHemisphereLight) {
|
|
19549
19554
|
const q = t.get(I);
|
|
19550
19555
|
q.skyColor.copy(I.color).multiplyScalar(X), q.groundColor.copy(I.groundColor).multiplyScalar(X), n.hemi[p] = q, p++;
|
|
19551
19556
|
}
|
|
19552
19557
|
}
|
|
19553
|
-
|
|
19558
|
+
g > 0 && (e.has("OES_texture_float_linear") === !0 ? (n.rectAreaLTC1 = fe.LTC_FLOAT_1, n.rectAreaLTC2 = fe.LTC_FLOAT_2) : (n.rectAreaLTC1 = fe.LTC_HALF_1, n.rectAreaLTC2 = fe.LTC_HALF_2)), n.ambient[0] = h, n.ambient[1] = d, n.ambient[2] = u;
|
|
19554
19559
|
const y = n.hash;
|
|
19555
|
-
(y.directionalLength !== f || y.pointLength !==
|
|
19560
|
+
(y.directionalLength !== f || y.pointLength !== m || y.spotLength !== _ || y.rectAreaLength !== g || y.hemiLength !== p || y.numDirectionalShadows !== S || y.numPointShadows !== M || y.numSpotShadows !== v || y.numSpotMaps !== E || y.numLightProbes !== R) && (n.directional.length = f, n.spot.length = _, n.rectArea.length = g, n.point.length = m, n.hemi.length = p, n.directionalShadow.length = S, n.directionalShadowMap.length = S, n.pointShadow.length = M, n.pointShadowMap.length = M, n.spotShadow.length = v, n.spotShadowMap.length = v, n.directionalShadowMatrix.length = S, n.pointShadowMatrix.length = M, n.spotLightMatrix.length = v + E - w, n.spotLightMap.length = E, n.numSpotLightShadowsWithMaps = w, n.numLightProbes = R, y.directionalLength = f, y.pointLength = m, y.spotLength = _, y.rectAreaLength = g, y.hemiLength = p, y.numDirectionalShadows = S, y.numPointShadows = M, y.numSpotShadows = v, y.numSpotMaps = E, y.numLightProbes = R, n.version = iv++);
|
|
19556
19561
|
}
|
|
19557
19562
|
function l(c, h) {
|
|
19558
|
-
let d = 0, u = 0, f = 0,
|
|
19559
|
-
const
|
|
19563
|
+
let d = 0, u = 0, f = 0, m = 0, _ = 0;
|
|
19564
|
+
const g = h.matrixWorldInverse;
|
|
19560
19565
|
for (let p = 0, S = c.length; p < S; p++) {
|
|
19561
19566
|
const M = c[p];
|
|
19562
19567
|
if (M.isDirectionalLight) {
|
|
19563
19568
|
const v = n.directional[d];
|
|
19564
|
-
v.direction.setFromMatrixPosition(M.matrixWorld), r.setFromMatrixPosition(M.target.matrixWorld), v.direction.sub(r), v.direction.transformDirection(
|
|
19569
|
+
v.direction.setFromMatrixPosition(M.matrixWorld), r.setFromMatrixPosition(M.target.matrixWorld), v.direction.sub(r), v.direction.transformDirection(g), d++;
|
|
19565
19570
|
} else if (M.isSpotLight) {
|
|
19566
19571
|
const v = n.spot[f];
|
|
19567
|
-
v.position.setFromMatrixPosition(M.matrixWorld), v.position.applyMatrix4(
|
|
19572
|
+
v.position.setFromMatrixPosition(M.matrixWorld), v.position.applyMatrix4(g), v.direction.setFromMatrixPosition(M.matrixWorld), r.setFromMatrixPosition(M.target.matrixWorld), v.direction.sub(r), v.direction.transformDirection(g), f++;
|
|
19568
19573
|
} else if (M.isRectAreaLight) {
|
|
19569
|
-
const v = n.rectArea[
|
|
19570
|
-
v.position.setFromMatrixPosition(M.matrixWorld), v.position.applyMatrix4(
|
|
19574
|
+
const v = n.rectArea[m];
|
|
19575
|
+
v.position.setFromMatrixPosition(M.matrixWorld), v.position.applyMatrix4(g), a.identity(), s.copy(M.matrixWorld), s.premultiply(g), a.extractRotation(s), v.halfWidth.set(M.width * 0.5, 0, 0), v.halfHeight.set(0, M.height * 0.5, 0), v.halfWidth.applyMatrix4(a), v.halfHeight.applyMatrix4(a), m++;
|
|
19571
19576
|
} else if (M.isPointLight) {
|
|
19572
19577
|
const v = n.point[u];
|
|
19573
|
-
v.position.setFromMatrixPosition(M.matrixWorld), v.position.applyMatrix4(
|
|
19578
|
+
v.position.setFromMatrixPosition(M.matrixWorld), v.position.applyMatrix4(g), u++;
|
|
19574
19579
|
} else if (M.isHemisphereLight) {
|
|
19575
19580
|
const v = n.hemi[_];
|
|
19576
|
-
v.direction.setFromMatrixPosition(M.matrixWorld), v.direction.transformDirection(
|
|
19581
|
+
v.direction.setFromMatrixPosition(M.matrixWorld), v.direction.transformDirection(g), _++;
|
|
19577
19582
|
}
|
|
19578
19583
|
}
|
|
19579
19584
|
}
|
|
@@ -19696,8 +19701,8 @@ function hv(e, t, i) {
|
|
|
19696
19701
|
fragmentShader: ov
|
|
19697
19702
|
}), f = u.clone();
|
|
19698
19703
|
f.defines.HORIZONTAL_PASS = 1;
|
|
19699
|
-
const
|
|
19700
|
-
|
|
19704
|
+
const m = new Ze();
|
|
19705
|
+
m.setAttribute("position", new ht(new Float32Array([
|
|
19701
19706
|
-1,
|
|
19702
19707
|
-1,
|
|
19703
19708
|
0.5,
|
|
@@ -19708,11 +19713,11 @@ function hv(e, t, i) {
|
|
|
19708
19713
|
3,
|
|
19709
19714
|
0.5
|
|
19710
19715
|
]), 3));
|
|
19711
|
-
const _ = new Tt(
|
|
19716
|
+
const _ = new Tt(m, u), g = this;
|
|
19712
19717
|
this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type = 1;
|
|
19713
19718
|
let p = this.type;
|
|
19714
19719
|
this.render = function(w, R, y) {
|
|
19715
|
-
if (
|
|
19720
|
+
if (g.enabled === !1 || g.autoUpdate === !1 && g.needsUpdate === !1 || w.length === 0) return;
|
|
19716
19721
|
this.type === 2 && (he("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."), this.type = 1);
|
|
19717
19722
|
const T = e.getRenderTarget(), U = e.getActiveCubeFace(), I = e.getActiveMipmapLevel(), F = e.state;
|
|
19718
19723
|
F.setBlending(0), F.buffers.depth.getReversed() === !0 ? F.buffers.color.setClear(0, 0, 0, 0) : F.buffers.color.setClear(1, 1, 1, 1), F.buffers.depth.setTest(!0), F.setScissorTest(!1);
|
|
@@ -19739,7 +19744,7 @@ function hv(e, t, i) {
|
|
|
19739
19744
|
}
|
|
19740
19745
|
z.map = new ei(r.x, r.y, {
|
|
19741
19746
|
format: Is,
|
|
19742
|
-
type:
|
|
19747
|
+
type: hn,
|
|
19743
19748
|
minFilter: St,
|
|
19744
19749
|
magFilter: St,
|
|
19745
19750
|
generateMipmaps: !1
|
|
@@ -19765,13 +19770,13 @@ function hv(e, t, i) {
|
|
|
19765
19770
|
}
|
|
19766
19771
|
z.isPointLightShadow !== !0 && this.type === 3 && S(z, y), z.needsUpdate = !1;
|
|
19767
19772
|
}
|
|
19768
|
-
p = this.type,
|
|
19773
|
+
p = this.type, g.needsUpdate = !1, e.setRenderTarget(T, U, I);
|
|
19769
19774
|
};
|
|
19770
19775
|
function S(w, R) {
|
|
19771
19776
|
const y = t.update(_);
|
|
19772
19777
|
u.defines.VSM_SAMPLES !== w.blurSamples && (u.defines.VSM_SAMPLES = w.blurSamples, f.defines.VSM_SAMPLES = w.blurSamples, u.needsUpdate = !0, f.needsUpdate = !0), w.mapPass === null && (w.mapPass = new ei(r.x, r.y, {
|
|
19773
19778
|
format: Is,
|
|
19774
|
-
type:
|
|
19779
|
+
type: hn
|
|
19775
19780
|
})), u.uniforms.shadow_pass.value = w.map.depthTexture, u.uniforms.resolution.value = w.mapSize, u.uniforms.radius.value = w.radius, e.setRenderTarget(w.mapPass), e.clear(), e.renderBufferDirect(R, null, y, u, _, null), f.uniforms.shadow_pass.value = w.mapPass.texture, f.uniforms.resolution.value = w.mapSize, f.uniforms.radius.value = w.radius, e.setRenderTarget(w.map), e.clear(), e.renderBufferDirect(R, null, y, f, _, null);
|
|
19776
19781
|
}
|
|
19777
19782
|
function M(w, R, y, T) {
|
|
@@ -19933,7 +19938,7 @@ function uv(e, t) {
|
|
|
19933
19938
|
};
|
|
19934
19939
|
}
|
|
19935
19940
|
const s = new i(), a = new n(), o = new r(), l = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap();
|
|
19936
|
-
let h = {}, d = {}, u = {}, f = /* @__PURE__ */ new WeakMap(),
|
|
19941
|
+
let h = {}, d = {}, u = {}, f = /* @__PURE__ */ new WeakMap(), m = [], _ = null, g = !1, p = null, S = null, M = null, v = null, E = null, w = null, R = null, y = new xe(0, 0, 0), T = 0, U = !1, I = null, F = null, X = null, k = null, G = null;
|
|
19937
19942
|
const q = e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
|
|
19938
19943
|
let z = !1, ee = 0;
|
|
19939
19944
|
const ie = e.getParameter(e.VERSION);
|
|
@@ -19958,7 +19963,7 @@ function uv(e, t) {
|
|
|
19958
19963
|
return u[N] !== Z ? (e.bindFramebuffer(N, Z), u[N] = Z, N === e.DRAW_FRAMEBUFFER && (u[e.FRAMEBUFFER] = Z), N === e.FRAMEBUFFER && (u[e.DRAW_FRAMEBUFFER] = Z), !0) : !1;
|
|
19959
19964
|
}
|
|
19960
19965
|
function Ne(N, Z) {
|
|
19961
|
-
let Q =
|
|
19966
|
+
let Q = m, Me = !1;
|
|
19962
19967
|
if (N) {
|
|
19963
19968
|
Q = f.get(Z), Q === void 0 && (Q = [], f.set(Z, Q));
|
|
19964
19969
|
const Ee = N.textures;
|
|
@@ -19997,10 +20002,10 @@ function uv(e, t) {
|
|
|
19997
20002
|
};
|
|
19998
20003
|
function ce(N, Z, Q, Me, Ee, j, pe, ze, Ft, ut) {
|
|
19999
20004
|
if (N === 0) {
|
|
20000
|
-
|
|
20005
|
+
g === !0 && (De(e.BLEND), g = !1);
|
|
20001
20006
|
return;
|
|
20002
20007
|
}
|
|
20003
|
-
if (
|
|
20008
|
+
if (g === !1 && (de(e.BLEND), g = !0), N !== 5) {
|
|
20004
20009
|
if (N !== p || ut !== U) {
|
|
20005
20010
|
if ((S !== 100 || E !== 100) && (e.blendEquation(e.FUNC_ADD), S = 100, E = 100), ut) switch (N) {
|
|
20006
20011
|
case 1:
|
|
@@ -20017,7 +20022,6 @@ function uv(e, t) {
|
|
|
20017
20022
|
break;
|
|
20018
20023
|
default:
|
|
20019
20024
|
Pe("WebGLState: Invalid blending: ", N);
|
|
20020
|
-
break;
|
|
20021
20025
|
}
|
|
20022
20026
|
else switch (N) {
|
|
20023
20027
|
case 1:
|
|
@@ -20034,7 +20038,6 @@ function uv(e, t) {
|
|
|
20034
20038
|
break;
|
|
20035
20039
|
default:
|
|
20036
20040
|
Pe("WebGLState: Invalid blending: ", N);
|
|
20037
|
-
break;
|
|
20038
20041
|
}
|
|
20039
20042
|
M = null, v = null, w = null, R = null, y.set(0, 0, 0), T = 0, p = N, U = ut;
|
|
20040
20043
|
}
|
|
@@ -20172,7 +20175,7 @@ function uv(e, t) {
|
|
|
20172
20175
|
l.get(Z) !== Q && (e.uniformBlockBinding(Z, Q, N.__bindingPointIndex), l.set(Z, Q));
|
|
20173
20176
|
}
|
|
20174
20177
|
function it() {
|
|
20175
|
-
e.disable(e.BLEND), e.disable(e.CULL_FACE), e.disable(e.DEPTH_TEST), e.disable(e.POLYGON_OFFSET_FILL), e.disable(e.SCISSOR_TEST), e.disable(e.STENCIL_TEST), e.disable(e.SAMPLE_ALPHA_TO_COVERAGE), e.blendEquation(e.FUNC_ADD), e.blendFunc(e.ONE, e.ZERO), e.blendFuncSeparate(e.ONE, e.ZERO, e.ONE, e.ZERO), e.blendColor(0, 0, 0, 0), e.colorMask(!0, !0, !0, !0), e.clearColor(0, 0, 0, 0), e.depthMask(!0), e.depthFunc(e.LESS), a.setReversed(!1), e.clearDepth(1), e.stencilMask(4294967295), e.stencilFunc(e.ALWAYS, 0, 4294967295), e.stencilOp(e.KEEP, e.KEEP, e.KEEP), e.clearStencil(0), e.cullFace(e.BACK), e.frontFace(e.CCW), e.polygonOffset(0, 0), e.activeTexture(e.TEXTURE0), e.bindFramebuffer(e.FRAMEBUFFER, null), e.bindFramebuffer(e.DRAW_FRAMEBUFFER, null), e.bindFramebuffer(e.READ_FRAMEBUFFER, null), e.useProgram(null), e.lineWidth(1), e.scissor(0, 0, e.canvas.width, e.canvas.height), e.viewport(0, 0, e.canvas.width, e.canvas.height), e.pixelStorei(e.PACK_ALIGNMENT, 4), e.pixelStorei(e.UNPACK_ALIGNMENT, 4), e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, !1), e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1), e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, e.BROWSER_DEFAULT_WEBGL), e.pixelStorei(e.PACK_ROW_LENGTH, 0), e.pixelStorei(e.PACK_SKIP_PIXELS, 0), e.pixelStorei(e.PACK_SKIP_ROWS, 0), e.pixelStorei(e.UNPACK_ROW_LENGTH, 0), e.pixelStorei(e.UNPACK_IMAGE_HEIGHT, 0), e.pixelStorei(e.UNPACK_SKIP_PIXELS, 0), e.pixelStorei(e.UNPACK_SKIP_ROWS, 0), e.pixelStorei(e.UNPACK_SKIP_IMAGES, 0), h = {}, d = {}, ne = null, ge = {}, u = {}, f = /* @__PURE__ */ new WeakMap(),
|
|
20178
|
+
e.disable(e.BLEND), e.disable(e.CULL_FACE), e.disable(e.DEPTH_TEST), e.disable(e.POLYGON_OFFSET_FILL), e.disable(e.SCISSOR_TEST), e.disable(e.STENCIL_TEST), e.disable(e.SAMPLE_ALPHA_TO_COVERAGE), e.blendEquation(e.FUNC_ADD), e.blendFunc(e.ONE, e.ZERO), e.blendFuncSeparate(e.ONE, e.ZERO, e.ONE, e.ZERO), e.blendColor(0, 0, 0, 0), e.colorMask(!0, !0, !0, !0), e.clearColor(0, 0, 0, 0), e.depthMask(!0), e.depthFunc(e.LESS), a.setReversed(!1), e.clearDepth(1), e.stencilMask(4294967295), e.stencilFunc(e.ALWAYS, 0, 4294967295), e.stencilOp(e.KEEP, e.KEEP, e.KEEP), e.clearStencil(0), e.cullFace(e.BACK), e.frontFace(e.CCW), e.polygonOffset(0, 0), e.activeTexture(e.TEXTURE0), e.bindFramebuffer(e.FRAMEBUFFER, null), e.bindFramebuffer(e.DRAW_FRAMEBUFFER, null), e.bindFramebuffer(e.READ_FRAMEBUFFER, null), e.useProgram(null), e.lineWidth(1), e.scissor(0, 0, e.canvas.width, e.canvas.height), e.viewport(0, 0, e.canvas.width, e.canvas.height), e.pixelStorei(e.PACK_ALIGNMENT, 4), e.pixelStorei(e.UNPACK_ALIGNMENT, 4), e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, !1), e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !1), e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, e.BROWSER_DEFAULT_WEBGL), e.pixelStorei(e.PACK_ROW_LENGTH, 0), e.pixelStorei(e.PACK_SKIP_PIXELS, 0), e.pixelStorei(e.PACK_SKIP_ROWS, 0), e.pixelStorei(e.UNPACK_ROW_LENGTH, 0), e.pixelStorei(e.UNPACK_IMAGE_HEIGHT, 0), e.pixelStorei(e.UNPACK_SKIP_PIXELS, 0), e.pixelStorei(e.UNPACK_SKIP_ROWS, 0), e.pixelStorei(e.UNPACK_SKIP_IMAGES, 0), h = {}, d = {}, ne = null, ge = {}, u = {}, f = /* @__PURE__ */ new WeakMap(), m = [], _ = null, g = !1, p = null, S = null, M = null, v = null, E = null, w = null, R = null, y = new xe(0, 0, 0), T = 0, U = !1, I = null, F = null, X = null, k = null, G = null, at.set(0, 0, e.canvas.width, e.canvas.height), Y.set(0, 0, e.canvas.width, e.canvas.height), s.reset(), a.reset(), o.reset();
|
|
20176
20179
|
}
|
|
20177
20180
|
return {
|
|
20178
20181
|
buffers: {
|
|
@@ -20218,24 +20221,25 @@ function dv(e, t, i, n, r, s, a) {
|
|
|
20218
20221
|
const o = t.has("WEBGL_multisampled_render_to_texture") ? t.get("WEBGL_multisampled_render_to_texture") : null, l = typeof navigator > "u" ? !1 : /OculusBrowser/g.test(navigator.userAgent), c = new $(), h = /* @__PURE__ */ new WeakMap(), d = /* @__PURE__ */ new Set();
|
|
20219
20222
|
let u;
|
|
20220
20223
|
const f = /* @__PURE__ */ new WeakMap();
|
|
20221
|
-
let
|
|
20224
|
+
let m = !1;
|
|
20222
20225
|
try {
|
|
20223
|
-
|
|
20226
|
+
m = typeof OffscreenCanvas < "u" && new OffscreenCanvas(1, 1).getContext("2d") !== null;
|
|
20224
20227
|
} catch {
|
|
20225
20228
|
}
|
|
20226
20229
|
function _(A, x) {
|
|
20227
|
-
return
|
|
20230
|
+
return m ? new OffscreenCanvas(A, x) : br("canvas");
|
|
20228
20231
|
}
|
|
20229
|
-
function
|
|
20232
|
+
function g(A, x, L) {
|
|
20230
20233
|
let H = 1;
|
|
20231
20234
|
const K = Qe(A);
|
|
20232
|
-
if ((K.width > L || K.height > L) && (H = L / Math.max(K.width, K.height)), H < 1)
|
|
20233
|
-
|
|
20234
|
-
|
|
20235
|
-
|
|
20236
|
-
|
|
20237
|
-
|
|
20238
|
-
|
|
20235
|
+
if ((K.width > L || K.height > L) && (H = L / Math.max(K.width, K.height)), H < 1)
|
|
20236
|
+
if (typeof HTMLImageElement < "u" && A instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && A instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && A instanceof ImageBitmap || typeof VideoFrame < "u" && A instanceof VideoFrame) {
|
|
20237
|
+
const se = Math.floor(H * K.width), ue = Math.floor(H * K.height);
|
|
20238
|
+
u === void 0 && (u = _(se, ue));
|
|
20239
|
+
const D = x ? _(se, ue) : u;
|
|
20240
|
+
return D.width = se, D.height = ue, D.getContext("2d").drawImage(A, 0, 0, se, ue), he("WebGLRenderer: Texture has been resized from (" + K.width + "x" + K.height + ") to (" + se + "x" + ue + ")."), D;
|
|
20241
|
+
} else
|
|
20242
|
+
return "data" in A && he("WebGLRenderer: Image in DataTexture is too big (" + K.width + "x" + K.height + ")."), A;
|
|
20239
20243
|
return A;
|
|
20240
20244
|
}
|
|
20241
20245
|
function p(A) {
|
|
@@ -20450,7 +20454,7 @@ function dv(e, t, i, n, r, s, a) {
|
|
|
20450
20454
|
i.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, x.flipY), i.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, x.premultiplyAlpha), i.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, Me);
|
|
20451
20455
|
}
|
|
20452
20456
|
i.pixelStorei(e.UNPACK_ALIGNMENT, x.unpackAlignment);
|
|
20453
|
-
let D =
|
|
20457
|
+
let D = g(x.image, !1, r.maxTextureSize);
|
|
20454
20458
|
D = tt(x, D);
|
|
20455
20459
|
const ae = s.convert(x.format, x.colorSpace), Se = s.convert(x.type);
|
|
20456
20460
|
let Ce = v(x.internalFormat, ae, Se, x.normalized, x.colorSpace, x.isVideoTexture);
|
|
@@ -20459,50 +20463,59 @@ function dv(e, t, i, n, r, s, a) {
|
|
|
20459
20463
|
const Ie = x.mipmaps, Oe = x.isVideoTexture !== !0, Ge = ue.__version === void 0 || K === !0, it = se.dataReady, N = w(x, D);
|
|
20460
20464
|
if (x.isDepthTexture)
|
|
20461
20465
|
Ce = E(x.format === gc, x.type), Ge && (Oe ? i.texStorage2D(e.TEXTURE_2D, 1, Ce, D.width, D.height) : i.texImage2D(e.TEXTURE_2D, 0, Ce, D.width, D.height, 0, ae, Se, null));
|
|
20462
|
-
else if (x.isDataTexture)
|
|
20463
|
-
|
|
20464
|
-
|
|
20465
|
-
|
|
20466
|
-
|
|
20467
|
-
|
|
20468
|
-
|
|
20469
|
-
|
|
20470
|
-
|
|
20471
|
-
|
|
20472
|
-
|
|
20473
|
-
|
|
20474
|
-
|
|
20475
|
-
|
|
20476
|
-
|
|
20466
|
+
else if (x.isDataTexture)
|
|
20467
|
+
if (Ie.length > 0) {
|
|
20468
|
+
Oe && Ge && i.texStorage2D(e.TEXTURE_2D, N, Ce, Ie[0].width, Ie[0].height);
|
|
20469
|
+
for (let Z = 0, Q = Ie.length; Z < Q; Z++)
|
|
20470
|
+
te = Ie[Z], Oe ? it && i.texSubImage2D(e.TEXTURE_2D, Z, 0, 0, te.width, te.height, ae, Se, te.data) : i.texImage2D(e.TEXTURE_2D, Z, Ce, te.width, te.height, 0, ae, Se, te.data);
|
|
20471
|
+
x.generateMipmaps = !1;
|
|
20472
|
+
} else Oe ? (Ge && i.texStorage2D(e.TEXTURE_2D, N, Ce, D.width, D.height), it && de(x, D, ae, Se)) : i.texImage2D(e.TEXTURE_2D, 0, Ce, D.width, D.height, 0, ae, Se, D.data);
|
|
20473
|
+
else if (x.isCompressedTexture)
|
|
20474
|
+
if (x.isCompressedArrayTexture) {
|
|
20475
|
+
Oe && Ge && i.texStorage3D(e.TEXTURE_2D_ARRAY, N, Ce, Ie[0].width, Ie[0].height, D.depth);
|
|
20476
|
+
for (let Z = 0, Q = Ie.length; Z < Q; Z++)
|
|
20477
|
+
if (te = Ie[Z], x.format !== 1023)
|
|
20478
|
+
if (ae !== null)
|
|
20479
|
+
if (Oe) {
|
|
20480
|
+
if (it)
|
|
20481
|
+
if (x.layerUpdates.size > 0) {
|
|
20482
|
+
const Me = Qa(te.width, te.height, x.format, x.type);
|
|
20483
|
+
for (const Ee of x.layerUpdates) {
|
|
20484
|
+
const j = te.data.subarray(Ee * Me / te.data.BYTES_PER_ELEMENT, (Ee + 1) * Me / te.data.BYTES_PER_ELEMENT);
|
|
20485
|
+
i.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY, Z, 0, 0, Ee, te.width, te.height, 1, ae, j);
|
|
20486
|
+
}
|
|
20487
|
+
x.clearLayerUpdates();
|
|
20488
|
+
} else i.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY, Z, 0, 0, 0, te.width, te.height, D.depth, ae, te.data);
|
|
20489
|
+
} else i.compressedTexImage3D(e.TEXTURE_2D_ARRAY, Z, Ce, te.width, te.height, D.depth, 0, te.data, 0, 0);
|
|
20490
|
+
else he("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");
|
|
20491
|
+
else Oe ? it && i.texSubImage3D(e.TEXTURE_2D_ARRAY, Z, 0, 0, 0, te.width, te.height, D.depth, ae, Se, te.data) : i.texImage3D(e.TEXTURE_2D_ARRAY, Z, Ce, te.width, te.height, D.depth, 0, ae, Se, te.data);
|
|
20492
|
+
} else {
|
|
20493
|
+
Oe && Ge && i.texStorage2D(e.TEXTURE_2D, N, Ce, Ie[0].width, Ie[0].height);
|
|
20494
|
+
for (let Z = 0, Q = Ie.length; Z < Q; Z++)
|
|
20495
|
+
te = Ie[Z], x.format !== 1023 ? ae !== null ? Oe ? it && i.compressedTexSubImage2D(e.TEXTURE_2D, Z, 0, 0, te.width, te.height, ae, te.data) : i.compressedTexImage2D(e.TEXTURE_2D, Z, Ce, te.width, te.height, 0, te.data) : he("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : Oe ? it && i.texSubImage2D(e.TEXTURE_2D, Z, 0, 0, te.width, te.height, ae, Se, te.data) : i.texImage2D(e.TEXTURE_2D, Z, Ce, te.width, te.height, 0, ae, Se, te.data);
|
|
20496
|
+
}
|
|
20497
|
+
else if (x.isDataArrayTexture)
|
|
20498
|
+
if (Oe) {
|
|
20499
|
+
if (Ge && i.texStorage3D(e.TEXTURE_2D_ARRAY, N, Ce, D.width, D.height, D.depth), it)
|
|
20500
|
+
if (x.layerUpdates.size > 0) {
|
|
20501
|
+
const Z = Qa(D.width, D.height, x.format, x.type);
|
|
20502
|
+
for (const Q of x.layerUpdates) {
|
|
20503
|
+
const Me = D.data.subarray(Q * Z / D.data.BYTES_PER_ELEMENT, (Q + 1) * Z / D.data.BYTES_PER_ELEMENT);
|
|
20504
|
+
i.texSubImage3D(e.TEXTURE_2D_ARRAY, 0, 0, 0, Q, D.width, D.height, 1, ae, Se, Me);
|
|
20477
20505
|
}
|
|
20478
20506
|
x.clearLayerUpdates();
|
|
20479
|
-
} else i.
|
|
20480
|
-
|
|
20481
|
-
|
|
20482
|
-
|
|
20483
|
-
} else {
|
|
20484
|
-
Oe && Ge && i.texStorage2D(e.TEXTURE_2D, N, Ce, Ie[0].width, Ie[0].height);
|
|
20485
|
-
for (let Z = 0, Q = Ie.length; Z < Q; Z++)
|
|
20486
|
-
te = Ie[Z], x.format !== 1023 ? ae !== null ? Oe ? it && i.compressedTexSubImage2D(e.TEXTURE_2D, Z, 0, 0, te.width, te.height, ae, te.data) : i.compressedTexImage2D(e.TEXTURE_2D, Z, Ce, te.width, te.height, 0, te.data) : he("WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : Oe ? it && i.texSubImage2D(e.TEXTURE_2D, Z, 0, 0, te.width, te.height, ae, Se, te.data) : i.texImage2D(e.TEXTURE_2D, Z, Ce, te.width, te.height, 0, ae, Se, te.data);
|
|
20487
|
-
}
|
|
20488
|
-
else if (x.isDataArrayTexture) if (Oe) {
|
|
20489
|
-
if (Ge && i.texStorage3D(e.TEXTURE_2D_ARRAY, N, Ce, D.width, D.height, D.depth), it) if (x.layerUpdates.size > 0) {
|
|
20490
|
-
const Z = Qa(D.width, D.height, x.format, x.type);
|
|
20491
|
-
for (const Q of x.layerUpdates) {
|
|
20492
|
-
const Me = D.data.subarray(Q * Z / D.data.BYTES_PER_ELEMENT, (Q + 1) * Z / D.data.BYTES_PER_ELEMENT);
|
|
20493
|
-
i.texSubImage3D(e.TEXTURE_2D_ARRAY, 0, 0, 0, Q, D.width, D.height, 1, ae, Se, Me);
|
|
20494
|
-
}
|
|
20495
|
-
x.clearLayerUpdates();
|
|
20496
|
-
} else i.texSubImage3D(e.TEXTURE_2D_ARRAY, 0, 0, 0, 0, D.width, D.height, D.depth, ae, Se, D.data);
|
|
20497
|
-
} else i.texImage3D(e.TEXTURE_2D_ARRAY, 0, Ce, D.width, D.height, D.depth, 0, ae, Se, D.data);
|
|
20498
|
-
else if (x.isData3DTexture) Oe ? (Ge && i.texStorage3D(e.TEXTURE_3D, N, Ce, D.width, D.height, D.depth), it && i.texSubImage3D(e.TEXTURE_3D, 0, 0, 0, 0, D.width, D.height, D.depth, ae, Se, D.data)) : i.texImage3D(e.TEXTURE_3D, 0, Ce, D.width, D.height, D.depth, 0, ae, Se, D.data);
|
|
20507
|
+
} else i.texSubImage3D(e.TEXTURE_2D_ARRAY, 0, 0, 0, 0, D.width, D.height, D.depth, ae, Se, D.data);
|
|
20508
|
+
} else i.texImage3D(e.TEXTURE_2D_ARRAY, 0, Ce, D.width, D.height, D.depth, 0, ae, Se, D.data);
|
|
20509
|
+
else if (x.isData3DTexture)
|
|
20510
|
+
Oe ? (Ge && i.texStorage3D(e.TEXTURE_3D, N, Ce, D.width, D.height, D.depth), it && i.texSubImage3D(e.TEXTURE_3D, 0, 0, 0, 0, D.width, D.height, D.depth, ae, Se, D.data)) : i.texImage3D(e.TEXTURE_3D, 0, Ce, D.width, D.height, D.depth, 0, ae, Se, D.data);
|
|
20499
20511
|
else if (x.isFramebufferTexture) {
|
|
20500
|
-
if (Ge)
|
|
20501
|
-
|
|
20502
|
-
|
|
20503
|
-
|
|
20504
|
-
|
|
20505
|
-
|
|
20512
|
+
if (Ge)
|
|
20513
|
+
if (Oe) i.texStorage2D(e.TEXTURE_2D, N, Ce, D.width, D.height);
|
|
20514
|
+
else {
|
|
20515
|
+
let Z = D.width, Q = D.height;
|
|
20516
|
+
for (let Me = 0; Me < N; Me++)
|
|
20517
|
+
i.texImage2D(e.TEXTURE_2D, Me, Ce, Z, Q, 0, ae, Se, null), Z >>= 1, Q >>= 1;
|
|
20518
|
+
}
|
|
20506
20519
|
} else if (x.isHTMLTexture) {
|
|
20507
20520
|
if ("texElementImage2D" in e) {
|
|
20508
20521
|
const Z = e.canvas;
|
|
@@ -20550,7 +20563,7 @@ function dv(e, t, i, n, r, s, a) {
|
|
|
20550
20563
|
i.pixelStorei(e.UNPACK_FLIP_Y_WEBGL, x.flipY), i.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, x.premultiplyAlpha), i.pixelStorei(e.UNPACK_ALIGNMENT, x.unpackAlignment), i.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL, ae);
|
|
20551
20564
|
const Se = x.isCompressedTexture || x.image[0].isCompressedTexture, Ce = x.image[0] && x.image[0].isDataTexture, te = [];
|
|
20552
20565
|
for (let j = 0; j < 6; j++)
|
|
20553
|
-
!Se && !Ce ? te[j] =
|
|
20566
|
+
!Se && !Ce ? te[j] = g(x.image[j], !0, r.maxCubemapSize) : te[j] = Ce ? x.image[j].image : x.image[j], te[j] = tt(x, te[j]);
|
|
20554
20567
|
const Ie = te[0], Oe = s.convert(x.format, x.colorSpace), Ge = s.convert(x.type), it = v(x.internalFormat, Oe, Ge, x.normalized, x.colorSpace), N = x.isVideoTexture !== !0, Z = se.__version === void 0 || H === !0, Q = K.dataReady;
|
|
20555
20568
|
let Me = w(x, Ie);
|
|
20556
20569
|
Y(e.TEXTURE_CUBE_MAP, x);
|
|
@@ -20623,8 +20636,10 @@ function dv(e, t, i, n, r, s, a) {
|
|
|
20623
20636
|
}
|
|
20624
20637
|
} else ee(x.depthTexture, 0);
|
|
20625
20638
|
const se = K.__webglTexture, ue = Xe(x), D = H ? e.TEXTURE_CUBE_MAP_POSITIVE_X + L : e.TEXTURE_2D, ae = x.depthTexture.format === 1027 ? e.DEPTH_STENCIL_ATTACHMENT : e.DEPTH_ATTACHMENT;
|
|
20626
|
-
if (x.depthTexture.format === 1026)
|
|
20627
|
-
|
|
20639
|
+
if (x.depthTexture.format === 1026)
|
|
20640
|
+
P(x) ? o.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, ae, D, se, 0, ue) : e.framebufferTexture2D(e.FRAMEBUFFER, ae, D, se, 0);
|
|
20641
|
+
else if (x.depthTexture.format === 1027)
|
|
20642
|
+
P(x) ? o.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER, ae, D, se, 0, ue) : e.framebufferTexture2D(e.FRAMEBUFFER, ae, D, se, 0);
|
|
20628
20643
|
else throw new Error("THREE.WebGLTextures: Unknown depthTexture format.");
|
|
20629
20644
|
}
|
|
20630
20645
|
function re(A) {
|
|
@@ -20639,11 +20654,12 @@ function dv(e, t, i, n, r, s, a) {
|
|
|
20639
20654
|
}
|
|
20640
20655
|
x.__boundDepthTexture = H;
|
|
20641
20656
|
}
|
|
20642
|
-
if (A.depthTexture && !x.__autoAllocateDepthBuffer)
|
|
20643
|
-
|
|
20644
|
-
|
|
20645
|
-
|
|
20646
|
-
|
|
20657
|
+
if (A.depthTexture && !x.__autoAllocateDepthBuffer)
|
|
20658
|
+
if (L) for (let H = 0; H < 6; H++) J(x.__webglFramebuffer[H], A, H);
|
|
20659
|
+
else {
|
|
20660
|
+
const H = A.texture.mipmaps;
|
|
20661
|
+
H && H.length > 0 ? J(x.__webglFramebuffer[0], A, 0) : J(x.__webglFramebuffer, A, 0);
|
|
20662
|
+
}
|
|
20647
20663
|
else if (L) {
|
|
20648
20664
|
x.__webglDepthbuffer = [];
|
|
20649
20665
|
for (let H = 0; H < 6; H++)
|
|
@@ -20808,19 +20824,20 @@ function fv(e, t) {
|
|
|
20808
20824
|
if (n === 1030) return e.RG;
|
|
20809
20825
|
if (n === 1031) return e.RG_INTEGER;
|
|
20810
20826
|
if (n === 1033) return e.RGBA_INTEGER;
|
|
20811
|
-
if (n === 33776 || n === 33777 || n === 33778 || n === 33779)
|
|
20812
|
-
if (
|
|
20813
|
-
if (
|
|
20814
|
-
|
|
20815
|
-
|
|
20816
|
-
|
|
20827
|
+
if (n === 33776 || n === 33777 || n === 33778 || n === 33779)
|
|
20828
|
+
if (a === "srgb")
|
|
20829
|
+
if (s = t.get("WEBGL_compressed_texture_s3tc_srgb"), s !== null) {
|
|
20830
|
+
if (n === 33776) return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;
|
|
20831
|
+
if (n === 33777) return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
|
|
20832
|
+
if (n === 33778) return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
|
|
20833
|
+
if (n === 33779) return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
|
|
20834
|
+
} else return null;
|
|
20835
|
+
else if (s = t.get("WEBGL_compressed_texture_s3tc"), s !== null) {
|
|
20836
|
+
if (n === 33776) return s.COMPRESSED_RGB_S3TC_DXT1_EXT;
|
|
20837
|
+
if (n === 33777) return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
|
20838
|
+
if (n === 33778) return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;
|
|
20839
|
+
if (n === 33779) return s.COMPRESSED_RGBA_S3TC_DXT5_EXT;
|
|
20817
20840
|
} else return null;
|
|
20818
|
-
else if (s = t.get("WEBGL_compressed_texture_s3tc"), s !== null) {
|
|
20819
|
-
if (n === 33776) return s.COMPRESSED_RGB_S3TC_DXT1_EXT;
|
|
20820
|
-
if (n === 33777) return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
|
20821
|
-
if (n === 33778) return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;
|
|
20822
|
-
if (n === 33779) return s.COMPRESSED_RGBA_S3TC_DXT5_EXT;
|
|
20823
|
-
} else return null;
|
|
20824
20841
|
if (n === 35840 || n === 35841 || n === 35842 || n === 35843)
|
|
20825
20842
|
if (s = t.get("WEBGL_compressed_texture_pvrtc"), s !== null) {
|
|
20826
20843
|
if (n === 35840) return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;
|
|
@@ -20931,7 +20948,7 @@ void main() {
|
|
|
20931
20948
|
super();
|
|
20932
20949
|
const i = this;
|
|
20933
20950
|
let n = null, r = 1, s = null, a = "local-floor", o = 1, l = null, c = null, h = null, d = null, u = null, f = null;
|
|
20934
|
-
const
|
|
20951
|
+
const m = typeof XRWebGLBinding < "u", _ = new gv(), g = {}, p = t.getContextAttributes();
|
|
20935
20952
|
let S = null, M = null;
|
|
20936
20953
|
const v = [], E = [], w = new $();
|
|
20937
20954
|
let R = null;
|
|
@@ -20967,7 +20984,7 @@ void main() {
|
|
|
20967
20984
|
oe !== null && (E[Y] = null, v[Y].disconnect(oe));
|
|
20968
20985
|
}
|
|
20969
20986
|
F = null, X = null, _.reset();
|
|
20970
|
-
for (const Y in
|
|
20987
|
+
for (const Y in g) delete g[Y];
|
|
20971
20988
|
e.setRenderTarget(S), u = null, d = null, h = null, n = null, M = null, at.stop(), i.isPresenting = !1, e.setPixelRatio(R), e.setSize(w.width, w.height, !1), i.dispatchEvent({ type: "sessionend" });
|
|
20972
20989
|
}
|
|
20973
20990
|
this.setFramebufferScaleFactor = function(Y) {
|
|
@@ -20981,14 +20998,14 @@ void main() {
|
|
|
20981
20998
|
}, this.getBaseLayer = function() {
|
|
20982
20999
|
return d !== null ? d : u;
|
|
20983
21000
|
}, this.getBinding = function() {
|
|
20984
|
-
return h === null &&
|
|
21001
|
+
return h === null && m && (h = new XRWebGLBinding(n, t)), h;
|
|
20985
21002
|
}, this.getFrame = function() {
|
|
20986
21003
|
return f;
|
|
20987
21004
|
}, this.getSession = function() {
|
|
20988
21005
|
return n;
|
|
20989
21006
|
}, this.setSession = async function(Y) {
|
|
20990
21007
|
if (n = Y, n !== null) {
|
|
20991
|
-
if (S = e.getRenderTarget(), n.addEventListener("select", k), n.addEventListener("selectstart", k), n.addEventListener("selectend", k), n.addEventListener("squeeze", k), n.addEventListener("squeezestart", k), n.addEventListener("squeezeend", k), n.addEventListener("end", G), n.addEventListener("inputsourceschange", q), p.xrCompatible !== !0 && await t.makeXRCompatible(), R = e.getPixelRatio(), e.getSize(w),
|
|
21008
|
+
if (S = e.getRenderTarget(), n.addEventListener("select", k), n.addEventListener("selectstart", k), n.addEventListener("selectend", k), n.addEventListener("squeeze", k), n.addEventListener("squeezestart", k), n.addEventListener("squeezeend", k), n.addEventListener("end", G), n.addEventListener("inputsourceschange", q), p.xrCompatible !== !0 && await t.makeXRCompatible(), R = e.getPixelRatio(), e.getSize(w), m && "createProjectionLayer" in XRWebGLBinding.prototype) {
|
|
20992
21009
|
let oe = null, ve = null, de = null;
|
|
20993
21010
|
p.depth && (de = p.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24, oe = p.stencil ? gc : Sr, ve = p.stencil ? mc : Bi);
|
|
20994
21011
|
const De = {
|
|
@@ -21093,7 +21110,7 @@ void main() {
|
|
|
21093
21110
|
}, this.getDepthSensingMesh = function() {
|
|
21094
21111
|
return _.getMesh(I);
|
|
21095
21112
|
}, this.getCameraTexture = function(Y) {
|
|
21096
|
-
return
|
|
21113
|
+
return g[Y];
|
|
21097
21114
|
};
|
|
21098
21115
|
let we = null;
|
|
21099
21116
|
function st(Y, oe) {
|
|
@@ -21114,18 +21131,18 @@ void main() {
|
|
|
21114
21131
|
J === void 0 && (J = new Nt(), J.layers.enable(Be), J.viewport = new pt(), U[Be] = J), J.matrix.fromArray(Ne.transform.matrix), J.matrix.decompose(J.position, J.quaternion, J.scale), J.projectionMatrix.fromArray(Ne.projectionMatrix), J.projectionMatrixInverse.copy(J.projectionMatrix).invert(), J.viewport.set(Je.x, Je.y, Je.width, Je.height), Be === 0 && (I.matrix.copy(J.matrix), I.matrix.decompose(I.position, I.quaternion, I.scale)), de === !0 && I.cameras.push(J);
|
|
21115
21132
|
}
|
|
21116
21133
|
const De = n.enabledFeatures;
|
|
21117
|
-
if (De && De.includes("depth-sensing") && n.depthUsage == "gpu-optimized" &&
|
|
21134
|
+
if (De && De.includes("depth-sensing") && n.depthUsage == "gpu-optimized" && m) {
|
|
21118
21135
|
h = i.getBinding();
|
|
21119
21136
|
const Be = h.getDepthInformation(ve[0]);
|
|
21120
21137
|
Be && Be.isValid && Be.texture && _.init(Be, n.renderState);
|
|
21121
21138
|
}
|
|
21122
|
-
if (De && De.includes("camera-access") &&
|
|
21139
|
+
if (De && De.includes("camera-access") && m) {
|
|
21123
21140
|
e.state.unbindTexture(), h = i.getBinding();
|
|
21124
21141
|
for (let Be = 0; Be < ve.length; Be++) {
|
|
21125
21142
|
const Ne = ve[Be].camera;
|
|
21126
21143
|
if (Ne) {
|
|
21127
|
-
let Je =
|
|
21128
|
-
Je || (Je = new Gc(),
|
|
21144
|
+
let Je = g[Ne];
|
|
21145
|
+
Je || (Je = new Gc(), g[Ne] = Je);
|
|
21129
21146
|
const J = h.getCameraImage(Ne);
|
|
21130
21147
|
Je.sourceTexture = J;
|
|
21131
21148
|
}
|
|
@@ -21150,50 +21167,50 @@ void main() {
|
|
|
21150
21167
|
}, _v = /* @__PURE__ */ new He(), qh = /* @__PURE__ */ new qe();
|
|
21151
21168
|
qh.set(-1, 0, 0, 0, 1, 0, 0, 0, 1);
|
|
21152
21169
|
function yv(e, t) {
|
|
21153
|
-
function i(
|
|
21154
|
-
|
|
21170
|
+
function i(g, p) {
|
|
21171
|
+
g.matrixAutoUpdate === !0 && g.updateMatrix(), p.value.copy(g.matrix);
|
|
21155
21172
|
}
|
|
21156
|
-
function n(
|
|
21157
|
-
p.color.getRGB(
|
|
21173
|
+
function n(g, p) {
|
|
21174
|
+
p.color.getRGB(g.fogColor.value, Sh(e)), p.isFog ? (g.fogNear.value = p.near, g.fogFar.value = p.far) : p.isFogExp2 && (g.fogDensity.value = p.density);
|
|
21158
21175
|
}
|
|
21159
|
-
function r(
|
|
21160
|
-
p.isNodeMaterial ? p.uniformsNeedUpdate = !1 : p.isMeshBasicMaterial ? s(
|
|
21176
|
+
function r(g, p, S, M, v) {
|
|
21177
|
+
p.isNodeMaterial ? p.uniformsNeedUpdate = !1 : p.isMeshBasicMaterial ? s(g, p) : p.isMeshLambertMaterial ? (s(g, p), p.envMap && (g.envMapIntensity.value = p.envMapIntensity)) : p.isMeshToonMaterial ? (s(g, p), d(g, p)) : p.isMeshPhongMaterial ? (s(g, p), h(g, p), p.envMap && (g.envMapIntensity.value = p.envMapIntensity)) : p.isMeshStandardMaterial ? (s(g, p), u(g, p), p.isMeshPhysicalMaterial && f(g, p, v)) : p.isMeshMatcapMaterial ? (s(g, p), m(g, p)) : p.isMeshDepthMaterial ? s(g, p) : p.isMeshDistanceMaterial ? (s(g, p), _(g, p)) : p.isMeshNormalMaterial ? s(g, p) : p.isLineBasicMaterial ? (a(g, p), p.isLineDashedMaterial && o(g, p)) : p.isPointsMaterial ? l(g, p, S, M) : p.isSpriteMaterial ? c(g, p) : p.isShadowMaterial ? (g.color.value.copy(p.color), g.opacity.value = p.opacity) : p.isShaderMaterial && (p.uniformsNeedUpdate = !1);
|
|
21161
21178
|
}
|
|
21162
|
-
function s(
|
|
21163
|
-
|
|
21179
|
+
function s(g, p) {
|
|
21180
|
+
g.opacity.value = p.opacity, p.color && g.diffuse.value.copy(p.color), p.emissive && g.emissive.value.copy(p.emissive).multiplyScalar(p.emissiveIntensity), p.map && (g.map.value = p.map, i(p.map, g.mapTransform)), p.alphaMap && (g.alphaMap.value = p.alphaMap, i(p.alphaMap, g.alphaMapTransform)), p.bumpMap && (g.bumpMap.value = p.bumpMap, i(p.bumpMap, g.bumpMapTransform), g.bumpScale.value = p.bumpScale, p.side === 1 && (g.bumpScale.value *= -1)), p.normalMap && (g.normalMap.value = p.normalMap, i(p.normalMap, g.normalMapTransform), g.normalScale.value.copy(p.normalScale), p.side === 1 && g.normalScale.value.negate()), p.displacementMap && (g.displacementMap.value = p.displacementMap, i(p.displacementMap, g.displacementMapTransform), g.displacementScale.value = p.displacementScale, g.displacementBias.value = p.displacementBias), p.emissiveMap && (g.emissiveMap.value = p.emissiveMap, i(p.emissiveMap, g.emissiveMapTransform)), p.specularMap && (g.specularMap.value = p.specularMap, i(p.specularMap, g.specularMapTransform)), p.alphaTest > 0 && (g.alphaTest.value = p.alphaTest);
|
|
21164
21181
|
const S = t.get(p), M = S.envMap, v = S.envMapRotation;
|
|
21165
|
-
M && (
|
|
21182
|
+
M && (g.envMap.value = M, g.envMapRotation.value.setFromMatrix4(_v.makeRotationFromEuler(v)).transpose(), M.isCubeTexture && M.isRenderTargetTexture === !1 && g.envMapRotation.value.premultiply(qh), g.reflectivity.value = p.reflectivity, g.ior.value = p.ior, g.refractionRatio.value = p.refractionRatio), p.lightMap && (g.lightMap.value = p.lightMap, g.lightMapIntensity.value = p.lightMapIntensity, i(p.lightMap, g.lightMapTransform)), p.aoMap && (g.aoMap.value = p.aoMap, g.aoMapIntensity.value = p.aoMapIntensity, i(p.aoMap, g.aoMapTransform));
|
|
21166
21183
|
}
|
|
21167
|
-
function a(
|
|
21168
|
-
|
|
21184
|
+
function a(g, p) {
|
|
21185
|
+
g.diffuse.value.copy(p.color), g.opacity.value = p.opacity, p.map && (g.map.value = p.map, i(p.map, g.mapTransform));
|
|
21169
21186
|
}
|
|
21170
|
-
function o(
|
|
21171
|
-
|
|
21187
|
+
function o(g, p) {
|
|
21188
|
+
g.dashSize.value = p.dashSize, g.totalSize.value = p.dashSize + p.gapSize, g.scale.value = p.scale;
|
|
21172
21189
|
}
|
|
21173
|
-
function l(
|
|
21174
|
-
|
|
21190
|
+
function l(g, p, S, M) {
|
|
21191
|
+
g.diffuse.value.copy(p.color), g.opacity.value = p.opacity, g.size.value = p.size * S, g.scale.value = M * 0.5, p.map && (g.map.value = p.map, i(p.map, g.uvTransform)), p.alphaMap && (g.alphaMap.value = p.alphaMap, i(p.alphaMap, g.alphaMapTransform)), p.alphaTest > 0 && (g.alphaTest.value = p.alphaTest);
|
|
21175
21192
|
}
|
|
21176
|
-
function c(
|
|
21177
|
-
|
|
21193
|
+
function c(g, p) {
|
|
21194
|
+
g.diffuse.value.copy(p.color), g.opacity.value = p.opacity, g.rotation.value = p.rotation, p.map && (g.map.value = p.map, i(p.map, g.mapTransform)), p.alphaMap && (g.alphaMap.value = p.alphaMap, i(p.alphaMap, g.alphaMapTransform)), p.alphaTest > 0 && (g.alphaTest.value = p.alphaTest);
|
|
21178
21195
|
}
|
|
21179
|
-
function h(
|
|
21180
|
-
|
|
21196
|
+
function h(g, p) {
|
|
21197
|
+
g.specular.value.copy(p.specular), g.shininess.value = Math.max(p.shininess, 1e-4);
|
|
21181
21198
|
}
|
|
21182
|
-
function d(
|
|
21183
|
-
p.gradientMap && (
|
|
21199
|
+
function d(g, p) {
|
|
21200
|
+
p.gradientMap && (g.gradientMap.value = p.gradientMap);
|
|
21184
21201
|
}
|
|
21185
|
-
function u(
|
|
21186
|
-
|
|
21202
|
+
function u(g, p) {
|
|
21203
|
+
g.metalness.value = p.metalness, p.metalnessMap && (g.metalnessMap.value = p.metalnessMap, i(p.metalnessMap, g.metalnessMapTransform)), g.roughness.value = p.roughness, p.roughnessMap && (g.roughnessMap.value = p.roughnessMap, i(p.roughnessMap, g.roughnessMapTransform)), p.envMap && (g.envMapIntensity.value = p.envMapIntensity);
|
|
21187
21204
|
}
|
|
21188
|
-
function f(
|
|
21189
|
-
|
|
21205
|
+
function f(g, p, S) {
|
|
21206
|
+
g.ior.value = p.ior, p.sheen > 0 && (g.sheenColor.value.copy(p.sheenColor).multiplyScalar(p.sheen), g.sheenRoughness.value = p.sheenRoughness, p.sheenColorMap && (g.sheenColorMap.value = p.sheenColorMap, i(p.sheenColorMap, g.sheenColorMapTransform)), p.sheenRoughnessMap && (g.sheenRoughnessMap.value = p.sheenRoughnessMap, i(p.sheenRoughnessMap, g.sheenRoughnessMapTransform))), p.clearcoat > 0 && (g.clearcoat.value = p.clearcoat, g.clearcoatRoughness.value = p.clearcoatRoughness, p.clearcoatMap && (g.clearcoatMap.value = p.clearcoatMap, i(p.clearcoatMap, g.clearcoatMapTransform)), p.clearcoatRoughnessMap && (g.clearcoatRoughnessMap.value = p.clearcoatRoughnessMap, i(p.clearcoatRoughnessMap, g.clearcoatRoughnessMapTransform)), p.clearcoatNormalMap && (g.clearcoatNormalMap.value = p.clearcoatNormalMap, i(p.clearcoatNormalMap, g.clearcoatNormalMapTransform), g.clearcoatNormalScale.value.copy(p.clearcoatNormalScale), p.side === 1 && g.clearcoatNormalScale.value.negate())), p.dispersion > 0 && (g.dispersion.value = p.dispersion), p.iridescence > 0 && (g.iridescence.value = p.iridescence, g.iridescenceIOR.value = p.iridescenceIOR, g.iridescenceThicknessMinimum.value = p.iridescenceThicknessRange[0], g.iridescenceThicknessMaximum.value = p.iridescenceThicknessRange[1], p.iridescenceMap && (g.iridescenceMap.value = p.iridescenceMap, i(p.iridescenceMap, g.iridescenceMapTransform)), p.iridescenceThicknessMap && (g.iridescenceThicknessMap.value = p.iridescenceThicknessMap, i(p.iridescenceThicknessMap, g.iridescenceThicknessMapTransform))), p.transmission > 0 && (g.transmission.value = p.transmission, g.transmissionSamplerMap.value = S.texture, g.transmissionSamplerSize.value.set(S.width, S.height), p.transmissionMap && (g.transmissionMap.value = p.transmissionMap, i(p.transmissionMap, g.transmissionMapTransform)), g.thickness.value = p.thickness, p.thicknessMap && (g.thicknessMap.value = p.thicknessMap, i(p.thicknessMap, g.thicknessMapTransform)), g.attenuationDistance.value = p.attenuationDistance, g.attenuationColor.value.copy(p.attenuationColor)), p.anisotropy > 0 && (g.anisotropyVector.value.set(p.anisotropy * Math.cos(p.anisotropyRotation), p.anisotropy * Math.sin(p.anisotropyRotation)), p.anisotropyMap && (g.anisotropyMap.value = p.anisotropyMap, i(p.anisotropyMap, g.anisotropyMapTransform))), g.specularIntensity.value = p.specularIntensity, g.specularColor.value.copy(p.specularColor), p.specularColorMap && (g.specularColorMap.value = p.specularColorMap, i(p.specularColorMap, g.specularColorMapTransform)), p.specularIntensityMap && (g.specularIntensityMap.value = p.specularIntensityMap, i(p.specularIntensityMap, g.specularIntensityMapTransform));
|
|
21190
21207
|
}
|
|
21191
|
-
function g
|
|
21192
|
-
p.matcap && (
|
|
21208
|
+
function m(g, p) {
|
|
21209
|
+
p.matcap && (g.matcap.value = p.matcap);
|
|
21193
21210
|
}
|
|
21194
|
-
function _(
|
|
21211
|
+
function _(g, p) {
|
|
21195
21212
|
const S = t.get(p).light;
|
|
21196
|
-
|
|
21213
|
+
g.referencePosition.value.setFromMatrixPosition(S.matrixWorld), g.nearDistance.value = S.shadow.camera.near, g.farDistance.value = S.shadow.camera.far;
|
|
21197
21214
|
}
|
|
21198
21215
|
return {
|
|
21199
21216
|
refreshFogUniforms: n,
|
|
@@ -21209,7 +21226,7 @@ function xv(e, t, i, n) {
|
|
|
21209
21226
|
}
|
|
21210
21227
|
function c(v, E) {
|
|
21211
21228
|
let w = r[v.id];
|
|
21212
|
-
w === void 0 && (
|
|
21229
|
+
w === void 0 && (g(v), w = h(v), r[v.id] = w, v.addEventListener("dispose", S));
|
|
21213
21230
|
const R = E.program;
|
|
21214
21231
|
n.updateUBOMapping(v, R);
|
|
21215
21232
|
const y = t.render.frame;
|
|
@@ -21243,13 +21260,13 @@ function xv(e, t, i, n) {
|
|
|
21243
21260
|
let U = 0;
|
|
21244
21261
|
for (let I = 0; I < T.length; I++) {
|
|
21245
21262
|
const F = T[I], X = p(F);
|
|
21246
|
-
|
|
21263
|
+
m(F, v.__data, U), typeof F != "number" && typeof F != "boolean" && !F.isMatrix3 && !ArrayBuffer.isView(F) && (U += X.storage / Float32Array.BYTES_PER_ELEMENT);
|
|
21247
21264
|
}
|
|
21248
|
-
} else
|
|
21265
|
+
} else m(T, v.__data, 0);
|
|
21249
21266
|
e.bufferSubData(e.UNIFORM_BUFFER, y, v.__data);
|
|
21250
21267
|
}
|
|
21251
21268
|
}
|
|
21252
|
-
function
|
|
21269
|
+
function m(v, E, w) {
|
|
21253
21270
|
typeof v == "number" || typeof v == "boolean" ? E[0] = v : v.isMatrix3 ? (E[0] = v.elements[0], E[1] = v.elements[1], E[2] = v.elements[2], E[3] = 0, E[4] = v.elements[3], E[5] = v.elements[4], E[6] = v.elements[5], E[7] = 0, E[8] = v.elements[6], E[9] = v.elements[7], E[10] = v.elements[8], E[11] = 0) : ArrayBuffer.isView(v) ? E.set(new v.constructor(v.buffer, v.byteOffset, E.length)) : v.toArray(E, w);
|
|
21254
21271
|
}
|
|
21255
21272
|
function _(v, E, w, R) {
|
|
@@ -21269,7 +21286,7 @@ function xv(e, t, i, n) {
|
|
|
21269
21286
|
}
|
|
21270
21287
|
return !1;
|
|
21271
21288
|
}
|
|
21272
|
-
function
|
|
21289
|
+
function g(v) {
|
|
21273
21290
|
const E = v.uniforms;
|
|
21274
21291
|
let w = 0;
|
|
21275
21292
|
const R = 16;
|
|
@@ -21824,7 +21841,7 @@ var Mv = new Uint16Array([
|
|
|
21824
21841
|
1183
|
|
21825
21842
|
]), ui = null;
|
|
21826
21843
|
function Sv() {
|
|
21827
|
-
return ui === null && (ui = new si(Mv, 16, 16, Is,
|
|
21844
|
+
return ui === null && (ui = new si(Mv, 16, 16, Is, hn), ui.name = "DFG_LUT", ui.minFilter = St, ui.magFilter = St, ui.wrapS = Zt, ui.wrapT = Zt, ui.generateMipmaps = !1, ui.needsUpdate = !0), ui;
|
|
21828
21845
|
}
|
|
21829
21846
|
var Wy = class {
|
|
21830
21847
|
constructor(e = {}) {
|
|
@@ -21835,11 +21852,11 @@ var Wy = class {
|
|
|
21835
21852
|
if (typeof WebGLRenderingContext < "u" && i instanceof WebGLRenderingContext) throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");
|
|
21836
21853
|
f = i.getContextAttributes().alpha;
|
|
21837
21854
|
} else f = s;
|
|
21838
|
-
const
|
|
21855
|
+
const m = u, _ = /* @__PURE__ */ new Set([
|
|
21839
21856
|
yc,
|
|
21840
21857
|
_c,
|
|
21841
21858
|
to
|
|
21842
|
-
]),
|
|
21859
|
+
]), g = /* @__PURE__ */ new Set([
|
|
21843
21860
|
Fi,
|
|
21844
21861
|
Bi,
|
|
21845
21862
|
dc,
|
|
@@ -21894,7 +21911,8 @@ var Wy = class {
|
|
|
21894
21911
|
};
|
|
21895
21912
|
if ("setAttribute" in t && t.setAttribute("data-engine", "three.js r185"), t.addEventListener("webglcontextlost", ze, !1), t.addEventListener("webglcontextrestored", Ft, !1), t.addEventListener("webglcontextcreationerror", ut, !1), P === null) {
|
|
21896
21913
|
const O = "webgl2";
|
|
21897
|
-
if (P = mt(O, b), P === null)
|
|
21914
|
+
if (P = mt(O, b), P === null)
|
|
21915
|
+
throw mt(O) ? new Error("THREE.WebGLRenderer: Error creating WebGL context with your selected attributes.") : new Error("THREE.WebGLRenderer: Error creating WebGL context.");
|
|
21898
21916
|
}
|
|
21899
21917
|
} catch (b) {
|
|
21900
21918
|
throw Pe("WebGLRenderer: " + b.message), b;
|
|
@@ -21903,7 +21921,7 @@ var Wy = class {
|
|
|
21903
21921
|
function j() {
|
|
21904
21922
|
tt = new Sm(P), tt.init(), Q = new fv(P, tt), Qe = new pm(P, tt, e, Q), A = new uv(P, tt), Qe.reversedDepthBuffer && d && A.buffers.depth.setReversed(!0), F = P.createFramebuffer(), X = P.createFramebuffer(), k = P.createFramebuffer(), x = new Am(P), L = new $g(), H = new dv(P, tt, A, L, Qe, Q, x), K = new Mm(T), se = new cm(P), Me = new dm(P, se), ue = new bm(P, se, x, Me), D = new wm(P, ue, se, Me, x), it = new Em(P, Qe, H), Ie = new mm(L), ae = new Kg(T, K, tt, Qe, Me, Ie), Se = new yv(T, L), Ce = new jg(), te = new sv(tt), Ge = new um(T, K, A, D, f, o), Oe = new hv(T, D, Qe), Ee = new xv(P, x, Qe, A), N = new fm(P, tt, x), Z = new Tm(P, tt, x), x.programs = ae.programs, T.capabilities = Qe, T.extensions = tt, T.properties = L, T.renderLists = Ce, T.shadowMap = Oe, T.state = A, T.info = x;
|
|
21905
21923
|
}
|
|
21906
|
-
j(),
|
|
21924
|
+
j(), m !== 1009 && (y = new Rm(m, t.width, t.height, a, n, r));
|
|
21907
21925
|
const pe = new vv(T, P);
|
|
21908
21926
|
this.xr = pe, this.getContext = function() {
|
|
21909
21927
|
return P;
|
|
@@ -21932,7 +21950,7 @@ var Wy = class {
|
|
|
21932
21950
|
}, this.setDrawingBufferSize = function(b, O, W) {
|
|
21933
21951
|
Y = b, oe = O, ve = W, t.width = Math.floor(b * W), t.height = Math.floor(O * W), this.setViewport(0, 0, b, O);
|
|
21934
21952
|
}, this.setEffects = function(b) {
|
|
21935
|
-
if (
|
|
21953
|
+
if (m === 1009) {
|
|
21936
21954
|
Pe("WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");
|
|
21937
21955
|
return;
|
|
21938
21956
|
}
|
|
@@ -21978,7 +21996,7 @@ var Wy = class {
|
|
|
21978
21996
|
B = _.has(le);
|
|
21979
21997
|
}
|
|
21980
21998
|
if (B) {
|
|
21981
|
-
const le = z.texture.type, me =
|
|
21999
|
+
const le = z.texture.type, me = g.has(le), Te = Ge.getClearColor(), Ae = Ge.getClearAlpha(), ke = Te.r, $e = Te.g, je = Te.b;
|
|
21982
22000
|
me ? (p[0] = ke, p[1] = $e, p[2] = je, p[3] = Ae, P.clearBufferuiv(P.COLOR, 0, p)) : (S[0] = ke, S[1] = $e, S[2] = je, S[3] = Ae, P.clearBufferiv(P.COLOR, 0, S));
|
|
21983
22001
|
} else V |= P.COLOR_BUFFER_BIT;
|
|
21984
22002
|
}
|
|
@@ -22034,18 +22052,20 @@ var Wy = class {
|
|
|
22034
22052
|
if (vt < 0 || vt === 1 / 0) return;
|
|
22035
22053
|
Me.setup(B, V, Te, W, Ae);
|
|
22036
22054
|
let _t, nt = N;
|
|
22037
|
-
if (Ae !== null && (_t = se.get(Ae), nt = Z, nt.setIndex(_t)), B.isMesh)
|
|
22055
|
+
if (Ae !== null && (_t = se.get(Ae), nt = Z, nt.setIndex(_t)), B.isMesh)
|
|
22056
|
+
V.wireframe === !0 ? (A.setLineWidth(V.wireframeLinewidth * Xe()), nt.setMode(P.LINES)) : nt.setMode(P.TRIANGLES);
|
|
22038
22057
|
else if (B.isLine) {
|
|
22039
22058
|
let It = V.linewidth;
|
|
22040
22059
|
It === void 0 && (It = 1), A.setLineWidth(It * Xe()), B.isLineSegments ? nt.setMode(P.LINES) : B.isLineLoop ? nt.setMode(P.LINE_LOOP) : nt.setMode(P.LINE_STRIP);
|
|
22041
22060
|
} else B.isPoints ? nt.setMode(P.POINTS) : B.isSprite && nt.setMode(P.TRIANGLES);
|
|
22042
|
-
if (B.isBatchedMesh)
|
|
22043
|
-
|
|
22044
|
-
|
|
22045
|
-
|
|
22046
|
-
|
|
22047
|
-
|
|
22048
|
-
|
|
22061
|
+
if (B.isBatchedMesh)
|
|
22062
|
+
if (tt.get("WEBGL_multi_draw"))
|
|
22063
|
+
nt.renderMultiDraw(B._multiDrawStarts, B._multiDrawCounts, B._multiDrawCount);
|
|
22064
|
+
else {
|
|
22065
|
+
const It = B._multiDrawStarts, Re = B._multiDrawCounts, ti = B._multiDrawCount, rt = Ae ? se.get(Ae).bytesPerElement : 1, $t = L.get(V).currentProgram.getUniforms();
|
|
22066
|
+
for (let ci = 0; ci < ti; ci++)
|
|
22067
|
+
$t.setValue(P, "_gl_DrawID", ci), nt.render(It[ci] / rt, Re[ci]);
|
|
22068
|
+
}
|
|
22049
22069
|
else if (B.isInstancedMesh) nt.renderInstances(Fe, vt, B.count);
|
|
22050
22070
|
else if (W.isInstancedBufferGeometry) {
|
|
22051
22071
|
const It = W._maxInstanceCount !== void 0 ? W._maxInstanceCount : 1 / 0, Re = Math.min(W.instanceCount, It);
|
|
@@ -22065,12 +22085,13 @@ var Wy = class {
|
|
|
22065
22085
|
return b.traverse(function(B) {
|
|
22066
22086
|
if (!(B.isMesh || B.isPoints || B.isLine || B.isSprite)) return;
|
|
22067
22087
|
const le = B.material;
|
|
22068
|
-
if (le)
|
|
22069
|
-
|
|
22070
|
-
|
|
22071
|
-
|
|
22072
|
-
|
|
22073
|
-
|
|
22088
|
+
if (le)
|
|
22089
|
+
if (Array.isArray(le)) for (let me = 0; me < le.length; me++) {
|
|
22090
|
+
const Te = le[me];
|
|
22091
|
+
yo(Te, W, B), V.add(Te);
|
|
22092
|
+
}
|
|
22093
|
+
else
|
|
22094
|
+
yo(le, W, B), V.add(le);
|
|
22074
22095
|
}), E = R.pop(), V;
|
|
22075
22096
|
}, this.compileAsync = function(b, O, W = null) {
|
|
22076
22097
|
const V = this.compile(b, O, W);
|
|
@@ -22108,7 +22129,7 @@ var Wy = class {
|
|
|
22108
22129
|
if (U === !0) return;
|
|
22109
22130
|
I !== null && I.renderStart(b, O);
|
|
22110
22131
|
const W = pe.enabled === !0 && pe.isPresenting === !0, V = y !== null && (z === null || W) && y.begin(T, z);
|
|
22111
|
-
if (b.matrixWorldAutoUpdate === !0 && b.updateMatrixWorld(), O.parent === null && O.matrixWorldAutoUpdate === !0 && O.updateMatrixWorld(), pe.enabled === !0 && pe.isPresenting === !0 && (y === null || y.isCompositing() === !1) && (pe.cameraAutoUpdate === !0 && pe.updateCamera(O), O = pe.getCamera()), b.isScene === !0 && b.onBeforeRender(T, b, O, z), E = te.get(b, R.length), E.init(O), E.state.textureUnits = H.getTextureUnits(), R.push(E), _e.multiplyMatrices(O.projectionMatrix, O.matrixWorldInverse), J.setFromProjectionMatrix(_e,
|
|
22132
|
+
if (b.matrixWorldAutoUpdate === !0 && b.updateMatrixWorld(), O.parent === null && O.matrixWorldAutoUpdate === !0 && O.updateMatrixWorld(), pe.enabled === !0 && pe.isPresenting === !0 && (y === null || y.isCompositing() === !1) && (pe.cameraAutoUpdate === !0 && pe.updateCamera(O), O = pe.getCamera()), b.isScene === !0 && b.onBeforeRender(T, b, O, z), E = te.get(b, R.length), E.init(O), E.state.textureUnits = H.getTextureUnits(), R.push(E), _e.multiplyMatrices(O.projectionMatrix, O.matrixWorldInverse), J.setFromProjectionMatrix(_e, un, O.reversedDepth), ce = this.localClippingEnabled, re = Ie.init(this.clippingPlanes, ce), v = Ce.get(b, w.length), v.init(), w.push(v), pe.enabled === !0 && pe.isPresenting === !0) {
|
|
22112
22133
|
const le = T.xr.getDepthSensingMesh();
|
|
22113
22134
|
le !== null && Ks(le, O, -1 / 0, T.sortObjects);
|
|
22114
22135
|
}
|
|
@@ -22171,7 +22192,7 @@ var Wy = class {
|
|
|
22171
22192
|
const je = tt.has("EXT_color_buffer_half_float") || tt.has("EXT_color_buffer_float");
|
|
22172
22193
|
E.state.transmissionRenderTarget[V.id] = new ei(1, 1, {
|
|
22173
22194
|
generateMipmaps: !0,
|
|
22174
|
-
type: je ?
|
|
22195
|
+
type: je ? hn : Fi,
|
|
22175
22196
|
minFilter: Cr,
|
|
22176
22197
|
samples: Math.max(4, Qe.samples),
|
|
22177
22198
|
stencilBuffer: r,
|
|
@@ -22262,16 +22283,16 @@ var Wy = class {
|
|
|
22262
22283
|
V.version === Re.__version ? (Re.needsLights && Re.lightsStateVersion !== ti.state.version || Re.outputColorSpace !== Te || B.isBatchedMesh && Re.batching === !1 || !B.isBatchedMesh && Re.batching === !0 || B.isBatchedMesh && Re.batchingColor === !0 && B.colorTexture === null || B.isBatchedMesh && Re.batchingColor === !1 && B.colorTexture !== null || B.isInstancedMesh && Re.instancing === !1 || !B.isInstancedMesh && Re.instancing === !0 || B.isSkinnedMesh && Re.skinning === !1 || !B.isSkinnedMesh && Re.skinning === !0 || B.isInstancedMesh && Re.instancingColor === !0 && B.instanceColor === null || B.isInstancedMesh && Re.instancingColor === !1 && B.instanceColor !== null || B.isInstancedMesh && Re.instancingMorph === !0 && B.morphTexture === null || B.isInstancedMesh && Re.instancingMorph === !1 && B.morphTexture !== null || Re.envMap !== ke || V.fog === !0 && Re.fog !== le || Re.numClippingPlanes !== void 0 && (Re.numClippingPlanes !== Ie.numPlanes || Re.numIntersection !== Ie.numIntersection) || Re.vertexAlphas !== $e || Re.vertexTangents !== je || Re.morphTargets !== Fe || Re.morphNormals !== dt || Re.morphColors !== vt || Re.toneMapping !== _t || Re.morphTargetsCount !== It || !!Re.lightProbeGrid != E.state.lightProbeGridArray.length > 0) && (rt = !0) : (rt = !0, Re.__version = V.version);
|
|
22263
22284
|
let $t = Re.currentProgram;
|
|
22264
22285
|
rt === !0 && ($t = Ur(V, O, B), I && V.isNodeMaterial && I.onUpdateProgram(V, $t, Re));
|
|
22265
|
-
let ci = !1, Ei = !1,
|
|
22286
|
+
let ci = !1, Ei = !1, gn = !1;
|
|
22266
22287
|
const ct = $t.getUniforms(), xt = Re.uniforms;
|
|
22267
|
-
if (A.useProgram($t.program) && (ci = !0, Ei = !0,
|
|
22288
|
+
if (A.useProgram($t.program) && (ci = !0, Ei = !0, gn = !0), V.id !== ee && (ee = V.id, Ei = !0), Re.needsLights) {
|
|
22268
22289
|
const ot = Jh(E.state.lightProbeGridArray, B);
|
|
22269
22290
|
Re.lightProbeGrid !== ot && (Re.lightProbeGrid = ot, Ei = !0);
|
|
22270
22291
|
}
|
|
22271
22292
|
if (ci || ie !== b) {
|
|
22272
22293
|
A.buffers.depth.getReversed() && b.reversedDepth !== !0 && (b._reversedDepth = !0, b.updateProjectionMatrix()), ct.setValue(P, "projectionMatrix", b.projectionMatrix), ct.setValue(P, "viewMatrix", b.matrixWorldInverse);
|
|
22273
22294
|
const ot = ct.map.cameraPosition;
|
|
22274
|
-
ot !== void 0 && ot.setValue(P, ye.setFromMatrixPosition(b.matrixWorld)), Qe.logarithmicDepthBuffer && ct.setValue(P, "logDepthBufFC", 2 / (Math.log(b.far + 1) / Math.LN2)), (V.isMeshPhongMaterial || V.isMeshToonMaterial || V.isMeshLambertMaterial || V.isMeshBasicMaterial || V.isMeshStandardMaterial || V.isShaderMaterial) && ct.setValue(P, "isOrthographic", b.isOrthographicCamera === !0), ie !== b && (ie = b, Ei = !0,
|
|
22295
|
+
ot !== void 0 && ot.setValue(P, ye.setFromMatrixPosition(b.matrixWorld)), Qe.logarithmicDepthBuffer && ct.setValue(P, "logDepthBufFC", 2 / (Math.log(b.far + 1) / Math.LN2)), (V.isMeshPhongMaterial || V.isMeshToonMaterial || V.isMeshLambertMaterial || V.isMeshBasicMaterial || V.isMeshStandardMaterial || V.isShaderMaterial) && ct.setValue(P, "isOrthographic", b.isOrthographicCamera === !0), ie !== b && (ie = b, Ei = !0, gn = !0);
|
|
22275
22296
|
}
|
|
22276
22297
|
if (Re.needsLights && (ti.state.directionalShadowMap.length > 0 && ct.setValue(P, "directionalShadowMap", ti.state.directionalShadowMap, H), ti.state.spotShadowMap.length > 0 && ct.setValue(P, "spotShadowMap", ti.state.spotShadowMap, H), ti.state.pointShadowMap.length > 0 && ct.setValue(P, "pointShadowMap", ti.state.pointShadowMap, H)), B.isSkinnedMesh) {
|
|
22277
22298
|
ct.setOptional(P, B, "bindMatrix"), ct.setOptional(P, B, "bindMatrixInverse");
|
|
@@ -22281,7 +22302,7 @@ var Wy = class {
|
|
|
22281
22302
|
B.isBatchedMesh && (ct.setOptional(P, B, "batchingTexture"), ct.setValue(P, "batchingTexture", B._matricesTexture, H), ct.setOptional(P, B, "batchingIdTexture"), ct.setValue(P, "batchingIdTexture", B._indirectTexture, H), ct.setOptional(P, B, "batchingColorTexture"), B._colorsTexture !== null && ct.setValue(P, "batchingColorTexture", B._colorsTexture, H));
|
|
22282
22303
|
const wi = W.morphAttributes;
|
|
22283
22304
|
if ((wi.position !== void 0 || wi.normal !== void 0 || wi.color !== void 0) && it.update(B, W, $t), (Ei || Re.receiveShadow !== B.receiveShadow) && (Re.receiveShadow = B.receiveShadow, ct.setValue(P, "receiveShadow", B.receiveShadow)), (V.isMeshStandardMaterial || V.isMeshLambertMaterial || V.isMeshPhongMaterial) && V.envMap === null && O.environment !== null && (xt.envMapIntensity.value = O.environmentIntensity), xt.dfgLUT !== void 0 && (xt.dfgLUT.value = Sv()), Ei) {
|
|
22284
|
-
if (ct.setValue(P, "toneMappingExposure", T.toneMappingExposure), Re.needsLights && $h(xt,
|
|
22305
|
+
if (ct.setValue(P, "toneMappingExposure", T.toneMappingExposure), Re.needsLights && $h(xt, gn), le && V.fog === !0 && Se.refreshFogUniforms(xt, le), Se.refreshMaterialUniforms(xt, V, ve, oe, E.state.transmissionRenderTarget[b.id]), Re.needsLights && Re.lightProbeGrid) {
|
|
22285
22306
|
const ot = Re.lightProbeGrid;
|
|
22286
22307
|
xt.probesSH.value = ot.texture, xt.probesMin.value.copy(ot.boundingBox.min), xt.probesMax.value.copy(ot.boundingBox.max), xt.probesResolution.value.copy(ot.resolution);
|
|
22287
22308
|
}
|
|
@@ -22289,7 +22310,7 @@ var Wy = class {
|
|
|
22289
22310
|
}
|
|
22290
22311
|
if (V.isShaderMaterial && V.uniformsNeedUpdate === !0 && (ws.upload(P, Ao(Re), xt, H), V.uniformsNeedUpdate = !1), V.isSpriteMaterial && ct.setValue(P, "center", B.center), ct.setValue(P, "modelViewMatrix", B.modelViewMatrix), ct.setValue(P, "normalMatrix", B.normalMatrix), ct.setValue(P, "modelMatrix", B.matrixWorld), V.uniformsGroups !== void 0) {
|
|
22291
22312
|
const ot = V.uniformsGroups;
|
|
22292
|
-
for (let er = 0,
|
|
22313
|
+
for (let er = 0, vn = ot.length; er < vn; er++) {
|
|
22293
22314
|
const wo = ot[er];
|
|
22294
22315
|
Ee.update(wo, $t), Ee.bind(wo, $t);
|
|
22295
22316
|
}
|
|
@@ -22378,18 +22399,19 @@ var Wy = class {
|
|
|
22378
22399
|
}, this.readRenderTargetPixelsAsync = async function(b, O, W, V, B, le, me, Te = 0) {
|
|
22379
22400
|
if (!(b && b.isWebGLRenderTarget)) throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
|
|
22380
22401
|
let Ae = L.get(b).__webglFramebuffer;
|
|
22381
|
-
if (b.isWebGLCubeRenderTarget && me !== void 0 && (Ae = Ae[me]), Ae)
|
|
22382
|
-
|
|
22383
|
-
|
|
22384
|
-
|
|
22385
|
-
|
|
22386
|
-
|
|
22387
|
-
|
|
22388
|
-
|
|
22389
|
-
|
|
22390
|
-
|
|
22391
|
-
|
|
22392
|
-
|
|
22402
|
+
if (b.isWebGLCubeRenderTarget && me !== void 0 && (Ae = Ae[me]), Ae)
|
|
22403
|
+
if (O >= 0 && O <= b.width - V && W >= 0 && W <= b.height - B) {
|
|
22404
|
+
A.bindFramebuffer(P.FRAMEBUFFER, Ae);
|
|
22405
|
+
const ke = b.textures[Te], $e = ke.format, je = ke.type;
|
|
22406
|
+
if (b.textures.length > 1 && P.readBuffer(P.COLOR_ATTACHMENT0 + Te), !Qe.textureFormatReadable($e)) throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");
|
|
22407
|
+
if (!Qe.textureTypeReadable(je)) throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
22408
|
+
const Fe = P.createBuffer();
|
|
22409
|
+
P.bindBuffer(P.PIXEL_PACK_BUFFER, Fe), P.bufferData(P.PIXEL_PACK_BUFFER, le.byteLength, P.STREAM_READ), P.readPixels(O, W, V, B, Q.convert($e), Q.convert(je), 0);
|
|
22410
|
+
const dt = z !== null ? L.get(z).__webglFramebuffer : null;
|
|
22411
|
+
A.bindFramebuffer(P.FRAMEBUFFER, dt);
|
|
22412
|
+
const vt = P.fenceSync(P.SYNC_GPU_COMMANDS_COMPLETE, 0);
|
|
22413
|
+
return P.flush(), await Ju(P, vt, 4), P.bindBuffer(P.PIXEL_PACK_BUFFER, Fe), P.getBufferSubData(P.PIXEL_PACK_BUFFER, 0, le), P.deleteBuffer(Fe), P.deleteSync(vt), le;
|
|
22414
|
+
} else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.");
|
|
22393
22415
|
}, this.copyFramebufferToTexture = function(b, O = null, W = 0) {
|
|
22394
22416
|
const V = Math.pow(2, -W), B = Math.floor(b.image.width * V), le = Math.floor(b.image.height * V), me = O !== null ? O.x : 0, Te = O !== null ? O.y : 0;
|
|
22395
22417
|
H.setTexture2D(b, 0), P.copyTexSubImage2D(P.TEXTURE_2D, W, 0, 0, me, Te, B, le), A.unbindTexture();
|
|
@@ -22408,18 +22430,18 @@ var Wy = class {
|
|
|
22408
22430
|
O.isData3DTexture ? (H.setTexture3D(O, 0), Re = P.TEXTURE_3D) : O.isDataArrayTexture || O.isCompressedArrayTexture ? (H.setTexture2DArray(O, 0), Re = P.TEXTURE_2D_ARRAY) : (H.setTexture2D(O, 0), Re = P.TEXTURE_2D), A.activeTexture(P.TEXTURE0), A.pixelStorei(P.UNPACK_FLIP_Y_WEBGL, O.flipY), A.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL, O.premultiplyAlpha), A.pixelStorei(P.UNPACK_ALIGNMENT, O.unpackAlignment);
|
|
22409
22431
|
const ti = A.getParameter(P.UNPACK_ROW_LENGTH), rt = A.getParameter(P.UNPACK_IMAGE_HEIGHT), $t = A.getParameter(P.UNPACK_SKIP_PIXELS), ci = A.getParameter(P.UNPACK_SKIP_ROWS), Ei = A.getParameter(P.UNPACK_SKIP_IMAGES);
|
|
22410
22432
|
A.pixelStorei(P.UNPACK_ROW_LENGTH, _t.width), A.pixelStorei(P.UNPACK_IMAGE_HEIGHT, _t.height), A.pixelStorei(P.UNPACK_SKIP_PIXELS, ke), A.pixelStorei(P.UNPACK_SKIP_ROWS, $e), A.pixelStorei(P.UNPACK_SKIP_IMAGES, je);
|
|
22411
|
-
const
|
|
22433
|
+
const gn = b.isDataArrayTexture || b.isData3DTexture, ct = O.isDataArrayTexture || O.isData3DTexture;
|
|
22412
22434
|
if (b.isDepthTexture) {
|
|
22413
22435
|
const xt = L.get(b), wi = L.get(O), ot = L.get(xt.__renderTarget), er = L.get(wi.__renderTarget);
|
|
22414
22436
|
A.bindFramebuffer(P.READ_FRAMEBUFFER, ot.__webglFramebuffer), A.bindFramebuffer(P.DRAW_FRAMEBUFFER, er.__webglFramebuffer);
|
|
22415
|
-
for (let
|
|
22416
|
-
|
|
22437
|
+
for (let vn = 0; vn < Ae; vn++)
|
|
22438
|
+
gn && (P.framebufferTextureLayer(P.READ_FRAMEBUFFER, P.COLOR_ATTACHMENT0, L.get(b).__webglTexture, B, je + vn), P.framebufferTextureLayer(P.DRAW_FRAMEBUFFER, P.COLOR_ATTACHMENT0, L.get(O).__webglTexture, le, vt + vn)), P.blitFramebuffer(ke, $e, me, Te, Fe, dt, me, Te, P.DEPTH_BUFFER_BIT, P.NEAREST);
|
|
22417
22439
|
A.bindFramebuffer(P.READ_FRAMEBUFFER, null), A.bindFramebuffer(P.DRAW_FRAMEBUFFER, null);
|
|
22418
22440
|
} else if (B !== 0 || b.isRenderTargetTexture || L.has(b)) {
|
|
22419
22441
|
const xt = L.get(b), wi = L.get(O);
|
|
22420
22442
|
A.bindFramebuffer(P.READ_FRAMEBUFFER, X), A.bindFramebuffer(P.DRAW_FRAMEBUFFER, k);
|
|
22421
22443
|
for (let ot = 0; ot < Ae; ot++)
|
|
22422
|
-
|
|
22444
|
+
gn ? P.framebufferTextureLayer(P.READ_FRAMEBUFFER, P.COLOR_ATTACHMENT0, xt.__webglTexture, B, je + ot) : P.framebufferTexture2D(P.READ_FRAMEBUFFER, P.COLOR_ATTACHMENT0, P.TEXTURE_2D, xt.__webglTexture, B), ct ? P.framebufferTextureLayer(P.DRAW_FRAMEBUFFER, P.COLOR_ATTACHMENT0, wi.__webglTexture, le, vt + ot) : P.framebufferTexture2D(P.DRAW_FRAMEBUFFER, P.COLOR_ATTACHMENT0, P.TEXTURE_2D, wi.__webglTexture, le), B !== 0 ? P.blitFramebuffer(ke, $e, me, Te, Fe, dt, me, Te, P.COLOR_BUFFER_BIT, P.NEAREST) : ct ? P.copyTexSubImage3D(Re, le, Fe, dt, vt + ot, ke, $e, me, Te) : P.copyTexSubImage2D(Re, le, Fe, dt, ke, $e, me, Te);
|
|
22423
22445
|
A.bindFramebuffer(P.READ_FRAMEBUFFER, null), A.bindFramebuffer(P.DRAW_FRAMEBUFFER, null);
|
|
22424
22446
|
} else ct ? b.isDataTexture || b.isData3DTexture ? P.texSubImage3D(Re, le, Fe, dt, vt, me, Te, Ae, nt, It, _t.data) : O.isCompressedArrayTexture ? P.compressedTexSubImage3D(Re, le, Fe, dt, vt, me, Te, Ae, nt, _t.data) : P.texSubImage3D(Re, le, Fe, dt, vt, me, Te, Ae, nt, It, _t) : b.isDataTexture ? P.texSubImage2D(P.TEXTURE_2D, le, Fe, dt, me, Te, nt, It, _t.data) : b.isCompressedTexture ? P.compressedTexSubImage2D(P.TEXTURE_2D, le, Fe, dt, _t.width, _t.height, nt, _t.data) : P.texSubImage2D(P.TEXTURE_2D, le, Fe, dt, me, Te, nt, It, _t);
|
|
22425
22447
|
A.pixelStorei(P.UNPACK_ROW_LENGTH, ti), A.pixelStorei(P.UNPACK_IMAGE_HEIGHT, rt), A.pixelStorei(P.UNPACK_SKIP_PIXELS, $t), A.pixelStorei(P.UNPACK_SKIP_ROWS, ci), A.pixelStorei(P.UNPACK_SKIP_IMAGES, Ei), le === 0 && O.generateMipmaps && P.generateMipmap(Re), A.unbindTexture();
|
|
@@ -22432,7 +22454,7 @@ var Wy = class {
|
|
|
22432
22454
|
}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
|
|
22433
22455
|
}
|
|
22434
22456
|
get coordinateSystem() {
|
|
22435
|
-
return
|
|
22457
|
+
return un;
|
|
22436
22458
|
}
|
|
22437
22459
|
get outputColorSpace() {
|
|
22438
22460
|
return this._outputColorSpace;
|
|
@@ -22584,7 +22606,7 @@ export {
|
|
|
22584
22606
|
Ly as GridHelper,
|
|
22585
22607
|
mr as Group,
|
|
22586
22608
|
ty as HTMLTexture,
|
|
22587
|
-
|
|
22609
|
+
hn as HalfFloatType,
|
|
22588
22610
|
xp as HemisphereLight,
|
|
22589
22611
|
Py as HemisphereLightHelper,
|
|
22590
22612
|
Gf as IcosahedronGeometry,
|
|
@@ -22622,9 +22644,9 @@ export {
|
|
|
22622
22644
|
f_ as LessEqualDepth,
|
|
22623
22645
|
h0 as LessEqualStencilFunc,
|
|
22624
22646
|
l0 as LessStencilFunc,
|
|
22625
|
-
|
|
22647
|
+
mn as Light,
|
|
22626
22648
|
Rp as LightProbe,
|
|
22627
|
-
|
|
22649
|
+
dn as Line,
|
|
22628
22650
|
wy as Line3,
|
|
22629
22651
|
Xt as LineBasicMaterial,
|
|
22630
22652
|
jc as LineCurve,
|
|
@@ -22657,7 +22679,7 @@ export {
|
|
|
22657
22679
|
He as Matrix4,
|
|
22658
22680
|
Zv as MaxEquation,
|
|
22659
22681
|
Tt as Mesh,
|
|
22660
|
-
|
|
22682
|
+
pn as MeshBasicMaterial,
|
|
22661
22683
|
Ah as MeshDepthMaterial,
|
|
22662
22684
|
Eh as MeshDistanceMaterial,
|
|
22663
22685
|
op as MeshLambertMaterial,
|
|
@@ -22801,7 +22823,7 @@ export {
|
|
|
22801
22823
|
Bd as Skeleton,
|
|
22802
22824
|
Ry as SkeletonHelper,
|
|
22803
22825
|
Od as SkinnedMesh,
|
|
22804
|
-
|
|
22826
|
+
an as Source,
|
|
22805
22827
|
Dt as Sphere,
|
|
22806
22828
|
gh as SphereGeometry,
|
|
22807
22829
|
Ty as Spherical,
|
|
@@ -22865,7 +22887,7 @@ export {
|
|
|
22865
22887
|
nf as VideoTexture,
|
|
22866
22888
|
G0 as WebGL3DRenderTarget,
|
|
22867
22889
|
k0 as WebGLArrayRenderTarget,
|
|
22868
|
-
|
|
22890
|
+
un as WebGLCoordinateSystem,
|
|
22869
22891
|
kh as WebGLCubeRenderTarget,
|
|
22870
22892
|
ei as WebGLRenderTarget,
|
|
22871
22893
|
Wy as WebGLRenderer,
|
|
@@ -22874,9 +22896,9 @@ export {
|
|
|
22874
22896
|
ra as WebXRController,
|
|
22875
22897
|
$f as WireframeGeometry,
|
|
22876
22898
|
Ls as WrapAroundEnding,
|
|
22877
|
-
|
|
22899
|
+
kn as ZeroCurvatureEnding,
|
|
22878
22900
|
Jv as ZeroFactor,
|
|
22879
|
-
|
|
22901
|
+
Gn as ZeroSlopeEnding,
|
|
22880
22902
|
e0 as ZeroStencilOp,
|
|
22881
22903
|
Zu as createCanvasElement,
|
|
22882
22904
|
Pe as error,
|
|
@@ -22884,5 +22906,5 @@ export {
|
|
|
22884
22906
|
Ds as log,
|
|
22885
22907
|
B0 as setConsoleFunction,
|
|
22886
22908
|
he as warn,
|
|
22887
|
-
|
|
22909
|
+
ln as warnOnce
|
|
22888
22910
|
};
|