viral-viewer-2 6.7.1 → 6.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -123,23 +123,23 @@ function Yo(s) {
|
|
|
123
123
|
for (; --e >= 0; )
|
|
124
124
|
s[e] = 0;
|
|
125
125
|
}
|
|
126
|
-
const Tv = 0, _y = 1, Ev = 2, Pv = 3, Cv = 258, Mp = 29,
|
|
126
|
+
const Tv = 0, _y = 1, Ev = 2, Pv = 3, Cv = 258, Mp = 29, dc = 256, Zl = dc + 1 + Mp, Po = 30, Sp = 19, My = 2 * Zl + 1, va = 15, Fu = 16, Rv = 7, Ap = 256, Sy = 16, Ay = 17, Ty = 18, uf = (
|
|
127
127
|
/* extra bits for each length code */
|
|
128
128
|
new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0])
|
|
129
|
-
),
|
|
129
|
+
), jh = (
|
|
130
130
|
/* extra bits for each distance code */
|
|
131
131
|
new Uint8Array([0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13])
|
|
132
132
|
), Iv = (
|
|
133
133
|
/* extra bits for each bit length code */
|
|
134
134
|
new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7])
|
|
135
|
-
), Ey = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Dv = 512, hr = new Array((
|
|
135
|
+
), Ey = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Dv = 512, hr = new Array((Zl + 2) * 2);
|
|
136
136
|
Yo(hr);
|
|
137
|
-
const
|
|
138
|
-
Yo(
|
|
139
|
-
const
|
|
140
|
-
Yo(Zl);
|
|
141
|
-
const jl = new Array(Cv - Pv + 1);
|
|
137
|
+
const kl = new Array(Po * 2);
|
|
138
|
+
Yo(kl);
|
|
139
|
+
const jl = new Array(Dv);
|
|
142
140
|
Yo(jl);
|
|
141
|
+
const Kl = new Array(Cv - Pv + 1);
|
|
142
|
+
Yo(Kl);
|
|
143
143
|
const Tp = new Array(Mp);
|
|
144
144
|
Yo(Tp);
|
|
145
145
|
const ru = new Array(Po);
|
|
@@ -151,10 +151,10 @@ let Py, Cy, Ry;
|
|
|
151
151
|
function Vu(s, e) {
|
|
152
152
|
this.dyn_tree = s, this.max_code = 0, this.stat_desc = e;
|
|
153
153
|
}
|
|
154
|
-
const Iy = (s) => s < 256 ?
|
|
154
|
+
const Iy = (s) => s < 256 ? jl[s] : jl[256 + (s >>> 7)], $l = (s, e) => {
|
|
155
155
|
s.pending_buf[s.pending++] = e & 255, s.pending_buf[s.pending++] = e >>> 8 & 255;
|
|
156
156
|
}, Nn = (s, e, t) => {
|
|
157
|
-
s.bi_valid > Fu - t ? (s.bi_buf |= e << s.bi_valid & 65535,
|
|
157
|
+
s.bi_valid > Fu - t ? (s.bi_buf |= e << s.bi_valid & 65535, $l(s, s.bi_buf), s.bi_buf = e >> Fu - s.bi_valid, s.bi_valid += t - Fu) : (s.bi_buf |= e << s.bi_valid & 65535, s.bi_valid += t);
|
|
158
158
|
}, Ls = (s, e, t) => {
|
|
159
159
|
Nn(
|
|
160
160
|
s,
|
|
@@ -169,7 +169,7 @@ const Iy = (s) => s < 256 ? Zl[s] : Zl[256 + (s >>> 7)], Kl = (s, e) => {
|
|
|
169
169
|
while (--e > 0);
|
|
170
170
|
return t >>> 1;
|
|
171
171
|
}, Lv = (s) => {
|
|
172
|
-
s.bi_valid === 16 ? (
|
|
172
|
+
s.bi_valid === 16 ? ($l(s, s.bi_buf), s.bi_buf = 0, s.bi_valid = 0) : s.bi_valid >= 8 && (s.pending_buf[s.pending++] = s.bi_buf & 255, s.bi_buf >>= 8, s.bi_valid -= 8);
|
|
173
173
|
}, Ov = (s, e) => {
|
|
174
174
|
const t = e.dyn_tree, i = e.max_code, n = e.stat_desc.static_tree, r = e.stat_desc.has_stree, a = e.stat_desc.extra_bits, l = e.stat_desc.extra_base, h = e.stat_desc.max_length;
|
|
175
175
|
let u, f, p, m, x, w, T = 0;
|
|
@@ -201,13 +201,13 @@ const Iy = (s) => s < 256 ? Zl[s] : Zl[256 + (s >>> 7)], Kl = (s, e) => {
|
|
|
201
201
|
const r = new Array(va + 1);
|
|
202
202
|
for (t = 0, i = 0; i < Mp - 1; i++)
|
|
203
203
|
for (Tp[i] = t, s = 0; s < 1 << uf[i]; s++)
|
|
204
|
-
|
|
205
|
-
for (
|
|
206
|
-
for (ru[i] = n, s = 0; s < 1 <<
|
|
207
|
-
|
|
204
|
+
Kl[t++] = i;
|
|
205
|
+
for (Kl[t - 1] = i, n = 0, i = 0; i < 16; i++)
|
|
206
|
+
for (ru[i] = n, s = 0; s < 1 << jh[i]; s++)
|
|
207
|
+
jl[n++] = i;
|
|
208
208
|
for (n >>= 7; i < Po; i++)
|
|
209
|
-
for (ru[i] = n << 7, s = 0; s < 1 <<
|
|
210
|
-
|
|
209
|
+
for (ru[i] = n << 7, s = 0; s < 1 << jh[i] - 7; s++)
|
|
210
|
+
jl[256 + n++] = i;
|
|
211
211
|
for (e = 0; e <= va; e++)
|
|
212
212
|
r[e] = 0;
|
|
213
213
|
for (s = 0; s <= 143; )
|
|
@@ -218,12 +218,12 @@ const Iy = (s) => s < 256 ? Zl[s] : Zl[256 + (s >>> 7)], Kl = (s, e) => {
|
|
|
218
218
|
hr[s * 2 + 1] = 7, s++, r[7]++;
|
|
219
219
|
for (; s <= 287; )
|
|
220
220
|
hr[s * 2 + 1] = 8, s++, r[8]++;
|
|
221
|
-
for (Ly(hr,
|
|
222
|
-
|
|
223
|
-
Py = new ku(hr, uf,
|
|
221
|
+
for (Ly(hr, Zl + 1, r), s = 0; s < Po; s++)
|
|
222
|
+
kl[s * 2 + 1] = 5, kl[s * 2] = Dy(s, 5);
|
|
223
|
+
Py = new ku(hr, uf, dc + 1, Zl, va), Cy = new ku(kl, jh, 0, Po, va), Ry = new ku(new Array(0), Iv, 0, Sp, Rv);
|
|
224
224
|
}, Oy = (s) => {
|
|
225
225
|
let e;
|
|
226
|
-
for (e = 0; e <
|
|
226
|
+
for (e = 0; e < Zl; e++)
|
|
227
227
|
s.dyn_ltree[e * 2] = 0;
|
|
228
228
|
for (e = 0; e < Po; e++)
|
|
229
229
|
s.dyn_dtree[e * 2] = 0;
|
|
@@ -231,7 +231,7 @@ const Iy = (s) => s < 256 ? Zl[s] : Zl[256 + (s >>> 7)], Kl = (s, e) => {
|
|
|
231
231
|
s.bl_tree[e * 2] = 0;
|
|
232
232
|
s.dyn_ltree[Ap * 2] = 1, s.opt_len = s.static_len = 0, s.sym_next = s.matches = 0;
|
|
233
233
|
}, Ny = (s) => {
|
|
234
|
-
s.bi_valid > 8 ?
|
|
234
|
+
s.bi_valid > 8 ? $l(s, s.bi_buf) : s.bi_valid > 0 && (s.pending_buf[s.pending++] = s.bi_buf), s.bi_buf = 0, s.bi_valid = 0;
|
|
235
235
|
}, wm = (s, e, t, i) => {
|
|
236
236
|
const n = e * 2, r = t * 2;
|
|
237
237
|
return s[n] < s[r] || s[n] === s[r] && i[e] <= i[t];
|
|
@@ -245,7 +245,7 @@ const Iy = (s) => s < 256 ? Zl[s] : Zl[256 + (s >>> 7)], Kl = (s, e) => {
|
|
|
245
245
|
let i, n, r = 0, a, l;
|
|
246
246
|
if (s.sym_next !== 0)
|
|
247
247
|
do
|
|
248
|
-
i = s.pending_buf[s.sym_buf + r++] & 255, i += (s.pending_buf[s.sym_buf + r++] & 255) << 8, n = s.pending_buf[s.sym_buf + r++], i === 0 ? Ls(s, n, e) : (a =
|
|
248
|
+
i = s.pending_buf[s.sym_buf + r++] & 255, i += (s.pending_buf[s.sym_buf + r++] & 255) << 8, n = s.pending_buf[s.sym_buf + r++], i === 0 ? Ls(s, n, e) : (a = Kl[n], Ls(s, a + dc + 1, e), l = uf[a], l !== 0 && (n -= Tp[a], Nn(s, n, l)), i--, a = Iy(i), Ls(s, a, t), l = jh[a], l !== 0 && (i -= ru[a], Nn(s, i, l)));
|
|
249
249
|
while (r < s.sym_next);
|
|
250
250
|
Ls(s, Ap, e);
|
|
251
251
|
}, df = (s, e) => {
|
|
@@ -320,7 +320,7 @@ const Iy = (s) => s < 256 ? Zl[s] : Zl[256 + (s >>> 7)], Kl = (s, e) => {
|
|
|
320
320
|
return vm;
|
|
321
321
|
if (s.dyn_ltree[9 * 2] !== 0 || s.dyn_ltree[10 * 2] !== 0 || s.dyn_ltree[13 * 2] !== 0)
|
|
322
322
|
return bm;
|
|
323
|
-
for (t = 32; t <
|
|
323
|
+
for (t = 32; t < dc; t++)
|
|
324
324
|
if (s.dyn_ltree[t * 2] !== 0)
|
|
325
325
|
return bm;
|
|
326
326
|
return vm;
|
|
@@ -329,13 +329,13 @@ let Am = !1;
|
|
|
329
329
|
const Fv = (s) => {
|
|
330
330
|
Am || (Nv(), Am = !0), s.l_desc = new Vu(s.dyn_ltree, Py), s.d_desc = new Vu(s.dyn_dtree, Cy), s.bl_desc = new Vu(s.bl_tree, Ry), s.bi_buf = 0, s.bi_valid = 0, Oy(s);
|
|
331
331
|
}, By = (s, e, t, i) => {
|
|
332
|
-
Nn(s, (Tv << 1) + (i ? 1 : 0), 3), Ny(s),
|
|
332
|
+
Nn(s, (Tv << 1) + (i ? 1 : 0), 3), Ny(s), $l(s, t), $l(s, ~t), t && s.pending_buf.set(s.window.subarray(e, e + t), s.pending), s.pending += t;
|
|
333
333
|
}, kv = (s) => {
|
|
334
334
|
Nn(s, _y << 1, 3), Ls(s, Ap, hr), Lv(s);
|
|
335
335
|
}, Vv = (s, e, t, i) => {
|
|
336
336
|
let n, r, a = 0;
|
|
337
|
-
s.level > 0 ? (s.strm.data_type === Av && (s.strm.data_type = Uv(s)), df(s, s.l_desc), df(s, s.d_desc), a = Bv(s), n = s.opt_len + 3 + 7 >>> 3, r = s.static_len + 3 + 7 >>> 3, r <= n && (n = r)) : n = r = t + 5, t + 4 <= n && e !== -1 ? By(s, e, t, i) : s.strategy === Sv || r === n ? (Nn(s, (_y << 1) + (i ? 1 : 0), 3), _m(s, hr,
|
|
338
|
-
}, Xv = (s, e, t) => (s.pending_buf[s.sym_buf + s.sym_next++] = e, s.pending_buf[s.sym_buf + s.sym_next++] = e >> 8, s.pending_buf[s.sym_buf + s.sym_next++] = t, e === 0 ? s.dyn_ltree[t * 2]++ : (s.matches++, e--, s.dyn_ltree[(
|
|
337
|
+
s.level > 0 ? (s.strm.data_type === Av && (s.strm.data_type = Uv(s)), df(s, s.l_desc), df(s, s.d_desc), a = Bv(s), n = s.opt_len + 3 + 7 >>> 3, r = s.static_len + 3 + 7 >>> 3, r <= n && (n = r)) : n = r = t + 5, t + 4 <= n && e !== -1 ? By(s, e, t, i) : s.strategy === Sv || r === n ? (Nn(s, (_y << 1) + (i ? 1 : 0), 3), _m(s, hr, kl)) : (Nn(s, (Ev << 1) + (i ? 1 : 0), 3), zv(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, a + 1), _m(s, s.dyn_ltree, s.dyn_dtree)), Oy(s), i && Ny(s);
|
|
338
|
+
}, Xv = (s, e, t) => (s.pending_buf[s.sym_buf + s.sym_next++] = e, s.pending_buf[s.sym_buf + s.sym_next++] = e >> 8, s.pending_buf[s.sym_buf + s.sym_next++] = t, e === 0 ? s.dyn_ltree[t * 2]++ : (s.matches++, e--, s.dyn_ltree[(Kl[t] + dc + 1) * 2]++, s.dyn_dtree[Iy(e) * 2]++), s.sym_next === s.sym_end);
|
|
339
339
|
var Hv = Fv, Yv = By, Gv = Vv, Wv = Xv, Qv = kv, qv = {
|
|
340
340
|
_tr_init: Hv,
|
|
341
341
|
_tr_stored_block: Yv,
|
|
@@ -354,7 +354,7 @@ const Zv = (s, e, t, i) => {
|
|
|
354
354
|
}
|
|
355
355
|
return n | r << 16 | 0;
|
|
356
356
|
};
|
|
357
|
-
var
|
|
357
|
+
var Jl = Zv;
|
|
358
358
|
const jv = () => {
|
|
359
359
|
let s, e = [];
|
|
360
360
|
for (var t = 0; t < 256; t++) {
|
|
@@ -390,7 +390,7 @@ var on = $v, Oo = {
|
|
|
390
390
|
/* Z_BUF_ERROR (-5) */
|
|
391
391
|
"-6": "incompatible version"
|
|
392
392
|
/* Z_VERSION_ERROR (-6) */
|
|
393
|
-
},
|
|
393
|
+
}, fc = {
|
|
394
394
|
/* Allowed flush values; see deflate() and inflate() below for details */
|
|
395
395
|
Z_NO_FLUSH: 0,
|
|
396
396
|
Z_PARTIAL_FLUSH: 1,
|
|
@@ -443,13 +443,13 @@ const { _tr_init: Jv, _tr_stored_block: ff, _tr_flush_block: eb, _tr_tally: Hr,
|
|
|
443
443
|
Z_BUF_ERROR: Hu,
|
|
444
444
|
Z_DEFAULT_COMPRESSION: rb,
|
|
445
445
|
Z_FILTERED: ab,
|
|
446
|
-
Z_HUFFMAN_ONLY:
|
|
446
|
+
Z_HUFFMAN_ONLY: Rc,
|
|
447
447
|
Z_RLE: ob,
|
|
448
448
|
Z_FIXED: lb,
|
|
449
449
|
Z_DEFAULT_STRATEGY: cb,
|
|
450
450
|
Z_UNKNOWN: hb,
|
|
451
451
|
Z_DEFLATED: vu
|
|
452
|
-
} =
|
|
452
|
+
} = fc, ub = 9, db = 15, fb = 8, pb = 29, mb = 256, pf = mb + 1 + pb, gb = 30, yb = 19, xb = 2 * pf + 1, vb = 15, ni = 3, kr = 258, Us = kr + ni + 1, bb = 32, No = 42, Ep = 57, mf = 69, gf = 73, yf = 91, xf = 103, ba = 113, Ol = 666, Pn = 1, Go = 2, Sa = 3, Wo = 4, wb = 3, wa = (s, e) => (s.msg = Oo[e], e), Pm = (s) => s * 2 - (s > 4 ? 9 : 0), Ur = (s) => {
|
|
453
453
|
let e = s.length;
|
|
454
454
|
for (; --e >= 0; )
|
|
455
455
|
s[e] = 0;
|
|
@@ -477,7 +477,7 @@ const Qn = (s) => {
|
|
|
477
477
|
s.pending_buf[s.pending++] = e >>> 8 & 255, s.pending_buf[s.pending++] = e & 255;
|
|
478
478
|
}, vf = (s, e, t, i) => {
|
|
479
479
|
let n = s.avail_in;
|
|
480
|
-
return n > i && (n = i), n === 0 ? 0 : (s.avail_in -= n, e.set(s.input.subarray(s.next_in, s.next_in + n), t), s.state.wrap === 1 ? s.adler =
|
|
480
|
+
return n > i && (n = i), n === 0 ? 0 : (s.avail_in -= n, e.set(s.input.subarray(s.next_in, s.next_in + n), t), s.state.wrap === 1 ? s.adler = Jl(s.adler, e, n, t) : s.state.wrap === 2 && (s.adler = on(s.adler, e, n, t)), s.next_in += n, s.total_in += n, n);
|
|
481
481
|
}, zy = (s, e) => {
|
|
482
482
|
let t = s.max_chain_length, i = s.strstart, n, r, a = s.prev_length, l = s.nice_match;
|
|
483
483
|
const h = s.strstart > s.w_size - Us ? s.strstart - (s.w_size - Us) : 0, u = s.window, f = s.w_mask, p = s.prev, m = s.strstart + kr;
|
|
@@ -627,7 +627,7 @@ const Nl = [
|
|
|
627
627
|
function Eb() {
|
|
628
628
|
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = vu, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new Uint16Array(xb * 2), this.dyn_dtree = new Uint16Array((2 * gb + 1) * 2), this.bl_tree = new Uint16Array((2 * yb + 1) * 2), Ur(this.dyn_ltree), Ur(this.dyn_dtree), Ur(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(vb + 1), this.heap = new Uint16Array(2 * pf + 1), Ur(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(2 * pf + 1), Ur(this.depth), this.sym_buf = 0, this.lit_bufsize = 0, this.sym_next = 0, this.sym_end = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
629
629
|
}
|
|
630
|
-
const
|
|
630
|
+
const pc = (s) => {
|
|
631
631
|
if (!s)
|
|
632
632
|
return 1;
|
|
633
633
|
const e = s.state;
|
|
@@ -635,7 +635,7 @@ const fc = (s) => {
|
|
|
635
635
|
e.status !== Ep && //#endif
|
|
636
636
|
e.status !== mf && e.status !== gf && e.status !== yf && e.status !== xf && e.status !== ba && e.status !== Ol ? 1 : 0;
|
|
637
637
|
}, Fy = (s) => {
|
|
638
|
-
if (
|
|
638
|
+
if (pc(s))
|
|
639
639
|
return wa(s, zs);
|
|
640
640
|
s.total_in = s.total_out = 0, s.data_type = hb;
|
|
641
641
|
const e = s.state;
|
|
@@ -647,7 +647,7 @@ const fc = (s) => {
|
|
|
647
647
|
}, ky = (s) => {
|
|
648
648
|
const e = Fy(s);
|
|
649
649
|
return e === dn && Tb(s.state), e;
|
|
650
|
-
}, Pb = (s, e) =>
|
|
650
|
+
}, Pb = (s, e) => pc(s) || s.state.wrap !== 2 ? zs : (s.state.gzhead = e, dn), Vy = (s, e, t, i, n, r) => {
|
|
651
651
|
if (!s)
|
|
652
652
|
return zs;
|
|
653
653
|
let a = 1;
|
|
@@ -657,7 +657,7 @@ const fc = (s) => {
|
|
|
657
657
|
const l = new Eb();
|
|
658
658
|
return s.state = l, l.strm = s, l.status = No, l.wrap = a, l.gzhead = null, l.w_bits = i, l.w_size = 1 << l.w_bits, l.w_mask = l.w_size - 1, l.hash_bits = n + 7, l.hash_size = 1 << l.hash_bits, l.hash_mask = l.hash_size - 1, l.hash_shift = ~~((l.hash_bits + ni - 1) / ni), l.window = new Uint8Array(l.w_size * 2), l.head = new Uint16Array(l.hash_size), l.prev = new Uint16Array(l.w_size), l.lit_bufsize = 1 << n + 6, l.pending_buf_size = l.lit_bufsize * 4, l.pending_buf = new Uint8Array(l.pending_buf_size), l.sym_buf = l.lit_bufsize, l.sym_end = (l.lit_bufsize - 1) * 3, l.level = e, l.strategy = r, l.method = t, ky(s);
|
|
659
659
|
}, Cb = (s, e) => Vy(s, e, vu, db, fb, cb), Rb = (s, e) => {
|
|
660
|
-
if (
|
|
660
|
+
if (pc(s) || e > Tm || e < 0)
|
|
661
661
|
return s ? wa(s, zs) : zs;
|
|
662
662
|
const t = s.state;
|
|
663
663
|
if (!s.output || s.avail_in !== 0 && !s.input || t.status === Ol && e !== ss)
|
|
@@ -672,7 +672,7 @@ const fc = (s) => {
|
|
|
672
672
|
return wa(s, Hu);
|
|
673
673
|
if (t.status === No && t.wrap === 0 && (t.status = ba), t.status === No) {
|
|
674
674
|
let n = vu + (t.w_bits - 8 << 4) << 8, r = -1;
|
|
675
|
-
if (t.strategy >=
|
|
675
|
+
if (t.strategy >= Rc || t.level < 2 ? r = 0 : t.level < 6 ? r = 1 : t.level === 6 ? r = 2 : r = 3, n |= r << 6, t.strstart !== 0 && (n |= bb), n += 31 - n % 31, ol(t, n), t.strstart !== 0 && (ol(t, s.adler >>> 16), ol(t, s.adler & 65535)), s.adler = 1, t.status = ba, Qn(s), t.pending !== 0)
|
|
676
676
|
return t.last_flush = -1, dn;
|
|
677
677
|
}
|
|
678
678
|
if (t.status === Ep) {
|
|
@@ -680,8 +680,8 @@ const fc = (s) => {
|
|
|
680
680
|
fi(
|
|
681
681
|
t,
|
|
682
682
|
(t.gzhead.text ? 1 : 0) + (t.gzhead.hcrc ? 2 : 0) + (t.gzhead.extra ? 4 : 0) + (t.gzhead.name ? 8 : 0) + (t.gzhead.comment ? 16 : 0)
|
|
683
|
-
), fi(t, t.gzhead.time & 255), fi(t, t.gzhead.time >> 8 & 255), fi(t, t.gzhead.time >> 16 & 255), fi(t, t.gzhead.time >> 24 & 255), fi(t, t.level === 9 ? 2 : t.strategy >=
|
|
684
|
-
else if (fi(t, 0), fi(t, 0), fi(t, 0), fi(t, 0), fi(t, 0), fi(t, t.level === 9 ? 2 : t.strategy >=
|
|
683
|
+
), fi(t, t.gzhead.time & 255), fi(t, t.gzhead.time >> 8 & 255), fi(t, t.gzhead.time >> 16 & 255), fi(t, t.gzhead.time >> 24 & 255), fi(t, t.level === 9 ? 2 : t.strategy >= Rc || t.level < 2 ? 4 : 0), fi(t, t.gzhead.os & 255), t.gzhead.extra && t.gzhead.extra.length && (fi(t, t.gzhead.extra.length & 255), fi(t, t.gzhead.extra.length >> 8 & 255)), t.gzhead.hcrc && (s.adler = on(s.adler, t.pending_buf, t.pending, 0)), t.gzindex = 0, t.status = mf;
|
|
684
|
+
else if (fi(t, 0), fi(t, 0), fi(t, 0), fi(t, 0), fi(t, 0), fi(t, t.level === 9 ? 2 : t.strategy >= Rc || t.level < 2 ? 4 : 0), fi(t, wb), t.status = ba, Qn(s), t.pending !== 0)
|
|
685
685
|
return t.last_flush = -1, dn;
|
|
686
686
|
}
|
|
687
687
|
if (t.status === mf) {
|
|
@@ -738,7 +738,7 @@ const fc = (s) => {
|
|
|
738
738
|
return t.last_flush = -1, dn;
|
|
739
739
|
}
|
|
740
740
|
if (s.avail_in !== 0 || t.lookahead !== 0 || e !== Yr && t.status !== Ol) {
|
|
741
|
-
let n = t.level === 0 ? Uy(t, e) : t.strategy ===
|
|
741
|
+
let n = t.level === 0 ? Uy(t, e) : t.strategy === Rc ? Ab(t, e) : t.strategy === ob ? Sb(t, e) : Nl[t.level].func(t, e);
|
|
742
742
|
if ((n === Sa || n === Wo) && (t.status = Ol), n === Pn || n === Sa)
|
|
743
743
|
return s.avail_out === 0 && (t.last_flush = -1), dn;
|
|
744
744
|
if (n === Go && (e === ib ? tb(t) : e !== Tm && (ff(t, 0, 0, !1), e === nb && (Ur(t.head), t.lookahead === 0 && (t.strstart = 0, t.block_start = 0, t.insert = 0))), Qn(s), s.avail_out === 0))
|
|
@@ -746,18 +746,18 @@ const fc = (s) => {
|
|
|
746
746
|
}
|
|
747
747
|
return e !== ss ? dn : t.wrap <= 0 ? Em : (t.wrap === 2 ? (fi(t, s.adler & 255), fi(t, s.adler >> 8 & 255), fi(t, s.adler >> 16 & 255), fi(t, s.adler >> 24 & 255), fi(t, s.total_in & 255), fi(t, s.total_in >> 8 & 255), fi(t, s.total_in >> 16 & 255), fi(t, s.total_in >> 24 & 255)) : (ol(t, s.adler >>> 16), ol(t, s.adler & 65535)), Qn(s), t.wrap > 0 && (t.wrap = -t.wrap), t.pending !== 0 ? dn : Em);
|
|
748
748
|
}, Ib = (s) => {
|
|
749
|
-
if (
|
|
749
|
+
if (pc(s))
|
|
750
750
|
return zs;
|
|
751
751
|
const e = s.state.status;
|
|
752
752
|
return s.state = null, e === ba ? wa(s, sb) : dn;
|
|
753
753
|
}, Db = (s, e) => {
|
|
754
754
|
let t = e.length;
|
|
755
|
-
if (
|
|
755
|
+
if (pc(s))
|
|
756
756
|
return zs;
|
|
757
757
|
const i = s.state, n = i.wrap;
|
|
758
758
|
if (n === 2 || n === 1 && i.status !== No || i.lookahead)
|
|
759
759
|
return zs;
|
|
760
|
-
if (n === 1 && (s.adler =
|
|
760
|
+
if (n === 1 && (s.adler = Jl(s.adler, e, t, 0)), i.wrap = 0, t >= i.w_size) {
|
|
761
761
|
n === 0 && (Ur(i.head), i.strstart = 0, i.block_start = 0, i.insert = 0);
|
|
762
762
|
let h = new Uint8Array(i.w_size);
|
|
763
763
|
h.set(e.subarray(t - i.w_size, t), 0), e = h, t = i.w_size;
|
|
@@ -772,7 +772,7 @@ const fc = (s) => {
|
|
|
772
772
|
}
|
|
773
773
|
return i.strstart += i.lookahead, i.block_start = i.strstart, i.insert = i.lookahead, i.lookahead = 0, i.match_length = i.prev_length = ni - 1, i.match_available = 0, s.next_in = a, s.input = l, s.avail_in = r, i.wrap = n, dn;
|
|
774
774
|
};
|
|
775
|
-
var Lb = Cb, Ob = Vy, Nb = ky, Bb = Fy, zb = Pb, Ub = Rb, Fb = Ib, kb = Db, Vb = "pako deflate (from Nodeca project)",
|
|
775
|
+
var Lb = Cb, Ob = Vy, Nb = ky, Bb = Fy, zb = Pb, Ub = Rb, Fb = Ib, kb = Db, Vb = "pako deflate (from Nodeca project)", Vl = {
|
|
776
776
|
deflateInit: Lb,
|
|
777
777
|
deflateInit2: Ob,
|
|
778
778
|
deflateReset: Nb,
|
|
@@ -816,10 +816,10 @@ try {
|
|
|
816
816
|
} catch {
|
|
817
817
|
Xy = !1;
|
|
818
818
|
}
|
|
819
|
-
const
|
|
819
|
+
const ec = new Uint8Array(256);
|
|
820
820
|
for (let s = 0; s < 256; s++)
|
|
821
|
-
|
|
822
|
-
|
|
821
|
+
ec[s] = s >= 252 ? 6 : s >= 248 ? 5 : s >= 240 ? 4 : s >= 224 ? 3 : s >= 192 ? 2 : 1;
|
|
822
|
+
ec[254] = ec[254] = 1;
|
|
823
823
|
var Gb = (s) => {
|
|
824
824
|
if (typeof TextEncoder == "function" && TextEncoder.prototype.encode)
|
|
825
825
|
return new TextEncoder().encode(s);
|
|
@@ -850,7 +850,7 @@ var Qb = (s, e) => {
|
|
|
850
850
|
r[n++] = a;
|
|
851
851
|
continue;
|
|
852
852
|
}
|
|
853
|
-
let l =
|
|
853
|
+
let l = ec[a];
|
|
854
854
|
if (l > 4) {
|
|
855
855
|
r[n++] = 65533, i += l - 1;
|
|
856
856
|
continue;
|
|
@@ -869,8 +869,8 @@ var Qb = (s, e) => {
|
|
|
869
869
|
let t = e - 1;
|
|
870
870
|
for (; t >= 0 && (s[t] & 192) === 128; )
|
|
871
871
|
t--;
|
|
872
|
-
return t < 0 || t === 0 ? e : t +
|
|
873
|
-
},
|
|
872
|
+
return t < 0 || t === 0 ? e : t + ec[s[t]] > e ? t : e;
|
|
873
|
+
}, tc = {
|
|
874
874
|
string2buf: Gb,
|
|
875
875
|
buf2string: Qb,
|
|
876
876
|
utf8border: qb
|
|
@@ -889,7 +889,7 @@ const Yy = Object.prototype.toString, {
|
|
|
889
889
|
Z_DEFAULT_COMPRESSION: t1,
|
|
890
890
|
Z_DEFAULT_STRATEGY: i1,
|
|
891
891
|
Z_DEFLATED: n1
|
|
892
|
-
} =
|
|
892
|
+
} = fc;
|
|
893
893
|
function Pp(s) {
|
|
894
894
|
this.options = bu.assign({
|
|
895
895
|
level: t1,
|
|
@@ -901,7 +901,7 @@ function Pp(s) {
|
|
|
901
901
|
}, s || {});
|
|
902
902
|
let e = this.options;
|
|
903
903
|
e.raw && e.windowBits > 0 ? e.windowBits = -e.windowBits : e.gzip && e.windowBits > 0 && e.windowBits < 16 && (e.windowBits += 16), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new Hy(), this.strm.avail_out = 0;
|
|
904
|
-
let t =
|
|
904
|
+
let t = Vl.deflateInit2(
|
|
905
905
|
this.strm,
|
|
906
906
|
e.level,
|
|
907
907
|
e.method,
|
|
@@ -911,9 +911,9 @@ function Pp(s) {
|
|
|
911
911
|
);
|
|
912
912
|
if (t !== au)
|
|
913
913
|
throw new Error(Oo[t]);
|
|
914
|
-
if (e.header &&
|
|
914
|
+
if (e.header && Vl.deflateSetHeader(this.strm, e.header), e.dictionary) {
|
|
915
915
|
let i;
|
|
916
|
-
if (typeof e.dictionary == "string" ? i =
|
|
916
|
+
if (typeof e.dictionary == "string" ? i = tc.string2buf(e.dictionary) : Yy.call(e.dictionary) === "[object ArrayBuffer]" ? i = new Uint8Array(e.dictionary) : i = e.dictionary, t = Vl.deflateSetDictionary(this.strm, i), t !== au)
|
|
917
917
|
throw new Error(Oo[t]);
|
|
918
918
|
this._dict_set = !0;
|
|
919
919
|
}
|
|
@@ -923,13 +923,13 @@ Pp.prototype.push = function(s, e) {
|
|
|
923
923
|
let n, r;
|
|
924
924
|
if (this.ended)
|
|
925
925
|
return !1;
|
|
926
|
-
for (e === ~~e ? r = e : r = e === !0 ? Jb : jb, typeof s == "string" ? t.input =
|
|
926
|
+
for (e === ~~e ? r = e : r = e === !0 ? Jb : jb, typeof s == "string" ? t.input = tc.string2buf(s) : Yy.call(s) === "[object ArrayBuffer]" ? t.input = new Uint8Array(s) : t.input = s, t.next_in = 0, t.avail_in = t.input.length; ; ) {
|
|
927
927
|
if (t.avail_out === 0 && (t.output = new Uint8Array(i), t.next_out = 0, t.avail_out = i), (r === Kb || r === $b) && t.avail_out <= 6) {
|
|
928
928
|
this.onData(t.output.subarray(0, t.next_out)), t.avail_out = 0;
|
|
929
929
|
continue;
|
|
930
930
|
}
|
|
931
|
-
if (n =
|
|
932
|
-
return t.next_out > 0 && this.onData(t.output.subarray(0, t.next_out)), n =
|
|
931
|
+
if (n = Vl.deflate(t, r), n === e1)
|
|
932
|
+
return t.next_out > 0 && this.onData(t.output.subarray(0, t.next_out)), n = Vl.deflateEnd(this.strm), this.onEnd(n), this.ended = !0, n === au;
|
|
933
933
|
if (t.avail_out === 0) {
|
|
934
934
|
this.onData(t.output);
|
|
935
935
|
continue;
|
|
@@ -949,7 +949,7 @@ Pp.prototype.onData = function(s) {
|
|
|
949
949
|
Pp.prototype.onEnd = function(s) {
|
|
950
950
|
s === au && (this.result = bu.flattenChunks(this.chunks)), this.chunks = [], this.err = s, this.msg = this.strm.msg;
|
|
951
951
|
};
|
|
952
|
-
const
|
|
952
|
+
const Ic = 16209, s1 = 16191;
|
|
953
953
|
var r1 = function(e, t) {
|
|
954
954
|
let i, n, r, a, l, h, u, f, p, m, x, w, T, _, b, P, E, S, z, F, k, H, U, O;
|
|
955
955
|
const V = e.state;
|
|
@@ -967,12 +967,12 @@ var r1 = function(e, t) {
|
|
|
967
967
|
for (; ; ) {
|
|
968
968
|
if (S = E >>> 24, x >>>= S, w -= S, S = E >>> 16 & 255, S & 16) {
|
|
969
969
|
if (F = E & 65535, S &= 15, w < S && (x += U[i++] << w, w += 8, w < S && (x += U[i++] << w, w += 8)), F += x & (1 << S) - 1, F > h) {
|
|
970
|
-
e.msg = "invalid distance too far back", V.mode =
|
|
970
|
+
e.msg = "invalid distance too far back", V.mode = Ic;
|
|
971
971
|
break e;
|
|
972
972
|
}
|
|
973
973
|
if (x >>>= S, w -= S, S = r - a, F > S) {
|
|
974
974
|
if (S = F - S, S > f && V.sane) {
|
|
975
|
-
e.msg = "invalid distance too far back", V.mode =
|
|
975
|
+
e.msg = "invalid distance too far back", V.mode = Ic;
|
|
976
976
|
break e;
|
|
977
977
|
}
|
|
978
978
|
if (k = 0, H = m, p === 0) {
|
|
@@ -1015,7 +1015,7 @@ var r1 = function(e, t) {
|
|
|
1015
1015
|
z && (O[r++] = O[k++], z > 1 && (O[r++] = O[k++]));
|
|
1016
1016
|
}
|
|
1017
1017
|
} else if (S & 64) {
|
|
1018
|
-
e.msg = "invalid distance code", V.mode =
|
|
1018
|
+
e.msg = "invalid distance code", V.mode = Ic;
|
|
1019
1019
|
break e;
|
|
1020
1020
|
} else {
|
|
1021
1021
|
E = _[(E & 65535) + (x & (1 << S) - 1)];
|
|
@@ -1028,7 +1028,7 @@ var r1 = function(e, t) {
|
|
|
1028
1028
|
V.mode = s1;
|
|
1029
1029
|
break e;
|
|
1030
1030
|
} else {
|
|
1031
|
-
e.msg = "invalid literal/length code", V.mode =
|
|
1031
|
+
e.msg = "invalid literal/length code", V.mode = Ic;
|
|
1032
1032
|
break e;
|
|
1033
1033
|
}
|
|
1034
1034
|
else {
|
|
@@ -1222,11 +1222,11 @@ const Ba = 15, Cm = 852, Rm = 592, Im = 0, Gu = 1, Dm = 2, a1 = new Uint16Array(
|
|
|
1222
1222
|
}
|
|
1223
1223
|
return P !== 0 && (n[k + P] = u - T << 24 | 64 << 16 | 0), l.bits = x, 0;
|
|
1224
1224
|
};
|
|
1225
|
-
var
|
|
1225
|
+
var Xl = h1;
|
|
1226
1226
|
const u1 = 0, Gy = 1, Wy = 2, {
|
|
1227
1227
|
Z_FINISH: Lm,
|
|
1228
1228
|
Z_BLOCK: d1,
|
|
1229
|
-
Z_TREES:
|
|
1229
|
+
Z_TREES: Dc,
|
|
1230
1230
|
Z_OK: Aa,
|
|
1231
1231
|
Z_STREAM_END: f1,
|
|
1232
1232
|
Z_NEED_DICT: p1,
|
|
@@ -1235,7 +1235,7 @@ const u1 = 0, Gy = 1, Wy = 2, {
|
|
|
1235
1235
|
Z_MEM_ERROR: qy,
|
|
1236
1236
|
Z_BUF_ERROR: m1,
|
|
1237
1237
|
Z_DEFLATED: Om
|
|
1238
|
-
} =
|
|
1238
|
+
} = fc, wu = 16180, Nm = 16181, Bm = 16182, zm = 16183, Um = 16184, Fm = 16185, km = 16186, Vm = 16187, Xm = 16188, Hm = 16189, ou = 16190, er = 16191, Wu = 16192, Ym = 16193, Qu = 16194, Gm = 16195, Wm = 16196, Qm = 16197, qm = 16198, Lc = 16199, Oc = 16200, Zm = 16201, jm = 16202, Km = 16203, $m = 16204, Jm = 16205, qu = 16206, eg = 16207, tg = 16208, Oi = 16209, Zy = 16210, jy = 16211, g1 = 852, y1 = 592, x1 = 15, v1 = x1, ig = (s) => (s >>> 24 & 255) + (s >>> 8 & 65280) + ((s & 65280) << 8) + ((s & 255) << 24);
|
|
1239
1239
|
function b1() {
|
|
1240
1240
|
this.strm = null, this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new Uint16Array(320), this.work = new Uint16Array(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
1241
1241
|
}
|
|
@@ -1281,9 +1281,9 @@ const _1 = (s) => {
|
|
|
1281
1281
|
s.lens[e++] = 7;
|
|
1282
1282
|
for (; e < 288; )
|
|
1283
1283
|
s.lens[e++] = 8;
|
|
1284
|
-
for (
|
|
1284
|
+
for (Xl(Gy, s.lens, 0, 288, Zu, 0, s.work, { bits: 9 }), e = 0; e < 32; )
|
|
1285
1285
|
s.lens[e++] = 5;
|
|
1286
|
-
|
|
1286
|
+
Xl(Wy, s.lens, 0, 32, ju, 0, s.work, { bits: 5 }), ng = !1;
|
|
1287
1287
|
}
|
|
1288
1288
|
s.lencode = Zu, s.lenbits = 9, s.distcode = ju, s.distbits = 5;
|
|
1289
1289
|
}, tx = (s, e, t, i) => {
|
|
@@ -1439,7 +1439,7 @@ const _1 = (s) => {
|
|
|
1439
1439
|
return s.next_out = a, s.avail_out = h, s.next_in = r, s.avail_in = l, t.hold = u, t.bits = f, p1;
|
|
1440
1440
|
s.adler = t.check = 1, t.mode = er;
|
|
1441
1441
|
case er:
|
|
1442
|
-
if (e === d1 || e ===
|
|
1442
|
+
if (e === d1 || e === Dc)
|
|
1443
1443
|
break e;
|
|
1444
1444
|
case Wu:
|
|
1445
1445
|
if (t.last) {
|
|
@@ -1456,7 +1456,7 @@ const _1 = (s) => {
|
|
|
1456
1456
|
t.mode = Ym;
|
|
1457
1457
|
break;
|
|
1458
1458
|
case 1:
|
|
1459
|
-
if (_1(t), t.mode =
|
|
1459
|
+
if (_1(t), t.mode = Lc, e === Dc) {
|
|
1460
1460
|
u >>>= 2, f -= 2;
|
|
1461
1461
|
break e;
|
|
1462
1462
|
}
|
|
@@ -1479,7 +1479,7 @@ const _1 = (s) => {
|
|
|
1479
1479
|
s.msg = "invalid stored block lengths", t.mode = Oi;
|
|
1480
1480
|
break;
|
|
1481
1481
|
}
|
|
1482
|
-
if (t.length = u & 65535, u = 0, f = 0, t.mode = Qu, e ===
|
|
1482
|
+
if (t.length = u & 65535, u = 0, f = 0, t.mode = Qu, e === Dc)
|
|
1483
1483
|
break e;
|
|
1484
1484
|
case Qu:
|
|
1485
1485
|
t.mode = Gm;
|
|
@@ -1514,7 +1514,7 @@ const _1 = (s) => {
|
|
|
1514
1514
|
}
|
|
1515
1515
|
for (; t.have < 19; )
|
|
1516
1516
|
t.lens[$[t.have++]] = 0;
|
|
1517
|
-
if (t.lencode = t.lendyn, t.lenbits = 7, O = { bits: t.lenbits }, H =
|
|
1517
|
+
if (t.lencode = t.lendyn, t.lenbits = 7, O = { bits: t.lenbits }, H = Xl(u1, t.lens, 0, 19, t.lencode, 0, t.work, O), t.lenbits = O.bits, H) {
|
|
1518
1518
|
s.msg = "invalid code lengths set", t.mode = Oi;
|
|
1519
1519
|
break;
|
|
1520
1520
|
}
|
|
@@ -1569,19 +1569,19 @@ const _1 = (s) => {
|
|
|
1569
1569
|
s.msg = "invalid code -- missing end-of-block", t.mode = Oi;
|
|
1570
1570
|
break;
|
|
1571
1571
|
}
|
|
1572
|
-
if (t.lenbits = 9, O = { bits: t.lenbits }, H =
|
|
1572
|
+
if (t.lenbits = 9, O = { bits: t.lenbits }, H = Xl(Gy, t.lens, 0, t.nlen, t.lencode, 0, t.work, O), t.lenbits = O.bits, H) {
|
|
1573
1573
|
s.msg = "invalid literal/lengths set", t.mode = Oi;
|
|
1574
1574
|
break;
|
|
1575
1575
|
}
|
|
1576
|
-
if (t.distbits = 6, t.distcode = t.distdyn, O = { bits: t.distbits }, H =
|
|
1576
|
+
if (t.distbits = 6, t.distcode = t.distdyn, O = { bits: t.distbits }, H = Xl(Wy, t.lens, t.nlen, t.ndist, t.distcode, 0, t.work, O), t.distbits = O.bits, H) {
|
|
1577
1577
|
s.msg = "invalid distances set", t.mode = Oi;
|
|
1578
1578
|
break;
|
|
1579
1579
|
}
|
|
1580
|
-
if (t.mode =
|
|
1580
|
+
if (t.mode = Lc, e === Dc)
|
|
1581
1581
|
break e;
|
|
1582
|
-
case Dc:
|
|
1583
|
-
t.mode = Lc;
|
|
1584
1582
|
case Lc:
|
|
1583
|
+
t.mode = Oc;
|
|
1584
|
+
case Oc:
|
|
1585
1585
|
if (l >= 6 && h >= 258) {
|
|
1586
1586
|
s.next_out = a, s.avail_out = h, s.next_in = r, s.avail_in = l, t.hold = u, t.bits = f, r1(s, m), a = s.next_out, n = s.output, h = s.avail_out, r = s.next_in, i = s.input, l = s.avail_in, u = t.hold, f = t.bits, t.mode === er && (t.back = -1);
|
|
1587
1587
|
break;
|
|
@@ -1670,12 +1670,12 @@ const _1 = (s) => {
|
|
|
1670
1670
|
do
|
|
1671
1671
|
n[a++] = T[w++];
|
|
1672
1672
|
while (--x);
|
|
1673
|
-
t.length === 0 && (t.mode =
|
|
1673
|
+
t.length === 0 && (t.mode = Oc);
|
|
1674
1674
|
break;
|
|
1675
1675
|
case Jm:
|
|
1676
1676
|
if (h === 0)
|
|
1677
1677
|
break e;
|
|
1678
|
-
n[a++] = t.length, h--, t.mode =
|
|
1678
|
+
n[a++] = t.length, h--, t.mode = Oc;
|
|
1679
1679
|
break;
|
|
1680
1680
|
case qu:
|
|
1681
1681
|
if (t.wrap) {
|
|
@@ -1685,7 +1685,7 @@ const _1 = (s) => {
|
|
|
1685
1685
|
l--, u |= i[r++] << f, f += 8;
|
|
1686
1686
|
}
|
|
1687
1687
|
if (m -= h, s.total_out += m, t.total += m, t.wrap & 4 && m && (s.adler = t.check = /*UPDATE_CHECK(state.check, put - _out, _out);*/
|
|
1688
|
-
t.flags ? on(t.check, n, m, a - m) :
|
|
1688
|
+
t.flags ? on(t.check, n, m, a - m) : Jl(t.check, n, m, a - m)), m = h, t.wrap & 4 && (t.flags ? u : ig(u)) !== t.check) {
|
|
1689
1689
|
s.msg = "incorrect data check", t.mode = Oi;
|
|
1690
1690
|
break;
|
|
1691
1691
|
}
|
|
@@ -1719,7 +1719,7 @@ const _1 = (s) => {
|
|
|
1719
1719
|
return as;
|
|
1720
1720
|
}
|
|
1721
1721
|
return s.next_out = a, s.avail_out = h, s.next_in = r, s.avail_in = l, t.hold = u, t.bits = f, (t.wsize || m !== s.avail_out && t.mode < Oi && (t.mode < qu || e !== Lm)) && tx(s, s.output, s.next_out, m - s.avail_out), p -= s.avail_in, m -= s.avail_out, s.total_in += p, s.total_out += m, t.total += m, t.wrap & 4 && m && (s.adler = t.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
|
|
1722
|
-
t.flags ? on(t.check, n, m, s.next_out - m) :
|
|
1722
|
+
t.flags ? on(t.check, n, m, s.next_out - m) : Jl(t.check, n, m, s.next_out - m)), s.data_type = t.bits + (t.last ? 64 : 0) + (t.mode === er ? 128 : 0) + (t.mode === Lc || t.mode === Qu ? 256 : 0), (p === 0 && m === 0 || e === Lm) && H === Aa && (H = m1), H;
|
|
1723
1723
|
}, S1 = (s) => {
|
|
1724
1724
|
if (Ia(s))
|
|
1725
1725
|
return as;
|
|
@@ -1733,7 +1733,7 @@ const _1 = (s) => {
|
|
|
1733
1733
|
}, T1 = (s, e) => {
|
|
1734
1734
|
const t = e.length;
|
|
1735
1735
|
let i, n, r;
|
|
1736
|
-
return Ia(s) || (i = s.state, i.wrap !== 0 && i.mode !== ou) ? as : i.mode === ou && (n = 1, n =
|
|
1736
|
+
return Ia(s) || (i = s.state, i.wrap !== 0 && i.mode !== ou) ? as : i.mode === ou && (n = 1, n = Jl(n, e, t, 0), n !== i.check) ? Qy : (r = tx(s, e, t, t), r ? (i.mode = Zy, qy) : (i.havedict = 1, Aa));
|
|
1737
1737
|
};
|
|
1738
1738
|
var E1 = $y, P1 = Jy, C1 = Ky, R1 = w1, I1 = ex, D1 = M1, L1 = S1, O1 = A1, N1 = T1, B1 = "pako inflate (from Nodeca project)", ur = {
|
|
1739
1739
|
inflateReset: E1,
|
|
@@ -1754,14 +1754,14 @@ var U1 = z1;
|
|
|
1754
1754
|
const ix = Object.prototype.toString, {
|
|
1755
1755
|
Z_NO_FLUSH: F1,
|
|
1756
1756
|
Z_FINISH: k1,
|
|
1757
|
-
Z_OK:
|
|
1757
|
+
Z_OK: ic,
|
|
1758
1758
|
Z_STREAM_END: Ku,
|
|
1759
1759
|
Z_NEED_DICT: $u,
|
|
1760
1760
|
Z_STREAM_ERROR: V1,
|
|
1761
1761
|
Z_DATA_ERROR: sg,
|
|
1762
1762
|
Z_MEM_ERROR: X1
|
|
1763
|
-
} =
|
|
1764
|
-
function
|
|
1763
|
+
} = fc;
|
|
1764
|
+
function mc(s) {
|
|
1765
1765
|
this.options = bu.assign({
|
|
1766
1766
|
chunkSize: 1024 * 64,
|
|
1767
1767
|
windowBits: 15,
|
|
@@ -1773,18 +1773,18 @@ function pc(s) {
|
|
|
1773
1773
|
this.strm,
|
|
1774
1774
|
e.windowBits
|
|
1775
1775
|
);
|
|
1776
|
-
if (t !==
|
|
1776
|
+
if (t !== ic)
|
|
1777
1777
|
throw new Error(Oo[t]);
|
|
1778
|
-
if (this.header = new U1(), ur.inflateGetHeader(this.strm, this.header), e.dictionary && (typeof e.dictionary == "string" ? e.dictionary =
|
|
1778
|
+
if (this.header = new U1(), ur.inflateGetHeader(this.strm, this.header), e.dictionary && (typeof e.dictionary == "string" ? e.dictionary = tc.string2buf(e.dictionary) : ix.call(e.dictionary) === "[object ArrayBuffer]" && (e.dictionary = new Uint8Array(e.dictionary)), e.raw && (t = ur.inflateSetDictionary(this.strm, e.dictionary), t !== ic)))
|
|
1779
1779
|
throw new Error(Oo[t]);
|
|
1780
1780
|
}
|
|
1781
|
-
|
|
1781
|
+
mc.prototype.push = function(s, e) {
|
|
1782
1782
|
const t = this.strm, i = this.options.chunkSize, n = this.options.dictionary;
|
|
1783
1783
|
let r, a, l;
|
|
1784
1784
|
if (this.ended)
|
|
1785
1785
|
return !1;
|
|
1786
1786
|
for (e === ~~e ? a = e : a = e === !0 ? k1 : F1, ix.call(s) === "[object ArrayBuffer]" ? t.input = new Uint8Array(s) : t.input = s, t.next_in = 0, t.avail_in = t.input.length; ; ) {
|
|
1787
|
-
for (t.avail_out === 0 && (t.output = new Uint8Array(i), t.next_out = 0, t.avail_out = i), r = ur.inflate(t, a), r === $u && n && (r = ur.inflateSetDictionary(t, n), r ===
|
|
1787
|
+
for (t.avail_out === 0 && (t.output = new Uint8Array(i), t.next_out = 0, t.avail_out = i), r = ur.inflate(t, a), r === $u && n && (r = ur.inflateSetDictionary(t, n), r === ic ? r = ur.inflate(t, a) : r === sg && (r = $u)); t.avail_in > 0 && r === Ku && t.state.wrap > 0 && s[t.next_in] !== 0; )
|
|
1788
1788
|
ur.inflateReset(t), r = ur.inflate(t, a);
|
|
1789
1789
|
switch (r) {
|
|
1790
1790
|
case V1:
|
|
@@ -1795,11 +1795,11 @@ pc.prototype.push = function(s, e) {
|
|
|
1795
1795
|
}
|
|
1796
1796
|
if (l = t.avail_out, t.next_out && (t.avail_out === 0 || r === Ku))
|
|
1797
1797
|
if (this.options.to === "string") {
|
|
1798
|
-
let h =
|
|
1798
|
+
let h = tc.utf8border(t.output, t.next_out), u = t.next_out - h, f = tc.buf2string(t.output, h);
|
|
1799
1799
|
t.next_out = u, t.avail_out = i - u, u && t.output.set(t.output.subarray(h, h + u), 0), this.onData(f);
|
|
1800
1800
|
} else
|
|
1801
1801
|
this.onData(t.output.length === t.next_out ? t.output : t.output.subarray(0, t.next_out));
|
|
1802
|
-
if (!(r ===
|
|
1802
|
+
if (!(r === ic && l === 0)) {
|
|
1803
1803
|
if (r === Ku)
|
|
1804
1804
|
return r = ur.inflateEnd(this.strm), this.onEnd(r), this.ended = !0, !0;
|
|
1805
1805
|
if (t.avail_in === 0)
|
|
@@ -1808,14 +1808,14 @@ pc.prototype.push = function(s, e) {
|
|
|
1808
1808
|
}
|
|
1809
1809
|
return !0;
|
|
1810
1810
|
};
|
|
1811
|
-
|
|
1811
|
+
mc.prototype.onData = function(s) {
|
|
1812
1812
|
this.chunks.push(s);
|
|
1813
1813
|
};
|
|
1814
|
-
|
|
1815
|
-
s ===
|
|
1814
|
+
mc.prototype.onEnd = function(s) {
|
|
1815
|
+
s === ic && (this.options.to === "string" ? this.result = this.chunks.join("") : this.result = bu.flattenChunks(this.chunks)), this.chunks = [], this.err = s, this.msg = this.strm.msg;
|
|
1816
1816
|
};
|
|
1817
1817
|
function Cp(s, e) {
|
|
1818
|
-
const t = new
|
|
1818
|
+
const t = new mc(e);
|
|
1819
1819
|
if (t.push(s), t.err)
|
|
1820
1820
|
throw t.msg || Oo[t.err];
|
|
1821
1821
|
return t.result;
|
|
@@ -1823,7 +1823,7 @@ function Cp(s, e) {
|
|
|
1823
1823
|
function H1(s, e) {
|
|
1824
1824
|
return e = e || {}, e.raw = !0, Cp(s, e);
|
|
1825
1825
|
}
|
|
1826
|
-
var Y1 =
|
|
1826
|
+
var Y1 = mc, G1 = Cp, W1 = H1, Q1 = Cp, q1 = fc, Z1 = {
|
|
1827
1827
|
Inflate: Y1,
|
|
1828
1828
|
inflate: G1,
|
|
1829
1829
|
inflateRaw: W1,
|
|
@@ -1892,7 +1892,7 @@ function cl(s) {
|
|
|
1892
1892
|
function hl(s) {
|
|
1893
1893
|
return Math.abs(s) < Number.MAX_VALUE ? s : s * (1 / 0);
|
|
1894
1894
|
}
|
|
1895
|
-
function
|
|
1895
|
+
function Nc(s, e, t, i, n = 1 / 0, r) {
|
|
1896
1896
|
i = Math.max(1e-4, i);
|
|
1897
1897
|
const a = 2 / i, l = a * r, h = 1 / (1 + l + 0.48 * l * l + 0.235 * l * l * l);
|
|
1898
1898
|
let u = s - e;
|
|
@@ -1990,8 +1990,8 @@ let J1 = class {
|
|
|
1990
1990
|
}
|
|
1991
1991
|
}
|
|
1992
1992
|
};
|
|
1993
|
-
const ew = "2.3.7",
|
|
1994
|
-
let Xt, lg,
|
|
1993
|
+
const ew = "2.3.7", Bc = 1 / 8, sx = typeof window < "u", tw = sx && /Mac/.test(navigator.platform), iw = !(sx && "PointerEvent" in window);
|
|
1994
|
+
let Xt, lg, zc, td, Dn, Yt, bi, Ua, Ps, Cs, sa, cg, hg, es, ul, Fa, ug, id, dg, nd, sd, Uc;
|
|
1995
1995
|
class Os extends J1 {
|
|
1996
1996
|
/**
|
|
1997
1997
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
@@ -2034,7 +2034,7 @@ class Os extends J1 {
|
|
|
2034
2034
|
* @category Statics
|
|
2035
2035
|
*/
|
|
2036
2036
|
static install(e) {
|
|
2037
|
-
Xt = e.THREE, lg = Object.freeze(new Xt.Vector3(0, 0, 0)),
|
|
2037
|
+
Xt = e.THREE, lg = Object.freeze(new Xt.Vector3(0, 0, 0)), zc = Object.freeze(new Xt.Vector3(0, 1, 0)), td = Object.freeze(new Xt.Vector3(0, 0, 1)), Dn = new Xt.Vector2(), Yt = new Xt.Vector3(), bi = new Xt.Vector3(), Ua = new Xt.Vector3(), Ps = new Xt.Vector3(), Cs = new Xt.Vector3(), sa = new Xt.Vector3(), cg = new Xt.Vector3(), hg = new Xt.Vector3(), es = new Xt.Spherical(), ul = new Xt.Spherical(), Fa = new Xt.Box3(), ug = new Xt.Box3(), id = new Xt.Sphere(), dg = new Xt.Quaternion(), nd = new Xt.Quaternion(), sd = new Xt.Matrix4(), Uc = new Xt.Raycaster();
|
|
2038
2038
|
}
|
|
2039
2039
|
/**
|
|
2040
2040
|
* list all ACTIONs
|
|
@@ -2086,7 +2086,7 @@ class Os extends J1 {
|
|
|
2086
2086
|
}, this._zoomInternal = (S, z, F) => {
|
|
2087
2087
|
const k = Math.pow(0.95, S * this.dollySpeed);
|
|
2088
2088
|
this.zoomTo(this._zoom * k), this.dollyToCursor && this._dollyControlCoord.set(z, F);
|
|
2089
|
-
}, typeof Xt > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = e, this._yAxisUpSpace = new Xt.Quaternion().setFromUnitVectors(this._camera.up,
|
|
2089
|
+
}, typeof Xt > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = e, this._yAxisUpSpace = new Xt.Quaternion().setFromUnitVectors(this._camera.up, zc), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = Ce.NONE, this._target = new Xt.Vector3(), this._targetEnd = this._target.clone(), this._focalOffset = new Xt.Vector3(), this._focalOffsetEnd = this._focalOffset.clone(), this._spherical = new Xt.Spherical().setFromVector3(Yt.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)), this._sphericalEnd = this._spherical.clone(), this._lastDistance = this._spherical.radius, this._zoom = this._camera.zoom, this._zoomEnd = this._zoom, this._lastZoom = this._zoom, this._nearPlaneCorners = [
|
|
2090
2090
|
new Xt.Vector3(),
|
|
2091
2091
|
new Xt.Vector3(),
|
|
2092
2092
|
new Xt.Vector3(),
|
|
@@ -2260,13 +2260,13 @@ class Os extends J1 {
|
|
|
2260
2260
|
const z = this._domElement && document.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, F = z ? -z.deltaX : n.x - Dn.x, k = z ? -z.deltaY : n.y - Dn.y;
|
|
2261
2261
|
if (n.copy(Dn), ((this._state & Ce.ROTATE) === Ce.ROTATE || (this._state & Ce.TOUCH_ROTATE) === Ce.TOUCH_ROTATE || (this._state & Ce.TOUCH_DOLLY_ROTATE) === Ce.TOUCH_DOLLY_ROTATE || (this._state & Ce.TOUCH_ZOOM_ROTATE) === Ce.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(F, k), this._isUserControllingRotate = !0), (this._state & Ce.DOLLY) === Ce.DOLLY || (this._state & Ce.ZOOM) === Ce.ZOOM) {
|
|
2262
2262
|
const H = this.dollyToCursor ? (i.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, U = this.dollyToCursor ? (i.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, O = this.dollyDragInverted ? -1 : 1;
|
|
2263
|
-
(this._state & Ce.DOLLY) === Ce.DOLLY ? (this._dollyInternal(O * k *
|
|
2263
|
+
(this._state & Ce.DOLLY) === Ce.DOLLY ? (this._dollyInternal(O * k * Bc, H, U), this._isUserControllingDolly = !0) : (this._zoomInternal(O * k * Bc, H, U), this._isUserControllingZoom = !0);
|
|
2264
2264
|
}
|
|
2265
2265
|
if ((this._state & Ce.TOUCH_DOLLY) === Ce.TOUCH_DOLLY || (this._state & Ce.TOUCH_ZOOM) === Ce.TOUCH_ZOOM || (this._state & Ce.TOUCH_DOLLY_TRUCK) === Ce.TOUCH_DOLLY_TRUCK || (this._state & Ce.TOUCH_ZOOM_TRUCK) === Ce.TOUCH_ZOOM_TRUCK || (this._state & Ce.TOUCH_DOLLY_OFFSET) === Ce.TOUCH_DOLLY_OFFSET || (this._state & Ce.TOUCH_ZOOM_OFFSET) === Ce.TOUCH_ZOOM_OFFSET || (this._state & Ce.TOUCH_DOLLY_ROTATE) === Ce.TOUCH_DOLLY_ROTATE || (this._state & Ce.TOUCH_ZOOM_ROTATE) === Ce.TOUCH_ZOOM_ROTATE) {
|
|
2266
2266
|
const H = Dn.x - this._activePointers[1].clientX, U = Dn.y - this._activePointers[1].clientY, O = Math.sqrt(H * H + U * U), V = r.y - O;
|
|
2267
2267
|
r.set(0, O);
|
|
2268
2268
|
const $ = this.dollyToCursor ? (n.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, J = this.dollyToCursor ? (n.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
|
2269
|
-
(this._state & Ce.TOUCH_DOLLY) === Ce.TOUCH_DOLLY || (this._state & Ce.TOUCH_DOLLY_ROTATE) === Ce.TOUCH_DOLLY_ROTATE || (this._state & Ce.TOUCH_DOLLY_TRUCK) === Ce.TOUCH_DOLLY_TRUCK || (this._state & Ce.TOUCH_DOLLY_OFFSET) === Ce.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(V *
|
|
2269
|
+
(this._state & Ce.TOUCH_DOLLY) === Ce.TOUCH_DOLLY || (this._state & Ce.TOUCH_DOLLY_ROTATE) === Ce.TOUCH_DOLLY_ROTATE || (this._state & Ce.TOUCH_DOLLY_TRUCK) === Ce.TOUCH_DOLLY_TRUCK || (this._state & Ce.TOUCH_DOLLY_OFFSET) === Ce.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(V * Bc, $, J), this._isUserControllingDolly = !0) : (this._zoomInternal(V * Bc, $, J), this._isUserControllingZoom = !0);
|
|
2270
2270
|
}
|
|
2271
2271
|
((this._state & Ce.TRUCK) === Ce.TRUCK || (this._state & Ce.TOUCH_TRUCK) === Ce.TOUCH_TRUCK || (this._state & Ce.TOUCH_DOLLY_TRUCK) === Ce.TOUCH_DOLLY_TRUCK || (this._state & Ce.TOUCH_ZOOM_TRUCK) === Ce.TOUCH_ZOOM_TRUCK) && (this._truckInternal(F, k, !1), this._isUserControllingTruck = !0), ((this._state & Ce.OFFSET) === Ce.OFFSET || (this._state & Ce.TOUCH_OFFSET) === Ce.TOUCH_OFFSET || (this._state & Ce.TOUCH_DOLLY_OFFSET) === Ce.TOUCH_DOLLY_OFFSET || (this._state & Ce.TOUCH_ZOOM_OFFSET) === Ce.TOUCH_ZOOM_OFFSET) && (this._truckInternal(F, k, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
|
2272
2272
|
}, b = () => {
|
|
@@ -2639,7 +2639,7 @@ class Os extends J1 {
|
|
|
2639
2639
|
const f = ag(this._sphericalEnd.theta, rg), p = ag(this._sphericalEnd.phi, rg);
|
|
2640
2640
|
h.push(this.rotateTo(f, p, t));
|
|
2641
2641
|
const m = Yt.setFromSpherical(this._sphericalEnd).normalize(), x = dg.setFromUnitVectors(m, td), w = Si(Math.abs(m.y), 1);
|
|
2642
|
-
w && x.multiply(nd.setFromAxisAngle(
|
|
2642
|
+
w && x.multiply(nd.setFromAxisAngle(zc, f)), x.multiply(this._yAxisUpSpaceInverse);
|
|
2643
2643
|
const T = ug.makeEmpty();
|
|
2644
2644
|
bi.copy(u.min).applyQuaternion(x), T.expandByPoint(bi), bi.copy(u.min).setX(u.max.x).applyQuaternion(x), T.expandByPoint(bi), bi.copy(u.min).setY(u.max.y).applyQuaternion(x), T.expandByPoint(bi), bi.copy(u.max).setZ(u.min.z).applyQuaternion(x), T.expandByPoint(bi), bi.copy(u.min).setZ(u.max.z).applyQuaternion(x), T.expandByPoint(bi), bi.copy(u.max).setY(u.min.y).applyQuaternion(x), T.expandByPoint(bi), bi.copy(u.max).setX(u.min.x).applyQuaternion(x), T.expandByPoint(bi), bi.copy(u.max).applyQuaternion(x), T.expandByPoint(bi), T.min.x -= n, T.min.y -= a, T.max.x += r, T.max.y += l, x.setFromUnitVectors(td, m), w && x.premultiply(nd.invert()), x.premultiply(this._yAxisUpSpace);
|
|
2645
2645
|
const _ = T.getSize(Yt), b = T.getCenter(bi).applyQuaternion(x);
|
|
@@ -2883,7 +2883,7 @@ class Os extends J1 {
|
|
|
2883
2883
|
* @category Methods
|
|
2884
2884
|
*/
|
|
2885
2885
|
updateCameraUp() {
|
|
2886
|
-
this._yAxisUpSpace.setFromUnitVectors(this._camera.up,
|
|
2886
|
+
this._yAxisUpSpace.setFromUnitVectors(this._camera.up, zc), this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert();
|
|
2887
2887
|
}
|
|
2888
2888
|
/**
|
|
2889
2889
|
* Apply current camera-up direction to the camera.
|
|
@@ -2909,19 +2909,19 @@ class Os extends J1 {
|
|
|
2909
2909
|
this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
|
|
2910
2910
|
else {
|
|
2911
2911
|
const p = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
2912
|
-
this._spherical.theta =
|
|
2912
|
+
this._spherical.theta = Nc(this._spherical.theta, this._sphericalEnd.theta, this._thetaVelocity, p, 1 / 0, e), this._needsUpdate = !0;
|
|
2913
2913
|
}
|
|
2914
2914
|
if (Ei(i))
|
|
2915
2915
|
this._phiVelocity.value = 0, this._spherical.phi = this._sphericalEnd.phi;
|
|
2916
2916
|
else {
|
|
2917
2917
|
const p = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
2918
|
-
this._spherical.phi =
|
|
2918
|
+
this._spherical.phi = Nc(this._spherical.phi, this._sphericalEnd.phi, this._phiVelocity, p, 1 / 0, e), this._needsUpdate = !0;
|
|
2919
2919
|
}
|
|
2920
2920
|
if (Ei(n))
|
|
2921
2921
|
this._radiusVelocity.value = 0, this._spherical.radius = this._sphericalEnd.radius;
|
|
2922
2922
|
else {
|
|
2923
2923
|
const p = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
|
|
2924
|
-
this._spherical.radius =
|
|
2924
|
+
this._spherical.radius = Nc(this._spherical.radius, this._sphericalEnd.radius, this._radiusVelocity, p, this.maxSpeed, e), this._needsUpdate = !0;
|
|
2925
2925
|
}
|
|
2926
2926
|
if (Ei(r.x) && Ei(r.y) && Ei(r.z))
|
|
2927
2927
|
this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
|
|
@@ -2958,7 +2958,7 @@ class Os extends J1 {
|
|
|
2958
2958
|
this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
|
|
2959
2959
|
else {
|
|
2960
2960
|
const p = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
|
|
2961
|
-
this._zoom =
|
|
2961
|
+
this._zoom = Nc(this._zoom, this._zoomEnd, this._zoomVelocity, p, 1 / 0, e);
|
|
2962
2962
|
}
|
|
2963
2963
|
this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0);
|
|
2964
2964
|
const h = this._collisionTest();
|
|
@@ -3076,8 +3076,8 @@ class Os extends J1 {
|
|
|
3076
3076
|
const r = bi.copy(this._nearPlaneCorners[n]);
|
|
3077
3077
|
r.applyMatrix4(sd);
|
|
3078
3078
|
const a = Ua.addVectors(this._target, r);
|
|
3079
|
-
|
|
3080
|
-
const l =
|
|
3079
|
+
Uc.set(a, i), Uc.far = this._spherical.radius + 1;
|
|
3080
|
+
const l = Uc.intersectObjects(this.colliderMeshes);
|
|
3081
3081
|
l.length !== 0 && l[0].distance < e && (e = l[0].distance);
|
|
3082
3082
|
}
|
|
3083
3083
|
return e;
|
|
@@ -3172,7 +3172,7 @@ class Os extends J1 {
|
|
|
3172
3172
|
* Copyright 2010-2024 Three.js Authors
|
|
3173
3173
|
* SPDX-License-Identifier: MIT
|
|
3174
3174
|
*/
|
|
3175
|
-
const Rp = "171", nw = 0, fg = 1, sw = 2, rx = 1, rw = 2, Is = 3, _s = 0, Sn = 1, On = 2, _n = 0, Co = 1, lu = 2, pg = 3, mg = 4, ax = 5, fr = 100, aw = 101, ow = 102, lw = 103, cw = 104, bf = 200, hw = 201, uw = 202, dw = 203, wf = 204, _f = 205, ox = 206, fw = 207, lx = 208, pw = 209, mw = 210, gw = 211, yw = 212, xw = 213, vw = 214, Mf = 0, Sf = 1, Af = 2, Ta = 3, Tf = 4, Ef = 5, Pf = 6, Cf = 7, _u = 0, bw = 1, ww = 2, Wr = 0, cx = 1, hx = 2, ux = 3, dx = 4, _w = 5, fx = 6, px = 7, gg = "attached", Mw = "detached", Ip = 300, Ea = 301, Pa = 302, cu = 303, hu = 304,
|
|
3175
|
+
const Rp = "171", nw = 0, fg = 1, sw = 2, rx = 1, rw = 2, Is = 3, _s = 0, Sn = 1, On = 2, _n = 0, Co = 1, lu = 2, pg = 3, mg = 4, ax = 5, fr = 100, aw = 101, ow = 102, lw = 103, cw = 104, bf = 200, hw = 201, uw = 202, dw = 203, wf = 204, _f = 205, ox = 206, fw = 207, lx = 208, pw = 209, mw = 210, gw = 211, yw = 212, xw = 213, vw = 214, Mf = 0, Sf = 1, Af = 2, Ta = 3, Tf = 4, Ef = 5, Pf = 6, Cf = 7, _u = 0, bw = 1, ww = 2, Wr = 0, cx = 1, hx = 2, ux = 3, dx = 4, _w = 5, fx = 6, px = 7, gg = "attached", Mw = "detached", Ip = 300, Ea = 301, Pa = 302, cu = 303, hu = 304, gc = 306, Ms = 1e3, mr = 1001, nc = 1002, pi = 1003, Dp = 1004, xo = 1005, Pi = 1006, Hl = 1007, Ns = 1008, wr = 1009, mx = 1010, gx = 1011, sc = 1012, Lp = 1013, bs = 1014, Cn = 1015, pn = 1016, Op = 1017, Np = 1018, Zr = 1020, yx = 35902, xx = 1021, vx = 1022, Ui = 1023, bx = 1024, wx = 1025, Qr = 1026, jr = 1027, yc = 1028, Mu = 1029, _x = 1030, Bp = 1031, zp = 1033, Kh = 33776, $h = 33777, Jh = 33778, eu = 33779, Rf = 35840, If = 35841, Df = 35842, Lf = 35843, Of = 36196, Nf = 37492, Bf = 37496, zf = 37808, Uf = 37809, Ff = 37810, kf = 37811, Vf = 37812, Xf = 37813, Hf = 37814, Yf = 37815, Gf = 37816, Wf = 37817, Qf = 37818, qf = 37819, Zf = 37820, jf = 37821, tu = 36492, Kf = 36494, $f = 36495, Mx = 36283, Jf = 36284, ep = 36285, tp = 36286, Sw = 2200, Aw = 2201, Tw = 2202, rc = 2300, ac = 2301, rd = 2302, vo = 2400, bo = 2401, uu = 2402, Up = 2500, Ew = 2501, Pw = 0, Sx = 1, ip = 2, Cw = 3200, Rw = 3201, Da = 0, Iw = 1, pr = "", fn = "srgb", Rn = "srgb-linear", du = "linear", wi = "srgb", ka = 7680, yg = 519, Dw = 512, Lw = 513, Ow = 514, Ax = 515, Nw = 516, Bw = 517, zw = 518, Uw = 519, np = 35044, sp = "300 es", gr = 2e3, fu = 2001;
|
|
3176
3176
|
let Sr = class {
|
|
3177
3177
|
addEventListener(e, t) {
|
|
3178
3178
|
this._listeners === void 0 && (this._listeners = {});
|
|
@@ -3226,11 +3226,11 @@ function Fw(s, e, t, i, n) {
|
|
|
3226
3226
|
function kw(s, e, t) {
|
|
3227
3227
|
return s !== e ? (t - s) / (e - s) : 0;
|
|
3228
3228
|
}
|
|
3229
|
-
function
|
|
3229
|
+
function Yl(s, e, t) {
|
|
3230
3230
|
return (1 - t) * s + t * e;
|
|
3231
3231
|
}
|
|
3232
3232
|
function Vw(s, e, t, i) {
|
|
3233
|
-
return
|
|
3233
|
+
return Yl(s, e, 1 - Math.exp(-t * i));
|
|
3234
3234
|
}
|
|
3235
3235
|
function Xw(s, e = 1) {
|
|
3236
3236
|
return e - Math.abs(Fp(s, e * 2) - e);
|
|
@@ -3343,7 +3343,7 @@ const Su = {
|
|
|
3343
3343
|
euclideanModulo: Fp,
|
|
3344
3344
|
mapLinear: Fw,
|
|
3345
3345
|
inverseLerp: kw,
|
|
3346
|
-
lerp:
|
|
3346
|
+
lerp: Yl,
|
|
3347
3347
|
damp: Vw,
|
|
3348
3348
|
pingpong: Xw,
|
|
3349
3349
|
smoothstep: Hw,
|
|
@@ -3762,11 +3762,11 @@ const t_ = {
|
|
|
3762
3762
|
function wo(s, e) {
|
|
3763
3763
|
return new t_[s](e);
|
|
3764
3764
|
}
|
|
3765
|
-
function
|
|
3765
|
+
function oc(s) {
|
|
3766
3766
|
return document.createElementNS("http://www.w3.org/1999/xhtml", s);
|
|
3767
3767
|
}
|
|
3768
3768
|
function i_() {
|
|
3769
|
-
const s =
|
|
3769
|
+
const s = oc("canvas");
|
|
3770
3770
|
return s.style.display = "block", s;
|
|
3771
3771
|
}
|
|
3772
3772
|
const vg = {};
|
|
@@ -3912,7 +3912,7 @@ class o_ {
|
|
|
3912
3912
|
if (e instanceof HTMLCanvasElement)
|
|
3913
3913
|
t = e;
|
|
3914
3914
|
else {
|
|
3915
|
-
Va === void 0 && (Va =
|
|
3915
|
+
Va === void 0 && (Va = oc("canvas")), Va.width = e.width, Va.height = e.height;
|
|
3916
3916
|
const i = Va.getContext("2d");
|
|
3917
3917
|
e instanceof ImageData ? i.putImageData(e, 0, 0) : i.drawImage(e, 0, 0, e.width, e.height), t = Va;
|
|
3918
3918
|
}
|
|
@@ -3920,7 +3920,7 @@ class o_ {
|
|
|
3920
3920
|
}
|
|
3921
3921
|
static sRGBToLinear(e) {
|
|
3922
3922
|
if (typeof HTMLImageElement < "u" && e instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap) {
|
|
3923
|
-
const t =
|
|
3923
|
+
const t = oc("canvas");
|
|
3924
3924
|
t.width = e.width, t.height = e.height;
|
|
3925
3925
|
const i = t.getContext("2d");
|
|
3926
3926
|
i.drawImage(e, 0, 0, e.width, e.height);
|
|
@@ -4046,7 +4046,7 @@ class Vi extends Sr {
|
|
|
4046
4046
|
case mr:
|
|
4047
4047
|
e.x = e.x < 0 ? 0 : 1;
|
|
4048
4048
|
break;
|
|
4049
|
-
case
|
|
4049
|
+
case nc:
|
|
4050
4050
|
Math.abs(Math.floor(e.x) % 2) === 1 ? e.x = Math.ceil(e.x) - e.x : e.x = e.x - Math.floor(e.x);
|
|
4051
4051
|
break;
|
|
4052
4052
|
}
|
|
@@ -4058,7 +4058,7 @@ class Vi extends Sr {
|
|
|
4058
4058
|
case mr:
|
|
4059
4059
|
e.y = e.y < 0 ? 0 : 1;
|
|
4060
4060
|
break;
|
|
4061
|
-
case
|
|
4061
|
+
case nc:
|
|
4062
4062
|
Math.abs(Math.floor(e.y) % 2) === 1 ? e.y = Math.ceil(e.y) - e.y : e.y = e.y - Math.floor(e.y);
|
|
4063
4063
|
break;
|
|
4064
4064
|
}
|
|
@@ -4904,7 +4904,7 @@ class li {
|
|
|
4904
4904
|
for (let a = 0, l = r.count; a < l; a++)
|
|
4905
4905
|
e.isMesh === !0 ? e.getVertexPosition(a, ds) : ds.fromBufferAttribute(r, a), ds.applyMatrix4(e.matrixWorld), this.expandByPoint(ds);
|
|
4906
4906
|
else
|
|
4907
|
-
e.boundingBox !== void 0 ? (e.boundingBox === null && e.computeBoundingBox(),
|
|
4907
|
+
e.boundingBox !== void 0 ? (e.boundingBox === null && e.computeBoundingBox(), Fc.copy(e.boundingBox)) : (i.boundingBox === null && i.computeBoundingBox(), Fc.copy(i.boundingBox)), Fc.applyMatrix4(e.matrixWorld), this.union(Fc);
|
|
4908
4908
|
}
|
|
4909
4909
|
const n = e.children;
|
|
4910
4910
|
for (let r = 0, a = n.length; r < a; r++)
|
|
@@ -4937,7 +4937,7 @@ class li {
|
|
|
4937
4937
|
intersectsTriangle(e) {
|
|
4938
4938
|
if (this.isEmpty())
|
|
4939
4939
|
return !1;
|
|
4940
|
-
this.getCenter(dl),
|
|
4940
|
+
this.getCenter(dl), kc.subVectors(this.max, dl), Xa.subVectors(e.a, dl), Ha.subVectors(e.b, dl), Ya.subVectors(e.c, dl), Pr.subVectors(Ha, Xa), Cr.subVectors(Ya, Ha), ra.subVectors(Xa, Ya);
|
|
4941
4941
|
let t = [
|
|
4942
4942
|
0,
|
|
4943
4943
|
-Pr.z,
|
|
@@ -4967,7 +4967,7 @@ class li {
|
|
|
4967
4967
|
ra.x,
|
|
4968
4968
|
0
|
|
4969
4969
|
];
|
|
4970
|
-
return !cd(t, Xa, Ha, Ya,
|
|
4970
|
+
return !cd(t, Xa, Ha, Ya, kc) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !cd(t, Xa, Ha, Ya, kc)) ? !1 : (Vc.crossVectors(Pr, Cr), t = [Vc.x, Vc.y, Vc.z], cd(t, Xa, Ha, Ya, kc));
|
|
4971
4971
|
}
|
|
4972
4972
|
clampPoint(e, t) {
|
|
4973
4973
|
return t.copy(e).clamp(this.min, this.max);
|
|
@@ -5003,7 +5003,7 @@ const tr = [
|
|
|
5003
5003
|
/* @__PURE__ */ new W(),
|
|
5004
5004
|
/* @__PURE__ */ new W(),
|
|
5005
5005
|
/* @__PURE__ */ new W()
|
|
5006
|
-
], ds = /* @__PURE__ */ new W(),
|
|
5006
|
+
], ds = /* @__PURE__ */ new W(), Fc = /* @__PURE__ */ new li(), Xa = /* @__PURE__ */ new W(), Ha = /* @__PURE__ */ new W(), Ya = /* @__PURE__ */ new W(), Pr = /* @__PURE__ */ new W(), Cr = /* @__PURE__ */ new W(), ra = /* @__PURE__ */ new W(), dl = /* @__PURE__ */ new W(), kc = /* @__PURE__ */ new W(), Vc = /* @__PURE__ */ new W(), aa = /* @__PURE__ */ new W();
|
|
5007
5007
|
function cd(s, e, t, i, n) {
|
|
5008
5008
|
for (let r = 0, a = s.length - 3; r <= a; r += 3) {
|
|
5009
5009
|
aa.fromArray(s, r);
|
|
@@ -5088,7 +5088,7 @@ class Ki {
|
|
|
5088
5088
|
return new this.constructor().copy(this);
|
|
5089
5089
|
}
|
|
5090
5090
|
}
|
|
5091
|
-
const ir = /* @__PURE__ */ new W(), ud = /* @__PURE__ */ new W(),
|
|
5091
|
+
const ir = /* @__PURE__ */ new W(), ud = /* @__PURE__ */ new W(), Xc = /* @__PURE__ */ new W(), Rr = /* @__PURE__ */ new W(), dd = /* @__PURE__ */ new W(), Hc = /* @__PURE__ */ new W(), fd = /* @__PURE__ */ new W();
|
|
5092
5092
|
class Qo {
|
|
5093
5093
|
constructor(e = new W(), t = new W(0, 0, -1)) {
|
|
5094
5094
|
this.origin = e, this.direction = t;
|
|
@@ -5121,8 +5121,8 @@ class Qo {
|
|
|
5121
5121
|
return t < 0 ? this.origin.distanceToSquared(e) : (ir.copy(this.origin).addScaledVector(this.direction, t), ir.distanceToSquared(e));
|
|
5122
5122
|
}
|
|
5123
5123
|
distanceSqToSegment(e, t, i, n) {
|
|
5124
|
-
ud.copy(e).add(t).multiplyScalar(0.5),
|
|
5125
|
-
const r = e.distanceTo(t) * 0.5, a = -this.direction.dot(
|
|
5124
|
+
ud.copy(e).add(t).multiplyScalar(0.5), Xc.copy(t).sub(e).normalize(), Rr.copy(this.origin).sub(ud);
|
|
5125
|
+
const r = e.distanceTo(t) * 0.5, a = -this.direction.dot(Xc), l = Rr.dot(this.direction), h = -Rr.dot(Xc), u = Rr.lengthSq(), f = Math.abs(1 - a * a);
|
|
5126
5126
|
let p, m, x, w;
|
|
5127
5127
|
if (f > 0)
|
|
5128
5128
|
if (p = a * h - l, m = a * l - h, w = r * f, p >= 0)
|
|
@@ -5138,7 +5138,7 @@ class Qo {
|
|
|
5138
5138
|
m <= -w ? (p = Math.max(0, -(-a * r + l)), m = p > 0 ? -r : Math.min(Math.max(-r, -h), r), x = -p * p + m * (m + 2 * h) + u) : m <= w ? (p = 0, m = Math.min(Math.max(-r, -h), r), x = m * (m + 2 * h) + u) : (p = Math.max(0, -(a * r + l)), m = p > 0 ? r : Math.min(Math.max(-r, -h), r), x = -p * p + m * (m + 2 * h) + u);
|
|
5139
5139
|
else
|
|
5140
5140
|
m = a > 0 ? -r : r, p = Math.max(0, -(a * m + l)), x = -p * p + m * (m + 2 * h) + u;
|
|
5141
|
-
return i && i.copy(this.origin).addScaledVector(this.direction, p), n && n.copy(ud).addScaledVector(
|
|
5141
|
+
return i && i.copy(this.origin).addScaledVector(this.direction, p), n && n.copy(ud).addScaledVector(Xc, m), x;
|
|
5142
5142
|
}
|
|
5143
5143
|
intersectSphere(e, t) {
|
|
5144
5144
|
ir.subVectors(e.center, this.origin);
|
|
@@ -5175,7 +5175,7 @@ class Qo {
|
|
|
5175
5175
|
return this.intersectBox(e, ir) !== null;
|
|
5176
5176
|
}
|
|
5177
5177
|
intersectTriangle(e, t, i, n, r) {
|
|
5178
|
-
dd.subVectors(t, e),
|
|
5178
|
+
dd.subVectors(t, e), Hc.subVectors(i, e), fd.crossVectors(dd, Hc);
|
|
5179
5179
|
let a = this.direction.dot(fd), l;
|
|
5180
5180
|
if (a > 0) {
|
|
5181
5181
|
if (n)
|
|
@@ -5186,7 +5186,7 @@ class Qo {
|
|
|
5186
5186
|
else
|
|
5187
5187
|
return null;
|
|
5188
5188
|
Rr.subVectors(this.origin, e);
|
|
5189
|
-
const h = l * this.direction.dot(
|
|
5189
|
+
const h = l * this.direction.dot(Hc.crossVectors(Rr, Hc));
|
|
5190
5190
|
if (h < 0)
|
|
5191
5191
|
return null;
|
|
5192
5192
|
const u = l * this.direction.dot(dd.cross(Rr));
|
|
@@ -5337,7 +5337,7 @@ class ot {
|
|
|
5337
5337
|
}
|
|
5338
5338
|
lookAt(e, t, i) {
|
|
5339
5339
|
const n = this.elements;
|
|
5340
|
-
return Gn.subVectors(e, t), Gn.lengthSq() === 0 && (Gn.z = 1), Gn.normalize(), Ir.crossVectors(i, Gn), Ir.lengthSq() === 0 && (Math.abs(i.z) === 1 ? Gn.x += 1e-4 : Gn.z += 1e-4, Gn.normalize(), Ir.crossVectors(i, Gn)), Ir.normalize(),
|
|
5340
|
+
return Gn.subVectors(e, t), Gn.lengthSq() === 0 && (Gn.z = 1), Gn.normalize(), Ir.crossVectors(i, Gn), Ir.lengthSq() === 0 && (Math.abs(i.z) === 1 ? Gn.x += 1e-4 : Gn.z += 1e-4, Gn.normalize(), Ir.crossVectors(i, Gn)), Ir.normalize(), Yc.crossVectors(Gn, Ir), n[0] = Ir.x, n[4] = Yc.x, n[8] = Gn.x, n[1] = Ir.y, n[5] = Yc.y, n[9] = Gn.y, n[2] = Ir.z, n[6] = Yc.z, n[10] = Gn.z, this;
|
|
5341
5341
|
}
|
|
5342
5342
|
multiply(e) {
|
|
5343
5343
|
return this.multiplyMatrices(this, e);
|
|
@@ -5593,7 +5593,7 @@ class ot {
|
|
|
5593
5593
|
return e[t] = i[0], e[t + 1] = i[1], e[t + 2] = i[2], e[t + 3] = i[3], e[t + 4] = i[4], e[t + 5] = i[5], e[t + 6] = i[6], e[t + 7] = i[7], e[t + 8] = i[8], e[t + 9] = i[9], e[t + 10] = i[10], e[t + 11] = i[11], e[t + 12] = i[12], e[t + 13] = i[13], e[t + 14] = i[14], e[t + 15] = i[15], e;
|
|
5594
5594
|
}
|
|
5595
5595
|
}
|
|
5596
|
-
const Ga = /* @__PURE__ */ new W(), fs = /* @__PURE__ */ new ot(), f_ = /* @__PURE__ */ new W(0, 0, 0), p_ = /* @__PURE__ */ new W(1, 1, 1), Ir = /* @__PURE__ */ new W(),
|
|
5596
|
+
const Ga = /* @__PURE__ */ new W(), fs = /* @__PURE__ */ new ot(), f_ = /* @__PURE__ */ new W(0, 0, 0), p_ = /* @__PURE__ */ new W(1, 1, 1), Ir = /* @__PURE__ */ new W(), Yc = /* @__PURE__ */ new W(), Gn = /* @__PURE__ */ new W(), Mg = /* @__PURE__ */ new ot(), Sg = /* @__PURE__ */ new Fi();
|
|
5597
5597
|
class zn {
|
|
5598
5598
|
constructor(e = 0, t = 0, i = 0, n = zn.DEFAULT_ORDER) {
|
|
5599
5599
|
this.isEuler = !0, this._x = e, this._y = t, this._z = i, this._order = n;
|
|
@@ -5715,7 +5715,7 @@ class kp {
|
|
|
5715
5715
|
}
|
|
5716
5716
|
}
|
|
5717
5717
|
let m_ = 0;
|
|
5718
|
-
const Ag = /* @__PURE__ */ new W(), Wa = /* @__PURE__ */ new Fi(), nr = /* @__PURE__ */ new ot(),
|
|
5718
|
+
const Ag = /* @__PURE__ */ new W(), Wa = /* @__PURE__ */ new Fi(), nr = /* @__PURE__ */ new ot(), Gc = /* @__PURE__ */ new W(), pl = /* @__PURE__ */ new W(), g_ = /* @__PURE__ */ new W(), y_ = /* @__PURE__ */ new Fi(), Tg = /* @__PURE__ */ new W(1, 0, 0), Eg = /* @__PURE__ */ new W(0, 1, 0), Pg = /* @__PURE__ */ new W(0, 0, 1), Cg = { type: "added" }, x_ = { type: "removed" }, Qa = { type: "childadded", child: null }, pd = { type: "childremoved", child: null };
|
|
5719
5719
|
class ui extends Sr {
|
|
5720
5720
|
constructor() {
|
|
5721
5721
|
super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: m_++ }), this.uuid = rs(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = ui.DEFAULT_UP.clone();
|
|
@@ -5815,9 +5815,9 @@ class ui extends Sr {
|
|
|
5815
5815
|
return this.updateWorldMatrix(!0, !1), e.applyMatrix4(nr.copy(this.matrixWorld).invert());
|
|
5816
5816
|
}
|
|
5817
5817
|
lookAt(e, t, i) {
|
|
5818
|
-
e.isVector3 ?
|
|
5818
|
+
e.isVector3 ? Gc.copy(e) : Gc.set(e, t, i);
|
|
5819
5819
|
const n = this.parent;
|
|
5820
|
-
this.updateWorldMatrix(!0, !1), pl.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? nr.lookAt(pl,
|
|
5820
|
+
this.updateWorldMatrix(!0, !1), pl.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? nr.lookAt(pl, Gc, this.up) : nr.lookAt(Gc, pl, this.up), this.quaternion.setFromRotationMatrix(nr), n && (nr.extractRotation(n.matrixWorld), Wa.setFromRotationMatrix(nr), this.quaternion.premultiply(Wa.invert()));
|
|
5821
5821
|
}
|
|
5822
5822
|
add(e) {
|
|
5823
5823
|
if (arguments.length > 1) {
|
|
@@ -6272,7 +6272,7 @@ const Px = {
|
|
|
6272
6272
|
whitesmoke: 16119285,
|
|
6273
6273
|
yellow: 16776960,
|
|
6274
6274
|
yellowgreen: 10145074
|
|
6275
|
-
}, Dr = { h: 0, s: 0, l: 0 },
|
|
6275
|
+
}, Dr = { h: 0, s: 0, l: 0 }, Wc = { h: 0, s: 0, l: 0 };
|
|
6276
6276
|
function _d(s, e, t) {
|
|
6277
6277
|
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? s + (e - s) * 6 * t : t < 1 / 2 ? e : t < 2 / 3 ? s + (e - s) * 6 * (2 / 3 - t) : s;
|
|
6278
6278
|
}
|
|
@@ -6449,8 +6449,8 @@ class ut {
|
|
|
6449
6449
|
return this.r = e.r + (t.r - e.r) * i, this.g = e.g + (t.g - e.g) * i, this.b = e.b + (t.b - e.b) * i, this;
|
|
6450
6450
|
}
|
|
6451
6451
|
lerpHSL(e, t) {
|
|
6452
|
-
this.getHSL(Dr), e.getHSL(
|
|
6453
|
-
const i =
|
|
6452
|
+
this.getHSL(Dr), e.getHSL(Wc);
|
|
6453
|
+
const i = Yl(Dr.h, Wc.h, t), n = Yl(Dr.s, Wc.s, t), r = Yl(Dr.l, Wc.l, t);
|
|
6454
6454
|
return this.setHSL(i, n, r), this;
|
|
6455
6455
|
}
|
|
6456
6456
|
setFromVector3(e) {
|
|
@@ -6577,7 +6577,7 @@ class Bn extends hn {
|
|
|
6577
6577
|
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;
|
|
6578
6578
|
}
|
|
6579
6579
|
}
|
|
6580
|
-
const $i = /* @__PURE__ */ new W(),
|
|
6580
|
+
const $i = /* @__PURE__ */ new W(), Qc = /* @__PURE__ */ new Te();
|
|
6581
6581
|
class jt {
|
|
6582
6582
|
constructor(e, t, i = !1) {
|
|
6583
6583
|
if (Array.isArray(e))
|
|
@@ -6613,7 +6613,7 @@ class jt {
|
|
|
6613
6613
|
applyMatrix3(e) {
|
|
6614
6614
|
if (this.itemSize === 2)
|
|
6615
6615
|
for (let t = 0, i = this.count; t < i; t++)
|
|
6616
|
-
|
|
6616
|
+
Qc.fromBufferAttribute(this, t), Qc.applyMatrix3(e), this.setXY(t, Qc.x, Qc.y);
|
|
6617
6617
|
else if (this.itemSize === 3)
|
|
6618
6618
|
for (let t = 0, i = this.count; t < i; t++)
|
|
6619
6619
|
$i.fromBufferAttribute(this, t), $i.applyMatrix3(e), this.setXYZ(t, $i.x, $i.y, $i.z);
|
|
@@ -7047,7 +7047,7 @@ class Vt extends Sr {
|
|
|
7047
7047
|
this.dispatchEvent({ type: "dispose" });
|
|
7048
7048
|
}
|
|
7049
7049
|
}
|
|
7050
|
-
const Ig = /* @__PURE__ */ new ot(), oa = /* @__PURE__ */ new Qo(),
|
|
7050
|
+
const Ig = /* @__PURE__ */ new ot(), oa = /* @__PURE__ */ new Qo(), qc = /* @__PURE__ */ new Ki(), Dg = /* @__PURE__ */ new W(), Zc = /* @__PURE__ */ new W(), jc = /* @__PURE__ */ new W(), Kc = /* @__PURE__ */ new W(), Sd = /* @__PURE__ */ new W(), $c = /* @__PURE__ */ new W(), Lg = /* @__PURE__ */ new W(), Jc = /* @__PURE__ */ new W();
|
|
7051
7051
|
class de extends ui {
|
|
7052
7052
|
constructor(e = new Vt(), t = new Bn()) {
|
|
7053
7053
|
super(), this.isMesh = !0, this.type = "Mesh", this.geometry = e, this.material = t, this.updateMorphTargets();
|
|
@@ -7073,18 +7073,18 @@ class de extends ui {
|
|
|
7073
7073
|
t.fromBufferAttribute(n, e);
|
|
7074
7074
|
const l = this.morphTargetInfluences;
|
|
7075
7075
|
if (r && l) {
|
|
7076
|
-
|
|
7076
|
+
$c.set(0, 0, 0);
|
|
7077
7077
|
for (let h = 0, u = r.length; h < u; h++) {
|
|
7078
7078
|
const f = l[h], p = r[h];
|
|
7079
|
-
f !== 0 && (Sd.fromBufferAttribute(p, e), a ?
|
|
7079
|
+
f !== 0 && (Sd.fromBufferAttribute(p, e), a ? $c.addScaledVector(Sd, f) : $c.addScaledVector(Sd.sub(t), f));
|
|
7080
7080
|
}
|
|
7081
|
-
t.add(
|
|
7081
|
+
t.add($c);
|
|
7082
7082
|
}
|
|
7083
7083
|
return t;
|
|
7084
7084
|
}
|
|
7085
7085
|
raycast(e, t) {
|
|
7086
7086
|
const i = this.geometry, n = this.material, r = this.matrixWorld;
|
|
7087
|
-
n !== void 0 && (i.boundingSphere === null && i.computeBoundingSphere(),
|
|
7087
|
+
n !== void 0 && (i.boundingSphere === null && i.computeBoundingSphere(), qc.copy(i.boundingSphere), qc.applyMatrix4(r), oa.copy(e.ray).recast(e.near), !(qc.containsPoint(oa.origin) === !1 && (oa.intersectSphere(qc, Dg) === null || oa.origin.distanceToSquared(Dg) > (e.far - e.near) ** 2)) && (Ig.copy(r).invert(), oa.copy(e.ray).applyMatrix4(Ig), !(i.boundingBox !== null && oa.intersectsBox(i.boundingBox) === !1) && this._computeIntersections(e, t, oa)));
|
|
7088
7088
|
}
|
|
7089
7089
|
_computeIntersections(e, t, i) {
|
|
7090
7090
|
let n;
|
|
@@ -7095,14 +7095,14 @@ class de extends ui {
|
|
|
7095
7095
|
const _ = m[w], b = a[_.materialIndex], P = Math.max(_.start, x.start), E = Math.min(l.count, Math.min(_.start + _.count, x.start + x.count));
|
|
7096
7096
|
for (let S = P, z = E; S < z; S += 3) {
|
|
7097
7097
|
const F = l.getX(S), k = l.getX(S + 1), H = l.getX(S + 2);
|
|
7098
|
-
n =
|
|
7098
|
+
n = eh(this, b, e, i, u, f, p, F, k, H), n && (n.faceIndex = Math.floor(S / 3), n.face.materialIndex = _.materialIndex, t.push(n));
|
|
7099
7099
|
}
|
|
7100
7100
|
}
|
|
7101
7101
|
else {
|
|
7102
7102
|
const w = Math.max(0, x.start), T = Math.min(l.count, x.start + x.count);
|
|
7103
7103
|
for (let _ = w, b = T; _ < b; _ += 3) {
|
|
7104
7104
|
const P = l.getX(_), E = l.getX(_ + 1), S = l.getX(_ + 2);
|
|
7105
|
-
n =
|
|
7105
|
+
n = eh(this, a, e, i, u, f, p, P, E, S), n && (n.faceIndex = Math.floor(_ / 3), t.push(n));
|
|
7106
7106
|
}
|
|
7107
7107
|
}
|
|
7108
7108
|
else if (h !== void 0)
|
|
@@ -7111,14 +7111,14 @@ class de extends ui {
|
|
|
7111
7111
|
const _ = m[w], b = a[_.materialIndex], P = Math.max(_.start, x.start), E = Math.min(h.count, Math.min(_.start + _.count, x.start + x.count));
|
|
7112
7112
|
for (let S = P, z = E; S < z; S += 3) {
|
|
7113
7113
|
const F = S, k = S + 1, H = S + 2;
|
|
7114
|
-
n =
|
|
7114
|
+
n = eh(this, b, e, i, u, f, p, F, k, H), n && (n.faceIndex = Math.floor(S / 3), n.face.materialIndex = _.materialIndex, t.push(n));
|
|
7115
7115
|
}
|
|
7116
7116
|
}
|
|
7117
7117
|
else {
|
|
7118
7118
|
const w = Math.max(0, x.start), T = Math.min(h.count, x.start + x.count);
|
|
7119
7119
|
for (let _ = w, b = T; _ < b; _ += 3) {
|
|
7120
7120
|
const P = _, E = _ + 1, S = _ + 2;
|
|
7121
|
-
n =
|
|
7121
|
+
n = eh(this, a, e, i, u, f, p, P, E, S), n && (n.faceIndex = Math.floor(_ / 3), t.push(n));
|
|
7122
7122
|
}
|
|
7123
7123
|
}
|
|
7124
7124
|
}
|
|
@@ -7127,20 +7127,20 @@ function __(s, e, t, i, n, r, a, l) {
|
|
|
7127
7127
|
let h;
|
|
7128
7128
|
if (e.side === Sn ? h = i.intersectTriangle(a, r, n, !0, l) : h = i.intersectTriangle(n, r, a, e.side === _s, l), h === null)
|
|
7129
7129
|
return null;
|
|
7130
|
-
|
|
7131
|
-
const u = t.ray.origin.distanceTo(
|
|
7130
|
+
Jc.copy(l), Jc.applyMatrix4(s.matrixWorld);
|
|
7131
|
+
const u = t.ray.origin.distanceTo(Jc);
|
|
7132
7132
|
return u < t.near || u > t.far ? null : {
|
|
7133
7133
|
distance: u,
|
|
7134
|
-
point:
|
|
7134
|
+
point: Jc.clone(),
|
|
7135
7135
|
object: s
|
|
7136
7136
|
};
|
|
7137
7137
|
}
|
|
7138
|
-
function
|
|
7139
|
-
s.getVertexPosition(l,
|
|
7140
|
-
const f = __(s, e, t, i,
|
|
7138
|
+
function eh(s, e, t, i, n, r, a, l, h, u) {
|
|
7139
|
+
s.getVertexPosition(l, Zc), s.getVertexPosition(h, jc), s.getVertexPosition(u, Kc);
|
|
7140
|
+
const f = __(s, e, t, i, Zc, jc, Kc, Lg);
|
|
7141
7141
|
if (f) {
|
|
7142
7142
|
const p = new W();
|
|
7143
|
-
ln.getBarycoord(Lg,
|
|
7143
|
+
ln.getBarycoord(Lg, Zc, jc, Kc, p), n && (f.uv = ln.getInterpolatedAttribute(n, l, h, u, p, new Te())), r && (f.uv1 = ln.getInterpolatedAttribute(r, l, h, u, p, new Te())), a && (f.normal = ln.getInterpolatedAttribute(a, l, h, u, p, new W()), f.normal.dot(i.direction) > 0 && f.normal.multiplyScalar(-1));
|
|
7144
7144
|
const m = {
|
|
7145
7145
|
a: l,
|
|
7146
7146
|
b: h,
|
|
@@ -7148,7 +7148,7 @@ function Jc(s, e, t, i, n, r, a, l, h, u) {
|
|
|
7148
7148
|
normal: new W(),
|
|
7149
7149
|
materialIndex: 0
|
|
7150
7150
|
};
|
|
7151
|
-
ln.getNormal(
|
|
7151
|
+
ln.getNormal(Zc, jc, Kc, m.normal), f.face = m, f.barycoord = p;
|
|
7152
7152
|
}
|
|
7153
7153
|
return f;
|
|
7154
7154
|
}
|
|
@@ -7577,7 +7577,7 @@ class Yp {
|
|
|
7577
7577
|
};
|
|
7578
7578
|
}
|
|
7579
7579
|
}
|
|
7580
|
-
class
|
|
7580
|
+
class xc extends ui {
|
|
7581
7581
|
constructor() {
|
|
7582
7582
|
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 zn(), this.environmentIntensity = 1, this.environmentRotation = new zn(), this.overrideMaterial = null, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
|
|
7583
7583
|
}
|
|
@@ -7756,7 +7756,7 @@ class pu extends hn {
|
|
|
7756
7756
|
}
|
|
7757
7757
|
}
|
|
7758
7758
|
let Ja;
|
|
7759
|
-
const gl = /* @__PURE__ */ new W(), eo = /* @__PURE__ */ new W(), to = /* @__PURE__ */ new W(), io = /* @__PURE__ */ new Te(), yl = /* @__PURE__ */ new Te(), Dx = /* @__PURE__ */ new ot(),
|
|
7759
|
+
const gl = /* @__PURE__ */ new W(), eo = /* @__PURE__ */ new W(), to = /* @__PURE__ */ new W(), io = /* @__PURE__ */ new Te(), yl = /* @__PURE__ */ new Te(), Dx = /* @__PURE__ */ new ot(), th = /* @__PURE__ */ new W(), xl = /* @__PURE__ */ new W(), ih = /* @__PURE__ */ new W(), Bg = /* @__PURE__ */ new Te(), Ad = /* @__PURE__ */ new Te(), zg = /* @__PURE__ */ new Te();
|
|
7760
7760
|
class rp extends ui {
|
|
7761
7761
|
constructor(e = new pu()) {
|
|
7762
7762
|
if (super(), this.isSprite = !0, this.type = "Sprite", Ja === void 0) {
|
|
@@ -7793,15 +7793,15 @@ class rp extends ui {
|
|
|
7793
7793
|
let n, r;
|
|
7794
7794
|
i !== 0 && (r = Math.cos(i), n = Math.sin(i));
|
|
7795
7795
|
const a = this.center;
|
|
7796
|
-
|
|
7797
|
-
let l = e.ray.intersectTriangle(
|
|
7798
|
-
if (l === null && (
|
|
7796
|
+
nh(th.set(-0.5, -0.5, 0), to, a, eo, n, r), nh(xl.set(0.5, -0.5, 0), to, a, eo, n, r), nh(ih.set(0.5, 0.5, 0), to, a, eo, n, r), Bg.set(0, 0), Ad.set(1, 0), zg.set(1, 1);
|
|
7797
|
+
let l = e.ray.intersectTriangle(th, xl, ih, !1, gl);
|
|
7798
|
+
if (l === null && (nh(xl.set(-0.5, 0.5, 0), to, a, eo, n, r), Ad.set(0, 1), l = e.ray.intersectTriangle(th, ih, xl, !1, gl), l === null))
|
|
7799
7799
|
return;
|
|
7800
7800
|
const h = e.ray.origin.distanceTo(gl);
|
|
7801
7801
|
h < e.near || h > e.far || t.push({
|
|
7802
7802
|
distance: h,
|
|
7803
7803
|
point: gl.clone(),
|
|
7804
|
-
uv: ln.getInterpolation(gl,
|
|
7804
|
+
uv: ln.getInterpolation(gl, th, xl, ih, Bg, Ad, zg, new Te()),
|
|
7805
7805
|
face: null,
|
|
7806
7806
|
object: this
|
|
7807
7807
|
});
|
|
@@ -7810,10 +7810,10 @@ class rp extends ui {
|
|
|
7810
7810
|
return super.copy(e, t), e.center !== void 0 && this.center.copy(e.center), this.material = e.material, this;
|
|
7811
7811
|
}
|
|
7812
7812
|
}
|
|
7813
|
-
function
|
|
7813
|
+
function nh(s, e, t, i, n, r) {
|
|
7814
7814
|
io.subVectors(s, t).addScalar(0.5).multiply(i), n !== void 0 ? (yl.x = r * io.x - n * io.y, yl.y = n * io.x + r * io.y) : yl.copy(io), s.copy(e), s.x += yl.x, s.y += yl.y, s.applyMatrix4(Dx);
|
|
7815
7815
|
}
|
|
7816
|
-
const
|
|
7816
|
+
const sh = /* @__PURE__ */ new W(), Ug = /* @__PURE__ */ new W();
|
|
7817
7817
|
class P_ extends ui {
|
|
7818
7818
|
constructor() {
|
|
7819
7819
|
super(), this._currentLevel = 0, this.type = "LOD", Object.defineProperties(this, {
|
|
@@ -7870,16 +7870,16 @@ class P_ extends ui {
|
|
|
7870
7870
|
}
|
|
7871
7871
|
raycast(e, t) {
|
|
7872
7872
|
if (this.levels.length > 0) {
|
|
7873
|
-
|
|
7874
|
-
const n = e.ray.origin.distanceTo(
|
|
7873
|
+
sh.setFromMatrixPosition(this.matrixWorld);
|
|
7874
|
+
const n = e.ray.origin.distanceTo(sh);
|
|
7875
7875
|
this.getObjectForDistance(n).raycast(e, t);
|
|
7876
7876
|
}
|
|
7877
7877
|
}
|
|
7878
7878
|
update(e) {
|
|
7879
7879
|
const t = this.levels;
|
|
7880
7880
|
if (t.length > 1) {
|
|
7881
|
-
|
|
7882
|
-
const i =
|
|
7881
|
+
sh.setFromMatrixPosition(e.matrixWorld), Ug.setFromMatrixPosition(this.matrixWorld);
|
|
7882
|
+
const i = sh.distanceTo(Ug) / e.zoom;
|
|
7883
7883
|
t[0].object.visible = !0;
|
|
7884
7884
|
let n, r;
|
|
7885
7885
|
for (n = 1, r = t.length; n < r; n++) {
|
|
@@ -7908,7 +7908,7 @@ class P_ extends ui {
|
|
|
7908
7908
|
return t;
|
|
7909
7909
|
}
|
|
7910
7910
|
}
|
|
7911
|
-
const Fg = /* @__PURE__ */ new W(), kg = /* @__PURE__ */ new si(), Vg = /* @__PURE__ */ new si(), C_ = /* @__PURE__ */ new W(), Xg = /* @__PURE__ */ new ot(),
|
|
7911
|
+
const Fg = /* @__PURE__ */ new W(), kg = /* @__PURE__ */ new si(), Vg = /* @__PURE__ */ new si(), C_ = /* @__PURE__ */ new W(), Xg = /* @__PURE__ */ new ot(), rh = /* @__PURE__ */ new W(), Td = /* @__PURE__ */ new Ki(), Hg = /* @__PURE__ */ new ot(), Ed = /* @__PURE__ */ new Qo();
|
|
7912
7912
|
class Lx extends de {
|
|
7913
7913
|
constructor(e, t) {
|
|
7914
7914
|
super(e, t), this.isSkinnedMesh = !0, this.type = "SkinnedMesh", this.bindMode = gg, this.bindMatrix = new ot(), this.bindMatrixInverse = new ot(), this.boundingBox = null, this.boundingSphere = null;
|
|
@@ -7918,14 +7918,14 @@ class Lx extends de {
|
|
|
7918
7918
|
this.boundingBox === null && (this.boundingBox = new li()), this.boundingBox.makeEmpty();
|
|
7919
7919
|
const t = e.getAttribute("position");
|
|
7920
7920
|
for (let i = 0; i < t.count; i++)
|
|
7921
|
-
this.getVertexPosition(i,
|
|
7921
|
+
this.getVertexPosition(i, rh), this.boundingBox.expandByPoint(rh);
|
|
7922
7922
|
}
|
|
7923
7923
|
computeBoundingSphere() {
|
|
7924
7924
|
const e = this.geometry;
|
|
7925
7925
|
this.boundingSphere === null && (this.boundingSphere = new Ki()), this.boundingSphere.makeEmpty();
|
|
7926
7926
|
const t = e.getAttribute("position");
|
|
7927
7927
|
for (let i = 0; i < t.count; i++)
|
|
7928
|
-
this.getVertexPosition(i,
|
|
7928
|
+
this.getVertexPosition(i, rh), this.boundingSphere.expandByPoint(rh);
|
|
7929
7929
|
}
|
|
7930
7930
|
copy(e, t) {
|
|
7931
7931
|
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;
|
|
@@ -8080,7 +8080,7 @@ class Bs extends jt {
|
|
|
8080
8080
|
return e.meshPerAttribute = this.meshPerAttribute, e.isInstancedBufferAttribute = !0, e;
|
|
8081
8081
|
}
|
|
8082
8082
|
}
|
|
8083
|
-
const no = /* @__PURE__ */ new ot(), Gg = /* @__PURE__ */ new ot(),
|
|
8083
|
+
const no = /* @__PURE__ */ new ot(), Gg = /* @__PURE__ */ new ot(), ah = [], Wg = /* @__PURE__ */ new li(), I_ = /* @__PURE__ */ new ot(), vl = /* @__PURE__ */ new de(), bl = /* @__PURE__ */ new Ki();
|
|
8084
8084
|
class Qp extends de {
|
|
8085
8085
|
constructor(e, t, i) {
|
|
8086
8086
|
super(e, t), this.isInstancedMesh = !0, this.instanceMatrix = new Bs(new Float32Array(i * 16), 16), this.instanceColor = null, this.morphTexture = null, this.count = i, this.boundingBox = null, this.boundingSphere = null;
|
|
@@ -8117,12 +8117,12 @@ class Qp extends de {
|
|
|
8117
8117
|
const i = this.matrixWorld, n = this.count;
|
|
8118
8118
|
if (vl.geometry = this.geometry, vl.material = this.material, vl.material !== void 0 && (this.boundingSphere === null && this.computeBoundingSphere(), bl.copy(this.boundingSphere), bl.applyMatrix4(i), e.ray.intersectsSphere(bl) !== !1))
|
|
8119
8119
|
for (let r = 0; r < n; r++) {
|
|
8120
|
-
this.getMatrixAt(r, no), Gg.multiplyMatrices(i, no), vl.matrixWorld = Gg, vl.raycast(e,
|
|
8121
|
-
for (let a = 0, l =
|
|
8122
|
-
const h =
|
|
8120
|
+
this.getMatrixAt(r, no), Gg.multiplyMatrices(i, no), vl.matrixWorld = Gg, vl.raycast(e, ah);
|
|
8121
|
+
for (let a = 0, l = ah.length; a < l; a++) {
|
|
8122
|
+
const h = ah[a];
|
|
8123
8123
|
h.instanceId = r, h.object = this, t.push(h);
|
|
8124
8124
|
}
|
|
8125
|
-
|
|
8125
|
+
ah.length = 0;
|
|
8126
8126
|
}
|
|
8127
8127
|
}
|
|
8128
8128
|
setColorAt(e, t) {
|
|
@@ -8133,7 +8133,7 @@ class Qp extends de {
|
|
|
8133
8133
|
}
|
|
8134
8134
|
setMorphAt(e, t) {
|
|
8135
8135
|
const i = t.morphTargetInfluences, n = i.length + 1;
|
|
8136
|
-
this.morphTexture === null && (this.morphTexture = new ws(new Float32Array(n * this.count), n, this.count,
|
|
8136
|
+
this.morphTexture === null && (this.morphTexture = new ws(new Float32Array(n * this.count), n, this.count, yc, Cn));
|
|
8137
8137
|
const r = this.morphTexture.source.data.data;
|
|
8138
8138
|
let a = 0;
|
|
8139
8139
|
for (let u = 0; u < i.length; u++)
|
|
@@ -8218,8 +8218,8 @@ class dr {
|
|
|
8218
8218
|
return new this.constructor().copy(this);
|
|
8219
8219
|
}
|
|
8220
8220
|
}
|
|
8221
|
-
const la = /* @__PURE__ */ new Ki(),
|
|
8222
|
-
class
|
|
8221
|
+
const la = /* @__PURE__ */ new Ki(), oh = /* @__PURE__ */ new W();
|
|
8222
|
+
class vc {
|
|
8223
8223
|
constructor(e = new dr(), t = new dr(), i = new dr(), n = new dr(), r = new dr(), a = new dr()) {
|
|
8224
8224
|
this.planes = [e, t, i, n, r, a];
|
|
8225
8225
|
}
|
|
@@ -8266,7 +8266,7 @@ class xc {
|
|
|
8266
8266
|
const t = this.planes;
|
|
8267
8267
|
for (let i = 0; i < 6; i++) {
|
|
8268
8268
|
const n = t[i];
|
|
8269
|
-
if (
|
|
8269
|
+
if (oh.x = n.normal.x > 0 ? e.max.x : e.min.x, oh.y = n.normal.y > 0 ? e.max.y : e.min.y, oh.z = n.normal.z > 0 ? e.max.z : e.min.z, n.distanceToPoint(oh) < 0)
|
|
8270
8270
|
return !1;
|
|
8271
8271
|
}
|
|
8272
8272
|
return !0;
|
|
@@ -8310,7 +8310,7 @@ class B_ {
|
|
|
8310
8310
|
this.list.length = 0, this.index = 0;
|
|
8311
8311
|
}
|
|
8312
8312
|
}
|
|
8313
|
-
const Ln = /* @__PURE__ */ new ot(), z_ = /* @__PURE__ */ new ut(1, 1, 1), Rd = /* @__PURE__ */ new
|
|
8313
|
+
const Ln = /* @__PURE__ */ new ot(), z_ = /* @__PURE__ */ new ut(1, 1, 1), Rd = /* @__PURE__ */ new vc(), lh = /* @__PURE__ */ new li(), ca = /* @__PURE__ */ new Ki(), wl = /* @__PURE__ */ new W(), Qg = /* @__PURE__ */ new W(), U_ = /* @__PURE__ */ new W(), Id = /* @__PURE__ */ new B_(), vn = /* @__PURE__ */ new de(), ch = [];
|
|
8314
8314
|
function F_(s, e, t = 0) {
|
|
8315
8315
|
const i = e.itemSize;
|
|
8316
8316
|
if (s.isInterleavedBufferAttribute || s.array.constructor !== e.array.constructor) {
|
|
@@ -8414,7 +8414,7 @@ class k_ extends de {
|
|
|
8414
8414
|
if (t[i].active === !1)
|
|
8415
8415
|
continue;
|
|
8416
8416
|
const r = t[i].geometryIndex;
|
|
8417
|
-
this.getMatrixAt(i, Ln), this.getBoundingBoxAt(r,
|
|
8417
|
+
this.getMatrixAt(i, Ln), this.getBoundingBoxAt(r, lh).applyMatrix4(Ln), e.union(lh);
|
|
8418
8418
|
}
|
|
8419
8419
|
}
|
|
8420
8420
|
computeBoundingSphere() {
|
|
@@ -8561,7 +8561,7 @@ class k_ extends de {
|
|
|
8561
8561
|
const i = this.geometry, n = this._geometryInfo[e];
|
|
8562
8562
|
if (n.boundingSphere === null) {
|
|
8563
8563
|
const r = new Ki();
|
|
8564
|
-
this.getBoundingBoxAt(e,
|
|
8564
|
+
this.getBoundingBoxAt(e, lh), lh.getCenter(r.center);
|
|
8565
8565
|
const a = i.index, l = i.attributes.position;
|
|
8566
8566
|
let h = 0;
|
|
8567
8567
|
for (let u = n.start, f = n.start + n.count; u < f; u++) {
|
|
@@ -8634,12 +8634,12 @@ class k_ extends de {
|
|
|
8634
8634
|
if (!i[l].visible || !i[l].active)
|
|
8635
8635
|
continue;
|
|
8636
8636
|
const u = i[l].geometryIndex, f = n[u];
|
|
8637
|
-
vn.geometry.setDrawRange(f.start, f.count), this.getMatrixAt(l, vn.matrixWorld).premultiply(r), this.getBoundingBoxAt(u, vn.geometry.boundingBox), this.getBoundingSphereAt(u, vn.geometry.boundingSphere), vn.raycast(e,
|
|
8638
|
-
for (let p = 0, m =
|
|
8639
|
-
const x =
|
|
8637
|
+
vn.geometry.setDrawRange(f.start, f.count), this.getMatrixAt(l, vn.matrixWorld).premultiply(r), this.getBoundingBoxAt(u, vn.geometry.boundingBox), this.getBoundingSphereAt(u, vn.geometry.boundingSphere), vn.raycast(e, ch);
|
|
8638
|
+
for (let p = 0, m = ch.length; p < m; p++) {
|
|
8639
|
+
const x = ch[p];
|
|
8640
8640
|
x.object = this, x.batchId = l, t.push(x);
|
|
8641
8641
|
}
|
|
8642
|
-
|
|
8642
|
+
ch.length = 0;
|
|
8643
8643
|
}
|
|
8644
8644
|
vn.material = null, vn.geometry.index = null, vn.geometry.attributes = {}, vn.geometry.setDrawRange(0, 1 / 0);
|
|
8645
8645
|
}
|
|
@@ -8705,7 +8705,7 @@ class Kn extends hn {
|
|
|
8705
8705
|
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;
|
|
8706
8706
|
}
|
|
8707
8707
|
}
|
|
8708
|
-
const mu = /* @__PURE__ */ new W(), gu = /* @__PURE__ */ new W(), qg = /* @__PURE__ */ new ot(), _l = /* @__PURE__ */ new Qo(),
|
|
8708
|
+
const mu = /* @__PURE__ */ new W(), gu = /* @__PURE__ */ new W(), qg = /* @__PURE__ */ new ot(), _l = /* @__PURE__ */ new Qo(), hh = /* @__PURE__ */ new Ki(), Dd = /* @__PURE__ */ new W(), Zg = /* @__PURE__ */ new W();
|
|
8709
8709
|
class qn extends ui {
|
|
8710
8710
|
constructor(e = new Vt(), t = new Kn()) {
|
|
8711
8711
|
super(), this.isLine = !0, this.type = "Line", this.geometry = e, this.material = t, this.updateMorphTargets();
|
|
@@ -8726,28 +8726,28 @@ class qn extends ui {
|
|
|
8726
8726
|
}
|
|
8727
8727
|
raycast(e, t) {
|
|
8728
8728
|
const i = this.geometry, n = this.matrixWorld, r = e.params.Line.threshold, a = i.drawRange;
|
|
8729
|
-
if (i.boundingSphere === null && i.computeBoundingSphere(),
|
|
8729
|
+
if (i.boundingSphere === null && i.computeBoundingSphere(), hh.copy(i.boundingSphere), hh.applyMatrix4(n), hh.radius += r, e.ray.intersectsSphere(hh) === !1)
|
|
8730
8730
|
return;
|
|
8731
8731
|
qg.copy(n).invert(), _l.copy(e.ray).applyMatrix4(qg);
|
|
8732
8732
|
const l = r / ((this.scale.x + this.scale.y + this.scale.z) / 3), h = l * l, u = this.isLineSegments ? 2 : 1, f = i.index, m = i.attributes.position;
|
|
8733
8733
|
if (f !== null) {
|
|
8734
8734
|
const x = Math.max(0, a.start), w = Math.min(f.count, a.start + a.count);
|
|
8735
8735
|
for (let T = x, _ = w - 1; T < _; T += u) {
|
|
8736
|
-
const b = f.getX(T), P = f.getX(T + 1), E =
|
|
8736
|
+
const b = f.getX(T), P = f.getX(T + 1), E = uh(this, e, _l, h, b, P);
|
|
8737
8737
|
E && t.push(E);
|
|
8738
8738
|
}
|
|
8739
8739
|
if (this.isLineLoop) {
|
|
8740
|
-
const T = f.getX(w - 1), _ = f.getX(x), b =
|
|
8740
|
+
const T = f.getX(w - 1), _ = f.getX(x), b = uh(this, e, _l, h, T, _);
|
|
8741
8741
|
b && t.push(b);
|
|
8742
8742
|
}
|
|
8743
8743
|
} else {
|
|
8744
8744
|
const x = Math.max(0, a.start), w = Math.min(m.count, a.start + a.count);
|
|
8745
8745
|
for (let T = x, _ = w - 1; T < _; T += u) {
|
|
8746
|
-
const b =
|
|
8746
|
+
const b = uh(this, e, _l, h, T, T + 1);
|
|
8747
8747
|
b && t.push(b);
|
|
8748
8748
|
}
|
|
8749
8749
|
if (this.isLineLoop) {
|
|
8750
|
-
const T =
|
|
8750
|
+
const T = uh(this, e, _l, h, w - 1, x);
|
|
8751
8751
|
T && t.push(T);
|
|
8752
8752
|
}
|
|
8753
8753
|
}
|
|
@@ -8766,7 +8766,7 @@ class qn extends ui {
|
|
|
8766
8766
|
}
|
|
8767
8767
|
}
|
|
8768
8768
|
}
|
|
8769
|
-
function
|
|
8769
|
+
function uh(s, e, t, i, n, r) {
|
|
8770
8770
|
const a = s.geometry.attributes.position;
|
|
8771
8771
|
if (mu.fromBufferAttribute(a, n), gu.fromBufferAttribute(a, r), t.distanceSqToSegment(mu, gu, Dd, Zg) > i)
|
|
8772
8772
|
return;
|
|
@@ -8815,7 +8815,7 @@ class qp extends hn {
|
|
|
8815
8815
|
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;
|
|
8816
8816
|
}
|
|
8817
8817
|
}
|
|
8818
|
-
const $g = /* @__PURE__ */ new ot(), ap = /* @__PURE__ */ new Qo(),
|
|
8818
|
+
const $g = /* @__PURE__ */ new ot(), ap = /* @__PURE__ */ new Qo(), dh = /* @__PURE__ */ new Ki(), fh = /* @__PURE__ */ new W();
|
|
8819
8819
|
class Zp extends ui {
|
|
8820
8820
|
constructor(e = new Vt(), t = new qp()) {
|
|
8821
8821
|
super(), this.isPoints = !0, this.type = "Points", this.geometry = e, this.material = t, this.updateMorphTargets();
|
|
@@ -8825,7 +8825,7 @@ class Zp extends ui {
|
|
|
8825
8825
|
}
|
|
8826
8826
|
raycast(e, t) {
|
|
8827
8827
|
const i = this.geometry, n = this.matrixWorld, r = e.params.Points.threshold, a = i.drawRange;
|
|
8828
|
-
if (i.boundingSphere === null && i.computeBoundingSphere(),
|
|
8828
|
+
if (i.boundingSphere === null && i.computeBoundingSphere(), dh.copy(i.boundingSphere), dh.applyMatrix4(n), dh.radius += r, e.ray.intersectsSphere(dh) === !1)
|
|
8829
8829
|
return;
|
|
8830
8830
|
$g.copy(n).invert(), ap.copy(e.ray).applyMatrix4($g);
|
|
8831
8831
|
const l = r / ((this.scale.x + this.scale.y + this.scale.z) / 3), h = l * l, u = i.index, p = i.attributes.position;
|
|
@@ -8833,12 +8833,12 @@ class Zp extends ui {
|
|
|
8833
8833
|
const m = Math.max(0, a.start), x = Math.min(u.count, a.start + a.count);
|
|
8834
8834
|
for (let w = m, T = x; w < T; w++) {
|
|
8835
8835
|
const _ = u.getX(w);
|
|
8836
|
-
|
|
8836
|
+
fh.fromBufferAttribute(p, _), Jg(fh, _, h, n, e, t, this);
|
|
8837
8837
|
}
|
|
8838
8838
|
} else {
|
|
8839
8839
|
const m = Math.max(0, a.start), x = Math.min(p.count, a.start + a.count);
|
|
8840
8840
|
for (let w = m, T = x; w < T; w++)
|
|
8841
|
-
|
|
8841
|
+
fh.fromBufferAttribute(p, w), Jg(fh, w, h, n, e, t, this);
|
|
8842
8842
|
}
|
|
8843
8843
|
}
|
|
8844
8844
|
updateMorphTargets() {
|
|
@@ -9090,7 +9090,7 @@ function Kp() {
|
|
|
9090
9090
|
}
|
|
9091
9091
|
};
|
|
9092
9092
|
}
|
|
9093
|
-
const
|
|
9093
|
+
const ph = /* @__PURE__ */ new W(), Ld = /* @__PURE__ */ new Kp(), Od = /* @__PURE__ */ new Kp(), Nd = /* @__PURE__ */ new Kp();
|
|
9094
9094
|
class X_ extends Fs {
|
|
9095
9095
|
constructor(e = [], t = !1, i = "centripetal", n = 0.5) {
|
|
9096
9096
|
super(), this.isCatmullRomCurve3 = !0, this.type = "CatmullRomCurve3", this.points = e, this.closed = t, this.curveType = i, this.tension = n;
|
|
@@ -9100,9 +9100,9 @@ class X_ extends Fs {
|
|
|
9100
9100
|
let l = Math.floor(a), h = a - l;
|
|
9101
9101
|
this.closed ? l += l > 0 ? 0 : (Math.floor(Math.abs(l) / r) + 1) * r : h === 0 && l === r - 1 && (l = r - 2, h = 1);
|
|
9102
9102
|
let u, f;
|
|
9103
|
-
this.closed || l > 0 ? u = n[(l - 1) % r] : (
|
|
9103
|
+
this.closed || l > 0 ? u = n[(l - 1) % r] : (ph.subVectors(n[0], n[1]).add(n[0]), u = ph);
|
|
9104
9104
|
const p = n[l % r], m = n[(l + 1) % r];
|
|
9105
|
-
if (this.closed || l + 2 < r ? f = n[(l + 2) % r] : (
|
|
9105
|
+
if (this.closed || l + 2 < r ? f = n[(l + 2) % r] : (ph.subVectors(n[r - 1], n[r - 2]).add(n[r - 1]), f = ph), this.curveType === "centripetal" || this.curveType === "chordal") {
|
|
9106
9106
|
const x = this.curveType === "chordal" ? 0.5 : 0.25;
|
|
9107
9107
|
let w = Math.pow(u.distanceToSquared(p), x), T = Math.pow(p.distanceToSquared(m), x), _ = Math.pow(m.distanceToSquared(f), x);
|
|
9108
9108
|
T < 1e-4 && (T = 1), w < 1e-4 && (w = T), _ < 1e-4 && (_ = T), Ld.initNonuniformCatmullRom(u.x, p.x, m.x, f.x, w, T, _), Od.initNonuniformCatmullRom(u.y, p.y, m.y, f.y, w, T, _), Nd.initNonuniformCatmullRom(u.z, p.z, m.z, f.z, w, T, _);
|
|
@@ -9154,7 +9154,7 @@ function Y_(s, e) {
|
|
|
9154
9154
|
function G_(s, e) {
|
|
9155
9155
|
return s * s * e;
|
|
9156
9156
|
}
|
|
9157
|
-
function
|
|
9157
|
+
function Gl(s, e, t, i) {
|
|
9158
9158
|
return H_(s, e) + Y_(s, t) + G_(s, i);
|
|
9159
9159
|
}
|
|
9160
9160
|
function W_(s, e) {
|
|
@@ -9171,7 +9171,7 @@ function q_(s, e) {
|
|
|
9171
9171
|
function Z_(s, e) {
|
|
9172
9172
|
return s * s * s * e;
|
|
9173
9173
|
}
|
|
9174
|
-
function
|
|
9174
|
+
function Wl(s, e, t, i, n) {
|
|
9175
9175
|
return W_(s, e) + Q_(s, t) + q_(s, i) + Z_(s, n);
|
|
9176
9176
|
}
|
|
9177
9177
|
class Nx extends Fs {
|
|
@@ -9181,8 +9181,8 @@ class Nx extends Fs {
|
|
|
9181
9181
|
getPoint(e, t = new Te()) {
|
|
9182
9182
|
const i = t, n = this.v0, r = this.v1, a = this.v2, l = this.v3;
|
|
9183
9183
|
return i.set(
|
|
9184
|
-
|
|
9185
|
-
|
|
9184
|
+
Wl(e, n.x, r.x, a.x, l.x),
|
|
9185
|
+
Wl(e, n.y, r.y, a.y, l.y)
|
|
9186
9186
|
), i;
|
|
9187
9187
|
}
|
|
9188
9188
|
copy(e) {
|
|
@@ -9203,9 +9203,9 @@ class j_ extends Fs {
|
|
|
9203
9203
|
getPoint(e, t = new W()) {
|
|
9204
9204
|
const i = t, n = this.v0, r = this.v1, a = this.v2, l = this.v3;
|
|
9205
9205
|
return i.set(
|
|
9206
|
-
|
|
9207
|
-
|
|
9208
|
-
|
|
9206
|
+
Wl(e, n.x, r.x, a.x, l.x),
|
|
9207
|
+
Wl(e, n.y, r.y, a.y, l.y),
|
|
9208
|
+
Wl(e, n.z, r.z, a.z, l.z)
|
|
9209
9209
|
), i;
|
|
9210
9210
|
}
|
|
9211
9211
|
copy(e) {
|
|
@@ -9284,8 +9284,8 @@ class zx extends Fs {
|
|
|
9284
9284
|
getPoint(e, t = new Te()) {
|
|
9285
9285
|
const i = t, n = this.v0, r = this.v1, a = this.v2;
|
|
9286
9286
|
return i.set(
|
|
9287
|
-
|
|
9288
|
-
|
|
9287
|
+
Gl(e, n.x, r.x, a.x),
|
|
9288
|
+
Gl(e, n.y, r.y, a.y)
|
|
9289
9289
|
), i;
|
|
9290
9290
|
}
|
|
9291
9291
|
copy(e) {
|
|
@@ -9306,9 +9306,9 @@ class Ux extends Fs {
|
|
|
9306
9306
|
getPoint(e, t = new W()) {
|
|
9307
9307
|
const i = t, n = this.v0, r = this.v1, a = this.v2;
|
|
9308
9308
|
return i.set(
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9309
|
+
Gl(e, n.x, r.x, a.x),
|
|
9310
|
+
Gl(e, n.y, r.y, a.y),
|
|
9311
|
+
Gl(e, n.z, r.z, a.z)
|
|
9312
9312
|
), i;
|
|
9313
9313
|
}
|
|
9314
9314
|
copy(e) {
|
|
@@ -9977,7 +9977,7 @@ class tm extends La {
|
|
|
9977
9977
|
return new tm(e.radius, e.detail);
|
|
9978
9978
|
}
|
|
9979
9979
|
}
|
|
9980
|
-
const
|
|
9980
|
+
const mh = /* @__PURE__ */ new W(), gh = /* @__PURE__ */ new W(), Bd = /* @__PURE__ */ new W(), yh = /* @__PURE__ */ new ln();
|
|
9981
9981
|
class Fo extends Vt {
|
|
9982
9982
|
constructor(e = null, t = 1) {
|
|
9983
9983
|
if (super(), this.type = "EdgesGeometry", this.parameters = {
|
|
@@ -9987,10 +9987,10 @@ class Fo extends Vt {
|
|
|
9987
9987
|
const n = Math.pow(10, 4), r = Math.cos(Ro * t), a = e.getIndex(), l = e.getAttribute("position"), h = a ? a.count : l.count, u = [0, 0, 0], f = ["a", "b", "c"], p = new Array(3), m = {}, x = [];
|
|
9988
9988
|
for (let w = 0; w < h; w += 3) {
|
|
9989
9989
|
a ? (u[0] = a.getX(w), u[1] = a.getX(w + 1), u[2] = a.getX(w + 2)) : (u[0] = w, u[1] = w + 1, u[2] = w + 2);
|
|
9990
|
-
const { a: T, b: _, c: b } =
|
|
9991
|
-
if (T.fromBufferAttribute(l, u[0]), _.fromBufferAttribute(l, u[1]), b.fromBufferAttribute(l, u[2]),
|
|
9990
|
+
const { a: T, b: _, c: b } = yh;
|
|
9991
|
+
if (T.fromBufferAttribute(l, u[0]), _.fromBufferAttribute(l, u[1]), b.fromBufferAttribute(l, u[2]), yh.getNormal(Bd), p[0] = `${Math.round(T.x * n)},${Math.round(T.y * n)},${Math.round(T.z * n)}`, p[1] = `${Math.round(_.x * n)},${Math.round(_.y * n)},${Math.round(_.z * n)}`, p[2] = `${Math.round(b.x * n)},${Math.round(b.y * n)},${Math.round(b.z * n)}`, !(p[0] === p[1] || p[1] === p[2] || p[2] === p[0]))
|
|
9992
9992
|
for (let P = 0; P < 3; P++) {
|
|
9993
|
-
const E = (P + 1) % 3, S = p[P], z = p[E], F =
|
|
9993
|
+
const E = (P + 1) % 3, S = p[P], z = p[E], F = yh[f[P]], k = yh[f[E]], H = `${S}_${z}`, U = `${z}_${S}`;
|
|
9994
9994
|
U in m && m[U] ? (Bd.dot(m[U].normal) <= r && (x.push(F.x, F.y, F.z), x.push(k.x, k.y, k.z)), m[U] = null) : H in m || (m[H] = {
|
|
9995
9995
|
index0: u[P],
|
|
9996
9996
|
index1: u[E],
|
|
@@ -10001,7 +10001,7 @@ class Fo extends Vt {
|
|
|
10001
10001
|
for (const w in m)
|
|
10002
10002
|
if (m[w]) {
|
|
10003
10003
|
const { index0: T, index1: _ } = m[w];
|
|
10004
|
-
|
|
10004
|
+
mh.fromBufferAttribute(l, T), gh.fromBufferAttribute(l, _), x.push(mh.x, mh.y, mh.z), x.push(gh.x, gh.y, gh.z);
|
|
10005
10005
|
}
|
|
10006
10006
|
this.setAttribute("position", new It(x, 3));
|
|
10007
10007
|
}
|
|
@@ -10067,7 +10067,7 @@ const J_ = {
|
|
|
10067
10067
|
p = s[w], m = s[w + 1], p < l && (l = p), m < h && (h = m), p > u && (u = p), m > f && (f = m);
|
|
10068
10068
|
x = Math.max(u - l, f - h), x = x !== 0 ? 32767 / x : 0;
|
|
10069
10069
|
}
|
|
10070
|
-
return
|
|
10070
|
+
return lc(r, a, t, l, h, x, 0), a;
|
|
10071
10071
|
}
|
|
10072
10072
|
};
|
|
10073
10073
|
function kx(s, e, t, i, n) {
|
|
@@ -10078,7 +10078,7 @@ function kx(s, e, t, i, n) {
|
|
|
10078
10078
|
else
|
|
10079
10079
|
for (r = t - i; r >= e; r -= i)
|
|
10080
10080
|
a = t0(r, s[r], s[r + 1], a);
|
|
10081
|
-
return a && Eu(a, a.next) && (
|
|
10081
|
+
return a && Eu(a, a.next) && (hc(a), a = a.next), a;
|
|
10082
10082
|
}
|
|
10083
10083
|
function Ra(s, e) {
|
|
10084
10084
|
if (!s)
|
|
@@ -10087,7 +10087,7 @@ function Ra(s, e) {
|
|
|
10087
10087
|
let t = s, i;
|
|
10088
10088
|
do
|
|
10089
10089
|
if (i = !1, !t.steiner && (Eu(t, t.next) || ki(t.prev, t, t.next) === 0)) {
|
|
10090
|
-
if (
|
|
10090
|
+
if (hc(t), t = e = t.prev, t === t.next)
|
|
10091
10091
|
break;
|
|
10092
10092
|
i = !0;
|
|
10093
10093
|
} else
|
|
@@ -10095,18 +10095,18 @@ function Ra(s, e) {
|
|
|
10095
10095
|
while (i || t !== e);
|
|
10096
10096
|
return e;
|
|
10097
10097
|
}
|
|
10098
|
-
function
|
|
10098
|
+
function lc(s, e, t, i, n, r, a) {
|
|
10099
10099
|
if (!s)
|
|
10100
10100
|
return;
|
|
10101
10101
|
!a && r && cM(s, i, n, r);
|
|
10102
10102
|
let l = s, h, u;
|
|
10103
10103
|
for (; s.prev !== s.next; ) {
|
|
10104
10104
|
if (h = s.prev, u = s.next, r ? tM(s, i, n, r) : eM(s)) {
|
|
10105
|
-
e.push(h.i / t | 0), e.push(s.i / t | 0), e.push(u.i / t | 0),
|
|
10105
|
+
e.push(h.i / t | 0), e.push(s.i / t | 0), e.push(u.i / t | 0), hc(s), s = u.next, l = u.next;
|
|
10106
10106
|
continue;
|
|
10107
10107
|
}
|
|
10108
10108
|
if (s = u, s === l) {
|
|
10109
|
-
a ? a === 1 ? (s = iM(Ra(s), e, t),
|
|
10109
|
+
a ? a === 1 ? (s = iM(Ra(s), e, t), lc(s, e, t, i, n, r, 2)) : a === 2 && nM(s, e, t, i, n, r) : lc(Ra(s), e, t, i, n, r, 1);
|
|
10110
10110
|
break;
|
|
10111
10111
|
}
|
|
10112
10112
|
}
|
|
@@ -10151,7 +10151,7 @@ function iM(s, e, t) {
|
|
|
10151
10151
|
let i = s;
|
|
10152
10152
|
do {
|
|
10153
10153
|
const n = i.prev, r = i.next.next;
|
|
10154
|
-
!Eu(n, r) && Vx(n, i, i.next, r) &&
|
|
10154
|
+
!Eu(n, r) && Vx(n, i, i.next, r) && cc(n, r) && cc(r, n) && (e.push(n.i / t | 0), e.push(i.i / t | 0), e.push(r.i / t | 0), hc(i), hc(i.next), i = s = r), i = i.next;
|
|
10155
10155
|
} while (i !== s);
|
|
10156
10156
|
return Ra(i);
|
|
10157
10157
|
}
|
|
@@ -10162,7 +10162,7 @@ function nM(s, e, t, i, n, r) {
|
|
|
10162
10162
|
for (; l !== a.prev; ) {
|
|
10163
10163
|
if (a.i !== l.i && dM(a, l)) {
|
|
10164
10164
|
let h = Xx(a, l);
|
|
10165
|
-
a = Ra(a, a.next), h = Ra(h, h.next),
|
|
10165
|
+
a = Ra(a, a.next), h = Ra(h, h.next), lc(a, e, t, i, n, r, 0), lc(h, e, t, i, n, r, 0);
|
|
10166
10166
|
return;
|
|
10167
10167
|
}
|
|
10168
10168
|
l = l.next;
|
|
@@ -10206,7 +10206,7 @@ function oM(s, e) {
|
|
|
10206
10206
|
let f = 1 / 0, p;
|
|
10207
10207
|
t = n;
|
|
10208
10208
|
do
|
|
10209
|
-
r >= t.x && t.x >= h && r !== t.x && Mo(a < u ? r : i, a, h, u, a < u ? i : r, a, t.x, t.y) && (p = Math.abs(a - t.y) / (r - t.x),
|
|
10209
|
+
r >= t.x && t.x >= h && r !== t.x && Mo(a < u ? r : i, a, h, u, a < u ? i : r, a, t.x, t.y) && (p = Math.abs(a - t.y) / (r - t.x), cc(t, s) && (p < f || p === f && (t.x > n.x || t.x === n.x && lM(n, t))) && (n = t, f = p)), t = t.next;
|
|
10210
10210
|
while (t !== l);
|
|
10211
10211
|
return n;
|
|
10212
10212
|
}
|
|
@@ -10249,7 +10249,7 @@ function Mo(s, e, t, i, n, r, a, l) {
|
|
|
10249
10249
|
}
|
|
10250
10250
|
function dM(s, e) {
|
|
10251
10251
|
return s.next.i !== e.i && s.prev.i !== e.i && !fM(s, e) && // dones't intersect other edges
|
|
10252
|
-
(
|
|
10252
|
+
(cc(s, e) && cc(e, s) && pM(s, e) && // locally visible
|
|
10253
10253
|
(ki(s.prev, s, e.prev) || ki(s, e.prev, e)) || // does not create opposite-facing sectors
|
|
10254
10254
|
Eu(s, e) && ki(s.prev, s, s.next) > 0 && ki(e.prev, e, e.next) > 0);
|
|
10255
10255
|
}
|
|
@@ -10260,13 +10260,13 @@ function Eu(s, e) {
|
|
|
10260
10260
|
return s.x === e.x && s.y === e.y;
|
|
10261
10261
|
}
|
|
10262
10262
|
function Vx(s, e, t, i) {
|
|
10263
|
-
const n =
|
|
10264
|
-
return !!(n !== r && a !== l || n === 0 &&
|
|
10263
|
+
const n = vh(ki(s, e, t)), r = vh(ki(s, e, i)), a = vh(ki(t, i, s)), l = vh(ki(t, i, e));
|
|
10264
|
+
return !!(n !== r && a !== l || n === 0 && xh(s, t, e) || r === 0 && xh(s, i, e) || a === 0 && xh(t, s, i) || l === 0 && xh(t, e, i));
|
|
10265
10265
|
}
|
|
10266
|
-
function
|
|
10266
|
+
function xh(s, e, t) {
|
|
10267
10267
|
return e.x <= Math.max(s.x, t.x) && e.x >= Math.min(s.x, t.x) && e.y <= Math.max(s.y, t.y) && e.y >= Math.min(s.y, t.y);
|
|
10268
10268
|
}
|
|
10269
|
-
function
|
|
10269
|
+
function vh(s) {
|
|
10270
10270
|
return s > 0 ? 1 : s < 0 ? -1 : 0;
|
|
10271
10271
|
}
|
|
10272
10272
|
function fM(s, e) {
|
|
@@ -10278,7 +10278,7 @@ function fM(s, e) {
|
|
|
10278
10278
|
} while (t !== s);
|
|
10279
10279
|
return !1;
|
|
10280
10280
|
}
|
|
10281
|
-
function
|
|
10281
|
+
function cc(s, e) {
|
|
10282
10282
|
return ki(s.prev, s, s.next) < 0 ? ki(s, e, s.next) >= 0 && ki(s, s.prev, e) >= 0 : ki(s, e, s.prev) < 0 || ki(s, s.next, e) < 0;
|
|
10283
10283
|
}
|
|
10284
10284
|
function pM(s, e) {
|
|
@@ -10297,7 +10297,7 @@ function t0(s, e, t, i) {
|
|
|
10297
10297
|
const n = new hp(s, e, t);
|
|
10298
10298
|
return i ? (n.next = i.next, n.prev = i, i.next.prev = n, i.next = n) : (n.prev = n, n.next = n), n;
|
|
10299
10299
|
}
|
|
10300
|
-
function
|
|
10300
|
+
function hc(s) {
|
|
10301
10301
|
s.next.prev = s.prev, s.prev.next = s.next, s.prevZ && (s.prevZ.nextZ = s.nextZ), s.nextZ && (s.nextZ.prevZ = s.prevZ);
|
|
10302
10302
|
}
|
|
10303
10303
|
function hp(s, e, t) {
|
|
@@ -10863,7 +10863,7 @@ function xM(s, e) {
|
|
|
10863
10863
|
e.shapes.push(s.uuid);
|
|
10864
10864
|
return e;
|
|
10865
10865
|
}
|
|
10866
|
-
class
|
|
10866
|
+
class bc extends Vt {
|
|
10867
10867
|
constructor(e = 1, t = 32, i = 16, n = 0, r = Math.PI * 2, a = 0, l = Math.PI) {
|
|
10868
10868
|
super(), this.type = "SphereGeometry", this.parameters = {
|
|
10869
10869
|
radius: e,
|
|
@@ -10898,7 +10898,7 @@ class vc extends Vt {
|
|
|
10898
10898
|
return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
|
|
10899
10899
|
}
|
|
10900
10900
|
static fromJSON(e) {
|
|
10901
|
-
return new
|
|
10901
|
+
return new bc(e.radius, e.widthSegments, e.heightSegments, e.phiStart, e.phiLength, e.thetaStart, e.thetaLength);
|
|
10902
10902
|
}
|
|
10903
10903
|
}
|
|
10904
10904
|
class om extends La {
|
|
@@ -11117,7 +11117,7 @@ var r0 = /* @__PURE__ */ Object.freeze({
|
|
|
11117
11117
|
PolyhedronGeometry: La,
|
|
11118
11118
|
RingGeometry: rm,
|
|
11119
11119
|
ShapeGeometry: am,
|
|
11120
|
-
SphereGeometry:
|
|
11120
|
+
SphereGeometry: bc,
|
|
11121
11121
|
TetrahedronGeometry: om,
|
|
11122
11122
|
TorusGeometry: Fr,
|
|
11123
11123
|
TorusKnotGeometry: lm,
|
|
@@ -11137,7 +11137,7 @@ class hm extends hi {
|
|
|
11137
11137
|
super(e), this.isRawShaderMaterial = !0, this.type = "RawShaderMaterial";
|
|
11138
11138
|
}
|
|
11139
11139
|
}
|
|
11140
|
-
class
|
|
11140
|
+
class wc extends hn {
|
|
11141
11141
|
constructor(e) {
|
|
11142
11142
|
super(), this.isMeshStandardMaterial = !0, this.type = "MeshStandardMaterial", this.defines = { STANDARD: "" }, this.color = new ut(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 ut(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Da, this.normalScale = new Te(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 zn(), this.envMapIntensity = 1, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
|
|
11143
11143
|
}
|
|
@@ -11145,7 +11145,7 @@ class bc extends hn {
|
|
|
11145
11145
|
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;
|
|
11146
11146
|
}
|
|
11147
11147
|
}
|
|
11148
|
-
class Ts extends
|
|
11148
|
+
class Ts extends wc {
|
|
11149
11149
|
constructor(e) {
|
|
11150
11150
|
super(), this.isMeshPhysicalMaterial = !0, this.defines = {
|
|
11151
11151
|
STANDARD: "",
|
|
@@ -11266,7 +11266,7 @@ class SM extends Kn {
|
|
|
11266
11266
|
return super.copy(e), this.scale = e.scale, this.dashSize = e.dashSize, this.gapSize = e.gapSize, this;
|
|
11267
11267
|
}
|
|
11268
11268
|
}
|
|
11269
|
-
function
|
|
11269
|
+
function bh(s, e, t) {
|
|
11270
11270
|
return !s || // let 'undefined' and 'null' pass
|
|
11271
11271
|
!t && s.constructor === e ? s : typeof e.BYTES_PER_ELEMENT == "number" ? new e(s) : Array.prototype.slice.call(s);
|
|
11272
11272
|
}
|
|
@@ -11312,7 +11312,7 @@ function Wx(s, e, t, i) {
|
|
|
11312
11312
|
a = r[i], a !== void 0 && (e.push(r.time), t.push(a)), r = s[n++];
|
|
11313
11313
|
while (r !== void 0);
|
|
11314
11314
|
}
|
|
11315
|
-
class
|
|
11315
|
+
class _c {
|
|
11316
11316
|
constructor(e, t, i, n) {
|
|
11317
11317
|
this.parameterPositions = e, this._cachedIndex = 0, this.resultBuffer = n !== void 0 ? n : new t.constructor(i), this.sampleValues = t, this.valueSize = i, this.settings = null, this.DefaultSettings_ = {};
|
|
11318
11318
|
}
|
|
@@ -11384,7 +11384,7 @@ class wc {
|
|
|
11384
11384
|
intervalChanged_() {
|
|
11385
11385
|
}
|
|
11386
11386
|
}
|
|
11387
|
-
class EM extends
|
|
11387
|
+
class EM extends _c {
|
|
11388
11388
|
constructor(e, t, i, n) {
|
|
11389
11389
|
super(e, t, i, n), this._weightPrev = -0, this._offsetPrev = -0, this._weightNext = -0, this._offsetNext = -0, this.DefaultSettings_ = {
|
|
11390
11390
|
endingStart: vo,
|
|
@@ -11426,7 +11426,7 @@ class EM extends wc {
|
|
|
11426
11426
|
return r;
|
|
11427
11427
|
}
|
|
11428
11428
|
}
|
|
11429
|
-
class Qx extends
|
|
11429
|
+
class Qx extends _c {
|
|
11430
11430
|
constructor(e, t, i, n) {
|
|
11431
11431
|
super(e, t, i, n);
|
|
11432
11432
|
}
|
|
@@ -11437,7 +11437,7 @@ class Qx extends wc {
|
|
|
11437
11437
|
return r;
|
|
11438
11438
|
}
|
|
11439
11439
|
}
|
|
11440
|
-
class PM extends
|
|
11440
|
+
class PM extends _c {
|
|
11441
11441
|
constructor(e, t, i, n) {
|
|
11442
11442
|
super(e, t, i, n);
|
|
11443
11443
|
}
|
|
@@ -11451,7 +11451,7 @@ class ks {
|
|
|
11451
11451
|
throw new Error("THREE.KeyframeTrack: track name is undefined");
|
|
11452
11452
|
if (t === void 0 || t.length === 0)
|
|
11453
11453
|
throw new Error("THREE.KeyframeTrack: no keyframes in track named " + e);
|
|
11454
|
-
this.name = e, this.times =
|
|
11454
|
+
this.name = e, this.times = bh(t, this.TimeBufferType), this.values = bh(i, this.ValueBufferType), this.setInterpolation(n || this.DefaultInterpolation);
|
|
11455
11455
|
}
|
|
11456
11456
|
// Serialization (in static context, because of constructor invocation
|
|
11457
11457
|
// and automatic invocation of .toJSON):
|
|
@@ -11463,8 +11463,8 @@ class ks {
|
|
|
11463
11463
|
else {
|
|
11464
11464
|
i = {
|
|
11465
11465
|
name: e.name,
|
|
11466
|
-
times:
|
|
11467
|
-
values:
|
|
11466
|
+
times: bh(e.times, Array),
|
|
11467
|
+
values: bh(e.values, Array)
|
|
11468
11468
|
};
|
|
11469
11469
|
const n = e.getInterpolation();
|
|
11470
11470
|
n !== e.DefaultInterpolation && (i.interpolation = n);
|
|
@@ -11483,10 +11483,10 @@ class ks {
|
|
|
11483
11483
|
setInterpolation(e) {
|
|
11484
11484
|
let t;
|
|
11485
11485
|
switch (e) {
|
|
11486
|
-
case
|
|
11486
|
+
case rc:
|
|
11487
11487
|
t = this.InterpolantFactoryMethodDiscrete;
|
|
11488
11488
|
break;
|
|
11489
|
-
case
|
|
11489
|
+
case ac:
|
|
11490
11490
|
t = this.InterpolantFactoryMethodLinear;
|
|
11491
11491
|
break;
|
|
11492
11492
|
case rd:
|
|
@@ -11507,9 +11507,9 @@ class ks {
|
|
|
11507
11507
|
getInterpolation() {
|
|
11508
11508
|
switch (this.createInterpolant) {
|
|
11509
11509
|
case this.InterpolantFactoryMethodDiscrete:
|
|
11510
|
-
return sc;
|
|
11511
|
-
case this.InterpolantFactoryMethodLinear:
|
|
11512
11510
|
return rc;
|
|
11511
|
+
case this.InterpolantFactoryMethodLinear:
|
|
11512
|
+
return ac;
|
|
11513
11513
|
case this.InterpolantFactoryMethodSmooth:
|
|
11514
11514
|
return rd;
|
|
11515
11515
|
}
|
|
@@ -11627,7 +11627,7 @@ class ks {
|
|
|
11627
11627
|
}
|
|
11628
11628
|
ks.prototype.TimeBufferType = Float32Array;
|
|
11629
11629
|
ks.prototype.ValueBufferType = Float32Array;
|
|
11630
|
-
ks.prototype.DefaultInterpolation =
|
|
11630
|
+
ks.prototype.DefaultInterpolation = ac;
|
|
11631
11631
|
class qo extends ks {
|
|
11632
11632
|
// No interpolation parameter because only InterpolateDiscrete is valid.
|
|
11633
11633
|
constructor(e, t, i) {
|
|
@@ -11636,7 +11636,7 @@ class qo extends ks {
|
|
|
11636
11636
|
}
|
|
11637
11637
|
qo.prototype.ValueTypeName = "bool";
|
|
11638
11638
|
qo.prototype.ValueBufferType = Array;
|
|
11639
|
-
qo.prototype.DefaultInterpolation =
|
|
11639
|
+
qo.prototype.DefaultInterpolation = rc;
|
|
11640
11640
|
qo.prototype.InterpolantFactoryMethodLinear = void 0;
|
|
11641
11641
|
qo.prototype.InterpolantFactoryMethodSmooth = void 0;
|
|
11642
11642
|
class qx extends ks {
|
|
@@ -11645,7 +11645,7 @@ qx.prototype.ValueTypeName = "color";
|
|
|
11645
11645
|
class ko extends ks {
|
|
11646
11646
|
}
|
|
11647
11647
|
ko.prototype.ValueTypeName = "number";
|
|
11648
|
-
class CM extends
|
|
11648
|
+
class CM extends _c {
|
|
11649
11649
|
constructor(e, t, i, n) {
|
|
11650
11650
|
super(e, t, i, n);
|
|
11651
11651
|
}
|
|
@@ -11672,7 +11672,7 @@ class Zo extends ks {
|
|
|
11672
11672
|
}
|
|
11673
11673
|
Zo.prototype.ValueTypeName = "string";
|
|
11674
11674
|
Zo.prototype.ValueBufferType = Array;
|
|
11675
|
-
Zo.prototype.DefaultInterpolation =
|
|
11675
|
+
Zo.prototype.DefaultInterpolation = rc;
|
|
11676
11676
|
Zo.prototype.InterpolantFactoryMethodLinear = void 0;
|
|
11677
11677
|
Zo.prototype.InterpolantFactoryMethodSmooth = void 0;
|
|
11678
11678
|
class Xo extends ks {
|
|
@@ -12076,7 +12076,7 @@ class up extends Ar {
|
|
|
12076
12076
|
return r.manager.itemStart(e), setTimeout(function() {
|
|
12077
12077
|
t && t(a), r.manager.itemEnd(e);
|
|
12078
12078
|
}, 0), a;
|
|
12079
|
-
const l =
|
|
12079
|
+
const l = oc("img");
|
|
12080
12080
|
function h() {
|
|
12081
12081
|
f(), Vr.add(e, this), t && t(this), r.manager.itemEnd(e);
|
|
12082
12082
|
}
|
|
@@ -12125,7 +12125,7 @@ class OM extends Oa {
|
|
|
12125
12125
|
const zd = /* @__PURE__ */ new ot(), o0 = /* @__PURE__ */ new W(), l0 = /* @__PURE__ */ new W();
|
|
12126
12126
|
class um {
|
|
12127
12127
|
constructor(e) {
|
|
12128
|
-
this.camera = e, this.intensity = 1, this.bias = 0, this.normalBias = 0, this.radius = 1, this.blurSamples = 8, this.mapSize = new Te(512, 512), this.map = null, this.mapPass = null, this.matrix = new ot(), this.autoUpdate = !0, this.needsUpdate = !1, this._frustum = new
|
|
12128
|
+
this.camera = e, this.intensity = 1, this.bias = 0, this.normalBias = 0, this.radius = 1, this.blurSamples = 8, this.mapSize = new Te(512, 512), this.map = null, this.mapPass = null, this.matrix = new ot(), this.autoUpdate = !0, this.needsUpdate = !1, this._frustum = new vc(), this._frameExtents = new Te(1, 1), this._viewportCount = 1, this._viewports = [
|
|
12129
12129
|
new si(0, 0, 1, 1)
|
|
12130
12130
|
];
|
|
12131
12131
|
}
|
|
@@ -12512,7 +12512,7 @@ class dm extends Ar {
|
|
|
12512
12512
|
ShaderMaterial: hi,
|
|
12513
12513
|
PointsMaterial: qp,
|
|
12514
12514
|
MeshPhysicalMaterial: Ts,
|
|
12515
|
-
MeshStandardMaterial:
|
|
12515
|
+
MeshStandardMaterial: wc,
|
|
12516
12516
|
MeshPhongMaterial: _r,
|
|
12517
12517
|
MeshToonMaterial: wM,
|
|
12518
12518
|
MeshNormalMaterial: Hx,
|
|
@@ -12867,7 +12867,7 @@ class HM extends Ar {
|
|
|
12867
12867
|
let f, p;
|
|
12868
12868
|
switch (e.type) {
|
|
12869
12869
|
case "Scene":
|
|
12870
|
-
a = new
|
|
12870
|
+
a = new xc(), e.background !== void 0 && (Number.isInteger(e.background) ? a.background = new ut(e.background) : a.background = u(e.background)), e.environment !== void 0 && (a.environment = u(e.environment)), e.fog !== void 0 && (e.fog.type === "Fog" ? a.fog = new Yp(e.fog.color, e.fog.near, e.fog.far) : e.fog.type === "FogExp2" && (a.fog = new Hp(e.fog.color, e.fog.density)), e.fog.name !== "" && (a.fog.name = e.fog.name)), e.backgroundBlurriness !== void 0 && (a.backgroundBlurriness = e.backgroundBlurriness), e.backgroundIntensity !== void 0 && (a.backgroundIntensity = e.backgroundIntensity), e.backgroundRotation !== void 0 && a.backgroundRotation.fromArray(e.backgroundRotation), e.environmentIntensity !== void 0 && (a.environmentIntensity = e.environmentIntensity), e.environmentRotation !== void 0 && a.environmentRotation.fromArray(e.environmentRotation);
|
|
12871
12871
|
break;
|
|
12872
12872
|
case "PerspectiveCamera":
|
|
12873
12873
|
a = new mn(e.fov, e.aspect, e.near, e.far), e.focus !== void 0 && (a.focus = e.focus), e.zoom !== void 0 && (a.zoom = e.zoom), e.filmGauge !== void 0 && (a.filmGauge = e.filmGauge), e.filmOffset !== void 0 && (a.filmOffset = e.filmOffset), e.view !== void 0 && (a.view = Object.assign({}, e.view));
|
|
@@ -12993,17 +12993,17 @@ const YM = {
|
|
|
12993
12993
|
CubeRefractionMapping: Pa,
|
|
12994
12994
|
EquirectangularReflectionMapping: cu,
|
|
12995
12995
|
EquirectangularRefractionMapping: hu,
|
|
12996
|
-
CubeUVReflectionMapping:
|
|
12996
|
+
CubeUVReflectionMapping: gc
|
|
12997
12997
|
}, h0 = {
|
|
12998
12998
|
RepeatWrapping: Ms,
|
|
12999
12999
|
ClampToEdgeWrapping: mr,
|
|
13000
|
-
MirroredRepeatWrapping:
|
|
13000
|
+
MirroredRepeatWrapping: nc
|
|
13001
13001
|
}, u0 = {
|
|
13002
13002
|
NearestFilter: pi,
|
|
13003
13003
|
NearestMipmapNearestFilter: Dp,
|
|
13004
13004
|
NearestMipmapLinearFilter: xo,
|
|
13005
13005
|
LinearFilter: Pi,
|
|
13006
|
-
LinearMipmapNearestFilter:
|
|
13006
|
+
LinearMipmapNearestFilter: Hl,
|
|
13007
13007
|
LinearMipmapLinearFilter: Ns
|
|
13008
13008
|
};
|
|
13009
13009
|
class GM extends Ar {
|
|
@@ -13964,7 +13964,7 @@ class rS extends Sr {
|
|
|
13964
13964
|
}
|
|
13965
13965
|
}
|
|
13966
13966
|
const f0 = /* @__PURE__ */ new ot();
|
|
13967
|
-
class
|
|
13967
|
+
class Mc {
|
|
13968
13968
|
constructor(e, t, i = 0, n = 1 / 0) {
|
|
13969
13969
|
this.ray = new Qo(e, t), this.near = i, this.far = n, this.camera = null, this.layers = new kp(), this.params = {
|
|
13970
13970
|
Mesh: {},
|
|
@@ -14027,7 +14027,7 @@ class tv {
|
|
|
14027
14027
|
return new this.constructor().copy(this);
|
|
14028
14028
|
}
|
|
14029
14029
|
}
|
|
14030
|
-
const m0 = /* @__PURE__ */ new W(),
|
|
14030
|
+
const m0 = /* @__PURE__ */ new W(), wh = /* @__PURE__ */ new W();
|
|
14031
14031
|
class vr {
|
|
14032
14032
|
constructor(e = new W(), t = new W()) {
|
|
14033
14033
|
this.start = e, this.end = t;
|
|
@@ -14054,9 +14054,9 @@ class vr {
|
|
|
14054
14054
|
return this.delta(t).multiplyScalar(e).add(this.start);
|
|
14055
14055
|
}
|
|
14056
14056
|
closestPointToPointParameter(e, t) {
|
|
14057
|
-
m0.subVectors(e, this.start),
|
|
14058
|
-
const i =
|
|
14059
|
-
let r =
|
|
14057
|
+
m0.subVectors(e, this.start), wh.subVectors(this.end, this.start);
|
|
14058
|
+
const i = wh.dot(wh);
|
|
14059
|
+
let r = wh.dot(m0) / i;
|
|
14060
14060
|
return t && (r = Gt(r, 0, 1)), r;
|
|
14061
14061
|
}
|
|
14062
14062
|
closestPointToPoint(e, t, i) {
|
|
@@ -14073,7 +14073,7 @@ class vr {
|
|
|
14073
14073
|
return new this.constructor().copy(this);
|
|
14074
14074
|
}
|
|
14075
14075
|
}
|
|
14076
|
-
const
|
|
14076
|
+
const _h = /* @__PURE__ */ new W(), Gi = /* @__PURE__ */ new Vp();
|
|
14077
14077
|
class aS extends Ss {
|
|
14078
14078
|
constructor(e) {
|
|
14079
14079
|
const t = new Vt(), i = new Kn({ color: 16777215, vertexColors: !0, toneMapped: !1 }), n = [], r = [], a = {};
|
|
@@ -14101,24 +14101,24 @@ class aS extends Ss {
|
|
|
14101
14101
|
}
|
|
14102
14102
|
}
|
|
14103
14103
|
function ji(s, e, t, i, n, r, a) {
|
|
14104
|
-
|
|
14104
|
+
_h.set(n, r, a).unproject(i);
|
|
14105
14105
|
const l = e[s];
|
|
14106
14106
|
if (l !== void 0) {
|
|
14107
14107
|
const h = t.getAttribute("position");
|
|
14108
14108
|
for (let u = 0, f = l.length; u < f; u++)
|
|
14109
|
-
h.setXYZ(l[u],
|
|
14109
|
+
h.setXYZ(l[u], _h.x, _h.y, _h.z);
|
|
14110
14110
|
}
|
|
14111
14111
|
}
|
|
14112
|
-
const
|
|
14112
|
+
const Mh = /* @__PURE__ */ new li();
|
|
14113
14113
|
class oS extends Ss {
|
|
14114
14114
|
constructor(e, t = 16776960) {
|
|
14115
14115
|
const i = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]), n = new Float32Array(8 * 3), r = new Vt();
|
|
14116
14116
|
r.setIndex(new jt(i, 1)), r.setAttribute("position", new jt(n, 3)), super(r, new Kn({ color: t, toneMapped: !1 })), this.object = e, this.type = "BoxHelper", this.matrixAutoUpdate = !1, this.update();
|
|
14117
14117
|
}
|
|
14118
14118
|
update(e) {
|
|
14119
|
-
if (e !== void 0 && console.warn("THREE.BoxHelper: .update() has no longer arguments."), this.object !== void 0 &&
|
|
14119
|
+
if (e !== void 0 && console.warn("THREE.BoxHelper: .update() has no longer arguments."), this.object !== void 0 && Mh.setFromObject(this.object), Mh.isEmpty())
|
|
14120
14120
|
return;
|
|
14121
|
-
const t =
|
|
14121
|
+
const t = Mh.min, i = Mh.max, n = this.geometry.attributes.position, r = n.array;
|
|
14122
14122
|
r[0] = i.x, r[1] = i.y, r[2] = i.z, r[3] = t.x, r[4] = i.y, r[5] = i.z, r[6] = t.x, r[7] = t.y, r[8] = i.z, r[9] = i.x, r[10] = t.y, r[11] = i.z, r[12] = i.x, r[13] = i.y, r[14] = t.z, r[15] = t.x, r[16] = i.y, r[17] = t.z, r[18] = t.x, r[19] = t.y, r[20] = t.z, r[21] = i.x, r[22] = t.y, r[23] = t.z, n.needsUpdate = !0, this.geometry.computeBoundingSphere();
|
|
14123
14123
|
}
|
|
14124
14124
|
setFromObject(e) {
|
|
@@ -14206,7 +14206,7 @@ function g0(s, e, t, i) {
|
|
|
14206
14206
|
return s * e;
|
|
14207
14207
|
case wx:
|
|
14208
14208
|
return s * e * 2;
|
|
14209
|
-
case
|
|
14209
|
+
case yc:
|
|
14210
14210
|
return s * e / n.components * n.byteLength;
|
|
14211
14211
|
case Mu:
|
|
14212
14212
|
return s * e / n.components * n.byteLength;
|
|
@@ -14220,11 +14220,11 @@ function g0(s, e, t, i) {
|
|
|
14220
14220
|
return s * e * 4 / n.components * n.byteLength;
|
|
14221
14221
|
case zp:
|
|
14222
14222
|
return s * e * 4 / n.components * n.byteLength;
|
|
14223
|
-
case jh:
|
|
14224
14223
|
case Kh:
|
|
14225
|
-
return Math.floor((s + 3) / 4) * Math.floor((e + 3) / 4) * 8;
|
|
14226
14224
|
case $h:
|
|
14225
|
+
return Math.floor((s + 3) / 4) * Math.floor((e + 3) / 4) * 8;
|
|
14227
14226
|
case Jh:
|
|
14227
|
+
case eu:
|
|
14228
14228
|
return Math.floor((s + 3) / 4) * Math.floor((e + 3) / 4) * 16;
|
|
14229
14229
|
case If:
|
|
14230
14230
|
case Lf:
|
|
@@ -14265,7 +14265,7 @@ function g0(s, e, t, i) {
|
|
|
14265
14265
|
return Math.floor((s + 11) / 12) * Math.floor((e + 9) / 10) * 16;
|
|
14266
14266
|
case jf:
|
|
14267
14267
|
return Math.floor((s + 11) / 12) * Math.floor((e + 11) / 12) * 16;
|
|
14268
|
-
case
|
|
14268
|
+
case tu:
|
|
14269
14269
|
case Kf:
|
|
14270
14270
|
case $f:
|
|
14271
14271
|
return Math.ceil(s / 4) * Math.ceil(e / 4) * 16;
|
|
@@ -14285,7 +14285,7 @@ function hS(s) {
|
|
|
14285
14285
|
case wr:
|
|
14286
14286
|
case mx:
|
|
14287
14287
|
return { byteLength: 1, components: 1 };
|
|
14288
|
-
case
|
|
14288
|
+
case sc:
|
|
14289
14289
|
case gx:
|
|
14290
14290
|
case pn:
|
|
14291
14291
|
return { byteLength: 2, components: 1 };
|
|
@@ -18537,7 +18537,7 @@ Ds.physical = {
|
|
|
18537
18537
|
vertexShader: Zt.meshphysical_vert,
|
|
18538
18538
|
fragmentShader: Zt.meshphysical_frag
|
|
18539
18539
|
};
|
|
18540
|
-
const
|
|
18540
|
+
const Sh = { r: 0, b: 0, g: 0 }, ua = /* @__PURE__ */ new zn(), GT = /* @__PURE__ */ new ot();
|
|
18541
18541
|
function WT(s, e, t, i, n, r, a) {
|
|
18542
18542
|
const l = new ut(0);
|
|
18543
18543
|
let h = r === !0 ? 0 : 1, u, f, p = null, m = 0, x = null;
|
|
@@ -18554,7 +18554,7 @@ function WT(s, e, t, i, n, r, a) {
|
|
|
18554
18554
|
}
|
|
18555
18555
|
function _(E, S) {
|
|
18556
18556
|
const z = w(S);
|
|
18557
|
-
z && (z.isCubeTexture || z.mapping ===
|
|
18557
|
+
z && (z.isCubeTexture || z.mapping === gc) ? (f === void 0 && (f = new de(
|
|
18558
18558
|
new zi(1, 1, 1),
|
|
18559
18559
|
new hi({
|
|
18560
18560
|
name: "BackgroundCubeMaterial",
|
|
@@ -18591,7 +18591,7 @@ function WT(s, e, t, i, n, r, a) {
|
|
|
18591
18591
|
}), n.update(u)), u.material.uniforms.t2D.value = z, u.material.uniforms.backgroundIntensity.value = S.backgroundIntensity, u.material.toneMapped = ii.getTransfer(z.colorSpace) !== wi, z.matrixAutoUpdate === !0 && z.updateMatrix(), u.material.uniforms.uvTransform.value.copy(z.matrix), (p !== z || m !== z.version || x !== s.toneMapping) && (u.material.needsUpdate = !0, p = z, m = z.version, x = s.toneMapping), u.layers.enableAll(), E.unshift(u, u.geometry, u.material, 0, 0, null));
|
|
18592
18592
|
}
|
|
18593
18593
|
function b(E, S) {
|
|
18594
|
-
E.getRGB(
|
|
18594
|
+
E.getRGB(Sh, Ix(s)), i.buffers.color.setClear(Sh.r, Sh.g, Sh.b, S, a);
|
|
18595
18595
|
}
|
|
18596
18596
|
function P() {
|
|
18597
18597
|
f !== void 0 && (f.geometry.dispose(), f.material.dispose()), u !== void 0 && (u.geometry.dispose(), u.material.dispose());
|
|
@@ -19085,7 +19085,7 @@ class b0 {
|
|
|
19085
19085
|
this._lodPlanes[e].dispose();
|
|
19086
19086
|
}
|
|
19087
19087
|
_cleanup(e) {
|
|
19088
|
-
this._renderer.setRenderTarget(kd, Vd, Xd), this._renderer.xr.enabled = Hd, e.scissorTest = !1,
|
|
19088
|
+
this._renderer.setRenderTarget(kd, Vd, Xd), this._renderer.xr.enabled = Hd, e.scissorTest = !1, Ah(e, 0, 0, e.width, e.height);
|
|
19089
19089
|
}
|
|
19090
19090
|
_fromTexture(e, t) {
|
|
19091
19091
|
e.mapping === Ea || e.mapping === Pa ? this._setSize(e.image.length === 0 ? 16 : e.image[0].width || e.image[0].image.width) : this._setSize(e.image.width / 4), kd = this._renderer.getRenderTarget(), Vd = this._renderer.getActiveCubeFace(), Xd = this._renderer.getActiveMipmapLevel(), Hd = this._renderer.xr.enabled, this._renderer.xr.enabled = !1;
|
|
@@ -19129,7 +19129,7 @@ class b0 {
|
|
|
19129
19129
|
const P = b % 3;
|
|
19130
19130
|
P === 0 ? (l.up.set(0, h[b], 0), l.lookAt(u[b], 0, 0)) : P === 1 ? (l.up.set(0, 0, h[b]), l.lookAt(0, u[b], 0)) : (l.up.set(0, h[b], 0), l.lookAt(0, 0, u[b]));
|
|
19131
19131
|
const E = this._cubeSize;
|
|
19132
|
-
|
|
19132
|
+
Ah(n, P * E, b > 2 ? E : 0, E, E), f.setRenderTarget(n), T && f.render(w, l), f.render(e, l);
|
|
19133
19133
|
}
|
|
19134
19134
|
w.geometry.dispose(), w.material.dispose(), f.toneMapping = m, f.autoClear = p, e.background = _;
|
|
19135
19135
|
}
|
|
@@ -19139,7 +19139,7 @@ class b0 {
|
|
|
19139
19139
|
const r = n ? this._cubemapMaterial : this._equirectMaterial, a = new de(this._lodPlanes[0], r), l = r.uniforms;
|
|
19140
19140
|
l.envMap.value = e;
|
|
19141
19141
|
const h = this._cubeSize;
|
|
19142
|
-
|
|
19142
|
+
Ah(t, 0, 0, 3 * h, 2 * h), i.setRenderTarget(t), i.render(a, Fd);
|
|
19143
19143
|
}
|
|
19144
19144
|
_applyPMREM(e) {
|
|
19145
19145
|
const t = this._renderer, i = t.autoClear;
|
|
@@ -19197,7 +19197,7 @@ class b0 {
|
|
|
19197
19197
|
const { _lodMax: E } = this;
|
|
19198
19198
|
m.dTheta.value = w, m.mipInt.value = E - i;
|
|
19199
19199
|
const S = this._sizeLods[n], z = 3 * S * (n > E - Ao ? n - E + Ao : 0), F = 4 * (this._cubeSize - S);
|
|
19200
|
-
|
|
19200
|
+
Ah(t, z, F, 3 * S, 2 * S), h.setRenderTarget(t), h.render(p, Fd);
|
|
19201
19201
|
}
|
|
19202
19202
|
}
|
|
19203
19203
|
function $T(s) {
|
|
@@ -19242,9 +19242,9 @@ function $T(s) {
|
|
|
19242
19242
|
}
|
|
19243
19243
|
function w0(s, e, t) {
|
|
19244
19244
|
const i = new Wi(s, e, t);
|
|
19245
|
-
return i.texture.mapping =
|
|
19245
|
+
return i.texture.mapping = gc, i.texture.name = "PMREM.cubeUv", i.scissorTest = !0, i;
|
|
19246
19246
|
}
|
|
19247
|
-
function
|
|
19247
|
+
function Ah(s, e, t, i, n) {
|
|
19248
19248
|
s.viewport.set(e, t, i, n), s.scissor.set(e, t, i, n);
|
|
19249
19249
|
}
|
|
19250
19250
|
function JT(s, e, t) {
|
|
@@ -19465,7 +19465,7 @@ function mm() {
|
|
|
19465
19465
|
`
|
|
19466
19466
|
);
|
|
19467
19467
|
}
|
|
19468
|
-
function
|
|
19468
|
+
function e2(s) {
|
|
19469
19469
|
let e = /* @__PURE__ */ new WeakMap(), t = null;
|
|
19470
19470
|
function i(l) {
|
|
19471
19471
|
if (l && l.isTexture) {
|
|
@@ -19506,7 +19506,7 @@ function eE(s) {
|
|
|
19506
19506
|
dispose: a
|
|
19507
19507
|
};
|
|
19508
19508
|
}
|
|
19509
|
-
function
|
|
19509
|
+
function t2(s) {
|
|
19510
19510
|
const e = {};
|
|
19511
19511
|
function t(i) {
|
|
19512
19512
|
if (e[i] !== void 0)
|
|
@@ -19543,7 +19543,7 @@ function tE(s) {
|
|
|
19543
19543
|
}
|
|
19544
19544
|
};
|
|
19545
19545
|
}
|
|
19546
|
-
function
|
|
19546
|
+
function i2(s, e, t, i) {
|
|
19547
19547
|
const n = {}, r = /* @__PURE__ */ new WeakMap();
|
|
19548
19548
|
function a(p) {
|
|
19549
19549
|
const m = p.target;
|
|
@@ -19601,7 +19601,7 @@ function iE(s, e, t, i) {
|
|
|
19601
19601
|
getWireframeAttribute: f
|
|
19602
19602
|
};
|
|
19603
19603
|
}
|
|
19604
|
-
function
|
|
19604
|
+
function n2(s, e, t) {
|
|
19605
19605
|
let i;
|
|
19606
19606
|
function n(m) {
|
|
19607
19607
|
i = m;
|
|
@@ -19642,7 +19642,7 @@ function nE(s, e, t) {
|
|
|
19642
19642
|
}
|
|
19643
19643
|
this.setMode = n, this.setIndex = l, this.render = h, this.renderInstances = u, this.renderMultiDraw = f, this.renderMultiDrawInstances = p;
|
|
19644
19644
|
}
|
|
19645
|
-
function
|
|
19645
|
+
function s2(s) {
|
|
19646
19646
|
const e = {
|
|
19647
19647
|
geometries: 0,
|
|
19648
19648
|
textures: 0
|
|
@@ -19687,7 +19687,7 @@ function sE(s) {
|
|
|
19687
19687
|
update: i
|
|
19688
19688
|
};
|
|
19689
19689
|
}
|
|
19690
|
-
function
|
|
19690
|
+
function r2(s, e, t) {
|
|
19691
19691
|
const i = /* @__PURE__ */ new WeakMap(), n = new si();
|
|
19692
19692
|
function r(a, l, h) {
|
|
19693
19693
|
const u = a.morphTargetInfluences, f = l.morphAttributes.position || l.morphAttributes.normal || l.morphAttributes.color, p = f !== void 0 ? f.length : 0;
|
|
@@ -19733,7 +19733,7 @@ function rE(s, e, t) {
|
|
|
19733
19733
|
update: r
|
|
19734
19734
|
};
|
|
19735
19735
|
}
|
|
19736
|
-
function
|
|
19736
|
+
function a2(s, e, t, i) {
|
|
19737
19737
|
let n = /* @__PURE__ */ new WeakMap();
|
|
19738
19738
|
function r(h) {
|
|
19739
19739
|
const u = i.render.frame, f = h.geometry, p = e.get(h, f);
|
|
@@ -19788,11 +19788,11 @@ function Pu(s, e) {
|
|
|
19788
19788
|
t[i] = s.allocateTextureUnit();
|
|
19789
19789
|
return t;
|
|
19790
19790
|
}
|
|
19791
|
-
function
|
|
19791
|
+
function o2(s, e) {
|
|
19792
19792
|
const t = this.cache;
|
|
19793
19793
|
t[0] !== e && (s.uniform1f(this.addr, e), t[0] = e);
|
|
19794
19794
|
}
|
|
19795
|
-
function
|
|
19795
|
+
function l2(s, e) {
|
|
19796
19796
|
const t = this.cache;
|
|
19797
19797
|
if (e.x !== void 0)
|
|
19798
19798
|
(t[0] !== e.x || t[1] !== e.y) && (s.uniform2f(this.addr, e.x, e.y), t[0] = e.x, t[1] = e.y);
|
|
@@ -19802,7 +19802,7 @@ function lE(s, e) {
|
|
|
19802
19802
|
s.uniform2fv(this.addr, e), tn(t, e);
|
|
19803
19803
|
}
|
|
19804
19804
|
}
|
|
19805
|
-
function
|
|
19805
|
+
function c2(s, e) {
|
|
19806
19806
|
const t = this.cache;
|
|
19807
19807
|
if (e.x !== void 0)
|
|
19808
19808
|
(t[0] !== e.x || t[1] !== e.y || t[2] !== e.z) && (s.uniform3f(this.addr, e.x, e.y, e.z), t[0] = e.x, t[1] = e.y, t[2] = e.z);
|
|
@@ -19814,7 +19814,7 @@ function cE(s, e) {
|
|
|
19814
19814
|
s.uniform3fv(this.addr, e), tn(t, e);
|
|
19815
19815
|
}
|
|
19816
19816
|
}
|
|
19817
|
-
function
|
|
19817
|
+
function h2(s, e) {
|
|
19818
19818
|
const t = this.cache;
|
|
19819
19819
|
if (e.x !== void 0)
|
|
19820
19820
|
(t[0] !== e.x || t[1] !== e.y || t[2] !== e.z || t[3] !== e.w) && (s.uniform4f(this.addr, e.x, e.y, e.z, e.w), t[0] = e.x, t[1] = e.y, t[2] = e.z, t[3] = e.w);
|
|
@@ -19824,7 +19824,7 @@ function hE(s, e) {
|
|
|
19824
19824
|
s.uniform4fv(this.addr, e), tn(t, e);
|
|
19825
19825
|
}
|
|
19826
19826
|
}
|
|
19827
|
-
function
|
|
19827
|
+
function u2(s, e) {
|
|
19828
19828
|
const t = this.cache, i = e.elements;
|
|
19829
19829
|
if (i === void 0) {
|
|
19830
19830
|
if (en(t, e))
|
|
@@ -19836,7 +19836,7 @@ function uE(s, e) {
|
|
|
19836
19836
|
C0.set(i), s.uniformMatrix2fv(this.addr, !1, C0), tn(t, i);
|
|
19837
19837
|
}
|
|
19838
19838
|
}
|
|
19839
|
-
function
|
|
19839
|
+
function d2(s, e) {
|
|
19840
19840
|
const t = this.cache, i = e.elements;
|
|
19841
19841
|
if (i === void 0) {
|
|
19842
19842
|
if (en(t, e))
|
|
@@ -19848,7 +19848,7 @@ function dE(s, e) {
|
|
|
19848
19848
|
P0.set(i), s.uniformMatrix3fv(this.addr, !1, P0), tn(t, i);
|
|
19849
19849
|
}
|
|
19850
19850
|
}
|
|
19851
|
-
function
|
|
19851
|
+
function f2(s, e) {
|
|
19852
19852
|
const t = this.cache, i = e.elements;
|
|
19853
19853
|
if (i === void 0) {
|
|
19854
19854
|
if (en(t, e))
|
|
@@ -19860,11 +19860,11 @@ function fE(s, e) {
|
|
|
19860
19860
|
E0.set(i), s.uniformMatrix4fv(this.addr, !1, E0), tn(t, i);
|
|
19861
19861
|
}
|
|
19862
19862
|
}
|
|
19863
|
-
function
|
|
19863
|
+
function p2(s, e) {
|
|
19864
19864
|
const t = this.cache;
|
|
19865
19865
|
t[0] !== e && (s.uniform1i(this.addr, e), t[0] = e);
|
|
19866
19866
|
}
|
|
19867
|
-
function
|
|
19867
|
+
function m2(s, e) {
|
|
19868
19868
|
const t = this.cache;
|
|
19869
19869
|
if (e.x !== void 0)
|
|
19870
19870
|
(t[0] !== e.x || t[1] !== e.y) && (s.uniform2i(this.addr, e.x, e.y), t[0] = e.x, t[1] = e.y);
|
|
@@ -19874,7 +19874,7 @@ function mE(s, e) {
|
|
|
19874
19874
|
s.uniform2iv(this.addr, e), tn(t, e);
|
|
19875
19875
|
}
|
|
19876
19876
|
}
|
|
19877
|
-
function
|
|
19877
|
+
function g2(s, e) {
|
|
19878
19878
|
const t = this.cache;
|
|
19879
19879
|
if (e.x !== void 0)
|
|
19880
19880
|
(t[0] !== e.x || t[1] !== e.y || t[2] !== e.z) && (s.uniform3i(this.addr, e.x, e.y, e.z), t[0] = e.x, t[1] = e.y, t[2] = e.z);
|
|
@@ -19884,7 +19884,7 @@ function gE(s, e) {
|
|
|
19884
19884
|
s.uniform3iv(this.addr, e), tn(t, e);
|
|
19885
19885
|
}
|
|
19886
19886
|
}
|
|
19887
|
-
function
|
|
19887
|
+
function y2(s, e) {
|
|
19888
19888
|
const t = this.cache;
|
|
19889
19889
|
if (e.x !== void 0)
|
|
19890
19890
|
(t[0] !== e.x || t[1] !== e.y || t[2] !== e.z || t[3] !== e.w) && (s.uniform4i(this.addr, e.x, e.y, e.z, e.w), t[0] = e.x, t[1] = e.y, t[2] = e.z, t[3] = e.w);
|
|
@@ -19894,11 +19894,11 @@ function yE(s, e) {
|
|
|
19894
19894
|
s.uniform4iv(this.addr, e), tn(t, e);
|
|
19895
19895
|
}
|
|
19896
19896
|
}
|
|
19897
|
-
function
|
|
19897
|
+
function x2(s, e) {
|
|
19898
19898
|
const t = this.cache;
|
|
19899
19899
|
t[0] !== e && (s.uniform1ui(this.addr, e), t[0] = e);
|
|
19900
19900
|
}
|
|
19901
|
-
function
|
|
19901
|
+
function v2(s, e) {
|
|
19902
19902
|
const t = this.cache;
|
|
19903
19903
|
if (e.x !== void 0)
|
|
19904
19904
|
(t[0] !== e.x || t[1] !== e.y) && (s.uniform2ui(this.addr, e.x, e.y), t[0] = e.x, t[1] = e.y);
|
|
@@ -19908,7 +19908,7 @@ function vE(s, e) {
|
|
|
19908
19908
|
s.uniform2uiv(this.addr, e), tn(t, e);
|
|
19909
19909
|
}
|
|
19910
19910
|
}
|
|
19911
|
-
function
|
|
19911
|
+
function b2(s, e) {
|
|
19912
19912
|
const t = this.cache;
|
|
19913
19913
|
if (e.x !== void 0)
|
|
19914
19914
|
(t[0] !== e.x || t[1] !== e.y || t[2] !== e.z) && (s.uniform3ui(this.addr, e.x, e.y, e.z), t[0] = e.x, t[1] = e.y, t[2] = e.z);
|
|
@@ -19918,7 +19918,7 @@ function bE(s, e) {
|
|
|
19918
19918
|
s.uniform3uiv(this.addr, e), tn(t, e);
|
|
19919
19919
|
}
|
|
19920
19920
|
}
|
|
19921
|
-
function
|
|
19921
|
+
function w2(s, e) {
|
|
19922
19922
|
const t = this.cache;
|
|
19923
19923
|
if (e.x !== void 0)
|
|
19924
19924
|
(t[0] !== e.x || t[1] !== e.y || t[2] !== e.z || t[3] !== e.w) && (s.uniform4ui(this.addr, e.x, e.y, e.z, e.w), t[0] = e.x, t[1] = e.y, t[2] = e.z, t[3] = e.w);
|
|
@@ -19928,226 +19928,226 @@ function wE(s, e) {
|
|
|
19928
19928
|
s.uniform4uiv(this.addr, e), tn(t, e);
|
|
19929
19929
|
}
|
|
19930
19930
|
}
|
|
19931
|
-
function
|
|
19931
|
+
function _2(s, e, t) {
|
|
19932
19932
|
const i = this.cache, n = t.allocateTextureUnit();
|
|
19933
19933
|
i[0] !== n && (s.uniform1i(this.addr, n), i[0] = n);
|
|
19934
19934
|
let r;
|
|
19935
19935
|
this.type === s.SAMPLER_2D_SHADOW ? (S0.compareFunction = Ax, r = S0) : r = nv, t.setTexture2D(e || r, n);
|
|
19936
19936
|
}
|
|
19937
|
-
function
|
|
19937
|
+
function M2(s, e, t) {
|
|
19938
19938
|
const i = this.cache, n = t.allocateTextureUnit();
|
|
19939
19939
|
i[0] !== n && (s.uniform1i(this.addr, n), i[0] = n), t.setTexture3D(e || rv, n);
|
|
19940
19940
|
}
|
|
19941
|
-
function
|
|
19941
|
+
function S2(s, e, t) {
|
|
19942
19942
|
const i = this.cache, n = t.allocateTextureUnit();
|
|
19943
19943
|
i[0] !== n && (s.uniform1i(this.addr, n), i[0] = n), t.setTextureCube(e || av, n);
|
|
19944
19944
|
}
|
|
19945
|
-
function
|
|
19945
|
+
function A2(s, e, t) {
|
|
19946
19946
|
const i = this.cache, n = t.allocateTextureUnit();
|
|
19947
19947
|
i[0] !== n && (s.uniform1i(this.addr, n), i[0] = n), t.setTexture2DArray(e || sv, n);
|
|
19948
19948
|
}
|
|
19949
|
-
function
|
|
19949
|
+
function T2(s) {
|
|
19950
19950
|
switch (s) {
|
|
19951
19951
|
case 5126:
|
|
19952
|
-
return
|
|
19952
|
+
return o2;
|
|
19953
19953
|
case 35664:
|
|
19954
|
-
return
|
|
19954
|
+
return l2;
|
|
19955
19955
|
case 35665:
|
|
19956
|
-
return
|
|
19956
|
+
return c2;
|
|
19957
19957
|
case 35666:
|
|
19958
|
-
return
|
|
19958
|
+
return h2;
|
|
19959
19959
|
case 35674:
|
|
19960
|
-
return
|
|
19960
|
+
return u2;
|
|
19961
19961
|
case 35675:
|
|
19962
|
-
return
|
|
19962
|
+
return d2;
|
|
19963
19963
|
case 35676:
|
|
19964
|
-
return
|
|
19964
|
+
return f2;
|
|
19965
19965
|
case 5124:
|
|
19966
19966
|
case 35670:
|
|
19967
|
-
return
|
|
19967
|
+
return p2;
|
|
19968
19968
|
case 35667:
|
|
19969
19969
|
case 35671:
|
|
19970
|
-
return
|
|
19970
|
+
return m2;
|
|
19971
19971
|
case 35668:
|
|
19972
19972
|
case 35672:
|
|
19973
|
-
return
|
|
19973
|
+
return g2;
|
|
19974
19974
|
case 35669:
|
|
19975
19975
|
case 35673:
|
|
19976
|
-
return
|
|
19976
|
+
return y2;
|
|
19977
19977
|
case 5125:
|
|
19978
|
-
return
|
|
19978
|
+
return x2;
|
|
19979
19979
|
case 36294:
|
|
19980
|
-
return
|
|
19980
|
+
return v2;
|
|
19981
19981
|
case 36295:
|
|
19982
|
-
return
|
|
19982
|
+
return b2;
|
|
19983
19983
|
case 36296:
|
|
19984
|
-
return
|
|
19984
|
+
return w2;
|
|
19985
19985
|
case 35678:
|
|
19986
19986
|
case 36198:
|
|
19987
19987
|
case 36298:
|
|
19988
19988
|
case 36306:
|
|
19989
19989
|
case 35682:
|
|
19990
|
-
return
|
|
19990
|
+
return _2;
|
|
19991
19991
|
case 35679:
|
|
19992
19992
|
case 36299:
|
|
19993
19993
|
case 36307:
|
|
19994
|
-
return
|
|
19994
|
+
return M2;
|
|
19995
19995
|
case 35680:
|
|
19996
19996
|
case 36300:
|
|
19997
19997
|
case 36308:
|
|
19998
19998
|
case 36293:
|
|
19999
|
-
return
|
|
19999
|
+
return S2;
|
|
20000
20000
|
case 36289:
|
|
20001
20001
|
case 36303:
|
|
20002
20002
|
case 36311:
|
|
20003
20003
|
case 36292:
|
|
20004
|
-
return
|
|
20004
|
+
return A2;
|
|
20005
20005
|
}
|
|
20006
20006
|
}
|
|
20007
|
-
function
|
|
20007
|
+
function E2(s, e) {
|
|
20008
20008
|
s.uniform1fv(this.addr, e);
|
|
20009
20009
|
}
|
|
20010
|
-
function
|
|
20010
|
+
function P2(s, e) {
|
|
20011
20011
|
const t = Ko(e, this.size, 2);
|
|
20012
20012
|
s.uniform2fv(this.addr, t);
|
|
20013
20013
|
}
|
|
20014
|
-
function
|
|
20014
|
+
function C2(s, e) {
|
|
20015
20015
|
const t = Ko(e, this.size, 3);
|
|
20016
20016
|
s.uniform3fv(this.addr, t);
|
|
20017
20017
|
}
|
|
20018
|
-
function
|
|
20018
|
+
function R2(s, e) {
|
|
20019
20019
|
const t = Ko(e, this.size, 4);
|
|
20020
20020
|
s.uniform4fv(this.addr, t);
|
|
20021
20021
|
}
|
|
20022
|
-
function
|
|
20022
|
+
function I2(s, e) {
|
|
20023
20023
|
const t = Ko(e, this.size, 4);
|
|
20024
20024
|
s.uniformMatrix2fv(this.addr, !1, t);
|
|
20025
20025
|
}
|
|
20026
|
-
function
|
|
20026
|
+
function D2(s, e) {
|
|
20027
20027
|
const t = Ko(e, this.size, 9);
|
|
20028
20028
|
s.uniformMatrix3fv(this.addr, !1, t);
|
|
20029
20029
|
}
|
|
20030
|
-
function
|
|
20030
|
+
function L2(s, e) {
|
|
20031
20031
|
const t = Ko(e, this.size, 16);
|
|
20032
20032
|
s.uniformMatrix4fv(this.addr, !1, t);
|
|
20033
20033
|
}
|
|
20034
|
-
function
|
|
20034
|
+
function O2(s, e) {
|
|
20035
20035
|
s.uniform1iv(this.addr, e);
|
|
20036
20036
|
}
|
|
20037
|
-
function
|
|
20037
|
+
function N2(s, e) {
|
|
20038
20038
|
s.uniform2iv(this.addr, e);
|
|
20039
20039
|
}
|
|
20040
|
-
function
|
|
20040
|
+
function B2(s, e) {
|
|
20041
20041
|
s.uniform3iv(this.addr, e);
|
|
20042
20042
|
}
|
|
20043
|
-
function
|
|
20043
|
+
function z2(s, e) {
|
|
20044
20044
|
s.uniform4iv(this.addr, e);
|
|
20045
20045
|
}
|
|
20046
|
-
function
|
|
20046
|
+
function U2(s, e) {
|
|
20047
20047
|
s.uniform1uiv(this.addr, e);
|
|
20048
20048
|
}
|
|
20049
|
-
function
|
|
20049
|
+
function F2(s, e) {
|
|
20050
20050
|
s.uniform2uiv(this.addr, e);
|
|
20051
20051
|
}
|
|
20052
|
-
function
|
|
20052
|
+
function k2(s, e) {
|
|
20053
20053
|
s.uniform3uiv(this.addr, e);
|
|
20054
20054
|
}
|
|
20055
|
-
function
|
|
20055
|
+
function V2(s, e) {
|
|
20056
20056
|
s.uniform4uiv(this.addr, e);
|
|
20057
20057
|
}
|
|
20058
|
-
function
|
|
20058
|
+
function X2(s, e, t) {
|
|
20059
20059
|
const i = this.cache, n = e.length, r = Pu(t, n);
|
|
20060
20060
|
en(i, r) || (s.uniform1iv(this.addr, r), tn(i, r));
|
|
20061
20061
|
for (let a = 0; a !== n; ++a)
|
|
20062
20062
|
t.setTexture2D(e[a] || nv, r[a]);
|
|
20063
20063
|
}
|
|
20064
|
-
function
|
|
20064
|
+
function H2(s, e, t) {
|
|
20065
20065
|
const i = this.cache, n = e.length, r = Pu(t, n);
|
|
20066
20066
|
en(i, r) || (s.uniform1iv(this.addr, r), tn(i, r));
|
|
20067
20067
|
for (let a = 0; a !== n; ++a)
|
|
20068
20068
|
t.setTexture3D(e[a] || rv, r[a]);
|
|
20069
20069
|
}
|
|
20070
|
-
function
|
|
20070
|
+
function Y2(s, e, t) {
|
|
20071
20071
|
const i = this.cache, n = e.length, r = Pu(t, n);
|
|
20072
20072
|
en(i, r) || (s.uniform1iv(this.addr, r), tn(i, r));
|
|
20073
20073
|
for (let a = 0; a !== n; ++a)
|
|
20074
20074
|
t.setTextureCube(e[a] || av, r[a]);
|
|
20075
20075
|
}
|
|
20076
|
-
function
|
|
20076
|
+
function G2(s, e, t) {
|
|
20077
20077
|
const i = this.cache, n = e.length, r = Pu(t, n);
|
|
20078
20078
|
en(i, r) || (s.uniform1iv(this.addr, r), tn(i, r));
|
|
20079
20079
|
for (let a = 0; a !== n; ++a)
|
|
20080
20080
|
t.setTexture2DArray(e[a] || sv, r[a]);
|
|
20081
20081
|
}
|
|
20082
|
-
function
|
|
20082
|
+
function W2(s) {
|
|
20083
20083
|
switch (s) {
|
|
20084
20084
|
case 5126:
|
|
20085
|
-
return
|
|
20085
|
+
return E2;
|
|
20086
20086
|
case 35664:
|
|
20087
|
-
return
|
|
20087
|
+
return P2;
|
|
20088
20088
|
case 35665:
|
|
20089
|
-
return
|
|
20089
|
+
return C2;
|
|
20090
20090
|
case 35666:
|
|
20091
|
-
return
|
|
20091
|
+
return R2;
|
|
20092
20092
|
case 35674:
|
|
20093
|
-
return
|
|
20093
|
+
return I2;
|
|
20094
20094
|
case 35675:
|
|
20095
|
-
return
|
|
20095
|
+
return D2;
|
|
20096
20096
|
case 35676:
|
|
20097
|
-
return
|
|
20097
|
+
return L2;
|
|
20098
20098
|
case 5124:
|
|
20099
20099
|
case 35670:
|
|
20100
|
-
return
|
|
20100
|
+
return O2;
|
|
20101
20101
|
case 35667:
|
|
20102
20102
|
case 35671:
|
|
20103
|
-
return
|
|
20103
|
+
return N2;
|
|
20104
20104
|
case 35668:
|
|
20105
20105
|
case 35672:
|
|
20106
|
-
return
|
|
20106
|
+
return B2;
|
|
20107
20107
|
case 35669:
|
|
20108
20108
|
case 35673:
|
|
20109
|
-
return
|
|
20109
|
+
return z2;
|
|
20110
20110
|
case 5125:
|
|
20111
|
-
return
|
|
20111
|
+
return U2;
|
|
20112
20112
|
case 36294:
|
|
20113
|
-
return
|
|
20113
|
+
return F2;
|
|
20114
20114
|
case 36295:
|
|
20115
|
-
return
|
|
20115
|
+
return k2;
|
|
20116
20116
|
case 36296:
|
|
20117
|
-
return
|
|
20117
|
+
return V2;
|
|
20118
20118
|
case 35678:
|
|
20119
20119
|
case 36198:
|
|
20120
20120
|
case 36298:
|
|
20121
20121
|
case 36306:
|
|
20122
20122
|
case 35682:
|
|
20123
|
-
return
|
|
20123
|
+
return X2;
|
|
20124
20124
|
case 35679:
|
|
20125
20125
|
case 36299:
|
|
20126
20126
|
case 36307:
|
|
20127
|
-
return
|
|
20127
|
+
return H2;
|
|
20128
20128
|
case 35680:
|
|
20129
20129
|
case 36300:
|
|
20130
20130
|
case 36308:
|
|
20131
20131
|
case 36293:
|
|
20132
|
-
return
|
|
20132
|
+
return Y2;
|
|
20133
20133
|
case 36289:
|
|
20134
20134
|
case 36303:
|
|
20135
20135
|
case 36311:
|
|
20136
20136
|
case 36292:
|
|
20137
|
-
return
|
|
20137
|
+
return G2;
|
|
20138
20138
|
}
|
|
20139
20139
|
}
|
|
20140
|
-
class
|
|
20140
|
+
class Q2 {
|
|
20141
20141
|
constructor(e, t, i) {
|
|
20142
|
-
this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.setValue =
|
|
20142
|
+
this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.setValue = T2(t.type);
|
|
20143
20143
|
}
|
|
20144
20144
|
}
|
|
20145
|
-
class
|
|
20145
|
+
class q2 {
|
|
20146
20146
|
constructor(e, t, i) {
|
|
20147
|
-
this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.size = t.size, this.setValue =
|
|
20147
|
+
this.id = e, this.addr = i, this.cache = [], this.type = t.type, this.size = t.size, this.setValue = W2(t.type);
|
|
20148
20148
|
}
|
|
20149
20149
|
}
|
|
20150
|
-
class
|
|
20150
|
+
class Z2 {
|
|
20151
20151
|
constructor(e) {
|
|
20152
20152
|
this.id = e, this.seq = [], this.map = {};
|
|
20153
20153
|
}
|
|
@@ -20163,28 +20163,28 @@ const Yd = /(\w+)(\])?(\[|\.)?/g;
|
|
|
20163
20163
|
function R0(s, e) {
|
|
20164
20164
|
s.seq.push(e), s.map[e.id] = e;
|
|
20165
20165
|
}
|
|
20166
|
-
function
|
|
20166
|
+
function j2(s, e, t) {
|
|
20167
20167
|
const i = s.name, n = i.length;
|
|
20168
20168
|
for (Yd.lastIndex = 0; ; ) {
|
|
20169
20169
|
const r = Yd.exec(i), a = Yd.lastIndex;
|
|
20170
20170
|
let l = r[1];
|
|
20171
20171
|
const h = r[2] === "]", u = r[3];
|
|
20172
20172
|
if (h && (l = l | 0), u === void 0 || u === "[" && a + 2 === n) {
|
|
20173
|
-
R0(t, u === void 0 ? new
|
|
20173
|
+
R0(t, u === void 0 ? new Q2(l, s, e) : new q2(l, s, e));
|
|
20174
20174
|
break;
|
|
20175
20175
|
} else {
|
|
20176
20176
|
let p = t.map[l];
|
|
20177
|
-
p === void 0 && (p = new
|
|
20177
|
+
p === void 0 && (p = new Z2(l), R0(t, p)), t = p;
|
|
20178
20178
|
}
|
|
20179
20179
|
}
|
|
20180
20180
|
}
|
|
20181
|
-
class
|
|
20181
|
+
class iu {
|
|
20182
20182
|
constructor(e, t) {
|
|
20183
20183
|
this.seq = [], this.map = {};
|
|
20184
20184
|
const i = e.getProgramParameter(t, e.ACTIVE_UNIFORMS);
|
|
20185
20185
|
for (let n = 0; n < i; ++n) {
|
|
20186
20186
|
const r = e.getActiveUniform(t, n), a = e.getUniformLocation(t, r.name);
|
|
20187
|
-
|
|
20187
|
+
j2(r, a, this);
|
|
20188
20188
|
}
|
|
20189
20189
|
}
|
|
20190
20190
|
setValue(e, t, i, n) {
|
|
@@ -20214,9 +20214,9 @@ function I0(s, e, t) {
|
|
|
20214
20214
|
const i = s.createShader(e);
|
|
20215
20215
|
return s.shaderSource(i, t), s.compileShader(i), i;
|
|
20216
20216
|
}
|
|
20217
|
-
const
|
|
20218
|
-
let $
|
|
20219
|
-
function
|
|
20217
|
+
const K2 = 37297;
|
|
20218
|
+
let $2 = 0;
|
|
20219
|
+
function J2(s, e) {
|
|
20220
20220
|
const t = s.split(`
|
|
20221
20221
|
`), i = [], n = Math.max(e - 6, 0), r = Math.min(e + 6, t.length);
|
|
20222
20222
|
for (let a = n; a < r; a++) {
|
|
@@ -20227,7 +20227,7 @@ function JE(s, e) {
|
|
|
20227
20227
|
`);
|
|
20228
20228
|
}
|
|
20229
20229
|
const D0 = /* @__PURE__ */ new Qt();
|
|
20230
|
-
function
|
|
20230
|
+
function eE(s) {
|
|
20231
20231
|
ii._getMatrix(D0, ii.workingColorSpace, s);
|
|
20232
20232
|
const e = `mat3( ${D0.elements.map((t) => t.toFixed(4))} )`;
|
|
20233
20233
|
switch (ii.getTransfer(s)) {
|
|
@@ -20250,12 +20250,12 @@ function L0(s, e, t) {
|
|
|
20250
20250
|
|
|
20251
20251
|
` + n + `
|
|
20252
20252
|
|
|
20253
|
-
` +
|
|
20253
|
+
` + J2(s.getShaderSource(e), a);
|
|
20254
20254
|
} else
|
|
20255
20255
|
return n;
|
|
20256
20256
|
}
|
|
20257
|
-
function
|
|
20258
|
-
const t =
|
|
20257
|
+
function tE(s, e) {
|
|
20258
|
+
const t = eE(e);
|
|
20259
20259
|
return [
|
|
20260
20260
|
`vec4 ${s}( vec4 value ) {`,
|
|
20261
20261
|
` return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,
|
|
@@ -20263,7 +20263,7 @@ function t2(s, e) {
|
|
|
20263
20263
|
].join(`
|
|
20264
20264
|
`);
|
|
20265
20265
|
}
|
|
20266
|
-
function
|
|
20266
|
+
function iE(s, e) {
|
|
20267
20267
|
let t;
|
|
20268
20268
|
switch (e) {
|
|
20269
20269
|
case cx:
|
|
@@ -20292,10 +20292,10 @@ function i2(s, e) {
|
|
|
20292
20292
|
}
|
|
20293
20293
|
return "vec3 " + s + "( vec3 color ) { return " + t + "ToneMapping( color ); }";
|
|
20294
20294
|
}
|
|
20295
|
-
const
|
|
20296
|
-
function
|
|
20297
|
-
ii.getLuminanceCoefficients(
|
|
20298
|
-
const s =
|
|
20295
|
+
const Th = /* @__PURE__ */ new W();
|
|
20296
|
+
function nE() {
|
|
20297
|
+
ii.getLuminanceCoefficients(Th);
|
|
20298
|
+
const s = Th.x.toFixed(4), e = Th.y.toFixed(4), t = Th.z.toFixed(4);
|
|
20299
20299
|
return [
|
|
20300
20300
|
"float luminance( const in vec3 rgb ) {",
|
|
20301
20301
|
` const vec3 weights = vec3( ${s}, ${e}, ${t} );`,
|
|
@@ -20304,14 +20304,14 @@ function n2() {
|
|
|
20304
20304
|
].join(`
|
|
20305
20305
|
`);
|
|
20306
20306
|
}
|
|
20307
|
-
function
|
|
20307
|
+
function sE(s) {
|
|
20308
20308
|
return [
|
|
20309
20309
|
s.extensionClipCullDistance ? "#extension GL_ANGLE_clip_cull_distance : require" : "",
|
|
20310
20310
|
s.extensionMultiDraw ? "#extension GL_ANGLE_multi_draw : require" : ""
|
|
20311
20311
|
].filter(Bl).join(`
|
|
20312
20312
|
`);
|
|
20313
20313
|
}
|
|
20314
|
-
function
|
|
20314
|
+
function rE(s) {
|
|
20315
20315
|
const e = [];
|
|
20316
20316
|
for (const t in s) {
|
|
20317
20317
|
const i = s[t];
|
|
@@ -20320,7 +20320,7 @@ function r2(s) {
|
|
|
20320
20320
|
return e.join(`
|
|
20321
20321
|
`);
|
|
20322
20322
|
}
|
|
20323
|
-
function
|
|
20323
|
+
function aE(s, e) {
|
|
20324
20324
|
const t = {}, i = s.getProgramParameter(e, s.ACTIVE_ATTRIBUTES);
|
|
20325
20325
|
for (let n = 0; n < i; n++) {
|
|
20326
20326
|
const r = s.getActiveAttrib(e, n), a = r.name;
|
|
@@ -20343,15 +20343,15 @@ function O0(s, e) {
|
|
|
20343
20343
|
function N0(s, e) {
|
|
20344
20344
|
return s.replace(/NUM_CLIPPING_PLANES/g, e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g, e.numClippingPlanes - e.numClipIntersection);
|
|
20345
20345
|
}
|
|
20346
|
-
const
|
|
20346
|
+
const oE = /^[ \t]*#include +<([\w\d./]+)>/gm;
|
|
20347
20347
|
function fp(s) {
|
|
20348
|
-
return s.replace(
|
|
20348
|
+
return s.replace(oE, cE);
|
|
20349
20349
|
}
|
|
20350
|
-
const
|
|
20351
|
-
function
|
|
20350
|
+
const lE = /* @__PURE__ */ new Map();
|
|
20351
|
+
function cE(s, e) {
|
|
20352
20352
|
let t = Zt[e];
|
|
20353
20353
|
if (t === void 0) {
|
|
20354
|
-
const i =
|
|
20354
|
+
const i = lE.get(e);
|
|
20355
20355
|
if (i !== void 0)
|
|
20356
20356
|
t = Zt[i], console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.', e, i);
|
|
20357
20357
|
else
|
|
@@ -20359,11 +20359,11 @@ function c2(s, e) {
|
|
|
20359
20359
|
}
|
|
20360
20360
|
return fp(t);
|
|
20361
20361
|
}
|
|
20362
|
-
const
|
|
20362
|
+
const hE = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
|
|
20363
20363
|
function B0(s) {
|
|
20364
|
-
return s.replace(
|
|
20364
|
+
return s.replace(hE, uE);
|
|
20365
20365
|
}
|
|
20366
|
-
function
|
|
20366
|
+
function uE(s, e, t, i) {
|
|
20367
20367
|
let n = "";
|
|
20368
20368
|
for (let r = parseInt(e); r < parseInt(t); r++)
|
|
20369
20369
|
n += i.replace(/\[\s*i\s*\]/g, "[ " + r + " ]").replace(/UNROLLED_LOOP_INDEX/g, r);
|
|
@@ -20393,11 +20393,11 @@ function z0(s) {
|
|
|
20393
20393
|
#define MEDIUM_PRECISION` : s.precision === "lowp" && (e += `
|
|
20394
20394
|
#define LOW_PRECISION`), e;
|
|
20395
20395
|
}
|
|
20396
|
-
function
|
|
20396
|
+
function dE(s) {
|
|
20397
20397
|
let e = "SHADOWMAP_TYPE_BASIC";
|
|
20398
20398
|
return s.shadowMapType === rx ? e = "SHADOWMAP_TYPE_PCF" : s.shadowMapType === rw ? e = "SHADOWMAP_TYPE_PCF_SOFT" : s.shadowMapType === Is && (e = "SHADOWMAP_TYPE_VSM"), e;
|
|
20399
20399
|
}
|
|
20400
|
-
function
|
|
20400
|
+
function fE(s) {
|
|
20401
20401
|
let e = "ENVMAP_TYPE_CUBE";
|
|
20402
20402
|
if (s.envMap)
|
|
20403
20403
|
switch (s.envMapMode) {
|
|
@@ -20405,13 +20405,13 @@ function f2(s) {
|
|
|
20405
20405
|
case Pa:
|
|
20406
20406
|
e = "ENVMAP_TYPE_CUBE";
|
|
20407
20407
|
break;
|
|
20408
|
-
case
|
|
20408
|
+
case gc:
|
|
20409
20409
|
e = "ENVMAP_TYPE_CUBE_UV";
|
|
20410
20410
|
break;
|
|
20411
20411
|
}
|
|
20412
20412
|
return e;
|
|
20413
20413
|
}
|
|
20414
|
-
function
|
|
20414
|
+
function pE(s) {
|
|
20415
20415
|
let e = "ENVMAP_MODE_REFLECTION";
|
|
20416
20416
|
if (s.envMap)
|
|
20417
20417
|
switch (s.envMapMode) {
|
|
@@ -20421,7 +20421,7 @@ function p2(s) {
|
|
|
20421
20421
|
}
|
|
20422
20422
|
return e;
|
|
20423
20423
|
}
|
|
20424
|
-
function
|
|
20424
|
+
function mE(s) {
|
|
20425
20425
|
let e = "ENVMAP_BLENDING_NONE";
|
|
20426
20426
|
if (s.envMap)
|
|
20427
20427
|
switch (s.combine) {
|
|
@@ -20437,17 +20437,17 @@ function m2(s) {
|
|
|
20437
20437
|
}
|
|
20438
20438
|
return e;
|
|
20439
20439
|
}
|
|
20440
|
-
function
|
|
20440
|
+
function gE(s) {
|
|
20441
20441
|
const e = s.envMapCubeUVHeight;
|
|
20442
20442
|
if (e === null)
|
|
20443
20443
|
return null;
|
|
20444
20444
|
const t = Math.log2(e) - 2, i = 1 / e;
|
|
20445
20445
|
return { texelWidth: 1 / (3 * Math.max(Math.pow(2, t), 7 * 16)), texelHeight: i, maxMip: t };
|
|
20446
20446
|
}
|
|
20447
|
-
function
|
|
20447
|
+
function yE(s, e, t, i) {
|
|
20448
20448
|
const n = s.getContext(), r = t.defines;
|
|
20449
20449
|
let a = t.vertexShader, l = t.fragmentShader;
|
|
20450
|
-
const h =
|
|
20450
|
+
const h = dE(t), u = fE(t), f = pE(t), p = mE(t), m = gE(t), x = sE(t), w = rE(r), T = n.createProgram();
|
|
20451
20451
|
let _, b, P = t.glslVersion ? "#version " + t.glslVersion + `
|
|
20452
20452
|
` : "";
|
|
20453
20453
|
t.isRawShaderMaterial ? (_ = [
|
|
@@ -20668,13 +20668,13 @@ function y2(s, e, t, i) {
|
|
|
20668
20668
|
t.toneMapping !== Wr ? "#define TONE_MAPPING" : "",
|
|
20669
20669
|
t.toneMapping !== Wr ? Zt.tonemapping_pars_fragment : "",
|
|
20670
20670
|
// this code is required here because it is used by the toneMapping() function defined below
|
|
20671
|
-
t.toneMapping !== Wr ?
|
|
20671
|
+
t.toneMapping !== Wr ? iE("toneMapping", t.toneMapping) : "",
|
|
20672
20672
|
t.dithering ? "#define DITHERING" : "",
|
|
20673
20673
|
t.opaque ? "#define OPAQUE" : "",
|
|
20674
20674
|
Zt.colorspace_pars_fragment,
|
|
20675
20675
|
// this code is required here because it is used by the various encoding/decoding function defined below
|
|
20676
|
-
|
|
20677
|
-
|
|
20676
|
+
tE("linearToOutputTexel", t.outputColorSpace),
|
|
20677
|
+
nE(),
|
|
20678
20678
|
t.useDepthPacking ? "#define DEPTH_PACKING " + t.depthPacking : "",
|
|
20679
20679
|
`
|
|
20680
20680
|
`
|
|
@@ -20741,7 +20741,7 @@ Program Info Log: ` + $ + `
|
|
|
20741
20741
|
}
|
|
20742
20742
|
});
|
|
20743
20743
|
}
|
|
20744
|
-
n.deleteShader(z), n.deleteShader(F), H = new
|
|
20744
|
+
n.deleteShader(z), n.deleteShader(F), H = new iu(n, T), U = aE(n, T);
|
|
20745
20745
|
}
|
|
20746
20746
|
let H;
|
|
20747
20747
|
this.getUniforms = function() {
|
|
@@ -20753,13 +20753,13 @@ Program Info Log: ` + $ + `
|
|
|
20753
20753
|
};
|
|
20754
20754
|
let O = t.rendererExtensionParallelShaderCompile === !1;
|
|
20755
20755
|
return this.isReady = function() {
|
|
20756
|
-
return O === !1 && (O = n.getProgramParameter(T,
|
|
20756
|
+
return O === !1 && (O = n.getProgramParameter(T, K2)), O;
|
|
20757
20757
|
}, this.destroy = function() {
|
|
20758
20758
|
i.releaseStatesOfProgram(this), n.deleteProgram(T), this.program = void 0;
|
|
20759
|
-
}, this.type = t.shaderType, this.name = t.shaderName, this.id = $
|
|
20759
|
+
}, this.type = t.shaderType, this.name = t.shaderName, this.id = $2++, this.cacheKey = e, this.usedTimes = 1, this.program = T, this.vertexShader = z, this.fragmentShader = F, this;
|
|
20760
20760
|
}
|
|
20761
|
-
let
|
|
20762
|
-
class
|
|
20761
|
+
let xE = 0;
|
|
20762
|
+
class vE {
|
|
20763
20763
|
constructor() {
|
|
20764
20764
|
this.shaderCache = /* @__PURE__ */ new Map(), this.materialCache = /* @__PURE__ */ new Map();
|
|
20765
20765
|
}
|
|
@@ -20790,16 +20790,16 @@ class v2 {
|
|
|
20790
20790
|
_getShaderStage(e) {
|
|
20791
20791
|
const t = this.shaderCache;
|
|
20792
20792
|
let i = t.get(e);
|
|
20793
|
-
return i === void 0 && (i = new
|
|
20793
|
+
return i === void 0 && (i = new bE(e), t.set(e, i)), i;
|
|
20794
20794
|
}
|
|
20795
20795
|
}
|
|
20796
|
-
class
|
|
20796
|
+
class bE {
|
|
20797
20797
|
constructor(e) {
|
|
20798
|
-
this.id =
|
|
20798
|
+
this.id = xE++, this.code = e, this.usedTimes = 0;
|
|
20799
20799
|
}
|
|
20800
20800
|
}
|
|
20801
|
-
function
|
|
20802
|
-
const l = new kp(), h = new
|
|
20801
|
+
function wE(s, e, t, i, n, r, a) {
|
|
20802
|
+
const l = new kp(), h = new vE(), u = /* @__PURE__ */ new Set(), f = [], p = n.logarithmicDepthBuffer, m = n.vertexTextures;
|
|
20803
20803
|
let x = n.precision;
|
|
20804
20804
|
const w = {
|
|
20805
20805
|
MeshDepthMaterial: "depth",
|
|
@@ -20822,7 +20822,7 @@ function w2(s, e, t, i, n, r, a) {
|
|
|
20822
20822
|
return u.add(U), U === 0 ? "uv" : `uv${U}`;
|
|
20823
20823
|
}
|
|
20824
20824
|
function _(U, O, V, $, J) {
|
|
20825
|
-
const ne = $.fog, ce = J.geometry, he = U.isMeshStandardMaterial ? $.environment : null, ge = (U.isMeshStandardMaterial ? t : e).get(U.envMap || he), le = ge && ge.mapping ===
|
|
20825
|
+
const ne = $.fog, ce = J.geometry, he = U.isMeshStandardMaterial ? $.environment : null, ge = (U.isMeshStandardMaterial ? t : e).get(U.envMap || he), le = ge && ge.mapping === gc ? ge.image.height : null, Se = w[U.type];
|
|
20826
20826
|
U.precision !== null && (x = n.getMaxPrecision(U.precision), x !== U.precision && console.warn("THREE.WebGLProgram.getParameters:", U.precision, "not supported, using", x, "instead."));
|
|
20827
20827
|
const Ke = ce.morphAttributes.position || ce.morphAttributes.normal || ce.morphAttributes.color, at = Ke !== void 0 ? Ke.length : 0;
|
|
20828
20828
|
let Re = 0;
|
|
@@ -21002,7 +21002,7 @@ function w2(s, e, t, i, n, r, a) {
|
|
|
21002
21002
|
break;
|
|
21003
21003
|
}
|
|
21004
21004
|
}
|
|
21005
|
-
return V === void 0 && (V = new
|
|
21005
|
+
return V === void 0 && (V = new yE(s, O, U, r), f.push(V)), V;
|
|
21006
21006
|
}
|
|
21007
21007
|
function F(U) {
|
|
21008
21008
|
if (--U.usedTimes === 0) {
|
|
@@ -21028,7 +21028,7 @@ function w2(s, e, t, i, n, r, a) {
|
|
|
21028
21028
|
dispose: H
|
|
21029
21029
|
};
|
|
21030
21030
|
}
|
|
21031
|
-
function
|
|
21031
|
+
function _E() {
|
|
21032
21032
|
let s = /* @__PURE__ */ new WeakMap();
|
|
21033
21033
|
function e(a) {
|
|
21034
21034
|
return s.has(a);
|
|
@@ -21054,7 +21054,7 @@ function _2() {
|
|
|
21054
21054
|
dispose: r
|
|
21055
21055
|
};
|
|
21056
21056
|
}
|
|
21057
|
-
function
|
|
21057
|
+
function ME(s, e) {
|
|
21058
21058
|
return s.groupOrder !== e.groupOrder ? s.groupOrder - e.groupOrder : s.renderOrder !== e.renderOrder ? s.renderOrder - e.renderOrder : s.material.id !== e.material.id ? s.material.id - e.material.id : s.z !== e.z ? s.z - e.z : s.id - e.id;
|
|
21059
21059
|
}
|
|
21060
21060
|
function U0(s, e) {
|
|
@@ -21089,7 +21089,7 @@ function F0() {
|
|
|
21089
21089
|
x.transmission > 0 ? i.unshift(b) : x.transparent === !0 ? n.unshift(b) : t.unshift(b);
|
|
21090
21090
|
}
|
|
21091
21091
|
function u(p, m) {
|
|
21092
|
-
t.length > 1 && t.sort(p ||
|
|
21092
|
+
t.length > 1 && t.sort(p || ME), i.length > 1 && i.sort(m || U0), n.length > 1 && n.sort(m || U0);
|
|
21093
21093
|
}
|
|
21094
21094
|
function f() {
|
|
21095
21095
|
for (let p = e, m = s.length; p < m; p++) {
|
|
@@ -21110,7 +21110,7 @@ function F0() {
|
|
|
21110
21110
|
sort: u
|
|
21111
21111
|
};
|
|
21112
21112
|
}
|
|
21113
|
-
function
|
|
21113
|
+
function SE() {
|
|
21114
21114
|
let s = /* @__PURE__ */ new WeakMap();
|
|
21115
21115
|
function e(i, n) {
|
|
21116
21116
|
const r = s.get(i);
|
|
@@ -21125,7 +21125,7 @@ function S2() {
|
|
|
21125
21125
|
dispose: t
|
|
21126
21126
|
};
|
|
21127
21127
|
}
|
|
21128
|
-
function
|
|
21128
|
+
function AE() {
|
|
21129
21129
|
const s = {};
|
|
21130
21130
|
return {
|
|
21131
21131
|
get: function(e) {
|
|
@@ -21178,7 +21178,7 @@ function A2() {
|
|
|
21178
21178
|
}
|
|
21179
21179
|
};
|
|
21180
21180
|
}
|
|
21181
|
-
function
|
|
21181
|
+
function TE() {
|
|
21182
21182
|
const s = {};
|
|
21183
21183
|
return {
|
|
21184
21184
|
get: function(e) {
|
|
@@ -21220,12 +21220,12 @@ function T2() {
|
|
|
21220
21220
|
}
|
|
21221
21221
|
};
|
|
21222
21222
|
}
|
|
21223
|
-
let
|
|
21224
|
-
function
|
|
21223
|
+
let EE = 0;
|
|
21224
|
+
function PE(s, e) {
|
|
21225
21225
|
return (e.castShadow ? 2 : 0) - (s.castShadow ? 2 : 0) + (e.map ? 1 : 0) - (s.map ? 1 : 0);
|
|
21226
21226
|
}
|
|
21227
|
-
function
|
|
21228
|
-
const e = new
|
|
21227
|
+
function CE(s) {
|
|
21228
|
+
const e = new AE(), t = TE(), i = {
|
|
21229
21229
|
version: 0,
|
|
21230
21230
|
hash: {
|
|
21231
21231
|
directionalLength: -1,
|
|
@@ -21269,7 +21269,7 @@ function C2(s) {
|
|
|
21269
21269
|
for (let U = 0; U < 9; U++)
|
|
21270
21270
|
i.probe[U].set(0, 0, 0);
|
|
21271
21271
|
let x = 0, w = 0, T = 0, _ = 0, b = 0, P = 0, E = 0, S = 0, z = 0, F = 0, k = 0;
|
|
21272
|
-
u.sort(
|
|
21272
|
+
u.sort(PE);
|
|
21273
21273
|
for (let U = 0, O = u.length; U < O; U++) {
|
|
21274
21274
|
const V = u[U], $ = V.color, J = V.intensity, ne = V.distance, ce = V.shadow && V.shadow.map ? V.shadow.map.texture : null;
|
|
21275
21275
|
if (V.isAmbientLight)
|
|
@@ -21311,7 +21311,7 @@ function C2(s) {
|
|
|
21311
21311
|
}
|
|
21312
21312
|
_ > 0 && (s.has("OES_texture_float_linear") === !0 ? (i.rectAreaLTC1 = pt.LTC_FLOAT_1, i.rectAreaLTC2 = pt.LTC_FLOAT_2) : (i.rectAreaLTC1 = pt.LTC_HALF_1, i.rectAreaLTC2 = pt.LTC_HALF_2)), i.ambient[0] = f, i.ambient[1] = p, i.ambient[2] = m;
|
|
21313
21313
|
const H = i.hash;
|
|
21314
|
-
(H.directionalLength !== x || H.pointLength !== w || H.spotLength !== T || H.rectAreaLength !== _ || H.hemiLength !== b || H.numDirectionalShadows !== P || H.numPointShadows !== E || H.numSpotShadows !== S || H.numSpotMaps !== z || H.numLightProbes !== k) && (i.directional.length = x, i.spot.length = T, i.rectArea.length = _, i.point.length = w, i.hemi.length = b, i.directionalShadow.length = P, i.directionalShadowMap.length = P, i.pointShadow.length = E, i.pointShadowMap.length = E, i.spotShadow.length = S, i.spotShadowMap.length = S, i.directionalShadowMatrix.length = P, i.pointShadowMatrix.length = E, i.spotLightMatrix.length = S + z - F, i.spotLightMap.length = z, i.numSpotLightShadowsWithMaps = F, i.numLightProbes = k, H.directionalLength = x, H.pointLength = w, H.spotLength = T, H.rectAreaLength = _, H.hemiLength = b, H.numDirectionalShadows = P, H.numPointShadows = E, H.numSpotShadows = S, H.numSpotMaps = z, H.numLightProbes = k, i.version =
|
|
21314
|
+
(H.directionalLength !== x || H.pointLength !== w || H.spotLength !== T || H.rectAreaLength !== _ || H.hemiLength !== b || H.numDirectionalShadows !== P || H.numPointShadows !== E || H.numSpotShadows !== S || H.numSpotMaps !== z || H.numLightProbes !== k) && (i.directional.length = x, i.spot.length = T, i.rectArea.length = _, i.point.length = w, i.hemi.length = b, i.directionalShadow.length = P, i.directionalShadowMap.length = P, i.pointShadow.length = E, i.pointShadowMap.length = E, i.spotShadow.length = S, i.spotShadowMap.length = S, i.directionalShadowMatrix.length = P, i.pointShadowMatrix.length = E, i.spotLightMatrix.length = S + z - F, i.spotLightMap.length = z, i.numSpotLightShadowsWithMaps = F, i.numLightProbes = k, H.directionalLength = x, H.pointLength = w, H.spotLength = T, H.rectAreaLength = _, H.hemiLength = b, H.numDirectionalShadows = P, H.numPointShadows = E, H.numSpotShadows = S, H.numSpotMaps = z, H.numLightProbes = k, i.version = EE++);
|
|
21315
21315
|
}
|
|
21316
21316
|
function h(u, f) {
|
|
21317
21317
|
let p = 0, m = 0, x = 0, w = 0, T = 0;
|
|
@@ -21343,7 +21343,7 @@ function C2(s) {
|
|
|
21343
21343
|
};
|
|
21344
21344
|
}
|
|
21345
21345
|
function k0(s) {
|
|
21346
|
-
const e = new
|
|
21346
|
+
const e = new CE(s), t = [], i = [];
|
|
21347
21347
|
function n(f) {
|
|
21348
21348
|
u.camera = f, t.length = 0, i.length = 0;
|
|
21349
21349
|
}
|
|
@@ -21375,7 +21375,7 @@ function k0(s) {
|
|
|
21375
21375
|
pushShadow: a
|
|
21376
21376
|
};
|
|
21377
21377
|
}
|
|
21378
|
-
function
|
|
21378
|
+
function RE(s) {
|
|
21379
21379
|
let e = /* @__PURE__ */ new WeakMap();
|
|
21380
21380
|
function t(n, r = 0) {
|
|
21381
21381
|
const a = e.get(n);
|
|
@@ -21390,9 +21390,9 @@ function R2(s) {
|
|
|
21390
21390
|
dispose: i
|
|
21391
21391
|
};
|
|
21392
21392
|
}
|
|
21393
|
-
const
|
|
21393
|
+
const IE = `void main() {
|
|
21394
21394
|
gl_Position = vec4( position, 1.0 );
|
|
21395
|
-
}`,
|
|
21395
|
+
}`, DE = `uniform sampler2D shadow_pass;
|
|
21396
21396
|
uniform vec2 resolution;
|
|
21397
21397
|
uniform float radius;
|
|
21398
21398
|
#include <packing>
|
|
@@ -21419,8 +21419,8 @@ void main() {
|
|
|
21419
21419
|
float std_dev = sqrt( squared_mean - mean * mean );
|
|
21420
21420
|
gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
|
|
21421
21421
|
}`;
|
|
21422
|
-
function
|
|
21423
|
-
let i = new
|
|
21422
|
+
function LE(s, e, t) {
|
|
21423
|
+
let i = new vc();
|
|
21424
21424
|
const n = new Te(), r = new Te(), a = new si(), l = new Yx({ depthPacking: Rw }), h = new Gx(), u = {}, f = t.maxTextureSize, p = { [_s]: Sn, [Sn]: _s, [On]: On }, m = new hi({
|
|
21425
21425
|
defines: {
|
|
21426
21426
|
VSM_SAMPLES: 8
|
|
@@ -21430,8 +21430,8 @@ function L2(s, e, t) {
|
|
|
21430
21430
|
resolution: { value: new Te() },
|
|
21431
21431
|
radius: { value: 4 }
|
|
21432
21432
|
},
|
|
21433
|
-
vertexShader:
|
|
21434
|
-
fragmentShader:
|
|
21433
|
+
vertexShader: IE,
|
|
21434
|
+
fragmentShader: DE
|
|
21435
21435
|
}), x = m.clone();
|
|
21436
21436
|
x.defines.HORIZONTAL_PASS = 1;
|
|
21437
21437
|
const w = new Vt();
|
|
@@ -21534,7 +21534,7 @@ function L2(s, e, t) {
|
|
|
21534
21534
|
}
|
|
21535
21535
|
}
|
|
21536
21536
|
}
|
|
21537
|
-
const
|
|
21537
|
+
const OE = {
|
|
21538
21538
|
[Mf]: Sf,
|
|
21539
21539
|
[Af]: Pf,
|
|
21540
21540
|
[Tf]: Cf,
|
|
@@ -21544,7 +21544,7 @@ const O2 = {
|
|
|
21544
21544
|
[Cf]: Tf,
|
|
21545
21545
|
[Ef]: Ta
|
|
21546
21546
|
};
|
|
21547
|
-
function
|
|
21547
|
+
function NE(s, e) {
|
|
21548
21548
|
function t() {
|
|
21549
21549
|
let re = !1;
|
|
21550
21550
|
const Ne = new si();
|
|
@@ -21587,7 +21587,7 @@ function N2(s, e) {
|
|
|
21587
21587
|
_e !== nt && !re && (s.depthMask(nt), _e = nt);
|
|
21588
21588
|
},
|
|
21589
21589
|
setFunc: function(nt) {
|
|
21590
|
-
if (Ne && (nt =
|
|
21590
|
+
if (Ne && (nt = OE[nt]), Ee !== nt) {
|
|
21591
21591
|
switch (nt) {
|
|
21592
21592
|
case Mf:
|
|
21593
21593
|
s.depthFunc(s.NEVER);
|
|
@@ -21932,7 +21932,7 @@ function N2(s, e) {
|
|
|
21932
21932
|
reset: Bt
|
|
21933
21933
|
};
|
|
21934
21934
|
}
|
|
21935
|
-
function
|
|
21935
|
+
function BE(s, e, t, i, n, r, a) {
|
|
21936
21936
|
const l = e.has("WEBGL_multisampled_render_to_texture") ? e.get("WEBGL_multisampled_render_to_texture") : null, h = typeof navigator > "u" ? !1 : /OculusBrowser/g.test(navigator.userAgent), u = new Te(), f = /* @__PURE__ */ new WeakMap();
|
|
21937
21937
|
let p;
|
|
21938
21938
|
const m = /* @__PURE__ */ new WeakMap();
|
|
@@ -21945,7 +21945,7 @@ function B2(s, e, t, i, n, r, a) {
|
|
|
21945
21945
|
return x ? (
|
|
21946
21946
|
// eslint-disable-next-line compat/compat
|
|
21947
21947
|
new OffscreenCanvas(N, Q)
|
|
21948
|
-
) :
|
|
21948
|
+
) : oc("canvas");
|
|
21949
21949
|
}
|
|
21950
21950
|
function T(N, Q, fe) {
|
|
21951
21951
|
let we = 1;
|
|
@@ -21984,7 +21984,7 @@ function B2(s, e, t, i, n, r, a) {
|
|
|
21984
21984
|
}
|
|
21985
21985
|
function S(N, Q) {
|
|
21986
21986
|
let fe;
|
|
21987
|
-
return N ? Q === null || Q === bs || Q === Zr ? fe = s.DEPTH24_STENCIL8 : Q === Cn ? fe = s.DEPTH32F_STENCIL8 : Q ===
|
|
21987
|
+
return N ? Q === null || Q === bs || Q === Zr ? fe = s.DEPTH24_STENCIL8 : Q === Cn ? fe = s.DEPTH32F_STENCIL8 : Q === sc && (fe = s.DEPTH24_STENCIL8, console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")) : Q === null || Q === bs || Q === Zr ? fe = s.DEPTH_COMPONENT24 : Q === Cn ? fe = s.DEPTH_COMPONENT32F : Q === sc && (fe = s.DEPTH_COMPONENT16), fe;
|
|
21988
21988
|
}
|
|
21989
21989
|
function z(N, Q) {
|
|
21990
21990
|
return _(N) === !0 || N.isFramebufferTexture && N.minFilter !== pi && N.minFilter !== Pi ? Math.log2(Math.max(Q.width, Q.height)) + 1 : N.mipmaps !== void 0 && N.mipmaps.length > 0 ? N.mipmaps.length : N.isCompressedTexture && Array.isArray(N.image) ? Q.mipmaps.length : 1;
|
|
@@ -22097,13 +22097,13 @@ function B2(s, e, t, i, n, r, a) {
|
|
|
22097
22097
|
const Se = {
|
|
22098
22098
|
[Ms]: s.REPEAT,
|
|
22099
22099
|
[mr]: s.CLAMP_TO_EDGE,
|
|
22100
|
-
[
|
|
22100
|
+
[nc]: s.MIRRORED_REPEAT
|
|
22101
22101
|
}, Ke = {
|
|
22102
22102
|
[pi]: s.NEAREST,
|
|
22103
22103
|
[Dp]: s.NEAREST_MIPMAP_NEAREST,
|
|
22104
22104
|
[xo]: s.NEAREST_MIPMAP_LINEAR,
|
|
22105
22105
|
[Pi]: s.LINEAR,
|
|
22106
|
-
[
|
|
22106
|
+
[Hl]: s.LINEAR_MIPMAP_NEAREST,
|
|
22107
22107
|
[Ns]: s.LINEAR_MIPMAP_LINEAR
|
|
22108
22108
|
}, at = {
|
|
22109
22109
|
[Dw]: s.NEVER,
|
|
@@ -22116,7 +22116,7 @@ function B2(s, e, t, i, n, r, a) {
|
|
|
22116
22116
|
[Bw]: s.NOTEQUAL
|
|
22117
22117
|
};
|
|
22118
22118
|
function Re(N, Q) {
|
|
22119
|
-
if (Q.type === Cn && e.has("OES_texture_float_linear") === !1 && (Q.magFilter === Pi || Q.magFilter ===
|
|
22119
|
+
if (Q.type === Cn && e.has("OES_texture_float_linear") === !1 && (Q.magFilter === Pi || Q.magFilter === Hl || Q.magFilter === xo || Q.magFilter === Ns || Q.minFilter === Pi || Q.minFilter === Hl || Q.minFilter === xo || Q.minFilter === Ns) && console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), s.texParameteri(N, s.TEXTURE_WRAP_S, Se[Q.wrapS]), s.texParameteri(N, s.TEXTURE_WRAP_T, Se[Q.wrapT]), (N === s.TEXTURE_3D || N === s.TEXTURE_2D_ARRAY) && s.texParameteri(N, s.TEXTURE_WRAP_R, Se[Q.wrapR]), s.texParameteri(N, s.TEXTURE_MAG_FILTER, Ke[Q.magFilter]), s.texParameteri(N, s.TEXTURE_MIN_FILTER, Ke[Q.minFilter]), Q.compareFunction && (s.texParameteri(N, s.TEXTURE_COMPARE_MODE, s.COMPARE_REF_TO_TEXTURE), s.texParameteri(N, s.TEXTURE_COMPARE_FUNC, at[Q.compareFunction])), e.has("EXT_texture_filter_anisotropic") === !0) {
|
|
22120
22120
|
if (Q.magFilter === pi || Q.minFilter !== xo && Q.minFilter !== Ns || Q.type === Cn && e.has("OES_texture_float_linear") === !1)
|
|
22121
22121
|
return;
|
|
22122
22122
|
if (Q.anisotropy > 1 || i.get(Q).__currentAnisotropy) {
|
|
@@ -22496,7 +22496,7 @@ function B2(s, e, t, i, n, r, a) {
|
|
|
22496
22496
|
}
|
|
22497
22497
|
this.allocateTextureUnit = J, this.resetTextureUnits = $, this.setTexture2D = ce, this.setTexture2DArray = he, this.setTexture3D = ge, this.setTextureCube = le, this.rebindTextures = Mt, this.setupRenderTarget = Dt, this.updateRenderTargetMipmap = Ie, this.updateMultisampleRenderTarget = mt, this.setupDepthRenderbuffer = yt, this.setupFrameBufferTexture = $e, this.useMultisampledRTT = it;
|
|
22498
22498
|
}
|
|
22499
|
-
function
|
|
22499
|
+
function zE(s, e) {
|
|
22500
22500
|
function t(i, n = pr) {
|
|
22501
22501
|
let r;
|
|
22502
22502
|
const a = ii.getTransfer(n);
|
|
@@ -22512,7 +22512,7 @@ function z2(s, e) {
|
|
|
22512
22512
|
return s.BYTE;
|
|
22513
22513
|
if (i === gx)
|
|
22514
22514
|
return s.SHORT;
|
|
22515
|
-
if (i ===
|
|
22515
|
+
if (i === sc)
|
|
22516
22516
|
return s.UNSIGNED_SHORT;
|
|
22517
22517
|
if (i === Lp)
|
|
22518
22518
|
return s.INT;
|
|
@@ -22536,7 +22536,7 @@ function z2(s, e) {
|
|
|
22536
22536
|
return s.DEPTH_COMPONENT;
|
|
22537
22537
|
if (i === jr)
|
|
22538
22538
|
return s.DEPTH_STENCIL;
|
|
22539
|
-
if (i ===
|
|
22539
|
+
if (i === yc)
|
|
22540
22540
|
return s.RED;
|
|
22541
22541
|
if (i === Mu)
|
|
22542
22542
|
return s.RED_INTEGER;
|
|
@@ -22546,27 +22546,27 @@ function z2(s, e) {
|
|
|
22546
22546
|
return s.RG_INTEGER;
|
|
22547
22547
|
if (i === zp)
|
|
22548
22548
|
return s.RGBA_INTEGER;
|
|
22549
|
-
if (i ===
|
|
22549
|
+
if (i === Kh || i === $h || i === Jh || i === eu)
|
|
22550
22550
|
if (a === wi)
|
|
22551
22551
|
if (r = e.get("WEBGL_compressed_texture_s3tc_srgb"), r !== null) {
|
|
22552
|
-
if (i === jh)
|
|
22553
|
-
return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;
|
|
22554
22552
|
if (i === Kh)
|
|
22555
|
-
return r.
|
|
22553
|
+
return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;
|
|
22556
22554
|
if (i === $h)
|
|
22557
|
-
return r.
|
|
22555
|
+
return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
|
|
22558
22556
|
if (i === Jh)
|
|
22557
|
+
return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
|
|
22558
|
+
if (i === eu)
|
|
22559
22559
|
return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
|
|
22560
22560
|
} else
|
|
22561
22561
|
return null;
|
|
22562
22562
|
else if (r = e.get("WEBGL_compressed_texture_s3tc"), r !== null) {
|
|
22563
|
-
if (i === jh)
|
|
22564
|
-
return r.COMPRESSED_RGB_S3TC_DXT1_EXT;
|
|
22565
22563
|
if (i === Kh)
|
|
22566
|
-
return r.
|
|
22564
|
+
return r.COMPRESSED_RGB_S3TC_DXT1_EXT;
|
|
22567
22565
|
if (i === $h)
|
|
22568
|
-
return r.
|
|
22566
|
+
return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
|
22569
22567
|
if (i === Jh)
|
|
22568
|
+
return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;
|
|
22569
|
+
if (i === eu)
|
|
22570
22570
|
return r.COMPRESSED_RGBA_S3TC_DXT5_EXT;
|
|
22571
22571
|
} else
|
|
22572
22572
|
return null;
|
|
@@ -22622,9 +22622,9 @@ function z2(s, e) {
|
|
|
22622
22622
|
return a === wi ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR : r.COMPRESSED_RGBA_ASTC_12x12_KHR;
|
|
22623
22623
|
} else
|
|
22624
22624
|
return null;
|
|
22625
|
-
if (i ===
|
|
22625
|
+
if (i === tu || i === Kf || i === $f)
|
|
22626
22626
|
if (r = e.get("EXT_texture_compression_bptc"), r !== null) {
|
|
22627
|
-
if (i ===
|
|
22627
|
+
if (i === tu)
|
|
22628
22628
|
return a === wi ? r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT : r.COMPRESSED_RGBA_BPTC_UNORM_EXT;
|
|
22629
22629
|
if (i === Kf)
|
|
22630
22630
|
return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;
|
|
@@ -22634,7 +22634,7 @@ function z2(s, e) {
|
|
|
22634
22634
|
return null;
|
|
22635
22635
|
if (i === Mx || i === Jf || i === ep || i === tp)
|
|
22636
22636
|
if (r = e.get("EXT_texture_compression_rgtc"), r !== null) {
|
|
22637
|
-
if (i ===
|
|
22637
|
+
if (i === tu)
|
|
22638
22638
|
return r.COMPRESSED_RED_RGTC1_EXT;
|
|
22639
22639
|
if (i === Jf)
|
|
22640
22640
|
return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;
|
|
@@ -22648,7 +22648,7 @@ function z2(s, e) {
|
|
|
22648
22648
|
}
|
|
22649
22649
|
return { convert: t };
|
|
22650
22650
|
}
|
|
22651
|
-
const
|
|
22651
|
+
const UE = { type: "move" };
|
|
22652
22652
|
class Gd {
|
|
22653
22653
|
constructor() {
|
|
22654
22654
|
this._targetRay = null, this._grip = null, this._hand = null;
|
|
@@ -22699,7 +22699,7 @@ class Gd {
|
|
|
22699
22699
|
}));
|
|
22700
22700
|
} else
|
|
22701
22701
|
h !== null && e.gripSpace && (r = t.getPose(e.gripSpace, i), r !== null && (h.matrix.fromArray(r.transform.matrix), h.matrix.decompose(h.position, h.rotation, h.scale), h.matrixWorldNeedsUpdate = !0, r.linearVelocity ? (h.hasLinearVelocity = !0, h.linearVelocity.copy(r.linearVelocity)) : h.hasLinearVelocity = !1, r.angularVelocity ? (h.hasAngularVelocity = !0, h.angularVelocity.copy(r.angularVelocity)) : h.hasAngularVelocity = !1));
|
|
22702
|
-
l !== null && (n = t.getPose(e.targetRaySpace, i), n === null && r !== null && (n = r), n !== null && (l.matrix.fromArray(n.transform.matrix), l.matrix.decompose(l.position, l.rotation, l.scale), l.matrixWorldNeedsUpdate = !0, n.linearVelocity ? (l.hasLinearVelocity = !0, l.linearVelocity.copy(n.linearVelocity)) : l.hasLinearVelocity = !1, n.angularVelocity ? (l.hasAngularVelocity = !0, l.angularVelocity.copy(n.angularVelocity)) : l.hasAngularVelocity = !1, this.dispatchEvent(
|
|
22702
|
+
l !== null && (n = t.getPose(e.targetRaySpace, i), n === null && r !== null && (n = r), n !== null && (l.matrix.fromArray(n.transform.matrix), l.matrix.decompose(l.position, l.rotation, l.scale), l.matrixWorldNeedsUpdate = !0, n.linearVelocity ? (l.hasLinearVelocity = !0, l.linearVelocity.copy(n.linearVelocity)) : l.hasLinearVelocity = !1, n.angularVelocity ? (l.hasAngularVelocity = !0, l.angularVelocity.copy(n.angularVelocity)) : l.hasAngularVelocity = !1, this.dispatchEvent(UE)));
|
|
22703
22703
|
}
|
|
22704
22704
|
return l !== null && (l.visible = n !== null), h !== null && (h.visible = r !== null), u !== null && (u.visible = a !== null), this;
|
|
22705
22705
|
}
|
|
@@ -22712,12 +22712,12 @@ class Gd {
|
|
|
22712
22712
|
return e.joints[t.jointName];
|
|
22713
22713
|
}
|
|
22714
22714
|
}
|
|
22715
|
-
const
|
|
22715
|
+
const FE = `
|
|
22716
22716
|
void main() {
|
|
22717
22717
|
|
|
22718
22718
|
gl_Position = vec4( position, 1.0 );
|
|
22719
22719
|
|
|
22720
|
-
}`,
|
|
22720
|
+
}`, kE = `
|
|
22721
22721
|
uniform sampler2DArray depthColor;
|
|
22722
22722
|
uniform float depthWidth;
|
|
22723
22723
|
uniform float depthHeight;
|
|
@@ -22737,7 +22737,7 @@ void main() {
|
|
|
22737
22737
|
}
|
|
22738
22738
|
|
|
22739
22739
|
}`;
|
|
22740
|
-
class
|
|
22740
|
+
class VE {
|
|
22741
22741
|
constructor() {
|
|
22742
22742
|
this.texture = null, this.mesh = null, this.depthNear = 0, this.depthFar = 0;
|
|
22743
22743
|
}
|
|
@@ -22750,8 +22750,8 @@ class V2 {
|
|
|
22750
22750
|
getMesh(e) {
|
|
22751
22751
|
if (this.texture !== null && this.mesh === null) {
|
|
22752
22752
|
const t = e.cameras[0].viewport, i = new hi({
|
|
22753
|
-
vertexShader:
|
|
22754
|
-
fragmentShader:
|
|
22753
|
+
vertexShader: FE,
|
|
22754
|
+
fragmentShader: kE,
|
|
22755
22755
|
uniforms: {
|
|
22756
22756
|
depthColor: { value: this.texture },
|
|
22757
22757
|
depthWidth: { value: t.z },
|
|
@@ -22769,12 +22769,12 @@ class V2 {
|
|
|
22769
22769
|
return this.texture;
|
|
22770
22770
|
}
|
|
22771
22771
|
}
|
|
22772
|
-
class
|
|
22772
|
+
class XE extends Sr {
|
|
22773
22773
|
constructor(e, t) {
|
|
22774
22774
|
super();
|
|
22775
22775
|
const i = this;
|
|
22776
22776
|
let n = null, r = 1, a = null, l = "local-floor", h = 1, u = null, f = null, p = null, m = null, x = null, w = null;
|
|
22777
|
-
const T = new
|
|
22777
|
+
const T = new VE(), _ = t.getContextAttributes();
|
|
22778
22778
|
let b = null, P = null;
|
|
22779
22779
|
const E = [], S = [], z = new Te();
|
|
22780
22780
|
let F = null;
|
|
@@ -22984,8 +22984,8 @@ class X2 extends Sr {
|
|
|
22984
22984
|
};
|
|
22985
22985
|
}
|
|
22986
22986
|
}
|
|
22987
|
-
const da = /* @__PURE__ */ new zn(),
|
|
22988
|
-
function
|
|
22987
|
+
const da = /* @__PURE__ */ new zn(), HE = /* @__PURE__ */ new ot();
|
|
22988
|
+
function YE(s, e) {
|
|
22989
22989
|
function t(_, b) {
|
|
22990
22990
|
_.matrixAutoUpdate === !0 && _.updateMatrix(), b.value.copy(_.matrix);
|
|
22991
22991
|
}
|
|
@@ -22998,7 +22998,7 @@ function Y2(s, e) {
|
|
|
22998
22998
|
function r(_, b) {
|
|
22999
22999
|
_.opacity.value = b.opacity, b.color && _.diffuse.value.copy(b.color), b.emissive && _.emissive.value.copy(b.emissive).multiplyScalar(b.emissiveIntensity), b.map && (_.map.value = b.map, t(b.map, _.mapTransform)), b.alphaMap && (_.alphaMap.value = b.alphaMap, t(b.alphaMap, _.alphaMapTransform)), b.bumpMap && (_.bumpMap.value = b.bumpMap, t(b.bumpMap, _.bumpMapTransform), _.bumpScale.value = b.bumpScale, b.side === Sn && (_.bumpScale.value *= -1)), b.normalMap && (_.normalMap.value = b.normalMap, t(b.normalMap, _.normalMapTransform), _.normalScale.value.copy(b.normalScale), b.side === Sn && _.normalScale.value.negate()), b.displacementMap && (_.displacementMap.value = b.displacementMap, t(b.displacementMap, _.displacementMapTransform), _.displacementScale.value = b.displacementScale, _.displacementBias.value = b.displacementBias), b.emissiveMap && (_.emissiveMap.value = b.emissiveMap, t(b.emissiveMap, _.emissiveMapTransform)), b.specularMap && (_.specularMap.value = b.specularMap, t(b.specularMap, _.specularMapTransform)), b.alphaTest > 0 && (_.alphaTest.value = b.alphaTest);
|
|
23000
23000
|
const P = e.get(b), E = P.envMap, S = P.envMapRotation;
|
|
23001
|
-
E && (_.envMap.value = E, da.copy(S), da.x *= -1, da.y *= -1, da.z *= -1, E.isCubeTexture && E.isRenderTargetTexture === !1 && (da.y *= -1, da.z *= -1), _.envMapRotation.value.setFromMatrix4(
|
|
23001
|
+
E && (_.envMap.value = E, da.copy(S), da.x *= -1, da.y *= -1, da.z *= -1, E.isCubeTexture && E.isRenderTargetTexture === !1 && (da.y *= -1, da.z *= -1), _.envMapRotation.value.setFromMatrix4(HE.makeRotationFromEuler(da)), _.flipEnvMap.value = E.isCubeTexture && E.isRenderTargetTexture === !1 ? -1 : 1, _.reflectivity.value = b.reflectivity, _.ior.value = b.ior, _.refractionRatio.value = b.refractionRatio), b.lightMap && (_.lightMap.value = b.lightMap, _.lightMapIntensity.value = b.lightMapIntensity, t(b.lightMap, _.lightMapTransform)), b.aoMap && (_.aoMap.value = b.aoMap, _.aoMapIntensity.value = b.aoMapIntensity, t(b.aoMap, _.aoMapTransform));
|
|
23002
23002
|
}
|
|
23003
23003
|
function a(_, b) {
|
|
23004
23004
|
_.diffuse.value.copy(b.color), _.opacity.value = b.opacity, b.map && (_.map.value = b.map, t(b.map, _.mapTransform));
|
|
@@ -23036,7 +23036,7 @@ function Y2(s, e) {
|
|
|
23036
23036
|
refreshMaterialUniforms: n
|
|
23037
23037
|
};
|
|
23038
23038
|
}
|
|
23039
|
-
function
|
|
23039
|
+
function GE(s, e, t, i) {
|
|
23040
23040
|
let n = {}, r = {}, a = [];
|
|
23041
23041
|
const l = s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);
|
|
23042
23042
|
function h(P, E) {
|
|
@@ -23186,7 +23186,7 @@ class ov {
|
|
|
23186
23186
|
let ce = 0, he = t.width, ge = t.height, le = 1, Se = null, Ke = null;
|
|
23187
23187
|
const at = new si(0, 0, he, ge), Re = new si(0, 0, he, ge);
|
|
23188
23188
|
let qe = !1;
|
|
23189
|
-
const Ae = new
|
|
23189
|
+
const Ae = new vc();
|
|
23190
23190
|
let Me = !1, $e = !1;
|
|
23191
23191
|
const Pe = new ot(), lt = new ot(), yt = new W(), Mt = new si(), Dt = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 };
|
|
23192
23192
|
let Ie = !1;
|
|
@@ -23218,10 +23218,10 @@ class ov {
|
|
|
23218
23218
|
}
|
|
23219
23219
|
let Ue, it, We, dt, Je, N, Q, fe, we, me, be, Ze, He, tt, Tt, Le, je, gt, xt, ct, Rt, bt, Bt, re;
|
|
23220
23220
|
function Ne() {
|
|
23221
|
-
Ue = new
|
|
23221
|
+
Ue = new t2(j), Ue.init(), bt = new zE(j, Ue), it = new ZT(j, Ue, e, bt), We = new NE(j, Ue), it.reverseDepthBuffer && m && We.buffers.depth.setReversed(!0), dt = new s2(j), Je = new _E(), N = new BE(j, Ue, We, Je, it, bt, dt), Q = new KT(S), fe = new e2(S), we = new uS(j), Bt = new QT(j, we), me = new i2(j, we, dt, Bt), be = new a2(j, me, we, dt), xt = new r2(j, it, N), Le = new jT(Je), Ze = new wE(S, Q, fe, Ue, it, Bt, Le), He = new YE(S, Je), tt = new SE(), Tt = new RE(Ue), gt = new WT(S, Q, fe, We, be, x, h), je = new LE(S, be, it), re = new GE(j, dt, it, We), ct = new qT(j, Ue, dt), Rt = new n2(j, Ue, dt), dt.programs = Ze.programs, S.capabilities = it, S.extensions = Ue, S.properties = Je, S.renderLists = tt, S.shadowMap = je, S.state = We, S.info = dt;
|
|
23222
23222
|
}
|
|
23223
23223
|
Ne();
|
|
23224
|
-
const _e = new
|
|
23224
|
+
const _e = new XE(S, j);
|
|
23225
23225
|
this.xr = _e, this.getContext = function() {
|
|
23226
23226
|
return j;
|
|
23227
23227
|
}, this.getContextAttributes = function() {
|
|
@@ -23283,7 +23283,7 @@ class ov {
|
|
|
23283
23283
|
ae = ve === zp || ve === Bp || ve === Mu;
|
|
23284
23284
|
}
|
|
23285
23285
|
if (ae) {
|
|
23286
|
-
const ve = H.texture.type, Ge = ve === wr || ve === bs || ve ===
|
|
23286
|
+
const ve = H.texture.type, Ge = ve === wr || ve === bs || ve === sc || ve === Zr || ve === Op || ve === Np, st = gt.getClearColor(), Ye = gt.getClearAlpha(), ht = st.r, rt = st.g, et = st.b;
|
|
23287
23287
|
Ge ? (w[0] = ht, w[1] = rt, w[2] = et, w[3] = Ye, j.clearBufferuiv(j.COLOR, 0, w)) : (T[0] = ht, T[1] = rt, T[2] = et, T[3] = Ye, j.clearBufferiv(j.COLOR, 0, T));
|
|
23288
23288
|
} else
|
|
23289
23289
|
pe |= j.COLOR_BUFFER_BIT;
|
|
@@ -23543,7 +23543,7 @@ class ov {
|
|
|
23543
23543
|
function ee(X) {
|
|
23544
23544
|
if (X.uniformsList === null) {
|
|
23545
23545
|
const ie = X.currentProgram.getUniforms();
|
|
23546
|
-
X.uniformsList =
|
|
23546
|
+
X.uniformsList = iu.seqWithValue(ie.seq, X.uniforms);
|
|
23547
23547
|
}
|
|
23548
23548
|
return X.uniformsList;
|
|
23549
23549
|
}
|
|
@@ -23583,7 +23583,7 @@ class ov {
|
|
|
23583
23583
|
}
|
|
23584
23584
|
ae.isBatchedMesh && (gi.setOptional(j, ae, "batchingTexture"), gi.setValue(j, "batchingTexture", ae._matricesTexture, N), gi.setOptional(j, ae, "batchingIdTexture"), gi.setValue(j, "batchingIdTexture", ae._indirectTexture, N), gi.setOptional(j, ae, "batchingColorTexture"), ae._colorsTexture !== null && gi.setValue(j, "batchingColorTexture", ae._colorsTexture, N));
|
|
23585
23585
|
const Hi = ue.morphAttributes;
|
|
23586
|
-
if ((Hi.position !== void 0 || Hi.normal !== void 0 || Hi.color !== void 0) && xt.update(ae, ue, Qi), (un || St.receiveShadow !== ae.receiveShadow) && (St.receiveShadow = ae.receiveShadow, gi.setValue(j, "receiveShadow", ae.receiveShadow)), pe.isMeshGouraudMaterial && pe.envMap !== null && (ti.envMap.value = Ye, ti.flipEnvMap.value = Ye.isCubeTexture && Ye.isRenderTargetTexture === !1 ? -1 : 1), pe.isMeshStandardMaterial && pe.envMap === null && ie.environment !== null && (ti.envMapIntensity.value = ie.environmentIntensity), un && (gi.setValue(j, "toneMappingExposure", S.toneMappingExposure), St.needsLights && Be(ti, Vs), ve && pe.fog === !0 && He.refreshFogUniforms(ti, ve), He.refreshMaterialUniforms(ti, pe, le, ge, b.state.transmissionRenderTarget[X.id]),
|
|
23586
|
+
if ((Hi.position !== void 0 || Hi.normal !== void 0 || Hi.color !== void 0) && xt.update(ae, ue, Qi), (un || St.receiveShadow !== ae.receiveShadow) && (St.receiveShadow = ae.receiveShadow, gi.setValue(j, "receiveShadow", ae.receiveShadow)), pe.isMeshGouraudMaterial && pe.envMap !== null && (ti.envMap.value = Ye, ti.flipEnvMap.value = Ye.isCubeTexture && Ye.isRenderTargetTexture === !1 ? -1 : 1), pe.isMeshStandardMaterial && pe.envMap === null && ie.environment !== null && (ti.envMapIntensity.value = ie.environmentIntensity), un && (gi.setValue(j, "toneMappingExposure", S.toneMappingExposure), St.needsLights && Be(ti, Vs), ve && pe.fog === !0 && He.refreshFogUniforms(ti, ve), He.refreshMaterialUniforms(ti, pe, le, ge, b.state.transmissionRenderTarget[X.id]), iu.upload(j, ee(St), ti, N)), pe.isShaderMaterial && pe.uniformsNeedUpdate === !0 && (iu.upload(j, ee(St), ti, N), pe.uniformsNeedUpdate = !1), pe.isSpriteMaterial && gi.setValue(j, "center", ae.center), gi.setValue(j, "modelViewMatrix", ae.modelViewMatrix), gi.setValue(j, "normalMatrix", ae.normalMatrix), gi.setValue(j, "modelMatrix", ae.matrixWorld), pe.isShaderMaterial || pe.isRawShaderMaterial) {
|
|
23587
23587
|
const Bi = pe.uniformsGroups;
|
|
23588
23588
|
for (let Yi = 0, $t = Bi.length; Yi < $t; Yi++) {
|
|
23589
23589
|
const ls = Bi[Yi];
|
|
@@ -23749,7 +23749,7 @@ class ov {
|
|
|
23749
23749
|
t.drawingBufferColorspace = ii._getDrawingBufferColorSpace(e), t.unpackColorSpace = ii._getUnpackColorSpace();
|
|
23750
23750
|
}
|
|
23751
23751
|
}
|
|
23752
|
-
const
|
|
23752
|
+
const WE = {
|
|
23753
23753
|
Vector2: Te,
|
|
23754
23754
|
Vector3: W,
|
|
23755
23755
|
Vector4: si,
|
|
@@ -23758,12 +23758,12 @@ const W2 = {
|
|
|
23758
23758
|
Spherical: tv,
|
|
23759
23759
|
Box3: li,
|
|
23760
23760
|
Sphere: Ki,
|
|
23761
|
-
Raycaster:
|
|
23761
|
+
Raycaster: Mc,
|
|
23762
23762
|
MathUtils: Su
|
|
23763
23763
|
};
|
|
23764
|
-
class
|
|
23764
|
+
class QE {
|
|
23765
23765
|
constructor(e) {
|
|
23766
|
-
this.viralViewerApi = e, this.raycaster = new
|
|
23766
|
+
this.viralViewerApi = e, this.raycaster = new Mc(), this.camera = null, this.cameraControls = null, this.onUsing = !1, this.cameraWakeQueuedEvents = [], this.cameraSleepQueuedEvents = [], this.cameraUpdateQueuedEvents = [], this.targetElement = this.viralViewerApi.options.container, this.setupCamera(), this.viralViewerApi.lifeCycleEvent.emit(Li.LOADED_CAMERA);
|
|
23767
23767
|
}
|
|
23768
23768
|
setupCamera() {
|
|
23769
23769
|
this.camera = new mn(
|
|
@@ -23771,7 +23771,7 @@ class Q2 {
|
|
|
23771
23771
|
this.targetElement.clientWidth / this.targetElement.clientHeight,
|
|
23772
23772
|
0.1,
|
|
23773
23773
|
2e3
|
|
23774
|
-
), this.camera.position.set(0, 0, 2), this.viralViewerApi.options && this.viralViewerApi.options.cameraZUp && (this.camera.up.set(0, 0, 1), this.camera.position.set(100, 100, 0)), Os.install({ THREE:
|
|
23774
|
+
), this.camera.position.set(0, 0, 2), this.viralViewerApi.options && this.viralViewerApi.options.cameraZUp && (this.camera.up.set(0, 0, 1), this.camera.position.set(100, 100, 0)), Os.install({ THREE: WE }), this.cameraControls = new Os(
|
|
23775
23775
|
this.camera,
|
|
23776
23776
|
this.viralViewerApi.viralRenderer.renderer.domElement
|
|
23777
23777
|
), this.cameraControls.setTarget(0, 0, 0), this.cameraControls.mouseButtons.middle = Os.ACTION.OFFSET, this.cameraControls.addEventListener("wake", (e) => {
|
|
@@ -23941,7 +23941,7 @@ class Q2 {
|
|
|
23941
23941
|
}
|
|
23942
23942
|
//#endregion
|
|
23943
23943
|
}
|
|
23944
|
-
class
|
|
23944
|
+
class qE {
|
|
23945
23945
|
constructor(e) {
|
|
23946
23946
|
this.viralViewerApi = e, this.position = new Te(), this.rawPosition = new Te(), this.mouseMoveQueuedEvents = [], this.mouseDownLeftQueuedEvents = [], this.mouseUpLeftQueuedEvents = [], this.mouseDownRightQueuedEvents = [], this.mouseUpRightQueuedEvents = [], this.mouseDoubleClickQueuedEvents = [], this.hoverMeshes = [], this.handleClick = async (t) => {
|
|
23947
23947
|
var i, n;
|
|
@@ -24120,12 +24120,12 @@ class q2 {
|
|
|
24120
24120
|
}
|
|
24121
24121
|
//#endregion
|
|
24122
24122
|
}
|
|
24123
|
-
const fa = new
|
|
24123
|
+
const fa = new Mc(), bn = new W(), Or = new W(), Ni = new Fi(), V0 = {
|
|
24124
24124
|
X: new W(1, 0, 0),
|
|
24125
24125
|
Y: new W(0, 1, 0),
|
|
24126
24126
|
Z: new W(0, 0, 1)
|
|
24127
24127
|
}, Wd = { type: "change" }, X0 = { type: "mouseDown", mode: null }, H0 = { type: "mouseUp", mode: null }, Y0 = { type: "objectChange" };
|
|
24128
|
-
class
|
|
24128
|
+
class ZE extends cS {
|
|
24129
24129
|
constructor(e, t = null) {
|
|
24130
24130
|
super(void 0, t);
|
|
24131
24131
|
const i = new tP(this);
|
|
@@ -24148,7 +24148,7 @@ class Z2 extends cS {
|
|
|
24148
24148
|
}
|
|
24149
24149
|
l("camera", e), l("object", void 0), l("enabled", !0), l("axis", null), l("mode", "translate"), l("translationSnap", null), l("rotationSnap", null), l("scaleSnap", null), l("space", "world"), l("size", 1), l("dragging", !1), l("showX", !0), l("showY", !0), l("showZ", !0), l("minX", -1 / 0), l("maxX", 1 / 0), l("minY", -1 / 0), l("maxY", 1 / 0), l("minZ", -1 / 0), l("maxZ", 1 / 0);
|
|
24150
24150
|
const h = new W(), u = new W(), f = new Fi(), p = new Fi(), m = new W(), x = new Fi(), w = new W(), T = new W(), _ = new W(), b = 0, P = new W();
|
|
24151
|
-
l("worldPosition", h), l("worldPositionStart", u), l("worldQuaternion", f), l("worldQuaternionStart", p), l("cameraPosition", m), l("cameraQuaternion", x), l("pointStart", w), l("pointEnd", T), l("rotationAxis", _), l("rotationAngle", b), l("eye", P), this._offset = new W(), this._startNorm = new W(), this._endNorm = new W(), this._cameraScale = new W(), this._parentPosition = new W(), this._parentQuaternion = new Fi(), this._parentQuaternionInv = new Fi(), this._parentScale = new W(), this._worldScaleStart = new W(), this._worldQuaternionInv = new Fi(), this._worldScale = new W(), this._positionStart = new W(), this._quaternionStart = new Fi(), this._scaleStart = new W(), this._getPointer =
|
|
24151
|
+
l("worldPosition", h), l("worldPositionStart", u), l("worldQuaternion", f), l("worldQuaternionStart", p), l("cameraPosition", m), l("cameraQuaternion", x), l("pointStart", w), l("pointEnd", T), l("rotationAxis", _), l("rotationAngle", b), l("eye", P), this._offset = new W(), this._startNorm = new W(), this._endNorm = new W(), this._cameraScale = new W(), this._parentPosition = new W(), this._parentQuaternion = new Fi(), this._parentQuaternionInv = new Fi(), this._parentScale = new W(), this._worldScaleStart = new W(), this._worldQuaternionInv = new Fi(), this._worldScale = new W(), this._positionStart = new W(), this._quaternionStart = new Fi(), this._scaleStart = new W(), this._getPointer = jE.bind(this), this._onPointerDown = $E.bind(this), this._onPointerHover = KE.bind(this), this._onPointerMove = JE.bind(this), this._onPointerUp = eP.bind(this), t !== null && this.connect();
|
|
24152
24152
|
}
|
|
24153
24153
|
connect() {
|
|
24154
24154
|
this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
|
|
@@ -24242,7 +24242,7 @@ class Z2 extends cS {
|
|
|
24242
24242
|
this.space = e;
|
|
24243
24243
|
}
|
|
24244
24244
|
}
|
|
24245
|
-
function
|
|
24245
|
+
function jE(s) {
|
|
24246
24246
|
if (this.domElement.ownerDocument.pointerLockElement)
|
|
24247
24247
|
return {
|
|
24248
24248
|
x: 0,
|
|
@@ -24258,7 +24258,7 @@ function j2(s) {
|
|
|
24258
24258
|
};
|
|
24259
24259
|
}
|
|
24260
24260
|
}
|
|
24261
|
-
function
|
|
24261
|
+
function KE(s) {
|
|
24262
24262
|
if (this.enabled)
|
|
24263
24263
|
switch (s.pointerType) {
|
|
24264
24264
|
case "mouse":
|
|
@@ -24267,10 +24267,10 @@ function K2(s) {
|
|
|
24267
24267
|
break;
|
|
24268
24268
|
}
|
|
24269
24269
|
}
|
|
24270
|
-
function $
|
|
24270
|
+
function $E(s) {
|
|
24271
24271
|
this.enabled && (document.pointerLockElement || this.domElement.setPointerCapture(s.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.pointerHover(this._getPointer(s)), this.pointerDown(this._getPointer(s)));
|
|
24272
24272
|
}
|
|
24273
|
-
function
|
|
24273
|
+
function JE(s) {
|
|
24274
24274
|
this.enabled && this.pointerMove(this._getPointer(s));
|
|
24275
24275
|
}
|
|
24276
24276
|
function eP(s) {
|
|
@@ -24283,7 +24283,7 @@ function Qd(s, e, t) {
|
|
|
24283
24283
|
return i[n];
|
|
24284
24284
|
return !1;
|
|
24285
24285
|
}
|
|
24286
|
-
const
|
|
24286
|
+
const Eh = new zn(), Ai = new W(0, 1, 0), G0 = new W(0, 0, 0), W0 = new ot(), Ph = new Fi(), nu = new Fi(), Rs = new W(), Q0 = new ot(), zl = new W(1, 0, 0), ga = new W(0, 1, 0), Ul = new W(0, 0, 1), Ch = new W(), Sl = new W(), Al = new W();
|
|
24287
24287
|
class tP extends ui {
|
|
24288
24288
|
constructor(e) {
|
|
24289
24289
|
super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
|
|
@@ -24446,7 +24446,7 @@ class iP extends ui {
|
|
|
24446
24446
|
]
|
|
24447
24447
|
}, O = {
|
|
24448
24448
|
XYZE: [
|
|
24449
|
-
[new de(new
|
|
24449
|
+
[new de(new bc(0.25, 10, 8), i)]
|
|
24450
24450
|
],
|
|
24451
24451
|
X: [
|
|
24452
24452
|
[new de(new Fr(0.5, 0.1, 4, 24), i), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
|
|
@@ -24539,7 +24539,7 @@ class iP extends ui {
|
|
|
24539
24539
|
}
|
|
24540
24540
|
// updateMatrixWorld will update transformations and appearance of individual handles
|
|
24541
24541
|
updateMatrixWorld(e) {
|
|
24542
|
-
const i = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion :
|
|
24542
|
+
const i = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : nu;
|
|
24543
24543
|
this.gizmo.translate.visible = this.mode === "translate", this.gizmo.rotate.visible = this.mode === "rotate", this.gizmo.scale.visible = this.mode === "scale", this.helper.translate.visible = this.mode === "translate", this.helper.rotate.visible = this.mode === "rotate", this.helper.scale.visible = this.mode === "scale";
|
|
24544
24544
|
let n = [];
|
|
24545
24545
|
n = n.concat(this.picker[this.mode].children), n = n.concat(this.gizmo[this.mode].children), n = n.concat(this.helper[this.mode].children);
|
|
@@ -24548,10 +24548,10 @@ class iP extends ui {
|
|
|
24548
24548
|
a.visible = !0, a.rotation.set(0, 0, 0), a.position.copy(this.worldPosition);
|
|
24549
24549
|
let l;
|
|
24550
24550
|
if (this.camera.isOrthographicCamera ? l = (this.camera.top - this.camera.bottom) / this.camera.zoom : l = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), a.scale.set(1, 1, 1).multiplyScalar(l * this.size / 4), a.tag === "helper") {
|
|
24551
|
-
a.visible = !1, a.name === "AXIS" ? (a.visible = !!this.axis, this.axis === "X" && (Ni.setFromEuler(
|
|
24551
|
+
a.visible = !1, a.name === "AXIS" ? (a.visible = !!this.axis, this.axis === "X" && (Ni.setFromEuler(Eh.set(0, 0, 0)), a.quaternion.copy(i).multiply(Ni), Math.abs(Ai.copy(zl).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Y" && (Ni.setFromEuler(Eh.set(0, 0, Math.PI / 2)), a.quaternion.copy(i).multiply(Ni), Math.abs(Ai.copy(ga).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Z" && (Ni.setFromEuler(Eh.set(0, Math.PI / 2, 0)), a.quaternion.copy(i).multiply(Ni), Math.abs(Ai.copy(Ul).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "XYZE" && (Ni.setFromEuler(Eh.set(0, Math.PI / 2, 0)), Ai.copy(this.rotationAxis), a.quaternion.setFromRotationMatrix(W0.lookAt(G0, Ai, ga)), a.quaternion.multiply(Ni), a.visible = this.dragging), this.axis === "E" && (a.visible = !1)) : a.name === "START" ? (a.position.copy(this.worldPositionStart), a.visible = this.dragging) : a.name === "END" ? (a.position.copy(this.worldPosition), a.visible = this.dragging) : a.name === "DELTA" ? (a.position.copy(this.worldPositionStart), a.quaternion.copy(this.worldQuaternionStart), bn.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), bn.applyQuaternion(this.worldQuaternionStart.clone().invert()), a.scale.copy(bn), a.visible = this.dragging) : (a.quaternion.copy(i), this.dragging ? a.position.copy(this.worldPositionStart) : a.position.copy(this.worldPosition), this.axis && (a.visible = this.axis.search(a.name) !== -1));
|
|
24552
24552
|
continue;
|
|
24553
24553
|
}
|
|
24554
|
-
a.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (a.name === "X" && Math.abs(Ai.copy(zl).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Y" && Math.abs(Ai.copy(ga).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Z" && Math.abs(Ai.copy(Ul).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XY" && Math.abs(Ai.copy(Ul).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "YZ" && Math.abs(Ai.copy(zl).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XZ" && Math.abs(Ai.copy(ga).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1)) : this.mode === "rotate" && (
|
|
24554
|
+
a.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (a.name === "X" && Math.abs(Ai.copy(zl).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Y" && Math.abs(Ai.copy(ga).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Z" && Math.abs(Ai.copy(Ul).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XY" && Math.abs(Ai.copy(Ul).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "YZ" && Math.abs(Ai.copy(zl).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XZ" && Math.abs(Ai.copy(ga).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1)) : this.mode === "rotate" && (Ph.copy(i), Ai.copy(this.eye).applyQuaternion(Ni.copy(i).invert()), a.name.search("E") !== -1 && a.quaternion.setFromRotationMatrix(W0.lookAt(this.eye, G0, ga)), a.name === "X" && (Ni.setFromAxisAngle(zl, Math.atan2(-Ai.y, Ai.z)), Ni.multiplyQuaternions(Ph, Ni), a.quaternion.copy(Ni)), a.name === "Y" && (Ni.setFromAxisAngle(ga, Math.atan2(Ai.x, Ai.z)), Ni.multiplyQuaternions(Ph, Ni), a.quaternion.copy(Ni)), a.name === "Z" && (Ni.setFromAxisAngle(Ul, Math.atan2(Ai.y, Ai.x)), Ni.multiplyQuaternions(Ph, Ni), a.quaternion.copy(Ni))), a.visible = a.visible && (a.name.indexOf("X") === -1 || this.showX), a.visible = a.visible && (a.name.indexOf("Y") === -1 || this.showY), a.visible = a.visible && (a.name.indexOf("Z") === -1 || this.showZ), a.visible = a.visible && (a.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), a.material._color = a.material._color || a.material.color.clone(), a.material._opacity = a.material._opacity || a.material.opacity, a.material.color.copy(a.material._color), a.material.opacity = a.material._opacity, this.enabled && this.axis && (a.name === this.axis || this.axis.split("").some(function(h) {
|
|
24555
24555
|
return a.name === h;
|
|
24556
24556
|
})) && (a.material.color.setHex(16776960), a.material.opacity = 1);
|
|
24557
24557
|
}
|
|
@@ -24567,12 +24567,12 @@ class nP extends de {
|
|
|
24567
24567
|
}
|
|
24568
24568
|
updateMatrixWorld(e) {
|
|
24569
24569
|
let t = this.space;
|
|
24570
|
-
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"),
|
|
24570
|
+
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Ch.copy(zl).applyQuaternion(t === "local" ? this.worldQuaternion : nu), Sl.copy(ga).applyQuaternion(t === "local" ? this.worldQuaternion : nu), Al.copy(Ul).applyQuaternion(t === "local" ? this.worldQuaternion : nu), Ai.copy(Sl), this.mode) {
|
|
24571
24571
|
case "translate":
|
|
24572
24572
|
case "scale":
|
|
24573
24573
|
switch (this.axis) {
|
|
24574
24574
|
case "X":
|
|
24575
|
-
Ai.copy(this.eye).cross(
|
|
24575
|
+
Ai.copy(this.eye).cross(Ch), Rs.copy(Ch).cross(Ai);
|
|
24576
24576
|
break;
|
|
24577
24577
|
case "Y":
|
|
24578
24578
|
Ai.copy(this.eye).cross(Sl), Rs.copy(Sl).cross(Ai);
|
|
@@ -24584,7 +24584,7 @@ class nP extends de {
|
|
|
24584
24584
|
Rs.copy(Al);
|
|
24585
24585
|
break;
|
|
24586
24586
|
case "YZ":
|
|
24587
|
-
Rs.copy(
|
|
24587
|
+
Rs.copy(Ch);
|
|
24588
24588
|
break;
|
|
24589
24589
|
case "XZ":
|
|
24590
24590
|
Ai.copy(Al), Rs.copy(Sl);
|
|
@@ -24676,7 +24676,7 @@ class aP extends de {
|
|
|
24676
24676
|
}
|
|
24677
24677
|
class oP {
|
|
24678
24678
|
constructor(e) {
|
|
24679
|
-
this.viralViewerApi = e, this.scene = new
|
|
24679
|
+
this.viralViewerApi = e, this.scene = new xc(), this.objects = [], this.models = [], this.mainModel = new aP(), this.isolateModel = new de(), this.mergedModel = new rP(), this.hideables = [], this.selectables = [], this.edges = [], this.sunLight = null, this.lights = [], this.transformControls = null, this.lightHelpers = [], this.viralViewerApi.lifeCycleEvent.emit(Li.LOADED_SCENE), this.mainModel.name = "Viral Model", this.addModel(this.mainModel), this.isolateModel.name = "Isolate Model", this.addModel(this.isolateModel), this.mergedModel.name = "Merged Model", this.addModel(this.mergedModel), this.addLights(), this.addPivotPoint();
|
|
24680
24680
|
}
|
|
24681
24681
|
//#region Add Main Objects
|
|
24682
24682
|
addObject(e) {
|
|
@@ -24715,7 +24715,7 @@ class oP {
|
|
|
24715
24715
|
}
|
|
24716
24716
|
//#endregion
|
|
24717
24717
|
addPivotPoint() {
|
|
24718
|
-
const e = new
|
|
24718
|
+
const e = new bc(1, 32, 32), t = new Bn({
|
|
24719
24719
|
color: Mn.hexToThreejsColor(Ht.primary),
|
|
24720
24720
|
transparent: !0,
|
|
24721
24721
|
opacity: 0.5
|
|
@@ -24723,7 +24723,7 @@ class oP {
|
|
|
24723
24723
|
i.name = "Viral Pivot Point", i.visible = !1, this.addObject(i);
|
|
24724
24724
|
}
|
|
24725
24725
|
addTransformControls() {
|
|
24726
|
-
this.viralViewerApi.viralCamera.camera && (this.transformControls = new
|
|
24726
|
+
this.viralViewerApi.viralCamera.camera && (this.transformControls = new ZE(
|
|
24727
24727
|
this.viralViewerApi.viralCamera.camera,
|
|
24728
24728
|
this.viralViewerApi.viralRenderer.renderer.domElement
|
|
24729
24729
|
), this.addObject(this.transformControls));
|
|
@@ -24733,7 +24733,7 @@ class oP {
|
|
|
24733
24733
|
if (this.scene) {
|
|
24734
24734
|
const e = new de(
|
|
24735
24735
|
new zi(1, 1, 1),
|
|
24736
|
-
new
|
|
24736
|
+
new wc({ color: 16711680 })
|
|
24737
24737
|
);
|
|
24738
24738
|
e.castShadow = !0, e.receiveShadow = !0, this.addObject(e);
|
|
24739
24739
|
}
|
|
@@ -24759,7 +24759,7 @@ class oP {
|
|
|
24759
24759
|
}
|
|
24760
24760
|
//#endregion
|
|
24761
24761
|
}
|
|
24762
|
-
const
|
|
24762
|
+
const Ql = {
|
|
24763
24763
|
name: "CopyShader",
|
|
24764
24764
|
uniforms: {
|
|
24765
24765
|
tDiffuse: { value: null },
|
|
@@ -24816,7 +24816,7 @@ class cP extends Vt {
|
|
|
24816
24816
|
}
|
|
24817
24817
|
}
|
|
24818
24818
|
const hP = new cP();
|
|
24819
|
-
class
|
|
24819
|
+
class Sc {
|
|
24820
24820
|
constructor(e) {
|
|
24821
24821
|
this._mesh = new de(hP, e);
|
|
24822
24822
|
}
|
|
@@ -24833,7 +24833,7 @@ class Mc {
|
|
|
24833
24833
|
this._mesh.material = e;
|
|
24834
24834
|
}
|
|
24835
24835
|
}
|
|
24836
|
-
class
|
|
24836
|
+
class Fl extends Tr {
|
|
24837
24837
|
constructor(e, t) {
|
|
24838
24838
|
super(), this.textureID = t !== void 0 ? t : "tDiffuse", e instanceof hi ? (this.uniforms = e.uniforms, this.material = e) : e && (this.uniforms = xs.clone(e.uniforms), this.material = new hi({
|
|
24839
24839
|
name: e.name !== void 0 ? e.name : "unspecified",
|
|
@@ -24841,7 +24841,7 @@ class nu extends Tr {
|
|
|
24841
24841
|
uniforms: this.uniforms,
|
|
24842
24842
|
vertexShader: e.vertexShader,
|
|
24843
24843
|
fragmentShader: e.fragmentShader
|
|
24844
|
-
})), this.fsQuad = new
|
|
24844
|
+
})), this.fsQuad = new Sc(this.material);
|
|
24845
24845
|
}
|
|
24846
24846
|
render(e, t, i) {
|
|
24847
24847
|
this.uniforms[this.textureID] && (this.uniforms[this.textureID].value = i.texture), this.fsQuad.material = this.material, this.renderToScreen ? (e.setRenderTarget(null), this.fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this.fsQuad.render(e));
|
|
@@ -24876,7 +24876,7 @@ class dP {
|
|
|
24876
24876
|
this._width = i.width, this._height = i.height, t = new Wi(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: pn }), t.texture.name = "EffectComposer.rt1";
|
|
24877
24877
|
} else
|
|
24878
24878
|
this._width = t.width, this._height = t.height;
|
|
24879
|
-
this.renderTarget1 = t, this.renderTarget2 = t.clone(), this.renderTarget2.texture.name = "EffectComposer.rt2", this.writeBuffer = this.renderTarget1, this.readBuffer = this.renderTarget2, this.renderToScreen = !0, this.passes = [], this.copyPass = new
|
|
24879
|
+
this.renderTarget1 = t, this.renderTarget2 = t.clone(), this.renderTarget2.texture.name = "EffectComposer.rt2", this.writeBuffer = this.renderTarget1, this.readBuffer = this.renderTarget2, this.renderToScreen = !0, this.passes = [], this.copyPass = new Fl(Ql), this.copyPass.material.blending = _n, this.clock = new ev();
|
|
24880
24880
|
}
|
|
24881
24881
|
swapBuffers() {
|
|
24882
24882
|
const e = this.readBuffer;
|
|
@@ -24938,7 +24938,7 @@ class dP {
|
|
|
24938
24938
|
this.renderTarget1.dispose(), this.renderTarget2.dispose(), this.copyPass.dispose();
|
|
24939
24939
|
}
|
|
24940
24940
|
}
|
|
24941
|
-
const
|
|
24941
|
+
const Rh = {
|
|
24942
24942
|
name: "SMAAEdgesShader",
|
|
24943
24943
|
defines: {
|
|
24944
24944
|
SMAA_THRESHOLD: "0.1"
|
|
@@ -25039,7 +25039,7 @@ const Ch = {
|
|
|
25039
25039
|
|
|
25040
25040
|
}`
|
|
25041
25041
|
)
|
|
25042
|
-
},
|
|
25042
|
+
}, Ih = {
|
|
25043
25043
|
name: "SMAAWeightsShader",
|
|
25044
25044
|
defines: {
|
|
25045
25045
|
SMAA_MAX_SEARCH_STEPS: "8",
|
|
@@ -25395,21 +25395,21 @@ class fP extends Tr {
|
|
|
25395
25395
|
const r = new Image();
|
|
25396
25396
|
r.src = this.getSearchTexture(), r.onload = function() {
|
|
25397
25397
|
i.searchTexture.needsUpdate = !0;
|
|
25398
|
-
}, this.searchTexture = new Vi(), this.searchTexture.name = "SMAAPass.search", this.searchTexture.image = r, this.searchTexture.magFilter = pi, this.searchTexture.minFilter = pi, this.searchTexture.generateMipmaps = !1, this.searchTexture.flipY = !1, this.uniformsEdges = xs.clone(
|
|
25399
|
-
defines: Object.assign({}, Ch.defines),
|
|
25400
|
-
uniforms: this.uniformsEdges,
|
|
25401
|
-
vertexShader: Ch.vertexShader,
|
|
25402
|
-
fragmentShader: Ch.fragmentShader
|
|
25403
|
-
}), this.uniformsWeights = xs.clone(Rh.uniforms), this.uniformsWeights.resolution.value.set(1 / e, 1 / t), this.uniformsWeights.tDiffuse.value = this.edgesRT.texture, this.uniformsWeights.tArea.value = this.areaTexture, this.uniformsWeights.tSearch.value = this.searchTexture, this.materialWeights = new hi({
|
|
25398
|
+
}, this.searchTexture = new Vi(), this.searchTexture.name = "SMAAPass.search", this.searchTexture.image = r, this.searchTexture.magFilter = pi, this.searchTexture.minFilter = pi, this.searchTexture.generateMipmaps = !1, this.searchTexture.flipY = !1, this.uniformsEdges = xs.clone(Rh.uniforms), this.uniformsEdges.resolution.value.set(1 / e, 1 / t), this.materialEdges = new hi({
|
|
25404
25399
|
defines: Object.assign({}, Rh.defines),
|
|
25405
|
-
uniforms: this.
|
|
25400
|
+
uniforms: this.uniformsEdges,
|
|
25406
25401
|
vertexShader: Rh.vertexShader,
|
|
25407
25402
|
fragmentShader: Rh.fragmentShader
|
|
25403
|
+
}), this.uniformsWeights = xs.clone(Ih.uniforms), this.uniformsWeights.resolution.value.set(1 / e, 1 / t), this.uniformsWeights.tDiffuse.value = this.edgesRT.texture, this.uniformsWeights.tArea.value = this.areaTexture, this.uniformsWeights.tSearch.value = this.searchTexture, this.materialWeights = new hi({
|
|
25404
|
+
defines: Object.assign({}, Ih.defines),
|
|
25405
|
+
uniforms: this.uniformsWeights,
|
|
25406
|
+
vertexShader: Ih.vertexShader,
|
|
25407
|
+
fragmentShader: Ih.fragmentShader
|
|
25408
25408
|
}), this.uniformsBlend = xs.clone(qd.uniforms), this.uniformsBlend.resolution.value.set(1 / e, 1 / t), this.uniformsBlend.tDiffuse.value = this.weightsRT.texture, this.materialBlend = new hi({
|
|
25409
25409
|
uniforms: this.uniformsBlend,
|
|
25410
25410
|
vertexShader: qd.vertexShader,
|
|
25411
25411
|
fragmentShader: qd.fragmentShader
|
|
25412
|
-
}), this.fsQuad = new
|
|
25412
|
+
}), this.fsQuad = new Sc(null);
|
|
25413
25413
|
}
|
|
25414
25414
|
render(e, t, i) {
|
|
25415
25415
|
this.uniformsEdges.tDiffuse.value = i.texture, this.fsQuad.material = this.materialEdges, e.setRenderTarget(this.edgesRT), this.clear && e.clear(), this.fsQuad.render(e), this.fsQuad.material = this.materialWeights, e.setRenderTarget(this.weightsRT), this.clear && e.clear(), this.fsQuad.render(e), this.uniformsBlend.tColor.value = i.texture, this.fsQuad.material = this.materialBlend, this.renderToScreen ? (e.setRenderTarget(null), this.fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(), this.fsQuad.render(e));
|
|
@@ -25563,7 +25563,7 @@ class yP extends Tr {
|
|
|
25563
25563
|
uniforms: this.uniforms,
|
|
25564
25564
|
vertexShader: e.vertexShader,
|
|
25565
25565
|
fragmentShader: e.fragmentShader
|
|
25566
|
-
}), this.fsQuad = new
|
|
25566
|
+
}), this.fsQuad = new Sc(this.material), this._outputColorSpace = null, this._toneMapping = null;
|
|
25567
25567
|
}
|
|
25568
25568
|
render(e, t, i) {
|
|
25569
25569
|
this.uniforms.tDiffuse.value = i.texture, this.uniforms.toneMappingExposure.value = e.toneMappingExposure, (this._outputColorSpace !== e.outputColorSpace || this._toneMapping !== e.toneMapping) && (this._outputColorSpace = e.outputColorSpace, this._toneMapping = e.toneMapping, this.material.defines = {}, ii.getTransfer(this._outputColorSpace) === wi && (this.material.defines.SRGB_TRANSFER = ""), this._toneMapping === cx ? this.material.defines.LINEAR_TONE_MAPPING = "" : this._toneMapping === hx ? this.material.defines.REINHARD_TONE_MAPPING = "" : this._toneMapping === ux ? this.material.defines.CINEON_TONE_MAPPING = "" : this._toneMapping === dx ? this.material.defines.ACES_FILMIC_TONE_MAPPING = "" : this._toneMapping === fx ? this.material.defines.AGX_TONE_MAPPING = "" : this._toneMapping === px && (this.material.defines.NEUTRAL_TONE_MAPPING = ""), this.material.needsUpdate = !0), this.renderToScreen === !0 ? (e.setRenderTarget(null), this.fsQuad.render(e)) : (e.setRenderTarget(t), this.clear && e.clear(e.autoClearColor, e.autoClearDepth, e.autoClearStencil), this.fsQuad.render(e));
|
|
@@ -26250,7 +26250,7 @@ class VP {
|
|
|
26250
26250
|
this.name = ei.KHR_MESH_QUANTIZATION;
|
|
26251
26251
|
}
|
|
26252
26252
|
}
|
|
26253
|
-
class cv extends
|
|
26253
|
+
class cv extends _c {
|
|
26254
26254
|
constructor(e, t, i, n) {
|
|
26255
26255
|
super(e, t, i, n);
|
|
26256
26256
|
}
|
|
@@ -26307,12 +26307,12 @@ const is = {
|
|
|
26307
26307
|
9728: pi,
|
|
26308
26308
|
9729: Pi,
|
|
26309
26309
|
9984: Dp,
|
|
26310
|
-
9985:
|
|
26310
|
+
9985: Hl,
|
|
26311
26311
|
9986: xo,
|
|
26312
26312
|
9987: Ns
|
|
26313
26313
|
}, $0 = {
|
|
26314
26314
|
33071: mr,
|
|
26315
|
-
33648:
|
|
26315
|
+
33648: nc,
|
|
26316
26316
|
10497: Ms
|
|
26317
26317
|
}, Zd = {
|
|
26318
26318
|
SCALAR: 1,
|
|
@@ -26342,15 +26342,15 @@ const is = {
|
|
|
26342
26342
|
CUBICSPLINE: void 0,
|
|
26343
26343
|
// We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
|
|
26344
26344
|
// keyframe track will be initialized with a default interpolation type, then modified.
|
|
26345
|
-
LINEAR:
|
|
26346
|
-
STEP:
|
|
26345
|
+
LINEAR: ac,
|
|
26346
|
+
STEP: rc
|
|
26347
26347
|
}, jd = {
|
|
26348
26348
|
OPAQUE: "OPAQUE",
|
|
26349
26349
|
MASK: "MASK",
|
|
26350
26350
|
BLEND: "BLEND"
|
|
26351
26351
|
};
|
|
26352
26352
|
function GP(s) {
|
|
26353
|
-
return s.DefaultMaterial === void 0 && (s.DefaultMaterial = new
|
|
26353
|
+
return s.DefaultMaterial === void 0 && (s.DefaultMaterial = new wc({
|
|
26354
26354
|
color: 16777215,
|
|
26355
26355
|
emissive: 0,
|
|
26356
26356
|
metalness: 1,
|
|
@@ -26810,7 +26810,7 @@ class KP {
|
|
|
26810
26810
|
e.material = i;
|
|
26811
26811
|
}
|
|
26812
26812
|
getMaterialType() {
|
|
26813
|
-
return
|
|
26813
|
+
return wc;
|
|
26814
26814
|
}
|
|
26815
26815
|
/**
|
|
26816
26816
|
* Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
|
|
@@ -27116,7 +27116,7 @@ class KP {
|
|
|
27116
27116
|
}
|
|
27117
27117
|
break;
|
|
27118
27118
|
}
|
|
27119
|
-
const f = n.interpolation !== void 0 ? YP[n.interpolation] :
|
|
27119
|
+
const f = n.interpolation !== void 0 ? YP[n.interpolation] : ac, p = this._getArrayFromAccessor(i);
|
|
27120
27120
|
for (let m = 0, x = h.length; m < x; m++) {
|
|
27121
27121
|
const w = new u(
|
|
27122
27122
|
h[m] + "." + Nr[r.path],
|
|
@@ -27386,7 +27386,7 @@ class JP {
|
|
|
27386
27386
|
class eC extends Tr {
|
|
27387
27387
|
constructor(e, t, i, n) {
|
|
27388
27388
|
super(), this.scene = e, this.camera = t, this.sampleLevel = 4, this.unbiased = !0, this.stencilBuffer = !1, this.clearColor = i !== void 0 ? i : 0, this.clearAlpha = n !== void 0 ? n : 0, this._oldClearColor = new ut();
|
|
27389
|
-
const r =
|
|
27389
|
+
const r = Ql;
|
|
27390
27390
|
this.copyUniforms = xs.clone(r.uniforms), this.copyMaterial = new hi({
|
|
27391
27391
|
uniforms: this.copyUniforms,
|
|
27392
27392
|
vertexShader: r.vertexShader,
|
|
@@ -27396,7 +27396,7 @@ class eC extends Tr {
|
|
|
27396
27396
|
depthWrite: !1,
|
|
27397
27397
|
premultipliedAlpha: !0,
|
|
27398
27398
|
blending: lu
|
|
27399
|
-
}), this.fsQuad = new
|
|
27399
|
+
}), this.fsQuad = new Sc(this.copyMaterial);
|
|
27400
27400
|
}
|
|
27401
27401
|
dispose() {
|
|
27402
27402
|
this.sampleRenderTarget && (this.sampleRenderTarget.dispose(), this.sampleRenderTarget = null), this.copyMaterial.dispose(), this.fsQuad.dispose();
|
|
@@ -27523,7 +27523,7 @@ const tC = [
|
|
|
27523
27523
|
[5, 6],
|
|
27524
27524
|
[3, 7]
|
|
27525
27525
|
]
|
|
27526
|
-
],
|
|
27526
|
+
], Dh = {
|
|
27527
27527
|
name: "SSAOShader",
|
|
27528
27528
|
defines: {
|
|
27529
27529
|
PERSPECTIVE_CAMERA: 1,
|
|
@@ -27691,7 +27691,7 @@ const tC = [
|
|
|
27691
27691
|
|
|
27692
27692
|
}`
|
|
27693
27693
|
)
|
|
27694
|
-
},
|
|
27694
|
+
}, Lh = {
|
|
27695
27695
|
name: "SSAODepthShader",
|
|
27696
27696
|
defines: {
|
|
27697
27697
|
PERSPECTIVE_CAMERA: 1
|
|
@@ -27740,7 +27740,7 @@ const tC = [
|
|
|
27740
27740
|
gl_FragColor = vec4( vec3( 1.0 - depth ), 1.0 );
|
|
27741
27741
|
|
|
27742
27742
|
}`
|
|
27743
|
-
},
|
|
27743
|
+
}, Oh = {
|
|
27744
27744
|
name: "SSAOBlurShader",
|
|
27745
27745
|
uniforms: {
|
|
27746
27746
|
tDiffuse: { value: null },
|
|
@@ -27790,26 +27790,26 @@ class gs extends Tr {
|
|
|
27790
27790
|
type: pn,
|
|
27791
27791
|
depthTexture: a
|
|
27792
27792
|
}), this.ssaoRenderTarget = new Wi(this.width, this.height, { type: pn }), this.blurRenderTarget = this.ssaoRenderTarget.clone(), this.ssaoMaterial = new hi({
|
|
27793
|
-
defines: Object.assign({},
|
|
27794
|
-
uniforms: xs.clone(
|
|
27795
|
-
vertexShader:
|
|
27796
|
-
fragmentShader:
|
|
27793
|
+
defines: Object.assign({}, Dh.defines),
|
|
27794
|
+
uniforms: xs.clone(Dh.uniforms),
|
|
27795
|
+
vertexShader: Dh.vertexShader,
|
|
27796
|
+
fragmentShader: Dh.fragmentShader,
|
|
27797
27797
|
blending: _n
|
|
27798
27798
|
}), this.ssaoMaterial.defines.KERNEL_SIZE = r, this.ssaoMaterial.uniforms.tNormal.value = this.normalRenderTarget.texture, this.ssaoMaterial.uniforms.tDepth.value = this.normalRenderTarget.depthTexture, this.ssaoMaterial.uniforms.tNoise.value = this.noiseTexture, this.ssaoMaterial.uniforms.kernel.value = this.kernel, this.ssaoMaterial.uniforms.cameraNear.value = this.camera.near, this.ssaoMaterial.uniforms.cameraFar.value = this.camera.far, this.ssaoMaterial.uniforms.resolution.value.set(this.width, this.height), this.ssaoMaterial.uniforms.cameraProjectionMatrix.value.copy(this.camera.projectionMatrix), this.ssaoMaterial.uniforms.cameraInverseProjectionMatrix.value.copy(this.camera.projectionMatrixInverse), this.normalMaterial = new Hx(), this.normalMaterial.blending = _n, this.blurMaterial = new hi({
|
|
27799
|
+
defines: Object.assign({}, Oh.defines),
|
|
27800
|
+
uniforms: xs.clone(Oh.uniforms),
|
|
27801
|
+
vertexShader: Oh.vertexShader,
|
|
27802
|
+
fragmentShader: Oh.fragmentShader
|
|
27803
|
+
}), this.blurMaterial.uniforms.tDiffuse.value = this.ssaoRenderTarget.texture, this.blurMaterial.uniforms.resolution.value.set(this.width, this.height), this.depthRenderMaterial = new hi({
|
|
27799
27804
|
defines: Object.assign({}, Lh.defines),
|
|
27800
27805
|
uniforms: xs.clone(Lh.uniforms),
|
|
27801
27806
|
vertexShader: Lh.vertexShader,
|
|
27802
|
-
fragmentShader: Lh.fragmentShader
|
|
27803
|
-
}), this.blurMaterial.uniforms.tDiffuse.value = this.ssaoRenderTarget.texture, this.blurMaterial.uniforms.resolution.value.set(this.width, this.height), this.depthRenderMaterial = new hi({
|
|
27804
|
-
defines: Object.assign({}, Dh.defines),
|
|
27805
|
-
uniforms: xs.clone(Dh.uniforms),
|
|
27806
|
-
vertexShader: Dh.vertexShader,
|
|
27807
|
-
fragmentShader: Dh.fragmentShader,
|
|
27807
|
+
fragmentShader: Lh.fragmentShader,
|
|
27808
27808
|
blending: _n
|
|
27809
27809
|
}), this.depthRenderMaterial.uniforms.tDepth.value = this.normalRenderTarget.depthTexture, this.depthRenderMaterial.uniforms.cameraNear.value = this.camera.near, this.depthRenderMaterial.uniforms.cameraFar.value = this.camera.far, this.copyMaterial = new hi({
|
|
27810
|
-
uniforms: xs.clone(
|
|
27811
|
-
vertexShader:
|
|
27812
|
-
fragmentShader:
|
|
27810
|
+
uniforms: xs.clone(Ql.uniforms),
|
|
27811
|
+
vertexShader: Ql.vertexShader,
|
|
27812
|
+
fragmentShader: Ql.fragmentShader,
|
|
27813
27813
|
transparent: !0,
|
|
27814
27814
|
depthTest: !1,
|
|
27815
27815
|
depthWrite: !1,
|
|
@@ -27819,7 +27819,7 @@ class gs extends Tr {
|
|
|
27819
27819
|
blendSrcAlpha: ox,
|
|
27820
27820
|
blendDstAlpha: bf,
|
|
27821
27821
|
blendEquationAlpha: fr
|
|
27822
|
-
}), this.fsQuad = new
|
|
27822
|
+
}), this.fsQuad = new Sc(null), this.originalClearColor = new ut();
|
|
27823
27823
|
}
|
|
27824
27824
|
dispose() {
|
|
27825
27825
|
this.normalRenderTarget.dispose(), this.ssaoRenderTarget.dispose(), this.blurRenderTarget.dispose(), this.normalMaterial.dispose(), this.blurMaterial.dispose(), this.copyMaterial.dispose(), this.depthRenderMaterial.dispose(), this.fsQuad.dispose();
|
|
@@ -27873,7 +27873,7 @@ class gs extends Tr {
|
|
|
27873
27873
|
const l = Math.random() * 2 - 1, h = Math.random() * 2 - 1, u = 0;
|
|
27874
27874
|
r[a] = i.noise3d(l, h, u);
|
|
27875
27875
|
}
|
|
27876
|
-
this.noiseTexture = new ws(r, 4, 4,
|
|
27876
|
+
this.noiseTexture = new ws(r, 4, 4, yc, Cn), this.noiseTexture.wrapS = Ms, this.noiseTexture.wrapT = Ms, this.noiseTexture.needsUpdate = !0;
|
|
27877
27877
|
}
|
|
27878
27878
|
overrideVisibility() {
|
|
27879
27879
|
const e = this.scene, t = this._visibilityCache;
|
|
@@ -28175,8 +28175,8 @@ const iC = {
|
|
|
28175
28175
|
|
|
28176
28176
|
}`
|
|
28177
28177
|
)
|
|
28178
|
-
},
|
|
28179
|
-
|
|
28178
|
+
}, Ac = new Vt();
|
|
28179
|
+
Ac.setAttribute("position", new jt(new Float32Array([
|
|
28180
28180
|
-1,
|
|
28181
28181
|
-1,
|
|
28182
28182
|
3,
|
|
@@ -28184,7 +28184,7 @@ Sc.setAttribute("position", new jt(new Float32Array([
|
|
|
28184
28184
|
-1,
|
|
28185
28185
|
3
|
|
28186
28186
|
]), 2));
|
|
28187
|
-
|
|
28187
|
+
Ac.setAttribute("uv", new jt(new Float32Array([
|
|
28188
28188
|
0,
|
|
28189
28189
|
0,
|
|
28190
28190
|
2,
|
|
@@ -28192,13 +28192,13 @@ Sc.setAttribute("uv", new jt(new Float32Array([
|
|
|
28192
28192
|
0,
|
|
28193
28193
|
2
|
|
28194
28194
|
]), 2));
|
|
28195
|
-
|
|
28196
|
-
|
|
28195
|
+
Ac.boundingSphere = new Ki();
|
|
28196
|
+
Ac.computeBoundingSphere = function() {
|
|
28197
28197
|
};
|
|
28198
28198
|
const nC = new jo();
|
|
28199
28199
|
class ro {
|
|
28200
28200
|
constructor(e) {
|
|
28201
|
-
this._mesh = new de(
|
|
28201
|
+
this._mesh = new de(Ac, e), this._mesh.frustumCulled = !1;
|
|
28202
28202
|
}
|
|
28203
28203
|
render(e) {
|
|
28204
28204
|
e.render(this._mesh, nC);
|
|
@@ -29320,7 +29320,7 @@ class cC extends Tr {
|
|
|
29320
29320
|
configureHalfResTargets() {
|
|
29321
29321
|
this.firstFrame(), this.configuration.halfRes ? (this.depthDownsampleTarget = new Wi(this.width / 2, this.height / 2, {
|
|
29322
29322
|
count: 2
|
|
29323
|
-
}), this.depthDownsampleTarget.textures[0].format =
|
|
29323
|
+
}), this.depthDownsampleTarget.textures[0].format = yc, this.depthDownsampleTarget.textures[0].type = Cn, this.depthDownsampleTarget.textures[0].minFilter = pi, this.depthDownsampleTarget.textures[0].magFilter = pi, this.depthDownsampleTarget.textures[0].depthBuffer = !1, this.depthDownsampleTarget.textures[1].format = Ui, this.depthDownsampleTarget.textures[1].type = pn, this.depthDownsampleTarget.textures[1].minFilter = pi, this.depthDownsampleTarget.textures[1].magFilter = pi, this.depthDownsampleTarget.textures[1].depthBuffer = !1, this.depthDownsampleQuad = new ro(new hi(oC))) : (this.depthDownsampleTarget && (this.depthDownsampleTarget.dispose(), this.depthDownsampleTarget = null), this.depthDownsampleQuad && (this.depthDownsampleQuad.dispose(), this.depthDownsampleQuad = null));
|
|
29324
29324
|
}
|
|
29325
29325
|
detectTransparency() {
|
|
29326
29326
|
if (this.autoDetectTransparency) {
|
|
@@ -29554,7 +29554,8 @@ const hC = {
|
|
|
29554
29554
|
Gy[1][0] * tx0y1 + Gy[1][1] * tx1y1 + Gy[1][2] * tx2y1 +
|
|
29555
29555
|
Gy[2][0] * tx0y2 + Gy[2][1] * tx1y2 + Gy[2][2] * tx2y2;
|
|
29556
29556
|
|
|
29557
|
-
float G = length(vec2(GxVal, GyVal));
|
|
29557
|
+
float G = length(vec2(GxVal, GyVal)) * 1.5;
|
|
29558
|
+
//float G = pow(length(vec2(GxVal, GyVal)), 2.0); // Exponential scaling for softer edges
|
|
29558
29559
|
|
|
29559
29560
|
// Fetch original color
|
|
29560
29561
|
vec4 originalColor = texture2D(tDiffuse, vUv);
|
|
@@ -29565,7 +29566,7 @@ const hC = {
|
|
|
29565
29566
|
|
|
29566
29567
|
// Set alpha for background transparency
|
|
29567
29568
|
float alpha = originalColor.a; // Preserve original alpha
|
|
29568
|
-
if (G > 0.
|
|
29569
|
+
if (G > 0.3) alpha = 1.0; // Ensure edges are opaque
|
|
29569
29570
|
|
|
29570
29571
|
gl_FragColor = vec4(finalColor, alpha);
|
|
29571
29572
|
}
|
|
@@ -29573,22 +29574,52 @@ const hC = {
|
|
|
29573
29574
|
};
|
|
29574
29575
|
class uC {
|
|
29575
29576
|
constructor(e, t) {
|
|
29576
|
-
this.renderer = e, this.viralViewerApi = t, this.gammaPass = null, this.ssaoPass = null, this.smaaPass = null, this.ssaaPass = null, this.fxaaPass = null, this.sobelPass = null, this.
|
|
29577
|
+
this.renderer = e, this.viralViewerApi = t, this.gammaPass = null, this.ssaoPass = null, this.smaaPass = null, this.ssaaPass = null, this.fxaaPass = null, this.sobelPass = null, this.whitePass = null, this._whiteShader = {
|
|
29578
|
+
uniforms: {
|
|
29579
|
+
tDiffuse: { value: null },
|
|
29580
|
+
shadowTexture: { value: null },
|
|
29581
|
+
// Stores shadow map
|
|
29582
|
+
aoTexture: { value: null }
|
|
29583
|
+
// Stores AO map
|
|
29584
|
+
},
|
|
29585
|
+
vertexShader: `
|
|
29586
|
+
varying vec2 vUv;
|
|
29587
|
+
void main() {
|
|
29588
|
+
vUv = uv;
|
|
29589
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
29590
|
+
}
|
|
29591
|
+
`,
|
|
29592
|
+
fragmentShader: `
|
|
29593
|
+
uniform sampler2D tDiffuse;
|
|
29594
|
+
uniform sampler2D shadowTexture;
|
|
29595
|
+
uniform sampler2D aoTexture;
|
|
29596
|
+
varying vec2 vUv;
|
|
29597
|
+
|
|
29598
|
+
void main() {
|
|
29599
|
+
vec4 whiteColor = vec4(1.0, 1.0, 1.0, 1.0);
|
|
29600
|
+
vec4 shadowColor = texture2D(shadowTexture, vUv);
|
|
29601
|
+
vec4 aoColor = texture2D(aoTexture, vUv);
|
|
29602
|
+
|
|
29603
|
+
// Multiply white color with shadow and AO to preserve them
|
|
29604
|
+
gl_FragColor = whiteColor * shadowColor * aoColor;
|
|
29605
|
+
}
|
|
29606
|
+
`
|
|
29607
|
+
}, this.composer = new dP(this.renderer), this.composer.setSize(window.innerWidth, window.innerHeight);
|
|
29577
29608
|
}
|
|
29578
29609
|
render() {
|
|
29579
29610
|
this.composer.render();
|
|
29580
29611
|
}
|
|
29581
29612
|
initRenderPass(e, t) {
|
|
29582
|
-
this.renderPass = new pP(e, t), this.composer.addPass(this.renderPass), this.
|
|
29613
|
+
this.renderPass = new pP(e, t), this.composer.addPass(this.renderPass), this.initn8aoPass(e, t), this.sobelPass = new Fl(hC), this.sobelPass.uniforms.resolution.value.x = window.innerWidth * 2, this.sobelPass.uniforms.resolution.value.y = window.innerHeight * 2, this.sobelPass.enabled = !1, this.composer.addPass(this.sobelPass), this.initSMAAPass();
|
|
29583
29614
|
const i = new yP();
|
|
29584
29615
|
this.composer.addPass(i);
|
|
29585
29616
|
}
|
|
29586
29617
|
initGammaPass() {
|
|
29587
|
-
this.gammaPass = new
|
|
29618
|
+
this.gammaPass = new Fl(mP), this.composer.addPass(this.gammaPass);
|
|
29588
29619
|
}
|
|
29589
29620
|
//#region N8AOPass
|
|
29590
|
-
|
|
29591
|
-
this.n8aoPass = new cC(e, t), this.n8aoPass.configuration.aoSamples = 16, this.n8aoPass.configuration.denoiseRadius = 6, this.n8aoPass.configuration.intensity =
|
|
29621
|
+
initn8aoPass(e, t) {
|
|
29622
|
+
this.n8aoPass = new cC(e, t), this.n8aoPass.configuration.aoSamples = 16, this.n8aoPass.configuration.denoiseRadius = 6, this.n8aoPass.configuration.intensity = 5, this.n8aoPass.configuration.aoRadius = 12, this.n8aoPass.configuration.quality = "Low", this.n8aoPass.configuration.gammaCorrection = !1, this.n8aoPass.configuration.distanceFalloff = 0.2, this.composer.addPass(this.n8aoPass);
|
|
29592
29623
|
}
|
|
29593
29624
|
enableN8AOPass() {
|
|
29594
29625
|
this.n8aoPass && this.n8aoPass.setDisplayMode("Combined");
|
|
@@ -29611,7 +29642,7 @@ class uC {
|
|
|
29611
29642
|
this.ssaaPass = new eC(e, t), this.ssaaPass.unbiased = !0, this.ssaaPass.sampleLevel = 2, this.composer.addPass(this.ssaaPass);
|
|
29612
29643
|
}
|
|
29613
29644
|
initFXAAPass() {
|
|
29614
|
-
this.fxaaPass = new
|
|
29645
|
+
this.fxaaPass = new Fl(iC), this.fxaaPass.uniforms.resolution.value.set(
|
|
29615
29646
|
1 / window.innerWidth,
|
|
29616
29647
|
1 / window.innerHeight
|
|
29617
29648
|
), this.composer.addPass(this.fxaaPass);
|
|
@@ -29640,6 +29671,9 @@ class uC {
|
|
|
29640
29671
|
disableSobel() {
|
|
29641
29672
|
this.sobelPass && (this.sobelPass.enabled = !1);
|
|
29642
29673
|
}
|
|
29674
|
+
initWhitePass() {
|
|
29675
|
+
this.whitePass = new Fl(this._whiteShader), this.composer.addPass(this.whitePass);
|
|
29676
|
+
}
|
|
29643
29677
|
//#endregion
|
|
29644
29678
|
}
|
|
29645
29679
|
class Cu {
|
|
@@ -31088,7 +31122,7 @@ ns.d = (s, e) => {
|
|
|
31088
31122
|
var di = {};
|
|
31089
31123
|
(() => {
|
|
31090
31124
|
ns.d(di, { HY: () => u, K8: () => i, vF: () => _, jM: () => b, st: () => P, J7: () => Dt, KV: () => lt, Tl: () => Pe, gv: () => Ie, LR: () => Re, C9: () => we, zF: () => We, XL: () => it, uv: () => dt, vs: () => N, YJ: () => fe, i9: () => h, uD: () => l, lV: () => r, Sp: () => n, RJ: () => $n, SB: () => os, TL: () => E, oe: () => S, AB: () => a, dZ: () => z, Gf: () => nt, gK: () => F, BT: () => U, bt: () => k, sX: () => H });
|
|
31091
|
-
const s = (e = { AdditiveBlending: () => lu, Box3: () => li, BufferAttribute: () => jt, BufferGeometry: () => Vt, CanvasTexture: () => op, Color: () => ut, DataTexture: () => ws, EventDispatcher: () => Sr, Frustum: () =>
|
|
31125
|
+
const s = (e = { AdditiveBlending: () => lu, Box3: () => li, BufferAttribute: () => jt, BufferGeometry: () => Vt, CanvasTexture: () => op, Color: () => ut, DataTexture: () => ws, EventDispatcher: () => Sr, Frustum: () => vc, GLSL3: () => sp, LessEqualDepth: () => Ta, LineBasicMaterial: () => Kn, LineSegments: () => Ss, LinearFilter: () => Pi, Matrix4: () => ot, NearestFilter: () => pi, NoBlending: () => _n, Object3D: () => ui, Points: () => Zp, RGBAFormat: () => Ui, RawShaderMaterial: () => hm, Scene: () => xc, ShaderMaterial: () => hi, Sphere: () => Ki, Texture: () => Vi, Uint8BufferAttribute: () => b_, Vector2: () => Te, Vector3: () => W, Vector4: () => si, WebGLRenderTarget: () => Wi }, t = {}, ns.d(t, e), t);
|
|
31092
31126
|
var e, t, i, n, r, a, l, h;
|
|
31093
31127
|
class u extends s.ShaderMaterial {
|
|
31094
31128
|
constructor() {
|
|
@@ -34295,8 +34329,8 @@ function AC() {
|
|
|
34295
34329
|
return this.multiplyMatrices(o, this);
|
|
34296
34330
|
}
|
|
34297
34331
|
multiplyMatrices(o, d) {
|
|
34298
|
-
const g = o.elements, M = d.elements, A = this.elements, R = g[0], C = g[4], L = g[8], D = g[12], B = g[1], Y = g[5], q = g[9], K = g[13], se = g[2], xe = g[6], Ve = g[10], Xe = g[14], At = g[3], Et = g[7], wt = g[11], Wt = g[15], ri = M[0], _t = M[4], Ri = M[8], Ii = M[12], Ft = M[1], Ti = M[5], oi = M[9], Di = M[13], Hn = M[2], Zi = M[6], Yn = M[10], $s = M[14], Js = M[3],
|
|
34299
|
-
return A[0] = R * ri + C * Ft + L * Hn + D * Js, A[4] = R * _t + C * Ti + L * Zi + D *
|
|
34332
|
+
const g = o.elements, M = d.elements, A = this.elements, R = g[0], C = g[4], L = g[8], D = g[12], B = g[1], Y = g[5], q = g[9], K = g[13], se = g[2], xe = g[6], Ve = g[10], Xe = g[14], At = g[3], Et = g[7], wt = g[11], Wt = g[15], ri = M[0], _t = M[4], Ri = M[8], Ii = M[12], Ft = M[1], Ti = M[5], oi = M[9], Di = M[13], Hn = M[2], Zi = M[6], Yn = M[10], $s = M[14], Js = M[3], Ec = M[7], Pc = M[11], Cc = M[15];
|
|
34333
|
+
return A[0] = R * ri + C * Ft + L * Hn + D * Js, A[4] = R * _t + C * Ti + L * Zi + D * Ec, A[8] = R * Ri + C * oi + L * Yn + D * Pc, A[12] = R * Ii + C * Di + L * $s + D * Cc, A[1] = B * ri + Y * Ft + q * Hn + K * Js, A[5] = B * _t + Y * Ti + q * Zi + K * Ec, A[9] = B * Ri + Y * oi + q * Yn + K * Pc, A[13] = B * Ii + Y * Di + q * $s + K * Cc, A[2] = se * ri + xe * Ft + Ve * Hn + Xe * Js, A[6] = se * _t + xe * Ti + Ve * Zi + Xe * Ec, A[10] = se * Ri + xe * oi + Ve * Yn + Xe * Pc, A[14] = se * Ii + xe * Di + Ve * $s + Xe * Cc, A[3] = At * ri + Et * Ft + wt * Hn + Wt * Js, A[7] = At * _t + Et * Ti + wt * Zi + Wt * Ec, A[11] = At * Ri + Et * oi + wt * Yn + Wt * Pc, A[15] = At * Ii + Et * Di + wt * $s + Wt * Cc, this;
|
|
34300
34334
|
}
|
|
34301
34335
|
multiplyScalar(o) {
|
|
34302
34336
|
const d = this.elements;
|
|
@@ -36204,7 +36238,7 @@ function AC() {
|
|
|
36204
36238
|
}
|
|
36205
36239
|
})
|
|
36206
36240
|
), typeof window < "u" && (window.__THREE__ ? console.warn("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = s);
|
|
36207
|
-
function
|
|
36241
|
+
function Tc(v, o = !1) {
|
|
36208
36242
|
const d = v[0].index !== null, g = new Set(Object.keys(v[0].attributes)), M = new Set(
|
|
36209
36243
|
Object.keys(v[0].morphAttributes)
|
|
36210
36244
|
), A = {}, R = {}, C = v[0].morphTargetsRelative, L = new Jn();
|
|
@@ -36382,7 +36416,7 @@ function AC() {
|
|
|
36382
36416
|
if (!(R.length <= 0))
|
|
36383
36417
|
if (A.Instances && A.Instances.length > 0) {
|
|
36384
36418
|
let C = new Jn(), L = R.map((B) => B.geometry);
|
|
36385
|
-
C =
|
|
36419
|
+
C = Tc(L, !0), C.computeVertexNormals();
|
|
36386
36420
|
const D = new Uu(
|
|
36387
36421
|
C,
|
|
36388
36422
|
[],
|
|
@@ -36418,7 +36452,7 @@ function AC() {
|
|
|
36418
36452
|
D.userData.IsInstancedMesh = !0, D.userData.Type = 1, d.add(D);
|
|
36419
36453
|
} else {
|
|
36420
36454
|
let C = new Jn(), L = R.map((B) => B.geometry);
|
|
36421
|
-
C =
|
|
36455
|
+
C = Tc(L, !0), C.computeVertexNormals();
|
|
36422
36456
|
const D = new Er(C);
|
|
36423
36457
|
D.receiveShadow = !0, D.castShadow = !0, D.userData.MaterialIds = [];
|
|
36424
36458
|
for (let B = 0; B < R.length; B++) {
|
|
@@ -36456,7 +36490,7 @@ class ty {
|
|
|
36456
36490
|
this._worker.terminate();
|
|
36457
36491
|
}
|
|
36458
36492
|
}
|
|
36459
|
-
class
|
|
36493
|
+
class uc {
|
|
36460
36494
|
/**
|
|
36461
36495
|
*
|
|
36462
36496
|
* @param maxSize maximum number of worker
|
|
@@ -36689,7 +36723,7 @@ class PC {
|
|
|
36689
36723
|
constructor(e) {
|
|
36690
36724
|
this.viralViewerApi = e;
|
|
36691
36725
|
const t = new Blob([`(${TC})()`]), i = URL.createObjectURL(t);
|
|
36692
|
-
this.workerPool = new
|
|
36726
|
+
this.workerPool = new uc(
|
|
36693
36727
|
this.viralViewerApi.options.numberOfWorker,
|
|
36694
36728
|
i
|
|
36695
36729
|
);
|
|
@@ -36880,7 +36914,7 @@ class IC {
|
|
|
36880
36914
|
constructor(e) {
|
|
36881
36915
|
this.viralViewerApi = e, this._meshesByMaterial = [];
|
|
36882
36916
|
const t = new Blob([`(${RC})()`]), i = URL.createObjectURL(t);
|
|
36883
|
-
this.workerPool = new
|
|
36917
|
+
this.workerPool = new uc(
|
|
36884
36918
|
this.viralViewerApi.options.numberOfWorker,
|
|
36885
36919
|
i
|
|
36886
36920
|
);
|
|
@@ -40769,7 +40803,7 @@ function OC() {
|
|
|
40769
40803
|
}
|
|
40770
40804
|
})
|
|
40771
40805
|
), typeof window < "u" && (window.__THREE__ ? console.warn("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = s), new N(), new N();
|
|
40772
|
-
function
|
|
40806
|
+
function Tc(ze, c, y) {
|
|
40773
40807
|
let v = [];
|
|
40774
40808
|
for (let o = 0; o < ze.length; o++) {
|
|
40775
40809
|
const d = ze[o], g = c[d];
|
|
@@ -40784,7 +40818,7 @@ function OC() {
|
|
|
40784
40818
|
for (let v = 0; v < c.length; v++) {
|
|
40785
40819
|
let o = [];
|
|
40786
40820
|
const d = c[v];
|
|
40787
|
-
o = o.concat(
|
|
40821
|
+
o = o.concat(Tc(d.Indices, d.Vertices, d.Instances));
|
|
40788
40822
|
const g = new Float32Array(o), M = new Jn();
|
|
40789
40823
|
M.setAttribute("position", new sn(g, 3));
|
|
40790
40824
|
const A = new Uu(M, [], d.Instances.length);
|
|
@@ -40823,14 +40857,14 @@ class BC {
|
|
|
40823
40857
|
this.viralViewerApi = e;
|
|
40824
40858
|
{
|
|
40825
40859
|
const t = new Blob([`(${LC})()`]), i = URL.createObjectURL(t);
|
|
40826
|
-
this.meshWorkerPool = new
|
|
40860
|
+
this.meshWorkerPool = new uc(
|
|
40827
40861
|
this.viralViewerApi.options.numberOfWorker,
|
|
40828
40862
|
i
|
|
40829
40863
|
);
|
|
40830
40864
|
}
|
|
40831
40865
|
{
|
|
40832
40866
|
const t = new Blob([`(${NC})()`]), i = URL.createObjectURL(t);
|
|
40833
|
-
this.instancedMeshWorkerPool = new
|
|
40867
|
+
this.instancedMeshWorkerPool = new uc(
|
|
40834
40868
|
this.viralViewerApi.options.numberOfWorker,
|
|
40835
40869
|
i
|
|
40836
40870
|
);
|
|
@@ -41155,8 +41189,8 @@ class zC {
|
|
|
41155
41189
|
var V;
|
|
41156
41190
|
U.length > 0 ? this._loadElementStandaloneWorker.loadElement(U, () => {
|
|
41157
41191
|
var $;
|
|
41158
|
-
H += 1, H == k && (($ = this.viralViewerApi.viralGeometryHandler) == null || $.generateMergeModel(), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), n());
|
|
41159
|
-
}) : (H += 1, H == k && ((V = this.viralViewerApi.viralGeometryHandler) == null || V.generateMergeModel(), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), n()));
|
|
41192
|
+
H += 1, H == k && (($ = this.viralViewerApi.viralGeometryHandler) == null || $.generateMergeModel(), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), n());
|
|
41193
|
+
}) : (H += 1, H == k && ((V = this.viralViewerApi.viralGeometryHandler) == null || V.generateMergeModel(), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), n()));
|
|
41160
41194
|
}
|
|
41161
41195
|
);
|
|
41162
41196
|
}
|
|
@@ -41261,7 +41295,7 @@ class FC {
|
|
|
41261
41295
|
this.viralViewerApi = e, this.revitLoader = new zC(this.viralViewerApi), this.pointCloudLoader = new SC(this.viralViewerApi), this.threeLoader = new UC(this.viralViewerApi), this.ifcLoader = new xC(this.viralViewerApi);
|
|
41262
41296
|
}
|
|
41263
41297
|
}
|
|
41264
|
-
var
|
|
41298
|
+
var ql = function() {
|
|
41265
41299
|
var s = 0, e = document.createElement("div");
|
|
41266
41300
|
e.style.cssText = "position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000", e.addEventListener("click", function(f) {
|
|
41267
41301
|
f.preventDefault(), i(++s % e.children.length);
|
|
@@ -41274,9 +41308,9 @@ var Ql = function() {
|
|
|
41274
41308
|
e.children[p].style.display = p === f ? "block" : "none";
|
|
41275
41309
|
s = f;
|
|
41276
41310
|
}
|
|
41277
|
-
var n = (performance || Date).now(), r = n, a = 0, l = t(new
|
|
41311
|
+
var n = (performance || Date).now(), r = n, a = 0, l = t(new ql.Panel("FPS", "#0ff", "#002")), h = t(new ql.Panel("MS", "#0f0", "#020"));
|
|
41278
41312
|
if (self.performance && self.performance.memory)
|
|
41279
|
-
var u = t(new
|
|
41313
|
+
var u = t(new ql.Panel("MB", "#f08", "#201"));
|
|
41280
41314
|
return i(0), {
|
|
41281
41315
|
REVISION: 16,
|
|
41282
41316
|
dom: e,
|
|
@@ -41302,7 +41336,7 @@ var Ql = function() {
|
|
|
41302
41336
|
setMode: i
|
|
41303
41337
|
};
|
|
41304
41338
|
};
|
|
41305
|
-
|
|
41339
|
+
ql.Panel = function(s, e, t) {
|
|
41306
41340
|
var i = 1 / 0, n = 0, r = Math.round, a = r(window.devicePixelRatio || 1), l = 80 * a, h = 48 * a, u = 3 * a, f = 2 * a, p = 3 * a, m = 15 * a, x = 74 * a, w = 30 * a, T = document.createElement("canvas");
|
|
41307
41341
|
T.width = l, T.height = h, T.style.cssText = "width:80px;height:48px";
|
|
41308
41342
|
var _ = T.getContext("2d");
|
|
@@ -41315,7 +41349,7 @@ Ql.Panel = function(s, e, t) {
|
|
|
41315
41349
|
};
|
|
41316
41350
|
class kC {
|
|
41317
41351
|
constructor(e) {
|
|
41318
|
-
this.viralViewerApi = e, this.stats = null, this.viralViewerApi.targetElement && (this.stats =
|
|
41352
|
+
this.viralViewerApi = e, this.stats = null, this.viralViewerApi.targetElement && (this.stats = ql(), this.stats.showPanel(0), this.viralViewerApi.targetElement.appendChild(this.stats.dom));
|
|
41319
41353
|
}
|
|
41320
41354
|
}
|
|
41321
41355
|
const pv = 0, VC = 1, XC = 2, iy = 2, $d = 1.25, ny = 1, su = 6 * 4 + 4 + 4, Ru = 65535, HC = Math.pow(2, -24), Jd = Symbol("SKIP_GENERATION");
|
|
@@ -41393,7 +41427,7 @@ function ay(s, e, t) {
|
|
|
41393
41427
|
i = s[r], n = e[r], t[r] = i < n ? i : n, i = s[a], n = e[a], t[a] = i > n ? i : n;
|
|
41394
41428
|
}
|
|
41395
41429
|
}
|
|
41396
|
-
function
|
|
41430
|
+
function Nh(s, e, t) {
|
|
41397
41431
|
for (let i = 0; i < 3; i++) {
|
|
41398
41432
|
const n = e[s + 2 * i], r = e[s + 2 * i + 1], a = n - r, l = n + r;
|
|
41399
41433
|
a < t[i] && (t[i] = a), l > t[i + 3] && (t[i + 3] = l);
|
|
@@ -41457,7 +41491,7 @@ const or = 32, KC = (s, e) => s.candidate - e.candidate, Br = new Array(or).fill
|
|
|
41457
41491
|
rightCacheBounds: new Float32Array(6),
|
|
41458
41492
|
leftCacheBounds: new Float32Array(6),
|
|
41459
41493
|
candidate: 0
|
|
41460
|
-
})),
|
|
41494
|
+
})), Bh = new Float32Array(6);
|
|
41461
41495
|
function $C(s, e, t, i, n, r) {
|
|
41462
41496
|
let a = -1, l = 0;
|
|
41463
41497
|
if (r === pv)
|
|
@@ -41484,7 +41518,7 @@ function $C(s, e, t, i, n, r) {
|
|
|
41484
41518
|
} = z;
|
|
41485
41519
|
for (let U = 0; U < 3; U++)
|
|
41486
41520
|
H[U] = 1 / 0, H[U + 3] = -1 / 0, k[U] = 1 / 0, k[U + 3] = -1 / 0, F[U] = 1 / 0, F[U + 3] = -1 / 0;
|
|
41487
|
-
|
|
41521
|
+
Nh(S, t, F);
|
|
41488
41522
|
}
|
|
41489
41523
|
b.sort(KC);
|
|
41490
41524
|
let E = n;
|
|
@@ -41497,7 +41531,7 @@ function $C(s, e, t, i, n, r) {
|
|
|
41497
41531
|
const z = t[S + 2 * m];
|
|
41498
41532
|
for (let F = 0; F < E; F++) {
|
|
41499
41533
|
const k = b[F];
|
|
41500
|
-
z >= k.candidate ?
|
|
41534
|
+
z >= k.candidate ? Nh(S, t, k.rightCacheBounds) : (Nh(S, t, k.leftCacheBounds), k.count++);
|
|
41501
41535
|
}
|
|
41502
41536
|
}
|
|
41503
41537
|
for (let S = 0; S < E; S++) {
|
|
@@ -41521,7 +41555,7 @@ function $C(s, e, t, i, n, r) {
|
|
|
41521
41555
|
let F = ~~((t[E + 2 * m] - x) / _);
|
|
41522
41556
|
F >= or && (F = or - 1);
|
|
41523
41557
|
const k = Br[F];
|
|
41524
|
-
k.count++,
|
|
41558
|
+
k.count++, Nh(E, t, k.bounds);
|
|
41525
41559
|
}
|
|
41526
41560
|
const b = Br[or - 1];
|
|
41527
41561
|
ry(b.bounds, b.rightCacheBounds);
|
|
@@ -41532,9 +41566,9 @@ function $C(s, e, t, i, n, r) {
|
|
|
41532
41566
|
let P = 0;
|
|
41533
41567
|
for (let E = 0; E < or - 1; E++) {
|
|
41534
41568
|
const S = Br[E], z = S.count, F = S.bounds, H = Br[E + 1].rightCacheBounds;
|
|
41535
|
-
z !== 0 && (P === 0 ? ry(F,
|
|
41569
|
+
z !== 0 && (P === 0 ? ry(F, Bh) : ay(F, Bh, Bh)), P += z;
|
|
41536
41570
|
let U = 0, O = 0;
|
|
41537
|
-
P !== 0 && (U = Pl(
|
|
41571
|
+
P !== 0 && (U = Pl(Bh) / h);
|
|
41538
41572
|
const V = n - P;
|
|
41539
41573
|
V !== 0 && (O = Pl(H) / h);
|
|
41540
41574
|
const $ = ny + $d * (U * P + O * V);
|
|
@@ -41552,7 +41586,7 @@ function JC(s, e, t, i) {
|
|
|
41552
41586
|
n += s[r * 6 + i * 2];
|
|
41553
41587
|
return n / t;
|
|
41554
41588
|
}
|
|
41555
|
-
class
|
|
41589
|
+
class zh {
|
|
41556
41590
|
constructor() {
|
|
41557
41591
|
}
|
|
41558
41592
|
}
|
|
@@ -41609,11 +41643,11 @@ function nR(s, e) {
|
|
|
41609
41643
|
let p = !1;
|
|
41610
41644
|
const m = new Float32Array(6), x = new Float32Array(6), w = jC(t, m), T = e.indirect ? tR : eR, _ = [], b = e.indirect ? mv(t) : gv(t);
|
|
41611
41645
|
if (b.length === 1) {
|
|
41612
|
-
const S = b[0], z = new
|
|
41646
|
+
const S = b[0], z = new zh();
|
|
41613
41647
|
z.boundingData = m, ZC(w, S.offset, S.count, x), E(z, S.offset, S.count, x), _.push(z);
|
|
41614
41648
|
} else
|
|
41615
41649
|
for (let S of b) {
|
|
41616
|
-
const z = new
|
|
41650
|
+
const z = new zh();
|
|
41617
41651
|
z.boundingData = new Float32Array(6), ef(w, S.offset, S.count, z.boundingData, x), E(z, S.offset, S.count, x), _.push(z);
|
|
41618
41652
|
}
|
|
41619
41653
|
return _;
|
|
@@ -41631,9 +41665,9 @@ function nR(s, e) {
|
|
|
41631
41665
|
P(z + F), S.offset = z, S.count = F;
|
|
41632
41666
|
else {
|
|
41633
41667
|
S.splitAxis = U.axis;
|
|
41634
|
-
const V = new
|
|
41668
|
+
const V = new zh(), $ = z, J = O - z;
|
|
41635
41669
|
S.left = V, V.boundingData = new Float32Array(6), ef(w, $, J, V.boundingData, x), E(V, $, J, x, H + 1);
|
|
41636
|
-
const ne = new
|
|
41670
|
+
const ne = new zh(), ce = O, he = F - J;
|
|
41637
41671
|
S.right = ne, ne.boundingData = new Float32Array(6), ef(w, ce, he, ne.boundingData, x), E(ne, ce, he, x, H + 1);
|
|
41638
41672
|
}
|
|
41639
41673
|
return S;
|
|
@@ -42083,11 +42117,11 @@ class cR {
|
|
|
42083
42117
|
}
|
|
42084
42118
|
const Xi = new cR();
|
|
42085
42119
|
let Xr, To;
|
|
42086
|
-
const ao = [],
|
|
42120
|
+
const ao = [], Uh = /* @__PURE__ */ new yv(() => new li());
|
|
42087
42121
|
function hR(s, e, t, i, n, r) {
|
|
42088
|
-
Xr =
|
|
42122
|
+
Xr = Uh.getPrimitive(), To = Uh.getPrimitive(), ao.push(Xr, To), Xi.setBuffer(s._roots[e]);
|
|
42089
42123
|
const a = gp(0, s.geometry, t, i, n, r);
|
|
42090
|
-
Xi.clearBuffer(),
|
|
42124
|
+
Xi.clearBuffer(), Uh.releasePrimitive(Xr), Uh.releasePrimitive(To), ao.pop(), ao.pop();
|
|
42091
42125
|
const l = ao.length;
|
|
42092
42126
|
return l > 0 && (To = ao[l - 1], Xr = ao[l - 2]), a;
|
|
42093
42127
|
}
|
|
@@ -42174,7 +42208,7 @@ function uR(s, e, t = {}, i = 0, n = 1 / 0) {
|
|
|
42174
42208
|
const u = Math.sqrt(l);
|
|
42175
42209
|
return t.point ? t.point.copy(nf) : t.point = nf.clone(), t.distance = u, t.faceIndex = h, t;
|
|
42176
42210
|
}
|
|
42177
|
-
const oo = /* @__PURE__ */ new W(), lo = /* @__PURE__ */ new W(), co = /* @__PURE__ */ new W(),
|
|
42211
|
+
const oo = /* @__PURE__ */ new W(), lo = /* @__PURE__ */ new W(), co = /* @__PURE__ */ new W(), Fh = /* @__PURE__ */ new Te(), kh = /* @__PURE__ */ new Te(), Vh = /* @__PURE__ */ new Te(), oy = /* @__PURE__ */ new W(), ly = /* @__PURE__ */ new W(), cy = /* @__PURE__ */ new W(), Xh = /* @__PURE__ */ new W();
|
|
42178
42212
|
function dR(s, e, t, i, n, r) {
|
|
42179
42213
|
let a;
|
|
42180
42214
|
return r === Sn ? a = s.intersectTriangle(i, t, e, !0, n) : a = s.intersectTriangle(e, t, i, r !== On, n), a === null ? null : {
|
|
@@ -42184,9 +42218,9 @@ function dR(s, e, t, i, n, r) {
|
|
|
42184
42218
|
}
|
|
42185
42219
|
function fR(s, e, t, i, n, r, a, l, h) {
|
|
42186
42220
|
oo.fromBufferAttribute(e, r), lo.fromBufferAttribute(e, a), co.fromBufferAttribute(e, l);
|
|
42187
|
-
const u = dR(s, oo, lo, co,
|
|
42221
|
+
const u = dR(s, oo, lo, co, Xh, h);
|
|
42188
42222
|
if (u) {
|
|
42189
|
-
i && (
|
|
42223
|
+
i && (Fh.fromBufferAttribute(i, r), kh.fromBufferAttribute(i, a), Vh.fromBufferAttribute(i, l), u.uv = ln.getInterpolation(Xh, oo, lo, co, Fh, kh, Vh, new Te())), n && (Fh.fromBufferAttribute(n, r), kh.fromBufferAttribute(n, a), Vh.fromBufferAttribute(n, l), u.uv1 = ln.getInterpolation(Xh, oo, lo, co, Fh, kh, Vh, new Te())), t && (oy.fromBufferAttribute(t, r), ly.fromBufferAttribute(t, a), cy.fromBufferAttribute(t, l), u.normal = ln.getInterpolation(Xh, oo, lo, co, oy, ly, cy, new W()), u.normal.dot(s.direction) > 0 && u.normal.multiplyScalar(-1));
|
|
42190
42224
|
const f = {
|
|
42191
42225
|
a: r,
|
|
42192
42226
|
b: a,
|
|
@@ -42345,7 +42379,7 @@ function xp(s, e, t, i) {
|
|
|
42345
42379
|
return _ && P ? _.distance <= P.distance ? _ : P : _ || P || null;
|
|
42346
42380
|
}
|
|
42347
42381
|
}
|
|
42348
|
-
const
|
|
42382
|
+
const Hh = /* @__PURE__ */ new li(), ho = /* @__PURE__ */ new As(), uo = /* @__PURE__ */ new As(), Rl = /* @__PURE__ */ new ot(), fy = /* @__PURE__ */ new In(), Yh = /* @__PURE__ */ new In();
|
|
42349
42383
|
function SR(s, e, t, i) {
|
|
42350
42384
|
Xi.setBuffer(s._roots[e]);
|
|
42351
42385
|
const n = vp(0, s, t, i);
|
|
@@ -42357,8 +42391,8 @@ function vp(s, e, t, i, n = null) {
|
|
|
42357
42391
|
if (n === null && (t.boundingBox || t.computeBoundingBox(), fy.set(t.boundingBox.min, t.boundingBox.max, i), n = fy), ys(h, a)) {
|
|
42358
42392
|
const f = e.geometry, p = f.index, m = f.attributes.position, x = t.index, w = t.attributes.position, T = br(s, l), _ = Kr(h, a);
|
|
42359
42393
|
if (Rl.copy(i).invert(), t.boundsTree)
|
|
42360
|
-
return Zn(s, r,
|
|
42361
|
-
intersectsBounds: (P) =>
|
|
42394
|
+
return Zn(s, r, Yh), Yh.matrix.copy(Rl), Yh.needsUpdate = !0, t.boundsTree.shapecast({
|
|
42395
|
+
intersectsBounds: (P) => Yh.intersectsBox(P),
|
|
42362
42396
|
intersectsTriangle: (P) => {
|
|
42363
42397
|
P.a.applyMatrix4(i), P.b.applyMatrix4(i), P.c.applyMatrix4(i), P.needsUpdate = !0;
|
|
42364
42398
|
for (let E = T * 3, S = (_ + T) * 3; E < S; E += 3)
|
|
@@ -42375,17 +42409,17 @@ function vp(s, e, t, i, n = null) {
|
|
|
42375
42409
|
}
|
|
42376
42410
|
} else {
|
|
42377
42411
|
const f = s + 8, p = l[s + 6];
|
|
42378
|
-
return Zn(f, r,
|
|
42412
|
+
return Zn(f, r, Hh), !!(n.intersectsBox(Hh) && vp(f, e, t, i, n) || (Zn(p, r, Hh), n.intersectsBox(Hh) && vp(p, e, t, i, n)));
|
|
42379
42413
|
}
|
|
42380
42414
|
}
|
|
42381
|
-
const
|
|
42415
|
+
const Gh = /* @__PURE__ */ new ot(), sf = /* @__PURE__ */ new In(), Il = /* @__PURE__ */ new In(), AR = /* @__PURE__ */ new W(), TR = /* @__PURE__ */ new W(), ER = /* @__PURE__ */ new W(), PR = /* @__PURE__ */ new W();
|
|
42382
42416
|
function CR(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
42383
42417
|
e.boundingBox || e.computeBoundingBox(), sf.set(e.boundingBox.min, e.boundingBox.max, t), sf.needsUpdate = !0;
|
|
42384
42418
|
const l = s.geometry, h = l.attributes.position, u = l.index, f = e.attributes.position, p = e.index, m = cn.getPrimitive(), x = cn.getPrimitive();
|
|
42385
42419
|
let w = AR, T = TR, _ = null, b = null;
|
|
42386
42420
|
n && (_ = ER, b = PR);
|
|
42387
42421
|
let P = 1 / 0, E = null, S = null;
|
|
42388
|
-
return
|
|
42422
|
+
return Gh.copy(t).invert(), Il.matrix.copy(Gh), s.shapecast(
|
|
42389
42423
|
{
|
|
42390
42424
|
boundsTraverseOrder: (z) => sf.distanceToBox(z),
|
|
42391
42425
|
intersectsBounds: (z, F, k) => k < P && k < a ? (F && (Il.min.copy(z.min), Il.max.copy(z.max), Il.needsUpdate = !0), !0) : !1,
|
|
@@ -42420,7 +42454,7 @@ function CR(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
|
42420
42454
|
}
|
|
42421
42455
|
}
|
|
42422
42456
|
}
|
|
42423
|
-
), cn.releasePrimitive(m), cn.releasePrimitive(x), P === 1 / 0 ? null : (i.point ? i.point.copy(T) : i.point = T.clone(), i.distance = P, i.faceIndex = E, n && (n.point ? n.point.copy(b) : n.point = b.clone(), n.point.applyMatrix4(
|
|
42457
|
+
), cn.releasePrimitive(m), cn.releasePrimitive(x), P === 1 / 0 ? null : (i.point ? i.point.copy(T) : i.point = T.clone(), i.distance = P, i.faceIndex = E, n && (n.point ? n.point.copy(b) : n.point = b.clone(), n.point.applyMatrix4(Gh), T.applyMatrix4(Gh), n.distance = T.sub(n.point).length(), n.faceIndex = S), i);
|
|
42424
42458
|
}
|
|
42425
42459
|
const py = new ot(), rf = /* @__PURE__ */ new li(), af = /* @__PURE__ */ new li();
|
|
42426
42460
|
function RR(s, e, t, i) {
|
|
@@ -42545,7 +42579,7 @@ function wp(s, e, t, i) {
|
|
|
42545
42579
|
return _ && P ? _.distance <= P.distance ? _ : P : _ || P || null;
|
|
42546
42580
|
}
|
|
42547
42581
|
}
|
|
42548
|
-
const
|
|
42582
|
+
const Wh = /* @__PURE__ */ new li(), fo = /* @__PURE__ */ new As(), po = /* @__PURE__ */ new As(), Dl = /* @__PURE__ */ new ot(), yy = /* @__PURE__ */ new In(), Qh = /* @__PURE__ */ new In();
|
|
42549
42583
|
function NR(s, e, t, i) {
|
|
42550
42584
|
Xi.setBuffer(s._roots[e]);
|
|
42551
42585
|
const n = _p(0, s, t, i);
|
|
@@ -42557,8 +42591,8 @@ function _p(s, e, t, i, n = null) {
|
|
|
42557
42591
|
if (n === null && (t.boundingBox || t.computeBoundingBox(), yy.set(t.boundingBox.min, t.boundingBox.max, i), n = yy), ys(h, a)) {
|
|
42558
42592
|
const f = e.geometry, p = f.index, m = f.attributes.position, x = t.index, w = t.attributes.position, T = br(s, l), _ = Kr(h, a);
|
|
42559
42593
|
if (Dl.copy(i).invert(), t.boundsTree)
|
|
42560
|
-
return Zn(s, r,
|
|
42561
|
-
intersectsBounds: (P) =>
|
|
42594
|
+
return Zn(s, r, Qh), Qh.matrix.copy(Dl), Qh.needsUpdate = !0, t.boundsTree.shapecast({
|
|
42595
|
+
intersectsBounds: (P) => Qh.intersectsBox(P),
|
|
42562
42596
|
intersectsTriangle: (P) => {
|
|
42563
42597
|
P.a.applyMatrix4(i), P.b.applyMatrix4(i), P.c.applyMatrix4(i), P.needsUpdate = !0;
|
|
42564
42598
|
for (let E = T, S = _ + T; E < S; E++)
|
|
@@ -42576,17 +42610,17 @@ function _p(s, e, t, i, n = null) {
|
|
|
42576
42610
|
}
|
|
42577
42611
|
} else {
|
|
42578
42612
|
const f = s + 8, p = l[s + 6];
|
|
42579
|
-
return Zn(f, r,
|
|
42613
|
+
return Zn(f, r, Wh), !!(n.intersectsBox(Wh) && _p(f, e, t, i, n) || (Zn(p, r, Wh), n.intersectsBox(Wh) && _p(p, e, t, i, n)));
|
|
42580
42614
|
}
|
|
42581
42615
|
}
|
|
42582
|
-
const
|
|
42616
|
+
const qh = /* @__PURE__ */ new ot(), of = /* @__PURE__ */ new In(), Ll = /* @__PURE__ */ new In(), BR = /* @__PURE__ */ new W(), zR = /* @__PURE__ */ new W(), UR = /* @__PURE__ */ new W(), FR = /* @__PURE__ */ new W();
|
|
42583
42617
|
function kR(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
42584
42618
|
e.boundingBox || e.computeBoundingBox(), of.set(e.boundingBox.min, e.boundingBox.max, t), of.needsUpdate = !0;
|
|
42585
42619
|
const l = s.geometry, h = l.attributes.position, u = l.index, f = e.attributes.position, p = e.index, m = cn.getPrimitive(), x = cn.getPrimitive();
|
|
42586
42620
|
let w = BR, T = zR, _ = null, b = null;
|
|
42587
42621
|
n && (_ = UR, b = FR);
|
|
42588
42622
|
let P = 1 / 0, E = null, S = null;
|
|
42589
|
-
return
|
|
42623
|
+
return qh.copy(t).invert(), Ll.matrix.copy(qh), s.shapecast(
|
|
42590
42624
|
{
|
|
42591
42625
|
boundsTraverseOrder: (z) => of.distanceToBox(z),
|
|
42592
42626
|
intersectsBounds: (z, F, k) => k < P && k < a ? (F && (Ll.min.copy(z.min), Ll.max.copy(z.max), Ll.needsUpdate = !0), !0) : !1,
|
|
@@ -42625,7 +42659,7 @@ function kR(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
|
42625
42659
|
}
|
|
42626
42660
|
}
|
|
42627
42661
|
}
|
|
42628
|
-
), cn.releasePrimitive(m), cn.releasePrimitive(x), P === 1 / 0 ? null : (i.point ? i.point.copy(T) : i.point = T.clone(), i.distance = P, i.faceIndex = E, n && (n.point ? n.point.copy(b) : n.point = b.clone(), n.point.applyMatrix4(
|
|
42662
|
+
), cn.releasePrimitive(m), cn.releasePrimitive(x), P === 1 / 0 ? null : (i.point ? i.point.copy(T) : i.point = T.clone(), i.distance = P, i.faceIndex = E, n && (n.point ? n.point.copy(b) : n.point = b.clone(), n.point.applyMatrix4(qh), T.applyMatrix4(qh), n.distance = T.sub(n.point).length(), n.faceIndex = S), i);
|
|
42629
42663
|
}
|
|
42630
42664
|
const xy = new ot(), lf = /* @__PURE__ */ new li(), cf = /* @__PURE__ */ new li();
|
|
42631
42665
|
function VR(s, e, t, i) {
|
|
@@ -42670,7 +42704,7 @@ function VR(s, e, t, i) {
|
|
|
42670
42704
|
function XR() {
|
|
42671
42705
|
return typeof SharedArrayBuffer < "u";
|
|
42672
42706
|
}
|
|
42673
|
-
const
|
|
42707
|
+
const Zh = /* @__PURE__ */ new In(), vy = /* @__PURE__ */ new li();
|
|
42674
42708
|
class ym {
|
|
42675
42709
|
static serialize(e, t = {}) {
|
|
42676
42710
|
t = {
|
|
@@ -42808,10 +42842,10 @@ class ym {
|
|
|
42808
42842
|
}
|
|
42809
42843
|
/* Derived Cast Functions */
|
|
42810
42844
|
intersectsBox(e, t) {
|
|
42811
|
-
return
|
|
42845
|
+
return Zh.set(e.min, e.max, t), Zh.needsUpdate = !0, this.shapecast(
|
|
42812
42846
|
{
|
|
42813
|
-
intersectsBounds: (i) =>
|
|
42814
|
-
intersectsTriangle: (i) =>
|
|
42847
|
+
intersectsBounds: (i) => Zh.intersectsBox(i),
|
|
42848
|
+
intersectsTriangle: (i) => Zh.intersectsTriangle(i)
|
|
42815
42849
|
}
|
|
42816
42850
|
);
|
|
42817
42851
|
}
|
|
@@ -43248,7 +43282,7 @@ const t3 = e3;
|
|
|
43248
43282
|
class i3 {
|
|
43249
43283
|
constructor() {
|
|
43250
43284
|
const e = new Blob([`(${t3})()`]), t = URL.createObjectURL(e);
|
|
43251
|
-
this.workerPool = new
|
|
43285
|
+
this.workerPool = new uc(
|
|
43252
43286
|
2,
|
|
43253
43287
|
t
|
|
43254
43288
|
);
|
|
@@ -43519,7 +43553,7 @@ class h3 {
|
|
|
43519
43553
|
}
|
|
43520
43554
|
class u3 {
|
|
43521
43555
|
constructor(e) {
|
|
43522
|
-
this.viralTools = e, this.viralToolMeasureScene = new
|
|
43556
|
+
this.viralTools = e, this.viralToolMeasureScene = new xc(), this.isActivated = !1, this.measures = [], this.point1 = null, this.point2 = null, this.tempPoint2 = null, this.defaultSprite = this.makeSprite(), this.measureObject = new de(), this.tempMeasure = new de(), this.tempSprite1 = null, this.tempLine = null, this.tempSprite2 = null;
|
|
43523
43557
|
}
|
|
43524
43558
|
activate(e) {
|
|
43525
43559
|
this.isActivated = e.activate, this.isActivated ? (this.viralToolMeasureScene.getObjectByName("measure-object") || (this.measureObject.name = "measure-object", this.viralToolMeasureScene.add(this.measureObject)), this.viralToolMeasureScene.getObjectByName("temp-measure") || (this.tempMeasure.name = "temp-measure", this.viralToolMeasureScene.add(this.tempMeasure))) : this.dispose();
|
|
@@ -43838,7 +43872,7 @@ const p3 = {
|
|
|
43838
43872
|
Spherical: tv,
|
|
43839
43873
|
Box3: li,
|
|
43840
43874
|
Sphere: Ki,
|
|
43841
|
-
Raycaster:
|
|
43875
|
+
Raycaster: Mc,
|
|
43842
43876
|
MathUtils: Su
|
|
43843
43877
|
};
|
|
43844
43878
|
class m3 {
|
|
@@ -43901,7 +43935,7 @@ class g3 {
|
|
|
43901
43935
|
}
|
|
43902
43936
|
class y3 {
|
|
43903
43937
|
constructor(e) {
|
|
43904
|
-
this.viralNavigationCube = e, this.scene = new
|
|
43938
|
+
this.viralNavigationCube = e, this.scene = new xc(), this.objects = [], this.cube = null, this.activePlane = null, this.addCube(), this.addPlanes();
|
|
43905
43939
|
}
|
|
43906
43940
|
addObject(e) {
|
|
43907
43941
|
this.scene.add(e), this.objects.push(e);
|
|
@@ -44118,7 +44152,7 @@ class x3 {
|
|
|
44118
44152
|
}
|
|
44119
44153
|
this.viralNavigationCube.cubeScene.activePlane = null;
|
|
44120
44154
|
}
|
|
44121
|
-
let i = t.offsetX, n = t.offsetY, r = (f = this.viralNavigationCube.cubeRenderer) == null ? void 0 : f.renderer.getSize(new Te()), a = new Te(i / r.width * 2 - 1, -n / r.height * 2 + 1), l = new
|
|
44155
|
+
let i = t.offsetX, n = t.offsetY, r = (f = this.viralNavigationCube.cubeRenderer) == null ? void 0 : f.renderer.getSize(new Te()), a = new Te(i / r.width * 2 - 1, -n / r.height * 2 + 1), l = new Mc();
|
|
44122
44156
|
l.setFromCamera(a, (p = this.viralNavigationCube.cubeCamera) == null ? void 0 : p.camera);
|
|
44123
44157
|
let h = l.intersectObjects((m = this.viralNavigationCube.cubeScene) == null ? void 0 : m.objects);
|
|
44124
44158
|
if (h.length > 0 && h[0].object != ((x = this.viralNavigationCube.cubeScene) == null ? void 0 : x.cube)) {
|
|
@@ -44400,7 +44434,7 @@ class X3 {
|
|
|
44400
44434
|
this.lifeCycleEvent = new ZR(), this.viralCompressProcessor = new $1(), this.localStorageService = new pC(), this.viralStats = null, this.viralGeometryHandler = null, this.options = e, this.viralLifecycleEventHandler = new jR(
|
|
44401
44435
|
this.lifeCycleEvent,
|
|
44402
44436
|
this.options
|
|
44403
|
-
), this.targetElement = e.container, KR("QUICK_SAND"), $R(this.targetElement, "QUICK_SAND"), this.options.enableTools && (this.viralTools = new f3(this)), this.viralSpinner = new r3(this), this.viralDraggableModal = new a3(this), this.viralContextMenu = new gC(this), this.viralScene = new oP(this), this.viralMaterialManager = new qR(this), this.viralRenderer = new dC(this), this.viralCamera = new
|
|
44437
|
+
), this.targetElement = e.container, KR("QUICK_SAND"), $R(this.targetElement, "QUICK_SAND"), this.options.enableTools && (this.viralTools = new f3(this)), this.viralSpinner = new r3(this), this.viralDraggableModal = new a3(this), this.viralContextMenu = new gC(this), this.viralScene = new oP(this), this.viralMaterialManager = new qR(this), this.viralRenderer = new dC(this), this.viralCamera = new QE(this), this.options.enableNavigationCube && (this.viralNavigationCube = new v3(this)), this.viralMouse = new qE(this), this.viralKeyboard = new mC(this), this.viralAnimation = new fC(this), this.viralVisibilityManager = new JR(this), this.viralCentralizedEventHandler = new yC(this), this.viralLoader = new FC(this), this.viralBVH = new QR(), this.viralDataManager = new s3(this), this.viralAvatarManager = new M3(this), this.options.isDev && (this.viralStats = new kC(this)), this.options.isDev ? this.viralAnimation.devAnimation() : this.viralAnimation.animation();
|
|
44404
44438
|
let t = window;
|
|
44405
44439
|
t.VIRAL_VIEWER = this, this.viralGeometryHandler = new S3(this);
|
|
44406
44440
|
}
|