viral-viewer-2 7.0.8 → 7.1.0
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/{batched-mesh-simplifier-keNCYakv.mjs → batched-mesh-simplifier-BrzQ9Wcy.mjs} +1 -1
- package/dist/components/custom-objects/viral-batched-mesh.d.ts +47 -6
- package/dist/components/custom-objects/viral-instanced-mesh-v2.d.ts +43 -2
- package/dist/components/custom-objects/viral-merged-model.d.ts +8 -1
- package/dist/components/visibility-manager/viral-visibility-manager.d.ts +30 -3
- package/dist/{index-BZ2LjLxN.mjs → index-B8x3D_5L.mjs} +500 -381
- package/dist/index.mjs +1 -1
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ class fs {
|
|
|
26
26
|
this.X = 0, this.Y = 0, this.Z = 0;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
var _i = /* @__PURE__ */ ((s) => (s[s.ON_MOUSE_MOVE = 0] = "ON_MOUSE_MOVE", s[s.ON_MOUSE_DOWN_LEFT = 1] = "ON_MOUSE_DOWN_LEFT", s[s.ON_MOUSE_UP_LEFT = 2] = "ON_MOUSE_UP_LEFT", s[s.ON_MOUSE_DOWN_RIGHT = 3] = "ON_MOUSE_DOWN_RIGHT", s[s.ON_MOUSE_UP_RIGHT = 4] = "ON_MOUSE_UP_RIGHT", s[s.ON_MOUSE_DOUBLE_CLICK = 5] = "ON_MOUSE_DOUBLE_CLICK", s))(_i || {}), Ls = /* @__PURE__ */ ((s) => (s[s.ON_WAKE = 0] = "ON_WAKE", s[s.ON_SLEEP = 1] = "ON_SLEEP", s[s.ON_UPDATE = 2] = "ON_UPDATE", s))(Ls || {}), lo = /* @__PURE__ */ ((s) => (s[s.KEYDOWN = 0] = "KEYDOWN", s[s.KEYUP = 1] = "KEYUP", s))(lo || {}),
|
|
29
|
+
var _i = /* @__PURE__ */ ((s) => (s[s.ON_MOUSE_MOVE = 0] = "ON_MOUSE_MOVE", s[s.ON_MOUSE_DOWN_LEFT = 1] = "ON_MOUSE_DOWN_LEFT", s[s.ON_MOUSE_UP_LEFT = 2] = "ON_MOUSE_UP_LEFT", s[s.ON_MOUSE_DOWN_RIGHT = 3] = "ON_MOUSE_DOWN_RIGHT", s[s.ON_MOUSE_UP_RIGHT = 4] = "ON_MOUSE_UP_RIGHT", s[s.ON_MOUSE_DOUBLE_CLICK = 5] = "ON_MOUSE_DOUBLE_CLICK", s))(_i || {}), Ls = /* @__PURE__ */ ((s) => (s[s.ON_WAKE = 0] = "ON_WAKE", s[s.ON_SLEEP = 1] = "ON_SLEEP", s[s.ON_UPDATE = 2] = "ON_UPDATE", s))(Ls || {}), lo = /* @__PURE__ */ ((s) => (s[s.KEYDOWN = 0] = "KEYDOWN", s[s.KEYUP = 1] = "KEYUP", s))(lo || {}), Mt = /* @__PURE__ */ ((s) => (s[s.LOADED_SCENE = 0] = "LOADED_SCENE", s[s.LOADED_MATERIAL_MANAGER = 1] = "LOADED_MATERIAL_MANAGER", s[s.LOADED_RENDERER = 2] = "LOADED_RENDERER", s[s.LOADED_CAMERA = 3] = "LOADED_CAMERA", s[s.LOADED_CUBE = 4] = "LOADED_CUBE", s[s.LOADED_TOOLS = 5] = "LOADED_TOOLS", s[s.LOADED_SEPERATE_MODEL = 6] = "LOADED_SEPERATE_MODEL", s[s.GENERATED_MERGE_MODEL = 7] = "GENERATED_MERGE_MODEL", s[s.LOADED_DATA = 8] = "LOADED_DATA", s[s.SELECT_ELEMENTS = 9] = "SELECT_ELEMENTS", s[s.UNSELECT_ELEMENTS = 10] = "UNSELECT_ELEMENTS", s))(Mt || {});
|
|
30
30
|
class jr {
|
|
31
31
|
constructor() {
|
|
32
32
|
this.items = {};
|
|
@@ -598,7 +598,7 @@ const { _tr_init: xy, _tr_stored_block: lf, _tr_flush_block: by, _tr_tally: vr,
|
|
|
598
598
|
Z_NO_FLUSH: xr,
|
|
599
599
|
Z_PARTIAL_FLUSH: _y,
|
|
600
600
|
Z_FULL_FLUSH: wy,
|
|
601
|
-
Z_FINISH:
|
|
601
|
+
Z_FINISH: Pn,
|
|
602
602
|
Z_BLOCK: Rm,
|
|
603
603
|
Z_OK: Ui,
|
|
604
604
|
Z_STREAM_END: Dm,
|
|
@@ -674,11 +674,11 @@ const gn = (s) => {
|
|
|
674
674
|
}, Zv = (s, e) => {
|
|
675
675
|
let t = s.pending_buf_size - 5 > s.w_size ? s.w_size : s.pending_buf_size - 5, i, n, r, a = 0, o = s.strm.avail_in;
|
|
676
676
|
do {
|
|
677
|
-
if (i = 65535, r = s.bi_valid + 42 >> 3, s.strm.avail_out < r || (r = s.strm.avail_out - r, n = s.strstart - s.block_start, i > n + s.strm.avail_in && (i = n + s.strm.avail_in), i > r && (i = r), i < t && (i === 0 && e !==
|
|
677
|
+
if (i = 65535, r = s.bi_valid + 42 >> 3, s.strm.avail_out < r || (r = s.strm.avail_out - r, n = s.strstart - s.block_start, i > n + s.strm.avail_in && (i = n + s.strm.avail_in), i > r && (i = r), i < t && (i === 0 && e !== Pn || e === xr || i !== n + s.strm.avail_in)))
|
|
678
678
|
break;
|
|
679
|
-
a = e ===
|
|
679
|
+
a = e === Pn && i === n + s.strm.avail_in ? 1 : 0, lf(s, 0, 0, a), s.pending_buf[s.pending - 4] = i, s.pending_buf[s.pending - 3] = i >> 8, s.pending_buf[s.pending - 2] = ~i, s.pending_buf[s.pending - 1] = ~i >> 8, gn(s.strm), n && (n > i && (n = i), s.strm.output.set(s.window.subarray(s.block_start, s.block_start + n), s.strm.next_out), s.strm.next_out += n, s.strm.avail_out -= n, s.strm.total_out += n, s.block_start += n, i -= n), i && (pf(s.strm, s.strm.output, s.strm.next_out, i), s.strm.next_out += i, s.strm.avail_out -= i, s.strm.total_out += i);
|
|
680
680
|
} while (a === 0);
|
|
681
|
-
return o -= s.strm.avail_in, o && (o >= s.w_size ? (s.matches = 2, s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0), s.strstart = s.w_size, s.insert = s.strstart) : (s.window_size - s.strstart <= o && (s.strstart -= s.w_size, s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0), s.matches < 2 && s.matches++, s.insert > s.strstart && (s.insert = s.strstart)), s.window.set(s.strm.input.subarray(s.strm.next_in - o, s.strm.next_in), s.strstart), s.strstart += o, s.insert += o > s.w_size - s.insert ? s.w_size - s.insert : o), s.block_start = s.strstart), s.high_water < s.strstart && (s.high_water = s.strstart), a ? Ro : e !== xr && e !==
|
|
681
|
+
return o -= s.strm.avail_in, o && (o >= s.w_size ? (s.matches = 2, s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0), s.strstart = s.w_size, s.insert = s.strstart) : (s.window_size - s.strstart <= o && (s.strstart -= s.w_size, s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0), s.matches < 2 && s.matches++, s.insert > s.strstart && (s.insert = s.strstart)), s.window.set(s.strm.input.subarray(s.strm.next_in - o, s.strm.next_in), s.strstart), s.strstart += o, s.insert += o > s.w_size - s.insert ? s.w_size - s.insert : o), s.block_start = s.strstart), s.high_water < s.strstart && (s.high_water = s.strstart), a ? Ro : e !== xr && e !== Pn && s.strm.avail_in === 0 && s.strstart === s.block_start ? Io : (r = s.window_size - s.strstart, s.strm.avail_in > r && s.block_start >= s.w_size && (s.block_start -= s.w_size, s.strstart -= s.w_size, s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0), s.matches < 2 && s.matches++, r += s.w_size, s.insert > s.strstart && (s.insert = s.strstart)), r > s.strm.avail_in && (r = s.strm.avail_in), r && (pf(s.strm, s.window, s.strstart, r), s.strstart += r, s.insert += r > s.w_size - s.insert ? s.w_size - s.insert : r), s.high_water < s.strstart && (s.high_water = s.strstart), r = s.bi_valid + 42 >> 3, r = s.pending_buf_size - r > 65535 ? 65535 : s.pending_buf_size - r, t = r > s.w_size ? s.w_size : r, n = s.strstart - s.block_start, (n >= t || (n || e === Pn) && e !== xr && s.strm.avail_in === 0 && n <= r) && (i = n > r ? r : n, a = e === Pn && s.strm.avail_in === 0 && i === n ? 1 : 0, lf(s, s.block_start, i, a), s.block_start += i, gn(s.strm)), a ? aa : Zi);
|
|
682
682
|
}, Nd = (s, e) => {
|
|
683
683
|
let t, i;
|
|
684
684
|
for (; ; ) {
|
|
@@ -702,7 +702,7 @@ const gn = (s) => {
|
|
|
702
702
|
if (i && (xn(s, !1), s.strm.avail_out === 0))
|
|
703
703
|
return Zi;
|
|
704
704
|
}
|
|
705
|
-
return s.insert = s.strstart < Rt - 1 ? s.strstart : Rt - 1, e ===
|
|
705
|
+
return s.insert = s.strstart < Rt - 1 ? s.strstart : Rt - 1, e === Pn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
|
|
706
706
|
}, ba = (s, e) => {
|
|
707
707
|
let t, i, n;
|
|
708
708
|
for (; ; ) {
|
|
@@ -725,7 +725,7 @@ const gn = (s) => {
|
|
|
725
725
|
} else
|
|
726
726
|
s.match_available = 1, s.strstart++, s.lookahead--;
|
|
727
727
|
}
|
|
728
|
-
return s.match_available && (i = vr(s, 0, s.window[s.strstart - 1]), s.match_available = 0), s.insert = s.strstart < Rt - 1 ? s.strstart : Rt - 1, e ===
|
|
728
|
+
return s.match_available && (i = vr(s, 0, s.window[s.strstart - 1]), s.match_available = 0), s.insert = s.strstart < Rt - 1 ? s.strstart : Rt - 1, e === Pn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
|
|
729
729
|
}, Hy = (s, e) => {
|
|
730
730
|
let t, i, n, r;
|
|
731
731
|
const a = s.window;
|
|
@@ -746,7 +746,7 @@ const gn = (s) => {
|
|
|
746
746
|
if (s.match_length >= Rt ? (t = vr(s, 1, s.match_length - Rt), s.lookahead -= s.match_length, s.strstart += s.match_length, s.match_length = 0) : (t = vr(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++), t && (xn(s, !1), s.strm.avail_out === 0))
|
|
747
747
|
return Zi;
|
|
748
748
|
}
|
|
749
|
-
return s.insert = 0, e ===
|
|
749
|
+
return s.insert = 0, e === Pn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
|
|
750
750
|
}, Yy = (s, e) => {
|
|
751
751
|
let t;
|
|
752
752
|
for (; ; ) {
|
|
@@ -758,7 +758,7 @@ const gn = (s) => {
|
|
|
758
758
|
if (s.match_length = 0, t = vr(s, 0, s.window[s.strstart]), s.lookahead--, s.strstart++, t && (xn(s, !1), s.strm.avail_out === 0))
|
|
759
759
|
return Zi;
|
|
760
760
|
}
|
|
761
|
-
return s.insert = 0, e ===
|
|
761
|
+
return s.insert = 0, e === Pn ? (xn(s, !0), s.strm.avail_out === 0 ? aa : Ro) : s.sym_next && (xn(s, !1), s.strm.avail_out === 0) ? Zi : Io;
|
|
762
762
|
};
|
|
763
763
|
function ns(s, e, t, i, n) {
|
|
764
764
|
this.good_length = s, this.max_lazy = e, this.nice_length = t, this.max_chain = i, this.func = n;
|
|
@@ -824,13 +824,13 @@ const sc = (s) => {
|
|
|
824
824
|
if (sc(s) || e > Rm || e < 0)
|
|
825
825
|
return s ? $r(s, vs) : vs;
|
|
826
826
|
const t = s.state;
|
|
827
|
-
if (!s.output || s.avail_in !== 0 && !s.input || t.status === vl && e !==
|
|
827
|
+
if (!s.output || s.avail_in !== 0 && !s.input || t.status === vl && e !== Pn)
|
|
828
828
|
return $r(s, s.avail_out === 0 ? Od : vs);
|
|
829
829
|
const i = t.last_flush;
|
|
830
830
|
if (t.last_flush = e, t.pending !== 0) {
|
|
831
831
|
if (gn(s), s.avail_out === 0)
|
|
832
832
|
return t.last_flush = -1, Ui;
|
|
833
|
-
} else if (s.avail_in === 0 && Lm(e) <= Lm(i) && e !==
|
|
833
|
+
} else if (s.avail_in === 0 && Lm(e) <= Lm(i) && e !== Pn)
|
|
834
834
|
return $r(s, Od);
|
|
835
835
|
if (t.status === vl && s.avail_in !== 0)
|
|
836
836
|
return $r(s, Od);
|
|
@@ -908,7 +908,7 @@ const sc = (s) => {
|
|
|
908
908
|
if (n === Io && (e === _y ? yy(t) : e !== Rm && (lf(t, 0, 0, !1), e === wy && (hr(t.head), t.lookahead === 0 && (t.strstart = 0, t.block_start = 0, t.insert = 0))), gn(s), s.avail_out === 0))
|
|
909
909
|
return t.last_flush = -1, Ui;
|
|
910
910
|
}
|
|
911
|
-
return e !==
|
|
911
|
+
return e !== Pn ? Ui : t.wrap <= 0 ? Dm : (t.wrap === 2 ? (kt(t, s.adler & 255), kt(t, s.adler >> 8 & 255), kt(t, s.adler >> 16 & 255), kt(t, s.adler >> 24 & 255), kt(t, s.total_in & 255), kt(t, s.total_in >> 8 & 255), kt(t, s.total_in >> 16 & 255), kt(t, s.total_in >> 24 & 255)) : (zo(t, s.adler >>> 16), zo(t, s.adler & 65535)), gn(s), t.wrap > 0 && (t.wrap = -t.wrap), t.pending !== 0 ? Ui : Dm);
|
|
912
912
|
}, Zy = (s) => {
|
|
913
913
|
if (sc(s))
|
|
914
914
|
return vs;
|
|
@@ -1394,7 +1394,7 @@ const I_ = 0, nx = 1, sx = 2, {
|
|
|
1394
1394
|
Z_OK: oa,
|
|
1395
1395
|
Z_STREAM_END: D_,
|
|
1396
1396
|
Z_NEED_DICT: L_,
|
|
1397
|
-
Z_STREAM_ERROR:
|
|
1397
|
+
Z_STREAM_ERROR: Bn,
|
|
1398
1398
|
Z_DATA_ERROR: rx,
|
|
1399
1399
|
Z_MEM_ERROR: ax,
|
|
1400
1400
|
Z_BUF_ERROR: O_,
|
|
@@ -1410,23 +1410,23 @@ const pa = (s) => {
|
|
|
1410
1410
|
return !e || e.strm !== s || e.mode < dd || e.mode > lx ? 1 : 0;
|
|
1411
1411
|
}, cx = (s) => {
|
|
1412
1412
|
if (pa(s))
|
|
1413
|
-
return
|
|
1413
|
+
return Bn;
|
|
1414
1414
|
const e = s.state;
|
|
1415
1415
|
return s.total_in = s.total_out = e.total = 0, s.msg = "", e.wrap && (s.adler = e.wrap & 1), e.mode = dd, e.last = 0, e.havedict = 0, e.flags = -1, e.dmax = 32768, e.head = null, e.hold = 0, e.bits = 0, e.lencode = e.lendyn = new Int32Array(N_), e.distcode = e.distdyn = new Int32Array(B_), e.sane = 1, e.back = -1, oa;
|
|
1416
1416
|
}, hx = (s) => {
|
|
1417
1417
|
if (pa(s))
|
|
1418
|
-
return
|
|
1418
|
+
return Bn;
|
|
1419
1419
|
const e = s.state;
|
|
1420
1420
|
return e.wsize = 0, e.whave = 0, e.wnext = 0, cx(s);
|
|
1421
1421
|
}, dx = (s, e) => {
|
|
1422
1422
|
let t;
|
|
1423
1423
|
if (pa(s))
|
|
1424
|
-
return
|
|
1424
|
+
return Bn;
|
|
1425
1425
|
const i = s.state;
|
|
1426
|
-
return e < 0 ? (t = 0, e = -e) : (t = (e >> 4) + 5, e < 48 && (e &= 15)), e && (e < 8 || e > 15) ?
|
|
1426
|
+
return e < 0 ? (t = 0, e = -e) : (t = (e >> 4) + 5, e < 48 && (e &= 15)), e && (e < 8 || e > 15) ? Bn : (i.window !== null && i.wbits !== e && (i.window = null), i.wrap = t, i.wbits = e, hx(s));
|
|
1427
1427
|
}, ux = (s, e) => {
|
|
1428
1428
|
if (!s)
|
|
1429
|
-
return
|
|
1429
|
+
return Bn;
|
|
1430
1430
|
const t = new z_();
|
|
1431
1431
|
s.state = t, t.strm = s, t.window = null, t.mode = dd;
|
|
1432
1432
|
const i = dx(s, e);
|
|
@@ -1463,7 +1463,7 @@ const V_ = (s) => {
|
|
|
1463
1463
|
new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15])
|
|
1464
1464
|
);
|
|
1465
1465
|
if (pa(s) || !s.output || !s.input && s.avail_in !== 0)
|
|
1466
|
-
return
|
|
1466
|
+
return Bn;
|
|
1467
1467
|
t = s.state, t.mode === Ms && (t.mode = Ud), a = s.next_out, n = s.output, l = s.avail_out, r = s.next_in, i = s.input, o = s.avail_in, c = t.hold, h = t.bits, d = o, u = l, E = oa;
|
|
1468
1468
|
e:
|
|
1469
1469
|
for (; ; )
|
|
@@ -1880,24 +1880,24 @@ const V_ = (s) => {
|
|
|
1880
1880
|
return ax;
|
|
1881
1881
|
case lx:
|
|
1882
1882
|
default:
|
|
1883
|
-
return
|
|
1883
|
+
return Bn;
|
|
1884
1884
|
}
|
|
1885
1885
|
return s.next_out = a, s.avail_out = l, s.next_in = r, s.avail_in = o, t.hold = c, t.bits = h, (t.wsize || u !== s.avail_out && t.mode < ei && (t.mode < zd || e !== Fm)) && fx(s, s.output, s.next_out, u - s.avail_out), d -= s.avail_in, u -= s.avail_out, s.total_in += d, s.total_out += u, t.total += u, t.wrap & 4 && u && (s.adler = t.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/
|
|
1886
1886
|
t.flags ? Ei(t.check, n, u, s.next_out - u) : zl(t.check, n, u, s.next_out - u)), s.data_type = t.bits + (t.last ? 64 : 0) + (t.mode === Ms ? 128 : 0) + (t.mode === mc || t.mode === Fd ? 256 : 0), (d === 0 && u === 0 || e === Fm) && E === oa && (E = O_), E;
|
|
1887
1887
|
}, H_ = (s) => {
|
|
1888
1888
|
if (pa(s))
|
|
1889
|
-
return
|
|
1889
|
+
return Bn;
|
|
1890
1890
|
let e = s.state;
|
|
1891
1891
|
return e.window && (e.window = null), s.state = null, oa;
|
|
1892
1892
|
}, Y_ = (s, e) => {
|
|
1893
1893
|
if (pa(s))
|
|
1894
|
-
return
|
|
1894
|
+
return Bn;
|
|
1895
1895
|
const t = s.state;
|
|
1896
|
-
return t.wrap & 2 ? (t.head = e, e.done = !1, oa) :
|
|
1896
|
+
return t.wrap & 2 ? (t.head = e, e.done = !1, oa) : Bn;
|
|
1897
1897
|
}, G_ = (s, e) => {
|
|
1898
1898
|
const t = e.length;
|
|
1899
1899
|
let i, n, r;
|
|
1900
|
-
return pa(s) || (i = s.state, i.wrap !== 0 && i.mode !== qh) ?
|
|
1900
|
+
return pa(s) || (i = s.state, i.wrap !== 0 && i.mode !== qh) ? Bn : i.mode === qh && (n = 1, n = zl(n, e, t, 0), n !== i.check) ? rx : (r = fx(s, e, t, t), r ? (i.mode = ox, ax) : (i.havedict = 1, oa));
|
|
1901
1901
|
};
|
|
1902
1902
|
var W_ = hx, Q_ = dx, j_ = cx, q_ = k_, Z_ = ux, $_ = X_, K_ = H_, J_ = Y_, ew = G_, tw = "pako inflate (from Nodeca project)", Ns = {
|
|
1903
1903
|
inflateReset: W_,
|
|
@@ -2164,7 +2164,7 @@ let yw = class {
|
|
|
2164
2164
|
};
|
|
2165
2165
|
var Wd;
|
|
2166
2166
|
const _w = "2.9.0", xc = 1 / 8, ww = /Mac/.test((Wd = globalThis == null ? void 0 : globalThis.navigator) === null || Wd === void 0 ? void 0 : Wd.platform);
|
|
2167
|
-
let pt, fg, bc, Qd, sn, _t, Ut, Sa, Ho, ss, rs, Rr, pg, mg,
|
|
2167
|
+
let pt, fg, bc, Qd, sn, _t, Ut, Sa, Ho, ss, rs, Rr, pg, mg, Sn, Yo, Ma, gg, jd, vg, qd, Zd, yc;
|
|
2168
2168
|
class Vs extends yw {
|
|
2169
2169
|
/**
|
|
2170
2170
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
@@ -2207,7 +2207,7 @@ class Vs extends yw {
|
|
|
2207
2207
|
* @category Statics
|
|
2208
2208
|
*/
|
|
2209
2209
|
static install(e) {
|
|
2210
|
-
pt = e.THREE, fg = Object.freeze(new pt.Vector3(0, 0, 0)), bc = Object.freeze(new pt.Vector3(0, 1, 0)), Qd = Object.freeze(new pt.Vector3(0, 0, 1)), sn = new pt.Vector2(), _t = new pt.Vector3(), Ut = new pt.Vector3(), Sa = new pt.Vector3(), Ho = new pt.Vector3(), ss = new pt.Vector3(), rs = new pt.Vector3(), Rr = new pt.Vector3(), pg = new pt.Vector3(), mg = new pt.Vector3(),
|
|
2210
|
+
pt = e.THREE, fg = Object.freeze(new pt.Vector3(0, 0, 0)), bc = Object.freeze(new pt.Vector3(0, 1, 0)), Qd = Object.freeze(new pt.Vector3(0, 0, 1)), sn = new pt.Vector2(), _t = new pt.Vector3(), Ut = new pt.Vector3(), Sa = new pt.Vector3(), Ho = new pt.Vector3(), ss = new pt.Vector3(), rs = new pt.Vector3(), Rr = new pt.Vector3(), pg = new pt.Vector3(), mg = new pt.Vector3(), Sn = new pt.Spherical(), Yo = new pt.Spherical(), Ma = new pt.Box3(), gg = new pt.Box3(), jd = new pt.Sphere(), vg = new pt.Quaternion(), qd = new pt.Quaternion(), Zd = new pt.Matrix4(), yc = new pt.Raycaster();
|
|
2211
2211
|
}
|
|
2212
2212
|
/**
|
|
2213
2213
|
* list all ACTIONs
|
|
@@ -2888,11 +2888,11 @@ class Vs extends yw {
|
|
|
2888
2888
|
lerpLookAt(e, t, i, n, r, a, o, l, c, h, d, u, f, p = !1) {
|
|
2889
2889
|
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = _a.NONE, this._changedDolly = 0;
|
|
2890
2890
|
const v = _t.set(n, r, a), g = Ut.set(e, t, i);
|
|
2891
|
-
|
|
2891
|
+
Sn.setFromVector3(g.sub(v).applyQuaternion(this._yAxisUpSpace));
|
|
2892
2892
|
const m = Sa.set(h, d, u), b = Ut.set(o, l, c);
|
|
2893
2893
|
Yo.setFromVector3(b.sub(m).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(v.lerp(m, f));
|
|
2894
|
-
const x = Yo.theta -
|
|
2895
|
-
this._sphericalEnd.set(
|
|
2894
|
+
const x = Yo.theta - Sn.theta, y = Yo.phi - Sn.phi, _ = Yo.radius - Sn.radius;
|
|
2895
|
+
this._sphericalEnd.set(Sn.radius + _ * f, Sn.phi + y * f, Sn.theta + x * f), this.normalizeRotations(), this._needsUpdate = !0, p || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
|
|
2896
2896
|
const w = !p || Vt(this._target.x, this._targetEnd.x, this.restThreshold) && Vt(this._target.y, this._targetEnd.y, this.restThreshold) && Vt(this._target.z, this._targetEnd.z, this.restThreshold) && Vt(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Vt(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && Vt(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
|
|
2897
2897
|
return this._createOnRestPromise(w);
|
|
2898
2898
|
}
|
|
@@ -3204,7 +3204,7 @@ class Vs extends yw {
|
|
|
3204
3204
|
*/
|
|
3205
3205
|
fromJSON(e, t = !1) {
|
|
3206
3206
|
const i = JSON.parse(e);
|
|
3207
|
-
this.enabled = i.enabled, this.minDistance = i.minDistance, this.maxDistance = Xo(i.maxDistance), this.minZoom = i.minZoom, this.maxZoom = Xo(i.maxZoom), this.minPolarAngle = i.minPolarAngle, this.maxPolarAngle = Xo(i.maxPolarAngle), this.minAzimuthAngle = Xo(i.minAzimuthAngle), this.maxAzimuthAngle = Xo(i.maxAzimuthAngle), this.smoothTime = i.smoothTime, this.draggingSmoothTime = i.draggingSmoothTime, this.dollySpeed = i.dollySpeed, this.truckSpeed = i.truckSpeed, this.dollyToCursor = i.dollyToCursor, this.verticalDragToForward = i.verticalDragToForward, this._target0.fromArray(i.target0), this._position0.fromArray(i.position0), this._zoom0 = i.zoom0, this._focalOffset0.fromArray(i.focalOffset0), this.moveTo(i.target[0], i.target[1], i.target[2], t),
|
|
3207
|
+
this.enabled = i.enabled, this.minDistance = i.minDistance, this.maxDistance = Xo(i.maxDistance), this.minZoom = i.minZoom, this.maxZoom = Xo(i.maxZoom), this.minPolarAngle = i.minPolarAngle, this.maxPolarAngle = Xo(i.maxPolarAngle), this.minAzimuthAngle = Xo(i.minAzimuthAngle), this.maxAzimuthAngle = Xo(i.maxAzimuthAngle), this.smoothTime = i.smoothTime, this.draggingSmoothTime = i.draggingSmoothTime, this.dollySpeed = i.dollySpeed, this.truckSpeed = i.truckSpeed, this.dollyToCursor = i.dollyToCursor, this.verticalDragToForward = i.verticalDragToForward, this._target0.fromArray(i.target0), this._position0.fromArray(i.position0), this._zoom0 = i.zoom0, this._focalOffset0.fromArray(i.focalOffset0), this.moveTo(i.target[0], i.target[1], i.target[2], t), Sn.setFromVector3(_t.fromArray(i.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)), this.rotateTo(Sn.theta, Sn.phi, t), this.dollyTo(Sn.radius, t), this.zoomTo(i.zoom, t), this.setFocalOffset(i.focalOffset[0], i.focalOffset[1], i.focalOffset[2], t), this._needsUpdate = !0;
|
|
3208
3208
|
}
|
|
3209
3209
|
/**
|
|
3210
3210
|
* Attach all internal event handlers to enable drag control.
|
|
@@ -3365,7 +3365,7 @@ class Vs extends yw {
|
|
|
3365
3365
|
* Copyright 2010-2025 Three.js Authors
|
|
3366
3366
|
* SPDX-License-Identifier: MIT
|
|
3367
3367
|
*/
|
|
3368
|
-
const Do = "181", Sw = 0, xg = 1, Mw = 2, gx = 1, Aw = 2, ds = 3,
|
|
3368
|
+
const Do = "181", Sw = 0, xg = 1, Mw = 2, gx = 1, Aw = 2, ds = 3, Un = 0, Ki = 1, fi = 2, $t = 0, ho = 1, Hl = 2, bg = 3, yg = 4, Zh = 5, Qn = 100, Tw = 101, Ew = 102, Pw = 103, Cw = 104, Yl = 200, Iw = 201, Rw = 202, Dw = 203, mf = 204, gf = 205, Rp = 206, Lw = 207, Dp = 208, Ow = 209, Nw = 210, Bw = 211, Uw = 212, Fw = 213, zw = 214, vf = 0, xf = 1, bf = 2, la = 3, yf = 4, _f = 5, wf = 6, Sf = 7, ud = 0, kw = 1, Vw = 2, yr = 0, vx = 1, xx = 2, bx = 3, yx = 4, _x = 5, wx = 6, Sx = 7, _g = "attached", Xw = "detached", Lp = 300, ca = 301, ha = 302, $h = 303, Kh = 304, ac = 306, Jn = 1e3, Zn = 1001, Gl = 1002, Dt = 1003, Op = 1004, io = 1005, jt = 1006, El = 1007, gs = 1008, ys = 1009, Mx = 1010, Ax = 1011, _r = 1012, Np = 1013, $n = 1014, $i = 1015, Ht = 1016, Bp = 1017, Up = 1018, wr = 1020, Tx = 35902, Ex = 35899, Px = 1021, Cx = 1022, Kt = 1023, da = 1026, Sr = 1027, oc = 1028, fd = 1029, Fp = 1030, zp = 1031, kp = 1033, zh = 33776, kh = 33777, Vh = 33778, Xh = 33779, Mf = 35840, Af = 35841, Tf = 35842, Ef = 35843, Pf = 36196, Cf = 37492, If = 37496, Rf = 37808, Df = 37809, Lf = 37810, Of = 37811, Nf = 37812, Bf = 37813, Uf = 37814, Ff = 37815, zf = 37816, kf = 37817, Vf = 37818, Xf = 37819, Hf = 37820, Yf = 37821, Gf = 36492, Wf = 36494, Qf = 36495, jf = 36283, qf = 36284, Zf = 36285, $f = 36286, Hw = 2200, Yw = 2201, Gw = 2202, Wl = 2300, Ql = 2301, $d = 2302, no = 2400, so = 2401, Jh = 2402, Vp = 2500, Ww = 2501, Qw = 0, Ix = 1, Kf = 2, jw = 3200, Rx = 3201, ma = 0, qw = 1, Us = "", Pi = "srgb", Ji = "srgb-linear", ed = "linear", Gt = "srgb", Aa = 7680, wg = 519, Zw = 512, $w = 513, Kw = 514, Dx = 515, Jw = 516, e1 = 517, t1 = 518, i1 = 519, Jf = 35044, ep = "300 es", Cn = 2e3, jl = 2001;
|
|
3369
3369
|
function Lx(s) {
|
|
3370
3370
|
for (let e = s.length - 1; e >= 0; --e)
|
|
3371
3371
|
if (s[e] >= 65535)
|
|
@@ -3488,7 +3488,7 @@ let Ws = class {
|
|
|
3488
3488
|
const zi = ["00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "0a", "0b", "0c", "0d", "0e", "0f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "2a", "2b", "2c", "2d", "2e", "2f", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "3a", "3b", "3c", "3d", "3e", "3f", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "4a", "4b", "4c", "4d", "4e", "4f", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "5a", "5b", "5c", "5d", "5e", "5f", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "6a", "6b", "6c", "6d", "6e", "6f", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "7a", "7b", "7c", "7d", "7e", "7f", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "8a", "8b", "8c", "8d", "8e", "8f", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "9a", "9b", "9c", "9d", "9e", "9f", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "a8", "a9", "aa", "ab", "ac", "ad", "ae", "af", "b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7", "b8", "b9", "ba", "bb", "bc", "bd", "be", "bf", "c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7", "c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf", "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "d8", "d9", "da", "db", "dc", "dd", "de", "df", "e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7", "e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef", "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff"];
|
|
3489
3489
|
let Mg = 1234567;
|
|
3490
3490
|
const uo = Math.PI / 180, bo = 180 / Math.PI;
|
|
3491
|
-
function
|
|
3491
|
+
function On() {
|
|
3492
3492
|
const s = Math.random() * 4294967295 | 0, e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, i = Math.random() * 4294967295 | 0;
|
|
3493
3493
|
return (zi[s & 255] + zi[s >> 8 & 255] + zi[s >> 16 & 255] + zi[s >> 24 & 255] + "-" + zi[e & 255] + zi[e >> 8 & 255] + "-" + zi[e >> 16 & 15 | 64] + zi[e >> 24 & 255] + "-" + zi[t & 63 | 128] + zi[t >> 8 & 255] + "-" + zi[t >> 16 & 255] + zi[t >> 24 & 255] + zi[i & 255] + zi[i >> 8 & 255] + zi[i >> 16 & 255] + zi[i >> 24 & 255]).toLowerCase();
|
|
3494
3494
|
}
|
|
@@ -3624,7 +3624,7 @@ const pd = {
|
|
|
3624
3624
|
* @method
|
|
3625
3625
|
* @return {string} The UUID.
|
|
3626
3626
|
*/
|
|
3627
|
-
generateUUID:
|
|
3627
|
+
generateUUID: On,
|
|
3628
3628
|
/**
|
|
3629
3629
|
* Clamps the given value between min and max.
|
|
3630
3630
|
*
|
|
@@ -6155,7 +6155,7 @@ class Kr {
|
|
|
6155
6155
|
* @param {any} [data=null] - The data definition of a texture.
|
|
6156
6156
|
*/
|
|
6157
6157
|
constructor(e = null) {
|
|
6158
|
-
this.isSource = !0, Object.defineProperty(this, "id", { value: M1++ }), this.uuid =
|
|
6158
|
+
this.isSource = !0, Object.defineProperty(this, "id", { value: M1++ }), this.uuid = On(), this.data = e, this.dataReady = !0, this.version = 0;
|
|
6159
6159
|
}
|
|
6160
6160
|
/**
|
|
6161
6161
|
* Returns the dimensions of the source into the given target vector.
|
|
@@ -6233,7 +6233,7 @@ class ci extends Ws {
|
|
|
6233
6233
|
* @param {string} [colorSpace=NoColorSpace] - The color space.
|
|
6234
6234
|
*/
|
|
6235
6235
|
constructor(e = ci.DEFAULT_IMAGE, t = ci.DEFAULT_MAPPING, i = Zn, n = Zn, r = jt, a = gs, o = Kt, l = ys, c = ci.DEFAULT_ANISOTROPY, h = Us) {
|
|
6236
|
-
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: A1++ }), this.uuid =
|
|
6236
|
+
super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: A1++ }), this.uuid = On(), this.name = "", this.source = new Kr(e), this.mipmaps = [], this.mapping = t, this.channel = 0, this.wrapS = i, this.wrapT = n, this.magFilter = r, this.minFilter = a, this.anisotropy = c, this.format = o, this.internalFormat = null, this.type = l, this.offset = new K(0, 0), this.repeat = new K(1, 1), this.center = new K(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new yt(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = h, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(e && e.depth && e.depth > 1), this.pmremVersion = 0;
|
|
6237
6237
|
}
|
|
6238
6238
|
/**
|
|
6239
6239
|
* The width of the texture in pixels.
|
|
@@ -6434,7 +6434,7 @@ class ci extends Ws {
|
|
|
6434
6434
|
ci.DEFAULT_IMAGE = null;
|
|
6435
6435
|
ci.DEFAULT_MAPPING = Lp;
|
|
6436
6436
|
ci.DEFAULT_ANISOTROPY = 1;
|
|
6437
|
-
class
|
|
6437
|
+
class At {
|
|
6438
6438
|
/**
|
|
6439
6439
|
* Constructs a new 4D vector.
|
|
6440
6440
|
*
|
|
@@ -6444,7 +6444,7 @@ class Mt {
|
|
|
6444
6444
|
* @param {number} [w=1] - The w value of this vector.
|
|
6445
6445
|
*/
|
|
6446
6446
|
constructor(e = 0, t = 0, i = 0, n = 1) {
|
|
6447
|
-
|
|
6447
|
+
At.prototype.isVector4 = !0, this.x = e, this.y = t, this.z = i, this.w = n;
|
|
6448
6448
|
}
|
|
6449
6449
|
/**
|
|
6450
6450
|
* Alias for {@link Vector4#z}.
|
|
@@ -7025,7 +7025,7 @@ class T1 extends Ws {
|
|
|
7025
7025
|
count: 1,
|
|
7026
7026
|
depth: 1,
|
|
7027
7027
|
multiview: !1
|
|
7028
|
-
}, i), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = i.depth, this.scissor = new
|
|
7028
|
+
}, i), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = i.depth, this.scissor = new At(0, 0, e, t), this.scissorTest = !1, this.viewport = new At(0, 0, e, t);
|
|
7029
7029
|
const n = { width: e, height: t, depth: i.depth }, r = new ci(n);
|
|
7030
7030
|
this.textures = [];
|
|
7031
7031
|
const a = i.count;
|
|
@@ -8709,12 +8709,12 @@ class Ce {
|
|
|
8709
8709
|
* @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
|
|
8710
8710
|
* @return {Matrix4} A reference to this matrix.
|
|
8711
8711
|
*/
|
|
8712
|
-
makePerspective(e, t, i, n, r, a, o =
|
|
8712
|
+
makePerspective(e, t, i, n, r, a, o = Cn, l = !1) {
|
|
8713
8713
|
const c = this.elements, h = 2 * r / (t - e), d = 2 * r / (i - n), u = (t + e) / (t - e), f = (i + n) / (i - n);
|
|
8714
8714
|
let p, v;
|
|
8715
8715
|
if (l)
|
|
8716
8716
|
p = r / (a - r), v = a * r / (a - r);
|
|
8717
|
-
else if (o ===
|
|
8717
|
+
else if (o === Cn)
|
|
8718
8718
|
p = -(a + r) / (a - r), v = -2 * a * r / (a - r);
|
|
8719
8719
|
else if (o === jl)
|
|
8720
8720
|
p = -a / (a - r), v = -a * r / (a - r);
|
|
@@ -8736,12 +8736,12 @@ class Ce {
|
|
|
8736
8736
|
* @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
|
|
8737
8737
|
* @return {Matrix4} A reference to this matrix.
|
|
8738
8738
|
*/
|
|
8739
|
-
makeOrthographic(e, t, i, n, r, a, o =
|
|
8739
|
+
makeOrthographic(e, t, i, n, r, a, o = Cn, l = !1) {
|
|
8740
8740
|
const c = this.elements, h = 2 / (t - e), d = 2 / (i - n), u = -(t + e) / (t - e), f = -(i + n) / (i - n);
|
|
8741
8741
|
let p, v;
|
|
8742
8742
|
if (l)
|
|
8743
8743
|
p = 1 / (a - r), v = a / (a - r);
|
|
8744
|
-
else if (o ===
|
|
8744
|
+
else if (o === Cn)
|
|
8745
8745
|
p = -2 / (a - r), v = -(a + r) / (a - r);
|
|
8746
8746
|
else if (o === jl)
|
|
8747
8747
|
p = -1 / (a - r), v = -r / (a - r);
|
|
@@ -9065,7 +9065,7 @@ class Lt extends Ws {
|
|
|
9065
9065
|
* Constructs a new 3D object.
|
|
9066
9066
|
*/
|
|
9067
9067
|
constructor() {
|
|
9068
|
-
super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: R1++ }), this.uuid =
|
|
9068
|
+
super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: R1++ }), this.uuid = On(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = Lt.DEFAULT_UP.clone();
|
|
9069
9069
|
const e = new P(), t = new hn(), i = new ui(), n = new P(1, 1, 1);
|
|
9070
9070
|
function r() {
|
|
9071
9071
|
i.setFromEuler(t, !1);
|
|
@@ -9719,7 +9719,7 @@ class Lt extends Ws {
|
|
|
9719
9719
|
Lt.DEFAULT_UP = /* @__PURE__ */ new P(0, 1, 0);
|
|
9720
9720
|
Lt.DEFAULT_MATRIX_AUTO_UPDATE = !0;
|
|
9721
9721
|
Lt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
|
|
9722
|
-
const Hn = /* @__PURE__ */ new P(), Ps = /* @__PURE__ */ new P(), lu = /* @__PURE__ */ new P(), Cs = /* @__PURE__ */ new P(), La = /* @__PURE__ */ new P(), Oa = /* @__PURE__ */ new P(), Ng = /* @__PURE__ */ new P(), cu = /* @__PURE__ */ new P(), hu = /* @__PURE__ */ new P(), du = /* @__PURE__ */ new P(), uu = /* @__PURE__ */ new
|
|
9722
|
+
const Hn = /* @__PURE__ */ new P(), Ps = /* @__PURE__ */ new P(), lu = /* @__PURE__ */ new P(), Cs = /* @__PURE__ */ new P(), La = /* @__PURE__ */ new P(), Oa = /* @__PURE__ */ new P(), Ng = /* @__PURE__ */ new P(), cu = /* @__PURE__ */ new P(), hu = /* @__PURE__ */ new P(), du = /* @__PURE__ */ new P(), uu = /* @__PURE__ */ new At(), fu = /* @__PURE__ */ new At(), pu = /* @__PURE__ */ new At();
|
|
9723
9723
|
let vn = class to {
|
|
9724
9724
|
/**
|
|
9725
9725
|
* Constructs a new triangle.
|
|
@@ -10635,7 +10635,7 @@ class Li extends Ws {
|
|
|
10635
10635
|
* Constructs a new material.
|
|
10636
10636
|
*/
|
|
10637
10637
|
constructor() {
|
|
10638
|
-
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: N1++ }), this.uuid =
|
|
10638
|
+
super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: N1++ }), this.uuid = On(), this.name = "", this.type = "Material", this.blending = ho, this.side = Un, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = mf, this.blendDst = gf, this.blendEquation = Qn, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new Ie(0, 0, 0), this.blendAlpha = 0, this.depthFunc = la, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = wg, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Aa, this.stencilZFail = Aa, this.stencilZPass = Aa, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
|
|
10639
10639
|
}
|
|
10640
10640
|
/**
|
|
10641
10641
|
* Sets the alpha value to be used when running an alpha test. The material
|
|
@@ -10734,7 +10734,7 @@ class Li extends Ws {
|
|
|
10734
10734
|
generator: "Material.toJSON"
|
|
10735
10735
|
}
|
|
10736
10736
|
};
|
|
10737
|
-
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 !== void 0 && 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.sheenColorMap && this.sheenColorMap.isTexture && (i.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (i.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (i.dispersion = this.dispersion), 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.envMapRotation !== void 0 && (i.envMapRotation = this.envMapRotation.toArray()), 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 !== ho && (i.blending = this.blending), this.side !==
|
|
10737
|
+
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 !== void 0 && 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.sheenColorMap && this.sheenColorMap.isTexture && (i.sheenColorMap = this.sheenColorMap.toJSON(e).uuid), this.sheenRoughnessMap && this.sheenRoughnessMap.isTexture && (i.sheenRoughnessMap = this.sheenRoughnessMap.toJSON(e).uuid), this.dispersion !== void 0 && (i.dispersion = this.dispersion), 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.envMapRotation !== void 0 && (i.envMapRotation = this.envMapRotation.toArray()), 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 !== ho && (i.blending = this.blending), this.side !== Un && (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 !== mf && (i.blendSrc = this.blendSrc), this.blendDst !== gf && (i.blendDst = this.blendDst), this.blendEquation !== Qn && (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 !== la && (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 !== wg && (i.stencilFunc = this.stencilFunc), this.stencilRef !== 0 && (i.stencilRef = this.stencilRef), this.stencilFuncMask !== 255 && (i.stencilFuncMask = this.stencilFuncMask), this.stencilFail !== Aa && (i.stencilFail = this.stencilFail), this.stencilZFail !== Aa && (i.stencilZFail = this.stencilZFail), this.stencilZPass !== Aa && (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);
|
|
10738
10738
|
function n(r) {
|
|
10739
10739
|
const a = [];
|
|
10740
10740
|
for (const o in r) {
|
|
@@ -11186,13 +11186,13 @@ class et extends ot {
|
|
|
11186
11186
|
}
|
|
11187
11187
|
}
|
|
11188
11188
|
let F1 = 0;
|
|
11189
|
-
const
|
|
11189
|
+
const Mn = /* @__PURE__ */ new Ce(), gu = /* @__PURE__ */ new Lt(), Na = /* @__PURE__ */ new P(), mn = /* @__PURE__ */ new ut(), jo = /* @__PURE__ */ new ut(), Ai = /* @__PURE__ */ new P();
|
|
11190
11190
|
class dt extends Ws {
|
|
11191
11191
|
/**
|
|
11192
11192
|
* Constructs a new geometry.
|
|
11193
11193
|
*/
|
|
11194
11194
|
constructor() {
|
|
11195
|
-
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: F1++ }), this.uuid =
|
|
11195
|
+
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: F1++ }), this.uuid = On(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = 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 = {};
|
|
11196
11196
|
}
|
|
11197
11197
|
/**
|
|
11198
11198
|
* Returns the index of this geometry.
|
|
@@ -11321,7 +11321,7 @@ class dt extends Ws {
|
|
|
11321
11321
|
* @return {BufferGeometry} A reference to this instance.
|
|
11322
11322
|
*/
|
|
11323
11323
|
applyQuaternion(e) {
|
|
11324
|
-
return
|
|
11324
|
+
return Mn.makeRotationFromQuaternion(e), this.applyMatrix4(Mn), this;
|
|
11325
11325
|
}
|
|
11326
11326
|
/**
|
|
11327
11327
|
* Rotates the geometry about the X axis. This is typically done as a one time
|
|
@@ -11332,7 +11332,7 @@ class dt extends Ws {
|
|
|
11332
11332
|
* @return {BufferGeometry} A reference to this instance.
|
|
11333
11333
|
*/
|
|
11334
11334
|
rotateX(e) {
|
|
11335
|
-
return
|
|
11335
|
+
return Mn.makeRotationX(e), this.applyMatrix4(Mn), this;
|
|
11336
11336
|
}
|
|
11337
11337
|
/**
|
|
11338
11338
|
* Rotates the geometry about the Y axis. This is typically done as a one time
|
|
@@ -11343,7 +11343,7 @@ class dt extends Ws {
|
|
|
11343
11343
|
* @return {BufferGeometry} A reference to this instance.
|
|
11344
11344
|
*/
|
|
11345
11345
|
rotateY(e) {
|
|
11346
|
-
return
|
|
11346
|
+
return Mn.makeRotationY(e), this.applyMatrix4(Mn), this;
|
|
11347
11347
|
}
|
|
11348
11348
|
/**
|
|
11349
11349
|
* Rotates the geometry about the Z axis. This is typically done as a one time
|
|
@@ -11354,7 +11354,7 @@ class dt extends Ws {
|
|
|
11354
11354
|
* @return {BufferGeometry} A reference to this instance.
|
|
11355
11355
|
*/
|
|
11356
11356
|
rotateZ(e) {
|
|
11357
|
-
return
|
|
11357
|
+
return Mn.makeRotationZ(e), this.applyMatrix4(Mn), this;
|
|
11358
11358
|
}
|
|
11359
11359
|
/**
|
|
11360
11360
|
* Translates the geometry. This is typically done as a one time
|
|
@@ -11367,7 +11367,7 @@ class dt extends Ws {
|
|
|
11367
11367
|
* @return {BufferGeometry} A reference to this instance.
|
|
11368
11368
|
*/
|
|
11369
11369
|
translate(e, t, i) {
|
|
11370
|
-
return
|
|
11370
|
+
return Mn.makeTranslation(e, t, i), this.applyMatrix4(Mn), this;
|
|
11371
11371
|
}
|
|
11372
11372
|
/**
|
|
11373
11373
|
* Scales the geometry. This is typically done as a one time
|
|
@@ -11380,7 +11380,7 @@ class dt extends Ws {
|
|
|
11380
11380
|
* @return {BufferGeometry} A reference to this instance.
|
|
11381
11381
|
*/
|
|
11382
11382
|
scale(e, t, i) {
|
|
11383
|
-
return
|
|
11383
|
+
return Mn.makeScale(e, t, i), this.applyMatrix4(Mn), this;
|
|
11384
11384
|
}
|
|
11385
11385
|
/**
|
|
11386
11386
|
* Rotates the geometry to face a point in 3D space. This is typically done as a one time
|
|
@@ -11818,7 +11818,7 @@ class Q extends Lt {
|
|
|
11818
11818
|
}
|
|
11819
11819
|
function z1(s, e, t, i, n, r, a, o) {
|
|
11820
11820
|
let l;
|
|
11821
|
-
if (e.side === Ki ? l = i.intersectTriangle(a, r, n, !0, o) : l = i.intersectTriangle(n, r, a, e.side ===
|
|
11821
|
+
if (e.side === Ki ? l = i.intersectTriangle(a, r, n, !0, o) : l = i.intersectTriangle(n, r, a, e.side === Un, o), l === null)
|
|
11822
11822
|
return null;
|
|
11823
11823
|
Nc.copy(o), Nc.applyMatrix4(s.matrixWorld);
|
|
11824
11824
|
const c = t.ray.origin.distanceTo(Nc);
|
|
@@ -12006,7 +12006,7 @@ class Yp extends Lt {
|
|
|
12006
12006
|
* Constructs a new camera.
|
|
12007
12007
|
*/
|
|
12008
12008
|
constructor() {
|
|
12009
|
-
super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new Ce(), this.projectionMatrix = new Ce(), this.projectionMatrixInverse = new Ce(), this.coordinateSystem =
|
|
12009
|
+
super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new Ce(), this.projectionMatrix = new Ce(), this.projectionMatrixInverse = new Ce(), this.coordinateSystem = Cn, this._reversedDepth = !1;
|
|
12010
12010
|
}
|
|
12011
12011
|
/**
|
|
12012
12012
|
* The flag that indicates whether the camera uses a reversed depth buffer.
|
|
@@ -12240,7 +12240,7 @@ let H1 = class extends Lt {
|
|
|
12240
12240
|
const e = this.coordinateSystem, t = this.children.concat(), [i, n, r, a, o, l] = t;
|
|
12241
12241
|
for (const c of t)
|
|
12242
12242
|
this.remove(c);
|
|
12243
|
-
if (e ===
|
|
12243
|
+
if (e === Cn)
|
|
12244
12244
|
i.up.set(0, 1, 0), i.lookAt(1, 0, 0), n.up.set(0, 1, 0), n.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), o.up.set(0, 1, 0), o.lookAt(0, 0, 1), l.up.set(0, 1, 0), l.lookAt(0, 0, -1);
|
|
12245
12245
|
else if (e === jl)
|
|
12246
12246
|
i.up.set(0, -1, 0), i.lookAt(-1, 0, 0), n.up.set(0, -1, 0), n.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), o.up.set(0, -1, 0), o.lookAt(0, 0, 1), l.up.set(0, -1, 0), l.lookAt(0, 0, -1);
|
|
@@ -12605,7 +12605,7 @@ class gd {
|
|
|
12605
12605
|
* @param {number} stride - The number of typed-array elements per vertex.
|
|
12606
12606
|
*/
|
|
12607
12607
|
constructor(e, t) {
|
|
12608
|
-
this.isInterleavedBuffer = !0, this.array = e, this.stride = t, this.count = e !== void 0 ? e.length / t : 0, this.usage = Jf, this.updateRanges = [], this.version = 0, this.uuid =
|
|
12608
|
+
this.isInterleavedBuffer = !0, this.array = e, this.stride = t, this.count = e !== void 0 ? e.length / t : 0, this.usage = Jf, this.updateRanges = [], this.version = 0, this.uuid = On();
|
|
12609
12609
|
}
|
|
12610
12610
|
/**
|
|
12611
12611
|
* A callback function that is executed after the renderer has transferred the attribute array
|
|
@@ -12690,7 +12690,7 @@ class gd {
|
|
|
12690
12690
|
* @return {InterleavedBuffer} A clone of this instance.
|
|
12691
12691
|
*/
|
|
12692
12692
|
clone(e) {
|
|
12693
|
-
e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid =
|
|
12693
|
+
e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = On()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer);
|
|
12694
12694
|
const t = new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]), i = new this.constructor(t, this.stride);
|
|
12695
12695
|
return i.setUsage(this.usage), i;
|
|
12696
12696
|
}
|
|
@@ -12712,7 +12712,7 @@ class gd {
|
|
|
12712
12712
|
* @return {Object} A JSON object representing the serialized interleaved buffer.
|
|
12713
12713
|
*/
|
|
12714
12714
|
toJSON(e) {
|
|
12715
|
-
return e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid =
|
|
12715
|
+
return e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = On()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = Array.from(new Uint32Array(this.array.buffer))), {
|
|
12716
12716
|
uuid: this.uuid,
|
|
12717
12717
|
buffer: this.array.buffer._uuid,
|
|
12718
12718
|
type: this.array.constructor.name,
|
|
@@ -13216,7 +13216,7 @@ class kx extends Lt {
|
|
|
13216
13216
|
return t;
|
|
13217
13217
|
}
|
|
13218
13218
|
}
|
|
13219
|
-
const Yg = /* @__PURE__ */ new P(), Gg = /* @__PURE__ */ new
|
|
13219
|
+
const Yg = /* @__PURE__ */ new P(), Gg = /* @__PURE__ */ new At(), Wg = /* @__PURE__ */ new At(), W1 = /* @__PURE__ */ new P(), Qg = /* @__PURE__ */ new Ce(), Vc = /* @__PURE__ */ new P(), yu = /* @__PURE__ */ new ni(), jg = /* @__PURE__ */ new Ce(), _u = /* @__PURE__ */ new Lo();
|
|
13220
13220
|
class Vx extends Q {
|
|
13221
13221
|
/**
|
|
13222
13222
|
* Constructs a new skinned mesh.
|
|
@@ -13284,7 +13284,7 @@ class Vx extends Q {
|
|
|
13284
13284
|
* in the skinned mesh's geometry.
|
|
13285
13285
|
*/
|
|
13286
13286
|
normalizeSkinWeights() {
|
|
13287
|
-
const e = new
|
|
13287
|
+
const e = new At(), t = this.geometry.attributes.skinWeight;
|
|
13288
13288
|
for (let i = 0, n = t.count; i < n; i++) {
|
|
13289
13289
|
e.fromBufferAttribute(t, i);
|
|
13290
13290
|
const r = 1 / e.manhattanLength();
|
|
@@ -13324,7 +13324,7 @@ class Qp extends Lt {
|
|
|
13324
13324
|
super(), this.isBone = !0, this.type = "Bone";
|
|
13325
13325
|
}
|
|
13326
13326
|
}
|
|
13327
|
-
class
|
|
13327
|
+
class Nn extends ci {
|
|
13328
13328
|
/**
|
|
13329
13329
|
* Constructs a new data texture.
|
|
13330
13330
|
*
|
|
@@ -13355,7 +13355,7 @@ class vd {
|
|
|
13355
13355
|
* If not provided, these matrices will be computed automatically via {@link Skeleton#calculateInverses}.
|
|
13356
13356
|
*/
|
|
13357
13357
|
constructor(e = [], t = []) {
|
|
13358
|
-
this.uuid =
|
|
13358
|
+
this.uuid = On(), this.bones = e.slice(0), this.boneInverses = t, this.boneMatrices = null, this.boneTexture = null, this.init();
|
|
13359
13359
|
}
|
|
13360
13360
|
/**
|
|
13361
13361
|
* Initializes the skeleton. This method gets automatically called by the constructor
|
|
@@ -13425,7 +13425,7 @@ class vd {
|
|
|
13425
13425
|
e = Math.ceil(e / 4) * 4, e = Math.max(e, 4);
|
|
13426
13426
|
const t = new Float32Array(e * e * 4);
|
|
13427
13427
|
t.set(this.boneMatrices);
|
|
13428
|
-
const i = new
|
|
13428
|
+
const i = new Nn(t, e, e, Kt, $i);
|
|
13429
13429
|
return i.needsUpdate = !0, this.boneMatrices = t, this.boneTexture = i, this;
|
|
13430
13430
|
}
|
|
13431
13431
|
/**
|
|
@@ -13622,7 +13622,7 @@ class Hs extends Q {
|
|
|
13622
13622
|
*/
|
|
13623
13623
|
setMorphAt(e, t) {
|
|
13624
13624
|
const i = t.morphTargetInfluences, n = i.length + 1;
|
|
13625
|
-
this.morphTexture === null && (this.morphTexture = new
|
|
13625
|
+
this.morphTexture === null && (this.morphTexture = new Nn(new Float32Array(n * this.count), n, this.count, oc, $i));
|
|
13626
13626
|
const r = this.morphTexture.source.data.data;
|
|
13627
13627
|
let a = 0;
|
|
13628
13628
|
for (let c = 0; c < i.length; c++)
|
|
@@ -13901,11 +13901,11 @@ class Oo {
|
|
|
13901
13901
|
* @param {boolean} [reversedDepth=false] - Whether to use a reversed depth.
|
|
13902
13902
|
* @return {Frustum} A reference to this frustum.
|
|
13903
13903
|
*/
|
|
13904
|
-
setFromProjectionMatrix(e, t =
|
|
13904
|
+
setFromProjectionMatrix(e, t = Cn, i = !1) {
|
|
13905
13905
|
const n = this.planes, r = e.elements, a = r[0], o = r[1], l = r[2], c = r[3], h = r[4], d = r[5], u = r[6], f = r[7], p = r[8], v = r[9], g = r[10], m = r[11], b = r[12], x = r[13], y = r[14], _ = r[15];
|
|
13906
13906
|
if (n[0].setComponents(c - a, f - h, m - p, _ - b).normalize(), n[1].setComponents(c + a, f + h, m + p, _ + b).normalize(), n[2].setComponents(c + o, f + d, m + v, _ + x).normalize(), n[3].setComponents(c - o, f - d, m - v, _ - x).normalize(), i)
|
|
13907
13907
|
n[4].setComponents(l, u, g, y).normalize(), n[5].setComponents(c - l, f - u, m - g, _ - y).normalize();
|
|
13908
|
-
else if (n[4].setComponents(c - l, f - u, m - g, _ - y).normalize(), t ===
|
|
13908
|
+
else if (n[4].setComponents(c - l, f - u, m - g, _ - y).normalize(), t === Cn)
|
|
13909
13909
|
n[5].setComponents(c + l, f + u, m + g, _ + y).normalize();
|
|
13910
13910
|
else if (t === jl)
|
|
13911
13911
|
n[5].setComponents(l, u, g, y).normalize();
|
|
@@ -13998,7 +13998,7 @@ class jp {
|
|
|
13998
13998
|
*
|
|
13999
13999
|
*/
|
|
14000
14000
|
constructor() {
|
|
14001
|
-
this.coordinateSystem =
|
|
14001
|
+
this.coordinateSystem = Cn;
|
|
14002
14002
|
}
|
|
14003
14003
|
/**
|
|
14004
14004
|
* Returns `true` if the 3D object's bounding sphere is intersecting any frustum
|
|
@@ -14235,19 +14235,19 @@ class Xx extends Q {
|
|
|
14235
14235
|
_initMatricesTexture() {
|
|
14236
14236
|
let e = Math.sqrt(this._maxInstanceCount * 4);
|
|
14237
14237
|
e = Math.ceil(e / 4) * 4, e = Math.max(e, 4);
|
|
14238
|
-
const t = new Float32Array(e * e * 4), i = new
|
|
14238
|
+
const t = new Float32Array(e * e * 4), i = new Nn(t, e, e, Kt, $i);
|
|
14239
14239
|
this._matricesTexture = i;
|
|
14240
14240
|
}
|
|
14241
14241
|
_initIndirectTexture() {
|
|
14242
14242
|
let e = Math.sqrt(this._maxInstanceCount);
|
|
14243
14243
|
e = Math.ceil(e);
|
|
14244
|
-
const t = new Uint32Array(e * e), i = new
|
|
14244
|
+
const t = new Uint32Array(e * e), i = new Nn(t, e, e, fd, $n);
|
|
14245
14245
|
this._indirectTexture = i;
|
|
14246
14246
|
}
|
|
14247
14247
|
_initColorsTexture() {
|
|
14248
14248
|
let e = Math.sqrt(this._maxInstanceCount);
|
|
14249
14249
|
e = Math.ceil(e);
|
|
14250
|
-
const t = new Float32Array(e * e * 4).fill(1), i = new
|
|
14250
|
+
const t = new Float32Array(e * e * 4).fill(1), i = new Nn(t, e, e, Kt, $i);
|
|
14251
14251
|
i.colorSpace = It.workingColorSpace, this._colorsTexture = i;
|
|
14252
14252
|
}
|
|
14253
14253
|
_initializeGeometry(e) {
|
|
@@ -16641,7 +16641,7 @@ class tm extends o0 {
|
|
|
16641
16641
|
* @param {Array<Vector2>} [points] - An array of 2D points defining the shape.
|
|
16642
16642
|
*/
|
|
16643
16643
|
constructor(e) {
|
|
16644
|
-
super(e), this.uuid =
|
|
16644
|
+
super(e), this.uuid = On(), this.type = "Shape", this.holes = [];
|
|
16645
16645
|
}
|
|
16646
16646
|
/**
|
|
16647
16647
|
* Returns an array representing each contour of the holes
|
|
@@ -19049,7 +19049,7 @@ class ad {
|
|
|
19049
19049
|
* is blended/combined when two or more animations are simultaneously played.
|
|
19050
19050
|
*/
|
|
19051
19051
|
constructor(e = "", t = -1, i = [], n = Vp) {
|
|
19052
|
-
this.name = e, this.tracks = i, this.duration = t, this.blendMode = n, this.uuid =
|
|
19052
|
+
this.name = e, this.tracks = i, this.duration = t, this.blendMode = n, this.uuid = On(), this.userData = {}, this.duration < 0 && this.resetDuration();
|
|
19053
19053
|
}
|
|
19054
19054
|
/**
|
|
19055
19055
|
* Factory method for creating an animation clip from the given JSON.
|
|
@@ -19829,7 +19829,7 @@ class um {
|
|
|
19829
19829
|
*/
|
|
19830
19830
|
constructor(e) {
|
|
19831
19831
|
this.camera = e, this.intensity = 1, this.bias = 0, this.normalBias = 0, this.radius = 1, this.blurSamples = 8, this.mapSize = new K(512, 512), this.mapType = ys, this.map = null, this.mapPass = null, this.matrix = new Ce(), this.autoUpdate = !0, this.needsUpdate = !1, this._frustum = new Oo(), this._frameExtents = new K(1, 1), this._viewportCount = 1, this._viewports = [
|
|
19832
|
-
new
|
|
19832
|
+
new At(0, 0, 1, 1)
|
|
19833
19833
|
];
|
|
19834
19834
|
}
|
|
19835
19835
|
/**
|
|
@@ -20012,17 +20012,17 @@ class eM extends um {
|
|
|
20012
20012
|
// Z - Positive z direction
|
|
20013
20013
|
// z - Negative z direction
|
|
20014
20014
|
// positive X
|
|
20015
|
-
new
|
|
20015
|
+
new At(2, 1, 1, 1),
|
|
20016
20016
|
// negative X
|
|
20017
|
-
new
|
|
20017
|
+
new At(0, 1, 1, 1),
|
|
20018
20018
|
// positive Z
|
|
20019
|
-
new
|
|
20019
|
+
new At(3, 1, 1, 1),
|
|
20020
20020
|
// negative Z
|
|
20021
|
-
new
|
|
20021
|
+
new At(1, 1, 1, 1),
|
|
20022
20022
|
// positive Y
|
|
20023
|
-
new
|
|
20023
|
+
new At(3, 0, 1, 1),
|
|
20024
20024
|
// negative Y
|
|
20025
|
-
new
|
|
20025
|
+
new At(1, 0, 1, 1)
|
|
20026
20026
|
], this._cubeDirections = [
|
|
20027
20027
|
new P(1, 0, 0),
|
|
20028
20028
|
new P(-1, 0, 0),
|
|
@@ -20465,7 +20465,7 @@ class fm extends Qs {
|
|
|
20465
20465
|
n.uniforms[r].value = new P().fromArray(a.value);
|
|
20466
20466
|
break;
|
|
20467
20467
|
case "v4":
|
|
20468
|
-
n.uniforms[r].value = new
|
|
20468
|
+
n.uniforms[r].value = new At().fromArray(a.value);
|
|
20469
20469
|
break;
|
|
20470
20470
|
case "m3":
|
|
20471
20471
|
n.uniforms[r].value = new yt().fromArray(a.value);
|
|
@@ -20849,7 +20849,7 @@ class aM extends Qs {
|
|
|
20849
20849
|
const f = [];
|
|
20850
20850
|
for (let p = 0, v = u.length; p < v; p++) {
|
|
20851
20851
|
const g = u[p], m = o(g);
|
|
20852
|
-
m !== null && (m instanceof HTMLImageElement ? f.push(m) : f.push(new
|
|
20852
|
+
m !== null && (m instanceof HTMLImageElement ? f.push(m) : f.push(new Nn(m.data, m.width, m.height)));
|
|
20853
20853
|
}
|
|
20854
20854
|
n[d.uuid] = new Kr(f);
|
|
20855
20855
|
} else {
|
|
@@ -20882,7 +20882,7 @@ class aM extends Qs {
|
|
|
20882
20882
|
const h = [];
|
|
20883
20883
|
for (let d = 0, u = c.length; d < u; d++) {
|
|
20884
20884
|
const f = c[d], p = await r(f);
|
|
20885
|
-
p !== null && (p instanceof HTMLImageElement ? h.push(p) : h.push(new
|
|
20885
|
+
p !== null && (p instanceof HTMLImageElement ? h.push(p) : h.push(new Nn(p.data, p.width, p.height)));
|
|
20886
20886
|
}
|
|
20887
20887
|
i[l.uuid] = new Kr(h);
|
|
20888
20888
|
} else {
|
|
@@ -20904,7 +20904,7 @@ class aM extends Qs {
|
|
|
20904
20904
|
o.image === void 0 && Je('ObjectLoader: No "image" specified for', o.uuid), t[o.image] === void 0 && Je("ObjectLoader: Undefined image", o.image);
|
|
20905
20905
|
const l = t[o.image], c = l.data;
|
|
20906
20906
|
let h;
|
|
20907
|
-
Array.isArray(c) ? (h = new Gp(), c.length === 6 && (h.needsUpdate = !0)) : (c && c.data ? h = new
|
|
20907
|
+
Array.isArray(c) ? (h = new Gp(), c.length === 6 && (h.needsUpdate = !0)) : (c && c.data ? h = new Nn() : h = new ci(), c && (h.needsUpdate = !0)), h.source = l, h.uuid = o.uuid, o.name !== void 0 && (h.name = o.name), o.mapping !== void 0 && (h.mapping = i(o.mapping, oM)), o.channel !== void 0 && (h.channel = o.channel), o.offset !== void 0 && h.offset.fromArray(o.offset), o.repeat !== void 0 && h.repeat.fromArray(o.repeat), o.center !== void 0 && h.center.fromArray(o.center), o.rotation !== void 0 && (h.rotation = o.rotation), o.wrap !== void 0 && (h.wrapS = i(o.wrap[0], v0), h.wrapT = i(o.wrap[1], v0)), o.format !== void 0 && (h.format = o.format), o.internalFormat !== void 0 && (h.internalFormat = o.internalFormat), o.type !== void 0 && (h.type = o.type), o.colorSpace !== void 0 && (h.colorSpace = o.colorSpace), o.minFilter !== void 0 && (h.minFilter = i(o.minFilter, x0)), o.magFilter !== void 0 && (h.magFilter = i(o.magFilter, x0)), o.anisotropy !== void 0 && (h.anisotropy = o.anisotropy), o.flipY !== void 0 && (h.flipY = o.flipY), o.generateMipmaps !== void 0 && (h.generateMipmaps = o.generateMipmaps), o.premultiplyAlpha !== void 0 && (h.premultiplyAlpha = o.premultiplyAlpha), o.unpackAlignment !== void 0 && (h.unpackAlignment = o.unpackAlignment), o.compareFunction !== void 0 && (h.compareFunction = o.compareFunction), o.userData !== void 0 && (h.userData = o.userData), n[o.uuid] = h;
|
|
20908
20908
|
}
|
|
20909
20909
|
return n;
|
|
20910
20910
|
}
|
|
@@ -22764,13 +22764,13 @@ class AM extends Ii {
|
|
|
22764
22764
|
let r, a;
|
|
22765
22765
|
if (hi.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), this.camera.reversedDepth === !0)
|
|
22766
22766
|
r = 1, a = 0;
|
|
22767
|
-
else if (this.camera.coordinateSystem ===
|
|
22767
|
+
else if (this.camera.coordinateSystem === Cn)
|
|
22768
22768
|
r = -1, a = 1;
|
|
22769
22769
|
else if (this.camera.coordinateSystem === jl)
|
|
22770
22770
|
r = 0, a = 1;
|
|
22771
22771
|
else
|
|
22772
22772
|
throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: " + this.camera.coordinateSystem);
|
|
22773
|
-
|
|
22773
|
+
pi("c", t, e, hi, 0, 0, r), pi("t", t, e, hi, 0, 0, a), pi("n1", t, e, hi, -i, -n, r), pi("n2", t, e, hi, i, -n, r), pi("n3", t, e, hi, -i, n, r), pi("n4", t, e, hi, i, n, r), pi("f1", t, e, hi, -i, -n, a), pi("f2", t, e, hi, i, -n, a), pi("f3", t, e, hi, -i, n, a), pi("f4", t, e, hi, i, n, a), pi("u1", t, e, hi, i * 0.7, n * 1.1, r), pi("u2", t, e, hi, -i * 0.7, n * 1.1, r), pi("u3", t, e, hi, 0, n * 2, r), pi("cf1", t, e, hi, -i, 0, a), pi("cf2", t, e, hi, i, 0, a), pi("cf3", t, e, hi, 0, -n, a), pi("cf4", t, e, hi, 0, n, a), pi("cn1", t, e, hi, -i, 0, r), pi("cn2", t, e, hi, i, 0, r), pi("cn3", t, e, hi, 0, -n, r), pi("cn4", t, e, hi, 0, n, r), e.getAttribute("position").needsUpdate = !0;
|
|
22774
22774
|
}
|
|
22775
22775
|
/**
|
|
22776
22776
|
* Frees the GPU-related resources allocated by this instance. Call this
|
|
@@ -22780,7 +22780,7 @@ class AM extends Ii {
|
|
|
22780
22780
|
this.geometry.dispose(), this.material.dispose();
|
|
22781
22781
|
}
|
|
22782
22782
|
}
|
|
22783
|
-
function
|
|
22783
|
+
function pi(s, e, t, i, n, r, a) {
|
|
22784
22784
|
sh.set(n, r, a).unproject(i);
|
|
22785
22785
|
const o = e[s];
|
|
22786
22786
|
if (o !== void 0) {
|
|
@@ -27366,7 +27366,7 @@ function uE(s, e, t, i, n, r, a) {
|
|
|
27366
27366
|
uniforms: yo(an.background.uniforms),
|
|
27367
27367
|
vertexShader: an.background.vertexShader,
|
|
27368
27368
|
fragmentShader: an.background.fragmentShader,
|
|
27369
|
-
side:
|
|
27369
|
+
side: Un,
|
|
27370
27370
|
depthTest: !1,
|
|
27371
27371
|
depthWrite: !1,
|
|
27372
27372
|
fog: !1,
|
|
@@ -28635,7 +28635,7 @@ function EE(s) {
|
|
|
28635
28635
|
};
|
|
28636
28636
|
}
|
|
28637
28637
|
function PE(s, e, t) {
|
|
28638
|
-
const i = /* @__PURE__ */ new WeakMap(), n = new
|
|
28638
|
+
const i = /* @__PURE__ */ new WeakMap(), n = new At();
|
|
28639
28639
|
function r(a, o, l) {
|
|
28640
28640
|
const c = a.morphTargetInfluences, h = o.morphAttributes.position || o.morphAttributes.normal || o.morphAttributes.color, d = h !== void 0 ? h.length : 0;
|
|
28641
28641
|
let u = i.get(o);
|
|
@@ -29905,7 +29905,7 @@ function Y2(s, e, t, i, n, r, a) {
|
|
|
29905
29905
|
decodeVideoTexture: ht && S.map.isVideoTexture === !0 && It.getTransfer(S.map.colorSpace) === Gt,
|
|
29906
29906
|
decodeVideoTextureEmissive: ve && S.emissiveMap.isVideoTexture === !0 && It.getTransfer(S.emissiveMap.colorSpace) === Gt,
|
|
29907
29907
|
premultipliedAlpha: S.premultipliedAlpha,
|
|
29908
|
-
doubleSided: S.side ===
|
|
29908
|
+
doubleSided: S.side === fi,
|
|
29909
29909
|
flipSided: S.side === Ki,
|
|
29910
29910
|
useDepthPacking: S.depthPacking >= 0,
|
|
29911
29911
|
depthPacking: S.depthPacking || 0,
|
|
@@ -30368,7 +30368,7 @@ void main() {
|
|
|
30368
30368
|
}`;
|
|
30369
30369
|
function iP(s, e, t) {
|
|
30370
30370
|
let i = new Oo();
|
|
30371
|
-
const n = new K(), r = new K(), a = new
|
|
30371
|
+
const n = new K(), r = new K(), a = new At(), o = new dm({ depthPacking: Rx }), l = new tb(), c = {}, h = t.maxTextureSize, d = { [Un]: Ki, [Ki]: Un, [fi]: fi }, u = new mt({
|
|
30372
30372
|
defines: {
|
|
30373
30373
|
VSM_SAMPLES: 8
|
|
30374
30374
|
},
|
|
@@ -30494,9 +30494,9 @@ const nP = {
|
|
|
30494
30494
|
function sP(s, e) {
|
|
30495
30495
|
function t() {
|
|
30496
30496
|
let V = !1;
|
|
30497
|
-
const be = new
|
|
30497
|
+
const be = new At();
|
|
30498
30498
|
let Re = null;
|
|
30499
|
-
const Le = new
|
|
30499
|
+
const Le = new At(0, 0, 0, 0);
|
|
30500
30500
|
return {
|
|
30501
30501
|
setMask: function(_e) {
|
|
30502
30502
|
Re !== _e && !V && (s.colorMask(_e, _e, _e, _e), Re = _e);
|
|
@@ -30609,7 +30609,7 @@ function sP(s, e) {
|
|
|
30609
30609
|
const Z = s.getParameter(s.VERSION);
|
|
30610
30610
|
Z.indexOf("WebGL") !== -1 ? (re = parseFloat(/^WebGL (\d)/.exec(Z)[1]), j = re >= 1) : Z.indexOf("OpenGL ES") !== -1 && (re = parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]), j = re >= 2);
|
|
30611
30611
|
let ie = null, ue = {};
|
|
30612
|
-
const Oe = s.getParameter(s.SCISSOR_BOX), ce = s.getParameter(s.VIEWPORT), Se = new
|
|
30612
|
+
const Oe = s.getParameter(s.SCISSOR_BOX), ce = s.getParameter(s.VIEWPORT), Se = new At().fromArray(Oe), ct = new At().fromArray(ce);
|
|
30613
30613
|
function Fe(V, be, Re, Le) {
|
|
30614
30614
|
const _e = new Uint8Array(4), le = s.createTexture();
|
|
30615
30615
|
s.bindTexture(V, le), s.texParameteri(V, s.TEXTURE_MIN_FILTER, s.NEAREST), s.texParameteri(V, s.TEXTURE_MAG_FILTER, s.NEAREST);
|
|
@@ -30718,7 +30718,7 @@ function sP(s, e) {
|
|
|
30718
30718
|
_e = _e || be, le = le || Re, Ze = Ze || Le, (be !== m || _e !== y) && (s.blendEquationSeparate(gt[be], gt[_e]), m = be, y = _e), (Re !== b || Le !== x || le !== _ || Ze !== w) && (s.blendFuncSeparate(it[Re], it[Le], it[le], it[Ze]), b = Re, x = Le, _ = le, w = Ze), (lt.equals(T) === !1 || Ot !== E) && (s.blendColor(lt.r, lt.g, lt.b, Ot), T.copy(lt), E = Ot), g = V, S = !1;
|
|
30719
30719
|
}
|
|
30720
30720
|
function B(V, be) {
|
|
30721
|
-
V.side ===
|
|
30721
|
+
V.side === fi ? Te(s.CULL_FACE) : ee(s.CULL_FACE);
|
|
30722
30722
|
let Re = V.side === Ki;
|
|
30723
30723
|
be && (Re = !Re), he(Re), V.blending === ho && V.transparent === !1 ? de($t) : de(V.blending, V.blendEquation, V.blendSrc, V.blendDst, V.blendEquationAlpha, V.blendSrcAlpha, V.blendDstAlpha, V.blendColor, V.blendAlpha, V.premultipliedAlpha), a.setFunc(V.depthFunc), a.setTest(V.depthTest), a.setMask(V.depthWrite), r.setMask(V.colorWrite);
|
|
30724
30724
|
const Le = V.stencilWrite;
|
|
@@ -31724,9 +31724,9 @@ class hP extends Ws {
|
|
|
31724
31724
|
const _ = [], w = [], T = new K();
|
|
31725
31725
|
let E = null;
|
|
31726
31726
|
const S = new xi();
|
|
31727
|
-
S.viewport = new
|
|
31727
|
+
S.viewport = new At();
|
|
31728
31728
|
const M = new xi();
|
|
31729
|
-
M.viewport = new
|
|
31729
|
+
M.viewport = new At();
|
|
31730
31730
|
const C = [S, M], L = new cM();
|
|
31731
31731
|
let U = null, z = null;
|
|
31732
31732
|
this.cameraAutoUpdate = !0, this.enabled = !1, this.isPresenting = !1, this.getController = function(ne) {
|
|
@@ -31916,7 +31916,7 @@ class hP extends Ws {
|
|
|
31916
31916
|
), e.setRenderTarget(y));
|
|
31917
31917
|
}
|
|
31918
31918
|
let he = C[it];
|
|
31919
|
-
he === void 0 && (he = new xi(), he.layers.enable(it), he.viewport = new
|
|
31919
|
+
he === void 0 && (he = new xi(), he.layers.enable(it), he.viewport = new At(), C[it] = he), he.matrix.fromArray(de.transform.matrix), he.matrix.decompose(he.position, he.quaternion, he.scale), he.projectionMatrix.fromArray(de.projectionMatrix), he.projectionMatrixInverse.copy(he.projectionMatrix).invert(), he.viewport.set(B.x, B.y, B.width, B.height), it === 0 && (L.matrix.copy(he.matrix), L.matrix.decompose(L.position, L.quaternion, L.scale)), Xe === !0 && L.cameras.push(he);
|
|
31920
31920
|
}
|
|
31921
31921
|
const Ge = n.enabledFeatures;
|
|
31922
31922
|
if (Ge && Ge.includes("depth-sensing") && n.depthUsage == "gpu-optimized" && v) {
|
|
@@ -34158,7 +34158,7 @@ const pP = new Uint16Array([
|
|
|
34158
34158
|
]);
|
|
34159
34159
|
let Rs = null;
|
|
34160
34160
|
function mP() {
|
|
34161
|
-
return Rs === null && (Rs = new
|
|
34161
|
+
return Rs === null && (Rs = new Nn(pP, 32, 32, Fp, Ht), Rs.minFilter = jt, Rs.magFilter = jt, Rs.wrapS = Zn, Rs.wrapT = Zn, Rs.generateMipmaps = !1, Rs.needsUpdate = !0), Rs;
|
|
34162
34162
|
}
|
|
34163
34163
|
class vb {
|
|
34164
34164
|
/**
|
|
@@ -34218,15 +34218,15 @@ class vb {
|
|
|
34218
34218
|
let T = !1;
|
|
34219
34219
|
this._outputColorSpace = Pi;
|
|
34220
34220
|
let E = 0, S = 0, M = null, C = -1, L = null;
|
|
34221
|
-
const U = new
|
|
34221
|
+
const U = new At(), z = new At();
|
|
34222
34222
|
let X = null;
|
|
34223
34223
|
const j = new Ie(0);
|
|
34224
34224
|
let re = 0, Z = t.width, ie = t.height, ue = 1, Oe = null, ce = null;
|
|
34225
|
-
const Se = new
|
|
34225
|
+
const Se = new At(0, 0, Z, ie), ct = new At(0, 0, Z, ie);
|
|
34226
34226
|
let Fe = !1;
|
|
34227
34227
|
const ne = new Oo();
|
|
34228
34228
|
let ee = !1, Te = !1;
|
|
34229
|
-
const Xe = new Ce(), Ge = new P(), ht = new
|
|
34229
|
+
const Xe = new Ce(), Ge = new P(), ht = new At(), gt = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 };
|
|
34230
34230
|
let it = !1;
|
|
34231
34231
|
function de() {
|
|
34232
34232
|
return M === null ? ue : 1;
|
|
@@ -34404,7 +34404,7 @@ class vb {
|
|
|
34404
34404
|
zt.render(at, Nt);
|
|
34405
34405
|
};
|
|
34406
34406
|
function mi(D, Y, $) {
|
|
34407
|
-
D.transparent === !0 && D.side ===
|
|
34407
|
+
D.transparent === !0 && D.side === fi && D.forceSinglePass === !1 ? (D.side = Ki, D.needsUpdate = !0, F(D, Y, $), D.side = Un, D.needsUpdate = !0, F(D, Y, $), D.side = fi) : F(D, Y, $);
|
|
34408
34408
|
}
|
|
34409
34409
|
this.compile = function(D, Y, $ = null) {
|
|
34410
34410
|
$ === null && ($ = D), x = Ke.get($), x.init(Y), _.push(x), $.traverseVisible(function(W) {
|
|
@@ -34461,7 +34461,7 @@ class vb {
|
|
|
34461
34461
|
}
|
|
34462
34462
|
if (T === !0)
|
|
34463
34463
|
return;
|
|
34464
|
-
if (D.matrixWorldAutoUpdate === !0 && D.updateMatrixWorld(), Y.parent === null && Y.matrixWorldAutoUpdate === !0 && Y.updateMatrixWorld(), Le.enabled === !0 && Le.isPresenting === !0 && (Le.cameraAutoUpdate === !0 && Le.updateCamera(Y), Y = Le.getCamera()), D.isScene === !0 && D.onBeforeRender(w, D, Y, M), x = Ke.get(D, _.length), x.init(Y), _.push(x), Xe.multiplyMatrices(Y.projectionMatrix, Y.matrixWorldInverse), ne.setFromProjectionMatrix(Xe,
|
|
34464
|
+
if (D.matrixWorldAutoUpdate === !0 && D.updateMatrixWorld(), Y.parent === null && Y.matrixWorldAutoUpdate === !0 && Y.updateMatrixWorld(), Le.enabled === !0 && Le.isPresenting === !0 && (Le.cameraAutoUpdate === !0 && Le.updateCamera(Y), Y = Le.getCamera()), D.isScene === !0 && D.onBeforeRender(w, D, Y, M), x = Ke.get(D, _.length), x.init(Y), _.push(x), Xe.multiplyMatrices(Y.projectionMatrix, Y.matrixWorldInverse), ne.setFromProjectionMatrix(Xe, Cn, Y.reversedDepth), Te = this.localClippingEnabled, ee = We.init(this.clippingPlanes, Te), b = Ne.get(D, y.length), b.init(), y.push(b), Le.enabled === !0 && Le.isPresenting === !0) {
|
|
34465
34465
|
const xe = w.xr.getDepthSensingMesh();
|
|
34466
34466
|
xe !== null && Ss(xe, Y, -1 / 0, w.sortObjects);
|
|
34467
34467
|
}
|
|
@@ -34545,7 +34545,7 @@ class vb {
|
|
|
34545
34545
|
let at = !1;
|
|
34546
34546
|
for (let wt = 0, Nt = Y.length; wt < Nt; wt++) {
|
|
34547
34547
|
const Yt = Y[wt], { object: zt, geometry: tt, material: si, group: Bt } = Yt;
|
|
34548
|
-
if (si.side ===
|
|
34548
|
+
if (si.side === fi && zt.layers.test(G.layers)) {
|
|
34549
34549
|
const un = si.side;
|
|
34550
34550
|
si.side = Ki, si.needsUpdate = !0, O(zt, $, G, tt, si, Bt), si.side = un, si.needsUpdate = !0, at = !0;
|
|
34551
34551
|
}
|
|
@@ -34563,7 +34563,7 @@ class vb {
|
|
|
34563
34563
|
}
|
|
34564
34564
|
}
|
|
34565
34565
|
function O(D, Y, $, G, W, xe) {
|
|
34566
|
-
D.onBeforeRender(w, Y, $, G, W, xe), D.modelViewMatrix.multiplyMatrices($.matrixWorldInverse, D.matrixWorld), D.normalMatrix.getNormalMatrix(D.modelViewMatrix), W.onBeforeRender(w, Y, $, G, D, xe), W.transparent === !0 && W.side ===
|
|
34566
|
+
D.onBeforeRender(w, Y, $, G, W, xe), D.modelViewMatrix.multiplyMatrices($.matrixWorldInverse, D.matrixWorld), D.normalMatrix.getNormalMatrix(D.modelViewMatrix), W.onBeforeRender(w, Y, $, G, D, xe), W.transparent === !0 && W.side === fi && W.forceSinglePass === !1 ? (W.side = Ki, W.needsUpdate = !0, w.renderBufferDirect($, Y, G, W, D, xe), W.side = Un, W.needsUpdate = !0, w.renderBufferDirect($, Y, G, W, D, xe), W.side = fi) : w.renderBufferDirect($, Y, G, W, D, xe), D.onAfterRender(w, Y, $, G, W, xe);
|
|
34567
34567
|
}
|
|
34568
34568
|
function F(D, Y, $) {
|
|
34569
34569
|
Y.isScene !== !0 && (Y = gt);
|
|
@@ -34621,8 +34621,8 @@ class vb {
|
|
|
34621
34621
|
Yi && (Yi.boneTexture === null && Yi.computeBoneTexture(), ri.setValue(B, "boneTexture", Yi.boneTexture, ke));
|
|
34622
34622
|
}
|
|
34623
34623
|
W.isBatchedMesh && (ri.setOptional(B, W, "batchingTexture"), ri.setValue(B, "batchingTexture", W._matricesTexture, ke), ri.setOptional(B, W, "batchingIdTexture"), ri.setValue(B, "batchingIdTexture", W._indirectTexture, ke), ri.setOptional(B, W, "batchingColorTexture"), W._colorsTexture !== null && ri.setValue(B, "batchingColorTexture", W._colorsTexture, ke));
|
|
34624
|
-
const
|
|
34625
|
-
if ((
|
|
34624
|
+
const wn = $.morphAttributes;
|
|
34625
|
+
if ((wn.position !== void 0 || wn.normal !== void 0 || wn.color !== void 0) && rt.update(W, $, un), (fn || tt.receiveShadow !== W.receiveShadow) && (tt.receiveShadow = W.receiveShadow, ri.setValue(B, "receiveShadow", W.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && (tn.envMap.value = Ue, tn.flipEnvMap.value = Ue.isCubeTexture && Ue.isRenderTargetTexture === !1 ? -1 : 1), G.isMeshStandardMaterial && G.envMap === null && Y.environment !== null && (tn.envMapIntensity.value = Y.environmentIntensity), tn.dfgLUT !== void 0 && (tn.dfgLUT.value = mP()), fn && (ri.setValue(B, "toneMappingExposure", w.toneMappingExposure), tt.needsLights && we(tn, Fo), xe && G.fog === !0 && $e.refreshFogUniforms(tn, xe), $e.refreshMaterialUniforms(tn, G, ue, ie, x.state.transmissionRenderTarget[D.id]), Hh.upload(B, q(tt), tn, ke)), G.isShaderMaterial && G.uniformsNeedUpdate === !0 && (Hh.upload(B, q(tt), tn, ke), G.uniformsNeedUpdate = !1), G.isSpriteMaterial && ri.setValue(B, "center", W.center), ri.setValue(B, "modelViewMatrix", W.modelViewMatrix), ri.setValue(B, "normalMatrix", W.normalMatrix), ri.setValue(B, "modelMatrix", W.matrixWorld), G.isShaderMaterial || G.isRawShaderMaterial) {
|
|
34626
34626
|
const Yi = G.uniformsGroups;
|
|
34627
34627
|
for (let nn = 0, Cd = Yi.length; nn < Cd; nn++) {
|
|
34628
34628
|
const Cr = Yi[nn];
|
|
@@ -34746,8 +34746,8 @@ class vb {
|
|
|
34746
34746
|
if ($ !== null)
|
|
34747
34747
|
ye = $.max.x - $.min.x, He = $.max.y - $.min.y, Ue = $.isBox3 ? $.max.z - $.min.z : 1, qe = $.min.x, ze = $.min.y, je = $.isBox3 ? $.min.z : 0;
|
|
34748
34748
|
else {
|
|
34749
|
-
const
|
|
34750
|
-
ye = Math.floor(Yt.width *
|
|
34749
|
+
const wn = Math.pow(2, -W);
|
|
34750
|
+
ye = Math.floor(Yt.width * wn), He = Math.floor(Yt.height * wn), D.isDataArrayTexture ? Ue = Yt.depth : D.isData3DTexture ? Ue = Math.floor(Yt.depth * wn) : Ue = 1, qe = 0, ze = 0, je = 0;
|
|
34751
34751
|
}
|
|
34752
34752
|
G !== null ? (at = G.x, wt = G.y, Nt = G.z) : (at = 0, wt = 0, Nt = 0);
|
|
34753
34753
|
const zt = st.convert(Y.format), tt = st.convert(Y.type);
|
|
@@ -34757,16 +34757,16 @@ class vb {
|
|
|
34757
34757
|
B.pixelStorei(B.UNPACK_ROW_LENGTH, Yt.width), B.pixelStorei(B.UNPACK_IMAGE_HEIGHT, Yt.height), B.pixelStorei(B.UNPACK_SKIP_PIXELS, qe), B.pixelStorei(B.UNPACK_SKIP_ROWS, ze), B.pixelStorei(B.UNPACK_SKIP_IMAGES, je);
|
|
34758
34758
|
const ri = D.isDataArrayTexture || D.isData3DTexture, tn = Y.isDataArrayTexture || Y.isData3DTexture;
|
|
34759
34759
|
if (D.isDepthTexture) {
|
|
34760
|
-
const
|
|
34760
|
+
const wn = fe.get(D), Yi = fe.get(Y), nn = fe.get(wn.__renderTarget), Cd = fe.get(Yi.__renderTarget);
|
|
34761
34761
|
ve.bindFramebuffer(B.READ_FRAMEBUFFER, nn.__webglFramebuffer), ve.bindFramebuffer(B.DRAW_FRAMEBUFFER, Cd.__webglFramebuffer);
|
|
34762
34762
|
for (let Cr = 0; Cr < Ue; Cr++)
|
|
34763
34763
|
ri && (B.framebufferTextureLayer(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, fe.get(D).__webglTexture, W, je + Cr), B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, fe.get(Y).__webglTexture, xe, Nt + Cr)), B.blitFramebuffer(qe, ze, ye, He, at, wt, ye, He, B.DEPTH_BUFFER_BIT, B.NEAREST);
|
|
34764
34764
|
ve.bindFramebuffer(B.READ_FRAMEBUFFER, null), ve.bindFramebuffer(B.DRAW_FRAMEBUFFER, null);
|
|
34765
34765
|
} else if (W !== 0 || D.isRenderTargetTexture || fe.has(D)) {
|
|
34766
|
-
const
|
|
34766
|
+
const wn = fe.get(D), Yi = fe.get(Y);
|
|
34767
34767
|
ve.bindFramebuffer(B.READ_FRAMEBUFFER, Be), ve.bindFramebuffer(B.DRAW_FRAMEBUFFER, xt);
|
|
34768
34768
|
for (let nn = 0; nn < Ue; nn++)
|
|
34769
|
-
ri ? B.framebufferTextureLayer(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0,
|
|
34769
|
+
ri ? B.framebufferTextureLayer(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, wn.__webglTexture, W, je + nn) : B.framebufferTexture2D(B.READ_FRAMEBUFFER, B.COLOR_ATTACHMENT0, B.TEXTURE_2D, wn.__webglTexture, W), tn ? B.framebufferTextureLayer(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, Yi.__webglTexture, xe, Nt + nn) : B.framebufferTexture2D(B.DRAW_FRAMEBUFFER, B.COLOR_ATTACHMENT0, B.TEXTURE_2D, Yi.__webglTexture, xe), W !== 0 ? B.blitFramebuffer(qe, ze, ye, He, at, wt, ye, He, B.COLOR_BUFFER_BIT, B.NEAREST) : tn ? B.copyTexSubImage3D(si, xe, at, wt, Nt + nn, qe, ze, ye, He) : B.copyTexSubImage2D(si, xe, at, wt, qe, ze, ye, He);
|
|
34770
34770
|
ve.bindFramebuffer(B.READ_FRAMEBUFFER, null), ve.bindFramebuffer(B.DRAW_FRAMEBUFFER, null);
|
|
34771
34771
|
} else
|
|
34772
34772
|
tn ? D.isDataTexture || D.isData3DTexture ? B.texSubImage3D(si, xe, at, wt, Nt, ye, He, Ue, zt, tt, Yt.data) : Y.isCompressedArrayTexture ? B.compressedTexSubImage3D(si, xe, at, wt, Nt, ye, He, Ue, zt, Yt.data) : B.texSubImage3D(si, xe, at, wt, Nt, ye, He, Ue, zt, tt, Yt) : D.isDataTexture ? B.texSubImage2D(B.TEXTURE_2D, xe, at, wt, ye, He, zt, tt, Yt.data) : D.isCompressedTexture ? B.compressedTexSubImage2D(B.TEXTURE_2D, xe, at, wt, Yt.width, Yt.height, zt, Yt.data) : B.texSubImage2D(B.TEXTURE_2D, xe, at, wt, ye, He, zt, tt, Yt);
|
|
@@ -34789,7 +34789,7 @@ class vb {
|
|
|
34789
34789
|
* @readonly
|
|
34790
34790
|
*/
|
|
34791
34791
|
get coordinateSystem() {
|
|
34792
|
-
return
|
|
34792
|
+
return Cn;
|
|
34793
34793
|
}
|
|
34794
34794
|
/**
|
|
34795
34795
|
* Defines the output color space of the renderer.
|
|
@@ -34809,7 +34809,7 @@ class vb {
|
|
|
34809
34809
|
const gP = {
|
|
34810
34810
|
Vector2: K,
|
|
34811
34811
|
Vector3: P,
|
|
34812
|
-
Vector4:
|
|
34812
|
+
Vector4: At,
|
|
34813
34813
|
Quaternion: ui,
|
|
34814
34814
|
Matrix4: Ce,
|
|
34815
34815
|
Spherical: db,
|
|
@@ -34821,7 +34821,7 @@ const gP = {
|
|
|
34821
34821
|
Vs.install({ THREE: gP });
|
|
34822
34822
|
class vP {
|
|
34823
34823
|
constructor(e) {
|
|
34824
|
-
this.viralViewerApi = e, this.raycaster = new _d(), this.camera = null, this._orthoCamera = null, this._perspectiveCamera = null, this._frustumSize = 200, this.cameraControls = null, this.onUsing = !1, this.modelId = "0", this.elementId = "243274", this.cameraWakeQueuedEvents = [], this.cameraSleepQueuedEvents = [], this.cameraUpdateQueuedEvents = [], this.targetElement = this.viralViewerApi.options.container, this.setupCamera(), this.viralViewerApi.emit(
|
|
34824
|
+
this.viralViewerApi = e, this.raycaster = new _d(), this.camera = null, this._orthoCamera = null, this._perspectiveCamera = null, this._frustumSize = 200, this.cameraControls = null, this.onUsing = !1, this.modelId = "0", this.elementId = "243274", this.cameraWakeQueuedEvents = [], this.cameraSleepQueuedEvents = [], this.cameraUpdateQueuedEvents = [], this.targetElement = this.viralViewerApi.options.container, this.setupCamera(), this.viralViewerApi.emit(Mt.LOADED_CAMERA);
|
|
34825
34825
|
}
|
|
34826
34826
|
setupCamera() {
|
|
34827
34827
|
this._perspectiveCamera = new xi(
|
|
@@ -35304,7 +35304,7 @@ class yP {
|
|
|
35304
35304
|
let d = null, u = null, f = null, p = null;
|
|
35305
35305
|
for (let E = 0; E < a.count; E++) {
|
|
35306
35306
|
const S = new P().fromBufferAttribute(a, E);
|
|
35307
|
-
o && (u = new K().fromBufferAttribute(o, E)), l && (f = new P().fromBufferAttribute(l, E)), c && (d = new
|
|
35307
|
+
o && (u = new K().fromBufferAttribute(o, E)), l && (f = new P().fromBufferAttribute(l, E)), c && (d = new At().fromBufferAttribute(c, E)), h && (p = new Ie().fromBufferAttribute(h, E));
|
|
35308
35308
|
const M = new TP(S, u, f, d, p);
|
|
35309
35309
|
n.push(M);
|
|
35310
35310
|
}
|
|
@@ -36235,7 +36235,7 @@ class NP extends Q {
|
|
|
36235
36235
|
constructor() {
|
|
36236
36236
|
super(
|
|
36237
36237
|
new ii(1e5, 1e5, 2, 2),
|
|
36238
|
-
new Ri({ visible: !1, wireframe: !0, side:
|
|
36238
|
+
new Ri({ visible: !1, wireframe: !0, side: fi, transparent: !0, opacity: 0.1, toneMapped: !1 })
|
|
36239
36239
|
), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
|
|
36240
36240
|
}
|
|
36241
36241
|
updateMatrixWorld(e) {
|
|
@@ -37011,7 +37011,7 @@ class bb extends mt {
|
|
|
37011
37011
|
this.defines && (e === !0 !== this.alphaToCoverage && (this.needsUpdate = !0), e === !0 ? this.defines.USE_ALPHA_TO_COVERAGE = "" : delete this.defines.USE_ALPHA_TO_COVERAGE);
|
|
37012
37012
|
}
|
|
37013
37013
|
}
|
|
37014
|
-
const Xu = new
|
|
37014
|
+
const Xu = new At(), sv = new P(), rv = new P(), Oi = new At(), Ni = new At(), cs = new At(), Hu = new P(), Yu = new Ce(), Fi = new _s(), av = new P(), uh = new ut(), fh = new ni(), hs = new At();
|
|
37015
37015
|
let ms, sa;
|
|
37016
37016
|
function ov(s, e, t) {
|
|
37017
37017
|
return hs.set(0, 0, -e, 1).applyMatrix4(s.projectionMatrix), hs.multiplyScalar(1 / hs.w), hs.x = sa / t.width, hs.y = sa / t.height, hs.applyMatrix4(s.projectionMatrixInverse), hs.multiplyScalar(1 / hs.w), Math.abs(Math.max(hs.x, hs.y));
|
|
@@ -37715,7 +37715,7 @@ class aC {
|
|
|
37715
37715
|
return null;
|
|
37716
37716
|
const n = t.meshes[i.mesh];
|
|
37717
37717
|
for (const c of n.primitives)
|
|
37718
|
-
if (c.mode !==
|
|
37718
|
+
if (c.mode !== Tn.TRIANGLES && c.mode !== Tn.TRIANGLE_STRIP && c.mode !== Tn.TRIANGLE_FAN && c.mode !== void 0)
|
|
37719
37719
|
return null;
|
|
37720
37720
|
const a = i.extensions[this.name].attributes, o = [], l = {};
|
|
37721
37721
|
for (const c in a)
|
|
@@ -37841,7 +37841,7 @@ class uC extends _b {
|
|
|
37841
37841
|
return dC.fromArray(r).normalize().toArray(r), r;
|
|
37842
37842
|
}
|
|
37843
37843
|
}
|
|
37844
|
-
const
|
|
37844
|
+
const Tn = {
|
|
37845
37845
|
FLOAT: 5126,
|
|
37846
37846
|
//FLOAT_MAT2: 35674,
|
|
37847
37847
|
FLOAT_MAT3: 35675,
|
|
@@ -37922,7 +37922,7 @@ function pC(s) {
|
|
|
37922
37922
|
roughness: 1,
|
|
37923
37923
|
transparent: !1,
|
|
37924
37924
|
depthTest: !0,
|
|
37925
|
-
side:
|
|
37925
|
+
side: Un
|
|
37926
37926
|
})), s.DefaultMaterial;
|
|
37927
37927
|
}
|
|
37928
37928
|
function Vr(s, e, t) {
|
|
@@ -38434,7 +38434,7 @@ class yC {
|
|
|
38434
38434
|
return u.extendMaterialParams && u.extendMaterialParams(e, o);
|
|
38435
38435
|
})));
|
|
38436
38436
|
}
|
|
38437
|
-
r.doubleSided === !0 && (o.side =
|
|
38437
|
+
r.doubleSided === !0 && (o.side = fi);
|
|
38438
38438
|
const h = r.alphaMode || Wu.OPAQUE;
|
|
38439
38439
|
if (h === Wu.BLEND ? (o.transparent = !0, o.depthWrite = !1) : (o.transparent = !1, h === Wu.MASK && (o.alphaTest = r.alphaCutoff !== void 0 ? r.alphaCutoff : 0.5)), r.normalTexture !== void 0 && a !== Ri && (c.push(t.assignTexture(o, "normalMap", r.normalTexture)), o.normalScale = new K(1, 1), r.normalTexture.scale !== void 0)) {
|
|
38440
38440
|
const d = r.normalTexture.scale;
|
|
@@ -38507,15 +38507,15 @@ class yC {
|
|
|
38507
38507
|
const v = h[f], g = a[f];
|
|
38508
38508
|
let m;
|
|
38509
38509
|
const b = c[f];
|
|
38510
|
-
if (g.mode ===
|
|
38511
|
-
m = r.isSkinnedMesh === !0 ? new Vx(v, b) : new Q(v, b), m.isSkinnedMesh === !0 && m.normalizeSkinWeights(), g.mode ===
|
|
38512
|
-
else if (g.mode ===
|
|
38510
|
+
if (g.mode === Tn.TRIANGLES || g.mode === Tn.TRIANGLE_STRIP || g.mode === Tn.TRIANGLE_FAN || g.mode === void 0)
|
|
38511
|
+
m = r.isSkinnedMesh === !0 ? new Vx(v, b) : new Q(v, b), m.isSkinnedMesh === !0 && m.normalizeSkinWeights(), g.mode === Tn.TRIANGLE_STRIP ? m.geometry = W0(m.geometry, Ix) : g.mode === Tn.TRIANGLE_FAN && (m.geometry = W0(m.geometry, Kf));
|
|
38512
|
+
else if (g.mode === Tn.LINES)
|
|
38513
38513
|
m = new Ii(v, b);
|
|
38514
|
-
else if (g.mode ===
|
|
38514
|
+
else if (g.mode === Tn.LINE_STRIP)
|
|
38515
38515
|
m = new Hi(v, b);
|
|
38516
|
-
else if (g.mode ===
|
|
38516
|
+
else if (g.mode === Tn.LINE_LOOP)
|
|
38517
38517
|
m = new Hx(v, b);
|
|
38518
|
-
else if (g.mode ===
|
|
38518
|
+
else if (g.mode === Tn.POINTS)
|
|
38519
38519
|
m = new _o(v, b);
|
|
38520
38520
|
else
|
|
38521
38521
|
throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + g.mode);
|
|
@@ -39308,7 +39308,7 @@ class mr extends zn {
|
|
|
39308
39308
|
constructor(e, t, i, n) {
|
|
39309
39309
|
super(), this.renderScene = t, this.renderCamera = i, this.selectedObjects = n !== void 0 ? n : [], this.visibleEdgeColor = new Ie(1, 1, 1), this.hiddenEdgeColor = new Ie(0.1, 0.04, 0.02), this.edgeGlow = 0, this.usePatternTexture = !1, this.patternTexture = null, this.edgeThickness = 1, this.edgeStrength = 3, this.downSampleRatio = 2, this.pulsePeriod = 0, this._visibilityCache = /* @__PURE__ */ new Map(), this._selectionCache = /* @__PURE__ */ new Set(), this.resolution = e !== void 0 ? new K(e.x, e.y) : new K(256, 256);
|
|
39310
39310
|
const r = Math.round(this.resolution.x / this.downSampleRatio), a = Math.round(this.resolution.y / this.downSampleRatio);
|
|
39311
|
-
this.renderTargetMaskBuffer = new Tt(this.resolution.x, this.resolution.y), this.renderTargetMaskBuffer.texture.name = "OutlinePass.mask", this.renderTargetMaskBuffer.texture.generateMipmaps = !1, this.depthMaterial = new dm(), this.depthMaterial.side =
|
|
39311
|
+
this.renderTargetMaskBuffer = new Tt(this.resolution.x, this.resolution.y), this.renderTargetMaskBuffer.texture.name = "OutlinePass.mask", this.renderTargetMaskBuffer.texture.generateMipmaps = !1, this.depthMaterial = new dm(), this.depthMaterial.side = fi, this.depthMaterial.depthPacking = Rx, this.depthMaterial.blending = $t, this.prepareMaskMaterial = this._getPrepareMaskMaterial(), this.prepareMaskMaterial.side = fi, this.prepareMaskMaterial.fragmentShader = h(this.prepareMaskMaterial.fragmentShader, this.renderCamera), this.renderTargetDepthBuffer = new Tt(this.resolution.x, this.resolution.y, { type: Ht }), this.renderTargetDepthBuffer.texture.name = "OutlinePass.depth", this.renderTargetDepthBuffer.texture.generateMipmaps = !1, this.renderTargetMaskDownSampleBuffer = new Tt(r, a, { type: Ht }), this.renderTargetMaskDownSampleBuffer.texture.name = "OutlinePass.depthDownSample", this.renderTargetMaskDownSampleBuffer.texture.generateMipmaps = !1, this.renderTargetBlurBuffer1 = new Tt(r, a, { type: Ht }), this.renderTargetBlurBuffer1.texture.name = "OutlinePass.blur1", this.renderTargetBlurBuffer1.texture.generateMipmaps = !1, this.renderTargetBlurBuffer2 = new Tt(Math.round(r / 2), Math.round(a / 2), { type: Ht }), this.renderTargetBlurBuffer2.texture.name = "OutlinePass.blur2", this.renderTargetBlurBuffer2.texture.generateMipmaps = !1, this.edgeDetectionMaterial = this._getEdgeDetectionMaterial(), this.renderTargetEdgeBuffer1 = new Tt(r, a, { type: Ht }), this.renderTargetEdgeBuffer1.texture.name = "OutlinePass.edge1", this.renderTargetEdgeBuffer1.texture.generateMipmaps = !1, this.renderTargetEdgeBuffer2 = new Tt(Math.round(r / 2), Math.round(a / 2), { type: Ht }), this.renderTargetEdgeBuffer2.texture.name = "OutlinePass.edge2", this.renderTargetEdgeBuffer2.texture.generateMipmaps = !1;
|
|
39312
39312
|
const o = 4, l = 4;
|
|
39313
39313
|
this.separableBlurMaterial1 = this._getSeparableBlurMaterial(o), this.separableBlurMaterial1.uniforms.texSize.value.set(r, a), this.separableBlurMaterial1.uniforms.kernelRadius.value = 1, this.separableBlurMaterial2 = this._getSeparableBlurMaterial(l), this.separableBlurMaterial2.uniforms.texSize.value.set(Math.round(r / 2), Math.round(a / 2)), this.separableBlurMaterial2.uniforms.kernelRadius.value = l, this.overlayMaterial = this._getOverlayMaterial();
|
|
39314
39314
|
const c = Kn;
|
|
@@ -41217,7 +41217,7 @@ class qn extends zn {
|
|
|
41217
41217
|
const o = Math.random() * 2 - 1, l = Math.random() * 2 - 1, c = 0;
|
|
41218
41218
|
r[a] = i.noise3d(o, l, c);
|
|
41219
41219
|
}
|
|
41220
|
-
this.noiseTexture = new
|
|
41220
|
+
this.noiseTexture = new Nn(r, 4, 4, oc, $i), this.noiseTexture.wrapS = Jn, this.noiseTexture.wrapT = Jn, this.noiseTexture.needsUpdate = !0;
|
|
41221
41221
|
}
|
|
41222
41222
|
_overrideVisibility() {
|
|
41223
41223
|
const e = this.scene, t = this._visibilityCache;
|
|
@@ -41690,7 +41690,7 @@ const RC = [
|
|
|
41690
41690
|
}, OC = Et.hexToRGB(Pe.accent);
|
|
41691
41691
|
class Fn extends Q {
|
|
41692
41692
|
constructor(e, t, i) {
|
|
41693
|
-
super(e, t), this.globalMaterialIndex = -1, this.workerPool = null, this._bufferElements = [], this._colors = null, this._originalColor = null, this._elementMap = /* @__PURE__ */ new Map(), this._isBatching = !1, this._batchQueue = [], this._isProcessingQueue = !1, this._edgeLines = null, this._edgeRanges = /* @__PURE__ */ new Map(), this._edgeThreshold = 60, this._edgeMaterial = null, this._selectedElements = [], this._hidingElements = [], this._isolatingElements = [], this._hiddenSet = /* @__PURE__ */ new Set(), this._isolatedSet = /* @__PURE__ */ new Set(), this._elementOpacityMap = /* @__PURE__ */ new Map(), this._isRGBAMode = !1, this._elementOriginalColors = /* @__PURE__ */ new Map(), this._isGeneratedLights = !1, this._pointLight = null, this.workerPool = i || null;
|
|
41693
|
+
super(e, t), this.globalMaterialIndex = -1, this.workerPool = null, this._bufferElements = [], this._colors = null, this._originalColor = null, this._elementMap = /* @__PURE__ */ new Map(), this._isBatching = !1, this._batchQueue = [], this._isProcessingQueue = !1, this._edgeLines = null, this._edgeRanges = /* @__PURE__ */ new Map(), this._edgeThreshold = 60, this._edgeMaterial = null, this._selectedElements = [], this._hidingElements = [], this._isolatingElements = [], this._hiddenSet = /* @__PURE__ */ new Set(), this._isolatedSet = /* @__PURE__ */ new Set(), this._elementOpacityMap = /* @__PURE__ */ new Map(), this._isRGBAMode = !1, this._elementOriginalColors = /* @__PURE__ */ new Map(), this._temporaryColors = /* @__PURE__ */ new Map(), this._isGeneratedLights = !1, this._pointLight = null, this.workerPool = i || null;
|
|
41694
41694
|
}
|
|
41695
41695
|
addBufferElements(e, t) {
|
|
41696
41696
|
this._bufferElements = e, this._originalColor = t, this.rebuildGeometry(e);
|
|
@@ -42021,44 +42021,13 @@ class Fn extends Q {
|
|
|
42021
42021
|
* Select elements (highlights them with accent color)
|
|
42022
42022
|
*/
|
|
42023
42023
|
select(e, t = []) {
|
|
42024
|
-
this.unselect();
|
|
42025
|
-
const i = [];
|
|
42026
|
-
e.forEach((n) => {
|
|
42027
|
-
if (this._isolatingElements.length === 0) {
|
|
42028
|
-
this._selectedElements.push(n), i.push(n);
|
|
42029
|
-
return;
|
|
42030
|
-
}
|
|
42031
|
-
this._isolatingElements.length > 0 && this._isolatingElements.find(
|
|
42032
|
-
(r) => r.elementId == n.elementId && r.modelId == n.modelId
|
|
42033
|
-
) && (this._selectedElements.push(n), i.push(n));
|
|
42034
|
-
}), this.changeColor(i, OC);
|
|
42024
|
+
this.unselect(), this._selectedElements = e, this.changeColor(this._selectedElements, OC);
|
|
42035
42025
|
}
|
|
42036
42026
|
get selectedElements() {
|
|
42037
42027
|
return this._selectedElements;
|
|
42038
42028
|
}
|
|
42039
42029
|
unselect() {
|
|
42040
|
-
|
|
42041
|
-
if (this._selectedElements.length !== 0) {
|
|
42042
|
-
if (this._colors && this._originalColor) {
|
|
42043
|
-
const { r: t, g: i, b: n } = this._originalColor, r = new Set(
|
|
42044
|
-
this._hidingElements.map((o) => `${o.modelId}:${o.elementId}`)
|
|
42045
|
-
);
|
|
42046
|
-
for (const { modelId: o, elementId: l } of this._selectedElements) {
|
|
42047
|
-
if (r.has(`${o}:${l}`))
|
|
42048
|
-
continue;
|
|
42049
|
-
const c = (e = this._elementMap.get(o)) == null ? void 0 : e.get(l);
|
|
42050
|
-
if (c)
|
|
42051
|
-
for (const h of c) {
|
|
42052
|
-
const d = h.start * 4, u = d + h.count * 4;
|
|
42053
|
-
for (let f = d; f < u; f += 4)
|
|
42054
|
-
this._colors[f] = t, this._colors[f + 1] = i, this._colors[f + 2] = n, this._colors[f + 3] = 1;
|
|
42055
|
-
}
|
|
42056
|
-
}
|
|
42057
|
-
const a = this.geometry.getAttribute("color");
|
|
42058
|
-
a.needsUpdate = !0;
|
|
42059
|
-
}
|
|
42060
|
-
this._selectedElements = [];
|
|
42061
|
-
}
|
|
42030
|
+
this._selectedElements.length !== 0 && (this.resetColor(this._selectedElements), this._selectedElements = []);
|
|
42062
42031
|
}
|
|
42063
42032
|
//#endregion
|
|
42064
42033
|
//#region Hide/Isolate/Show
|
|
@@ -42112,7 +42081,7 @@ class Fn extends Q {
|
|
|
42112
42081
|
* Reset all visibility - show everything
|
|
42113
42082
|
*/
|
|
42114
42083
|
reset() {
|
|
42115
|
-
if (this._hiddenSet.clear(), this._isolatedSet.clear(), this._hidingElements = [], this._isolatingElements = [], this._elementOpacityMap.clear(), this._colors) {
|
|
42084
|
+
if (this._hiddenSet.clear(), this._isolatedSet.clear(), this._hidingElements = [], this._isolatingElements = [], this._elementOpacityMap.clear(), this._temporaryColors.clear(), this._colors) {
|
|
42116
42085
|
this._elementMap.forEach((t, i) => {
|
|
42117
42086
|
t.forEach((n, r) => {
|
|
42118
42087
|
for (const a of n)
|
|
@@ -42333,23 +42302,53 @@ class Fn extends Q {
|
|
|
42333
42302
|
* Works with RGBA color buffer (preserves existing alpha values)
|
|
42334
42303
|
* @param elements - An array of elements, each containing `modelId` and `elementId`.
|
|
42335
42304
|
* @param color - The new RGB color to apply
|
|
42305
|
+
* @param isTemporary - Override for temporary, if element has temporary color it will turn back this color, otherwise will turn back to original
|
|
42336
42306
|
*/
|
|
42337
|
-
|
|
42307
|
+
/**
|
|
42308
|
+
* Changes the color of multiple elements in the merged mesh.
|
|
42309
|
+
* Works with RGBA color buffer (preserves existing alpha values)
|
|
42310
|
+
* @param elements - An array of elements, each containing `modelId` and `elementId`.
|
|
42311
|
+
* @param color - The new RGB color to apply
|
|
42312
|
+
* @param isTemporary - If true, stores this color as a temporary layer that will be restored on reset
|
|
42313
|
+
*
|
|
42314
|
+
* @example
|
|
42315
|
+
* ```typescript
|
|
42316
|
+
* // Normal color change (resets to original)
|
|
42317
|
+
* mesh.changeColor([{ modelId: "0", elementId: "abc" }], { r: 1, g: 0, b: 0 });
|
|
42318
|
+
*
|
|
42319
|
+
* // Temporary color (resets to this color instead of original)
|
|
42320
|
+
* mesh.changeColor([{ modelId: "0", elementId: "abc" }], { r: 0, g: 1, b: 0 }, true);
|
|
42321
|
+
* // Later, any non-temporary color change will reset to green instead of original
|
|
42322
|
+
* ```
|
|
42323
|
+
*/
|
|
42324
|
+
changeColor(e, t, i = !1) {
|
|
42338
42325
|
if (!this._colors)
|
|
42339
42326
|
return;
|
|
42340
|
-
const
|
|
42341
|
-
e.forEach(({ modelId:
|
|
42342
|
-
if (!this._elementMap.has(
|
|
42327
|
+
const n = this.geometry.getAttribute("color"), r = n.itemSize;
|
|
42328
|
+
e.forEach(({ modelId: a, elementId: o }) => {
|
|
42329
|
+
if (!this._elementMap.has(a) || !this._elementMap.get(a).has(o))
|
|
42343
42330
|
return;
|
|
42344
|
-
const
|
|
42345
|
-
|
|
42346
|
-
|
|
42347
|
-
|
|
42348
|
-
|
|
42349
|
-
|
|
42331
|
+
const l = `${a}:${o}`;
|
|
42332
|
+
i && this._temporaryColors.set(l, { r: t.r, g: t.g, b: t.b });
|
|
42333
|
+
const c = this._elementMap.get(a).get(o);
|
|
42334
|
+
for (const h of c) {
|
|
42335
|
+
const { start: d, count: u } = h;
|
|
42336
|
+
for (let f = 0; f < u; f++) {
|
|
42337
|
+
const p = (d + f) * r;
|
|
42338
|
+
this._colors[p] = t.r, this._colors[p + 1] = t.g, this._colors[p + 2] = t.b;
|
|
42350
42339
|
}
|
|
42351
42340
|
}
|
|
42352
|
-
}),
|
|
42341
|
+
}), n.array.set(this._colors), n.needsUpdate = !0;
|
|
42342
|
+
}
|
|
42343
|
+
/**
|
|
42344
|
+
* Clears temporary colors for specified elements or all elements
|
|
42345
|
+
* @param elements - Elements to clear temporary colors for, or null to clear all
|
|
42346
|
+
*/
|
|
42347
|
+
clearTemporaryColors(e = null) {
|
|
42348
|
+
e === null ? this._temporaryColors.clear() : e.forEach(({ modelId: t, elementId: i }) => {
|
|
42349
|
+
const n = `${t}:${i}`;
|
|
42350
|
+
this._temporaryColors.delete(n);
|
|
42351
|
+
});
|
|
42353
42352
|
}
|
|
42354
42353
|
/**
|
|
42355
42354
|
* Reset color of an element back to the original color
|
|
@@ -42378,42 +42377,69 @@ class Fn extends Q {
|
|
|
42378
42377
|
// colorAttribute.needsUpdate = true;
|
|
42379
42378
|
// }
|
|
42380
42379
|
/**
|
|
42381
|
-
* Resets the color of
|
|
42380
|
+
* Resets the color of elements back to temporary color (if exists) or original color.
|
|
42382
42381
|
* Works with RGBA color buffer (preserves existing alpha values)
|
|
42383
|
-
* @param
|
|
42384
|
-
* @param
|
|
42385
|
-
*
|
|
42382
|
+
* @param elements - Array of elements to reset, or `null` to reset the entire mesh.
|
|
42383
|
+
* @param excepts - Elements that should receive a different color instead of original/temporary
|
|
42384
|
+
*
|
|
42385
|
+
* @example
|
|
42386
|
+
* ```typescript
|
|
42387
|
+
* // Reset all elements to temporary color (if set) or original color
|
|
42388
|
+
* mesh.resetColor(null);
|
|
42389
|
+
*
|
|
42390
|
+
* // Reset specific elements
|
|
42391
|
+
* mesh.resetColor([{ modelId: "0", elementId: "abc" }, { modelId: "0", elementId: "def" }]);
|
|
42392
|
+
*
|
|
42393
|
+
* // Reset all except some elements with custom colors
|
|
42394
|
+
* mesh.resetColor(null, [{ elements: [{ modelId: "0", elementId: "abc" }], color: { r: 1, g: 0, b: 0 } }]);
|
|
42395
|
+
* ```
|
|
42386
42396
|
*/
|
|
42387
|
-
resetColor(e, t
|
|
42397
|
+
resetColor(e, t = []) {
|
|
42388
42398
|
if (!this._colors || !this._originalColor)
|
|
42389
42399
|
return;
|
|
42390
|
-
const
|
|
42391
|
-
for (const c of
|
|
42400
|
+
const i = this.geometry.getAttribute("color"), n = i.itemSize, r = (o, l) => {
|
|
42401
|
+
for (const c of t)
|
|
42392
42402
|
if (c.elements.some(
|
|
42393
42403
|
(d) => d.modelId === o && d.elementId === l
|
|
42394
42404
|
))
|
|
42395
42405
|
return c.color;
|
|
42396
42406
|
return null;
|
|
42407
|
+
}, a = (o, l) => {
|
|
42408
|
+
const c = `${o}:${l}`;
|
|
42409
|
+
return this._temporaryColors.get(c) || this._originalColor;
|
|
42397
42410
|
};
|
|
42398
|
-
if (e === null)
|
|
42399
|
-
|
|
42400
|
-
|
|
42401
|
-
|
|
42402
|
-
|
|
42403
|
-
|
|
42404
|
-
|
|
42405
|
-
|
|
42406
|
-
|
|
42407
|
-
|
|
42408
|
-
|
|
42409
|
-
|
|
42410
|
-
|
|
42411
|
-
|
|
42412
|
-
|
|
42411
|
+
if (e === null)
|
|
42412
|
+
this._elementMap.forEach((o, l) => {
|
|
42413
|
+
o.forEach((c, h) => {
|
|
42414
|
+
const d = a(l, h);
|
|
42415
|
+
for (const u of c) {
|
|
42416
|
+
const { start: f, count: p } = u;
|
|
42417
|
+
for (let v = 0; v < p; v++) {
|
|
42418
|
+
const g = (f + v) * n;
|
|
42419
|
+
this._colors[g] = d.r, this._colors[g + 1] = d.g, this._colors[g + 2] = d.b;
|
|
42420
|
+
}
|
|
42421
|
+
}
|
|
42422
|
+
});
|
|
42423
|
+
});
|
|
42424
|
+
else
|
|
42425
|
+
for (const { modelId: o, elementId: l } of e) {
|
|
42426
|
+
if (!this._elementMap.has(o) || !this._elementMap.get(o).has(l))
|
|
42427
|
+
continue;
|
|
42428
|
+
const c = this._elementMap.get(o).get(l);
|
|
42429
|
+
for (const h of c) {
|
|
42430
|
+
const { start: d, count: u } = h;
|
|
42431
|
+
for (let f = 0; f < u; f++) {
|
|
42432
|
+
const p = (d + f) * n, v = r(o, l);
|
|
42433
|
+
if (v)
|
|
42434
|
+
this._colors[p] = v.r, this._colors[p + 1] = v.g, this._colors[p + 2] = v.b;
|
|
42435
|
+
else {
|
|
42436
|
+
const g = a(o, l);
|
|
42437
|
+
this._colors[p] = g.r, this._colors[p + 1] = g.g, this._colors[p + 2] = g.b;
|
|
42438
|
+
}
|
|
42439
|
+
}
|
|
42413
42440
|
}
|
|
42414
42441
|
}
|
|
42415
|
-
|
|
42416
|
-
n.array.set(this._colors), n.needsUpdate = !0;
|
|
42442
|
+
i.array.set(this._colors), i.needsUpdate = !0;
|
|
42417
42443
|
}
|
|
42418
42444
|
assignUniqueFaceColors() {
|
|
42419
42445
|
var a;
|
|
@@ -42587,7 +42613,7 @@ class Fn extends Q {
|
|
|
42587
42613
|
*/
|
|
42588
42614
|
async createSimplifiedLODs(e) {
|
|
42589
42615
|
var n, r;
|
|
42590
|
-
const { simplifyBufferElementsBatch: t } = await import("./batched-mesh-simplifier-
|
|
42616
|
+
const { simplifyBufferElementsBatch: t } = await import("./batched-mesh-simplifier-BrzQ9Wcy.mjs"), i = [this];
|
|
42591
42617
|
console.log(
|
|
42592
42618
|
`🔨 Creating ${e.length} LOD levels for batched mesh...`
|
|
42593
42619
|
);
|
|
@@ -42631,7 +42657,7 @@ class Fn extends Q {
|
|
|
42631
42657
|
* ```
|
|
42632
42658
|
*/
|
|
42633
42659
|
async createSimplifiedLODFast(e) {
|
|
42634
|
-
const { simplifyBatchedMeshFast: t } = await import("./batched-mesh-simplifier-
|
|
42660
|
+
const { simplifyBatchedMeshFast: t } = await import("./batched-mesh-simplifier-BrzQ9Wcy.mjs");
|
|
42635
42661
|
return t(this, e);
|
|
42636
42662
|
}
|
|
42637
42663
|
/**
|
|
@@ -42645,7 +42671,7 @@ class Fn extends Q {
|
|
|
42645
42671
|
}
|
|
42646
42672
|
const NC = Et.hexToRGB(Pe.accent), Ol = class Ol extends Lt {
|
|
42647
42673
|
constructor(e) {
|
|
42648
|
-
super(), this.material = e, this.globalMaterialIndex = -1, this._instancedMeshes = /* @__PURE__ */ new Map(), this._bufferElements = [], this._originalColor = null, this._elementMap = /* @__PURE__ */ new Map(), this._originalTransforms = /* @__PURE__ */ new Map(), this._elementOpacity = /* @__PURE__ */ new Map(), this._selectedElements = [], this._hidingElements = [], this._isolatingElements = [], this._edgeLines = /* @__PURE__ */ new Map(), this._edgeRanges = /* @__PURE__ */ new Map(), this._edgeThreshold = 60, this._edgeMaterial = null, this._isGeneratedLights = !1, this._pointLight = null, this._hiddenSet = /* @__PURE__ */ new Set(), this._isolatedSet = /* @__PURE__ */ new Set(), this.material && "vertexColors" in this.material && (this.material.vertexColors = !0, this.material.needsUpdate = !0);
|
|
42674
|
+
super(), this.material = e, this.globalMaterialIndex = -1, this._instancedMeshes = /* @__PURE__ */ new Map(), this._bufferElements = [], this._originalColor = null, this._elementMap = /* @__PURE__ */ new Map(), this._originalTransforms = /* @__PURE__ */ new Map(), this._elementOpacity = /* @__PURE__ */ new Map(), this._temporaryColors = /* @__PURE__ */ new Map(), this._selectedElements = [], this._hidingElements = [], this._isolatingElements = [], this._edgeLines = /* @__PURE__ */ new Map(), this._edgeRanges = /* @__PURE__ */ new Map(), this._edgeThreshold = 60, this._edgeMaterial = null, this._isGeneratedLights = !1, this._pointLight = null, this._hiddenSet = /* @__PURE__ */ new Set(), this._isolatedSet = /* @__PURE__ */ new Set(), this.material && "vertexColors" in this.material && (this.material.vertexColors = !0, this.material.needsUpdate = !0);
|
|
42649
42675
|
}
|
|
42650
42676
|
addBufferElements(e, t) {
|
|
42651
42677
|
this._bufferElements = e, this._originalColor = t, this.rebuildInstances(e), this.enableRaycasting();
|
|
@@ -42767,65 +42793,114 @@ const NC = Et.hexToRGB(Pe.accent), Ol = class Ol extends Lt {
|
|
|
42767
42793
|
}
|
|
42768
42794
|
//#region Selection and Color Control
|
|
42769
42795
|
select(e, t = []) {
|
|
42770
|
-
this.unselect(), e.
|
|
42771
|
-
var r;
|
|
42772
|
-
((r = this._elementMap.get(i.modelId)) == null ? void 0 : r.get(i.elementId)) && this._selectedElements.push(i);
|
|
42773
|
-
}), this.changeColor(e, NC);
|
|
42796
|
+
this.unselect(), this._selectedElements = e, this.changeColor(this._selectedElements, NC);
|
|
42774
42797
|
}
|
|
42775
42798
|
unselect() {
|
|
42776
|
-
this._selectedElements.length > 0 && (this.
|
|
42799
|
+
this._selectedElements.length > 0 && (this.resetColor(this._selectedElements), this._selectedElements = []);
|
|
42777
42800
|
}
|
|
42778
|
-
|
|
42779
|
-
|
|
42780
|
-
|
|
42781
|
-
|
|
42782
|
-
|
|
42783
|
-
|
|
42784
|
-
|
|
42785
|
-
|
|
42801
|
+
/**
|
|
42802
|
+
* Changes the color of multiple elements.
|
|
42803
|
+
* @param elements - An array of elements, each containing `modelId` and `elementId`.
|
|
42804
|
+
* @param color - The new RGB color to apply
|
|
42805
|
+
* @param isTemporary - If true, stores this color as a temporary layer that will be restored on reset
|
|
42806
|
+
*
|
|
42807
|
+
* @example
|
|
42808
|
+
* ```typescript
|
|
42809
|
+
* // Normal color change (resets to original)
|
|
42810
|
+
* mesh.changeColor([{ modelId: "0", elementId: "abc" }], { r: 1, g: 0, b: 0 });
|
|
42811
|
+
*
|
|
42812
|
+
* // Temporary color (resets to this color instead of original)
|
|
42813
|
+
* mesh.changeColor([{ modelId: "0", elementId: "abc" }], { r: 0, g: 1, b: 0 }, true);
|
|
42814
|
+
* ```
|
|
42815
|
+
*/
|
|
42816
|
+
changeColor(e, t, i = !1) {
|
|
42817
|
+
e.forEach(({ modelId: n, elementId: r }) => {
|
|
42818
|
+
var l;
|
|
42819
|
+
const a = (l = this._elementMap.get(n)) == null ? void 0 : l.get(r);
|
|
42820
|
+
if (!a)
|
|
42821
|
+
return;
|
|
42822
|
+
const o = `${n}:${r}`;
|
|
42823
|
+
i && this._temporaryColors.set(o, { r: t.r, g: t.g, b: t.b }), a.forEach(({ instancedMesh: c, instanceIndex: h }) => {
|
|
42824
|
+
var f;
|
|
42825
|
+
const d = (f = c.instanceColor) == null ? void 0 : f.array;
|
|
42826
|
+
if (!d)
|
|
42786
42827
|
return;
|
|
42787
|
-
const
|
|
42788
|
-
|
|
42828
|
+
const u = h * 3;
|
|
42829
|
+
d[u] = t.r, d[u + 1] = t.g, d[u + 2] = t.b, c.instanceColor.needsUpdate = !0;
|
|
42789
42830
|
});
|
|
42790
42831
|
});
|
|
42791
42832
|
}
|
|
42792
|
-
|
|
42833
|
+
/**
|
|
42834
|
+
* Clears temporary colors for specified elements or all elements
|
|
42835
|
+
* @param elements - Elements to clear temporary colors for, or null to clear all
|
|
42836
|
+
*/
|
|
42837
|
+
clearTemporaryColors(e = null) {
|
|
42838
|
+
e === null ? this._temporaryColors.clear() : e.forEach(({ modelId: t, elementId: i }) => {
|
|
42839
|
+
const n = `${t}:${i}`;
|
|
42840
|
+
this._temporaryColors.delete(n);
|
|
42841
|
+
});
|
|
42842
|
+
}
|
|
42843
|
+
/**
|
|
42844
|
+
* Resets the color of elements back to temporary color (if exists) or original color.
|
|
42845
|
+
* @param elements - Array of elements to reset, or `null` to reset all instances.
|
|
42846
|
+
* @param excepts - Elements that should receive a different color instead of original/temporary
|
|
42847
|
+
*
|
|
42848
|
+
* @example
|
|
42849
|
+
* ```typescript
|
|
42850
|
+
* // Reset all elements to temporary color (if set) or original color
|
|
42851
|
+
* mesh.resetColor(null);
|
|
42852
|
+
*
|
|
42853
|
+
* // Reset specific elements
|
|
42854
|
+
* mesh.resetColor([{ modelId: "0", elementId: "abc" }, { modelId: "0", elementId: "def" }]);
|
|
42855
|
+
* ```
|
|
42856
|
+
*/
|
|
42857
|
+
resetColor(e, t = []) {
|
|
42793
42858
|
var r;
|
|
42794
42859
|
if (!this._originalColor)
|
|
42795
42860
|
return;
|
|
42796
|
-
const
|
|
42797
|
-
for (const l of
|
|
42861
|
+
const i = (a, o) => {
|
|
42862
|
+
for (const l of t)
|
|
42798
42863
|
if (l.elements.some(
|
|
42799
42864
|
(h) => h.modelId === a && h.elementId === o
|
|
42800
42865
|
))
|
|
42801
42866
|
return l.color;
|
|
42802
42867
|
return null;
|
|
42868
|
+
}, n = (a, o) => {
|
|
42869
|
+
const l = `${a}:${o}`;
|
|
42870
|
+
return this._temporaryColors.get(l) || this._originalColor;
|
|
42803
42871
|
};
|
|
42804
42872
|
if (e === null)
|
|
42805
|
-
this.
|
|
42806
|
-
|
|
42807
|
-
|
|
42808
|
-
|
|
42809
|
-
|
|
42810
|
-
const
|
|
42811
|
-
|
|
42812
|
-
|
|
42813
|
-
|
|
42814
|
-
|
|
42815
|
-
|
|
42816
|
-
|
|
42817
|
-
const a = (r = this._elementMap.get(e)) == null ? void 0 : r.get(t);
|
|
42818
|
-
if (!a)
|
|
42819
|
-
return;
|
|
42820
|
-
a.forEach(({ instancedMesh: o, instanceIndex: l }) => {
|
|
42821
|
-
var u;
|
|
42822
|
-
const c = (u = o.instanceColor) == null ? void 0 : u.array;
|
|
42823
|
-
if (!c)
|
|
42824
|
-
return;
|
|
42825
|
-
const h = l * 3, d = n(e, t);
|
|
42826
|
-
d ? (c[h] = d.r, c[h + 1] = d.g, c[h + 2] = d.b) : (c[h] = this._originalColor.r, c[h + 1] = this._originalColor.g, c[h + 2] = this._originalColor.b), o.instanceColor.needsUpdate = !0;
|
|
42873
|
+
this._elementMap.forEach((a, o) => {
|
|
42874
|
+
a.forEach((l, c) => {
|
|
42875
|
+
const h = n(o, c);
|
|
42876
|
+
l.forEach(({ instancedMesh: d, instanceIndex: u }) => {
|
|
42877
|
+
var v;
|
|
42878
|
+
const f = (v = d.instanceColor) == null ? void 0 : v.array;
|
|
42879
|
+
if (!f)
|
|
42880
|
+
return;
|
|
42881
|
+
const p = u * 3;
|
|
42882
|
+
f[p] = h.r, f[p + 1] = h.g, f[p + 2] = h.b, d.instanceColor.needsUpdate = !0;
|
|
42883
|
+
});
|
|
42884
|
+
});
|
|
42827
42885
|
});
|
|
42828
|
-
|
|
42886
|
+
else
|
|
42887
|
+
for (const { modelId: a, elementId: o } of e) {
|
|
42888
|
+
const l = (r = this._elementMap.get(a)) == null ? void 0 : r.get(o);
|
|
42889
|
+
l && l.forEach(({ instancedMesh: c, instanceIndex: h }) => {
|
|
42890
|
+
var p;
|
|
42891
|
+
const d = (p = c.instanceColor) == null ? void 0 : p.array;
|
|
42892
|
+
if (!d)
|
|
42893
|
+
return;
|
|
42894
|
+
const u = h * 3, f = i(a, o);
|
|
42895
|
+
if (f)
|
|
42896
|
+
d[u] = f.r, d[u + 1] = f.g, d[u + 2] = f.b;
|
|
42897
|
+
else {
|
|
42898
|
+
const v = n(a, o);
|
|
42899
|
+
d[u] = v.r, d[u + 1] = v.g, d[u + 2] = v.b;
|
|
42900
|
+
}
|
|
42901
|
+
c.instanceColor.needsUpdate = !0;
|
|
42902
|
+
});
|
|
42903
|
+
}
|
|
42829
42904
|
}
|
|
42830
42905
|
get selectedElements() {
|
|
42831
42906
|
return this._selectedElements;
|
|
@@ -42850,7 +42925,7 @@ const NC = Et.hexToRGB(Pe.accent), Ol = class Ol extends Lt {
|
|
|
42850
42925
|
Ol.ZERO_MATRIX
|
|
42851
42926
|
), o.instanceMatrix.needsUpdate = !0;
|
|
42852
42927
|
});
|
|
42853
|
-
})
|
|
42928
|
+
}));
|
|
42854
42929
|
}
|
|
42855
42930
|
/**
|
|
42856
42931
|
* Isolate elements - show ONLY these elements, hide everything else
|
|
@@ -42916,7 +42991,7 @@ const NC = Et.hexToRGB(Pe.accent), Ol = class Ol extends Lt {
|
|
|
42916
42991
|
* Reset all visibility - show everything
|
|
42917
42992
|
*/
|
|
42918
42993
|
reset() {
|
|
42919
|
-
this._hiddenSet.clear(), this._isolatedSet.clear(), this._hidingElements = [], this._isolatingElements = [], this._originalTransforms.forEach((e, t) => {
|
|
42994
|
+
this._hiddenSet.clear(), this._isolatedSet.clear(), this._hidingElements = [], this._isolatingElements = [], this._temporaryColors.clear(), this._originalTransforms.forEach((e, t) => {
|
|
42920
42995
|
e.forEach((i, n) => {
|
|
42921
42996
|
var a;
|
|
42922
42997
|
const r = (a = this._elementMap.get(t)) == null ? void 0 : a.get(n);
|
|
@@ -44005,11 +44080,18 @@ class FC extends Q {
|
|
|
44005
44080
|
});
|
|
44006
44081
|
}), Array.from(e.values());
|
|
44007
44082
|
}
|
|
44008
|
-
|
|
44009
|
-
|
|
44010
|
-
|
|
44011
|
-
|
|
44012
|
-
|
|
44083
|
+
/**
|
|
44084
|
+
* Changes the color of multiple elements in the merged mesh.
|
|
44085
|
+
* Works with RGBA color buffer (preserves existing alpha values)
|
|
44086
|
+
* @param elements - An array of elements, each containing `modelId` and `elementId`.
|
|
44087
|
+
* @param color - The new RGB color to apply
|
|
44088
|
+
* @param isTemporary - Override for temporary, if element has temporary color it will turn back this color, otherwise will turn back to original - default is false
|
|
44089
|
+
*/
|
|
44090
|
+
changeColor(e, t, i = !1) {
|
|
44091
|
+
this._batchedMeshes.forEach((n) => {
|
|
44092
|
+
n.changeColor(e, t, i);
|
|
44093
|
+
}), this._instancedMeshes.forEach((n) => {
|
|
44094
|
+
n.changeColor(e, t, i);
|
|
44013
44095
|
});
|
|
44014
44096
|
}
|
|
44015
44097
|
getElementBoxs(e) {
|
|
@@ -44059,9 +44141,9 @@ class FC extends Q {
|
|
|
44059
44141
|
*/
|
|
44060
44142
|
setElementGhost(e, t = 0.1) {
|
|
44061
44143
|
this._batchedMeshes.forEach((i) => {
|
|
44062
|
-
i.setElementGhost(e, t);
|
|
44144
|
+
i.setElementGhost(e, t, !0);
|
|
44063
44145
|
}), this._instancedMeshes.forEach((i) => {
|
|
44064
|
-
i.setElementGhost(e, t);
|
|
44146
|
+
i.setElementGhost(e, t / 10, !0);
|
|
44065
44147
|
});
|
|
44066
44148
|
}
|
|
44067
44149
|
/**
|
|
@@ -44073,7 +44155,7 @@ class FC extends Q {
|
|
|
44073
44155
|
this._batchedMeshes.forEach((i) => {
|
|
44074
44156
|
i.ghostExcept(e, t);
|
|
44075
44157
|
}), this._instancedMeshes.forEach((i) => {
|
|
44076
|
-
i.ghostExcept(e, t);
|
|
44158
|
+
i.ghostExcept(e, t / 10);
|
|
44077
44159
|
});
|
|
44078
44160
|
}
|
|
44079
44161
|
/**
|
|
@@ -44331,8 +44413,8 @@ class kC {
|
|
|
44331
44413
|
this.viralViewerApi = e, this.scene = new lc(), this.objects = [], this.models = [], this.mainModels = [], this.isolateModel = new Q(), this.mergedModel = new FC(), this.outlineModel = new Q(), this.hideables = [], this.selectables = [], this.edges = [], this.sunLight = null, this.lights = [], this.transformControls = null, this.lightHelpers = [], this.fullScreenQuadMaterial = new Ri({
|
|
44332
44414
|
map: null,
|
|
44333
44415
|
// Use the render target's texture
|
|
44334
|
-
side:
|
|
44335
|
-
}), this.fullScreenQuad = null, this.viralViewerApi.emit(
|
|
44416
|
+
side: fi
|
|
44417
|
+
}), this.fullScreenQuad = null, this.viralViewerApi.emit(Mt.LOADED_SCENE), this.isolateModel.name = Qr.isolateModel, this.addModel(this.isolateModel), this.mergedModel.name = Qr.mergedModel, this.addModel(this.mergedModel), this.outlineModel.name = Qr.outlineModel, this.outlineModel.renderOrder = 0, this.addModel(this.outlineModel);
|
|
44336
44418
|
const t = new So(5, 32, 32), i = new on({
|
|
44337
44419
|
color: 16768256,
|
|
44338
44420
|
emissive: 16755200,
|
|
@@ -45668,7 +45750,7 @@ class JC extends zn {
|
|
|
45668
45750
|
stencilBuffer: !1,
|
|
45669
45751
|
depthBuffer: !1,
|
|
45670
45752
|
alpha: !0
|
|
45671
|
-
}), this.bluenoise = new
|
|
45753
|
+
}), this.bluenoise = new Nn(ZC, 128, 128), this.accumulationQuad = new Qa(new mt({
|
|
45672
45754
|
uniforms: {
|
|
45673
45755
|
frame: {
|
|
45674
45756
|
value: 0
|
|
@@ -46059,7 +46141,7 @@ class t3 {
|
|
|
46059
46141
|
}
|
|
46060
46142
|
function i3() {
|
|
46061
46143
|
const s = new bd({
|
|
46062
|
-
side:
|
|
46144
|
+
side: fi
|
|
46063
46145
|
});
|
|
46064
46146
|
return s.onBeforeCompile = (e) => {
|
|
46065
46147
|
e.vertexShader = `attribute vec4 color;
|
|
@@ -46082,7 +46164,7 @@ function i3() {
|
|
|
46082
46164
|
function n3() {
|
|
46083
46165
|
const s = new Ri({
|
|
46084
46166
|
colorWrite: !1,
|
|
46085
|
-
side:
|
|
46167
|
+
side: fi
|
|
46086
46168
|
});
|
|
46087
46169
|
return s.onBeforeCompile = (e) => {
|
|
46088
46170
|
e.vertexShader = `attribute vec4 color;
|
|
@@ -46355,7 +46437,7 @@ class c3 extends zn {
|
|
|
46355
46437
|
), this.normalMaterial = i3(), this.depthMaterial = n3(), this.objectIdMaterial = new mt({
|
|
46356
46438
|
vertexShader: o3,
|
|
46357
46439
|
fragmentShader: l3,
|
|
46358
|
-
side:
|
|
46440
|
+
side: fi
|
|
46359
46441
|
}), this.edgeMaterial = new mt({
|
|
46360
46442
|
uniforms: {
|
|
46361
46443
|
tDiffuse: { value: null },
|
|
@@ -46738,7 +46820,7 @@ class d3 {
|
|
|
46738
46820
|
), this.renderer.outputColorSpace = Pi, this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = ds, this.renderer.shadowMap.autoUpdate = !1, this.renderer.shadowMap.needsUpdate = !0, this.renderer.info.autoReset = !1, this.viralViewerApi.targetElement.appendChild(this.renderer.domElement), this.viralViewerApi.options.enablePostProcessing !== !1 && (this.postProcessingRenderer = new h3(
|
|
46739
46821
|
this.renderer,
|
|
46740
46822
|
this.viralViewerApi
|
|
46741
|
-
)), this.jitterOffsets = this.generateJitterOffsets(), this.viralViewerApi.emit(
|
|
46823
|
+
)), this.jitterOffsets = this.generateJitterOffsets(), this.viralViewerApi.emit(Mt.LOADED_RENDERER);
|
|
46742
46824
|
}
|
|
46743
46825
|
updateSize(e, t) {
|
|
46744
46826
|
this.renderer.setSize(e, t), this.postProcessingRenderer && this.postProcessingRenderer.composer.setSize(e, t);
|
|
@@ -47768,7 +47850,7 @@ class Ab {
|
|
|
47768
47850
|
// polygonOffset: true,
|
|
47769
47851
|
// polygonOffsetFactor: 1,
|
|
47770
47852
|
// polygonOffsetUnits: 0.1,
|
|
47771
|
-
side:
|
|
47853
|
+
side: Un
|
|
47772
47854
|
// 🔧 FIX: Changed from DoubleSide to halve draw calls
|
|
47773
47855
|
});
|
|
47774
47856
|
l.userData.red = r.Red, l.userData.green = r.Green, l.userData.blue = r.Blue, l.userData.opacity = r.Opacity, this.viralViewerApi.viralMaterialManager.materials.push(l);
|
|
@@ -47916,7 +47998,7 @@ class Ab {
|
|
|
47916
47998
|
return l.multiplyScalar(o), l;
|
|
47917
47999
|
}, n = e.transparent || e.opacity < 1, r = t ? new on({
|
|
47918
48000
|
vertexColors: !0,
|
|
47919
|
-
side:
|
|
48001
|
+
side: fi,
|
|
47920
48002
|
// 🔧 FIX: Changed from DoubleSide to halve draw calls
|
|
47921
48003
|
opacity: e.opacity,
|
|
47922
48004
|
transparent: !0,
|
|
@@ -48148,7 +48230,7 @@ class A3 {
|
|
|
48148
48230
|
z,
|
|
48149
48231
|
() => {
|
|
48150
48232
|
L += 1, L == C && (this.viralViewerApi.emit(
|
|
48151
|
-
|
|
48233
|
+
Mt.LOADED_SEPERATE_MODEL,
|
|
48152
48234
|
{ modelId: M }
|
|
48153
48235
|
), console.log(
|
|
48154
48236
|
this._loadElementPatchWorker.getSpatialMeshManager()
|
|
@@ -48157,7 +48239,7 @@ class A3 {
|
|
|
48157
48239
|
), r());
|
|
48158
48240
|
}
|
|
48159
48241
|
) : (L += 1, L == C && (this.viralViewerApi.emit(
|
|
48160
|
-
|
|
48242
|
+
Mt.LOADED_SEPERATE_MODEL,
|
|
48161
48243
|
{ modelId: M }
|
|
48162
48244
|
), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), this.viralViewerApi.viralScene.mergedModel.enableEdge(
|
|
48163
48245
|
this.viralViewerApi.viralMaterialManager.edgeMaterial
|
|
@@ -48169,7 +48251,7 @@ class A3 {
|
|
|
48169
48251
|
}
|
|
48170
48252
|
};
|
|
48171
48253
|
(o = this.viralViewerApi.viralGeometryHandler) != null && o.isGeneratingMergeModel ? this.viralViewerApi.on(
|
|
48172
|
-
|
|
48254
|
+
Mt.GENERATED_MERGE_MODEL,
|
|
48173
48255
|
async () => {
|
|
48174
48256
|
await a();
|
|
48175
48257
|
}
|
|
@@ -49114,21 +49196,21 @@ void main() {
|
|
|
49114
49196
|
return i('var t;!function(t){t[t.POSITION_CARTESIAN=0]="POSITION_CARTESIAN",t[t.COLOR_PACKED=1]="COLOR_PACKED",t[t.COLOR_FLOATS_1=2]="COLOR_FLOATS_1",t[t.COLOR_FLOATS_255=3]="COLOR_FLOATS_255",t[t.NORMAL_FLOATS=4]="NORMAL_FLOATS",t[t.FILLER=5]="FILLER",t[t.INTENSITY=6]="INTENSITY",t[t.CLASSIFICATION=7]="CLASSIFICATION",t[t.NORMAL_SPHEREMAPPED=8]="NORMAL_SPHEREMAPPED",t[t.NORMAL_OCT16=9]="NORMAL_OCT16",t[t.NORMAL=10]="NORMAL"}(t||(t={}));const e={ordinal:1,size:4},n={ordinal:2,size:1},r={ordinal:3,size:1};function i(t,e,n){return{name:t,type:e,numElements:n,byteSize:n*e.size}}const s=i(t.COLOR_PACKED,n,4),a={POSITION_CARTESIAN:i(t.POSITION_CARTESIAN,e,3),RGBA_PACKED:s,COLOR_PACKED:s,RGB_PACKED:i(t.COLOR_PACKED,n,3),NORMAL_FLOATS:i(t.NORMAL_FLOATS,e,3),FILLER_1B:i(t.FILLER,r,1),INTENSITY:i(t.INTENSITY,{ordinal:5,size:2},1),CLASSIFICATION:i(t.CLASSIFICATION,r,1),NORMAL_SPHEREMAPPED:i(t.NORMAL_SPHEREMAPPED,r,2),NORMAL_OCT16:i(t.NORMAL_OCT16,r,2),NORMAL:i(t.NORMAL,e,3)};class o{constructor(t){this.versionMinor=0,this.version=t;const e=-1===t.indexOf(".")?t.length:t.indexOf(".");this.versionMajor=parseInt(t.substr(0,e),10),this.versionMinor=parseInt(t.substr(e+1),10),isNaN(this.versionMinor)&&(this.versionMinor=0)}newerThan(t){const e=new o(t);return this.versionMajor>e.versionMajor||this.versionMajor===e.versionMajor&&this.versionMinor>e.versionMinor}equalOrHigher(t){const e=new o(t);return this.versionMajor>e.versionMajor||this.versionMajor===e.versionMajor&&this.versionMinor>=e.versionMinor}upTo(t){return!this.newerThan(t)}}class u{constructor(t){this.tmp=new ArrayBuffer(4),this.tmpf=new Float32Array(this.tmp),this.tmpu8=new Uint8Array(this.tmp),this.u8=new Uint8Array(t)}getUint32(t){return this.u8[t+3]<<24|this.u8[t+2]<<16|this.u8[t+1]<<8|this.u8[t]}getUint16(t){return this.u8[t+1]<<8|this.u8[t]}getFloat32(t){const e=this.tmpu8,n=this.u8,r=this.tmpf;return e[0]=n[t+0],e[1]=n[t+1],e[2]=n[t+2],e[3]=n[t+3],r[0]}getUint8(t){return this.u8[t]}}const f=Math.sign||function(t){return 0==(t=Number(t))||t!=t?t:t<0?-1:1};function A(e,n){const r=function(e,n){switch(e.name){case t.POSITION_CARTESIAN:return function(t,e){const n=new ArrayBuffer(4*e.numPoints*3),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++){let n,i,s;e.version.newerThan("1.3")?(n=e.data.getUint32(e.currentOffset+t*e.pointAttributes.byteSize+0)*e.scale,i=e.data.getUint32(e.currentOffset+t*e.pointAttributes.byteSize+4)*e.scale,s=e.data.getUint32(e.currentOffset+t*e.pointAttributes.byteSize+8)*e.scale):(n=e.data.getFloat32(t*e.pointAttributes.byteSize+0)+e.nodeOffset[0],i=e.data.getFloat32(t*e.pointAttributes.byteSize+4)+e.nodeOffset[1],s=e.data.getFloat32(t*e.pointAttributes.byteSize+8)+e.nodeOffset[2]),r[3*t+0]=n,r[3*t+1]=i,r[3*t+2]=s,e.mean[0]+=n/e.numPoints,e.mean[1]+=i/e.numPoints,e.mean[2]+=s/e.numPoints,e.tightBoxMin[0]=Math.min(e.tightBoxMin[0],n),e.tightBoxMin[1]=Math.min(e.tightBoxMin[1],i),e.tightBoxMin[2]=Math.min(e.tightBoxMin[2],s),e.tightBoxMax[0]=Math.max(e.tightBoxMax[0],n),e.tightBoxMax[1]=Math.max(e.tightBoxMax[1],i),e.tightBoxMax[2]=Math.max(e.tightBoxMax[2],s)}return{buffer:n,attribute:t}}(e,n);case t.COLOR_PACKED:return function(t,e){const n=new ArrayBuffer(3*e.numPoints),r=new Uint8Array(n);for(let t=0;t<e.numPoints;t++)r[3*t+0]=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+0),r[3*t+1]=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+1),r[3*t+2]=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+2);return{buffer:n,attribute:t}}(e,n);case t.INTENSITY:return function(t,e){const n=new ArrayBuffer(4*e.numPoints),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++)r[t]=e.data.getUint16(e.currentOffset+t*e.pointAttributes.byteSize);return{buffer:n,attribute:t}}(e,n);case t.CLASSIFICATION:return function(t,e){const n=new ArrayBuffer(e.numPoints),r=new Uint8Array(n);for(let t=0;t<e.numPoints;t++)r[t]=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize);return{buffer:n,attribute:t}}(e,n);case t.NORMAL_SPHEREMAPPED:return function(t,e){const n=new ArrayBuffer(4*e.numPoints*3),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++){let n=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+0)/255*2-1,i=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+1)/255*2-1,s=1;const a=n*-n+i*-i+1*s;s=a,n*=Math.sqrt(a),i*=Math.sqrt(a),n*=2,i*=2,s=2*s-1,r[3*t+0]=n,r[3*t+1]=i,r[3*t+2]=s}return{buffer:n,attribute:t}}(e,n);case t.NORMAL_OCT16:return function(t,e){const n=new ArrayBuffer(4*e.numPoints*3),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++){const n=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+0)/255*2-1,i=e.data.getUint8(e.currentOffset+t*e.pointAttributes.byteSize+1)/255*2-1;let s=1-Math.abs(n)-Math.abs(i),a=0,o=0;s>=0?(a=n,o=i):(a=-(i/f(i)-1)/f(n),o=-(n/f(n)-1)/f(i));const u=Math.sqrt(a*a+o*o+s*s);a/=u,o/=u,s/=u,r[3*t+0]=a,r[3*t+1]=o,r[3*t+2]=s}return{buffer:n,attribute:t}}(e,n);case t.NORMAL:return function(t,e){const n=new ArrayBuffer(4*e.numPoints*3),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++){const n=e.data.getFloat32(e.currentOffset+t*e.pointAttributes.byteSize+0),i=e.data.getFloat32(e.currentOffset+t*e.pointAttributes.byteSize+4),s=e.data.getFloat32(e.currentOffset+t*e.pointAttributes.byteSize+8);r[3*t+0]=n,r[3*t+1]=i,r[3*t+2]=s}return{buffer:n,attribute:t}}(e,n);default:return}}(e,n);void 0!==r&&(n.attributeBuffers[r.attribute.name]=r,n.transferables.push(r.buffer))}onmessage=function(e){const n=e.data.buffer,r=e.data.pointAttributes,i={attributeBuffers:{},currentOffset:0,data:new u(n),mean:[0,0,0],nodeOffset:e.data.offset,numPoints:e.data.buffer.byteLength/r.byteSize,pointAttributes:r,scale:e.data.scale,tightBoxMax:[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],tightBoxMin:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transferables:[],version:new o(e.data.version)};for(const t of i.pointAttributes.attributes)A(t,i),i.currentOffset+=t.byteSize;const s=new ArrayBuffer(4*i.numPoints),f=new Uint32Array(s);for(let t=0;t<i.numPoints;t++)f[t]=t;i.attributeBuffers[t.CLASSIFICATION]||function(e){const n=new ArrayBuffer(4*e.numPoints),r=new Float32Array(n);for(let t=0;t<e.numPoints;t++)r[t]=0;e.attributeBuffers[t.CLASSIFICATION]={buffer:n,attribute:a.CLASSIFICATION}}(i);const O={buffer:n,mean:i.mean,attributeBuffers:i.attributeBuffers,tightBoundingBox:{min:i.tightBoxMin,max:i.tightBoxMax},indices:s};postMessage(O,i.transferables)};', "Worker", void 0, void 0);
|
|
49115
49197
|
}
|
|
49116
49198
|
} }, pv = {};
|
|
49117
|
-
function
|
|
49199
|
+
function En(s) {
|
|
49118
49200
|
var e = pv[s];
|
|
49119
49201
|
if (e !== void 0)
|
|
49120
49202
|
return e.exports;
|
|
49121
49203
|
var t = pv[s] = { exports: {} };
|
|
49122
|
-
return T3[s](t, t.exports,
|
|
49204
|
+
return T3[s](t, t.exports, En), t.exports;
|
|
49123
49205
|
}
|
|
49124
|
-
|
|
49206
|
+
En.d = (s, e) => {
|
|
49125
49207
|
for (var t in e)
|
|
49126
|
-
|
|
49127
|
-
},
|
|
49208
|
+
En.o(e, t) && !En.o(s, t) && Object.defineProperty(s, t, { enumerable: !0, get: e[t] });
|
|
49209
|
+
}, En.o = (s, e) => Object.prototype.hasOwnProperty.call(s, e);
|
|
49128
49210
|
var Ft = {};
|
|
49129
49211
|
(() => {
|
|
49130
|
-
|
|
49131
|
-
const s = (e = { AdditiveBlending: () => Hl, Box3: () => ut, BufferAttribute: () => ot, BufferGeometry: () => dt, CanvasTexture: () => np, Color: () => Ie, DataTexture: () =>
|
|
49212
|
+
En.d(Ft, { HY: () => c, K8: () => i, vF: () => g, jM: () => m, st: () => b, J7: () => ht, KV: () => Te, Tl: () => ee, gv: () => gt, LR: () => ce, C9: () => I, zF: () => Ee, XL: () => ge, uv: () => ve, vs: () => fe, YJ: () => N, i9: () => l, uD: () => o, lV: () => r, Sp: () => n, RJ: () => Ss, SB: () => kn, TL: () => x, oe: () => y, AB: () => a, dZ: () => _, Gf: () => le, gK: () => w, BT: () => S, bt: () => T, sX: () => E });
|
|
49213
|
+
const s = (e = { AdditiveBlending: () => Hl, Box3: () => ut, BufferAttribute: () => ot, BufferGeometry: () => dt, CanvasTexture: () => np, Color: () => Ie, DataTexture: () => Nn, EventDispatcher: () => Ws, Frustum: () => Oo, GLSL3: () => ep, LessEqualDepth: () => la, LineBasicMaterial: () => dn, LineSegments: () => Ii, LinearFilter: () => jt, Matrix4: () => Ce, NearestFilter: () => Dt, NoBlending: () => $t, Object3D: () => Lt, Points: () => _o, RGBAFormat: () => Kt, RawShaderMaterial: () => hm, Scene: () => lc, ShaderMaterial: () => mt, Sphere: () => ni, Texture: () => ci, Uint8BufferAttribute: () => U1, Vector2: () => K, Vector3: () => P, Vector4: () => At, WebGLRenderTarget: () => Tt }, t = {}, En.d(t, e), t);
|
|
49132
49214
|
var e, t, i, n, r, a, o, l;
|
|
49133
49215
|
class c extends s.ShaderMaterial {
|
|
49134
49216
|
constructor() {
|
|
@@ -49202,7 +49284,7 @@ var Ft = {};
|
|
|
49202
49284
|
(F = k[pe]) && (J = (q < 3 ? F(J) : q > 3 ? F(A, R, J) : F(A, R)) || J);
|
|
49203
49285
|
return q > 3 && J && Object.defineProperty(A, R, J), J;
|
|
49204
49286
|
};
|
|
49205
|
-
const L =
|
|
49287
|
+
const L = En(776).Z, U = En(746).Z, z = { [a.OCTREE]: "tree_type_octree", [a.KDTREE]: "tree_type_kdtree" }, X = { [n.FIXED]: "fixed_point_size", [n.ATTENUATED]: "attenuated_point_size", [n.ADAPTIVE]: "adaptive_point_size" }, j = { [o.ATTENUATED]: "attenuated_opacity", [o.FIXED]: "fixed_opacity" }, re = { [r.SQUARE]: "square_point_shape", [r.CIRCLE]: "circle_point_shape", [r.PARABOLOID]: "paraboloid_point_shape" }, Z = { [l.RGB]: "color_type_rgb", [l.COLOR]: "color_type_color", [l.DEPTH]: "color_type_depth", [l.HEIGHT]: "color_type_height", [l.INTENSITY]: "color_type_intensity", [l.INTENSITY_GRADIENT]: "color_type_intensity_gradient", [l.LOD]: "color_type_lod", [l.POINT_INDEX]: "color_type_point_index", [l.CLASSIFICATION]: "color_type_classification", [l.RETURN_NUMBER]: "color_type_return_number", [l.SOURCE]: "color_type_source", [l.NORMAL]: "color_type_normal", [l.PHONG]: "color_type_phong", [l.RGB_HEIGHT]: "color_type_rgb_height", [l.COMPOSITE]: "color_type_composite" }, ie = { [i.DISABLED]: "clip_disabled", [i.CLIP_OUTSIDE]: "clip_outside", [i.HIGHLIGHT_INSIDE]: "clip_highlight_inside" }, ue = { [M.LINEAR]: "input_color_encoding_linear", [M.SRGB]: "input_color_encoding_sRGB" }, Oe = { [M.LINEAR]: "output_color_encoding_linear", [M.SRGB]: "output_color_encoding_sRGB" };
|
|
49206
49288
|
class ce extends s.RawShaderMaterial {
|
|
49207
49289
|
constructor(A = {}) {
|
|
49208
49290
|
super(), this.lights = !1, this.fog = !1, this.numClipBoxes = 0, this.clipBoxes = [], this.visibleNodeTextureOffsets = /* @__PURE__ */ new Map(), this._gradient = y, this.gradientTexture = E(this._gradient), this._classification = v, this.classificationTexture = S(this._classification), this.uniforms = { bbSize: Se("fv", [0, 0, 0]), blendDepthSupplement: Se("f", 0), blendHardness: Se("f", 2), classificationLUT: Se("t", this.classificationTexture || new s.Texture()), clipBoxCount: Se("f", 0), clipBoxes: Se("Matrix4fv", []), depthMap: Se("t", null), diffuse: Se("fv", [1, 1, 1]), fov: Se("f", 1), gradient: Se("t", this.gradientTexture || new s.Texture()), heightMax: Se("f", 1), heightMin: Se("f", 0), intensityBrightness: Se("f", 0), intensityContrast: Se("f", 0), intensityGamma: Se("f", 1), intensityRange: Se("fv", [0, 65e3]), isLeafNode: Se("b", 0), level: Se("f", 0), maxSize: Se("f", 50), minSize: Se("f", 2), octreeSize: Se("f", 0), opacity: Se("f", 1), pcIndex: Se("f", 0), rgbBrightness: Se("f", 0), rgbContrast: Se("f", 0), rgbGamma: Se("f", 1), screenHeight: Se("f", 1), screenWidth: Se("f", 1), size: Se("f", 1), spacing: Se("f", 1), toModel: Se("Matrix4f", []), transition: Se("f", 0.5), uColor: Se("c", new s.Color(16777215)), visibleNodes: Se("t", this.visibleNodesTexture || new s.Texture()), vnStart: Se("f", 0), wClassification: Se("f", 0), wElevation: Se("f", 0), wIntensity: Se("f", 0), wReturnNumber: Se("f", 0), wRGB: Se("f", 1), wSourceID: Se("f", 0), opacityAttenuation: Se("f", 1), filterByNormalThreshold: Se("f", 0), highlightedPointCoordinate: Se("fv", new s.Vector3()), highlightedPointColor: Se("fv", u.clone()), enablePointHighlighting: Se("b", !0), highlightedPointScale: Se("f", 2) }, this.useClipBox = !1, this.weighted = !1, this.pointColorType = l.RGB, this.pointSizeType = n.ADAPTIVE, this.clipMode = i.DISABLED, this.useEDL = !1, this.shape = r.SQUARE, this.treeType = a.OCTREE, this.pointOpacityType = o.FIXED, this.useFilterByNormal = !1, this.highlightPoint = !1, this.inputColorEncoding = M.SRGB, this.outputColorEncoding = M.LINEAR, this.attributes = { position: { type: "fv", value: [] }, color: { type: "fv", value: [] }, normal: { type: "fv", value: [] }, intensity: { type: "f", value: [] }, classification: { type: "f", value: [] }, returnNumber: { type: "f", value: [] }, numberOfReturns: { type: "f", value: [] }, pointSourceID: { type: "f", value: [] }, indices: { type: "fv", value: [] } };
|
|
@@ -49763,7 +49845,7 @@ var Ft = {};
|
|
|
49763
49845
|
return !1;
|
|
49764
49846
|
}
|
|
49765
49847
|
}
|
|
49766
|
-
const Ne =
|
|
49848
|
+
const Ne = En(955).Z, Ke = En(325).Z;
|
|
49767
49849
|
var We;
|
|
49768
49850
|
(function(k) {
|
|
49769
49851
|
k.DECODER_WORKER_BROTLI = "DECODER_WORKER_BROTLI", k.DECODER_WORKER = "DECODER_WORKER";
|
|
@@ -50039,7 +50121,7 @@ var Ft = {};
|
|
|
50039
50121
|
return !this.newerThan(A);
|
|
50040
50122
|
}
|
|
50041
50123
|
}
|
|
50042
|
-
const Ze =
|
|
50124
|
+
const Ze = En(417).Z;
|
|
50043
50125
|
class lt {
|
|
50044
50126
|
constructor({ getUrl: A = (J) => Promise.resolve(J), version: R, boundingBox: O, scale: F, xhrRequest: q }) {
|
|
50045
50127
|
this.disposed = !1, this.workers = [], console.log([A, R, O, F, q]), this.version = typeof R == "string" ? new le(R) : R, this.xhrRequest = q, this.getUrl = A, this.boundingBox = O, this.scale = F, this.callbacks = [];
|
|
@@ -50669,7 +50751,7 @@ class D3 {
|
|
|
50669
50751
|
v,
|
|
50670
50752
|
() => {
|
|
50671
50753
|
p += 1, p == f && (this._loadElementBatchWorker.flushAllBuffers(), this.viralViewerApi.emit(
|
|
50672
|
-
|
|
50754
|
+
Mt.LOADED_SEPERATE_MODEL,
|
|
50673
50755
|
{ modelId: d }
|
|
50674
50756
|
), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), this.viralViewerApi.viralVisibilityManager.enableScreenSpaceEdge(
|
|
50675
50757
|
"shaded"
|
|
@@ -50677,7 +50759,7 @@ class D3 {
|
|
|
50677
50759
|
},
|
|
50678
50760
|
u
|
|
50679
50761
|
) : (p += 1, p == f && (this._loadElementBatchWorker.flushAllBuffers(), this.viralViewerApi.emit(
|
|
50680
|
-
|
|
50762
|
+
Mt.LOADED_SEPERATE_MODEL,
|
|
50681
50763
|
{ modelId: d }
|
|
50682
50764
|
), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), this.viralViewerApi.viralVisibilityManager.enableScreenSpaceEdge(
|
|
50683
50765
|
"shaded"
|
|
@@ -50692,7 +50774,7 @@ class D3 {
|
|
|
50692
50774
|
}
|
|
50693
50775
|
};
|
|
50694
50776
|
(a = this.viralViewerApi.viralGeometryHandler) != null && a.isGeneratingMergeModel ? this.viralViewerApi.on(
|
|
50695
|
-
|
|
50777
|
+
Mt.GENERATED_MERGE_MODEL,
|
|
50696
50778
|
async () => {
|
|
50697
50779
|
await r();
|
|
50698
50780
|
}
|
|
@@ -50751,7 +50833,7 @@ class D3 {
|
|
|
50751
50833
|
T,
|
|
50752
50834
|
a.Elements,
|
|
50753
50835
|
() => {
|
|
50754
|
-
this._loadElementBatchWorker.flushAllBuffers(), this.viralViewerApi.emit(
|
|
50836
|
+
this._loadElementBatchWorker.flushAllBuffers(), this.viralViewerApi.emit(Mt.LOADED_SEPERATE_MODEL, {
|
|
50755
50837
|
modelId: T
|
|
50756
50838
|
}), this.viralViewerApi.viralVisibilityManager.enableShadow(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusion(), this.viralViewerApi.viralVisibilityManager.enableAmbientOcclusionScreenSpaceRadius(), i();
|
|
50757
50839
|
}
|
|
@@ -50762,7 +50844,7 @@ class D3 {
|
|
|
50762
50844
|
}
|
|
50763
50845
|
};
|
|
50764
50846
|
(r = this.viralViewerApi.viralGeometryHandler) != null && r.isGeneratingMergeModel ? this.viralViewerApi.on(
|
|
50765
|
-
|
|
50847
|
+
Mt.GENERATED_MERGE_MODEL,
|
|
50766
50848
|
async () => {
|
|
50767
50849
|
await n();
|
|
50768
50850
|
}
|
|
@@ -51280,13 +51362,13 @@ function ln(s, e) {
|
|
|
51280
51362
|
function _n(s, e) {
|
|
51281
51363
|
return e[s + 6];
|
|
51282
51364
|
}
|
|
51283
|
-
function
|
|
51365
|
+
function In(s, e) {
|
|
51284
51366
|
return e[s + 14];
|
|
51285
51367
|
}
|
|
51286
|
-
function
|
|
51368
|
+
function Rn(s) {
|
|
51287
51369
|
return s + 8;
|
|
51288
51370
|
}
|
|
51289
|
-
function
|
|
51371
|
+
function Dn(s, e) {
|
|
51290
51372
|
return e[s + 6];
|
|
51291
51373
|
}
|
|
51292
51374
|
function Cb(s, e) {
|
|
@@ -51468,7 +51550,7 @@ const eI = function() {
|
|
|
51468
51550
|
return !1;
|
|
51469
51551
|
};
|
|
51470
51552
|
}(), iI = ["x", "y", "z"], Bs = 1e-15, yv = Bs * Bs;
|
|
51471
|
-
function
|
|
51553
|
+
function An(s) {
|
|
51472
51554
|
return Math.abs(s) < Bs;
|
|
51473
51555
|
}
|
|
51474
51556
|
class es extends vn {
|
|
@@ -51543,11 +51625,11 @@ es.prototype.intersectsTriangle = function() {
|
|
|
51543
51625
|
}
|
|
51544
51626
|
function v(x, y, _, w) {
|
|
51545
51627
|
const T = y.degenerateSegment, E = x.plane.distanceToPoint(T.start), S = x.plane.distanceToPoint(T.end);
|
|
51546
|
-
return
|
|
51628
|
+
return An(E) ? An(S) ? u(x, y, _, w) : (_ && (_.start.copy(T.start), _.end.copy(T.start)), x.containsPoint(T.start)) : An(S) ? (_ && (_.start.copy(T.end), _.end.copy(T.end)), x.containsPoint(T.end)) : x.plane.intersectLine(T, i) != null ? (_ && (_.start.copy(i), _.end.copy(i)), x.containsPoint(i)) : !1;
|
|
51547
51629
|
}
|
|
51548
51630
|
function g(x, y, _) {
|
|
51549
51631
|
const w = y.a;
|
|
51550
|
-
return
|
|
51632
|
+
return An(x.plane.distanceToPoint(w)) && x.containsPoint(w) ? (_ && (_.start.copy(w), _.end.copy(w)), !0) : !1;
|
|
51551
51633
|
}
|
|
51552
51634
|
function m(x, y, _) {
|
|
51553
51635
|
const w = x.degenerateSegment, T = y.a;
|
|
@@ -51559,13 +51641,13 @@ es.prototype.intersectsTriangle = function() {
|
|
|
51559
51641
|
const T = x.degenerateSegment, E = y.degenerateSegment, S = n, M = r;
|
|
51560
51642
|
T.delta(S), E.delta(M);
|
|
51561
51643
|
const C = i.subVectors(E.start, T.start), L = S.x * M.y - S.y * M.x;
|
|
51562
|
-
if (
|
|
51644
|
+
if (An(L))
|
|
51563
51645
|
return !1;
|
|
51564
51646
|
const U = (C.x * M.y - C.y * M.x) / L, z = -(S.x * C.y - S.y * C.x) / L;
|
|
51565
51647
|
if (U < 0 || U > 1 || z < 0 || z > 1)
|
|
51566
51648
|
return !1;
|
|
51567
51649
|
const X = T.start.z + S.z * U, j = E.start.z + M.z * z;
|
|
51568
|
-
return
|
|
51650
|
+
return An(X - j) ? (_ && (_.start.copy(T.start).addScaledVector(S, U), _.end.copy(T.start).addScaledVector(S, U)), !0) : !1;
|
|
51569
51651
|
} else
|
|
51570
51652
|
return y.isDegenerateIntoPoint ? m(x, y, _) : v(y, x, _, w);
|
|
51571
51653
|
else {
|
|
@@ -51584,12 +51666,12 @@ es.prototype.intersectsTriangle = function() {
|
|
|
51584
51666
|
return T;
|
|
51585
51667
|
const E = this.plane, S = y.plane;
|
|
51586
51668
|
let M = S.distanceToPoint(this.a), C = S.distanceToPoint(this.b), L = S.distanceToPoint(this.c);
|
|
51587
|
-
|
|
51669
|
+
An(M) && (M = 0), An(C) && (C = 0), An(L) && (L = 0);
|
|
51588
51670
|
const U = M * C, z = M * L;
|
|
51589
51671
|
if (U > 0 && z > 0)
|
|
51590
51672
|
return !1;
|
|
51591
51673
|
let X = E.distanceToPoint(y.a), j = E.distanceToPoint(y.b), re = E.distanceToPoint(y.c);
|
|
51592
|
-
|
|
51674
|
+
An(X) && (X = 0), An(j) && (j = 0), An(re) && (re = 0);
|
|
51593
51675
|
const Z = X * j, ie = X * re;
|
|
51594
51676
|
if (Z > 0 && ie > 0)
|
|
51595
51677
|
return !1;
|
|
@@ -51791,7 +51873,7 @@ class nI extends xm {
|
|
|
51791
51873
|
super(() => new es());
|
|
51792
51874
|
}
|
|
51793
51875
|
}
|
|
51794
|
-
const
|
|
51876
|
+
const Ln = /* @__PURE__ */ new nI();
|
|
51795
51877
|
class sI {
|
|
51796
51878
|
constructor() {
|
|
51797
51879
|
this.float32Array = null, this.uint16Array = null, this.uint32Array = null;
|
|
@@ -51818,23 +51900,23 @@ function pp(s, e, t, i, n = null, r = 0, a = 0) {
|
|
|
51818
51900
|
const { float32Array: o, uint16Array: l, uint32Array: c } = Jt;
|
|
51819
51901
|
let h = s * 2;
|
|
51820
51902
|
if (ln(h, l)) {
|
|
51821
|
-
const u = _n(s, c), f =
|
|
51903
|
+
const u = _n(s, c), f = In(h, l);
|
|
51822
51904
|
return di(s, o, gr), i(u, f, !1, a, r + s, gr);
|
|
51823
51905
|
} else {
|
|
51824
51906
|
let M = function(L) {
|
|
51825
51907
|
const { uint16Array: U, uint32Array: z } = Jt;
|
|
51826
51908
|
let X = L * 2;
|
|
51827
51909
|
for (; !ln(X, U); )
|
|
51828
|
-
L =
|
|
51910
|
+
L = Rn(L), X = L * 2;
|
|
51829
51911
|
return _n(L, z);
|
|
51830
51912
|
}, C = function(L) {
|
|
51831
51913
|
const { uint16Array: U, uint32Array: z } = Jt;
|
|
51832
51914
|
let X = L * 2;
|
|
51833
51915
|
for (; !ln(X, U); )
|
|
51834
|
-
L =
|
|
51835
|
-
return _n(L, z) +
|
|
51916
|
+
L = Dn(L, z), X = L * 2;
|
|
51917
|
+
return _n(L, z) + In(X, U);
|
|
51836
51918
|
};
|
|
51837
|
-
const u =
|
|
51919
|
+
const u = Rn(s), f = Dn(s, c);
|
|
51838
51920
|
let p = u, v = f, g, m, b, x;
|
|
51839
51921
|
if (n && (b = gr, x = oo, di(p, o, b), di(v, o, x), g = n(b), m = n(x), m < g)) {
|
|
51840
51922
|
p = f, v = u;
|
|
@@ -51900,7 +51982,7 @@ function aI(s, e, t = {}, i = 0, n = 1 / 0) {
|
|
|
51900
51982
|
const Mh = parseInt(Do) >= 169, oI = parseInt(Do) <= 161, Xr = /* @__PURE__ */ new P(), Hr = /* @__PURE__ */ new P(), Yr = /* @__PURE__ */ new P(), Ah = /* @__PURE__ */ new K(), Th = /* @__PURE__ */ new K(), Eh = /* @__PURE__ */ new K(), _v = /* @__PURE__ */ new P(), wv = /* @__PURE__ */ new P(), Sv = /* @__PURE__ */ new P(), hl = /* @__PURE__ */ new P();
|
|
51901
51983
|
function lI(s, e, t, i, n, r, a, o) {
|
|
51902
51984
|
let l;
|
|
51903
|
-
if (r === Ki ? l = s.intersectTriangle(i, t, e, !0, n) : l = s.intersectTriangle(e, t, i, r !==
|
|
51985
|
+
if (r === Ki ? l = s.intersectTriangle(i, t, e, !0, n) : l = s.intersectTriangle(e, t, i, r !== fi, n), l === null)
|
|
51904
51986
|
return null;
|
|
51905
51987
|
const c = s.origin.distanceTo(n);
|
|
51906
51988
|
return c < a || c > o ? null : {
|
|
@@ -52051,12 +52133,12 @@ function vI(s, e, t, i, n, r, a) {
|
|
|
52051
52133
|
function mp(s, e, t, i, n, r, a) {
|
|
52052
52134
|
const { float32Array: o, uint16Array: l, uint32Array: c } = Jt, h = s * 2;
|
|
52053
52135
|
if (ln(h, l)) {
|
|
52054
|
-
const u = _n(s, c), f =
|
|
52136
|
+
const u = _n(s, c), f = In(h, l);
|
|
52055
52137
|
hI(e, t, i, u, f, n, r, a);
|
|
52056
52138
|
} else {
|
|
52057
|
-
const u =
|
|
52139
|
+
const u = Rn(s);
|
|
52058
52140
|
Tr(u, o, i, r, a) && mp(u, e, t, i, n, r, a);
|
|
52059
|
-
const f =
|
|
52141
|
+
const f = Dn(s, c);
|
|
52060
52142
|
Tr(f, o, i, r, a) && mp(f, e, t, i, n, r, a);
|
|
52061
52143
|
}
|
|
52062
52144
|
}
|
|
@@ -52070,12 +52152,12 @@ function gp(s, e, t, i, n, r) {
|
|
|
52070
52152
|
const { float32Array: a, uint16Array: o, uint32Array: l } = Jt;
|
|
52071
52153
|
let c = s * 2;
|
|
52072
52154
|
if (ln(c, o)) {
|
|
52073
|
-
const d = _n(s, l), u =
|
|
52155
|
+
const d = _n(s, l), u = In(c, o);
|
|
52074
52156
|
return dI(e, t, i, d, u, n, r);
|
|
52075
52157
|
} else {
|
|
52076
52158
|
const d = Cb(s, l), u = xI[d], p = i.direction[u] >= 0;
|
|
52077
52159
|
let v, g;
|
|
52078
|
-
p ? (v =
|
|
52160
|
+
p ? (v = Rn(s), g = Dn(s, l)) : (v = Dn(s, l), g = Rn(s));
|
|
52079
52161
|
const b = Tr(v, a, i, n, r) ? gp(v, e, t, i, n, r) : null;
|
|
52080
52162
|
if (b) {
|
|
52081
52163
|
const _ = b.point[u];
|
|
@@ -52099,7 +52181,7 @@ function vp(s, e, t, i, n = null) {
|
|
|
52099
52181
|
const { float32Array: r, uint16Array: a, uint32Array: o } = Jt;
|
|
52100
52182
|
let l = s * 2;
|
|
52101
52183
|
if (n === null && (t.boundingBox || t.computeBoundingBox(), Mv.set(t.boundingBox.min, t.boundingBox.max, i), n = Mv), ln(l, a)) {
|
|
52102
|
-
const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, p = t.attributes.position, v = _n(s, o), g =
|
|
52184
|
+
const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, p = t.attributes.position, v = _n(s, o), g = In(l, a);
|
|
52103
52185
|
if (dl.copy(i).invert(), t.boundsTree)
|
|
52104
52186
|
return di(s, r, Ch), Ch.matrix.copy(dl), Ch.needsUpdate = !0, t.boundsTree.shapecast({
|
|
52105
52187
|
intersectsBounds: (b) => Ch.intersectsBox(b),
|
|
@@ -52128,7 +52210,7 @@ function vp(s, e, t, i, n = null) {
|
|
|
52128
52210
|
const Ih = /* @__PURE__ */ new Ce(), ef = /* @__PURE__ */ new en(), ul = /* @__PURE__ */ new en(), _I = /* @__PURE__ */ new P(), wI = /* @__PURE__ */ new P(), SI = /* @__PURE__ */ new P(), MI = /* @__PURE__ */ new P();
|
|
52129
52211
|
function AI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
52130
52212
|
e.boundingBox || e.computeBoundingBox(), ef.set(e.boundingBox.min, e.boundingBox.max, t), ef.needsUpdate = !0;
|
|
52131
|
-
const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u =
|
|
52213
|
+
const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u = Ln.getPrimitive(), f = Ln.getPrimitive();
|
|
52132
52214
|
let p = _I, v = wI, g = null, m = null;
|
|
52133
52215
|
n && (g = SI, m = MI);
|
|
52134
52216
|
let b = 1 / 0, x = null, y = null;
|
|
@@ -52167,7 +52249,7 @@ function AI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
|
52167
52249
|
}
|
|
52168
52250
|
}
|
|
52169
52251
|
}
|
|
52170
|
-
),
|
|
52252
|
+
), Ln.releasePrimitive(u), Ln.releasePrimitive(f), b === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = b, i.faceIndex = x, n && (n.point ? n.point.copy(m) : n.point = m.clone(), n.point.applyMatrix4(Ih), v.applyMatrix4(Ih), n.distance = v.sub(n.point).length(), n.faceIndex = y), i);
|
|
52171
52253
|
}
|
|
52172
52254
|
function TI(s, e = null) {
|
|
52173
52255
|
e && Array.isArray(e) && (e = new Set(e));
|
|
@@ -52216,12 +52298,12 @@ function EI(s, e, t, i, n, r, a) {
|
|
|
52216
52298
|
function xp(s, e, t, i, n, r, a) {
|
|
52217
52299
|
const { float32Array: o, uint16Array: l, uint32Array: c } = Jt, h = s * 2;
|
|
52218
52300
|
if (ln(h, l)) {
|
|
52219
|
-
const u = _n(s, c), f =
|
|
52301
|
+
const u = _n(s, c), f = In(h, l);
|
|
52220
52302
|
pI(e, t, i, u, f, n, r, a);
|
|
52221
52303
|
} else {
|
|
52222
|
-
const u =
|
|
52304
|
+
const u = Rn(s);
|
|
52223
52305
|
Tr(u, o, i, r, a) && xp(u, e, t, i, n, r, a);
|
|
52224
|
-
const f =
|
|
52306
|
+
const f = Dn(s, c);
|
|
52225
52307
|
Tr(f, o, i, r, a) && xp(f, e, t, i, n, r, a);
|
|
52226
52308
|
}
|
|
52227
52309
|
}
|
|
@@ -52235,12 +52317,12 @@ function bp(s, e, t, i, n, r) {
|
|
|
52235
52317
|
const { float32Array: a, uint16Array: o, uint32Array: l } = Jt;
|
|
52236
52318
|
let c = s * 2;
|
|
52237
52319
|
if (ln(c, o)) {
|
|
52238
|
-
const d = _n(s, l), u =
|
|
52320
|
+
const d = _n(s, l), u = In(c, o);
|
|
52239
52321
|
return mI(e, t, i, d, u, n, r);
|
|
52240
52322
|
} else {
|
|
52241
52323
|
const d = Cb(s, l), u = PI[d], p = i.direction[u] >= 0;
|
|
52242
52324
|
let v, g;
|
|
52243
|
-
p ? (v =
|
|
52325
|
+
p ? (v = Rn(s), g = Dn(s, l)) : (v = Dn(s, l), g = Rn(s));
|
|
52244
52326
|
const b = Tr(v, a, i, n, r) ? bp(v, e, t, i, n, r) : null;
|
|
52245
52327
|
if (b) {
|
|
52246
52328
|
const _ = b.point[u];
|
|
@@ -52264,7 +52346,7 @@ function yp(s, e, t, i, n = null) {
|
|
|
52264
52346
|
const { float32Array: r, uint16Array: a, uint32Array: o } = Jt;
|
|
52265
52347
|
let l = s * 2;
|
|
52266
52348
|
if (n === null && (t.boundingBox || t.computeBoundingBox(), Av.set(t.boundingBox.min, t.boundingBox.max, i), n = Av), ln(l, a)) {
|
|
52267
|
-
const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, p = t.attributes.position, v = _n(s, o), g =
|
|
52349
|
+
const h = e.geometry, d = h.index, u = h.attributes.position, f = t.index, p = t.attributes.position, v = _n(s, o), g = In(l, a);
|
|
52268
52350
|
if (fl.copy(i).invert(), t.boundsTree)
|
|
52269
52351
|
return di(s, r, Dh), Dh.matrix.copy(fl), Dh.needsUpdate = !0, t.boundsTree.shapecast({
|
|
52270
52352
|
intersectsBounds: (b) => Dh.intersectsBox(b),
|
|
@@ -52294,7 +52376,7 @@ function yp(s, e, t, i, n = null) {
|
|
|
52294
52376
|
const Lh = /* @__PURE__ */ new Ce(), tf = /* @__PURE__ */ new en(), pl = /* @__PURE__ */ new en(), RI = /* @__PURE__ */ new P(), DI = /* @__PURE__ */ new P(), LI = /* @__PURE__ */ new P(), OI = /* @__PURE__ */ new P();
|
|
52295
52377
|
function NI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
52296
52378
|
e.boundingBox || e.computeBoundingBox(), tf.set(e.boundingBox.min, e.boundingBox.max, t), tf.needsUpdate = !0;
|
|
52297
|
-
const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u =
|
|
52379
|
+
const o = s.geometry, l = o.attributes.position, c = o.index, h = e.attributes.position, d = e.index, u = Ln.getPrimitive(), f = Ln.getPrimitive();
|
|
52298
52380
|
let p = RI, v = DI, g = null, m = null;
|
|
52299
52381
|
n && (g = LI, m = OI);
|
|
52300
52382
|
let b = 1 / 0, x = null, y = null;
|
|
@@ -52337,7 +52419,7 @@ function NI(s, e, t, i = {}, n = {}, r = 0, a = 1 / 0) {
|
|
|
52337
52419
|
}
|
|
52338
52420
|
}
|
|
52339
52421
|
}
|
|
52340
|
-
),
|
|
52422
|
+
), Ln.releasePrimitive(u), Ln.releasePrimitive(f), b === 1 / 0 ? null : (i.point ? i.point.copy(v) : i.point = v.clone(), i.distance = b, i.faceIndex = x, n && (n.point ? n.point.copy(m) : n.point = m.clone(), n.point.applyMatrix4(Lh), v.applyMatrix4(Lh), n.distance = v.sub(n.point).length(), n.faceIndex = y), i);
|
|
52341
52423
|
}
|
|
52342
52424
|
function BI() {
|
|
52343
52425
|
return typeof SharedArrayBuffer < "u";
|
|
@@ -52381,18 +52463,18 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
|
|
|
52381
52463
|
if (w && _)
|
|
52382
52464
|
h ? T = n(
|
|
52383
52465
|
_n(e, m),
|
|
52384
|
-
|
|
52466
|
+
In(e * 2, b),
|
|
52385
52467
|
_n(s, p),
|
|
52386
|
-
|
|
52468
|
+
In(s * 2, v),
|
|
52387
52469
|
l,
|
|
52388
52470
|
a + e,
|
|
52389
52471
|
o,
|
|
52390
52472
|
r + s
|
|
52391
52473
|
) : T = n(
|
|
52392
52474
|
_n(s, p),
|
|
52393
|
-
|
|
52475
|
+
In(s * 2, v),
|
|
52394
52476
|
_n(e, m),
|
|
52395
|
-
|
|
52477
|
+
In(e * 2, b),
|
|
52396
52478
|
o,
|
|
52397
52479
|
r + s,
|
|
52398
52480
|
l,
|
|
@@ -52401,7 +52483,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
|
|
|
52401
52483
|
else if (w) {
|
|
52402
52484
|
const E = or.getPrimitive();
|
|
52403
52485
|
di(e, g, E), E.applyMatrix4(t);
|
|
52404
|
-
const S =
|
|
52486
|
+
const S = Rn(s), M = Dn(s, p);
|
|
52405
52487
|
di(S, f, Ja), di(M, f, eo);
|
|
52406
52488
|
const C = E.intersectsBox(Ja), L = E.intersectsBox(eo);
|
|
52407
52489
|
T = C && Gn(
|
|
@@ -52430,7 +52512,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
|
|
|
52430
52512
|
!h
|
|
52431
52513
|
), or.releasePrimitive(E);
|
|
52432
52514
|
} else {
|
|
52433
|
-
const E =
|
|
52515
|
+
const E = Rn(e), S = Dn(e, m);
|
|
52434
52516
|
di(E, g, nf), di(S, g, sf);
|
|
52435
52517
|
const M = c.intersectsBox(nf), C = c.intersectsBox(sf);
|
|
52436
52518
|
if (M && C)
|
|
@@ -52477,7 +52559,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
|
|
|
52477
52559
|
else {
|
|
52478
52560
|
const L = or.getPrimitive();
|
|
52479
52561
|
L.copy(nf).applyMatrix4(t);
|
|
52480
|
-
const U =
|
|
52562
|
+
const U = Rn(s), z = Dn(s, p);
|
|
52481
52563
|
di(U, f, Ja), di(z, f, eo);
|
|
52482
52564
|
const X = L.intersectsBox(Ja), j = L.intersectsBox(eo);
|
|
52483
52565
|
T = X && Gn(
|
|
@@ -52524,7 +52606,7 @@ function Gn(s, e, t, i, n, r = 0, a = 0, o = 0, l = 0, c = null, h = !1) {
|
|
|
52524
52606
|
else {
|
|
52525
52607
|
const L = or.getPrimitive();
|
|
52526
52608
|
L.copy(sf).applyMatrix4(t);
|
|
52527
|
-
const U =
|
|
52609
|
+
const U = Rn(s), z = Dn(s, p);
|
|
52528
52610
|
di(U, f, Ja), di(z, f, eo);
|
|
52529
52611
|
const X = L.intersectsBox(Ja), j = L.intersectsBox(eo);
|
|
52530
52612
|
T = X && Gn(
|
|
@@ -52638,7 +52720,7 @@ class bm {
|
|
|
52638
52720
|
}
|
|
52639
52721
|
}
|
|
52640
52722
|
/* Core Cast Functions */
|
|
52641
|
-
raycast(e, t =
|
|
52723
|
+
raycast(e, t = Un, i = 0, n = 1 / 0) {
|
|
52642
52724
|
const r = this._roots, a = this.geometry, o = [], l = t.isMaterial, c = Array.isArray(t), h = a.groups, d = l ? t.side : t, u = this.indirect ? EI : vI;
|
|
52643
52725
|
for (let f = 0, p = r.length; f < p; f++) {
|
|
52644
52726
|
const v = c ? t[h[f].materialIndex].side : d, g = o.length;
|
|
@@ -52650,7 +52732,7 @@ class bm {
|
|
|
52650
52732
|
}
|
|
52651
52733
|
return o;
|
|
52652
52734
|
}
|
|
52653
|
-
raycastFirst(e, t =
|
|
52735
|
+
raycastFirst(e, t = Un, i = 0, n = 1 / 0) {
|
|
52654
52736
|
const r = this._roots, a = this.geometry, o = t.isMaterial, l = Array.isArray(t);
|
|
52655
52737
|
let c = null;
|
|
52656
52738
|
const h = a.groups, d = o ? t.side : t, u = this.indirect ? CI : bI;
|
|
@@ -52668,7 +52750,7 @@ class bm {
|
|
|
52668
52750
|
return i;
|
|
52669
52751
|
}
|
|
52670
52752
|
shapecast(e) {
|
|
52671
|
-
const t =
|
|
52753
|
+
const t = Ln.getPrimitive(), i = this.indirect ? gI : uI;
|
|
52672
52754
|
let {
|
|
52673
52755
|
boundsTraverseOrder: n,
|
|
52674
52756
|
intersectsBounds: r,
|
|
@@ -52688,19 +52770,19 @@ class bm {
|
|
|
52688
52770
|
break;
|
|
52689
52771
|
c += f.byteLength;
|
|
52690
52772
|
}
|
|
52691
|
-
return
|
|
52773
|
+
return Ln.releasePrimitive(t), l;
|
|
52692
52774
|
}
|
|
52693
52775
|
bvhcast(e, t, i) {
|
|
52694
52776
|
let {
|
|
52695
52777
|
intersectsRanges: n,
|
|
52696
52778
|
intersectsTriangles: r
|
|
52697
52779
|
} = i;
|
|
52698
|
-
const a =
|
|
52780
|
+
const a = Ln.getPrimitive(), o = this.geometry.index, l = this.geometry.attributes.position, c = this.indirect ? (p) => {
|
|
52699
52781
|
const v = this.resolveTriangleIndex(p);
|
|
52700
52782
|
bi(a, v * 3, o, l);
|
|
52701
52783
|
} : (p) => {
|
|
52702
52784
|
bi(a, p * 3, o, l);
|
|
52703
|
-
}, h =
|
|
52785
|
+
}, h = Ln.getPrimitive(), d = e.geometry.index, u = e.geometry.attributes.position, f = e.indirect ? (p) => {
|
|
52704
52786
|
const v = e.resolveTriangleIndex(p);
|
|
52705
52787
|
bi(h, v * 3, d, u);
|
|
52706
52788
|
} : (p) => {
|
|
@@ -52860,7 +52942,7 @@ class QI {
|
|
|
52860
52942
|
}), this.outlineMaterial = new on({
|
|
52861
52943
|
transparent: !0,
|
|
52862
52944
|
opacity: 0
|
|
52863
|
-
}), this.materials = [], this.mergeMaterials = [], this.originalColors = [], this.viralViewerApi.emit(
|
|
52945
|
+
}), this.materials = [], this.mergeMaterials = [], this.originalColors = [], this.viralViewerApi.emit(Mt.LOADED_MATERIAL_MANAGER);
|
|
52864
52946
|
}
|
|
52865
52947
|
/**
|
|
52866
52948
|
* Checks if a material has a color property.
|
|
@@ -52889,15 +52971,15 @@ class QI {
|
|
|
52889
52971
|
class jI {
|
|
52890
52972
|
constructor() {
|
|
52891
52973
|
this.events = {
|
|
52892
|
-
[
|
|
52893
|
-
[
|
|
52894
|
-
[
|
|
52895
|
-
[
|
|
52896
|
-
[
|
|
52897
|
-
[
|
|
52898
|
-
[
|
|
52899
|
-
[
|
|
52900
|
-
[
|
|
52974
|
+
[Mt.LOADED_SCENE]: [],
|
|
52975
|
+
[Mt.LOADED_MATERIAL_MANAGER]: [],
|
|
52976
|
+
[Mt.LOADED_RENDERER]: [],
|
|
52977
|
+
[Mt.LOADED_CAMERA]: [],
|
|
52978
|
+
[Mt.LOADED_CUBE]: [],
|
|
52979
|
+
[Mt.LOADED_TOOLS]: [],
|
|
52980
|
+
[Mt.LOADED_SEPERATE_MODEL]: [],
|
|
52981
|
+
[Mt.GENERATED_MERGE_MODEL]: [],
|
|
52982
|
+
[Mt.LOADED_DATA]: []
|
|
52901
52983
|
};
|
|
52902
52984
|
}
|
|
52903
52985
|
/**
|
|
@@ -52929,43 +53011,43 @@ class jI {
|
|
|
52929
53011
|
class qI {
|
|
52930
53012
|
constructor(e, t) {
|
|
52931
53013
|
this.viralViewerApi = e, this.options = t, this.viralViewerApi.on(
|
|
52932
|
-
|
|
53014
|
+
Mt.LOADED_SCENE,
|
|
52933
53015
|
() => this.loadedScene()
|
|
52934
53016
|
), this.viralViewerApi.on(
|
|
52935
|
-
|
|
53017
|
+
Mt.LOADED_MATERIAL_MANAGER,
|
|
52936
53018
|
() => this.loadedMaterialManager()
|
|
52937
53019
|
), this.viralViewerApi.on(
|
|
52938
|
-
|
|
53020
|
+
Mt.LOADED_RENDERER,
|
|
52939
53021
|
() => this.loadedRenderer()
|
|
52940
53022
|
), this.viralViewerApi.on(
|
|
52941
|
-
|
|
53023
|
+
Mt.LOADED_CAMERA,
|
|
52942
53024
|
() => this.loadedCamera()
|
|
52943
53025
|
), this.viralViewerApi.on(
|
|
52944
|
-
|
|
53026
|
+
Mt.LOADED_CUBE,
|
|
52945
53027
|
() => this.loadedCube()
|
|
52946
53028
|
), this.viralViewerApi.on(
|
|
52947
|
-
|
|
53029
|
+
Mt.LOADED_TOOLS,
|
|
52948
53030
|
() => this.loadedTools()
|
|
52949
53031
|
), this.viralViewerApi.on(
|
|
52950
|
-
|
|
53032
|
+
Mt.LOADED_SEPERATE_MODEL,
|
|
52951
53033
|
(i) => this.loadedModels(i)
|
|
52952
53034
|
);
|
|
52953
53035
|
}
|
|
52954
53036
|
loadedScene() {
|
|
52955
53037
|
this.options.isDev && Ci.information("scene loaded!"), this.viralViewerApi.off(
|
|
52956
|
-
|
|
53038
|
+
Mt.LOADED_SCENE,
|
|
52957
53039
|
() => this.loadedScene()
|
|
52958
53040
|
);
|
|
52959
53041
|
}
|
|
52960
53042
|
loadedMaterialManager() {
|
|
52961
53043
|
this.options.isDev && Ci.information("material manager loaded!"), this.viralViewerApi.off(
|
|
52962
|
-
|
|
53044
|
+
Mt.LOADED_MATERIAL_MANAGER,
|
|
52963
53045
|
() => this.loadedMaterialManager()
|
|
52964
53046
|
);
|
|
52965
53047
|
}
|
|
52966
53048
|
loadedRenderer() {
|
|
52967
53049
|
this.options.isDev && Ci.information("renderer loaded!"), this.viralViewerApi.off(
|
|
52968
|
-
|
|
53050
|
+
Mt.LOADED_RENDERER,
|
|
52969
53051
|
() => this.loadedRenderer()
|
|
52970
53052
|
);
|
|
52971
53053
|
}
|
|
@@ -52974,13 +53056,13 @@ class qI {
|
|
|
52974
53056
|
}
|
|
52975
53057
|
loadedCube() {
|
|
52976
53058
|
this.options.isDev && Ci.information("cube loaded!"), this.viralViewerApi.off(
|
|
52977
|
-
|
|
53059
|
+
Mt.LOADED_CUBE,
|
|
52978
53060
|
() => this.loadedCube()
|
|
52979
53061
|
);
|
|
52980
53062
|
}
|
|
52981
53063
|
loadedTools() {
|
|
52982
53064
|
this.options.isDev && Ci.information("tools loaded!"), this.viralViewerApi.off(
|
|
52983
|
-
|
|
53065
|
+
Mt.LOADED_TOOLS,
|
|
52984
53066
|
() => this.loadedTools()
|
|
52985
53067
|
);
|
|
52986
53068
|
}
|
|
@@ -53010,7 +53092,7 @@ const Db = {
|
|
|
53010
53092
|
};
|
|
53011
53093
|
class KI {
|
|
53012
53094
|
constructor(e) {
|
|
53013
|
-
this.viralViewerApi = e, this.hoverMeshes = [], this.hoverInstancedMesh = null, this.selectedMeshes = [], this.selectedInstancedMeshes = [], this.isolateMeshes = [], this.isolateInstancedMeshes = [], this.hiddenMeshes = [], this.hiddenInstancedMeshes = [], this.exceptElements = [], this.isolateModelId = "0", this.sunConfiguration = Fb, this._ground = null, this.opacity = 1, this._fog = new md(13421772, 1, 1e3), this.rainGeometry = new dt(), this.rain = null, this._isGeneratedRain = !1, this._batchColors = /* @__PURE__ */ new Map(), this._originalBatchMaterials = /* @__PURE__ */ new Map(), this._batchVisualizationEnabled = !1, this.showHidePercentage = 100, this.randomColor = 100;
|
|
53095
|
+
this.viralViewerApi = e, this.hoverMeshes = [], this.hoverInstancedMesh = null, this.selectedMeshes = [], this.selectedInstancedMeshes = [], this.isolateMeshes = [], this.isolateInstancedMeshes = [], this.hiddenMeshes = [], this.hiddenInstancedMeshes = [], this.exceptElements = [], this.isolateModelId = "0", this.sunConfiguration = Fb, this._ground = null, this.opacity = 1, this._fog = new md(13421772, 1, 1e3), this.rainGeometry = new dt(), this.rain = null, this._isGeneratedRain = !1, this.ghostMode = !0, this._batchColors = /* @__PURE__ */ new Map(), this._originalBatchMaterials = /* @__PURE__ */ new Map(), this._batchVisualizationEnabled = !1, this.showHidePercentage = 100, this.randomColor = 100;
|
|
53014
53096
|
}
|
|
53015
53097
|
reverseColor() {
|
|
53016
53098
|
var e, t;
|
|
@@ -53066,8 +53148,12 @@ class KI {
|
|
|
53066
53148
|
}), e.hideObjects(), this.hiddenInstancedMeshes.push(e);
|
|
53067
53149
|
}), (this.hiddenMeshes.length > 0 || this.hiddenInstancedMeshes.length > 0) && this.viralViewerApi.viralRenderer.render();
|
|
53068
53150
|
}
|
|
53069
|
-
|
|
53070
|
-
|
|
53151
|
+
/**
|
|
53152
|
+
*
|
|
53153
|
+
* @param elements default will get selected elements or we can input specific elements
|
|
53154
|
+
*/
|
|
53155
|
+
hide2(e) {
|
|
53156
|
+
this.viralViewerApi.viralScene.mergedModel.hide(), this.viralViewerApi.viralRenderer.render();
|
|
53071
53157
|
}
|
|
53072
53158
|
/**
|
|
53073
53159
|
* @deprecated using isolate2 instead
|
|
@@ -53090,23 +53176,49 @@ class KI {
|
|
|
53090
53176
|
), this.viralViewerApi.viralRenderer.render());
|
|
53091
53177
|
}
|
|
53092
53178
|
}
|
|
53179
|
+
/**
|
|
53180
|
+
*
|
|
53181
|
+
* @param elements default will get selected elements or we can input specific elements
|
|
53182
|
+
*/
|
|
53093
53183
|
isolate2(e) {
|
|
53094
|
-
|
|
53184
|
+
if (this.ghostMode) {
|
|
53185
|
+
this.ghostExcept(
|
|
53186
|
+
e || this.viralViewerApi.viralScene.mergedModel.getSelectedElements(),
|
|
53187
|
+
0.101
|
|
53188
|
+
);
|
|
53189
|
+
return;
|
|
53190
|
+
}
|
|
53191
|
+
this.viralViewerApi.viralScene.mergedModel.isolate(e), this.viralViewerApi.viralRenderer.render();
|
|
53095
53192
|
}
|
|
53096
|
-
|
|
53193
|
+
/**
|
|
53194
|
+
*
|
|
53195
|
+
* @param elements default will get selected elements
|
|
53196
|
+
*/
|
|
53197
|
+
zoomTo(e) {
|
|
53097
53198
|
this.viralViewerApi.viralCamera.zoomTo(
|
|
53098
|
-
this.viralViewerApi.viralScene.mergedModel.getSelectedElements()
|
|
53199
|
+
e || this.viralViewerApi.viralScene.mergedModel.getSelectedElements()
|
|
53099
53200
|
);
|
|
53100
53201
|
}
|
|
53101
53202
|
//#region change color
|
|
53102
|
-
|
|
53103
|
-
|
|
53203
|
+
/**
|
|
53204
|
+
* Changes the color of multiple elements in the merged mesh.
|
|
53205
|
+
* Works with RGBA color buffer (preserves existing alpha values)
|
|
53206
|
+
* @param elements - An array of elements, each containing `modelId` and `elementId`.
|
|
53207
|
+
* @param color - The new RGB color to apply
|
|
53208
|
+
* @param isTemporary - Override for temporary, if element has temporary color it will turn back this color, otherwise will turn back to original - default is false
|
|
53209
|
+
*/
|
|
53210
|
+
changeColor(e, t, i = !1) {
|
|
53211
|
+
this.viralViewerApi.viralScene.mergedModel.changeColor(
|
|
53212
|
+
e,
|
|
53213
|
+
t,
|
|
53214
|
+
i
|
|
53215
|
+
), this.viralViewerApi.viralRenderer.render();
|
|
53104
53216
|
}
|
|
53105
53217
|
/**
|
|
53106
53218
|
* Select elements (replaces current selection)
|
|
53107
53219
|
*/
|
|
53108
53220
|
selectElements(e) {
|
|
53109
|
-
e.length > 0 && (this.viralViewerApi.emit(
|
|
53221
|
+
e.length > 0 && (this.viralViewerApi.emit(Mt.SELECT_ELEMENTS, e), this.viralViewerApi.viralScene.mergedModel.select(
|
|
53110
53222
|
e,
|
|
53111
53223
|
this.exceptElements
|
|
53112
53224
|
), this.viralViewerApi.viralRenderer.render());
|
|
@@ -53137,7 +53249,7 @@ class KI {
|
|
|
53137
53249
|
* Unselect all elements
|
|
53138
53250
|
*/
|
|
53139
53251
|
unselectElements() {
|
|
53140
|
-
this.viralViewerApi.viralScene.mergedModel.unselect();
|
|
53252
|
+
this.viralViewerApi.viralScene.mergedModel.unselect(), this.viralViewerApi.emit(Mt.UNSELECT_ELEMENTS);
|
|
53141
53253
|
}
|
|
53142
53254
|
selectAllElements() {
|
|
53143
53255
|
console.time("⏱️ selectAllElements - gathering elements");
|
|
@@ -53504,8 +53616,9 @@ class KI {
|
|
|
53504
53616
|
window.innerHeight
|
|
53505
53617
|
);
|
|
53506
53618
|
}
|
|
53507
|
-
|
|
53508
|
-
|
|
53619
|
+
setGhostMode(e) {
|
|
53620
|
+
this.ghostMode = e;
|
|
53621
|
+
}
|
|
53509
53622
|
/**
|
|
53510
53623
|
* Set opacity for specific elements
|
|
53511
53624
|
* @param elements - Elements to set opacity for
|
|
@@ -53534,10 +53647,10 @@ class KI {
|
|
|
53534
53647
|
* @param ghostOpacity - Opacity for all other elements (default 0.1)
|
|
53535
53648
|
*/
|
|
53536
53649
|
ghostExcept(e, t = 0.1) {
|
|
53537
|
-
this.viralViewerApi.viralScene.mergedModel.ghostExcept(
|
|
53650
|
+
e.length > 0 && (this.viralViewerApi.viralScene.mergedModel.ghostExcept(
|
|
53538
53651
|
e,
|
|
53539
53652
|
t
|
|
53540
|
-
), this.viralViewerApi.viralRenderer.render();
|
|
53653
|
+
), this.viralViewerApi.viralRenderer.render());
|
|
53541
53654
|
}
|
|
53542
53655
|
/**
|
|
53543
53656
|
* Reset all elements to full opacity
|
|
@@ -53659,7 +53772,7 @@ class KI {
|
|
|
53659
53772
|
g: Math.floor(Math.random() * 256) / 256,
|
|
53660
53773
|
b: Math.floor(Math.random() * 256) / 256
|
|
53661
53774
|
};
|
|
53662
|
-
this.changeColor(t, i)
|
|
53775
|
+
this.changeColor(t, i);
|
|
53663
53776
|
}
|
|
53664
53777
|
//#endregion
|
|
53665
53778
|
}
|
|
@@ -54154,7 +54267,7 @@ class mR {
|
|
|
54154
54267
|
`[DataManager] Adding ${i} elements to data tree...`
|
|
54155
54268
|
);
|
|
54156
54269
|
const n = new zb();
|
|
54157
|
-
n.addElements(e), this.dataTree.push(n), this.viralViewerApi.emit(
|
|
54270
|
+
n.addElements(e), this.dataTree.push(n), this.viralViewerApi.emit(Mt.LOADED_DATA, { modelId: this.dataTree.length - 1 }), console.log(
|
|
54158
54271
|
`[DataManager] Data tree created in ${(performance.now() - t).toFixed(2)}ms`
|
|
54159
54272
|
), console.log(`[DataManager] Total models loaded: ${this.dataTree.length}`);
|
|
54160
54273
|
}
|
|
@@ -54256,22 +54369,26 @@ class mR {
|
|
|
54256
54369
|
}
|
|
54257
54370
|
return this.viralViewerApi.viralVisibilityManager.exceptElements = [], this.viralViewerApi.viralScene.mergedModel.changeColor(
|
|
54258
54371
|
i.deleted.map((l) => ({ elementId: l.toString(), modelId: e.toString() })),
|
|
54259
|
-
Et.hexToRGB(Pe.deleted)
|
|
54372
|
+
Et.hexToRGB(Pe.deleted),
|
|
54373
|
+
!0
|
|
54260
54374
|
), this.viralViewerApi.viralVisibilityManager.exceptElements.push({
|
|
54261
54375
|
elements: i.deleted.map((l) => ({ elementId: l.toString(), modelId: e.toString() })),
|
|
54262
54376
|
color: Et.hexToRGB(Pe.deleted)
|
|
54263
54377
|
}), this.viralViewerApi.viralScene.mergedModel.changeColor(
|
|
54264
54378
|
i.added.map((l) => ({ elementId: l.toString(), modelId: t.toString() })),
|
|
54265
|
-
Et.hexToRGB(Pe.added)
|
|
54379
|
+
Et.hexToRGB(Pe.added),
|
|
54380
|
+
!0
|
|
54266
54381
|
), this.viralViewerApi.viralVisibilityManager.exceptElements.push({
|
|
54267
54382
|
elements: i.added.map((l) => ({ elementId: l.toString(), modelId: t.toString() })),
|
|
54268
54383
|
color: Et.hexToRGB(Pe.added)
|
|
54269
54384
|
}), this.viralViewerApi.viralScene.mergedModel.changeColor(
|
|
54270
54385
|
i.modified.map((l) => ({ elementId: l.toString(), modelId: e.toString() })),
|
|
54271
|
-
Et.hexToRGB(Pe.modified)
|
|
54386
|
+
Et.hexToRGB(Pe.modified),
|
|
54387
|
+
!0
|
|
54272
54388
|
), this.viralViewerApi.viralScene.mergedModel.changeColor(
|
|
54273
54389
|
i.modified.map((l) => ({ elementId: l.toString(), modelId: t.toString() })),
|
|
54274
|
-
Et.hexToRGB(Pe.modified)
|
|
54390
|
+
Et.hexToRGB(Pe.modified),
|
|
54391
|
+
!0
|
|
54275
54392
|
), this.viralViewerApi.viralVisibilityManager.exceptElements.push({
|
|
54276
54393
|
elements: i.modified.map((l) => ({ elementId: l.toString(), modelId: e.toString() })),
|
|
54277
54394
|
color: Et.hexToRGB(Pe.modified)
|
|
@@ -54280,10 +54397,12 @@ class mR {
|
|
|
54280
54397
|
color: Et.hexToRGB(Pe.modified)
|
|
54281
54398
|
}), this.viralViewerApi.viralScene.mergedModel.changeColor(
|
|
54282
54399
|
i.notChanged.map((l) => ({ elementId: l.toString(), modelId: e.toString() })),
|
|
54283
|
-
Et.hexToRGB(Pe.notChanged)
|
|
54400
|
+
Et.hexToRGB(Pe.notChanged),
|
|
54401
|
+
!0
|
|
54284
54402
|
), this.viralViewerApi.viralScene.mergedModel.changeColor(
|
|
54285
54403
|
i.notChanged.map((l) => ({ elementId: l.toString(), modelId: t.toString() })),
|
|
54286
|
-
Et.hexToRGB(Pe.notChanged)
|
|
54404
|
+
Et.hexToRGB(Pe.notChanged),
|
|
54405
|
+
!0
|
|
54287
54406
|
), this.viralViewerApi.viralVisibilityManager.exceptElements.push({
|
|
54288
54407
|
elements: i.notChanged.map((l) => ({ elementId: l.toString(), modelId: e.toString() })),
|
|
54289
54408
|
color: Et.hexToRGB(Pe.notChanged)
|
|
@@ -54987,7 +55106,7 @@ class MR {
|
|
|
54987
55106
|
}
|
|
54988
55107
|
]
|
|
54989
55108
|
}
|
|
54990
|
-
], this.items = [], this.viralToolAvatar = new bR(this), this.viralToolDarkMode = new yR(this), this.viralToolSunlight = new SR(this), this.viralToolElevation = new _R(this), this.viralToolMeasure = new wR(this), this.viralToolAmbientOcclusion = new xR(this), this.dehydratedCachedData(), this.executeToolsByDefault(), this.injectTools(), this.viralViewerApi.emit(
|
|
55109
|
+
], this.items = [], this.viralToolAvatar = new bR(this), this.viralToolDarkMode = new yR(this), this.viralToolSunlight = new SR(this), this.viralToolElevation = new _R(this), this.viralToolMeasure = new wR(this), this.viralToolAmbientOcclusion = new xR(this), this.dehydratedCachedData(), this.executeToolsByDefault(), this.injectTools(), this.viralViewerApi.emit(Mt.LOADED_TOOLS);
|
|
54991
55110
|
}
|
|
54992
55111
|
//#region Init
|
|
54993
55112
|
injectTools() {
|
|
@@ -55157,7 +55276,7 @@ class ER {
|
|
|
55157
55276
|
addPlanes() {
|
|
55158
55277
|
const e = this.cubeScale;
|
|
55159
55278
|
let t = new Ri({
|
|
55160
|
-
side:
|
|
55279
|
+
side: fi,
|
|
55161
55280
|
color: 6659921,
|
|
55162
55281
|
transparent: !0,
|
|
55163
55282
|
opacity: 0,
|
|
@@ -55489,7 +55608,7 @@ class PR {
|
|
|
55489
55608
|
class CR {
|
|
55490
55609
|
//* view cube from third party (new approach)
|
|
55491
55610
|
constructor(e, t = 1) {
|
|
55492
|
-
this.viralViewerApi = e, this.targetElement = null, this.cubeScene = null, this.cubeRenderer = null, this.cubeCamera = null, this.cubeMouse = null, this.cubeScale = 1, this.cubeScale = Math.round(Math.max(0.1, Math.min(1, t)) * 10) / 10, this.injectCubeWrapperElement(), this.targetElement = document.getElementById("orientCubeWrapper"), this.targetElement && (this.cubeScene = new ER(this, this.cubeScale), this.cubeRenderer = new TR(this), this.cubeCamera = new AR(this), this.cubeMouse = new PR(this)), this.viralViewerApi.emit(
|
|
55611
|
+
this.viralViewerApi = e, this.targetElement = null, this.cubeScene = null, this.cubeRenderer = null, this.cubeCamera = null, this.cubeMouse = null, this.cubeScale = 1, this.cubeScale = Math.round(Math.max(0.1, Math.min(1, t)) * 10) / 10, this.injectCubeWrapperElement(), this.targetElement = document.getElementById("orientCubeWrapper"), this.targetElement && (this.cubeScene = new ER(this, this.cubeScale), this.cubeRenderer = new TR(this), this.cubeCamera = new AR(this), this.cubeMouse = new PR(this)), this.viralViewerApi.emit(Mt.LOADED_CUBE);
|
|
55493
55612
|
}
|
|
55494
55613
|
injectCubeWrapperElement() {
|
|
55495
55614
|
if (this.viralViewerApi.targetElement) {
|
|
@@ -55739,7 +55858,7 @@ class OR {
|
|
|
55739
55858
|
const a = new on({
|
|
55740
55859
|
vertexColors: !0,
|
|
55741
55860
|
// Enable vertex coloring
|
|
55742
|
-
side:
|
|
55861
|
+
side: fi,
|
|
55743
55862
|
// Ensure both sides render colors
|
|
55744
55863
|
opacity: r.opacity,
|
|
55745
55864
|
transparent: r.transparent,
|
|
@@ -55758,14 +55877,14 @@ class OR {
|
|
|
55758
55877
|
const o = new Fn(void 0, a);
|
|
55759
55878
|
o.addBufferElements(i, r.color), o.castShadow = !0, o.receiveShadow = !0, this.viralViewerApi.viralScene.mergedModel.addMergedMesh(o), this.viralViewerApi.options.isDev && Ci.memory("after generate merge mesh");
|
|
55760
55879
|
}
|
|
55761
|
-
}), this.viralViewerApi.options.isDev && Ci.memory("merge model successfully!"), this.viralViewerApi.viralScene.mergedModel.setReady(!0), this.isGeneratingMergeModel = !1, console.log(this.viralViewerApi.viralScene.mergedModel.children), console.log("Time to generate model: ", performance.now() - e), this.viralViewerApi.emit(
|
|
55880
|
+
}), this.viralViewerApi.options.isDev && Ci.memory("merge model successfully!"), this.viralViewerApi.viralScene.mergedModel.setReady(!0), this.isGeneratingMergeModel = !1, console.log(this.viralViewerApi.viralScene.mergedModel.children), console.log("Time to generate model: ", performance.now() - e), this.viralViewerApi.emit(Mt.GENERATED_MERGE_MODEL);
|
|
55762
55881
|
}
|
|
55763
55882
|
}
|
|
55764
55883
|
class NR {
|
|
55765
55884
|
constructor(e) {
|
|
55766
55885
|
this.viralViewerApi = e, this.planeEdges = null, this._isGenerated = !1, this.planeMaterial = new Ri({
|
|
55767
55886
|
color: 16777215,
|
|
55768
|
-
side:
|
|
55887
|
+
side: fi,
|
|
55769
55888
|
transparent: !0,
|
|
55770
55889
|
opacity: 0.1
|
|
55771
55890
|
// wireframe: true,
|
|
@@ -58547,7 +58666,7 @@ export {
|
|
|
58547
58666
|
_i as h,
|
|
58548
58667
|
Ls as i,
|
|
58549
58668
|
lo as j,
|
|
58550
|
-
|
|
58669
|
+
Mt as k,
|
|
58551
58670
|
_m as l,
|
|
58552
58671
|
Bb as m,
|
|
58553
58672
|
wm as n,
|