@roomle/web-sdk 3.6.0 → 3.7.0-alpha.1
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/lib/{BufferGeometry-DLEagG41.mjs → BufferGeometry-BLeRuMkh.mjs} +1 -1
- package/lib/{BufferGeometry-DLEagG41.mjs.map → BufferGeometry-BLeRuMkh.mjs.map} +1 -1
- package/lib/ConfiguratorKernel.js +54 -73
- package/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/{GLTFExporter-D8qsdwDK.mjs → GLTFExporter-CFXCqoLa.mjs} +141 -141
- package/lib/{GLTFExporter-D8qsdwDK.mjs.map → GLTFExporter-CFXCqoLa.mjs.map} +1 -1
- package/lib/{PointLightHelper-BnjxGaOG.mjs → PointLightHelper-BEJEy6l_.mjs} +2 -2
- package/lib/{PointLightHelper-BnjxGaOG.mjs.map → PointLightHelper-BEJEy6l_.mjs.map} +1 -1
- package/lib/RoomleCore.js +59 -79
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.js +54 -74
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{SpotLightHelper-DqsfqCrs.mjs → SpotLightHelper-aXFW8qaJ.mjs} +2 -2
- package/lib/{SpotLightHelper-DqsfqCrs.mjs.map → SpotLightHelper-aXFW8qaJ.mjs.map} +1 -1
- package/lib/{USDZExporter-DxIqi8St.mjs → USDZExporter-B4hsiwhd.mjs} +2 -2
- package/lib/{USDZExporter-DxIqi8St.mjs.map → USDZExporter-B4hsiwhd.mjs.map} +1 -1
- package/lib/{api-xDJ-Uyom.mjs → api-C2-6Jm5W.mjs} +2 -2
- package/lib/{api-xDJ-Uyom.mjs.map → api-C2-6Jm5W.mjs.map} +1 -1
- package/lib/{banana-for-scale-C_iNmlCT.mjs → banana-for-scale-BV_na-g3.mjs} +4 -4
- package/lib/banana-for-scale-BV_na-g3.mjs.map +1 -0
- package/lib/chunk-C97zSiVS.mjs +20 -0
- package/lib/{common-utils-DMSTohiS.mjs → common-utils-qErzZAiR.mjs} +2 -2
- package/lib/common-utils-qErzZAiR.mjs.map +1 -0
- package/lib/{component-dimensioning-CvRmUja4.mjs → component-dimensioning-DCQTqssC.mjs} +49 -49
- package/lib/{component-dimensioning-CvRmUja4.mjs.map → component-dimensioning-DCQTqssC.mjs.map} +1 -1
- package/lib/{component-raycast-helper-CEp7wy9c.mjs → component-raycast-helper-B3WXp3oq.mjs} +20 -24
- package/lib/component-raycast-helper-B3WXp3oq.mjs.map +1 -0
- package/lib/configurator-CrNkzBp9.mjs +2 -0
- package/lib/configurator-Dx6kcXY_.mjs +45 -0
- package/lib/{configurator-CmuhFgC9.mjs.map → configurator-Dx6kcXY_.mjs.map} +1 -1
- package/lib/{continuous-drawing-helper-v_5UAM9A.mjs → continuous-drawing-helper-DzULJ9d1.mjs} +12 -12
- package/lib/continuous-drawing-helper-DzULJ9d1.mjs.map +1 -0
- package/lib/{decorate-C1QnXPYw.mjs → decorate-BIflHDAa.mjs} +1 -1
- package/lib/{decorate-C1QnXPYw.mjs.map → decorate-BIflHDAa.mjs.map} +1 -1
- package/lib/{dimensioning-helper-Fwpt1HTT.mjs → dimensioning-helper-Cj20VTW0.mjs} +66 -57
- package/lib/{dimensioning-helper-Fwpt1HTT.mjs.map → dimensioning-helper-Cj20VTW0.mjs.map} +1 -1
- package/lib/{glb-viewer-BzNA9-zH.mjs → glb-viewer-BqFcaUlb.mjs} +52 -52
- package/lib/glb-viewer-BqFcaUlb.mjs.map +1 -0
- package/lib/glb-viewer-FYw7R-ya.mjs +2 -0
- package/lib/{homag-intelligence-BwGjJEws.mjs → homag-intelligence-Dkz0AhB4.mjs} +3 -3
- package/lib/{homag-intelligence-BwGjJEws.mjs.map → homag-intelligence-Dkz0AhB4.mjs.map} +1 -1
- package/lib/{imos-ix-poc-export-helper-CQh94HsO.mjs → imos-ix-poc-export-helper-BjIgAfUu.mjs} +4 -3
- package/lib/imos-ix-poc-export-helper-BjIgAfUu.mjs.map +1 -0
- package/lib/kernel-BAQSG9r5.mjs.map +1 -1
- package/lib/{kernel-utils-H74uNY1h.mjs → kernel-utils-CfGzR_WC.mjs} +15 -15
- package/lib/{kernel-utils-H74uNY1h.mjs.map → kernel-utils-CfGzR_WC.mjs.map} +1 -1
- package/lib/{layer-C_JtkhdO.mjs → layer-CFAr2mK_.mjs} +1 -1
- package/lib/{layer-C_JtkhdO.mjs.map → layer-CFAr2mK_.mjs.map} +1 -1
- package/lib/{main-CtVIB52l.mjs → main-DMIVdAcT.mjs} +14471 -14300
- package/lib/main-DMIVdAcT.mjs.map +1 -0
- package/lib/{material-viewer-Bq4smZ6f.mjs → material-viewer-BkwvhHbQ.mjs} +40 -40
- package/lib/material-viewer-BkwvhHbQ.mjs.map +1 -0
- package/lib/planner-BPlxsTRJ.mjs +44 -0
- package/lib/{planner-CVw_xzGh.mjs.map → planner-BPlxsTRJ.mjs.map} +1 -1
- package/lib/planner-oj08ktHE.mjs +2 -0
- package/lib/{plugin-system-D9K46xJk.mjs → plugin-system-XhOJU1MI.mjs} +3 -3
- package/lib/{plugin-system-D9K46xJk.mjs.map → plugin-system-XhOJU1MI.mjs.map} +1 -1
- package/lib/roomle-renderer-BwPvUqSW.mjs +49 -0
- package/lib/roomle-renderer-BwPvUqSW.mjs.map +1 -0
- package/lib/roomle-sdk.d.ts +114 -1116
- package/lib/roomle-sdk.js +6 -6
- package/lib/roomle-webgpu-renderer-CSC5zFdC.mjs +217 -0
- package/lib/roomle-webgpu-renderer-CSC5zFdC.mjs.map +1 -0
- package/lib/{scene-renderer-D8HkTFeZ.mjs → scene-renderer-DWY_zPvU.mjs} +496 -513
- package/lib/scene-renderer-DWY_zPvU.mjs.map +1 -0
- package/lib/{script-loader-D8xCRzTr.mjs → script-loader-CA-XHFKN.mjs} +3 -3
- package/lib/{script-loader-D8xCRzTr.mjs.map → script-loader-CA-XHFKN.mjs.map} +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +0 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +3 -3
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.js +54 -73
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js +59 -79
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.js +54 -74
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/{stats-helper-HM0TaIM5.mjs → stats-helper-C954Cfgh.mjs} +4 -3
- package/lib/{stats-helper-HM0TaIM5.mjs.map → stats-helper-C954Cfgh.mjs.map} +1 -1
- package/lib/{three.core-CLIofecG.mjs → three.core-mM-jZdgg.mjs} +926 -926
- package/lib/{three.core-CLIofecG.mjs.map → three.core-mM-jZdgg.mjs.map} +1 -1
- package/lib/{three.module-C4Q1skJQ.mjs → three.module-Bmy3sVQ-.mjs} +1210 -1210
- package/lib/{three.module-C4Q1skJQ.mjs.map → three.module-Bmy3sVQ-.mjs.map} +1 -1
- package/lib/{three.webgpu-dFspy2yF.mjs → three.webgpu-0l2TztLa.mjs} +5355 -2935
- package/lib/{three.webgpu-dFspy2yF.mjs.map → three.webgpu-0l2TztLa.mjs.map} +1 -1
- package/lib/{threejs-utils-jEzvlJF1.mjs → threejs-utils-8zlxt158.mjs} +430 -431
- package/lib/threejs-utils-8zlxt158.mjs.map +1 -0
- package/lib/{tools-core-Bf9WsK5v.mjs → tools-core-BzhFD2Wk.mjs} +3 -3
- package/lib/{tools-core-Bf9WsK5v.mjs.map → tools-core-BzhFD2Wk.mjs.map} +1 -1
- package/package.json +1 -1
- package/lib/banana-for-scale-C_iNmlCT.mjs.map +0 -1
- package/lib/common-utils-DMSTohiS.mjs.map +0 -1
- package/lib/component-raycast-helper-CEp7wy9c.mjs.map +0 -1
- package/lib/configurator-BaUt4_LF.mjs +0 -2
- package/lib/configurator-CmuhFgC9.mjs +0 -45
- package/lib/continuous-drawing-helper-v_5UAM9A.mjs.map +0 -1
- package/lib/dimensioning-helper-DTcW85Oq.mjs +0 -2
- package/lib/glb-viewer-BzNA9-zH.mjs.map +0 -1
- package/lib/glb-viewer-DOxBD5k-.mjs +0 -2
- package/lib/imos-ix-poc-export-helper-CQh94HsO.mjs.map +0 -1
- package/lib/main-CtVIB52l.mjs.map +0 -1
- package/lib/material-viewer-Bq4smZ6f.mjs.map +0 -1
- package/lib/planner-CVw_xzGh.mjs +0 -44
- package/lib/planner-si70gWA2.mjs +0 -2
- package/lib/scene-renderer-D8HkTFeZ.mjs.map +0 -1
- package/lib/threejs-utils-jEzvlJF1.mjs.map +0 -1
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var e = "attached", t =
|
|
1
|
+
var e = "attached", t = "detached", n = 1e3, r = 1001, i = 1002, a = 1003, o = 1004, s = 1005, c = 1006, l = 1007, u = 1008, d = 1008, f = 1009, p = 1010, m = 1011, h = 1012, g = 1013, _ = 1014, v = 1015, y = 1016, b = 1017, x = 1018, S = 1020, C = 35902, w = 35899, T = 1021, E = 1022, D = 1023, ee = 1026, te = 1027, O = 1028, ne = 1029, re = 1030, ie = 1031, ae = 1032, oe = 1033, se = 33776, ce = 33777, le = 33778, ue = 33779, de = 35840, fe = 35841, pe = 35842, me = 35843, he = 36196, ge = 37492, _e = 37496, ve = 37488, ye = 37489, be = 37490, xe = 37491, Se = 37808, Ce = 37809, we = 37810, Te = 37811, Ee = 37812, De = 37813, Oe = 37814, ke = 37815, Ae = 37816, je = 37817, Me = 37818, Ne = 37819, Pe = 37820, Fe = 37821, Ie = 36492, Le = 36494, Re = 36495, ze = 36283, Be = 36284, Ve = 36285, He = 36286, Ue = 2300, We = 2301, Ge = 2302, Ke = 2303, qe = 2400, Je = 2401, Ye = 2402, Xe = 2500, Ze = 3200, Qe = "srgb", $e = "srgb-linear", et = "linear", tt = "srgb", nt = 7680, rt = 7681, it = 7682, at = 7683, ot = 34055, st = 34056, ct = 5386, lt = 35044, ut = 35048, dt = "300 es", ft = 2e3, pt = 2001, mt = {
|
|
2
2
|
COMPUTE: "compute",
|
|
3
3
|
RENDER: "render"
|
|
4
|
-
},
|
|
5
|
-
function
|
|
4
|
+
}, ht = { TEXTURE_COMPARE: "depthTextureCompare" };
|
|
5
|
+
function gt(e) {
|
|
6
6
|
for (let t = e.length - 1; t >= 0; --t) if (e[t] >= 65535) return !0;
|
|
7
7
|
return !1;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function _t(e) {
|
|
10
10
|
return ArrayBuffer.isView(e) && !(e instanceof DataView);
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function vt(e) {
|
|
13
13
|
return document.createElementNS("http://www.w3.org/1999/xhtml", e);
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
let e =
|
|
15
|
+
function yt() {
|
|
16
|
+
let e = vt("canvas");
|
|
17
17
|
return e.style.display = "block", e;
|
|
18
18
|
}
|
|
19
|
-
var
|
|
20
|
-
function
|
|
19
|
+
var bt = {}, xt = null;
|
|
20
|
+
function St(...e) {
|
|
21
21
|
let t = "THREE." + e.shift();
|
|
22
|
-
|
|
22
|
+
xt ? xt("log", t, ...e) : console.log(t, ...e);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function Ct(e) {
|
|
25
25
|
let t = e[0];
|
|
26
26
|
if (typeof t == "string" && t.startsWith("TSL:")) {
|
|
27
27
|
let t = e[1];
|
|
@@ -30,28 +30,28 @@ function xt(e) {
|
|
|
30
30
|
return e;
|
|
31
31
|
}
|
|
32
32
|
function k(...e) {
|
|
33
|
-
e =
|
|
33
|
+
e = Ct(e);
|
|
34
34
|
let t = "THREE." + e.shift();
|
|
35
|
-
if (
|
|
35
|
+
if (xt) xt("warn", t, ...e);
|
|
36
36
|
else {
|
|
37
37
|
let n = e[0];
|
|
38
38
|
n && n.isStackTrace ? console.warn(n.getError(t)) : console.warn(t, ...e);
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
function A(...e) {
|
|
42
|
-
e =
|
|
42
|
+
e = Ct(e);
|
|
43
43
|
let t = "THREE." + e.shift();
|
|
44
|
-
if (
|
|
44
|
+
if (xt) xt("error", t, ...e);
|
|
45
45
|
else {
|
|
46
46
|
let n = e[0];
|
|
47
47
|
n && n.isStackTrace ? console.error(n.getError(t)) : console.error(t, ...e);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function wt(...e) {
|
|
51
51
|
let t = e.join(" ");
|
|
52
|
-
t in
|
|
52
|
+
t in bt || (bt[t] = !0, k(...e));
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Tt(e, t, n) {
|
|
55
55
|
return new Promise(function(r, i) {
|
|
56
56
|
function a() {
|
|
57
57
|
switch (e.clientWaitSync(t, e.SYNC_FLUSH_COMMANDS_BIT, 0)) {
|
|
@@ -67,7 +67,7 @@ function Ct(e, t, n) {
|
|
|
67
67
|
setTimeout(a, n);
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
var
|
|
70
|
+
var Et = {
|
|
71
71
|
0: 1,
|
|
72
72
|
2: 6,
|
|
73
73
|
4: 7,
|
|
@@ -76,7 +76,7 @@ var wt = {
|
|
|
76
76
|
6: 2,
|
|
77
77
|
7: 4,
|
|
78
78
|
5: 3
|
|
79
|
-
},
|
|
79
|
+
}, Dt = class {
|
|
80
80
|
addEventListener(e, t) {
|
|
81
81
|
this._listeners === void 0 && (this._listeners = {});
|
|
82
82
|
let n = this._listeners;
|
|
@@ -106,68 +106,68 @@ var wt = {
|
|
|
106
106
|
e.target = null;
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
}, j = /* @__PURE__ */ "00.01.02.03.04.05.06.07.08.09.0a.0b.0c.0d.0e.0f.10.11.12.13.14.15.16.17.18.19.1a.1b.1c.1d.1e.1f.20.21.22.23.24.25.26.27.28.29.2a.2b.2c.2d.2e.2f.30.31.32.33.34.35.36.37.38.39.3a.3b.3c.3d.3e.3f.40.41.42.43.44.45.46.47.48.49.4a.4b.4c.4d.4e.4f.50.51.52.53.54.55.56.57.58.59.5a.5b.5c.5d.5e.5f.60.61.62.63.64.65.66.67.68.69.6a.6b.6c.6d.6e.6f.70.71.72.73.74.75.76.77.78.79.7a.7b.7c.7d.7e.7f.80.81.82.83.84.85.86.87.88.89.8a.8b.8c.8d.8e.8f.90.91.92.93.94.95.96.97.98.99.9a.9b.9c.9d.9e.9f.a0.a1.a2.a3.a4.a5.a6.a7.a8.a9.aa.ab.ac.ad.ae.af.b0.b1.b2.b3.b4.b5.b6.b7.b8.b9.ba.bb.bc.bd.be.bf.c0.c1.c2.c3.c4.c5.c6.c7.c8.c9.ca.cb.cc.cd.ce.cf.d0.d1.d2.d3.d4.d5.d6.d7.d8.d9.da.db.dc.dd.de.df.e0.e1.e2.e3.e4.e5.e6.e7.e8.e9.ea.eb.ec.ed.ee.ef.f0.f1.f2.f3.f4.f5.f6.f7.f8.f9.fa.fb.fc.fd.fe.ff".split("."),
|
|
110
|
-
function
|
|
109
|
+
}, j = /* @__PURE__ */ "00.01.02.03.04.05.06.07.08.09.0a.0b.0c.0d.0e.0f.10.11.12.13.14.15.16.17.18.19.1a.1b.1c.1d.1e.1f.20.21.22.23.24.25.26.27.28.29.2a.2b.2c.2d.2e.2f.30.31.32.33.34.35.36.37.38.39.3a.3b.3c.3d.3e.3f.40.41.42.43.44.45.46.47.48.49.4a.4b.4c.4d.4e.4f.50.51.52.53.54.55.56.57.58.59.5a.5b.5c.5d.5e.5f.60.61.62.63.64.65.66.67.68.69.6a.6b.6c.6d.6e.6f.70.71.72.73.74.75.76.77.78.79.7a.7b.7c.7d.7e.7f.80.81.82.83.84.85.86.87.88.89.8a.8b.8c.8d.8e.8f.90.91.92.93.94.95.96.97.98.99.9a.9b.9c.9d.9e.9f.a0.a1.a2.a3.a4.a5.a6.a7.a8.a9.aa.ab.ac.ad.ae.af.b0.b1.b2.b3.b4.b5.b6.b7.b8.b9.ba.bb.bc.bd.be.bf.c0.c1.c2.c3.c4.c5.c6.c7.c8.c9.ca.cb.cc.cd.ce.cf.d0.d1.d2.d3.d4.d5.d6.d7.d8.d9.da.db.dc.dd.de.df.e0.e1.e2.e3.e4.e5.e6.e7.e8.e9.ea.eb.ec.ed.ee.ef.f0.f1.f2.f3.f4.f5.f6.f7.f8.f9.fa.fb.fc.fd.fe.ff".split("."), Ot = 1234567, kt = Math.PI / 180, At = 180 / Math.PI;
|
|
110
|
+
function jt() {
|
|
111
111
|
let e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, n = Math.random() * 4294967295 | 0, r = Math.random() * 4294967295 | 0;
|
|
112
112
|
return (j[e & 255] + j[e >> 8 & 255] + j[e >> 16 & 255] + j[e >> 24 & 255] + "-" + j[t & 255] + j[t >> 8 & 255] + "-" + j[t >> 16 & 15 | 64] + j[t >> 24 & 255] + "-" + j[n & 63 | 128] + j[n >> 8 & 255] + "-" + j[n >> 16 & 255] + j[n >> 24 & 255] + j[r & 255] + j[r >> 8 & 255] + j[r >> 16 & 255] + j[r >> 24 & 255]).toLowerCase();
|
|
113
113
|
}
|
|
114
114
|
function M(e, t, n) {
|
|
115
115
|
return Math.max(t, Math.min(n, e));
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Mt(e, t) {
|
|
118
118
|
return (e % t + t) % t;
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Nt(e, t, n, r, i) {
|
|
121
121
|
return r + (e - t) * (i - r) / (n - t);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function Pt(e, t, n) {
|
|
124
124
|
return e === t ? 0 : (n - e) / (t - e);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Ft(e, t, n) {
|
|
127
127
|
return (1 - n) * e + n * t;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
return
|
|
129
|
+
function It(e, t, n, r) {
|
|
130
|
+
return Ft(e, t, 1 - Math.exp(-n * r));
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
return t - Math.abs(
|
|
132
|
+
function Lt(e, t = 1) {
|
|
133
|
+
return t - Math.abs(Mt(e, t * 2) - t);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Rt(e, t, n) {
|
|
136
136
|
return e <= t ? 0 : e >= n ? 1 : (e = (e - t) / (n - t), e * e * (3 - 2 * e));
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function zt(e, t, n) {
|
|
139
139
|
return e <= t ? 0 : e >= n ? 1 : (e = (e - t) / (n - t), e * e * e * (e * (e * 6 - 15) + 10));
|
|
140
140
|
}
|
|
141
|
-
function
|
|
141
|
+
function Bt(e, t) {
|
|
142
142
|
return e + Math.floor(Math.random() * (t - e + 1));
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function Vt(e, t) {
|
|
145
145
|
return e + Math.random() * (t - e);
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function Ht(e) {
|
|
148
148
|
return e * (.5 - Math.random());
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
e !== void 0 && (
|
|
152
|
-
let t =
|
|
150
|
+
function Ut(e) {
|
|
151
|
+
e !== void 0 && (Ot = e);
|
|
152
|
+
let t = Ot += 1831565813;
|
|
153
153
|
return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
return e *
|
|
155
|
+
function Wt(e) {
|
|
156
|
+
return e * kt;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
return e *
|
|
158
|
+
function Gt(e) {
|
|
159
|
+
return e * At;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Kt(e) {
|
|
162
162
|
return (e & e - 1) == 0 && e !== 0;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function qt(e) {
|
|
165
165
|
return 2 ** Math.ceil(Math.log(e) / Math.LN2);
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function Jt(e) {
|
|
168
168
|
return 2 ** Math.floor(Math.log(e) / Math.LN2);
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function Yt(e, t, n, r, i) {
|
|
171
171
|
let a = Math.cos, o = Math.sin, s = a(n / 2), c = o(n / 2), l = a((t + r) / 2), u = o((t + r) / 2), d = a((t - r) / 2), f = o((t - r) / 2), p = a((r - t) / 2), m = o((r - t) / 2);
|
|
172
172
|
switch (i) {
|
|
173
173
|
case "XYX":
|
|
@@ -215,29 +215,29 @@ function P(e, t) {
|
|
|
215
215
|
default: throw Error("Invalid component type.");
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
var
|
|
219
|
-
DEG2RAD:
|
|
220
|
-
RAD2DEG:
|
|
221
|
-
generateUUID:
|
|
218
|
+
var Xt = {
|
|
219
|
+
DEG2RAD: kt,
|
|
220
|
+
RAD2DEG: At,
|
|
221
|
+
generateUUID: jt,
|
|
222
222
|
clamp: M,
|
|
223
|
-
euclideanModulo:
|
|
224
|
-
mapLinear:
|
|
225
|
-
inverseLerp:
|
|
226
|
-
lerp:
|
|
227
|
-
damp:
|
|
228
|
-
pingpong:
|
|
229
|
-
smoothstep:
|
|
230
|
-
smootherstep:
|
|
231
|
-
randInt:
|
|
232
|
-
randFloat:
|
|
233
|
-
randFloatSpread:
|
|
234
|
-
seededRandom:
|
|
235
|
-
degToRad:
|
|
236
|
-
radToDeg:
|
|
237
|
-
isPowerOfTwo:
|
|
238
|
-
ceilPowerOfTwo:
|
|
239
|
-
floorPowerOfTwo:
|
|
240
|
-
setQuaternionFromProperEuler:
|
|
223
|
+
euclideanModulo: Mt,
|
|
224
|
+
mapLinear: Nt,
|
|
225
|
+
inverseLerp: Pt,
|
|
226
|
+
lerp: Ft,
|
|
227
|
+
damp: It,
|
|
228
|
+
pingpong: Lt,
|
|
229
|
+
smoothstep: Rt,
|
|
230
|
+
smootherstep: zt,
|
|
231
|
+
randInt: Bt,
|
|
232
|
+
randFloat: Vt,
|
|
233
|
+
randFloatSpread: Ht,
|
|
234
|
+
seededRandom: Ut,
|
|
235
|
+
degToRad: Wt,
|
|
236
|
+
radToDeg: Gt,
|
|
237
|
+
isPowerOfTwo: Kt,
|
|
238
|
+
ceilPowerOfTwo: qt,
|
|
239
|
+
floorPowerOfTwo: Jt,
|
|
240
|
+
setQuaternionFromProperEuler: Yt,
|
|
241
241
|
normalize: P,
|
|
242
242
|
denormalize: N
|
|
243
243
|
}, F = class e {
|
|
@@ -429,7 +429,7 @@ var Jt = {
|
|
|
429
429
|
*[Symbol.iterator]() {
|
|
430
430
|
yield this.x, yield this.y;
|
|
431
431
|
}
|
|
432
|
-
},
|
|
432
|
+
}, Zt = class {
|
|
433
433
|
constructor(e = 0, t = 0, n = 0, r = 1) {
|
|
434
434
|
this.isQuaternion = !0, this._x = e, this._y = t, this._z = n, this._w = r;
|
|
435
435
|
}
|
|
@@ -696,10 +696,10 @@ var Jt = {
|
|
|
696
696
|
return this.x = e.x * t.x, this.y = e.y * t.y, this.z = e.z * t.z, this;
|
|
697
697
|
}
|
|
698
698
|
applyEuler(e) {
|
|
699
|
-
return this.applyQuaternion(
|
|
699
|
+
return this.applyQuaternion($t.setFromEuler(e));
|
|
700
700
|
}
|
|
701
701
|
applyAxisAngle(e, t) {
|
|
702
|
-
return this.applyQuaternion(
|
|
702
|
+
return this.applyQuaternion($t.setFromAxisAngle(e, t));
|
|
703
703
|
}
|
|
704
704
|
applyMatrix3(e) {
|
|
705
705
|
let t = this.x, n = this.y, r = this.z, i = e.elements;
|
|
@@ -801,10 +801,10 @@ var Jt = {
|
|
|
801
801
|
return this.copy(e).multiplyScalar(n);
|
|
802
802
|
}
|
|
803
803
|
projectOnPlane(e) {
|
|
804
|
-
return
|
|
804
|
+
return Qt.copy(this).projectOnVector(e), this.sub(Qt);
|
|
805
805
|
}
|
|
806
806
|
reflect(e) {
|
|
807
|
-
return this.sub(
|
|
807
|
+
return this.sub(Qt.copy(e).multiplyScalar(2 * this.dot(e)));
|
|
808
808
|
}
|
|
809
809
|
angleTo(e) {
|
|
810
810
|
let t = Math.sqrt(this.lengthSq() * e.lengthSq());
|
|
@@ -877,7 +877,7 @@ var Jt = {
|
|
|
877
877
|
*[Symbol.iterator]() {
|
|
878
878
|
yield this.x, yield this.y, yield this.z;
|
|
879
879
|
}
|
|
880
|
-
},
|
|
880
|
+
}, Qt = /* @__PURE__ */ new I(), $t = /* @__PURE__ */ new Zt(), en = class e {
|
|
881
881
|
constructor(t, n, r, i, a, o, s, c, l) {
|
|
882
882
|
e.prototype.isMatrix3 = !0, this.elements = [
|
|
883
883
|
1,
|
|
@@ -949,13 +949,13 @@ var Jt = {
|
|
|
949
949
|
return this.set(n * s, n * c, -n * (s * a + c * o) + a + e, -r * c, r * s, -r * (-c * a + s * o) + o + t, 0, 0, 1), this;
|
|
950
950
|
}
|
|
951
951
|
scale(e, t) {
|
|
952
|
-
return this.premultiply(
|
|
952
|
+
return this.premultiply(tn.makeScale(e, t)), this;
|
|
953
953
|
}
|
|
954
954
|
rotate(e) {
|
|
955
|
-
return this.premultiply(
|
|
955
|
+
return this.premultiply(tn.makeRotation(-e)), this;
|
|
956
956
|
}
|
|
957
957
|
translate(e, t) {
|
|
958
|
-
return this.premultiply(
|
|
958
|
+
return this.premultiply(tn.makeTranslation(e, t)), this;
|
|
959
959
|
}
|
|
960
960
|
makeTranslation(e, t) {
|
|
961
961
|
return e.isVector2 ? this.set(1, 0, e.x, 0, 1, e.y, 0, 0, 1) : this.set(1, 0, e, 0, 1, t, 0, 0, 1), this;
|
|
@@ -983,14 +983,14 @@ var Jt = {
|
|
|
983
983
|
clone() {
|
|
984
984
|
return new this.constructor().fromArray(this.elements);
|
|
985
985
|
}
|
|
986
|
-
},
|
|
987
|
-
function
|
|
986
|
+
}, tn = /* @__PURE__ */ new en(), nn = /* @__PURE__ */ new en().set(.4123908, .3575843, .1804808, .212639, .7151687, .0721923, .0193308, .1191948, .9505322), rn = /* @__PURE__ */ new en().set(3.2409699, -1.5373832, -.4986108, -.9692436, 1.8759675, .0415551, .0556301, -.203977, 1.0569715);
|
|
987
|
+
function an() {
|
|
988
988
|
let e = {
|
|
989
989
|
enabled: !0,
|
|
990
|
-
workingColorSpace:
|
|
990
|
+
workingColorSpace: $e,
|
|
991
991
|
spaces: {},
|
|
992
992
|
convert: function(e, t, n) {
|
|
993
|
-
return this.enabled === !1 || t === n || !t || !n ? e : (this.spaces[t].transfer === "srgb" && (e.r =
|
|
993
|
+
return this.enabled === !1 || t === n || !t || !n ? e : (this.spaces[t].transfer === "srgb" && (e.r = on(e.r), e.g = on(e.g), e.b = on(e.b)), this.spaces[t].primaries !== this.spaces[n].primaries && (e.applyMatrix3(this.spaces[t].toXYZ), e.applyMatrix3(this.spaces[n].fromXYZ)), this.spaces[n].transfer === "srgb" && (e.r = sn(e.r), e.g = sn(e.g), e.b = sn(e.b)), e);
|
|
994
994
|
},
|
|
995
995
|
workingToColorSpace: function(e, t) {
|
|
996
996
|
return this.convert(e, this.workingColorSpace, t);
|
|
@@ -1002,7 +1002,7 @@ function nn() {
|
|
|
1002
1002
|
return this.spaces[e].primaries;
|
|
1003
1003
|
},
|
|
1004
1004
|
getTransfer: function(e) {
|
|
1005
|
-
return e === "" ?
|
|
1005
|
+
return e === "" ? et : this.spaces[e].transfer;
|
|
1006
1006
|
},
|
|
1007
1007
|
getToneMappingMode: function(e) {
|
|
1008
1008
|
return this.spaces[e].outputColorSpaceConfig.toneMappingMode || "standard";
|
|
@@ -1023,10 +1023,10 @@ function nn() {
|
|
|
1023
1023
|
return this.spaces[e].workingColorSpaceConfig.unpackColorSpace;
|
|
1024
1024
|
},
|
|
1025
1025
|
fromWorkingColorSpace: function(t, n) {
|
|
1026
|
-
return
|
|
1026
|
+
return wt("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."), e.workingToColorSpace(t, n);
|
|
1027
1027
|
},
|
|
1028
1028
|
toWorkingColorSpace: function(t, n) {
|
|
1029
|
-
return
|
|
1029
|
+
return wt("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."), e.colorSpaceToWorking(t, n);
|
|
1030
1030
|
}
|
|
1031
1031
|
}, t = [
|
|
1032
1032
|
.64,
|
|
@@ -1041,58 +1041,58 @@ function nn() {
|
|
|
1041
1041
|
.0722
|
|
1042
1042
|
], r = [.3127, .329];
|
|
1043
1043
|
return e.define({
|
|
1044
|
-
[
|
|
1044
|
+
[$e]: {
|
|
1045
1045
|
primaries: t,
|
|
1046
1046
|
whitePoint: r,
|
|
1047
|
-
transfer:
|
|
1048
|
-
toXYZ:
|
|
1049
|
-
fromXYZ:
|
|
1047
|
+
transfer: et,
|
|
1048
|
+
toXYZ: nn,
|
|
1049
|
+
fromXYZ: rn,
|
|
1050
1050
|
luminanceCoefficients: n,
|
|
1051
|
-
workingColorSpaceConfig: { unpackColorSpace:
|
|
1052
|
-
outputColorSpaceConfig: { drawingBufferColorSpace:
|
|
1051
|
+
workingColorSpaceConfig: { unpackColorSpace: Qe },
|
|
1052
|
+
outputColorSpaceConfig: { drawingBufferColorSpace: Qe }
|
|
1053
1053
|
},
|
|
1054
|
-
[
|
|
1054
|
+
[Qe]: {
|
|
1055
1055
|
primaries: t,
|
|
1056
1056
|
whitePoint: r,
|
|
1057
|
-
transfer:
|
|
1058
|
-
toXYZ:
|
|
1059
|
-
fromXYZ:
|
|
1057
|
+
transfer: tt,
|
|
1058
|
+
toXYZ: nn,
|
|
1059
|
+
fromXYZ: rn,
|
|
1060
1060
|
luminanceCoefficients: n,
|
|
1061
|
-
outputColorSpaceConfig: { drawingBufferColorSpace:
|
|
1061
|
+
outputColorSpaceConfig: { drawingBufferColorSpace: Qe }
|
|
1062
1062
|
}
|
|
1063
1063
|
}), e;
|
|
1064
1064
|
}
|
|
1065
|
-
var L = /* @__PURE__ */
|
|
1066
|
-
function
|
|
1065
|
+
var L = /* @__PURE__ */ an();
|
|
1066
|
+
function on(e) {
|
|
1067
1067
|
return e < .04045 ? e * .0773993808 : (e * .9478672986 + .0521327014) ** 2.4;
|
|
1068
1068
|
}
|
|
1069
|
-
function
|
|
1069
|
+
function sn(e) {
|
|
1070
1070
|
return e < .0031308 ? e * 12.92 : 1.055 * e ** .41666 - .055;
|
|
1071
1071
|
}
|
|
1072
|
-
var
|
|
1072
|
+
var cn, ln = class {
|
|
1073
1073
|
static getDataURL(e, t = "image/png") {
|
|
1074
1074
|
if (/^data:/i.test(e.src) || typeof HTMLCanvasElement > "u") return e.src;
|
|
1075
1075
|
let n;
|
|
1076
1076
|
if (e instanceof HTMLCanvasElement) n = e;
|
|
1077
1077
|
else {
|
|
1078
|
-
|
|
1079
|
-
let t =
|
|
1080
|
-
e instanceof ImageData ? t.putImageData(e, 0, 0) : t.drawImage(e, 0, 0, e.width, e.height), n =
|
|
1078
|
+
cn === void 0 && (cn = vt("canvas")), cn.width = e.width, cn.height = e.height;
|
|
1079
|
+
let t = cn.getContext("2d");
|
|
1080
|
+
e instanceof ImageData ? t.putImageData(e, 0, 0) : t.drawImage(e, 0, 0, e.width, e.height), n = cn;
|
|
1081
1081
|
}
|
|
1082
1082
|
return n.toDataURL(t);
|
|
1083
1083
|
}
|
|
1084
1084
|
static sRGBToLinear(e) {
|
|
1085
1085
|
if (typeof HTMLImageElement < "u" && e instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap) {
|
|
1086
|
-
let t =
|
|
1086
|
+
let t = vt("canvas");
|
|
1087
1087
|
t.width = e.width, t.height = e.height;
|
|
1088
1088
|
let n = t.getContext("2d");
|
|
1089
1089
|
n.drawImage(e, 0, 0, e.width, e.height);
|
|
1090
1090
|
let r = n.getImageData(0, 0, e.width, e.height), i = r.data;
|
|
1091
|
-
for (let e = 0; e < i.length; e++) i[e] =
|
|
1091
|
+
for (let e = 0; e < i.length; e++) i[e] = on(i[e] / 255) * 255;
|
|
1092
1092
|
return n.putImageData(r, 0, 0), t;
|
|
1093
1093
|
} else if (e.data) {
|
|
1094
1094
|
let t = e.data.slice(0);
|
|
1095
|
-
for (let e = 0; e < t.length; e++) t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[e] = Math.floor(
|
|
1095
|
+
for (let e = 0; e < t.length; e++) t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[e] = Math.floor(on(t[e] / 255) * 255) : t[e] = on(t[e]);
|
|
1096
1096
|
return {
|
|
1097
1097
|
data: t,
|
|
1098
1098
|
width: e.width,
|
|
@@ -1100,9 +1100,9 @@ var on, sn = class {
|
|
|
1100
1100
|
};
|
|
1101
1101
|
} else return k("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."), e;
|
|
1102
1102
|
}
|
|
1103
|
-
},
|
|
1103
|
+
}, un = 0, dn = class {
|
|
1104
1104
|
constructor(e = null) {
|
|
1105
|
-
this.isSource = !0, Object.defineProperty(this, "id", { value:
|
|
1105
|
+
this.isSource = !0, Object.defineProperty(this, "id", { value: un++ }), this.uuid = jt(), this.data = e, this.dataReady = !0, this.version = 0;
|
|
1106
1106
|
}
|
|
1107
1107
|
getSize(e) {
|
|
1108
1108
|
let t = this.data;
|
|
@@ -1122,33 +1122,33 @@ var on, sn = class {
|
|
|
1122
1122
|
let e;
|
|
1123
1123
|
if (Array.isArray(r)) {
|
|
1124
1124
|
e = [];
|
|
1125
|
-
for (let t = 0, n = r.length; t < n; t++) r[t].isDataTexture ? e.push(
|
|
1126
|
-
} else e =
|
|
1125
|
+
for (let t = 0, n = r.length; t < n; t++) r[t].isDataTexture ? e.push(fn(r[t].image)) : e.push(fn(r[t]));
|
|
1126
|
+
} else e = fn(r);
|
|
1127
1127
|
n.url = e;
|
|
1128
1128
|
}
|
|
1129
1129
|
return t || (e.images[this.uuid] = n), n;
|
|
1130
1130
|
}
|
|
1131
1131
|
};
|
|
1132
|
-
function
|
|
1133
|
-
return typeof HTMLImageElement < "u" && e instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap ?
|
|
1132
|
+
function fn(e) {
|
|
1133
|
+
return typeof HTMLImageElement < "u" && e instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap ? ln.getDataURL(e) : e.data ? {
|
|
1134
1134
|
data: Array.from(e.data),
|
|
1135
1135
|
width: e.width,
|
|
1136
1136
|
height: e.height,
|
|
1137
1137
|
type: e.data.constructor.name
|
|
1138
1138
|
} : (k("Texture: Unable to serialize Texture."), {});
|
|
1139
1139
|
}
|
|
1140
|
-
var
|
|
1141
|
-
constructor(t = e.DEFAULT_IMAGE,
|
|
1142
|
-
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value:
|
|
1140
|
+
var pn = 0, mn = /* @__PURE__ */ new I(), R = class e extends Dt {
|
|
1141
|
+
constructor(t = e.DEFAULT_IMAGE, n = e.DEFAULT_MAPPING, i = r, a = r, o = c, s = u, l = D, d = f, p = e.DEFAULT_ANISOTROPY, m = "") {
|
|
1142
|
+
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: pn++ }), this.uuid = jt(), this.name = "", this.source = new dn(t), this.mipmaps = [], this.mapping = n, this.channel = 0, this.wrapS = i, this.wrapT = a, this.magFilter = o, this.minFilter = s, this.anisotropy = p, this.format = l, this.internalFormat = null, this.type = d, this.offset = new F(0, 0), this.repeat = new F(1, 1), this.center = new F(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new en(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = m, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(t && t.depth && t.depth > 1), this.pmremVersion = 0;
|
|
1143
1143
|
}
|
|
1144
1144
|
get width() {
|
|
1145
|
-
return this.source.getSize(
|
|
1145
|
+
return this.source.getSize(mn).x;
|
|
1146
1146
|
}
|
|
1147
1147
|
get height() {
|
|
1148
|
-
return this.source.getSize(
|
|
1148
|
+
return this.source.getSize(mn).y;
|
|
1149
1149
|
}
|
|
1150
1150
|
get depth() {
|
|
1151
|
-
return this.source.getSize(
|
|
1151
|
+
return this.source.getSize(mn).z;
|
|
1152
1152
|
}
|
|
1153
1153
|
get image() {
|
|
1154
1154
|
return this.source.data;
|
|
@@ -1228,24 +1228,24 @@ var dn = 0, fn = /* @__PURE__ */ new I(), R = class e extends Tt {
|
|
|
1228
1228
|
transformUv(e) {
|
|
1229
1229
|
if (this.mapping !== 300) return e;
|
|
1230
1230
|
if (e.applyMatrix3(this.matrix), e.x < 0 || e.x > 1) switch (this.wrapS) {
|
|
1231
|
-
case
|
|
1231
|
+
case n:
|
|
1232
1232
|
e.x -= Math.floor(e.x);
|
|
1233
1233
|
break;
|
|
1234
|
-
case
|
|
1234
|
+
case r:
|
|
1235
1235
|
e.x = e.x < 0 ? 0 : 1;
|
|
1236
1236
|
break;
|
|
1237
|
-
case
|
|
1237
|
+
case i:
|
|
1238
1238
|
Math.abs(Math.floor(e.x) % 2) === 1 ? e.x = Math.ceil(e.x) - e.x : e.x -= Math.floor(e.x);
|
|
1239
1239
|
break;
|
|
1240
1240
|
}
|
|
1241
1241
|
if (e.y < 0 || e.y > 1) switch (this.wrapT) {
|
|
1242
|
-
case
|
|
1242
|
+
case n:
|
|
1243
1243
|
e.y -= Math.floor(e.y);
|
|
1244
1244
|
break;
|
|
1245
|
-
case
|
|
1245
|
+
case r:
|
|
1246
1246
|
e.y = e.y < 0 ? 0 : 1;
|
|
1247
1247
|
break;
|
|
1248
|
-
case
|
|
1248
|
+
case i:
|
|
1249
1249
|
Math.abs(Math.floor(e.y) % 2) === 1 ? e.y = Math.ceil(e.y) - e.y : e.y -= Math.floor(e.y);
|
|
1250
1250
|
break;
|
|
1251
1251
|
}
|
|
@@ -1259,7 +1259,7 @@ var dn = 0, fn = /* @__PURE__ */ new I(), R = class e extends Tt {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
};
|
|
1261
1261
|
R.DEFAULT_IMAGE = null, R.DEFAULT_MAPPING = 300, R.DEFAULT_ANISOTROPY = 1;
|
|
1262
|
-
var
|
|
1262
|
+
var hn = class e {
|
|
1263
1263
|
constructor(t = 0, n = 0, r = 0, i = 1) {
|
|
1264
1264
|
e.prototype.isVector4 = !0, this.x = t, this.y = n, this.z = r, this.w = i;
|
|
1265
1265
|
}
|
|
@@ -1456,12 +1456,12 @@ var pn = class e {
|
|
|
1456
1456
|
*[Symbol.iterator]() {
|
|
1457
1457
|
yield this.x, yield this.y, yield this.z, yield this.w;
|
|
1458
1458
|
}
|
|
1459
|
-
},
|
|
1459
|
+
}, gn = class extends Dt {
|
|
1460
1460
|
constructor(e = 1, t = 1, n = {}) {
|
|
1461
1461
|
super(), n = Object.assign({
|
|
1462
1462
|
generateMipmaps: !1,
|
|
1463
1463
|
internalFormat: null,
|
|
1464
|
-
minFilter:
|
|
1464
|
+
minFilter: c,
|
|
1465
1465
|
depthBuffer: !0,
|
|
1466
1466
|
stencilBuffer: !1,
|
|
1467
1467
|
resolveDepthBuffer: !0,
|
|
@@ -1471,7 +1471,7 @@ var pn = class e {
|
|
|
1471
1471
|
count: 1,
|
|
1472
1472
|
depth: 1,
|
|
1473
1473
|
multiview: !1
|
|
1474
|
-
}, n), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = n.depth, this.scissor = new
|
|
1474
|
+
}, n), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = n.depth, this.scissor = new hn(0, 0, e, t), this.scissorTest = !1, this.viewport = new hn(0, 0, e, t), this.textures = [];
|
|
1475
1475
|
let r = new R({
|
|
1476
1476
|
width: e,
|
|
1477
1477
|
height: t,
|
|
@@ -1482,7 +1482,7 @@ var pn = class e {
|
|
|
1482
1482
|
}
|
|
1483
1483
|
_setTextureOptions(e = {}) {
|
|
1484
1484
|
let t = {
|
|
1485
|
-
minFilter:
|
|
1485
|
+
minFilter: c,
|
|
1486
1486
|
generateMipmaps: !1,
|
|
1487
1487
|
flipY: !1,
|
|
1488
1488
|
internalFormat: null
|
|
@@ -1518,25 +1518,25 @@ var pn = class e {
|
|
|
1518
1518
|
for (let t = 0, n = e.textures.length; t < n; t++) {
|
|
1519
1519
|
this.textures[t] = e.textures[t].clone(), this.textures[t].isRenderTargetTexture = !0, this.textures[t].renderTarget = this;
|
|
1520
1520
|
let n = Object.assign({}, e.textures[t].image);
|
|
1521
|
-
this.textures[t].source = new
|
|
1521
|
+
this.textures[t].source = new dn(n);
|
|
1522
1522
|
}
|
|
1523
1523
|
return this.depthBuffer = e.depthBuffer, this.stencilBuffer = e.stencilBuffer, this.resolveDepthBuffer = e.resolveDepthBuffer, this.resolveStencilBuffer = e.resolveStencilBuffer, e.depthTexture !== null && (this.depthTexture = e.depthTexture.clone()), this.samples = e.samples, this;
|
|
1524
1524
|
}
|
|
1525
1525
|
dispose() {
|
|
1526
1526
|
this.dispatchEvent({ type: "dispose" });
|
|
1527
1527
|
}
|
|
1528
|
-
},
|
|
1528
|
+
}, _n = class extends gn {
|
|
1529
1529
|
constructor(e = 1, t = 1, n = {}) {
|
|
1530
1530
|
super(e, t, n), this.isWebGLRenderTarget = !0;
|
|
1531
1531
|
}
|
|
1532
|
-
},
|
|
1533
|
-
constructor(e = null, t = 1,
|
|
1532
|
+
}, vn = class extends R {
|
|
1533
|
+
constructor(e = null, t = 1, n = 1, i = 1) {
|
|
1534
1534
|
super(null), this.isDataArrayTexture = !0, this.image = {
|
|
1535
1535
|
data: e,
|
|
1536
1536
|
width: t,
|
|
1537
|
-
height:
|
|
1538
|
-
depth:
|
|
1539
|
-
}, this.magFilter =
|
|
1537
|
+
height: n,
|
|
1538
|
+
depth: i
|
|
1539
|
+
}, this.magFilter = a, this.minFilter = a, this.wrapR = r, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1, this.layerUpdates = /* @__PURE__ */ new Set();
|
|
1540
1540
|
}
|
|
1541
1541
|
addLayerUpdate(e) {
|
|
1542
1542
|
this.layerUpdates.add(e);
|
|
@@ -1544,14 +1544,14 @@ var pn = class e {
|
|
|
1544
1544
|
clearLayerUpdates() {
|
|
1545
1545
|
this.layerUpdates.clear();
|
|
1546
1546
|
}
|
|
1547
|
-
},
|
|
1548
|
-
constructor(e = null, t = 1,
|
|
1547
|
+
}, yn = class extends R {
|
|
1548
|
+
constructor(e = null, t = 1, n = 1, i = 1) {
|
|
1549
1549
|
super(null), this.isData3DTexture = !0, this.image = {
|
|
1550
1550
|
data: e,
|
|
1551
1551
|
width: t,
|
|
1552
|
-
height:
|
|
1553
|
-
depth:
|
|
1554
|
-
}, this.magFilter =
|
|
1552
|
+
height: n,
|
|
1553
|
+
depth: i
|
|
1554
|
+
}, this.magFilter = a, this.minFilter = a, this.wrapR = r, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
|
|
1555
1555
|
}
|
|
1556
1556
|
}, z = class e {
|
|
1557
1557
|
constructor(t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g) {
|
|
@@ -1604,7 +1604,7 @@ var pn = class e {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
extractRotation(e) {
|
|
1606
1606
|
if (e.determinant() === 0) return this.identity();
|
|
1607
|
-
let t = this.elements, n = e.elements, r = 1 /
|
|
1607
|
+
let t = this.elements, n = e.elements, r = 1 / bn.setFromMatrixColumn(e, 0).length(), i = 1 / bn.setFromMatrixColumn(e, 1).length(), a = 1 / bn.setFromMatrixColumn(e, 2).length();
|
|
1608
1608
|
return t[0] = n[0] * r, t[1] = n[1] * r, t[2] = n[2] * r, t[3] = 0, t[4] = n[4] * i, t[5] = n[5] * i, t[6] = n[6] * i, t[7] = 0, t[8] = n[8] * a, t[9] = n[9] * a, t[10] = n[10] * a, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
|
|
1609
1609
|
}
|
|
1610
1610
|
makeRotationFromEuler(e) {
|
|
@@ -1631,11 +1631,11 @@ var pn = class e {
|
|
|
1631
1631
|
return t[3] = 0, t[7] = 0, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
|
|
1632
1632
|
}
|
|
1633
1633
|
makeRotationFromQuaternion(e) {
|
|
1634
|
-
return this.compose(
|
|
1634
|
+
return this.compose(Sn, e, Cn);
|
|
1635
1635
|
}
|
|
1636
1636
|
lookAt(e, t, n) {
|
|
1637
1637
|
let r = this.elements;
|
|
1638
|
-
return
|
|
1638
|
+
return B.subVectors(e, t), B.lengthSq() === 0 && (B.z = 1), B.normalize(), wn.crossVectors(n, B), wn.lengthSq() === 0 && (Math.abs(n.z) === 1 ? B.x += 1e-4 : B.z += 1e-4, B.normalize(), wn.crossVectors(n, B)), wn.normalize(), Tn.crossVectors(B, wn), r[0] = wn.x, r[4] = Tn.x, r[8] = B.x, r[1] = wn.y, r[5] = Tn.y, r[9] = B.y, r[2] = wn.z, r[6] = Tn.z, r[10] = B.z, this;
|
|
1639
1639
|
}
|
|
1640
1640
|
multiply(e) {
|
|
1641
1641
|
return this.multiplyMatrices(this, e);
|
|
@@ -1711,12 +1711,12 @@ var pn = class e {
|
|
|
1711
1711
|
e.x = r[12], e.y = r[13], e.z = r[14];
|
|
1712
1712
|
let i = this.determinant();
|
|
1713
1713
|
if (i === 0) return n.set(1, 1, 1), t.identity(), this;
|
|
1714
|
-
let a =
|
|
1715
|
-
i < 0 && (a = -a),
|
|
1714
|
+
let a = bn.set(r[0], r[1], r[2]).length(), o = bn.set(r[4], r[5], r[6]).length(), s = bn.set(r[8], r[9], r[10]).length();
|
|
1715
|
+
i < 0 && (a = -a), xn.copy(this);
|
|
1716
1716
|
let c = 1 / a, l = 1 / o, u = 1 / s;
|
|
1717
|
-
return
|
|
1717
|
+
return xn.elements[0] *= c, xn.elements[1] *= c, xn.elements[2] *= c, xn.elements[4] *= l, xn.elements[5] *= l, xn.elements[6] *= l, xn.elements[8] *= u, xn.elements[9] *= u, xn.elements[10] *= u, t.setFromRotationMatrix(xn), n.x = a, n.y = o, n.z = s, this;
|
|
1718
1718
|
}
|
|
1719
|
-
makePerspective(e, t, n, r, i, a, o =
|
|
1719
|
+
makePerspective(e, t, n, r, i, a, o = ft, s = !1) {
|
|
1720
1720
|
let c = this.elements, l = 2 * i / (t - e), u = 2 * i / (n - r), d = (t + e) / (t - e), f = (n + r) / (n - r), p, m;
|
|
1721
1721
|
if (s) p = i / (a - i), m = a * i / (a - i);
|
|
1722
1722
|
else if (o === 2e3) p = -(a + i) / (a - i), m = -2 * a * i / (a - i);
|
|
@@ -1724,7 +1724,7 @@ var pn = class e {
|
|
|
1724
1724
|
else throw Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: " + o);
|
|
1725
1725
|
return c[0] = l, c[4] = 0, c[8] = d, c[12] = 0, c[1] = 0, c[5] = u, c[9] = f, c[13] = 0, c[2] = 0, c[6] = 0, c[10] = p, c[14] = m, c[3] = 0, c[7] = 0, c[11] = -1, c[15] = 0, this;
|
|
1726
1726
|
}
|
|
1727
|
-
makeOrthographic(e, t, n, r, i, a, o =
|
|
1727
|
+
makeOrthographic(e, t, n, r, i, a, o = ft, s = !1) {
|
|
1728
1728
|
let c = this.elements, l = 2 / (t - e), u = 2 / (n - r), d = -(t + e) / (t - e), f = -(n + r) / (n - r), p, m;
|
|
1729
1729
|
if (s) p = 1 / (a - i), m = a / (a - i);
|
|
1730
1730
|
else if (o === 2e3) p = -2 / (a - i), m = -(a + i) / (a - i);
|
|
@@ -1745,7 +1745,7 @@ var pn = class e {
|
|
|
1745
1745
|
let n = this.elements;
|
|
1746
1746
|
return e[t] = n[0], e[t + 1] = n[1], e[t + 2] = n[2], e[t + 3] = n[3], e[t + 4] = n[4], e[t + 5] = n[5], e[t + 6] = n[6], e[t + 7] = n[7], e[t + 8] = n[8], e[t + 9] = n[9], e[t + 10] = n[10], e[t + 11] = n[11], e[t + 12] = n[12], e[t + 13] = n[13], e[t + 14] = n[14], e[t + 15] = n[15], e;
|
|
1747
1747
|
}
|
|
1748
|
-
},
|
|
1748
|
+
}, bn = /* @__PURE__ */ new I(), xn = /* @__PURE__ */ new z(), Sn = /* @__PURE__ */ new I(0, 0, 0), Cn = /* @__PURE__ */ new I(1, 1, 1), wn = /* @__PURE__ */ new I(), Tn = /* @__PURE__ */ new I(), B = /* @__PURE__ */ new I(), En = /* @__PURE__ */ new z(), Dn = /* @__PURE__ */ new Zt(), On = class e {
|
|
1749
1749
|
constructor(t = 0, n = 0, r = 0, i = e.DEFAULT_ORDER) {
|
|
1750
1750
|
this.isEuler = !0, this._x = t, this._y = n, this._z = r, this._order = i;
|
|
1751
1751
|
}
|
|
@@ -1808,13 +1808,13 @@ var pn = class e {
|
|
|
1808
1808
|
return this._order = t, n === !0 && this._onChangeCallback(), this;
|
|
1809
1809
|
}
|
|
1810
1810
|
setFromQuaternion(e, t, n) {
|
|
1811
|
-
return
|
|
1811
|
+
return En.makeRotationFromQuaternion(e), this.setFromRotationMatrix(En, t, n);
|
|
1812
1812
|
}
|
|
1813
1813
|
setFromVector3(e, t = this._order) {
|
|
1814
1814
|
return this.set(e.x, e.y, e.z, t);
|
|
1815
1815
|
}
|
|
1816
1816
|
reorder(e) {
|
|
1817
|
-
return
|
|
1817
|
+
return Dn.setFromEuler(this), this.setFromQuaternion(Dn, e);
|
|
1818
1818
|
}
|
|
1819
1819
|
equals(e) {
|
|
1820
1820
|
return e._x === this._x && e._y === this._y && e._z === this._z && e._order === this._order;
|
|
@@ -1833,8 +1833,8 @@ var pn = class e {
|
|
|
1833
1833
|
yield this._x, yield this._y, yield this._z, yield this._order;
|
|
1834
1834
|
}
|
|
1835
1835
|
};
|
|
1836
|
-
|
|
1837
|
-
var
|
|
1836
|
+
On.DEFAULT_ORDER = "XYZ";
|
|
1837
|
+
var kn = class {
|
|
1838
1838
|
constructor() {
|
|
1839
1839
|
this.mask = 1;
|
|
1840
1840
|
}
|
|
@@ -1862,16 +1862,16 @@ var On = class {
|
|
|
1862
1862
|
isEnabled(e) {
|
|
1863
1863
|
return (this.mask & (1 << e | 0)) != 0;
|
|
1864
1864
|
}
|
|
1865
|
-
},
|
|
1865
|
+
}, An = 0, jn = /* @__PURE__ */ new I(), Mn = /* @__PURE__ */ new Zt(), Nn = /* @__PURE__ */ new z(), Pn = /* @__PURE__ */ new I(), Fn = /* @__PURE__ */ new I(), In = /* @__PURE__ */ new I(), Ln = /* @__PURE__ */ new Zt(), Rn = /* @__PURE__ */ new I(1, 0, 0), zn = /* @__PURE__ */ new I(0, 1, 0), Bn = /* @__PURE__ */ new I(0, 0, 1), Vn = { type: "added" }, Hn = { type: "removed" }, Un = {
|
|
1866
1866
|
type: "childadded",
|
|
1867
1867
|
child: null
|
|
1868
|
-
},
|
|
1868
|
+
}, Wn = {
|
|
1869
1869
|
type: "childremoved",
|
|
1870
1870
|
child: null
|
|
1871
|
-
},
|
|
1871
|
+
}, V = class e extends Dt {
|
|
1872
1872
|
constructor() {
|
|
1873
|
-
super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value:
|
|
1874
|
-
let t = new I(), n = new
|
|
1873
|
+
super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: An++ }), this.uuid = jt(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = e.DEFAULT_UP.clone();
|
|
1874
|
+
let t = new I(), n = new On(), r = new Zt(), i = new I(1, 1, 1);
|
|
1875
1875
|
function a() {
|
|
1876
1876
|
r.setFromEuler(n, !1);
|
|
1877
1877
|
}
|
|
@@ -1900,8 +1900,8 @@ var On = class {
|
|
|
1900
1900
|
value: i
|
|
1901
1901
|
},
|
|
1902
1902
|
modelViewMatrix: { value: new z() },
|
|
1903
|
-
normalMatrix: { value: new
|
|
1904
|
-
}), this.matrix = new z(), this.matrixWorld = new z(), this.matrixAutoUpdate = e.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = e.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new
|
|
1903
|
+
normalMatrix: { value: new en() }
|
|
1904
|
+
}), this.matrix = new z(), this.matrixWorld = new z(), this.matrixAutoUpdate = e.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = e.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new kn(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.customDepthMaterial = void 0, this.customDistanceMaterial = void 0, this.static = !1, this.userData = {}, this.pivot = null;
|
|
1905
1905
|
}
|
|
1906
1906
|
onBeforeShadow() {}
|
|
1907
1907
|
onAfterShadow() {}
|
|
@@ -1926,49 +1926,49 @@ var On = class {
|
|
|
1926
1926
|
this.quaternion.copy(e);
|
|
1927
1927
|
}
|
|
1928
1928
|
rotateOnAxis(e, t) {
|
|
1929
|
-
return
|
|
1929
|
+
return Mn.setFromAxisAngle(e, t), this.quaternion.multiply(Mn), this;
|
|
1930
1930
|
}
|
|
1931
1931
|
rotateOnWorldAxis(e, t) {
|
|
1932
|
-
return
|
|
1932
|
+
return Mn.setFromAxisAngle(e, t), this.quaternion.premultiply(Mn), this;
|
|
1933
1933
|
}
|
|
1934
1934
|
rotateX(e) {
|
|
1935
|
-
return this.rotateOnAxis(
|
|
1935
|
+
return this.rotateOnAxis(Rn, e);
|
|
1936
1936
|
}
|
|
1937
1937
|
rotateY(e) {
|
|
1938
|
-
return this.rotateOnAxis(
|
|
1938
|
+
return this.rotateOnAxis(zn, e);
|
|
1939
1939
|
}
|
|
1940
1940
|
rotateZ(e) {
|
|
1941
|
-
return this.rotateOnAxis(
|
|
1941
|
+
return this.rotateOnAxis(Bn, e);
|
|
1942
1942
|
}
|
|
1943
1943
|
translateOnAxis(e, t) {
|
|
1944
|
-
return
|
|
1944
|
+
return jn.copy(e).applyQuaternion(this.quaternion), this.position.add(jn.multiplyScalar(t)), this;
|
|
1945
1945
|
}
|
|
1946
1946
|
translateX(e) {
|
|
1947
|
-
return this.translateOnAxis(
|
|
1947
|
+
return this.translateOnAxis(Rn, e);
|
|
1948
1948
|
}
|
|
1949
1949
|
translateY(e) {
|
|
1950
|
-
return this.translateOnAxis(
|
|
1950
|
+
return this.translateOnAxis(zn, e);
|
|
1951
1951
|
}
|
|
1952
1952
|
translateZ(e) {
|
|
1953
|
-
return this.translateOnAxis(
|
|
1953
|
+
return this.translateOnAxis(Bn, e);
|
|
1954
1954
|
}
|
|
1955
1955
|
localToWorld(e) {
|
|
1956
1956
|
return this.updateWorldMatrix(!0, !1), e.applyMatrix4(this.matrixWorld);
|
|
1957
1957
|
}
|
|
1958
1958
|
worldToLocal(e) {
|
|
1959
|
-
return this.updateWorldMatrix(!0, !1), e.applyMatrix4(
|
|
1959
|
+
return this.updateWorldMatrix(!0, !1), e.applyMatrix4(Nn.copy(this.matrixWorld).invert());
|
|
1960
1960
|
}
|
|
1961
1961
|
lookAt(e, t, n) {
|
|
1962
|
-
e.isVector3 ?
|
|
1962
|
+
e.isVector3 ? Pn.copy(e) : Pn.set(e, t, n);
|
|
1963
1963
|
let r = this.parent;
|
|
1964
|
-
this.updateWorldMatrix(!0, !1),
|
|
1964
|
+
this.updateWorldMatrix(!0, !1), Fn.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? Nn.lookAt(Fn, Pn, this.up) : Nn.lookAt(Pn, Fn, this.up), this.quaternion.setFromRotationMatrix(Nn), r && (Nn.extractRotation(r.matrixWorld), Mn.setFromRotationMatrix(Nn), this.quaternion.premultiply(Mn.invert()));
|
|
1965
1965
|
}
|
|
1966
1966
|
add(e) {
|
|
1967
1967
|
if (arguments.length > 1) {
|
|
1968
1968
|
for (let e = 0; e < arguments.length; e++) this.add(arguments[e]);
|
|
1969
1969
|
return this;
|
|
1970
1970
|
}
|
|
1971
|
-
return e === this ? (A("Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(
|
|
1971
|
+
return e === this ? (A("Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(Vn), Un.child = e, this.dispatchEvent(Un), Un.child = null) : A("Object3D.add: object not an instance of THREE.Object3D.", e), this);
|
|
1972
1972
|
}
|
|
1973
1973
|
remove(e) {
|
|
1974
1974
|
if (arguments.length > 1) {
|
|
@@ -1976,7 +1976,7 @@ var On = class {
|
|
|
1976
1976
|
return this;
|
|
1977
1977
|
}
|
|
1978
1978
|
let t = this.children.indexOf(e);
|
|
1979
|
-
return t !== -1 && (e.parent = null, this.children.splice(t, 1), e.dispatchEvent(
|
|
1979
|
+
return t !== -1 && (e.parent = null, this.children.splice(t, 1), e.dispatchEvent(Hn), Wn.child = e, this.dispatchEvent(Wn), Wn.child = null), this;
|
|
1980
1980
|
}
|
|
1981
1981
|
removeFromParent() {
|
|
1982
1982
|
let e = this.parent;
|
|
@@ -1986,7 +1986,7 @@ var On = class {
|
|
|
1986
1986
|
return this.remove(...this.children);
|
|
1987
1987
|
}
|
|
1988
1988
|
attach(e) {
|
|
1989
|
-
return this.updateWorldMatrix(!0, !1),
|
|
1989
|
+
return this.updateWorldMatrix(!0, !1), Nn.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), Nn.multiply(e.parent.matrixWorld)), e.applyMatrix4(Nn), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(Vn), Un.child = e, this.dispatchEvent(Un), Un.child = null, this;
|
|
1990
1990
|
}
|
|
1991
1991
|
getObjectById(e) {
|
|
1992
1992
|
return this.getObjectByProperty("id", e);
|
|
@@ -2011,10 +2011,10 @@ var On = class {
|
|
|
2011
2011
|
return this.updateWorldMatrix(!0, !1), e.setFromMatrixPosition(this.matrixWorld);
|
|
2012
2012
|
}
|
|
2013
2013
|
getWorldQuaternion(e) {
|
|
2014
|
-
return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(
|
|
2014
|
+
return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Fn, e, In), e;
|
|
2015
2015
|
}
|
|
2016
2016
|
getWorldScale(e) {
|
|
2017
|
-
return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(
|
|
2017
|
+
return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Fn, Ln, e), e;
|
|
2018
2018
|
}
|
|
2019
2019
|
getWorldDirection(e) {
|
|
2020
2020
|
this.updateWorldMatrix(!0, !1);
|
|
@@ -2137,23 +2137,23 @@ var On = class {
|
|
|
2137
2137
|
return this;
|
|
2138
2138
|
}
|
|
2139
2139
|
};
|
|
2140
|
-
|
|
2141
|
-
var
|
|
2140
|
+
V.DEFAULT_UP = /* @__PURE__ */ new I(0, 1, 0), V.DEFAULT_MATRIX_AUTO_UPDATE = !0, V.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
|
|
2141
|
+
var Gn = class extends V {
|
|
2142
2142
|
constructor() {
|
|
2143
2143
|
super(), this.isGroup = !0, this.type = "Group";
|
|
2144
2144
|
}
|
|
2145
|
-
},
|
|
2145
|
+
}, Kn = { type: "move" }, qn = class {
|
|
2146
2146
|
constructor() {
|
|
2147
2147
|
this._targetRay = null, this._grip = null, this._hand = null;
|
|
2148
2148
|
}
|
|
2149
2149
|
getHandSpace() {
|
|
2150
|
-
return this._hand === null && (this._hand = new
|
|
2150
|
+
return this._hand === null && (this._hand = new Gn(), this._hand.matrixAutoUpdate = !1, this._hand.visible = !1, this._hand.joints = {}, this._hand.inputState = { pinching: !1 }), this._hand;
|
|
2151
2151
|
}
|
|
2152
2152
|
getTargetRaySpace() {
|
|
2153
|
-
return this._targetRay === null && (this._targetRay = new
|
|
2153
|
+
return this._targetRay === null && (this._targetRay = new Gn(), this._targetRay.matrixAutoUpdate = !1, this._targetRay.visible = !1, this._targetRay.hasLinearVelocity = !1, this._targetRay.linearVelocity = new I(), this._targetRay.hasAngularVelocity = !1, this._targetRay.angularVelocity = new I()), this._targetRay;
|
|
2154
2154
|
}
|
|
2155
2155
|
getGripSpace() {
|
|
2156
|
-
return this._grip === null && (this._grip = new
|
|
2156
|
+
return this._grip === null && (this._grip = new Gn(), this._grip.matrixAutoUpdate = !1, this._grip.visible = !1, this._grip.hasLinearVelocity = !1, this._grip.linearVelocity = new I(), this._grip.hasAngularVelocity = !1, this._grip.angularVelocity = new I()), this._grip;
|
|
2157
2157
|
}
|
|
2158
2158
|
dispatchEvent(e) {
|
|
2159
2159
|
return this._targetRay !== null && this._targetRay.dispatchEvent(e), this._grip !== null && this._grip.dispatchEvent(e), this._hand !== null && this._hand.dispatchEvent(e), this;
|
|
@@ -2194,18 +2194,18 @@ var Wn = class extends B {
|
|
|
2194
2194
|
target: this
|
|
2195
2195
|
}));
|
|
2196
2196
|
} else s !== null && e.gripSpace && (i = t.getPose(e.gripSpace, n), i !== null && (s.matrix.fromArray(i.transform.matrix), s.matrix.decompose(s.position, s.rotation, s.scale), s.matrixWorldNeedsUpdate = !0, i.linearVelocity ? (s.hasLinearVelocity = !0, s.linearVelocity.copy(i.linearVelocity)) : s.hasLinearVelocity = !1, i.angularVelocity ? (s.hasAngularVelocity = !0, s.angularVelocity.copy(i.angularVelocity)) : s.hasAngularVelocity = !1));
|
|
2197
|
-
o !== null && (r = t.getPose(e.targetRaySpace, n), r === null && i !== null && (r = i), r !== null && (o.matrix.fromArray(r.transform.matrix), o.matrix.decompose(o.position, o.rotation, o.scale), o.matrixWorldNeedsUpdate = !0, r.linearVelocity ? (o.hasLinearVelocity = !0, o.linearVelocity.copy(r.linearVelocity)) : o.hasLinearVelocity = !1, r.angularVelocity ? (o.hasAngularVelocity = !0, o.angularVelocity.copy(r.angularVelocity)) : o.hasAngularVelocity = !1, this.dispatchEvent(
|
|
2197
|
+
o !== null && (r = t.getPose(e.targetRaySpace, n), r === null && i !== null && (r = i), r !== null && (o.matrix.fromArray(r.transform.matrix), o.matrix.decompose(o.position, o.rotation, o.scale), o.matrixWorldNeedsUpdate = !0, r.linearVelocity ? (o.hasLinearVelocity = !0, o.linearVelocity.copy(r.linearVelocity)) : o.hasLinearVelocity = !1, r.angularVelocity ? (o.hasAngularVelocity = !0, o.angularVelocity.copy(r.angularVelocity)) : o.hasAngularVelocity = !1, this.dispatchEvent(Kn)));
|
|
2198
2198
|
}
|
|
2199
2199
|
return o !== null && (o.visible = r !== null), s !== null && (s.visible = i !== null), c !== null && (c.visible = a !== null), this;
|
|
2200
2200
|
}
|
|
2201
2201
|
_getHandJoint(e, t) {
|
|
2202
2202
|
if (e.joints[t.jointName] === void 0) {
|
|
2203
|
-
let n = new
|
|
2203
|
+
let n = new Gn();
|
|
2204
2204
|
n.matrixAutoUpdate = !1, n.visible = !1, e.joints[t.jointName] = n, e.add(n);
|
|
2205
2205
|
}
|
|
2206
2206
|
return e.joints[t.jointName];
|
|
2207
2207
|
}
|
|
2208
|
-
},
|
|
2208
|
+
}, Jn = {
|
|
2209
2209
|
aliceblue: 15792383,
|
|
2210
2210
|
antiquewhite: 16444375,
|
|
2211
2211
|
aqua: 65535,
|
|
@@ -2354,19 +2354,19 @@ var Wn = class extends B {
|
|
|
2354
2354
|
whitesmoke: 16119285,
|
|
2355
2355
|
yellow: 16776960,
|
|
2356
2356
|
yellowgreen: 10145074
|
|
2357
|
-
},
|
|
2357
|
+
}, Yn = {
|
|
2358
2358
|
h: 0,
|
|
2359
2359
|
s: 0,
|
|
2360
2360
|
l: 0
|
|
2361
|
-
},
|
|
2361
|
+
}, Xn = {
|
|
2362
2362
|
h: 0,
|
|
2363
2363
|
s: 0,
|
|
2364
2364
|
l: 0
|
|
2365
2365
|
};
|
|
2366
|
-
function
|
|
2366
|
+
function Zn(e, t, n) {
|
|
2367
2367
|
return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * 6 * (2 / 3 - n) : e;
|
|
2368
2368
|
}
|
|
2369
|
-
var
|
|
2369
|
+
var H = class {
|
|
2370
2370
|
constructor(e, t, n) {
|
|
2371
2371
|
return this.isColor = !0, this.r = 1, this.g = 1, this.b = 1, this.set(e, t, n);
|
|
2372
2372
|
}
|
|
@@ -2380,21 +2380,21 @@ var V = class {
|
|
|
2380
2380
|
setScalar(e) {
|
|
2381
2381
|
return this.r = e, this.g = e, this.b = e, this;
|
|
2382
2382
|
}
|
|
2383
|
-
setHex(e, t =
|
|
2383
|
+
setHex(e, t = Qe) {
|
|
2384
2384
|
return e = Math.floor(e), this.r = (e >> 16 & 255) / 255, this.g = (e >> 8 & 255) / 255, this.b = (e & 255) / 255, L.colorSpaceToWorking(this, t), this;
|
|
2385
2385
|
}
|
|
2386
2386
|
setRGB(e, t, n, r = L.workingColorSpace) {
|
|
2387
2387
|
return this.r = e, this.g = t, this.b = n, L.colorSpaceToWorking(this, r), this;
|
|
2388
2388
|
}
|
|
2389
2389
|
setHSL(e, t, n, r = L.workingColorSpace) {
|
|
2390
|
-
if (e =
|
|
2390
|
+
if (e = Mt(e, 1), t = M(t, 0, 1), n = M(n, 0, 1), t === 0) this.r = this.g = this.b = n;
|
|
2391
2391
|
else {
|
|
2392
2392
|
let r = n <= .5 ? n * (1 + t) : n + t - n * t, i = 2 * n - r;
|
|
2393
|
-
this.r =
|
|
2393
|
+
this.r = Zn(i, r, e + 1 / 3), this.g = Zn(i, r, e), this.b = Zn(i, r, e - 1 / 3);
|
|
2394
2394
|
}
|
|
2395
2395
|
return L.colorSpaceToWorking(this, r), this;
|
|
2396
2396
|
}
|
|
2397
|
-
setStyle(e, t =
|
|
2397
|
+
setStyle(e, t = Qe) {
|
|
2398
2398
|
function n(t) {
|
|
2399
2399
|
t !== void 0 && parseFloat(t) < 1 && k("Color: Alpha component of " + e + " will be ignored.");
|
|
2400
2400
|
}
|
|
@@ -2421,8 +2421,8 @@ var V = class {
|
|
|
2421
2421
|
} else if (e && e.length > 0) return this.setColorName(e, t);
|
|
2422
2422
|
return this;
|
|
2423
2423
|
}
|
|
2424
|
-
setColorName(e, t =
|
|
2425
|
-
let n =
|
|
2424
|
+
setColorName(e, t = Qe) {
|
|
2425
|
+
let n = Jn[e.toLowerCase()];
|
|
2426
2426
|
return n === void 0 ? k("Color: Unknown color " + e) : this.setHex(n, t), this;
|
|
2427
2427
|
}
|
|
2428
2428
|
clone() {
|
|
@@ -2432,10 +2432,10 @@ var V = class {
|
|
|
2432
2432
|
return this.r = e.r, this.g = e.g, this.b = e.b, this;
|
|
2433
2433
|
}
|
|
2434
2434
|
copySRGBToLinear(e) {
|
|
2435
|
-
return this.r =
|
|
2435
|
+
return this.r = on(e.r), this.g = on(e.g), this.b = on(e.b), this;
|
|
2436
2436
|
}
|
|
2437
2437
|
copyLinearToSRGB(e) {
|
|
2438
|
-
return this.r =
|
|
2438
|
+
return this.r = sn(e.r), this.g = sn(e.g), this.b = sn(e.b), this;
|
|
2439
2439
|
}
|
|
2440
2440
|
convertSRGBToLinear() {
|
|
2441
2441
|
return this.copySRGBToLinear(this), this;
|
|
@@ -2443,15 +2443,15 @@ var V = class {
|
|
|
2443
2443
|
convertLinearToSRGB() {
|
|
2444
2444
|
return this.copyLinearToSRGB(this), this;
|
|
2445
2445
|
}
|
|
2446
|
-
getHex(e =
|
|
2447
|
-
return L.workingToColorSpace(
|
|
2446
|
+
getHex(e = Qe) {
|
|
2447
|
+
return L.workingToColorSpace(U.copy(this), e), Math.round(M(U.r * 255, 0, 255)) * 65536 + Math.round(M(U.g * 255, 0, 255)) * 256 + Math.round(M(U.b * 255, 0, 255));
|
|
2448
2448
|
}
|
|
2449
|
-
getHexString(e =
|
|
2449
|
+
getHexString(e = Qe) {
|
|
2450
2450
|
return ("000000" + this.getHex(e).toString(16)).slice(-6);
|
|
2451
2451
|
}
|
|
2452
2452
|
getHSL(e, t = L.workingColorSpace) {
|
|
2453
|
-
L.workingToColorSpace(
|
|
2454
|
-
let n =
|
|
2453
|
+
L.workingToColorSpace(U.copy(this), t);
|
|
2454
|
+
let n = U.r, r = U.g, i = U.b, a = Math.max(n, r, i), o = Math.min(n, r, i), s, c, l = (o + a) / 2;
|
|
2455
2455
|
if (o === a) s = 0, c = 0;
|
|
2456
2456
|
else {
|
|
2457
2457
|
let e = a - o;
|
|
@@ -2471,15 +2471,15 @@ var V = class {
|
|
|
2471
2471
|
return e.h = s, e.s = c, e.l = l, e;
|
|
2472
2472
|
}
|
|
2473
2473
|
getRGB(e, t = L.workingColorSpace) {
|
|
2474
|
-
return L.workingToColorSpace(
|
|
2474
|
+
return L.workingToColorSpace(U.copy(this), t), e.r = U.r, e.g = U.g, e.b = U.b, e;
|
|
2475
2475
|
}
|
|
2476
|
-
getStyle(e =
|
|
2477
|
-
L.workingToColorSpace(
|
|
2478
|
-
let t =
|
|
2476
|
+
getStyle(e = Qe) {
|
|
2477
|
+
L.workingToColorSpace(U.copy(this), e);
|
|
2478
|
+
let t = U.r, n = U.g, r = U.b;
|
|
2479
2479
|
return e === "srgb" ? `rgb(${Math.round(t * 255)},${Math.round(n * 255)},${Math.round(r * 255)})` : `color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`;
|
|
2480
2480
|
}
|
|
2481
2481
|
offsetHSL(e, t, n) {
|
|
2482
|
-
return this.getHSL(
|
|
2482
|
+
return this.getHSL(Yn), this.setHSL(Yn.h + e, Yn.s + t, Yn.l + n);
|
|
2483
2483
|
}
|
|
2484
2484
|
add(e) {
|
|
2485
2485
|
return this.r += e.r, this.g += e.g, this.b += e.b, this;
|
|
@@ -2506,8 +2506,8 @@ var V = class {
|
|
|
2506
2506
|
return this.r = e.r + (t.r - e.r) * n, this.g = e.g + (t.g - e.g) * n, this.b = e.b + (t.b - e.b) * n, this;
|
|
2507
2507
|
}
|
|
2508
2508
|
lerpHSL(e, t) {
|
|
2509
|
-
this.getHSL(
|
|
2510
|
-
let n =
|
|
2509
|
+
this.getHSL(Yn), e.getHSL(Xn);
|
|
2510
|
+
let n = Ft(Yn.h, Xn.h, t), r = Ft(Yn.s, Xn.s, t), i = Ft(Yn.l, Xn.l, t);
|
|
2511
2511
|
return this.setHSL(n, r, i), this;
|
|
2512
2512
|
}
|
|
2513
2513
|
setFromVector3(e) {
|
|
@@ -2535,11 +2535,11 @@ var V = class {
|
|
|
2535
2535
|
*[Symbol.iterator]() {
|
|
2536
2536
|
yield this.r, yield this.g, yield this.b;
|
|
2537
2537
|
}
|
|
2538
|
-
},
|
|
2539
|
-
|
|
2540
|
-
var
|
|
2538
|
+
}, U = /* @__PURE__ */ new H();
|
|
2539
|
+
H.NAMES = Jn;
|
|
2540
|
+
var Qn = class e {
|
|
2541
2541
|
constructor(e, t = 1, n = 1e3) {
|
|
2542
|
-
this.isFog = !0, this.name = "", this.color = new
|
|
2542
|
+
this.isFog = !0, this.name = "", this.color = new H(e), this.near = t, this.far = n;
|
|
2543
2543
|
}
|
|
2544
2544
|
clone() {
|
|
2545
2545
|
return new e(this.color, this.near, this.far);
|
|
@@ -2553,9 +2553,9 @@ var Zn = class e {
|
|
|
2553
2553
|
far: this.far
|
|
2554
2554
|
};
|
|
2555
2555
|
}
|
|
2556
|
-
},
|
|
2556
|
+
}, $n = class extends V {
|
|
2557
2557
|
constructor() {
|
|
2558
|
-
super(), this.isScene = !0, this.type = "Scene", this.background = null, this.environment = null, this.fog = null, this.backgroundBlurriness = 0, this.backgroundIntensity = 1, this.backgroundRotation = new
|
|
2558
|
+
super(), this.isScene = !0, this.type = "Scene", this.background = null, this.environment = null, this.fog = null, this.backgroundBlurriness = 0, this.backgroundIntensity = 1, this.backgroundRotation = new On(), this.environmentIntensity = 1, this.environmentRotation = new On(), this.overrideMaterial = null, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
|
|
2559
2559
|
}
|
|
2560
2560
|
copy(e, t) {
|
|
2561
2561
|
return super.copy(e, t), e.background !== null && (this.background = e.background.clone()), e.environment !== null && (this.environment = e.environment.clone()), e.fog !== null && (this.fog = e.fog.clone()), this.backgroundBlurriness = e.backgroundBlurriness, this.backgroundIntensity = e.backgroundIntensity, this.backgroundRotation.copy(e.backgroundRotation), this.environmentIntensity = e.environmentIntensity, this.environmentRotation.copy(e.environmentRotation), e.overrideMaterial !== null && (this.overrideMaterial = e.overrideMaterial.clone()), this.matrixAutoUpdate = e.matrixAutoUpdate, this;
|
|
@@ -2564,33 +2564,33 @@ var Zn = class e {
|
|
|
2564
2564
|
let t = super.toJSON(e);
|
|
2565
2565
|
return this.fog !== null && (t.object.fog = this.fog.toJSON()), this.backgroundBlurriness > 0 && (t.object.backgroundBlurriness = this.backgroundBlurriness), this.backgroundIntensity !== 1 && (t.object.backgroundIntensity = this.backgroundIntensity), t.object.backgroundRotation = this.backgroundRotation.toArray(), this.environmentIntensity !== 1 && (t.object.environmentIntensity = this.environmentIntensity), t.object.environmentRotation = this.environmentRotation.toArray(), t;
|
|
2566
2566
|
}
|
|
2567
|
-
},
|
|
2567
|
+
}, er = /* @__PURE__ */ new I(), tr = /* @__PURE__ */ new I(), nr = /* @__PURE__ */ new I(), rr = /* @__PURE__ */ new I(), ir = /* @__PURE__ */ new I(), ar = /* @__PURE__ */ new I(), or = /* @__PURE__ */ new I(), sr = /* @__PURE__ */ new I(), cr = /* @__PURE__ */ new I(), lr = /* @__PURE__ */ new I(), ur = /* @__PURE__ */ new hn(), dr = /* @__PURE__ */ new hn(), fr = /* @__PURE__ */ new hn(), pr = class e {
|
|
2568
2568
|
constructor(e = new I(), t = new I(), n = new I()) {
|
|
2569
2569
|
this.a = e, this.b = t, this.c = n;
|
|
2570
2570
|
}
|
|
2571
2571
|
static getNormal(e, t, n, r) {
|
|
2572
|
-
r.subVectors(n, t),
|
|
2572
|
+
r.subVectors(n, t), er.subVectors(e, t), r.cross(er);
|
|
2573
2573
|
let i = r.lengthSq();
|
|
2574
2574
|
return i > 0 ? r.multiplyScalar(1 / Math.sqrt(i)) : r.set(0, 0, 0);
|
|
2575
2575
|
}
|
|
2576
2576
|
static getBarycoord(e, t, n, r, i) {
|
|
2577
|
-
|
|
2578
|
-
let a =
|
|
2577
|
+
er.subVectors(r, t), tr.subVectors(n, t), nr.subVectors(e, t);
|
|
2578
|
+
let a = er.dot(er), o = er.dot(tr), s = er.dot(nr), c = tr.dot(tr), l = tr.dot(nr), u = a * c - o * o;
|
|
2579
2579
|
if (u === 0) return i.set(0, 0, 0), null;
|
|
2580
2580
|
let d = 1 / u, f = (c * s - o * l) * d, p = (a * l - o * s) * d;
|
|
2581
2581
|
return i.set(1 - f - p, p, f);
|
|
2582
2582
|
}
|
|
2583
2583
|
static containsPoint(e, t, n, r) {
|
|
2584
|
-
return this.getBarycoord(e, t, n, r,
|
|
2584
|
+
return this.getBarycoord(e, t, n, r, rr) === null ? !1 : rr.x >= 0 && rr.y >= 0 && rr.x + rr.y <= 1;
|
|
2585
2585
|
}
|
|
2586
2586
|
static getInterpolation(e, t, n, r, i, a, o, s) {
|
|
2587
|
-
return this.getBarycoord(e, t, n, r,
|
|
2587
|
+
return this.getBarycoord(e, t, n, r, rr) === null ? (s.x = 0, s.y = 0, "z" in s && (s.z = 0), "w" in s && (s.w = 0), null) : (s.setScalar(0), s.addScaledVector(i, rr.x), s.addScaledVector(a, rr.y), s.addScaledVector(o, rr.z), s);
|
|
2588
2588
|
}
|
|
2589
2589
|
static getInterpolatedAttribute(e, t, n, r, i, a) {
|
|
2590
|
-
return
|
|
2590
|
+
return ur.setScalar(0), dr.setScalar(0), fr.setScalar(0), ur.fromBufferAttribute(e, t), dr.fromBufferAttribute(e, n), fr.fromBufferAttribute(e, r), a.setScalar(0), a.addScaledVector(ur, i.x), a.addScaledVector(dr, i.y), a.addScaledVector(fr, i.z), a;
|
|
2591
2591
|
}
|
|
2592
2592
|
static isFrontFacing(e, t, n, r) {
|
|
2593
|
-
return
|
|
2593
|
+
return er.subVectors(n, t), tr.subVectors(e, t), er.cross(tr).dot(r) < 0;
|
|
2594
2594
|
}
|
|
2595
2595
|
set(e, t, n) {
|
|
2596
2596
|
return this.a.copy(e), this.b.copy(t), this.c.copy(n), this;
|
|
@@ -2608,7 +2608,7 @@ var Zn = class e {
|
|
|
2608
2608
|
return this.a.copy(e.a), this.b.copy(e.b), this.c.copy(e.c), this;
|
|
2609
2609
|
}
|
|
2610
2610
|
getArea() {
|
|
2611
|
-
return
|
|
2611
|
+
return er.subVectors(this.c, this.b), tr.subVectors(this.a, this.b), er.cross(tr).length() * .5;
|
|
2612
2612
|
}
|
|
2613
2613
|
getMidpoint(e) {
|
|
2614
2614
|
return e.addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3);
|
|
@@ -2636,28 +2636,28 @@ var Zn = class e {
|
|
|
2636
2636
|
}
|
|
2637
2637
|
closestPointToPoint(e, t) {
|
|
2638
2638
|
let n = this.a, r = this.b, i = this.c, a, o;
|
|
2639
|
-
|
|
2640
|
-
let s =
|
|
2639
|
+
ir.subVectors(r, n), ar.subVectors(i, n), sr.subVectors(e, n);
|
|
2640
|
+
let s = ir.dot(sr), c = ar.dot(sr);
|
|
2641
2641
|
if (s <= 0 && c <= 0) return t.copy(n);
|
|
2642
|
-
|
|
2643
|
-
let l =
|
|
2642
|
+
cr.subVectors(e, r);
|
|
2643
|
+
let l = ir.dot(cr), u = ar.dot(cr);
|
|
2644
2644
|
if (l >= 0 && u <= l) return t.copy(r);
|
|
2645
2645
|
let d = s * u - l * c;
|
|
2646
|
-
if (d <= 0 && s >= 0 && l <= 0) return a = s / (s - l), t.copy(n).addScaledVector(
|
|
2647
|
-
|
|
2648
|
-
let f =
|
|
2646
|
+
if (d <= 0 && s >= 0 && l <= 0) return a = s / (s - l), t.copy(n).addScaledVector(ir, a);
|
|
2647
|
+
lr.subVectors(e, i);
|
|
2648
|
+
let f = ir.dot(lr), p = ar.dot(lr);
|
|
2649
2649
|
if (p >= 0 && f <= p) return t.copy(i);
|
|
2650
2650
|
let m = f * c - s * p;
|
|
2651
|
-
if (m <= 0 && c >= 0 && p <= 0) return o = c / (c - p), t.copy(n).addScaledVector(
|
|
2651
|
+
if (m <= 0 && c >= 0 && p <= 0) return o = c / (c - p), t.copy(n).addScaledVector(ar, o);
|
|
2652
2652
|
let h = l * p - f * u;
|
|
2653
|
-
if (h <= 0 && u - l >= 0 && f - p >= 0) return
|
|
2653
|
+
if (h <= 0 && u - l >= 0 && f - p >= 0) return or.subVectors(i, r), o = (u - l) / (u - l + (f - p)), t.copy(r).addScaledVector(or, o);
|
|
2654
2654
|
let g = 1 / (h + m + d);
|
|
2655
|
-
return a = m * g, o = d * g, t.copy(n).addScaledVector(
|
|
2655
|
+
return a = m * g, o = d * g, t.copy(n).addScaledVector(ir, a).addScaledVector(ar, o);
|
|
2656
2656
|
}
|
|
2657
2657
|
equals(e) {
|
|
2658
2658
|
return e.a.equals(this.a) && e.b.equals(this.b) && e.c.equals(this.c);
|
|
2659
2659
|
}
|
|
2660
|
-
},
|
|
2660
|
+
}, mr = class {
|
|
2661
2661
|
constructor(e = new I(Infinity, Infinity, Infinity), t = new I(-Infinity, -Infinity, -Infinity)) {
|
|
2662
2662
|
this.isBox3 = !0, this.min = e, this.max = t;
|
|
2663
2663
|
}
|
|
@@ -2666,12 +2666,12 @@ var Zn = class e {
|
|
|
2666
2666
|
}
|
|
2667
2667
|
setFromArray(e) {
|
|
2668
2668
|
this.makeEmpty();
|
|
2669
|
-
for (let t = 0, n = e.length; t < n; t += 3) this.expandByPoint(
|
|
2669
|
+
for (let t = 0, n = e.length; t < n; t += 3) this.expandByPoint(gr.fromArray(e, t));
|
|
2670
2670
|
return this;
|
|
2671
2671
|
}
|
|
2672
2672
|
setFromBufferAttribute(e) {
|
|
2673
2673
|
this.makeEmpty();
|
|
2674
|
-
for (let t = 0, n = e.count; t < n; t++) this.expandByPoint(
|
|
2674
|
+
for (let t = 0, n = e.count; t < n; t++) this.expandByPoint(gr.fromBufferAttribute(e, t));
|
|
2675
2675
|
return this;
|
|
2676
2676
|
}
|
|
2677
2677
|
setFromPoints(e) {
|
|
@@ -2680,7 +2680,7 @@ var Zn = class e {
|
|
|
2680
2680
|
return this;
|
|
2681
2681
|
}
|
|
2682
2682
|
setFromCenterAndSize(e, t) {
|
|
2683
|
-
let n =
|
|
2683
|
+
let n = gr.copy(t).multiplyScalar(.5);
|
|
2684
2684
|
return this.min.copy(e).sub(n), this.max.copy(e).add(n), this;
|
|
2685
2685
|
}
|
|
2686
2686
|
setFromObject(e, t = !1) {
|
|
@@ -2718,8 +2718,8 @@ var Zn = class e {
|
|
|
2718
2718
|
let n = e.geometry;
|
|
2719
2719
|
if (n !== void 0) {
|
|
2720
2720
|
let r = n.getAttribute("position");
|
|
2721
|
-
if (t === !0 && r !== void 0 && e.isInstancedMesh !== !0) for (let t = 0, n = r.count; t < n; t++) e.isMesh === !0 ? e.getVertexPosition(t,
|
|
2722
|
-
else e.boundingBox === void 0 ? (n.boundingBox === null && n.computeBoundingBox(),
|
|
2721
|
+
if (t === !0 && r !== void 0 && e.isInstancedMesh !== !0) for (let t = 0, n = r.count; t < n; t++) e.isMesh === !0 ? e.getVertexPosition(t, gr) : gr.fromBufferAttribute(r, t), gr.applyMatrix4(e.matrixWorld), this.expandByPoint(gr);
|
|
2722
|
+
else e.boundingBox === void 0 ? (n.boundingBox === null && n.computeBoundingBox(), _r.copy(n.boundingBox)) : (e.boundingBox === null && e.computeBoundingBox(), _r.copy(e.boundingBox)), _r.applyMatrix4(e.matrixWorld), this.union(_r);
|
|
2723
2723
|
}
|
|
2724
2724
|
let r = e.children;
|
|
2725
2725
|
for (let e = 0, n = r.length; e < n; e++) this.expandByObject(r[e], t);
|
|
@@ -2738,7 +2738,7 @@ var Zn = class e {
|
|
|
2738
2738
|
return e.max.x >= this.min.x && e.min.x <= this.max.x && e.max.y >= this.min.y && e.min.y <= this.max.y && e.max.z >= this.min.z && e.min.z <= this.max.z;
|
|
2739
2739
|
}
|
|
2740
2740
|
intersectsSphere(e) {
|
|
2741
|
-
return this.clampPoint(e.center,
|
|
2741
|
+
return this.clampPoint(e.center, gr), gr.distanceToSquared(e.center) <= e.radius * e.radius;
|
|
2742
2742
|
}
|
|
2743
2743
|
intersectsPlane(e) {
|
|
2744
2744
|
let t, n;
|
|
@@ -2746,37 +2746,37 @@ var Zn = class e {
|
|
|
2746
2746
|
}
|
|
2747
2747
|
intersectsTriangle(e) {
|
|
2748
2748
|
if (this.isEmpty()) return !1;
|
|
2749
|
-
this.getCenter(
|
|
2749
|
+
this.getCenter(wr), Tr.subVectors(this.max, wr), vr.subVectors(e.a, wr), yr.subVectors(e.b, wr), br.subVectors(e.c, wr), xr.subVectors(yr, vr), Sr.subVectors(br, yr), Cr.subVectors(vr, br);
|
|
2750
2750
|
let t = [
|
|
2751
|
-
0,
|
|
2752
|
-
-br.z,
|
|
2753
|
-
br.y,
|
|
2754
2751
|
0,
|
|
2755
2752
|
-xr.z,
|
|
2756
2753
|
xr.y,
|
|
2757
2754
|
0,
|
|
2758
2755
|
-Sr.z,
|
|
2759
2756
|
Sr.y,
|
|
2760
|
-
br.z,
|
|
2761
2757
|
0,
|
|
2762
|
-
-
|
|
2758
|
+
-Cr.z,
|
|
2759
|
+
Cr.y,
|
|
2763
2760
|
xr.z,
|
|
2764
2761
|
0,
|
|
2765
2762
|
-xr.x,
|
|
2766
2763
|
Sr.z,
|
|
2767
2764
|
0,
|
|
2768
2765
|
-Sr.x,
|
|
2769
|
-
|
|
2770
|
-
br.x,
|
|
2766
|
+
Cr.z,
|
|
2771
2767
|
0,
|
|
2768
|
+
-Cr.x,
|
|
2772
2769
|
-xr.y,
|
|
2773
2770
|
xr.x,
|
|
2774
2771
|
0,
|
|
2775
2772
|
-Sr.y,
|
|
2776
2773
|
Sr.x,
|
|
2774
|
+
0,
|
|
2775
|
+
-Cr.y,
|
|
2776
|
+
Cr.x,
|
|
2777
2777
|
0
|
|
2778
2778
|
];
|
|
2779
|
-
return !
|
|
2779
|
+
return !Or(t, vr, yr, br, Tr) || (t = [
|
|
2780
2780
|
1,
|
|
2781
2781
|
0,
|
|
2782
2782
|
0,
|
|
@@ -2786,20 +2786,20 @@ var Zn = class e {
|
|
|
2786
2786
|
0,
|
|
2787
2787
|
0,
|
|
2788
2788
|
1
|
|
2789
|
-
], !
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
],
|
|
2789
|
+
], !Or(t, vr, yr, br, Tr)) ? !1 : (Er.crossVectors(xr, Sr), t = [
|
|
2790
|
+
Er.x,
|
|
2791
|
+
Er.y,
|
|
2792
|
+
Er.z
|
|
2793
|
+
], Or(t, vr, yr, br, Tr));
|
|
2794
2794
|
}
|
|
2795
2795
|
clampPoint(e, t) {
|
|
2796
2796
|
return t.copy(e).clamp(this.min, this.max);
|
|
2797
2797
|
}
|
|
2798
2798
|
distanceToPoint(e) {
|
|
2799
|
-
return this.clampPoint(e,
|
|
2799
|
+
return this.clampPoint(e, gr).distanceTo(e);
|
|
2800
2800
|
}
|
|
2801
2801
|
getBoundingSphere(e) {
|
|
2802
|
-
return this.isEmpty() ? e.makeEmpty() : (this.getCenter(e.center), e.radius = this.getSize(
|
|
2802
|
+
return this.isEmpty() ? e.makeEmpty() : (this.getCenter(e.center), e.radius = this.getSize(gr).length() * .5), e;
|
|
2803
2803
|
}
|
|
2804
2804
|
intersect(e) {
|
|
2805
2805
|
return this.min.max(e.min), this.max.min(e.max), this.isEmpty() && this.makeEmpty(), this;
|
|
@@ -2808,7 +2808,7 @@ var Zn = class e {
|
|
|
2808
2808
|
return this.min.min(e.min), this.max.max(e.max), this;
|
|
2809
2809
|
}
|
|
2810
2810
|
applyMatrix4(e) {
|
|
2811
|
-
return this.isEmpty() ? this : (
|
|
2811
|
+
return this.isEmpty() ? this : (hr[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(e), hr[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(e), hr[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(e), hr[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(e), hr[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(e), hr[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(e), hr[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(e), hr[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(e), this.setFromPoints(hr), this);
|
|
2812
2812
|
}
|
|
2813
2813
|
translate(e) {
|
|
2814
2814
|
return this.min.add(e), this.max.add(e), this;
|
|
@@ -2825,7 +2825,7 @@ var Zn = class e {
|
|
|
2825
2825
|
fromJSON(e) {
|
|
2826
2826
|
return this.min.fromArray(e.min), this.max.fromArray(e.max), this;
|
|
2827
2827
|
}
|
|
2828
|
-
},
|
|
2828
|
+
}, hr = [
|
|
2829
2829
|
/* @__PURE__ */ new I(),
|
|
2830
2830
|
/* @__PURE__ */ new I(),
|
|
2831
2831
|
/* @__PURE__ */ new I(),
|
|
@@ -2834,17 +2834,17 @@ var Zn = class e {
|
|
|
2834
2834
|
/* @__PURE__ */ new I(),
|
|
2835
2835
|
/* @__PURE__ */ new I(),
|
|
2836
2836
|
/* @__PURE__ */ new I()
|
|
2837
|
-
],
|
|
2838
|
-
function
|
|
2837
|
+
], gr = /* @__PURE__ */ new I(), _r = /* @__PURE__ */ new mr(), vr = /* @__PURE__ */ new I(), yr = /* @__PURE__ */ new I(), br = /* @__PURE__ */ new I(), xr = /* @__PURE__ */ new I(), Sr = /* @__PURE__ */ new I(), Cr = /* @__PURE__ */ new I(), wr = /* @__PURE__ */ new I(), Tr = /* @__PURE__ */ new I(), Er = /* @__PURE__ */ new I(), Dr = /* @__PURE__ */ new I();
|
|
2838
|
+
function Or(e, t, n, r, i) {
|
|
2839
2839
|
for (let a = 0, o = e.length - 3; a <= o; a += 3) {
|
|
2840
|
-
|
|
2841
|
-
let o = i.x * Math.abs(
|
|
2840
|
+
Dr.fromArray(e, a);
|
|
2841
|
+
let o = i.x * Math.abs(Dr.x) + i.y * Math.abs(Dr.y) + i.z * Math.abs(Dr.z), s = t.dot(Dr), c = n.dot(Dr), l = r.dot(Dr);
|
|
2842
2842
|
if (Math.max(-Math.max(s, c, l), Math.min(s, c, l)) > o) return !1;
|
|
2843
2843
|
}
|
|
2844
2844
|
return !0;
|
|
2845
2845
|
}
|
|
2846
|
-
var
|
|
2847
|
-
function
|
|
2846
|
+
var kr = /* @__PURE__ */ Ar();
|
|
2847
|
+
function Ar() {
|
|
2848
2848
|
let e = /* @__PURE__ */ new ArrayBuffer(4), t = new Float32Array(e), n = new Uint32Array(e), r = new Uint32Array(512), i = new Uint32Array(512);
|
|
2849
2849
|
for (let e = 0; e < 256; ++e) {
|
|
2850
2850
|
let t = e - 127;
|
|
@@ -2872,26 +2872,26 @@ function kr() {
|
|
|
2872
2872
|
offsetTable: s
|
|
2873
2873
|
};
|
|
2874
2874
|
}
|
|
2875
|
-
function
|
|
2876
|
-
Math.abs(e) > 65504 && k("DataUtils.toHalfFloat(): Value out of range."), e = M(e, -65504, 65504),
|
|
2877
|
-
let t =
|
|
2878
|
-
return
|
|
2875
|
+
function W(e) {
|
|
2876
|
+
Math.abs(e) > 65504 && k("DataUtils.toHalfFloat(): Value out of range."), e = M(e, -65504, 65504), kr.floatView[0] = e;
|
|
2877
|
+
let t = kr.uint32View[0], n = t >> 23 & 511;
|
|
2878
|
+
return kr.baseTable[n] + ((t & 8388607) >> kr.shiftTable[n]);
|
|
2879
2879
|
}
|
|
2880
|
-
function
|
|
2880
|
+
function jr(e) {
|
|
2881
2881
|
let t = e >> 10;
|
|
2882
|
-
return
|
|
2882
|
+
return kr.uint32View[0] = kr.mantissaTable[kr.offsetTable[t] + (e & 1023)] + kr.exponentTable[t], kr.floatView[0];
|
|
2883
2883
|
}
|
|
2884
|
-
var
|
|
2884
|
+
var Mr = class {
|
|
2885
2885
|
static toHalfFloat(e) {
|
|
2886
|
-
return
|
|
2886
|
+
return W(e);
|
|
2887
2887
|
}
|
|
2888
2888
|
static fromHalfFloat(e) {
|
|
2889
|
-
return
|
|
2889
|
+
return jr(e);
|
|
2890
2890
|
}
|
|
2891
|
-
},
|
|
2891
|
+
}, G = /* @__PURE__ */ new I(), Nr = /* @__PURE__ */ new F(), Pr = 0, Fr = class {
|
|
2892
2892
|
constructor(e, t, n = !1) {
|
|
2893
2893
|
if (Array.isArray(e)) throw TypeError("THREE.BufferAttribute: array should be a Typed Array.");
|
|
2894
|
-
this.isBufferAttribute = !0, Object.defineProperty(this, "id", { value:
|
|
2894
|
+
this.isBufferAttribute = !0, Object.defineProperty(this, "id", { value: Pr++ }), this.name = "", this.array = e, this.itemSize = t, this.count = e === void 0 ? 0 : e.length / t, this.normalized = n, this.usage = lt, this.updateRanges = [], this.gpuType = v, this.version = 0;
|
|
2895
2895
|
}
|
|
2896
2896
|
onUploadCallback() {}
|
|
2897
2897
|
set needsUpdate(e) {
|
|
@@ -2921,20 +2921,20 @@ var jr = class {
|
|
|
2921
2921
|
return this.array.set(e), this;
|
|
2922
2922
|
}
|
|
2923
2923
|
applyMatrix3(e) {
|
|
2924
|
-
if (this.itemSize === 2) for (let t = 0, n = this.count; t < n; t++)
|
|
2925
|
-
else if (this.itemSize === 3) for (let t = 0, n = this.count; t < n; t++)
|
|
2924
|
+
if (this.itemSize === 2) for (let t = 0, n = this.count; t < n; t++) Nr.fromBufferAttribute(this, t), Nr.applyMatrix3(e), this.setXY(t, Nr.x, Nr.y);
|
|
2925
|
+
else if (this.itemSize === 3) for (let t = 0, n = this.count; t < n; t++) G.fromBufferAttribute(this, t), G.applyMatrix3(e), this.setXYZ(t, G.x, G.y, G.z);
|
|
2926
2926
|
return this;
|
|
2927
2927
|
}
|
|
2928
2928
|
applyMatrix4(e) {
|
|
2929
|
-
for (let t = 0, n = this.count; t < n; t++)
|
|
2929
|
+
for (let t = 0, n = this.count; t < n; t++) G.fromBufferAttribute(this, t), G.applyMatrix4(e), this.setXYZ(t, G.x, G.y, G.z);
|
|
2930
2930
|
return this;
|
|
2931
2931
|
}
|
|
2932
2932
|
applyNormalMatrix(e) {
|
|
2933
|
-
for (let t = 0, n = this.count; t < n; t++)
|
|
2933
|
+
for (let t = 0, n = this.count; t < n; t++) G.fromBufferAttribute(this, t), G.applyNormalMatrix(e), this.setXYZ(t, G.x, G.y, G.z);
|
|
2934
2934
|
return this;
|
|
2935
2935
|
}
|
|
2936
2936
|
transformDirection(e) {
|
|
2937
|
-
for (let t = 0, n = this.count; t < n; t++)
|
|
2937
|
+
for (let t = 0, n = this.count; t < n; t++) G.fromBufferAttribute(this, t), G.transformDirection(e), this.setXYZ(t, G.x, G.y, G.z);
|
|
2938
2938
|
return this;
|
|
2939
2939
|
}
|
|
2940
2940
|
set(e, t = 0) {
|
|
@@ -2999,60 +2999,60 @@ var jr = class {
|
|
|
2999
2999
|
};
|
|
3000
3000
|
return this.name !== "" && (e.name = this.name), this.usage !== 35044 && (e.usage = this.usage), e;
|
|
3001
3001
|
}
|
|
3002
|
-
},
|
|
3002
|
+
}, Ir = class extends Fr {
|
|
3003
3003
|
constructor(e, t, n) {
|
|
3004
3004
|
super(new Uint16Array(e), t, n);
|
|
3005
3005
|
}
|
|
3006
|
-
},
|
|
3006
|
+
}, Lr = class extends Fr {
|
|
3007
3007
|
constructor(e, t, n) {
|
|
3008
3008
|
super(new Uint32Array(e), t, n);
|
|
3009
3009
|
}
|
|
3010
|
-
},
|
|
3010
|
+
}, Rr = class extends Fr {
|
|
3011
3011
|
constructor(e, t, n) {
|
|
3012
3012
|
super(new Uint16Array(e), t, n), this.isFloat16BufferAttribute = !0;
|
|
3013
3013
|
}
|
|
3014
3014
|
getX(e) {
|
|
3015
|
-
let t =
|
|
3015
|
+
let t = jr(this.array[e * this.itemSize]);
|
|
3016
3016
|
return this.normalized && (t = N(t, this.array)), t;
|
|
3017
3017
|
}
|
|
3018
3018
|
setX(e, t) {
|
|
3019
|
-
return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize] =
|
|
3019
|
+
return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize] = W(t), this;
|
|
3020
3020
|
}
|
|
3021
3021
|
getY(e) {
|
|
3022
|
-
let t =
|
|
3022
|
+
let t = jr(this.array[e * this.itemSize + 1]);
|
|
3023
3023
|
return this.normalized && (t = N(t, this.array)), t;
|
|
3024
3024
|
}
|
|
3025
3025
|
setY(e, t) {
|
|
3026
|
-
return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize + 1] =
|
|
3026
|
+
return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize + 1] = W(t), this;
|
|
3027
3027
|
}
|
|
3028
3028
|
getZ(e) {
|
|
3029
|
-
let t =
|
|
3029
|
+
let t = jr(this.array[e * this.itemSize + 2]);
|
|
3030
3030
|
return this.normalized && (t = N(t, this.array)), t;
|
|
3031
3031
|
}
|
|
3032
3032
|
setZ(e, t) {
|
|
3033
|
-
return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize + 2] =
|
|
3033
|
+
return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize + 2] = W(t), this;
|
|
3034
3034
|
}
|
|
3035
3035
|
getW(e) {
|
|
3036
|
-
let t =
|
|
3036
|
+
let t = jr(this.array[e * this.itemSize + 3]);
|
|
3037
3037
|
return this.normalized && (t = N(t, this.array)), t;
|
|
3038
3038
|
}
|
|
3039
3039
|
setW(e, t) {
|
|
3040
|
-
return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize + 3] =
|
|
3040
|
+
return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize + 3] = W(t), this;
|
|
3041
3041
|
}
|
|
3042
3042
|
setXY(e, t, n) {
|
|
3043
|
-
return e *= this.itemSize, this.normalized && (t = P(t, this.array), n = P(n, this.array)), this.array[e + 0] =
|
|
3043
|
+
return e *= this.itemSize, this.normalized && (t = P(t, this.array), n = P(n, this.array)), this.array[e + 0] = W(t), this.array[e + 1] = W(n), this;
|
|
3044
3044
|
}
|
|
3045
3045
|
setXYZ(e, t, n, r) {
|
|
3046
|
-
return e *= this.itemSize, this.normalized && (t = P(t, this.array), n = P(n, this.array), r = P(r, this.array)), this.array[e + 0] =
|
|
3046
|
+
return e *= this.itemSize, this.normalized && (t = P(t, this.array), n = P(n, this.array), r = P(r, this.array)), this.array[e + 0] = W(t), this.array[e + 1] = W(n), this.array[e + 2] = W(r), this;
|
|
3047
3047
|
}
|
|
3048
3048
|
setXYZW(e, t, n, r, i) {
|
|
3049
|
-
return e *= this.itemSize, this.normalized && (t = P(t, this.array), n = P(n, this.array), r = P(r, this.array), i = P(i, this.array)), this.array[e + 0] =
|
|
3049
|
+
return e *= this.itemSize, this.normalized && (t = P(t, this.array), n = P(n, this.array), r = P(r, this.array), i = P(i, this.array)), this.array[e + 0] = W(t), this.array[e + 1] = W(n), this.array[e + 2] = W(r), this.array[e + 3] = W(i), this;
|
|
3050
3050
|
}
|
|
3051
|
-
},
|
|
3051
|
+
}, K = class extends Fr {
|
|
3052
3052
|
constructor(e, t, n) {
|
|
3053
3053
|
super(new Float32Array(e), t, n);
|
|
3054
3054
|
}
|
|
3055
|
-
},
|
|
3055
|
+
}, zr = /* @__PURE__ */ new mr(), Br = /* @__PURE__ */ new I(), Vr = /* @__PURE__ */ new I(), Hr = class {
|
|
3056
3056
|
constructor(e = new I(), t = -1) {
|
|
3057
3057
|
this.isSphere = !0, this.center = e, this.radius = t;
|
|
3058
3058
|
}
|
|
@@ -3061,7 +3061,7 @@ var jr = class {
|
|
|
3061
3061
|
}
|
|
3062
3062
|
setFromPoints(e, t) {
|
|
3063
3063
|
let n = this.center;
|
|
3064
|
-
t === void 0 ?
|
|
3064
|
+
t === void 0 ? zr.setFromPoints(e).getCenter(n) : n.copy(t);
|
|
3065
3065
|
let r = 0;
|
|
3066
3066
|
for (let t = 0, i = e.length; t < i; t++) r = Math.max(r, n.distanceToSquared(e[t]));
|
|
3067
3067
|
return this.radius = Math.sqrt(r), this;
|
|
@@ -3106,16 +3106,16 @@ var jr = class {
|
|
|
3106
3106
|
}
|
|
3107
3107
|
expandByPoint(e) {
|
|
3108
3108
|
if (this.isEmpty()) return this.center.copy(e), this.radius = 0, this;
|
|
3109
|
-
|
|
3110
|
-
let t =
|
|
3109
|
+
Br.subVectors(e, this.center);
|
|
3110
|
+
let t = Br.lengthSq();
|
|
3111
3111
|
if (t > this.radius * this.radius) {
|
|
3112
3112
|
let e = Math.sqrt(t), n = (e - this.radius) * .5;
|
|
3113
|
-
this.center.addScaledVector(
|
|
3113
|
+
this.center.addScaledVector(Br, n / e), this.radius += n;
|
|
3114
3114
|
}
|
|
3115
3115
|
return this;
|
|
3116
3116
|
}
|
|
3117
3117
|
union(e) {
|
|
3118
|
-
return e.isEmpty() ? this : this.isEmpty() ? (this.copy(e), this) : (this.center.equals(e.center) === !0 ? this.radius = Math.max(this.radius, e.radius) : (
|
|
3118
|
+
return e.isEmpty() ? this : this.isEmpty() ? (this.copy(e), this) : (this.center.equals(e.center) === !0 ? this.radius = Math.max(this.radius, e.radius) : (Vr.subVectors(e.center, this.center).setLength(e.radius), this.expandByPoint(Br.copy(e.center).add(Vr)), this.expandByPoint(Br.copy(e.center).sub(Vr))), this);
|
|
3119
3119
|
}
|
|
3120
3120
|
equals(e) {
|
|
3121
3121
|
return e.center.equals(this.center) && e.radius === this.radius;
|
|
@@ -3132,9 +3132,9 @@ var jr = class {
|
|
|
3132
3132
|
fromJSON(e) {
|
|
3133
3133
|
return this.radius = e.radius, this.center.fromArray(e.center), this;
|
|
3134
3134
|
}
|
|
3135
|
-
},
|
|
3135
|
+
}, Ur = 0, Wr = /* @__PURE__ */ new z(), Gr = /* @__PURE__ */ new V(), Kr = /* @__PURE__ */ new I(), qr = /* @__PURE__ */ new mr(), Jr = /* @__PURE__ */ new mr(), q = /* @__PURE__ */ new I(), Yr = class e extends Dt {
|
|
3136
3136
|
constructor() {
|
|
3137
|
-
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value:
|
|
3137
|
+
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: Ur++ }), this.uuid = jt(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.indirectOffset = 0, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = {
|
|
3138
3138
|
start: 0,
|
|
3139
3139
|
count: Infinity
|
|
3140
3140
|
}, this.userData = {};
|
|
@@ -3143,7 +3143,7 @@ var jr = class {
|
|
|
3143
3143
|
return this.index;
|
|
3144
3144
|
}
|
|
3145
3145
|
setIndex(e) {
|
|
3146
|
-
return Array.isArray(e) ? this.index = new (
|
|
3146
|
+
return Array.isArray(e) ? this.index = new (gt(e) ? Lr : Ir)(e, 1) : this.index = e, this;
|
|
3147
3147
|
}
|
|
3148
3148
|
setIndirect(e, t = 0) {
|
|
3149
3149
|
return this.indirect = e, this.indirectOffset = t, this;
|
|
@@ -3181,35 +3181,35 @@ var jr = class {
|
|
|
3181
3181
|
t !== void 0 && (t.applyMatrix4(e), t.needsUpdate = !0);
|
|
3182
3182
|
let n = this.attributes.normal;
|
|
3183
3183
|
if (n !== void 0) {
|
|
3184
|
-
let t = new
|
|
3184
|
+
let t = new en().getNormalMatrix(e);
|
|
3185
3185
|
n.applyNormalMatrix(t), n.needsUpdate = !0;
|
|
3186
3186
|
}
|
|
3187
3187
|
let r = this.attributes.tangent;
|
|
3188
3188
|
return r !== void 0 && (r.transformDirection(e), r.needsUpdate = !0), this.boundingBox !== null && this.computeBoundingBox(), this.boundingSphere !== null && this.computeBoundingSphere(), this;
|
|
3189
3189
|
}
|
|
3190
3190
|
applyQuaternion(e) {
|
|
3191
|
-
return
|
|
3191
|
+
return Wr.makeRotationFromQuaternion(e), this.applyMatrix4(Wr), this;
|
|
3192
3192
|
}
|
|
3193
3193
|
rotateX(e) {
|
|
3194
|
-
return
|
|
3194
|
+
return Wr.makeRotationX(e), this.applyMatrix4(Wr), this;
|
|
3195
3195
|
}
|
|
3196
3196
|
rotateY(e) {
|
|
3197
|
-
return
|
|
3197
|
+
return Wr.makeRotationY(e), this.applyMatrix4(Wr), this;
|
|
3198
3198
|
}
|
|
3199
3199
|
rotateZ(e) {
|
|
3200
|
-
return
|
|
3200
|
+
return Wr.makeRotationZ(e), this.applyMatrix4(Wr), this;
|
|
3201
3201
|
}
|
|
3202
3202
|
translate(e, t, n) {
|
|
3203
|
-
return
|
|
3203
|
+
return Wr.makeTranslation(e, t, n), this.applyMatrix4(Wr), this;
|
|
3204
3204
|
}
|
|
3205
3205
|
scale(e, t, n) {
|
|
3206
|
-
return
|
|
3206
|
+
return Wr.makeScale(e, t, n), this.applyMatrix4(Wr), this;
|
|
3207
3207
|
}
|
|
3208
3208
|
lookAt(e) {
|
|
3209
|
-
return
|
|
3209
|
+
return Gr.lookAt(e), Gr.updateMatrix(), this.applyMatrix4(Gr.matrix), this;
|
|
3210
3210
|
}
|
|
3211
3211
|
center() {
|
|
3212
|
-
return this.computeBoundingBox(), this.boundingBox.getCenter(
|
|
3212
|
+
return this.computeBoundingBox(), this.boundingBox.getCenter(Kr).negate(), this.translate(Kr.x, Kr.y, Kr.z), this;
|
|
3213
3213
|
}
|
|
3214
3214
|
setFromPoints(e) {
|
|
3215
3215
|
let t = this.getAttribute("position");
|
|
@@ -3219,7 +3219,7 @@ var jr = class {
|
|
|
3219
3219
|
let r = e[n];
|
|
3220
3220
|
t.push(r.x, r.y, r.z || 0);
|
|
3221
3221
|
}
|
|
3222
|
-
this.setAttribute("position", new
|
|
3222
|
+
this.setAttribute("position", new K(t, 3));
|
|
3223
3223
|
} else {
|
|
3224
3224
|
let n = Math.min(e.length, t.count);
|
|
3225
3225
|
for (let r = 0; r < n; r++) {
|
|
@@ -3231,7 +3231,7 @@ var jr = class {
|
|
|
3231
3231
|
return this;
|
|
3232
3232
|
}
|
|
3233
3233
|
computeBoundingBox() {
|
|
3234
|
-
this.boundingBox === null && (this.boundingBox = new
|
|
3234
|
+
this.boundingBox === null && (this.boundingBox = new mr());
|
|
3235
3235
|
let e = this.attributes.position, t = this.morphAttributes.position;
|
|
3236
3236
|
if (e && e.isGLBufferAttribute) {
|
|
3237
3237
|
A("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.", this), this.boundingBox.set(new I(-Infinity, -Infinity, -Infinity), new I(Infinity, Infinity, Infinity));
|
|
@@ -3240,13 +3240,13 @@ var jr = class {
|
|
|
3240
3240
|
if (e !== void 0) {
|
|
3241
3241
|
if (this.boundingBox.setFromBufferAttribute(e), t) for (let e = 0, n = t.length; e < n; e++) {
|
|
3242
3242
|
let n = t[e];
|
|
3243
|
-
|
|
3243
|
+
qr.setFromBufferAttribute(n), this.morphTargetsRelative ? (q.addVectors(this.boundingBox.min, qr.min), this.boundingBox.expandByPoint(q), q.addVectors(this.boundingBox.max, qr.max), this.boundingBox.expandByPoint(q)) : (this.boundingBox.expandByPoint(qr.min), this.boundingBox.expandByPoint(qr.max));
|
|
3244
3244
|
}
|
|
3245
3245
|
} else this.boundingBox.makeEmpty();
|
|
3246
3246
|
(isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) && A("BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.", this);
|
|
3247
3247
|
}
|
|
3248
3248
|
computeBoundingSphere() {
|
|
3249
|
-
this.boundingSphere === null && (this.boundingSphere = new
|
|
3249
|
+
this.boundingSphere === null && (this.boundingSphere = new Hr());
|
|
3250
3250
|
let e = this.attributes.position, t = this.morphAttributes.position;
|
|
3251
3251
|
if (e && e.isGLBufferAttribute) {
|
|
3252
3252
|
A("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.", this), this.boundingSphere.set(new I(), Infinity);
|
|
@@ -3254,16 +3254,16 @@ var jr = class {
|
|
|
3254
3254
|
}
|
|
3255
3255
|
if (e) {
|
|
3256
3256
|
let n = this.boundingSphere.center;
|
|
3257
|
-
if (
|
|
3257
|
+
if (qr.setFromBufferAttribute(e), t) for (let e = 0, n = t.length; e < n; e++) {
|
|
3258
3258
|
let n = t[e];
|
|
3259
|
-
|
|
3259
|
+
Jr.setFromBufferAttribute(n), this.morphTargetsRelative ? (q.addVectors(qr.min, Jr.min), qr.expandByPoint(q), q.addVectors(qr.max, Jr.max), qr.expandByPoint(q)) : (qr.expandByPoint(Jr.min), qr.expandByPoint(Jr.max));
|
|
3260
3260
|
}
|
|
3261
|
-
|
|
3261
|
+
qr.getCenter(n);
|
|
3262
3262
|
let r = 0;
|
|
3263
3263
|
for (let t = 0, i = e.count; t < i; t++) q.fromBufferAttribute(e, t), r = Math.max(r, n.distanceToSquared(q));
|
|
3264
3264
|
if (t) for (let i = 0, a = t.length; i < a; i++) {
|
|
3265
3265
|
let a = t[i], o = this.morphTargetsRelative;
|
|
3266
|
-
for (let t = 0, i = a.count; t < i; t++) q.fromBufferAttribute(a, t), o && (
|
|
3266
|
+
for (let t = 0, i = a.count; t < i; t++) q.fromBufferAttribute(a, t), o && (Kr.fromBufferAttribute(e, t), q.add(Kr)), r = Math.max(r, n.distanceToSquared(q));
|
|
3267
3267
|
}
|
|
3268
3268
|
this.boundingSphere.radius = Math.sqrt(r), isNaN(this.boundingSphere.radius) && A("BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.", this);
|
|
3269
3269
|
}
|
|
@@ -3275,7 +3275,7 @@ var jr = class {
|
|
|
3275
3275
|
return;
|
|
3276
3276
|
}
|
|
3277
3277
|
let n = t.position, r = t.normal, i = t.uv;
|
|
3278
|
-
this.hasAttribute("tangent") === !1 && this.setAttribute("tangent", new
|
|
3278
|
+
this.hasAttribute("tangent") === !1 && this.setAttribute("tangent", new Fr(new Float32Array(4 * n.count), 4));
|
|
3279
3279
|
let a = this.getAttribute("tangent"), o = [], s = [];
|
|
3280
3280
|
for (let e = 0; e < n.count; e++) o[e] = new I(), s[e] = new I();
|
|
3281
3281
|
let c = new I(), l = new I(), u = new I(), d = new F(), f = new F(), p = new F(), m = new I(), h = new I();
|
|
@@ -3310,7 +3310,7 @@ var jr = class {
|
|
|
3310
3310
|
let e = this.index, t = this.getAttribute("position");
|
|
3311
3311
|
if (t !== void 0) {
|
|
3312
3312
|
let n = this.getAttribute("normal");
|
|
3313
|
-
if (n === void 0) n = new
|
|
3313
|
+
if (n === void 0) n = new Fr(new Float32Array(t.count * 3), 3), this.setAttribute("normal", n);
|
|
3314
3314
|
else for (let e = 0, t = n.count; e < t; e++) n.setXYZ(e, 0, 0, 0);
|
|
3315
3315
|
let r = new I(), i = new I(), a = new I(), o = new I(), s = new I(), c = new I(), l = new I(), u = new I();
|
|
3316
3316
|
if (e) for (let d = 0, f = e.count; d < f; d += 3) {
|
|
@@ -3332,7 +3332,7 @@ var jr = class {
|
|
|
3332
3332
|
o = e.isInterleavedBufferAttribute ? t[i] * e.data.stride + e.offset : t[i] * r;
|
|
3333
3333
|
for (let e = 0; e < r; e++) a[s++] = n[o++];
|
|
3334
3334
|
}
|
|
3335
|
-
return new
|
|
3335
|
+
return new Fr(a, r, i);
|
|
3336
3336
|
}
|
|
3337
3337
|
if (this.index === null) return k("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."), this;
|
|
3338
3338
|
let n = new e(), r = this.index.array, i = this.attributes;
|
|
@@ -3428,9 +3428,9 @@ var jr = class {
|
|
|
3428
3428
|
dispose() {
|
|
3429
3429
|
this.dispatchEvent({ type: "dispose" });
|
|
3430
3430
|
}
|
|
3431
|
-
},
|
|
3431
|
+
}, Xr = class {
|
|
3432
3432
|
constructor(e, t) {
|
|
3433
|
-
this.isInterleavedBuffer = !0, this.array = e, this.stride = t, this.count = e === void 0 ? 0 : e.length / t, this.usage =
|
|
3433
|
+
this.isInterleavedBuffer = !0, this.array = e, this.stride = t, this.count = e === void 0 ? 0 : e.length / t, this.usage = lt, this.updateRanges = [], this.version = 0, this.uuid = jt();
|
|
3434
3434
|
}
|
|
3435
3435
|
onUploadCallback() {}
|
|
3436
3436
|
set needsUpdate(e) {
|
|
@@ -3460,7 +3460,7 @@ var jr = class {
|
|
|
3460
3460
|
return this.array.set(e, t), this;
|
|
3461
3461
|
}
|
|
3462
3462
|
clone(e) {
|
|
3463
|
-
e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid =
|
|
3463
|
+
e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = jt()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer);
|
|
3464
3464
|
let t = new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]), n = new this.constructor(t, this.stride);
|
|
3465
3465
|
return n.setUsage(this.usage), n;
|
|
3466
3466
|
}
|
|
@@ -3468,14 +3468,14 @@ var jr = class {
|
|
|
3468
3468
|
return this.onUploadCallback = e, this;
|
|
3469
3469
|
}
|
|
3470
3470
|
toJSON(e) {
|
|
3471
|
-
return e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid =
|
|
3471
|
+
return e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = jt()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = Array.from(new Uint32Array(this.array.buffer))), {
|
|
3472
3472
|
uuid: this.uuid,
|
|
3473
3473
|
buffer: this.array.buffer._uuid,
|
|
3474
3474
|
type: this.array.constructor.name,
|
|
3475
3475
|
stride: this.stride
|
|
3476
3476
|
};
|
|
3477
3477
|
}
|
|
3478
|
-
}, J = /* @__PURE__ */ new I(),
|
|
3478
|
+
}, J = /* @__PURE__ */ new I(), Zr = class e {
|
|
3479
3479
|
constructor(e, t, n, r = !1) {
|
|
3480
3480
|
this.isInterleavedBufferAttribute = !0, this.name = "", this.data = e, this.itemSize = t, this.offset = n, this.normalized = r;
|
|
3481
3481
|
}
|
|
@@ -3546,18 +3546,18 @@ var jr = class {
|
|
|
3546
3546
|
}
|
|
3547
3547
|
clone(t) {
|
|
3548
3548
|
if (t === void 0) {
|
|
3549
|
-
|
|
3549
|
+
St("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");
|
|
3550
3550
|
let e = [];
|
|
3551
3551
|
for (let t = 0; t < this.count; t++) {
|
|
3552
3552
|
let n = t * this.data.stride + this.offset;
|
|
3553
3553
|
for (let t = 0; t < this.itemSize; t++) e.push(this.data.array[n + t]);
|
|
3554
3554
|
}
|
|
3555
|
-
return new
|
|
3555
|
+
return new Fr(new this.array.constructor(e), this.itemSize, this.normalized);
|
|
3556
3556
|
} else return t.interleavedBuffers === void 0 && (t.interleavedBuffers = {}), t.interleavedBuffers[this.data.uuid] === void 0 && (t.interleavedBuffers[this.data.uuid] = this.data.clone(t)), new e(t.interleavedBuffers[this.data.uuid], this.itemSize, this.offset, this.normalized);
|
|
3557
3557
|
}
|
|
3558
3558
|
toJSON(e) {
|
|
3559
3559
|
if (e === void 0) {
|
|
3560
|
-
|
|
3560
|
+
St("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");
|
|
3561
3561
|
let e = [];
|
|
3562
3562
|
for (let t = 0; t < this.count; t++) {
|
|
3563
3563
|
let n = t * this.data.stride + this.offset;
|
|
@@ -3577,9 +3577,9 @@ var jr = class {
|
|
|
3577
3577
|
normalized: this.normalized
|
|
3578
3578
|
};
|
|
3579
3579
|
}
|
|
3580
|
-
},
|
|
3580
|
+
}, Qr = 0, Y = class extends Dt {
|
|
3581
3581
|
constructor() {
|
|
3582
|
-
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value:
|
|
3582
|
+
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: Qr++ }), this.uuid = jt(), this.name = "", this.type = "Material", this.blending = 1, this.side = 0, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = 204, this.blendDst = 205, this.blendEquation = 100, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new H(0, 0, 0), this.blendAlpha = 0, this.depthFunc = 3, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = 519, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = nt, this.stencilZFail = nt, this.stencilZPass = nt, 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;
|
|
3583
3583
|
}
|
|
3584
3584
|
get alphaTest() {
|
|
3585
3585
|
return this._alphaTest;
|
|
@@ -3652,14 +3652,14 @@ var jr = class {
|
|
|
3652
3652
|
set needsUpdate(e) {
|
|
3653
3653
|
e === !0 && this.version++;
|
|
3654
3654
|
}
|
|
3655
|
-
},
|
|
3655
|
+
}, $r = class extends Y {
|
|
3656
3656
|
constructor(e) {
|
|
3657
|
-
super(), this.isSpriteMaterial = !0, this.type = "SpriteMaterial", this.color = new
|
|
3657
|
+
super(), this.isSpriteMaterial = !0, this.type = "SpriteMaterial", this.color = new H(16777215), this.map = null, this.alphaMap = null, this.rotation = 0, this.sizeAttenuation = !0, this.transparent = !0, this.fog = !0, this.setValues(e);
|
|
3658
3658
|
}
|
|
3659
3659
|
copy(e) {
|
|
3660
3660
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.alphaMap = e.alphaMap, this.rotation = e.rotation, this.sizeAttenuation = e.sizeAttenuation, this.fog = e.fog, this;
|
|
3661
3661
|
}
|
|
3662
|
-
},
|
|
3662
|
+
}, ei = /* @__PURE__ */ new I(), ti = /* @__PURE__ */ new I(), ni = /* @__PURE__ */ new I(), ri = /* @__PURE__ */ new I(), ii = /* @__PURE__ */ new I(), ai = /* @__PURE__ */ new I(), oi = /* @__PURE__ */ new I(), si = class {
|
|
3663
3663
|
constructor(e = new I(), t = new I(0, 0, -1)) {
|
|
3664
3664
|
this.origin = e, this.direction = t;
|
|
3665
3665
|
}
|
|
@@ -3676,7 +3676,7 @@ var jr = class {
|
|
|
3676
3676
|
return this.direction.copy(e).sub(this.origin).normalize(), this;
|
|
3677
3677
|
}
|
|
3678
3678
|
recast(e) {
|
|
3679
|
-
return this.origin.copy(this.at(e,
|
|
3679
|
+
return this.origin.copy(this.at(e, ei)), this;
|
|
3680
3680
|
}
|
|
3681
3681
|
closestPointToPoint(e, t) {
|
|
3682
3682
|
t.subVectors(e, this.origin);
|
|
@@ -3687,12 +3687,12 @@ var jr = class {
|
|
|
3687
3687
|
return Math.sqrt(this.distanceSqToPoint(e));
|
|
3688
3688
|
}
|
|
3689
3689
|
distanceSqToPoint(e) {
|
|
3690
|
-
let t =
|
|
3691
|
-
return t < 0 ? this.origin.distanceToSquared(e) : (
|
|
3690
|
+
let t = ei.subVectors(e, this.origin).dot(this.direction);
|
|
3691
|
+
return t < 0 ? this.origin.distanceToSquared(e) : (ei.copy(this.origin).addScaledVector(this.direction, t), ei.distanceToSquared(e));
|
|
3692
3692
|
}
|
|
3693
3693
|
distanceSqToSegment(e, t, n, r) {
|
|
3694
|
-
|
|
3695
|
-
let i = e.distanceTo(t) * .5, a = -this.direction.dot(
|
|
3694
|
+
ti.copy(e).add(t).multiplyScalar(.5), ni.copy(t).sub(e).normalize(), ri.copy(this.origin).sub(ti);
|
|
3695
|
+
let i = e.distanceTo(t) * .5, a = -this.direction.dot(ni), o = ri.dot(this.direction), s = -ri.dot(ni), c = ri.lengthSq(), l = Math.abs(1 - a * a), u, d, f, p;
|
|
3696
3696
|
if (l > 0) if (u = a * s - o, d = a * o - s, p = i * l, u >= 0) if (d >= -p) if (d <= p) {
|
|
3697
3697
|
let e = 1 / l;
|
|
3698
3698
|
u *= e, d *= e, f = u * (u + a * d + 2 * o) + d * (a * u + d + 2 * s) + c;
|
|
@@ -3700,11 +3700,11 @@ var jr = class {
|
|
|
3700
3700
|
else d = -i, u = Math.max(0, -(a * d + o)), f = -u * u + d * (d + 2 * s) + c;
|
|
3701
3701
|
else d <= -p ? (u = Math.max(0, -(-a * i + o)), d = u > 0 ? -i : Math.min(Math.max(-i, -s), i), f = -u * u + d * (d + 2 * s) + c) : d <= p ? (u = 0, d = Math.min(Math.max(-i, -s), i), f = d * (d + 2 * s) + c) : (u = Math.max(0, -(a * i + o)), d = u > 0 ? i : Math.min(Math.max(-i, -s), i), f = -u * u + d * (d + 2 * s) + c);
|
|
3702
3702
|
else d = a > 0 ? -i : i, u = Math.max(0, -(a * d + o)), f = -u * u + d * (d + 2 * s) + c;
|
|
3703
|
-
return n && n.copy(this.origin).addScaledVector(this.direction, u), r && r.copy(
|
|
3703
|
+
return n && n.copy(this.origin).addScaledVector(this.direction, u), r && r.copy(ti).addScaledVector(ni, d), f;
|
|
3704
3704
|
}
|
|
3705
3705
|
intersectSphere(e, t) {
|
|
3706
|
-
|
|
3707
|
-
let n =
|
|
3706
|
+
ei.subVectors(e.center, this.origin);
|
|
3707
|
+
let n = ei.dot(this.direction), r = ei.dot(ei) - n * n, i = e.radius * e.radius;
|
|
3708
3708
|
if (r > i) return null;
|
|
3709
3709
|
let a = Math.sqrt(i - r), o = n - a, s = n + a;
|
|
3710
3710
|
return s < 0 ? null : o < 0 ? this.at(s, t) : this.at(o, t);
|
|
@@ -3731,22 +3731,22 @@ var jr = class {
|
|
|
3731
3731
|
return c >= 0 ? (n = (e.min.x - d.x) * c, r = (e.max.x - d.x) * c) : (n = (e.max.x - d.x) * c, r = (e.min.x - d.x) * c), l >= 0 ? (i = (e.min.y - d.y) * l, a = (e.max.y - d.y) * l) : (i = (e.max.y - d.y) * l, a = (e.min.y - d.y) * l), n > a || i > r || ((i > n || isNaN(n)) && (n = i), (a < r || isNaN(r)) && (r = a), u >= 0 ? (o = (e.min.z - d.z) * u, s = (e.max.z - d.z) * u) : (o = (e.max.z - d.z) * u, s = (e.min.z - d.z) * u), n > s || o > r) || ((o > n || n !== n) && (n = o), (s < r || r !== r) && (r = s), r < 0) ? null : this.at(n >= 0 ? n : r, t);
|
|
3732
3732
|
}
|
|
3733
3733
|
intersectsBox(e) {
|
|
3734
|
-
return this.intersectBox(e,
|
|
3734
|
+
return this.intersectBox(e, ei) !== null;
|
|
3735
3735
|
}
|
|
3736
3736
|
intersectTriangle(e, t, n, r, i) {
|
|
3737
|
-
|
|
3738
|
-
let a = this.direction.dot(
|
|
3737
|
+
ii.subVectors(t, e), ai.subVectors(n, e), oi.crossVectors(ii, ai);
|
|
3738
|
+
let a = this.direction.dot(oi), o;
|
|
3739
3739
|
if (a > 0) {
|
|
3740
3740
|
if (r) return null;
|
|
3741
3741
|
o = 1;
|
|
3742
3742
|
} else if (a < 0) o = -1, a = -a;
|
|
3743
3743
|
else return null;
|
|
3744
|
-
|
|
3745
|
-
let s = o * this.direction.dot(
|
|
3744
|
+
ri.subVectors(this.origin, e);
|
|
3745
|
+
let s = o * this.direction.dot(ai.crossVectors(ri, ai));
|
|
3746
3746
|
if (s < 0) return null;
|
|
3747
|
-
let c = o * this.direction.dot(
|
|
3747
|
+
let c = o * this.direction.dot(ii.cross(ri));
|
|
3748
3748
|
if (c < 0 || s + c > a) return null;
|
|
3749
|
-
let l = -o *
|
|
3749
|
+
let l = -o * ri.dot(oi);
|
|
3750
3750
|
return l < 0 ? null : this.at(l / a, i);
|
|
3751
3751
|
}
|
|
3752
3752
|
applyMatrix4(e) {
|
|
@@ -3758,15 +3758,15 @@ var jr = class {
|
|
|
3758
3758
|
clone() {
|
|
3759
3759
|
return new this.constructor().copy(this);
|
|
3760
3760
|
}
|
|
3761
|
-
},
|
|
3761
|
+
}, ci = class extends Y {
|
|
3762
3762
|
constructor(e) {
|
|
3763
|
-
super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new
|
|
3763
|
+
super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new H(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new On(), this.combine = 0, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(e);
|
|
3764
3764
|
}
|
|
3765
3765
|
copy(e) {
|
|
3766
3766
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
|
|
3767
3767
|
}
|
|
3768
|
-
},
|
|
3769
|
-
constructor(e = new
|
|
3768
|
+
}, li = /* @__PURE__ */ new z(), ui = /* @__PURE__ */ new si(), di = /* @__PURE__ */ new Hr(), fi = /* @__PURE__ */ new I(), pi = /* @__PURE__ */ new I(), mi = /* @__PURE__ */ new I(), hi = /* @__PURE__ */ new I(), gi = /* @__PURE__ */ new I(), _i = /* @__PURE__ */ new I(), vi = /* @__PURE__ */ new I(), yi = /* @__PURE__ */ new I(), bi = class extends V {
|
|
3769
|
+
constructor(e = new Yr(), t = new ci()) {
|
|
3770
3770
|
super(), this.isMesh = !0, this.type = "Mesh", this.geometry = e, this.material = t, this.morphTargetDictionary = void 0, this.morphTargetInfluences = void 0, this.count = 1, this.updateMorphTargets();
|
|
3771
3771
|
}
|
|
3772
3772
|
copy(e, t) {
|
|
@@ -3790,18 +3790,18 @@ var jr = class {
|
|
|
3790
3790
|
t.fromBufferAttribute(r, e);
|
|
3791
3791
|
let o = this.morphTargetInfluences;
|
|
3792
3792
|
if (i && o) {
|
|
3793
|
-
|
|
3793
|
+
_i.set(0, 0, 0);
|
|
3794
3794
|
for (let n = 0, r = i.length; n < r; n++) {
|
|
3795
3795
|
let r = o[n], s = i[n];
|
|
3796
|
-
r !== 0 && (
|
|
3796
|
+
r !== 0 && (gi.fromBufferAttribute(s, e), a ? _i.addScaledVector(gi, r) : _i.addScaledVector(gi.sub(t), r));
|
|
3797
3797
|
}
|
|
3798
|
-
t.add(
|
|
3798
|
+
t.add(_i);
|
|
3799
3799
|
}
|
|
3800
3800
|
return t;
|
|
3801
3801
|
}
|
|
3802
3802
|
raycast(e, t) {
|
|
3803
3803
|
let n = this.geometry, r = this.material, i = this.matrixWorld;
|
|
3804
|
-
r !== void 0 && (n.boundingSphere === null && n.computeBoundingSphere(),
|
|
3804
|
+
r !== void 0 && (n.boundingSphere === null && n.computeBoundingSphere(), di.copy(n.boundingSphere), di.applyMatrix4(i), ui.copy(e.ray).recast(e.near), !(di.containsPoint(ui.origin) === !1 && (ui.intersectSphere(di, fi) === null || ui.origin.distanceToSquared(fi) > (e.far - e.near) ** 2)) && (li.copy(i).invert(), ui.copy(e.ray).applyMatrix4(li), !(n.boundingBox !== null && ui.intersectsBox(n.boundingBox) === !1) && this._computeIntersections(e, t, ui)));
|
|
3805
3805
|
}
|
|
3806
3806
|
_computeIntersections(e, t, n) {
|
|
3807
3807
|
let r, i = this.geometry, a = this.material, o = i.index, s = i.attributes.position, c = i.attributes.uv, l = i.attributes.uv1, u = i.attributes.normal, d = i.groups, f = i.drawRange;
|
|
@@ -3809,49 +3809,49 @@ var jr = class {
|
|
|
3809
3809
|
let s = d[i], p = a[s.materialIndex], m = Math.max(s.start, f.start), h = Math.min(o.count, Math.min(s.start + s.count, f.start + f.count));
|
|
3810
3810
|
for (let i = m, a = h; i < a; i += 3) {
|
|
3811
3811
|
let a = o.getX(i), d = o.getX(i + 1), f = o.getX(i + 2);
|
|
3812
|
-
r =
|
|
3812
|
+
r = Si(this, p, e, n, c, l, u, a, d, f), r && (r.faceIndex = Math.floor(i / 3), r.face.materialIndex = s.materialIndex, t.push(r));
|
|
3813
3813
|
}
|
|
3814
3814
|
}
|
|
3815
3815
|
else {
|
|
3816
3816
|
let i = Math.max(0, f.start), s = Math.min(o.count, f.start + f.count);
|
|
3817
3817
|
for (let d = i, f = s; d < f; d += 3) {
|
|
3818
3818
|
let i = o.getX(d), s = o.getX(d + 1), f = o.getX(d + 2);
|
|
3819
|
-
r =
|
|
3819
|
+
r = Si(this, a, e, n, c, l, u, i, s, f), r && (r.faceIndex = Math.floor(d / 3), t.push(r));
|
|
3820
3820
|
}
|
|
3821
3821
|
}
|
|
3822
3822
|
else if (s !== void 0) if (Array.isArray(a)) for (let i = 0, o = d.length; i < o; i++) {
|
|
3823
3823
|
let o = d[i], p = a[o.materialIndex], m = Math.max(o.start, f.start), h = Math.min(s.count, Math.min(o.start + o.count, f.start + f.count));
|
|
3824
3824
|
for (let i = m, a = h; i < a; i += 3) {
|
|
3825
3825
|
let a = i, s = i + 1, d = i + 2;
|
|
3826
|
-
r =
|
|
3826
|
+
r = Si(this, p, e, n, c, l, u, a, s, d), r && (r.faceIndex = Math.floor(i / 3), r.face.materialIndex = o.materialIndex, t.push(r));
|
|
3827
3827
|
}
|
|
3828
3828
|
}
|
|
3829
3829
|
else {
|
|
3830
3830
|
let i = Math.max(0, f.start), o = Math.min(s.count, f.start + f.count);
|
|
3831
3831
|
for (let s = i, d = o; s < d; s += 3) {
|
|
3832
3832
|
let i = s, o = s + 1, d = s + 2;
|
|
3833
|
-
r =
|
|
3833
|
+
r = Si(this, a, e, n, c, l, u, i, o, d), r && (r.faceIndex = Math.floor(s / 3), t.push(r));
|
|
3834
3834
|
}
|
|
3835
3835
|
}
|
|
3836
3836
|
}
|
|
3837
3837
|
};
|
|
3838
|
-
function
|
|
3838
|
+
function xi(e, t, n, r, i, a, o, s) {
|
|
3839
3839
|
let c;
|
|
3840
3840
|
if (c = t.side === 1 ? r.intersectTriangle(o, a, i, !0, s) : r.intersectTriangle(i, a, o, t.side === 0, s), c === null) return null;
|
|
3841
|
-
|
|
3842
|
-
let l = n.ray.origin.distanceTo(
|
|
3841
|
+
yi.copy(s), yi.applyMatrix4(e.matrixWorld);
|
|
3842
|
+
let l = n.ray.origin.distanceTo(yi);
|
|
3843
3843
|
return l < n.near || l > n.far ? null : {
|
|
3844
3844
|
distance: l,
|
|
3845
|
-
point:
|
|
3845
|
+
point: yi.clone(),
|
|
3846
3846
|
object: e
|
|
3847
3847
|
};
|
|
3848
3848
|
}
|
|
3849
|
-
function
|
|
3850
|
-
e.getVertexPosition(s,
|
|
3851
|
-
let u =
|
|
3849
|
+
function Si(e, t, n, r, i, a, o, s, c, l) {
|
|
3850
|
+
e.getVertexPosition(s, pi), e.getVertexPosition(c, mi), e.getVertexPosition(l, hi);
|
|
3851
|
+
let u = xi(e, t, n, r, pi, mi, hi, vi);
|
|
3852
3852
|
if (u) {
|
|
3853
3853
|
let e = new I();
|
|
3854
|
-
|
|
3854
|
+
pr.getBarycoord(vi, pi, mi, hi, e), i && (u.uv = pr.getInterpolatedAttribute(i, s, c, l, e, new F())), a && (u.uv1 = pr.getInterpolatedAttribute(a, s, c, l, e, new F())), o && (u.normal = pr.getInterpolatedAttribute(o, s, c, l, e, new I()), u.normal.dot(r.direction) > 0 && u.normal.multiplyScalar(-1));
|
|
3855
3855
|
let t = {
|
|
3856
3856
|
a: s,
|
|
3857
3857
|
b: c,
|
|
@@ -3859,32 +3859,32 @@ function bi(e, t, n, r, i, a, o, s, c, l) {
|
|
|
3859
3859
|
normal: new I(),
|
|
3860
3860
|
materialIndex: 0
|
|
3861
3861
|
};
|
|
3862
|
-
|
|
3862
|
+
pr.getNormal(pi, mi, hi, t.normal), u.face = t, u.barycoord = e;
|
|
3863
3863
|
}
|
|
3864
3864
|
return u;
|
|
3865
3865
|
}
|
|
3866
|
-
var
|
|
3866
|
+
var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE__ */ new hn(), Ei = /* @__PURE__ */ new I(), Di = /* @__PURE__ */ new z(), Oi = /* @__PURE__ */ new I(), ki = /* @__PURE__ */ new Hr(), Ai = /* @__PURE__ */ new z(), ji = /* @__PURE__ */ new si(), Mi = class extends bi {
|
|
3867
3867
|
constructor(t, n) {
|
|
3868
3868
|
super(t, n), this.isSkinnedMesh = !0, this.type = "SkinnedMesh", this.bindMode = e, this.bindMatrix = new z(), this.bindMatrixInverse = new z(), this.boundingBox = null, this.boundingSphere = null;
|
|
3869
3869
|
}
|
|
3870
3870
|
computeBoundingBox() {
|
|
3871
3871
|
let e = this.geometry;
|
|
3872
|
-
this.boundingBox === null && (this.boundingBox = new
|
|
3872
|
+
this.boundingBox === null && (this.boundingBox = new mr()), this.boundingBox.makeEmpty();
|
|
3873
3873
|
let t = e.getAttribute("position");
|
|
3874
|
-
for (let e = 0; e < t.count; e++) this.getVertexPosition(e,
|
|
3874
|
+
for (let e = 0; e < t.count; e++) this.getVertexPosition(e, Oi), this.boundingBox.expandByPoint(Oi);
|
|
3875
3875
|
}
|
|
3876
3876
|
computeBoundingSphere() {
|
|
3877
3877
|
let e = this.geometry;
|
|
3878
|
-
this.boundingSphere === null && (this.boundingSphere = new
|
|
3878
|
+
this.boundingSphere === null && (this.boundingSphere = new Hr()), this.boundingSphere.makeEmpty();
|
|
3879
3879
|
let t = e.getAttribute("position");
|
|
3880
|
-
for (let e = 0; e < t.count; e++) this.getVertexPosition(e,
|
|
3880
|
+
for (let e = 0; e < t.count; e++) this.getVertexPosition(e, Oi), this.boundingSphere.expandByPoint(Oi);
|
|
3881
3881
|
}
|
|
3882
3882
|
copy(e, t) {
|
|
3883
3883
|
return super.copy(e, t), this.bindMode = e.bindMode, this.bindMatrix.copy(e.bindMatrix), this.bindMatrixInverse.copy(e.bindMatrixInverse), this.skeleton = e.skeleton, e.boundingBox !== null && (this.boundingBox = e.boundingBox.clone()), e.boundingSphere !== null && (this.boundingSphere = e.boundingSphere.clone()), this;
|
|
3884
3884
|
}
|
|
3885
3885
|
raycast(e, t) {
|
|
3886
3886
|
let n = this.material, r = this.matrixWorld;
|
|
3887
|
-
n !== void 0 && (this.boundingSphere === null && this.computeBoundingSphere(),
|
|
3887
|
+
n !== void 0 && (this.boundingSphere === null && this.computeBoundingSphere(), ki.copy(this.boundingSphere), ki.applyMatrix4(r), e.ray.intersectsSphere(ki) !== !1 && (Ai.copy(r).invert(), ji.copy(e.ray).applyMatrix4(Ai), !(this.boundingBox !== null && ji.intersectsBox(this.boundingBox) === !1) && this._computeIntersections(e, t, ji)));
|
|
3888
3888
|
}
|
|
3889
3889
|
getVertexPosition(e, t) {
|
|
3890
3890
|
return super.getVertexPosition(e, t), this.applyBoneTransform(e, t), t;
|
|
@@ -3896,7 +3896,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
3896
3896
|
this.skeleton.pose();
|
|
3897
3897
|
}
|
|
3898
3898
|
normalizeSkinWeights() {
|
|
3899
|
-
let e = new
|
|
3899
|
+
let e = new hn(), t = this.geometry.attributes.skinWeight;
|
|
3900
3900
|
for (let n = 0, r = t.count; n < r; n++) {
|
|
3901
3901
|
e.fromBufferAttribute(t, n);
|
|
3902
3902
|
let r = 1 / e.manhattanLength();
|
|
@@ -3908,31 +3908,31 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
3908
3908
|
}
|
|
3909
3909
|
applyBoneTransform(e, t) {
|
|
3910
3910
|
let n = this.skeleton, r = this.geometry;
|
|
3911
|
-
|
|
3911
|
+
wi.fromBufferAttribute(r.attributes.skinIndex, e), Ti.fromBufferAttribute(r.attributes.skinWeight, e), Ci.copy(t).applyMatrix4(this.bindMatrix), t.set(0, 0, 0);
|
|
3912
3912
|
for (let e = 0; e < 4; e++) {
|
|
3913
|
-
let r =
|
|
3913
|
+
let r = Ti.getComponent(e);
|
|
3914
3914
|
if (r !== 0) {
|
|
3915
|
-
let i =
|
|
3916
|
-
|
|
3915
|
+
let i = wi.getComponent(e);
|
|
3916
|
+
Di.multiplyMatrices(n.bones[i].matrixWorld, n.boneInverses[i]), t.addScaledVector(Ei.copy(Ci).applyMatrix4(Di), r);
|
|
3917
3917
|
}
|
|
3918
3918
|
}
|
|
3919
3919
|
return t.applyMatrix4(this.bindMatrixInverse);
|
|
3920
3920
|
}
|
|
3921
|
-
},
|
|
3921
|
+
}, Ni = class extends V {
|
|
3922
3922
|
constructor() {
|
|
3923
3923
|
super(), this.isBone = !0, this.type = "Bone";
|
|
3924
3924
|
}
|
|
3925
|
-
},
|
|
3926
|
-
constructor(e = null, t = 1, n = 1, r,
|
|
3927
|
-
super(null, o, s, c, l, u, r,
|
|
3925
|
+
}, Pi = class extends R {
|
|
3926
|
+
constructor(e = null, t = 1, n = 1, r, i, o, s, c, l = a, u = a, d, f) {
|
|
3927
|
+
super(null, o, s, c, l, u, r, i, d, f), this.isDataTexture = !0, this.image = {
|
|
3928
3928
|
data: e,
|
|
3929
3929
|
width: t,
|
|
3930
3930
|
height: n
|
|
3931
3931
|
}, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
|
|
3932
3932
|
}
|
|
3933
|
-
},
|
|
3933
|
+
}, Fi = /* @__PURE__ */ new z(), Ii = /* @__PURE__ */ new z(), Li = class e {
|
|
3934
3934
|
constructor(e = [], t = []) {
|
|
3935
|
-
this.uuid =
|
|
3935
|
+
this.uuid = jt(), this.bones = e.slice(0), this.boneInverses = t, this.boneMatrices = null, this.previousBoneMatrices = null, this.boneTexture = null, this.init();
|
|
3936
3936
|
}
|
|
3937
3937
|
init() {
|
|
3938
3938
|
let e = this.bones, t = this.boneInverses;
|
|
@@ -3962,8 +3962,8 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
3962
3962
|
update() {
|
|
3963
3963
|
let e = this.bones, t = this.boneInverses, n = this.boneMatrices, r = this.boneTexture;
|
|
3964
3964
|
for (let r = 0, i = e.length; r < i; r++) {
|
|
3965
|
-
let i = e[r] ? e[r].matrixWorld :
|
|
3966
|
-
|
|
3965
|
+
let i = e[r] ? e[r].matrixWorld : Ii;
|
|
3966
|
+
Fi.multiplyMatrices(i, t[r]), Fi.toArray(n, r * 16);
|
|
3967
3967
|
}
|
|
3968
3968
|
r !== null && (r.needsUpdate = !0);
|
|
3969
3969
|
}
|
|
@@ -3975,7 +3975,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
3975
3975
|
e = Math.ceil(e / 4) * 4, e = Math.max(e, 4);
|
|
3976
3976
|
let t = new Float32Array(e * e * 4);
|
|
3977
3977
|
t.set(this.boneMatrices);
|
|
3978
|
-
let n = new
|
|
3978
|
+
let n = new Pi(t, e, e, D, v);
|
|
3979
3979
|
return n.needsUpdate = !0, this.boneMatrices = t, this.boneTexture = n, this;
|
|
3980
3980
|
}
|
|
3981
3981
|
getBoneByName(e) {
|
|
@@ -3991,7 +3991,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
3991
3991
|
this.uuid = e.uuid;
|
|
3992
3992
|
for (let n = 0, r = e.bones.length; n < r; n++) {
|
|
3993
3993
|
let r = e.bones[n], i = t[r];
|
|
3994
|
-
i === void 0 && (k("Skeleton: No bone found with UUID:", r), i = new
|
|
3994
|
+
i === void 0 && (k("Skeleton: No bone found with UUID:", r), i = new Ni()), this.bones.push(i), this.boneInverses.push(new z().fromArray(e.boneInverses[n]));
|
|
3995
3995
|
}
|
|
3996
3996
|
return this.init(), this;
|
|
3997
3997
|
}
|
|
@@ -4015,7 +4015,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4015
4015
|
}
|
|
4016
4016
|
return e;
|
|
4017
4017
|
}
|
|
4018
|
-
},
|
|
4018
|
+
}, Ri = class extends Fr {
|
|
4019
4019
|
constructor(e, t, n, r = 1) {
|
|
4020
4020
|
super(e, t, n), this.isInstancedBufferAttribute = !0, this.meshPerAttribute = r;
|
|
4021
4021
|
}
|
|
@@ -4026,20 +4026,20 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4026
4026
|
let e = super.toJSON();
|
|
4027
4027
|
return e.meshPerAttribute = this.meshPerAttribute, e.isInstancedBufferAttribute = !0, e;
|
|
4028
4028
|
}
|
|
4029
|
-
},
|
|
4029
|
+
}, zi = /* @__PURE__ */ new z(), Bi = /* @__PURE__ */ new z(), Vi = [], Hi = /* @__PURE__ */ new mr(), Ui = /* @__PURE__ */ new z(), Wi = /* @__PURE__ */ new bi(), Gi = /* @__PURE__ */ new Hr(), Ki = class extends bi {
|
|
4030
4030
|
constructor(e, t, n) {
|
|
4031
|
-
super(e, t), this.isInstancedMesh = !0, this.instanceMatrix = new
|
|
4032
|
-
for (let e = 0; e < n; e++) this.setMatrixAt(e,
|
|
4031
|
+
super(e, t), this.isInstancedMesh = !0, this.instanceMatrix = new Ri(new Float32Array(n * 16), 16), this.previousInstanceMatrix = null, this.instanceColor = null, this.morphTexture = null, this.count = n, this.boundingBox = null, this.boundingSphere = null;
|
|
4032
|
+
for (let e = 0; e < n; e++) this.setMatrixAt(e, Ui);
|
|
4033
4033
|
}
|
|
4034
4034
|
computeBoundingBox() {
|
|
4035
4035
|
let e = this.geometry, t = this.count;
|
|
4036
|
-
this.boundingBox === null && (this.boundingBox = new
|
|
4037
|
-
for (let n = 0; n < t; n++) this.getMatrixAt(n,
|
|
4036
|
+
this.boundingBox === null && (this.boundingBox = new mr()), e.boundingBox === null && e.computeBoundingBox(), this.boundingBox.makeEmpty();
|
|
4037
|
+
for (let n = 0; n < t; n++) this.getMatrixAt(n, zi), Hi.copy(e.boundingBox).applyMatrix4(zi), this.boundingBox.union(Hi);
|
|
4038
4038
|
}
|
|
4039
4039
|
computeBoundingSphere() {
|
|
4040
4040
|
let e = this.geometry, t = this.count;
|
|
4041
|
-
this.boundingSphere === null && (this.boundingSphere = new
|
|
4042
|
-
for (let n = 0; n < t; n++) this.getMatrixAt(n,
|
|
4041
|
+
this.boundingSphere === null && (this.boundingSphere = new Hr()), e.boundingSphere === null && e.computeBoundingSphere(), this.boundingSphere.makeEmpty();
|
|
4042
|
+
for (let n = 0; n < t; n++) this.getMatrixAt(n, zi), Gi.copy(e.boundingSphere).applyMatrix4(zi), this.boundingSphere.union(Gi);
|
|
4043
4043
|
}
|
|
4044
4044
|
copy(e, t) {
|
|
4045
4045
|
return super.copy(e, t), this.instanceMatrix.copy(e.instanceMatrix), e.previousInstanceMatrix !== null && (this.previousInstanceMatrix = e.previousInstanceMatrix.clone()), e.morphTexture !== null && (this.morphTexture = e.morphTexture.clone()), e.instanceColor !== null && (this.instanceColor = e.instanceColor.clone()), this.count = e.count, e.boundingBox !== null && (this.boundingBox = e.boundingBox.clone()), e.boundingSphere !== null && (this.boundingSphere = e.boundingSphere.clone()), this;
|
|
@@ -4056,24 +4056,24 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4056
4056
|
}
|
|
4057
4057
|
raycast(e, t) {
|
|
4058
4058
|
let n = this.matrixWorld, r = this.count;
|
|
4059
|
-
if (
|
|
4060
|
-
this.getMatrixAt(i,
|
|
4061
|
-
for (let e = 0, n =
|
|
4062
|
-
let n =
|
|
4059
|
+
if (Wi.geometry = this.geometry, Wi.material = this.material, Wi.material !== void 0 && (this.boundingSphere === null && this.computeBoundingSphere(), Gi.copy(this.boundingSphere), Gi.applyMatrix4(n), e.ray.intersectsSphere(Gi) !== !1)) for (let i = 0; i < r; i++) {
|
|
4060
|
+
this.getMatrixAt(i, zi), Bi.multiplyMatrices(n, zi), Wi.matrixWorld = Bi, Wi.raycast(e, Vi);
|
|
4061
|
+
for (let e = 0, n = Vi.length; e < n; e++) {
|
|
4062
|
+
let n = Vi[e];
|
|
4063
4063
|
n.instanceId = i, n.object = this, t.push(n);
|
|
4064
4064
|
}
|
|
4065
|
-
|
|
4065
|
+
Vi.length = 0;
|
|
4066
4066
|
}
|
|
4067
4067
|
}
|
|
4068
4068
|
setColorAt(e, t) {
|
|
4069
|
-
this.instanceColor === null && (this.instanceColor = new
|
|
4069
|
+
this.instanceColor === null && (this.instanceColor = new Ri(new Float32Array(this.instanceMatrix.count * 3).fill(1), 3)), t.toArray(this.instanceColor.array, e * 3);
|
|
4070
4070
|
}
|
|
4071
4071
|
setMatrixAt(e, t) {
|
|
4072
4072
|
t.toArray(this.instanceMatrix.array, e * 16);
|
|
4073
4073
|
}
|
|
4074
4074
|
setMorphAt(e, t) {
|
|
4075
4075
|
let n = t.morphTargetInfluences, r = n.length + 1;
|
|
4076
|
-
this.morphTexture === null && (this.morphTexture = new
|
|
4076
|
+
this.morphTexture === null && (this.morphTexture = new Pi(new Float32Array(r * this.count), r, this.count, O, v));
|
|
4077
4077
|
let i = this.morphTexture.source.data.data, a = 0;
|
|
4078
4078
|
for (let e = 0; e < n.length; e++) a += n[e];
|
|
4079
4079
|
let o = this.geometry.morphTargetsRelative ? 1 : 1 - a, s = r * e;
|
|
@@ -4083,7 +4083,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4083
4083
|
dispose() {
|
|
4084
4084
|
this.dispatchEvent({ type: "dispose" }), this.morphTexture !== null && (this.morphTexture.dispose(), this.morphTexture = null);
|
|
4085
4085
|
}
|
|
4086
|
-
},
|
|
4086
|
+
}, qi = /* @__PURE__ */ new I(), Ji = /* @__PURE__ */ new I(), Yi = /* @__PURE__ */ new en(), Xi = class {
|
|
4087
4087
|
constructor(e = new I(1, 0, 0), t = 0) {
|
|
4088
4088
|
this.isPlane = !0, this.normal = e, this.constant = t;
|
|
4089
4089
|
}
|
|
@@ -4097,7 +4097,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4097
4097
|
return this.normal.copy(e), this.constant = -t.dot(this.normal), this;
|
|
4098
4098
|
}
|
|
4099
4099
|
setFromCoplanarPoints(e, t, n) {
|
|
4100
|
-
let r =
|
|
4100
|
+
let r = qi.subVectors(n, t).cross(Ji.subVectors(e, t)).normalize();
|
|
4101
4101
|
return this.setFromNormalAndCoplanarPoint(r, e), this;
|
|
4102
4102
|
}
|
|
4103
4103
|
copy(e) {
|
|
@@ -4120,7 +4120,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4120
4120
|
return t.copy(e).addScaledVector(this.normal, -this.distanceToPoint(e));
|
|
4121
4121
|
}
|
|
4122
4122
|
intersectLine(e, t) {
|
|
4123
|
-
let n = e.delta(
|
|
4123
|
+
let n = e.delta(qi), r = this.normal.dot(n);
|
|
4124
4124
|
if (r === 0) return this.distanceToPoint(e.start) === 0 ? t.copy(e.start) : null;
|
|
4125
4125
|
let i = -(e.start.dot(this.normal) + this.constant) / r;
|
|
4126
4126
|
return i < 0 || i > 1 ? null : t.copy(e.start).addScaledVector(n, i);
|
|
@@ -4139,7 +4139,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4139
4139
|
return e.copy(this.normal).multiplyScalar(-this.constant);
|
|
4140
4140
|
}
|
|
4141
4141
|
applyMatrix4(e, t) {
|
|
4142
|
-
let n = t ||
|
|
4142
|
+
let n = t || Yi.getNormalMatrix(e), r = this.coplanarPoint(qi).applyMatrix4(e), i = this.normal.applyMatrix3(n).normalize();
|
|
4143
4143
|
return this.constant = -r.dot(i), this;
|
|
4144
4144
|
}
|
|
4145
4145
|
translate(e) {
|
|
@@ -4151,8 +4151,8 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4151
4151
|
clone() {
|
|
4152
4152
|
return new this.constructor().copy(this);
|
|
4153
4153
|
}
|
|
4154
|
-
},
|
|
4155
|
-
constructor(e = new
|
|
4154
|
+
}, Zi = /* @__PURE__ */ new Hr(), Qi = /* @__PURE__ */ new F(.5, .5), $i = /* @__PURE__ */ new I(), ea = class {
|
|
4155
|
+
constructor(e = new Xi(), t = new Xi(), n = new Xi(), r = new Xi(), i = new Xi(), a = new Xi()) {
|
|
4156
4156
|
this.planes = [
|
|
4157
4157
|
e,
|
|
4158
4158
|
t,
|
|
@@ -4171,7 +4171,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4171
4171
|
for (let n = 0; n < 6; n++) t[n].copy(e.planes[n]);
|
|
4172
4172
|
return this;
|
|
4173
4173
|
}
|
|
4174
|
-
setFromProjectionMatrix(e, t =
|
|
4174
|
+
setFromProjectionMatrix(e, t = ft, n = !1) {
|
|
4175
4175
|
let r = this.planes, i = e.elements, a = i[0], o = i[1], s = i[2], c = i[3], l = i[4], u = i[5], d = i[6], f = i[7], p = i[8], m = i[9], h = i[10], g = i[11], _ = i[12], v = i[13], y = i[14], b = i[15];
|
|
4176
4176
|
if (r[0].setComponents(c - a, f - l, g - p, b - _).normalize(), r[1].setComponents(c + a, f + l, g + p, b + _).normalize(), r[2].setComponents(c + o, f + u, g + m, b + v).normalize(), r[3].setComponents(c - o, f - u, g - m, b - v).normalize(), n) r[4].setComponents(s, d, h, y).normalize(), r[5].setComponents(c - s, f - d, g - h, b - y).normalize();
|
|
4177
4177
|
else if (r[4].setComponents(c - s, f - d, g - h, b - y).normalize(), t === 2e3) r[5].setComponents(c + s, f + d, g + h, b + y).normalize();
|
|
@@ -4180,15 +4180,15 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4180
4180
|
return this;
|
|
4181
4181
|
}
|
|
4182
4182
|
intersectsObject(e) {
|
|
4183
|
-
if (e.boundingSphere !== void 0) e.boundingSphere === null && e.computeBoundingSphere(),
|
|
4183
|
+
if (e.boundingSphere !== void 0) e.boundingSphere === null && e.computeBoundingSphere(), Zi.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);
|
|
4184
4184
|
else {
|
|
4185
4185
|
let t = e.geometry;
|
|
4186
|
-
t.boundingSphere === null && t.computeBoundingSphere(),
|
|
4186
|
+
t.boundingSphere === null && t.computeBoundingSphere(), Zi.copy(t.boundingSphere).applyMatrix4(e.matrixWorld);
|
|
4187
4187
|
}
|
|
4188
|
-
return this.intersectsSphere(
|
|
4188
|
+
return this.intersectsSphere(Zi);
|
|
4189
4189
|
}
|
|
4190
4190
|
intersectsSprite(e) {
|
|
4191
|
-
return
|
|
4191
|
+
return Zi.center.set(0, 0, 0), Zi.radius = .7071067811865476 + Qi.distanceTo(e.center), Zi.applyMatrix4(e.matrixWorld), this.intersectsSphere(Zi);
|
|
4192
4192
|
}
|
|
4193
4193
|
intersectsSphere(e) {
|
|
4194
4194
|
let t = this.planes, n = e.center, r = -e.radius;
|
|
@@ -4199,7 +4199,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4199
4199
|
let t = this.planes;
|
|
4200
4200
|
for (let n = 0; n < 6; n++) {
|
|
4201
4201
|
let r = t[n];
|
|
4202
|
-
if (
|
|
4202
|
+
if ($i.x = r.normal.x > 0 ? e.max.x : e.min.x, $i.y = r.normal.y > 0 ? e.max.y : e.min.y, $i.z = r.normal.z > 0 ? e.max.z : e.min.z, r.distanceToPoint($i) < 0) return !1;
|
|
4203
4203
|
}
|
|
4204
4204
|
return !0;
|
|
4205
4205
|
}
|
|
@@ -4211,15 +4211,15 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4211
4211
|
clone() {
|
|
4212
4212
|
return new this.constructor().copy(this);
|
|
4213
4213
|
}
|
|
4214
|
-
},
|
|
4214
|
+
}, ta = /* @__PURE__ */ new z(), na = /* @__PURE__ */ new ea(), ra = class e {
|
|
4215
4215
|
constructor() {
|
|
4216
|
-
this.coordinateSystem =
|
|
4216
|
+
this.coordinateSystem = ft;
|
|
4217
4217
|
}
|
|
4218
4218
|
intersectsObject(e, t) {
|
|
4219
4219
|
if (!t.isArrayCamera || t.cameras.length === 0) return !1;
|
|
4220
4220
|
for (let n = 0; n < t.cameras.length; n++) {
|
|
4221
4221
|
let r = t.cameras[n];
|
|
4222
|
-
if (
|
|
4222
|
+
if (ta.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), na.setFromProjectionMatrix(ta, r.coordinateSystem, r.reversedDepth), na.intersectsObject(e)) return !0;
|
|
4223
4223
|
}
|
|
4224
4224
|
return !1;
|
|
4225
4225
|
}
|
|
@@ -4227,7 +4227,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4227
4227
|
if (!t || !t.cameras || t.cameras.length === 0) return !1;
|
|
4228
4228
|
for (let n = 0; n < t.cameras.length; n++) {
|
|
4229
4229
|
let r = t.cameras[n];
|
|
4230
|
-
if (
|
|
4230
|
+
if (ta.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), na.setFromProjectionMatrix(ta, r.coordinateSystem, r.reversedDepth), na.intersectsSprite(e)) return !0;
|
|
4231
4231
|
}
|
|
4232
4232
|
return !1;
|
|
4233
4233
|
}
|
|
@@ -4235,7 +4235,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4235
4235
|
if (!t || !t.cameras || t.cameras.length === 0) return !1;
|
|
4236
4236
|
for (let n = 0; n < t.cameras.length; n++) {
|
|
4237
4237
|
let r = t.cameras[n];
|
|
4238
|
-
if (
|
|
4238
|
+
if (ta.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), na.setFromProjectionMatrix(ta, r.coordinateSystem, r.reversedDepth), na.intersectsSphere(e)) return !0;
|
|
4239
4239
|
}
|
|
4240
4240
|
return !1;
|
|
4241
4241
|
}
|
|
@@ -4243,7 +4243,7 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4243
4243
|
if (!t || !t.cameras || t.cameras.length === 0) return !1;
|
|
4244
4244
|
for (let n = 0; n < t.cameras.length; n++) {
|
|
4245
4245
|
let r = t.cameras[n];
|
|
4246
|
-
if (
|
|
4246
|
+
if (ta.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), na.setFromProjectionMatrix(ta, r.coordinateSystem, r.reversedDepth), na.intersectsBox(e)) return !0;
|
|
4247
4247
|
}
|
|
4248
4248
|
return !1;
|
|
4249
4249
|
}
|
|
@@ -4251,22 +4251,22 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4251
4251
|
if (!t || !t.cameras || t.cameras.length === 0) return !1;
|
|
4252
4252
|
for (let n = 0; n < t.cameras.length; n++) {
|
|
4253
4253
|
let r = t.cameras[n];
|
|
4254
|
-
if (
|
|
4254
|
+
if (ta.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), na.setFromProjectionMatrix(ta, r.coordinateSystem, r.reversedDepth), na.containsPoint(e)) return !0;
|
|
4255
4255
|
}
|
|
4256
4256
|
return !1;
|
|
4257
4257
|
}
|
|
4258
4258
|
clone() {
|
|
4259
4259
|
return new e();
|
|
4260
4260
|
}
|
|
4261
|
-
},
|
|
4261
|
+
}, ia = class extends Y {
|
|
4262
4262
|
constructor(e) {
|
|
4263
|
-
super(), this.isLineBasicMaterial = !0, this.type = "LineBasicMaterial", this.color = new
|
|
4263
|
+
super(), this.isLineBasicMaterial = !0, this.type = "LineBasicMaterial", this.color = new H(16777215), this.map = null, this.linewidth = 1, this.linecap = "round", this.linejoin = "round", this.fog = !0, this.setValues(e);
|
|
4264
4264
|
}
|
|
4265
4265
|
copy(e) {
|
|
4266
4266
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.linewidth = e.linewidth, this.linecap = e.linecap, this.linejoin = e.linejoin, this.fog = e.fog, this;
|
|
4267
4267
|
}
|
|
4268
|
-
},
|
|
4269
|
-
constructor(e = new
|
|
4268
|
+
}, aa = /* @__PURE__ */ new I(), oa = /* @__PURE__ */ new I(), sa = /* @__PURE__ */ new z(), ca = /* @__PURE__ */ new si(), la = /* @__PURE__ */ new Hr(), ua = /* @__PURE__ */ new I(), da = /* @__PURE__ */ new I(), fa = class extends V {
|
|
4269
|
+
constructor(e = new Yr(), t = new ia()) {
|
|
4270
4270
|
super(), this.isLine = !0, this.type = "Line", this.geometry = e, this.material = t, this.morphTargetDictionary = void 0, this.morphTargetInfluences = void 0, this.updateMorphTargets();
|
|
4271
4271
|
}
|
|
4272
4272
|
copy(e, t) {
|
|
@@ -4276,34 +4276,34 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4276
4276
|
let e = this.geometry;
|
|
4277
4277
|
if (e.index === null) {
|
|
4278
4278
|
let t = e.attributes.position, n = [0];
|
|
4279
|
-
for (let e = 1, r = t.count; e < r; e++)
|
|
4280
|
-
e.setAttribute("lineDistance", new
|
|
4279
|
+
for (let e = 1, r = t.count; e < r; e++) aa.fromBufferAttribute(t, e - 1), oa.fromBufferAttribute(t, e), n[e] = n[e - 1], n[e] += aa.distanceTo(oa);
|
|
4280
|
+
e.setAttribute("lineDistance", new K(n, 1));
|
|
4281
4281
|
} else k("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
|
|
4282
4282
|
return this;
|
|
4283
4283
|
}
|
|
4284
4284
|
raycast(e, t) {
|
|
4285
4285
|
let n = this.geometry, r = this.matrixWorld, i = e.params.Line.threshold, a = n.drawRange;
|
|
4286
|
-
if (n.boundingSphere === null && n.computeBoundingSphere(),
|
|
4287
|
-
|
|
4286
|
+
if (n.boundingSphere === null && n.computeBoundingSphere(), la.copy(n.boundingSphere), la.applyMatrix4(r), la.radius += i, e.ray.intersectsSphere(la) === !1) return;
|
|
4287
|
+
sa.copy(r).invert(), ca.copy(e.ray).applyMatrix4(sa);
|
|
4288
4288
|
let o = i / ((this.scale.x + this.scale.y + this.scale.z) / 3), s = o * o, c = this.isLineSegments ? 2 : 1, l = n.index, u = n.attributes.position;
|
|
4289
4289
|
if (l !== null) {
|
|
4290
4290
|
let n = Math.max(0, a.start), r = Math.min(l.count, a.start + a.count);
|
|
4291
4291
|
for (let i = n, a = r - 1; i < a; i += c) {
|
|
4292
|
-
let n = l.getX(i), r = l.getX(i + 1), a =
|
|
4292
|
+
let n = l.getX(i), r = l.getX(i + 1), a = pa(this, e, ca, s, n, r, i);
|
|
4293
4293
|
a && t.push(a);
|
|
4294
4294
|
}
|
|
4295
4295
|
if (this.isLineLoop) {
|
|
4296
|
-
let i = l.getX(r - 1), a = l.getX(n), o =
|
|
4296
|
+
let i = l.getX(r - 1), a = l.getX(n), o = pa(this, e, ca, s, i, a, r - 1);
|
|
4297
4297
|
o && t.push(o);
|
|
4298
4298
|
}
|
|
4299
4299
|
} else {
|
|
4300
4300
|
let n = Math.max(0, a.start), r = Math.min(u.count, a.start + a.count);
|
|
4301
4301
|
for (let i = n, a = r - 1; i < a; i += c) {
|
|
4302
|
-
let n =
|
|
4302
|
+
let n = pa(this, e, ca, s, i, i + 1, i);
|
|
4303
4303
|
n && t.push(n);
|
|
4304
4304
|
}
|
|
4305
4305
|
if (this.isLineLoop) {
|
|
4306
|
-
let i =
|
|
4306
|
+
let i = pa(this, e, ca, s, r - 1, n, r - 1);
|
|
4307
4307
|
i && t.push(i);
|
|
4308
4308
|
}
|
|
4309
4309
|
}
|
|
@@ -4322,14 +4322,14 @@ var xi = /* @__PURE__ */ new I(), Si = /* @__PURE__ */ new pn(), Ci = /* @__PURE
|
|
|
4322
4322
|
}
|
|
4323
4323
|
}
|
|
4324
4324
|
};
|
|
4325
|
-
function
|
|
4325
|
+
function pa(e, t, n, r, i, a, o) {
|
|
4326
4326
|
let s = e.geometry.attributes.position;
|
|
4327
|
-
if (
|
|
4328
|
-
|
|
4329
|
-
let c = t.ray.origin.distanceTo(
|
|
4327
|
+
if (aa.fromBufferAttribute(s, i), oa.fromBufferAttribute(s, a), n.distanceSqToSegment(aa, oa, ua, da) > r) return;
|
|
4328
|
+
ua.applyMatrix4(e.matrixWorld);
|
|
4329
|
+
let c = t.ray.origin.distanceTo(ua);
|
|
4330
4330
|
if (!(c < t.near || c > t.far)) return {
|
|
4331
4331
|
distance: c,
|
|
4332
|
-
point:
|
|
4332
|
+
point: da.clone().applyMatrix4(e.matrixWorld),
|
|
4333
4333
|
index: o,
|
|
4334
4334
|
face: null,
|
|
4335
4335
|
faceIndex: null,
|
|
@@ -4337,7 +4337,7 @@ function da(e, t, n, r, i, a, o) {
|
|
|
4337
4337
|
object: e
|
|
4338
4338
|
};
|
|
4339
4339
|
}
|
|
4340
|
-
var
|
|
4340
|
+
var ma = /* @__PURE__ */ new I(), ha = /* @__PURE__ */ new I(), ga = class extends fa {
|
|
4341
4341
|
constructor(e, t) {
|
|
4342
4342
|
super(e, t), this.isLineSegments = !0, this.type = "LineSegments";
|
|
4343
4343
|
}
|
|
@@ -4345,24 +4345,24 @@ var fa = /* @__PURE__ */ new I(), pa = /* @__PURE__ */ new I(), ma = class exten
|
|
|
4345
4345
|
let e = this.geometry;
|
|
4346
4346
|
if (e.index === null) {
|
|
4347
4347
|
let t = e.attributes.position, n = [];
|
|
4348
|
-
for (let e = 0, r = t.count; e < r; e += 2)
|
|
4349
|
-
e.setAttribute("lineDistance", new
|
|
4348
|
+
for (let e = 0, r = t.count; e < r; e += 2) ma.fromBufferAttribute(t, e), ha.fromBufferAttribute(t, e + 1), n[e] = e === 0 ? 0 : n[e - 1], n[e + 1] = n[e] + ma.distanceTo(ha);
|
|
4349
|
+
e.setAttribute("lineDistance", new K(n, 1));
|
|
4350
4350
|
} else k("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
|
|
4351
4351
|
return this;
|
|
4352
4352
|
}
|
|
4353
|
-
},
|
|
4353
|
+
}, _a = class extends fa {
|
|
4354
4354
|
constructor(e, t) {
|
|
4355
4355
|
super(e, t), this.isLineLoop = !0, this.type = "LineLoop";
|
|
4356
4356
|
}
|
|
4357
|
-
},
|
|
4357
|
+
}, va = class extends Y {
|
|
4358
4358
|
constructor(e) {
|
|
4359
|
-
super(), this.isPointsMaterial = !0, this.type = "PointsMaterial", this.color = new
|
|
4359
|
+
super(), this.isPointsMaterial = !0, this.type = "PointsMaterial", this.color = new H(16777215), this.map = null, this.alphaMap = null, this.size = 1, this.sizeAttenuation = !0, this.fog = !0, this.setValues(e);
|
|
4360
4360
|
}
|
|
4361
4361
|
copy(e) {
|
|
4362
4362
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.alphaMap = e.alphaMap, this.size = e.size, this.sizeAttenuation = e.sizeAttenuation, this.fog = e.fog, this;
|
|
4363
4363
|
}
|
|
4364
|
-
},
|
|
4365
|
-
constructor(e = new
|
|
4364
|
+
}, ya = /* @__PURE__ */ new z(), ba = /* @__PURE__ */ new si(), xa = /* @__PURE__ */ new Hr(), Sa = /* @__PURE__ */ new I(), Ca = class extends V {
|
|
4365
|
+
constructor(e = new Yr(), t = new va()) {
|
|
4366
4366
|
super(), this.isPoints = !0, this.type = "Points", this.geometry = e, this.material = t, this.morphTargetDictionary = void 0, this.morphTargetInfluences = void 0, this.updateMorphTargets();
|
|
4367
4367
|
}
|
|
4368
4368
|
copy(e, t) {
|
|
@@ -4370,18 +4370,18 @@ var fa = /* @__PURE__ */ new I(), pa = /* @__PURE__ */ new I(), ma = class exten
|
|
|
4370
4370
|
}
|
|
4371
4371
|
raycast(e, t) {
|
|
4372
4372
|
let n = this.geometry, r = this.matrixWorld, i = e.params.Points.threshold, a = n.drawRange;
|
|
4373
|
-
if (n.boundingSphere === null && n.computeBoundingSphere(),
|
|
4374
|
-
|
|
4373
|
+
if (n.boundingSphere === null && n.computeBoundingSphere(), xa.copy(n.boundingSphere), xa.applyMatrix4(r), xa.radius += i, e.ray.intersectsSphere(xa) === !1) return;
|
|
4374
|
+
ya.copy(r).invert(), ba.copy(e.ray).applyMatrix4(ya);
|
|
4375
4375
|
let o = i / ((this.scale.x + this.scale.y + this.scale.z) / 3), s = o * o, c = n.index, l = n.attributes.position;
|
|
4376
4376
|
if (c !== null) {
|
|
4377
4377
|
let n = Math.max(0, a.start), i = Math.min(c.count, a.start + a.count);
|
|
4378
4378
|
for (let a = n, o = i; a < o; a++) {
|
|
4379
4379
|
let n = c.getX(a);
|
|
4380
|
-
|
|
4380
|
+
Sa.fromBufferAttribute(l, n), wa(Sa, n, s, r, e, t, this);
|
|
4381
4381
|
}
|
|
4382
4382
|
} else {
|
|
4383
4383
|
let n = Math.max(0, a.start), i = Math.min(l.count, a.start + a.count);
|
|
4384
|
-
for (let a = n, o = i; a < o; a++)
|
|
4384
|
+
for (let a = n, o = i; a < o; a++) Sa.fromBufferAttribute(l, a), wa(Sa, a, s, r, e, t, this);
|
|
4385
4385
|
}
|
|
4386
4386
|
}
|
|
4387
4387
|
updateMorphTargets() {
|
|
@@ -4398,11 +4398,11 @@ var fa = /* @__PURE__ */ new I(), pa = /* @__PURE__ */ new I(), ma = class exten
|
|
|
4398
4398
|
}
|
|
4399
4399
|
}
|
|
4400
4400
|
};
|
|
4401
|
-
function
|
|
4402
|
-
let s =
|
|
4401
|
+
function wa(e, t, n, r, i, a, o) {
|
|
4402
|
+
let s = ba.distanceSqToPoint(e);
|
|
4403
4403
|
if (s < n) {
|
|
4404
4404
|
let n = new I();
|
|
4405
|
-
|
|
4405
|
+
ba.closestPointToPoint(e, n), n.applyMatrix4(r);
|
|
4406
4406
|
let c = i.ray.origin.distanceTo(n);
|
|
4407
4407
|
if (c < i.near || c > i.far) return;
|
|
4408
4408
|
a.push({
|
|
@@ -4417,21 +4417,21 @@ function Sa(e, t, n, r, i, a, o) {
|
|
|
4417
4417
|
});
|
|
4418
4418
|
}
|
|
4419
4419
|
}
|
|
4420
|
-
var
|
|
4420
|
+
var Ta = class extends R {
|
|
4421
4421
|
constructor(e, t) {
|
|
4422
4422
|
super({
|
|
4423
4423
|
width: e,
|
|
4424
4424
|
height: t
|
|
4425
|
-
}), this.isFramebufferTexture = !0, this.magFilter =
|
|
4425
|
+
}), this.isFramebufferTexture = !0, this.magFilter = a, this.minFilter = a, this.generateMipmaps = !1, this.needsUpdate = !0;
|
|
4426
4426
|
}
|
|
4427
|
-
},
|
|
4427
|
+
}, Ea = class extends R {
|
|
4428
4428
|
constructor(e, t, n, r, i, a, o, s, c, l, u, d) {
|
|
4429
4429
|
super(null, a, o, s, c, l, r, i, u, d), this.isCompressedTexture = !0, this.image = {
|
|
4430
4430
|
width: t,
|
|
4431
4431
|
height: n
|
|
4432
4432
|
}, this.mipmaps = e, this.flipY = !1, this.generateMipmaps = !1;
|
|
4433
4433
|
}
|
|
4434
|
-
},
|
|
4434
|
+
}, Da = class extends R {
|
|
4435
4435
|
constructor(e = [], t = 301, n, r, i, a, o, s, c, l) {
|
|
4436
4436
|
super(e, t, n, r, i, a, o, s, c, l), this.isCubeTexture = !0, this.flipY = !1;
|
|
4437
4437
|
}
|
|
@@ -4441,24 +4441,24 @@ var Ca = class extends R {
|
|
|
4441
4441
|
set images(e) {
|
|
4442
4442
|
this.image = e;
|
|
4443
4443
|
}
|
|
4444
|
-
},
|
|
4445
|
-
constructor(e, t, n =
|
|
4444
|
+
}, Oa = class extends R {
|
|
4445
|
+
constructor(e, t, n = _, r, i, o, s = a, c = a, l, u = ee, d = 1) {
|
|
4446
4446
|
if (u !== 1026 && u !== 1027) throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
|
|
4447
4447
|
super({
|
|
4448
4448
|
width: e,
|
|
4449
4449
|
height: t,
|
|
4450
4450
|
depth: d
|
|
4451
|
-
}, r,
|
|
4451
|
+
}, r, i, o, s, c, u, n, l), this.isDepthTexture = !0, this.flipY = !1, this.generateMipmaps = !1, this.compareFunction = null;
|
|
4452
4452
|
}
|
|
4453
4453
|
copy(e) {
|
|
4454
|
-
return super.copy(e), this.source = new
|
|
4454
|
+
return super.copy(e), this.source = new dn(Object.assign({}, e.image)), this.compareFunction = e.compareFunction, this;
|
|
4455
4455
|
}
|
|
4456
4456
|
toJSON(e) {
|
|
4457
4457
|
let t = super.toJSON(e);
|
|
4458
4458
|
return this.compareFunction !== null && (t.compareFunction = this.compareFunction), t;
|
|
4459
4459
|
}
|
|
4460
|
-
},
|
|
4461
|
-
constructor(e, t =
|
|
4460
|
+
}, ka = class extends Oa {
|
|
4461
|
+
constructor(e, t = _, n = 301, r, i, o = a, s = a, c, l = ee) {
|
|
4462
4462
|
let u = {
|
|
4463
4463
|
width: e,
|
|
4464
4464
|
height: e,
|
|
@@ -4471,7 +4471,7 @@ var Ca = class extends R {
|
|
|
4471
4471
|
u,
|
|
4472
4472
|
u
|
|
4473
4473
|
];
|
|
4474
|
-
super(e, e, t, n, r,
|
|
4474
|
+
super(e, e, t, n, r, i, o, s, c, l), this.image = d, this.isCubeDepthTexture = !0, this.isCubeTexture = !0;
|
|
4475
4475
|
}
|
|
4476
4476
|
get images() {
|
|
4477
4477
|
return this.image;
|
|
@@ -4479,14 +4479,14 @@ var Ca = class extends R {
|
|
|
4479
4479
|
set images(e) {
|
|
4480
4480
|
this.image = e;
|
|
4481
4481
|
}
|
|
4482
|
-
},
|
|
4482
|
+
}, Aa = class extends R {
|
|
4483
4483
|
constructor(e = null) {
|
|
4484
4484
|
super(), this.sourceTexture = e, this.isExternalTexture = !0;
|
|
4485
4485
|
}
|
|
4486
4486
|
copy(e) {
|
|
4487
4487
|
return super.copy(e), this.sourceTexture = e.sourceTexture, this;
|
|
4488
4488
|
}
|
|
4489
|
-
},
|
|
4489
|
+
}, ja = class e extends Yr {
|
|
4490
4490
|
constructor(e = 1, t = 1, n = 1, r = 1, i = 1, a = 1) {
|
|
4491
4491
|
super(), this.type = "BoxGeometry", this.parameters = {
|
|
4492
4492
|
width: e,
|
|
@@ -4499,7 +4499,7 @@ var Ca = class extends R {
|
|
|
4499
4499
|
let o = this;
|
|
4500
4500
|
r = Math.floor(r), i = Math.floor(i), a = Math.floor(a);
|
|
4501
4501
|
let s = [], c = [], l = [], u = [], d = 0, f = 0;
|
|
4502
|
-
p("z", "y", "x", -1, -1, n, t, e, a, i, 0), p("z", "y", "x", 1, -1, n, t, -e, a, i, 1), p("x", "z", "y", 1, 1, e, n, t, r, a, 2), p("x", "z", "y", 1, -1, e, n, -t, r, a, 3), p("x", "y", "z", 1, -1, e, t, n, r, i, 4), p("x", "y", "z", -1, -1, e, t, -n, r, i, 5), this.setIndex(s), this.setAttribute("position", new
|
|
4502
|
+
p("z", "y", "x", -1, -1, n, t, e, a, i, 0), p("z", "y", "x", 1, -1, n, t, -e, a, i, 1), p("x", "z", "y", 1, 1, e, n, t, r, a, 2), p("x", "z", "y", 1, -1, e, n, -t, r, a, 3), p("x", "y", "z", 1, -1, e, t, n, r, i, 4), p("x", "y", "z", -1, -1, e, t, -n, r, i, 5), this.setIndex(s), this.setAttribute("position", new K(c, 3)), this.setAttribute("normal", new K(l, 3)), this.setAttribute("uv", new K(u, 2));
|
|
4503
4503
|
function p(e, t, n, r, i, a, p, m, h, g, _) {
|
|
4504
4504
|
let v = a / h, y = p / g, b = a / 2, x = p / 2, S = m / 2, C = h + 1, w = g + 1, T = 0, E = 0, D = new I();
|
|
4505
4505
|
for (let a = 0; a < w; a++) {
|
|
@@ -4519,7 +4519,7 @@ var Ca = class extends R {
|
|
|
4519
4519
|
static fromJSON(t) {
|
|
4520
4520
|
return new e(t.width, t.height, t.depth, t.widthSegments, t.heightSegments, t.depthSegments);
|
|
4521
4521
|
}
|
|
4522
|
-
},
|
|
4522
|
+
}, Ma = class e extends Yr {
|
|
4523
4523
|
constructor(e = 1, t = 32, n = 0, r = Math.PI * 2) {
|
|
4524
4524
|
super(), this.type = "CircleGeometry", this.parameters = {
|
|
4525
4525
|
radius: e,
|
|
@@ -4534,7 +4534,7 @@ var Ca = class extends R {
|
|
|
4534
4534
|
c.x = e * Math.cos(d), c.y = e * Math.sin(d), a.push(c.x, c.y, c.z), o.push(0, 0, 1), l.x = (a[u] / e + 1) / 2, l.y = (a[u + 1] / e + 1) / 2, s.push(l.x, l.y);
|
|
4535
4535
|
}
|
|
4536
4536
|
for (let e = 1; e <= t; e++) i.push(e, e + 1, 0);
|
|
4537
|
-
this.setIndex(i), this.setAttribute("position", new
|
|
4537
|
+
this.setIndex(i), this.setAttribute("position", new K(a, 3)), this.setAttribute("normal", new K(o, 3)), this.setAttribute("uv", new K(s, 2));
|
|
4538
4538
|
}
|
|
4539
4539
|
copy(e) {
|
|
4540
4540
|
return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
|
|
@@ -4542,7 +4542,7 @@ var Ca = class extends R {
|
|
|
4542
4542
|
static fromJSON(t) {
|
|
4543
4543
|
return new e(t.radius, t.segments, t.thetaStart, t.thetaLength);
|
|
4544
4544
|
}
|
|
4545
|
-
},
|
|
4545
|
+
}, Na = class e extends Yr {
|
|
4546
4546
|
constructor(e = 1, t = 1, n = 1, r = 32, i = 1, a = !1, o = 0, s = Math.PI * 2) {
|
|
4547
4547
|
super(), this.type = "CylinderGeometry", this.parameters = {
|
|
4548
4548
|
radiusTop: e,
|
|
@@ -4557,7 +4557,7 @@ var Ca = class extends R {
|
|
|
4557
4557
|
let c = this;
|
|
4558
4558
|
r = Math.floor(r), i = Math.floor(i);
|
|
4559
4559
|
let l = [], u = [], d = [], f = [], p = 0, m = [], h = n / 2, g = 0;
|
|
4560
|
-
_(), a === !1 && (e > 0 && v(!0), t > 0 && v(!1)), this.setIndex(l), this.setAttribute("position", new
|
|
4560
|
+
_(), a === !1 && (e > 0 && v(!0), t > 0 && v(!1)), this.setIndex(l), this.setAttribute("position", new K(u, 3)), this.setAttribute("normal", new K(d, 3)), this.setAttribute("uv", new K(f, 2));
|
|
4561
4561
|
function _() {
|
|
4562
4562
|
let a = new I(), _ = new I(), v = 0, y = (t - e) / n;
|
|
4563
4563
|
for (let c = 0; c <= i; c++) {
|
|
@@ -4595,7 +4595,7 @@ var Ca = class extends R {
|
|
|
4595
4595
|
static fromJSON(t) {
|
|
4596
4596
|
return new e(t.radiusTop, t.radiusBottom, t.height, t.radialSegments, t.heightSegments, t.openEnded, t.thetaStart, t.thetaLength);
|
|
4597
4597
|
}
|
|
4598
|
-
},
|
|
4598
|
+
}, Pa = class e extends Na {
|
|
4599
4599
|
constructor(e = 1, t = 1, n = 32, r = 1, i = !1, a = 0, o = Math.PI * 2) {
|
|
4600
4600
|
super(0, e, t, n, r, i, a, o), this.type = "ConeGeometry", this.parameters = {
|
|
4601
4601
|
radius: e,
|
|
@@ -4610,13 +4610,13 @@ var Ca = class extends R {
|
|
|
4610
4610
|
static fromJSON(t) {
|
|
4611
4611
|
return new e(t.radius, t.height, t.radialSegments, t.heightSegments, t.openEnded, t.thetaStart, t.thetaLength);
|
|
4612
4612
|
}
|
|
4613
|
-
},
|
|
4613
|
+
}, Fa = /* @__PURE__ */ new I(), Ia = /* @__PURE__ */ new I(), La = /* @__PURE__ */ new I(), Ra = /* @__PURE__ */ new pr(), za = class extends Yr {
|
|
4614
4614
|
constructor(e = null, t = 1) {
|
|
4615
4615
|
if (super(), this.type = "EdgesGeometry", this.parameters = {
|
|
4616
4616
|
geometry: e,
|
|
4617
4617
|
thresholdAngle: t
|
|
4618
4618
|
}, e !== null) {
|
|
4619
|
-
let n = 10 ** 4, r = Math.cos(
|
|
4619
|
+
let n = 10 ** 4, r = Math.cos(kt * t), i = e.getIndex(), a = e.getAttribute("position"), o = i ? i.count : a.count, s = [
|
|
4620
4620
|
0,
|
|
4621
4621
|
0,
|
|
4622
4622
|
0
|
|
@@ -4631,27 +4631,27 @@ var Ca = class extends R {
|
|
|
4631
4631
|
], u = {}, d = [];
|
|
4632
4632
|
for (let e = 0; e < o; e += 3) {
|
|
4633
4633
|
i ? (s[0] = i.getX(e), s[1] = i.getX(e + 1), s[2] = i.getX(e + 2)) : (s[0] = e, s[1] = e + 1, s[2] = e + 2);
|
|
4634
|
-
let { a: t, b: o, c: f } =
|
|
4635
|
-
if (t.fromBufferAttribute(a, s[0]), o.fromBufferAttribute(a, s[1]), f.fromBufferAttribute(a, s[2]),
|
|
4636
|
-
let t = (e + 1) % 3, n = l[e], i = l[t], a =
|
|
4637
|
-
p in u && u[p] ? (
|
|
4634
|
+
let { a: t, b: o, c: f } = Ra;
|
|
4635
|
+
if (t.fromBufferAttribute(a, s[0]), o.fromBufferAttribute(a, s[1]), f.fromBufferAttribute(a, s[2]), Ra.getNormal(La), l[0] = `${Math.round(t.x * n)},${Math.round(t.y * n)},${Math.round(t.z * n)}`, l[1] = `${Math.round(o.x * n)},${Math.round(o.y * n)},${Math.round(o.z * n)}`, l[2] = `${Math.round(f.x * n)},${Math.round(f.y * n)},${Math.round(f.z * n)}`, !(l[0] === l[1] || l[1] === l[2] || l[2] === l[0])) for (let e = 0; e < 3; e++) {
|
|
4636
|
+
let t = (e + 1) % 3, n = l[e], i = l[t], a = Ra[c[e]], o = Ra[c[t]], f = `${n}_${i}`, p = `${i}_${n}`;
|
|
4637
|
+
p in u && u[p] ? (La.dot(u[p].normal) <= r && (d.push(a.x, a.y, a.z), d.push(o.x, o.y, o.z)), u[p] = null) : f in u || (u[f] = {
|
|
4638
4638
|
index0: s[e],
|
|
4639
4639
|
index1: s[t],
|
|
4640
|
-
normal:
|
|
4640
|
+
normal: La.clone()
|
|
4641
4641
|
});
|
|
4642
4642
|
}
|
|
4643
4643
|
}
|
|
4644
4644
|
for (let e in u) if (u[e]) {
|
|
4645
4645
|
let { index0: t, index1: n } = u[e];
|
|
4646
|
-
|
|
4646
|
+
Fa.fromBufferAttribute(a, t), Ia.fromBufferAttribute(a, n), d.push(Fa.x, Fa.y, Fa.z), d.push(Ia.x, Ia.y, Ia.z);
|
|
4647
4647
|
}
|
|
4648
|
-
this.setAttribute("position", new
|
|
4648
|
+
this.setAttribute("position", new K(d, 3));
|
|
4649
4649
|
}
|
|
4650
4650
|
}
|
|
4651
4651
|
copy(e) {
|
|
4652
4652
|
return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
|
|
4653
4653
|
}
|
|
4654
|
-
},
|
|
4654
|
+
}, Ba = class {
|
|
4655
4655
|
constructor() {
|
|
4656
4656
|
this.type = "Curve", this.arcLengthDivisions = 200, this.needsUpdate = !1, this.cacheArcLengths = null;
|
|
4657
4657
|
}
|
|
@@ -4756,7 +4756,7 @@ var Ca = class extends R {
|
|
|
4756
4756
|
fromJSON(e) {
|
|
4757
4757
|
return this.arcLengthDivisions = e.arcLengthDivisions, this;
|
|
4758
4758
|
}
|
|
4759
|
-
},
|
|
4759
|
+
}, Va = class extends Ba {
|
|
4760
4760
|
constructor(e = 0, t = 0, n = 1, r = 1, i = 0, a = Math.PI * 2, o = !1, s = 0) {
|
|
4761
4761
|
super(), this.isEllipseCurve = !0, this.type = "EllipseCurve", this.aX = e, this.aY = t, this.xRadius = n, this.yRadius = r, this.aStartAngle = i, this.aEndAngle = a, this.aClockwise = o, this.aRotation = s;
|
|
4762
4762
|
}
|
|
@@ -4782,12 +4782,12 @@ var Ca = class extends R {
|
|
|
4782
4782
|
fromJSON(e) {
|
|
4783
4783
|
return super.fromJSON(e), this.aX = e.aX, this.aY = e.aY, this.xRadius = e.xRadius, this.yRadius = e.yRadius, this.aStartAngle = e.aStartAngle, this.aEndAngle = e.aEndAngle, this.aClockwise = e.aClockwise, this.aRotation = e.aRotation, this;
|
|
4784
4784
|
}
|
|
4785
|
-
},
|
|
4785
|
+
}, Ha = class extends Va {
|
|
4786
4786
|
constructor(e, t, n, r, i, a) {
|
|
4787
4787
|
super(e, t, n, n, r, i, a), this.isArcCurve = !0, this.type = "ArcCurve";
|
|
4788
4788
|
}
|
|
4789
4789
|
};
|
|
4790
|
-
function
|
|
4790
|
+
function Ua() {
|
|
4791
4791
|
let e = 0, t = 0, n = 0, r = 0;
|
|
4792
4792
|
function i(i, a, o, s) {
|
|
4793
4793
|
e = i, t = o, n = -3 * i + 3 * a - 2 * o - s, r = 2 * i - 2 * a + o + s;
|
|
@@ -4806,7 +4806,7 @@ function Va() {
|
|
|
4806
4806
|
}
|
|
4807
4807
|
};
|
|
4808
4808
|
}
|
|
4809
|
-
var
|
|
4809
|
+
var Wa = /* @__PURE__ */ new I(), Ga = /* @__PURE__ */ new Ua(), Ka = /* @__PURE__ */ new Ua(), qa = /* @__PURE__ */ new Ua(), Ja = class extends Ba {
|
|
4810
4810
|
constructor(e = [], t = !1, n = "centripetal", r = .5) {
|
|
4811
4811
|
super(), this.isCatmullRomCurve3 = !0, this.type = "CatmullRomCurve3", this.points = e, this.closed = t, this.curveType = n, this.tension = r;
|
|
4812
4812
|
}
|
|
@@ -4814,13 +4814,13 @@ var Ha = /* @__PURE__ */ new I(), Ua = /* @__PURE__ */ new Va(), Wa = /* @__PURE
|
|
|
4814
4814
|
let n = t, r = this.points, i = r.length, a = (i - (this.closed ? 0 : 1)) * e, o = Math.floor(a), s = a - o;
|
|
4815
4815
|
this.closed ? o += o > 0 ? 0 : (Math.floor(Math.abs(o) / i) + 1) * i : s === 0 && o === i - 1 && (o = i - 2, s = 1);
|
|
4816
4816
|
let c, l;
|
|
4817
|
-
this.closed || o > 0 ? c = r[(o - 1) % i] : (
|
|
4817
|
+
this.closed || o > 0 ? c = r[(o - 1) % i] : (Wa.subVectors(r[0], r[1]).add(r[0]), c = Wa);
|
|
4818
4818
|
let u = r[o % i], d = r[(o + 1) % i];
|
|
4819
|
-
if (this.closed || o + 2 < i ? l = r[(o + 2) % i] : (
|
|
4819
|
+
if (this.closed || o + 2 < i ? l = r[(o + 2) % i] : (Wa.subVectors(r[i - 1], r[i - 2]).add(r[i - 1]), l = Wa), this.curveType === "centripetal" || this.curveType === "chordal") {
|
|
4820
4820
|
let e = this.curveType === "chordal" ? .5 : .25, t = c.distanceToSquared(u) ** +e, n = u.distanceToSquared(d) ** +e, r = d.distanceToSquared(l) ** +e;
|
|
4821
|
-
n < 1e-4 && (n = 1), t < 1e-4 && (t = n), r < 1e-4 && (r = n),
|
|
4822
|
-
} else this.curveType === "catmullrom" && (
|
|
4823
|
-
return n.set(
|
|
4821
|
+
n < 1e-4 && (n = 1), t < 1e-4 && (t = n), r < 1e-4 && (r = n), Ga.initNonuniformCatmullRom(c.x, u.x, d.x, l.x, t, n, r), Ka.initNonuniformCatmullRom(c.y, u.y, d.y, l.y, t, n, r), qa.initNonuniformCatmullRom(c.z, u.z, d.z, l.z, t, n, r);
|
|
4822
|
+
} else this.curveType === "catmullrom" && (Ga.initCatmullRom(c.x, u.x, d.x, l.x, this.tension), Ka.initCatmullRom(c.y, u.y, d.y, l.y, this.tension), qa.initCatmullRom(c.z, u.z, d.z, l.z, this.tension));
|
|
4823
|
+
return n.set(Ga.calc(s), Ka.calc(s), qa.calc(s)), n;
|
|
4824
4824
|
}
|
|
4825
4825
|
copy(e) {
|
|
4826
4826
|
super.copy(e), this.points = [];
|
|
@@ -4848,47 +4848,47 @@ var Ha = /* @__PURE__ */ new I(), Ua = /* @__PURE__ */ new Va(), Wa = /* @__PURE
|
|
|
4848
4848
|
return this.closed = e.closed, this.curveType = e.curveType, this.tension = e.tension, this;
|
|
4849
4849
|
}
|
|
4850
4850
|
};
|
|
4851
|
-
function
|
|
4851
|
+
function Ya(e, t, n, r, i) {
|
|
4852
4852
|
let a = (r - t) * .5, o = (i - n) * .5, s = e * e, c = e * s;
|
|
4853
4853
|
return (2 * n - 2 * r + a + o) * c + (-3 * n + 3 * r - 2 * a - o) * s + a * e + n;
|
|
4854
4854
|
}
|
|
4855
|
-
function
|
|
4855
|
+
function Xa(e, t) {
|
|
4856
4856
|
let n = 1 - e;
|
|
4857
4857
|
return n * n * t;
|
|
4858
4858
|
}
|
|
4859
|
-
function
|
|
4859
|
+
function Za(e, t) {
|
|
4860
4860
|
return 2 * (1 - e) * e * t;
|
|
4861
4861
|
}
|
|
4862
|
-
function
|
|
4862
|
+
function Qa(e, t) {
|
|
4863
4863
|
return e * e * t;
|
|
4864
4864
|
}
|
|
4865
|
-
function
|
|
4866
|
-
return
|
|
4865
|
+
function $a(e, t, n, r) {
|
|
4866
|
+
return Xa(e, t) + Za(e, n) + Qa(e, r);
|
|
4867
4867
|
}
|
|
4868
|
-
function
|
|
4868
|
+
function eo(e, t) {
|
|
4869
4869
|
let n = 1 - e;
|
|
4870
4870
|
return n * n * n * t;
|
|
4871
4871
|
}
|
|
4872
|
-
function
|
|
4872
|
+
function to(e, t) {
|
|
4873
4873
|
let n = 1 - e;
|
|
4874
4874
|
return 3 * n * n * e * t;
|
|
4875
4875
|
}
|
|
4876
|
-
function
|
|
4876
|
+
function no(e, t) {
|
|
4877
4877
|
return 3 * (1 - e) * e * e * t;
|
|
4878
4878
|
}
|
|
4879
|
-
function
|
|
4879
|
+
function ro(e, t) {
|
|
4880
4880
|
return e * e * e * t;
|
|
4881
4881
|
}
|
|
4882
|
-
function
|
|
4883
|
-
return
|
|
4882
|
+
function io(e, t, n, r, i) {
|
|
4883
|
+
return eo(e, t) + to(e, n) + no(e, r) + ro(e, i);
|
|
4884
4884
|
}
|
|
4885
|
-
var
|
|
4885
|
+
var ao = class extends Ba {
|
|
4886
4886
|
constructor(e = new F(), t = new F(), n = new F(), r = new F()) {
|
|
4887
4887
|
super(), this.isCubicBezierCurve = !0, this.type = "CubicBezierCurve", this.v0 = e, this.v1 = t, this.v2 = n, this.v3 = r;
|
|
4888
4888
|
}
|
|
4889
4889
|
getPoint(e, t = new F()) {
|
|
4890
4890
|
let n = t, r = this.v0, i = this.v1, a = this.v2, o = this.v3;
|
|
4891
|
-
return n.set(
|
|
4891
|
+
return n.set(io(e, r.x, i.x, a.x, o.x), io(e, r.y, i.y, a.y, o.y)), n;
|
|
4892
4892
|
}
|
|
4893
4893
|
copy(e) {
|
|
4894
4894
|
return super.copy(e), this.v0.copy(e.v0), this.v1.copy(e.v1), this.v2.copy(e.v2), this.v3.copy(e.v3), this;
|
|
@@ -4900,13 +4900,13 @@ var ro = class extends Ra {
|
|
|
4900
4900
|
fromJSON(e) {
|
|
4901
4901
|
return super.fromJSON(e), this.v0.fromArray(e.v0), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this.v3.fromArray(e.v3), this;
|
|
4902
4902
|
}
|
|
4903
|
-
},
|
|
4903
|
+
}, oo = class extends Ba {
|
|
4904
4904
|
constructor(e = new I(), t = new I(), n = new I(), r = new I()) {
|
|
4905
4905
|
super(), this.isCubicBezierCurve3 = !0, this.type = "CubicBezierCurve3", this.v0 = e, this.v1 = t, this.v2 = n, this.v3 = r;
|
|
4906
4906
|
}
|
|
4907
4907
|
getPoint(e, t = new I()) {
|
|
4908
4908
|
let n = t, r = this.v0, i = this.v1, a = this.v2, o = this.v3;
|
|
4909
|
-
return n.set(
|
|
4909
|
+
return n.set(io(e, r.x, i.x, a.x, o.x), io(e, r.y, i.y, a.y, o.y), io(e, r.z, i.z, a.z, o.z)), n;
|
|
4910
4910
|
}
|
|
4911
4911
|
copy(e) {
|
|
4912
4912
|
return super.copy(e), this.v0.copy(e.v0), this.v1.copy(e.v1), this.v2.copy(e.v2), this.v3.copy(e.v3), this;
|
|
@@ -4918,7 +4918,7 @@ var ro = class extends Ra {
|
|
|
4918
4918
|
fromJSON(e) {
|
|
4919
4919
|
return super.fromJSON(e), this.v0.fromArray(e.v0), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this.v3.fromArray(e.v3), this;
|
|
4920
4920
|
}
|
|
4921
|
-
},
|
|
4921
|
+
}, so = class extends Ba {
|
|
4922
4922
|
constructor(e = new F(), t = new F()) {
|
|
4923
4923
|
super(), this.isLineCurve = !0, this.type = "LineCurve", this.v1 = e, this.v2 = t;
|
|
4924
4924
|
}
|
|
@@ -4945,7 +4945,7 @@ var ro = class extends Ra {
|
|
|
4945
4945
|
fromJSON(e) {
|
|
4946
4946
|
return super.fromJSON(e), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this;
|
|
4947
4947
|
}
|
|
4948
|
-
},
|
|
4948
|
+
}, co = class extends Ba {
|
|
4949
4949
|
constructor(e = new I(), t = new I()) {
|
|
4950
4950
|
super(), this.isLineCurve3 = !0, this.type = "LineCurve3", this.v1 = e, this.v2 = t;
|
|
4951
4951
|
}
|
|
@@ -4972,13 +4972,13 @@ var ro = class extends Ra {
|
|
|
4972
4972
|
fromJSON(e) {
|
|
4973
4973
|
return super.fromJSON(e), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this;
|
|
4974
4974
|
}
|
|
4975
|
-
},
|
|
4975
|
+
}, lo = class extends Ba {
|
|
4976
4976
|
constructor(e = new F(), t = new F(), n = new F()) {
|
|
4977
4977
|
super(), this.isQuadraticBezierCurve = !0, this.type = "QuadraticBezierCurve", this.v0 = e, this.v1 = t, this.v2 = n;
|
|
4978
4978
|
}
|
|
4979
4979
|
getPoint(e, t = new F()) {
|
|
4980
4980
|
let n = t, r = this.v0, i = this.v1, a = this.v2;
|
|
4981
|
-
return n.set(
|
|
4981
|
+
return n.set($a(e, r.x, i.x, a.x), $a(e, r.y, i.y, a.y)), n;
|
|
4982
4982
|
}
|
|
4983
4983
|
copy(e) {
|
|
4984
4984
|
return super.copy(e), this.v0.copy(e.v0), this.v1.copy(e.v1), this.v2.copy(e.v2), this;
|
|
@@ -4990,13 +4990,13 @@ var ro = class extends Ra {
|
|
|
4990
4990
|
fromJSON(e) {
|
|
4991
4991
|
return super.fromJSON(e), this.v0.fromArray(e.v0), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this;
|
|
4992
4992
|
}
|
|
4993
|
-
},
|
|
4993
|
+
}, uo = class extends Ba {
|
|
4994
4994
|
constructor(e = new I(), t = new I(), n = new I()) {
|
|
4995
4995
|
super(), this.isQuadraticBezierCurve3 = !0, this.type = "QuadraticBezierCurve3", this.v0 = e, this.v1 = t, this.v2 = n;
|
|
4996
4996
|
}
|
|
4997
4997
|
getPoint(e, t = new I()) {
|
|
4998
4998
|
let n = t, r = this.v0, i = this.v1, a = this.v2;
|
|
4999
|
-
return n.set(
|
|
4999
|
+
return n.set($a(e, r.x, i.x, a.x), $a(e, r.y, i.y, a.y), $a(e, r.z, i.z, a.z)), n;
|
|
5000
5000
|
}
|
|
5001
5001
|
copy(e) {
|
|
5002
5002
|
return super.copy(e), this.v0.copy(e.v0), this.v1.copy(e.v1), this.v2.copy(e.v2), this;
|
|
@@ -5008,13 +5008,13 @@ var ro = class extends Ra {
|
|
|
5008
5008
|
fromJSON(e) {
|
|
5009
5009
|
return super.fromJSON(e), this.v0.fromArray(e.v0), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this;
|
|
5010
5010
|
}
|
|
5011
|
-
},
|
|
5011
|
+
}, fo = class extends Ba {
|
|
5012
5012
|
constructor(e = []) {
|
|
5013
5013
|
super(), this.isSplineCurve = !0, this.type = "SplineCurve", this.points = e;
|
|
5014
5014
|
}
|
|
5015
5015
|
getPoint(e, t = new F()) {
|
|
5016
5016
|
let n = t, r = this.points, i = (r.length - 1) * e, a = Math.floor(i), o = i - a, s = r[a === 0 ? a : a - 1], c = r[a], l = r[a > r.length - 2 ? r.length - 1 : a + 1], u = r[a > r.length - 3 ? r.length - 1 : a + 2];
|
|
5017
|
-
return n.set(
|
|
5017
|
+
return n.set(Ya(o, s.x, c.x, l.x, u.x), Ya(o, s.y, c.y, l.y, u.y)), n;
|
|
5018
5018
|
}
|
|
5019
5019
|
copy(e) {
|
|
5020
5020
|
super.copy(e), this.points = [];
|
|
@@ -5041,19 +5041,19 @@ var ro = class extends Ra {
|
|
|
5041
5041
|
}
|
|
5042
5042
|
return this;
|
|
5043
5043
|
}
|
|
5044
|
-
},
|
|
5044
|
+
}, po = /* @__PURE__ */ Object.freeze({
|
|
5045
5045
|
__proto__: null,
|
|
5046
|
-
ArcCurve:
|
|
5047
|
-
CatmullRomCurve3:
|
|
5048
|
-
CubicBezierCurve:
|
|
5049
|
-
CubicBezierCurve3:
|
|
5050
|
-
EllipseCurve:
|
|
5051
|
-
LineCurve:
|
|
5052
|
-
LineCurve3:
|
|
5053
|
-
QuadraticBezierCurve:
|
|
5054
|
-
QuadraticBezierCurve3:
|
|
5055
|
-
SplineCurve:
|
|
5056
|
-
}),
|
|
5046
|
+
ArcCurve: Ha,
|
|
5047
|
+
CatmullRomCurve3: Ja,
|
|
5048
|
+
CubicBezierCurve: ao,
|
|
5049
|
+
CubicBezierCurve3: oo,
|
|
5050
|
+
EllipseCurve: Va,
|
|
5051
|
+
LineCurve: so,
|
|
5052
|
+
LineCurve3: co,
|
|
5053
|
+
QuadraticBezierCurve: lo,
|
|
5054
|
+
QuadraticBezierCurve3: uo,
|
|
5055
|
+
SplineCurve: fo
|
|
5056
|
+
}), mo = class extends Ba {
|
|
5057
5057
|
constructor() {
|
|
5058
5058
|
super(), this.type = "CurvePath", this.curves = [], this.autoClose = !1;
|
|
5059
5059
|
}
|
|
@@ -5064,7 +5064,7 @@ var ro = class extends Ra {
|
|
|
5064
5064
|
let e = this.curves[0].getPoint(0), t = this.curves[this.curves.length - 1].getPoint(1);
|
|
5065
5065
|
if (!e.equals(t)) {
|
|
5066
5066
|
let n = e.isVector2 === !0 ? "LineCurve" : "LineCurve3";
|
|
5067
|
-
this.curves.push(new
|
|
5067
|
+
this.curves.push(new po[n](t, e));
|
|
5068
5068
|
}
|
|
5069
5069
|
return this;
|
|
5070
5070
|
}
|
|
@@ -5129,11 +5129,11 @@ var ro = class extends Ra {
|
|
|
5129
5129
|
super.fromJSON(e), this.autoClose = e.autoClose, this.curves = [];
|
|
5130
5130
|
for (let t = 0, n = e.curves.length; t < n; t++) {
|
|
5131
5131
|
let n = e.curves[t];
|
|
5132
|
-
this.curves.push(new
|
|
5132
|
+
this.curves.push(new po[n.type]().fromJSON(n));
|
|
5133
5133
|
}
|
|
5134
5134
|
return this;
|
|
5135
5135
|
}
|
|
5136
|
-
},
|
|
5136
|
+
}, ho = class extends mo {
|
|
5137
5137
|
constructor(e) {
|
|
5138
5138
|
super(), this.type = "Path", this.currentPoint = new F(), e && this.setFromPoints(e);
|
|
5139
5139
|
}
|
|
@@ -5146,19 +5146,19 @@ var ro = class extends Ra {
|
|
|
5146
5146
|
return this.currentPoint.set(e, t), this;
|
|
5147
5147
|
}
|
|
5148
5148
|
lineTo(e, t) {
|
|
5149
|
-
let n = new
|
|
5149
|
+
let n = new so(this.currentPoint.clone(), new F(e, t));
|
|
5150
5150
|
return this.curves.push(n), this.currentPoint.set(e, t), this;
|
|
5151
5151
|
}
|
|
5152
5152
|
quadraticCurveTo(e, t, n, r) {
|
|
5153
|
-
let i = new
|
|
5153
|
+
let i = new lo(this.currentPoint.clone(), new F(e, t), new F(n, r));
|
|
5154
5154
|
return this.curves.push(i), this.currentPoint.set(n, r), this;
|
|
5155
5155
|
}
|
|
5156
5156
|
bezierCurveTo(e, t, n, r, i, a) {
|
|
5157
|
-
let o = new
|
|
5157
|
+
let o = new ao(this.currentPoint.clone(), new F(e, t), new F(n, r), new F(i, a));
|
|
5158
5158
|
return this.curves.push(o), this.currentPoint.set(i, a), this;
|
|
5159
5159
|
}
|
|
5160
5160
|
splineThru(e) {
|
|
5161
|
-
let t = new
|
|
5161
|
+
let t = new fo([this.currentPoint.clone()].concat(e));
|
|
5162
5162
|
return this.curves.push(t), this.currentPoint.copy(e[e.length - 1]), this;
|
|
5163
5163
|
}
|
|
5164
5164
|
arc(e, t, n, r, i, a) {
|
|
@@ -5173,7 +5173,7 @@ var ro = class extends Ra {
|
|
|
5173
5173
|
return this.absellipse(e + c, t + l, n, r, i, a, o, s), this;
|
|
5174
5174
|
}
|
|
5175
5175
|
absellipse(e, t, n, r, i, a, o, s) {
|
|
5176
|
-
let c = new
|
|
5176
|
+
let c = new Va(e, t, n, r, i, a, o, s);
|
|
5177
5177
|
if (this.curves.length > 0) {
|
|
5178
5178
|
let e = c.getPoint(0);
|
|
5179
5179
|
e.equals(this.currentPoint) || this.lineTo(e.x, e.y);
|
|
@@ -5192,9 +5192,9 @@ var ro = class extends Ra {
|
|
|
5192
5192
|
fromJSON(e) {
|
|
5193
5193
|
return super.fromJSON(e), this.currentPoint.fromArray(e.currentPoint), this;
|
|
5194
5194
|
}
|
|
5195
|
-
},
|
|
5195
|
+
}, go = class extends ho {
|
|
5196
5196
|
constructor(e) {
|
|
5197
|
-
super(e), this.uuid =
|
|
5197
|
+
super(e), this.uuid = jt(), this.type = "Shape", this.holes = [];
|
|
5198
5198
|
}
|
|
5199
5199
|
getPointsHoles(e) {
|
|
5200
5200
|
let t = [];
|
|
@@ -5228,16 +5228,16 @@ var ro = class extends Ra {
|
|
|
5228
5228
|
super.fromJSON(e), this.uuid = e.uuid, this.holes = [];
|
|
5229
5229
|
for (let t = 0, n = e.holes.length; t < n; t++) {
|
|
5230
5230
|
let n = e.holes[t];
|
|
5231
|
-
this.holes.push(new
|
|
5231
|
+
this.holes.push(new ho().fromJSON(n));
|
|
5232
5232
|
}
|
|
5233
5233
|
return this;
|
|
5234
5234
|
}
|
|
5235
5235
|
};
|
|
5236
|
-
function
|
|
5237
|
-
let r = t && t.length, i = r ? t[0] * n : e.length, a =
|
|
5236
|
+
function _o(e, t, n = 2) {
|
|
5237
|
+
let r = t && t.length, i = r ? t[0] * n : e.length, a = vo(e, 0, i, n, !0), o = [];
|
|
5238
5238
|
if (!a || a.next === a.prev) return o;
|
|
5239
5239
|
let s, c, l;
|
|
5240
|
-
if (r && (a =
|
|
5240
|
+
if (r && (a = To(e, t, a, n)), e.length > 80 * n) {
|
|
5241
5241
|
s = e[0], c = e[1];
|
|
5242
5242
|
let t = s, r = c;
|
|
5243
5243
|
for (let a = n; a < i; a += n) {
|
|
@@ -5246,86 +5246,86 @@ function ho(e, t, n = 2) {
|
|
|
5246
5246
|
}
|
|
5247
5247
|
l = Math.max(t - s, r - c), l = l === 0 ? 0 : 32767 / l;
|
|
5248
5248
|
}
|
|
5249
|
-
return
|
|
5249
|
+
return bo(a, o, n, s, c, l, 0), o;
|
|
5250
5250
|
}
|
|
5251
|
-
function
|
|
5251
|
+
function vo(e, t, n, r, i) {
|
|
5252
5252
|
let a;
|
|
5253
|
-
if (i ===
|
|
5254
|
-
else for (let i = n - r; i >= t; i -= r) a =
|
|
5255
|
-
return a &&
|
|
5253
|
+
if (i === Jo(e, t, n, r) > 0) for (let i = t; i < n; i += r) a = Go(i / r | 0, e[i], e[i + 1], a);
|
|
5254
|
+
else for (let i = n - r; i >= t; i -= r) a = Go(i / r | 0, e[i], e[i + 1], a);
|
|
5255
|
+
return a && Lo(a, a.next) && (Ko(a), a = a.next), a;
|
|
5256
5256
|
}
|
|
5257
|
-
function
|
|
5257
|
+
function yo(e, t) {
|
|
5258
5258
|
if (!e) return e;
|
|
5259
5259
|
t ||= e;
|
|
5260
5260
|
let n = e, r;
|
|
5261
5261
|
do
|
|
5262
|
-
if (r = !1, !n.steiner && (
|
|
5263
|
-
if (
|
|
5262
|
+
if (r = !1, !n.steiner && (Lo(n, n.next) || X(n.prev, n, n.next) === 0)) {
|
|
5263
|
+
if (Ko(n), n = t = n.prev, n === n.next) break;
|
|
5264
5264
|
r = !0;
|
|
5265
5265
|
} else n = n.next;
|
|
5266
5266
|
while (r || n !== t);
|
|
5267
5267
|
return t;
|
|
5268
5268
|
}
|
|
5269
|
-
function
|
|
5269
|
+
function bo(e, t, n, r, i, a, o) {
|
|
5270
5270
|
if (!e) return;
|
|
5271
|
-
!o && a &&
|
|
5271
|
+
!o && a && Ao(e, r, i, a);
|
|
5272
5272
|
let s = e;
|
|
5273
5273
|
for (; e.prev !== e.next;) {
|
|
5274
5274
|
let c = e.prev, l = e.next;
|
|
5275
|
-
if (a ?
|
|
5276
|
-
t.push(c.i, e.i, l.i),
|
|
5275
|
+
if (a ? So(e, r, i, a) : xo(e)) {
|
|
5276
|
+
t.push(c.i, e.i, l.i), Ko(e), e = l.next, s = l.next;
|
|
5277
5277
|
continue;
|
|
5278
5278
|
}
|
|
5279
5279
|
if (e = l, e === s) {
|
|
5280
|
-
o ? o === 1 ? (e =
|
|
5280
|
+
o ? o === 1 ? (e = Co(yo(e), t), bo(e, t, n, r, i, a, 2)) : o === 2 && wo(e, t, n, r, i, a) : bo(yo(e), t, n, r, i, a, 1);
|
|
5281
5281
|
break;
|
|
5282
5282
|
}
|
|
5283
5283
|
}
|
|
5284
5284
|
}
|
|
5285
|
-
function
|
|
5285
|
+
function xo(e) {
|
|
5286
5286
|
let t = e.prev, n = e, r = e.next;
|
|
5287
5287
|
if (X(t, n, r) >= 0) return !1;
|
|
5288
5288
|
let i = t.x, a = n.x, o = r.x, s = t.y, c = n.y, l = r.y, u = Math.min(i, a, o), d = Math.min(s, c, l), f = Math.max(i, a, o), p = Math.max(s, c, l), m = r.next;
|
|
5289
5289
|
for (; m !== t;) {
|
|
5290
|
-
if (m.x >= u && m.x <= f && m.y >= d && m.y <= p &&
|
|
5290
|
+
if (m.x >= u && m.x <= f && m.y >= d && m.y <= p && Fo(i, s, a, c, o, l, m.x, m.y) && X(m.prev, m, m.next) >= 0) return !1;
|
|
5291
5291
|
m = m.next;
|
|
5292
5292
|
}
|
|
5293
5293
|
return !0;
|
|
5294
5294
|
}
|
|
5295
|
-
function
|
|
5295
|
+
function So(e, t, n, r) {
|
|
5296
5296
|
let i = e.prev, a = e, o = e.next;
|
|
5297
5297
|
if (X(i, a, o) >= 0) return !1;
|
|
5298
|
-
let s = i.x, c = a.x, l = o.x, u = i.y, d = a.y, f = o.y, p = Math.min(s, c, l), m = Math.min(u, d, f), h = Math.max(s, c, l), g = Math.max(u, d, f), _ =
|
|
5298
|
+
let s = i.x, c = a.x, l = o.x, u = i.y, d = a.y, f = o.y, p = Math.min(s, c, l), m = Math.min(u, d, f), h = Math.max(s, c, l), g = Math.max(u, d, f), _ = Mo(p, m, t, n, r), v = Mo(h, g, t, n, r), y = e.prevZ, b = e.nextZ;
|
|
5299
5299
|
for (; y && y.z >= _ && b && b.z <= v;) {
|
|
5300
|
-
if (y.x >= p && y.x <= h && y.y >= m && y.y <= g && y !== i && y !== o &&
|
|
5300
|
+
if (y.x >= p && y.x <= h && y.y >= m && y.y <= g && y !== i && y !== o && Fo(s, u, c, d, l, f, y.x, y.y) && X(y.prev, y, y.next) >= 0 || (y = y.prevZ, b.x >= p && b.x <= h && b.y >= m && b.y <= g && b !== i && b !== o && Fo(s, u, c, d, l, f, b.x, b.y) && X(b.prev, b, b.next) >= 0)) return !1;
|
|
5301
5301
|
b = b.nextZ;
|
|
5302
5302
|
}
|
|
5303
5303
|
for (; y && y.z >= _;) {
|
|
5304
|
-
if (y.x >= p && y.x <= h && y.y >= m && y.y <= g && y !== i && y !== o &&
|
|
5304
|
+
if (y.x >= p && y.x <= h && y.y >= m && y.y <= g && y !== i && y !== o && Fo(s, u, c, d, l, f, y.x, y.y) && X(y.prev, y, y.next) >= 0) return !1;
|
|
5305
5305
|
y = y.prevZ;
|
|
5306
5306
|
}
|
|
5307
5307
|
for (; b && b.z <= v;) {
|
|
5308
|
-
if (b.x >= p && b.x <= h && b.y >= m && b.y <= g && b !== i && b !== o &&
|
|
5308
|
+
if (b.x >= p && b.x <= h && b.y >= m && b.y <= g && b !== i && b !== o && Fo(s, u, c, d, l, f, b.x, b.y) && X(b.prev, b, b.next) >= 0) return !1;
|
|
5309
5309
|
b = b.nextZ;
|
|
5310
5310
|
}
|
|
5311
5311
|
return !0;
|
|
5312
5312
|
}
|
|
5313
|
-
function
|
|
5313
|
+
function Co(e, t) {
|
|
5314
5314
|
let n = e;
|
|
5315
5315
|
do {
|
|
5316
5316
|
let r = n.prev, i = n.next.next;
|
|
5317
|
-
!
|
|
5317
|
+
!Lo(r, i) && Ro(r, n, n.next, i) && Ho(r, i) && Ho(i, r) && (t.push(r.i, n.i, i.i), Ko(n), Ko(n.next), n = e = i), n = n.next;
|
|
5318
5318
|
} while (n !== e);
|
|
5319
|
-
return
|
|
5319
|
+
return yo(n);
|
|
5320
5320
|
}
|
|
5321
|
-
function
|
|
5321
|
+
function wo(e, t, n, r, i, a) {
|
|
5322
5322
|
let o = e;
|
|
5323
5323
|
do {
|
|
5324
5324
|
let e = o.next.next;
|
|
5325
5325
|
for (; e !== o.prev;) {
|
|
5326
|
-
if (o.i !== e.i &&
|
|
5327
|
-
let s =
|
|
5328
|
-
o =
|
|
5326
|
+
if (o.i !== e.i && Io(o, e)) {
|
|
5327
|
+
let s = Wo(o, e);
|
|
5328
|
+
o = yo(o, o.next), s = yo(s, s.next), bo(o, t, n, r, i, a, 0), bo(s, t, n, r, i, a, 0);
|
|
5329
5329
|
return;
|
|
5330
5330
|
}
|
|
5331
5331
|
e = e.next;
|
|
@@ -5333,31 +5333,31 @@ function So(e, t, n, r, i, a) {
|
|
|
5333
5333
|
o = o.next;
|
|
5334
5334
|
} while (o !== e);
|
|
5335
5335
|
}
|
|
5336
|
-
function
|
|
5336
|
+
function To(e, t, n, r) {
|
|
5337
5337
|
let i = [];
|
|
5338
5338
|
for (let n = 0, a = t.length; n < a; n++) {
|
|
5339
|
-
let o =
|
|
5340
|
-
o === o.next && (o.steiner = !0), i.push(
|
|
5339
|
+
let o = vo(e, t[n] * r, n < a - 1 ? t[n + 1] * r : e.length, r, !1);
|
|
5340
|
+
o === o.next && (o.steiner = !0), i.push(No(o));
|
|
5341
5341
|
}
|
|
5342
|
-
i.sort(
|
|
5343
|
-
for (let e = 0; e < i.length; e++) n =
|
|
5342
|
+
i.sort(Eo);
|
|
5343
|
+
for (let e = 0; e < i.length; e++) n = Do(i[e], n);
|
|
5344
5344
|
return n;
|
|
5345
5345
|
}
|
|
5346
|
-
function
|
|
5346
|
+
function Eo(e, t) {
|
|
5347
5347
|
let n = e.x - t.x;
|
|
5348
5348
|
return n === 0 && (n = e.y - t.y, n === 0 && (n = (e.next.y - e.y) / (e.next.x - e.x) - (t.next.y - t.y) / (t.next.x - t.x))), n;
|
|
5349
5349
|
}
|
|
5350
|
-
function
|
|
5351
|
-
let n =
|
|
5350
|
+
function Do(e, t) {
|
|
5351
|
+
let n = Oo(e, t);
|
|
5352
5352
|
if (!n) return t;
|
|
5353
|
-
let r =
|
|
5354
|
-
return
|
|
5353
|
+
let r = Wo(n, e);
|
|
5354
|
+
return yo(r, r.next), yo(n, n.next);
|
|
5355
5355
|
}
|
|
5356
|
-
function
|
|
5356
|
+
function Oo(e, t) {
|
|
5357
5357
|
let n = t, r = e.x, i = e.y, a = -Infinity, o;
|
|
5358
|
-
if (
|
|
5358
|
+
if (Lo(e, n)) return n;
|
|
5359
5359
|
do {
|
|
5360
|
-
if (
|
|
5360
|
+
if (Lo(e, n.next)) return n.next;
|
|
5361
5361
|
if (i <= n.y && i >= n.next.y && n.next.y !== n.y) {
|
|
5362
5362
|
let e = n.x + (i - n.y) * (n.next.x - n.x) / (n.next.y - n.y);
|
|
5363
5363
|
if (e <= r && e > a && (a = e, o = n.x < n.next.x ? n : n.next, e === r)) return o;
|
|
@@ -5368,25 +5368,25 @@ function Eo(e, t) {
|
|
|
5368
5368
|
let s = o, c = o.x, l = o.y, u = Infinity;
|
|
5369
5369
|
n = o;
|
|
5370
5370
|
do {
|
|
5371
|
-
if (r >= n.x && n.x >= c && r !== n.x &&
|
|
5371
|
+
if (r >= n.x && n.x >= c && r !== n.x && Po(i < l ? r : a, i, c, l, i < l ? a : r, i, n.x, n.y)) {
|
|
5372
5372
|
let t = Math.abs(i - n.y) / (r - n.x);
|
|
5373
|
-
|
|
5373
|
+
Ho(n, e) && (t < u || t === u && (n.x > o.x || n.x === o.x && ko(o, n))) && (o = n, u = t);
|
|
5374
5374
|
}
|
|
5375
5375
|
n = n.next;
|
|
5376
5376
|
} while (n !== s);
|
|
5377
5377
|
return o;
|
|
5378
5378
|
}
|
|
5379
|
-
function
|
|
5379
|
+
function ko(e, t) {
|
|
5380
5380
|
return X(e.prev, e, t.prev) < 0 && X(t.next, e, e.next) < 0;
|
|
5381
5381
|
}
|
|
5382
|
-
function
|
|
5382
|
+
function Ao(e, t, n, r) {
|
|
5383
5383
|
let i = e;
|
|
5384
5384
|
do
|
|
5385
|
-
i.z === 0 && (i.z =
|
|
5385
|
+
i.z === 0 && (i.z = Mo(i.x, i.y, t, n, r)), i.prevZ = i.prev, i.nextZ = i.next, i = i.next;
|
|
5386
5386
|
while (i !== e);
|
|
5387
|
-
i.prevZ.nextZ = null, i.prevZ = null,
|
|
5387
|
+
i.prevZ.nextZ = null, i.prevZ = null, jo(i);
|
|
5388
5388
|
}
|
|
5389
|
-
function
|
|
5389
|
+
function jo(e) {
|
|
5390
5390
|
let t, n = 1;
|
|
5391
5391
|
do {
|
|
5392
5392
|
let r = e, i;
|
|
@@ -5404,71 +5404,71 @@ function ko(e) {
|
|
|
5404
5404
|
} while (t > 1);
|
|
5405
5405
|
return e;
|
|
5406
5406
|
}
|
|
5407
|
-
function
|
|
5407
|
+
function Mo(e, t, n, r, i) {
|
|
5408
5408
|
return e = (e - n) * i | 0, t = (t - r) * i | 0, e = (e | e << 8) & 16711935, e = (e | e << 4) & 252645135, e = (e | e << 2) & 858993459, e = (e | e << 1) & 1431655765, t = (t | t << 8) & 16711935, t = (t | t << 4) & 252645135, t = (t | t << 2) & 858993459, t = (t | t << 1) & 1431655765, e | t << 1;
|
|
5409
5409
|
}
|
|
5410
|
-
function
|
|
5410
|
+
function No(e) {
|
|
5411
5411
|
let t = e, n = e;
|
|
5412
5412
|
do
|
|
5413
5413
|
(t.x < n.x || t.x === n.x && t.y < n.y) && (n = t), t = t.next;
|
|
5414
5414
|
while (t !== e);
|
|
5415
5415
|
return n;
|
|
5416
5416
|
}
|
|
5417
|
-
function
|
|
5417
|
+
function Po(e, t, n, r, i, a, o, s) {
|
|
5418
5418
|
return (i - o) * (t - s) >= (e - o) * (a - s) && (e - o) * (r - s) >= (n - o) * (t - s) && (n - o) * (a - s) >= (i - o) * (r - s);
|
|
5419
5419
|
}
|
|
5420
|
-
function
|
|
5421
|
-
return !(e === o && t === s) &&
|
|
5420
|
+
function Fo(e, t, n, r, i, a, o, s) {
|
|
5421
|
+
return !(e === o && t === s) && Po(e, t, n, r, i, a, o, s);
|
|
5422
5422
|
}
|
|
5423
|
-
function
|
|
5424
|
-
return e.next.i !== t.i && e.prev.i !== t.i && !
|
|
5423
|
+
function Io(e, t) {
|
|
5424
|
+
return e.next.i !== t.i && e.prev.i !== t.i && !Vo(e, t) && (Ho(e, t) && Ho(t, e) && Uo(e, t) && (X(e.prev, e, t.prev) || X(e, t.prev, t)) || Lo(e, t) && X(e.prev, e, e.next) > 0 && X(t.prev, t, t.next) > 0);
|
|
5425
5425
|
}
|
|
5426
5426
|
function X(e, t, n) {
|
|
5427
5427
|
return (t.y - e.y) * (n.x - t.x) - (t.x - e.x) * (n.y - t.y);
|
|
5428
5428
|
}
|
|
5429
|
-
function
|
|
5429
|
+
function Lo(e, t) {
|
|
5430
5430
|
return e.x === t.x && e.y === t.y;
|
|
5431
5431
|
}
|
|
5432
|
-
function
|
|
5433
|
-
let i =
|
|
5434
|
-
return !!(i !== a && o !== s || i === 0 &&
|
|
5432
|
+
function Ro(e, t, n, r) {
|
|
5433
|
+
let i = Bo(X(e, t, n)), a = Bo(X(e, t, r)), o = Bo(X(n, r, e)), s = Bo(X(n, r, t));
|
|
5434
|
+
return !!(i !== a && o !== s || i === 0 && zo(e, n, t) || a === 0 && zo(e, r, t) || o === 0 && zo(n, e, r) || s === 0 && zo(n, t, r));
|
|
5435
5435
|
}
|
|
5436
|
-
function
|
|
5436
|
+
function zo(e, t, n) {
|
|
5437
5437
|
return t.x <= Math.max(e.x, n.x) && t.x >= Math.min(e.x, n.x) && t.y <= Math.max(e.y, n.y) && t.y >= Math.min(e.y, n.y);
|
|
5438
5438
|
}
|
|
5439
|
-
function
|
|
5439
|
+
function Bo(e) {
|
|
5440
5440
|
return e > 0 ? 1 : e < 0 ? -1 : 0;
|
|
5441
5441
|
}
|
|
5442
|
-
function
|
|
5442
|
+
function Vo(e, t) {
|
|
5443
5443
|
let n = e;
|
|
5444
5444
|
do {
|
|
5445
|
-
if (n.i !== e.i && n.next.i !== e.i && n.i !== t.i && n.next.i !== t.i &&
|
|
5445
|
+
if (n.i !== e.i && n.next.i !== e.i && n.i !== t.i && n.next.i !== t.i && Ro(n, n.next, e, t)) return !0;
|
|
5446
5446
|
n = n.next;
|
|
5447
5447
|
} while (n !== e);
|
|
5448
5448
|
return !1;
|
|
5449
5449
|
}
|
|
5450
|
-
function
|
|
5450
|
+
function Ho(e, t) {
|
|
5451
5451
|
return X(e.prev, e, e.next) < 0 ? X(e, t, e.next) >= 0 && X(e, e.prev, t) >= 0 : X(e, t, e.prev) < 0 || X(e, e.next, t) < 0;
|
|
5452
5452
|
}
|
|
5453
|
-
function
|
|
5453
|
+
function Uo(e, t) {
|
|
5454
5454
|
let n = e, r = !1, i = (e.x + t.x) / 2, a = (e.y + t.y) / 2;
|
|
5455
5455
|
do
|
|
5456
5456
|
n.y > a != n.next.y > a && n.next.y !== n.y && i < (n.next.x - n.x) * (a - n.y) / (n.next.y - n.y) + n.x && (r = !r), n = n.next;
|
|
5457
5457
|
while (n !== e);
|
|
5458
5458
|
return r;
|
|
5459
5459
|
}
|
|
5460
|
-
function
|
|
5461
|
-
let n =
|
|
5460
|
+
function Wo(e, t) {
|
|
5461
|
+
let n = qo(e.i, e.x, e.y), r = qo(t.i, t.x, t.y), i = e.next, a = t.prev;
|
|
5462
5462
|
return e.next = t, t.prev = e, n.next = i, i.prev = n, r.next = n, n.prev = r, a.next = r, r.prev = a, r;
|
|
5463
5463
|
}
|
|
5464
|
-
function
|
|
5465
|
-
let i =
|
|
5464
|
+
function Go(e, t, n, r) {
|
|
5465
|
+
let i = qo(e, t, n);
|
|
5466
5466
|
return r ? (i.next = r.next, i.prev = r, r.next.prev = i, r.next = i) : (i.prev = i, i.next = i), i;
|
|
5467
5467
|
}
|
|
5468
|
-
function
|
|
5468
|
+
function Ko(e) {
|
|
5469
5469
|
e.next.prev = e.prev, e.prev.next = e.next, e.prevZ && (e.prevZ.nextZ = e.nextZ), e.nextZ && (e.nextZ.prevZ = e.prevZ);
|
|
5470
5470
|
}
|
|
5471
|
-
function
|
|
5471
|
+
function qo(e, t, n) {
|
|
5472
5472
|
return {
|
|
5473
5473
|
i: e,
|
|
5474
5474
|
x: t,
|
|
@@ -5481,16 +5481,16 @@ function Go(e, t, n) {
|
|
|
5481
5481
|
steiner: !1
|
|
5482
5482
|
};
|
|
5483
5483
|
}
|
|
5484
|
-
function
|
|
5484
|
+
function Jo(e, t, n, r) {
|
|
5485
5485
|
let i = 0;
|
|
5486
5486
|
for (let a = t, o = n - r; a < n; a += r) i += (e[o] - e[a]) * (e[a + 1] + e[o + 1]), o = a;
|
|
5487
5487
|
return i;
|
|
5488
5488
|
}
|
|
5489
|
-
var
|
|
5489
|
+
var Yo = class {
|
|
5490
5490
|
static triangulate(e, t, n = 2) {
|
|
5491
|
-
return
|
|
5491
|
+
return _o(e, t, n);
|
|
5492
5492
|
}
|
|
5493
|
-
},
|
|
5493
|
+
}, Xo = class e {
|
|
5494
5494
|
static area(e) {
|
|
5495
5495
|
let t = e.length, n = 0;
|
|
5496
5496
|
for (let r = t - 1, i = 0; i < t; r = i++) n += e[r].x * e[i].y - e[i].x * e[r].y;
|
|
@@ -5501,23 +5501,23 @@ var qo = class {
|
|
|
5501
5501
|
}
|
|
5502
5502
|
static triangulateShape(e, t) {
|
|
5503
5503
|
let n = [], r = [], i = [];
|
|
5504
|
-
|
|
5504
|
+
Zo(e), Qo(n, e);
|
|
5505
5505
|
let a = e.length;
|
|
5506
|
-
t.forEach(
|
|
5507
|
-
for (let e = 0; e < t.length; e++) r.push(a), a += t[e].length,
|
|
5508
|
-
let o =
|
|
5506
|
+
t.forEach(Zo);
|
|
5507
|
+
for (let e = 0; e < t.length; e++) r.push(a), a += t[e].length, Qo(n, t[e]);
|
|
5508
|
+
let o = Yo.triangulate(n, r);
|
|
5509
5509
|
for (let e = 0; e < o.length; e += 3) i.push(o.slice(e, e + 3));
|
|
5510
5510
|
return i;
|
|
5511
5511
|
}
|
|
5512
5512
|
};
|
|
5513
|
-
function
|
|
5513
|
+
function Zo(e) {
|
|
5514
5514
|
let t = e.length;
|
|
5515
5515
|
t > 2 && e[t - 1].equals(e[0]) && e.pop();
|
|
5516
5516
|
}
|
|
5517
|
-
function
|
|
5517
|
+
function Qo(e, t) {
|
|
5518
5518
|
for (let n = 0; n < t.length; n++) e.push(t[n].x), e.push(t[n].y);
|
|
5519
5519
|
}
|
|
5520
|
-
var
|
|
5520
|
+
var $o = class e extends Yr {
|
|
5521
5521
|
constructor(e = 1, t = 1, n = 1, r = 1) {
|
|
5522
5522
|
super(), this.type = "PlaneGeometry", this.parameters = {
|
|
5523
5523
|
width: e,
|
|
@@ -5537,7 +5537,7 @@ var Zo = class e extends qr {
|
|
|
5537
5537
|
let n = t + c * e, r = t + c * (e + 1), i = t + 1 + c * (e + 1), a = t + 1 + c * e;
|
|
5538
5538
|
f.push(n, r, a), f.push(r, i, a);
|
|
5539
5539
|
}
|
|
5540
|
-
this.setIndex(f), this.setAttribute("position", new
|
|
5540
|
+
this.setIndex(f), this.setAttribute("position", new K(p, 3)), this.setAttribute("normal", new K(m, 3)), this.setAttribute("uv", new K(h, 2));
|
|
5541
5541
|
}
|
|
5542
5542
|
copy(e) {
|
|
5543
5543
|
return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
|
|
@@ -5545,7 +5545,7 @@ var Zo = class e extends qr {
|
|
|
5545
5545
|
static fromJSON(t) {
|
|
5546
5546
|
return new e(t.width, t.height, t.widthSegments, t.heightSegments);
|
|
5547
5547
|
}
|
|
5548
|
-
},
|
|
5548
|
+
}, es = class e extends Yr {
|
|
5549
5549
|
constructor(e = .5, t = 1, n = 32, r = 1, i = 0, a = Math.PI * 2) {
|
|
5550
5550
|
super(), this.type = "RingGeometry", this.parameters = {
|
|
5551
5551
|
innerRadius: e,
|
|
@@ -5570,7 +5570,7 @@ var Zo = class e extends qr {
|
|
|
5570
5570
|
o.push(i, a, c), o.push(a, s, c);
|
|
5571
5571
|
}
|
|
5572
5572
|
}
|
|
5573
|
-
this.setIndex(o), this.setAttribute("position", new
|
|
5573
|
+
this.setIndex(o), this.setAttribute("position", new K(s, 3)), this.setAttribute("normal", new K(c, 3)), this.setAttribute("uv", new K(l, 2));
|
|
5574
5574
|
}
|
|
5575
5575
|
copy(e) {
|
|
5576
5576
|
return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
|
|
@@ -5578,8 +5578,8 @@ var Zo = class e extends qr {
|
|
|
5578
5578
|
static fromJSON(t) {
|
|
5579
5579
|
return new e(t.innerRadius, t.outerRadius, t.thetaSegments, t.phiSegments, t.thetaStart, t.thetaLength);
|
|
5580
5580
|
}
|
|
5581
|
-
},
|
|
5582
|
-
constructor(e = new
|
|
5581
|
+
}, ts = class e extends Yr {
|
|
5582
|
+
constructor(e = new go([
|
|
5583
5583
|
new F(0, .5),
|
|
5584
5584
|
new F(-.5, -.5),
|
|
5585
5585
|
new F(.5, -.5)
|
|
@@ -5591,15 +5591,15 @@ var Zo = class e extends qr {
|
|
|
5591
5591
|
let n = [], r = [], i = [], a = [], o = 0, s = 0;
|
|
5592
5592
|
if (Array.isArray(e) === !1) c(e);
|
|
5593
5593
|
else for (let t = 0; t < e.length; t++) c(e[t]), this.addGroup(o, s, t), o += s, s = 0;
|
|
5594
|
-
this.setIndex(n), this.setAttribute("position", new
|
|
5594
|
+
this.setIndex(n), this.setAttribute("position", new K(r, 3)), this.setAttribute("normal", new K(i, 3)), this.setAttribute("uv", new K(a, 2));
|
|
5595
5595
|
function c(e) {
|
|
5596
5596
|
let o = r.length / 3, c = e.extractPoints(t), l = c.shape, u = c.holes;
|
|
5597
|
-
|
|
5597
|
+
Xo.isClockWise(l) === !1 && (l = l.reverse());
|
|
5598
5598
|
for (let e = 0, t = u.length; e < t; e++) {
|
|
5599
5599
|
let t = u[e];
|
|
5600
|
-
|
|
5600
|
+
Xo.isClockWise(t) === !0 && (u[e] = t.reverse());
|
|
5601
5601
|
}
|
|
5602
|
-
let d =
|
|
5602
|
+
let d = Xo.triangulateShape(l, u);
|
|
5603
5603
|
for (let e = 0, t = u.length; e < t; e++) {
|
|
5604
5604
|
let t = u[e];
|
|
5605
5605
|
l = l.concat(t);
|
|
@@ -5619,7 +5619,7 @@ var Zo = class e extends qr {
|
|
|
5619
5619
|
}
|
|
5620
5620
|
toJSON() {
|
|
5621
5621
|
let e = super.toJSON(), t = this.parameters.shapes;
|
|
5622
|
-
return
|
|
5622
|
+
return ns(t, e);
|
|
5623
5623
|
}
|
|
5624
5624
|
static fromJSON(t, n) {
|
|
5625
5625
|
let r = [];
|
|
@@ -5630,7 +5630,7 @@ var Zo = class e extends qr {
|
|
|
5630
5630
|
return new e(r, t.curveSegments);
|
|
5631
5631
|
}
|
|
5632
5632
|
};
|
|
5633
|
-
function
|
|
5633
|
+
function ns(e, t) {
|
|
5634
5634
|
if (t.shapes = [], Array.isArray(e)) for (let n = 0, r = e.length; n < r; n++) {
|
|
5635
5635
|
let r = e[n];
|
|
5636
5636
|
t.shapes.push(r.uuid);
|
|
@@ -5638,7 +5638,7 @@ function es(e, t) {
|
|
|
5638
5638
|
else t.shapes.push(e.uuid);
|
|
5639
5639
|
return t;
|
|
5640
5640
|
}
|
|
5641
|
-
var
|
|
5641
|
+
var rs = class e extends Yr {
|
|
5642
5642
|
constructor(e = 1, t = 32, n = 16, r = 0, i = Math.PI * 2, a = 0, o = Math.PI) {
|
|
5643
5643
|
super(), this.type = "SphereGeometry", this.parameters = {
|
|
5644
5644
|
radius: e,
|
|
@@ -5663,7 +5663,7 @@ var ts = class e extends qr {
|
|
|
5663
5663
|
let t = l[e][r + 1], i = l[e][r], o = l[e + 1][r], c = l[e + 1][r + 1];
|
|
5664
5664
|
(e !== 0 || a > 0) && f.push(t, i, c), (e !== n - 1 || s < Math.PI) && f.push(i, o, c);
|
|
5665
5665
|
}
|
|
5666
|
-
this.setIndex(f), this.setAttribute("position", new
|
|
5666
|
+
this.setIndex(f), this.setAttribute("position", new K(p, 3)), this.setAttribute("normal", new K(m, 3)), this.setAttribute("uv", new K(h, 2));
|
|
5667
5667
|
}
|
|
5668
5668
|
copy(e) {
|
|
5669
5669
|
return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
|
|
@@ -5671,15 +5671,15 @@ var ts = class e extends qr {
|
|
|
5671
5671
|
static fromJSON(t) {
|
|
5672
5672
|
return new e(t.radius, t.widthSegments, t.heightSegments, t.phiStart, t.phiLength, t.thetaStart, t.thetaLength);
|
|
5673
5673
|
}
|
|
5674
|
-
},
|
|
5674
|
+
}, is = class extends Y {
|
|
5675
5675
|
constructor(e) {
|
|
5676
|
-
super(), this.isShadowMaterial = !0, this.type = "ShadowMaterial", this.color = new
|
|
5676
|
+
super(), this.isShadowMaterial = !0, this.type = "ShadowMaterial", this.color = new H(0), this.transparent = !0, this.fog = !0, this.setValues(e);
|
|
5677
5677
|
}
|
|
5678
5678
|
copy(e) {
|
|
5679
5679
|
return super.copy(e), this.color.copy(e.color), this.fog = e.fog, this;
|
|
5680
5680
|
}
|
|
5681
5681
|
};
|
|
5682
|
-
function
|
|
5682
|
+
function as(e) {
|
|
5683
5683
|
let t = {};
|
|
5684
5684
|
for (let n in e) {
|
|
5685
5685
|
t[n] = {};
|
|
@@ -5690,29 +5690,29 @@ function rs(e) {
|
|
|
5690
5690
|
}
|
|
5691
5691
|
return t;
|
|
5692
5692
|
}
|
|
5693
|
-
function
|
|
5693
|
+
function os(e) {
|
|
5694
5694
|
let t = {};
|
|
5695
5695
|
for (let n = 0; n < e.length; n++) {
|
|
5696
|
-
let r =
|
|
5696
|
+
let r = as(e[n]);
|
|
5697
5697
|
for (let e in r) t[e] = r[e];
|
|
5698
5698
|
}
|
|
5699
5699
|
return t;
|
|
5700
5700
|
}
|
|
5701
|
-
function
|
|
5701
|
+
function ss(e) {
|
|
5702
5702
|
let t = [];
|
|
5703
5703
|
for (let n = 0; n < e.length; n++) t.push(e[n].clone());
|
|
5704
5704
|
return t;
|
|
5705
5705
|
}
|
|
5706
|
-
function
|
|
5706
|
+
function cs(e) {
|
|
5707
5707
|
let t = e.getRenderTarget();
|
|
5708
5708
|
return t === null ? e.outputColorSpace : t.isXRRenderTarget === !0 ? t.texture.colorSpace : L.workingColorSpace;
|
|
5709
5709
|
}
|
|
5710
|
-
var
|
|
5711
|
-
clone:
|
|
5712
|
-
merge:
|
|
5713
|
-
},
|
|
5710
|
+
var ls = {
|
|
5711
|
+
clone: as,
|
|
5712
|
+
merge: os
|
|
5713
|
+
}, us = "void main() {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}", ds = "void main() {\n gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}", fs = class extends Y {
|
|
5714
5714
|
constructor(e) {
|
|
5715
|
-
super(), this.isShaderMaterial = !0, this.type = "ShaderMaterial", this.defines = {}, this.uniforms = {}, this.uniformsGroups = [], this.vertexShader =
|
|
5715
|
+
super(), this.isShaderMaterial = !0, this.type = "ShaderMaterial", this.defines = {}, this.uniforms = {}, this.uniformsGroups = [], this.vertexShader = us, this.fragmentShader = ds, this.linewidth = 1, this.wireframe = !1, this.wireframeLinewidth = 1, this.fog = !1, this.lights = !1, this.clipping = !1, this.forceSinglePass = !0, this.extensions = {
|
|
5716
5716
|
clipCullDistance: !1,
|
|
5717
5717
|
multiDraw: !1
|
|
5718
5718
|
}, this.defaultAttributeValues = {
|
|
@@ -5726,7 +5726,7 @@ var ss = {
|
|
|
5726
5726
|
}, this.index0AttributeName = void 0, this.uniformsNeedUpdate = !1, this.glslVersion = null, e !== void 0 && this.setValues(e);
|
|
5727
5727
|
}
|
|
5728
5728
|
copy(e) {
|
|
5729
|
-
return super.copy(e), this.fragmentShader = e.fragmentShader, this.vertexShader = e.vertexShader, this.uniforms =
|
|
5729
|
+
return super.copy(e), this.fragmentShader = e.fragmentShader, this.vertexShader = e.vertexShader, this.uniforms = as(e.uniforms), this.uniformsGroups = ss(e.uniformsGroups), this.defines = Object.assign({}, e.defines), this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.fog = e.fog, this.lights = e.lights, this.clipping = e.clipping, this.extensions = Object.assign({}, e.extensions), this.glslVersion = e.glslVersion, this.defaultAttributeValues = Object.assign({}, e.defaultAttributeValues), this.index0AttributeName = e.index0AttributeName, this.uniformsNeedUpdate = e.uniformsNeedUpdate, this;
|
|
5730
5730
|
}
|
|
5731
5731
|
toJSON(e) {
|
|
5732
5732
|
let t = super.toJSON(e);
|
|
@@ -5761,18 +5761,18 @@ var ss = {
|
|
|
5761
5761
|
for (let e in this.extensions) this.extensions[e] === !0 && (n[e] = !0);
|
|
5762
5762
|
return Object.keys(n).length > 0 && (t.extensions = n), t;
|
|
5763
5763
|
}
|
|
5764
|
-
},
|
|
5764
|
+
}, ps = class extends fs {
|
|
5765
5765
|
constructor(e) {
|
|
5766
5766
|
super(e), this.isRawShaderMaterial = !0, this.type = "RawShaderMaterial";
|
|
5767
5767
|
}
|
|
5768
|
-
},
|
|
5768
|
+
}, ms = class extends Y {
|
|
5769
5769
|
constructor(e) {
|
|
5770
|
-
super(), this.isMeshStandardMaterial = !0, this.type = "MeshStandardMaterial", this.defines = { STANDARD: "" }, this.color = new
|
|
5770
|
+
super(), this.isMeshStandardMaterial = !0, this.type = "MeshStandardMaterial", this.defines = { STANDARD: "" }, this.color = new H(16777215), this.roughness = 1, this.metalness = 0, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new H(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.roughnessMap = null, this.metalnessMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new On(), this.envMapIntensity = 1, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
|
|
5771
5771
|
}
|
|
5772
5772
|
copy(e) {
|
|
5773
5773
|
return super.copy(e), this.defines = { STANDARD: "" }, this.color.copy(e.color), this.roughness = e.roughness, this.metalness = e.metalness, this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.roughnessMap = e.roughnessMap, this.metalnessMap = e.metalnessMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.envMapIntensity = e.envMapIntensity, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.flatShading = e.flatShading, this.fog = e.fog, this;
|
|
5774
5774
|
}
|
|
5775
|
-
},
|
|
5775
|
+
}, hs = class extends ms {
|
|
5776
5776
|
constructor(e) {
|
|
5777
5777
|
super(), this.isMeshPhysicalMaterial = !0, this.defines = {
|
|
5778
5778
|
STANDARD: "",
|
|
@@ -5784,7 +5784,7 @@ var ss = {
|
|
|
5784
5784
|
set: function(e) {
|
|
5785
5785
|
this.ior = (1 + .4 * e) / (1 - .4 * e);
|
|
5786
5786
|
}
|
|
5787
|
-
}), this.iridescenceMap = null, this.iridescenceIOR = 1.3, this.iridescenceThicknessRange = [100, 400], this.iridescenceThicknessMap = null, this.sheenColor = new
|
|
5787
|
+
}), this.iridescenceMap = null, this.iridescenceIOR = 1.3, this.iridescenceThicknessRange = [100, 400], this.iridescenceThicknessMap = null, this.sheenColor = new H(0), this.sheenColorMap = null, this.sheenRoughness = 1, this.sheenRoughnessMap = null, this.transmissionMap = null, this.thickness = 0, this.thicknessMap = null, this.attenuationDistance = Infinity, this.attenuationColor = new H(1, 1, 1), this.specularIntensity = 1, this.specularIntensityMap = null, this.specularColor = new H(1, 1, 1), this.specularColorMap = null, this._anisotropy = 0, this._clearcoat = 0, this._dispersion = 0, this._iridescence = 0, this._sheen = 0, this._transmission = 0, this.setValues(e);
|
|
5788
5788
|
}
|
|
5789
5789
|
get anisotropy() {
|
|
5790
5790
|
return this._anisotropy;
|
|
@@ -5828,56 +5828,56 @@ var ss = {
|
|
|
5828
5828
|
PHYSICAL: ""
|
|
5829
5829
|
}, this.anisotropy = e.anisotropy, this.anisotropyRotation = e.anisotropyRotation, this.anisotropyMap = e.anisotropyMap, this.clearcoat = e.clearcoat, this.clearcoatMap = e.clearcoatMap, this.clearcoatRoughness = e.clearcoatRoughness, this.clearcoatRoughnessMap = e.clearcoatRoughnessMap, this.clearcoatNormalMap = e.clearcoatNormalMap, this.clearcoatNormalScale.copy(e.clearcoatNormalScale), this.dispersion = e.dispersion, this.ior = e.ior, this.iridescence = e.iridescence, this.iridescenceMap = e.iridescenceMap, this.iridescenceIOR = e.iridescenceIOR, this.iridescenceThicknessRange = [...e.iridescenceThicknessRange], this.iridescenceThicknessMap = e.iridescenceThicknessMap, this.sheen = e.sheen, this.sheenColor.copy(e.sheenColor), this.sheenColorMap = e.sheenColorMap, this.sheenRoughness = e.sheenRoughness, this.sheenRoughnessMap = e.sheenRoughnessMap, this.transmission = e.transmission, this.transmissionMap = e.transmissionMap, this.thickness = e.thickness, this.thicknessMap = e.thicknessMap, this.attenuationDistance = e.attenuationDistance, this.attenuationColor.copy(e.attenuationColor), this.specularIntensity = e.specularIntensity, this.specularIntensityMap = e.specularIntensityMap, this.specularColor.copy(e.specularColor), this.specularColorMap = e.specularColorMap, this;
|
|
5830
5830
|
}
|
|
5831
|
-
},
|
|
5831
|
+
}, gs = class extends Y {
|
|
5832
5832
|
constructor(e) {
|
|
5833
|
-
super(), this.isMeshPhongMaterial = !0, this.type = "MeshPhongMaterial", this.color = new
|
|
5833
|
+
super(), this.isMeshPhongMaterial = !0, this.type = "MeshPhongMaterial", this.color = new H(16777215), this.specular = new H(1118481), this.shininess = 30, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new H(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new On(), this.combine = 0, this.reflectivity = 1, this.envMapIntensity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
|
|
5834
5834
|
}
|
|
5835
5835
|
copy(e) {
|
|
5836
5836
|
return super.copy(e), this.color.copy(e.color), this.specular.copy(e.specular), this.shininess = e.shininess, this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.envMapIntensity = e.envMapIntensity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.flatShading = e.flatShading, this.fog = e.fog, this;
|
|
5837
5837
|
}
|
|
5838
|
-
},
|
|
5838
|
+
}, _s = class extends Y {
|
|
5839
5839
|
constructor(e) {
|
|
5840
|
-
super(), this.isMeshToonMaterial = !0, this.defines = { TOON: "" }, this.type = "MeshToonMaterial", this.color = new
|
|
5840
|
+
super(), this.isMeshToonMaterial = !0, this.defines = { TOON: "" }, this.type = "MeshToonMaterial", this.color = new H(16777215), this.map = null, this.gradientMap = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new H(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.alphaMap = null, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(e);
|
|
5841
5841
|
}
|
|
5842
5842
|
copy(e) {
|
|
5843
5843
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.gradientMap = e.gradientMap, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.alphaMap = e.alphaMap, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
|
|
5844
5844
|
}
|
|
5845
|
-
},
|
|
5845
|
+
}, vs = class extends Y {
|
|
5846
5846
|
constructor(e) {
|
|
5847
5847
|
super(), this.isMeshNormalMaterial = !0, this.type = "MeshNormalMaterial", this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.wireframe = !1, this.wireframeLinewidth = 1, this.flatShading = !1, this.setValues(e);
|
|
5848
5848
|
}
|
|
5849
5849
|
copy(e) {
|
|
5850
5850
|
return super.copy(e), this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.flatShading = e.flatShading, this;
|
|
5851
5851
|
}
|
|
5852
|
-
},
|
|
5852
|
+
}, ys = class extends Y {
|
|
5853
5853
|
constructor(e) {
|
|
5854
|
-
super(), this.isMeshLambertMaterial = !0, this.type = "MeshLambertMaterial", this.color = new
|
|
5854
|
+
super(), this.isMeshLambertMaterial = !0, this.type = "MeshLambertMaterial", this.color = new H(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new H(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new On(), this.combine = 0, this.reflectivity = 1, this.envMapIntensity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
|
|
5855
5855
|
}
|
|
5856
5856
|
copy(e) {
|
|
5857
5857
|
return super.copy(e), this.color.copy(e.color), this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.envMapIntensity = e.envMapIntensity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.flatShading = e.flatShading, this.fog = e.fog, this;
|
|
5858
5858
|
}
|
|
5859
|
-
},
|
|
5859
|
+
}, bs = class extends Y {
|
|
5860
5860
|
constructor(e) {
|
|
5861
|
-
super(), this.isMeshDepthMaterial = !0, this.type = "MeshDepthMaterial", this.depthPacking =
|
|
5861
|
+
super(), this.isMeshDepthMaterial = !0, this.type = "MeshDepthMaterial", this.depthPacking = Ze, this.map = null, this.alphaMap = null, this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.wireframe = !1, this.wireframeLinewidth = 1, this.setValues(e);
|
|
5862
5862
|
}
|
|
5863
5863
|
copy(e) {
|
|
5864
5864
|
return super.copy(e), this.depthPacking = e.depthPacking, this.map = e.map, this.alphaMap = e.alphaMap, this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this;
|
|
5865
5865
|
}
|
|
5866
|
-
},
|
|
5866
|
+
}, xs = class extends Y {
|
|
5867
5867
|
constructor(e) {
|
|
5868
5868
|
super(), this.isMeshDistanceMaterial = !0, this.type = "MeshDistanceMaterial", this.map = null, this.alphaMap = null, this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.setValues(e);
|
|
5869
5869
|
}
|
|
5870
5870
|
copy(e) {
|
|
5871
5871
|
return super.copy(e), this.map = e.map, this.alphaMap = e.alphaMap, this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this;
|
|
5872
5872
|
}
|
|
5873
|
-
},
|
|
5873
|
+
}, Ss = class extends Y {
|
|
5874
5874
|
constructor(e) {
|
|
5875
|
-
super(), this.isMeshMatcapMaterial = !0, this.defines = { MATCAP: "" }, this.type = "MeshMatcapMaterial", this.color = new
|
|
5875
|
+
super(), this.isMeshMatcapMaterial = !0, this.defines = { MATCAP: "" }, this.type = "MeshMatcapMaterial", this.color = new H(16777215), this.matcap = null, this.map = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.alphaMap = null, this.wireframe = !1, this.wireframeLinewidth = 1, this.flatShading = !1, this.fog = !0, this.setValues(e);
|
|
5876
5876
|
}
|
|
5877
5877
|
copy(e) {
|
|
5878
5878
|
return super.copy(e), this.defines = { MATCAP: "" }, this.color.copy(e.color), this.matcap = e.matcap, this.map = e.map, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.alphaMap = e.alphaMap, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.flatShading = e.flatShading, this.fog = e.fog, this;
|
|
5879
5879
|
}
|
|
5880
|
-
},
|
|
5880
|
+
}, Cs = class extends ia {
|
|
5881
5881
|
constructor(e) {
|
|
5882
5882
|
super(), this.isLineDashedMaterial = !0, this.type = "LineDashedMaterial", this.scale = 1, this.dashSize = 3, this.gapSize = 1, this.setValues(e);
|
|
5883
5883
|
}
|
|
@@ -5885,10 +5885,10 @@ var ss = {
|
|
|
5885
5885
|
return super.copy(e), this.scale = e.scale, this.dashSize = e.dashSize, this.gapSize = e.gapSize, this;
|
|
5886
5886
|
}
|
|
5887
5887
|
};
|
|
5888
|
-
function
|
|
5888
|
+
function ws(e, t) {
|
|
5889
5889
|
return !e || e.constructor === t ? e : typeof t.BYTES_PER_ELEMENT == "number" ? new t(e) : Array.prototype.slice.call(e);
|
|
5890
5890
|
}
|
|
5891
|
-
function
|
|
5891
|
+
function Ts(e) {
|
|
5892
5892
|
function t(t, n) {
|
|
5893
5893
|
return e[t] - e[n];
|
|
5894
5894
|
}
|
|
@@ -5896,7 +5896,7 @@ function Cs(e) {
|
|
|
5896
5896
|
for (let e = 0; e !== n; ++e) r[e] = e;
|
|
5897
5897
|
return r.sort(t), r;
|
|
5898
5898
|
}
|
|
5899
|
-
function
|
|
5899
|
+
function Es(e, t, n) {
|
|
5900
5900
|
let r = e.length, i = new e.constructor(r);
|
|
5901
5901
|
for (let a = 0, o = 0; o !== r; ++a) {
|
|
5902
5902
|
let r = n[a] * t;
|
|
@@ -5904,7 +5904,7 @@ function ws(e, t, n) {
|
|
|
5904
5904
|
}
|
|
5905
5905
|
return i;
|
|
5906
5906
|
}
|
|
5907
|
-
function
|
|
5907
|
+
function Ds(e, t, n, r) {
|
|
5908
5908
|
let i = 1, a = e[0];
|
|
5909
5909
|
for (; a !== void 0 && a[r] === void 0;) a = e[i++];
|
|
5910
5910
|
if (a === void 0) return;
|
|
@@ -5919,7 +5919,7 @@ function Ts(e, t, n, r) {
|
|
|
5919
5919
|
o = a[r], o !== void 0 && (t.push(a.time), n.push(o)), a = e[i++];
|
|
5920
5920
|
while (a !== void 0);
|
|
5921
5921
|
}
|
|
5922
|
-
var
|
|
5922
|
+
var Os = class {
|
|
5923
5923
|
constructor(e, t, n, r) {
|
|
5924
5924
|
this.parameterPositions = e, this._cachedIndex = 0, this.resultBuffer = r === void 0 ? new t.constructor(n) : r, this.sampleValues = t, this.valueSize = n, this.settings = null, this.DefaultSettings_ = {};
|
|
5925
5925
|
}
|
|
@@ -5977,29 +5977,29 @@ var Es = class {
|
|
|
5977
5977
|
throw Error("call to abstract method");
|
|
5978
5978
|
}
|
|
5979
5979
|
intervalChanged_() {}
|
|
5980
|
-
},
|
|
5980
|
+
}, ks = class extends Os {
|
|
5981
5981
|
constructor(e, t, n, r) {
|
|
5982
5982
|
super(e, t, n, r), this._weightPrev = -0, this._offsetPrev = -0, this._weightNext = -0, this._offsetNext = -0, this.DefaultSettings_ = {
|
|
5983
|
-
endingStart:
|
|
5984
|
-
endingEnd:
|
|
5983
|
+
endingStart: qe,
|
|
5984
|
+
endingEnd: qe
|
|
5985
5985
|
};
|
|
5986
5986
|
}
|
|
5987
5987
|
intervalChanged_(e, t, n) {
|
|
5988
5988
|
let r = this.parameterPositions, i = e - 2, a = e + 1, o = r[i], s = r[a];
|
|
5989
5989
|
if (o === void 0) switch (this.getSettings_().endingStart) {
|
|
5990
|
-
case
|
|
5990
|
+
case Je:
|
|
5991
5991
|
i = e, o = 2 * t - n;
|
|
5992
5992
|
break;
|
|
5993
|
-
case
|
|
5993
|
+
case Ye:
|
|
5994
5994
|
i = r.length - 2, o = t + r[i] - r[i + 1];
|
|
5995
5995
|
break;
|
|
5996
5996
|
default: i = e, o = n;
|
|
5997
5997
|
}
|
|
5998
5998
|
if (s === void 0) switch (this.getSettings_().endingEnd) {
|
|
5999
|
-
case
|
|
5999
|
+
case Je:
|
|
6000
6000
|
a = e, s = 2 * n - t;
|
|
6001
6001
|
break;
|
|
6002
|
-
case
|
|
6002
|
+
case Ye:
|
|
6003
6003
|
a = 1, s = n + r[1] - r[0];
|
|
6004
6004
|
break;
|
|
6005
6005
|
default: a = e - 1, s = t;
|
|
@@ -6012,7 +6012,7 @@ var Es = class {
|
|
|
6012
6012
|
for (let e = 0; e !== o; ++e) i[e] = g * a[l + e] + _ * a[c + e] + v * a[s + e] + y * a[u + e];
|
|
6013
6013
|
return i;
|
|
6014
6014
|
}
|
|
6015
|
-
},
|
|
6015
|
+
}, As = class extends Os {
|
|
6016
6016
|
constructor(e, t, n, r) {
|
|
6017
6017
|
super(e, t, n, r);
|
|
6018
6018
|
}
|
|
@@ -6021,14 +6021,14 @@ var Es = class {
|
|
|
6021
6021
|
for (let e = 0; e !== o; ++e) i[e] = a[c + e] * u + a[s + e] * l;
|
|
6022
6022
|
return i;
|
|
6023
6023
|
}
|
|
6024
|
-
},
|
|
6024
|
+
}, js = class extends Os {
|
|
6025
6025
|
constructor(e, t, n, r) {
|
|
6026
6026
|
super(e, t, n, r);
|
|
6027
6027
|
}
|
|
6028
6028
|
interpolate_(e) {
|
|
6029
6029
|
return this.copySampleValue_(e - 1);
|
|
6030
6030
|
}
|
|
6031
|
-
},
|
|
6031
|
+
}, Ms = class extends Os {
|
|
6032
6032
|
interpolate_(e, t, n, r) {
|
|
6033
6033
|
let i = this.resultBuffer, a = this.sampleValues, o = this.valueSize, s = e * o, c = s - o, l = this.settings || this.DefaultSettings_, u = l.inTangents, d = l.outTangents;
|
|
6034
6034
|
if (!u || !d) {
|
|
@@ -6051,11 +6051,11 @@ var Es = class {
|
|
|
6051
6051
|
}
|
|
6052
6052
|
return i;
|
|
6053
6053
|
}
|
|
6054
|
-
},
|
|
6054
|
+
}, Ns = class {
|
|
6055
6055
|
constructor(e, t, n, r) {
|
|
6056
6056
|
if (e === void 0) throw Error("THREE.KeyframeTrack: track name is undefined");
|
|
6057
6057
|
if (t === void 0 || t.length === 0) throw Error("THREE.KeyframeTrack: no keyframes in track named " + e);
|
|
6058
|
-
this.name = e, this.times =
|
|
6058
|
+
this.name = e, this.times = ws(t, this.TimeBufferType), this.values = ws(n, this.ValueBufferType), this.setInterpolation(r || this.DefaultInterpolation);
|
|
6059
6059
|
}
|
|
6060
6060
|
static toJSON(e) {
|
|
6061
6061
|
let t = e.constructor, n;
|
|
@@ -6063,8 +6063,8 @@ var Es = class {
|
|
|
6063
6063
|
else {
|
|
6064
6064
|
n = {
|
|
6065
6065
|
name: e.name,
|
|
6066
|
-
times:
|
|
6067
|
-
values:
|
|
6066
|
+
times: ws(e.times, Array),
|
|
6067
|
+
values: ws(e.values, Array)
|
|
6068
6068
|
};
|
|
6069
6069
|
let t = e.getInterpolation();
|
|
6070
6070
|
t !== e.DefaultInterpolation && (n.interpolation = t);
|
|
@@ -6072,31 +6072,31 @@ var Es = class {
|
|
|
6072
6072
|
return n.type = e.ValueTypeName, n;
|
|
6073
6073
|
}
|
|
6074
6074
|
InterpolantFactoryMethodDiscrete(e) {
|
|
6075
|
-
return new
|
|
6075
|
+
return new js(this.times, this.values, this.getValueSize(), e);
|
|
6076
6076
|
}
|
|
6077
6077
|
InterpolantFactoryMethodLinear(e) {
|
|
6078
|
-
return new
|
|
6078
|
+
return new As(this.times, this.values, this.getValueSize(), e);
|
|
6079
6079
|
}
|
|
6080
6080
|
InterpolantFactoryMethodSmooth(e) {
|
|
6081
|
-
return new
|
|
6081
|
+
return new ks(this.times, this.values, this.getValueSize(), e);
|
|
6082
6082
|
}
|
|
6083
6083
|
InterpolantFactoryMethodBezier(e) {
|
|
6084
|
-
let t = new
|
|
6084
|
+
let t = new Ms(this.times, this.values, this.getValueSize(), e);
|
|
6085
6085
|
return this.settings && (t.settings = this.settings), t;
|
|
6086
6086
|
}
|
|
6087
6087
|
setInterpolation(e) {
|
|
6088
6088
|
let t;
|
|
6089
6089
|
switch (e) {
|
|
6090
|
-
case
|
|
6090
|
+
case Ue:
|
|
6091
6091
|
t = this.InterpolantFactoryMethodDiscrete;
|
|
6092
6092
|
break;
|
|
6093
|
-
case
|
|
6093
|
+
case We:
|
|
6094
6094
|
t = this.InterpolantFactoryMethodLinear;
|
|
6095
6095
|
break;
|
|
6096
|
-
case
|
|
6096
|
+
case Ge:
|
|
6097
6097
|
t = this.InterpolantFactoryMethodSmooth;
|
|
6098
6098
|
break;
|
|
6099
|
-
case
|
|
6099
|
+
case Ke:
|
|
6100
6100
|
t = this.InterpolantFactoryMethodBezier;
|
|
6101
6101
|
break;
|
|
6102
6102
|
}
|
|
@@ -6110,10 +6110,10 @@ var Es = class {
|
|
|
6110
6110
|
}
|
|
6111
6111
|
getInterpolation() {
|
|
6112
6112
|
switch (this.createInterpolant) {
|
|
6113
|
-
case this.InterpolantFactoryMethodDiscrete: return
|
|
6114
|
-
case this.InterpolantFactoryMethodLinear: return
|
|
6115
|
-
case this.InterpolantFactoryMethodSmooth: return
|
|
6116
|
-
case this.InterpolantFactoryMethodBezier: return
|
|
6113
|
+
case this.InterpolantFactoryMethodDiscrete: return Ue;
|
|
6114
|
+
case this.InterpolantFactoryMethodLinear: return We;
|
|
6115
|
+
case this.InterpolantFactoryMethodSmooth: return Ge;
|
|
6116
|
+
case this.InterpolantFactoryMethodBezier: return Ke;
|
|
6117
6117
|
}
|
|
6118
6118
|
}
|
|
6119
6119
|
getValueSize() {
|
|
@@ -6162,7 +6162,7 @@ var Es = class {
|
|
|
6162
6162
|
}
|
|
6163
6163
|
a = r;
|
|
6164
6164
|
}
|
|
6165
|
-
if (r !== void 0 &&
|
|
6165
|
+
if (r !== void 0 && _t(r)) for (let t = 0, n = r.length; t !== n; ++t) {
|
|
6166
6166
|
let n = r[t];
|
|
6167
6167
|
if (isNaN(n)) {
|
|
6168
6168
|
A("KeyframeTrack: Value is not a valid number.", this, t, n), e = !1;
|
|
@@ -6172,7 +6172,7 @@ var Es = class {
|
|
|
6172
6172
|
return e;
|
|
6173
6173
|
}
|
|
6174
6174
|
optimize() {
|
|
6175
|
-
let e = this.times.slice(), t = this.values.slice(), n = this.getValueSize(), r = this.getInterpolation() ===
|
|
6175
|
+
let e = this.times.slice(), t = this.values.slice(), n = this.getValueSize(), r = this.getInterpolation() === Ge, i = e.length - 1, a = 1;
|
|
6176
6176
|
for (let o = 1; o < i; ++o) {
|
|
6177
6177
|
let i = !1, s = e[o];
|
|
6178
6178
|
if (s !== e[o + 1] && (o !== 1 || s !== e[0])) if (r) i = !0;
|
|
@@ -6207,62 +6207,62 @@ var Es = class {
|
|
|
6207
6207
|
return r.createInterpolant = this.createInterpolant, r;
|
|
6208
6208
|
}
|
|
6209
6209
|
};
|
|
6210
|
-
|
|
6211
|
-
var
|
|
6210
|
+
Ns.prototype.ValueTypeName = "", Ns.prototype.TimeBufferType = Float32Array, Ns.prototype.ValueBufferType = Float32Array, Ns.prototype.DefaultInterpolation = We;
|
|
6211
|
+
var Ps = class extends Ns {
|
|
6212
6212
|
constructor(e, t, n) {
|
|
6213
6213
|
super(e, t, n);
|
|
6214
6214
|
}
|
|
6215
6215
|
};
|
|
6216
|
-
|
|
6217
|
-
var
|
|
6216
|
+
Ps.prototype.ValueTypeName = "bool", Ps.prototype.ValueBufferType = Array, Ps.prototype.DefaultInterpolation = Ue, Ps.prototype.InterpolantFactoryMethodLinear = void 0, Ps.prototype.InterpolantFactoryMethodSmooth = void 0;
|
|
6217
|
+
var Fs = class extends Ns {
|
|
6218
6218
|
constructor(e, t, n, r) {
|
|
6219
6219
|
super(e, t, n, r);
|
|
6220
6220
|
}
|
|
6221
6221
|
};
|
|
6222
|
-
|
|
6223
|
-
var
|
|
6222
|
+
Fs.prototype.ValueTypeName = "color";
|
|
6223
|
+
var Is = class extends Ns {
|
|
6224
6224
|
constructor(e, t, n, r) {
|
|
6225
6225
|
super(e, t, n, r);
|
|
6226
6226
|
}
|
|
6227
6227
|
};
|
|
6228
|
-
|
|
6229
|
-
var
|
|
6228
|
+
Is.prototype.ValueTypeName = "number";
|
|
6229
|
+
var Ls = class extends Os {
|
|
6230
6230
|
constructor(e, t, n, r) {
|
|
6231
6231
|
super(e, t, n, r);
|
|
6232
6232
|
}
|
|
6233
6233
|
interpolate_(e, t, n, r) {
|
|
6234
6234
|
let i = this.resultBuffer, a = this.sampleValues, o = this.valueSize, s = (n - t) / (r - t), c = e * o;
|
|
6235
|
-
for (let e = c + o; c !== e; c += 4)
|
|
6235
|
+
for (let e = c + o; c !== e; c += 4) Zt.slerpFlat(i, 0, a, c - o, a, c, s);
|
|
6236
6236
|
return i;
|
|
6237
6237
|
}
|
|
6238
|
-
},
|
|
6238
|
+
}, Rs = class extends Ns {
|
|
6239
6239
|
constructor(e, t, n, r) {
|
|
6240
6240
|
super(e, t, n, r);
|
|
6241
6241
|
}
|
|
6242
6242
|
InterpolantFactoryMethodLinear(e) {
|
|
6243
|
-
return new
|
|
6243
|
+
return new Ls(this.times, this.values, this.getValueSize(), e);
|
|
6244
6244
|
}
|
|
6245
6245
|
};
|
|
6246
|
-
|
|
6247
|
-
var
|
|
6246
|
+
Rs.prototype.ValueTypeName = "quaternion", Rs.prototype.InterpolantFactoryMethodSmooth = void 0;
|
|
6247
|
+
var zs = class extends Ns {
|
|
6248
6248
|
constructor(e, t, n) {
|
|
6249
6249
|
super(e, t, n);
|
|
6250
6250
|
}
|
|
6251
6251
|
};
|
|
6252
|
-
|
|
6253
|
-
var
|
|
6252
|
+
zs.prototype.ValueTypeName = "string", zs.prototype.ValueBufferType = Array, zs.prototype.DefaultInterpolation = Ue, zs.prototype.InterpolantFactoryMethodLinear = void 0, zs.prototype.InterpolantFactoryMethodSmooth = void 0;
|
|
6253
|
+
var Bs = class extends Ns {
|
|
6254
6254
|
constructor(e, t, n, r) {
|
|
6255
6255
|
super(e, t, n, r);
|
|
6256
6256
|
}
|
|
6257
6257
|
};
|
|
6258
|
-
|
|
6259
|
-
var
|
|
6260
|
-
constructor(e = "", t = -1, n = [], r =
|
|
6261
|
-
this.name = e, this.tracks = n, this.duration = t, this.blendMode = r, this.uuid =
|
|
6258
|
+
Bs.prototype.ValueTypeName = "vector";
|
|
6259
|
+
var Vs = class {
|
|
6260
|
+
constructor(e = "", t = -1, n = [], r = Xe) {
|
|
6261
|
+
this.name = e, this.tracks = n, this.duration = t, this.blendMode = r, this.uuid = jt(), this.userData = {}, this.duration < 0 && this.resetDuration();
|
|
6262
6262
|
}
|
|
6263
6263
|
static parse(e) {
|
|
6264
6264
|
let t = [], n = e.tracks, r = 1 / (e.fps || 1);
|
|
6265
|
-
for (let e = 0, i = n.length; e !== i; ++e) t.push(
|
|
6265
|
+
for (let e = 0, i = n.length; e !== i; ++e) t.push(Us(n[e]).scale(r));
|
|
6266
6266
|
let i = new this(e.name, e.duration, t, e.blendMode);
|
|
6267
6267
|
return i.uuid = e.uuid, i.userData = JSON.parse(e.userData || "{}"), i;
|
|
6268
6268
|
}
|
|
@@ -6275,7 +6275,7 @@ var zs = class {
|
|
|
6275
6275
|
blendMode: e.blendMode,
|
|
6276
6276
|
userData: JSON.stringify(e.userData)
|
|
6277
6277
|
};
|
|
6278
|
-
for (let e = 0, r = n.length; e !== r; ++e) t.push(
|
|
6278
|
+
for (let e = 0, r = n.length; e !== r; ++e) t.push(Ns.toJSON(n[e]));
|
|
6279
6279
|
return r;
|
|
6280
6280
|
}
|
|
6281
6281
|
static CreateFromMorphTargetSequence(e, t, n, r) {
|
|
@@ -6283,8 +6283,8 @@ var zs = class {
|
|
|
6283
6283
|
for (let e = 0; e < i; e++) {
|
|
6284
6284
|
let o = [], s = [];
|
|
6285
6285
|
o.push((e + i - 1) % i, e, (e + 1) % i), s.push(0, 1, 0);
|
|
6286
|
-
let c =
|
|
6287
|
-
o =
|
|
6286
|
+
let c = Ts(o);
|
|
6287
|
+
o = Es(o, 1, c), s = Es(s, 1, c), !r && o[0] === 0 && (o.push(i), s.push(s[0])), a.push(new Is(".morphTargetInfluences[" + t[e].name + "]", o, s).scale(1 / n));
|
|
6288
6288
|
}
|
|
6289
6289
|
return new this(e, -1, a);
|
|
6290
6290
|
}
|
|
@@ -6315,7 +6315,7 @@ var zs = class {
|
|
|
6315
6315
|
let n = function(e, t, n, r, i) {
|
|
6316
6316
|
if (n.length !== 0) {
|
|
6317
6317
|
let a = [], o = [];
|
|
6318
|
-
|
|
6318
|
+
Ds(n, a, o, r), a.length !== 0 && i.push(new e(t, a, o));
|
|
6319
6319
|
}
|
|
6320
6320
|
}, r = [], i = e.name || "default", a = e.fps || 30, o = e.blendMode, s = e.length || -1, c = e.hierarchy || [];
|
|
6321
6321
|
for (let e = 0; e < c.length; e++) {
|
|
@@ -6329,12 +6329,12 @@ var zs = class {
|
|
|
6329
6329
|
let r = i[t];
|
|
6330
6330
|
e.push(r.time), a.push(r.morphTarget === n ? 1 : 0);
|
|
6331
6331
|
}
|
|
6332
|
-
r.push(new
|
|
6332
|
+
r.push(new Is(".morphTargetInfluence[" + n + "]", e, a));
|
|
6333
6333
|
}
|
|
6334
6334
|
s = e.length * a;
|
|
6335
6335
|
} else {
|
|
6336
6336
|
let a = ".bones[" + t[e].name + "]";
|
|
6337
|
-
n(
|
|
6337
|
+
n(Bs, a + ".position", i, "pos", r), n(Rs, a + ".quaternion", i, "rot", r), n(Bs, a + ".scale", i, "scl", r);
|
|
6338
6338
|
}
|
|
6339
6339
|
}
|
|
6340
6340
|
return r.length === 0 ? null : new this(i, s, r, o);
|
|
@@ -6370,42 +6370,42 @@ var zs = class {
|
|
|
6370
6370
|
return this.constructor.toJSON(this);
|
|
6371
6371
|
}
|
|
6372
6372
|
};
|
|
6373
|
-
function
|
|
6373
|
+
function Hs(e) {
|
|
6374
6374
|
switch (e.toLowerCase()) {
|
|
6375
6375
|
case "scalar":
|
|
6376
6376
|
case "double":
|
|
6377
6377
|
case "float":
|
|
6378
6378
|
case "number":
|
|
6379
|
-
case "integer": return
|
|
6379
|
+
case "integer": return Is;
|
|
6380
6380
|
case "vector":
|
|
6381
6381
|
case "vector2":
|
|
6382
6382
|
case "vector3":
|
|
6383
|
-
case "vector4": return
|
|
6384
|
-
case "color": return
|
|
6385
|
-
case "quaternion": return
|
|
6383
|
+
case "vector4": return Bs;
|
|
6384
|
+
case "color": return Fs;
|
|
6385
|
+
case "quaternion": return Rs;
|
|
6386
6386
|
case "bool":
|
|
6387
|
-
case "boolean": return
|
|
6388
|
-
case "string": return
|
|
6387
|
+
case "boolean": return Ps;
|
|
6388
|
+
case "string": return zs;
|
|
6389
6389
|
}
|
|
6390
6390
|
throw Error("THREE.KeyframeTrack: Unsupported typeName: " + e);
|
|
6391
6391
|
}
|
|
6392
|
-
function
|
|
6392
|
+
function Us(e) {
|
|
6393
6393
|
if (e.type === void 0) throw Error("THREE.KeyframeTrack: track type undefined, can not parse");
|
|
6394
|
-
let t =
|
|
6394
|
+
let t = Hs(e.type);
|
|
6395
6395
|
if (e.times === void 0) {
|
|
6396
6396
|
let t = [], n = [];
|
|
6397
|
-
|
|
6397
|
+
Ds(e.keys, t, n, "value"), e.times = t, e.values = n;
|
|
6398
6398
|
}
|
|
6399
6399
|
return t.parse === void 0 ? new t(e.name, e.times, e.values, e.interpolation) : t.parse(e);
|
|
6400
6400
|
}
|
|
6401
|
-
var
|
|
6401
|
+
var Ws = {
|
|
6402
6402
|
enabled: !1,
|
|
6403
6403
|
files: {},
|
|
6404
6404
|
add: function(e, t) {
|
|
6405
|
-
this.enabled !== !1 && (
|
|
6405
|
+
this.enabled !== !1 && (Gs(e) || (this.files[e] = t));
|
|
6406
6406
|
},
|
|
6407
6407
|
get: function(e) {
|
|
6408
|
-
if (this.enabled !== !1 && !
|
|
6408
|
+
if (this.enabled !== !1 && !Gs(e)) return this.files[e];
|
|
6409
6409
|
},
|
|
6410
6410
|
remove: function(e) {
|
|
6411
6411
|
delete this.files[e];
|
|
@@ -6414,7 +6414,7 @@ var Hs = {
|
|
|
6414
6414
|
this.files = {};
|
|
6415
6415
|
}
|
|
6416
6416
|
};
|
|
6417
|
-
function
|
|
6417
|
+
function Gs(e) {
|
|
6418
6418
|
try {
|
|
6419
6419
|
let t = e.slice(e.indexOf(":") + 1);
|
|
6420
6420
|
return new URL(t).protocol === "blob:";
|
|
@@ -6422,7 +6422,7 @@ function Us(e) {
|
|
|
6422
6422
|
return !1;
|
|
6423
6423
|
}
|
|
6424
6424
|
}
|
|
6425
|
-
var
|
|
6425
|
+
var Ks = class {
|
|
6426
6426
|
constructor(e, t, n) {
|
|
6427
6427
|
let r = this, i = !1, a = 0, o = 0, s, c = [];
|
|
6428
6428
|
this.onStart = void 0, this.onLoad = e, this.onProgress = t, this.onError = n, this._abortController = null, this.itemStart = function(e) {
|
|
@@ -6453,9 +6453,9 @@ var Ws = /* @__PURE__ */ new class {
|
|
|
6453
6453
|
get abortController() {
|
|
6454
6454
|
return this._abortController ||= new AbortController(), this._abortController;
|
|
6455
6455
|
}
|
|
6456
|
-
}(),
|
|
6456
|
+
}, qs = /* @__PURE__ */ new Ks(), Js = class {
|
|
6457
6457
|
constructor(e) {
|
|
6458
|
-
this.manager = e === void 0 ?
|
|
6458
|
+
this.manager = e === void 0 ? qs : e, this.crossOrigin = "anonymous", this.withCredentials = !1, this.path = "", this.resourcePath = "", this.requestHeader = {}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
|
|
6459
6459
|
}
|
|
6460
6460
|
load() {}
|
|
6461
6461
|
loadAsync(e, t) {
|
|
@@ -6484,30 +6484,30 @@ var Ws = /* @__PURE__ */ new class {
|
|
|
6484
6484
|
return this;
|
|
6485
6485
|
}
|
|
6486
6486
|
};
|
|
6487
|
-
|
|
6488
|
-
var
|
|
6487
|
+
Js.DEFAULT_MATERIAL_NAME = "__DEFAULT";
|
|
6488
|
+
var Ys = {}, Xs = class extends Error {
|
|
6489
6489
|
constructor(e, t) {
|
|
6490
6490
|
super(e), this.response = t;
|
|
6491
6491
|
}
|
|
6492
|
-
},
|
|
6492
|
+
}, Zs = class extends Js {
|
|
6493
6493
|
constructor(e) {
|
|
6494
6494
|
super(e), this.mimeType = "", this.responseType = "", this._abortController = new AbortController();
|
|
6495
6495
|
}
|
|
6496
6496
|
load(e, t, n, r) {
|
|
6497
6497
|
e === void 0 && (e = ""), this.path !== void 0 && (e = this.path + e), e = this.manager.resolveURL(e);
|
|
6498
|
-
let i =
|
|
6498
|
+
let i = Ws.get(`file:${e}`);
|
|
6499
6499
|
if (i !== void 0) return this.manager.itemStart(e), setTimeout(() => {
|
|
6500
6500
|
t && t(i), this.manager.itemEnd(e);
|
|
6501
6501
|
}, 0), i;
|
|
6502
|
-
if (
|
|
6503
|
-
|
|
6502
|
+
if (Ys[e] !== void 0) {
|
|
6503
|
+
Ys[e].push({
|
|
6504
6504
|
onLoad: t,
|
|
6505
6505
|
onProgress: n,
|
|
6506
6506
|
onError: r
|
|
6507
6507
|
});
|
|
6508
6508
|
return;
|
|
6509
6509
|
}
|
|
6510
|
-
|
|
6510
|
+
Ys[e] = [], Ys[e].push({
|
|
6511
6511
|
onLoad: t,
|
|
6512
6512
|
onProgress: n,
|
|
6513
6513
|
onError: r
|
|
@@ -6520,7 +6520,7 @@ var Ks = {}, qs = class extends Error {
|
|
|
6520
6520
|
fetch(a).then((t) => {
|
|
6521
6521
|
if (t.status === 200 || t.status === 0) {
|
|
6522
6522
|
if (t.status === 0 && k("FileLoader: HTTP Status 0 received."), typeof ReadableStream > "u" || t.body === void 0 || t.body.getReader === void 0) return t;
|
|
6523
|
-
let n =
|
|
6523
|
+
let n = Ys[e], r = t.body.getReader(), i = t.headers.get("X-File-Size") || t.headers.get("Content-Length"), a = i ? parseInt(i) : 0, o = a !== 0, s = 0, c = new ReadableStream({ start(e) {
|
|
6524
6524
|
t();
|
|
6525
6525
|
function t() {
|
|
6526
6526
|
r.read().then(({ done: r, value: i }) => {
|
|
@@ -6544,7 +6544,7 @@ var Ks = {}, qs = class extends Error {
|
|
|
6544
6544
|
}
|
|
6545
6545
|
} });
|
|
6546
6546
|
return new Response(c);
|
|
6547
|
-
} else throw new
|
|
6547
|
+
} else throw new Xs(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`, t);
|
|
6548
6548
|
}).then((e) => {
|
|
6549
6549
|
switch (s) {
|
|
6550
6550
|
case "arraybuffer": return e.arrayBuffer();
|
|
@@ -6559,17 +6559,17 @@ var Ks = {}, qs = class extends Error {
|
|
|
6559
6559
|
}
|
|
6560
6560
|
}
|
|
6561
6561
|
}).then((t) => {
|
|
6562
|
-
|
|
6563
|
-
let n =
|
|
6564
|
-
delete
|
|
6562
|
+
Ws.add(`file:${e}`, t);
|
|
6563
|
+
let n = Ys[e];
|
|
6564
|
+
delete Ys[e];
|
|
6565
6565
|
for (let e = 0, r = n.length; e < r; e++) {
|
|
6566
6566
|
let r = n[e];
|
|
6567
6567
|
r.onLoad && r.onLoad(t);
|
|
6568
6568
|
}
|
|
6569
6569
|
}).catch((t) => {
|
|
6570
|
-
let n =
|
|
6570
|
+
let n = Ys[e];
|
|
6571
6571
|
if (n === void 0) throw this.manager.itemError(e), t;
|
|
6572
|
-
delete
|
|
6572
|
+
delete Ys[e];
|
|
6573
6573
|
for (let e = 0, r = n.length; e < r; e++) {
|
|
6574
6574
|
let r = n[e];
|
|
6575
6575
|
r.onError && r.onError(t);
|
|
@@ -6588,60 +6588,60 @@ var Ks = {}, qs = class extends Error {
|
|
|
6588
6588
|
abort() {
|
|
6589
6589
|
return this._abortController.abort(), this._abortController = new AbortController(), this;
|
|
6590
6590
|
}
|
|
6591
|
-
},
|
|
6591
|
+
}, Qs = /* @__PURE__ */ new WeakMap(), $s = class extends Js {
|
|
6592
6592
|
constructor(e) {
|
|
6593
6593
|
super(e);
|
|
6594
6594
|
}
|
|
6595
6595
|
load(e, t, n, r) {
|
|
6596
6596
|
this.path !== void 0 && (e = this.path + e), e = this.manager.resolveURL(e);
|
|
6597
|
-
let i = this, a =
|
|
6597
|
+
let i = this, a = Ws.get(`image:${e}`);
|
|
6598
6598
|
if (a !== void 0) {
|
|
6599
6599
|
if (a.complete === !0) i.manager.itemStart(e), setTimeout(function() {
|
|
6600
6600
|
t && t(a), i.manager.itemEnd(e);
|
|
6601
6601
|
}, 0);
|
|
6602
6602
|
else {
|
|
6603
|
-
let e =
|
|
6604
|
-
e === void 0 && (e = [],
|
|
6603
|
+
let e = Qs.get(a);
|
|
6604
|
+
e === void 0 && (e = [], Qs.set(a, e)), e.push({
|
|
6605
6605
|
onLoad: t,
|
|
6606
6606
|
onError: r
|
|
6607
6607
|
});
|
|
6608
6608
|
}
|
|
6609
6609
|
return a;
|
|
6610
6610
|
}
|
|
6611
|
-
let o =
|
|
6611
|
+
let o = vt("img");
|
|
6612
6612
|
function s() {
|
|
6613
6613
|
l(), t && t(this);
|
|
6614
|
-
let n =
|
|
6614
|
+
let n = Qs.get(this) || [];
|
|
6615
6615
|
for (let e = 0; e < n.length; e++) {
|
|
6616
6616
|
let t = n[e];
|
|
6617
6617
|
t.onLoad && t.onLoad(this);
|
|
6618
6618
|
}
|
|
6619
|
-
|
|
6619
|
+
Qs.delete(this), i.manager.itemEnd(e);
|
|
6620
6620
|
}
|
|
6621
6621
|
function c(t) {
|
|
6622
|
-
l(), r && r(t),
|
|
6623
|
-
let n =
|
|
6622
|
+
l(), r && r(t), Ws.remove(`image:${e}`);
|
|
6623
|
+
let n = Qs.get(this) || [];
|
|
6624
6624
|
for (let e = 0; e < n.length; e++) {
|
|
6625
6625
|
let r = n[e];
|
|
6626
6626
|
r.onError && r.onError(t);
|
|
6627
6627
|
}
|
|
6628
|
-
|
|
6628
|
+
Qs.delete(this), i.manager.itemError(e), i.manager.itemEnd(e);
|
|
6629
6629
|
}
|
|
6630
6630
|
function l() {
|
|
6631
6631
|
o.removeEventListener("load", s, !1), o.removeEventListener("error", c, !1);
|
|
6632
6632
|
}
|
|
6633
|
-
return o.addEventListener("load", s, !1), o.addEventListener("error", c, !1), e.slice(0, 5) !== "data:" && this.crossOrigin !== void 0 && (o.crossOrigin = this.crossOrigin),
|
|
6633
|
+
return o.addEventListener("load", s, !1), o.addEventListener("error", c, !1), e.slice(0, 5) !== "data:" && this.crossOrigin !== void 0 && (o.crossOrigin = this.crossOrigin), Ws.add(`image:${e}`, o), i.manager.itemStart(e), o.src = e, o;
|
|
6634
6634
|
}
|
|
6635
|
-
},
|
|
6635
|
+
}, ec = class extends Js {
|
|
6636
6636
|
constructor(e) {
|
|
6637
6637
|
super(e);
|
|
6638
6638
|
}
|
|
6639
|
-
load(e, t,
|
|
6640
|
-
let a = this, o = new
|
|
6641
|
-
return
|
|
6642
|
-
let
|
|
6639
|
+
load(e, t, n, i) {
|
|
6640
|
+
let a = this, o = new Pi(), s = new Zs(this.manager);
|
|
6641
|
+
return s.setResponseType("arraybuffer"), s.setRequestHeader(this.requestHeader), s.setPath(this.path), s.setWithCredentials(a.withCredentials), s.load(e, function(e) {
|
|
6642
|
+
let n;
|
|
6643
6643
|
try {
|
|
6644
|
-
|
|
6644
|
+
n = a.parse(e);
|
|
6645
6645
|
} catch (e) {
|
|
6646
6646
|
if (i !== void 0) i(e);
|
|
6647
6647
|
else {
|
|
@@ -6649,22 +6649,22 @@ var Ks = {}, qs = class extends Error {
|
|
|
6649
6649
|
return;
|
|
6650
6650
|
}
|
|
6651
6651
|
}
|
|
6652
|
-
|
|
6653
|
-
},
|
|
6652
|
+
n.image === void 0 ? n.data !== void 0 && (o.image.width = n.width, o.image.height = n.height, o.image.data = n.data) : o.image = n.image, o.wrapS = n.wrapS === void 0 ? r : n.wrapS, o.wrapT = n.wrapT === void 0 ? r : n.wrapT, o.magFilter = n.magFilter === void 0 ? c : n.magFilter, o.minFilter = n.minFilter === void 0 ? c : n.minFilter, o.anisotropy = n.anisotropy === void 0 ? 1 : n.anisotropy, n.colorSpace !== void 0 && (o.colorSpace = n.colorSpace), n.flipY !== void 0 && (o.flipY = n.flipY), n.format !== void 0 && (o.format = n.format), n.type !== void 0 && (o.type = n.type), n.mipmaps !== void 0 && (o.mipmaps = n.mipmaps, o.minFilter = u), n.mipmapCount === 1 && (o.minFilter = c), n.generateMipmaps !== void 0 && (o.generateMipmaps = n.generateMipmaps), o.needsUpdate = !0, t && t(o, n);
|
|
6653
|
+
}, n, i), o;
|
|
6654
6654
|
}
|
|
6655
|
-
},
|
|
6655
|
+
}, tc = class extends Js {
|
|
6656
6656
|
constructor(e) {
|
|
6657
6657
|
super(e);
|
|
6658
6658
|
}
|
|
6659
6659
|
load(e, t, n, r) {
|
|
6660
|
-
let i = new R(), a = new
|
|
6660
|
+
let i = new R(), a = new $s(this.manager);
|
|
6661
6661
|
return a.setCrossOrigin(this.crossOrigin), a.setPath(this.path), a.load(e, function(e) {
|
|
6662
6662
|
i.image = e, i.needsUpdate = !0, t !== void 0 && t(i);
|
|
6663
6663
|
}, n, r), i;
|
|
6664
6664
|
}
|
|
6665
|
-
},
|
|
6665
|
+
}, nc = class extends V {
|
|
6666
6666
|
constructor(e, t = 1) {
|
|
6667
|
-
super(), this.isLight = !0, this.type = "Light", this.color = new
|
|
6667
|
+
super(), this.isLight = !0, this.type = "Light", this.color = new H(e), this.intensity = t;
|
|
6668
6668
|
}
|
|
6669
6669
|
dispose() {
|
|
6670
6670
|
this.dispatchEvent({ type: "dispose" });
|
|
@@ -6676,9 +6676,9 @@ var Ks = {}, qs = class extends Error {
|
|
|
6676
6676
|
let t = super.toJSON(e);
|
|
6677
6677
|
return t.object.color = this.color.getHex(), t.object.intensity = this.intensity, t;
|
|
6678
6678
|
}
|
|
6679
|
-
},
|
|
6679
|
+
}, rc = class extends nc {
|
|
6680
6680
|
constructor(e, t, n) {
|
|
6681
|
-
super(e, n), this.isHemisphereLight = !0, this.type = "HemisphereLight", this.position.copy(
|
|
6681
|
+
super(e, n), this.isHemisphereLight = !0, this.type = "HemisphereLight", this.position.copy(V.DEFAULT_UP), this.updateMatrix(), this.groundColor = new H(t);
|
|
6682
6682
|
}
|
|
6683
6683
|
copy(e, t) {
|
|
6684
6684
|
return super.copy(e, t), this.groundColor.copy(e.groundColor), this;
|
|
@@ -6687,9 +6687,9 @@ var Ks = {}, qs = class extends Error {
|
|
|
6687
6687
|
let t = super.toJSON(e);
|
|
6688
6688
|
return t.object.groundColor = this.groundColor.getHex(), t;
|
|
6689
6689
|
}
|
|
6690
|
-
},
|
|
6690
|
+
}, ic = /* @__PURE__ */ new z(), ac = /* @__PURE__ */ new I(), oc = /* @__PURE__ */ new I(), sc = class {
|
|
6691
6691
|
constructor(e) {
|
|
6692
|
-
this.camera = e, this.intensity = 1, this.bias = 0, this.biasNode = null, this.normalBias = 0, this.radius = 1, this.blurSamples = 8, this.mapSize = new F(512, 512), this.mapType =
|
|
6692
|
+
this.camera = e, this.intensity = 1, this.bias = 0, this.biasNode = null, this.normalBias = 0, this.radius = 1, this.blurSamples = 8, this.mapSize = new F(512, 512), this.mapType = f, this.map = null, this.mapPass = null, this.matrix = new z(), this.autoUpdate = !0, this.needsUpdate = !1, this._frustum = new ea(), this._frameExtents = new F(1, 1), this._viewportCount = 1, this._viewports = [new hn(0, 0, 1, 1)];
|
|
6693
6693
|
}
|
|
6694
6694
|
getViewportCount() {
|
|
6695
6695
|
return this._viewportCount;
|
|
@@ -6699,7 +6699,7 @@ var Ks = {}, qs = class extends Error {
|
|
|
6699
6699
|
}
|
|
6700
6700
|
updateMatrices(e) {
|
|
6701
6701
|
let t = this.camera, n = this.matrix;
|
|
6702
|
-
|
|
6702
|
+
ac.setFromMatrixPosition(e.matrixWorld), t.position.copy(ac), oc.setFromMatrixPosition(e.target.matrixWorld), t.lookAt(oc), t.updateMatrixWorld(), ic.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse), this._frustum.setFromProjectionMatrix(ic, t.coordinateSystem, t.reversedDepth), t.coordinateSystem === 2001 || t.reversedDepth ? n.set(.5, 0, 0, .5, 0, .5, 0, .5, 0, 0, 1, 0, 0, 0, 0, 1) : n.set(.5, 0, 0, .5, 0, .5, 0, .5, 0, 0, .5, .5, 0, 0, 0, 1), n.multiply(ic);
|
|
6703
6703
|
}
|
|
6704
6704
|
getViewport(e) {
|
|
6705
6705
|
return this._viewports[e];
|
|
@@ -6720,9 +6720,9 @@ var Ks = {}, qs = class extends Error {
|
|
|
6720
6720
|
let e = {};
|
|
6721
6721
|
return this.intensity !== 1 && (e.intensity = this.intensity), this.bias !== 0 && (e.bias = this.bias), this.normalBias !== 0 && (e.normalBias = this.normalBias), this.radius !== 1 && (e.radius = this.radius), (this.mapSize.x !== 512 || this.mapSize.y !== 512) && (e.mapSize = this.mapSize.toArray()), e.camera = this.camera.toJSON(!1).object, delete e.camera.matrix, e;
|
|
6722
6722
|
}
|
|
6723
|
-
},
|
|
6723
|
+
}, cc = /* @__PURE__ */ new I(), lc = /* @__PURE__ */ new Zt(), uc = /* @__PURE__ */ new I(), dc = class extends V {
|
|
6724
6724
|
constructor() {
|
|
6725
|
-
super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new z(), this.projectionMatrix = new z(), this.projectionMatrixInverse = new z(), this.coordinateSystem =
|
|
6725
|
+
super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new z(), this.projectionMatrix = new z(), this.projectionMatrixInverse = new z(), this.coordinateSystem = ft, this._reversedDepth = !1;
|
|
6726
6726
|
}
|
|
6727
6727
|
get reversedDepth() {
|
|
6728
6728
|
return this._reversedDepth;
|
|
@@ -6734,15 +6734,15 @@ var Ks = {}, qs = class extends Error {
|
|
|
6734
6734
|
return super.getWorldDirection(e).negate();
|
|
6735
6735
|
}
|
|
6736
6736
|
updateMatrixWorld(e) {
|
|
6737
|
-
super.updateMatrixWorld(e), this.matrixWorld.decompose(
|
|
6737
|
+
super.updateMatrixWorld(e), this.matrixWorld.decompose(cc, lc, uc), uc.x === 1 && uc.y === 1 && uc.z === 1 ? this.matrixWorldInverse.copy(this.matrixWorld).invert() : this.matrixWorldInverse.compose(cc, lc, uc.set(1, 1, 1)).invert();
|
|
6738
6738
|
}
|
|
6739
6739
|
updateWorldMatrix(e, t) {
|
|
6740
|
-
super.updateWorldMatrix(e, t), this.matrixWorld.decompose(
|
|
6740
|
+
super.updateWorldMatrix(e, t), this.matrixWorld.decompose(cc, lc, uc), uc.x === 1 && uc.y === 1 && uc.z === 1 ? this.matrixWorldInverse.copy(this.matrixWorld).invert() : this.matrixWorldInverse.compose(cc, lc, uc.set(1, 1, 1)).invert();
|
|
6741
6741
|
}
|
|
6742
6742
|
clone() {
|
|
6743
6743
|
return new this.constructor().copy(this);
|
|
6744
6744
|
}
|
|
6745
|
-
},
|
|
6745
|
+
}, fc = /* @__PURE__ */ new I(), pc = /* @__PURE__ */ new F(), mc = /* @__PURE__ */ new F(), hc = class extends dc {
|
|
6746
6746
|
constructor(e = 50, t = 1, n = .1, r = 2e3) {
|
|
6747
6747
|
super(), this.isPerspectiveCamera = !0, this.type = "PerspectiveCamera", this.fov = e, this.zoom = 1, this.near = n, this.far = r, this.focus = 10, this.aspect = t, this.view = null, this.filmGauge = 35, this.filmOffset = 0, this.updateProjectionMatrix();
|
|
6748
6748
|
}
|
|
@@ -6751,14 +6751,14 @@ var Ks = {}, qs = class extends Error {
|
|
|
6751
6751
|
}
|
|
6752
6752
|
setFocalLength(e) {
|
|
6753
6753
|
let t = .5 * this.getFilmHeight() / e;
|
|
6754
|
-
this.fov =
|
|
6754
|
+
this.fov = At * 2 * Math.atan(t), this.updateProjectionMatrix();
|
|
6755
6755
|
}
|
|
6756
6756
|
getFocalLength() {
|
|
6757
|
-
let e = Math.tan(
|
|
6757
|
+
let e = Math.tan(kt * .5 * this.fov);
|
|
6758
6758
|
return .5 * this.getFilmHeight() / e;
|
|
6759
6759
|
}
|
|
6760
6760
|
getEffectiveFOV() {
|
|
6761
|
-
return
|
|
6761
|
+
return At * 2 * Math.atan(Math.tan(kt * .5 * this.fov) / this.zoom);
|
|
6762
6762
|
}
|
|
6763
6763
|
getFilmWidth() {
|
|
6764
6764
|
return this.filmGauge * Math.min(this.aspect, 1);
|
|
@@ -6767,10 +6767,10 @@ var Ks = {}, qs = class extends Error {
|
|
|
6767
6767
|
return this.filmGauge / Math.max(this.aspect, 1);
|
|
6768
6768
|
}
|
|
6769
6769
|
getViewBounds(e, t, n) {
|
|
6770
|
-
|
|
6770
|
+
fc.set(-1, -1, .5).applyMatrix4(this.projectionMatrixInverse), t.set(fc.x, fc.y).multiplyScalar(-e / fc.z), fc.set(1, 1, .5).applyMatrix4(this.projectionMatrixInverse), n.set(fc.x, fc.y).multiplyScalar(-e / fc.z);
|
|
6771
6771
|
}
|
|
6772
6772
|
getViewSize(e, t) {
|
|
6773
|
-
return this.getViewBounds(e,
|
|
6773
|
+
return this.getViewBounds(e, pc, mc), t.subVectors(mc, pc);
|
|
6774
6774
|
}
|
|
6775
6775
|
setViewOffset(e, t, n, r, i, a) {
|
|
6776
6776
|
this.aspect = e / t, this.view === null && (this.view = {
|
|
@@ -6787,7 +6787,7 @@ var Ks = {}, qs = class extends Error {
|
|
|
6787
6787
|
this.view !== null && (this.view.enabled = !1), this.updateProjectionMatrix();
|
|
6788
6788
|
}
|
|
6789
6789
|
updateProjectionMatrix() {
|
|
6790
|
-
let e = this.near, t = e * Math.tan(
|
|
6790
|
+
let e = this.near, t = e * Math.tan(kt * .5 * this.fov) / this.zoom, n = 2 * t, r = this.aspect * n, i = -.5 * r, a = this.view;
|
|
6791
6791
|
if (this.view !== null && this.view.enabled) {
|
|
6792
6792
|
let e = a.fullWidth, o = a.fullHeight;
|
|
6793
6793
|
i += a.offsetX * r / e, t -= a.offsetY * n / o, r *= a.width / e, n *= a.height / o;
|
|
@@ -6799,20 +6799,20 @@ var Ks = {}, qs = class extends Error {
|
|
|
6799
6799
|
let t = super.toJSON(e);
|
|
6800
6800
|
return t.object.fov = this.fov, t.object.zoom = this.zoom, t.object.near = this.near, t.object.far = this.far, t.object.focus = this.focus, t.object.aspect = this.aspect, this.view !== null && (t.object.view = Object.assign({}, this.view)), t.object.filmGauge = this.filmGauge, t.object.filmOffset = this.filmOffset, t;
|
|
6801
6801
|
}
|
|
6802
|
-
},
|
|
6802
|
+
}, gc = class extends sc {
|
|
6803
6803
|
constructor() {
|
|
6804
|
-
super(new
|
|
6804
|
+
super(new hc(50, 1, .5, 500)), this.isSpotLightShadow = !0, this.focus = 1, this.aspect = 1;
|
|
6805
6805
|
}
|
|
6806
6806
|
updateMatrices(e) {
|
|
6807
|
-
let t = this.camera, n =
|
|
6807
|
+
let t = this.camera, n = At * 2 * e.angle * this.focus, r = this.mapSize.width / this.mapSize.height * this.aspect, i = e.distance || t.far;
|
|
6808
6808
|
(n !== t.fov || r !== t.aspect || i !== t.far) && (t.fov = n, t.aspect = r, t.far = i, t.updateProjectionMatrix()), super.updateMatrices(e);
|
|
6809
6809
|
}
|
|
6810
6810
|
copy(e) {
|
|
6811
6811
|
return super.copy(e), this.focus = e.focus, this;
|
|
6812
6812
|
}
|
|
6813
|
-
},
|
|
6813
|
+
}, _c = class extends nc {
|
|
6814
6814
|
constructor(e, t, n = 0, r = Math.PI / 3, i = 0, a = 2) {
|
|
6815
|
-
super(e, t), this.isSpotLight = !0, this.type = "SpotLight", this.position.copy(
|
|
6815
|
+
super(e, t), this.isSpotLight = !0, this.type = "SpotLight", this.position.copy(V.DEFAULT_UP), this.updateMatrix(), this.target = new V(), this.distance = n, this.angle = r, this.penumbra = i, this.decay = a, this.map = null, this.shadow = new gc();
|
|
6816
6816
|
}
|
|
6817
6817
|
get power() {
|
|
6818
6818
|
return this.intensity * Math.PI;
|
|
@@ -6830,13 +6830,13 @@ var Ks = {}, qs = class extends Error {
|
|
|
6830
6830
|
let t = super.toJSON(e);
|
|
6831
6831
|
return t.object.distance = this.distance, t.object.angle = this.angle, t.object.decay = this.decay, t.object.penumbra = this.penumbra, t.object.target = this.target.uuid, this.map && this.map.isTexture && (t.object.map = this.map.toJSON(e).uuid), t.object.shadow = this.shadow.toJSON(), t;
|
|
6832
6832
|
}
|
|
6833
|
-
},
|
|
6833
|
+
}, vc = class extends sc {
|
|
6834
6834
|
constructor() {
|
|
6835
|
-
super(new
|
|
6835
|
+
super(new hc(90, 1, .5, 500)), this.isPointLightShadow = !0;
|
|
6836
6836
|
}
|
|
6837
|
-
},
|
|
6837
|
+
}, yc = class extends nc {
|
|
6838
6838
|
constructor(e, t, n = 0, r = 2) {
|
|
6839
|
-
super(e, t), this.isPointLight = !0, this.type = "PointLight", this.distance = n, this.decay = r, this.shadow = new
|
|
6839
|
+
super(e, t), this.isPointLight = !0, this.type = "PointLight", this.distance = n, this.decay = r, this.shadow = new vc();
|
|
6840
6840
|
}
|
|
6841
6841
|
get power() {
|
|
6842
6842
|
return this.intensity * 4 * Math.PI;
|
|
@@ -6854,7 +6854,7 @@ var Ks = {}, qs = class extends Error {
|
|
|
6854
6854
|
let t = super.toJSON(e);
|
|
6855
6855
|
return t.object.distance = this.distance, t.object.decay = this.decay, t.object.shadow = this.shadow.toJSON(), t;
|
|
6856
6856
|
}
|
|
6857
|
-
},
|
|
6857
|
+
}, bc = class extends dc {
|
|
6858
6858
|
constructor(e = -1, t = 1, n = 1, r = -1, i = .1, a = 2e3) {
|
|
6859
6859
|
super(), this.isOrthographicCamera = !0, this.type = "OrthographicCamera", this.zoom = 1, this.view = null, this.left = e, this.right = t, this.top = n, this.bottom = r, this.near = i, this.far = a, this.updateProjectionMatrix();
|
|
6860
6860
|
}
|
|
@@ -6887,13 +6887,13 @@ var Ks = {}, qs = class extends Error {
|
|
|
6887
6887
|
let t = super.toJSON(e);
|
|
6888
6888
|
return t.object.zoom = this.zoom, t.object.left = this.left, t.object.right = this.right, t.object.top = this.top, t.object.bottom = this.bottom, t.object.near = this.near, t.object.far = this.far, this.view !== null && (t.object.view = Object.assign({}, this.view)), t;
|
|
6889
6889
|
}
|
|
6890
|
-
},
|
|
6890
|
+
}, xc = class extends sc {
|
|
6891
6891
|
constructor() {
|
|
6892
|
-
super(new
|
|
6892
|
+
super(new bc(-5, 5, 5, -5, .5, 500)), this.isDirectionalLightShadow = !0;
|
|
6893
6893
|
}
|
|
6894
|
-
},
|
|
6894
|
+
}, Sc = class extends nc {
|
|
6895
6895
|
constructor(e, t) {
|
|
6896
|
-
super(e, t), this.isDirectionalLight = !0, this.type = "DirectionalLight", this.position.copy(
|
|
6896
|
+
super(e, t), this.isDirectionalLight = !0, this.type = "DirectionalLight", this.position.copy(V.DEFAULT_UP), this.updateMatrix(), this.target = new V(), this.shadow = new xc();
|
|
6897
6897
|
}
|
|
6898
6898
|
dispose() {
|
|
6899
6899
|
super.dispose(), this.shadow.dispose();
|
|
@@ -6905,11 +6905,11 @@ var Ks = {}, qs = class extends Error {
|
|
|
6905
6905
|
let t = super.toJSON(e);
|
|
6906
6906
|
return t.object.shadow = this.shadow.toJSON(), t.object.target = this.target.uuid, t;
|
|
6907
6907
|
}
|
|
6908
|
-
},
|
|
6908
|
+
}, Cc = class extends nc {
|
|
6909
6909
|
constructor(e, t) {
|
|
6910
6910
|
super(e, t), this.isAmbientLight = !0, this.type = "AmbientLight";
|
|
6911
6911
|
}
|
|
6912
|
-
},
|
|
6912
|
+
}, wc = class extends nc {
|
|
6913
6913
|
constructor(e, t, n = 10, r = 10) {
|
|
6914
6914
|
super(e, t), this.isRectAreaLight = !0, this.type = "RectAreaLight", this.width = n, this.height = r;
|
|
6915
6915
|
}
|
|
@@ -6926,7 +6926,7 @@ var Ks = {}, qs = class extends Error {
|
|
|
6926
6926
|
let t = super.toJSON(e);
|
|
6927
6927
|
return t.object.width = this.width, t.object.height = this.height, t;
|
|
6928
6928
|
}
|
|
6929
|
-
},
|
|
6929
|
+
}, Tc = class {
|
|
6930
6930
|
constructor() {
|
|
6931
6931
|
this.isSphericalHarmonics3 = !0, this.coefficients = [];
|
|
6932
6932
|
for (let e = 0; e < 9; e++) this.coefficients.push(new I());
|
|
@@ -6987,8 +6987,8 @@ var Ks = {}, qs = class extends Error {
|
|
|
6987
6987
|
let n = e.x, r = e.y, i = e.z;
|
|
6988
6988
|
t[0] = .282095, t[1] = .488603 * r, t[2] = .488603 * i, t[3] = .488603 * n, t[4] = 1.092548 * n * r, t[5] = 1.092548 * r * i, t[6] = .315392 * (3 * i * i - 1), t[7] = 1.092548 * n * i, t[8] = .546274 * (n * n - r * r);
|
|
6989
6989
|
}
|
|
6990
|
-
},
|
|
6991
|
-
constructor(e = new
|
|
6990
|
+
}, Ec = class extends nc {
|
|
6991
|
+
constructor(e = new Tc(), t = 1) {
|
|
6992
6992
|
super(void 0, t), this.isLightProbe = !0, this.sh = e;
|
|
6993
6993
|
}
|
|
6994
6994
|
copy(e) {
|
|
@@ -6998,7 +6998,7 @@ var Ks = {}, qs = class extends Error {
|
|
|
6998
6998
|
let t = super.toJSON(e);
|
|
6999
6999
|
return t.object.sh = this.sh.toArray(), t;
|
|
7000
7000
|
}
|
|
7001
|
-
},
|
|
7001
|
+
}, Dc = class {
|
|
7002
7002
|
static extractUrlBase(e) {
|
|
7003
7003
|
let t = e.lastIndexOf("/");
|
|
7004
7004
|
return t === -1 ? "./" : e.slice(0, t + 1);
|
|
@@ -7006,7 +7006,7 @@ var Ks = {}, qs = class extends Error {
|
|
|
7006
7006
|
static resolveURL(e, t) {
|
|
7007
7007
|
return typeof e != "string" || e === "" ? "" : (/^https?:\/\//i.test(t) && /^\//.test(e) && (t = t.replace(/(^https?:\/\/[^\/]+).*/i, "$1")), /^(https?:)?\/\//i.test(e) || /^data:.*,.*$/i.test(e) || /^blob:.*$/i.test(e) ? e : t + e);
|
|
7008
7008
|
}
|
|
7009
|
-
},
|
|
7009
|
+
}, Oc = /* @__PURE__ */ new WeakMap(), kc = class extends Js {
|
|
7010
7010
|
constructor(e) {
|
|
7011
7011
|
super(e), this.isImageBitmapLoader = !0, typeof createImageBitmap > "u" && k("ImageBitmapLoader: createImageBitmap() not supported."), typeof fetch > "u" && k("ImageBitmapLoader: fetch() not supported."), this.options = { premultiplyAlpha: "none" }, this._abortController = new AbortController();
|
|
7012
7012
|
}
|
|
@@ -7015,11 +7015,11 @@ var Ks = {}, qs = class extends Error {
|
|
|
7015
7015
|
}
|
|
7016
7016
|
load(e, t, n, r) {
|
|
7017
7017
|
e === void 0 && (e = ""), this.path !== void 0 && (e = this.path + e), e = this.manager.resolveURL(e);
|
|
7018
|
-
let i = this, a =
|
|
7018
|
+
let i = this, a = Ws.get(`image-bitmap:${e}`);
|
|
7019
7019
|
if (a !== void 0) {
|
|
7020
7020
|
if (i.manager.itemStart(e), a.then) {
|
|
7021
7021
|
a.then((n) => {
|
|
7022
|
-
if (
|
|
7022
|
+
if (Oc.has(a) === !0) r && r(Oc.get(a)), i.manager.itemError(e), i.manager.itemEnd(e);
|
|
7023
7023
|
else return t && t(n), i.manager.itemEnd(e), n;
|
|
7024
7024
|
});
|
|
7025
7025
|
return;
|
|
@@ -7035,29 +7035,29 @@ var Ks = {}, qs = class extends Error {
|
|
|
7035
7035
|
}).then(function(e) {
|
|
7036
7036
|
return createImageBitmap(e, Object.assign(i.options, { colorSpaceConversion: "none" }));
|
|
7037
7037
|
}).then(function(n) {
|
|
7038
|
-
return
|
|
7038
|
+
return Ws.add(`image-bitmap:${e}`, n), t && t(n), i.manager.itemEnd(e), n;
|
|
7039
7039
|
}).catch(function(t) {
|
|
7040
|
-
r && r(t),
|
|
7040
|
+
r && r(t), Oc.set(s, t), Ws.remove(`image-bitmap:${e}`), i.manager.itemError(e), i.manager.itemEnd(e);
|
|
7041
7041
|
});
|
|
7042
|
-
|
|
7042
|
+
Ws.add(`image-bitmap:${e}`, s), i.manager.itemStart(e);
|
|
7043
7043
|
}
|
|
7044
7044
|
abort() {
|
|
7045
7045
|
return this._abortController.abort(), this._abortController = new AbortController(), this;
|
|
7046
7046
|
}
|
|
7047
|
-
},
|
|
7047
|
+
}, Ac = -90, jc = 1, Mc = class extends V {
|
|
7048
7048
|
constructor(e, t, n) {
|
|
7049
7049
|
super(), this.type = "CubeCamera", this.renderTarget = n, this.coordinateSystem = null, this.activeMipmapLevel = 0;
|
|
7050
|
-
let r = new
|
|
7050
|
+
let r = new hc(Ac, jc, e, t);
|
|
7051
7051
|
r.layers = this.layers, this.add(r);
|
|
7052
|
-
let i = new
|
|
7052
|
+
let i = new hc(Ac, jc, e, t);
|
|
7053
7053
|
i.layers = this.layers, this.add(i);
|
|
7054
|
-
let a = new
|
|
7054
|
+
let a = new hc(Ac, jc, e, t);
|
|
7055
7055
|
a.layers = this.layers, this.add(a);
|
|
7056
|
-
let o = new
|
|
7056
|
+
let o = new hc(Ac, jc, e, t);
|
|
7057
7057
|
o.layers = this.layers, this.add(o);
|
|
7058
|
-
let s = new
|
|
7058
|
+
let s = new hc(Ac, jc, e, t);
|
|
7059
7059
|
s.layers = this.layers, this.add(s);
|
|
7060
|
-
let c = new
|
|
7060
|
+
let c = new hc(Ac, jc, e, t);
|
|
7061
7061
|
c.layers = this.layers, this.add(c);
|
|
7062
7062
|
}
|
|
7063
7063
|
updateCoordinateSystem() {
|
|
@@ -7079,11 +7079,11 @@ var Ks = {}, qs = class extends Error {
|
|
|
7079
7079
|
let h = !1;
|
|
7080
7080
|
h = e.isWebGLRenderer === !0 ? e.state.buffers.depth.getReversed() : e.reversedDepthBuffer, e.setRenderTarget(n, 0, r), h && e.autoClear === !1 && e.clearDepth(), e.render(t, i), e.setRenderTarget(n, 1, r), h && e.autoClear === !1 && e.clearDepth(), e.render(t, a), e.setRenderTarget(n, 2, r), h && e.autoClear === !1 && e.clearDepth(), e.render(t, o), e.setRenderTarget(n, 3, r), h && e.autoClear === !1 && e.clearDepth(), e.render(t, s), e.setRenderTarget(n, 4, r), h && e.autoClear === !1 && e.clearDepth(), e.render(t, c), n.texture.generateMipmaps = m, e.setRenderTarget(n, 5, r), h && e.autoClear === !1 && e.clearDepth(), e.render(t, l), e.setRenderTarget(u, d, f), e.xr.enabled = p, n.texture.needsPMREMUpdate = !0;
|
|
7081
7081
|
}
|
|
7082
|
-
},
|
|
7082
|
+
}, Nc = class extends hc {
|
|
7083
7083
|
constructor(e = []) {
|
|
7084
7084
|
super(), this.isArrayCamera = !0, this.isMultiViewCamera = !1, this.cameras = e;
|
|
7085
7085
|
}
|
|
7086
|
-
},
|
|
7086
|
+
}, Pc = class {
|
|
7087
7087
|
constructor(e = !0) {
|
|
7088
7088
|
this.autoStart = e, this.startTime = 0, this.oldTime = 0, this.elapsedTime = 0, this.running = !1, k("THREE.Clock: This module has been deprecated. Please use THREE.Timer instead.");
|
|
7089
7089
|
}
|
|
@@ -7105,12 +7105,12 @@ var Ks = {}, qs = class extends Error {
|
|
|
7105
7105
|
}
|
|
7106
7106
|
return e;
|
|
7107
7107
|
}
|
|
7108
|
-
},
|
|
7108
|
+
}, Fc = "\\[\\]\\.:\\/", Ic = RegExp("[" + Fc + "]", "g"), Lc = "[^" + Fc + "]", Rc = "[^" + Fc.replace("\\.", "") + "]", zc = /* @__PURE__ */ "((?:WC+[\\/:])*)".replace("WC", Lc), Bc = /* @__PURE__ */ "(WCOD+)?".replace("WCOD", Rc), Vc = /* @__PURE__ */ "(?:\\.(WC+)(?:\\[(.+)\\])?)?".replace("WC", Lc), Hc = /* @__PURE__ */ "\\.(WC+)(?:\\[(.+)\\])?".replace("WC", Lc), Uc = RegExp("^" + zc + Bc + Vc + Hc + "$"), Wc = [
|
|
7109
7109
|
"material",
|
|
7110
7110
|
"materials",
|
|
7111
7111
|
"bones",
|
|
7112
7112
|
"map"
|
|
7113
|
-
],
|
|
7113
|
+
], Gc = class {
|
|
7114
7114
|
constructor(e, t, n) {
|
|
7115
7115
|
let r = n || Z.parseTrackName(t);
|
|
7116
7116
|
this._targetGroup = e, this._bindings = e.subscribe_(t, r);
|
|
@@ -7140,10 +7140,10 @@ var Ks = {}, qs = class extends Error {
|
|
|
7140
7140
|
return t && t.isAnimationObjectGroup ? new e.Composite(t, n, r) : new e(t, n, r);
|
|
7141
7141
|
}
|
|
7142
7142
|
static sanitizeNodeName(e) {
|
|
7143
|
-
return e.replace(/\s/g, "_").replace(
|
|
7143
|
+
return e.replace(/\s/g, "_").replace(Ic, "");
|
|
7144
7144
|
}
|
|
7145
7145
|
static parseTrackName(e) {
|
|
7146
|
-
let t =
|
|
7146
|
+
let t = Uc.exec(e);
|
|
7147
7147
|
if (t === null) throw Error("PropertyBinding: Cannot parse trackName: " + e);
|
|
7148
7148
|
let n = {
|
|
7149
7149
|
nodeName: t[2],
|
|
@@ -7154,7 +7154,7 @@ var Ks = {}, qs = class extends Error {
|
|
|
7154
7154
|
}, r = n.nodeName && n.nodeName.lastIndexOf(".");
|
|
7155
7155
|
if (r !== void 0 && r !== -1) {
|
|
7156
7156
|
let e = n.nodeName.substring(r + 1);
|
|
7157
|
-
|
|
7157
|
+
Wc.indexOf(e) !== -1 && (n.nodeName = n.nodeName.substring(0, r), n.objectName = e);
|
|
7158
7158
|
}
|
|
7159
7159
|
if (n.propertyName === null || n.propertyName.length === 0) throw Error("PropertyBinding: can not parse propertyName from trackName: " + e);
|
|
7160
7160
|
return n;
|
|
@@ -7331,7 +7331,7 @@ var Ks = {}, qs = class extends Error {
|
|
|
7331
7331
|
this.node = null, this.getValue = this._getValue_unbound, this.setValue = this._setValue_unbound;
|
|
7332
7332
|
}
|
|
7333
7333
|
};
|
|
7334
|
-
Z.Composite =
|
|
7334
|
+
Z.Composite = Gc, Z.prototype.BindingType = {
|
|
7335
7335
|
Direct: 0,
|
|
7336
7336
|
EntireArray: 1,
|
|
7337
7337
|
ArrayElement: 2,
|
|
@@ -7367,7 +7367,7 @@ Z.Composite = Hc, Z.prototype.BindingType = {
|
|
|
7367
7367
|
Z.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate
|
|
7368
7368
|
]
|
|
7369
7369
|
];
|
|
7370
|
-
var
|
|
7370
|
+
var Kc = class extends Xr {
|
|
7371
7371
|
constructor(e, t, n = 1) {
|
|
7372
7372
|
super(e, t), this.isInstancedInterleavedBuffer = !0, this.meshPerAttribute = n;
|
|
7373
7373
|
}
|
|
@@ -7382,9 +7382,9 @@ var Uc = class extends Jr {
|
|
|
7382
7382
|
let t = super.toJSON(e);
|
|
7383
7383
|
return t.isInstancedInterleavedBuffer = !0, t.meshPerAttribute = this.meshPerAttribute, t;
|
|
7384
7384
|
}
|
|
7385
|
-
},
|
|
7385
|
+
}, qc = /* @__PURE__ */ new z(), Jc = class {
|
|
7386
7386
|
constructor(e, t, n = 0, r = Infinity) {
|
|
7387
|
-
this.ray = new
|
|
7387
|
+
this.ray = new si(e, t), this.near = n, this.far = r, this.camera = null, this.layers = new kn(), this.params = {
|
|
7388
7388
|
Mesh: {},
|
|
7389
7389
|
Line: { threshold: 1 },
|
|
7390
7390
|
LOD: {},
|
|
@@ -7399,27 +7399,27 @@ var Uc = class extends Jr {
|
|
|
7399
7399
|
t.isPerspectiveCamera ? (this.ray.origin.setFromMatrixPosition(t.matrixWorld), this.ray.direction.set(e.x, e.y, .5).unproject(t).sub(this.ray.origin).normalize(), this.camera = t) : t.isOrthographicCamera ? (this.ray.origin.set(e.x, e.y, (t.near + t.far) / (t.near - t.far)).unproject(t), this.ray.direction.set(0, 0, -1).transformDirection(t.matrixWorld), this.camera = t) : A("Raycaster: Unsupported camera type: " + t.type);
|
|
7400
7400
|
}
|
|
7401
7401
|
setFromXRController(e) {
|
|
7402
|
-
return
|
|
7402
|
+
return qc.identity().extractRotation(e.matrixWorld), this.ray.origin.setFromMatrixPosition(e.matrixWorld), this.ray.direction.set(0, 0, -1).applyMatrix4(qc), this;
|
|
7403
7403
|
}
|
|
7404
7404
|
intersectObject(e, t = !0, n = []) {
|
|
7405
|
-
return
|
|
7405
|
+
return Xc(e, this, n, t), n.sort(Yc), n;
|
|
7406
7406
|
}
|
|
7407
7407
|
intersectObjects(e, t = !0, n = []) {
|
|
7408
|
-
for (let r = 0, i = e.length; r < i; r++)
|
|
7409
|
-
return n.sort(
|
|
7408
|
+
for (let r = 0, i = e.length; r < i; r++) Xc(e[r], this, n, t);
|
|
7409
|
+
return n.sort(Yc), n;
|
|
7410
7410
|
}
|
|
7411
7411
|
};
|
|
7412
|
-
function
|
|
7412
|
+
function Yc(e, t) {
|
|
7413
7413
|
return e.distance - t.distance;
|
|
7414
7414
|
}
|
|
7415
|
-
function
|
|
7415
|
+
function Xc(e, t, n, r) {
|
|
7416
7416
|
let i = !0;
|
|
7417
7417
|
if (e.layers.test(t.layers) && e.raycast(t, n) === !1 && (i = !1), i === !0 && r === !0) {
|
|
7418
7418
|
let r = e.children;
|
|
7419
|
-
for (let e = 0, i = r.length; e < i; e++)
|
|
7419
|
+
for (let e = 0, i = r.length; e < i; e++) Xc(r[e], t, n, !0);
|
|
7420
7420
|
}
|
|
7421
7421
|
}
|
|
7422
|
-
var
|
|
7422
|
+
var Zc = class e {
|
|
7423
7423
|
constructor(t, n, r, i) {
|
|
7424
7424
|
e.prototype.isMatrix2 = !0, this.elements = [
|
|
7425
7425
|
1,
|
|
@@ -7439,7 +7439,7 @@ var Jc = class e {
|
|
|
7439
7439
|
let i = this.elements;
|
|
7440
7440
|
return i[0] = e, i[2] = t, i[1] = n, i[3] = r, this;
|
|
7441
7441
|
}
|
|
7442
|
-
},
|
|
7442
|
+
}, Qc = /* @__PURE__ */ new I(), $c = /* @__PURE__ */ new I(), el = /* @__PURE__ */ new I(), tl = /* @__PURE__ */ new I(), nl = /* @__PURE__ */ new I(), rl = /* @__PURE__ */ new I(), il = /* @__PURE__ */ new I(), al = class {
|
|
7443
7443
|
constructor(e = new I(), t = new I()) {
|
|
7444
7444
|
this.start = e, this.end = t;
|
|
7445
7445
|
}
|
|
@@ -7465,29 +7465,29 @@ var Jc = class e {
|
|
|
7465
7465
|
return this.delta(t).multiplyScalar(e).add(this.start);
|
|
7466
7466
|
}
|
|
7467
7467
|
closestPointToPointParameter(e, t) {
|
|
7468
|
-
|
|
7469
|
-
let n =
|
|
7468
|
+
Qc.subVectors(e, this.start), $c.subVectors(this.end, this.start);
|
|
7469
|
+
let n = $c.dot($c), r = $c.dot(Qc) / n;
|
|
7470
7470
|
return t && (r = M(r, 0, 1)), r;
|
|
7471
7471
|
}
|
|
7472
7472
|
closestPointToPoint(e, t, n) {
|
|
7473
7473
|
let r = this.closestPointToPointParameter(e, t);
|
|
7474
7474
|
return this.delta(n).multiplyScalar(r).add(this.start);
|
|
7475
7475
|
}
|
|
7476
|
-
distanceSqToLine3(e, t =
|
|
7476
|
+
distanceSqToLine3(e, t = rl, n = il) {
|
|
7477
7477
|
let r = 1e-8 * 1e-8, i, a, o = this.start, s = e.start, c = this.end, l = e.end;
|
|
7478
|
-
|
|
7479
|
-
let u =
|
|
7478
|
+
el.subVectors(c, o), tl.subVectors(l, s), nl.subVectors(o, s);
|
|
7479
|
+
let u = el.dot(el), d = tl.dot(tl), f = tl.dot(nl);
|
|
7480
7480
|
if (u <= r && d <= r) return t.copy(o), n.copy(s), t.sub(n), t.dot(t);
|
|
7481
7481
|
if (u <= r) i = 0, a = f / d, a = M(a, 0, 1);
|
|
7482
7482
|
else {
|
|
7483
|
-
let e =
|
|
7483
|
+
let e = el.dot(nl);
|
|
7484
7484
|
if (d <= r) a = 0, i = M(-e / u, 0, 1);
|
|
7485
7485
|
else {
|
|
7486
|
-
let t =
|
|
7486
|
+
let t = el.dot(tl), n = u * d - t * t;
|
|
7487
7487
|
i = n === 0 ? 0 : M((t * f - e * d) / n, 0, 1), a = (t * i + f) / d, a < 0 ? (a = 0, i = M(-e / u, 0, 1)) : a > 1 && (a = 1, i = M((t - e) / u, 0, 1));
|
|
7488
7488
|
}
|
|
7489
7489
|
}
|
|
7490
|
-
return t.copy(o).addScaledVector(
|
|
7490
|
+
return t.copy(o).addScaledVector(el, i), n.copy(s).addScaledVector(tl, a), t.distanceToSquared(n);
|
|
7491
7491
|
}
|
|
7492
7492
|
applyMatrix4(e) {
|
|
7493
7493
|
return this.start.applyMatrix4(e), this.end.applyMatrix4(e), this;
|
|
@@ -7498,9 +7498,9 @@ var Jc = class e {
|
|
|
7498
7498
|
clone() {
|
|
7499
7499
|
return new this.constructor().copy(this);
|
|
7500
7500
|
}
|
|
7501
|
-
},
|
|
7501
|
+
}, ol = /* @__PURE__ */ new I(), Q = /* @__PURE__ */ new dc(), sl = class extends ga {
|
|
7502
7502
|
constructor(e) {
|
|
7503
|
-
let t = new
|
|
7503
|
+
let t = new Yr(), n = new ia({
|
|
7504
7504
|
color: 16777215,
|
|
7505
7505
|
vertexColors: !0,
|
|
7506
7506
|
toneMapped: !1
|
|
@@ -7512,8 +7512,8 @@ var Jc = class e {
|
|
|
7512
7512
|
function s(e) {
|
|
7513
7513
|
r.push(0, 0, 0), i.push(0, 0, 0), a[e] === void 0 && (a[e] = []), a[e].push(r.length / 3 - 1);
|
|
7514
7514
|
}
|
|
7515
|
-
t.setAttribute("position", new
|
|
7516
|
-
let c = new
|
|
7515
|
+
t.setAttribute("position", new K(r, 3)), t.setAttribute("color", new K(i, 3)), super(t, n), this.type = "CameraHelper", this.camera = e, this.camera.updateProjectionMatrix && this.camera.updateProjectionMatrix(), this.matrix = e.matrixWorld, this.matrixAutoUpdate = !1, this.pointMap = a, this.update();
|
|
7516
|
+
let c = new H(16755200), l = new H(16711680), u = new H(43775), d = new H(16777215), f = new H(3355443);
|
|
7517
7517
|
this.setColors(c, l, u, d, f);
|
|
7518
7518
|
}
|
|
7519
7519
|
setColors(e, t, n, r, i) {
|
|
@@ -7533,89 +7533,89 @@ var Jc = class e {
|
|
|
7533
7533
|
}
|
|
7534
7534
|
};
|
|
7535
7535
|
function $(e, t, n, r, i, a, o) {
|
|
7536
|
-
|
|
7536
|
+
ol.set(i, a, o).unproject(r);
|
|
7537
7537
|
let s = t[e];
|
|
7538
7538
|
if (s !== void 0) {
|
|
7539
7539
|
let e = n.getAttribute("position");
|
|
7540
|
-
for (let t = 0, n = s.length; t < n; t++) e.setXYZ(s[t],
|
|
7540
|
+
for (let t = 0, n = s.length; t < n; t++) e.setXYZ(s[t], ol.x, ol.y, ol.z);
|
|
7541
7541
|
}
|
|
7542
7542
|
}
|
|
7543
|
-
function
|
|
7544
|
-
let i =
|
|
7543
|
+
function cl(e, t, n, r) {
|
|
7544
|
+
let i = ll(r);
|
|
7545
7545
|
switch (n) {
|
|
7546
|
-
case
|
|
7547
|
-
case
|
|
7548
|
-
case
|
|
7549
|
-
case
|
|
7550
|
-
case
|
|
7551
|
-
case
|
|
7552
|
-
case
|
|
7553
|
-
case
|
|
7554
|
-
case ae:
|
|
7555
|
-
case oe: return Math.floor((e + 3) / 4) * Math.floor((t + 3) / 4) * 8;
|
|
7546
|
+
case T: return e * t;
|
|
7547
|
+
case O: return e * t / i.components * i.byteLength;
|
|
7548
|
+
case ne: return e * t / i.components * i.byteLength;
|
|
7549
|
+
case re: return e * t * 2 / i.components * i.byteLength;
|
|
7550
|
+
case ie: return e * t * 2 / i.components * i.byteLength;
|
|
7551
|
+
case E: return e * t * 3 / i.components * i.byteLength;
|
|
7552
|
+
case D: return e * t * 4 / i.components * i.byteLength;
|
|
7553
|
+
case oe: return e * t * 4 / i.components * i.byteLength;
|
|
7556
7554
|
case se:
|
|
7557
|
-
case ce: return Math.floor((e + 3) / 4) * Math.floor((t + 3) / 4) *
|
|
7558
|
-
case ue:
|
|
7559
|
-
case fe: return Math.max(e, 16) * Math.max(t, 8) / 4;
|
|
7555
|
+
case ce: return Math.floor((e + 3) / 4) * Math.floor((t + 3) / 4) * 8;
|
|
7560
7556
|
case le:
|
|
7561
|
-
case
|
|
7562
|
-
case
|
|
7563
|
-
case me:
|
|
7564
|
-
case
|
|
7565
|
-
case
|
|
7557
|
+
case ue: return Math.floor((e + 3) / 4) * Math.floor((t + 3) / 4) * 16;
|
|
7558
|
+
case fe:
|
|
7559
|
+
case me: return Math.max(e, 16) * Math.max(t, 8) / 4;
|
|
7560
|
+
case de:
|
|
7561
|
+
case pe: return Math.max(e, 8) * Math.max(t, 8) / 2;
|
|
7566
7562
|
case he:
|
|
7563
|
+
case ge:
|
|
7567
7564
|
case ve:
|
|
7568
|
-
case ye: return Math.floor((e + 3) / 4) * Math.floor((t + 3) / 4) *
|
|
7569
|
-
case
|
|
7570
|
-
case
|
|
7571
|
-
case
|
|
7572
|
-
case
|
|
7573
|
-
case
|
|
7574
|
-
case
|
|
7575
|
-
case
|
|
7576
|
-
case
|
|
7577
|
-
case
|
|
7578
|
-
case
|
|
7579
|
-
case
|
|
7580
|
-
case
|
|
7581
|
-
case
|
|
7582
|
-
case
|
|
7583
|
-
case
|
|
7584
|
-
case
|
|
7585
|
-
case
|
|
7565
|
+
case ye: return Math.floor((e + 3) / 4) * Math.floor((t + 3) / 4) * 8;
|
|
7566
|
+
case _e:
|
|
7567
|
+
case be:
|
|
7568
|
+
case xe: return Math.floor((e + 3) / 4) * Math.floor((t + 3) / 4) * 16;
|
|
7569
|
+
case Se: return Math.floor((e + 3) / 4) * Math.floor((t + 3) / 4) * 16;
|
|
7570
|
+
case Ce: return Math.floor((e + 4) / 5) * Math.floor((t + 3) / 4) * 16;
|
|
7571
|
+
case we: return Math.floor((e + 4) / 5) * Math.floor((t + 4) / 5) * 16;
|
|
7572
|
+
case Te: return Math.floor((e + 5) / 6) * Math.floor((t + 4) / 5) * 16;
|
|
7573
|
+
case Ee: return Math.floor((e + 5) / 6) * Math.floor((t + 5) / 6) * 16;
|
|
7574
|
+
case De: return Math.floor((e + 7) / 8) * Math.floor((t + 4) / 5) * 16;
|
|
7575
|
+
case Oe: return Math.floor((e + 7) / 8) * Math.floor((t + 5) / 6) * 16;
|
|
7576
|
+
case ke: return Math.floor((e + 7) / 8) * Math.floor((t + 7) / 8) * 16;
|
|
7577
|
+
case Ae: return Math.floor((e + 9) / 10) * Math.floor((t + 4) / 5) * 16;
|
|
7578
|
+
case je: return Math.floor((e + 9) / 10) * Math.floor((t + 5) / 6) * 16;
|
|
7579
|
+
case Me: return Math.floor((e + 9) / 10) * Math.floor((t + 7) / 8) * 16;
|
|
7580
|
+
case Ne: return Math.floor((e + 9) / 10) * Math.floor((t + 9) / 10) * 16;
|
|
7581
|
+
case Pe: return Math.floor((e + 11) / 12) * Math.floor((t + 9) / 10) * 16;
|
|
7582
|
+
case Fe: return Math.floor((e + 11) / 12) * Math.floor((t + 11) / 12) * 16;
|
|
7583
|
+
case Ie:
|
|
7586
7584
|
case Le:
|
|
7587
|
-
case Re: return Math.ceil(e / 4) * Math.ceil(t / 4) *
|
|
7585
|
+
case Re: return Math.ceil(e / 4) * Math.ceil(t / 4) * 16;
|
|
7588
7586
|
case ze:
|
|
7589
|
-
case Be: return Math.ceil(e / 4) * Math.ceil(t / 4) *
|
|
7587
|
+
case Be: return Math.ceil(e / 4) * Math.ceil(t / 4) * 8;
|
|
7588
|
+
case Ve:
|
|
7589
|
+
case He: return Math.ceil(e / 4) * Math.ceil(t / 4) * 16;
|
|
7590
7590
|
}
|
|
7591
7591
|
throw Error(`Unable to determine texture byte length for ${n} format.`);
|
|
7592
7592
|
}
|
|
7593
|
-
function
|
|
7593
|
+
function ll(e) {
|
|
7594
7594
|
switch (e) {
|
|
7595
|
-
case
|
|
7596
|
-
case
|
|
7595
|
+
case f:
|
|
7596
|
+
case p: return {
|
|
7597
7597
|
byteLength: 1,
|
|
7598
7598
|
components: 1
|
|
7599
7599
|
};
|
|
7600
|
-
case
|
|
7601
|
-
case
|
|
7602
|
-
case
|
|
7600
|
+
case h:
|
|
7601
|
+
case m:
|
|
7602
|
+
case y: return {
|
|
7603
7603
|
byteLength: 2,
|
|
7604
7604
|
components: 1
|
|
7605
7605
|
};
|
|
7606
|
-
case
|
|
7607
|
-
case
|
|
7606
|
+
case b:
|
|
7607
|
+
case x: return {
|
|
7608
7608
|
byteLength: 2,
|
|
7609
7609
|
components: 4
|
|
7610
7610
|
};
|
|
7611
|
-
case
|
|
7612
|
-
case
|
|
7613
|
-
case
|
|
7611
|
+
case _:
|
|
7612
|
+
case g:
|
|
7613
|
+
case v: return {
|
|
7614
7614
|
byteLength: 4,
|
|
7615
7615
|
components: 1
|
|
7616
7616
|
};
|
|
7617
|
-
case
|
|
7618
|
-
case
|
|
7617
|
+
case C:
|
|
7618
|
+
case w: return {
|
|
7619
7619
|
byteLength: 4,
|
|
7620
7620
|
components: 3
|
|
7621
7621
|
};
|
|
@@ -7624,6 +7624,6 @@ function ol(e) {
|
|
|
7624
7624
|
}
|
|
7625
7625
|
typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register", { detail: { revision: "183" } })), typeof window < "u" && (window.__THREE__ ? k("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = "183");
|
|
7626
7626
|
//#endregion
|
|
7627
|
-
export {
|
|
7627
|
+
export { za as $, Ce as $n, Tc as $r, Js as $t, ka as A, Je as Ai, yc as An, gn as Ar, We as At, Pi as B, Tt as Bi, At as Bn, tt as Br, ia as Bt, H as C, Bs as Ci, Is as Cn, ie as Cr, Ki as Ct, Ea as D, qn as Di, hc as Dn, wc as Dr, Os as Dt, ht as E, pt as Ei, ho as En, Jc as Er, Zr as Et, Ba as F, cl as Fi, uo as Fn, ye as Fr, kn as Ft, qs as G, oe as Gn, ts as Gr, ga as Gt, Mr as H, wt as Hi, ze as Hn, fs as Hr, co as Ht, mo as I, cs as Ii, Zt as In, He as Ir, nc as It, Oa as J, je as Jn, Li as Jr, d as Jt, ee as K, Ne as Kn, Xo as Kr, c as Kt, Na as L, _t as Li, Rs as Ln, Be as Lr, Ec as Lt, ao as M, yt as Mi, va as Mn, rt as Mr, ct as Mt, oo as N, vt as Ni, Z as Nn, Et as Nr, nt as Nt, Pa as O, Ye as Oi, Xi as On, O as Or, Ke as Ot, ks as P, A as Pi, lo as Pn, es as Pr, Ns as Pt, ut as Q, Se as Qn, rs as Qr, et as Qt, yn as R, St as Ri, Ls as Rn, xe as Rr, fa as Rt, Pc as S, hn as Si, Xe as Sn, re as Sr, Kc as St, L as T, _n as Ti, bc as Tn, si as Tr, Xr as Tt, at as U, be as Un, is as Ur, Cs as Ut, ec as V, k as Vi, Ve as Vn, $n as Vr, so as Vt, st as W, D as Wn, go as Wr, _a as Wt, Sc as X, Pe as Xn, dn as Xr, l as Xt, t as Y, Me as Yn, Mi as Yr, u as Yt, js as Z, Fe as Zn, Hr as Zr, $e as Zt, dc as _, b as _i, _s as _n, he as _r, $s as _t, Nc as a, R as ai, en as an, ke as ar, Rr as at, Ma as b, F as bi, s as bn, de as br, ot as bt, Ms as c, pr as ci, ci as cn, me as cr, Qn as ct, mr as d, ls as di, ys as dn, le as dr, ra as dt, fo as ei, Dc as en, we as er, Va as et, ja as f, f as fi, Ss as fn, ue as fr, dt as ft, Ws as g, _ as gi, ms as gn, Re as gr, kc as gt, p as h, C as hi, hs as hn, Le as hr, rc as ht, Ha as i, zs as ii, Zc as in, Oe as ir, Zs as it, Da as j, as as ji, Ca as jn, n as jr, Ge as jt, Mc as k, qe as ki, $o as kn, ne as kr, Ue as kt, Ni as l, Ir as li, bs as ln, pe as lr, Ta as lt, Yr as m, S as mi, gs as mn, ae as mr, y as mt, Cc as n, $r as ni, Y as nn, Ee as nr, Dt as nt, e as o, tc as oi, z as on, Ie as or, K as ot, Fr as p, w as pi, vs as pn, E as pr, Gn as pt, te as q, Ae as qn, m as qr, As as qt, Vs as r, lt as ri, Xt as rn, De as rr, Aa as rt, Ze as s, mt as si, bi as sn, _e as sr, v as st, T as t, _c as ti, Ks as tn, Te as tr, On as tt, Ps as u, Lr as ui, xs as un, ce as ur, ea as ut, sl as v, x as vi, i as vn, ge as vr, ln as vt, Fs as w, ft as wi, V as wn, ps as wr, g as wt, r as x, I as xi, o as xn, se as xr, Ri as xt, Ja as y, h as yi, a as yn, fe as yr, it as yt, vn as z, os as zi, ve as zn, Qe as zr, al as zt };
|
|
7628
7628
|
|
|
7629
|
-
//# sourceMappingURL=three.core-
|
|
7629
|
+
//# sourceMappingURL=three.core-mM-jZdgg.mjs.map
|