viral-viewer-2 6.5.4 → 6.5.5
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/components/camera/viral-camera.d.ts +1 -0
- package/dist/index.mjs +415 -399
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -18,12 +18,12 @@ class l3 {
|
|
|
18
18
|
this.Vertices = [], this.Indices = [], this.Transform = null;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
class
|
|
21
|
+
class sa {
|
|
22
22
|
constructor() {
|
|
23
23
|
this.X = 0, this.Y = 0, this.Z = 0;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
var vn = /* @__PURE__ */ ((n) => (n[n.ON_MOUSE_MOVE = 0] = "ON_MOUSE_MOVE", n[n.ON_MOUSE_DOWN_LEFT = 1] = "ON_MOUSE_DOWN_LEFT", n[n.ON_MOUSE_UP_LEFT = 2] = "ON_MOUSE_UP_LEFT", n[n.ON_MOUSE_DOWN_RIGHT = 3] = "ON_MOUSE_DOWN_RIGHT", n[n.ON_MOUSE_UP_RIGHT = 4] = "ON_MOUSE_UP_RIGHT", n[n.ON_MOUSE_DOUBLE_CLICK = 5] = "ON_MOUSE_DOUBLE_CLICK", n))(vn || {}),
|
|
26
|
+
var vn = /* @__PURE__ */ ((n) => (n[n.ON_MOUSE_MOVE = 0] = "ON_MOUSE_MOVE", n[n.ON_MOUSE_DOWN_LEFT = 1] = "ON_MOUSE_DOWN_LEFT", n[n.ON_MOUSE_UP_LEFT = 2] = "ON_MOUSE_UP_LEFT", n[n.ON_MOUSE_DOWN_RIGHT = 3] = "ON_MOUSE_DOWN_RIGHT", n[n.ON_MOUSE_UP_RIGHT = 4] = "ON_MOUSE_UP_RIGHT", n[n.ON_MOUSE_DOUBLE_CLICK = 5] = "ON_MOUSE_DOUBLE_CLICK", n))(vn || {}), Ks = /* @__PURE__ */ ((n) => (n[n.ON_WAKE = 0] = "ON_WAKE", n[n.ON_SLEEP = 1] = "ON_SLEEP", n[n.ON_UPDATE = 2] = "ON_UPDATE", n))(Ks || {}), _o = /* @__PURE__ */ ((n) => (n[n.KEYDOWN = 0] = "KEYDOWN", n[n.KEYUP = 1] = "KEYUP", n))(_o || {}), Pi = /* @__PURE__ */ ((n) => (n[n.LOADED_SCENE = 0] = "LOADED_SCENE", n[n.LOADED_MATERIAL_MANAGER = 1] = "LOADED_MATERIAL_MANAGER", n[n.LOADED_RENDERER = 2] = "LOADED_RENDERER", n[n.LOADED_CAMERA = 3] = "LOADED_CAMERA", n[n.LOADED_CUBE = 4] = "LOADED_CUBE", n[n.LOADED_TOOLS = 5] = "LOADED_TOOLS", n))(Pi || {});
|
|
27
27
|
class Pl {
|
|
28
28
|
constructor() {
|
|
29
29
|
this.items = {};
|
|
@@ -72,12 +72,12 @@ class h3 {
|
|
|
72
72
|
}
|
|
73
73
|
class qx {
|
|
74
74
|
constructor() {
|
|
75
|
-
this.scale = 0, this.origin = new
|
|
75
|
+
this.scale = 0, this.origin = new sa(), this.eyePosition = new sa(), this.upDirection = new sa(), this.forwardDirection = new sa(), this.target = new sa(), this.box = new Zx();
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
class Zx {
|
|
79
79
|
constructor() {
|
|
80
|
-
this.min = new
|
|
80
|
+
this.min = new sa(), this.max = new sa();
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
class u3 {
|
|
@@ -110,8 +110,8 @@ const Jx = 0, iy = 1, ev = 2, tv = 3, iv = 258, Df = 29, sc = 256, Vl = sc + 1 +
|
|
|
110
110
|
), sv = (
|
|
111
111
|
/* extra bits for each bit length code */
|
|
112
112
|
new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7])
|
|
113
|
-
), oy = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), rv = 512,
|
|
114
|
-
Uo(
|
|
113
|
+
), oy = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), rv = 512, $s = new Array((Vl + 2) * 2);
|
|
114
|
+
Uo($s);
|
|
115
115
|
const Dl = new Array(Mo * 2);
|
|
116
116
|
Uo(Dl);
|
|
117
117
|
const Hl = new Array(rv);
|
|
@@ -189,16 +189,16 @@ const uy = (n) => n < 256 ? Hl[n] : Hl[256 + (n >>> 7)], Gl = (n, e) => {
|
|
|
189
189
|
for (e = 0; e <= la; e++)
|
|
190
190
|
r[e] = 0;
|
|
191
191
|
for (n = 0; n <= 143; )
|
|
192
|
-
|
|
192
|
+
$s[n * 2 + 1] = 8, n++, r[8]++;
|
|
193
193
|
for (; n <= 255; )
|
|
194
|
-
|
|
194
|
+
$s[n * 2 + 1] = 9, n++, r[9]++;
|
|
195
195
|
for (; n <= 279; )
|
|
196
|
-
|
|
196
|
+
$s[n * 2 + 1] = 7, n++, r[7]++;
|
|
197
197
|
for (; n <= 287; )
|
|
198
|
-
|
|
199
|
-
for (fy(
|
|
198
|
+
$s[n * 2 + 1] = 8, n++, r[8]++;
|
|
199
|
+
for (fy($s, Vl + 1, r), n = 0; n < Mo; n++)
|
|
200
200
|
Dl[n * 2 + 1] = 5, Dl[n * 2] = dy(n, 5);
|
|
201
|
-
ly = new Au(
|
|
201
|
+
ly = new Au($s, jd, sc + 1, Vl, la), cy = new Au(Dl, Uh, 0, Mo, la), hy = new Au(new Array(0), sv, 0, Of, nv);
|
|
202
202
|
}, py = (n) => {
|
|
203
203
|
let e;
|
|
204
204
|
for (e = 0; e < Vl; e++)
|
|
@@ -309,10 +309,10 @@ const dv = (n) => {
|
|
|
309
309
|
}, gy = (n, e, t, i) => {
|
|
310
310
|
Rn(n, (Jx << 1) + (i ? 1 : 0), 3), my(n), Gl(n, t), Gl(n, ~t), t && n.pending_buf.set(n.window.subarray(e, e + t), n.pending), n.pending += t;
|
|
311
311
|
}, fv = (n) => {
|
|
312
|
-
Rn(n, iy << 1, 3), xs(n, Nf,
|
|
312
|
+
Rn(n, iy << 1, 3), xs(n, Nf, $s), av(n);
|
|
313
313
|
}, pv = (n, e, t, i) => {
|
|
314
314
|
let s, r, a = 0;
|
|
315
|
-
n.level > 0 ? (n.strm.data_type === $x && (n.strm.data_type = uv(n)), Kd(n, n.l_desc), Kd(n, n.d_desc), a = cv(n), s = n.opt_len + 3 + 7 >>> 3, r = n.static_len + 3 + 7 >>> 3, r <= s && (s = r)) : s = r = t + 5, t + 4 <= s && e !== -1 ? gy(n, e, t, i) : n.strategy === Kx || r === s ? (Rn(n, (iy << 1) + (i ? 1 : 0), 3), Pp(n,
|
|
315
|
+
n.level > 0 ? (n.strm.data_type === $x && (n.strm.data_type = uv(n)), Kd(n, n.l_desc), Kd(n, n.d_desc), a = cv(n), s = n.opt_len + 3 + 7 >>> 3, r = n.static_len + 3 + 7 >>> 3, r <= s && (s = r)) : s = r = t + 5, t + 4 <= s && e !== -1 ? gy(n, e, t, i) : n.strategy === Kx || r === s ? (Rn(n, (iy << 1) + (i ? 1 : 0), 3), Pp(n, $s, Dl)) : (Rn(n, (ev << 1) + (i ? 1 : 0), 3), hv(n, n.l_desc.max_code + 1, n.d_desc.max_code + 1, a + 1), Pp(n, n.dyn_ltree, n.dyn_dtree)), py(n), i && my(n);
|
|
316
316
|
}, mv = (n, e, t) => (n.pending_buf[n.sym_buf + n.sym_next++] = e, n.pending_buf[n.sym_buf + n.sym_next++] = e >> 8, n.pending_buf[n.sym_buf + n.sym_next++] = t, e === 0 ? n.dyn_ltree[t * 2]++ : (n.matches++, e--, n.dyn_ltree[(Yl[t] + sc + 1) * 2]++, n.dyn_dtree[uy(e) * 2]++), n.sym_next === n.sym_end);
|
|
317
317
|
var gv = dv, yv = gy, xv = pv, vv = mv, bv = fv, wv = {
|
|
318
318
|
_tr_init: gv,
|
|
@@ -408,8 +408,8 @@ var rn = Av, Po = {
|
|
|
408
408
|
Z_DEFLATED: 8
|
|
409
409
|
//Z_NULL: null // Use -1 or null inline, depending on var type
|
|
410
410
|
};
|
|
411
|
-
const { _tr_init: Tv, _tr_stored_block: $d, _tr_flush_block: Ev, _tr_tally:
|
|
412
|
-
Z_NO_FLUSH:
|
|
411
|
+
const { _tr_init: Tv, _tr_stored_block: $d, _tr_flush_block: Ev, _tr_tally: Cr, _tr_align: Pv } = wv, {
|
|
412
|
+
Z_NO_FLUSH: Rr,
|
|
413
413
|
Z_PARTIAL_FLUSH: Cv,
|
|
414
414
|
Z_FULL_FLUSH: Rv,
|
|
415
415
|
Z_FINISH: $n,
|
|
@@ -427,7 +427,7 @@ const { _tr_init: Tv, _tr_stored_block: $d, _tr_flush_block: Ev, _tr_tally: Pr,
|
|
|
427
427
|
Z_DEFAULT_STRATEGY: Bv,
|
|
428
428
|
Z_UNKNOWN: zv,
|
|
429
429
|
Z_DEFLATED: nu
|
|
430
|
-
} = rc, Uv = 9, kv = 15, Fv = 8, Xv = 29, Vv = 256, Jd = Vv + 1 + Xv, Hv = 30, Yv = 19, Gv = 2 * Jd + 1, Wv = 15, ei = 3,
|
|
430
|
+
} = rc, Uv = 9, kv = 15, Fv = 8, Xv = 29, Vv = 256, Jd = Vv + 1 + Xv, Hv = 30, Yv = 19, Gv = 2 * Jd + 1, Wv = 15, ei = 3, Ar = 258, Ss = Ar + ei + 1, Qv = 32, Co = 42, zf = 57, ef = 69, tf = 73, nf = 91, sf = 103, ca = 113, Cl = 666, Tn = 1, ko = 2, ya = 3, Fo = 4, qv = 3, ha = (n, e) => (n.msg = Po[e], e), Op = (n) => n * 2 - (n > 4 ? 9 : 0), Mr = (n) => {
|
|
431
431
|
let e = n.length;
|
|
432
432
|
for (; --e >= 0; )
|
|
433
433
|
n[e] = 0;
|
|
@@ -442,7 +442,7 @@ const { _tr_init: Tv, _tr_stored_block: $d, _tr_flush_block: Ev, _tr_tally: Pr,
|
|
|
442
442
|
t = n.prev[--i], n.prev[i] = t >= s ? t - s : 0;
|
|
443
443
|
while (--e);
|
|
444
444
|
};
|
|
445
|
-
let jv = (n, e, t) => (e << n.hash_shift ^ t) & n.hash_mask,
|
|
445
|
+
let jv = (n, e, t) => (e << n.hash_shift ^ t) & n.hash_mask, Lr = jv;
|
|
446
446
|
const Xn = (n) => {
|
|
447
447
|
const e = n.state;
|
|
448
448
|
let t = e.pending;
|
|
@@ -458,7 +458,7 @@ const Xn = (n) => {
|
|
|
458
458
|
return s > i && (s = i), s === 0 ? 0 : (n.avail_in -= s, e.set(n.input.subarray(n.next_in, n.next_in + s), t), n.state.wrap === 1 ? n.adler = Wl(n.adler, e, s, t) : n.state.wrap === 2 && (n.adler = rn(n.adler, e, s, t)), n.next_in += s, n.total_in += s, s);
|
|
459
459
|
}, yy = (n, e) => {
|
|
460
460
|
let t = n.max_chain_length, i = n.strstart, s, r, a = n.prev_length, l = n.nice_match;
|
|
461
|
-
const h = n.strstart > n.w_size - Ss ? n.strstart - (n.w_size - Ss) : 0, u = n.window, f = n.w_mask, p = n.prev, g = n.strstart +
|
|
461
|
+
const h = n.strstart > n.w_size - Ss ? n.strstart - (n.w_size - Ss) : 0, u = n.window, f = n.w_mask, p = n.prev, g = n.strstart + Ar;
|
|
462
462
|
let x = u[i + a - 1], w = u[i + a];
|
|
463
463
|
n.prev_length >= n.good_match && (t >>= 2), l > n.lookahead && (l = n.lookahead);
|
|
464
464
|
do
|
|
@@ -467,7 +467,7 @@ const Xn = (n) => {
|
|
|
467
467
|
do
|
|
468
468
|
;
|
|
469
469
|
while (u[++i] === u[++s] && u[++i] === u[++s] && u[++i] === u[++s] && u[++i] === u[++s] && u[++i] === u[++s] && u[++i] === u[++s] && u[++i] === u[++s] && u[++i] === u[++s] && i < g);
|
|
470
|
-
if (r =
|
|
470
|
+
if (r = Ar - (g - i), i = g - Ar, r > a) {
|
|
471
471
|
if (n.match_start = e, a = r, r >= l)
|
|
472
472
|
break;
|
|
473
473
|
x = u[i + a - 1], w = u[i + a];
|
|
@@ -482,37 +482,37 @@ const Xn = (n) => {
|
|
|
482
482
|
if (i = n.window_size - n.lookahead - n.strstart, n.strstart >= e + (e - Ss) && (n.window.set(n.window.subarray(e, e + e - i), 0), n.match_start -= e, n.strstart -= e, n.block_start -= e, n.insert > n.strstart && (n.insert = n.strstart), Zv(n), i += e), n.strm.avail_in === 0)
|
|
483
483
|
break;
|
|
484
484
|
if (t = rf(n.strm, n.window, n.strstart + n.lookahead, i), n.lookahead += t, n.lookahead + n.insert >= ei)
|
|
485
|
-
for (s = n.strstart - n.insert, n.ins_h = n.window[s], n.ins_h =
|
|
485
|
+
for (s = n.strstart - n.insert, n.ins_h = n.window[s], n.ins_h = Lr(n, n.ins_h, n.window[s + 1]); n.insert && (n.ins_h = Lr(n, n.ins_h, n.window[s + ei - 1]), n.prev[s & n.w_mask] = n.head[n.ins_h], n.head[n.ins_h] = s, s++, n.insert--, !(n.lookahead + n.insert < ei)); )
|
|
486
486
|
;
|
|
487
487
|
} while (n.lookahead < Ss && n.strm.avail_in !== 0);
|
|
488
488
|
}, xy = (n, e) => {
|
|
489
489
|
let t = n.pending_buf_size - 5 > n.w_size ? n.w_size : n.pending_buf_size - 5, i, s, r, a = 0, l = n.strm.avail_in;
|
|
490
490
|
do {
|
|
491
|
-
if (i = 65535, r = n.bi_valid + 42 >> 3, n.strm.avail_out < r || (r = n.strm.avail_out - r, s = n.strstart - n.block_start, i > s + n.strm.avail_in && (i = s + n.strm.avail_in), i > r && (i = r), i < t && (i === 0 && e !== $n || e ===
|
|
491
|
+
if (i = 65535, r = n.bi_valid + 42 >> 3, n.strm.avail_out < r || (r = n.strm.avail_out - r, s = n.strstart - n.block_start, i > s + n.strm.avail_in && (i = s + n.strm.avail_in), i > r && (i = r), i < t && (i === 0 && e !== $n || e === Rr || i !== s + n.strm.avail_in)))
|
|
492
492
|
break;
|
|
493
493
|
a = e === $n && i === s + n.strm.avail_in ? 1 : 0, $d(n, 0, 0, a), n.pending_buf[n.pending - 4] = i, n.pending_buf[n.pending - 3] = i >> 8, n.pending_buf[n.pending - 2] = ~i, n.pending_buf[n.pending - 1] = ~i >> 8, Xn(n.strm), s && (s > i && (s = i), n.strm.output.set(n.window.subarray(n.block_start, n.block_start + s), n.strm.next_out), n.strm.next_out += s, n.strm.avail_out -= s, n.strm.total_out += s, n.block_start += s, i -= s), i && (rf(n.strm, n.strm.output, n.strm.next_out, i), n.strm.next_out += i, n.strm.avail_out -= i, n.strm.total_out += i);
|
|
494
494
|
} while (a === 0);
|
|
495
|
-
return l -= n.strm.avail_in, l && (l >= n.w_size ? (n.matches = 2, n.window.set(n.strm.input.subarray(n.strm.next_in - n.w_size, n.strm.next_in), 0), n.strstart = n.w_size, n.insert = n.strstart) : (n.window_size - n.strstart <= l && (n.strstart -= n.w_size, n.window.set(n.window.subarray(n.w_size, n.w_size + n.strstart), 0), n.matches < 2 && n.matches++, n.insert > n.strstart && (n.insert = n.strstart)), n.window.set(n.strm.input.subarray(n.strm.next_in - l, n.strm.next_in), n.strstart), n.strstart += l, n.insert += l > n.w_size - n.insert ? n.w_size - n.insert : l), n.block_start = n.strstart), n.high_water < n.strstart && (n.high_water = n.strstart), a ? Fo : e !==
|
|
495
|
+
return l -= n.strm.avail_in, l && (l >= n.w_size ? (n.matches = 2, n.window.set(n.strm.input.subarray(n.strm.next_in - n.w_size, n.strm.next_in), 0), n.strstart = n.w_size, n.insert = n.strstart) : (n.window_size - n.strstart <= l && (n.strstart -= n.w_size, n.window.set(n.window.subarray(n.w_size, n.w_size + n.strstart), 0), n.matches < 2 && n.matches++, n.insert > n.strstart && (n.insert = n.strstart)), n.window.set(n.strm.input.subarray(n.strm.next_in - l, n.strm.next_in), n.strstart), n.strstart += l, n.insert += l > n.w_size - n.insert ? n.w_size - n.insert : l), n.block_start = n.strstart), n.high_water < n.strstart && (n.high_water = n.strstart), a ? Fo : e !== Rr && e !== $n && n.strm.avail_in === 0 && n.strstart === n.block_start ? ko : (r = n.window_size - n.strstart, n.strm.avail_in > r && n.block_start >= n.w_size && (n.block_start -= n.w_size, n.strstart -= n.w_size, n.window.set(n.window.subarray(n.w_size, n.w_size + n.strstart), 0), n.matches < 2 && n.matches++, r += n.w_size, n.insert > n.strstart && (n.insert = n.strstart)), r > n.strm.avail_in && (r = n.strm.avail_in), r && (rf(n.strm, n.window, n.strstart, r), n.strstart += r, n.insert += r > n.w_size - n.insert ? n.w_size - n.insert : r), n.high_water < n.strstart && (n.high_water = n.strstart), r = n.bi_valid + 42 >> 3, r = n.pending_buf_size - r > 65535 ? 65535 : n.pending_buf_size - r, t = r > n.w_size ? n.w_size : r, s = n.strstart - n.block_start, (s >= t || (s || e === $n) && e !== Rr && n.strm.avail_in === 0 && s <= r) && (i = s > r ? r : s, a = e === $n && n.strm.avail_in === 0 && i === s ? 1 : 0, $d(n, n.block_start, i, a), n.block_start += i, Xn(n.strm)), a ? ya : Tn);
|
|
496
496
|
}, Cu = (n, e) => {
|
|
497
497
|
let t, i;
|
|
498
498
|
for (; ; ) {
|
|
499
499
|
if (n.lookahead < Ss) {
|
|
500
|
-
if (Ro(n), n.lookahead < Ss && e ===
|
|
500
|
+
if (Ro(n), n.lookahead < Ss && e === Rr)
|
|
501
501
|
return Tn;
|
|
502
502
|
if (n.lookahead === 0)
|
|
503
503
|
break;
|
|
504
504
|
}
|
|
505
|
-
if (t = 0, n.lookahead >= ei && (n.ins_h =
|
|
506
|
-
if (i =
|
|
505
|
+
if (t = 0, n.lookahead >= ei && (n.ins_h = Lr(n, n.ins_h, n.window[n.strstart + ei - 1]), t = n.prev[n.strstart & n.w_mask] = n.head[n.ins_h], n.head[n.ins_h] = n.strstart), t !== 0 && n.strstart - t <= n.w_size - Ss && (n.match_length = yy(n, t)), n.match_length >= ei)
|
|
506
|
+
if (i = Cr(n, n.strstart - n.match_start, n.match_length - ei), n.lookahead -= n.match_length, n.match_length <= n.max_lazy_match && n.lookahead >= ei) {
|
|
507
507
|
n.match_length--;
|
|
508
508
|
do
|
|
509
|
-
n.strstart++, n.ins_h =
|
|
509
|
+
n.strstart++, n.ins_h = Lr(n, n.ins_h, n.window[n.strstart + ei - 1]), t = n.prev[n.strstart & n.w_mask] = n.head[n.ins_h], n.head[n.ins_h] = n.strstart;
|
|
510
510
|
while (--n.match_length !== 0);
|
|
511
511
|
n.strstart++;
|
|
512
512
|
} else
|
|
513
|
-
n.strstart += n.match_length, n.match_length = 0, n.ins_h = n.window[n.strstart], n.ins_h =
|
|
513
|
+
n.strstart += n.match_length, n.match_length = 0, n.ins_h = n.window[n.strstart], n.ins_h = Lr(n, n.ins_h, n.window[n.strstart + 1]);
|
|
514
514
|
else
|
|
515
|
-
i =
|
|
515
|
+
i = Cr(n, 0, n.window[n.strstart]), n.lookahead--, n.strstart++;
|
|
516
516
|
if (i && (Wn(n, !1), n.strm.avail_out === 0))
|
|
517
517
|
return Tn;
|
|
518
518
|
}
|
|
@@ -521,43 +521,43 @@ const Xn = (n) => {
|
|
|
521
521
|
let t, i, s;
|
|
522
522
|
for (; ; ) {
|
|
523
523
|
if (n.lookahead < Ss) {
|
|
524
|
-
if (Ro(n), n.lookahead < Ss && e ===
|
|
524
|
+
if (Ro(n), n.lookahead < Ss && e === Rr)
|
|
525
525
|
return Tn;
|
|
526
526
|
if (n.lookahead === 0)
|
|
527
527
|
break;
|
|
528
528
|
}
|
|
529
|
-
if (t = 0, n.lookahead >= ei && (n.ins_h =
|
|
530
|
-
s = n.strstart + n.lookahead - ei, i =
|
|
529
|
+
if (t = 0, n.lookahead >= ei && (n.ins_h = Lr(n, n.ins_h, n.window[n.strstart + ei - 1]), t = n.prev[n.strstart & n.w_mask] = n.head[n.ins_h], n.head[n.ins_h] = n.strstart), n.prev_length = n.match_length, n.prev_match = n.match_start, n.match_length = ei - 1, t !== 0 && n.prev_length < n.max_lazy_match && n.strstart - t <= n.w_size - Ss && (n.match_length = yy(n, t), n.match_length <= 5 && (n.strategy === Dv || n.match_length === ei && n.strstart - n.match_start > 4096) && (n.match_length = ei - 1)), n.prev_length >= ei && n.match_length <= n.prev_length) {
|
|
530
|
+
s = n.strstart + n.lookahead - ei, i = Cr(n, n.strstart - 1 - n.prev_match, n.prev_length - ei), n.lookahead -= n.prev_length - 1, n.prev_length -= 2;
|
|
531
531
|
do
|
|
532
|
-
++n.strstart <= s && (n.ins_h =
|
|
532
|
+
++n.strstart <= s && (n.ins_h = Lr(n, n.ins_h, n.window[n.strstart + ei - 1]), t = n.prev[n.strstart & n.w_mask] = n.head[n.ins_h], n.head[n.ins_h] = n.strstart);
|
|
533
533
|
while (--n.prev_length !== 0);
|
|
534
534
|
if (n.match_available = 0, n.match_length = ei - 1, n.strstart++, i && (Wn(n, !1), n.strm.avail_out === 0))
|
|
535
535
|
return Tn;
|
|
536
536
|
} else if (n.match_available) {
|
|
537
|
-
if (i =
|
|
537
|
+
if (i = Cr(n, 0, n.window[n.strstart - 1]), i && Wn(n, !1), n.strstart++, n.lookahead--, n.strm.avail_out === 0)
|
|
538
538
|
return Tn;
|
|
539
539
|
} else
|
|
540
540
|
n.match_available = 1, n.strstart++, n.lookahead--;
|
|
541
541
|
}
|
|
542
|
-
return n.match_available && (i =
|
|
542
|
+
return n.match_available && (i = Cr(n, 0, n.window[n.strstart - 1]), n.match_available = 0), n.insert = n.strstart < ei - 1 ? n.strstart : ei - 1, e === $n ? (Wn(n, !0), n.strm.avail_out === 0 ? ya : Fo) : n.sym_next && (Wn(n, !1), n.strm.avail_out === 0) ? Tn : ko;
|
|
543
543
|
}, Kv = (n, e) => {
|
|
544
544
|
let t, i, s, r;
|
|
545
545
|
const a = n.window;
|
|
546
546
|
for (; ; ) {
|
|
547
|
-
if (n.lookahead <=
|
|
548
|
-
if (Ro(n), n.lookahead <=
|
|
547
|
+
if (n.lookahead <= Ar) {
|
|
548
|
+
if (Ro(n), n.lookahead <= Ar && e === Rr)
|
|
549
549
|
return Tn;
|
|
550
550
|
if (n.lookahead === 0)
|
|
551
551
|
break;
|
|
552
552
|
}
|
|
553
553
|
if (n.match_length = 0, n.lookahead >= ei && n.strstart > 0 && (s = n.strstart - 1, i = a[s], i === a[++s] && i === a[++s] && i === a[++s])) {
|
|
554
|
-
r = n.strstart +
|
|
554
|
+
r = n.strstart + Ar;
|
|
555
555
|
do
|
|
556
556
|
;
|
|
557
557
|
while (i === a[++s] && i === a[++s] && i === a[++s] && i === a[++s] && i === a[++s] && i === a[++s] && i === a[++s] && i === a[++s] && s < r);
|
|
558
|
-
n.match_length =
|
|
558
|
+
n.match_length = Ar - (r - s), n.match_length > n.lookahead && (n.match_length = n.lookahead);
|
|
559
559
|
}
|
|
560
|
-
if (n.match_length >= ei ? (t =
|
|
560
|
+
if (n.match_length >= ei ? (t = Cr(n, 1, n.match_length - ei), n.lookahead -= n.match_length, n.strstart += n.match_length, n.match_length = 0) : (t = Cr(n, 0, n.window[n.strstart]), n.lookahead--, n.strstart++), t && (Wn(n, !1), n.strm.avail_out === 0))
|
|
561
561
|
return Tn;
|
|
562
562
|
}
|
|
563
563
|
return n.insert = 0, e === $n ? (Wn(n, !0), n.strm.avail_out === 0 ? ya : Fo) : n.sym_next && (Wn(n, !1), n.strm.avail_out === 0) ? Tn : ko;
|
|
@@ -565,11 +565,11 @@ const Xn = (n) => {
|
|
|
565
565
|
let t;
|
|
566
566
|
for (; ; ) {
|
|
567
567
|
if (n.lookahead === 0 && (Ro(n), n.lookahead === 0)) {
|
|
568
|
-
if (e ===
|
|
568
|
+
if (e === Rr)
|
|
569
569
|
return Tn;
|
|
570
570
|
break;
|
|
571
571
|
}
|
|
572
|
-
if (n.match_length = 0, t =
|
|
572
|
+
if (n.match_length = 0, t = Cr(n, 0, n.window[n.strstart]), n.lookahead--, n.strstart++, t && (Wn(n, !1), n.strm.avail_out === 0))
|
|
573
573
|
return Tn;
|
|
574
574
|
}
|
|
575
575
|
return n.insert = 0, e === $n ? (Wn(n, !0), n.strm.avail_out === 0 ? ya : Fo) : n.sym_next && (Wn(n, !1), n.strm.avail_out === 0) ? Tn : ko;
|
|
@@ -600,10 +600,10 @@ const Rl = [
|
|
|
600
600
|
new fs(32, 258, 258, 4096, Ra)
|
|
601
601
|
/* 9 max compression */
|
|
602
602
|
], Jv = (n) => {
|
|
603
|
-
n.window_size = 2 * n.w_size,
|
|
603
|
+
n.window_size = 2 * n.w_size, Mr(n.head), n.max_lazy_match = Rl[n.level].max_lazy, n.good_match = Rl[n.level].good_length, n.nice_match = Rl[n.level].nice_length, n.max_chain_length = Rl[n.level].max_chain, n.strstart = 0, n.block_start = 0, n.lookahead = 0, n.insert = 0, n.match_length = n.prev_length = ei - 1, n.match_available = 0, n.ins_h = 0;
|
|
604
604
|
};
|
|
605
605
|
function eb() {
|
|
606
|
-
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 = nu, 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(Gv * 2), this.dyn_dtree = new Uint16Array((2 * Hv + 1) * 2), this.bl_tree = new Uint16Array((2 * Yv + 1) * 2),
|
|
606
|
+
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 = nu, 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(Gv * 2), this.dyn_dtree = new Uint16Array((2 * Hv + 1) * 2), this.bl_tree = new Uint16Array((2 * Yv + 1) * 2), Mr(this.dyn_ltree), Mr(this.dyn_dtree), Mr(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new Uint16Array(Wv + 1), this.heap = new Uint16Array(2 * Jd + 1), Mr(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new Uint16Array(2 * Jd + 1), Mr(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;
|
|
607
607
|
}
|
|
608
608
|
const ac = (n) => {
|
|
609
609
|
if (!n)
|
|
@@ -715,11 +715,11 @@ const ac = (n) => {
|
|
|
715
715
|
if (t.status = ca, Xn(n), t.pending !== 0)
|
|
716
716
|
return t.last_flush = -1, hn;
|
|
717
717
|
}
|
|
718
|
-
if (n.avail_in !== 0 || t.lookahead !== 0 || e !==
|
|
718
|
+
if (n.avail_in !== 0 || t.lookahead !== 0 || e !== Rr && t.status !== Cl) {
|
|
719
719
|
let s = t.level === 0 ? xy(t, e) : t.strategy === wc ? $v(t, e) : t.strategy === Ov ? Kv(t, e) : Rl[t.level].func(t, e);
|
|
720
720
|
if ((s === ya || s === Fo) && (t.status = Cl), s === Tn || s === ya)
|
|
721
721
|
return n.avail_out === 0 && (t.last_flush = -1), hn;
|
|
722
|
-
if (s === ko && (e === Cv ? Pv(t) : e !== Ip && ($d(t, 0, 0, !1), e === Rv && (
|
|
722
|
+
if (s === ko && (e === Cv ? Pv(t) : e !== Ip && ($d(t, 0, 0, !1), e === Rv && (Mr(t.head), t.lookahead === 0 && (t.strstart = 0, t.block_start = 0, t.insert = 0))), Xn(n), n.avail_out === 0))
|
|
723
723
|
return t.last_flush = -1, hn;
|
|
724
724
|
}
|
|
725
725
|
return e !== $n ? hn : t.wrap <= 0 ? Dp : (t.wrap === 2 ? (ri(t, n.adler & 255), ri(t, n.adler >> 8 & 255), ri(t, n.adler >> 16 & 255), ri(t, n.adler >> 24 & 255), ri(t, n.total_in & 255), ri(t, n.total_in >> 8 & 255), ri(t, n.total_in >> 16 & 255), ri(t, n.total_in >> 24 & 255)) : (il(t, n.adler >>> 16), il(t, n.adler & 65535)), Xn(n), t.wrap > 0 && (t.wrap = -t.wrap), t.pending !== 0 ? hn : Dp);
|
|
@@ -736,7 +736,7 @@ const ac = (n) => {
|
|
|
736
736
|
if (s === 2 || s === 1 && i.status !== Co || i.lookahead)
|
|
737
737
|
return Ms;
|
|
738
738
|
if (s === 1 && (n.adler = Wl(n.adler, e, t, 0)), i.wrap = 0, t >= i.w_size) {
|
|
739
|
-
s === 0 && (
|
|
739
|
+
s === 0 && (Mr(i.head), i.strstart = 0, i.block_start = 0, i.insert = 0);
|
|
740
740
|
let h = new Uint8Array(i.w_size);
|
|
741
741
|
h.set(e.subarray(t - i.w_size, t), 0), e = h, t = i.w_size;
|
|
742
742
|
}
|
|
@@ -744,7 +744,7 @@ const ac = (n) => {
|
|
|
744
744
|
for (n.avail_in = t, n.next_in = 0, n.input = e, Ro(i); i.lookahead >= ei; ) {
|
|
745
745
|
let h = i.strstart, u = i.lookahead - (ei - 1);
|
|
746
746
|
do
|
|
747
|
-
i.ins_h =
|
|
747
|
+
i.ins_h = Lr(i, i.ins_h, i.window[h + ei - 1]), i.prev[h & i.w_mask] = i.head[i.ins_h], i.head[i.ins_h] = h, h++;
|
|
748
748
|
while (--u);
|
|
749
749
|
i.strstart = h, i.lookahead = ei - 1, Ro(i);
|
|
750
750
|
}
|
|
@@ -1713,7 +1713,7 @@ const Zb = (n) => {
|
|
|
1713
1713
|
let i, s, r;
|
|
1714
1714
|
return Ta(n) || (i = n.state, i.wrap !== 0 && i.mode !== Yh) ? ts : i.mode === Yh && (s = 1, s = Wl(s, e, t, 0), s !== i.check) ? Ey : (r = Ny(n, e, t, t), r ? (i.mode = Cy, Py) : (i.havedict = 1, xa));
|
|
1715
1715
|
};
|
|
1716
|
-
var ew = Iy, tw = Dy, iw = Ly, nw = qb, sw = Oy, rw = jb, aw = Kb, ow = $b, lw = Jb, cw = "pako inflate (from Nodeca project)",
|
|
1716
|
+
var ew = Iy, tw = Dy, iw = Ly, nw = qb, sw = Oy, rw = jb, aw = Kb, ow = $b, lw = Jb, cw = "pako inflate (from Nodeca project)", Js = {
|
|
1717
1717
|
inflateReset: ew,
|
|
1718
1718
|
inflateReset2: tw,
|
|
1719
1719
|
inflateResetKeep: iw,
|
|
@@ -1747,13 +1747,13 @@ function oc(n) {
|
|
|
1747
1747
|
}, n || {});
|
|
1748
1748
|
const e = this.options;
|
|
1749
1749
|
e.raw && e.windowBits >= 0 && e.windowBits < 16 && (e.windowBits = -e.windowBits, e.windowBits === 0 && (e.windowBits = -15)), e.windowBits >= 0 && e.windowBits < 16 && !(n && n.windowBits) && (e.windowBits += 32), e.windowBits > 15 && e.windowBits < 48 && (e.windowBits & 15 || (e.windowBits |= 15)), this.err = 0, this.msg = "", this.ended = !1, this.chunks = [], this.strm = new My(), this.strm.avail_out = 0;
|
|
1750
|
-
let t =
|
|
1750
|
+
let t = Js.inflateInit2(
|
|
1751
1751
|
this.strm,
|
|
1752
1752
|
e.windowBits
|
|
1753
1753
|
);
|
|
1754
1754
|
if (t !== Zl)
|
|
1755
1755
|
throw new Error(Po[t]);
|
|
1756
|
-
if (this.header = new uw(),
|
|
1756
|
+
if (this.header = new uw(), Js.inflateGetHeader(this.strm, this.header), e.dictionary && (typeof e.dictionary == "string" ? e.dictionary = ql.string2buf(e.dictionary) : By.call(e.dictionary) === "[object ArrayBuffer]" && (e.dictionary = new Uint8Array(e.dictionary)), e.raw && (t = Js.inflateSetDictionary(this.strm, e.dictionary), t !== Zl)))
|
|
1757
1757
|
throw new Error(Po[t]);
|
|
1758
1758
|
}
|
|
1759
1759
|
oc.prototype.push = function(n, e) {
|
|
@@ -1762,8 +1762,8 @@ oc.prototype.push = function(n, e) {
|
|
|
1762
1762
|
if (this.ended)
|
|
1763
1763
|
return !1;
|
|
1764
1764
|
for (e === ~~e ? a = e : a = e === !0 ? fw : dw, By.call(n) === "[object ArrayBuffer]" ? t.input = new Uint8Array(n) : t.input = n, t.next_in = 0, t.avail_in = t.input.length; ; ) {
|
|
1765
|
-
for (t.avail_out === 0 && (t.output = new Uint8Array(i), t.next_out = 0, t.avail_out = i), r =
|
|
1766
|
-
|
|
1765
|
+
for (t.avail_out === 0 && (t.output = new Uint8Array(i), t.next_out = 0, t.avail_out = i), r = Js.inflate(t, a), r === zu && s && (r = Js.inflateSetDictionary(t, s), r === Zl ? r = Js.inflate(t, a) : r === hm && (r = zu)); t.avail_in > 0 && r === Bu && t.state.wrap > 0 && n[t.next_in] !== 0; )
|
|
1766
|
+
Js.inflateReset(t), r = Js.inflate(t, a);
|
|
1767
1767
|
switch (r) {
|
|
1768
1768
|
case pw:
|
|
1769
1769
|
case hm:
|
|
@@ -1779,7 +1779,7 @@ oc.prototype.push = function(n, e) {
|
|
|
1779
1779
|
this.onData(t.output.length === t.next_out ? t.output : t.output.subarray(0, t.next_out));
|
|
1780
1780
|
if (!(r === Zl && l === 0)) {
|
|
1781
1781
|
if (r === Bu)
|
|
1782
|
-
return r =
|
|
1782
|
+
return r = Js.inflateEnd(this.strm), this.onEnd(r), this.ended = !0, !0;
|
|
1783
1783
|
if (t.avail_in === 0)
|
|
1784
1784
|
break;
|
|
1785
1785
|
}
|
|
@@ -1845,10 +1845,10 @@ const zt = {
|
|
|
1845
1845
|
TOUCH_ZOOM_OFFSET: 16384,
|
|
1846
1846
|
TOUCH_ZOOM_ROTATE: 32768
|
|
1847
1847
|
});
|
|
1848
|
-
function
|
|
1848
|
+
function Qr(n) {
|
|
1849
1849
|
return n.isPerspectiveCamera;
|
|
1850
1850
|
}
|
|
1851
|
-
function
|
|
1851
|
+
function wr(n) {
|
|
1852
1852
|
return n.isOrthographicCamera;
|
|
1853
1853
|
}
|
|
1854
1854
|
const Ia = Math.PI * 2, um = Math.PI / 2, zy = 1e-5, nl = Math.PI / 180;
|
|
@@ -1902,7 +1902,7 @@ function Uu(n, e) {
|
|
|
1902
1902
|
}), e.x /= n.length, e.y /= n.length;
|
|
1903
1903
|
}
|
|
1904
1904
|
function ku(n, e) {
|
|
1905
|
-
return
|
|
1905
|
+
return wr(n) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
|
|
1906
1906
|
}
|
|
1907
1907
|
let Tw = class {
|
|
1908
1908
|
constructor() {
|
|
@@ -1969,7 +1969,7 @@ let Tw = class {
|
|
|
1969
1969
|
}
|
|
1970
1970
|
};
|
|
1971
1971
|
const Ew = "2.3.7", Ec = 1 / 8, Uy = typeof window < "u", Pw = Uy && /Mac/.test(navigator.platform), Cw = !(Uy && "PointerEvent" in window);
|
|
1972
|
-
let Ut, pm, Pc, Fu, Cn, Ft, fi, Da, ps, ms,
|
|
1972
|
+
let Ut, pm, Pc, Fu, Cn, Ft, fi, Da, ps, ms, qr, mm, gm, qn, al, Oa, ym, Xu, xm, Vu, Hu, Cc;
|
|
1973
1973
|
class vs extends Tw {
|
|
1974
1974
|
/**
|
|
1975
1975
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
@@ -2012,7 +2012,7 @@ class vs extends Tw {
|
|
|
2012
2012
|
* @category Statics
|
|
2013
2013
|
*/
|
|
2014
2014
|
static install(e) {
|
|
2015
|
-
Ut = e.THREE, pm = Object.freeze(new Ut.Vector3(0, 0, 0)), Pc = Object.freeze(new Ut.Vector3(0, 1, 0)), Fu = Object.freeze(new Ut.Vector3(0, 0, 1)), Cn = new Ut.Vector2(), Ft = new Ut.Vector3(), fi = new Ut.Vector3(), Da = new Ut.Vector3(), ps = new Ut.Vector3(), ms = new Ut.Vector3(),
|
|
2015
|
+
Ut = e.THREE, pm = Object.freeze(new Ut.Vector3(0, 0, 0)), Pc = Object.freeze(new Ut.Vector3(0, 1, 0)), Fu = Object.freeze(new Ut.Vector3(0, 0, 1)), Cn = new Ut.Vector2(), Ft = new Ut.Vector3(), fi = new Ut.Vector3(), Da = new Ut.Vector3(), ps = new Ut.Vector3(), ms = new Ut.Vector3(), qr = new Ut.Vector3(), mm = new Ut.Vector3(), gm = new Ut.Vector3(), qn = new Ut.Spherical(), al = new Ut.Spherical(), Oa = new Ut.Box3(), ym = new Ut.Box3(), Xu = new Ut.Sphere(), xm = new Ut.Quaternion(), Vu = new Ut.Quaternion(), Hu = new Ut.Matrix4(), Cc = new Ut.Raycaster();
|
|
2016
2016
|
}
|
|
2017
2017
|
/**
|
|
2018
2018
|
* list all ACTIONs
|
|
@@ -2042,10 +2042,10 @@ class vs extends Tw {
|
|
|
2042
2042
|
super(), this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.minDistance = Number.EPSILON, this.maxDistance = 1 / 0, this._infinityDolly = !1, this.minZoom = 0.01, this.maxZoom = 1 / 0, this.smoothTime = 0.25, this.draggingSmoothTime = 0.125, this.maxSpeed = 1 / 0, this.azimuthRotateSpeed = 1, this.polarRotateSpeed = 1, this.dollySpeed = 1, this.dollyDragInverted = !1, this.truckSpeed = 2, this.dollyToCursor = !1, this.dragToOffset = !1, this.verticalDragToForward = !1, this.boundaryFriction = 0, this.restThreshold = 0.01, this.colliderMeshes = [], this.cancel = () => {
|
|
2043
2043
|
}, this._enabled = !0, this._state = Te.NONE, this._viewport = null, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._activePointers = [], this._lockedPointer = null, this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new Ut.Vector3(), this._focalOffsetVelocity = new Ut.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (S, B, z) => {
|
|
2044
2044
|
let F, Q;
|
|
2045
|
-
if (
|
|
2045
|
+
if (Qr(this._camera)) {
|
|
2046
2046
|
const $ = Ft.copy(this._camera.position).sub(this._target), O = this._camera.getEffectiveFOV() * nl, k = $.length() * Math.tan(O * 0.5);
|
|
2047
2047
|
F = this.truckSpeed * S * k / this._elementRect.height, Q = this.truckSpeed * B * k / this._elementRect.height;
|
|
2048
|
-
} else if (
|
|
2048
|
+
} else if (wr(this._camera)) {
|
|
2049
2049
|
const $ = this._camera;
|
|
2050
2050
|
F = S * ($.right - $.left) / $.zoom / this._elementRect.width, Q = B * ($.top - $.bottom) / $.zoom / this._elementRect.height;
|
|
2051
2051
|
} else
|
|
@@ -2073,10 +2073,10 @@ class vs extends Tw {
|
|
|
2073
2073
|
left: Te.ROTATE,
|
|
2074
2074
|
middle: Te.DOLLY,
|
|
2075
2075
|
right: Te.TRUCK,
|
|
2076
|
-
wheel:
|
|
2076
|
+
wheel: Qr(this._camera) ? Te.DOLLY : wr(this._camera) ? Te.ZOOM : Te.NONE
|
|
2077
2077
|
}, this.touches = {
|
|
2078
2078
|
one: Te.TOUCH_ROTATE,
|
|
2079
|
-
two:
|
|
2079
|
+
two: Qr(this._camera) ? Te.TOUCH_DOLLY_TRUCK : wr(this._camera) ? Te.TOUCH_ZOOM_TRUCK : Te.NONE,
|
|
2080
2080
|
three: Te.TOUCH_TRUCK
|
|
2081
2081
|
};
|
|
2082
2082
|
const i = new Ut.Vector2(), s = new Ut.Vector2(), r = new Ut.Vector2(), a = (S) => {
|
|
@@ -2621,10 +2621,10 @@ class vs extends Tw {
|
|
|
2621
2621
|
const E = ym.makeEmpty();
|
|
2622
2622
|
fi.copy(u.min).applyQuaternion(x), E.expandByPoint(fi), fi.copy(u.min).setX(u.max.x).applyQuaternion(x), E.expandByPoint(fi), fi.copy(u.min).setY(u.max.y).applyQuaternion(x), E.expandByPoint(fi), fi.copy(u.max).setZ(u.min.z).applyQuaternion(x), E.expandByPoint(fi), fi.copy(u.min).setZ(u.max.z).applyQuaternion(x), E.expandByPoint(fi), fi.copy(u.max).setY(u.min.y).applyQuaternion(x), E.expandByPoint(fi), fi.copy(u.max).setX(u.min.x).applyQuaternion(x), E.expandByPoint(fi), fi.copy(u.max).applyQuaternion(x), E.expandByPoint(fi), E.min.x -= s, E.min.y -= a, E.max.x += r, E.max.y += l, x.setFromUnitVectors(Fu, g), w && x.premultiply(Vu.invert()), x.premultiply(this._yAxisUpSpace);
|
|
2623
2623
|
const b = E.getSize(Ft), v = E.getCenter(fi).applyQuaternion(x);
|
|
2624
|
-
if (
|
|
2624
|
+
if (Qr(this._camera)) {
|
|
2625
2625
|
const C = this.getDistanceToFitBox(b.x, b.y, b.z, i);
|
|
2626
2626
|
h.push(this.moveTo(v.x, v.y, v.z, t)), h.push(this.dollyTo(C, t)), h.push(this.setFocalOffset(0, 0, 0, t));
|
|
2627
|
-
} else if (
|
|
2627
|
+
} else if (wr(this._camera)) {
|
|
2628
2628
|
const C = this._camera, T = C.right - C.left, S = C.top - C.bottom, B = i ? Math.max(T / b.x, S / b.y) : Math.min(T / b.x, S / b.y);
|
|
2629
2629
|
h.push(this.moveTo(v.x, v.y, v.z, t)), h.push(this.zoomTo(B, t)), h.push(this.setFocalOffset(0, 0, 0, t));
|
|
2630
2630
|
}
|
|
@@ -2638,10 +2638,10 @@ class vs extends Tw {
|
|
|
2638
2638
|
*/
|
|
2639
2639
|
fitToSphere(e, t) {
|
|
2640
2640
|
const i = [], r = e instanceof Ut.Sphere ? Xu.copy(e) : vs.createBoundingSphere(e, Xu);
|
|
2641
|
-
if (i.push(this.moveTo(r.center.x, r.center.y, r.center.z, t)),
|
|
2641
|
+
if (i.push(this.moveTo(r.center.x, r.center.y, r.center.z, t)), Qr(this._camera)) {
|
|
2642
2642
|
const a = this.getDistanceToFitSphere(r.radius);
|
|
2643
2643
|
i.push(this.dollyTo(a, t));
|
|
2644
|
-
} else if (
|
|
2644
|
+
} else if (wr(this._camera)) {
|
|
2645
2645
|
const a = this._camera.right - this._camera.left, l = this._camera.top - this._camera.bottom, h = 2 * r.radius, u = Math.min(a / h, l / h);
|
|
2646
2646
|
i.push(this.zoomTo(u, t));
|
|
2647
2647
|
}
|
|
@@ -2741,9 +2741,9 @@ class vs extends Tw {
|
|
|
2741
2741
|
* @category Methods
|
|
2742
2742
|
*/
|
|
2743
2743
|
setOrbitPoint(e, t, i) {
|
|
2744
|
-
this._camera.updateMatrixWorld(), ps.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), ms.setFromMatrixColumn(this._camera.matrixWorldInverse, 1),
|
|
2744
|
+
this._camera.updateMatrixWorld(), ps.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), ms.setFromMatrixColumn(this._camera.matrixWorldInverse, 1), qr.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
|
|
2745
2745
|
const s = Ft.set(e, t, i), r = s.distanceTo(this._camera.position), a = s.sub(this._camera.position);
|
|
2746
|
-
ps.multiplyScalar(a.x), ms.multiplyScalar(a.y),
|
|
2746
|
+
ps.multiplyScalar(a.x), ms.multiplyScalar(a.y), qr.multiplyScalar(a.z), Ft.copy(ps).add(ms).add(qr), Ft.z = Ft.z + r, this.dollyTo(r, !1), this.setFocalOffset(-Ft.x, Ft.y, -Ft.z, !1), this.moveTo(e, t, i, !1);
|
|
2747
2747
|
}
|
|
2748
2748
|
/**
|
|
2749
2749
|
* Set the boundary box that encloses the target of the camera. box3 is in THREE.Box3
|
|
@@ -2914,7 +2914,7 @@ class vs extends Tw {
|
|
|
2914
2914
|
fm(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, p, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
|
|
2915
2915
|
}
|
|
2916
2916
|
if (this.dollyToCursor && !Si(this._dollyControlCoord.x) && !Si(this._dollyControlCoord.y)) {
|
|
2917
|
-
if (
|
|
2917
|
+
if (Qr(this._camera)) {
|
|
2918
2918
|
const p = this._spherical.radius - this._lastDistance;
|
|
2919
2919
|
if (p !== 0) {
|
|
2920
2920
|
const g = this._camera, x = Ft.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).normalize().negate(), w = fi.copy(x).cross(g.up).normalize();
|
|
@@ -2922,7 +2922,7 @@ class vs extends Tw {
|
|
|
2922
2922
|
const E = Da.crossVectors(w, x), b = this._sphericalEnd.radius * Math.tan(g.getEffectiveFOV() * nl * 0.5), C = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, T = Ft.copy(this._targetEnd).add(w.multiplyScalar(this._dollyControlCoord.x * b * g.aspect)).add(E.multiplyScalar(this._dollyControlCoord.y * b));
|
|
2923
2923
|
this._targetEnd.lerp(T, C), this._target.copy(this._targetEnd), this._boundary.clampPoint(this._targetEnd, this._targetEnd);
|
|
2924
2924
|
}
|
|
2925
|
-
} else if (
|
|
2925
|
+
} else if (wr(this._camera)) {
|
|
2926
2926
|
const p = this._zoom - this._lastZoom;
|
|
2927
2927
|
if (p !== 0) {
|
|
2928
2928
|
const g = this._camera, x = Ft.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (g.near + g.far) / (g.near - g.far)).unproject(g), w = fi.set(0, 0, -1).applyQuaternion(g.quaternion), E = Da.copy(x).add(w.multiplyScalar(-x.dot(g.up))), v = -(this._zoom - p - this._zoomEnd) / this._zoom, C = Ft.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).normalize().negate(), T = this._targetEnd.dot(C);
|
|
@@ -2940,7 +2940,7 @@ class vs extends Tw {
|
|
|
2940
2940
|
}
|
|
2941
2941
|
this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0);
|
|
2942
2942
|
const h = this._collisionTest();
|
|
2943
|
-
this._spherical.radius = Math.min(this._spherical.radius, h), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!Si(this._focalOffset.x) || !Si(this._focalOffset.y) || !Si(this._focalOffset.z)) && (this._camera.updateMatrixWorld(), ps.setFromMatrixColumn(this._camera.matrix, 0), ms.setFromMatrixColumn(this._camera.matrix, 1),
|
|
2943
|
+
this._spherical.radius = Math.min(this._spherical.radius, h), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!Si(this._focalOffset.x) || !Si(this._focalOffset.y) || !Si(this._focalOffset.z)) && (this._camera.updateMatrixWorld(), ps.setFromMatrixColumn(this._camera.matrix, 0), ms.setFromMatrixColumn(this._camera.matrix, 1), qr.setFromMatrixColumn(this._camera.matrix, 2), ps.multiplyScalar(this._focalOffset.x), ms.multiplyScalar(-this._focalOffset.y), qr.multiplyScalar(this._focalOffset.z), Ft.copy(ps).add(ms).add(qr), this._camera.position.add(Ft)), this._boundaryEnclosesCamera && this._encloseToBoundary(this._camera.position.copy(this._target), Ft.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse), 1);
|
|
2944
2944
|
const f = this._needsUpdate;
|
|
2945
2945
|
return f && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : f ? (this.dispatchEvent({ type: "update" }), Si(t, this.restThreshold) && Si(i, this.restThreshold) && Si(s, this.restThreshold) && Si(r.x, this.restThreshold) && Si(r.y, this.restThreshold) && Si(r.z, this.restThreshold) && Si(a.x, this.restThreshold) && Si(a.y, this.restThreshold) && Si(a.z, this.restThreshold) && Si(l, this.restThreshold) && !this._hasRested && (this._hasRested = !0, this.dispatchEvent({ type: "rest" }))) : !f && this._updatedLastTime && this.dispatchEvent({ type: "sleep" }), this._lastDistance = this._spherical.radius, this._lastZoom = this._zoom, this._updatedLastTime = f, this._needsUpdate = !1, f;
|
|
2946
2946
|
}
|
|
@@ -3035,10 +3035,10 @@ class vs extends Tw {
|
|
|
3035
3035
|
}
|
|
3036
3036
|
}
|
|
3037
3037
|
_updateNearPlaneCorners() {
|
|
3038
|
-
if (
|
|
3038
|
+
if (Qr(this._camera)) {
|
|
3039
3039
|
const e = this._camera, t = e.near, i = e.getEffectiveFOV() * nl, s = Math.tan(i * 0.5) * t, r = s * e.aspect;
|
|
3040
3040
|
this._nearPlaneCorners[0].set(-r, -s, 0), this._nearPlaneCorners[1].set(r, -s, 0), this._nearPlaneCorners[2].set(r, s, 0), this._nearPlaneCorners[3].set(-r, s, 0);
|
|
3041
|
-
} else if (
|
|
3041
|
+
} else if (wr(this._camera)) {
|
|
3042
3042
|
const e = this._camera, t = 1 / e.zoom, i = e.left * t, s = e.right * t, r = e.top * t, a = e.bottom * t;
|
|
3043
3043
|
this._nearPlaneCorners[0].set(i, r, 0), this._nearPlaneCorners[1].set(s, r, 0), this._nearPlaneCorners[2].set(s, a, 0), this._nearPlaneCorners[3].set(i, a, 0);
|
|
3044
3044
|
}
|
|
@@ -3150,8 +3150,8 @@ class vs extends Tw {
|
|
|
3150
3150
|
* Copyright 2010-2023 Three.js Authors
|
|
3151
3151
|
* SPDX-License-Identifier: MIT
|
|
3152
3152
|
*/
|
|
3153
|
-
const Ff = "161", Rw = 0, vm = 1, Lw = 2, ky = 1, Iw = 2, Zs = 3, is = 0, ji = 1, dn = 2, As = 0, So = 1, af = 2, bm = 3, wm = 4, Dw = 5,
|
|
3154
|
-
let
|
|
3153
|
+
const Ff = "161", Rw = 0, vm = 1, Lw = 2, ky = 1, Iw = 2, Zs = 3, is = 0, ji = 1, dn = 2, As = 0, So = 1, af = 2, bm = 3, wm = 4, Dw = 5, ra = 100, Ow = 101, Nw = 102, _m = 103, Mm = 104, Bw = 200, zw = 201, Uw = 202, kw = 203, of = 204, lf = 205, Fw = 206, Xw = 207, Vw = 208, Hw = 209, Yw = 210, Gw = 211, Ww = 212, Qw = 213, qw = 214, Zw = 0, jw = 1, Kw = 2, jl = 3, $w = 4, Jw = 5, e1 = 6, t1 = 7, au = 0, i1 = 1, n1 = 2, Ir = 0, s1 = 1, r1 = 2, a1 = 3, o1 = 4, l1 = 5, c1 = 6, Sm = "attached", h1 = "detached", Xf = 300, va = 301, ba = 302, Gh = 303, Wh = 304, lc = 306, rr = 1e3, Hn = 1001, Kl = 1002, mi = 1003, Qh = 1004, aa = 1005, Di = 1006, Bl = 1007, bs = 1008, Dr = 1009, u1 = 1010, d1 = 1011, Vf = 1012, Fy = 1013, tr = 1014, Jn = 1015, ar = 1016, Xy = 1017, Vy = 1018, da = 1020, f1 = 1021, An = 1023, p1 = 1024, m1 = 1025, Or = 1026, Lo = 1027, Hy = 1028, Yy = 1029, g1 = 1030, Gy = 1031, Wy = 1033, Yu = 33776, Gu = 33777, Wu = 33778, Qu = 33779, Am = 35840, Tm = 35841, Em = 35842, Pm = 35843, Qy = 36196, Cm = 37492, Rm = 37496, Lm = 37808, Im = 37809, Dm = 37810, Om = 37811, Nm = 37812, Bm = 37813, zm = 37814, Um = 37815, km = 37816, Fm = 37817, Xm = 37818, Vm = 37819, Hm = 37820, Ym = 37821, qu = 36492, Gm = 36494, Wm = 36495, y1 = 36283, Qm = 36284, qm = 36285, Zm = 36286, x1 = 2200, v1 = 2201, b1 = 2202, $l = 2300, Io = 2301, Zu = 2302, fo = 2400, po = 2401, qh = 2402, Hf = 2500, w1 = 2501, _1 = 0, qy = 1, cf = 2, Zy = 3e3, fa = 3001, jy = 3200, M1 = 3201, Ea = 0, S1 = 1, Yn = "", Hi = "srgb", on = "srgb-linear", Yf = "display-p3", ou = "display-p3-linear", Zh = "linear", Ei = "srgb", jh = "rec709", Kh = "p3", Na = 7680, jm = 519, A1 = 512, T1 = 513, E1 = 514, Ky = 515, P1 = 516, C1 = 517, R1 = 518, L1 = 519, hf = 35044, uf = "300 es", df = 1035, ir = 2e3, $h = 2001;
|
|
3154
|
+
let Xr = class {
|
|
3155
3155
|
addEventListener(e, t) {
|
|
3156
3156
|
this._listeners === void 0 && (this._listeners = {});
|
|
3157
3157
|
const i = this._listeners;
|
|
@@ -3908,8 +3908,8 @@ function $u(n) {
|
|
|
3908
3908
|
} : (console.warn("THREE.Texture: Unable to serialize Texture."), {});
|
|
3909
3909
|
}
|
|
3910
3910
|
let j1 = 0;
|
|
3911
|
-
class Oi extends
|
|
3912
|
-
constructor(e = Oi.DEFAULT_IMAGE, t = Oi.DEFAULT_MAPPING, i = Hn, s = Hn, r = Di, a = bs, l = An, h =
|
|
3911
|
+
class Oi extends Xr {
|
|
3912
|
+
constructor(e = Oi.DEFAULT_IMAGE, t = Oi.DEFAULT_MAPPING, i = Hn, s = Hn, r = Di, a = bs, l = An, h = Dr, u = Oi.DEFAULT_ANISOTROPY, f = Yn) {
|
|
3913
3913
|
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: j1++ }), this.uuid = es(), this.name = "", this.source = new go(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = i, this.wrapT = s, this.magFilter = r, this.minFilter = a, this.anisotropy = u, this.format = l, this.internalFormat = null, this.type = h, this.offset = new Se(0, 0), this.repeat = new Se(1, 1), this.center = new Se(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new qt(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, typeof f == "string" ? this.colorSpace = f : (pa("THREE.Texture: Property .encoding has been replaced by .colorSpace."), this.colorSpace = f === fa ? Hi : Yn), this.userData = {}, this.version = 0, this.onUpdate = null, this.isRenderTargetTexture = !1, this.needsPMREMUpdate = !1;
|
|
3914
3914
|
}
|
|
3915
3915
|
get image() {
|
|
@@ -3969,7 +3969,7 @@ class Oi extends Fr {
|
|
|
3969
3969
|
return e;
|
|
3970
3970
|
if (e.applyMatrix3(this.matrix), e.x < 0 || e.x > 1)
|
|
3971
3971
|
switch (this.wrapS) {
|
|
3972
|
-
case
|
|
3972
|
+
case rr:
|
|
3973
3973
|
e.x = e.x - Math.floor(e.x);
|
|
3974
3974
|
break;
|
|
3975
3975
|
case Hn:
|
|
@@ -3981,7 +3981,7 @@ class Oi extends Fr {
|
|
|
3981
3981
|
}
|
|
3982
3982
|
if (e.y < 0 || e.y > 1)
|
|
3983
3983
|
switch (this.wrapT) {
|
|
3984
|
-
case
|
|
3984
|
+
case rr:
|
|
3985
3985
|
e.y = e.y - Math.floor(e.y);
|
|
3986
3986
|
break;
|
|
3987
3987
|
case Hn:
|
|
@@ -4205,7 +4205,7 @@ class ai {
|
|
|
4205
4205
|
yield this.x, yield this.y, yield this.z, yield this.w;
|
|
4206
4206
|
}
|
|
4207
4207
|
}
|
|
4208
|
-
class K1 extends
|
|
4208
|
+
class K1 extends Xr {
|
|
4209
4209
|
constructor(e = 1, t = 1, i = {}) {
|
|
4210
4210
|
super(), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = 1, this.scissor = new ai(0, 0, e, t), this.scissorTest = !1, this.viewport = new ai(0, 0, e, t);
|
|
4211
4211
|
const s = { width: e, height: t, depth: 1 };
|
|
@@ -4857,37 +4857,37 @@ class di {
|
|
|
4857
4857
|
intersectsTriangle(e) {
|
|
4858
4858
|
if (this.isEmpty())
|
|
4859
4859
|
return !1;
|
|
4860
|
-
this.getCenter(ol), Ic.subVectors(this.max, ol), za.subVectors(e.a, ol), Ua.subVectors(e.b, ol), ka.subVectors(e.c, ol),
|
|
4860
|
+
this.getCenter(ol), Ic.subVectors(this.max, ol), za.subVectors(e.a, ol), Ua.subVectors(e.b, ol), ka.subVectors(e.c, ol), hr.subVectors(Ua, za), ur.subVectors(ka, Ua), Zr.subVectors(za, ka);
|
|
4861
4861
|
let t = [
|
|
4862
|
-
0,
|
|
4863
|
-
-cr.z,
|
|
4864
|
-
cr.y,
|
|
4865
4862
|
0,
|
|
4866
4863
|
-hr.z,
|
|
4867
4864
|
hr.y,
|
|
4868
4865
|
0,
|
|
4869
|
-
-
|
|
4870
|
-
|
|
4871
|
-
cr.z,
|
|
4866
|
+
-ur.z,
|
|
4867
|
+
ur.y,
|
|
4872
4868
|
0,
|
|
4873
|
-
-
|
|
4869
|
+
-Zr.z,
|
|
4870
|
+
Zr.y,
|
|
4874
4871
|
hr.z,
|
|
4875
4872
|
0,
|
|
4876
4873
|
-hr.x,
|
|
4877
|
-
|
|
4874
|
+
ur.z,
|
|
4878
4875
|
0,
|
|
4879
|
-
-
|
|
4880
|
-
|
|
4881
|
-
cr.x,
|
|
4876
|
+
-ur.x,
|
|
4877
|
+
Zr.z,
|
|
4882
4878
|
0,
|
|
4879
|
+
-Zr.x,
|
|
4883
4880
|
-hr.y,
|
|
4884
4881
|
hr.x,
|
|
4885
4882
|
0,
|
|
4886
|
-
-
|
|
4887
|
-
|
|
4883
|
+
-ur.y,
|
|
4884
|
+
ur.x,
|
|
4885
|
+
0,
|
|
4886
|
+
-Zr.y,
|
|
4887
|
+
Zr.x,
|
|
4888
4888
|
0
|
|
4889
4889
|
];
|
|
4890
|
-
return !ed(t, za, Ua, ka, Ic) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !ed(t, za, Ua, ka, Ic)) ? !1 : (Dc.crossVectors(
|
|
4890
|
+
return !ed(t, za, Ua, ka, Ic) || (t = [1, 0, 0, 0, 1, 0, 0, 0, 1], !ed(t, za, Ua, ka, Ic)) ? !1 : (Dc.crossVectors(hr, ur), t = [Dc.x, Dc.y, Dc.z], ed(t, za, Ua, ka, Ic));
|
|
4891
4891
|
}
|
|
4892
4892
|
clampPoint(e, t) {
|
|
4893
4893
|
return t.copy(e).clamp(this.min, this.max);
|
|
@@ -4923,11 +4923,11 @@ const Hs = [
|
|
|
4923
4923
|
/* @__PURE__ */ new G(),
|
|
4924
4924
|
/* @__PURE__ */ new G(),
|
|
4925
4925
|
/* @__PURE__ */ new G()
|
|
4926
|
-
], os = /* @__PURE__ */ new G(), Lc = /* @__PURE__ */ new di(), za = /* @__PURE__ */ new G(), Ua = /* @__PURE__ */ new G(), ka = /* @__PURE__ */ new G(),
|
|
4926
|
+
], os = /* @__PURE__ */ new G(), Lc = /* @__PURE__ */ new di(), za = /* @__PURE__ */ new G(), Ua = /* @__PURE__ */ new G(), ka = /* @__PURE__ */ new G(), hr = /* @__PURE__ */ new G(), ur = /* @__PURE__ */ new G(), Zr = /* @__PURE__ */ new G(), ol = /* @__PURE__ */ new G(), Ic = /* @__PURE__ */ new G(), Dc = /* @__PURE__ */ new G(), jr = /* @__PURE__ */ new G();
|
|
4927
4927
|
function ed(n, e, t, i, s) {
|
|
4928
4928
|
for (let r = 0, a = n.length - 3; r <= a; r += 3) {
|
|
4929
|
-
|
|
4930
|
-
const l = s.x * Math.abs(
|
|
4929
|
+
jr.fromArray(n, r);
|
|
4930
|
+
const l = s.x * Math.abs(jr.x) + s.y * Math.abs(jr.y) + s.z * Math.abs(jr.z), h = e.dot(jr), u = t.dot(jr), f = i.dot(jr);
|
|
4931
4931
|
if (Math.max(-Math.max(h, u, f), Math.min(h, u, f)) > l)
|
|
4932
4932
|
return !1;
|
|
4933
4933
|
}
|
|
@@ -5008,7 +5008,7 @@ class Qi {
|
|
|
5008
5008
|
return new this.constructor().copy(this);
|
|
5009
5009
|
}
|
|
5010
5010
|
}
|
|
5011
|
-
const Ys = /* @__PURE__ */ new G(), id = /* @__PURE__ */ new G(), Oc = /* @__PURE__ */ new G(),
|
|
5011
|
+
const Ys = /* @__PURE__ */ new G(), id = /* @__PURE__ */ new G(), Oc = /* @__PURE__ */ new G(), dr = /* @__PURE__ */ new G(), nd = /* @__PURE__ */ new G(), Nc = /* @__PURE__ */ new G(), sd = /* @__PURE__ */ new G();
|
|
5012
5012
|
class Xo {
|
|
5013
5013
|
constructor(e = new G(), t = new G(0, 0, -1)) {
|
|
5014
5014
|
this.origin = e, this.direction = t;
|
|
@@ -5041,8 +5041,8 @@ class Xo {
|
|
|
5041
5041
|
return t < 0 ? this.origin.distanceToSquared(e) : (Ys.copy(this.origin).addScaledVector(this.direction, t), Ys.distanceToSquared(e));
|
|
5042
5042
|
}
|
|
5043
5043
|
distanceSqToSegment(e, t, i, s) {
|
|
5044
|
-
id.copy(e).add(t).multiplyScalar(0.5), Oc.copy(t).sub(e).normalize(),
|
|
5045
|
-
const r = e.distanceTo(t) * 0.5, a = -this.direction.dot(Oc), l =
|
|
5044
|
+
id.copy(e).add(t).multiplyScalar(0.5), Oc.copy(t).sub(e).normalize(), dr.copy(this.origin).sub(id);
|
|
5045
|
+
const r = e.distanceTo(t) * 0.5, a = -this.direction.dot(Oc), l = dr.dot(this.direction), h = -dr.dot(Oc), u = dr.lengthSq(), f = Math.abs(1 - a * a);
|
|
5046
5046
|
let p, g, x, w;
|
|
5047
5047
|
if (f > 0)
|
|
5048
5048
|
if (p = a * h - l, g = a * l - h, w = r * f, p >= 0)
|
|
@@ -5105,14 +5105,14 @@ class Xo {
|
|
|
5105
5105
|
l = -1, a = -a;
|
|
5106
5106
|
else
|
|
5107
5107
|
return null;
|
|
5108
|
-
|
|
5109
|
-
const h = l * this.direction.dot(Nc.crossVectors(
|
|
5108
|
+
dr.subVectors(this.origin, e);
|
|
5109
|
+
const h = l * this.direction.dot(Nc.crossVectors(dr, Nc));
|
|
5110
5110
|
if (h < 0)
|
|
5111
5111
|
return null;
|
|
5112
|
-
const u = l * this.direction.dot(nd.cross(
|
|
5112
|
+
const u = l * this.direction.dot(nd.cross(dr));
|
|
5113
5113
|
if (u < 0 || h + u > a)
|
|
5114
5114
|
return null;
|
|
5115
|
-
const f = -l *
|
|
5115
|
+
const f = -l * dr.dot(sd);
|
|
5116
5116
|
return f < 0 ? null : this.at(f / a, r);
|
|
5117
5117
|
}
|
|
5118
5118
|
applyMatrix4(e) {
|
|
@@ -5257,7 +5257,7 @@ class nt {
|
|
|
5257
5257
|
}
|
|
5258
5258
|
lookAt(e, t, i) {
|
|
5259
5259
|
const s = this.elements;
|
|
5260
|
-
return kn.subVectors(e, t), kn.lengthSq() === 0 && (kn.z = 1), kn.normalize(),
|
|
5260
|
+
return kn.subVectors(e, t), kn.lengthSq() === 0 && (kn.z = 1), kn.normalize(), fr.crossVectors(i, kn), fr.lengthSq() === 0 && (Math.abs(i.z) === 1 ? kn.x += 1e-4 : kn.z += 1e-4, kn.normalize(), fr.crossVectors(i, kn)), fr.normalize(), Bc.crossVectors(kn, fr), s[0] = fr.x, s[4] = Bc.x, s[8] = kn.x, s[1] = fr.y, s[5] = Bc.y, s[9] = kn.y, s[2] = fr.z, s[6] = Bc.z, s[10] = kn.z, this;
|
|
5261
5261
|
}
|
|
5262
5262
|
multiply(e) {
|
|
5263
5263
|
return this.multiplyMatrices(this, e);
|
|
@@ -5474,10 +5474,10 @@ class nt {
|
|
|
5474
5474
|
const u = 1 / r, f = 1 / a, p = 1 / l;
|
|
5475
5475
|
return ls.elements[0] *= u, ls.elements[1] *= u, ls.elements[2] *= u, ls.elements[4] *= f, ls.elements[5] *= f, ls.elements[6] *= f, ls.elements[8] *= p, ls.elements[9] *= p, ls.elements[10] *= p, t.setFromRotationMatrix(ls), i.x = r, i.y = a, i.z = l, this;
|
|
5476
5476
|
}
|
|
5477
|
-
makePerspective(e, t, i, s, r, a, l =
|
|
5477
|
+
makePerspective(e, t, i, s, r, a, l = ir) {
|
|
5478
5478
|
const h = this.elements, u = 2 * r / (t - e), f = 2 * r / (i - s), p = (t + e) / (t - e), g = (i + s) / (i - s);
|
|
5479
5479
|
let x, w;
|
|
5480
|
-
if (l ===
|
|
5480
|
+
if (l === ir)
|
|
5481
5481
|
x = -(a + r) / (a - r), w = -2 * a * r / (a - r);
|
|
5482
5482
|
else if (l === $h)
|
|
5483
5483
|
x = -a / (a - r), w = -a * r / (a - r);
|
|
@@ -5485,10 +5485,10 @@ class nt {
|
|
|
5485
5485
|
throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: " + l);
|
|
5486
5486
|
return h[0] = u, h[4] = 0, h[8] = p, h[12] = 0, h[1] = 0, h[5] = f, h[9] = g, h[13] = 0, h[2] = 0, h[6] = 0, h[10] = x, h[14] = w, h[3] = 0, h[7] = 0, h[11] = -1, h[15] = 0, this;
|
|
5487
5487
|
}
|
|
5488
|
-
makeOrthographic(e, t, i, s, r, a, l =
|
|
5488
|
+
makeOrthographic(e, t, i, s, r, a, l = ir) {
|
|
5489
5489
|
const h = this.elements, u = 1 / (t - e), f = 1 / (i - s), p = 1 / (a - r), g = (t + e) * u, x = (i + s) * f;
|
|
5490
5490
|
let w, E;
|
|
5491
|
-
if (l ===
|
|
5491
|
+
if (l === ir)
|
|
5492
5492
|
w = (a + r) * p, E = -2 * p;
|
|
5493
5493
|
else if (l === $h)
|
|
5494
5494
|
w = r * p, E = -1 * p;
|
|
@@ -5513,7 +5513,7 @@ class nt {
|
|
|
5513
5513
|
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;
|
|
5514
5514
|
}
|
|
5515
5515
|
}
|
|
5516
|
-
const Fa = /* @__PURE__ */ new G(), ls = /* @__PURE__ */ new nt(), t_ = /* @__PURE__ */ new G(0, 0, 0), i_ = /* @__PURE__ */ new G(1, 1, 1),
|
|
5516
|
+
const Fa = /* @__PURE__ */ new G(), ls = /* @__PURE__ */ new nt(), t_ = /* @__PURE__ */ new G(0, 0, 0), i_ = /* @__PURE__ */ new G(1, 1, 1), fr = /* @__PURE__ */ new G(), Bc = /* @__PURE__ */ new G(), kn = /* @__PURE__ */ new G(), ig = /* @__PURE__ */ new nt(), ng = /* @__PURE__ */ new Ui();
|
|
5517
5517
|
class Vo {
|
|
5518
5518
|
constructor(e = 0, t = 0, i = 0, s = Vo.DEFAULT_ORDER) {
|
|
5519
5519
|
this.isEuler = !0, this._x = e, this._y = t, this._z = i, this._order = s;
|
|
@@ -5636,7 +5636,7 @@ class Qf {
|
|
|
5636
5636
|
}
|
|
5637
5637
|
let n_ = 0;
|
|
5638
5638
|
const sg = /* @__PURE__ */ new G(), Xa = /* @__PURE__ */ new Ui(), Gs = /* @__PURE__ */ new nt(), zc = /* @__PURE__ */ new G(), cl = /* @__PURE__ */ new G(), s_ = /* @__PURE__ */ new G(), r_ = /* @__PURE__ */ new Ui(), rg = /* @__PURE__ */ new G(1, 0, 0), ag = /* @__PURE__ */ new G(0, 1, 0), og = /* @__PURE__ */ new G(0, 0, 1), a_ = { type: "added" }, o_ = { type: "removed" };
|
|
5639
|
-
class oi extends
|
|
5639
|
+
class oi extends Xr {
|
|
5640
5640
|
constructor() {
|
|
5641
5641
|
super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: n_++ }), this.uuid = es(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = oi.DEFAULT_UP.clone();
|
|
5642
5642
|
const e = new G(), t = new Vo(), i = new Ui(), s = new G(1, 1, 1);
|
|
@@ -6193,7 +6193,7 @@ const tx = {
|
|
|
6193
6193
|
whitesmoke: 16119285,
|
|
6194
6194
|
yellow: 16776960,
|
|
6195
6195
|
yellowgreen: 10145074
|
|
6196
|
-
},
|
|
6196
|
+
}, pr = { h: 0, s: 0, l: 0 }, Uc = { h: 0, s: 0, l: 0 };
|
|
6197
6197
|
function cd(n, e, t) {
|
|
6198
6198
|
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? n + (e - n) * 6 * t : t < 1 / 2 ? e : t < 2 / 3 ? n + (e - n) * 6 * (2 / 3 - t) : n;
|
|
6199
6199
|
}
|
|
@@ -6343,7 +6343,7 @@ class ut {
|
|
|
6343
6343
|
return e !== Hi ? `color(${e} ${t.toFixed(3)} ${i.toFixed(3)} ${s.toFixed(3)})` : `rgb(${Math.round(t * 255)},${Math.round(i * 255)},${Math.round(s * 255)})`;
|
|
6344
6344
|
}
|
|
6345
6345
|
offsetHSL(e, t, i) {
|
|
6346
|
-
return this.getHSL(
|
|
6346
|
+
return this.getHSL(pr), this.setHSL(pr.h + e, pr.s + t, pr.l + i);
|
|
6347
6347
|
}
|
|
6348
6348
|
add(e) {
|
|
6349
6349
|
return this.r += e.r, this.g += e.g, this.b += e.b, this;
|
|
@@ -6370,8 +6370,8 @@ class ut {
|
|
|
6370
6370
|
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;
|
|
6371
6371
|
}
|
|
6372
6372
|
lerpHSL(e, t) {
|
|
6373
|
-
this.getHSL(
|
|
6374
|
-
const i = zl(
|
|
6373
|
+
this.getHSL(pr), e.getHSL(Uc);
|
|
6374
|
+
const i = zl(pr.h, Uc.h, t), s = zl(pr.s, Uc.s, t), r = zl(pr.l, Uc.l, t);
|
|
6375
6375
|
return this.setHSL(i, s, r), this;
|
|
6376
6376
|
}
|
|
6377
6377
|
setFromVector3(e) {
|
|
@@ -6403,9 +6403,9 @@ class ut {
|
|
|
6403
6403
|
const gn = /* @__PURE__ */ new ut();
|
|
6404
6404
|
ut.NAMES = tx;
|
|
6405
6405
|
let l_ = 0;
|
|
6406
|
-
class $i extends
|
|
6406
|
+
class $i extends Xr {
|
|
6407
6407
|
constructor() {
|
|
6408
|
-
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: l_++ }), this.uuid = es(), this.name = "", this.type = "Material", this.blending = So, this.side = is, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = of, this.blendDst = lf, this.blendEquation =
|
|
6408
|
+
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: l_++ }), this.uuid = es(), this.name = "", this.type = "Material", this.blending = So, this.side = is, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = of, this.blendDst = lf, this.blendEquation = ra, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new ut(0, 0, 0), this.blendAlpha = 0, this.depthFunc = jl, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = jm, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Na, this.stencilZFail = Na, this.stencilZPass = Na, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
|
|
6409
6409
|
}
|
|
6410
6410
|
get alphaTest() {
|
|
6411
6411
|
return this._alphaTest;
|
|
@@ -6451,7 +6451,7 @@ class $i extends Fr {
|
|
|
6451
6451
|
generator: "Material.toJSON"
|
|
6452
6452
|
}
|
|
6453
6453
|
};
|
|
6454
|
-
i.uuid = this.uuid, i.type = this.type, this.name !== "" && (i.name = this.name), this.color && this.color.isColor && (i.color = this.color.getHex()), this.roughness !== void 0 && (i.roughness = this.roughness), this.metalness !== void 0 && (i.metalness = this.metalness), this.sheen !== void 0 && (i.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (i.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (i.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (i.emissive = this.emissive.getHex()), this.emissiveIntensity && this.emissiveIntensity !== 1 && (i.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (i.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (i.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (i.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (i.shininess = this.shininess), this.clearcoat !== void 0 && (i.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (i.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (i.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (i.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (i.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, i.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.iridescence !== void 0 && (i.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (i.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (i.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (i.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (i.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (i.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (i.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (i.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (i.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (i.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (i.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (i.lightMap = this.lightMap.toJSON(e).uuid, i.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (i.aoMap = this.aoMap.toJSON(e).uuid, i.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (i.bumpMap = this.bumpMap.toJSON(e).uuid, i.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (i.normalMap = this.normalMap.toJSON(e).uuid, i.normalMapType = this.normalMapType, i.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (i.displacementMap = this.displacementMap.toJSON(e).uuid, i.displacementScale = this.displacementScale, i.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (i.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (i.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (i.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (i.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (i.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (i.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (i.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (i.combine = this.combine)), this.envMapIntensity !== void 0 && (i.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (i.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (i.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (i.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (i.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (i.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (i.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (i.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (i.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (i.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (i.size = this.size), this.shadowSide !== null && (i.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (i.sizeAttenuation = this.sizeAttenuation), this.blending !== So && (i.blending = this.blending), this.side !== is && (i.side = this.side), this.vertexColors === !0 && (i.vertexColors = !0), this.opacity < 1 && (i.opacity = this.opacity), this.transparent === !0 && (i.transparent = !0), this.blendSrc !== of && (i.blendSrc = this.blendSrc), this.blendDst !== lf && (i.blendDst = this.blendDst), this.blendEquation !==
|
|
6454
|
+
i.uuid = this.uuid, i.type = this.type, this.name !== "" && (i.name = this.name), this.color && this.color.isColor && (i.color = this.color.getHex()), this.roughness !== void 0 && (i.roughness = this.roughness), this.metalness !== void 0 && (i.metalness = this.metalness), this.sheen !== void 0 && (i.sheen = this.sheen), this.sheenColor && this.sheenColor.isColor && (i.sheenColor = this.sheenColor.getHex()), this.sheenRoughness !== void 0 && (i.sheenRoughness = this.sheenRoughness), this.emissive && this.emissive.isColor && (i.emissive = this.emissive.getHex()), this.emissiveIntensity && this.emissiveIntensity !== 1 && (i.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (i.specular = this.specular.getHex()), this.specularIntensity !== void 0 && (i.specularIntensity = this.specularIntensity), this.specularColor && this.specularColor.isColor && (i.specularColor = this.specularColor.getHex()), this.shininess !== void 0 && (i.shininess = this.shininess), this.clearcoat !== void 0 && (i.clearcoat = this.clearcoat), this.clearcoatRoughness !== void 0 && (i.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatMap && this.clearcoatMap.isTexture && (i.clearcoatMap = this.clearcoatMap.toJSON(e).uuid), this.clearcoatRoughnessMap && this.clearcoatRoughnessMap.isTexture && (i.clearcoatRoughnessMap = this.clearcoatRoughnessMap.toJSON(e).uuid), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (i.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(e).uuid, i.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.iridescence !== void 0 && (i.iridescence = this.iridescence), this.iridescenceIOR !== void 0 && (i.iridescenceIOR = this.iridescenceIOR), this.iridescenceThicknessRange !== void 0 && (i.iridescenceThicknessRange = this.iridescenceThicknessRange), this.iridescenceMap && this.iridescenceMap.isTexture && (i.iridescenceMap = this.iridescenceMap.toJSON(e).uuid), this.iridescenceThicknessMap && this.iridescenceThicknessMap.isTexture && (i.iridescenceThicknessMap = this.iridescenceThicknessMap.toJSON(e).uuid), this.anisotropy !== void 0 && (i.anisotropy = this.anisotropy), this.anisotropyRotation !== void 0 && (i.anisotropyRotation = this.anisotropyRotation), this.anisotropyMap && this.anisotropyMap.isTexture && (i.anisotropyMap = this.anisotropyMap.toJSON(e).uuid), this.map && this.map.isTexture && (i.map = this.map.toJSON(e).uuid), this.matcap && this.matcap.isTexture && (i.matcap = this.matcap.toJSON(e).uuid), this.alphaMap && this.alphaMap.isTexture && (i.alphaMap = this.alphaMap.toJSON(e).uuid), this.lightMap && this.lightMap.isTexture && (i.lightMap = this.lightMap.toJSON(e).uuid, i.lightMapIntensity = this.lightMapIntensity), this.aoMap && this.aoMap.isTexture && (i.aoMap = this.aoMap.toJSON(e).uuid, i.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (i.bumpMap = this.bumpMap.toJSON(e).uuid, i.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (i.normalMap = this.normalMap.toJSON(e).uuid, i.normalMapType = this.normalMapType, i.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (i.displacementMap = this.displacementMap.toJSON(e).uuid, i.displacementScale = this.displacementScale, i.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (i.roughnessMap = this.roughnessMap.toJSON(e).uuid), this.metalnessMap && this.metalnessMap.isTexture && (i.metalnessMap = this.metalnessMap.toJSON(e).uuid), this.emissiveMap && this.emissiveMap.isTexture && (i.emissiveMap = this.emissiveMap.toJSON(e).uuid), this.specularMap && this.specularMap.isTexture && (i.specularMap = this.specularMap.toJSON(e).uuid), this.specularIntensityMap && this.specularIntensityMap.isTexture && (i.specularIntensityMap = this.specularIntensityMap.toJSON(e).uuid), this.specularColorMap && this.specularColorMap.isTexture && (i.specularColorMap = this.specularColorMap.toJSON(e).uuid), this.envMap && this.envMap.isTexture && (i.envMap = this.envMap.toJSON(e).uuid, this.combine !== void 0 && (i.combine = this.combine)), this.envMapIntensity !== void 0 && (i.envMapIntensity = this.envMapIntensity), this.reflectivity !== void 0 && (i.reflectivity = this.reflectivity), this.refractionRatio !== void 0 && (i.refractionRatio = this.refractionRatio), this.gradientMap && this.gradientMap.isTexture && (i.gradientMap = this.gradientMap.toJSON(e).uuid), this.transmission !== void 0 && (i.transmission = this.transmission), this.transmissionMap && this.transmissionMap.isTexture && (i.transmissionMap = this.transmissionMap.toJSON(e).uuid), this.thickness !== void 0 && (i.thickness = this.thickness), this.thicknessMap && this.thicknessMap.isTexture && (i.thicknessMap = this.thicknessMap.toJSON(e).uuid), this.attenuationDistance !== void 0 && this.attenuationDistance !== 1 / 0 && (i.attenuationDistance = this.attenuationDistance), this.attenuationColor !== void 0 && (i.attenuationColor = this.attenuationColor.getHex()), this.size !== void 0 && (i.size = this.size), this.shadowSide !== null && (i.shadowSide = this.shadowSide), this.sizeAttenuation !== void 0 && (i.sizeAttenuation = this.sizeAttenuation), this.blending !== So && (i.blending = this.blending), this.side !== is && (i.side = this.side), this.vertexColors === !0 && (i.vertexColors = !0), this.opacity < 1 && (i.opacity = this.opacity), this.transparent === !0 && (i.transparent = !0), this.blendSrc !== of && (i.blendSrc = this.blendSrc), this.blendDst !== lf && (i.blendDst = this.blendDst), this.blendEquation !== ra && (i.blendEquation = this.blendEquation), this.blendSrcAlpha !== null && (i.blendSrcAlpha = this.blendSrcAlpha), this.blendDstAlpha !== null && (i.blendDstAlpha = this.blendDstAlpha), this.blendEquationAlpha !== null && (i.blendEquationAlpha = this.blendEquationAlpha), this.blendColor && this.blendColor.isColor && (i.blendColor = this.blendColor.getHex()), this.blendAlpha !== 0 && (i.blendAlpha = this.blendAlpha), this.depthFunc !== jl && (i.depthFunc = this.depthFunc), this.depthTest === !1 && (i.depthTest = this.depthTest), this.depthWrite === !1 && (i.depthWrite = this.depthWrite), this.colorWrite === !1 && (i.colorWrite = this.colorWrite), this.stencilWriteMask !== 255 && (i.stencilWriteMask = this.stencilWriteMask), this.stencilFunc !== jm && (i.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (i.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (i.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== Na && (i.stencilFail = this.stencilFail), this.stencilZFail !== Na && (i.stencilZFail = this.stencilZFail), this.stencilZPass !== Na && (i.stencilZPass = this.stencilZPass), this.stencilWrite === !0 && (i.stencilWrite = this.stencilWrite), this.rotation !== void 0 && this.rotation !== 0 && (i.rotation = this.rotation), this.polygonOffset === !0 && (i.polygonOffset = !0), this.polygonOffsetFactor !== 0 && (i.polygonOffsetFactor = this.polygonOffsetFactor), this.polygonOffsetUnits !== 0 && (i.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth !== void 0 && this.linewidth !== 1 && (i.linewidth = this.linewidth), this.dashSize !== void 0 && (i.dashSize = this.dashSize), this.gapSize !== void 0 && (i.gapSize = this.gapSize), this.scale !== void 0 && (i.scale = this.scale), this.dithering === !0 && (i.dithering = !0), this.alphaTest > 0 && (i.alphaTest = this.alphaTest), this.alphaHash === !0 && (i.alphaHash = !0), this.alphaToCoverage === !0 && (i.alphaToCoverage = !0), this.premultipliedAlpha === !0 && (i.premultipliedAlpha = !0), this.forceSinglePass === !0 && (i.forceSinglePass = !0), this.wireframe === !0 && (i.wireframe = !0), this.wireframeLinewidth > 1 && (i.wireframeLinewidth = this.wireframeLinewidth), this.wireframeLinecap !== "round" && (i.wireframeLinecap = this.wireframeLinecap), this.wireframeLinejoin !== "round" && (i.wireframeLinejoin = this.wireframeLinejoin), this.flatShading === !0 && (i.flatShading = !0), this.visible === !1 && (i.visible = !1), this.toneMapped === !1 && (i.toneMapped = !1), this.fog === !1 && (i.fog = !1), Object.keys(this.userData).length > 0 && (i.userData = this.userData);
|
|
6455
6455
|
function s(r) {
|
|
6456
6456
|
const a = [];
|
|
6457
6457
|
for (const l in r) {
|
|
@@ -6641,7 +6641,7 @@ class Lt extends Zt {
|
|
|
6641
6641
|
}
|
|
6642
6642
|
let h_ = 0;
|
|
6643
6643
|
const Zn = /* @__PURE__ */ new nt(), hd = /* @__PURE__ */ new oi(), Ya = /* @__PURE__ */ new G(), Fn = /* @__PURE__ */ new di(), hl = /* @__PURE__ */ new di(), nn = /* @__PURE__ */ new G();
|
|
6644
|
-
class Xt extends
|
|
6644
|
+
class Xt extends Xr {
|
|
6645
6645
|
constructor() {
|
|
6646
6646
|
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: h_++ }), this.uuid = es(), this.name = "", this.type = "BufferGeometry", this.index = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
|
|
6647
6647
|
}
|
|
@@ -6952,7 +6952,7 @@ class Xt extends Fr {
|
|
|
6952
6952
|
this.dispatchEvent({ type: "dispose" });
|
|
6953
6953
|
}
|
|
6954
6954
|
}
|
|
6955
|
-
const cg = /* @__PURE__ */ new nt(),
|
|
6955
|
+
const cg = /* @__PURE__ */ new nt(), Kr = /* @__PURE__ */ new Xo(), Fc = /* @__PURE__ */ new Qi(), hg = /* @__PURE__ */ new G(), Ga = /* @__PURE__ */ new G(), Wa = /* @__PURE__ */ new G(), Qa = /* @__PURE__ */ new G(), ud = /* @__PURE__ */ new G(), Xc = /* @__PURE__ */ new G(), Vc = /* @__PURE__ */ new Se(), Hc = /* @__PURE__ */ new Se(), Yc = /* @__PURE__ */ new Se(), ug = /* @__PURE__ */ new G(), dg = /* @__PURE__ */ new G(), fg = /* @__PURE__ */ new G(), Gc = /* @__PURE__ */ new G(), Wc = /* @__PURE__ */ new G();
|
|
6956
6956
|
class fe extends oi {
|
|
6957
6957
|
constructor(e = new Xt(), t = new Ln()) {
|
|
6958
6958
|
super(), this.isMesh = !0, this.type = "Mesh", this.geometry = e, this.material = t, this.updateMorphTargets();
|
|
@@ -6989,7 +6989,7 @@ class fe extends oi {
|
|
|
6989
6989
|
}
|
|
6990
6990
|
raycast(e, t) {
|
|
6991
6991
|
const i = this.geometry, s = this.material, r = this.matrixWorld;
|
|
6992
|
-
s !== void 0 && (i.boundingSphere === null && i.computeBoundingSphere(), Fc.copy(i.boundingSphere), Fc.applyMatrix4(r),
|
|
6992
|
+
s !== void 0 && (i.boundingSphere === null && i.computeBoundingSphere(), Fc.copy(i.boundingSphere), Fc.applyMatrix4(r), Kr.copy(e.ray).recast(e.near), !(Fc.containsPoint(Kr.origin) === !1 && (Kr.intersectSphere(Fc, hg) === null || Kr.origin.distanceToSquared(hg) > (e.far - e.near) ** 2)) && (cg.copy(r).invert(), Kr.copy(e.ray).applyMatrix4(cg), !(i.boundingBox !== null && Kr.intersectsBox(i.boundingBox) === !1) && this._computeIntersections(e, t, Kr)));
|
|
6993
6993
|
}
|
|
6994
6994
|
_computeIntersections(e, t, i) {
|
|
6995
6995
|
let s;
|
|
@@ -7195,7 +7195,7 @@ class Ci extends $i {
|
|
|
7195
7195
|
}
|
|
7196
7196
|
class lu extends oi {
|
|
7197
7197
|
constructor() {
|
|
7198
|
-
super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new nt(), this.projectionMatrix = new nt(), this.projectionMatrixInverse = new nt(), this.coordinateSystem =
|
|
7198
|
+
super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new nt(), this.projectionMatrix = new nt(), this.projectionMatrixInverse = new nt(), this.coordinateSystem = ir;
|
|
7199
7199
|
}
|
|
7200
7200
|
copy(e, t) {
|
|
7201
7201
|
return super.copy(e, t), this.matrixWorldInverse.copy(e.matrixWorldInverse), this.projectionMatrix.copy(e.projectionMatrix), this.projectionMatrixInverse.copy(e.projectionMatrixInverse), this.coordinateSystem = e.coordinateSystem, this;
|
|
@@ -7213,7 +7213,7 @@ class lu extends oi {
|
|
|
7213
7213
|
return new this.constructor().copy(this);
|
|
7214
7214
|
}
|
|
7215
7215
|
}
|
|
7216
|
-
const
|
|
7216
|
+
const mr = /* @__PURE__ */ new G(), pg = /* @__PURE__ */ new Se(), mg = /* @__PURE__ */ new Se();
|
|
7217
7217
|
class un extends lu {
|
|
7218
7218
|
constructor(e = 50, t = 1, i = 0.1, s = 2e3) {
|
|
7219
7219
|
super(), this.isPerspectiveCamera = !0, this.type = "PerspectiveCamera", this.fov = e, this.zoom = 1, this.near = i, this.far = s, this.focus = 10, this.aspect = t, this.view = null, this.filmGauge = 35, this.filmOffset = 0, this.updateProjectionMatrix();
|
|
@@ -7256,7 +7256,7 @@ class un extends lu {
|
|
|
7256
7256
|
* Sets minTarget and maxTarget to the coordinates of the lower-left and upper-right corners of the view rectangle.
|
|
7257
7257
|
*/
|
|
7258
7258
|
getViewBounds(e, t, i) {
|
|
7259
|
-
|
|
7259
|
+
mr.set(-1, -1, 0.5).applyMatrix4(this.projectionMatrixInverse), t.set(mr.x, mr.y).multiplyScalar(-e / mr.z), mr.set(1, 1, 0.5).applyMatrix4(this.projectionMatrixInverse), i.set(mr.x, mr.y).multiplyScalar(-e / mr.z);
|
|
7260
7260
|
}
|
|
7261
7261
|
/**
|
|
7262
7262
|
* Computes the width and height of the camera's viewable rectangle at a given distance along the viewing direction.
|
|
@@ -7351,7 +7351,7 @@ let m_ = class extends oi {
|
|
|
7351
7351
|
const e = this.coordinateSystem, t = this.children.concat(), [i, s, r, a, l, h] = t;
|
|
7352
7352
|
for (const u of t)
|
|
7353
7353
|
this.remove(u);
|
|
7354
|
-
if (e ===
|
|
7354
|
+
if (e === ir)
|
|
7355
7355
|
i.up.set(0, 1, 0), i.lookAt(1, 0, 0), s.up.set(0, 1, 0), s.lookAt(-1, 0, 0), r.up.set(0, 0, -1), r.lookAt(0, 1, 0), a.up.set(0, 0, 1), a.lookAt(0, -1, 0), l.up.set(0, 1, 0), l.lookAt(0, 0, 1), h.up.set(0, 1, 0), h.lookAt(0, 0, -1);
|
|
7356
7356
|
else if (e === $h)
|
|
7357
7357
|
i.up.set(0, -1, 0), i.lookAt(-1, 0, 0), s.up.set(0, -1, 0), s.lookAt(1, 0, 0), r.up.set(0, 0, 1), r.lookAt(0, 1, 0), a.up.set(0, 0, -1), a.lookAt(0, -1, 0), l.up.set(0, -1, 0), l.lookAt(0, 0, 1), h.up.set(0, -1, 0), h.lookAt(0, 0, -1);
|
|
@@ -7456,7 +7456,7 @@ class g_ extends wn {
|
|
|
7456
7456
|
}
|
|
7457
7457
|
}
|
|
7458
7458
|
const dd = /* @__PURE__ */ new G(), y_ = /* @__PURE__ */ new G(), x_ = /* @__PURE__ */ new qt();
|
|
7459
|
-
class
|
|
7459
|
+
class er {
|
|
7460
7460
|
constructor(e = new G(1, 0, 0), t = 0) {
|
|
7461
7461
|
this.isPlane = !0, this.normal = e, this.constant = t;
|
|
7462
7462
|
}
|
|
@@ -7526,9 +7526,9 @@ class Js {
|
|
|
7526
7526
|
return new this.constructor().copy(this);
|
|
7527
7527
|
}
|
|
7528
7528
|
}
|
|
7529
|
-
const
|
|
7529
|
+
const $r = /* @__PURE__ */ new Qi(), qc = /* @__PURE__ */ new G();
|
|
7530
7530
|
class cc {
|
|
7531
|
-
constructor(e = new
|
|
7531
|
+
constructor(e = new er(), t = new er(), i = new er(), s = new er(), r = new er(), a = new er()) {
|
|
7532
7532
|
this.planes = [e, t, i, s, r, a];
|
|
7533
7533
|
}
|
|
7534
7534
|
set(e, t, i, s, r, a) {
|
|
@@ -7541,9 +7541,9 @@ class cc {
|
|
|
7541
7541
|
t[i].copy(e.planes[i]);
|
|
7542
7542
|
return this;
|
|
7543
7543
|
}
|
|
7544
|
-
setFromProjectionMatrix(e, t =
|
|
7544
|
+
setFromProjectionMatrix(e, t = ir) {
|
|
7545
7545
|
const i = this.planes, s = e.elements, r = s[0], a = s[1], l = s[2], h = s[3], u = s[4], f = s[5], p = s[6], g = s[7], x = s[8], w = s[9], E = s[10], b = s[11], v = s[12], C = s[13], T = s[14], S = s[15];
|
|
7546
|
-
if (i[0].setComponents(h - r, g - u, b - x, S - v).normalize(), i[1].setComponents(h + r, g + u, b + x, S + v).normalize(), i[2].setComponents(h + a, g + f, b + w, S + C).normalize(), i[3].setComponents(h - a, g - f, b - w, S - C).normalize(), i[4].setComponents(h - l, g - p, b - E, S - T).normalize(), t ===
|
|
7546
|
+
if (i[0].setComponents(h - r, g - u, b - x, S - v).normalize(), i[1].setComponents(h + r, g + u, b + x, S + v).normalize(), i[2].setComponents(h + a, g + f, b + w, S + C).normalize(), i[3].setComponents(h - a, g - f, b - w, S - C).normalize(), i[4].setComponents(h - l, g - p, b - E, S - T).normalize(), t === ir)
|
|
7547
7547
|
i[5].setComponents(h + l, g + p, b + E, S + T).normalize();
|
|
7548
7548
|
else if (t === $h)
|
|
7549
7549
|
i[5].setComponents(l, p, E, T).normalize();
|
|
@@ -7553,15 +7553,15 @@ class cc {
|
|
|
7553
7553
|
}
|
|
7554
7554
|
intersectsObject(e) {
|
|
7555
7555
|
if (e.boundingSphere !== void 0)
|
|
7556
|
-
e.boundingSphere === null && e.computeBoundingSphere(),
|
|
7556
|
+
e.boundingSphere === null && e.computeBoundingSphere(), $r.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);
|
|
7557
7557
|
else {
|
|
7558
7558
|
const t = e.geometry;
|
|
7559
|
-
t.boundingSphere === null && t.computeBoundingSphere(),
|
|
7559
|
+
t.boundingSphere === null && t.computeBoundingSphere(), $r.copy(t.boundingSphere).applyMatrix4(e.matrixWorld);
|
|
7560
7560
|
}
|
|
7561
|
-
return this.intersectsSphere(
|
|
7561
|
+
return this.intersectsSphere($r);
|
|
7562
7562
|
}
|
|
7563
7563
|
intersectsSprite(e) {
|
|
7564
|
-
return
|
|
7564
|
+
return $r.center.set(0, 0, 0), $r.radius = 0.7071067811865476, $r.applyMatrix4(e.matrixWorld), this.intersectsSphere($r);
|
|
7565
7565
|
}
|
|
7566
7566
|
intersectsSphere(e) {
|
|
7567
7567
|
const t = this.planes, i = e.center, s = -e.radius;
|
|
@@ -12163,7 +12163,7 @@ function iA(n, e, t) {
|
|
|
12163
12163
|
function nA(n) {
|
|
12164
12164
|
const e = this;
|
|
12165
12165
|
let t = null, i = 0, s = !1, r = !1;
|
|
12166
|
-
const a = new
|
|
12166
|
+
const a = new er(), l = new qt(), h = { value: null, needsUpdate: !1 };
|
|
12167
12167
|
this.uniform = h, this.numPlanes = 0, this.numIntersection = 0, this.init = function(p, g) {
|
|
12168
12168
|
const x = p.length !== 0 || g || // enable state of previous frame - the clipping code has to
|
|
12169
12169
|
// run another frame in order to reset the state:
|
|
@@ -12278,19 +12278,19 @@ class Ho extends lu {
|
|
|
12278
12278
|
return t.object.zoom = this.zoom, t.object.left = this.left, t.object.right = this.right, t.object.top = this.top, t.object.bottom = this.bottom, t.object.near = this.near, t.object.far = this.far, this.view !== null && (t.object.view = Object.assign({}, this.view)), t;
|
|
12279
12279
|
}
|
|
12280
12280
|
}
|
|
12281
|
-
const yo = 4, gg = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582],
|
|
12281
|
+
const yo = 4, gg = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], oa = 20, fd = /* @__PURE__ */ new Ho(), yg = /* @__PURE__ */ new ut();
|
|
12282
12282
|
let pd = null, md = 0, gd = 0;
|
|
12283
|
-
const
|
|
12283
|
+
const ia = (1 + Math.sqrt(5)) / 2, ja = 1 / ia, xg = [
|
|
12284
12284
|
/* @__PURE__ */ new G(1, 1, 1),
|
|
12285
12285
|
/* @__PURE__ */ new G(-1, 1, 1),
|
|
12286
12286
|
/* @__PURE__ */ new G(1, 1, -1),
|
|
12287
12287
|
/* @__PURE__ */ new G(-1, 1, -1),
|
|
12288
|
-
/* @__PURE__ */ new G(0,
|
|
12289
|
-
/* @__PURE__ */ new G(0,
|
|
12290
|
-
/* @__PURE__ */ new G(ja, 0,
|
|
12291
|
-
/* @__PURE__ */ new G(-ja, 0,
|
|
12292
|
-
/* @__PURE__ */ new G(
|
|
12293
|
-
/* @__PURE__ */ new G(-
|
|
12288
|
+
/* @__PURE__ */ new G(0, ia, ja),
|
|
12289
|
+
/* @__PURE__ */ new G(0, ia, -ja),
|
|
12290
|
+
/* @__PURE__ */ new G(ja, 0, ia),
|
|
12291
|
+
/* @__PURE__ */ new G(-ja, 0, ia),
|
|
12292
|
+
/* @__PURE__ */ new G(ia, ja, 0),
|
|
12293
|
+
/* @__PURE__ */ new G(-ia, ja, 0)
|
|
12294
12294
|
];
|
|
12295
12295
|
class vg {
|
|
12296
12296
|
constructor(e) {
|
|
@@ -12368,7 +12368,7 @@ class vg {
|
|
|
12368
12368
|
magFilter: Di,
|
|
12369
12369
|
minFilter: Di,
|
|
12370
12370
|
generateMipmaps: !1,
|
|
12371
|
-
type:
|
|
12371
|
+
type: ar,
|
|
12372
12372
|
format: An,
|
|
12373
12373
|
colorSpace: on,
|
|
12374
12374
|
depthBuffer: !1
|
|
@@ -12386,7 +12386,7 @@ class vg {
|
|
|
12386
12386
|
}
|
|
12387
12387
|
_sceneToCubeUV(e, t, i, s) {
|
|
12388
12388
|
const l = new un(90, 1, t, i), h = [1, -1, 1, 1, 1, 1], u = [1, 1, 1, -1, -1, -1], f = this._renderer, p = f.autoClear, g = f.toneMapping;
|
|
12389
|
-
f.getClearColor(yg), f.toneMapping =
|
|
12389
|
+
f.getClearColor(yg), f.toneMapping = Ir, f.autoClear = !1;
|
|
12390
12390
|
const x = new Ln({
|
|
12391
12391
|
name: "PMREM.Background",
|
|
12392
12392
|
side: ji,
|
|
@@ -12453,11 +12453,11 @@ class vg {
|
|
|
12453
12453
|
a !== "latitudinal" && a !== "longitudinal" && console.error(
|
|
12454
12454
|
"blur direction must be either latitudinal or longitudinal!"
|
|
12455
12455
|
);
|
|
12456
|
-
const f = 3, p = new fe(this._lodPlanes[s], u), g = u.uniforms, x = this._sizeLods[i] - 1, w = isFinite(r) ? Math.PI / (2 * x) : 2 * Math.PI / (2 *
|
|
12457
|
-
b >
|
|
12456
|
+
const f = 3, p = new fe(this._lodPlanes[s], u), g = u.uniforms, x = this._sizeLods[i] - 1, w = isFinite(r) ? Math.PI / (2 * x) : 2 * Math.PI / (2 * oa - 1), E = r / w, b = isFinite(r) ? 1 + Math.floor(f * E) : oa;
|
|
12457
|
+
b > oa && console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${oa}`);
|
|
12458
12458
|
const v = [];
|
|
12459
12459
|
let C = 0;
|
|
12460
|
-
for (let F = 0; F <
|
|
12460
|
+
for (let F = 0; F < oa; ++F) {
|
|
12461
12461
|
const Q = F / E, $ = Math.exp(-Q * Q / 2);
|
|
12462
12462
|
v.push($), F === 0 ? C += $ : F < b && (C += 2 * $);
|
|
12463
12463
|
}
|
|
@@ -12518,11 +12518,11 @@ function jc(n, e, t, i, s) {
|
|
|
12518
12518
|
n.viewport.set(e, t, i, s), n.scissor.set(e, t, i, s);
|
|
12519
12519
|
}
|
|
12520
12520
|
function aA(n, e, t) {
|
|
12521
|
-
const i = new Float32Array(
|
|
12521
|
+
const i = new Float32Array(oa), s = new G(0, 1, 0);
|
|
12522
12522
|
return new Ci({
|
|
12523
12523
|
name: "SphericalGaussianBlur",
|
|
12524
12524
|
defines: {
|
|
12525
|
-
n:
|
|
12525
|
+
n: oa,
|
|
12526
12526
|
CUBEUV_TEXEL_WIDTH: 1 / e,
|
|
12527
12527
|
CUBEUV_TEXEL_HEIGHT: 1 / t,
|
|
12528
12528
|
CUBEUV_MAX_MIP: `${n}.0`
|
|
@@ -13076,9 +13076,9 @@ function mA(n, e, t, i) {
|
|
|
13076
13076
|
}
|
|
13077
13077
|
class jf extends Oi {
|
|
13078
13078
|
constructor(e, t, i, s, r, a, l, h, u, f) {
|
|
13079
|
-
if (f = f !== void 0 ? f :
|
|
13079
|
+
if (f = f !== void 0 ? f : Or, f !== Or && f !== Lo)
|
|
13080
13080
|
throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
|
|
13081
|
-
i === void 0 && f ===
|
|
13081
|
+
i === void 0 && f === Or && (i = tr), i === void 0 && f === Lo && (i = da), super(null, s, r, a, l, h, f, i, u), this.isDepthTexture = !0, this.image = { width: e, height: t }, this.magFilter = l !== void 0 ? l : mi, this.minFilter = h !== void 0 ? h : mi, this.flipY = !1, this.generateMipmaps = !1, this.compareFunction = null;
|
|
13082
13082
|
}
|
|
13083
13083
|
copy(e) {
|
|
13084
13084
|
return super.copy(e), this.compareFunction = e.compareFunction, this;
|
|
@@ -14012,10 +14012,10 @@ function TT(n, e, t, i) {
|
|
|
14012
14012
|
"uniform mat4 viewMatrix;",
|
|
14013
14013
|
"uniform vec3 cameraPosition;",
|
|
14014
14014
|
"uniform bool isOrthographic;",
|
|
14015
|
-
t.toneMapping !==
|
|
14016
|
-
t.toneMapping !==
|
|
14015
|
+
t.toneMapping !== Ir ? "#define TONE_MAPPING" : "",
|
|
14016
|
+
t.toneMapping !== Ir ? Wt.tonemapping_pars_fragment : "",
|
|
14017
14017
|
// this code is required here because it is used by the toneMapping() function defined below
|
|
14018
|
-
t.toneMapping !==
|
|
14018
|
+
t.toneMapping !== Ir ? uT("toneMapping", t.toneMapping) : "",
|
|
14019
14019
|
t.dithering ? "#define DITHERING" : "",
|
|
14020
14020
|
t.opaque ? "#define OPAQUE" : "",
|
|
14021
14021
|
Wt.colorspace_pars_fragment,
|
|
@@ -14182,7 +14182,7 @@ function RT(n, e, t, i, s, r, a) {
|
|
|
14182
14182
|
} else
|
|
14183
14183
|
be = O.vertexShader, we = O.fragmentShader, h.update(O), qe = h.getVertexShaderID(O), We = h.getFragmentShaderID(O);
|
|
14184
14184
|
const at = n.getRenderTarget(), Ke = J.isInstancedMesh === !0, Et = J.isBatchedMesh === !0, yt = !!O.map, ae = !!O.matcap, Oe = !!me, Me = !!O.aoMap, He = !!O.lightMap, Ee = !!O.bumpMap, st = !!O.normalMap, je = !!O.displacementMap, q = !!O.emissiveMap, W = !!O.metalnessMap, V = !!O.roughnessMap, ze = O.anisotropy > 0, Ne = O.clearcoat > 0, Ae = O.iridescence > 0, Le = O.sheen > 0, Xe = O.transmission > 0, Ye = ze && !!O.anisotropyMap, ot = Ne && !!O.clearcoatMap, wt = Ne && !!O.clearcoatNormalMap, Re = Ne && !!O.clearcoatRoughnessMap, At = Ae && !!O.iridescenceMap, dt = Ae && !!O.iridescenceThicknessMap, mt = Le && !!O.sheenColorMap, rt = Le && !!O.sheenRoughnessMap, $e = !!O.specularMap, St = !!O.specularColorMap, Ct = !!O.specularIntensityMap, Gt = Xe && !!O.transmissionMap, Pt = Xe && !!O.thicknessMap, xt = !!O.gradientMap, ie = !!O.alphaMap, Ve = O.alphaTest > 0, Ue = !!O.alphaHash, Je = !!O.extensions;
|
|
14185
|
-
let ft =
|
|
14185
|
+
let ft = Ir;
|
|
14186
14186
|
O.toneMapped && (at === null || at.isXRRenderTarget === !0) && (ft = n.toneMapping);
|
|
14187
14187
|
const Tt = {
|
|
14188
14188
|
isWebGL2: p,
|
|
@@ -15040,7 +15040,7 @@ function HT(n, e, t) {
|
|
|
15040
15040
|
return b !== ie ? (n.useProgram(ie), b = ie, !0) : !1;
|
|
15041
15041
|
}
|
|
15042
15042
|
const Me = {
|
|
15043
|
-
[
|
|
15043
|
+
[ra]: n.FUNC_ADD,
|
|
15044
15044
|
[Ow]: n.FUNC_SUBTRACT,
|
|
15045
15045
|
[Nw]: n.FUNC_REVERSE_SUBTRACT
|
|
15046
15046
|
};
|
|
@@ -15074,7 +15074,7 @@ function HT(n, e, t) {
|
|
|
15074
15074
|
}
|
|
15075
15075
|
if (v === !1 && (Ke(n.BLEND), v = !0), ie !== Dw) {
|
|
15076
15076
|
if (ie !== C || ti !== k) {
|
|
15077
|
-
if ((T !==
|
|
15077
|
+
if ((T !== ra || z !== ra) && (n.blendEquation(n.FUNC_ADD), T = ra, z = ra), ti)
|
|
15078
15078
|
switch (ie) {
|
|
15079
15079
|
case So:
|
|
15080
15080
|
n.blendFuncSeparate(n.ONE, n.ONE_MINUS_SRC_ALPHA, n.ONE, n.ONE_MINUS_SRC_ALPHA);
|
|
@@ -15335,7 +15335,7 @@ function YT(n, e, t, i, s, r, a) {
|
|
|
15335
15335
|
return C(q, V) === !0 || q.isFramebufferTexture && q.minFilter !== mi && q.minFilter !== Di ? Math.log2(Math.max(W.width, W.height)) + 1 : q.mipmaps !== void 0 && q.mipmaps.length > 0 ? q.mipmaps.length : q.isCompressedTexture && Array.isArray(q.image) ? W.mipmaps.length : 1;
|
|
15336
15336
|
}
|
|
15337
15337
|
function z(q) {
|
|
15338
|
-
return q === mi || q === Qh || q ===
|
|
15338
|
+
return q === mi || q === Qh || q === aa ? n.NEAREST : n.LINEAR;
|
|
15339
15339
|
}
|
|
15340
15340
|
function F(q) {
|
|
15341
15341
|
const W = q.target;
|
|
@@ -15443,13 +15443,13 @@ function YT(n, e, t, i, s, r, a) {
|
|
|
15443
15443
|
t.bindTexture(n.TEXTURE_CUBE_MAP, V.__webglTexture, n.TEXTURE0 + W);
|
|
15444
15444
|
}
|
|
15445
15445
|
const Ie = {
|
|
15446
|
-
[
|
|
15446
|
+
[rr]: n.REPEAT,
|
|
15447
15447
|
[Hn]: n.CLAMP_TO_EDGE,
|
|
15448
15448
|
[Kl]: n.MIRRORED_REPEAT
|
|
15449
15449
|
}, De = {
|
|
15450
15450
|
[mi]: n.NEAREST,
|
|
15451
15451
|
[Qh]: n.NEAREST_MIPMAP_NEAREST,
|
|
15452
|
-
[
|
|
15452
|
+
[aa]: n.NEAREST_MIPMAP_LINEAR,
|
|
15453
15453
|
[Di]: n.LINEAR,
|
|
15454
15454
|
[Bl]: n.LINEAR_MIPMAP_NEAREST,
|
|
15455
15455
|
[bs]: n.LINEAR_MIPMAP_LINEAR
|
|
@@ -15464,9 +15464,9 @@ function YT(n, e, t, i, s, r, a) {
|
|
|
15464
15464
|
[C1]: n.NOTEQUAL
|
|
15465
15465
|
};
|
|
15466
15466
|
function Fe(q, W, V) {
|
|
15467
|
-
if (W.type === Jn && e.has("OES_texture_float_linear") === !1 && (W.magFilter === Di || W.magFilter === Bl || W.magFilter ===
|
|
15467
|
+
if (W.type === Jn && e.has("OES_texture_float_linear") === !1 && (W.magFilter === Di || W.magFilter === Bl || W.magFilter === aa || W.magFilter === bs || W.minFilter === Di || W.minFilter === Bl || W.minFilter === aa || W.minFilter === bs) && console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), V ? (n.texParameteri(q, n.TEXTURE_WRAP_S, Ie[W.wrapS]), n.texParameteri(q, n.TEXTURE_WRAP_T, Ie[W.wrapT]), (q === n.TEXTURE_3D || q === n.TEXTURE_2D_ARRAY) && n.texParameteri(q, n.TEXTURE_WRAP_R, Ie[W.wrapR]), n.texParameteri(q, n.TEXTURE_MAG_FILTER, De[W.magFilter]), n.texParameteri(q, n.TEXTURE_MIN_FILTER, De[W.minFilter])) : (n.texParameteri(q, n.TEXTURE_WRAP_S, n.CLAMP_TO_EDGE), n.texParameteri(q, n.TEXTURE_WRAP_T, n.CLAMP_TO_EDGE), (q === n.TEXTURE_3D || q === n.TEXTURE_2D_ARRAY) && n.texParameteri(q, n.TEXTURE_WRAP_R, n.CLAMP_TO_EDGE), (W.wrapS !== Hn || W.wrapT !== Hn) && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."), n.texParameteri(q, n.TEXTURE_MAG_FILTER, z(W.magFilter)), n.texParameteri(q, n.TEXTURE_MIN_FILTER, z(W.minFilter)), W.minFilter !== mi && W.minFilter !== Di && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")), W.compareFunction && (n.texParameteri(q, n.TEXTURE_COMPARE_MODE, n.COMPARE_REF_TO_TEXTURE), n.texParameteri(q, n.TEXTURE_COMPARE_FUNC, _e[W.compareFunction])), e.has("EXT_texture_filter_anisotropic") === !0) {
|
|
15468
15468
|
const ze = e.get("EXT_texture_filter_anisotropic");
|
|
15469
|
-
if (W.magFilter === mi || W.minFilter !==
|
|
15469
|
+
if (W.magFilter === mi || W.minFilter !== aa && W.minFilter !== bs || W.type === Jn && e.has("OES_texture_float_linear") === !1 || l === !1 && W.type === ar && e.has("OES_texture_half_float_linear") === !1)
|
|
15470
15470
|
return;
|
|
15471
15471
|
(W.anisotropy > 1 || i.get(W).__currentAnisotropy) && (n.texParameterf(q, ze.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(W.anisotropy, s.getMaxAnisotropy())), i.get(W).__currentAnisotropy = W.anisotropy);
|
|
15472
15472
|
}
|
|
@@ -15507,7 +15507,7 @@ function YT(n, e, t, i, s, r, a) {
|
|
|
15507
15507
|
let $e;
|
|
15508
15508
|
const St = W.mipmaps, Ct = l && W.isVideoTexture !== !0 && rt !== Qy, Gt = Le.__version === void 0 || Ne === !0, Pt = Ae.dataReady, xt = B(W, Re, At);
|
|
15509
15509
|
if (W.isDepthTexture)
|
|
15510
|
-
rt = n.DEPTH_COMPONENT, l ? W.type === Jn ? rt = n.DEPTH_COMPONENT32F : W.type ===
|
|
15510
|
+
rt = n.DEPTH_COMPONENT, l ? W.type === Jn ? rt = n.DEPTH_COMPONENT32F : W.type === tr ? rt = n.DEPTH_COMPONENT24 : W.type === da ? rt = n.DEPTH24_STENCIL8 : rt = n.DEPTH_COMPONENT16 : W.type === Jn && console.error("WebGLRenderer: Floating point depth texture requires WebGL2."), W.format === Or && rt === n.DEPTH_COMPONENT && W.type !== Vf && W.type !== tr && (console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."), W.type = tr, mt = r.convert(W.type)), W.format === Lo && rt === n.DEPTH_COMPONENT && (rt = n.DEPTH_STENCIL, W.type !== da && (console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."), W.type = da, mt = r.convert(W.type))), Gt && (Ct ? t.texStorage2D(n.TEXTURE_2D, 1, rt, Re.width, Re.height) : t.texImage2D(n.TEXTURE_2D, 0, rt, Re.width, Re.height, 0, dt, mt, null));
|
|
15511
15511
|
else if (W.isDataTexture)
|
|
15512
15512
|
if (St.length > 0 && At) {
|
|
15513
15513
|
Ct && Gt && t.texStorage2D(n.TEXTURE_2D, xt, rt, St[0].width, St[0].height);
|
|
@@ -15610,7 +15610,7 @@ function YT(n, e, t, i, s, r, a) {
|
|
|
15610
15610
|
let ze = l === !0 ? n.DEPTH_COMPONENT24 : n.DEPTH_COMPONENT16;
|
|
15611
15611
|
if (V || Ee(W)) {
|
|
15612
15612
|
const Ne = W.depthTexture;
|
|
15613
|
-
Ne && Ne.isDepthTexture && (Ne.type === Jn ? ze = n.DEPTH_COMPONENT32F : Ne.type ===
|
|
15613
|
+
Ne && Ne.isDepthTexture && (Ne.type === Jn ? ze = n.DEPTH_COMPONENT32F : Ne.type === tr && (ze = n.DEPTH_COMPONENT24));
|
|
15614
15614
|
const Ae = He(W);
|
|
15615
15615
|
Ee(W) ? h.renderbufferStorageMultisampleEXT(n.RENDERBUFFER, Ae, ze, W.width, W.height) : n.renderbufferStorageMultisample(n.RENDERBUFFER, Ae, ze, W.width, W.height);
|
|
15616
15616
|
} else
|
|
@@ -15635,7 +15635,7 @@ function YT(n, e, t, i, s, r, a) {
|
|
|
15635
15635
|
throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");
|
|
15636
15636
|
(!i.get(W.depthTexture).__webglTexture || W.depthTexture.image.width !== W.width || W.depthTexture.image.height !== W.height) && (W.depthTexture.image.width = W.width, W.depthTexture.image.height = W.height, W.depthTexture.needsUpdate = !0), de(W.depthTexture, 0);
|
|
15637
15637
|
const ze = i.get(W.depthTexture).__webglTexture, Ne = He(W);
|
|
15638
|
-
if (W.depthTexture.format ===
|
|
15638
|
+
if (W.depthTexture.format === Or)
|
|
15639
15639
|
Ee(W) ? h.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER, n.DEPTH_ATTACHMENT, n.TEXTURE_2D, ze, 0, Ne) : n.framebufferTexture2D(n.FRAMEBUFFER, n.DEPTH_ATTACHMENT, n.TEXTURE_2D, ze, 0);
|
|
15640
15640
|
else if (W.depthTexture.format === Lo)
|
|
15641
15641
|
Ee(W) ? h.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER, n.DEPTH_STENCIL_ATTACHMENT, n.TEXTURE_2D, ze, 0, Ne) : n.framebufferTexture2D(n.FRAMEBUFFER, n.DEPTH_STENCIL_ATTACHMENT, n.TEXTURE_2D, ze, 0);
|
|
@@ -15778,7 +15778,7 @@ function YT(n, e, t, i, s, r, a) {
|
|
|
15778
15778
|
}
|
|
15779
15779
|
function je(q, W) {
|
|
15780
15780
|
const V = q.colorSpace, ze = q.format, Ne = q.type;
|
|
15781
|
-
return q.isCompressedTexture === !0 || q.isVideoTexture === !0 || q.format === df || V !== on && V !== Yn && (ui.getTransfer(V) === Ei ? l === !1 ? e.has("EXT_sRGB") === !0 && ze === An ? (q.format = df, q.minFilter = Di, q.generateMipmaps = !1) : W = Jy.sRGBToLinear(W) : (ze !== An || Ne !==
|
|
15781
|
+
return q.isCompressedTexture === !0 || q.isVideoTexture === !0 || q.format === df || V !== on && V !== Yn && (ui.getTransfer(V) === Ei ? l === !1 ? e.has("EXT_sRGB") === !0 && ze === An ? (q.format = df, q.minFilter = Di, q.generateMipmaps = !1) : W = Jy.sRGBToLinear(W) : (ze !== An || Ne !== Dr) && console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : console.error("THREE.WebGLTextures: Unsupported texture color space:", V)), W;
|
|
15782
15782
|
}
|
|
15783
15783
|
this.allocateTextureUnit = J, this.resetTextureUnits = he, this.setTexture2D = de, this.setTexture2DArray = xe, this.setTexture3D = me, this.setTextureCube = ge, this.rebindTextures = yt, this.setupRenderTarget = ae, this.updateRenderTargetMipmap = Oe, this.updateMultisampleRenderTarget = Me, this.setupDepthRenderbuffer = Et, this.setupFrameBufferTexture = We, this.useMultisampledRTT = Ee;
|
|
15784
15784
|
}
|
|
@@ -15787,7 +15787,7 @@ function GT(n, e, t) {
|
|
|
15787
15787
|
function s(r, a = Yn) {
|
|
15788
15788
|
let l;
|
|
15789
15789
|
const h = ui.getTransfer(a);
|
|
15790
|
-
if (r ===
|
|
15790
|
+
if (r === Dr)
|
|
15791
15791
|
return n.UNSIGNED_BYTE;
|
|
15792
15792
|
if (r === Xy)
|
|
15793
15793
|
return n.UNSIGNED_SHORT_4_4_4_4;
|
|
@@ -15801,11 +15801,11 @@ function GT(n, e, t) {
|
|
|
15801
15801
|
return n.UNSIGNED_SHORT;
|
|
15802
15802
|
if (r === Fy)
|
|
15803
15803
|
return n.INT;
|
|
15804
|
-
if (r ===
|
|
15804
|
+
if (r === tr)
|
|
15805
15805
|
return n.UNSIGNED_INT;
|
|
15806
15806
|
if (r === Jn)
|
|
15807
15807
|
return n.FLOAT;
|
|
15808
|
-
if (r ===
|
|
15808
|
+
if (r === ar)
|
|
15809
15809
|
return i ? n.HALF_FLOAT : (l = e.get("OES_texture_half_float"), l !== null ? l.HALF_FLOAT_OES : null);
|
|
15810
15810
|
if (r === f1)
|
|
15811
15811
|
return n.ALPHA;
|
|
@@ -15815,7 +15815,7 @@ function GT(n, e, t) {
|
|
|
15815
15815
|
return n.LUMINANCE;
|
|
15816
15816
|
if (r === m1)
|
|
15817
15817
|
return n.LUMINANCE_ALPHA;
|
|
15818
|
-
if (r ===
|
|
15818
|
+
if (r === Or)
|
|
15819
15819
|
return n.DEPTH_COMPONENT;
|
|
15820
15820
|
if (r === Lo)
|
|
15821
15821
|
return n.DEPTH_STENCIL;
|
|
@@ -15940,7 +15940,7 @@ class WT extends un {
|
|
|
15940
15940
|
super(), this.isArrayCamera = !0, this.cameras = e;
|
|
15941
15941
|
}
|
|
15942
15942
|
}
|
|
15943
|
-
class
|
|
15943
|
+
class Tr extends oi {
|
|
15944
15944
|
constructor() {
|
|
15945
15945
|
super(), this.isGroup = !0, this.type = "Group";
|
|
15946
15946
|
}
|
|
@@ -15951,13 +15951,13 @@ class xd {
|
|
|
15951
15951
|
this._targetRay = null, this._grip = null, this._hand = null;
|
|
15952
15952
|
}
|
|
15953
15953
|
getHandSpace() {
|
|
15954
|
-
return this._hand === null && (this._hand = new
|
|
15954
|
+
return this._hand === null && (this._hand = new Tr(), this._hand.matrixAutoUpdate = !1, this._hand.visible = !1, this._hand.joints = {}, this._hand.inputState = { pinching: !1 }), this._hand;
|
|
15955
15955
|
}
|
|
15956
15956
|
getTargetRaySpace() {
|
|
15957
|
-
return this._targetRay === null && (this._targetRay = new
|
|
15957
|
+
return this._targetRay === null && (this._targetRay = new Tr(), this._targetRay.matrixAutoUpdate = !1, this._targetRay.visible = !1, this._targetRay.hasLinearVelocity = !1, this._targetRay.linearVelocity = new G(), this._targetRay.hasAngularVelocity = !1, this._targetRay.angularVelocity = new G()), this._targetRay;
|
|
15958
15958
|
}
|
|
15959
15959
|
getGripSpace() {
|
|
15960
|
-
return this._grip === null && (this._grip = new
|
|
15960
|
+
return this._grip === null && (this._grip = new Tr(), this._grip.matrixAutoUpdate = !1, this._grip.visible = !1, this._grip.hasLinearVelocity = !1, this._grip.linearVelocity = new G(), this._grip.hasAngularVelocity = !1, this._grip.angularVelocity = new G()), this._grip;
|
|
15961
15961
|
}
|
|
15962
15962
|
dispatchEvent(e) {
|
|
15963
15963
|
return this._targetRay !== null && this._targetRay.dispatchEvent(e), this._grip !== null && this._grip.dispatchEvent(e), this._hand !== null && this._hand.dispatchEvent(e), this;
|
|
@@ -16003,7 +16003,7 @@ class xd {
|
|
|
16003
16003
|
// private method
|
|
16004
16004
|
_getHandJoint(e, t) {
|
|
16005
16005
|
if (e.joints[t.jointName] === void 0) {
|
|
16006
|
-
const i = new
|
|
16006
|
+
const i = new Tr();
|
|
16007
16007
|
i.matrixAutoUpdate = !1, i.visible = !1, e.joints[t.jointName] = i, e.add(i);
|
|
16008
16008
|
}
|
|
16009
16009
|
return e.joints[t.jointName];
|
|
@@ -16066,7 +16066,7 @@ class jT {
|
|
|
16066
16066
|
this.texture = null, this.mesh = null;
|
|
16067
16067
|
}
|
|
16068
16068
|
}
|
|
16069
|
-
class KT extends
|
|
16069
|
+
class KT extends Xr {
|
|
16070
16070
|
constructor(e, t) {
|
|
16071
16071
|
super();
|
|
16072
16072
|
const i = this;
|
|
@@ -16138,14 +16138,14 @@ class KT extends Fr {
|
|
|
16138
16138
|
x.framebufferHeight,
|
|
16139
16139
|
{
|
|
16140
16140
|
format: An,
|
|
16141
|
-
type:
|
|
16141
|
+
type: Dr,
|
|
16142
16142
|
colorSpace: e.outputColorSpace,
|
|
16143
16143
|
stencilBuffer: b.stencil
|
|
16144
16144
|
}
|
|
16145
16145
|
);
|
|
16146
16146
|
} else {
|
|
16147
16147
|
let we = null, qe = null, We = null;
|
|
16148
|
-
b.depth && (We = b.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24, we = b.stencil ? Lo :
|
|
16148
|
+
b.depth && (We = b.stencil ? t.DEPTH24_STENCIL8 : t.DEPTH_COMPONENT24, we = b.stencil ? Lo : Or, qe = b.stencil ? da : tr);
|
|
16149
16149
|
const at = {
|
|
16150
16150
|
colorFormat: t.RGBA8,
|
|
16151
16151
|
depthFormat: We,
|
|
@@ -16156,7 +16156,7 @@ class KT extends Fr {
|
|
|
16156
16156
|
g.textureHeight,
|
|
16157
16157
|
{
|
|
16158
16158
|
format: An,
|
|
16159
|
-
type:
|
|
16159
|
+
type: Dr,
|
|
16160
16160
|
depthTexture: new jf(g.textureWidth, g.textureHeight, qe, void 0, void 0, void 0, void 0, void 0, void 0, we),
|
|
16161
16161
|
stencilBuffer: b.stencil,
|
|
16162
16162
|
colorSpace: e.outputColorSpace,
|
|
@@ -16466,7 +16466,7 @@ class Kf {
|
|
|
16466
16466
|
* @type {?Function}
|
|
16467
16467
|
*/
|
|
16468
16468
|
onShaderError: null
|
|
16469
|
-
}, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this._outputColorSpace = Hi, this._useLegacyLights = !1, this.toneMapping =
|
|
16469
|
+
}, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this._outputColorSpace = Hi, this._useLegacyLights = !1, this.toneMapping = Ir, this.toneMappingExposure = 1;
|
|
16470
16470
|
const T = this;
|
|
16471
16471
|
let S = !1, B = 0, z = 0, F = null, Q = -1, $ = null;
|
|
16472
16472
|
const O = new ai(), k = new ai();
|
|
@@ -16579,7 +16579,7 @@ class Kf {
|
|
|
16579
16579
|
oe = Pe === Wy || Pe === Gy || Pe === Yy;
|
|
16580
16580
|
}
|
|
16581
16581
|
if (oe) {
|
|
16582
|
-
const Pe = F.texture.type, Ze = Pe ===
|
|
16582
|
+
const Pe = F.texture.type, Ze = Pe === Dr || Pe === tr || Pe === Vf || Pe === da || Pe === Xy || Pe === Vy, it = At.getClearColor(), lt = At.getClearAlpha(), Ge = it.r, ht = it.g, pt = it.b;
|
|
16583
16583
|
Ze ? (x[0] = Ge, x[1] = ht, x[2] = pt, x[3] = lt, ae.clearBufferuiv(ae.COLOR, 0, x)) : (w[0] = Ge, w[1] = ht, w[2] = pt, w[3] = lt, ae.clearBufferiv(ae.COLOR, 0, w));
|
|
16584
16584
|
} else
|
|
16585
16585
|
ne |= ae.COLOR_BUFFER_BIT;
|
|
@@ -16763,14 +16763,14 @@ class Kf {
|
|
|
16763
16763
|
const Pe = He.isWebGL2;
|
|
16764
16764
|
qe === null && (qe = new wn(1, 1, {
|
|
16765
16765
|
generateMipmaps: !0,
|
|
16766
|
-
type: Me.has("EXT_color_buffer_half_float") ?
|
|
16766
|
+
type: Me.has("EXT_color_buffer_half_float") ? ar : Dr,
|
|
16767
16767
|
minFilter: bs,
|
|
16768
16768
|
samples: Pe ? 4 : 0
|
|
16769
16769
|
})), T.getDrawingBufferSize(at), Pe ? qe.setSize(at.x, at.y) : qe.setSize(Jh(at.x), Jh(at.y));
|
|
16770
16770
|
const Ze = T.getRenderTarget();
|
|
16771
16771
|
T.setRenderTarget(qe), T.getClearColor(he), J = T.getClearAlpha(), J < 1 && T.setClearColor(16777215, 0.5), T.clear();
|
|
16772
16772
|
const it = T.toneMapping;
|
|
16773
|
-
T.toneMapping =
|
|
16773
|
+
T.toneMapping = Ir, Pn(X, re, ne), q.updateMultisampleRenderTarget(qe), q.updateRenderTargetMipmap(qe);
|
|
16774
16774
|
let lt = !1;
|
|
16775
16775
|
for (let Ge = 0, ht = ee.length; Ge < ht; Ge++) {
|
|
16776
16776
|
const pt = ee[Ge], _t = pt.object, Rt = pt.geometry, Mt = pt.material, Dt = pt.group;
|
|
@@ -16819,7 +16819,7 @@ class Kf {
|
|
|
16819
16819
|
function te(X, ee, re, ne, oe) {
|
|
16820
16820
|
ee.isScene !== !0 && (ee = Et), q.resetTextureUnits();
|
|
16821
16821
|
const Pe = ee.fog, Ze = ne.isMeshStandardMaterial ? ee.environment : null, it = F === null ? T.outputColorSpace : F.isXRRenderTarget === !0 ? F.texture.colorSpace : on, lt = (ne.isMeshStandardMaterial ? V : W).get(ne.envMap || Ze), Ge = ne.vertexColors === !0 && !!re.attributes.color && re.attributes.color.itemSize === 4, ht = !!re.attributes.tangent && (!!ne.normalMap || ne.anisotropy > 0), pt = !!re.morphAttributes.position, _t = !!re.morphAttributes.normal, Rt = !!re.morphAttributes.color;
|
|
16822
|
-
let Mt =
|
|
16822
|
+
let Mt = Ir;
|
|
16823
16823
|
ne.toneMapped && (F === null || F.isXRRenderTarget === !0) && (Mt = T.toneMapping);
|
|
16824
16824
|
const Dt = re.morphAttributes.position || re.morphAttributes.normal || re.morphAttributes.color, gt = Dt !== void 0 ? Dt.length : 0, et = je.get(ne), jt = b.state.lights;
|
|
16825
16825
|
if (be === !0 && (we === !0 || X !== $)) {
|
|
@@ -16847,8 +16847,8 @@ class Kf {
|
|
|
16847
16847
|
pn && (He.floatVertexTextures ? (pn.boneTexture === null && pn.computeBoneTexture(), Mi.setValue(ae, "boneTexture", pn.boneTexture, q)) : console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."));
|
|
16848
16848
|
}
|
|
16849
16849
|
oe.isBatchedMesh && (Mi.setOptional(ae, oe, "batchingTexture"), Mi.setValue(ae, "batchingTexture", oe._matricesTexture, q));
|
|
16850
|
-
const
|
|
16851
|
-
if ((
|
|
16850
|
+
const Vr = re.morphAttributes;
|
|
16851
|
+
if ((Vr.position !== void 0 || Vr.normal !== void 0 || Vr.color !== void 0 && He.isWebGL2 === !0) && dt.update(oe, re, Ni), (cn || et.receiveShadow !== oe.receiveShadow) && (et.receiveShadow = oe.receiveShadow, Mi.setValue(ae, "receiveShadow", oe.receiveShadow)), ne.isMeshGouraudMaterial && ne.envMap !== null && (si.envMap.value = lt, si.flipEnvMap.value = lt.isCubeTexture && lt.isRenderTargetTexture === !1 ? -1 : 1), cn && (Mi.setValue(ae, "toneMappingExposure", T.toneMappingExposure), et.needsLights && ue(si, qi), Pe && ne.fog === !0 && Xe.refreshFogUniforms(si, Pe), Xe.refreshMaterialUniforms(si, ne, xe, de, qe), kh.upload(ae, H(et), si, q)), ne.isShaderMaterial && ne.uniformsNeedUpdate === !0 && (kh.upload(ae, H(et), si, q), ne.uniformsNeedUpdate = !1), ne.isSpriteMaterial && Mi.setValue(ae, "center", oe.center), Mi.setValue(ae, "modelViewMatrix", oe.modelViewMatrix), Mi.setValue(ae, "normalMatrix", oe.normalMatrix), Mi.setValue(ae, "modelMatrix", oe.matrixWorld), ne.isShaderMaterial || ne.isRawShaderMaterial) {
|
|
16852
16852
|
const pn = ne.uniformsGroups;
|
|
16853
16853
|
for (let Rs = 0, Ai = pn.length; Rs < Ai; Rs++)
|
|
16854
16854
|
if (He.isWebGL2) {
|
|
@@ -16912,8 +16912,8 @@ class Kf {
|
|
|
16912
16912
|
console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");
|
|
16913
16913
|
return;
|
|
16914
16914
|
}
|
|
16915
|
-
const pt = ht ===
|
|
16916
|
-
if (ht !==
|
|
16915
|
+
const pt = ht === ar && (Me.has("EXT_color_buffer_half_float") || He.isWebGL2 && Me.has("EXT_color_buffer_float"));
|
|
16916
|
+
if (ht !== Dr && $e.convert(ht) !== ae.getParameter(ae.IMPLEMENTATION_COLOR_READ_TYPE) && // Edge and Chrome Mac < 52 (#9513)
|
|
16917
16917
|
!(ht === Jn && (He.isWebGL2 || Me.has("OES_texture_float") || Me.has("WEBGL_color_buffer_float"))) && // Chrome Mac >= 52 and Firefox
|
|
16918
16918
|
!pt) {
|
|
16919
16919
|
console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");
|
|
@@ -16956,7 +16956,7 @@ class Kf {
|
|
|
16956
16956
|
}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
|
|
16957
16957
|
}
|
|
16958
16958
|
get coordinateSystem() {
|
|
16959
|
-
return
|
|
16959
|
+
return ir;
|
|
16960
16960
|
}
|
|
16961
16961
|
get outputColorSpace() {
|
|
16962
16962
|
return this._outputColorSpace;
|
|
@@ -17588,7 +17588,7 @@ class oE {
|
|
|
17588
17588
|
this.list.length = 0, this.index = 0;
|
|
17589
17589
|
}
|
|
17590
17590
|
}
|
|
17591
|
-
const io = "batchId",
|
|
17591
|
+
const io = "batchId", gr = /* @__PURE__ */ new nt(), Zg = /* @__PURE__ */ new nt(), lE = /* @__PURE__ */ new nt(), jg = /* @__PURE__ */ new nt(), _d = /* @__PURE__ */ new cc(), nh = /* @__PURE__ */ new di(), Jr = /* @__PURE__ */ new Qi(), gl = /* @__PURE__ */ new G(), Md = /* @__PURE__ */ new oE(), yn = /* @__PURE__ */ new fe(), sh = [];
|
|
17592
17592
|
function cE(n, e, t = 0) {
|
|
17593
17593
|
const i = e.itemSize;
|
|
17594
17594
|
if (n.isInterleavedBufferAttribute || n.array.constructor !== e.array.constructor) {
|
|
@@ -17653,14 +17653,14 @@ class hE extends fe {
|
|
|
17653
17653
|
const e = this._geometryCount, t = this.boundingBox, i = this._active;
|
|
17654
17654
|
t.makeEmpty();
|
|
17655
17655
|
for (let s = 0; s < e; s++)
|
|
17656
|
-
i[s] !== !1 && (this.getMatrixAt(s,
|
|
17656
|
+
i[s] !== !1 && (this.getMatrixAt(s, gr), this.getBoundingBoxAt(s, nh).applyMatrix4(gr), t.union(nh));
|
|
17657
17657
|
}
|
|
17658
17658
|
computeBoundingSphere() {
|
|
17659
17659
|
this.boundingSphere === null && (this.boundingSphere = new Qi());
|
|
17660
17660
|
const e = this._geometryCount, t = this.boundingSphere, i = this._active;
|
|
17661
17661
|
t.makeEmpty();
|
|
17662
17662
|
for (let s = 0; s < e; s++)
|
|
17663
|
-
i[s] !== !1 && (this.getMatrixAt(s,
|
|
17663
|
+
i[s] !== !1 && (this.getMatrixAt(s, gr), this.getBoundingSphereAt(s, Jr).applyMatrix4(gr), t.union(Jr));
|
|
17664
17664
|
}
|
|
17665
17665
|
addGeometry(e, t = -1, i = -1) {
|
|
17666
17666
|
if (this._initializeGeometry(e), this._validateGeometry(e), this._geometryCount >= this._maxGeometryCount)
|
|
@@ -17821,10 +17821,10 @@ class hE extends fe {
|
|
|
17821
17821
|
Zg.copy(this.matrixWorld).invert(), gl.setFromMatrixPosition(i.matrixWorld).applyMatrix4(Zg);
|
|
17822
17822
|
for (let v = 0, C = u.length; v < C; v++)
|
|
17823
17823
|
if (u[v] && h[v]) {
|
|
17824
|
-
this.getMatrixAt(v,
|
|
17824
|
+
this.getMatrixAt(v, gr), this.getBoundingSphereAt(v, Jr).applyMatrix4(gr);
|
|
17825
17825
|
let T = !1;
|
|
17826
|
-
if (x && (T = !_d.intersectsSphere(
|
|
17827
|
-
const S = gl.distanceTo(
|
|
17826
|
+
if (x && (T = !_d.intersectsSphere(Jr)), !T) {
|
|
17827
|
+
const S = gl.distanceTo(Jr.center);
|
|
17828
17828
|
Md.push(g[v], S);
|
|
17829
17829
|
}
|
|
17830
17830
|
}
|
|
@@ -17839,7 +17839,7 @@ class hE extends fe {
|
|
|
17839
17839
|
for (let E = 0, b = u.length; E < b; E++)
|
|
17840
17840
|
if (u[E] && h[E]) {
|
|
17841
17841
|
let v = !1;
|
|
17842
|
-
if (x && (this.getMatrixAt(E,
|
|
17842
|
+
if (x && (this.getMatrixAt(E, gr), this.getBoundingSphereAt(E, Jr).applyMatrix4(gr), v = !_d.intersectsSphere(Jr)), !v) {
|
|
17843
17843
|
const C = g[E];
|
|
17844
17844
|
f[w] = C.start * l, p[w] = C.count, w++;
|
|
17845
17845
|
}
|
|
@@ -19439,7 +19439,7 @@ function kE(n, e, t, i) {
|
|
|
19439
19439
|
s += (n[a] - n[r]) * (n[r + 1] + n[a + 1]), a = r;
|
|
19440
19440
|
return s;
|
|
19441
19441
|
}
|
|
19442
|
-
class
|
|
19442
|
+
class Nr {
|
|
19443
19443
|
// calculate area of the contour polygon
|
|
19444
19444
|
static area(e) {
|
|
19445
19445
|
const t = e.length;
|
|
@@ -19449,7 +19449,7 @@ class Or {
|
|
|
19449
19449
|
return i * 0.5;
|
|
19450
19450
|
}
|
|
19451
19451
|
static isClockWise(e) {
|
|
19452
|
-
return
|
|
19452
|
+
return Nr.area(e) < 0;
|
|
19453
19453
|
}
|
|
19454
19454
|
static triangulateShape(e, t) {
|
|
19455
19455
|
const i = [], s = [], r = [];
|
|
@@ -19493,14 +19493,14 @@ class dp extends Xt {
|
|
|
19493
19493
|
const $ = l.extractPoints(u);
|
|
19494
19494
|
let O = $.shape;
|
|
19495
19495
|
const k = $.holes;
|
|
19496
|
-
if (!
|
|
19496
|
+
if (!Nr.isClockWise(O)) {
|
|
19497
19497
|
O = O.reverse();
|
|
19498
19498
|
for (let ae = 0, Oe = k.length; ae < Oe; ae++) {
|
|
19499
19499
|
const Me = k[ae];
|
|
19500
|
-
|
|
19500
|
+
Nr.isClockWise(Me) && (k[ae] = Me.reverse());
|
|
19501
19501
|
}
|
|
19502
19502
|
}
|
|
19503
|
-
const he =
|
|
19503
|
+
const he = Nr.triangulateShape(O, k), J = O;
|
|
19504
19504
|
for (let ae = 0, Oe = k.length; ae < Oe; ae++) {
|
|
19505
19505
|
const Me = k[ae];
|
|
19506
19506
|
O = O.concat(Me);
|
|
@@ -19917,12 +19917,12 @@ class mp extends Xt {
|
|
|
19917
19917
|
const p = s.length / 3, g = f.extractPoints(t);
|
|
19918
19918
|
let x = g.shape;
|
|
19919
19919
|
const w = g.holes;
|
|
19920
|
-
|
|
19920
|
+
Nr.isClockWise(x) === !1 && (x = x.reverse());
|
|
19921
19921
|
for (let b = 0, v = w.length; b < v; b++) {
|
|
19922
19922
|
const C = w[b];
|
|
19923
|
-
|
|
19923
|
+
Nr.isClockWise(C) === !0 && (w[b] = C.reverse());
|
|
19924
19924
|
}
|
|
19925
|
-
const E =
|
|
19925
|
+
const E = Nr.triangulateShape(x, w);
|
|
19926
19926
|
for (let b = 0, v = w.length; b < v; b++) {
|
|
19927
19927
|
const C = w[b];
|
|
19928
19928
|
x = x.concat(C);
|
|
@@ -20039,7 +20039,7 @@ class gp extends Pa {
|
|
|
20039
20039
|
return new gp(e.radius, e.detail);
|
|
20040
20040
|
}
|
|
20041
20041
|
}
|
|
20042
|
-
class
|
|
20042
|
+
class Sr extends Xt {
|
|
20043
20043
|
constructor(e = 1, t = 0.4, i = 12, s = 48, r = Math.PI * 2) {
|
|
20044
20044
|
super(), this.type = "TorusGeometry", this.parameters = {
|
|
20045
20045
|
radius: e,
|
|
@@ -20065,7 +20065,7 @@ class Mr extends Xt {
|
|
|
20065
20065
|
return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
|
|
20066
20066
|
}
|
|
20067
20067
|
static fromJSON(e) {
|
|
20068
|
-
return new
|
|
20068
|
+
return new Sr(e.radius, e.tube, e.radialSegments, e.tubularSegments, e.arc);
|
|
20069
20069
|
}
|
|
20070
20070
|
}
|
|
20071
20071
|
class yp extends Xt {
|
|
@@ -20219,7 +20219,7 @@ var c0 = /* @__PURE__ */ Object.freeze({
|
|
|
20219
20219
|
ShapeGeometry: mp,
|
|
20220
20220
|
SphereGeometry: hc,
|
|
20221
20221
|
TetrahedronGeometry: gp,
|
|
20222
|
-
TorusGeometry:
|
|
20222
|
+
TorusGeometry: Sr,
|
|
20223
20223
|
TorusKnotGeometry: yp,
|
|
20224
20224
|
TubeGeometry: xp,
|
|
20225
20225
|
WireframeGeometry: HE
|
|
@@ -20296,7 +20296,7 @@ class Es extends uc {
|
|
|
20296
20296
|
}, this.anisotropy = e.anisotropy, this.anisotropyRotation = e.anisotropyRotation, this.anisotropyMap = e.anisotropyMap, this.clearcoat = e.clearcoat, this.clearcoatMap = e.clearcoatMap, this.clearcoatRoughness = e.clearcoatRoughness, this.clearcoatRoughnessMap = e.clearcoatRoughnessMap, this.clearcoatNormalMap = e.clearcoatNormalMap, this.clearcoatNormalScale.copy(e.clearcoatNormalScale), this.ior = e.ior, this.iridescence = e.iridescence, this.iridescenceMap = e.iridescenceMap, this.iridescenceIOR = e.iridescenceIOR, this.iridescenceThicknessRange = [...e.iridescenceThicknessRange], this.iridescenceThicknessMap = e.iridescenceThicknessMap, this.sheen = e.sheen, this.sheenColor.copy(e.sheenColor), this.sheenColorMap = e.sheenColorMap, this.sheenRoughness = e.sheenRoughness, this.sheenRoughnessMap = e.sheenRoughnessMap, this.transmission = e.transmission, this.transmissionMap = e.transmissionMap, this.thickness = e.thickness, this.thicknessMap = e.thicknessMap, this.attenuationDistance = e.attenuationDistance, this.attenuationColor.copy(e.attenuationColor), this.specularIntensity = e.specularIntensity, this.specularIntensityMap = e.specularIntensityMap, this.specularColor.copy(e.specularColor), this.specularColorMap = e.specularColorMap, this;
|
|
20297
20297
|
}
|
|
20298
20298
|
}
|
|
20299
|
-
class
|
|
20299
|
+
class Br extends $i {
|
|
20300
20300
|
constructor(e) {
|
|
20301
20301
|
super(), this.isMeshPhongMaterial = !0, this.type = "MeshPhongMaterial", this.color = new ut(16777215), this.specular = new ut(1118481), this.shininess = 30, 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 = Ea, this.normalScale = new Se(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = au, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
|
|
20302
20302
|
}
|
|
@@ -20944,7 +20944,7 @@ function i2(n) {
|
|
|
20944
20944
|
}
|
|
20945
20945
|
return e.parse !== void 0 ? e.parse(n) : new e(n.name, n.times, n.values, n.interpolation);
|
|
20946
20946
|
}
|
|
20947
|
-
const
|
|
20947
|
+
const Er = {
|
|
20948
20948
|
enabled: !1,
|
|
20949
20949
|
files: {},
|
|
20950
20950
|
add: function(n, e) {
|
|
@@ -20992,7 +20992,7 @@ class Px {
|
|
|
20992
20992
|
}
|
|
20993
20993
|
}
|
|
20994
20994
|
const n2 = /* @__PURE__ */ new Px();
|
|
20995
|
-
class
|
|
20995
|
+
class lr {
|
|
20996
20996
|
constructor(e) {
|
|
20997
20997
|
this.manager = e !== void 0 ? e : n2, this.crossOrigin = "anonymous", this.withCredentials = !1, this.path = "", this.resourcePath = "", this.requestHeader = {};
|
|
20998
20998
|
}
|
|
@@ -21022,20 +21022,20 @@ class or {
|
|
|
21022
21022
|
return this.requestHeader = e, this;
|
|
21023
21023
|
}
|
|
21024
21024
|
}
|
|
21025
|
-
|
|
21025
|
+
lr.DEFAULT_MATERIAL_NAME = "__DEFAULT";
|
|
21026
21026
|
const qs = {};
|
|
21027
21027
|
class s2 extends Error {
|
|
21028
21028
|
constructor(e, t) {
|
|
21029
21029
|
super(e), this.response = t;
|
|
21030
21030
|
}
|
|
21031
21031
|
}
|
|
21032
|
-
class zo extends
|
|
21032
|
+
class zo extends lr {
|
|
21033
21033
|
constructor(e) {
|
|
21034
21034
|
super(e);
|
|
21035
21035
|
}
|
|
21036
21036
|
load(e, t, i, s) {
|
|
21037
21037
|
e === void 0 && (e = ""), this.path !== void 0 && (e = this.path + e), e = this.manager.resolveURL(e);
|
|
21038
|
-
const r =
|
|
21038
|
+
const r = Er.get(e);
|
|
21039
21039
|
if (r !== void 0)
|
|
21040
21040
|
return this.manager.itemStart(e), setTimeout(() => {
|
|
21041
21041
|
t && t(r), this.manager.itemEnd(e);
|
|
@@ -21106,7 +21106,7 @@ class zo extends or {
|
|
|
21106
21106
|
}
|
|
21107
21107
|
}
|
|
21108
21108
|
}).then((u) => {
|
|
21109
|
-
|
|
21109
|
+
Er.add(e, u);
|
|
21110
21110
|
const f = qs[e];
|
|
21111
21111
|
delete qs[e];
|
|
21112
21112
|
for (let p = 0, g = f.length; p < g; p++) {
|
|
@@ -21134,20 +21134,20 @@ class zo extends or {
|
|
|
21134
21134
|
return this.mimeType = e, this;
|
|
21135
21135
|
}
|
|
21136
21136
|
}
|
|
21137
|
-
class _f extends
|
|
21137
|
+
class _f extends lr {
|
|
21138
21138
|
constructor(e) {
|
|
21139
21139
|
super(e);
|
|
21140
21140
|
}
|
|
21141
21141
|
load(e, t, i, s) {
|
|
21142
21142
|
this.path !== void 0 && (e = this.path + e), e = this.manager.resolveURL(e);
|
|
21143
|
-
const r = this, a =
|
|
21143
|
+
const r = this, a = Er.get(e);
|
|
21144
21144
|
if (a !== void 0)
|
|
21145
21145
|
return r.manager.itemStart(e), setTimeout(function() {
|
|
21146
21146
|
t && t(a), r.manager.itemEnd(e);
|
|
21147
21147
|
}, 0), a;
|
|
21148
21148
|
const l = Jl("img");
|
|
21149
21149
|
function h() {
|
|
21150
|
-
f(),
|
|
21150
|
+
f(), Er.add(e, this), t && t(this), r.manager.itemEnd(e);
|
|
21151
21151
|
}
|
|
21152
21152
|
function u(p) {
|
|
21153
21153
|
f(), s && s(p), r.manager.itemError(e), r.manager.itemEnd(e);
|
|
@@ -21158,7 +21158,7 @@ class _f extends or {
|
|
|
21158
21158
|
return l.addEventListener("load", h, !1), l.addEventListener("error", u, !1), e.slice(0, 5) !== "data:" && this.crossOrigin !== void 0 && (l.crossOrigin = this.crossOrigin), r.manager.itemStart(e), l.src = e, l;
|
|
21159
21159
|
}
|
|
21160
21160
|
}
|
|
21161
|
-
class Cx extends
|
|
21161
|
+
class Cx extends lr {
|
|
21162
21162
|
constructor(e) {
|
|
21163
21163
|
super(e);
|
|
21164
21164
|
}
|
|
@@ -21474,7 +21474,7 @@ class d2 extends Ca {
|
|
|
21474
21474
|
return t.object.sh = this.sh.toArray(), t;
|
|
21475
21475
|
}
|
|
21476
21476
|
}
|
|
21477
|
-
class bp extends
|
|
21477
|
+
class bp extends lr {
|
|
21478
21478
|
constructor(e) {
|
|
21479
21479
|
super(e), this.textures = {};
|
|
21480
21480
|
}
|
|
@@ -21544,7 +21544,7 @@ class bp extends or {
|
|
|
21544
21544
|
PointsMaterial: np,
|
|
21545
21545
|
MeshPhysicalMaterial: Es,
|
|
21546
21546
|
MeshStandardMaterial: uc,
|
|
21547
|
-
MeshPhongMaterial:
|
|
21547
|
+
MeshPhongMaterial: Br,
|
|
21548
21548
|
MeshToonMaterial: GE,
|
|
21549
21549
|
MeshNormalMaterial: WE,
|
|
21550
21550
|
MeshLambertMaterial: QE,
|
|
@@ -21592,7 +21592,7 @@ class f2 extends Xt {
|
|
|
21592
21592
|
return e.instanceCount = this.instanceCount, e.isInstancedBufferGeometry = !0, e;
|
|
21593
21593
|
}
|
|
21594
21594
|
}
|
|
21595
|
-
class p2 extends
|
|
21595
|
+
class p2 extends lr {
|
|
21596
21596
|
constructor(e) {
|
|
21597
21597
|
super(e);
|
|
21598
21598
|
}
|
|
@@ -21671,7 +21671,7 @@ class p2 extends or {
|
|
|
21671
21671
|
return e.name && (a.name = e.name), e.userData && (a.userData = e.userData), a;
|
|
21672
21672
|
}
|
|
21673
21673
|
}
|
|
21674
|
-
class m2 extends
|
|
21674
|
+
class m2 extends lr {
|
|
21675
21675
|
constructor(e) {
|
|
21676
21676
|
super(e);
|
|
21677
21677
|
}
|
|
@@ -21971,7 +21971,7 @@ class m2 extends or {
|
|
|
21971
21971
|
a = new mf(h(e.material));
|
|
21972
21972
|
break;
|
|
21973
21973
|
case "Group":
|
|
21974
|
-
a = new
|
|
21974
|
+
a = new Tr();
|
|
21975
21975
|
break;
|
|
21976
21976
|
case "Bone":
|
|
21977
21977
|
a = new tp();
|
|
@@ -22018,18 +22018,18 @@ const g2 = {
|
|
|
22018
22018
|
EquirectangularRefractionMapping: Wh,
|
|
22019
22019
|
CubeUVReflectionMapping: lc
|
|
22020
22020
|
}, p0 = {
|
|
22021
|
-
RepeatWrapping:
|
|
22021
|
+
RepeatWrapping: rr,
|
|
22022
22022
|
ClampToEdgeWrapping: Hn,
|
|
22023
22023
|
MirroredRepeatWrapping: Kl
|
|
22024
22024
|
}, m0 = {
|
|
22025
22025
|
NearestFilter: mi,
|
|
22026
22026
|
NearestMipmapNearestFilter: Qh,
|
|
22027
|
-
NearestMipmapLinearFilter:
|
|
22027
|
+
NearestMipmapLinearFilter: aa,
|
|
22028
22028
|
LinearFilter: Di,
|
|
22029
22029
|
LinearMipmapNearestFilter: Bl,
|
|
22030
22030
|
LinearMipmapLinearFilter: bs
|
|
22031
22031
|
};
|
|
22032
|
-
class y2 extends
|
|
22032
|
+
class y2 extends lr {
|
|
22033
22033
|
constructor(e) {
|
|
22034
22034
|
super(e), this.isImageBitmapLoader = !0, typeof createImageBitmap > "u" && console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."), typeof fetch > "u" && console.warn("THREE.ImageBitmapLoader: fetch() not supported."), this.options = { premultiplyAlpha: "none" };
|
|
22035
22035
|
}
|
|
@@ -22038,7 +22038,7 @@ class y2 extends or {
|
|
|
22038
22038
|
}
|
|
22039
22039
|
load(e, t, i, s) {
|
|
22040
22040
|
e === void 0 && (e = ""), this.path !== void 0 && (e = this.path + e), e = this.manager.resolveURL(e);
|
|
22041
|
-
const r = this, a =
|
|
22041
|
+
const r = this, a = Er.get(e);
|
|
22042
22042
|
if (a !== void 0) {
|
|
22043
22043
|
if (r.manager.itemStart(e), a.then) {
|
|
22044
22044
|
a.then((u) => {
|
|
@@ -22059,11 +22059,11 @@ class y2 extends or {
|
|
|
22059
22059
|
}).then(function(u) {
|
|
22060
22060
|
return createImageBitmap(u, Object.assign(r.options, { colorSpaceConversion: "none" }));
|
|
22061
22061
|
}).then(function(u) {
|
|
22062
|
-
return
|
|
22062
|
+
return Er.add(e, u), t && t(u), r.manager.itemEnd(e), u;
|
|
22063
22063
|
}).catch(function(u) {
|
|
22064
|
-
s && s(u),
|
|
22064
|
+
s && s(u), Er.remove(e), r.manager.itemError(e), r.manager.itemEnd(e);
|
|
22065
22065
|
});
|
|
22066
|
-
|
|
22066
|
+
Er.add(e, h), r.manager.itemStart(e);
|
|
22067
22067
|
}
|
|
22068
22068
|
}
|
|
22069
22069
|
class Ix {
|
|
@@ -22733,7 +22733,7 @@ class P2 {
|
|
|
22733
22733
|
}
|
|
22734
22734
|
}
|
|
22735
22735
|
const C2 = new Float32Array(1);
|
|
22736
|
-
class R2 extends
|
|
22736
|
+
class R2 extends Xr {
|
|
22737
22737
|
constructor(e) {
|
|
22738
22738
|
super(), this._root = e, this._initMemoryManager(), this._accuIndex = 0, this.time = 0, this.timeScale = 1;
|
|
22739
22739
|
}
|
|
@@ -23041,7 +23041,7 @@ class Dx {
|
|
|
23041
23041
|
}
|
|
23042
23042
|
}
|
|
23043
23043
|
const x0 = /* @__PURE__ */ new G(), mh = /* @__PURE__ */ new G();
|
|
23044
|
-
class
|
|
23044
|
+
class nr {
|
|
23045
23045
|
constructor(e = new G(), t = new G()) {
|
|
23046
23046
|
this.start = e, this.end = t;
|
|
23047
23047
|
}
|
|
@@ -23193,7 +23193,7 @@ const D2 = {
|
|
|
23193
23193
|
};
|
|
23194
23194
|
class O2 {
|
|
23195
23195
|
constructor(e) {
|
|
23196
|
-
this.viralViewerApi = e, this.raycaster = new fc(), this.camera = null, this.cameraControls = null, this.onUsing = !1, this.cameraWakeQueuedEvents = [], this.cameraSleepQueuedEvents = [], this.targetElement = this.viralViewerApi.options.container, this.setupCamera(), this.viralViewerApi.lifeCycleEvent.emit(Pi.LOADED_CAMERA);
|
|
23196
|
+
this.viralViewerApi = e, this.raycaster = new fc(), 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(Pi.LOADED_CAMERA);
|
|
23197
23197
|
}
|
|
23198
23198
|
setupCamera() {
|
|
23199
23199
|
this.camera = new un(
|
|
@@ -23214,6 +23214,11 @@ class O2 {
|
|
|
23214
23214
|
const [i, s] = t;
|
|
23215
23215
|
s();
|
|
23216
23216
|
});
|
|
23217
|
+
}), this.cameraControls.addEventListener("update", (e) => {
|
|
23218
|
+
this.cameraUpdateQueuedEvents.length > 0 && this.cameraUpdateQueuedEvents.forEach((t) => {
|
|
23219
|
+
const [i, s] = t;
|
|
23220
|
+
s();
|
|
23221
|
+
});
|
|
23217
23222
|
}), this.viralViewerApi.viralRenderer.postProcessingRenderer.initRenderPass(
|
|
23218
23223
|
this.viralViewerApi.viralScene.scene,
|
|
23219
23224
|
this.camera
|
|
@@ -23318,23 +23323,26 @@ class O2 {
|
|
|
23318
23323
|
*/
|
|
23319
23324
|
addEventListener(e, t, i) {
|
|
23320
23325
|
switch (e) {
|
|
23321
|
-
case
|
|
23326
|
+
case Ks.ON_WAKE:
|
|
23322
23327
|
this.cameraWakeQueuedEvents.push([t, i]);
|
|
23323
23328
|
break;
|
|
23324
|
-
case
|
|
23329
|
+
case Ks.ON_SLEEP:
|
|
23325
23330
|
this.cameraSleepQueuedEvents.push([t, i]);
|
|
23326
23331
|
break;
|
|
23332
|
+
case Ks.ON_UPDATE:
|
|
23333
|
+
this.cameraUpdateQueuedEvents.push([t, i]);
|
|
23334
|
+
break;
|
|
23327
23335
|
}
|
|
23328
23336
|
}
|
|
23329
23337
|
removeEventListener(e, t) {
|
|
23330
23338
|
switch (e) {
|
|
23331
|
-
case
|
|
23339
|
+
case Ks.ON_WAKE:
|
|
23332
23340
|
{
|
|
23333
23341
|
let i = this.cameraWakeQueuedEvents.findIndex((s) => s[0] == t);
|
|
23334
23342
|
this.cameraWakeQueuedEvents.splice(i, 1);
|
|
23335
23343
|
}
|
|
23336
23344
|
break;
|
|
23337
|
-
case
|
|
23345
|
+
case Ks.ON_SLEEP:
|
|
23338
23346
|
{
|
|
23339
23347
|
let i = this.cameraSleepQueuedEvents.findIndex(
|
|
23340
23348
|
(s) => s[0] == t
|
|
@@ -23342,10 +23350,18 @@ class O2 {
|
|
|
23342
23350
|
this.cameraSleepQueuedEvents.splice(i, 1);
|
|
23343
23351
|
}
|
|
23344
23352
|
break;
|
|
23353
|
+
case Ks.ON_UPDATE:
|
|
23354
|
+
{
|
|
23355
|
+
let i = this.cameraUpdateQueuedEvents.findIndex(
|
|
23356
|
+
(s) => s[0] == t
|
|
23357
|
+
);
|
|
23358
|
+
this.cameraUpdateQueuedEvents.splice(i, 1);
|
|
23359
|
+
}
|
|
23360
|
+
break;
|
|
23345
23361
|
}
|
|
23346
23362
|
}
|
|
23347
23363
|
getAllEventListener() {
|
|
23348
|
-
console.log(this.cameraWakeQueuedEvents), console.log(this.cameraSleepQueuedEvents);
|
|
23364
|
+
console.log(this.cameraWakeQueuedEvents), console.log(this.cameraSleepQueuedEvents), console.log(this.cameraUpdateQueuedEvents);
|
|
23349
23365
|
}
|
|
23350
23366
|
//#endregion
|
|
23351
23367
|
}
|
|
@@ -23528,7 +23544,7 @@ class N2 {
|
|
|
23528
23544
|
}
|
|
23529
23545
|
//#endregion
|
|
23530
23546
|
}
|
|
23531
|
-
const
|
|
23547
|
+
const ea = new fc(), xn = new G(), yr = new G(), Ii = new Ui(), v0 = {
|
|
23532
23548
|
X: new G(1, 0, 0),
|
|
23533
23549
|
Y: new G(0, 1, 0),
|
|
23534
23550
|
Z: new G(0, 0, 1)
|
|
@@ -23563,14 +23579,14 @@ class B2 extends oi {
|
|
|
23563
23579
|
pointerHover(e) {
|
|
23564
23580
|
if (this.object === void 0 || this.dragging === !0)
|
|
23565
23581
|
return;
|
|
23566
|
-
|
|
23567
|
-
const t = Id(this._gizmo.picker[this.mode],
|
|
23582
|
+
ea.setFromCamera(e, this.camera);
|
|
23583
|
+
const t = Id(this._gizmo.picker[this.mode], ea);
|
|
23568
23584
|
t ? this.axis = t.object.name : this.axis = null;
|
|
23569
23585
|
}
|
|
23570
23586
|
pointerDown(e) {
|
|
23571
23587
|
if (!(this.object === void 0 || this.dragging === !0 || e.button !== 0) && this.axis !== null) {
|
|
23572
|
-
|
|
23573
|
-
const t = Id(this._plane,
|
|
23588
|
+
ea.setFromCamera(e, this.camera);
|
|
23589
|
+
const t = Id(this._plane, ea, !0);
|
|
23574
23590
|
t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, b0.mode = this.mode, this.dispatchEvent(b0);
|
|
23575
23591
|
}
|
|
23576
23592
|
}
|
|
@@ -23579,18 +23595,18 @@ class B2 extends oi {
|
|
|
23579
23595
|
let r = this.space;
|
|
23580
23596
|
if (i === "scale" ? r = "local" : (t === "E" || t === "XYZE" || t === "XYZ") && (r = "world"), s === void 0 || t === null || this.dragging === !1 || e.button !== -1)
|
|
23581
23597
|
return;
|
|
23582
|
-
|
|
23583
|
-
const a = Id(this._plane,
|
|
23598
|
+
ea.setFromCamera(e, this.camera);
|
|
23599
|
+
const a = Id(this._plane, ea, !0);
|
|
23584
23600
|
if (a) {
|
|
23585
23601
|
if (this.pointEnd.copy(a.point).sub(this.worldPositionStart), i === "translate")
|
|
23586
23602
|
this._offset.copy(this.pointEnd).sub(this.pointStart), r === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), r === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), s.position.copy(this._offset).add(this._positionStart), this.translationSnap && (r === "local" && (s.position.applyQuaternion(Ii.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (s.position.x = Math.round(s.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (s.position.y = Math.round(s.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (s.position.z = Math.round(s.position.z / this.translationSnap) * this.translationSnap), s.position.applyQuaternion(this._quaternionStart)), r === "world" && (s.parent && s.position.add(xn.setFromMatrixPosition(s.parent.matrixWorld)), t.search("X") !== -1 && (s.position.x = Math.round(s.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (s.position.y = Math.round(s.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (s.position.z = Math.round(s.position.z / this.translationSnap) * this.translationSnap), s.parent && s.position.sub(xn.setFromMatrixPosition(s.parent.matrixWorld))));
|
|
23587
23603
|
else if (i === "scale") {
|
|
23588
23604
|
if (t.search("XYZ") !== -1) {
|
|
23589
23605
|
let l = this.pointEnd.length() / this.pointStart.length();
|
|
23590
|
-
this.pointEnd.dot(this.pointStart) < 0 && (l *= -1),
|
|
23606
|
+
this.pointEnd.dot(this.pointStart) < 0 && (l *= -1), yr.set(l, l, l);
|
|
23591
23607
|
} else
|
|
23592
|
-
xn.copy(this.pointStart),
|
|
23593
|
-
s.scale.copy(this._scaleStart).multiply(
|
|
23608
|
+
xn.copy(this.pointStart), yr.copy(this.pointEnd), xn.applyQuaternion(this._worldQuaternionInv), yr.applyQuaternion(this._worldQuaternionInv), yr.divide(xn), t.search("X") === -1 && (yr.x = 1), t.search("Y") === -1 && (yr.y = 1), t.search("Z") === -1 && (yr.z = 1);
|
|
23609
|
+
s.scale.copy(this._scaleStart).multiply(yr), this.scaleSnap && (t.search("X") !== -1 && (s.scale.x = Math.round(s.scale.x / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Y") !== -1 && (s.scale.y = Math.round(s.scale.y / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Z") !== -1 && (s.scale.z = Math.round(s.scale.z / this.scaleSnap) * this.scaleSnap || this.scaleSnap));
|
|
23594
23610
|
} else if (i === "rotate") {
|
|
23595
23611
|
this._offset.copy(this.pointEnd).sub(this.pointStart);
|
|
23596
23612
|
const l = 20 / this.worldPosition.distanceTo(xn.setFromMatrixPosition(this.camera.matrixWorld));
|
|
@@ -23620,7 +23636,7 @@ class B2 extends oi {
|
|
|
23620
23636
|
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(Ld), this.dispatchEvent(_0), this.pointStart.copy(this.pointEnd));
|
|
23621
23637
|
}
|
|
23622
23638
|
getRaycaster() {
|
|
23623
|
-
return
|
|
23639
|
+
return ea;
|
|
23624
23640
|
}
|
|
23625
23641
|
// TODO: deprecate
|
|
23626
23642
|
getMode() {
|
|
@@ -23686,7 +23702,7 @@ function Id(n, e, t) {
|
|
|
23686
23702
|
return i[s];
|
|
23687
23703
|
return !1;
|
|
23688
23704
|
}
|
|
23689
|
-
const yh = new Vo(), wi = new G(0, 1, 0), M0 = new G(0, 0, 0), S0 = new nt(), xh = new Ui(), Fh = new Ui(), gs = new G(), A0 = new nt(), Ll = new G(1, 0, 0),
|
|
23705
|
+
const yh = new Vo(), wi = new G(0, 1, 0), M0 = new G(0, 0, 0), S0 = new nt(), xh = new Ui(), Fh = new Ui(), gs = new G(), A0 = new nt(), Ll = new G(1, 0, 0), na = new G(0, 1, 0), Il = new G(0, 0, 1), vh = new G(), xl = new G(), vl = new G();
|
|
23690
23706
|
class V2 extends oi {
|
|
23691
23707
|
constructor() {
|
|
23692
23708
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
|
@@ -23733,7 +23749,7 @@ class V2 extends oi {
|
|
|
23733
23749
|
const C = new sn(75e-4, 75e-4, 0.5, 3);
|
|
23734
23750
|
C.translate(0, 0.25, 0);
|
|
23735
23751
|
function T(ce, de) {
|
|
23736
|
-
const xe = new
|
|
23752
|
+
const xe = new Sr(ce, 75e-4, 3, 64, de * Math.PI * 2);
|
|
23737
23753
|
return xe.rotateY(Math.PI / 2), xe.rotateX(Math.PI / 2), xe;
|
|
23738
23754
|
}
|
|
23739
23755
|
function S() {
|
|
@@ -23837,16 +23853,16 @@ class V2 extends oi {
|
|
|
23837
23853
|
[new fe(new hc(0.25, 10, 8), i)]
|
|
23838
23854
|
],
|
|
23839
23855
|
X: [
|
|
23840
|
-
[new fe(new
|
|
23856
|
+
[new fe(new Sr(0.5, 0.1, 4, 24), i), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
|
|
23841
23857
|
],
|
|
23842
23858
|
Y: [
|
|
23843
|
-
[new fe(new
|
|
23859
|
+
[new fe(new Sr(0.5, 0.1, 4, 24), i), [0, 0, 0], [Math.PI / 2, 0, 0]]
|
|
23844
23860
|
],
|
|
23845
23861
|
Z: [
|
|
23846
|
-
[new fe(new
|
|
23862
|
+
[new fe(new Sr(0.5, 0.1, 4, 24), i), [0, 0, 0], [0, 0, -Math.PI / 2]]
|
|
23847
23863
|
],
|
|
23848
23864
|
E: [
|
|
23849
|
-
[new fe(new
|
|
23865
|
+
[new fe(new Sr(0.75, 0.1, 2, 24), i)]
|
|
23850
23866
|
]
|
|
23851
23867
|
}, k = {
|
|
23852
23868
|
X: [
|
|
@@ -23936,10 +23952,10 @@ class V2 extends oi {
|
|
|
23936
23952
|
a.visible = !0, a.rotation.set(0, 0, 0), a.position.copy(this.worldPosition);
|
|
23937
23953
|
let l;
|
|
23938
23954
|
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") {
|
|
23939
|
-
a.visible = !1, a.name === "AXIS" ? (a.visible = !!this.axis, this.axis === "X" && (Ii.setFromEuler(yh.set(0, 0, 0)), a.quaternion.copy(i).multiply(Ii), Math.abs(wi.copy(Ll).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Y" && (Ii.setFromEuler(yh.set(0, 0, Math.PI / 2)), a.quaternion.copy(i).multiply(Ii), Math.abs(wi.copy(
|
|
23955
|
+
a.visible = !1, a.name === "AXIS" ? (a.visible = !!this.axis, this.axis === "X" && (Ii.setFromEuler(yh.set(0, 0, 0)), a.quaternion.copy(i).multiply(Ii), Math.abs(wi.copy(Ll).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Y" && (Ii.setFromEuler(yh.set(0, 0, Math.PI / 2)), a.quaternion.copy(i).multiply(Ii), Math.abs(wi.copy(na).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Z" && (Ii.setFromEuler(yh.set(0, Math.PI / 2, 0)), a.quaternion.copy(i).multiply(Ii), Math.abs(wi.copy(Il).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "XYZE" && (Ii.setFromEuler(yh.set(0, Math.PI / 2, 0)), wi.copy(this.rotationAxis), a.quaternion.setFromRotationMatrix(S0.lookAt(M0, wi, na)), a.quaternion.multiply(Ii), 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), xn.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), xn.applyQuaternion(this.worldQuaternionStart.clone().invert()), a.scale.copy(xn), 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));
|
|
23940
23956
|
continue;
|
|
23941
23957
|
}
|
|
23942
|
-
a.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (a.name === "X" && Math.abs(wi.copy(Ll).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Y" && Math.abs(wi.copy(
|
|
23958
|
+
a.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (a.name === "X" && Math.abs(wi.copy(Ll).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Y" && Math.abs(wi.copy(na).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Z" && Math.abs(wi.copy(Il).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XY" && Math.abs(wi.copy(Il).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "YZ" && Math.abs(wi.copy(Ll).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XZ" && Math.abs(wi.copy(na).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1)) : this.mode === "rotate" && (xh.copy(i), wi.copy(this.eye).applyQuaternion(Ii.copy(i).invert()), a.name.search("E") !== -1 && a.quaternion.setFromRotationMatrix(S0.lookAt(this.eye, M0, na)), a.name === "X" && (Ii.setFromAxisAngle(Ll, Math.atan2(-wi.y, wi.z)), Ii.multiplyQuaternions(xh, Ii), a.quaternion.copy(Ii)), a.name === "Y" && (Ii.setFromAxisAngle(na, Math.atan2(wi.x, wi.z)), Ii.multiplyQuaternions(xh, Ii), a.quaternion.copy(Ii)), a.name === "Z" && (Ii.setFromAxisAngle(Il, Math.atan2(wi.y, wi.x)), Ii.multiplyQuaternions(xh, Ii), a.quaternion.copy(Ii))), 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) {
|
|
23943
23959
|
return a.name === h;
|
|
23944
23960
|
})) && (a.material.color.setHex(16776960), a.material.opacity = 1);
|
|
23945
23961
|
}
|
|
@@ -23955,7 +23971,7 @@ class H2 extends fe {
|
|
|
23955
23971
|
}
|
|
23956
23972
|
updateMatrixWorld(e) {
|
|
23957
23973
|
let t = this.space;
|
|
23958
|
-
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), vh.copy(Ll).applyQuaternion(t === "local" ? this.worldQuaternion : Fh), xl.copy(
|
|
23974
|
+
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), vh.copy(Ll).applyQuaternion(t === "local" ? this.worldQuaternion : Fh), xl.copy(na).applyQuaternion(t === "local" ? this.worldQuaternion : Fh), vl.copy(Il).applyQuaternion(t === "local" ? this.worldQuaternion : Fh), wi.copy(xl), this.mode) {
|
|
23959
23975
|
case "translate":
|
|
23960
23976
|
case "scale":
|
|
23961
23977
|
switch (this.axis) {
|
|
@@ -24109,13 +24125,13 @@ class Ox {
|
|
|
24109
24125
|
* Copyright 2015-2023 Raoul van Rüschen
|
|
24110
24126
|
* @license Zlib
|
|
24111
24127
|
*/
|
|
24112
|
-
var Z2 = /* @__PURE__ */ new lu(),
|
|
24128
|
+
var Z2 = /* @__PURE__ */ new lu(), xr = null;
|
|
24113
24129
|
function j2() {
|
|
24114
|
-
if (
|
|
24130
|
+
if (xr === null) {
|
|
24115
24131
|
const n = new Float32Array([-1, -1, 0, 3, -1, 0, -1, 3, 0]), e = new Float32Array([0, 0, 2, 0, 0, 2]);
|
|
24116
|
-
|
|
24132
|
+
xr = new Xt(), xr.setAttribute !== void 0 ? (xr.setAttribute("position", new Zt(n, 3)), xr.setAttribute("uv", new Zt(e, 2))) : (xr.addAttribute("position", new Zt(n, 3)), xr.addAttribute("uv", new Zt(e, 2)));
|
|
24117
24133
|
}
|
|
24118
|
-
return
|
|
24134
|
+
return xr;
|
|
24119
24135
|
}
|
|
24120
24136
|
var Nx = class Bx {
|
|
24121
24137
|
/**
|
|
@@ -25681,7 +25697,7 @@ class rP extends pc {
|
|
|
25681
25697
|
}), this.samples = [], this.samplesR = [], this.samplesDenoise = [], this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer), this.configureSampleDependentPasses(), this.configureHalfResTargets(), this.beautyRenderTarget = new wn(this.width, this.height, {
|
|
25682
25698
|
minFilter: Di,
|
|
25683
25699
|
magFilter: mi
|
|
25684
|
-
}), this.beautyRenderTarget.depthTexture = new jf(this.width, this.height,
|
|
25700
|
+
}), this.beautyRenderTarget.depthTexture = new jf(this.width, this.height, tr), this.beautyRenderTarget.depthTexture.format = Or, this.writeTargetInternal = new wn(this.width, this.height, {
|
|
25685
25701
|
minFilter: Di,
|
|
25686
25702
|
magFilter: Di,
|
|
25687
25703
|
depthBuffer: !1
|
|
@@ -25689,7 +25705,7 @@ class rP extends pc {
|
|
|
25689
25705
|
minFilter: Di,
|
|
25690
25706
|
magFilter: Di,
|
|
25691
25707
|
depthBuffer: !1
|
|
25692
|
-
}), this.bluenoise = new ma(sP, 128, 128), this.bluenoise.colorSpace = Yn, this.bluenoise.wrapS =
|
|
25708
|
+
}), this.bluenoise = new ma(sP, 128, 128), this.bluenoise.colorSpace = Yn, this.bluenoise.wrapS = rr, this.bluenoise.wrapT = rr, this.bluenoise.minFilter = mi, this.bluenoise.magFilter = mi, this.bluenoise.needsUpdate = !0, this.lastTime = 0, this._r = new Se(), this._c = new ut();
|
|
25693
25709
|
}
|
|
25694
25710
|
configureHalfResTargets() {
|
|
25695
25711
|
this.configuration.halfRes ? (this.depthDownsampleTarget = /*new THREE.WebGLRenderTarget(this.width / 2, this.height / 2, {
|
|
@@ -25699,7 +25715,7 @@ class rP extends pc {
|
|
|
25699
25715
|
format: THREE.RedFormat,
|
|
25700
25716
|
type: THREE.FloatType
|
|
25701
25717
|
});*/
|
|
25702
|
-
new J1(this.width / 2, this.height / 2, 2), this.depthDownsampleTarget.texture[0].format = Hy, this.depthDownsampleTarget.texture[0].type = Jn, this.depthDownsampleTarget.texture[0].minFilter = mi, this.depthDownsampleTarget.texture[0].magFilter = mi, this.depthDownsampleTarget.texture[0].depthBuffer = !1, this.depthDownsampleTarget.texture[1].format = An, this.depthDownsampleTarget.texture[1].type =
|
|
25718
|
+
new J1(this.width / 2, this.height / 2, 2), this.depthDownsampleTarget.texture[0].format = Hy, this.depthDownsampleTarget.texture[0].type = Jn, this.depthDownsampleTarget.texture[0].minFilter = mi, this.depthDownsampleTarget.texture[0].magFilter = mi, this.depthDownsampleTarget.texture[0].depthBuffer = !1, this.depthDownsampleTarget.texture[1].format = An, this.depthDownsampleTarget.texture[1].type = ar, this.depthDownsampleTarget.texture[1].minFilter = mi, this.depthDownsampleTarget.texture[1].magFilter = mi, this.depthDownsampleTarget.texture[1].depthBuffer = !1, this.depthDownsampleQuad = new bh(new Ci(nP))) : (this.depthDownsampleTarget && (this.depthDownsampleTarget.dispose(), this.depthDownsampleTarget = null), this.depthDownsampleQuad && (this.depthDownsampleQuad.dispose(), this.depthDownsampleQuad = null));
|
|
25703
25719
|
}
|
|
25704
25720
|
configureSampleDependentPasses() {
|
|
25705
25721
|
this.configureAOPass(this.configuration.logarithmicDepthBuffer), this.configureDenoisePass(this.configuration.logarithmicDepthBuffer);
|
|
@@ -25897,7 +25913,7 @@ class lP {
|
|
|
25897
25913
|
constructor(e, t) {
|
|
25898
25914
|
if (this.renderer = e, this._pixelRatio = e.getPixelRatio(), t === void 0) {
|
|
25899
25915
|
const i = e.getSize(new Se());
|
|
25900
|
-
this._width = i.width, this._height = i.height, t = new wn(this._width * this._pixelRatio, this._height * this._pixelRatio, { type:
|
|
25916
|
+
this._width = i.width, this._height = i.height, t = new wn(this._width * this._pixelRatio, this._height * this._pixelRatio, { type: ar }), t.texture.name = "EffectComposer.rt1";
|
|
25901
25917
|
} else
|
|
25902
25918
|
this._width = t.width, this._height = t.height;
|
|
25903
25919
|
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 kx(aP), this.copyPass.material.blending = As, this.clock = new Ix();
|
|
@@ -26407,10 +26423,10 @@ class cP extends pc {
|
|
|
26407
26423
|
constructor(e, t) {
|
|
26408
26424
|
super(), this.edgesRT = new wn(e, t, {
|
|
26409
26425
|
depthBuffer: !1,
|
|
26410
|
-
type:
|
|
26426
|
+
type: ar
|
|
26411
26427
|
}), this.edgesRT.texture.name = "SMAAPass.edges", this.weightsRT = new wn(e, t, {
|
|
26412
26428
|
depthBuffer: !1,
|
|
26413
|
-
type:
|
|
26429
|
+
type: ar
|
|
26414
26430
|
}), this.weightsRT.texture.name = "SMAAPass.weights";
|
|
26415
26431
|
const i = this, s = new Image();
|
|
26416
26432
|
s.src = this.getAreaTexture(), s.onload = function() {
|
|
@@ -26844,7 +26860,7 @@ class yP {
|
|
|
26844
26860
|
//#region Camera
|
|
26845
26861
|
cameraHandler() {
|
|
26846
26862
|
this.viralViewerApi.viralCamera && (this.viralViewerApi.viralCamera.addEventListener(
|
|
26847
|
-
|
|
26863
|
+
Ks.ON_WAKE,
|
|
26848
26864
|
"hide objects",
|
|
26849
26865
|
() => {
|
|
26850
26866
|
for (let e = 0; e < this.viralViewerApi.viralScene.hideables.length; e++) {
|
|
@@ -26854,7 +26870,7 @@ class yP {
|
|
|
26854
26870
|
this.viralViewerApi.viralRenderer.render();
|
|
26855
26871
|
}
|
|
26856
26872
|
), this.viralViewerApi.viralCamera.addEventListener(
|
|
26857
|
-
|
|
26873
|
+
Ks.ON_SLEEP,
|
|
26858
26874
|
"unhide objects",
|
|
26859
26875
|
() => {
|
|
26860
26876
|
for (let e = 0; e < this.viralViewerApi.viralScene.hideables.length; e++) {
|
|
@@ -27892,7 +27908,7 @@ Kn.d = (n, e) => {
|
|
|
27892
27908
|
var ni = {};
|
|
27893
27909
|
(() => {
|
|
27894
27910
|
Kn.d(ni, { HY: () => u, K8: () => i, vF: () => b, jM: () => v, st: () => C, J7: () => yt, KV: () => at, Tl: () => We, gv: () => ae, LR: () => _e, C9: () => Ae, zF: () => je, XL: () => st, uv: () => q, vs: () => V, YJ: () => Ne, i9: () => h, uD: () => l, lV: () => r, Sp: () => s, RJ: () => Pn, SB: () => Cs, TL: () => T, oe: () => S, AB: () => a, dZ: () => B, Gf: () => Je, gK: () => z, BT: () => $, bt: () => F, sX: () => Q });
|
|
27895
|
-
const n = (e = { AdditiveBlending: () => af, Box3: () => di, BufferAttribute: () => Zt, BufferGeometry: () => Xt, CanvasTexture: () => yf, Color: () => ut, DataTexture: () => ma, EventDispatcher: () =>
|
|
27911
|
+
const n = (e = { AdditiveBlending: () => af, Box3: () => di, BufferAttribute: () => Zt, BufferGeometry: () => Xt, CanvasTexture: () => yf, Color: () => ut, DataTexture: () => ma, EventDispatcher: () => Xr, Frustum: () => cc, GLSL3: () => uf, LessEqualDepth: () => jl, LineBasicMaterial: () => ns, LineSegments: () => Ma, LinearFilter: () => Di, Matrix4: () => nt, NearestFilter: () => mi, NoBlending: () => As, Object3D: () => oi, Points: () => sp, RGBAFormat: () => An, RawShaderMaterial: () => Sx, Scene: () => wa, ShaderMaterial: () => Ci, Sphere: () => Qi, Texture: () => Oi, Uint8BufferAttribute: () => c_, Vector2: () => Se, Vector3: () => G, Vector4: () => ai, WebGLRenderTarget: () => wn }, t = {}, Kn.d(t, e), t);
|
|
27896
27912
|
var e, t, i, s, r, a, l, h;
|
|
27897
27913
|
class u extends n.ShaderMaterial {
|
|
27898
27914
|
constructor() {
|
|
@@ -31771,10 +31787,10 @@ function SP() {
|
|
|
31771
31787
|
return o.a.equals(this.a) && o.b.equals(this.b) && o.c.equals(this.c);
|
|
31772
31788
|
}
|
|
31773
31789
|
}
|
|
31774
|
-
let
|
|
31790
|
+
let Vr = 0;
|
|
31775
31791
|
class pn extends O {
|
|
31776
31792
|
constructor() {
|
|
31777
|
-
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value:
|
|
31793
|
+
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: Vr++ }), this.uuid = le(), this.name = "", this.type = "Material", this.blending = 1, this.side = 0, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.blendSrc = 204, this.blendDst = 205, this.blendEquation = 100, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.depthFunc = 3, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = 519, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = 7680, this.stencilZFail = 7680, this.stencilZPass = 7680, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
|
|
31778
31794
|
}
|
|
31779
31795
|
get alphaTest() {
|
|
31780
31796
|
return this._alphaTest;
|
|
@@ -32011,10 +32027,10 @@ function SP() {
|
|
|
32011
32027
|
yellow: 16776960,
|
|
32012
32028
|
yellowgreen: 10145074
|
|
32013
32029
|
}, Ai = { h: 0, s: 0, l: 0 }, Qn = { h: 0, s: 0, l: 0 };
|
|
32014
|
-
function
|
|
32030
|
+
function Hr(P, o, d) {
|
|
32015
32031
|
return d < 0 && (d += 1), d > 1 && (d -= 1), d < 1 / 6 ? P + (o - P) * 6 * d : d < 1 / 2 ? o : d < 2 / 3 ? P + (o - P) * 6 * (2 / 3 - d) : P;
|
|
32016
32032
|
}
|
|
32017
|
-
class
|
|
32033
|
+
class Yr {
|
|
32018
32034
|
constructor(o, d, m) {
|
|
32019
32035
|
return this.isColor = !0, this.r = 1, this.g = 1, this.b = 1, d === void 0 && m === void 0 ? this.set(o) : this.setRGB(o, d, m);
|
|
32020
32036
|
}
|
|
@@ -32035,7 +32051,7 @@ function SP() {
|
|
|
32035
32051
|
this.r = this.g = this.b = m;
|
|
32036
32052
|
else {
|
|
32037
32053
|
const A = m <= 0.5 ? m * (1 + d) : m + d - m * d, R = 2 * m - A;
|
|
32038
|
-
this.r =
|
|
32054
|
+
this.r = Hr(R, A, o + 1 / 3), this.g = Hr(R, A, o), this.b = Hr(R, A, o - 1 / 3);
|
|
32039
32055
|
}
|
|
32040
32056
|
return Oe.toWorkingColorSpace(this, M), this;
|
|
32041
32057
|
}
|
|
@@ -32224,11 +32240,11 @@ function SP() {
|
|
|
32224
32240
|
yield this.r, yield this.g, yield this.b;
|
|
32225
32241
|
}
|
|
32226
32242
|
}
|
|
32227
|
-
const ii = /* @__PURE__ */ new
|
|
32228
|
-
|
|
32243
|
+
const ii = /* @__PURE__ */ new Yr();
|
|
32244
|
+
Yr.NAMES = Rs;
|
|
32229
32245
|
class gu extends pn {
|
|
32230
32246
|
constructor(o) {
|
|
32231
|
-
super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new
|
|
32247
|
+
super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new Yr(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = 0, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(o);
|
|
32232
32248
|
}
|
|
32233
32249
|
copy(o) {
|
|
32234
32250
|
return super.copy(o), this.color.copy(o.color), this.map = o.map, this.lightMap = o.lightMap, this.lightMapIntensity = o.lightMapIntensity, this.aoMap = o.aoMap, this.aoMapIntensity = o.aoMapIntensity, this.specularMap = o.specularMap, this.alphaMap = o.alphaMap, this.envMap = o.envMap, this.combine = o.combine, this.reflectivity = o.reflectivity, this.refractionRatio = o.refractionRatio, this.wireframe = o.wireframe, this.wireframeLinewidth = o.wireframeLinewidth, this.wireframeLinecap = o.wireframeLinecap, this.wireframeLinejoin = o.wireframeLinejoin, this.fog = o.fog, this;
|
|
@@ -32379,7 +32395,7 @@ function SP() {
|
|
|
32379
32395
|
}
|
|
32380
32396
|
}
|
|
32381
32397
|
let bu = 0;
|
|
32382
|
-
const Ti = /* @__PURE__ */ new It(),
|
|
32398
|
+
const Ti = /* @__PURE__ */ new It(), Gr = /* @__PURE__ */ new Rt(), In = /* @__PURE__ */ new V(), xi = /* @__PURE__ */ new Ae(), ss = /* @__PURE__ */ new Ae(), Kt = /* @__PURE__ */ new V();
|
|
32383
32399
|
class Dn extends O {
|
|
32384
32400
|
constructor() {
|
|
32385
32401
|
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: bu++ }), this.uuid = le(), this.name = "", this.type = "BufferGeometry", this.index = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
|
|
@@ -32445,7 +32461,7 @@ function SP() {
|
|
|
32445
32461
|
return Ti.makeScale(o, d, m), this.applyMatrix4(Ti), this;
|
|
32446
32462
|
}
|
|
32447
32463
|
lookAt(o) {
|
|
32448
|
-
return
|
|
32464
|
+
return Gr.lookAt(o), Gr.updateMatrix(), this.applyMatrix4(Gr.matrix), this;
|
|
32449
32465
|
}
|
|
32450
32466
|
center() {
|
|
32451
32467
|
return this.computeBoundingBox(), this.boundingBox.getCenter(In).negate(), this.translate(In.x, In.y, In.z), this;
|
|
@@ -32720,8 +32736,8 @@ function SP() {
|
|
|
32720
32736
|
this.dispatchEvent({ type: "dispose" });
|
|
32721
32737
|
}
|
|
32722
32738
|
}
|
|
32723
|
-
const qo = /* @__PURE__ */ new It(), Yi = /* @__PURE__ */ new ti(), Is = /* @__PURE__ */ new Ve(), Zo = /* @__PURE__ */ new V(), On = /* @__PURE__ */ new V(), Nn = /* @__PURE__ */ new V(), Bn = /* @__PURE__ */ new V(),
|
|
32724
|
-
class
|
|
32739
|
+
const qo = /* @__PURE__ */ new It(), Yi = /* @__PURE__ */ new ti(), Is = /* @__PURE__ */ new Ve(), Zo = /* @__PURE__ */ new V(), On = /* @__PURE__ */ new V(), Nn = /* @__PURE__ */ new V(), Bn = /* @__PURE__ */ new V(), Wr = /* @__PURE__ */ new V(), Ds = /* @__PURE__ */ new V(), Os = /* @__PURE__ */ new me(), Ns = /* @__PURE__ */ new me(), Bs = /* @__PURE__ */ new me(), jo = /* @__PURE__ */ new V(), Ko = /* @__PURE__ */ new V(), $o = /* @__PURE__ */ new V(), zs = /* @__PURE__ */ new V(), Us = /* @__PURE__ */ new V();
|
|
32740
|
+
class cr extends Rt {
|
|
32725
32741
|
constructor(o = new Dn(), d = new gu()) {
|
|
32726
32742
|
super(), this.isMesh = !0, this.type = "Mesh", this.geometry = o, this.material = d, this.updateMorphTargets();
|
|
32727
32743
|
}
|
|
@@ -32752,7 +32768,7 @@ function SP() {
|
|
|
32752
32768
|
Ds.set(0, 0, 0);
|
|
32753
32769
|
for (let D = 0, N = A.length; D < N; D++) {
|
|
32754
32770
|
const U = I[D], Y = A[D];
|
|
32755
|
-
U !== 0 && (
|
|
32771
|
+
U !== 0 && (Wr.fromBufferAttribute(Y, o), R ? Ds.addScaledVector(Wr, U) : Ds.addScaledVector(Wr.sub(d), U));
|
|
32756
32772
|
}
|
|
32757
32773
|
d.add(Ds);
|
|
32758
32774
|
}
|
|
@@ -32940,8 +32956,8 @@ function SP() {
|
|
|
32940
32956
|
return o.meshPerAttribute = this.meshPerAttribute, o.isInstancedBufferAttribute = !0, o;
|
|
32941
32957
|
}
|
|
32942
32958
|
}
|
|
32943
|
-
const zn = /* @__PURE__ */ new It(), el = /* @__PURE__ */ new It(), Fs = [], tl = /* @__PURE__ */ new Ae(), _u = /* @__PURE__ */ new It(), rs = /* @__PURE__ */ new
|
|
32944
|
-
class Mu extends
|
|
32959
|
+
const zn = /* @__PURE__ */ new It(), el = /* @__PURE__ */ new It(), Fs = [], tl = /* @__PURE__ */ new Ae(), _u = /* @__PURE__ */ new It(), rs = /* @__PURE__ */ new cr(), as = /* @__PURE__ */ new Ve();
|
|
32960
|
+
class Mu extends cr {
|
|
32945
32961
|
constructor(o, d, m) {
|
|
32946
32962
|
super(o, d), this.isInstancedMesh = !0, this.instanceMatrix = new Jo(
|
|
32947
32963
|
new Float32Array(m * 16),
|
|
@@ -33245,7 +33261,7 @@ function SP() {
|
|
|
33245
33261
|
A.setAttribute("position", new Xi(M, 3));
|
|
33246
33262
|
let R = new Dn();
|
|
33247
33263
|
R = c(A);
|
|
33248
|
-
const I = new
|
|
33264
|
+
const I = new cr(R, []);
|
|
33249
33265
|
I.userData.MaterialId = m.MaterialIndex, I.userData.Type = 0, o.push(I);
|
|
33250
33266
|
}
|
|
33251
33267
|
return o;
|
|
@@ -33253,7 +33269,7 @@ function SP() {
|
|
|
33253
33269
|
self.addEventListener(
|
|
33254
33270
|
"message",
|
|
33255
33271
|
(P) => {
|
|
33256
|
-
let o = P.data, d = new
|
|
33272
|
+
let o = P.data, d = new cr();
|
|
33257
33273
|
for (let M = 0; M < o.length; M++) {
|
|
33258
33274
|
const A = o[M], R = _(A);
|
|
33259
33275
|
if (!(R.length <= 0))
|
|
@@ -33296,7 +33312,7 @@ function SP() {
|
|
|
33296
33312
|
} else {
|
|
33297
33313
|
let I = new Dn(), D = R.map((U) => U.geometry);
|
|
33298
33314
|
I = gc(D, !0);
|
|
33299
|
-
const N = new
|
|
33315
|
+
const N = new cr(I);
|
|
33300
33316
|
N.userData.MaterialIds = [];
|
|
33301
33317
|
for (let U = 0; U < R.length; U++) {
|
|
33302
33318
|
const Y = R[U];
|
|
@@ -33530,7 +33546,7 @@ class PP {
|
|
|
33530
33546
|
i.Red,
|
|
33531
33547
|
i.Green,
|
|
33532
33548
|
i.Blue
|
|
33533
|
-
), r = new
|
|
33549
|
+
), r = new Br({
|
|
33534
33550
|
color: s,
|
|
33535
33551
|
opacity: i.Opacity,
|
|
33536
33552
|
transparent: i.Opacity != 1,
|
|
@@ -33722,7 +33738,7 @@ class IP {
|
|
|
33722
33738
|
i.Red,
|
|
33723
33739
|
i.Green,
|
|
33724
33740
|
i.Blue
|
|
33725
|
-
), r = new
|
|
33741
|
+
), r = new Br({
|
|
33726
33742
|
color: s,
|
|
33727
33743
|
opacity: i.Opacity,
|
|
33728
33744
|
transparent: i.Opacity != 1,
|
|
@@ -36360,10 +36376,10 @@ function NP() {
|
|
|
36360
36376
|
return c.a.equals(this.a) && c.b.equals(this.b) && c.c.equals(this.c);
|
|
36361
36377
|
}
|
|
36362
36378
|
}
|
|
36363
|
-
let
|
|
36379
|
+
let Vr = 0;
|
|
36364
36380
|
class pn extends O {
|
|
36365
36381
|
constructor() {
|
|
36366
|
-
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value:
|
|
36382
|
+
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: Vr++ }), this.uuid = le(), this.name = "", this.type = "Material", this.blending = 1, this.side = 0, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.blendSrc = 204, this.blendDst = 205, this.blendEquation = 100, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.depthFunc = 3, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = 519, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = 7680, this.stencilZFail = 7680, this.stencilZPass = 7680, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
|
|
36367
36383
|
}
|
|
36368
36384
|
get alphaTest() {
|
|
36369
36385
|
return this._alphaTest;
|
|
@@ -36600,10 +36616,10 @@ function NP() {
|
|
|
36600
36616
|
yellow: 16776960,
|
|
36601
36617
|
yellowgreen: 10145074
|
|
36602
36618
|
}, Ai = { h: 0, s: 0, l: 0 }, Qn = { h: 0, s: 0, l: 0 };
|
|
36603
|
-
function
|
|
36619
|
+
function Hr(Be, c, y) {
|
|
36604
36620
|
return y < 0 && (y += 1), y > 1 && (y -= 1), y < 1 / 6 ? Be + (c - Be) * 6 * y : y < 1 / 2 ? c : y < 2 / 3 ? Be + (c - Be) * 6 * (2 / 3 - y) : Be;
|
|
36605
36621
|
}
|
|
36606
|
-
class
|
|
36622
|
+
class Yr {
|
|
36607
36623
|
constructor(c, y, _) {
|
|
36608
36624
|
return this.isColor = !0, this.r = 1, this.g = 1, this.b = 1, y === void 0 && _ === void 0 ? this.set(c) : this.setRGB(c, y, _);
|
|
36609
36625
|
}
|
|
@@ -36624,7 +36640,7 @@ function NP() {
|
|
|
36624
36640
|
this.r = this.g = this.b = _;
|
|
36625
36641
|
else {
|
|
36626
36642
|
const o = _ <= 0.5 ? _ * (1 + y) : _ + y - _ * y, d = 2 * _ - o;
|
|
36627
|
-
this.r =
|
|
36643
|
+
this.r = Hr(d, o, c + 1 / 3), this.g = Hr(d, o, c), this.b = Hr(d, o, c - 1 / 3);
|
|
36628
36644
|
}
|
|
36629
36645
|
return Oe.toWorkingColorSpace(this, P), this;
|
|
36630
36646
|
}
|
|
@@ -36813,11 +36829,11 @@ function NP() {
|
|
|
36813
36829
|
yield this.r, yield this.g, yield this.b;
|
|
36814
36830
|
}
|
|
36815
36831
|
}
|
|
36816
|
-
const ii = /* @__PURE__ */ new
|
|
36817
|
-
|
|
36832
|
+
const ii = /* @__PURE__ */ new Yr();
|
|
36833
|
+
Yr.NAMES = Rs;
|
|
36818
36834
|
class gu extends pn {
|
|
36819
36835
|
constructor(c) {
|
|
36820
|
-
super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new
|
|
36836
|
+
super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new Yr(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = 0, this.reflectivity = 1, this.refractionRatio = 0.98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(c);
|
|
36821
36837
|
}
|
|
36822
36838
|
copy(c) {
|
|
36823
36839
|
return super.copy(c), this.color.copy(c.color), this.map = c.map, this.lightMap = c.lightMap, this.lightMapIntensity = c.lightMapIntensity, this.aoMap = c.aoMap, this.aoMapIntensity = c.aoMapIntensity, this.specularMap = c.specularMap, this.alphaMap = c.alphaMap, this.envMap = c.envMap, this.combine = c.combine, this.reflectivity = c.reflectivity, this.refractionRatio = c.refractionRatio, this.wireframe = c.wireframe, this.wireframeLinewidth = c.wireframeLinewidth, this.wireframeLinecap = c.wireframeLinecap, this.wireframeLinejoin = c.wireframeLinejoin, this.fog = c.fog, this;
|
|
@@ -36968,7 +36984,7 @@ function NP() {
|
|
|
36968
36984
|
}
|
|
36969
36985
|
}
|
|
36970
36986
|
let bu = 0;
|
|
36971
|
-
const Ti = /* @__PURE__ */ new It(),
|
|
36987
|
+
const Ti = /* @__PURE__ */ new It(), Gr = /* @__PURE__ */ new Rt(), In = /* @__PURE__ */ new V(), xi = /* @__PURE__ */ new Ae(), ss = /* @__PURE__ */ new Ae(), Kt = /* @__PURE__ */ new V();
|
|
36972
36988
|
class Dn extends O {
|
|
36973
36989
|
constructor() {
|
|
36974
36990
|
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: bu++ }), this.uuid = le(), this.name = "", this.type = "BufferGeometry", this.index = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
|
|
@@ -37034,7 +37050,7 @@ function NP() {
|
|
|
37034
37050
|
return Ti.makeScale(c, y, _), this.applyMatrix4(Ti), this;
|
|
37035
37051
|
}
|
|
37036
37052
|
lookAt(c) {
|
|
37037
|
-
return
|
|
37053
|
+
return Gr.lookAt(c), Gr.updateMatrix(), this.applyMatrix4(Gr.matrix), this;
|
|
37038
37054
|
}
|
|
37039
37055
|
center() {
|
|
37040
37056
|
return this.computeBoundingBox(), this.boundingBox.getCenter(In).negate(), this.translate(In.x, In.y, In.z), this;
|
|
@@ -37311,8 +37327,8 @@ function NP() {
|
|
|
37311
37327
|
this.dispatchEvent({ type: "dispose" });
|
|
37312
37328
|
}
|
|
37313
37329
|
}
|
|
37314
|
-
const qo = /* @__PURE__ */ new It(), Yi = /* @__PURE__ */ new ti(), Is = /* @__PURE__ */ new Ve(), Zo = /* @__PURE__ */ new V(), On = /* @__PURE__ */ new V(), Nn = /* @__PURE__ */ new V(), Bn = /* @__PURE__ */ new V(),
|
|
37315
|
-
class
|
|
37330
|
+
const qo = /* @__PURE__ */ new It(), Yi = /* @__PURE__ */ new ti(), Is = /* @__PURE__ */ new Ve(), Zo = /* @__PURE__ */ new V(), On = /* @__PURE__ */ new V(), Nn = /* @__PURE__ */ new V(), Bn = /* @__PURE__ */ new V(), Wr = /* @__PURE__ */ new V(), Ds = /* @__PURE__ */ new V(), Os = /* @__PURE__ */ new me(), Ns = /* @__PURE__ */ new me(), Bs = /* @__PURE__ */ new me(), jo = /* @__PURE__ */ new V(), Ko = /* @__PURE__ */ new V(), $o = /* @__PURE__ */ new V(), zs = /* @__PURE__ */ new V(), Us = /* @__PURE__ */ new V();
|
|
37331
|
+
class cr extends Rt {
|
|
37316
37332
|
constructor(c = new Dn(), y = new gu()) {
|
|
37317
37333
|
super(), this.isMesh = !0, this.type = "Mesh", this.geometry = c, this.material = y, this.updateMorphTargets();
|
|
37318
37334
|
}
|
|
@@ -37343,7 +37359,7 @@ function NP() {
|
|
|
37343
37359
|
Ds.set(0, 0, 0);
|
|
37344
37360
|
for (let M = 0, A = o.length; M < A; M++) {
|
|
37345
37361
|
const R = m[M], I = o[M];
|
|
37346
|
-
R !== 0 && (
|
|
37362
|
+
R !== 0 && (Wr.fromBufferAttribute(I, c), d ? Ds.addScaledVector(Wr, R) : Ds.addScaledVector(Wr.sub(y), R));
|
|
37347
37363
|
}
|
|
37348
37364
|
y.add(Ds);
|
|
37349
37365
|
}
|
|
@@ -37531,8 +37547,8 @@ function NP() {
|
|
|
37531
37547
|
return c.meshPerAttribute = this.meshPerAttribute, c.isInstancedBufferAttribute = !0, c;
|
|
37532
37548
|
}
|
|
37533
37549
|
}
|
|
37534
|
-
const zn = /* @__PURE__ */ new It(), el = /* @__PURE__ */ new It(), Fs = [], tl = /* @__PURE__ */ new Ae(), _u = /* @__PURE__ */ new It(), rs = /* @__PURE__ */ new
|
|
37535
|
-
class Mu extends
|
|
37550
|
+
const zn = /* @__PURE__ */ new It(), el = /* @__PURE__ */ new It(), Fs = [], tl = /* @__PURE__ */ new Ae(), _u = /* @__PURE__ */ new It(), rs = /* @__PURE__ */ new cr(), as = /* @__PURE__ */ new Ve();
|
|
37551
|
+
class Mu extends cr {
|
|
37536
37552
|
constructor(c, y, _) {
|
|
37537
37553
|
super(c, y), this.isInstancedMesh = !0, this.instanceMatrix = new Jo(
|
|
37538
37554
|
new Float32Array(_ * 16),
|
|
@@ -37673,7 +37689,7 @@ class zP {
|
|
|
37673
37689
|
i.Red,
|
|
37674
37690
|
i.Green,
|
|
37675
37691
|
i.Blue
|
|
37676
|
-
), r = new
|
|
37692
|
+
), r = new Br({
|
|
37677
37693
|
color: s,
|
|
37678
37694
|
opacity: i.Opacity,
|
|
37679
37695
|
transparent: i.Opacity != 1,
|
|
@@ -37778,7 +37794,7 @@ class UP {
|
|
|
37778
37794
|
s.Blue
|
|
37779
37795
|
);
|
|
37780
37796
|
r.setAttribute("position", new Zt(l, 3));
|
|
37781
|
-
let u = new
|
|
37797
|
+
let u = new Br({
|
|
37782
37798
|
color: h,
|
|
37783
37799
|
opacity: s.Opacity,
|
|
37784
37800
|
transparent: !0,
|
|
@@ -37804,7 +37820,7 @@ class UP {
|
|
|
37804
37820
|
s.Blue
|
|
37805
37821
|
);
|
|
37806
37822
|
a.setAttribute("position", new Zt(h, 3));
|
|
37807
|
-
let f = new
|
|
37823
|
+
let f = new Br({
|
|
37808
37824
|
color: u,
|
|
37809
37825
|
opacity: s.Opacity,
|
|
37810
37826
|
transparent: !0,
|
|
@@ -38093,7 +38109,7 @@ function L0(n, e) {
|
|
|
38093
38109
|
} else
|
|
38094
38110
|
return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), n;
|
|
38095
38111
|
}
|
|
38096
|
-
class kP extends
|
|
38112
|
+
class kP extends lr {
|
|
38097
38113
|
constructor(e) {
|
|
38098
38114
|
super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(t) {
|
|
38099
38115
|
return new YP(t);
|
|
@@ -38311,7 +38327,7 @@ class XP {
|
|
|
38311
38327
|
default:
|
|
38312
38328
|
throw new Error("THREE.GLTFLoader: Unexpected light type: " + h.type);
|
|
38313
38329
|
}
|
|
38314
|
-
return u.position.set(0, 0, 0), u.decay = 2,
|
|
38330
|
+
return u.position.set(0, 0, 0), u.decay = 2, _r(u, h), h.intensity !== void 0 && (u.intensity = h.intensity), u.name = t.createUniqueName(h.name || "light_" + e), s = Promise.resolve(u), t.cache.add(i, s), s;
|
|
38315
38331
|
}
|
|
38316
38332
|
getDependency(e, t) {
|
|
38317
38333
|
if (e === "light")
|
|
@@ -38788,12 +38804,12 @@ const jn = {
|
|
|
38788
38804
|
9729: Di,
|
|
38789
38805
|
9984: Qh,
|
|
38790
38806
|
9985: Bl,
|
|
38791
|
-
9986:
|
|
38807
|
+
9986: aa,
|
|
38792
38808
|
9987: bs
|
|
38793
38809
|
}, O0 = {
|
|
38794
38810
|
33071: Hn,
|
|
38795
38811
|
33648: Kl,
|
|
38796
|
-
10497:
|
|
38812
|
+
10497: rr
|
|
38797
38813
|
}, Nd = {
|
|
38798
38814
|
SCALAR: 1,
|
|
38799
38815
|
VEC2: 2,
|
|
@@ -38813,7 +38829,7 @@ const jn = {
|
|
|
38813
38829
|
COLOR_0: "color",
|
|
38814
38830
|
WEIGHTS_0: "skinWeight",
|
|
38815
38831
|
JOINTS_0: "skinIndex"
|
|
38816
|
-
},
|
|
38832
|
+
}, vr = {
|
|
38817
38833
|
scale: "scale",
|
|
38818
38834
|
translation: "position",
|
|
38819
38835
|
rotation: "quaternion",
|
|
@@ -38840,11 +38856,11 @@ function uC(n) {
|
|
|
38840
38856
|
side: is
|
|
38841
38857
|
})), n.DefaultMaterial;
|
|
38842
38858
|
}
|
|
38843
|
-
function
|
|
38859
|
+
function ta(n, e, t) {
|
|
38844
38860
|
for (const i in t.extensions)
|
|
38845
38861
|
n[i] === void 0 && (e.userData.gltfExtensions = e.userData.gltfExtensions || {}, e.userData.gltfExtensions[i] = t.extensions[i]);
|
|
38846
38862
|
}
|
|
38847
|
-
function
|
|
38863
|
+
function _r(n, e) {
|
|
38848
38864
|
e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(n.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
|
|
38849
38865
|
}
|
|
38850
38866
|
function dC(n, e, t) {
|
|
@@ -38962,7 +38978,7 @@ class yC {
|
|
|
38962
38978
|
parser: i,
|
|
38963
38979
|
userData: {}
|
|
38964
38980
|
};
|
|
38965
|
-
return
|
|
38981
|
+
return ta(r, l, s), _r(l, s), Promise.all(i._invokeAll(function(h) {
|
|
38966
38982
|
return h.afterRoot && h.afterRoot(l);
|
|
38967
38983
|
})).then(function() {
|
|
38968
38984
|
e(l);
|
|
@@ -39194,7 +39210,7 @@ class yC {
|
|
|
39194
39210
|
const u = this.loadImageSource(t, i).then(function(f) {
|
|
39195
39211
|
f.flipY = !1, f.name = a.name || l.name || "", f.name === "" && typeof l.uri == "string" && l.uri.startsWith("data:image/") === !1 && (f.name = l.uri);
|
|
39196
39212
|
const g = (r.samplers || {})[a.sampler] || {};
|
|
39197
|
-
return f.magFilter = D0[g.magFilter] || Di, f.minFilter = D0[g.minFilter] || bs, f.wrapS = O0[g.wrapS] ||
|
|
39213
|
+
return f.magFilter = D0[g.magFilter] || Di, f.minFilter = D0[g.minFilter] || bs, f.wrapS = O0[g.wrapS] || rr, f.wrapT = O0[g.wrapT] || rr, s.associations.set(f, { textures: e }), f;
|
|
39198
39214
|
}).catch(function() {
|
|
39199
39215
|
return null;
|
|
39200
39216
|
});
|
|
@@ -39319,7 +39335,7 @@ class yC {
|
|
|
39319
39335
|
}
|
|
39320
39336
|
return r.emissiveTexture !== void 0 && a !== Ln && u.push(t.assignTexture(l, "emissiveMap", r.emissiveTexture, Hi)), Promise.all(u).then(function() {
|
|
39321
39337
|
const p = new a(l);
|
|
39322
|
-
return r.name && (p.name = r.name),
|
|
39338
|
+
return r.name && (p.name = r.name), _r(p, r), t.associations.set(p, { materials: e }), r.extensions && ta(s, p, r), p;
|
|
39323
39339
|
});
|
|
39324
39340
|
}
|
|
39325
39341
|
/** When Object3D instances are targeted by animation, they need unique names. */
|
|
@@ -39383,7 +39399,7 @@ class yC {
|
|
|
39383
39399
|
v = new sp(E, C);
|
|
39384
39400
|
else
|
|
39385
39401
|
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + b.mode);
|
|
39386
|
-
Object.keys(v.geometry.morphAttributes).length > 0 && fC(v, r), v.name = t.createUniqueName(r.name || "mesh_" + e),
|
|
39402
|
+
Object.keys(v.geometry.morphAttributes).length > 0 && fC(v, r), v.name = t.createUniqueName(r.name || "mesh_" + e), _r(v, r), b.extensions && ta(s, v, b), t.assignFinalMaterial(v), p.push(v);
|
|
39387
39403
|
}
|
|
39388
39404
|
for (let x = 0, w = p.length; x < w; x++)
|
|
39389
39405
|
t.associations.set(p[x], {
|
|
@@ -39391,9 +39407,9 @@ class yC {
|
|
|
39391
39407
|
primitives: x
|
|
39392
39408
|
});
|
|
39393
39409
|
if (p.length === 1)
|
|
39394
|
-
return r.extensions &&
|
|
39395
|
-
const g = new
|
|
39396
|
-
r.extensions &&
|
|
39410
|
+
return r.extensions && ta(s, p[0], r), p[0];
|
|
39411
|
+
const g = new Tr();
|
|
39412
|
+
r.extensions && ta(s, g, r), t.associations.set(g, { meshes: e });
|
|
39397
39413
|
for (let x = 0, w = p.length; x < w; x++)
|
|
39398
39414
|
g.add(p[x]);
|
|
39399
39415
|
return g;
|
|
@@ -39411,7 +39427,7 @@ class yC {
|
|
|
39411
39427
|
console.warn("THREE.GLTFLoader: Missing camera parameters.");
|
|
39412
39428
|
return;
|
|
39413
39429
|
}
|
|
39414
|
-
return i.type === "perspective" ? t = new un(Wf.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : i.type === "orthographic" && (t = new Ho(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), i.name && (t.name = this.createUniqueName(i.name)),
|
|
39430
|
+
return i.type === "perspective" ? t = new un(Wf.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : i.type === "orthographic" && (t = new Ho(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), i.name && (t.name = this.createUniqueName(i.name)), _r(t, i), Promise.resolve(t);
|
|
39415
39431
|
}
|
|
39416
39432
|
/**
|
|
39417
39433
|
* Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
|
|
@@ -39520,10 +39536,10 @@ class yC {
|
|
|
39520
39536
|
l.push(u);
|
|
39521
39537
|
}), this.nodeCache[e] = Promise.all(l).then(function(u) {
|
|
39522
39538
|
let f;
|
|
39523
|
-
if (r.isBone === !0 ? f = new tp() : u.length > 1 ? f = new
|
|
39539
|
+
if (r.isBone === !0 ? f = new tp() : u.length > 1 ? f = new Tr() : u.length === 1 ? f = u[0] : f = new oi(), f !== u[0])
|
|
39524
39540
|
for (let p = 0, g = u.length; p < g; p++)
|
|
39525
39541
|
f.add(u[p]);
|
|
39526
|
-
if (r.name && (f.userData.name = r.name, f.name = a),
|
|
39542
|
+
if (r.name && (f.userData.name = r.name, f.name = a), _r(f, r), r.extensions && ta(i, f, r), r.matrix !== void 0) {
|
|
39527
39543
|
const p = new nt();
|
|
39528
39544
|
p.fromArray(r.matrix), f.applyMatrix4(p);
|
|
39529
39545
|
} else
|
|
@@ -39537,8 +39553,8 @@ class yC {
|
|
|
39537
39553
|
* @return {Promise<Group>}
|
|
39538
39554
|
*/
|
|
39539
39555
|
loadScene(e) {
|
|
39540
|
-
const t = this.extensions, i = this.json.scenes[e], s = this, r = new
|
|
39541
|
-
i.name && (r.name = s.createUniqueName(i.name)),
|
|
39556
|
+
const t = this.extensions, i = this.json.scenes[e], s = this, r = new Tr();
|
|
39557
|
+
i.name && (r.name = s.createUniqueName(i.name)), _r(r, i), i.extensions && ta(t, r, i);
|
|
39542
39558
|
const a = i.nodes || [], l = [];
|
|
39543
39559
|
for (let h = 0, u = a.length; h < u; h++)
|
|
39544
39560
|
l.push(s.getDependency("node", a[h]));
|
|
@@ -39559,19 +39575,19 @@ class yC {
|
|
|
39559
39575
|
}
|
|
39560
39576
|
_createAnimationTracks(e, t, i, s, r) {
|
|
39561
39577
|
const a = [], l = e.name ? e.name : e.uuid, h = [];
|
|
39562
|
-
|
|
39578
|
+
vr[r.path] === vr.weights ? e.traverse(function(g) {
|
|
39563
39579
|
g.morphTargetInfluences && h.push(g.name ? g.name : g.uuid);
|
|
39564
39580
|
}) : h.push(l);
|
|
39565
39581
|
let u;
|
|
39566
|
-
switch (
|
|
39567
|
-
case
|
|
39582
|
+
switch (vr[r.path]) {
|
|
39583
|
+
case vr.weights:
|
|
39568
39584
|
u = No;
|
|
39569
39585
|
break;
|
|
39570
|
-
case
|
|
39586
|
+
case vr.rotation:
|
|
39571
39587
|
u = Aa;
|
|
39572
39588
|
break;
|
|
39573
|
-
case
|
|
39574
|
-
case
|
|
39589
|
+
case vr.position:
|
|
39590
|
+
case vr.scale:
|
|
39575
39591
|
u = Bo;
|
|
39576
39592
|
break;
|
|
39577
39593
|
default:
|
|
@@ -39590,7 +39606,7 @@ class yC {
|
|
|
39590
39606
|
const f = s.interpolation !== void 0 ? hC[s.interpolation] : Io, p = this._getArrayFromAccessor(i);
|
|
39591
39607
|
for (let g = 0, x = h.length; g < x; g++) {
|
|
39592
39608
|
const w = new u(
|
|
39593
|
-
h[g] + "." +
|
|
39609
|
+
h[g] + "." + vr[r.path],
|
|
39594
39610
|
t.array,
|
|
39595
39611
|
p,
|
|
39596
39612
|
f
|
|
@@ -39674,7 +39690,7 @@ function N0(n, e, t) {
|
|
|
39674
39690
|
});
|
|
39675
39691
|
s.push(a);
|
|
39676
39692
|
}
|
|
39677
|
-
return ui.workingColorSpace !== on && "COLOR_0" in i && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ui.workingColorSpace}" not supported.`),
|
|
39693
|
+
return ui.workingColorSpace !== on && "COLOR_0" in i && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ui.workingColorSpace}" not supported.`), _r(n, e), xC(n, e, t), Promise.all(s).then(function() {
|
|
39678
39694
|
return e.targets !== void 0 ? dC(n, e.targets, t) : n;
|
|
39679
39695
|
});
|
|
39680
39696
|
}
|
|
@@ -39887,7 +39903,7 @@ function LC(n, e) {
|
|
|
39887
39903
|
}
|
|
39888
39904
|
return r;
|
|
39889
39905
|
}
|
|
39890
|
-
const js = 32, IC = (n, e) => n.candidate - e.candidate,
|
|
39906
|
+
const js = 32, IC = (n, e) => n.candidate - e.candidate, br = new Array(js).fill().map(() => ({
|
|
39891
39907
|
count: 0,
|
|
39892
39908
|
bounds: new Float32Array(6),
|
|
39893
39909
|
rightCacheBounds: new Float32Array(6),
|
|
@@ -39907,7 +39923,7 @@ function DC(n, e, t, i, s, r) {
|
|
|
39907
39923
|
for (let g = 0; g < 3; g++) {
|
|
39908
39924
|
const x = e[g], b = (e[g + 3] - x) / js;
|
|
39909
39925
|
if (s < js / 4) {
|
|
39910
|
-
const v = [...
|
|
39926
|
+
const v = [...br];
|
|
39911
39927
|
v.length = s;
|
|
39912
39928
|
let C = 0;
|
|
39913
39929
|
for (let S = f; S < p; S += 6, C++) {
|
|
@@ -39947,7 +39963,7 @@ function DC(n, e, t, i, s, r) {
|
|
|
39947
39963
|
}
|
|
39948
39964
|
} else {
|
|
39949
39965
|
for (let T = 0; T < js; T++) {
|
|
39950
|
-
const S =
|
|
39966
|
+
const S = br[T];
|
|
39951
39967
|
S.count = 0, S.candidate = x + b + T * b;
|
|
39952
39968
|
const B = S.bounds;
|
|
39953
39969
|
for (let z = 0; z < 3; z++)
|
|
@@ -39956,18 +39972,18 @@ function DC(n, e, t, i, s, r) {
|
|
|
39956
39972
|
for (let T = f; T < p; T += 6) {
|
|
39957
39973
|
let z = ~~((t[T + 2 * g] - x) / b);
|
|
39958
39974
|
z >= js && (z = js - 1);
|
|
39959
|
-
const F =
|
|
39975
|
+
const F = br[z];
|
|
39960
39976
|
F.count++, Mh(T, t, F.bounds);
|
|
39961
39977
|
}
|
|
39962
|
-
const v =
|
|
39978
|
+
const v = br[js - 1];
|
|
39963
39979
|
k0(v.bounds, v.rightCacheBounds);
|
|
39964
39980
|
for (let T = js - 2; T >= 0; T--) {
|
|
39965
|
-
const S =
|
|
39981
|
+
const S = br[T], B = br[T + 1];
|
|
39966
39982
|
F0(S.bounds, B.rightCacheBounds, S.rightCacheBounds);
|
|
39967
39983
|
}
|
|
39968
39984
|
let C = 0;
|
|
39969
39985
|
for (let T = 0; T < js - 1; T++) {
|
|
39970
|
-
const S =
|
|
39986
|
+
const S = br[T], B = S.count, z = S.bounds, Q = br[T + 1].rightCacheBounds;
|
|
39971
39987
|
B !== 0 && (C === 0 ? k0(z, Sh) : F0(z, Sh, Sh)), C += B;
|
|
39972
39988
|
let $ = 0, O = 0;
|
|
39973
39989
|
C !== 0 && ($ = _l(Sh) / h);
|
|
@@ -40110,7 +40126,7 @@ function kC(n, e) {
|
|
|
40110
40126
|
}
|
|
40111
40127
|
}
|
|
40112
40128
|
}
|
|
40113
|
-
class
|
|
40129
|
+
class or {
|
|
40114
40130
|
constructor() {
|
|
40115
40131
|
this.min = 1 / 0, this.max = -1 / 0;
|
|
40116
40132
|
}
|
|
@@ -40134,7 +40150,7 @@ class ar {
|
|
|
40134
40150
|
return this.min > e.max || e.min > this.max;
|
|
40135
40151
|
}
|
|
40136
40152
|
}
|
|
40137
|
-
|
|
40153
|
+
or.prototype.setFromBox = function() {
|
|
40138
40154
|
const n = new G();
|
|
40139
40155
|
return function(t, i) {
|
|
40140
40156
|
const s = i.min, r = i.max;
|
|
@@ -40188,7 +40204,7 @@ const FC = function() {
|
|
|
40188
40204
|
}
|
|
40189
40205
|
};
|
|
40190
40206
|
}(), XC = function() {
|
|
40191
|
-
const n = new G(), e = new G(), t = new
|
|
40207
|
+
const n = new G(), e = new G(), t = new er(), i = new nr();
|
|
40192
40208
|
return function(r, a) {
|
|
40193
40209
|
const { radius: l, center: h } = r, { a: u, b: f, c: p } = a;
|
|
40194
40210
|
if (i.start = u, i.end = f, i.closestPointToPoint(h, !0, n).distanceTo(h) <= l || (i.start = u, i.end = p, i.closestPointToPoint(h, !0, n).distanceTo(h) <= l) || (i.start = f, i.end = p, i.closestPointToPoint(h, !0, n).distanceTo(h) <= l))
|
|
@@ -40207,7 +40223,7 @@ function Xd(n) {
|
|
|
40207
40223
|
}
|
|
40208
40224
|
class ds extends fn {
|
|
40209
40225
|
constructor(...e) {
|
|
40210
|
-
super(...e), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new G()), this.satBounds = new Array(4).fill().map(() => new
|
|
40226
|
+
super(...e), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new G()), this.satBounds = new Array(4).fill().map(() => new or()), this.points = [this.a, this.b, this.c], this.sphere = new Qi(), this.plane = new er(), this.needsUpdate = !0;
|
|
40211
40227
|
}
|
|
40212
40228
|
intersectsSphere(e) {
|
|
40213
40229
|
return XC(e, this);
|
|
@@ -40224,7 +40240,7 @@ class ds extends fn {
|
|
|
40224
40240
|
}
|
|
40225
40241
|
}
|
|
40226
40242
|
ds.prototype.closestPointToSegment = function() {
|
|
40227
|
-
const n = new G(), e = new G(), t = new
|
|
40243
|
+
const n = new G(), e = new G(), t = new nr();
|
|
40228
40244
|
return function(s, r = null, a = null) {
|
|
40229
40245
|
const { start: l, end: h } = s, u = this.points;
|
|
40230
40246
|
let f, p = 1 / 0;
|
|
@@ -40236,7 +40252,7 @@ ds.prototype.closestPointToSegment = function() {
|
|
|
40236
40252
|
};
|
|
40237
40253
|
}();
|
|
40238
40254
|
ds.prototype.intersectsTriangle = function() {
|
|
40239
|
-
const n = new ds(), e = new Array(3), t = new Array(3), i = new
|
|
40255
|
+
const n = new ds(), e = new Array(3), t = new Array(3), i = new or(), s = new or(), r = new G(), a = new G(), l = new G(), h = new G(), u = new G(), f = new nr(), p = new nr(), g = new nr(), x = new G();
|
|
40240
40256
|
function w(E, b, v) {
|
|
40241
40257
|
const C = E.points;
|
|
40242
40258
|
let T = 0, S = -1;
|
|
@@ -40316,7 +40332,7 @@ ds.prototype.distanceToPoint = function() {
|
|
|
40316
40332
|
};
|
|
40317
40333
|
}();
|
|
40318
40334
|
ds.prototype.distanceToTriangle = function() {
|
|
40319
|
-
const n = new G(), e = new G(), t = ["a", "b", "c"], i = new
|
|
40335
|
+
const n = new G(), e = new G(), t = ["a", "b", "c"], i = new nr(), s = new nr();
|
|
40320
40336
|
return function(a, l = null, h = null) {
|
|
40321
40337
|
const u = l || h ? i : null;
|
|
40322
40338
|
if (this.intersectsTriangle(a, u))
|
|
@@ -40344,7 +40360,7 @@ ds.prototype.distanceToTriangle = function() {
|
|
|
40344
40360
|
}();
|
|
40345
40361
|
class En {
|
|
40346
40362
|
constructor(e, t, i) {
|
|
40347
|
-
this.isOrientedBox = !0, this.min = new G(), this.max = new G(), this.matrix = new nt(), this.invMatrix = new nt(), this.points = new Array(8).fill().map(() => new G()), this.satAxes = new Array(3).fill().map(() => new G()), this.satBounds = new Array(3).fill().map(() => new
|
|
40363
|
+
this.isOrientedBox = !0, this.min = new G(), this.max = new G(), this.matrix = new nt(), this.invMatrix = new nt(), this.points = new Array(8).fill().map(() => new G()), this.satAxes = new Array(3).fill().map(() => new G()), this.satBounds = new Array(3).fill().map(() => new or()), this.alignedSatBounds = new Array(3).fill().map(() => new or()), this.needsUpdate = !1, e && this.min.copy(e), t && this.max.copy(t), i && this.matrix.copy(i);
|
|
40348
40364
|
}
|
|
40349
40365
|
set(e, t, i) {
|
|
40350
40366
|
this.min.copy(e), this.max.copy(t), this.matrix.copy(i), this.needsUpdate = !0;
|
|
@@ -40372,7 +40388,7 @@ En.prototype.update = /* @__PURE__ */ function() {
|
|
|
40372
40388
|
};
|
|
40373
40389
|
}();
|
|
40374
40390
|
En.prototype.intersectsBox = function() {
|
|
40375
|
-
const n = new
|
|
40391
|
+
const n = new or();
|
|
40376
40392
|
return function(t) {
|
|
40377
40393
|
this.needsUpdate && this.update();
|
|
40378
40394
|
const i = t.min, s = t.max, r = this.satBounds, a = this.satAxes, l = this.alignedSatBounds;
|
|
@@ -40387,7 +40403,7 @@ En.prototype.intersectsBox = function() {
|
|
|
40387
40403
|
};
|
|
40388
40404
|
}();
|
|
40389
40405
|
En.prototype.intersectsTriangle = function() {
|
|
40390
|
-
const n = new ds(), e = new Array(3), t = new
|
|
40406
|
+
const n = new ds(), e = new Array(3), t = new or(), i = new or(), s = new G();
|
|
40391
40407
|
return function(a) {
|
|
40392
40408
|
this.needsUpdate && this.update(), a.isExtendedTriangle ? a.needsUpdate && a.update() : (n.copy(a), n.update(), a = n);
|
|
40393
40409
|
const l = this.satBounds, h = this.satAxes;
|
|
@@ -40426,7 +40442,7 @@ En.prototype.distanceToPoint = function() {
|
|
|
40426
40442
|
};
|
|
40427
40443
|
}();
|
|
40428
40444
|
En.prototype.distanceToBox = function() {
|
|
40429
|
-
const n = ["x", "y", "z"], e = new Array(12).fill().map(() => new
|
|
40445
|
+
const n = ["x", "y", "z"], e = new Array(12).fill().map(() => new nr()), t = new Array(12).fill().map(() => new nr()), i = new G(), s = new G();
|
|
40430
40446
|
return function(a, l = 0, h = null, u = null) {
|
|
40431
40447
|
if (this.needsUpdate && this.update(), this.intersectsBox(a))
|
|
40432
40448
|
return (h || u) && (a.getCenter(s), this.closestPointToPoint(s, i), a.closestPointToPoint(i, s), h && h.copy(i), u && u.copy(s)), 0;
|
|
@@ -40490,16 +40506,16 @@ const an = /* @__PURE__ */ new HC();
|
|
|
40490
40506
|
function us(n, e) {
|
|
40491
40507
|
return e[n + 15] === 65535;
|
|
40492
40508
|
}
|
|
40493
|
-
function
|
|
40509
|
+
function sr(n, e) {
|
|
40494
40510
|
return e[n + 6];
|
|
40495
40511
|
}
|
|
40496
|
-
function
|
|
40512
|
+
function zr(n, e) {
|
|
40497
40513
|
return e[n + 14];
|
|
40498
40514
|
}
|
|
40499
|
-
function
|
|
40515
|
+
function Ur(n) {
|
|
40500
40516
|
return n + 8;
|
|
40501
40517
|
}
|
|
40502
|
-
function
|
|
40518
|
+
function kr(n, e) {
|
|
40503
40519
|
return e[n + 6];
|
|
40504
40520
|
}
|
|
40505
40521
|
function Wx(n, e) {
|
|
@@ -40518,43 +40534,43 @@ class YC {
|
|
|
40518
40534
|
}
|
|
40519
40535
|
}
|
|
40520
40536
|
const Fi = new YC();
|
|
40521
|
-
let
|
|
40537
|
+
let Pr, wo;
|
|
40522
40538
|
const no = [], Th = /* @__PURE__ */ new Gx(() => new di());
|
|
40523
40539
|
function GC(n, e, t, i, s, r) {
|
|
40524
|
-
|
|
40540
|
+
Pr = Th.getPrimitive(), wo = Th.getPrimitive(), no.push(Pr, wo), Fi.setBuffer(n._roots[e]);
|
|
40525
40541
|
const a = Tf(0, n.geometry, t, i, s, r);
|
|
40526
|
-
Fi.clearBuffer(), Th.releasePrimitive(
|
|
40542
|
+
Fi.clearBuffer(), Th.releasePrimitive(Pr), Th.releasePrimitive(wo), no.pop(), no.pop();
|
|
40527
40543
|
const l = no.length;
|
|
40528
|
-
return l > 0 && (wo = no[l - 1],
|
|
40544
|
+
return l > 0 && (wo = no[l - 1], Pr = no[l - 2]), a;
|
|
40529
40545
|
}
|
|
40530
40546
|
function Tf(n, e, t, i, s = null, r = 0, a = 0) {
|
|
40531
40547
|
const { float32Array: l, uint16Array: h, uint32Array: u } = Fi;
|
|
40532
40548
|
let f = n * 2;
|
|
40533
40549
|
if (us(f, h)) {
|
|
40534
|
-
const g =
|
|
40535
|
-
return Gn(n, l,
|
|
40550
|
+
const g = sr(n, u), x = zr(f, h);
|
|
40551
|
+
return Gn(n, l, Pr), i(g, x, !1, a, r + n, Pr);
|
|
40536
40552
|
} else {
|
|
40537
40553
|
let O = function(le) {
|
|
40538
40554
|
const { uint16Array: he, uint32Array: J } = Fi;
|
|
40539
40555
|
let ce = le * 2;
|
|
40540
40556
|
for (; !us(ce, he); )
|
|
40541
|
-
le =
|
|
40542
|
-
return
|
|
40557
|
+
le = Ur(le), ce = le * 2;
|
|
40558
|
+
return sr(le, J);
|
|
40543
40559
|
}, k = function(le) {
|
|
40544
40560
|
const { uint16Array: he, uint32Array: J } = Fi;
|
|
40545
40561
|
let ce = le * 2;
|
|
40546
40562
|
for (; !us(ce, he); )
|
|
40547
|
-
le =
|
|
40548
|
-
return
|
|
40563
|
+
le = kr(le, J), ce = le * 2;
|
|
40564
|
+
return sr(le, J) + zr(ce, he);
|
|
40549
40565
|
};
|
|
40550
|
-
const g =
|
|
40566
|
+
const g = Ur(n), x = kr(n, u);
|
|
40551
40567
|
let w = g, E = x, b, v, C, T;
|
|
40552
|
-
if (s && (C =
|
|
40568
|
+
if (s && (C = Pr, T = wo, Gn(w, l, C), Gn(E, l, T), b = s(C), v = s(T), v < b)) {
|
|
40553
40569
|
w = x, E = g;
|
|
40554
40570
|
const le = b;
|
|
40555
40571
|
b = v, v = le, C = T;
|
|
40556
40572
|
}
|
|
40557
|
-
C || (C =
|
|
40573
|
+
C || (C = Pr, Gn(w, l, C));
|
|
40558
40574
|
const S = us(w * 2, h), B = t(C, S, b, a + 1, r + w);
|
|
40559
40575
|
let z;
|
|
40560
40576
|
if (B === B0) {
|
|
@@ -40708,7 +40724,7 @@ function $C(n, e = null) {
|
|
|
40708
40724
|
}
|
|
40709
40725
|
}
|
|
40710
40726
|
const Y0 = /* @__PURE__ */ new di();
|
|
40711
|
-
function
|
|
40727
|
+
function Fr(n, e, t, i) {
|
|
40712
40728
|
return Gn(n, e, Y0), t.intersectBox(Y0, i);
|
|
40713
40729
|
}
|
|
40714
40730
|
function JC(n, e, t, i, s, r) {
|
|
@@ -40743,13 +40759,13 @@ function iR(n, e, t, i, s) {
|
|
|
40743
40759
|
function Ef(n, e, t, i, s) {
|
|
40744
40760
|
const { float32Array: r, uint16Array: a, uint32Array: l } = Fi, h = n * 2;
|
|
40745
40761
|
if (us(h, a)) {
|
|
40746
|
-
const f =
|
|
40762
|
+
const f = sr(n, l), p = zr(h, a);
|
|
40747
40763
|
ZC(e, t, i, f, p, s);
|
|
40748
40764
|
} else {
|
|
40749
|
-
const f =
|
|
40750
|
-
|
|
40751
|
-
const p =
|
|
40752
|
-
|
|
40765
|
+
const f = Ur(n);
|
|
40766
|
+
Fr(f, r, i, G0) && Ef(f, e, t, i, s);
|
|
40767
|
+
const p = kr(n, l);
|
|
40768
|
+
Fr(p, r, i, G0) && Ef(p, e, t, i, s);
|
|
40753
40769
|
}
|
|
40754
40770
|
}
|
|
40755
40771
|
const W0 = /* @__PURE__ */ new G(), nR = ["x", "y", "z"];
|
|
@@ -40762,13 +40778,13 @@ function Pf(n, e, t, i) {
|
|
|
40762
40778
|
const { float32Array: s, uint16Array: r, uint32Array: a } = Fi;
|
|
40763
40779
|
let l = n * 2;
|
|
40764
40780
|
if (us(l, r)) {
|
|
40765
|
-
const u =
|
|
40781
|
+
const u = sr(n, a), f = zr(l, r);
|
|
40766
40782
|
return jC(e, t, i, u, f);
|
|
40767
40783
|
} else {
|
|
40768
40784
|
const u = Wx(n, a), f = nR[u], g = i.direction[f] >= 0;
|
|
40769
40785
|
let x, w;
|
|
40770
|
-
g ? (x =
|
|
40771
|
-
const b =
|
|
40786
|
+
g ? (x = Ur(n), w = kr(n, a)) : (x = kr(n, a), w = Ur(n));
|
|
40787
|
+
const b = Fr(x, s, i, W0) ? Pf(x, e, t, i) : null;
|
|
40772
40788
|
if (b) {
|
|
40773
40789
|
const T = b.point[f];
|
|
40774
40790
|
if (g ? T <= s[w + u] : (
|
|
@@ -40777,7 +40793,7 @@ function Pf(n, e, t, i) {
|
|
|
40777
40793
|
))
|
|
40778
40794
|
return b;
|
|
40779
40795
|
}
|
|
40780
|
-
const C =
|
|
40796
|
+
const C = Fr(w, s, i, W0) ? Pf(w, e, t, i) : null;
|
|
40781
40797
|
return b && C ? b.distance <= C.distance ? b : C : b || C || null;
|
|
40782
40798
|
}
|
|
40783
40799
|
}
|
|
@@ -40791,7 +40807,7 @@ function Cf(n, e, t, i, s = null) {
|
|
|
40791
40807
|
const { float32Array: r, uint16Array: a, uint32Array: l } = Fi;
|
|
40792
40808
|
let h = n * 2;
|
|
40793
40809
|
if (s === null && (t.boundingBox || t.computeBoundingBox(), Q0.set(t.boundingBox.min, t.boundingBox.max, i), s = Q0), us(h, a)) {
|
|
40794
|
-
const f = e.geometry, p = f.index, g = f.attributes.position, x = t.index, w = t.attributes.position, E =
|
|
40810
|
+
const f = e.geometry, p = f.index, g = f.attributes.position, x = t.index, w = t.attributes.position, E = sr(n, l), b = zr(h, a);
|
|
40795
40811
|
if (Sl.copy(i).invert(), t.boundsTree)
|
|
40796
40812
|
return Gn(n, r, Ih), Ih.matrix.copy(Sl), Ih.needsUpdate = !0, t.boundsTree.shapecast({
|
|
40797
40813
|
intersectsBounds: (C) => Ih.intersectsBox(C),
|
|
@@ -40943,13 +40959,13 @@ function fR(n, e, t, i, s) {
|
|
|
40943
40959
|
function Rf(n, e, t, i, s) {
|
|
40944
40960
|
const { float32Array: r, uint16Array: a, uint32Array: l } = Fi, h = n * 2;
|
|
40945
40961
|
if (us(h, a)) {
|
|
40946
|
-
const f =
|
|
40962
|
+
const f = sr(n, l), p = zr(h, a);
|
|
40947
40963
|
JC(e, t, i, f, p, s);
|
|
40948
40964
|
} else {
|
|
40949
|
-
const f =
|
|
40950
|
-
|
|
40951
|
-
const p =
|
|
40952
|
-
|
|
40965
|
+
const f = Ur(n);
|
|
40966
|
+
Fr(f, r, i, Z0) && Rf(f, e, t, i, s);
|
|
40967
|
+
const p = kr(n, l);
|
|
40968
|
+
Fr(p, r, i, Z0) && Rf(p, e, t, i, s);
|
|
40953
40969
|
}
|
|
40954
40970
|
}
|
|
40955
40971
|
const j0 = /* @__PURE__ */ new G(), pR = ["x", "y", "z"];
|
|
@@ -40962,13 +40978,13 @@ function Lf(n, e, t, i) {
|
|
|
40962
40978
|
const { float32Array: s, uint16Array: r, uint32Array: a } = Fi;
|
|
40963
40979
|
let l = n * 2;
|
|
40964
40980
|
if (us(l, r)) {
|
|
40965
|
-
const u =
|
|
40981
|
+
const u = sr(n, a), f = zr(l, r);
|
|
40966
40982
|
return eR(e, t, i, u, f);
|
|
40967
40983
|
} else {
|
|
40968
40984
|
const u = Wx(n, a), f = pR[u], g = i.direction[f] >= 0;
|
|
40969
40985
|
let x, w;
|
|
40970
|
-
g ? (x =
|
|
40971
|
-
const b =
|
|
40986
|
+
g ? (x = Ur(n), w = kr(n, a)) : (x = kr(n, a), w = Ur(n));
|
|
40987
|
+
const b = Fr(x, s, i, j0) ? Lf(x, e, t, i) : null;
|
|
40972
40988
|
if (b) {
|
|
40973
40989
|
const T = b.point[f];
|
|
40974
40990
|
if (g ? T <= s[w + u] : (
|
|
@@ -40977,7 +40993,7 @@ function Lf(n, e, t, i) {
|
|
|
40977
40993
|
))
|
|
40978
40994
|
return b;
|
|
40979
40995
|
}
|
|
40980
|
-
const C =
|
|
40996
|
+
const C = Fr(w, s, i, j0) ? Lf(w, e, t, i) : null;
|
|
40981
40997
|
return b && C ? b.distance <= C.distance ? b : C : b || C || null;
|
|
40982
40998
|
}
|
|
40983
40999
|
}
|
|
@@ -40991,7 +41007,7 @@ function If(n, e, t, i, s = null) {
|
|
|
40991
41007
|
const { float32Array: r, uint16Array: a, uint32Array: l } = Fi;
|
|
40992
41008
|
let h = n * 2;
|
|
40993
41009
|
if (s === null && (t.boundingBox || t.computeBoundingBox(), K0.set(t.boundingBox.min, t.boundingBox.max, i), s = K0), us(h, a)) {
|
|
40994
|
-
const f = e.geometry, p = f.index, g = f.attributes.position, x = t.index, w = t.attributes.position, E =
|
|
41010
|
+
const f = e.geometry, p = f.index, g = f.attributes.position, x = t.index, w = t.attributes.position, E = sr(n, l), b = zr(h, a);
|
|
40995
41011
|
if (Tl.copy(i).invert(), t.boundsTree)
|
|
40996
41012
|
return Gn(n, r, Nh), Nh.matrix.copy(Tl), Nh.needsUpdate = !0, t.boundsTree.shapecast({
|
|
40997
41013
|
intersectsBounds: (C) => Nh.intersectsBox(C),
|
|
@@ -41324,14 +41340,14 @@ class PR {
|
|
|
41324
41340
|
}
|
|
41325
41341
|
class CR {
|
|
41326
41342
|
constructor(e) {
|
|
41327
|
-
this.viralViewerApi = e, this.hoverMaterial = new
|
|
41343
|
+
this.viralViewerApi = e, this.hoverMaterial = new Br({
|
|
41328
41344
|
color: bn.hexToThreejsColor(kt.secondary),
|
|
41329
41345
|
opacity: 0.7,
|
|
41330
41346
|
transparent: !0,
|
|
41331
41347
|
depthTest: !1,
|
|
41332
41348
|
name: "Render Material",
|
|
41333
41349
|
flatShading: !0
|
|
41334
|
-
}), this.selectedMaterial = new
|
|
41350
|
+
}), this.selectedMaterial = new Br({
|
|
41335
41351
|
color: bn.hexToThreejsColor(kt.secondary),
|
|
41336
41352
|
opacity: 0.7,
|
|
41337
41353
|
transparent: !0,
|
|
@@ -42613,11 +42629,11 @@ export {
|
|
|
42613
42629
|
fu as HTMLUtil,
|
|
42614
42630
|
Sn as LogUtil,
|
|
42615
42631
|
bn as THREEUtil,
|
|
42616
|
-
|
|
42632
|
+
Ks as ViralCameraEventType,
|
|
42617
42633
|
EP as ViralInstancedMesh,
|
|
42618
42634
|
_o as ViralKeyboardEventType,
|
|
42619
42635
|
vn as ViralMouseEventType,
|
|
42620
|
-
|
|
42636
|
+
sa as ViralPoint,
|
|
42621
42637
|
v3 as ViralViewerApi,
|
|
42622
42638
|
l3 as ViralViewerRevitGeometry,
|
|
42623
42639
|
r3 as ViralViewerRevitNoneStructuralGeometry,
|