@limrun/ui 0.17.0-rc.1 → 0.17.0-rc.2
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/README.md +18 -3
- package/dist/{GLTFLoader-DW6wpvyR.mjs → GLTFLoader-Cami_vza.mjs} +1 -1
- package/dist/{GLTFLoader-BKnsBFsj.js → GLTFLoader-DeCLxW_q.js} +1 -1
- package/dist/components/duo-fold-motion.d.ts +1 -1
- package/dist/components/duo-loading.d.ts +8 -0
- package/dist/components/duo-view.d.ts +6 -1
- package/dist/{duo-frame-BzyYljix.mjs → duo-frame-Cmw4p2uN.mjs} +414 -414
- package/dist/{duo-frame-DjfA4gG-.js → duo-frame-iMtrvx_a.js} +18 -18
- package/dist/duo-view-BAh-w2Kz.js +1 -0
- package/dist/duo-view-D9Ae00rj.mjs +512 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +2 -2
- package/dist/lite.cjs +1 -1
- package/dist/lite.js +1 -1
- package/dist/remote-control-B2jZpf3c.js +1 -0
- package/dist/remote-control-DiddxS8l.mjs +2883 -0
- package/package.json +5 -1
- package/dist/demo.d.ts +0 -1
- package/dist/duo-view-COZg8ieG.js +0 -1
- package/dist/duo-view-o1yxIzxu.mjs +0 -654
- package/dist/remote-control-CQjSEVDF.mjs +0 -2673
- package/dist/remote-control-DVRXfCR2.js +0 -1
- package/index.html +0 -199
- package/src/assets/Apple_logo_white.svg +0 -4
- package/src/assets/android_boot.gif +0 -0
- package/src/assets/android_boot.webp +0 -0
- package/src/assets/iphone16pro_black.webp +0 -0
- package/src/assets/iphone16pro_black_bg.webp +0 -0
- package/src/assets/iphone16pro_black_landscape.webp +0 -0
- package/src/assets/iphone16pro_black_landscape_bg.webp +0 -0
- package/src/assets/pixel9_black.webp +0 -0
- package/src/assets/pixel9_black_landscape.webp +0 -0
- package/src/assets/pixel_tablet_landscape.webp +0 -0
- package/src/assets/pixel_tablet_portrait.webp +0 -0
- package/src/components/device-install/index.ts +0 -1
- package/src/components/duo-button-hinge.test.tsx +0 -138
- package/src/components/duo-button-hinge.ts +0 -75
- package/src/components/duo-controls.tsx +0 -142
- package/src/components/duo-flat-frame.tsx +0 -145
- package/src/components/duo-flat-geometry.test.ts +0 -63
- package/src/components/duo-flat-geometry.ts +0 -97
- package/src/components/duo-fold-motion.test.tsx +0 -245
- package/src/components/duo-fold-motion.tsx +0 -192
- package/src/components/duo-fold-renderer.test.ts +0 -29
- package/src/components/duo-fold-renderer.ts +0 -397
- package/src/components/duo-fold-timing.test.ts +0 -44
- package/src/components/duo-fold-timing.ts +0 -9
- package/src/components/duo-frame.tsx +0 -579
- package/src/components/duo-hardware.test.ts +0 -61
- package/src/components/duo-hardware.ts +0 -61
- package/src/components/duo-model.test.ts +0 -243
- package/src/components/duo-model.ts +0 -607
- package/src/components/duo-screen-handoff.ts +0 -52
- package/src/components/duo-view.test.tsx +0 -104
- package/src/components/duo-view.tsx +0 -315
- package/src/components/inspect-overlay.css +0 -223
- package/src/components/inspect-overlay.tsx +0 -437
- package/src/components/remote-control-framed.tsx +0 -14
- package/src/components/remote-control.css +0 -441
- package/src/components/remote-control.test.ts +0 -34
- package/src/components/remote-control.tsx +0 -3989
- package/src/core/ax-fetcher.test.ts +0 -418
- package/src/core/ax-fetcher.ts +0 -387
- package/src/core/ax-tree.test.ts +0 -491
- package/src/core/ax-tree.ts +0 -416
- package/src/core/camera.test.ts +0 -155
- package/src/core/camera.ts +0 -133
- package/src/core/constants.ts +0 -344
- package/src/core/duo.test.ts +0 -142
- package/src/core/duo.ts +0 -156
- package/src/core/webrtc-messages.ts +0 -148
- package/src/demo.tsx +0 -283
- package/src/frame-assets.ts +0 -22
- package/src/hooks/index.ts +0 -1
- package/src/index.ts +0 -29
- package/src/lite.test.ts +0 -30
- package/src/lite.ts +0 -30
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.json +0 -26
- package/tsconfig.node.json +0 -26
- package/vite.config.ts +0 -35
- package/vitest.config.ts +0 -24
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as wr, jsx as Jn } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as en, useState as cs, useEffect as Ea } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const To = "183",
|
|
3
|
+
import { o as Tu, p as Au, i as wu, k as Cr, q as Cu, l as Ru, r as Pu } from "./remote-control-DiddxS8l.mjs";
|
|
4
|
+
import { u as Iu, D as Du, a as Lu } from "./duo-view-D9Ae00rj.mjs";
|
|
5
|
+
const To = "183", Nu = 0, ec = 1, Uu = 2, ls = 1, Fu = 2, ir = 3, Xn = 0, Oe = 1, hn = 2, Pn = 0, Li = 1, nc = 2, ic = 3, rc = 4, Ou = 5, ri = 100, Bu = 101, zu = 102, Vu = 103, ku = 104, Gu = 200, Hu = 201, Wu = 202, Xu = 203, Ta = 204, Aa = 205, qu = 206, Yu = 207, Zu = 208, Ju = 209, $u = 210, Ku = 211, ju = 212, Qu = 213, th = 214, wa = 0, Ca = 1, Ra = 2, Ui = 3, Pa = 4, Ia = 5, Da = 6, La = 7, Pl = 0, eh = 1, nh = 2, dn = 0, Il = 1, Dl = 2, Ll = 3, Ao = 4, Nl = 5, Ul = 6, Fl = 7, sc = "attached", ih = "detached", Ol = 300, li = 301, Fi = 302, us = 303, Us = 304, As = 306, Na = 1e3, An = 1001, Ua = 1002, Ce = 1003, rh = 1004, Rr = 1005, ve = 1006, Fs = 1007, oi = 1008, He = 1009, Bl = 1010, zl = 1011, fr = 1012, wo = 1013, mn = 1014, We = 1015, Dn = 1016, Co = 1017, Ro = 1018, dr = 1020, Vl = 35902, kl = 35899, Gl = 1021, Hl = 1022, Xe = 1023, Ln = 1026, ci = 1027, Po = 1028, Io = 1029, Oi = 1030, Do = 1031, Lo = 1033, hs = 33776, fs = 33777, ds = 33778, ps = 33779, Fa = 35840, Oa = 35841, Ba = 35842, za = 35843, Va = 36196, ka = 37492, Ga = 37496, Ha = 37488, Wa = 37489, Xa = 37490, qa = 37491, Ya = 37808, Za = 37809, Ja = 37810, $a = 37811, Ka = 37812, ja = 37813, Qa = 37814, to = 37815, eo = 37816, no = 37817, io = 37818, ro = 37819, so = 37820, ao = 37821, oo = 36492, co = 36494, lo = 36495, uo = 36283, ho = 36284, fo = 36285, po = 36286, gs = 2300, mo = 2301, Os = 2302, ac = 2303, oc = 2400, cc = 2401, lc = 2402, sh = 2500, ah = 0, oh = 1, uc = 2, ch = 3200, Wl = 0, lh = 1, Hn = "", Fe = "srgb", Bi = "srgb-linear", _s = "linear", re = "srgb", mi = 7680, hc = 519, uh = 512, hh = 513, fh = 514, No = 515, dh = 516, ph = 517, Uo = 518, mh = 519, go = 35044, fc = 35048, dc = "300 es", fn = 2e3, pr = 2001;
|
|
6
6
|
function gh(i) {
|
|
7
7
|
for (let t = i.length - 1; t >= 0; --t)
|
|
8
8
|
if (i[t] >= 65535) return !0;
|
|
@@ -72,11 +72,11 @@ const Mh = {
|
|
|
72
72
|
[wa]: Ca,
|
|
73
73
|
[Ra]: Da,
|
|
74
74
|
[Pa]: La,
|
|
75
|
-
[
|
|
75
|
+
[Ui]: Ia,
|
|
76
76
|
[Ca]: wa,
|
|
77
77
|
[Da]: Ra,
|
|
78
78
|
[La]: Pa,
|
|
79
|
-
[Ia]:
|
|
79
|
+
[Ia]: Ui
|
|
80
80
|
};
|
|
81
81
|
class Gi {
|
|
82
82
|
/**
|
|
@@ -191,10 +191,10 @@ function Dh(i) {
|
|
|
191
191
|
function Lh(i) {
|
|
192
192
|
return (i & i - 1) === 0 && i !== 0;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function Nh(i) {
|
|
195
195
|
return Math.pow(2, Math.ceil(Math.log(i) / Math.LN2));
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Uh(i) {
|
|
198
198
|
return Math.pow(2, Math.floor(Math.log(i) / Math.LN2));
|
|
199
199
|
}
|
|
200
200
|
function Fh(i, t, e, n, r) {
|
|
@@ -459,7 +459,7 @@ const si = {
|
|
|
459
459
|
* @param {number} value - The value to find a POT for.
|
|
460
460
|
* @return {number} The smallest power of two that is greater than or equal to the given number.
|
|
461
461
|
*/
|
|
462
|
-
ceilPowerOfTwo:
|
|
462
|
+
ceilPowerOfTwo: Nh,
|
|
463
463
|
/**
|
|
464
464
|
* Returns the largest power of two that is less than or equal to the given number.
|
|
465
465
|
*
|
|
@@ -468,7 +468,7 @@ const si = {
|
|
|
468
468
|
* @param {number} value - The value to find a POT for.
|
|
469
469
|
* @return {number} The largest power of two that is less than or equal to the given number.
|
|
470
470
|
*/
|
|
471
|
-
floorPowerOfTwo:
|
|
471
|
+
floorPowerOfTwo: Uh,
|
|
472
472
|
/**
|
|
473
473
|
* Sets the given quaternion from the [Intrinsic Proper Euler Angles](https://en.wikipedia.org/wiki/Euler_angles)
|
|
474
474
|
* defined by the given angles and order.
|
|
@@ -2656,7 +2656,7 @@ function Oh() {
|
|
|
2656
2656
|
*/
|
|
2657
2657
|
spaces: {},
|
|
2658
2658
|
convert: function(r, s, a) {
|
|
2659
|
-
return this.enabled === !1 || s === a || !s || !a || (this.spaces[s].transfer === re && (r.r = In(r.r), r.g = In(r.g), r.b = In(r.b)), this.spaces[s].primaries !== this.spaces[a].primaries && (r.applyMatrix3(this.spaces[s].toXYZ), r.applyMatrix3(this.spaces[a].fromXYZ)), this.spaces[a].transfer === re && (r.r =
|
|
2659
|
+
return this.enabled === !1 || s === a || !s || !a || (this.spaces[s].transfer === re && (r.r = In(r.r), r.g = In(r.g), r.b = In(r.b)), this.spaces[s].primaries !== this.spaces[a].primaries && (r.applyMatrix3(this.spaces[s].toXYZ), r.applyMatrix3(this.spaces[a].fromXYZ)), this.spaces[a].transfer === re && (r.r = Ni(r.r), r.g = Ni(r.g), r.b = Ni(r.b))), r;
|
|
2660
2660
|
},
|
|
2661
2661
|
workingToColorSpace: function(r, s) {
|
|
2662
2662
|
return this.convert(r, this.workingColorSpace, s);
|
|
@@ -2723,7 +2723,7 @@ const ee = /* @__PURE__ */ Oh();
|
|
|
2723
2723
|
function In(i) {
|
|
2724
2724
|
return i < 0.04045 ? i * 0.0773993808 : Math.pow(i * 0.9478672986 + 0.0521327014, 2.4);
|
|
2725
2725
|
}
|
|
2726
|
-
function
|
|
2726
|
+
function Ni(i) {
|
|
2727
2727
|
return i < 31308e-7 ? i * 12.92 : 1.055 * Math.pow(i, 0.41666) - 0.055;
|
|
2728
2728
|
}
|
|
2729
2729
|
let gi;
|
|
@@ -3012,25 +3012,25 @@ class Te extends Gi {
|
|
|
3012
3012
|
if (this.mapping !== Ol) return t;
|
|
3013
3013
|
if (t.applyMatrix3(this.matrix), t.x < 0 || t.x > 1)
|
|
3014
3014
|
switch (this.wrapS) {
|
|
3015
|
-
case
|
|
3015
|
+
case Na:
|
|
3016
3016
|
t.x = t.x - Math.floor(t.x);
|
|
3017
3017
|
break;
|
|
3018
3018
|
case An:
|
|
3019
3019
|
t.x = t.x < 0 ? 0 : 1;
|
|
3020
3020
|
break;
|
|
3021
|
-
case
|
|
3021
|
+
case Ua:
|
|
3022
3022
|
Math.abs(Math.floor(t.x) % 2) === 1 ? t.x = Math.ceil(t.x) - t.x : t.x = t.x - Math.floor(t.x);
|
|
3023
3023
|
break;
|
|
3024
3024
|
}
|
|
3025
3025
|
if (t.y < 0 || t.y > 1)
|
|
3026
3026
|
switch (this.wrapT) {
|
|
3027
|
-
case
|
|
3027
|
+
case Na:
|
|
3028
3028
|
t.y = t.y - Math.floor(t.y);
|
|
3029
3029
|
break;
|
|
3030
3030
|
case An:
|
|
3031
3031
|
t.y = t.y < 0 ? 0 : 1;
|
|
3032
3032
|
break;
|
|
3033
|
-
case
|
|
3033
|
+
case Ua:
|
|
3034
3034
|
Math.abs(Math.floor(t.y) % 2) === 1 ? t.y = Math.ceil(t.y) - t.y : t.y = t.y - Math.floor(t.y);
|
|
3035
3035
|
break;
|
|
3036
3036
|
}
|
|
@@ -4091,8 +4091,8 @@ class jt {
|
|
|
4091
4091
|
* @return {Matrix4} A reference to this matrix.
|
|
4092
4092
|
*/
|
|
4093
4093
|
multiplyMatrices(t, e) {
|
|
4094
|
-
const n = t.elements, r = e.elements, s = this.elements, a = n[0], o = n[4], l = n[8], c = n[12], u = n[1], f = n[5], h = n[9], d = n[13], g = n[2], x = n[6], m = n[10], p = n[14], M = n[3], T = n[7], b = n[11], R = n[15], w = r[0], P = r[4], v = r[8], E = r[12], k = r[1], C = r[5],
|
|
4095
|
-
return s[0] = a * w + o * k + l * G + c * at, s[4] = a * P + o * C + l * z + c * it, s[8] = a * v + o *
|
|
4094
|
+
const n = t.elements, r = e.elements, s = this.elements, a = n[0], o = n[4], l = n[8], c = n[12], u = n[1], f = n[5], h = n[9], d = n[13], g = n[2], x = n[6], m = n[10], p = n[14], M = n[3], T = n[7], b = n[11], R = n[15], w = r[0], P = r[4], v = r[8], E = r[12], k = r[1], C = r[5], U = r[9], B = r[13], G = r[2], z = r[6], O = r[10], V = r[14], at = r[3], it = r[7], Mt = r[11], yt = r[15];
|
|
4095
|
+
return s[0] = a * w + o * k + l * G + c * at, s[4] = a * P + o * C + l * z + c * it, s[8] = a * v + o * U + l * O + c * Mt, s[12] = a * E + o * B + l * V + c * yt, s[1] = u * w + f * k + h * G + d * at, s[5] = u * P + f * C + h * z + d * it, s[9] = u * v + f * U + h * O + d * Mt, s[13] = u * E + f * B + h * V + d * yt, s[2] = g * w + x * k + m * G + p * at, s[6] = g * P + x * C + m * z + p * it, s[10] = g * v + x * U + m * O + p * Mt, s[14] = g * E + x * B + m * V + p * yt, s[3] = M * w + T * k + b * G + R * at, s[7] = M * P + T * C + b * z + R * it, s[11] = M * v + T * U + b * O + R * Mt, s[15] = M * E + T * B + b * V + R * yt, this;
|
|
4096
4096
|
}
|
|
4097
4097
|
/**
|
|
4098
4098
|
* Multiplies every component of the matrix by the given scalar.
|
|
@@ -4146,10 +4146,10 @@ class jt {
|
|
|
4146
4146
|
* @return {Matrix4} A reference to this matrix.
|
|
4147
4147
|
*/
|
|
4148
4148
|
invert() {
|
|
4149
|
-
const t = this.elements, e = t[0], n = t[1], r = t[2], s = t[3], a = t[4], o = t[5], l = t[6], c = t[7], u = t[8], f = t[9], h = t[10], d = t[11], g = t[12], x = t[13], m = t[14], p = t[15], M = e * o - n * a, T = e * l - r * a, b = e * c - s * a, R = n * l - r * o, w = n * c - s * o, P = r * c - s * l, v = u * x - f * g, E = u * m - h * g, k = u * p - d * g, C = f * m - h * x,
|
|
4149
|
+
const t = this.elements, e = t[0], n = t[1], r = t[2], s = t[3], a = t[4], o = t[5], l = t[6], c = t[7], u = t[8], f = t[9], h = t[10], d = t[11], g = t[12], x = t[13], m = t[14], p = t[15], M = e * o - n * a, T = e * l - r * a, b = e * c - s * a, R = n * l - r * o, w = n * c - s * o, P = r * c - s * l, v = u * x - f * g, E = u * m - h * g, k = u * p - d * g, C = f * m - h * x, U = f * p - d * x, B = h * p - d * m, G = M * B - T * U + b * C + R * k - w * E + P * v;
|
|
4150
4150
|
if (G === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
4151
4151
|
const z = 1 / G;
|
|
4152
|
-
return t[0] = (o * B - l *
|
|
4152
|
+
return t[0] = (o * B - l * U + c * C) * z, t[1] = (r * U - n * B - s * C) * z, t[2] = (x * P - m * w + p * R) * z, t[3] = (h * w - f * P - d * R) * z, t[4] = (l * k - a * B - c * E) * z, t[5] = (e * B - r * k + s * E) * z, t[6] = (m * b - g * P - p * T) * z, t[7] = (u * P - h * b + d * T) * z, t[8] = (a * U - o * k + c * v) * z, t[9] = (n * k - e * U - s * v) * z, t[10] = (g * w - x * b + p * M) * z, t[11] = (f * b - u * w - d * M) * z, t[12] = (o * E - a * C - l * v) * z, t[13] = (e * C - n * E + r * v) * z, t[14] = (x * T - g * R - m * M) * z, t[15] = (u * R - f * T + h * M) * z, this;
|
|
4153
4153
|
}
|
|
4154
4154
|
/**
|
|
4155
4155
|
* Multiplies the columns of this matrix by the given vector.
|
|
@@ -5929,7 +5929,7 @@ class Qt {
|
|
|
5929
5929
|
* @return {Color} A reference to this color.
|
|
5930
5930
|
*/
|
|
5931
5931
|
copyLinearToSRGB(t) {
|
|
5932
|
-
return this.r =
|
|
5932
|
+
return this.r = Ni(t.r), this.g = Ni(t.g), this.b = Ni(t.b), this;
|
|
5933
5933
|
}
|
|
5934
5934
|
/**
|
|
5935
5935
|
* Converts this color from `SRGBColorSpace` to `LinearSRGBColorSpace`.
|
|
@@ -6770,7 +6770,7 @@ class sn {
|
|
|
6770
6770
|
intersectsTriangle(t) {
|
|
6771
6771
|
if (this.isEmpty())
|
|
6772
6772
|
return !1;
|
|
6773
|
-
this.getCenter(Zi),
|
|
6773
|
+
this.getCenter(Zi), Nr.subVectors(this.max, Zi), Si.subVectors(t.a, Zi), bi.subVectors(t.b, Zi), Ei.subVectors(t.c, Zi), zn.subVectors(bi, Si), Vn.subVectors(Ei, bi), $n.subVectors(Si, Ei);
|
|
6774
6774
|
let e = [
|
|
6775
6775
|
0,
|
|
6776
6776
|
-zn.z,
|
|
@@ -6800,7 +6800,7 @@ class sn {
|
|
|
6800
6800
|
$n.x,
|
|
6801
6801
|
0
|
|
6802
6802
|
];
|
|
6803
|
-
return !js(e, Si, bi, Ei,
|
|
6803
|
+
return !js(e, Si, bi, Ei, Nr) || (e = [1, 0, 0, 0, 1, 0, 0, 0, 1], !js(e, Si, bi, Ei, Nr)) ? !1 : (Ur.crossVectors(zn, Vn), e = [Ur.x, Ur.y, Ur.z], js(e, Si, bi, Ei, Nr));
|
|
6804
6804
|
}
|
|
6805
6805
|
/**
|
|
6806
6806
|
* Clamps the given point within the bounds of this box.
|
|
@@ -6912,7 +6912,7 @@ const bn = [
|
|
|
6912
6912
|
/* @__PURE__ */ new D(),
|
|
6913
6913
|
/* @__PURE__ */ new D(),
|
|
6914
6914
|
/* @__PURE__ */ new D()
|
|
6915
|
-
], tn = /* @__PURE__ */ new D(), Lr = /* @__PURE__ */ new sn(), Si = /* @__PURE__ */ new D(), bi = /* @__PURE__ */ new D(), Ei = /* @__PURE__ */ new D(), zn = /* @__PURE__ */ new D(), Vn = /* @__PURE__ */ new D(), $n = /* @__PURE__ */ new D(), Zi = /* @__PURE__ */ new D(),
|
|
6915
|
+
], tn = /* @__PURE__ */ new D(), Lr = /* @__PURE__ */ new sn(), Si = /* @__PURE__ */ new D(), bi = /* @__PURE__ */ new D(), Ei = /* @__PURE__ */ new D(), zn = /* @__PURE__ */ new D(), Vn = /* @__PURE__ */ new D(), $n = /* @__PURE__ */ new D(), Zi = /* @__PURE__ */ new D(), Nr = /* @__PURE__ */ new D(), Ur = /* @__PURE__ */ new D(), Kn = /* @__PURE__ */ new D();
|
|
6916
6916
|
function js(i, t, e, n, r) {
|
|
6917
6917
|
for (let s = 0, a = i.length - 3; s <= a; s += 3) {
|
|
6918
6918
|
Kn.fromArray(i, s);
|
|
@@ -7283,7 +7283,7 @@ class me extends Re {
|
|
|
7283
7283
|
}
|
|
7284
7284
|
}
|
|
7285
7285
|
const jh = /* @__PURE__ */ new sn(), Ji = /* @__PURE__ */ new D(), Qs = /* @__PURE__ */ new D();
|
|
7286
|
-
class
|
|
7286
|
+
class Nn {
|
|
7287
7287
|
/**
|
|
7288
7288
|
* Constructs a new sphere.
|
|
7289
7289
|
*
|
|
@@ -7780,7 +7780,7 @@ class Pe extends Gi {
|
|
|
7780
7780
|
* You may need to recompute the bounding sphere if the geometry vertices are modified.
|
|
7781
7781
|
*/
|
|
7782
7782
|
computeBoundingSphere() {
|
|
7783
|
-
this.boundingSphere === null && (this.boundingSphere = new
|
|
7783
|
+
this.boundingSphere === null && (this.boundingSphere = new Nn());
|
|
7784
7784
|
const t = this.attributes.position, e = this.morphAttributes.position;
|
|
7785
7785
|
if (t && t.isGLBufferAttribute) {
|
|
7786
7786
|
Ht("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.", this), this.boundingSphere.set(new D(), 1 / 0);
|
|
@@ -7836,8 +7836,8 @@ class Pe extends Gi {
|
|
|
7836
7836
|
count: t.count
|
|
7837
7837
|
}]);
|
|
7838
7838
|
for (let v = 0, E = M.length; v < E; ++v) {
|
|
7839
|
-
const k = M[v], C = k.start,
|
|
7840
|
-
for (let B = C, G = C +
|
|
7839
|
+
const k = M[v], C = k.start, U = k.count;
|
|
7840
|
+
for (let B = C, G = C + U; B < G; B += 3)
|
|
7841
7841
|
p(
|
|
7842
7842
|
t.getX(B + 0),
|
|
7843
7843
|
t.getX(B + 1),
|
|
@@ -7853,8 +7853,8 @@ class Pe extends Gi {
|
|
|
7853
7853
|
a.setXYZW(v, T.x, T.y, T.z, C);
|
|
7854
7854
|
}
|
|
7855
7855
|
for (let v = 0, E = M.length; v < E; ++v) {
|
|
7856
|
-
const k = M[v], C = k.start,
|
|
7857
|
-
for (let B = C, G = C +
|
|
7856
|
+
const k = M[v], C = k.start, U = k.count;
|
|
7857
|
+
for (let B = C, G = C + U; B < G; B += 3)
|
|
7858
7858
|
P(t.getX(B + 0)), P(t.getX(B + 1)), P(t.getX(B + 2));
|
|
7859
7859
|
}
|
|
7860
7860
|
}
|
|
@@ -8157,7 +8157,7 @@ class L0 {
|
|
|
8157
8157
|
};
|
|
8158
8158
|
}
|
|
8159
8159
|
}
|
|
8160
|
-
const
|
|
8160
|
+
const Ne = /* @__PURE__ */ new D();
|
|
8161
8161
|
class $l {
|
|
8162
8162
|
/**
|
|
8163
8163
|
* Constructs a new interleaved buffer attribute.
|
|
@@ -8207,7 +8207,7 @@ class $l {
|
|
|
8207
8207
|
*/
|
|
8208
8208
|
applyMatrix4(t) {
|
|
8209
8209
|
for (let e = 0, n = this.data.count; e < n; e++)
|
|
8210
|
-
|
|
8210
|
+
Ne.fromBufferAttribute(this, e), Ne.applyMatrix4(t), this.setXYZ(e, Ne.x, Ne.y, Ne.z);
|
|
8211
8211
|
return this;
|
|
8212
8212
|
}
|
|
8213
8213
|
/**
|
|
@@ -8219,7 +8219,7 @@ class $l {
|
|
|
8219
8219
|
*/
|
|
8220
8220
|
applyNormalMatrix(t) {
|
|
8221
8221
|
for (let e = 0, n = this.count; e < n; e++)
|
|
8222
|
-
|
|
8222
|
+
Ne.fromBufferAttribute(this, e), Ne.applyNormalMatrix(t), this.setXYZ(e, Ne.x, Ne.y, Ne.z);
|
|
8223
8223
|
return this;
|
|
8224
8224
|
}
|
|
8225
8225
|
/**
|
|
@@ -8231,7 +8231,7 @@ class $l {
|
|
|
8231
8231
|
*/
|
|
8232
8232
|
transformDirection(t) {
|
|
8233
8233
|
for (let e = 0, n = this.count; e < n; e++)
|
|
8234
|
-
|
|
8234
|
+
Ne.fromBufferAttribute(this, e), Ne.transformDirection(t), this.setXYZ(e, Ne.x, Ne.y, Ne.z);
|
|
8235
8235
|
return this;
|
|
8236
8236
|
}
|
|
8237
8237
|
/**
|
|
@@ -8432,7 +8432,7 @@ class fi extends Gi {
|
|
|
8432
8432
|
* Constructs a new material.
|
|
8433
8433
|
*/
|
|
8434
8434
|
constructor() {
|
|
8435
|
-
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: tf++ }), this.uuid = Je(), this.name = "", this.type = "Material", this.blending = Li, this.side = Xn, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = Ta, this.blendDst = Aa, this.blendEquation = ri, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Qt(0, 0, 0), this.blendAlpha = 0, this.depthFunc =
|
|
8435
|
+
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: tf++ }), this.uuid = Je(), this.name = "", this.type = "Material", this.blending = Li, this.side = Xn, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = Ta, this.blendDst = Aa, this.blendEquation = ri, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Qt(0, 0, 0), this.blendAlpha = 0, this.depthFunc = Ui, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = hc, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = mi, this.stencilZFail = mi, this.stencilZPass = mi, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
|
|
8436
8436
|
}
|
|
8437
8437
|
/**
|
|
8438
8438
|
* Sets the alpha value to be used when running an alpha test. The material
|
|
@@ -8531,7 +8531,7 @@ class fi extends Gi {
|
|
|
8531
8531
|
generator: "Material.toJSON"
|
|
8532
8532
|
}
|
|
8533
8533
|
};
|
|
8534
|
-
n.uuid = this.uuid, n.type = this.type, this.name !== "" && (n.name = this.name), this.color && this.color.isColor && (n.color = this.color.getHex()), this.roughness !== void 0 && (n.roughness = this.roughness), this.metalness !== void 0 && (n.metalness = this.metalness), this.sheen !== void 0 && (n.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (n.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (n.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (n.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (n.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (n.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (n.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (n.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (n.shininess = this.shininess), this.clearcoat !== void 0 && (n.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (n.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (n.clearcoatMap = this.clearcoatMap.toJSON(t).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (n.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(t).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (n.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(t).uuid, n.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (n.sheenColorMap = this.sheenColorMap.toJSON(t).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (n.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(t).uuid), this.dispersion !== void 0 && (n.dispersion = this.dispersion), this.iridescence !== void 0 && (n.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (n.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (n.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (n.iridescenceMap = this.iridescenceMap.toJSON(t).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (n.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(t).uuid), this.anisotropy !== void 0 && (n.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (n.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (n.anisotropyMap = this.anisotropyMap.toJSON(t).uuid), this.map && this.map.isTexture && (n.map = this.map.toJSON(t).uuid), this.matcap && this.matcap.isTexture && (n.matcap = this.matcap.toJSON(t).uuid), this.alphaMap && this.alphaMap.isTexture && (n.alphaMap = this.alphaMap.toJSON(t).uuid), this.lightMap && this.lightMap.isTexture && (n.lightMap = this.lightMap.toJSON(t).uuid, n.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (n.aoMap = this.aoMap.toJSON(t).uuid, n.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (n.bumpMap = this.bumpMap.toJSON(t).uuid, n.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (n.normalMap = this.normalMap.toJSON(t).uuid, n.normalMapType = this.normalMapType, n.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (n.displacementMap = this.displacementMap.toJSON(t).uuid, n.displacementScale = this.displacementScale, n.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (n.roughnessMap = this.roughnessMap.toJSON(t).uuid), this.metalnessMap && this.metalnessMap.isTexture && (n.metalnessMap = this.metalnessMap.toJSON(t).uuid), this.emissiveMap && this.emissiveMap.isTexture && (n.emissiveMap = this.emissiveMap.toJSON(t).uuid), this.specularMap && this.specularMap.isTexture && (n.specularMap = this.specularMap.toJSON(t).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (n.specularIntensityMap = this.specularIntensityMap.toJSON(t).uuid), this.specularColorMap && this.specularColorMap.isTexture && (n.specularColorMap = this.specularColorMap.toJSON(t).uuid), this.envMap && this.envMap.isTexture && (n.envMap = this.envMap.toJSON(t).uuid, this.combine !== void 0 && (n.combine = this.combine)), this.envMapRotation !== void 0 && (n.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (n.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (n.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (n.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (n.gradientMap = this.gradientMap.toJSON(t).uuid), this.transmission !== void 0 && (n.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (n.transmissionMap = this.transmissionMap.toJSON(t).uuid), this.thickness !== void 0 && (n.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (n.thicknessMap = this.thicknessMap.toJSON(t).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (n.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (n.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (n.size = this.size), this.shadowSide !== null && (n.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (n.sizeAttenuation = this.sizeAttenuation), this.blending !== Li && (n.blending = this.blending), this.side !== Xn && (n.side = this.side), this.vertexColors === !0 && (n.vertexColors = !0), this.opacity < 1 && (n.opacity = this.opacity), this.transparent === !0 && (n.transparent = !0), this.blendSrc !== Ta && (n.blendSrc = this.blendSrc), this.blendDst !== Aa && (n.blendDst = this.blendDst), this.blendEquation !== ri && (n.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (n.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (n.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (n.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (n.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (n.blendAlpha = this.blendAlpha), this.depthFunc !==
|
|
8534
|
+
n.uuid = this.uuid, n.type = this.type, this.name !== "" && (n.name = this.name), this.color && this.color.isColor && (n.color = this.color.getHex()), this.roughness !== void 0 && (n.roughness = this.roughness), this.metalness !== void 0 && (n.metalness = this.metalness), this.sheen !== void 0 && (n.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (n.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (n.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (n.emissive = this.emissive.getHex()), this.emissiveIntensity !== void 0 && this.emissiveIntensity !== 1 && (n.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (n.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (n.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (n.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (n.shininess = this.shininess), this.clearcoat !== void 0 && (n.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (n.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (n.clearcoatMap = this.clearcoatMap.toJSON(t).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (n.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(t).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (n.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(t).uuid, n.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.sheenColorMap && this.sheenColorMap.isTexture && (n.sheenColorMap = this.sheenColorMap.toJSON(t).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (n.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(t).uuid), this.dispersion !== void 0 && (n.dispersion = this.dispersion), this.iridescence !== void 0 && (n.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (n.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (n.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (n.iridescenceMap = this.iridescenceMap.toJSON(t).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (n.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(t).uuid), this.anisotropy !== void 0 && (n.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (n.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (n.anisotropyMap = this.anisotropyMap.toJSON(t).uuid), this.map && this.map.isTexture && (n.map = this.map.toJSON(t).uuid), this.matcap && this.matcap.isTexture && (n.matcap = this.matcap.toJSON(t).uuid), this.alphaMap && this.alphaMap.isTexture && (n.alphaMap = this.alphaMap.toJSON(t).uuid), this.lightMap && this.lightMap.isTexture && (n.lightMap = this.lightMap.toJSON(t).uuid, n.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (n.aoMap = this.aoMap.toJSON(t).uuid, n.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (n.bumpMap = this.bumpMap.toJSON(t).uuid, n.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (n.normalMap = this.normalMap.toJSON(t).uuid, n.normalMapType = this.normalMapType, n.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (n.displacementMap = this.displacementMap.toJSON(t).uuid, n.displacementScale = this.displacementScale, n.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (n.roughnessMap = this.roughnessMap.toJSON(t).uuid), this.metalnessMap && this.metalnessMap.isTexture && (n.metalnessMap = this.metalnessMap.toJSON(t).uuid), this.emissiveMap && this.emissiveMap.isTexture && (n.emissiveMap = this.emissiveMap.toJSON(t).uuid), this.specularMap && this.specularMap.isTexture && (n.specularMap = this.specularMap.toJSON(t).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (n.specularIntensityMap = this.specularIntensityMap.toJSON(t).uuid), this.specularColorMap && this.specularColorMap.isTexture && (n.specularColorMap = this.specularColorMap.toJSON(t).uuid), this.envMap && this.envMap.isTexture && (n.envMap = this.envMap.toJSON(t).uuid, this.combine !== void 0 && (n.combine = this.combine)), this.envMapRotation !== void 0 && (n.envMapRotation = this.envMapRotation.toArray()), this.envMapIntensity !== void 0 && (n.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (n.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (n.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (n.gradientMap = this.gradientMap.toJSON(t).uuid), this.transmission !== void 0 && (n.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (n.transmissionMap = this.transmissionMap.toJSON(t).uuid), this.thickness !== void 0 && (n.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (n.thicknessMap = this.thicknessMap.toJSON(t).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (n.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (n.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (n.size = this.size), this.shadowSide !== null && (n.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (n.sizeAttenuation = this.sizeAttenuation), this.blending !== Li && (n.blending = this.blending), this.side !== Xn && (n.side = this.side), this.vertexColors === !0 && (n.vertexColors = !0), this.opacity < 1 && (n.opacity = this.opacity), this.transparent === !0 && (n.transparent = !0), this.blendSrc !== Ta && (n.blendSrc = this.blendSrc), this.blendDst !== Aa && (n.blendDst = this.blendDst), this.blendEquation !== ri && (n.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (n.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (n.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (n.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (n.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (n.blendAlpha = this.blendAlpha), this.depthFunc !== Ui && (n.depthFunc = this.depthFunc), this.depthTest === !1 && (n.depthTest = this.depthTest), this.depthWrite === !1 && (n.depthWrite = this.depthWrite), this.colorWrite === !1 && (n.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (n.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== hc && (n.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (n.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (n.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== mi && (n.stencilFail = this.stencilFail), this.stencilZFail !== mi && (n.stencilZFail = this.stencilZFail), this.stencilZPass !== mi && (n.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (n.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (n.rotation = this.rotation), this.polygonOffset === !0 && (n.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (n.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (n.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (n.linewidth = this.linewidth), this.dashSize !== void 0 && (n.dashSize = this.dashSize), this.gapSize !== void 0 && (n.gapSize = this.gapSize), this.scale !== void 0 && (n.scale = this.scale), this.dithering === !0 && (n.dithering = !0), this.alphaTest > 0 && (n.alphaTest = this.alphaTest), this.alphaHash === !0 && (n.alphaHash = !0), this.alphaToCoverage === !0 && (n.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (n.premultipliedAlpha = !0), this.forceSinglePass === !0 && (n.forceSinglePass = !0), this.allowOverride === !1 && (n.allowOverride = !1), this.wireframe === !0 && (n.wireframe = !0), this.wireframeLinewidth > 1 && (n.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (n.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (n.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (n.flatShading = !0), this.visible === !1 && (n.visible = !1), this.toneMapped === !1 && (n.toneMapped = !1), this.fog === !1 && (n.fog = !1), Object.keys(this.userData).length > 0 && (n.userData = this.userData);
|
|
8535
8535
|
function r(s) {
|
|
8536
8536
|
const a = [];
|
|
8537
8537
|
for (const o in s) {
|
|
@@ -8868,7 +8868,7 @@ class lr extends fi {
|
|
|
8868
8868
|
return super.copy(t), this.color.copy(t.color), this.map = t.map, this.lightMap = t.lightMap, this.lightMapIntensity = t.lightMapIntensity, this.aoMap = t.aoMap, this.aoMapIntensity = t.aoMapIntensity, this.specularMap = t.specularMap, this.alphaMap = t.alphaMap, this.envMap = t.envMap, this.envMapRotation.copy(t.envMapRotation), this.combine = t.combine, this.reflectivity = t.reflectivity, this.refractionRatio = t.refractionRatio, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this.wireframeLinecap = t.wireframeLinecap, this.wireframeLinejoin = t.wireframeLinejoin, this.fog = t.fog, this;
|
|
8869
8869
|
}
|
|
8870
8870
|
}
|
|
8871
|
-
const wc = /* @__PURE__ */ new jt(), jn = /* @__PURE__ */ new yr(), zr = /* @__PURE__ */ new
|
|
8871
|
+
const wc = /* @__PURE__ */ new jt(), jn = /* @__PURE__ */ new yr(), zr = /* @__PURE__ */ new Nn(), Cc = /* @__PURE__ */ new D(), Vr = /* @__PURE__ */ new D(), kr = /* @__PURE__ */ new D(), Gr = /* @__PURE__ */ new D(), ra = /* @__PURE__ */ new D(), Hr = /* @__PURE__ */ new D(), Rc = /* @__PURE__ */ new D(), Wr = /* @__PURE__ */ new D();
|
|
8872
8872
|
class Ee extends pe {
|
|
8873
8873
|
/**
|
|
8874
8874
|
* Constructs a new mesh.
|
|
@@ -8996,8 +8996,8 @@ function Xr(i, t, e, n, r, s, a, o, l, c) {
|
|
|
8996
8996
|
}
|
|
8997
8997
|
return u;
|
|
8998
8998
|
}
|
|
8999
|
-
const Pc = /* @__PURE__ */ new D(), Ic = /* @__PURE__ */ new he(), Dc = /* @__PURE__ */ new he(), nf = /* @__PURE__ */ new D(), Lc = /* @__PURE__ */ new jt(), qr = /* @__PURE__ */ new D(), sa = /* @__PURE__ */ new
|
|
9000
|
-
class
|
|
8999
|
+
const Pc = /* @__PURE__ */ new D(), Ic = /* @__PURE__ */ new he(), Dc = /* @__PURE__ */ new he(), nf = /* @__PURE__ */ new D(), Lc = /* @__PURE__ */ new jt(), qr = /* @__PURE__ */ new D(), sa = /* @__PURE__ */ new Nn(), Nc = /* @__PURE__ */ new jt(), aa = /* @__PURE__ */ new yr();
|
|
9000
|
+
class N0 extends Ee {
|
|
9001
9001
|
/**
|
|
9002
9002
|
* Constructs a new skinned mesh.
|
|
9003
9003
|
*
|
|
@@ -9028,7 +9028,7 @@ class U0 extends Ee {
|
|
|
9028
9028
|
*/
|
|
9029
9029
|
computeBoundingSphere() {
|
|
9030
9030
|
const t = this.geometry;
|
|
9031
|
-
this.boundingSphere === null && (this.boundingSphere = new
|
|
9031
|
+
this.boundingSphere === null && (this.boundingSphere = new Nn()), this.boundingSphere.makeEmpty();
|
|
9032
9032
|
const e = t.getAttribute("position");
|
|
9033
9033
|
for (let n = 0; n < e.count; n++)
|
|
9034
9034
|
this.getVertexPosition(n, qr), this.boundingSphere.expandByPoint(qr);
|
|
@@ -9038,7 +9038,7 @@ class U0 extends Ee {
|
|
|
9038
9038
|
}
|
|
9039
9039
|
raycast(t, e) {
|
|
9040
9040
|
const n = this.material, r = this.matrixWorld;
|
|
9041
|
-
n !== void 0 && (this.boundingSphere === null && this.computeBoundingSphere(), sa.copy(this.boundingSphere), sa.applyMatrix4(r), t.ray.intersectsSphere(sa) !== !1 && (
|
|
9041
|
+
n !== void 0 && (this.boundingSphere === null && this.computeBoundingSphere(), sa.copy(this.boundingSphere), sa.applyMatrix4(r), t.ray.intersectsSphere(sa) !== !1 && (Nc.copy(r).invert(), aa.copy(t.ray).applyMatrix4(Nc), !(this.boundingBox !== null && aa.intersectsBox(this.boundingBox) === !1) && this._computeIntersections(t, e, aa)));
|
|
9042
9042
|
}
|
|
9043
9043
|
getVertexPosition(t, e) {
|
|
9044
9044
|
return super.getVertexPosition(t, e), this.applyBoneTransform(t, e), e;
|
|
@@ -9125,7 +9125,7 @@ class ws extends Te {
|
|
|
9125
9125
|
super(null, a, o, l, c, u, r, s, f, h), this.isDataTexture = !0, this.image = { data: t, width: e, height: n }, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
|
|
9126
9126
|
}
|
|
9127
9127
|
}
|
|
9128
|
-
const
|
|
9128
|
+
const Uc = /* @__PURE__ */ new jt(), sf = /* @__PURE__ */ new jt();
|
|
9129
9129
|
class Kl {
|
|
9130
9130
|
/**
|
|
9131
9131
|
* Constructs a new skeleton.
|
|
@@ -9183,7 +9183,7 @@ class Kl {
|
|
|
9183
9183
|
const t = this.bones, e = this.boneInverses, n = this.boneMatrices, r = this.boneTexture;
|
|
9184
9184
|
for (let s = 0, a = t.length; s < a; s++) {
|
|
9185
9185
|
const o = t[s] ? t[s].matrixWorld : sf;
|
|
9186
|
-
|
|
9186
|
+
Uc.multiplyMatrices(o, e[s]), Uc.toArray(n, s * 16);
|
|
9187
9187
|
}
|
|
9188
9188
|
r !== null && (r.needsUpdate = !0);
|
|
9189
9189
|
}
|
|
@@ -9292,8 +9292,8 @@ class Fc extends Re {
|
|
|
9292
9292
|
return t.meshPerAttribute = this.meshPerAttribute, t.isInstancedBufferAttribute = !0, t;
|
|
9293
9293
|
}
|
|
9294
9294
|
}
|
|
9295
|
-
const Ai = /* @__PURE__ */ new jt(), Oc = /* @__PURE__ */ new jt(), Yr = [], Bc = /* @__PURE__ */ new sn(), af = /* @__PURE__ */ new jt(), Ki = /* @__PURE__ */ new Ee(), ji = /* @__PURE__ */ new
|
|
9296
|
-
class
|
|
9295
|
+
const Ai = /* @__PURE__ */ new jt(), Oc = /* @__PURE__ */ new jt(), Yr = [], Bc = /* @__PURE__ */ new sn(), af = /* @__PURE__ */ new jt(), Ki = /* @__PURE__ */ new Ee(), ji = /* @__PURE__ */ new Nn();
|
|
9296
|
+
class U0 extends Ee {
|
|
9297
9297
|
/**
|
|
9298
9298
|
* Constructs a new instanced mesh.
|
|
9299
9299
|
*
|
|
@@ -9324,7 +9324,7 @@ class N0 extends Ee {
|
|
|
9324
9324
|
*/
|
|
9325
9325
|
computeBoundingSphere() {
|
|
9326
9326
|
const t = this.geometry, e = this.count;
|
|
9327
|
-
this.boundingSphere === null && (this.boundingSphere = new
|
|
9327
|
+
this.boundingSphere === null && (this.boundingSphere = new Nn()), t.boundingSphere === null && t.computeBoundingSphere(), this.boundingSphere.makeEmpty();
|
|
9328
9328
|
for (let n = 0; n < e; n++)
|
|
9329
9329
|
this.getMatrixAt(n, Ai), ji.copy(t.boundingSphere).applyMatrix4(Ai), this.boundingSphere.union(ji);
|
|
9330
9330
|
}
|
|
@@ -9631,7 +9631,7 @@ class ii {
|
|
|
9631
9631
|
return new this.constructor().copy(this);
|
|
9632
9632
|
}
|
|
9633
9633
|
}
|
|
9634
|
-
const Qn = /* @__PURE__ */ new
|
|
9634
|
+
const Qn = /* @__PURE__ */ new Nn(), lf = /* @__PURE__ */ new vt(0.5, 0.5), Zr = /* @__PURE__ */ new D();
|
|
9635
9635
|
class zo {
|
|
9636
9636
|
/**
|
|
9637
9637
|
* Constructs a new frustum.
|
|
@@ -9788,7 +9788,7 @@ class uf extends fi {
|
|
|
9788
9788
|
return super.copy(t), this.color.copy(t.color), this.map = t.map, this.linewidth = t.linewidth, this.linecap = t.linecap, this.linejoin = t.linejoin, this.fog = t.fog, this;
|
|
9789
9789
|
}
|
|
9790
9790
|
}
|
|
9791
|
-
const Ms = /* @__PURE__ */ new D(), ys = /* @__PURE__ */ new D(), zc = /* @__PURE__ */ new jt(), Qi = /* @__PURE__ */ new yr(), Jr = /* @__PURE__ */ new
|
|
9791
|
+
const Ms = /* @__PURE__ */ new D(), ys = /* @__PURE__ */ new D(), zc = /* @__PURE__ */ new jt(), Qi = /* @__PURE__ */ new yr(), Jr = /* @__PURE__ */ new Nn(), ca = /* @__PURE__ */ new D(), Vc = /* @__PURE__ */ new D();
|
|
9792
9792
|
class jl extends pe {
|
|
9793
9793
|
/**
|
|
9794
9794
|
* Constructs a new line.
|
|
@@ -9940,7 +9940,7 @@ class hf extends fi {
|
|
|
9940
9940
|
return super.copy(t), this.color.copy(t.color), this.map = t.map, this.alphaMap = t.alphaMap, this.size = t.size, this.sizeAttenuation = t.sizeAttenuation, this.fog = t.fog, this;
|
|
9941
9941
|
}
|
|
9942
9942
|
}
|
|
9943
|
-
const Hc = /* @__PURE__ */ new jt(), _o = /* @__PURE__ */ new yr(), Kr = /* @__PURE__ */ new
|
|
9943
|
+
const Hc = /* @__PURE__ */ new jt(), _o = /* @__PURE__ */ new yr(), Kr = /* @__PURE__ */ new Nn(), jr = /* @__PURE__ */ new D();
|
|
9944
9944
|
class B0 extends pe {
|
|
9945
9945
|
/**
|
|
9946
9946
|
* Constructs a new point cloud.
|
|
@@ -10182,13 +10182,13 @@ class Hi extends Pe {
|
|
|
10182
10182
|
let h = 0, d = 0;
|
|
10183
10183
|
g("z", "y", "x", -1, -1, n, e, t, a, s, 0), g("z", "y", "x", 1, -1, n, e, -t, a, s, 1), g("x", "z", "y", 1, 1, t, n, e, r, a, 2), g("x", "z", "y", 1, -1, t, n, -e, r, a, 3), g("x", "y", "z", 1, -1, t, e, n, r, s, 4), g("x", "y", "z", -1, -1, t, e, -n, r, s, 5), this.setIndex(l), this.setAttribute("position", new me(c, 3)), this.setAttribute("normal", new me(u, 3)), this.setAttribute("uv", new me(f, 2));
|
|
10184
10184
|
function g(x, m, p, M, T, b, R, w, P, v, E) {
|
|
10185
|
-
const k = b / P, C = R / v,
|
|
10185
|
+
const k = b / P, C = R / v, U = b / 2, B = R / 2, G = w / 2, z = P + 1, O = v + 1;
|
|
10186
10186
|
let V = 0, at = 0;
|
|
10187
10187
|
const it = new D();
|
|
10188
10188
|
for (let Mt = 0; Mt < O; Mt++) {
|
|
10189
10189
|
const yt = Mt * C - B;
|
|
10190
10190
|
for (let lt = 0; lt < z; lt++) {
|
|
10191
|
-
const kt = lt * k -
|
|
10191
|
+
const kt = lt * k - U;
|
|
10192
10192
|
it[x] = kt * M, it[m] = yt * T, it[p] = G, c.push(it.x, it.y, it.z), it[x] = 0, it[m] = 0, it[p] = w > 0 ? 1 : -1, u.push(it.x, it.y, it.z), f.push(lt / P), f.push(1 - Mt / v), V += 1;
|
|
10193
10193
|
}
|
|
10194
10194
|
}
|
|
@@ -10293,16 +10293,16 @@ class ko extends Pe {
|
|
|
10293
10293
|
const P = (e - t) / n;
|
|
10294
10294
|
for (let v = 0; v <= s; v++) {
|
|
10295
10295
|
const E = [], k = v / s, C = k * (e - t) + t;
|
|
10296
|
-
for (let
|
|
10297
|
-
const B =
|
|
10296
|
+
for (let U = 0; U <= r; U++) {
|
|
10297
|
+
const B = U / r, G = B * l + o, z = Math.sin(G), O = Math.cos(G);
|
|
10298
10298
|
R.x = C * z, R.y = -k * n + m, R.z = C * O, f.push(R.x, R.y, R.z), b.set(z, P, O).normalize(), h.push(b.x, b.y, b.z), d.push(B, 1 - k), E.push(g++);
|
|
10299
10299
|
}
|
|
10300
10300
|
x.push(E);
|
|
10301
10301
|
}
|
|
10302
10302
|
for (let v = 0; v < r; v++)
|
|
10303
10303
|
for (let E = 0; E < s; E++) {
|
|
10304
|
-
const k = x[E][v], C = x[E + 1][v],
|
|
10305
|
-
(t > 0 || E !== 0) && (u.push(k, C, B), w += 3), (e > 0 || E !== s - 1) && (u.push(C,
|
|
10304
|
+
const k = x[E][v], C = x[E + 1][v], U = x[E + 1][v + 1], B = x[E][v + 1];
|
|
10305
|
+
(t > 0 || E !== 0) && (u.push(k, C, B), w += 3), (e > 0 || E !== s - 1) && (u.push(C, U, B), w += 3);
|
|
10306
10306
|
}
|
|
10307
10307
|
c.addGroup(p, w, 0), p += w;
|
|
10308
10308
|
}
|
|
@@ -10310,15 +10310,15 @@ class ko extends Pe {
|
|
|
10310
10310
|
const R = g, w = new vt(), P = new D();
|
|
10311
10311
|
let v = 0;
|
|
10312
10312
|
const E = b === !0 ? t : e, k = b === !0 ? 1 : -1;
|
|
10313
|
-
for (let
|
|
10313
|
+
for (let U = 1; U <= r; U++)
|
|
10314
10314
|
f.push(0, m * k, 0), h.push(0, k, 0), d.push(0.5, 0.5), g++;
|
|
10315
10315
|
const C = g;
|
|
10316
|
-
for (let
|
|
10317
|
-
const G =
|
|
10316
|
+
for (let U = 0; U <= r; U++) {
|
|
10317
|
+
const G = U / r * l + o, z = Math.cos(G), O = Math.sin(G);
|
|
10318
10318
|
P.x = E * O, P.y = m * k, P.z = E * z, f.push(P.x, P.y, P.z), h.push(0, k, 0), w.x = z * 0.5 + 0.5, w.y = O * 0.5 * k + 0.5, d.push(w.x, w.y), g++;
|
|
10319
10319
|
}
|
|
10320
|
-
for (let
|
|
10321
|
-
const B = R +
|
|
10320
|
+
for (let U = 0; U < r; U++) {
|
|
10321
|
+
const B = R + U, G = C + U;
|
|
10322
10322
|
b === !0 ? u.push(G, G + 1, B) : u.push(G + 1, G, B), v += 3;
|
|
10323
10323
|
}
|
|
10324
10324
|
c.addGroup(p, v, b === !0 ? 1 : 2), p += v;
|
|
@@ -11532,13 +11532,13 @@ function Df(i, t) {
|
|
|
11532
11532
|
return e;
|
|
11533
11533
|
}
|
|
11534
11534
|
function Lf(i, t) {
|
|
11535
|
-
const e =
|
|
11535
|
+
const e = Nf(i, t);
|
|
11536
11536
|
if (!e)
|
|
11537
11537
|
return t;
|
|
11538
11538
|
const n = cu(e, i);
|
|
11539
11539
|
return ui(n, n.next), ui(e, e.next);
|
|
11540
11540
|
}
|
|
11541
|
-
function
|
|
11541
|
+
function Nf(i, t) {
|
|
11542
11542
|
let e = t;
|
|
11543
11543
|
const n = i.x, r = i.y;
|
|
11544
11544
|
let s = -1 / 0, a;
|
|
@@ -11559,13 +11559,13 @@ function Uf(i, t) {
|
|
|
11559
11559
|
do {
|
|
11560
11560
|
if (n >= e.x && e.x >= l && n !== e.x && au(r < c ? n : s, r, l, c, r < c ? s : n, r, e.x, e.y)) {
|
|
11561
11561
|
const f = Math.abs(r - e.y) / (n - e.x);
|
|
11562
|
-
vr(e, i) && (f < u || f === u && (e.x > a.x || e.x === a.x &&
|
|
11562
|
+
vr(e, i) && (f < u || f === u && (e.x > a.x || e.x === a.x && Uf(a, e))) && (a = e, u = f);
|
|
11563
11563
|
}
|
|
11564
11564
|
e = e.next;
|
|
11565
11565
|
} while (e !== o);
|
|
11566
11566
|
return a;
|
|
11567
11567
|
}
|
|
11568
|
-
function
|
|
11568
|
+
function Uf(i, t) {
|
|
11569
11569
|
return fe(i.prev, i, t.prev) < 0 && fe(t.next, i, i.next) < 0;
|
|
11570
11570
|
}
|
|
11571
11571
|
function Ff(i, t, e, n) {
|
|
@@ -11856,7 +11856,7 @@ class Wo extends Pe {
|
|
|
11856
11856
|
const tt = q / m, A = d * Math.cos(tt * Math.PI / 2), gt = g * Math.sin(tt * Math.PI / 2) + x;
|
|
11857
11857
|
for (let J = 0, ut = z.length; J < ut; J++) {
|
|
11858
11858
|
const Z = O(z[J], it[J], gt);
|
|
11859
|
-
|
|
11859
|
+
Ut(Z.x, Z.y, -A), tt === 0 && F.push(Z);
|
|
11860
11860
|
}
|
|
11861
11861
|
for (let J = 0, ut = G; J < ut; J++) {
|
|
11862
11862
|
const Z = C[J];
|
|
@@ -11864,7 +11864,7 @@ class Wo extends Pe {
|
|
|
11864
11864
|
const S = [];
|
|
11865
11865
|
for (let _ = 0, I = Z.length; _ < I; _++) {
|
|
11866
11866
|
const Y = O(Z[_], yt[_], gt);
|
|
11867
|
-
|
|
11867
|
+
Ut(Y.x, Y.y, -A), tt === 0 && S.push(Y);
|
|
11868
11868
|
}
|
|
11869
11869
|
tt === 0 && $.push(S);
|
|
11870
11870
|
}
|
|
@@ -11874,25 +11874,25 @@ class Wo extends Pe {
|
|
|
11874
11874
|
const Wt = kt.length, te = g + x;
|
|
11875
11875
|
for (let F = 0; F < V; F++) {
|
|
11876
11876
|
const $ = h ? O(k[F], lt[F], te) : k[F];
|
|
11877
|
-
b ? (P.copy(R.normals[0]).multiplyScalar($.x), w.copy(R.binormals[0]).multiplyScalar($.y), v.copy(T[0]).add(P).add(w),
|
|
11877
|
+
b ? (P.copy(R.normals[0]).multiplyScalar($.x), w.copy(R.binormals[0]).multiplyScalar($.y), v.copy(T[0]).add(P).add(w), Ut(v.x, v.y, v.z)) : Ut($.x, $.y, 0);
|
|
11878
11878
|
}
|
|
11879
11879
|
for (let F = 1; F <= u; F++)
|
|
11880
11880
|
for (let $ = 0; $ < V; $++) {
|
|
11881
11881
|
const q = h ? O(k[$], lt[$], te) : k[$];
|
|
11882
|
-
b ? (P.copy(R.normals[F]).multiplyScalar(q.x), w.copy(R.binormals[F]).multiplyScalar(q.y), v.copy(T[F]).add(P).add(w),
|
|
11882
|
+
b ? (P.copy(R.normals[F]).multiplyScalar(q.x), w.copy(R.binormals[F]).multiplyScalar(q.y), v.copy(T[F]).add(P).add(w), Ut(v.x, v.y, v.z)) : Ut(q.x, q.y, f / u * F);
|
|
11883
11883
|
}
|
|
11884
11884
|
for (let F = m - 1; F >= 0; F--) {
|
|
11885
11885
|
const $ = F / m, q = d * Math.cos($ * Math.PI / 2), tt = g * Math.sin($ * Math.PI / 2) + x;
|
|
11886
11886
|
for (let A = 0, gt = z.length; A < gt; A++) {
|
|
11887
11887
|
const J = O(z[A], it[A], tt);
|
|
11888
|
-
|
|
11888
|
+
Ut(J.x, J.y, f + q);
|
|
11889
11889
|
}
|
|
11890
11890
|
for (let A = 0, gt = C.length; A < gt; A++) {
|
|
11891
11891
|
const J = C[A];
|
|
11892
11892
|
yt = Mt[A];
|
|
11893
11893
|
for (let ut = 0, Z = J.length; ut < Z; ut++) {
|
|
11894
11894
|
const S = O(J[ut], yt[ut], tt);
|
|
11895
|
-
b ?
|
|
11895
|
+
b ? Ut(S.x, S.y + T[u - 1].y, T[u - 1].x + q) : Ut(S.x, S.y, f + q);
|
|
11896
11896
|
}
|
|
11897
11897
|
}
|
|
11898
11898
|
}
|
|
@@ -11944,7 +11944,7 @@ class Wo extends Pe {
|
|
|
11944
11944
|
}
|
|
11945
11945
|
}
|
|
11946
11946
|
}
|
|
11947
|
-
function
|
|
11947
|
+
function Ut(F, $, q) {
|
|
11948
11948
|
l.push(F), l.push($), l.push(q);
|
|
11949
11949
|
}
|
|
11950
11950
|
function Lt(F, $, q) {
|
|
@@ -12158,7 +12158,7 @@ function ki(i) {
|
|
|
12158
12158
|
}
|
|
12159
12159
|
return t;
|
|
12160
12160
|
}
|
|
12161
|
-
function
|
|
12161
|
+
function Ue(i) {
|
|
12162
12162
|
const t = {};
|
|
12163
12163
|
for (let e = 0; e < i.length; e++) {
|
|
12164
12164
|
const n = ki(i[e]);
|
|
@@ -12177,7 +12177,7 @@ function lu(i) {
|
|
|
12177
12177
|
const t = i.getRenderTarget();
|
|
12178
12178
|
return t === null ? i.outputColorSpace : t.isXRRenderTarget === !0 ? t.texture.colorSpace : ee.workingColorSpace;
|
|
12179
12179
|
}
|
|
12180
|
-
const Zf = { clone: ki, merge:
|
|
12180
|
+
const Zf = { clone: ki, merge: Ue };
|
|
12181
12181
|
var Jf = `void main() {
|
|
12182
12182
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
12183
12183
|
}`, $f = `void main() {
|
|
@@ -12669,16 +12669,16 @@ class rd extends Sr {
|
|
|
12669
12669
|
const d = o * 2, g = t - 1;
|
|
12670
12670
|
for (let x = 0; x !== o; ++x) {
|
|
12671
12671
|
const m = a[c + x], p = a[l + x], M = g * d + x * 2, T = h[M], b = h[M + 1], R = t * d + x * 2, w = f[R], P = f[R + 1];
|
|
12672
|
-
let v = (n - e) / (r - e), E, k, C,
|
|
12672
|
+
let v = (n - e) / (r - e), E, k, C, U, B;
|
|
12673
12673
|
for (let G = 0; G < 8; G++) {
|
|
12674
|
-
E = v * v, k = E * v, C = 1 - v,
|
|
12675
|
-
const O = B * e + 3 *
|
|
12674
|
+
E = v * v, k = E * v, C = 1 - v, U = C * C, B = U * C;
|
|
12675
|
+
const O = B * e + 3 * U * v * T + 3 * C * E * w + k * r - n;
|
|
12676
12676
|
if (Math.abs(O) < 1e-10) break;
|
|
12677
|
-
const V = 3 *
|
|
12677
|
+
const V = 3 * U * (T - e) + 6 * C * v * (w - T) + 3 * E * (r - w);
|
|
12678
12678
|
if (Math.abs(V) < 1e-10) break;
|
|
12679
12679
|
v = v - O / V, v = Math.max(0, Math.min(1, v));
|
|
12680
12680
|
}
|
|
12681
|
-
s[x] = B * m + 3 *
|
|
12681
|
+
s[x] = B * m + 3 * U * v * b + 3 * C * E * P + k * p;
|
|
12682
12682
|
}
|
|
12683
12683
|
return s;
|
|
12684
12684
|
}
|
|
@@ -15547,9 +15547,9 @@ var Id = `#ifdef USE_ALPHAHASH
|
|
|
15547
15547
|
}
|
|
15548
15548
|
#endif`, Ld = `#ifdef USE_ALPHAMAP
|
|
15549
15549
|
diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
|
|
15550
|
-
#endif`,
|
|
15550
|
+
#endif`, Nd = `#ifdef USE_ALPHAMAP
|
|
15551
15551
|
uniform sampler2D alphaMap;
|
|
15552
|
-
#endif`,
|
|
15552
|
+
#endif`, Ud = `#ifdef USE_ALPHATEST
|
|
15553
15553
|
#ifdef ALPHA_TO_COVERAGE
|
|
15554
15554
|
diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
|
|
15555
15555
|
if ( diffuseColor.a == 0.0 ) discard;
|
|
@@ -16905,11 +16905,11 @@ IncidentLight directLight;
|
|
|
16905
16905
|
RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
|
|
16906
16906
|
#endif`, Lp = `#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
|
|
16907
16907
|
gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
|
|
16908
|
-
#endif`,
|
|
16908
|
+
#endif`, Np = `#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
|
|
16909
16909
|
uniform float logDepthBufFC;
|
|
16910
16910
|
varying float vFragDepth;
|
|
16911
16911
|
varying float vIsPerspective;
|
|
16912
|
-
#endif`,
|
|
16912
|
+
#endif`, Up = `#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
|
|
16913
16913
|
varying float vFragDepth;
|
|
16914
16914
|
varying float vIsPerspective;
|
|
16915
16915
|
#endif`, Fp = `#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
|
|
@@ -18108,14 +18108,14 @@ void main() {
|
|
|
18108
18108
|
gl_FragColor = texColor;
|
|
18109
18109
|
#include <tonemapping_fragment>
|
|
18110
18110
|
#include <colorspace_fragment>
|
|
18111
|
-
}`,
|
|
18111
|
+
}`, Nm = `varying vec3 vWorldDirection;
|
|
18112
18112
|
#include <common>
|
|
18113
18113
|
void main() {
|
|
18114
18114
|
vWorldDirection = transformDirection( position, modelMatrix );
|
|
18115
18115
|
#include <begin_vertex>
|
|
18116
18116
|
#include <project_vertex>
|
|
18117
18117
|
gl_Position.z = gl_Position.w;
|
|
18118
|
-
}`,
|
|
18118
|
+
}`, Um = `uniform samplerCube tCube;
|
|
18119
18119
|
uniform float tFlip;
|
|
18120
18120
|
uniform float opacity;
|
|
18121
18121
|
varying vec3 vWorldDirection;
|
|
@@ -19120,8 +19120,8 @@ void main() {
|
|
|
19120
19120
|
alphahash_fragment: Id,
|
|
19121
19121
|
alphahash_pars_fragment: Dd,
|
|
19122
19122
|
alphamap_fragment: Ld,
|
|
19123
|
-
alphamap_pars_fragment:
|
|
19124
|
-
alphatest_fragment:
|
|
19123
|
+
alphamap_pars_fragment: Nd,
|
|
19124
|
+
alphatest_fragment: Ud,
|
|
19125
19125
|
alphatest_pars_fragment: Fd,
|
|
19126
19126
|
aomap_fragment: Od,
|
|
19127
19127
|
aomap_pars_fragment: Bd,
|
|
@@ -19174,8 +19174,8 @@ void main() {
|
|
|
19174
19174
|
lights_fragment_maps: Ip,
|
|
19175
19175
|
lights_fragment_end: Dp,
|
|
19176
19176
|
logdepthbuf_fragment: Lp,
|
|
19177
|
-
logdepthbuf_pars_fragment:
|
|
19178
|
-
logdepthbuf_pars_vertex:
|
|
19177
|
+
logdepthbuf_pars_fragment: Np,
|
|
19178
|
+
logdepthbuf_pars_vertex: Up,
|
|
19179
19179
|
logdepthbuf_vertex: Fp,
|
|
19180
19180
|
map_fragment: Op,
|
|
19181
19181
|
map_pars_fragment: Bp,
|
|
@@ -19228,8 +19228,8 @@ void main() {
|
|
|
19228
19228
|
background_frag: Im,
|
|
19229
19229
|
backgroundCube_vert: Dm,
|
|
19230
19230
|
backgroundCube_frag: Lm,
|
|
19231
|
-
cube_vert:
|
|
19232
|
-
cube_frag:
|
|
19231
|
+
cube_vert: Nm,
|
|
19232
|
+
cube_frag: Um,
|
|
19233
19233
|
depth_vert: Fm,
|
|
19234
19234
|
depth_frag: Om,
|
|
19235
19235
|
distance_vert: Bm,
|
|
@@ -19420,7 +19420,7 @@ void main() {
|
|
|
19420
19420
|
}
|
|
19421
19421
|
}, un = {
|
|
19422
19422
|
basic: {
|
|
19423
|
-
uniforms: /* @__PURE__ */
|
|
19423
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19424
19424
|
bt.common,
|
|
19425
19425
|
bt.specularmap,
|
|
19426
19426
|
bt.envmap,
|
|
@@ -19432,7 +19432,7 @@ void main() {
|
|
|
19432
19432
|
fragmentShader: Zt.meshbasic_frag
|
|
19433
19433
|
},
|
|
19434
19434
|
lambert: {
|
|
19435
|
-
uniforms: /* @__PURE__ */
|
|
19435
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19436
19436
|
bt.common,
|
|
19437
19437
|
bt.specularmap,
|
|
19438
19438
|
bt.envmap,
|
|
@@ -19453,7 +19453,7 @@ void main() {
|
|
|
19453
19453
|
fragmentShader: Zt.meshlambert_frag
|
|
19454
19454
|
},
|
|
19455
19455
|
phong: {
|
|
19456
|
-
uniforms: /* @__PURE__ */
|
|
19456
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19457
19457
|
bt.common,
|
|
19458
19458
|
bt.specularmap,
|
|
19459
19459
|
bt.envmap,
|
|
@@ -19476,7 +19476,7 @@ void main() {
|
|
|
19476
19476
|
fragmentShader: Zt.meshphong_frag
|
|
19477
19477
|
},
|
|
19478
19478
|
standard: {
|
|
19479
|
-
uniforms: /* @__PURE__ */
|
|
19479
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19480
19480
|
bt.common,
|
|
19481
19481
|
bt.envmap,
|
|
19482
19482
|
bt.aomap,
|
|
@@ -19500,7 +19500,7 @@ void main() {
|
|
|
19500
19500
|
fragmentShader: Zt.meshphysical_frag
|
|
19501
19501
|
},
|
|
19502
19502
|
toon: {
|
|
19503
|
-
uniforms: /* @__PURE__ */
|
|
19503
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19504
19504
|
bt.common,
|
|
19505
19505
|
bt.aomap,
|
|
19506
19506
|
bt.lightmap,
|
|
@@ -19519,7 +19519,7 @@ void main() {
|
|
|
19519
19519
|
fragmentShader: Zt.meshtoon_frag
|
|
19520
19520
|
},
|
|
19521
19521
|
matcap: {
|
|
19522
|
-
uniforms: /* @__PURE__ */
|
|
19522
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19523
19523
|
bt.common,
|
|
19524
19524
|
bt.bumpmap,
|
|
19525
19525
|
bt.normalmap,
|
|
@@ -19533,7 +19533,7 @@ void main() {
|
|
|
19533
19533
|
fragmentShader: Zt.meshmatcap_frag
|
|
19534
19534
|
},
|
|
19535
19535
|
points: {
|
|
19536
|
-
uniforms: /* @__PURE__ */
|
|
19536
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19537
19537
|
bt.points,
|
|
19538
19538
|
bt.fog
|
|
19539
19539
|
]),
|
|
@@ -19541,7 +19541,7 @@ void main() {
|
|
|
19541
19541
|
fragmentShader: Zt.points_frag
|
|
19542
19542
|
},
|
|
19543
19543
|
dashed: {
|
|
19544
|
-
uniforms: /* @__PURE__ */
|
|
19544
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19545
19545
|
bt.common,
|
|
19546
19546
|
bt.fog,
|
|
19547
19547
|
{
|
|
@@ -19554,7 +19554,7 @@ void main() {
|
|
|
19554
19554
|
fragmentShader: Zt.linedashed_frag
|
|
19555
19555
|
},
|
|
19556
19556
|
depth: {
|
|
19557
|
-
uniforms: /* @__PURE__ */
|
|
19557
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19558
19558
|
bt.common,
|
|
19559
19559
|
bt.displacementmap
|
|
19560
19560
|
]),
|
|
@@ -19562,7 +19562,7 @@ void main() {
|
|
|
19562
19562
|
fragmentShader: Zt.depth_frag
|
|
19563
19563
|
},
|
|
19564
19564
|
normal: {
|
|
19565
|
-
uniforms: /* @__PURE__ */
|
|
19565
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19566
19566
|
bt.common,
|
|
19567
19567
|
bt.bumpmap,
|
|
19568
19568
|
bt.normalmap,
|
|
@@ -19575,7 +19575,7 @@ void main() {
|
|
|
19575
19575
|
fragmentShader: Zt.meshnormal_frag
|
|
19576
19576
|
},
|
|
19577
19577
|
sprite: {
|
|
19578
|
-
uniforms: /* @__PURE__ */
|
|
19578
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19579
19579
|
bt.sprite,
|
|
19580
19580
|
bt.fog
|
|
19581
19581
|
]),
|
|
@@ -19619,7 +19619,7 @@ void main() {
|
|
|
19619
19619
|
fragmentShader: Zt.equirect_frag
|
|
19620
19620
|
},
|
|
19621
19621
|
distance: {
|
|
19622
|
-
uniforms: /* @__PURE__ */
|
|
19622
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19623
19623
|
bt.common,
|
|
19624
19624
|
bt.displacementmap,
|
|
19625
19625
|
{
|
|
@@ -19632,7 +19632,7 @@ void main() {
|
|
|
19632
19632
|
fragmentShader: Zt.distance_frag
|
|
19633
19633
|
},
|
|
19634
19634
|
shadow: {
|
|
19635
|
-
uniforms: /* @__PURE__ */
|
|
19635
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19636
19636
|
bt.lights,
|
|
19637
19637
|
bt.fog,
|
|
19638
19638
|
{
|
|
@@ -19645,7 +19645,7 @@ void main() {
|
|
|
19645
19645
|
}
|
|
19646
19646
|
};
|
|
19647
19647
|
un.physical = {
|
|
19648
|
-
uniforms: /* @__PURE__ */
|
|
19648
|
+
uniforms: /* @__PURE__ */ Ue([
|
|
19649
19649
|
un.standard.uniforms,
|
|
19650
19650
|
{
|
|
19651
19651
|
clearcoat: { value: 0 },
|
|
@@ -19783,10 +19783,10 @@ function hg(i, t, e, n, r, s) {
|
|
|
19783
19783
|
function fg(i, t) {
|
|
19784
19784
|
const e = i.getParameter(i.MAX_VERTEX_ATTRIBS), n = {}, r = h(null);
|
|
19785
19785
|
let s = r, a = !1;
|
|
19786
|
-
function o(C,
|
|
19786
|
+
function o(C, U, B, G, z) {
|
|
19787
19787
|
let O = !1;
|
|
19788
|
-
const V = f(C, G, B,
|
|
19789
|
-
s !== V && (s = V, c(s.object)), O = d(C, G, B, z), O && g(C, G, B, z), z !== null && t.update(z, i.ELEMENT_ARRAY_BUFFER), (O || a) && (a = !1, b(C,
|
|
19788
|
+
const V = f(C, G, B, U);
|
|
19789
|
+
s !== V && (s = V, c(s.object)), O = d(C, G, B, z), O && g(C, G, B, z), z !== null && t.update(z, i.ELEMENT_ARRAY_BUFFER), (O || a) && (a = !1, b(C, U, B, G), z !== null && i.bindBuffer(i.ELEMENT_ARRAY_BUFFER, t.get(z).buffer));
|
|
19790
19790
|
}
|
|
19791
19791
|
function l() {
|
|
19792
19792
|
return i.createVertexArray();
|
|
@@ -19797,10 +19797,10 @@ function fg(i, t) {
|
|
|
19797
19797
|
function u(C) {
|
|
19798
19798
|
return i.deleteVertexArray(C);
|
|
19799
19799
|
}
|
|
19800
|
-
function f(C,
|
|
19800
|
+
function f(C, U, B, G) {
|
|
19801
19801
|
const z = G.wireframe === !0;
|
|
19802
|
-
let O = n[
|
|
19803
|
-
O === void 0 && (O = {}, n[
|
|
19802
|
+
let O = n[U.id];
|
|
19803
|
+
O === void 0 && (O = {}, n[U.id] = O);
|
|
19804
19804
|
const V = C.isInstancedMesh === !0 ? C.id : 0;
|
|
19805
19805
|
let at = O[V];
|
|
19806
19806
|
at === void 0 && (at = {}, O[V] = at);
|
|
@@ -19810,15 +19810,15 @@ function fg(i, t) {
|
|
|
19810
19810
|
return Mt === void 0 && (Mt = h(l()), it[z] = Mt), Mt;
|
|
19811
19811
|
}
|
|
19812
19812
|
function h(C) {
|
|
19813
|
-
const
|
|
19813
|
+
const U = [], B = [], G = [];
|
|
19814
19814
|
for (let z = 0; z < e; z++)
|
|
19815
|
-
|
|
19815
|
+
U[z] = 0, B[z] = 0, G[z] = 0;
|
|
19816
19816
|
return {
|
|
19817
19817
|
// for backward compatibility on non-VAO support browser
|
|
19818
19818
|
geometry: null,
|
|
19819
19819
|
program: null,
|
|
19820
19820
|
wireframe: !1,
|
|
19821
|
-
newAttributes:
|
|
19821
|
+
newAttributes: U,
|
|
19822
19822
|
enabledAttributes: B,
|
|
19823
19823
|
attributeDivisors: G,
|
|
19824
19824
|
object: C,
|
|
@@ -19826,8 +19826,8 @@ function fg(i, t) {
|
|
|
19826
19826
|
index: null
|
|
19827
19827
|
};
|
|
19828
19828
|
}
|
|
19829
|
-
function d(C,
|
|
19830
|
-
const z = s.attributes, O =
|
|
19829
|
+
function d(C, U, B, G) {
|
|
19830
|
+
const z = s.attributes, O = U.attributes;
|
|
19831
19831
|
let V = 0;
|
|
19832
19832
|
const at = B.getAttributes();
|
|
19833
19833
|
for (const it in at)
|
|
@@ -19839,8 +19839,8 @@ function fg(i, t) {
|
|
|
19839
19839
|
}
|
|
19840
19840
|
return s.attributesNum !== V || s.index !== G;
|
|
19841
19841
|
}
|
|
19842
|
-
function g(C,
|
|
19843
|
-
const z = {}, O =
|
|
19842
|
+
function g(C, U, B, G) {
|
|
19843
|
+
const z = {}, O = U.attributes;
|
|
19844
19844
|
let V = 0;
|
|
19845
19845
|
const at = B.getAttributes();
|
|
19846
19846
|
for (const it in at)
|
|
@@ -19854,27 +19854,27 @@ function fg(i, t) {
|
|
|
19854
19854
|
}
|
|
19855
19855
|
function x() {
|
|
19856
19856
|
const C = s.newAttributes;
|
|
19857
|
-
for (let
|
|
19858
|
-
C[
|
|
19857
|
+
for (let U = 0, B = C.length; U < B; U++)
|
|
19858
|
+
C[U] = 0;
|
|
19859
19859
|
}
|
|
19860
19860
|
function m(C) {
|
|
19861
19861
|
p(C, 0);
|
|
19862
19862
|
}
|
|
19863
|
-
function p(C,
|
|
19863
|
+
function p(C, U) {
|
|
19864
19864
|
const B = s.newAttributes, G = s.enabledAttributes, z = s.attributeDivisors;
|
|
19865
|
-
B[C] = 1, G[C] === 0 && (i.enableVertexAttribArray(C), G[C] = 1), z[C] !==
|
|
19865
|
+
B[C] = 1, G[C] === 0 && (i.enableVertexAttribArray(C), G[C] = 1), z[C] !== U && (i.vertexAttribDivisor(C, U), z[C] = U);
|
|
19866
19866
|
}
|
|
19867
19867
|
function M() {
|
|
19868
|
-
const C = s.newAttributes,
|
|
19869
|
-
for (let B = 0, G =
|
|
19870
|
-
|
|
19868
|
+
const C = s.newAttributes, U = s.enabledAttributes;
|
|
19869
|
+
for (let B = 0, G = U.length; B < G; B++)
|
|
19870
|
+
U[B] !== C[B] && (i.disableVertexAttribArray(B), U[B] = 0);
|
|
19871
19871
|
}
|
|
19872
|
-
function T(C,
|
|
19873
|
-
V === !0 ? i.vertexAttribIPointer(C,
|
|
19872
|
+
function T(C, U, B, G, z, O, V) {
|
|
19873
|
+
V === !0 ? i.vertexAttribIPointer(C, U, B, z, O) : i.vertexAttribPointer(C, U, B, G, z, O);
|
|
19874
19874
|
}
|
|
19875
|
-
function b(C,
|
|
19875
|
+
function b(C, U, B, G) {
|
|
19876
19876
|
x();
|
|
19877
|
-
const z = G.attributes, O = B.getAttributes(), V =
|
|
19877
|
+
const z = G.attributes, O = B.getAttributes(), V = U.defaultAttributeValues;
|
|
19878
19878
|
for (const at in O) {
|
|
19879
19879
|
const it = O[at];
|
|
19880
19880
|
if (it.location >= 0) {
|
|
@@ -19884,7 +19884,7 @@ function fg(i, t) {
|
|
|
19884
19884
|
if (kt === void 0) continue;
|
|
19885
19885
|
const Wt = kt.buffer, te = kt.type, et = kt.bytesPerElement, rt = te === i.INT || te === i.UNSIGNED_INT || Mt.gpuType === wo;
|
|
19886
19886
|
if (Mt.isInterleavedBufferAttribute) {
|
|
19887
|
-
const ft = Mt.data,
|
|
19887
|
+
const ft = Mt.data, Ut = ft.stride, Lt = Mt.offset;
|
|
19888
19888
|
if (ft.isInstancedInterleavedBuffer) {
|
|
19889
19889
|
for (let Dt = 0; Dt < it.locationSize; Dt++)
|
|
19890
19890
|
p(it.location + Dt, ft.meshPerAttribute);
|
|
@@ -19899,7 +19899,7 @@ function fg(i, t) {
|
|
|
19899
19899
|
lt / it.locationSize,
|
|
19900
19900
|
te,
|
|
19901
19901
|
yt,
|
|
19902
|
-
|
|
19902
|
+
Ut * et,
|
|
19903
19903
|
(Lt + lt / it.locationSize * Dt) * et,
|
|
19904
19904
|
rt
|
|
19905
19905
|
);
|
|
@@ -19947,9 +19947,9 @@ function fg(i, t) {
|
|
|
19947
19947
|
function R() {
|
|
19948
19948
|
E();
|
|
19949
19949
|
for (const C in n) {
|
|
19950
|
-
const
|
|
19951
|
-
for (const B in
|
|
19952
|
-
const G =
|
|
19950
|
+
const U = n[C];
|
|
19951
|
+
for (const B in U) {
|
|
19952
|
+
const G = U[B];
|
|
19953
19953
|
for (const z in G) {
|
|
19954
19954
|
const O = G[z];
|
|
19955
19955
|
for (const V in O)
|
|
@@ -19962,9 +19962,9 @@ function fg(i, t) {
|
|
|
19962
19962
|
}
|
|
19963
19963
|
function w(C) {
|
|
19964
19964
|
if (n[C.id] === void 0) return;
|
|
19965
|
-
const
|
|
19966
|
-
for (const B in
|
|
19967
|
-
const G =
|
|
19965
|
+
const U = n[C.id];
|
|
19966
|
+
for (const B in U) {
|
|
19967
|
+
const G = U[B];
|
|
19968
19968
|
for (const z in G) {
|
|
19969
19969
|
const O = G[z];
|
|
19970
19970
|
for (const V in O)
|
|
@@ -19975,8 +19975,8 @@ function fg(i, t) {
|
|
|
19975
19975
|
delete n[C.id];
|
|
19976
19976
|
}
|
|
19977
19977
|
function P(C) {
|
|
19978
|
-
for (const
|
|
19979
|
-
const B = n[
|
|
19978
|
+
for (const U in n) {
|
|
19979
|
+
const B = n[U];
|
|
19980
19980
|
for (const G in B) {
|
|
19981
19981
|
const z = B[G];
|
|
19982
19982
|
if (z[C.id] === void 0) continue;
|
|
@@ -19988,8 +19988,8 @@ function fg(i, t) {
|
|
|
19988
19988
|
}
|
|
19989
19989
|
}
|
|
19990
19990
|
function v(C) {
|
|
19991
|
-
for (const
|
|
19992
|
-
const B = n[
|
|
19991
|
+
for (const U in n) {
|
|
19992
|
+
const B = n[U], G = C.isInstancedMesh === !0 ? C.id : 0, z = B[G];
|
|
19993
19993
|
if (z !== void 0) {
|
|
19994
19994
|
for (const O in z) {
|
|
19995
19995
|
const V = z[O];
|
|
@@ -19997,7 +19997,7 @@ function fg(i, t) {
|
|
|
19997
19997
|
u(V[at].object), delete V[at];
|
|
19998
19998
|
delete z[O];
|
|
19999
19999
|
}
|
|
20000
|
-
delete B[G], Object.keys(B).length === 0 && delete n[
|
|
20000
|
+
delete B[G], Object.keys(B).length === 0 && delete n[U];
|
|
20001
20001
|
}
|
|
20002
20002
|
}
|
|
20003
20003
|
}
|
|
@@ -20888,7 +20888,7 @@ function yg(i) {
|
|
|
20888
20888
|
function s(h) {
|
|
20889
20889
|
if (h && h.isTexture) {
|
|
20890
20890
|
const d = h.mapping;
|
|
20891
|
-
if (d === us || d ===
|
|
20891
|
+
if (d === us || d === Us)
|
|
20892
20892
|
if (t.has(h)) {
|
|
20893
20893
|
const g = t.get(h).texture;
|
|
20894
20894
|
return o(g, h.mapping);
|
|
@@ -20905,7 +20905,7 @@ function yg(i) {
|
|
|
20905
20905
|
}
|
|
20906
20906
|
function a(h) {
|
|
20907
20907
|
if (h && h.isTexture) {
|
|
20908
|
-
const d = h.mapping, g = d === us || d ===
|
|
20908
|
+
const d = h.mapping, g = d === us || d === Us, x = d === li || d === Fi;
|
|
20909
20909
|
if (g || x) {
|
|
20910
20910
|
let m = e.get(h);
|
|
20911
20911
|
const p = m !== void 0 ? m.texture.pmremVersion : 0;
|
|
@@ -20922,7 +20922,7 @@ function yg(i) {
|
|
|
20922
20922
|
return h;
|
|
20923
20923
|
}
|
|
20924
20924
|
function o(h, d) {
|
|
20925
|
-
return d === us ? h.mapping = li : d ===
|
|
20925
|
+
return d === us ? h.mapping = li : d === Us && (h.mapping = Fi), h;
|
|
20926
20926
|
}
|
|
20927
20927
|
function l(h) {
|
|
20928
20928
|
let d = 0;
|
|
@@ -21134,10 +21134,10 @@ function Ag(i, t, e) {
|
|
|
21134
21134
|
P.type = We, P.needsUpdate = !0;
|
|
21135
21135
|
const v = T * 4;
|
|
21136
21136
|
for (let k = 0; k < f; k++) {
|
|
21137
|
-
const C = m[k],
|
|
21137
|
+
const C = m[k], U = p[k], B = M[k], G = b * R * 4 * k;
|
|
21138
21138
|
for (let z = 0; z < C.count; z++) {
|
|
21139
21139
|
const O = z * v;
|
|
21140
|
-
d === !0 && (r.fromBufferAttribute(C, z), w[G + O + 0] = r.x, w[G + O + 1] = r.y, w[G + O + 2] = r.z, w[G + O + 3] = 0), g === !0 && (r.fromBufferAttribute(
|
|
21140
|
+
d === !0 && (r.fromBufferAttribute(C, z), w[G + O + 0] = r.x, w[G + O + 1] = r.y, w[G + O + 2] = r.z, w[G + O + 3] = 0), g === !0 && (r.fromBufferAttribute(U, z), w[G + O + 4] = r.x, w[G + O + 5] = r.y, w[G + O + 6] = r.z, w[G + O + 7] = 0), x === !0 && (r.fromBufferAttribute(B, z), w[G + O + 8] = r.x, w[G + O + 9] = r.y, w[G + O + 10] = r.z, w[G + O + 11] = B.itemSize === 4 ? r.w : 1);
|
|
21141
21141
|
}
|
|
21142
21142
|
}
|
|
21143
21143
|
h = {
|
|
@@ -21188,9 +21188,9 @@ const Cg = {
|
|
|
21188
21188
|
[Dl]: "REINHARD_TONE_MAPPING",
|
|
21189
21189
|
[Ll]: "CINEON_TONE_MAPPING",
|
|
21190
21190
|
[Ao]: "ACES_FILMIC_TONE_MAPPING",
|
|
21191
|
-
[
|
|
21191
|
+
[Ul]: "AGX_TONE_MAPPING",
|
|
21192
21192
|
[Fl]: "NEUTRAL_TONE_MAPPING",
|
|
21193
|
-
[
|
|
21193
|
+
[Nl]: "CUSTOM_TONE_MAPPING"
|
|
21194
21194
|
};
|
|
21195
21195
|
function Rg(i, t, e, n, r) {
|
|
21196
21196
|
const s = new pn(t, e, {
|
|
@@ -21372,7 +21372,7 @@ function Lg(i, t) {
|
|
|
21372
21372
|
i.uniform4fv(this.addr, t), ye(e, t);
|
|
21373
21373
|
}
|
|
21374
21374
|
}
|
|
21375
|
-
function
|
|
21375
|
+
function Ng(i, t) {
|
|
21376
21376
|
const e = this.cache, n = t.elements;
|
|
21377
21377
|
if (n === void 0) {
|
|
21378
21378
|
if (Me(e, t)) return;
|
|
@@ -21382,7 +21382,7 @@ function Ug(i, t) {
|
|
|
21382
21382
|
_l.set(n), i.uniformMatrix2fv(this.addr, !1, _l), ye(e, n);
|
|
21383
21383
|
}
|
|
21384
21384
|
}
|
|
21385
|
-
function
|
|
21385
|
+
function Ug(i, t) {
|
|
21386
21386
|
const e = this.cache, n = t.elements;
|
|
21387
21387
|
if (n === void 0) {
|
|
21388
21388
|
if (Me(e, t)) return;
|
|
@@ -21468,7 +21468,7 @@ function Xg(i, t, e) {
|
|
|
21468
21468
|
const n = this.cache, r = e.allocateTextureUnit();
|
|
21469
21469
|
n[0] !== r && (i.uniform1i(this.addr, r), n[0] = r);
|
|
21470
21470
|
let s;
|
|
21471
|
-
this.type === i.SAMPLER_2D_SHADOW ? (bo.compareFunction = e.isReversedDepthBuffer() ?
|
|
21471
|
+
this.type === i.SAMPLER_2D_SHADOW ? (bo.compareFunction = e.isReversedDepthBuffer() ? Uo : No, s = bo) : s = mu, e.setTexture2D(t || s, r);
|
|
21472
21472
|
}
|
|
21473
21473
|
function qg(i, t, e) {
|
|
21474
21474
|
const n = this.cache, r = e.allocateTextureUnit();
|
|
@@ -21497,10 +21497,10 @@ function Jg(i) {
|
|
|
21497
21497
|
return Lg;
|
|
21498
21498
|
// _VEC4
|
|
21499
21499
|
case 35674:
|
|
21500
|
-
return
|
|
21500
|
+
return Ng;
|
|
21501
21501
|
// _MAT2
|
|
21502
21502
|
case 35675:
|
|
21503
|
-
return
|
|
21503
|
+
return Ug;
|
|
21504
21504
|
// _MAT3
|
|
21505
21505
|
case 35676:
|
|
21506
21506
|
return Fg;
|
|
@@ -21863,9 +21863,9 @@ const T_ = {
|
|
|
21863
21863
|
[Dl]: "Reinhard",
|
|
21864
21864
|
[Ll]: "Cineon",
|
|
21865
21865
|
[Ao]: "ACESFilmic",
|
|
21866
|
-
[
|
|
21866
|
+
[Ul]: "AgX",
|
|
21867
21867
|
[Fl]: "Neutral",
|
|
21868
|
-
[
|
|
21868
|
+
[Nl]: "Custom"
|
|
21869
21869
|
};
|
|
21870
21870
|
function A_(i, t) {
|
|
21871
21871
|
const e = T_[t];
|
|
@@ -21938,11 +21938,11 @@ function L_(i, t) {
|
|
|
21938
21938
|
}
|
|
21939
21939
|
return Eo(e);
|
|
21940
21940
|
}
|
|
21941
|
-
const
|
|
21941
|
+
const N_ = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
|
|
21942
21942
|
function El(i) {
|
|
21943
|
-
return i.replace(
|
|
21943
|
+
return i.replace(N_, U_);
|
|
21944
21944
|
}
|
|
21945
|
-
function
|
|
21945
|
+
function U_(i, t, e, n) {
|
|
21946
21946
|
let r = "";
|
|
21947
21947
|
for (let s = parseInt(t); s < parseInt(e); s++)
|
|
21948
21948
|
r += n.replace(/\[\s*i\s*\]/g, "[ " + s + " ]").replace(/UNROLLED_LOOP_INDEX/g, s);
|
|
@@ -22271,7 +22271,7 @@ function X_(i, t, e, n) {
|
|
|
22271
22271
|
r.attachShader(x, R), r.attachShader(x, w), e.index0AttributeName !== void 0 ? r.bindAttribLocation(x, 0, e.index0AttributeName) : e.morphTargets === !0 && r.bindAttribLocation(x, 0, "position"), r.linkProgram(x);
|
|
22272
22272
|
function P(C) {
|
|
22273
22273
|
if (i.debug.checkShaderErrors) {
|
|
22274
|
-
const
|
|
22274
|
+
const U = r.getProgramInfoLog(x) || "", B = r.getShaderInfoLog(R) || "", G = r.getShaderInfoLog(w) || "", z = U.trim(), O = B.trim(), V = G.trim();
|
|
22275
22275
|
let at = !0, it = !0;
|
|
22276
22276
|
if (r.getProgramParameter(x, r.LINK_STATUS) === !1)
|
|
22277
22277
|
if (at = !1, typeof i.debug.onShaderError == "function")
|
|
@@ -22383,8 +22383,8 @@ function J_(i, t, e, n, r, s) {
|
|
|
22383
22383
|
function g(v) {
|
|
22384
22384
|
return l.add(v), v === 0 ? "uv" : `uv${v}`;
|
|
22385
22385
|
}
|
|
22386
|
-
function x(v, E, k, C,
|
|
22387
|
-
const B = C.fog, G =
|
|
22386
|
+
function x(v, E, k, C, U) {
|
|
22387
|
+
const B = C.fog, G = U.geometry, z = v.isMeshStandardMaterial || v.isMeshLambertMaterial || v.isMeshPhongMaterial ? C.environment : null, O = v.isMeshStandardMaterial || v.isMeshLambertMaterial && !v.envMap || v.isMeshPhongMaterial && !v.envMap, V = t.get(v.envMap || z, O), at = V && V.mapping === As ? V.image.height : null, it = d[v.type];
|
|
22388
22388
|
v.precision !== null && (h = n.getMaxPrecision(v.precision), h !== v.precision && zt("WebGLProgram.getParameters:", v.precision, "not supported, using", h, "instead."));
|
|
22389
22389
|
const Mt = G.morphAttributes.position || G.morphAttributes.normal || G.morphAttributes.color, yt = Mt !== void 0 ? Mt.length : 0;
|
|
22390
22390
|
let lt = 0;
|
|
@@ -22395,7 +22395,7 @@ function J_(i, t, e, n, r, s) {
|
|
|
22395
22395
|
kt = Xt.vertexShader, Wt = Xt.fragmentShader;
|
|
22396
22396
|
} else
|
|
22397
22397
|
kt = v.vertexShader, Wt = v.fragmentShader, o.update(v), te = o.getVertexShaderID(v), et = o.getFragmentShaderID(v);
|
|
22398
|
-
const rt = i.getRenderTarget(), ft = i.state.buffers.depth.getReversed(),
|
|
22398
|
+
const rt = i.getRenderTarget(), ft = i.state.buffers.depth.getReversed(), Ut = U.isInstancedMesh === !0, Lt = U.isBatchedMesh === !0, Dt = !!v.map, mt = !!v.matcap, st = !!V, F = !!v.aoMap, $ = !!v.lightMap, q = !!v.bumpMap, tt = !!v.normalMap, A = !!v.displacementMap, gt = !!v.emissiveMap, J = !!v.metalnessMap, ut = !!v.roughnessMap, Z = v.anisotropy > 0, S = v.clearcoat > 0, _ = v.dispersion > 0, I = v.iridescence > 0, Y = v.sheen > 0, nt = v.transmission > 0, K = Z && !!v.anisotropyMap, St = S && !!v.clearcoatMap, dt = S && !!v.clearcoatNormalMap, Ft = S && !!v.clearcoatRoughnessMap, Gt = I && !!v.iridescenceMap, ct = I && !!v.iridescenceThicknessMap, pt = Y && !!v.sheenColorMap, Rt = Y && !!v.sheenRoughnessMap, Pt = !!v.specularMap, At = !!v.specularColorMap, qt = !!v.specularIntensityMap, L = nt && !!v.transmissionMap, xt = nt && !!v.thicknessMap, _t = !!v.gradientMap, wt = !!v.alphaMap, ht = v.alphaTest > 0, Q = !!v.alphaHash, X = !!v.extensions;
|
|
22399
22399
|
let ot = dn;
|
|
22400
22400
|
v.toneMapped && (rt === null || rt.isXRRenderTarget === !0) && (ot = i.toneMapping);
|
|
22401
22401
|
const It = {
|
|
@@ -22411,10 +22411,10 @@ function J_(i, t, e, n, r, s) {
|
|
|
22411
22411
|
glslVersion: v.glslVersion,
|
|
22412
22412
|
precision: h,
|
|
22413
22413
|
batching: Lt,
|
|
22414
|
-
batchingColor: Lt &&
|
|
22415
|
-
instancing:
|
|
22416
|
-
instancingColor:
|
|
22417
|
-
instancingMorph:
|
|
22414
|
+
batchingColor: Lt && U._colorsTexture !== null,
|
|
22415
|
+
instancing: Ut,
|
|
22416
|
+
instancingColor: Ut && U.instanceColor !== null,
|
|
22417
|
+
instancingMorph: Ut && U.morphTexture !== null,
|
|
22418
22418
|
outputColorSpace: rt === null ? i.outputColorSpace : rt.isXRRenderTarget === !0 ? rt.texture.colorSpace : Bi,
|
|
22419
22419
|
alphaToCoverage: !!v.alphaToCoverage,
|
|
22420
22420
|
map: Dt,
|
|
@@ -22485,7 +22485,7 @@ function J_(i, t, e, n, r, s) {
|
|
|
22485
22485
|
vertexTangents: !!G.attributes.tangent && (tt || Z),
|
|
22486
22486
|
vertexColors: v.vertexColors,
|
|
22487
22487
|
vertexAlphas: v.vertexColors === !0 && !!G.attributes.color && G.attributes.color.itemSize === 4,
|
|
22488
|
-
pointsUvs:
|
|
22488
|
+
pointsUvs: U.isPoints === !0 && !!G.attributes.uv && (Dt || wt),
|
|
22489
22489
|
fog: !!B,
|
|
22490
22490
|
useFog: v.fog === !0,
|
|
22491
22491
|
fogExp2: !!B && B.isFogExp2,
|
|
@@ -22493,7 +22493,7 @@ function J_(i, t, e, n, r, s) {
|
|
|
22493
22493
|
sizeAttenuation: v.sizeAttenuation === !0,
|
|
22494
22494
|
logarithmicDepthBuffer: f,
|
|
22495
22495
|
reversedDepthBuffer: ft,
|
|
22496
|
-
skinning:
|
|
22496
|
+
skinning: U.isSkinnedMesh === !0,
|
|
22497
22497
|
morphTargets: G.morphAttributes.position !== void 0,
|
|
22498
22498
|
morphNormals: G.morphAttributes.normal !== void 0,
|
|
22499
22499
|
morphColors: G.morphAttributes.color !== void 0,
|
|
@@ -22827,10 +22827,10 @@ function i0(i) {
|
|
|
22827
22827
|
let d = 0, g = 0, x = 0, m = 0, p = 0, M = 0, T = 0, b = 0, R = 0, w = 0, P = 0;
|
|
22828
22828
|
c.sort(n0);
|
|
22829
22829
|
for (let E = 0, k = c.length; E < k; E++) {
|
|
22830
|
-
const C = c[E],
|
|
22830
|
+
const C = c[E], U = C.color, B = C.intensity, G = C.distance;
|
|
22831
22831
|
let z = null;
|
|
22832
22832
|
if (C.shadow && C.shadow.map && (C.shadow.map.texture.format === Oi ? z = C.shadow.map.texture : z = C.shadow.map.depthTexture || C.shadow.map.texture), C.isAmbientLight)
|
|
22833
|
-
u +=
|
|
22833
|
+
u += U.r * B, f += U.g * B, h += U.b * B;
|
|
22834
22834
|
else if (C.isLightProbe) {
|
|
22835
22835
|
for (let O = 0; O < 9; O++)
|
|
22836
22836
|
n.probe[O].addScaledVector(C.sh.coefficients[O], B);
|
|
@@ -22844,7 +22844,7 @@ function i0(i) {
|
|
|
22844
22844
|
n.directional[d] = O, d++;
|
|
22845
22845
|
} else if (C.isSpotLight) {
|
|
22846
22846
|
const O = t.get(C);
|
|
22847
|
-
O.position.setFromMatrixPosition(C.matrixWorld), O.color.copy(
|
|
22847
|
+
O.position.setFromMatrixPosition(C.matrixWorld), O.color.copy(U).multiplyScalar(B), O.distance = G, O.coneCos = Math.cos(C.angle), O.penumbraCos = Math.cos(C.angle * (1 - C.penumbra)), O.decay = C.decay, n.spot[x] = O;
|
|
22848
22848
|
const V = C.shadow;
|
|
22849
22849
|
if (C.map && (n.spotLightMap[R] = C.map, R++, V.updateMatrices(C), C.castShadow && w++), n.spotLightMatrix[x] = V.matrix, C.castShadow) {
|
|
22850
22850
|
const at = e.get(C);
|
|
@@ -22853,7 +22853,7 @@ function i0(i) {
|
|
|
22853
22853
|
x++;
|
|
22854
22854
|
} else if (C.isRectAreaLight) {
|
|
22855
22855
|
const O = t.get(C);
|
|
22856
|
-
O.color.copy(
|
|
22856
|
+
O.color.copy(U).multiplyScalar(B), O.halfWidth.set(C.width * 0.5, 0, 0), O.halfHeight.set(0, C.height * 0.5, 0), n.rectArea[m] = O, m++;
|
|
22857
22857
|
} else if (C.isPointLight) {
|
|
22858
22858
|
const O = t.get(C);
|
|
22859
22859
|
if (O.color.copy(C.color).multiplyScalar(C.intensity), O.distance = C.distance, O.decay = C.decay, C.castShadow) {
|
|
@@ -23018,8 +23018,8 @@ function l0(i, t, e) {
|
|
|
23018
23018
|
this.render = function(w, P, v) {
|
|
23019
23019
|
if (m.enabled === !1 || m.autoUpdate === !1 && m.needsUpdate === !1 || w.length === 0) return;
|
|
23020
23020
|
this.type === Fu && (zt("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."), this.type = ls);
|
|
23021
|
-
const E = i.getRenderTarget(), k = i.getActiveCubeFace(), C = i.getActiveMipmapLevel(),
|
|
23022
|
-
|
|
23021
|
+
const E = i.getRenderTarget(), k = i.getActiveCubeFace(), C = i.getActiveMipmapLevel(), U = i.state;
|
|
23022
|
+
U.setBlending(Pn), U.buffers.depth.getReversed() === !0 ? U.buffers.color.setClear(0, 0, 0, 0) : U.buffers.color.setClear(1, 1, 1, 1), U.buffers.depth.setTest(!0), U.setScissorTest(!1);
|
|
23023
23023
|
const B = p !== this.type;
|
|
23024
23024
|
B && P.traverse(function(G) {
|
|
23025
23025
|
G.material && (Array.isArray(G.material) ? G.material.forEach((z) => z.needsUpdate = !0) : G.material.needsUpdate = !0);
|
|
@@ -23049,7 +23049,7 @@ function l0(i, t, e) {
|
|
|
23049
23049
|
generateMipmaps: !1
|
|
23050
23050
|
}), V.map.texture.name = O.name + ".shadowMap", V.map.depthTexture = new gr(r.x, r.y, We), V.map.depthTexture.name = O.name + ".shadowMapDepth", V.map.depthTexture.format = Ln, V.map.depthTexture.compareFunction = null, V.map.depthTexture.minFilter = Ce, V.map.depthTexture.magFilter = Ce;
|
|
23051
23051
|
} else
|
|
23052
|
-
O.isPointLight ? (V.map = new pu(r.x), V.map.depthTexture = new ff(r.x, mn)) : (V.map = new pn(r.x, r.y), V.map.depthTexture = new gr(r.x, r.y, mn)), V.map.depthTexture.name = O.name + ".shadowMap", V.map.depthTexture.format = Ln, this.type === ls ? (V.map.depthTexture.compareFunction = it ?
|
|
23052
|
+
O.isPointLight ? (V.map = new pu(r.x), V.map.depthTexture = new ff(r.x, mn)) : (V.map = new pn(r.x, r.y), V.map.depthTexture = new gr(r.x, r.y, mn)), V.map.depthTexture.name = O.name + ".shadowMap", V.map.depthTexture.format = Ln, this.type === ls ? (V.map.depthTexture.compareFunction = it ? Uo : No, V.map.depthTexture.minFilter = ve, V.map.depthTexture.magFilter = ve) : (V.map.depthTexture.compareFunction = null, V.map.depthTexture.minFilter = Ce, V.map.depthTexture.magFilter = Ce);
|
|
23053
23053
|
V.camera.updateProjectionMatrix();
|
|
23054
23054
|
}
|
|
23055
23055
|
const Mt = V.map.isWebGLCubeRenderTarget ? 6 : 1;
|
|
@@ -23064,7 +23064,7 @@ function l0(i, t, e) {
|
|
|
23064
23064
|
s.y * lt.y,
|
|
23065
23065
|
s.x * lt.z,
|
|
23066
23066
|
s.y * lt.w
|
|
23067
|
-
),
|
|
23067
|
+
), U.viewport(a);
|
|
23068
23068
|
}
|
|
23069
23069
|
if (O.isPointLight) {
|
|
23070
23070
|
const lt = V.camera, kt = V.matrix, Wt = O.distance || lt.far;
|
|
@@ -23090,15 +23090,15 @@ function l0(i, t, e) {
|
|
|
23090
23090
|
if (C !== void 0)
|
|
23091
23091
|
k = C;
|
|
23092
23092
|
else if (k = v.isPointLight === !0 ? l : o, i.localClippingEnabled && P.clipShadows === !0 && Array.isArray(P.clippingPlanes) && P.clippingPlanes.length !== 0 || P.displacementMap && P.displacementScale !== 0 || P.alphaMap && P.alphaTest > 0 || P.map && P.alphaTest > 0 || P.alphaToCoverage === !0) {
|
|
23093
|
-
const
|
|
23094
|
-
let G = c[
|
|
23095
|
-
G === void 0 && (G = {}, c[
|
|
23093
|
+
const U = k.uuid, B = P.uuid;
|
|
23094
|
+
let G = c[U];
|
|
23095
|
+
G === void 0 && (G = {}, c[U] = G);
|
|
23096
23096
|
let z = G[B];
|
|
23097
23097
|
z === void 0 && (z = k.clone(), G[B] = z, P.addEventListener("dispose", R)), k = z;
|
|
23098
23098
|
}
|
|
23099
23099
|
if (k.visible = P.visible, k.wireframe = P.wireframe, E === ir ? k.side = P.shadowSide !== null ? P.shadowSide : P.side : k.side = P.shadowSide !== null ? P.shadowSide : f[P.side], k.alphaMap = P.alphaMap, k.alphaTest = P.alphaToCoverage === !0 ? 0.5 : P.alphaTest, k.map = P.map, k.clipShadows = P.clipShadows, k.clippingPlanes = P.clippingPlanes, k.clipIntersection = P.clipIntersection, k.displacementMap = P.displacementMap, k.displacementScale = P.displacementScale, k.displacementBias = P.displacementBias, k.wireframeLinewidth = P.wireframeLinewidth, k.linewidth = P.linewidth, v.isPointLight === !0 && k.isMeshDistanceMaterial === !0) {
|
|
23100
|
-
const
|
|
23101
|
-
|
|
23100
|
+
const U = i.properties.get(k);
|
|
23101
|
+
U.light = v;
|
|
23102
23102
|
}
|
|
23103
23103
|
return k;
|
|
23104
23104
|
}
|
|
@@ -23121,9 +23121,9 @@ function l0(i, t, e) {
|
|
|
23121
23121
|
w.onBeforeShadow(i, w, P, v, B, z, null), i.renderBufferDirect(v, null, B, z, w, null), w.onAfterShadow(i, w, P, v, B, z, null);
|
|
23122
23122
|
}
|
|
23123
23123
|
}
|
|
23124
|
-
const
|
|
23125
|
-
for (let B = 0, G =
|
|
23126
|
-
b(
|
|
23124
|
+
const U = w.children;
|
|
23125
|
+
for (let B = 0, G = U.length; B < G; B++)
|
|
23126
|
+
b(U[B], P, v, E, k);
|
|
23127
23127
|
}
|
|
23128
23128
|
function R(w) {
|
|
23129
23129
|
w.target.removeEventListener("dispose", R);
|
|
@@ -23186,7 +23186,7 @@ function u0(i, t) {
|
|
|
23186
23186
|
case Ra:
|
|
23187
23187
|
i.depthFunc(i.LESS);
|
|
23188
23188
|
break;
|
|
23189
|
-
case
|
|
23189
|
+
case Ui:
|
|
23190
23190
|
i.depthFunc(i.LEQUAL);
|
|
23191
23191
|
break;
|
|
23192
23192
|
case Pa:
|
|
@@ -23245,7 +23245,7 @@ function u0(i, t) {
|
|
|
23245
23245
|
};
|
|
23246
23246
|
}
|
|
23247
23247
|
const s = new e(), a = new n(), o = new r(), l = /* @__PURE__ */ new WeakMap(), c = /* @__PURE__ */ new WeakMap();
|
|
23248
|
-
let u = {}, f = {}, h = /* @__PURE__ */ new WeakMap(), d = [], g = null, x = !1, m = null, p = null, M = null, T = null, b = null, R = null, w = null, P = new Qt(0, 0, 0), v = 0, E = !1, k = null, C = null,
|
|
23248
|
+
let u = {}, f = {}, h = /* @__PURE__ */ new WeakMap(), d = [], g = null, x = !1, m = null, p = null, M = null, T = null, b = null, R = null, w = null, P = new Qt(0, 0, 0), v = 0, E = !1, k = null, C = null, U = null, B = null, G = null;
|
|
23249
23249
|
const z = i.getParameter(i.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
|
|
23250
23250
|
let O = !1, V = 0;
|
|
23251
23251
|
const at = i.getParameter(i.VERSION);
|
|
@@ -23260,14 +23260,14 @@ function u0(i, t) {
|
|
|
23260
23260
|
return Q;
|
|
23261
23261
|
}
|
|
23262
23262
|
const et = {};
|
|
23263
|
-
et[i.TEXTURE_2D] = te(i.TEXTURE_2D, i.TEXTURE_2D, 1), et[i.TEXTURE_CUBE_MAP] = te(i.TEXTURE_CUBE_MAP, i.TEXTURE_CUBE_MAP_POSITIVE_X, 6), et[i.TEXTURE_2D_ARRAY] = te(i.TEXTURE_2D_ARRAY, i.TEXTURE_2D_ARRAY, 1, 1), et[i.TEXTURE_3D] = te(i.TEXTURE_3D, i.TEXTURE_3D, 1, 1), s.setClear(0, 0, 0, 1), a.setClear(1), o.setClear(0), rt(i.DEPTH_TEST), a.setFunc(
|
|
23263
|
+
et[i.TEXTURE_2D] = te(i.TEXTURE_2D, i.TEXTURE_2D, 1), et[i.TEXTURE_CUBE_MAP] = te(i.TEXTURE_CUBE_MAP, i.TEXTURE_CUBE_MAP_POSITIVE_X, 6), et[i.TEXTURE_2D_ARRAY] = te(i.TEXTURE_2D_ARRAY, i.TEXTURE_2D_ARRAY, 1, 1), et[i.TEXTURE_3D] = te(i.TEXTURE_3D, i.TEXTURE_3D, 1, 1), s.setClear(0, 0, 0, 1), a.setClear(1), o.setClear(0), rt(i.DEPTH_TEST), a.setFunc(Ui), q(!1), tt(ec), rt(i.CULL_FACE), F(Pn);
|
|
23264
23264
|
function rt(L) {
|
|
23265
23265
|
u[L] !== !0 && (i.enable(L), u[L] = !0);
|
|
23266
23266
|
}
|
|
23267
23267
|
function ft(L) {
|
|
23268
23268
|
u[L] !== !1 && (i.disable(L), u[L] = !1);
|
|
23269
23269
|
}
|
|
23270
|
-
function
|
|
23270
|
+
function Ut(L, xt) {
|
|
23271
23271
|
return f[L] !== xt ? (i.bindFramebuffer(L, xt), f[L] = xt, L === i.DRAW_FRAMEBUFFER && (f[i.FRAMEBUFFER] = xt), L === i.FRAMEBUFFER && (f[i.DRAW_FRAMEBUFFER] = xt), !0) : !1;
|
|
23272
23272
|
}
|
|
23273
23273
|
function Lt(L, xt) {
|
|
@@ -23370,10 +23370,10 @@ function u0(i, t) {
|
|
|
23370
23370
|
k !== L && (L ? i.frontFace(i.CW) : i.frontFace(i.CCW), k = L);
|
|
23371
23371
|
}
|
|
23372
23372
|
function tt(L) {
|
|
23373
|
-
L !==
|
|
23373
|
+
L !== Nu ? (rt(i.CULL_FACE), L !== C && (L === ec ? i.cullFace(i.BACK) : L === Uu ? i.cullFace(i.FRONT) : i.cullFace(i.FRONT_AND_BACK))) : ft(i.CULL_FACE), C = L;
|
|
23374
23374
|
}
|
|
23375
23375
|
function A(L) {
|
|
23376
|
-
L !==
|
|
23376
|
+
L !== U && (O && i.lineWidth(L), U = L);
|
|
23377
23377
|
}
|
|
23378
23378
|
function gt(L, xt, _t) {
|
|
23379
23379
|
L ? (rt(i.POLYGON_OFFSET_FILL), (B !== xt || G !== _t) && (B = xt, G = _t, a.getReversed() && (xt = -xt), i.polygonOffset(xt, _t))) : ft(i.POLYGON_OFFSET_FILL);
|
|
@@ -23480,7 +23480,7 @@ function u0(i, t) {
|
|
|
23480
23480
|
l.get(xt) !== wt && (i.uniformBlockBinding(xt, wt, L.__bindingPointIndex), l.set(xt, wt));
|
|
23481
23481
|
}
|
|
23482
23482
|
function qt() {
|
|
23483
|
-
i.disable(i.BLEND), i.disable(i.CULL_FACE), i.disable(i.DEPTH_TEST), i.disable(i.POLYGON_OFFSET_FILL), i.disable(i.SCISSOR_TEST), i.disable(i.STENCIL_TEST), i.disable(i.SAMPLE_ALPHA_TO_COVERAGE), i.blendEquation(i.FUNC_ADD), i.blendFunc(i.ONE, i.ZERO), i.blendFuncSeparate(i.ONE, i.ZERO, i.ONE, i.ZERO), i.blendColor(0, 0, 0, 0), i.colorMask(!0, !0, !0, !0), i.clearColor(0, 0, 0, 0), i.depthMask(!0), i.depthFunc(i.LESS), a.setReversed(!1), i.clearDepth(1), i.stencilMask(4294967295), i.stencilFunc(i.ALWAYS, 0, 4294967295), i.stencilOp(i.KEEP, i.KEEP, i.KEEP), i.clearStencil(0), i.cullFace(i.BACK), i.frontFace(i.CCW), i.polygonOffset(0, 0), i.activeTexture(i.TEXTURE0), i.bindFramebuffer(i.FRAMEBUFFER, null), i.bindFramebuffer(i.DRAW_FRAMEBUFFER, null), i.bindFramebuffer(i.READ_FRAMEBUFFER, null), i.useProgram(null), i.lineWidth(1), i.scissor(0, 0, i.canvas.width, i.canvas.height), i.viewport(0, 0, i.canvas.width, i.canvas.height), u = {}, it = null, Mt = {}, f = {}, h = /* @__PURE__ */ new WeakMap(), d = [], g = null, x = !1, m = null, p = null, M = null, T = null, b = null, R = null, w = null, P = new Qt(0, 0, 0), v = 0, E = !1, k = null, C = null,
|
|
23483
|
+
i.disable(i.BLEND), i.disable(i.CULL_FACE), i.disable(i.DEPTH_TEST), i.disable(i.POLYGON_OFFSET_FILL), i.disable(i.SCISSOR_TEST), i.disable(i.STENCIL_TEST), i.disable(i.SAMPLE_ALPHA_TO_COVERAGE), i.blendEquation(i.FUNC_ADD), i.blendFunc(i.ONE, i.ZERO), i.blendFuncSeparate(i.ONE, i.ZERO, i.ONE, i.ZERO), i.blendColor(0, 0, 0, 0), i.colorMask(!0, !0, !0, !0), i.clearColor(0, 0, 0, 0), i.depthMask(!0), i.depthFunc(i.LESS), a.setReversed(!1), i.clearDepth(1), i.stencilMask(4294967295), i.stencilFunc(i.ALWAYS, 0, 4294967295), i.stencilOp(i.KEEP, i.KEEP, i.KEEP), i.clearStencil(0), i.cullFace(i.BACK), i.frontFace(i.CCW), i.polygonOffset(0, 0), i.activeTexture(i.TEXTURE0), i.bindFramebuffer(i.FRAMEBUFFER, null), i.bindFramebuffer(i.DRAW_FRAMEBUFFER, null), i.bindFramebuffer(i.READ_FRAMEBUFFER, null), i.useProgram(null), i.lineWidth(1), i.scissor(0, 0, i.canvas.width, i.canvas.height), i.viewport(0, 0, i.canvas.width, i.canvas.height), u = {}, it = null, Mt = {}, f = {}, h = /* @__PURE__ */ new WeakMap(), d = [], g = null, x = !1, m = null, p = null, M = null, T = null, b = null, R = null, w = null, P = new Qt(0, 0, 0), v = 0, E = !1, k = null, C = null, U = null, B = null, G = null, kt.set(0, 0, i.canvas.width, i.canvas.height), Wt.set(0, 0, i.canvas.width, i.canvas.height), s.reset(), a.reset(), o.reset();
|
|
23484
23484
|
}
|
|
23485
23485
|
return {
|
|
23486
23486
|
buffers: {
|
|
@@ -23490,7 +23490,7 @@ function u0(i, t) {
|
|
|
23490
23490
|
},
|
|
23491
23491
|
enable: rt,
|
|
23492
23492
|
disable: ft,
|
|
23493
|
-
bindFramebuffer:
|
|
23493
|
+
bindFramebuffer: Ut,
|
|
23494
23494
|
drawBuffers: Lt,
|
|
23495
23495
|
useProgram: Dt,
|
|
23496
23496
|
setBlending: F,
|
|
@@ -23625,7 +23625,7 @@ function h0(i, t, e, n, r, s, a) {
|
|
|
23625
23625
|
n.remove(S);
|
|
23626
23626
|
}
|
|
23627
23627
|
let C = 0;
|
|
23628
|
-
function
|
|
23628
|
+
function U() {
|
|
23629
23629
|
C = 0;
|
|
23630
23630
|
}
|
|
23631
23631
|
function B() {
|
|
@@ -23676,9 +23676,9 @@ function h0(i, t, e, n, r, s, a) {
|
|
|
23676
23676
|
e.bindTexture(i.TEXTURE_CUBE_MAP, I.__webglTexture, i.TEXTURE0 + _);
|
|
23677
23677
|
}
|
|
23678
23678
|
const it = {
|
|
23679
|
-
[
|
|
23679
|
+
[Na]: i.REPEAT,
|
|
23680
23680
|
[An]: i.CLAMP_TO_EDGE,
|
|
23681
|
-
[
|
|
23681
|
+
[Ua]: i.MIRRORED_REPEAT
|
|
23682
23682
|
}, Mt = {
|
|
23683
23683
|
[Ce]: i.NEAREST,
|
|
23684
23684
|
[rh]: i.NEAREST_MIPMAP_NEAREST,
|
|
@@ -23690,9 +23690,9 @@ function h0(i, t, e, n, r, s, a) {
|
|
|
23690
23690
|
[uh]: i.NEVER,
|
|
23691
23691
|
[mh]: i.ALWAYS,
|
|
23692
23692
|
[hh]: i.LESS,
|
|
23693
|
-
[
|
|
23693
|
+
[No]: i.LEQUAL,
|
|
23694
23694
|
[fh]: i.EQUAL,
|
|
23695
|
-
[
|
|
23695
|
+
[Uo]: i.GEQUAL,
|
|
23696
23696
|
[dh]: i.GREATER,
|
|
23697
23697
|
[ph]: i.NOTEQUAL
|
|
23698
23698
|
};
|
|
@@ -23913,7 +23913,7 @@ function h0(i, t, e, n, r, s, a) {
|
|
|
23913
23913
|
}
|
|
23914
23914
|
e.bindFramebuffer(i.FRAMEBUFFER, S), gt(_) ? o.framebufferTexture2DMultisampleEXT(i.FRAMEBUFFER, Y, nt, ct.__webglTexture, 0, A(_)) : (nt === i.TEXTURE_2D || nt >= i.TEXTURE_CUBE_MAP_POSITIVE_X && nt <= i.TEXTURE_CUBE_MAP_NEGATIVE_Z) && i.framebufferTexture2D(i.FRAMEBUFFER, Y, nt, ct.__webglTexture, K), e.bindFramebuffer(i.FRAMEBUFFER, null);
|
|
23915
23915
|
}
|
|
23916
|
-
function
|
|
23916
|
+
function Ut(S, _, I) {
|
|
23917
23917
|
if (i.bindRenderbuffer(i.RENDERBUFFER, S), _.depthBuffer) {
|
|
23918
23918
|
const Y = _.depthTexture, nt = Y && Y.isDepthTexture ? Y.type : null, K = b(_.stencilBuffer, nt), St = _.stencilBuffer ? i.DEPTH_STENCIL_ATTACHMENT : i.DEPTH_ATTACHMENT;
|
|
23919
23919
|
gt(_) ? o.renderbufferStorageMultisampleEXT(i.RENDERBUFFER, A(_), K, _.width, _.height) : I ? i.renderbufferStorageMultisample(i.RENDERBUFFER, A(_), K, _.width, _.height) : i.renderbufferStorage(i.RENDERBUFFER, K, _.width, _.height), i.framebufferRenderbuffer(i.FRAMEBUFFER, St, i.RENDERBUFFER, S);
|
|
@@ -23974,7 +23974,7 @@ function h0(i, t, e, n, r, s, a) {
|
|
|
23974
23974
|
_.__webglDepthbuffer = [];
|
|
23975
23975
|
for (let Y = 0; Y < 6; Y++)
|
|
23976
23976
|
if (e.bindFramebuffer(i.FRAMEBUFFER, _.__webglFramebuffer[Y]), _.__webglDepthbuffer[Y] === void 0)
|
|
23977
|
-
_.__webglDepthbuffer[Y] = i.createRenderbuffer(),
|
|
23977
|
+
_.__webglDepthbuffer[Y] = i.createRenderbuffer(), Ut(_.__webglDepthbuffer[Y], S, !1);
|
|
23978
23978
|
else {
|
|
23979
23979
|
const nt = S.stencilBuffer ? i.DEPTH_STENCIL_ATTACHMENT : i.DEPTH_ATTACHMENT, K = _.__webglDepthbuffer[Y];
|
|
23980
23980
|
i.bindRenderbuffer(i.RENDERBUFFER, K), i.framebufferRenderbuffer(i.FRAMEBUFFER, nt, i.RENDERBUFFER, K);
|
|
@@ -23982,7 +23982,7 @@ function h0(i, t, e, n, r, s, a) {
|
|
|
23982
23982
|
} else {
|
|
23983
23983
|
const Y = S.texture.mipmaps;
|
|
23984
23984
|
if (Y && Y.length > 0 ? e.bindFramebuffer(i.FRAMEBUFFER, _.__webglFramebuffer[0]) : e.bindFramebuffer(i.FRAMEBUFFER, _.__webglFramebuffer), _.__webglDepthbuffer === void 0)
|
|
23985
|
-
_.__webglDepthbuffer = i.createRenderbuffer(),
|
|
23985
|
+
_.__webglDepthbuffer = i.createRenderbuffer(), Ut(_.__webglDepthbuffer, S, !1);
|
|
23986
23986
|
else {
|
|
23987
23987
|
const nt = S.stencilBuffer ? i.DEPTH_STENCIL_ATTACHMENT : i.DEPTH_ATTACHMENT, K = _.__webglDepthbuffer;
|
|
23988
23988
|
i.bindRenderbuffer(i.RENDERBUFFER, K), i.framebufferRenderbuffer(i.FRAMEBUFFER, nt, i.RENDERBUFFER, K);
|
|
@@ -24027,7 +24027,7 @@ function h0(i, t, e, n, r, s, a) {
|
|
|
24027
24027
|
const Gt = s.convert(Ft.format, Ft.colorSpace), ct = s.convert(Ft.type), pt = T(Ft.internalFormat, Gt, ct, Ft.colorSpace, S.isXRRenderTarget === !0), Rt = A(S);
|
|
24028
24028
|
i.renderbufferStorageMultisample(i.RENDERBUFFER, Rt, pt, S.width, S.height), i.framebufferRenderbuffer(i.FRAMEBUFFER, i.COLOR_ATTACHMENT0 + dt, i.RENDERBUFFER, I.__webglColorRenderbuffer[dt]);
|
|
24029
24029
|
}
|
|
24030
|
-
i.bindRenderbuffer(i.RENDERBUFFER, null), S.depthBuffer && (I.__webglDepthRenderbuffer = i.createRenderbuffer(),
|
|
24030
|
+
i.bindRenderbuffer(i.RENDERBUFFER, null), S.depthBuffer && (I.__webglDepthRenderbuffer = i.createRenderbuffer(), Ut(I.__webglDepthRenderbuffer, S, !0)), e.bindFramebuffer(i.FRAMEBUFFER, null);
|
|
24031
24031
|
}
|
|
24032
24032
|
}
|
|
24033
24033
|
if (K) {
|
|
@@ -24119,7 +24119,7 @@ function h0(i, t, e, n, r, s, a) {
|
|
|
24119
24119
|
function Z(S) {
|
|
24120
24120
|
return typeof HTMLImageElement < "u" && S instanceof HTMLImageElement ? (c.width = S.naturalWidth || S.width, c.height = S.naturalHeight || S.height) : typeof VideoFrame < "u" && S instanceof VideoFrame ? (c.width = S.displayWidth, c.height = S.displayHeight) : (c.width = S.width, c.height = S.height), c;
|
|
24121
24121
|
}
|
|
24122
|
-
this.allocateTextureUnit = B, this.resetTextureUnits =
|
|
24122
|
+
this.allocateTextureUnit = B, this.resetTextureUnits = U, this.setTexture2D = z, this.setTexture2DArray = O, this.setTexture3D = V, this.setTextureCube = at, this.rebindTextures = mt, this.setupRenderTarget = st, this.updateRenderTargetMipmap = F, this.updateMultisampleRenderTarget = tt, this.setupDepthRenderbuffer = Dt, this.setupFrameBufferTexture = ft, this.useMultisampledRTT = gt, this.isReversedDepthBuffer = function() {
|
|
24123
24123
|
return e.buffers.depth.getReversed();
|
|
24124
24124
|
};
|
|
24125
24125
|
}
|
|
@@ -24319,7 +24319,7 @@ class g0 extends Gi {
|
|
|
24319
24319
|
E.viewport = new he();
|
|
24320
24320
|
const k = new Ge();
|
|
24321
24321
|
k.viewport = new he();
|
|
24322
|
-
const C = [E, k],
|
|
24322
|
+
const C = [E, k], U = new _d();
|
|
24323
24323
|
let B = null, G = null;
|
|
24324
24324
|
this.cameraAutoUpdate = !0, this.enabled = !1, this.isPresenting = !1, this.getController = function(et) {
|
|
24325
24325
|
let rt = R[et];
|
|
@@ -24368,8 +24368,8 @@ class g0 extends Gi {
|
|
|
24368
24368
|
}, this.setSession = async function(et) {
|
|
24369
24369
|
if (r = et, r !== null) {
|
|
24370
24370
|
if (T = t.getRenderTarget(), r.addEventListener("select", z), r.addEventListener("selectstart", z), r.addEventListener("selectend", z), r.addEventListener("squeeze", z), r.addEventListener("squeezestart", z), r.addEventListener("squeezeend", z), r.addEventListener("end", O), r.addEventListener("inputsourceschange", V), M.xrCompatible !== !0 && await e.makeXRCompatible(), v = t.getPixelRatio(), t.getSize(P), x && "createProjectionLayer" in XRWebGLBinding.prototype) {
|
|
24371
|
-
let ft = null,
|
|
24372
|
-
M.depth && (Lt = M.stencil ? e.DEPTH24_STENCIL8 : e.DEPTH_COMPONENT24, ft = M.stencil ? ci : Ln,
|
|
24371
|
+
let ft = null, Ut = null, Lt = null;
|
|
24372
|
+
M.depth && (Lt = M.stencil ? e.DEPTH24_STENCIL8 : e.DEPTH_COMPONENT24, ft = M.stencil ? ci : Ln, Ut = M.stencil ? dr : mn);
|
|
24373
24373
|
const Dt = {
|
|
24374
24374
|
colorFormat: e.RGBA8,
|
|
24375
24375
|
depthFormat: Lt,
|
|
@@ -24381,7 +24381,7 @@ class g0 extends Gi {
|
|
|
24381
24381
|
{
|
|
24382
24382
|
format: Xe,
|
|
24383
24383
|
type: He,
|
|
24384
|
-
depthTexture: new gr(h.textureWidth, h.textureHeight,
|
|
24384
|
+
depthTexture: new gr(h.textureWidth, h.textureHeight, Ut, void 0, void 0, void 0, void 0, void 0, void 0, ft),
|
|
24385
24385
|
stencilBuffer: M.stencil,
|
|
24386
24386
|
colorSpace: t.outputColorSpace,
|
|
24387
24387
|
samples: M.antialias ? 4 : 0,
|
|
@@ -24420,35 +24420,35 @@ class g0 extends Gi {
|
|
|
24420
24420
|
};
|
|
24421
24421
|
function V(et) {
|
|
24422
24422
|
for (let rt = 0; rt < et.removed.length; rt++) {
|
|
24423
|
-
const ft = et.removed[rt],
|
|
24424
|
-
|
|
24423
|
+
const ft = et.removed[rt], Ut = w.indexOf(ft);
|
|
24424
|
+
Ut >= 0 && (w[Ut] = null, R[Ut].disconnect(ft));
|
|
24425
24425
|
}
|
|
24426
24426
|
for (let rt = 0; rt < et.added.length; rt++) {
|
|
24427
24427
|
const ft = et.added[rt];
|
|
24428
|
-
let
|
|
24429
|
-
if (
|
|
24428
|
+
let Ut = w.indexOf(ft);
|
|
24429
|
+
if (Ut === -1) {
|
|
24430
24430
|
for (let Dt = 0; Dt < R.length; Dt++)
|
|
24431
24431
|
if (Dt >= w.length) {
|
|
24432
|
-
w.push(ft),
|
|
24432
|
+
w.push(ft), Ut = Dt;
|
|
24433
24433
|
break;
|
|
24434
24434
|
} else if (w[Dt] === null) {
|
|
24435
|
-
w[Dt] = ft,
|
|
24435
|
+
w[Dt] = ft, Ut = Dt;
|
|
24436
24436
|
break;
|
|
24437
24437
|
}
|
|
24438
|
-
if (
|
|
24438
|
+
if (Ut === -1) break;
|
|
24439
24439
|
}
|
|
24440
|
-
const Lt = R[
|
|
24440
|
+
const Lt = R[Ut];
|
|
24441
24441
|
Lt && Lt.connect(ft);
|
|
24442
24442
|
}
|
|
24443
24443
|
}
|
|
24444
24444
|
const at = new D(), it = new D();
|
|
24445
24445
|
function Mt(et, rt, ft) {
|
|
24446
24446
|
at.setFromMatrixPosition(rt.matrixWorld), it.setFromMatrixPosition(ft.matrixWorld);
|
|
24447
|
-
const
|
|
24447
|
+
const Ut = at.distanceTo(it), Lt = rt.projectionMatrix.elements, Dt = ft.projectionMatrix.elements, mt = Lt[14] / (Lt[10] - 1), st = Lt[14] / (Lt[10] + 1), F = (Lt[9] + 1) / Lt[5], $ = (Lt[9] - 1) / Lt[5], q = (Lt[8] - 1) / Lt[0], tt = (Dt[8] + 1) / Dt[0], A = mt * q, gt = mt * tt, J = Ut / (-q + tt), ut = J * -q;
|
|
24448
24448
|
if (rt.matrixWorld.decompose(et.position, et.quaternion, et.scale), et.translateX(ut), et.translateZ(J), et.matrixWorld.compose(et.position, et.quaternion, et.scale), et.matrixWorldInverse.copy(et.matrixWorld).invert(), Lt[10] === -1)
|
|
24449
24449
|
et.projectionMatrix.copy(rt.projectionMatrix), et.projectionMatrixInverse.copy(rt.projectionMatrixInverse);
|
|
24450
24450
|
else {
|
|
24451
|
-
const Z = mt + J, S = st + J, _ = A - ut, I = gt + (
|
|
24451
|
+
const Z = mt + J, S = st + J, _ = A - ut, I = gt + (Ut - ut), Y = F * st / S * Z, nt = $ * st / S * Z;
|
|
24452
24452
|
et.projectionMatrix.makePerspective(_, I, Y, nt, Z, S), et.projectionMatrixInverse.copy(et.projectionMatrix).invert();
|
|
24453
24453
|
}
|
|
24454
24454
|
}
|
|
@@ -24458,21 +24458,21 @@ class g0 extends Gi {
|
|
|
24458
24458
|
this.updateCamera = function(et) {
|
|
24459
24459
|
if (r === null) return;
|
|
24460
24460
|
let rt = et.near, ft = et.far;
|
|
24461
|
-
m.texture !== null && (m.depthNear > 0 && (rt = m.depthNear), m.depthFar > 0 && (ft = m.depthFar)),
|
|
24462
|
-
depthNear:
|
|
24463
|
-
depthFar:
|
|
24464
|
-
}), B =
|
|
24465
|
-
const
|
|
24466
|
-
yt(
|
|
24461
|
+
m.texture !== null && (m.depthNear > 0 && (rt = m.depthNear), m.depthFar > 0 && (ft = m.depthFar)), U.near = k.near = E.near = rt, U.far = k.far = E.far = ft, (B !== U.near || G !== U.far) && (r.updateRenderState({
|
|
24462
|
+
depthNear: U.near,
|
|
24463
|
+
depthFar: U.far
|
|
24464
|
+
}), B = U.near, G = U.far), U.layers.mask = et.layers.mask | 6, E.layers.mask = U.layers.mask & -5, k.layers.mask = U.layers.mask & -3;
|
|
24465
|
+
const Ut = et.parent, Lt = U.cameras;
|
|
24466
|
+
yt(U, Ut);
|
|
24467
24467
|
for (let Dt = 0; Dt < Lt.length; Dt++)
|
|
24468
|
-
yt(Lt[Dt],
|
|
24469
|
-
Lt.length === 2 ? Mt(
|
|
24468
|
+
yt(Lt[Dt], Ut);
|
|
24469
|
+
Lt.length === 2 ? Mt(U, E, k) : U.projectionMatrix.copy(E.projectionMatrix), lt(et, U, Ut);
|
|
24470
24470
|
};
|
|
24471
24471
|
function lt(et, rt, ft) {
|
|
24472
24472
|
ft === null ? et.matrix.copy(rt.matrixWorld) : (et.matrix.copy(ft.matrixWorld), et.matrix.invert(), et.matrix.multiply(rt.matrixWorld)), et.matrix.decompose(et.position, et.quaternion, et.scale), et.updateMatrixWorld(!0), et.projectionMatrix.copy(rt.projectionMatrix), et.projectionMatrixInverse.copy(rt.projectionMatrixInverse), et.isPerspectiveCamera && (et.fov = zi * 2 * Math.atan(1 / et.projectionMatrix.elements[5]), et.zoom = 1);
|
|
24473
24473
|
}
|
|
24474
24474
|
this.getCamera = function() {
|
|
24475
|
-
return
|
|
24475
|
+
return U;
|
|
24476
24476
|
}, this.getFoveation = function() {
|
|
24477
24477
|
if (!(h === null && d === null))
|
|
24478
24478
|
return l;
|
|
@@ -24481,7 +24481,7 @@ class g0 extends Gi {
|
|
|
24481
24481
|
}, this.hasDepthSensing = function() {
|
|
24482
24482
|
return m.texture !== null;
|
|
24483
24483
|
}, this.getDepthSensingMesh = function() {
|
|
24484
|
-
return m.getMesh(
|
|
24484
|
+
return m.getMesh(U);
|
|
24485
24485
|
}, this.getCameraTexture = function(et) {
|
|
24486
24486
|
return p[et];
|
|
24487
24487
|
};
|
|
@@ -24490,8 +24490,8 @@ class g0 extends Gi {
|
|
|
24490
24490
|
if (u = rt.getViewerPose(c || a), g = rt, u !== null) {
|
|
24491
24491
|
const ft = u.views;
|
|
24492
24492
|
d !== null && (t.setRenderTargetFramebuffer(b, d.framebuffer), t.setRenderTarget(b));
|
|
24493
|
-
let
|
|
24494
|
-
ft.length !==
|
|
24493
|
+
let Ut = !1;
|
|
24494
|
+
ft.length !== U.cameras.length && (U.cameras.length = 0, Ut = !0);
|
|
24495
24495
|
for (let st = 0; st < ft.length; st++) {
|
|
24496
24496
|
const F = ft[st];
|
|
24497
24497
|
let $ = null;
|
|
@@ -24506,7 +24506,7 @@ class g0 extends Gi {
|
|
|
24506
24506
|
), t.setRenderTarget(b));
|
|
24507
24507
|
}
|
|
24508
24508
|
let q = C[st];
|
|
24509
|
-
q === void 0 && (q = new Ge(), q.layers.enable(st), q.viewport = new he(), C[st] = q), q.matrix.fromArray(F.transform.matrix), q.matrix.decompose(q.position, q.quaternion, q.scale), q.projectionMatrix.fromArray(F.projectionMatrix), q.projectionMatrixInverse.copy(q.projectionMatrix).invert(), q.viewport.set($.x, $.y, $.width, $.height), st === 0 && (
|
|
24509
|
+
q === void 0 && (q = new Ge(), q.layers.enable(st), q.viewport = new he(), C[st] = q), q.matrix.fromArray(F.transform.matrix), q.matrix.decompose(q.position, q.quaternion, q.scale), q.projectionMatrix.fromArray(F.projectionMatrix), q.projectionMatrixInverse.copy(q.projectionMatrix).invert(), q.viewport.set($.x, $.y, $.width, $.height), st === 0 && (U.matrix.copy(q.matrix), U.matrix.decompose(U.position, U.quaternion, U.scale)), Ut === !0 && U.cameras.push(q);
|
|
24510
24510
|
}
|
|
24511
24511
|
const Lt = r.enabledFeatures;
|
|
24512
24512
|
if (Lt && Lt.includes("depth-sensing") && r.depthUsage == "gpu-optimized" && x) {
|
|
@@ -24528,8 +24528,8 @@ class g0 extends Gi {
|
|
|
24528
24528
|
}
|
|
24529
24529
|
}
|
|
24530
24530
|
for (let ft = 0; ft < R.length; ft++) {
|
|
24531
|
-
const
|
|
24532
|
-
|
|
24531
|
+
const Ut = w[ft], Lt = R[ft];
|
|
24532
|
+
Ut !== null && Lt !== void 0 && Lt.update(Ut, rt, c || a);
|
|
24533
24533
|
}
|
|
24534
24534
|
kt && kt(et, rt), rt.detectedPlanes && n.dispatchEvent({ type: "planesdetected", data: rt }), g = null;
|
|
24535
24535
|
}
|
|
@@ -24627,13 +24627,13 @@ function v0(i, t, e, n) {
|
|
|
24627
24627
|
for (let E = 0, k = v.length; E < k; E++) {
|
|
24628
24628
|
const C = v[E];
|
|
24629
24629
|
if (d(C, w, E, R) === !0) {
|
|
24630
|
-
const
|
|
24630
|
+
const U = C.__offset, B = Array.isArray(C.value) ? C.value : [C.value];
|
|
24631
24631
|
let G = 0;
|
|
24632
24632
|
for (let z = 0; z < B.length; z++) {
|
|
24633
24633
|
const O = B[z], V = x(O);
|
|
24634
|
-
typeof O == "number" || typeof O == "boolean" ? (C.__data[0] = O, i.bufferSubData(i.UNIFORM_BUFFER,
|
|
24634
|
+
typeof O == "number" || typeof O == "boolean" ? (C.__data[0] = O, i.bufferSubData(i.UNIFORM_BUFFER, U + G, C.__data)) : O.isMatrix3 ? (C.__data[0] = O.elements[0], C.__data[1] = O.elements[1], C.__data[2] = O.elements[2], C.__data[3] = 0, C.__data[4] = O.elements[3], C.__data[5] = O.elements[4], C.__data[6] = O.elements[5], C.__data[7] = 0, C.__data[8] = O.elements[6], C.__data[9] = O.elements[7], C.__data[10] = O.elements[8], C.__data[11] = 0) : (O.toArray(C.__data, G), G += V.storage / Float32Array.BYTES_PER_ELEMENT);
|
|
24635
24635
|
}
|
|
24636
|
-
i.bufferSubData(i.UNIFORM_BUFFER,
|
|
24636
|
+
i.bufferSubData(i.UNIFORM_BUFFER, U, C.__data);
|
|
24637
24637
|
}
|
|
24638
24638
|
}
|
|
24639
24639
|
}
|
|
@@ -24660,10 +24660,10 @@ function v0(i, t, e, n) {
|
|
|
24660
24660
|
for (let P = 0, v = T.length; P < v; P++) {
|
|
24661
24661
|
const E = Array.isArray(T[P]) ? T[P] : [T[P]];
|
|
24662
24662
|
for (let k = 0, C = E.length; k < C; k++) {
|
|
24663
|
-
const
|
|
24663
|
+
const U = E[k], B = Array.isArray(U.value) ? U.value : [U.value];
|
|
24664
24664
|
for (let G = 0, z = B.length; G < z; G++) {
|
|
24665
24665
|
const O = B[G], V = x(O), at = b % R, it = at % V.boundary, Mt = at + it;
|
|
24666
|
-
b += it, Mt !== 0 && R - Mt < V.storage && (b += R - Mt),
|
|
24666
|
+
b += it, Mt !== 0 && R - Mt < V.storage && (b += R - Mt), U.__data = new Float32Array(V.storage / Float32Array.BYTES_PER_ELEMENT), U.__offset = b, b += V.storage;
|
|
24667
24667
|
}
|
|
24668
24668
|
}
|
|
24669
24669
|
}
|
|
@@ -25273,14 +25273,14 @@ class S0 {
|
|
|
25273
25273
|
const E = this;
|
|
25274
25274
|
let k = !1;
|
|
25275
25275
|
this._outputColorSpace = Fe;
|
|
25276
|
-
let C = 0,
|
|
25276
|
+
let C = 0, U = 0, B = null, G = -1, z = null;
|
|
25277
25277
|
const O = new he(), V = new he();
|
|
25278
25278
|
let at = null;
|
|
25279
25279
|
const it = new Qt(0);
|
|
25280
25280
|
let Mt = 0, yt = e.width, lt = e.height, kt = 1, Wt = null, te = null;
|
|
25281
25281
|
const et = new he(0, 0, yt, lt), rt = new he(0, 0, yt, lt);
|
|
25282
25282
|
let ft = !1;
|
|
25283
|
-
const
|
|
25283
|
+
const Ut = new zo();
|
|
25284
25284
|
let Lt = !1, Dt = !1;
|
|
25285
25285
|
const mt = new jt(), st = new D(), F = new he(), $ = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 };
|
|
25286
25286
|
let q = !1;
|
|
@@ -25288,8 +25288,8 @@ class S0 {
|
|
|
25288
25288
|
return B === null ? kt : 1;
|
|
25289
25289
|
}
|
|
25290
25290
|
let A = n;
|
|
25291
|
-
function gt(y,
|
|
25292
|
-
return e.getContext(y,
|
|
25291
|
+
function gt(y, N) {
|
|
25292
|
+
return e.getContext(y, N);
|
|
25293
25293
|
}
|
|
25294
25294
|
try {
|
|
25295
25295
|
const y = {
|
|
@@ -25303,9 +25303,9 @@ class S0 {
|
|
|
25303
25303
|
failIfMajorPerformanceCaveat: f
|
|
25304
25304
|
};
|
|
25305
25305
|
if ("setAttribute" in e && e.setAttribute("data-engine", `three.js r${To}`), e.addEventListener("webglcontextlost", X, !1), e.addEventListener("webglcontextrestored", ot, !1), e.addEventListener("webglcontextcreationerror", It, !1), A === null) {
|
|
25306
|
-
const
|
|
25307
|
-
if (A = gt(
|
|
25308
|
-
throw gt(
|
|
25306
|
+
const N = "webgl2";
|
|
25307
|
+
if (A = gt(N, y), A === null)
|
|
25308
|
+
throw gt(N) ? new Error("Error creating WebGL context with your selected attributes.") : new Error("Error creating WebGL context.");
|
|
25309
25309
|
}
|
|
25310
25310
|
} catch (y) {
|
|
25311
25311
|
throw Ht("WebGLRenderer: " + y.message), y;
|
|
@@ -25332,24 +25332,24 @@ class S0 {
|
|
|
25332
25332
|
y !== void 0 && (kt = y, this.setSize(yt, lt, !1));
|
|
25333
25333
|
}, this.getSize = function(y) {
|
|
25334
25334
|
return y.set(yt, lt);
|
|
25335
|
-
}, this.setSize = function(y,
|
|
25335
|
+
}, this.setSize = function(y, N, j = !0) {
|
|
25336
25336
|
if (Q.isPresenting) {
|
|
25337
25337
|
zt("WebGLRenderer: Can't change size while VR device is presenting.");
|
|
25338
25338
|
return;
|
|
25339
25339
|
}
|
|
25340
|
-
yt = y, lt =
|
|
25340
|
+
yt = y, lt = N, e.width = Math.floor(y * kt), e.height = Math.floor(N * kt), j === !0 && (e.style.width = y + "px", e.style.height = N + "px"), v !== null && v.setSize(e.width, e.height), this.setViewport(0, 0, y, N);
|
|
25341
25341
|
}, this.getDrawingBufferSize = function(y) {
|
|
25342
25342
|
return y.set(yt * kt, lt * kt).floor();
|
|
25343
|
-
}, this.setDrawingBufferSize = function(y,
|
|
25344
|
-
yt = y, lt =
|
|
25343
|
+
}, this.setDrawingBufferSize = function(y, N, j) {
|
|
25344
|
+
yt = y, lt = N, kt = j, e.width = Math.floor(y * j), e.height = Math.floor(N * j), this.setViewport(0, 0, y, N);
|
|
25345
25345
|
}, this.setEffects = function(y) {
|
|
25346
25346
|
if (x === He) {
|
|
25347
25347
|
console.error("THREE.WebGLRenderer: setEffects() requires outputBufferType set to HalfFloatType or FloatType.");
|
|
25348
25348
|
return;
|
|
25349
25349
|
}
|
|
25350
25350
|
if (y) {
|
|
25351
|
-
for (let
|
|
25352
|
-
if (y[
|
|
25351
|
+
for (let N = 0; N < y.length; N++)
|
|
25352
|
+
if (y[N].isOutputPass === !0) {
|
|
25353
25353
|
console.warn("THREE.WebGLRenderer: OutputPass is not needed in setEffects(). Tone mapping and color space conversion are applied automatically.");
|
|
25354
25354
|
break;
|
|
25355
25355
|
}
|
|
@@ -25359,12 +25359,12 @@ class S0 {
|
|
|
25359
25359
|
return y.copy(O);
|
|
25360
25360
|
}, this.getViewport = function(y) {
|
|
25361
25361
|
return y.copy(et);
|
|
25362
|
-
}, this.setViewport = function(y,
|
|
25363
|
-
y.isVector4 ? et.set(y.x, y.y, y.z, y.w) : et.set(y,
|
|
25362
|
+
}, this.setViewport = function(y, N, j, W) {
|
|
25363
|
+
y.isVector4 ? et.set(y.x, y.y, y.z, y.w) : et.set(y, N, j, W), Z.viewport(O.copy(et).multiplyScalar(kt).round());
|
|
25364
25364
|
}, this.getScissor = function(y) {
|
|
25365
25365
|
return y.copy(rt);
|
|
25366
|
-
}, this.setScissor = function(y,
|
|
25367
|
-
y.isVector4 ? rt.set(y.x, y.y, y.z, y.w) : rt.set(y,
|
|
25366
|
+
}, this.setScissor = function(y, N, j, W) {
|
|
25367
|
+
y.isVector4 ? rt.set(y.x, y.y, y.z, y.w) : rt.set(y, N, j, W), Z.scissor(V.copy(rt).multiplyScalar(kt).round());
|
|
25368
25368
|
}, this.getScissorTest = function() {
|
|
25369
25369
|
return ft;
|
|
25370
25370
|
}, this.setScissorTest = function(y) {
|
|
@@ -25381,7 +25381,7 @@ class S0 {
|
|
|
25381
25381
|
return Pt.getClearAlpha();
|
|
25382
25382
|
}, this.setClearAlpha = function() {
|
|
25383
25383
|
Pt.setClearAlpha(...arguments);
|
|
25384
|
-
}, this.clear = function(y = !0,
|
|
25384
|
+
}, this.clear = function(y = !0, N = !0, j = !0) {
|
|
25385
25385
|
let W = 0;
|
|
25386
25386
|
if (y) {
|
|
25387
25387
|
let H = !1;
|
|
@@ -25390,12 +25390,12 @@ class S0 {
|
|
|
25390
25390
|
H = m.has(Et);
|
|
25391
25391
|
}
|
|
25392
25392
|
if (H) {
|
|
25393
|
-
const Et = B.texture.type, Ct = p.has(Et), Tt = Pt.getClearColor(),
|
|
25394
|
-
Ct ? (M[0] = Bt, M[1] = Yt, M[2] = $t, M[3] =
|
|
25393
|
+
const Et = B.texture.type, Ct = p.has(Et), Tt = Pt.getClearColor(), Nt = Pt.getClearAlpha(), Bt = Tt.r, Yt = Tt.g, $t = Tt.b;
|
|
25394
|
+
Ct ? (M[0] = Bt, M[1] = Yt, M[2] = $t, M[3] = Nt, A.clearBufferuiv(A.COLOR, 0, M)) : (T[0] = Bt, T[1] = Yt, T[2] = $t, T[3] = Nt, A.clearBufferiv(A.COLOR, 0, T));
|
|
25395
25395
|
} else
|
|
25396
25396
|
W |= A.COLOR_BUFFER_BIT;
|
|
25397
25397
|
}
|
|
25398
|
-
|
|
25398
|
+
N && (W |= A.DEPTH_BUFFER_BIT), j && (W |= A.STENCIL_BUFFER_BIT, this.state.buffers.stencil.setMask(4294967295)), W !== 0 && A.clear(W);
|
|
25399
25399
|
}, this.clearColor = function() {
|
|
25400
25400
|
this.clear(!0, !1, !1);
|
|
25401
25401
|
}, this.clearDepth = function() {
|
|
@@ -25410,42 +25410,42 @@ class S0 {
|
|
|
25410
25410
|
}
|
|
25411
25411
|
function ot() {
|
|
25412
25412
|
xs("WebGLRenderer: Context Restored."), k = !1;
|
|
25413
|
-
const y = S.autoReset,
|
|
25414
|
-
ht(), S.autoReset = y, Rt.enabled =
|
|
25413
|
+
const y = S.autoReset, N = Rt.enabled, j = Rt.autoUpdate, W = Rt.needsUpdate, H = Rt.type;
|
|
25414
|
+
ht(), S.autoReset = y, Rt.enabled = N, Rt.autoUpdate = j, Rt.needsUpdate = W, Rt.type = H;
|
|
25415
25415
|
}
|
|
25416
25416
|
function It(y) {
|
|
25417
25417
|
Ht("WebGLRenderer: A WebGL context could not be created. Reason: ", y.statusMessage);
|
|
25418
25418
|
}
|
|
25419
25419
|
function Xt(y) {
|
|
25420
|
-
const
|
|
25421
|
-
|
|
25420
|
+
const N = y.target;
|
|
25421
|
+
N.removeEventListener("dispose", Xt), ie(N);
|
|
25422
25422
|
}
|
|
25423
25423
|
function ie(y) {
|
|
25424
25424
|
Ae(y), _.remove(y);
|
|
25425
25425
|
}
|
|
25426
25426
|
function Ae(y) {
|
|
25427
|
-
const
|
|
25428
|
-
|
|
25427
|
+
const N = _.get(y).programs;
|
|
25428
|
+
N !== void 0 && (N.forEach(function(j) {
|
|
25429
25429
|
dt.releaseProgram(j);
|
|
25430
25430
|
}), y.isShaderMaterial && dt.releaseShaderCache(y));
|
|
25431
25431
|
}
|
|
25432
|
-
this.renderBufferDirect = function(y,
|
|
25433
|
-
|
|
25434
|
-
const Ct = H.isMesh && H.matrixWorld.determinant() < 0, Tt = vu(y,
|
|
25432
|
+
this.renderBufferDirect = function(y, N, j, W, H, Et) {
|
|
25433
|
+
N === null && (N = $);
|
|
25434
|
+
const Ct = H.isMesh && H.matrixWorld.determinant() < 0, Tt = vu(y, N, j, W, H);
|
|
25435
25435
|
Z.setMaterial(W, Ct);
|
|
25436
|
-
let
|
|
25436
|
+
let Nt = j.index, Bt = 1;
|
|
25437
25437
|
if (W.wireframe === !0) {
|
|
25438
|
-
if (
|
|
25438
|
+
if (Nt = K.getWireframeAttribute(j), Nt === void 0) return;
|
|
25439
25439
|
Bt = 2;
|
|
25440
25440
|
}
|
|
25441
25441
|
const Yt = j.drawRange, $t = j.attributes.position;
|
|
25442
25442
|
let Vt = Yt.start * Bt, ae = (Yt.start + Yt.count) * Bt;
|
|
25443
|
-
Et !== null && (Vt = Math.max(Vt, Et.start * Bt), ae = Math.min(ae, (Et.start + Et.count) * Bt)),
|
|
25443
|
+
Et !== null && (Vt = Math.max(Vt, Et.start * Bt), ae = Math.min(ae, (Et.start + Et.count) * Bt)), Nt !== null ? (Vt = Math.max(Vt, 0), ae = Math.min(ae, Nt.count)) : $t != null && (Vt = Math.max(Vt, 0), ae = Math.min(ae, $t.count));
|
|
25444
25444
|
const ge = ae - Vt;
|
|
25445
25445
|
if (ge < 0 || ge === 1 / 0) return;
|
|
25446
|
-
_t.setup(H, W, Tt, j,
|
|
25446
|
+
_t.setup(H, W, Tt, j, Nt);
|
|
25447
25447
|
let de, oe = qt;
|
|
25448
|
-
if (
|
|
25448
|
+
if (Nt !== null && (de = nt.get(Nt), oe = L, oe.setIndex(de)), H.isMesh)
|
|
25449
25449
|
W.wireframe === !0 ? (Z.setLineWidth(W.wireframeLinewidth * tt()), oe.setMode(A.LINES)) : oe.setMode(A.TRIANGLES);
|
|
25450
25450
|
else if (H.isLine) {
|
|
25451
25451
|
let Ie = W.linewidth;
|
|
@@ -25457,7 +25457,7 @@ class S0 {
|
|
|
25457
25457
|
else if (J.get("WEBGL_multi_draw"))
|
|
25458
25458
|
oe.renderMultiDraw(H._multiDrawStarts, H._multiDrawCounts, H._multiDrawCount);
|
|
25459
25459
|
else {
|
|
25460
|
-
const Ie = H._multiDrawStarts, Ot = H._multiDrawCounts, Be = H._multiDrawCount, ne =
|
|
25460
|
+
const Ie = H._multiDrawStarts, Ot = H._multiDrawCounts, Be = H._multiDrawCount, ne = Nt ? nt.get(Nt).bytesPerElement : 1, Ke = _.get(W).currentProgram.getUniforms();
|
|
25461
25461
|
for (let on = 0; on < Be; on++)
|
|
25462
25462
|
Ke.setValue(A, "_gl_DrawID", on), oe.render(Ie[on] / ne, Ot[on]);
|
|
25463
25463
|
}
|
|
@@ -25469,14 +25469,14 @@ class S0 {
|
|
|
25469
25469
|
} else
|
|
25470
25470
|
oe.render(Vt, ge);
|
|
25471
25471
|
};
|
|
25472
|
-
function $e(y,
|
|
25473
|
-
y.transparent === !0 && y.side === hn && y.forceSinglePass === !1 ? (y.side = Oe, y.needsUpdate = !0, Ar(y,
|
|
25472
|
+
function $e(y, N, j) {
|
|
25473
|
+
y.transparent === !0 && y.side === hn && y.forceSinglePass === !1 ? (y.side = Oe, y.needsUpdate = !0, Ar(y, N, j), y.side = Xn, y.needsUpdate = !0, Ar(y, N, j), y.side = hn) : Ar(y, N, j);
|
|
25474
25474
|
}
|
|
25475
|
-
this.compile = function(y,
|
|
25476
|
-
j === null && (j = y), R = ct.get(j), R.init(
|
|
25477
|
-
H.isLight && H.layers.test(
|
|
25475
|
+
this.compile = function(y, N, j = null) {
|
|
25476
|
+
j === null && (j = y), R = ct.get(j), R.init(N), P.push(R), j.traverseVisible(function(H) {
|
|
25477
|
+
H.isLight && H.layers.test(N.layers) && (R.pushLight(H), H.castShadow && R.pushShadow(H));
|
|
25478
25478
|
}), y !== j && y.traverseVisible(function(H) {
|
|
25479
|
-
H.isLight && H.layers.test(
|
|
25479
|
+
H.isLight && H.layers.test(N.layers) && (R.pushLight(H), H.castShadow && R.pushShadow(H));
|
|
25480
25480
|
}), R.setupLights();
|
|
25481
25481
|
const W = /* @__PURE__ */ new Set();
|
|
25482
25482
|
return y.traverse(function(H) {
|
|
@@ -25492,8 +25492,8 @@ class S0 {
|
|
|
25492
25492
|
else
|
|
25493
25493
|
$e(Et, j, H), W.add(Et);
|
|
25494
25494
|
}), R = P.pop(), W;
|
|
25495
|
-
}, this.compileAsync = function(y,
|
|
25496
|
-
const W = this.compile(y,
|
|
25495
|
+
}, this.compileAsync = function(y, N, j = null) {
|
|
25496
|
+
const W = this.compile(y, N, j);
|
|
25497
25497
|
return new Promise((H) => {
|
|
25498
25498
|
function Et() {
|
|
25499
25499
|
if (W.forEach(function(Ct) {
|
|
@@ -25508,7 +25508,7 @@ class S0 {
|
|
|
25508
25508
|
});
|
|
25509
25509
|
};
|
|
25510
25510
|
let qn = null;
|
|
25511
|
-
function
|
|
25511
|
+
function Ns(y) {
|
|
25512
25512
|
qn && qn(y);
|
|
25513
25513
|
}
|
|
25514
25514
|
function Yn() {
|
|
@@ -25518,61 +25518,61 @@ class S0 {
|
|
|
25518
25518
|
qe.start();
|
|
25519
25519
|
}
|
|
25520
25520
|
const qe = new du();
|
|
25521
|
-
qe.setAnimationLoop(
|
|
25521
|
+
qe.setAnimationLoop(Ns), typeof self < "u" && qe.setContext(self), this.setAnimationLoop = function(y) {
|
|
25522
25522
|
qn = y, Q.setAnimationLoop(y), y === null ? qe.stop() : qe.start();
|
|
25523
|
-
}, Q.addEventListener("sessionstart", Yn), Q.addEventListener("sessionend", Er), this.render = function(y,
|
|
25524
|
-
if (
|
|
25523
|
+
}, Q.addEventListener("sessionstart", Yn), Q.addEventListener("sessionend", Er), this.render = function(y, N) {
|
|
25524
|
+
if (N !== void 0 && N.isCamera !== !0) {
|
|
25525
25525
|
Ht("WebGLRenderer.render: camera is not an instance of THREE.Camera.");
|
|
25526
25526
|
return;
|
|
25527
25527
|
}
|
|
25528
25528
|
if (k === !0) return;
|
|
25529
25529
|
const j = Q.enabled === !0 && Q.isPresenting === !0, W = v !== null && (B === null || j) && v.begin(E, B);
|
|
25530
|
-
if (y.matrixWorldAutoUpdate === !0 && y.updateMatrixWorld(),
|
|
25530
|
+
if (y.matrixWorldAutoUpdate === !0 && y.updateMatrixWorld(), N.parent === null && N.matrixWorldAutoUpdate === !0 && N.updateMatrixWorld(), Q.enabled === !0 && Q.isPresenting === !0 && (v === null || v.isCompositing() === !1) && (Q.cameraAutoUpdate === !0 && Q.updateCamera(N), N = Q.getCamera()), y.isScene === !0 && y.onBeforeRender(E, y, N, B), R = ct.get(y, P.length), R.init(N), P.push(R), mt.multiplyMatrices(N.projectionMatrix, N.matrixWorldInverse), Ut.setFromProjectionMatrix(mt, fn, N.reversedDepth), Dt = this.localClippingEnabled, Lt = pt.init(this.clippingPlanes, Dt), b = Gt.get(y, w.length), b.init(), w.push(b), Q.enabled === !0 && Q.isPresenting === !0) {
|
|
25531
25531
|
const Ct = E.xr.getDepthSensingMesh();
|
|
25532
|
-
Ct !== null && vn(Ct,
|
|
25532
|
+
Ct !== null && vn(Ct, N, -1 / 0, E.sortObjects);
|
|
25533
25533
|
}
|
|
25534
|
-
vn(y,
|
|
25534
|
+
vn(y, N, 0, E.sortObjects), b.finish(), E.sortObjects === !0 && b.sort(Wt, te), q = Q.enabled === !1 || Q.isPresenting === !1 || Q.hasDepthSensing() === !1, q && Pt.addToRenderList(b, y), this.info.render.frame++, Lt === !0 && pt.beginShadows();
|
|
25535
25535
|
const H = R.state.shadowsArray;
|
|
25536
|
-
if (Rt.render(H, y,
|
|
25536
|
+
if (Rt.render(H, y, N), Lt === !0 && pt.endShadows(), this.info.autoReset === !0 && this.info.reset(), (W && v.hasRenderPass()) === !1) {
|
|
25537
25537
|
const Ct = b.opaque, Tt = b.transmissive;
|
|
25538
|
-
if (R.setupLights(),
|
|
25539
|
-
const
|
|
25538
|
+
if (R.setupLights(), N.isArrayCamera) {
|
|
25539
|
+
const Nt = N.cameras;
|
|
25540
25540
|
if (Tt.length > 0)
|
|
25541
|
-
for (let Bt = 0, Yt =
|
|
25542
|
-
const $t =
|
|
25541
|
+
for (let Bt = 0, Yt = Nt.length; Bt < Yt; Bt++) {
|
|
25542
|
+
const $t = Nt[Bt];
|
|
25543
25543
|
$o(Ct, Tt, y, $t);
|
|
25544
25544
|
}
|
|
25545
25545
|
q && Pt.render(y);
|
|
25546
|
-
for (let Bt = 0, Yt =
|
|
25547
|
-
const $t =
|
|
25546
|
+
for (let Bt = 0, Yt = Nt.length; Bt < Yt; Bt++) {
|
|
25547
|
+
const $t = Nt[Bt];
|
|
25548
25548
|
Jo(b, y, $t, $t.viewport);
|
|
25549
25549
|
}
|
|
25550
25550
|
} else
|
|
25551
|
-
Tt.length > 0 && $o(Ct, Tt, y,
|
|
25551
|
+
Tt.length > 0 && $o(Ct, Tt, y, N), q && Pt.render(y), Jo(b, y, N);
|
|
25552
25552
|
}
|
|
25553
|
-
B !== null &&
|
|
25553
|
+
B !== null && U === 0 && (I.updateMultisampleRenderTarget(B), I.updateRenderTargetMipmap(B)), W && v.end(E), y.isScene === !0 && y.onAfterRender(E, y, N), _t.resetDefaultState(), G = -1, z = null, P.pop(), P.length > 0 ? (R = P[P.length - 1], Lt === !0 && pt.setGlobalState(E.clippingPlanes, R.state.camera)) : R = null, w.pop(), w.length > 0 ? b = w[w.length - 1] : b = null;
|
|
25554
25554
|
};
|
|
25555
|
-
function vn(y,
|
|
25555
|
+
function vn(y, N, j, W) {
|
|
25556
25556
|
if (y.visible === !1) return;
|
|
25557
|
-
if (y.layers.test(
|
|
25557
|
+
if (y.layers.test(N.layers)) {
|
|
25558
25558
|
if (y.isGroup)
|
|
25559
25559
|
j = y.renderOrder;
|
|
25560
25560
|
else if (y.isLOD)
|
|
25561
|
-
y.autoUpdate === !0 && y.update(
|
|
25561
|
+
y.autoUpdate === !0 && y.update(N);
|
|
25562
25562
|
else if (y.isLight)
|
|
25563
25563
|
R.pushLight(y), y.castShadow && R.pushShadow(y);
|
|
25564
25564
|
else if (y.isSprite) {
|
|
25565
|
-
if (!y.frustumCulled ||
|
|
25565
|
+
if (!y.frustumCulled || Ut.intersectsSprite(y)) {
|
|
25566
25566
|
W && F.setFromMatrixPosition(y.matrixWorld).applyMatrix4(mt);
|
|
25567
25567
|
const Ct = St.update(y), Tt = y.material;
|
|
25568
25568
|
Tt.visible && b.push(y, Ct, Tt, j, F.z, null);
|
|
25569
25569
|
}
|
|
25570
|
-
} else if ((y.isMesh || y.isLine || y.isPoints) && (!y.frustumCulled ||
|
|
25570
|
+
} else if ((y.isMesh || y.isLine || y.isPoints) && (!y.frustumCulled || Ut.intersectsObject(y))) {
|
|
25571
25571
|
const Ct = St.update(y), Tt = y.material;
|
|
25572
25572
|
if (W && (y.boundingSphere !== void 0 ? (y.boundingSphere === null && y.computeBoundingSphere(), F.copy(y.boundingSphere.center)) : (Ct.boundingSphere === null && Ct.computeBoundingSphere(), F.copy(Ct.boundingSphere.center)), F.applyMatrix4(y.matrixWorld).applyMatrix4(mt)), Array.isArray(Tt)) {
|
|
25573
|
-
const
|
|
25574
|
-
for (let Bt = 0, Yt =
|
|
25575
|
-
const $t =
|
|
25573
|
+
const Nt = Ct.groups;
|
|
25574
|
+
for (let Bt = 0, Yt = Nt.length; Bt < Yt; Bt++) {
|
|
25575
|
+
const $t = Nt[Bt], Vt = Tt[$t.materialIndex];
|
|
25576
25576
|
Vt && Vt.visible && b.push(y, Ct, Vt, j, F.z, $t);
|
|
25577
25577
|
}
|
|
25578
25578
|
} else Tt.visible && b.push(y, Ct, Tt, j, F.z, null);
|
|
@@ -25580,13 +25580,13 @@ class S0 {
|
|
|
25580
25580
|
}
|
|
25581
25581
|
const Et = y.children;
|
|
25582
25582
|
for (let Ct = 0, Tt = Et.length; Ct < Tt; Ct++)
|
|
25583
|
-
vn(Et[Ct],
|
|
25583
|
+
vn(Et[Ct], N, j, W);
|
|
25584
25584
|
}
|
|
25585
|
-
function Jo(y,
|
|
25585
|
+
function Jo(y, N, j, W) {
|
|
25586
25586
|
const { opaque: H, transmissive: Et, transparent: Ct } = y;
|
|
25587
|
-
R.setupLightsView(j), Lt === !0 && pt.setGlobalState(E.clippingPlanes, j), W && Z.viewport(O.copy(W)), H.length > 0 && Tr(H,
|
|
25587
|
+
R.setupLightsView(j), Lt === !0 && pt.setGlobalState(E.clippingPlanes, j), W && Z.viewport(O.copy(W)), H.length > 0 && Tr(H, N, j), Et.length > 0 && Tr(Et, N, j), Ct.length > 0 && Tr(Ct, N, j), Z.buffers.depth.setTest(!0), Z.buffers.depth.setMask(!0), Z.buffers.color.setMask(!0), Z.setPolygonOffset(!1);
|
|
25588
25588
|
}
|
|
25589
|
-
function $o(y,
|
|
25589
|
+
function $o(y, N, j, W) {
|
|
25590
25590
|
if ((j.isScene === !0 ? j.overrideMaterial : null) !== null)
|
|
25591
25591
|
return;
|
|
25592
25592
|
if (R.state.transmissionRenderTarget[W.id] === void 0) {
|
|
@@ -25605,15 +25605,15 @@ class S0 {
|
|
|
25605
25605
|
}
|
|
25606
25606
|
const Et = R.state.transmissionRenderTarget[W.id], Ct = W.viewport || O;
|
|
25607
25607
|
Et.setSize(Ct.z * E.transmissionResolutionScale, Ct.w * E.transmissionResolutionScale);
|
|
25608
|
-
const Tt = E.getRenderTarget(),
|
|
25608
|
+
const Tt = E.getRenderTarget(), Nt = E.getActiveCubeFace(), Bt = E.getActiveMipmapLevel();
|
|
25609
25609
|
E.setRenderTarget(Et), E.getClearColor(it), Mt = E.getClearAlpha(), Mt < 1 && E.setClearColor(16777215, 0.5), E.clear(), q && Pt.render(j);
|
|
25610
25610
|
const Yt = E.toneMapping;
|
|
25611
25611
|
E.toneMapping = dn;
|
|
25612
25612
|
const $t = W.viewport;
|
|
25613
25613
|
if (W.viewport !== void 0 && (W.viewport = void 0), R.setupLightsView(W), Lt === !0 && pt.setGlobalState(E.clippingPlanes, W), Tr(y, j, W), I.updateMultisampleRenderTarget(Et), I.updateRenderTargetMipmap(Et), J.has("WEBGL_multisampled_render_to_texture") === !1) {
|
|
25614
25614
|
let Vt = !1;
|
|
25615
|
-
for (let ae = 0, ge =
|
|
25616
|
-
const de =
|
|
25615
|
+
for (let ae = 0, ge = N.length; ae < ge; ae++) {
|
|
25616
|
+
const de = N[ae], { object: oe, geometry: Ie, material: Ot, group: Be } = de;
|
|
25617
25617
|
if (Ot.side === hn && oe.layers.test(W.layers)) {
|
|
25618
25618
|
const ne = Ot.side;
|
|
25619
25619
|
Ot.side = Oe, Ot.needsUpdate = !0, Ko(oe, j, W, Ie, Ot, Be), Ot.side = ne, Ot.needsUpdate = !0, Vt = !0;
|
|
@@ -25621,49 +25621,49 @@ class S0 {
|
|
|
25621
25621
|
}
|
|
25622
25622
|
Vt === !0 && (I.updateMultisampleRenderTarget(Et), I.updateRenderTargetMipmap(Et));
|
|
25623
25623
|
}
|
|
25624
|
-
E.setRenderTarget(Tt,
|
|
25624
|
+
E.setRenderTarget(Tt, Nt, Bt), E.setClearColor(it, Mt), $t !== void 0 && (W.viewport = $t), E.toneMapping = Yt;
|
|
25625
25625
|
}
|
|
25626
|
-
function Tr(y,
|
|
25627
|
-
const W =
|
|
25626
|
+
function Tr(y, N, j) {
|
|
25627
|
+
const W = N.isScene === !0 ? N.overrideMaterial : null;
|
|
25628
25628
|
for (let H = 0, Et = y.length; H < Et; H++) {
|
|
25629
|
-
const Ct = y[H], { object: Tt, geometry:
|
|
25629
|
+
const Ct = y[H], { object: Tt, geometry: Nt, group: Bt } = Ct;
|
|
25630
25630
|
let Yt = Ct.material;
|
|
25631
|
-
Yt.allowOverride === !0 && W !== null && (Yt = W), Tt.layers.test(j.layers) && Ko(Tt,
|
|
25631
|
+
Yt.allowOverride === !0 && W !== null && (Yt = W), Tt.layers.test(j.layers) && Ko(Tt, N, j, Nt, Yt, Bt);
|
|
25632
25632
|
}
|
|
25633
25633
|
}
|
|
25634
|
-
function Ko(y,
|
|
25635
|
-
y.onBeforeRender(E,
|
|
25634
|
+
function Ko(y, N, j, W, H, Et) {
|
|
25635
|
+
y.onBeforeRender(E, N, j, W, H, Et), y.modelViewMatrix.multiplyMatrices(j.matrixWorldInverse, y.matrixWorld), y.normalMatrix.getNormalMatrix(y.modelViewMatrix), H.onBeforeRender(E, N, j, W, y, Et), H.transparent === !0 && H.side === hn && H.forceSinglePass === !1 ? (H.side = Oe, H.needsUpdate = !0, E.renderBufferDirect(j, N, W, H, y, Et), H.side = Xn, H.needsUpdate = !0, E.renderBufferDirect(j, N, W, H, y, Et), H.side = hn) : E.renderBufferDirect(j, N, W, H, y, Et), y.onAfterRender(E, N, j, W, H, Et);
|
|
25636
25636
|
}
|
|
25637
|
-
function Ar(y,
|
|
25638
|
-
|
|
25639
|
-
const W = _.get(y), H = R.state.lights, Et = R.state.shadowsArray, Ct = H.state.version, Tt = dt.getParameters(y, H.state, Et,
|
|
25637
|
+
function Ar(y, N, j) {
|
|
25638
|
+
N.isScene !== !0 && (N = $);
|
|
25639
|
+
const W = _.get(y), H = R.state.lights, Et = R.state.shadowsArray, Ct = H.state.version, Tt = dt.getParameters(y, H.state, Et, N, j), Nt = dt.getProgramCacheKey(Tt);
|
|
25640
25640
|
let Bt = W.programs;
|
|
25641
|
-
W.environment = y.isMeshStandardMaterial || y.isMeshLambertMaterial || y.isMeshPhongMaterial ?
|
|
25641
|
+
W.environment = y.isMeshStandardMaterial || y.isMeshLambertMaterial || y.isMeshPhongMaterial ? N.environment : null, W.fog = N.fog;
|
|
25642
25642
|
const Yt = y.isMeshStandardMaterial || y.isMeshLambertMaterial && !y.envMap || y.isMeshPhongMaterial && !y.envMap;
|
|
25643
|
-
W.envMap = Y.get(y.envMap || W.environment, Yt), W.envMapRotation = W.environment !== null && y.envMap === null ?
|
|
25644
|
-
let $t = Bt.get(
|
|
25643
|
+
W.envMap = Y.get(y.envMap || W.environment, Yt), W.envMapRotation = W.environment !== null && y.envMap === null ? N.environmentRotation : y.envMapRotation, Bt === void 0 && (y.addEventListener("dispose", Xt), Bt = /* @__PURE__ */ new Map(), W.programs = Bt);
|
|
25644
|
+
let $t = Bt.get(Nt);
|
|
25645
25645
|
if ($t !== void 0) {
|
|
25646
25646
|
if (W.currentProgram === $t && W.lightsStateVersion === Ct)
|
|
25647
25647
|
return Qo(y, Tt), $t;
|
|
25648
25648
|
} else
|
|
25649
|
-
Tt.uniforms = dt.getUniforms(y), y.onBeforeCompile(Tt, E), $t = dt.acquireProgram(Tt,
|
|
25649
|
+
Tt.uniforms = dt.getUniforms(y), y.onBeforeCompile(Tt, E), $t = dt.acquireProgram(Tt, Nt), Bt.set(Nt, $t), W.uniforms = Tt.uniforms;
|
|
25650
25650
|
const Vt = W.uniforms;
|
|
25651
25651
|
return (!y.isShaderMaterial && !y.isRawShaderMaterial || y.clipping === !0) && (Vt.clippingPlanes = pt.uniform), Qo(y, Tt), W.needsLights = yu(y), W.lightsStateVersion = Ct, W.needsLights && (Vt.ambientLightColor.value = H.state.ambient, Vt.lightProbe.value = H.state.probe, Vt.directionalLights.value = H.state.directional, Vt.directionalLightShadows.value = H.state.directionalShadow, Vt.spotLights.value = H.state.spot, Vt.spotLightShadows.value = H.state.spotShadow, Vt.rectAreaLights.value = H.state.rectArea, Vt.ltc_1.value = H.state.rectAreaLTC1, Vt.ltc_2.value = H.state.rectAreaLTC2, Vt.pointLights.value = H.state.point, Vt.pointLightShadows.value = H.state.pointShadow, Vt.hemisphereLights.value = H.state.hemi, Vt.directionalShadowMatrix.value = H.state.directionalShadowMatrix, Vt.spotLightMatrix.value = H.state.spotLightMatrix, Vt.spotLightMap.value = H.state.spotLightMap, Vt.pointShadowMatrix.value = H.state.pointShadowMatrix), W.currentProgram = $t, W.uniformsList = null, $t;
|
|
25652
25652
|
}
|
|
25653
25653
|
function jo(y) {
|
|
25654
25654
|
if (y.uniformsList === null) {
|
|
25655
|
-
const
|
|
25656
|
-
y.uniformsList = ms.seqWithValue(
|
|
25655
|
+
const N = y.currentProgram.getUniforms();
|
|
25656
|
+
y.uniformsList = ms.seqWithValue(N.seq, y.uniforms);
|
|
25657
25657
|
}
|
|
25658
25658
|
return y.uniformsList;
|
|
25659
25659
|
}
|
|
25660
|
-
function Qo(y,
|
|
25660
|
+
function Qo(y, N) {
|
|
25661
25661
|
const j = _.get(y);
|
|
25662
|
-
j.outputColorSpace =
|
|
25662
|
+
j.outputColorSpace = N.outputColorSpace, j.batching = N.batching, j.batchingColor = N.batchingColor, j.instancing = N.instancing, j.instancingColor = N.instancingColor, j.instancingMorph = N.instancingMorph, j.skinning = N.skinning, j.morphTargets = N.morphTargets, j.morphNormals = N.morphNormals, j.morphColors = N.morphColors, j.morphTargetsCount = N.morphTargetsCount, j.numClippingPlanes = N.numClippingPlanes, j.numIntersection = N.numClipIntersection, j.vertexAlphas = N.vertexAlphas, j.vertexTangents = N.vertexTangents, j.toneMapping = N.toneMapping;
|
|
25663
25663
|
}
|
|
25664
|
-
function vu(y,
|
|
25665
|
-
|
|
25666
|
-
const Et =
|
|
25664
|
+
function vu(y, N, j, W, H) {
|
|
25665
|
+
N.isScene !== !0 && (N = $), I.resetTextureUnits();
|
|
25666
|
+
const Et = N.fog, Ct = W.isMeshStandardMaterial || W.isMeshLambertMaterial || W.isMeshPhongMaterial ? N.environment : null, Tt = B === null ? E.outputColorSpace : B.isXRRenderTarget === !0 ? B.texture.colorSpace : Bi, Nt = W.isMeshStandardMaterial || W.isMeshLambertMaterial && !W.envMap || W.isMeshPhongMaterial && !W.envMap, Bt = Y.get(W.envMap || Ct, Nt), Yt = W.vertexColors === !0 && !!j.attributes.color && j.attributes.color.itemSize === 4, $t = !!j.attributes.tangent && (!!W.normalMap || W.anisotropy > 0), Vt = !!j.morphAttributes.position, ae = !!j.morphAttributes.normal, ge = !!j.morphAttributes.color;
|
|
25667
25667
|
let de = dn;
|
|
25668
25668
|
W.toneMapped && (B === null || B.isXRRenderTarget === !0) && (de = E.toneMapping);
|
|
25669
25669
|
const oe = j.morphAttributes.position || j.morphAttributes.normal || j.morphAttributes.color, Ie = oe !== void 0 ? oe.length : 0, Ot = _.get(W), Be = R.state.lights;
|
|
@@ -25674,7 +25674,7 @@ class S0 {
|
|
|
25674
25674
|
let ne = !1;
|
|
25675
25675
|
W.version === Ot.__version ? (Ot.needsLights && Ot.lightsStateVersion !== Be.state.version || Ot.outputColorSpace !== Tt || H.isBatchedMesh && Ot.batching === !1 || !H.isBatchedMesh && Ot.batching === !0 || H.isBatchedMesh && Ot.batchingColor === !0 && H.colorTexture === null || H.isBatchedMesh && Ot.batchingColor === !1 && H.colorTexture !== null || H.isInstancedMesh && Ot.instancing === !1 || !H.isInstancedMesh && Ot.instancing === !0 || H.isSkinnedMesh && Ot.skinning === !1 || !H.isSkinnedMesh && Ot.skinning === !0 || H.isInstancedMesh && Ot.instancingColor === !0 && H.instanceColor === null || H.isInstancedMesh && Ot.instancingColor === !1 && H.instanceColor !== null || H.isInstancedMesh && Ot.instancingMorph === !0 && H.morphTexture === null || H.isInstancedMesh && Ot.instancingMorph === !1 && H.morphTexture !== null || Ot.envMap !== Bt || W.fog === !0 && Ot.fog !== Et || Ot.numClippingPlanes !== void 0 && (Ot.numClippingPlanes !== pt.numPlanes || Ot.numIntersection !== pt.numIntersection) || Ot.vertexAlphas !== Yt || Ot.vertexTangents !== $t || Ot.morphTargets !== Vt || Ot.morphNormals !== ae || Ot.morphColors !== ge || Ot.toneMapping !== de || Ot.morphTargetsCount !== Ie) && (ne = !0) : (ne = !0, Ot.__version = W.version);
|
|
25676
25676
|
let Ke = Ot.currentProgram;
|
|
25677
|
-
ne === !0 && (Ke = Ar(W,
|
|
25677
|
+
ne === !0 && (Ke = Ar(W, N, H));
|
|
25678
25678
|
let on = !1, Zn = !1, di = !1;
|
|
25679
25679
|
const le = Ke.getUniforms(), we = Ot.uniforms;
|
|
25680
25680
|
if (Z.useProgram(Ke.program) && (on = !0, Zn = !0, di = !0), W.id !== G && (G = W.id, Zn = !0), on || z !== y) {
|
|
@@ -25692,8 +25692,8 @@ class S0 {
|
|
|
25692
25692
|
Se && (Se.boneTexture === null && Se.computeBoneTexture(), le.setValue(A, "boneTexture", Se.boneTexture, I));
|
|
25693
25693
|
}
|
|
25694
25694
|
H.isBatchedMesh && (le.setOptional(A, H, "batchingTexture"), le.setValue(A, "batchingTexture", H._matricesTexture, I), le.setOptional(A, H, "batchingIdTexture"), le.setValue(A, "batchingIdTexture", H._indirectTexture, I), le.setOptional(A, H, "batchingColorTexture"), H._colorsTexture !== null && le.setValue(A, "batchingColorTexture", H._colorsTexture, I));
|
|
25695
|
-
const
|
|
25696
|
-
if ((
|
|
25695
|
+
const Un = j.morphAttributes;
|
|
25696
|
+
if ((Un.position !== void 0 || Un.normal !== void 0 || Un.color !== void 0) && At.update(H, j, Ke), (Zn || Ot.receiveShadow !== H.receiveShadow) && (Ot.receiveShadow = H.receiveShadow, le.setValue(A, "receiveShadow", H.receiveShadow)), (W.isMeshStandardMaterial || W.isMeshLambertMaterial || W.isMeshPhongMaterial) && W.envMap === null && N.environment !== null && (we.envMapIntensity.value = N.environmentIntensity), we.dfgLUT !== void 0 && (we.dfgLUT.value = y0()), Zn && (le.setValue(A, "toneMappingExposure", E.toneMappingExposure), Ot.needsLights && Mu(we, di), Et && W.fog === !0 && Ft.refreshFogUniforms(we, Et), Ft.refreshMaterialUniforms(we, W, kt, lt, R.state.transmissionRenderTarget[y.id]), ms.upload(A, jo(Ot), we, I)), W.isShaderMaterial && W.uniformsNeedUpdate === !0 && (ms.upload(A, jo(Ot), we, I), W.uniformsNeedUpdate = !1), W.isSpriteMaterial && le.setValue(A, "center", H.center), le.setValue(A, "modelViewMatrix", H.modelViewMatrix), le.setValue(A, "normalMatrix", H.normalMatrix), le.setValue(A, "modelMatrix", H.matrixWorld), W.isShaderMaterial || W.isRawShaderMaterial) {
|
|
25697
25697
|
const Se = W.uniformsGroups;
|
|
25698
25698
|
for (let Fn = 0, pi = Se.length; Fn < pi; Fn++) {
|
|
25699
25699
|
const tc = Se[Fn];
|
|
@@ -25702,8 +25702,8 @@ class S0 {
|
|
|
25702
25702
|
}
|
|
25703
25703
|
return Ke;
|
|
25704
25704
|
}
|
|
25705
|
-
function Mu(y,
|
|
25706
|
-
y.ambientLightColor.needsUpdate =
|
|
25705
|
+
function Mu(y, N) {
|
|
25706
|
+
y.ambientLightColor.needsUpdate = N, y.lightProbe.needsUpdate = N, y.directionalLights.needsUpdate = N, y.directionalLightShadows.needsUpdate = N, y.pointLights.needsUpdate = N, y.pointLightShadows.needsUpdate = N, y.spotLights.needsUpdate = N, y.spotLightShadows.needsUpdate = N, y.rectAreaLights.needsUpdate = N, y.hemisphereLights.needsUpdate = N;
|
|
25707
25707
|
}
|
|
25708
25708
|
function yu(y) {
|
|
25709
25709
|
return y.isMeshLambertMaterial || y.isMeshToonMaterial || y.isMeshPhongMaterial || y.isMeshStandardMaterial || y.isShadowMaterial || y.isShaderMaterial && y.lights === !0;
|
|
@@ -25711,19 +25711,19 @@ class S0 {
|
|
|
25711
25711
|
this.getActiveCubeFace = function() {
|
|
25712
25712
|
return C;
|
|
25713
25713
|
}, this.getActiveMipmapLevel = function() {
|
|
25714
|
-
return
|
|
25714
|
+
return U;
|
|
25715
25715
|
}, this.getRenderTarget = function() {
|
|
25716
25716
|
return B;
|
|
25717
|
-
}, this.setRenderTargetTextures = function(y,
|
|
25717
|
+
}, this.setRenderTargetTextures = function(y, N, j) {
|
|
25718
25718
|
const W = _.get(y);
|
|
25719
|
-
W.__autoAllocateDepthBuffer = y.resolveDepthBuffer === !1, W.__autoAllocateDepthBuffer === !1 && (W.__useRenderToTexture = !1), _.get(y.texture).__webglTexture =
|
|
25720
|
-
}, this.setRenderTargetFramebuffer = function(y,
|
|
25719
|
+
W.__autoAllocateDepthBuffer = y.resolveDepthBuffer === !1, W.__autoAllocateDepthBuffer === !1 && (W.__useRenderToTexture = !1), _.get(y.texture).__webglTexture = N, _.get(y.depthTexture).__webglTexture = W.__autoAllocateDepthBuffer ? void 0 : j, W.__hasExternalTextures = !0;
|
|
25720
|
+
}, this.setRenderTargetFramebuffer = function(y, N) {
|
|
25721
25721
|
const j = _.get(y);
|
|
25722
|
-
j.__webglFramebuffer =
|
|
25722
|
+
j.__webglFramebuffer = N, j.__useDefaultFramebuffer = N === void 0;
|
|
25723
25723
|
};
|
|
25724
25724
|
const Su = A.createFramebuffer();
|
|
25725
|
-
this.setRenderTarget = function(y,
|
|
25726
|
-
B = y, C =
|
|
25725
|
+
this.setRenderTarget = function(y, N = 0, j = 0) {
|
|
25726
|
+
B = y, C = N, U = j;
|
|
25727
25727
|
let W = null, H = !1, Et = !1;
|
|
25728
25728
|
if (y) {
|
|
25729
25729
|
const Tt = _.get(y);
|
|
@@ -25742,34 +25742,34 @@ class S0 {
|
|
|
25742
25742
|
I.setupDepthRenderbuffer(y);
|
|
25743
25743
|
}
|
|
25744
25744
|
}
|
|
25745
|
-
const
|
|
25746
|
-
(
|
|
25745
|
+
const Nt = y.texture;
|
|
25746
|
+
(Nt.isData3DTexture || Nt.isDataArrayTexture || Nt.isCompressedArrayTexture) && (Et = !0);
|
|
25747
25747
|
const Bt = _.get(y).__webglFramebuffer;
|
|
25748
|
-
y.isWebGLCubeRenderTarget ? (Array.isArray(Bt[
|
|
25748
|
+
y.isWebGLCubeRenderTarget ? (Array.isArray(Bt[N]) ? W = Bt[N][j] : W = Bt[N], H = !0) : y.samples > 0 && I.useMultisampledRTT(y) === !1 ? W = _.get(y).__webglMultisampledFramebuffer : Array.isArray(Bt) ? W = Bt[j] : W = Bt, O.copy(y.viewport), V.copy(y.scissor), at = y.scissorTest;
|
|
25749
25749
|
} else
|
|
25750
25750
|
O.copy(et).multiplyScalar(kt).floor(), V.copy(rt).multiplyScalar(kt).floor(), at = ft;
|
|
25751
25751
|
if (j !== 0 && (W = Su), Z.bindFramebuffer(A.FRAMEBUFFER, W) && Z.drawBuffers(y, W), Z.viewport(O), Z.scissor(V), Z.setScissorTest(at), H) {
|
|
25752
25752
|
const Tt = _.get(y.texture);
|
|
25753
|
-
A.framebufferTexture2D(A.FRAMEBUFFER, A.COLOR_ATTACHMENT0, A.TEXTURE_CUBE_MAP_POSITIVE_X +
|
|
25753
|
+
A.framebufferTexture2D(A.FRAMEBUFFER, A.COLOR_ATTACHMENT0, A.TEXTURE_CUBE_MAP_POSITIVE_X + N, Tt.__webglTexture, j);
|
|
25754
25754
|
} else if (Et) {
|
|
25755
|
-
const Tt =
|
|
25756
|
-
for (let
|
|
25757
|
-
const Bt = _.get(y.textures[
|
|
25758
|
-
A.framebufferTextureLayer(A.FRAMEBUFFER, A.COLOR_ATTACHMENT0 +
|
|
25755
|
+
const Tt = N;
|
|
25756
|
+
for (let Nt = 0; Nt < y.textures.length; Nt++) {
|
|
25757
|
+
const Bt = _.get(y.textures[Nt]);
|
|
25758
|
+
A.framebufferTextureLayer(A.FRAMEBUFFER, A.COLOR_ATTACHMENT0 + Nt, Bt.__webglTexture, j, Tt);
|
|
25759
25759
|
}
|
|
25760
25760
|
} else if (y !== null && j !== 0) {
|
|
25761
25761
|
const Tt = _.get(y.texture);
|
|
25762
25762
|
A.framebufferTexture2D(A.FRAMEBUFFER, A.COLOR_ATTACHMENT0, A.TEXTURE_2D, Tt.__webglTexture, j);
|
|
25763
25763
|
}
|
|
25764
25764
|
G = -1;
|
|
25765
|
-
}, this.readRenderTargetPixels = function(y,
|
|
25765
|
+
}, this.readRenderTargetPixels = function(y, N, j, W, H, Et, Ct, Tt = 0) {
|
|
25766
25766
|
if (!(y && y.isWebGLRenderTarget)) {
|
|
25767
25767
|
Ht("WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
|
|
25768
25768
|
return;
|
|
25769
25769
|
}
|
|
25770
|
-
let
|
|
25771
|
-
if (y.isWebGLCubeRenderTarget && Ct !== void 0 && (
|
|
25772
|
-
Z.bindFramebuffer(A.FRAMEBUFFER,
|
|
25770
|
+
let Nt = _.get(y).__webglFramebuffer;
|
|
25771
|
+
if (y.isWebGLCubeRenderTarget && Ct !== void 0 && (Nt = Nt[Ct]), Nt) {
|
|
25772
|
+
Z.bindFramebuffer(A.FRAMEBUFFER, Nt);
|
|
25773
25773
|
try {
|
|
25774
25774
|
const Bt = y.textures[Tt], Yt = Bt.format, $t = Bt.type;
|
|
25775
25775
|
if (y.textures.length > 1 && A.readBuffer(A.COLOR_ATTACHMENT0 + Tt), !ut.textureFormatReadable(Yt)) {
|
|
@@ -25780,74 +25780,74 @@ class S0 {
|
|
|
25780
25780
|
Ht("WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
25781
25781
|
return;
|
|
25782
25782
|
}
|
|
25783
|
-
|
|
25783
|
+
N >= 0 && N <= y.width - W && j >= 0 && j <= y.height - H && A.readPixels(N, j, W, H, xt.convert(Yt), xt.convert($t), Et);
|
|
25784
25784
|
} finally {
|
|
25785
25785
|
const Bt = B !== null ? _.get(B).__webglFramebuffer : null;
|
|
25786
25786
|
Z.bindFramebuffer(A.FRAMEBUFFER, Bt);
|
|
25787
25787
|
}
|
|
25788
25788
|
}
|
|
25789
|
-
}, this.readRenderTargetPixelsAsync = async function(y,
|
|
25789
|
+
}, this.readRenderTargetPixelsAsync = async function(y, N, j, W, H, Et, Ct, Tt = 0) {
|
|
25790
25790
|
if (!(y && y.isWebGLRenderTarget))
|
|
25791
25791
|
throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");
|
|
25792
|
-
let
|
|
25793
|
-
if (y.isWebGLCubeRenderTarget && Ct !== void 0 && (
|
|
25794
|
-
if (
|
|
25795
|
-
Z.bindFramebuffer(A.FRAMEBUFFER,
|
|
25792
|
+
let Nt = _.get(y).__webglFramebuffer;
|
|
25793
|
+
if (y.isWebGLCubeRenderTarget && Ct !== void 0 && (Nt = Nt[Ct]), Nt)
|
|
25794
|
+
if (N >= 0 && N <= y.width - W && j >= 0 && j <= y.height - H) {
|
|
25795
|
+
Z.bindFramebuffer(A.FRAMEBUFFER, Nt);
|
|
25796
25796
|
const Bt = y.textures[Tt], Yt = Bt.format, $t = Bt.type;
|
|
25797
25797
|
if (y.textures.length > 1 && A.readBuffer(A.COLOR_ATTACHMENT0 + Tt), !ut.textureFormatReadable(Yt))
|
|
25798
25798
|
throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");
|
|
25799
25799
|
if (!ut.textureTypeReadable($t))
|
|
25800
25800
|
throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
25801
25801
|
const Vt = A.createBuffer();
|
|
25802
|
-
A.bindBuffer(A.PIXEL_PACK_BUFFER, Vt), A.bufferData(A.PIXEL_PACK_BUFFER, Et.byteLength, A.STREAM_READ), A.readPixels(
|
|
25802
|
+
A.bindBuffer(A.PIXEL_PACK_BUFFER, Vt), A.bufferData(A.PIXEL_PACK_BUFFER, Et.byteLength, A.STREAM_READ), A.readPixels(N, j, W, H, xt.convert(Yt), xt.convert($t), 0);
|
|
25803
25803
|
const ae = B !== null ? _.get(B).__webglFramebuffer : null;
|
|
25804
25804
|
Z.bindFramebuffer(A.FRAMEBUFFER, ae);
|
|
25805
25805
|
const ge = A.fenceSync(A.SYNC_GPU_COMMANDS_COMPLETE, 0);
|
|
25806
25806
|
return A.flush(), await vh(A, ge, 4), A.bindBuffer(A.PIXEL_PACK_BUFFER, Vt), A.getBufferSubData(A.PIXEL_PACK_BUFFER, 0, Et), A.deleteBuffer(Vt), A.deleteSync(ge), Et;
|
|
25807
25807
|
} else
|
|
25808
25808
|
throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.");
|
|
25809
|
-
}, this.copyFramebufferToTexture = function(y,
|
|
25810
|
-
const W = Math.pow(2, -j), H = Math.floor(y.image.width * W), Et = Math.floor(y.image.height * W), Ct =
|
|
25809
|
+
}, this.copyFramebufferToTexture = function(y, N = null, j = 0) {
|
|
25810
|
+
const W = Math.pow(2, -j), H = Math.floor(y.image.width * W), Et = Math.floor(y.image.height * W), Ct = N !== null ? N.x : 0, Tt = N !== null ? N.y : 0;
|
|
25811
25811
|
I.setTexture2D(y, 0), A.copyTexSubImage2D(A.TEXTURE_2D, j, 0, 0, Ct, Tt, H, Et), Z.unbindTexture();
|
|
25812
25812
|
};
|
|
25813
25813
|
const bu = A.createFramebuffer(), Eu = A.createFramebuffer();
|
|
25814
|
-
this.copyTextureToTexture = function(y,
|
|
25815
|
-
let Ct, Tt,
|
|
25814
|
+
this.copyTextureToTexture = function(y, N, j = null, W = null, H = 0, Et = 0) {
|
|
25815
|
+
let Ct, Tt, Nt, Bt, Yt, $t, Vt, ae, ge;
|
|
25816
25816
|
const de = y.isCompressedTexture ? y.mipmaps[Et] : y.image;
|
|
25817
25817
|
if (j !== null)
|
|
25818
|
-
Ct = j.max.x - j.min.x, Tt = j.max.y - j.min.y,
|
|
25818
|
+
Ct = j.max.x - j.min.x, Tt = j.max.y - j.min.y, Nt = j.isBox3 ? j.max.z - j.min.z : 1, Bt = j.min.x, Yt = j.min.y, $t = j.isBox3 ? j.min.z : 0;
|
|
25819
25819
|
else {
|
|
25820
25820
|
const we = Math.pow(2, -H);
|
|
25821
|
-
Ct = Math.floor(de.width * we), Tt = Math.floor(de.height * we), y.isDataArrayTexture ?
|
|
25821
|
+
Ct = Math.floor(de.width * we), Tt = Math.floor(de.height * we), y.isDataArrayTexture ? Nt = de.depth : y.isData3DTexture ? Nt = Math.floor(de.depth * we) : Nt = 1, Bt = 0, Yt = 0, $t = 0;
|
|
25822
25822
|
}
|
|
25823
25823
|
W !== null ? (Vt = W.x, ae = W.y, ge = W.z) : (Vt = 0, ae = 0, ge = 0);
|
|
25824
|
-
const oe = xt.convert(
|
|
25824
|
+
const oe = xt.convert(N.format), Ie = xt.convert(N.type);
|
|
25825
25825
|
let Ot;
|
|
25826
|
-
|
|
25826
|
+
N.isData3DTexture ? (I.setTexture3D(N, 0), Ot = A.TEXTURE_3D) : N.isDataArrayTexture || N.isCompressedArrayTexture ? (I.setTexture2DArray(N, 0), Ot = A.TEXTURE_2D_ARRAY) : (I.setTexture2D(N, 0), Ot = A.TEXTURE_2D), A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL, N.flipY), A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL, N.premultiplyAlpha), A.pixelStorei(A.UNPACK_ALIGNMENT, N.unpackAlignment);
|
|
25827
25827
|
const Be = A.getParameter(A.UNPACK_ROW_LENGTH), ne = A.getParameter(A.UNPACK_IMAGE_HEIGHT), Ke = A.getParameter(A.UNPACK_SKIP_PIXELS), on = A.getParameter(A.UNPACK_SKIP_ROWS), Zn = A.getParameter(A.UNPACK_SKIP_IMAGES);
|
|
25828
25828
|
A.pixelStorei(A.UNPACK_ROW_LENGTH, de.width), A.pixelStorei(A.UNPACK_IMAGE_HEIGHT, de.height), A.pixelStorei(A.UNPACK_SKIP_PIXELS, Bt), A.pixelStorei(A.UNPACK_SKIP_ROWS, Yt), A.pixelStorei(A.UNPACK_SKIP_IMAGES, $t);
|
|
25829
|
-
const di = y.isDataArrayTexture || y.isData3DTexture, le =
|
|
25829
|
+
const di = y.isDataArrayTexture || y.isData3DTexture, le = N.isDataArrayTexture || N.isData3DTexture;
|
|
25830
25830
|
if (y.isDepthTexture) {
|
|
25831
|
-
const we = _.get(y),
|
|
25831
|
+
const we = _.get(y), Un = _.get(N), Se = _.get(we.__renderTarget), Fn = _.get(Un.__renderTarget);
|
|
25832
25832
|
Z.bindFramebuffer(A.READ_FRAMEBUFFER, Se.__webglFramebuffer), Z.bindFramebuffer(A.DRAW_FRAMEBUFFER, Fn.__webglFramebuffer);
|
|
25833
|
-
for (let pi = 0; pi <
|
|
25834
|
-
di && (A.framebufferTextureLayer(A.READ_FRAMEBUFFER, A.COLOR_ATTACHMENT0, _.get(y).__webglTexture, H, $t + pi), A.framebufferTextureLayer(A.DRAW_FRAMEBUFFER, A.COLOR_ATTACHMENT0, _.get(
|
|
25833
|
+
for (let pi = 0; pi < Nt; pi++)
|
|
25834
|
+
di && (A.framebufferTextureLayer(A.READ_FRAMEBUFFER, A.COLOR_ATTACHMENT0, _.get(y).__webglTexture, H, $t + pi), A.framebufferTextureLayer(A.DRAW_FRAMEBUFFER, A.COLOR_ATTACHMENT0, _.get(N).__webglTexture, Et, ge + pi)), A.blitFramebuffer(Bt, Yt, Ct, Tt, Vt, ae, Ct, Tt, A.DEPTH_BUFFER_BIT, A.NEAREST);
|
|
25835
25835
|
Z.bindFramebuffer(A.READ_FRAMEBUFFER, null), Z.bindFramebuffer(A.DRAW_FRAMEBUFFER, null);
|
|
25836
25836
|
} else if (H !== 0 || y.isRenderTargetTexture || _.has(y)) {
|
|
25837
|
-
const we = _.get(y),
|
|
25837
|
+
const we = _.get(y), Un = _.get(N);
|
|
25838
25838
|
Z.bindFramebuffer(A.READ_FRAMEBUFFER, bu), Z.bindFramebuffer(A.DRAW_FRAMEBUFFER, Eu);
|
|
25839
|
-
for (let Se = 0; Se <
|
|
25840
|
-
di ? A.framebufferTextureLayer(A.READ_FRAMEBUFFER, A.COLOR_ATTACHMENT0, we.__webglTexture, H, $t + Se) : A.framebufferTexture2D(A.READ_FRAMEBUFFER, A.COLOR_ATTACHMENT0, A.TEXTURE_2D, we.__webglTexture, H), le ? A.framebufferTextureLayer(A.DRAW_FRAMEBUFFER, A.COLOR_ATTACHMENT0,
|
|
25839
|
+
for (let Se = 0; Se < Nt; Se++)
|
|
25840
|
+
di ? A.framebufferTextureLayer(A.READ_FRAMEBUFFER, A.COLOR_ATTACHMENT0, we.__webglTexture, H, $t + Se) : A.framebufferTexture2D(A.READ_FRAMEBUFFER, A.COLOR_ATTACHMENT0, A.TEXTURE_2D, we.__webglTexture, H), le ? A.framebufferTextureLayer(A.DRAW_FRAMEBUFFER, A.COLOR_ATTACHMENT0, Un.__webglTexture, Et, ge + Se) : A.framebufferTexture2D(A.DRAW_FRAMEBUFFER, A.COLOR_ATTACHMENT0, A.TEXTURE_2D, Un.__webglTexture, Et), H !== 0 ? A.blitFramebuffer(Bt, Yt, Ct, Tt, Vt, ae, Ct, Tt, A.COLOR_BUFFER_BIT, A.NEAREST) : le ? A.copyTexSubImage3D(Ot, Et, Vt, ae, ge + Se, Bt, Yt, Ct, Tt) : A.copyTexSubImage2D(Ot, Et, Vt, ae, Bt, Yt, Ct, Tt);
|
|
25841
25841
|
Z.bindFramebuffer(A.READ_FRAMEBUFFER, null), Z.bindFramebuffer(A.DRAW_FRAMEBUFFER, null);
|
|
25842
25842
|
} else
|
|
25843
|
-
le ? y.isDataTexture || y.isData3DTexture ? A.texSubImage3D(Ot, Et, Vt, ae, ge, Ct, Tt,
|
|
25844
|
-
A.pixelStorei(A.UNPACK_ROW_LENGTH, Be), A.pixelStorei(A.UNPACK_IMAGE_HEIGHT, ne), A.pixelStorei(A.UNPACK_SKIP_PIXELS, Ke), A.pixelStorei(A.UNPACK_SKIP_ROWS, on), A.pixelStorei(A.UNPACK_SKIP_IMAGES, Zn), Et === 0 &&
|
|
25843
|
+
le ? y.isDataTexture || y.isData3DTexture ? A.texSubImage3D(Ot, Et, Vt, ae, ge, Ct, Tt, Nt, oe, Ie, de.data) : N.isCompressedArrayTexture ? A.compressedTexSubImage3D(Ot, Et, Vt, ae, ge, Ct, Tt, Nt, oe, de.data) : A.texSubImage3D(Ot, Et, Vt, ae, ge, Ct, Tt, Nt, oe, Ie, de) : y.isDataTexture ? A.texSubImage2D(A.TEXTURE_2D, Et, Vt, ae, Ct, Tt, oe, Ie, de.data) : y.isCompressedTexture ? A.compressedTexSubImage2D(A.TEXTURE_2D, Et, Vt, ae, de.width, de.height, oe, de.data) : A.texSubImage2D(A.TEXTURE_2D, Et, Vt, ae, Ct, Tt, oe, Ie, de);
|
|
25844
|
+
A.pixelStorei(A.UNPACK_ROW_LENGTH, Be), A.pixelStorei(A.UNPACK_IMAGE_HEIGHT, ne), A.pixelStorei(A.UNPACK_SKIP_PIXELS, Ke), A.pixelStorei(A.UNPACK_SKIP_ROWS, on), A.pixelStorei(A.UNPACK_SKIP_IMAGES, Zn), Et === 0 && N.generateMipmaps && A.generateMipmap(Ot), Z.unbindTexture();
|
|
25845
25845
|
}, this.initRenderTarget = function(y) {
|
|
25846
25846
|
_.get(y).__webglFramebuffer === void 0 && I.setupRenderTarget(y);
|
|
25847
25847
|
}, this.initTexture = function(y) {
|
|
25848
25848
|
y.isCubeTexture ? I.setTextureCube(y, 0) : y.isData3DTexture ? I.setTexture3D(y, 0) : y.isDataArrayTexture || y.isCompressedArrayTexture ? I.setTexture2DArray(y, 0) : I.setTexture2D(y, 0), Z.unbindTexture();
|
|
25849
25849
|
}, this.resetState = function() {
|
|
25850
|
-
C = 0,
|
|
25850
|
+
C = 0, U = 0, B = null, Z.reset(), _t.reset();
|
|
25851
25851
|
}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
|
|
25852
25852
|
}
|
|
25853
25853
|
/**
|
|
@@ -26102,7 +26102,7 @@ function T0(i, t, e) {
|
|
|
26102
26102
|
Math.PI / 3
|
|
26103
26103
|
),
|
|
26104
26104
|
tt
|
|
26105
|
-
),
|
|
26105
|
+
), U = (mt, st, F, $, q) => k(new Zo(mt, st, F, 3, $), q);
|
|
26106
26106
|
for (const [mt, st] of [
|
|
26107
26107
|
[r, -1],
|
|
26108
26108
|
[s, 1]
|
|
@@ -26114,7 +26114,7 @@ function T0(i, t, e) {
|
|
|
26114
26114
|
const A = C(_e - 0.8, ke - 0.8, 0.1, F - 0.2, $ - 0.2, M, 0.05);
|
|
26115
26115
|
A.position.set(st * _e / 2, 0, -0.06), mt.add(A);
|
|
26116
26116
|
for (const gt of [-ke / 2 + 13, ke / 2 - 13]) {
|
|
26117
|
-
const J =
|
|
26117
|
+
const J = U(0.22, 0.65, ue - 0.8, 0.08, T);
|
|
26118
26118
|
J.position.set(st * (_e + 0.04), gt, -ue / 2), mt.add(J);
|
|
26119
26119
|
}
|
|
26120
26120
|
}
|
|
@@ -26155,13 +26155,13 @@ function T0(i, t, e) {
|
|
|
26155
26155
|
const lt = (mt, st, F, $, q) => {
|
|
26156
26156
|
const tt = x.clone();
|
|
26157
26157
|
g.push(tt);
|
|
26158
|
-
const A =
|
|
26158
|
+
const A = U(st, F, 2.5, 0.27, tt);
|
|
26159
26159
|
A.name = `button-${mt}`, A.userData.button = mt, A.position.set($, q, -ue / 2), s.add(A), o.set(mt, A), l.set(mt, A.position.clone());
|
|
26160
|
-
const gt =
|
|
26160
|
+
const gt = U(st < F ? 4.5 : st, st < F ? F : 4.5, ue, 0.1, tt);
|
|
26161
26161
|
a.splice(a.indexOf(gt), 1), gt.position.set($ + (st < F ? 2 : 0), q + (st < F ? 0 : 2), -ue / 2), gt.userData.button = mt, gt.visible = !1, gt.updateMatrix(), d.push(gt);
|
|
26162
26162
|
};
|
|
26163
26163
|
lt("side", 0.7, 13, _e + 0.15, 21), lt("volumeUp", 9.5, 0.65, _e - 25, ke / 2 + 0.12), lt("volumeDown", 9.5, 0.65, _e - 37, ke / 2 + 0.12);
|
|
26164
|
-
const kt =
|
|
26164
|
+
const kt = U(0.35, 12, 2.5, 0.15, T);
|
|
26165
26165
|
kt.position.set(_e - 0.08, -12, -ue / 2), s.add(kt);
|
|
26166
26166
|
const Wt = 32, te = (mt, st = !1) => {
|
|
26167
26167
|
const F = new Pe(), $ = new Float32Array((Wt + 1) * 2 * 3), q = new Float32Array((Wt + 1) * 2 * 2), tt = [];
|
|
@@ -26178,7 +26178,7 @@ function T0(i, t, e) {
|
|
|
26178
26178
|
), F.setAttribute("uv", new Re(q, 2)), F.setIndex(tt);
|
|
26179
26179
|
const A = k(F, mt);
|
|
26180
26180
|
return st && (A.userData.display = "inner"), n.add(A), F;
|
|
26181
|
-
}, et = te(M), rt = te(E, !0), ft = te(p),
|
|
26181
|
+
}, et = te(M), rt = te(E, !0), ft = te(p), Ut = [-1, 1].map((mt) => {
|
|
26182
26182
|
const st = new Pe();
|
|
26183
26183
|
st.setAttribute(
|
|
26184
26184
|
"position",
|
|
@@ -26216,7 +26216,7 @@ function T0(i, t, e) {
|
|
|
26216
26216
|
(K - 0.5) * (ke - 0.9),
|
|
26217
26217
|
J + (ut - J) * Math.sin(nt)
|
|
26218
26218
|
);
|
|
26219
|
-
for (const { geometry: K, edge: St } of
|
|
26219
|
+
for (const { geometry: K, edge: St } of Ut) {
|
|
26220
26220
|
const dt = K.getAttribute("position");
|
|
26221
26221
|
dt.setXYZ(Z * 2, I, St * (ke / 2 - 0.45), Y - 0.07), dt.setXYZ(
|
|
26222
26222
|
Z * 2 + 1,
|
|
@@ -26226,7 +26226,7 @@ function T0(i, t, e) {
|
|
|
26226
26226
|
);
|
|
26227
26227
|
}
|
|
26228
26228
|
}
|
|
26229
|
-
for (const Z of [et, rt, ft, ...
|
|
26229
|
+
for (const Z of [et, rt, ft, ...Ut.map((S) => S.geometry)])
|
|
26230
26230
|
Z.getAttribute("position").needsUpdate = !0, Z.computeVertexNormals(), Z.computeBoundingSphere(), Z.computeBoundingBox();
|
|
26231
26231
|
n.updateMatrixWorld(!0);
|
|
26232
26232
|
};
|
|
@@ -26256,7 +26256,7 @@ function T0(i, t, e) {
|
|
|
26256
26256
|
},
|
|
26257
26257
|
// Imported appearances replace the rigid body while live screens and the hinge remain under our control.
|
|
26258
26258
|
loadAppearance: async (mt) => {
|
|
26259
|
-
const { GLTFLoader: st } = await import("./GLTFLoader-
|
|
26259
|
+
const { GLTFLoader: st } = await import("./GLTFLoader-Cami_vza.mjs"), { scene: F } = await new st().loadAsync(mt), $ = /* @__PURE__ */ new Set();
|
|
26260
26260
|
if (F.traverse((J) => {
|
|
26261
26261
|
if (J instanceof Ee) {
|
|
26262
26262
|
$.add(J.geometry);
|
|
@@ -26325,7 +26325,7 @@ function T0(i, t, e) {
|
|
|
26325
26325
|
const S = Z.getCenter(new D());
|
|
26326
26326
|
for (const Y of ut.children) Y.position.sub(S);
|
|
26327
26327
|
ut.position.copy(S), l.set(J, S);
|
|
26328
|
-
const _ = Z.getSize(new D()), I =
|
|
26328
|
+
const _ = Z.getSize(new D()), I = U(J === "side" ? 5 : _.x, J === "side" ? _.y : 5, ue, 0.1, x);
|
|
26329
26329
|
a.splice(a.indexOf(I), 1), I.position.copy(S).add(new D(J === "side" ? 2 : 0, J === "side" ? 0 : 2, 0)), I.userData.button = J, I.visible = !1, I.updateMatrix(), d.push(I);
|
|
26330
26330
|
}
|
|
26331
26331
|
n.updateMatrixWorld(!0);
|
|
@@ -26375,10 +26375,10 @@ function A0(i, t, e, n, r) {
|
|
|
26375
26375
|
l[0][c] = u - 24, l[1][c] = u + 24;
|
|
26376
26376
|
}
|
|
26377
26377
|
}
|
|
26378
|
-
return { guides: o, rect: a, iconSize:
|
|
26378
|
+
return { guides: o, rect: a, iconSize: Au(a) };
|
|
26379
26379
|
}
|
|
26380
26380
|
function w0(i, t, e) {
|
|
26381
|
-
const n = en(void 0), r = en(0), [s, a] = cs(), o =
|
|
26381
|
+
const n = en(void 0), r = en(0), [s, a] = cs(), o = Iu(i, t, (f) => {
|
|
26382
26382
|
f !== void 0 && c(), e(f);
|
|
26383
26383
|
}), l = en(o);
|
|
26384
26384
|
l.current = o;
|
|
@@ -26424,7 +26424,7 @@ function C0(i) {
|
|
|
26424
26424
|
d.current = a;
|
|
26425
26425
|
const [g, x] = cs("front"), m = en(0), p = en(g);
|
|
26426
26426
|
p.current = g;
|
|
26427
|
-
const [M, T] = cs(!
|
|
26427
|
+
const [M, T] = cs(!1), b = en(M);
|
|
26428
26428
|
b.current = M;
|
|
26429
26429
|
const R = en(() => {
|
|
26430
26430
|
});
|
|
@@ -26444,17 +26444,17 @@ function C0(i) {
|
|
|
26444
26444
|
const v = new $h(), E = new Is(-150, 150, 150, -150, 1, 2e3);
|
|
26445
26445
|
let k = 1;
|
|
26446
26446
|
E.position.set(0, 0, 340);
|
|
26447
|
-
const C = new wn(),
|
|
26447
|
+
const C = new wn(), U = 512, B = 256, G = new Float32Array(U * B * 4);
|
|
26448
26448
|
for (let X = 0; X < B; X++) {
|
|
26449
26449
|
const ot = ((X + 0.5) / B - 0.5) * Math.PI;
|
|
26450
|
-
for (let It = 0; It <
|
|
26451
|
-
const Xt = (It + 0.5) /
|
|
26450
|
+
for (let It = 0; It < U; It++) {
|
|
26451
|
+
const Xt = (It + 0.5) / U * Math.PI * 2, ie = Math.pow(0.5 + 0.5 * Math.sin(4 * Xt + 1.8 * Math.sin(ot)), 3), Ae = Math.pow(0.5 + 0.5 * Math.cos(2 * Xt - 3 * ot), 3), $e = 0.12 + 3.2 * ie + 0.8 * Ae, qn = (X * U + It) * 4;
|
|
26452
26452
|
G.set([$e, $e, $e, 1], qn);
|
|
26453
26453
|
}
|
|
26454
26454
|
}
|
|
26455
26455
|
const z = new ws(
|
|
26456
26456
|
G,
|
|
26457
|
-
|
|
26457
|
+
U,
|
|
26458
26458
|
B,
|
|
26459
26459
|
Xe,
|
|
26460
26460
|
We
|
|
@@ -26471,13 +26471,13 @@ function C0(i) {
|
|
|
26471
26471
|
X.colorSpace = Fe, X.minFilter = ve, X.magFilter = ve;
|
|
26472
26472
|
const lt = T0(Mt, yt, V.texture), { device: kt } = lt;
|
|
26473
26473
|
i.modelUrl && lt.loadAppearance(i.modelUrl).then(() => J()).catch((X) => s(String(X)));
|
|
26474
|
-
const Wt = new
|
|
26474
|
+
const Wt = new wu(
|
|
26475
26475
|
(X, ot) => n.current.button(X, ot),
|
|
26476
26476
|
(X) => s(String(X))
|
|
26477
26477
|
);
|
|
26478
26478
|
C.add(kt), v.add(C);
|
|
26479
26479
|
const te = new wd(), et = new vt();
|
|
26480
|
-
let rt, ft = 0,
|
|
26480
|
+
let rt, ft = 0, Ut = 0, Lt = m.current, Dt = d.current, mt = Dt, st = Dt, F = 0, $ = !1, q = 0, tt = 0, A = !0, gt = !1;
|
|
26481
26481
|
const J = () => {
|
|
26482
26482
|
!tt && A && !document.hidden && !gt && (tt = requestAnimationFrame(_t));
|
|
26483
26483
|
};
|
|
@@ -26504,11 +26504,11 @@ function C0(i) {
|
|
|
26504
26504
|
($e) => $e.id === Xt.object.userData.display
|
|
26505
26505
|
);
|
|
26506
26506
|
if (Ae)
|
|
26507
|
-
return { screenId: Ae.screenId, ...
|
|
26507
|
+
return { screenId: Ae.screenId, ...Pu(Xt.uv.x, Xt.uv.y) };
|
|
26508
26508
|
}, nt = (X) => {
|
|
26509
26509
|
if (J(), rt || X.button !== 0) return;
|
|
26510
26510
|
_(X.target) || w.focus({ preventScroll: !0 });
|
|
26511
|
-
const ot = Y(X), It = ot && "button" in ot ? ot.button : void 0, Xt =
|
|
26511
|
+
const ot = Y(X), It = ot && "button" in ot ? ot.button : void 0, Xt = Cu(b.current, !!ot && !It, X.altKey);
|
|
26512
26512
|
if (Xt === "ignore" && !It) return;
|
|
26513
26513
|
const ie = Xt === "touch" && ot && "screenId" in ot ? ot : void 0;
|
|
26514
26514
|
rt = {
|
|
@@ -26524,7 +26524,7 @@ function C0(i) {
|
|
|
26524
26524
|
if (J(), !rt) {
|
|
26525
26525
|
const ot = Y(X), It = ot && "button" in ot ? ot.button : void 0, Xt = w.getBoundingClientRect();
|
|
26526
26526
|
I(
|
|
26527
|
-
It ? Z?.guides.find((ie) => ie.button === It)?.edge : Z &&
|
|
26527
|
+
It ? Z?.guides.find((ie) => ie.button === It)?.edge : Z && Ru(X.clientX - Xt.left, X.clientY - Xt.top, Z.rect)
|
|
26528
26528
|
), P.domElement.style.cursor = It ? "pointer" : "", P.domElement.title = It ? Cr[It] : "", lt.highlightButton(It);
|
|
26529
26529
|
return;
|
|
26530
26530
|
}
|
|
@@ -26532,7 +26532,7 @@ function C0(i) {
|
|
|
26532
26532
|
if (rt.screenId) {
|
|
26533
26533
|
const ot = Y(X);
|
|
26534
26534
|
ot && "screenId" in ot && ot.screenId === rt.screenId && (rt.x = ot.x, rt.y = ot.y, n.current.touch(2, ot.screenId, ot.x, ot.y));
|
|
26535
|
-
} else b.current || (ft += (X.clientX - rt.clientX) * 8e-3,
|
|
26535
|
+
} else b.current || (ft += (X.clientX - rt.clientX) * 8e-3, Ut = si.clamp(Ut + (X.clientY - rt.clientY) * 8e-3, -1.4, 1.4));
|
|
26536
26536
|
rt.clientX = X.clientX, rt.clientY = X.clientY;
|
|
26537
26537
|
}
|
|
26538
26538
|
}, St = (X) => {
|
|
@@ -26568,12 +26568,12 @@ function C0(i) {
|
|
|
26568
26568
|
const qt = new sn(), L = new D(), xt = new D(), _t = (X) => {
|
|
26569
26569
|
if (tt = 0, gt || !A || document.hidden) return;
|
|
26570
26570
|
const ot = Math.min((X - ut) / 1e3, 0.05);
|
|
26571
|
-
ut = X, m.current !== Lt && (ft = 0,
|
|
26571
|
+
ut = X, m.current !== Lt && (ft = 0, Ut = 0, Lt = m.current), st !== d.current && (mt = Dt, st = d.current, F = X, $ = l.current);
|
|
26572
26572
|
const It = c.current;
|
|
26573
26573
|
Dt = It ? Ts(It.from, It.target, (X - It.startedAt) / 1e3) : $ ? si.damp(Dt, st, 18, ot) : Ts(mt, st, (X - F) / 1e3), Math.abs(Dt - d.current) < 1e-3 && (Dt = d.current), lt.setAngle(Dt);
|
|
26574
26574
|
const ie = (1 - si.smoothstep(Dt, 15, 110)) * Math.PI / 2 + (p.current === "back" ? Math.PI : 0);
|
|
26575
26575
|
q = si.damp(q, ie, 12, ot), Math.abs(q - ie) < 1e-3 && (q = ie), C.rotation.set(
|
|
26576
|
-
|
|
26576
|
+
Ut + (p.current === "table" ? -0.35 : p.current === "book" ? 0.2 : 0),
|
|
26577
26577
|
ft + (p.current === "book" ? -0.2 : 0),
|
|
26578
26578
|
0
|
|
26579
26579
|
), kt.rotation.set(
|
|
@@ -26582,7 +26582,7 @@ function C0(i) {
|
|
|
26582
26582
|
{ portrait: 0, pud: Math.PI, "landscape-left": Math.PI / 2, "landscape-right": -Math.PI / 2 }[n.current.state.orientation] ?? 0,
|
|
26583
26583
|
"ZYX"
|
|
26584
26584
|
), C.position.set(0, 0, 0), C.updateMatrixWorld(!0), lt.getBounds(qt).getCenter(L), qt.getSize(xt), C.position.copy(L).negate();
|
|
26585
|
-
const Ae = w.clientWidth, $e = w.clientHeight, qn = Math.max(0.4, 1 - 108 / Ae),
|
|
26585
|
+
const Ae = w.clientWidth, $e = w.clientHeight, qn = Math.max(0.4, 1 - 108 / Ae), Ns = Math.min(0.8, Math.max(0.35, 1 - 108 / $e)), Yn = Math.max(xt.y / (2 * Ns), xt.x / (2 * k * qn));
|
|
26586
26586
|
E.top = si.damp(E.top, Yn, 14, ot), Math.abs(E.top - Yn) < 1e-3 && (E.top = Yn), E.bottom = -E.top, E.left = -E.top * k, E.right = E.top * k, E.updateProjectionMatrix();
|
|
26587
26587
|
const Er = lt.animateButtons(ot);
|
|
26588
26588
|
P.render(v, E), lt.getBounds(qt), Z = A0(lt.buttonAnchors(), qt, E, Ae, $e);
|
|
@@ -26616,7 +26616,7 @@ function C0(i) {
|
|
|
26616
26616
|
"data-position-locked": M,
|
|
26617
26617
|
tabIndex: 0,
|
|
26618
26618
|
role: "application",
|
|
26619
|
-
"aria-label": "iPhone Duo simulator. Touch the screen to control iOS.
|
|
26619
|
+
"aria-label": "iPhone Duo simulator. Touch the screen to control iOS. Drag the frame or background to rotate when position is unlocked.",
|
|
26620
26620
|
onKeyDown: i.onKeyDown,
|
|
26621
26621
|
onKeyUp: i.onKeyUp,
|
|
26622
26622
|
children: Object.keys(Cr).map((w) => /* @__PURE__ */ Jn(
|
|
@@ -26631,14 +26631,14 @@ function C0(i) {
|
|
|
26631
26631
|
"data-visible": "false",
|
|
26632
26632
|
"aria-label": Cr[w],
|
|
26633
26633
|
title: Cr[w],
|
|
26634
|
-
children: /* @__PURE__ */ Jn(
|
|
26634
|
+
children: /* @__PURE__ */ Jn(Du, { button: w })
|
|
26635
26635
|
},
|
|
26636
26636
|
w
|
|
26637
26637
|
))
|
|
26638
26638
|
}
|
|
26639
26639
|
),
|
|
26640
26640
|
/* @__PURE__ */ wr(
|
|
26641
|
-
|
|
26641
|
+
Lu,
|
|
26642
26642
|
{
|
|
26643
26643
|
angle: a,
|
|
26644
26644
|
onFold: f,
|
|
@@ -26706,7 +26706,7 @@ export {
|
|
|
26706
26706
|
V0 as F,
|
|
26707
26707
|
O0 as G,
|
|
26708
26708
|
B0 as H,
|
|
26709
|
-
|
|
26709
|
+
U0 as I,
|
|
26710
26710
|
wn as J,
|
|
26711
26711
|
Ge as K,
|
|
26712
26712
|
br as L,
|
|
@@ -26715,7 +26715,7 @@ export {
|
|
|
26715
26715
|
pe as O,
|
|
26716
26716
|
H0 as P,
|
|
26717
26717
|
hi as Q,
|
|
26718
|
-
|
|
26718
|
+
Na as R,
|
|
26719
26719
|
Fe as S,
|
|
26720
26720
|
k0 as T,
|
|
26721
26721
|
si as U,
|
|
@@ -26735,7 +26735,7 @@ export {
|
|
|
26735
26735
|
Xn as a6,
|
|
26736
26736
|
Sr as a7,
|
|
26737
26737
|
sn as a8,
|
|
26738
|
-
|
|
26738
|
+
Nn as a9,
|
|
26739
26739
|
oh as aa,
|
|
26740
26740
|
uc as ab,
|
|
26741
26741
|
Y0 as ac,
|
|
@@ -26751,7 +26751,7 @@ export {
|
|
|
26751
26751
|
rh as k,
|
|
26752
26752
|
ve as l,
|
|
26753
26753
|
Ce as m,
|
|
26754
|
-
|
|
26754
|
+
Ua as n,
|
|
26755
26755
|
An as o,
|
|
26756
26756
|
hf as p,
|
|
26757
26757
|
fi as q,
|
|
@@ -26761,7 +26761,7 @@ export {
|
|
|
26761
26761
|
lr as u,
|
|
26762
26762
|
ce as v,
|
|
26763
26763
|
Pe as w,
|
|
26764
|
-
|
|
26764
|
+
N0 as x,
|
|
26765
26765
|
Ee as y,
|
|
26766
26766
|
q0 as z
|
|
26767
26767
|
};
|