@reall3d/reall3dviewer 0.1.7 → 1.7.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.
Files changed (3) hide show
  1. package/dist/pkg.js +124 -122
  2. package/dist/pkg.umd.cjs +10 -10
  3. package/package.json +3 -3
package/dist/pkg.js CHANGED
@@ -1,24 +1,24 @@
1
- var Ro = Object.defineProperty;
2
- var Fo = (n, e, t) => e in n ? Ro(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var $t = (n, e, t) => Fo(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { Matrix4 as Je, Vector3 as M, Vector4 as Ye, InstancedBufferGeometry as rs, BufferAttribute as Ct, InstancedBufferAttribute as Po, DynamicDrawUsage as Uo, ShaderMaterial as ma, DoubleSide as qe, NormalBlending as No, DataTexture as it, RGBAIntegerFormat as at, UnsignedIntType as ot, Mesh as pe, Vector2 as fe, Loader as Ho, FileLoader as zo, Color as Rs, SRGBColorSpace as Oo, Group as jt, BufferGeometry as wn, Float32BufferAttribute as We, LineBasicMaterial as gn, Material as ci, PointsMaterial as en, MeshPhongMaterial as Yo, LineSegments as cs, Points as Nn, WebGLRenderer as Ca, PerspectiveCamera as Ia, Object3D as Ln, CylinderGeometry as Ai, MeshBasicMaterial as tt, PlaneGeometry as Go, Quaternion as Qt, Controls as Wo, MOUSE as Ve, TOUCH as $e, Spherical as li, Ray as Ko, Plane as Vo, MathUtils as et, InstancedInterleavedBuffer as As, InterleavedBufferAttribute as It, WireframeGeometry as Jo, Box3 as Fs, Sphere as ya, ShaderLib as dn, UniformsUtils as wa, UniformsLib as fn, Line3 as qo, CircleGeometry as rt, Raycaster as jo, CatmullRomCurve3 as ui, Scene as Ea, AmbientLight as Sa, FogExp2 as hi, DirectionalLight as Xo, EventDispatcher as Zo, Clock as $o } from "three";
1
+ var Fo = Object.defineProperty;
2
+ var Po = (n, e, t) => e in n ? Fo(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var $t = (n, e, t) => Po(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import { Matrix4 as Je, Vector3 as M, Vector4 as Ye, InstancedBufferGeometry as rs, BufferAttribute as Ct, InstancedBufferAttribute as Uo, DynamicDrawUsage as No, ShaderMaterial as ma, DoubleSide as qe, NormalBlending as Ho, DataTexture as it, RGBAIntegerFormat as at, UnsignedIntType as ot, Mesh as pe, Vector2 as fe, Loader as zo, FileLoader as Oo, Color as Rs, SRGBColorSpace as Yo, Group as jt, BufferGeometry as wn, Float32BufferAttribute as We, LineBasicMaterial as gn, Material as ci, PointsMaterial as en, MeshPhongMaterial as Go, LineSegments as cs, Points as Nn, WebGLRenderer as Ca, PerspectiveCamera as Ia, Object3D as Ln, CylinderGeometry as Ai, MeshBasicMaterial as tt, PlaneGeometry as Wo, Quaternion as Qt, Controls as Ko, MOUSE as Ve, TOUCH as $e, Spherical as li, Ray as Vo, Plane as Jo, MathUtils as et, InstancedInterleavedBuffer as As, InterleavedBufferAttribute as It, WireframeGeometry as qo, Box3 as Fs, Sphere as ya, ShaderLib as dn, UniformsUtils as wa, UniformsLib as fn, Line3 as jo, CircleGeometry as rt, Raycaster as Xo, CatmullRomCurve3 as ui, Scene as Ea, AmbientLight as Sa, FogExp2 as hi, DirectionalLight as Zo, EventDispatcher as $o, Clock as er } from "three";
5
5
  import * as gi from "@gotoeasy/three-tile";
6
6
  let w = 1;
7
- const xt = w++, ba = w++, ct = w++, va = w++, ls = w++, us = w++, Qa = w++, Hn = w++, xa = w++, Dt = w++, ge = w++, Z = w++, Ba = w++, hs = w++, He = w++, Bt = w++, ze = w++, Xt = w++, Ma = w++, Da = w++, ka = w++, Ta = w++, La = w++, _a = w++, Ps = w++, er = w++, tr = w++, di = w++, he = w++;
7
+ const xt = w++, ba = w++, ct = w++, va = w++, ls = w++, us = w++, Qa = w++, Hn = w++, xa = w++, Dt = w++, ge = w++, Z = w++, Ba = w++, hs = w++, He = w++, Bt = w++, ze = w++, Xt = w++, Ma = w++, Da = w++, ka = w++, Ta = w++, La = w++, _a = w++, Ps = w++, tr = w++, nr = w++, di = w++, he = w++;
8
8
  w++;
9
- const se = w++, wt = w++, Et = w++, fi = w++, pi = w++, mi = w++, Ra = w++, nr = w++, Ci = w++, tn = w++, nn = w++, Ii = w++, yi = w++, wi = w++, St = w++, Ei = w++, Ot = w++, Fa = w++, sn = w++, zn = w++, pn = w++, Pa = w++, gs = w++, sr = w++, Us = w++, On = w++, Yn = w++, En = w++, Sn = w++, bn = w++, vn = w++, Ua = w++, Ns = w++, L = w++, ht = w++, Yt = w++, O = w++, _n = w++, Hs = w++, ir = w++, Ce = w++, ds = w++, be = w++, Na = w++, Ha = w++, za = w++, Oa = w++, fs = w++, Ya = w++, At = w++, zs = w++, Os = w++, Ut = w++, ar = w++, Ga = w++, or = w++;
9
+ const se = w++, wt = w++, Et = w++, fi = w++, pi = w++, mi = w++, Ra = w++, sr = w++, Ci = w++, tn = w++, nn = w++, Ii = w++, yi = w++, wi = w++, St = w++, Ei = w++, Ot = w++, Fa = w++, sn = w++, zn = w++, pn = w++, Pa = w++, gs = w++, ir = w++, Us = w++, On = w++, Yn = w++, En = w++, Sn = w++, bn = w++, vn = w++, Ua = w++, Ns = w++, L = w++, ht = w++, Yt = w++, O = w++, _n = w++, Hs = w++, ar = w++, Ce = w++, ds = w++, be = w++, Na = w++, Ha = w++, za = w++, Oa = w++, fs = w++, Ya = w++, At = w++, zs = w++, Os = w++, Ut = w++, or = w++, Ga = w++, Wa = w++;
10
10
  w++;
11
11
  const Rn = w++, Gn = w++, Si = w++, bi = w++, ps = w++, Qn = w++, ms = w++, Nt = w++, Qe = w++, Ys = w++;
12
12
  w++;
13
- const Wa = w++, rr = w++, an = w++, Wn = w++, Cs = w++, cr = w++, mn = w++, xn = w++, Gs = w++, bt = w++, gt = w++, Gt = w++, on = w++, Ka = w++, ne = w++, ce = w++, Ar = w++, vi = w++, Bn = w++, Mn = w++, lr = w++, Ws = w++, Ks = w++, nt = w++, Ht = w++, kt = w++, ur = w++, Va = w++, hr = w++;
13
+ const Ka = w++, rr = w++, an = w++, Wn = w++, Cs = w++, cr = w++, mn = w++, xn = w++, Gs = w++, bt = w++, gt = w++, Gt = w++, on = w++, Va = w++, ne = w++, ce = w++, Ar = w++, vi = w++, Bn = w++, Mn = w++, lr = w++, Ws = w++, Ks = w++, nt = w++, Ht = w++, kt = w++, ur = w++, Ja = w++, hr = w++;
14
14
  w++;
15
15
  w++;
16
16
  w++;
17
17
  w++;
18
18
  w++;
19
- const st = w++, Wt = w++, Cn = w++, Is = w++, Ja = w++, qa = w++, ys = w++, je = w++, _t = w++, ja = w++, Vs = w++, Qi = w++, gr = w++, dr = w++, Js = w++, qs = w++, js = w++, Xs = w++, Zs = w++, Kt = w++, Xa = w++, xi = w++, Dn = w++, Ke = w++, Za = w++, ws = w++, $a = w++, Rt = w++, eo = w++, to = w++, $s = w++, no = w++, so = w++, Bi = w++, io = w++, ao = w++, oo = w++, Ft = w++, ro = w++, Es = w++, fr = w++, co = w++, Ss = w++, bs = w++, kn = w++, Ao = w++, lo = w++;
19
+ const st = w++, Wt = w++, Cn = w++, Is = w++, qa = w++, ja = w++, ys = w++, je = w++, _t = w++, Xa = w++, Vs = w++, Qi = w++, gr = w++, dr = w++, Js = w++, qs = w++, js = w++, Xs = w++, Zs = w++, Kt = w++, Za = w++, xi = w++, Dn = w++, Ke = w++, $a = w++, ws = w++, eo = w++, Rt = w++, to = w++, no = w++, $s = w++, so = w++, io = w++, Bi = w++, ao = w++, oo = w++, ro = w++, Ft = w++, co = w++, Es = w++, fr = w++, Ao = w++, Ss = w++, bs = w++, kn = w++, lo = w++, uo = w++;
20
20
  w++;
21
- const uo = w++, ho = w++, oe = w++, vs = w++, Qs = w++, xs = w++, pr = w++, go = w++, mr = w++, Cr = w++, Ir = w++, yr = w++, wr = w++, fo = w++, po = w++;
21
+ const ho = w++, go = w++, oe = w++, vs = w++, Qs = w++, xs = w++, pr = w++, fo = w++, mr = w++, Cr = w++, Ir = w++, yr = w++, wr = w++, po = w++, mo = w++;
22
22
  w++;
23
23
  w++;
24
24
  w++;
@@ -72,7 +72,7 @@ class Sr {
72
72
  }
73
73
  }
74
74
  var F = /* @__PURE__ */ ((n) => (n[n.FetchReady = 0] = "FetchReady", n[n.Fetching = 1] = "Fetching", n[n.FetchDone = 2] = "FetchDone", n[n.FetchAborted = 3] = "FetchAborted", n[n.FetchFailed = 4] = "FetchFailed", n[n.Invalid = 5] = "Invalid", n))(F || {});
75
- const Fn = "v1.7.0", Se = navigator.userAgent.includes("Mobi"), br = "QWERTYUIOPLKJHGFDSAZXCVBNM1234567890qwertyuioplkjhgfdsazxcvbnm`~!@#$%^&*()-_=+\\|]}[{'\";::,<.>//? ", vr = Se ? 600 : 300, Qr = Se ? 2e3 : 300, ft = 128, In = 32, z = 32, xr = 20, Br = 16, mo = 64 * 1024, Mr = 1024 * 1e4, Dr = 10240 * 1e4, Fe = 0.28209479177387814, kr = 0, Tr = 20, Lr = 190, Vt = 1, Oe = 2, dt = 3, _r = 4, Rr = 3141592653;
75
+ const Fn = "v1.7.0", Se = navigator.userAgent.includes("Mobi"), br = "QWERTYUIOPLKJHGFDSAZXCVBNM1234567890qwertyuioplkjhgfdsazxcvbnm`~!@#$%^&*()-_=+\\|]}[{'\";::,<.>//? ", vr = Se ? 600 : 300, Qr = Se ? 2e3 : 300, ft = 128, In = 32, z = 32, xr = 20, Br = 16, Co = 64 * 1024, Mr = 1024 * 1e4, Dr = 10240 * 1e4, Fe = 0.28209479177387814, kr = 0, Tr = 20, Lr = 190, Vt = 1, Oe = 2, dt = 3, _r = 4, Rr = 3141592653;
76
76
  function Fr(n) {
77
77
  if (Object.prototype.hasOwnProperty.call(n, "__esModule")) return n;
78
78
  var e = n.default;
@@ -261,7 +261,7 @@ function zr() {
261
261
  ));
262
262
  }(yn)), yn.exports;
263
263
  }
264
- var Or = zr(), ve = Uint8Array, yt = Uint16Array, Yr = Int32Array, Co = new ve([
264
+ var Or = zr(), ve = Uint8Array, yt = Uint16Array, Yr = Int32Array, Io = new ve([
265
265
  0,
266
266
  0,
267
267
  0,
@@ -296,7 +296,7 @@ var Or = zr(), ve = Uint8Array, yt = Uint16Array, Yr = Int32Array, Co = new ve([
296
296
  0,
297
297
  /* impossible */
298
298
  0
299
- ]), Io = new ve([
299
+ ]), yo = new ve([
300
300
  0,
301
301
  0,
302
302
  0,
@@ -330,16 +330,16 @@ var Or = zr(), ve = Uint8Array, yt = Uint16Array, Yr = Int32Array, Co = new ve([
330
330
  /* unused */
331
331
  0,
332
332
  0
333
- ]), Gr = new ve([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), yo = function(n, e) {
333
+ ]), Gr = new ve([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), wo = function(n, e) {
334
334
  for (var t = new yt(31), s = 0; s < 31; ++s)
335
335
  t[s] = e += 1 << n[s - 1];
336
336
  for (var a = new Yr(t[30]), s = 1; s < 30; ++s)
337
337
  for (var o = t[s]; o < t[s + 1]; ++o)
338
338
  a[o] = o - t[s] << 5 | s;
339
339
  return { b: t, r: a };
340
- }, wo = yo(Co, 2), Eo = wo.b, Wr = wo.r;
341
- Eo[28] = 258, Wr[258] = 28;
342
- var Kr = yo(Io, 0), Vr = Kr.b, Bs = new yt(32768);
340
+ }, Eo = wo(Io, 2), So = Eo.b, Wr = Eo.r;
341
+ So[28] = 258, Wr[258] = 28;
342
+ var Kr = wo(yo, 0), Vr = Kr.b, Bs = new yt(32768);
343
343
  for (var te = 0; te < 32768; ++te) {
344
344
  var Xe = (te & 43690) >> 1 | (te & 21845) << 1;
345
345
  Xe = (Xe & 52428) >> 2 | (Xe & 13107) << 2, Xe = (Xe & 61680) >> 4 | (Xe & 3855) << 4, Bs[te] = ((Xe & 65280) >> 8 | (Xe & 255) << 8) >> 1;
@@ -371,10 +371,10 @@ for (var te = 256; te < 280; ++te)
371
371
  Zt[te] = 7;
372
372
  for (var te = 280; te < 288; ++te)
373
373
  Zt[te] = 8;
374
- var So = new ve(32);
374
+ var bo = new ve(32);
375
375
  for (var te = 0; te < 32; ++te)
376
- So[te] = 5;
377
- var Jr = /* @__PURE__ */ zt(Zt, 9, 1), qr = /* @__PURE__ */ zt(So, 5, 1), Kn = function(n) {
376
+ bo[te] = 5;
377
+ var Jr = /* @__PURE__ */ zt(Zt, 9, 1), qr = /* @__PURE__ */ zt(bo, 5, 1), Kn = function(n) {
378
378
  for (var e = n[0], t = 1; t < n.length; ++t)
379
379
  n[t] > e && (e = n[t]);
380
380
  return e;
@@ -480,14 +480,14 @@ var Jr = /* @__PURE__ */ zt(Zt, 9, 1), qr = /* @__PURE__ */ zt(So, 5, 1), Kn = f
480
480
  } else {
481
481
  var J = W - 254;
482
482
  if (W > 264) {
483
- var S = W - 257, N = Co[S];
484
- J = De(n, A, (1 << N) - 1) + Eo[S], A += N;
483
+ var S = W - 257, N = Io[S];
484
+ J = De(n, A, (1 << N) - 1) + So[S], A += N;
485
485
  }
486
486
  var re = d[Vn(n, A) & Y], ie = re >> 4;
487
487
  re || Be(3), A += re & 15;
488
488
  var U = Vr[ie];
489
489
  if (ie > 3) {
490
- var N = Io[ie];
490
+ var N = yo[ie];
491
491
  U += Vn(n, A) & (1 << N) - 1, A += N;
492
492
  }
493
493
  if (A > C) {
@@ -608,18 +608,18 @@ function ni(n) {
608
608
  const d = document.querySelector("#gsviewer #progressBar");
609
609
  d && (d.style.width = `${g}%`);
610
610
  })() : parent?.onProgress && parent.onProgress(g, `${g}%`);
611
- }), t(ar, () => o), t(Ga, (g) => {
611
+ }), t(or, () => o), t(Ga, (g) => {
612
612
  r = g;
613
- }), t(or, () => !o && i && r >= i), t(ht, () => {
613
+ }), t(Wa, () => !o && i && r >= i), t(ht, () => {
614
614
  const d = s(Dt).parentElement.getBoundingClientRect();
615
615
  return { width: d.width, height: d.height, left: d.left, top: d.top };
616
616
  }), t(At, (g) => {
617
617
  let d = g.x.toFixed(3).split("."), m = g.y.toFixed(3).split("."), f = g.z.toFixed(3).split(".");
618
618
  return (d[1] === "000" || d[1] === "00000") && (d[1] = "0"), (m[1] === "000" || m[1] === "00000") && (m[1] = "0"), (f[1] === "000" || f[1] === "00000") && (f[1] = "0"), `${d.join(".")}, ${m.join(".")}, ${f.join(".")}`;
619
- }), t(er, (g) => btoa(g)), t(tr, (g) => atob(g));
619
+ }), t(tr, (g) => btoa(g)), t(nr, (g) => atob(g));
620
620
  const c = 1e-3;
621
621
  let h = new M(), l = new M(), A = 0;
622
- t(ir, () => {
622
+ t(ar, () => {
623
623
  const g = s(ge), d = g.fov, m = g.position.clone(), f = g.getWorldDirection(new M());
624
624
  return Math.abs(A - d) < c && Math.abs(m.x - h.x) < c && Math.abs(m.y - h.y) < c && Math.abs(m.z - h.z) < c && Math.abs(f.x - l.x) < c && Math.abs(f.y - l.y) < c && Math.abs(f.z - l.z) < c ? !1 : (A = d, h = m, l = f, !0);
625
625
  }), t(je, (g) => {
@@ -677,7 +677,7 @@ function rn(n) {
677
677
  function Tn(n, e) {
678
678
  return ((1500 + n * 248) / e).toFixed(2) + "x";
679
679
  }
680
- async function bo(n) {
680
+ async function vo(n) {
681
681
  try {
682
682
  const e = new ReadableStream({
683
683
  async start(s) {
@@ -829,11 +829,11 @@ async function Ee(n, e = null) {
829
829
  return a == Lr && (n = await lc(n)), Tt(s, a, n);
830
830
  }
831
831
  async function Tt(n, e, t) {
832
- const s = Vt == e, a = Oe == e, o = dt == e, i = s || a || o, r = !i, h = e <= 255 || i ? ii : si, l = n * (i ? Br : z), A = WebAssembly.compile(Uint8Array.from(atob(h), (I) => I.charCodeAt(0)).buffer), u = Math.floor((l + t.byteLength) / mo) + 2, g = new WebAssembly.Memory({ initial: u, maximum: u }), m = (await WebAssembly.instantiate(await A, { env: { memory: g, expf: Pn } })).exports.D, f = new Uint8Array(g.buffer);
832
+ const s = Vt == e, a = Oe == e, o = dt == e, i = s || a || o, r = !i, h = e <= 255 || i ? ii : si, l = n * (i ? Br : z), A = WebAssembly.compile(Uint8Array.from(atob(h), (I) => I.charCodeAt(0)).buffer), u = Math.floor((l + t.byteLength) / Co) + 2, g = new WebAssembly.Memory({ initial: u, maximum: u }), m = (await WebAssembly.instantiate(await A, { env: { memory: g, expf: Pn } })).exports.D, f = new Uint8Array(g.buffer);
833
833
  return f.set(t, l), m(0, l) ? { splatCount: n, blockFormat: e, success: !1 } : { splatCount: n, blockFormat: e, success: !0, datas: f.slice(0, l), isSplat: r, isSh: i, isSh1: s, isSh2: a, isSh3: o };
834
834
  }
835
835
  async function Jt(n, e) {
836
- const t = WebAssembly.compile(Uint8Array.from(atob(ii), (h) => h.charCodeAt(0)).buffer), s = Math.floor(e * z / mo) + 2, a = new WebAssembly.Memory({ initial: s, maximum: s }), i = (await WebAssembly.instantiate(await t, { env: { memory: a, expf: Pn } })).exports.s, r = new Uint8Array(a.buffer);
836
+ const t = WebAssembly.compile(Uint8Array.from(atob(ii), (h) => h.charCodeAt(0)).buffer), s = Math.floor(e * z / Co) + 2, a = new WebAssembly.Memory({ initial: s, maximum: s }), i = (await WebAssembly.instantiate(await t, { env: { memory: a, expf: Pn } })).exports.s, r = new Uint8Array(a.buffer);
837
837
  r.set(n.slice(0, e * z), 0);
838
838
  const c = i(0, e);
839
839
  return c ? (console.error("splat data parser failed:", c), new Uint8Array(0)) : r.slice(0, e * z);
@@ -1104,7 +1104,7 @@ async function yc(n) {
1104
1104
  let D = new Uint8Array(u), v = 0;
1105
1105
  for (let p = 0; p < d.length; p++)
1106
1106
  v + d[p].byteLength < u ? (D.set(d[p], v), v += d[p].byteLength) : (D.set(d[p].slice(0, u - v), v), I = new Uint8Array(d[p].slice(u - v)));
1107
- m && (f === 0 ? D = await bo(D) : f === 1 ? D = await Ac(D) : console.error("unsuported compress type:", f));
1107
+ m && (f === 0 ? D = await vo(D) : f === 1 ? D = await Ac(D) : console.error("unsuported compress type:", f));
1108
1108
  const E = await Ee(D, n.header);
1109
1109
  if (!E.success) {
1110
1110
  console.error("spx block data parser failed. block format:", E.blockFormat), n.abortController.abort(), n.status = F.Invalid;
@@ -1225,7 +1225,7 @@ async function Sc(n) {
1225
1225
  if (u) break;
1226
1226
  h.set(g, n.downloadSize), n.downloadSize += g.length;
1227
1227
  }
1228
- const l = await bo(h);
1228
+ const l = await vo(h);
1229
1229
  if (!l || l.length < 16) {
1230
1230
  console.error("Invalid spz format"), n.status = F.Invalid;
1231
1231
  return;
@@ -1534,7 +1534,7 @@ function Qc(n) {
1534
1534
  let s, a = Date.now() + 36e5, o = null, i, r = { index: 0, version: 0 }, c = { index: 1, version: 0 }, h = !1;
1535
1535
  const l = t(Ce);
1536
1536
  let A = !1, u = 0;
1537
- e(so, () => i?.aabbCenter || new M());
1537
+ e(io, () => i?.aabbCenter || new M());
1538
1538
  let g;
1539
1539
  const d = new Promise((p) => g = p);
1540
1540
  e(wt, async () => {
@@ -1562,11 +1562,11 @@ function Qc(n) {
1562
1562
  try {
1563
1563
  await d;
1564
1564
  const B = !!i.header?.Flag2;
1565
- o = await t(ja, p, y, B), i && (i.textWatermarkVersion = Date.now());
1565
+ o = await t(Xa, p, y, B), i && (i.textWatermarkVersion = Date.now());
1566
1566
  } catch {
1567
1567
  console.info("failed to generate watermark");
1568
1568
  }
1569
- }), e($a, (p) => {
1569
+ }), e(eo, (p) => {
1570
1570
  l && (p ? (!c.active && (c.activeTime = Date.now()), c.active = !0) : (!r.active && (r.activeTime = Date.now()), r.active = !0));
1571
1571
  }), e(ps, () => {
1572
1572
  if (l) return r.version <= c.version ? r.xyz : c.xyz;
@@ -1613,8 +1613,8 @@ function Qc(n) {
1613
1613
  for (let G = 0, W = 0; G < i.renderSplatCount; G++)
1614
1614
  V[G * 3] = H[G * 8], V[G * 3 + 1] = H[G * 8 + 1], V[G * 3 + 2] = H[G * 8 + 2];
1615
1615
  const Y = Date.now();
1616
- if (y.version = Y, y.txdata = P, y.xyz = V, y.renderSplatCount = i.renderSplatCount, y.visibleSplatCount = i.downloadSplatCount + k, y.modelSplatCount = i.downloadSplatCount + k, y.watermarkCount = b + k, y.minX = i.minX, y.maxX = i.maxX, y.minY = i.minY, y.maxY = i.maxY, y.minZ = i.minZ, y.maxZ = i.maxZ, i.meta.particleMode && !u && (u = performance.now(), t(Ss, u), t(St, !1), t(kn, 1)), i.maxRadius && t(co, i.maxRadius), t(ws, y, i.currentRadius, i.currentRadius), a = Y, p && !i.smallSceneUploadDone) {
1617
- i.smallSceneUploadDone = !0, t(eo, i.sh12Data), t(to, i.sh3Data), i.sh12Data = null, i.sh3Data = null;
1616
+ if (y.version = Y, y.txdata = P, y.xyz = V, y.renderSplatCount = i.renderSplatCount, y.visibleSplatCount = i.downloadSplatCount + k, y.modelSplatCount = i.downloadSplatCount + k, y.watermarkCount = b + k, y.minX = i.minX, y.maxX = i.maxX, y.minY = i.minY, y.maxY = i.maxY, y.minZ = i.minZ, y.maxZ = i.maxZ, i.meta.particleMode && !u && (u = performance.now(), t(Ss, u), t(St, !1), t(kn, 1)), i.maxRadius && t(Ao, i.maxRadius), t(ws, y, i.currentRadius, i.currentRadius), a = Y, p && !i.smallSceneUploadDone) {
1617
+ i.smallSceneUploadDone = !0, t(to, i.sh12Data), t(no, i.sh3Data), i.sh12Data = null, i.sh3Data = null;
1618
1618
  const G = t(L);
1619
1619
  t(Us, G.shDegree === void 0 ? 3 : G.shDegree), t(ps), i.meta.particleMode && setTimeout(() => {
1620
1620
  t(Ss, performance.now() + 5e3), t(kn, 2), setTimeout(() => t(bs, !0), 5e3);
@@ -2095,7 +2095,7 @@ function qc(n) {
2095
2095
  let a = 0, o = 0;
2096
2096
  const i = [];
2097
2097
  let r = 0;
2098
- t(no, () => r), t(On, () => {
2098
+ t(so, () => r), t(On, () => {
2099
2099
  }, !0), t(Yn, () => {
2100
2100
  }, !0), t(tn, () => {
2101
2101
  }, !0), t(nn, () => {
@@ -2107,12 +2107,12 @@ function qc(n) {
2107
2107
  let d = new rs().copy(A);
2108
2108
  const m = await s(wt);
2109
2109
  if (e) return;
2110
- const f = new Uint32Array(m), C = new Po(f, 1, !1);
2111
- return C.setUsage(Uo), C.needsUpdate = !0, d.setAttribute(Bc, C), d.instanceCount = 0, t(Ii, (I, Q, x, D, v) => {
2110
+ const f = new Uint32Array(m), C = new Uo(f, 1, !1);
2111
+ return C.setUsage(No), C.needsUpdate = !0, d.setAttribute(Bc, C), d.instanceCount = 0, t(Ii, (I, Q, x, D, v) => {
2112
2112
  s(wi, Q), f.set(I, 0), C.clearUpdateRanges(), C.addUpdateRange(0, I.length), C.needsUpdate = !0, C.onUpload(() => {
2113
- s($a, Q), s(se, { renderSplatCount: v });
2113
+ s(eo, Q), s(se, { renderSplatCount: v });
2114
2114
  }), d.instanceCount = I.length, s(ne), s(se, { sortTime: `${x} / ${Date.now() - D}` });
2115
- }), t(nr, () => d), t(
2115
+ }), t(sr, () => d), t(
2116
2116
  On,
2117
2117
  () => {
2118
2118
  C.array = null, d.dispose();
@@ -2128,7 +2128,7 @@ function qc(n) {
2128
2128
  fragmentShader: Jc,
2129
2129
  transparent: !0,
2130
2130
  alphaTest: 1,
2131
- blending: No,
2131
+ blending: Ho,
2132
2132
  depthTest: d.depthTest !== !1,
2133
2133
  // 是否启用深度测试。深度测试用于确保只有离相机更近的物体才会被渲染
2134
2134
  depthWrite: !1,
@@ -2158,14 +2158,14 @@ function qc(n) {
2158
2158
  R.onUpdate = () => {
2159
2159
  b.textureReady = !0, b.textureReadyTime = Date.now(), l(b), s(Ga, b.renderSplatCount);
2160
2160
  }, R.internalFormat = "RGBA32UI", R.needsUpdate = !0, b.index ? (m.uniforms[ts].value = R, x = R) : (m.uniforms[es].value = R, C = R), m.needsUpdate = !0, s(ne);
2161
- }), t(eo, async (b) => {
2161
+ }), t(to, async (b) => {
2162
2162
  if (s(Ce) || !b || !b.length) return;
2163
2163
  const k = new Uint32Array(u * await s(Rt, 1) * 4), R = new Uint8Array(k.buffer);
2164
2164
  for (let P = 0, H = 0; P < b.length; P++)
2165
2165
  R.set(b[P], H), H += b[P].byteLength;
2166
2166
  const _ = new it(k, u, D, at, ot);
2167
2167
  _.internalFormat = "RGBA32UI", _.needsUpdate = !0, m.uniforms[Xn].value = _, m.needsUpdate = !0, s(ne);
2168
- }), t(to, async (b) => {
2168
+ }), t(no, async (b) => {
2169
2169
  if (s(Ce) || !b || !b.length) return;
2170
2170
  const k = new Uint32Array(u * await s(Rt, 3) * 4), R = new Uint8Array(k.buffer);
2171
2171
  for (let P = 0, H = 0; P < b.length; P++)
@@ -2207,7 +2207,7 @@ function qc(n) {
2207
2207
  m.uniforms[Fi].value = b, m.uniformsNeedUpdate = !0, s(ne);
2208
2208
  }), t(zn, (b) => {
2209
2209
  m.uniforms[Pi].value = b, m.uniformsNeedUpdate = !0, s(ne);
2210
- }), t(co, (b) => {
2210
+ }), t(Ao, (b) => {
2211
2211
  m.uniforms[Wi].value = b, m.uniformsNeedUpdate = !0, s(ne);
2212
2212
  }), t(pn, (b, k, R, _) => {
2213
2213
  m.uniforms[Ji].value = [b, k, R, _ ? 1 : -1], m.uniformsNeedUpdate = !0, s(ne);
@@ -2219,13 +2219,13 @@ function qc(n) {
2219
2219
  m.uniforms[$n].value = b, m.uniformsNeedUpdate = !0, s(ne);
2220
2220
  }), t(kn, (b) => {
2221
2221
  m.uniforms[Hi].value = b, m.uniformsNeedUpdate = !0, s(ne);
2222
- }), t(sr, (b) => {
2222
+ }), t(ir, (b) => {
2223
2223
  m.uniforms[Yi].value = b, m.uniformsNeedUpdate = !0;
2224
2224
  }), t(Us, async (b) => {
2225
2225
  if (s(Ce)) return;
2226
2226
  const k = await s($s);
2227
2227
  b < 0 && (b = 0), b > k && (b = k), r = b, m.uniforms[qi].value = b, m.uniformsNeedUpdate = !0, s(se, { shDegree: `${b} / max ${k}` }), s(ne);
2228
- }), t(oo, (b = 0, k = 0) => {
2228
+ }), t(ro, (b = 0, k = 0) => {
2229
2229
  m.uniforms[Ki].value = b << 16 | k, m.uniforms[$n].value = performance.now(), m.uniformsNeedUpdate = !0, s(ne);
2230
2230
  }), t(
2231
2231
  Yn,
@@ -2250,9 +2250,11 @@ function qc(n) {
2250
2250
  xt,
2251
2251
  () => {
2252
2252
  if (e) return;
2253
- u += (o - u) * A, s(sn, u), !d && (d = Date.now());
2254
- let m = u / a;
2255
- m > 0.9 || Date.now() - d > 2500 ? (s(ds) && s(fs, !0), s(sn, 0), g = !0, setTimeout(() => s(L)?.viewerEvents?.fire(Ft), 5e3)) : m > 0.7 ? A = Math.min(A * 1.2, 0.3) : m > 0.5 ? A = Math.min(A * 1.2, 0.2) : m > 0.4 && (A = Math.min(A * 1.05, 0.1));
2253
+ u += (o - u) * A, s(sn, u);
2254
+ let m = s(Wa);
2255
+ m && !d && (d = Date.now());
2256
+ let f = u / a;
2257
+ m && (f > 0.9 || Date.now() - d > 2500) ? (s(ds) && s(fs, !0), s(sn, 0), g = !0, setTimeout(() => s(L)?.viewerEvents?.fire(Ft), 5e3)) : m && f > 0.7 ? A = Math.min(A * 1.2, 0.3) : m && f > 0.5 ? A = Math.min(A * 1.2, 0.2) : f > 0.4 && (A = Math.min(A * 1.05, 0.1));
2256
2258
  },
2257
2259
  () => !e && !g,
2258
2260
  3
@@ -2270,7 +2272,7 @@ function qc(n) {
2270
2272
  () => !e && !d.stop
2271
2273
  );
2272
2274
  }), t(bs, (A = !1) => {
2273
- s(kn, 0), A && s(L).viewerEvents?.fire(Wt), s(L).viewerEvents?.fire(Xa);
2275
+ s(kn, 0), A && s(L).viewerEvents?.fire(Wt), s(L).viewerEvents?.fire(Za);
2274
2276
  }), t(fi, () => ({
2275
2277
  [es]: { type: "t", value: null },
2276
2278
  [ts]: { type: "t", value: null },
@@ -2328,7 +2330,7 @@ function qc(n) {
2328
2330
  }
2329
2331
  function jc(n) {
2330
2332
  const e = (a, ...o) => n.fire(a, ...o), t = (a, o, i) => n.on(a, o, i), s = new Set(br.split(""));
2331
- t(ja, async (a = "", o = !0, i = !0) => {
2333
+ t(Xa, async (a = "", o = !0, i = !0) => {
2332
2334
  const r = a.trim().substring(0, 100);
2333
2335
  let c = await e(va, r), h = [];
2334
2336
  for (let Q = 0; Q < c.length; Q++) {
@@ -2539,12 +2541,12 @@ function tA() {
2539
2541
  };
2540
2542
  return n.startObject("", !1), n;
2541
2543
  }
2542
- class nA extends Ho {
2544
+ class nA extends zo {
2543
2545
  constructor(e) {
2544
2546
  super(e), this.materials = null;
2545
2547
  }
2546
2548
  load(e, t, s, a) {
2547
- const o = this, i = new zo(this.manager);
2549
+ const o = this, i = new Oo(this.manager);
2548
2550
  i.setPath(this.path), i.setRequestHeader(this.requestHeader), i.setWithCredentials(this.withCredentials), i.load(e, function(r) {
2549
2551
  try {
2550
2552
  t(o.parse(r));
@@ -2582,7 +2584,7 @@ class nA extends Ho {
2582
2584
  parseFloat(A[4]),
2583
2585
  parseFloat(A[5]),
2584
2586
  parseFloat(A[6]),
2585
- Oo
2587
+ Yo
2586
2588
  ), t.colors.push(cn.r, cn.g, cn.b)) : t.colors.push(void 0, void 0, void 0);
2587
2589
  break;
2588
2590
  case "vn":
@@ -2682,7 +2684,7 @@ class nA extends Ho {
2682
2684
  ci.prototype.copy.call(E, v), E.color.copy(v.color), E.map = v.map, v = E;
2683
2685
  }
2684
2686
  }
2685
- v === void 0 && (u ? v = new gn() : g ? v = new en({ size: 1, sizeAttenuation: !1 }) : v = new Yo(), v.name = x.name, v.flatShading = !x.smooth, v.vertexColors = d, t.materials[D] = v), f.push(v);
2687
+ v === void 0 && (u ? v = new gn() : g ? v = new en({ size: 1, sizeAttenuation: !1 }) : v = new Go(), v.name = x.name, v.flatShading = !x.smooth, v.vertexColors = d, t.materials[D] = v), f.push(v);
2686
2688
  }
2687
2689
  let C;
2688
2690
  if (f.length > 1) {
@@ -2733,7 +2735,7 @@ function sA(n) {
2733
2735
  for (const A of r.keys())
2734
2736
  h - A <= 1e3 ? l++ : c.push(A);
2735
2737
  return c.forEach((A) => r.delete(A)), Math.min(l, 30);
2736
- }), window.addEventListener("beforeunload", () => s(_n)), t(io, async (r) => {
2738
+ }), window.addEventListener("beforeunload", () => s(_n)), t(ao, async (r) => {
2737
2739
  s(se, { scene: "small (obj)" });
2738
2740
  const c = await Ze(r, n);
2739
2741
  if (c) {
@@ -2895,7 +2897,7 @@ class lA extends Ln {
2895
2897
  }
2896
2898
  }
2897
2899
  function uA(n) {
2898
- const e = (m, f, C) => n.on(m, f, C), t = (m, ...f) => n.fire(m, ...f), s = new Go(1, 1);
2900
+ const e = (m, f, C) => n.on(m, f, C), t = (m, ...f) => n.fire(m, ...f), s = new Wo(1, 1);
2899
2901
  s.rotateX(-Math.PI / 2);
2900
2902
  const a = new tt({ color: 16777215 });
2901
2903
  a.transparent = !0, a.opacity = 0.6, a.depthTest = !1, a.depthWrite = !1, a.side = qe;
@@ -2913,7 +2915,7 @@ function uA(n) {
2913
2915
  }
2914
2916
  });
2915
2917
  }
2916
- const ra = { type: "change" }, oi = { type: "start" }, vo = { type: "end" }, An = new Ko(), ca = new Vo(), hA = Math.cos(70 * et.DEG2RAD), ae = new M(), ye = 2 * Math.PI, ee = {
2918
+ const ra = { type: "change" }, oi = { type: "start" }, Qo = { type: "end" }, An = new Vo(), ca = new Jo(), hA = Math.cos(70 * et.DEG2RAD), ae = new M(), ye = 2 * Math.PI, ee = {
2917
2919
  NONE: -1,
2918
2920
  ROTATE: 0,
2919
2921
  DOLLY: 1,
@@ -2923,7 +2925,7 @@ const ra = { type: "change" }, oi = { type: "start" }, vo = { type: "end" }, An
2923
2925
  TOUCH_DOLLY_PAN: 5,
2924
2926
  TOUCH_DOLLY_ROTATE: 6
2925
2927
  }, ss = 1e-6;
2926
- class Qo extends Wo {
2928
+ class xo extends Ko {
2927
2929
  constructor(e, t = null) {
2928
2930
  super(e, t), this.state = ee.NONE, this.enabled = !0, this.target = new M(), this.cursor = new M(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: Ve.ROTATE, MIDDLE: Ve.DOLLY, RIGHT: Ve.PAN }, this.touches = { ONE: $e.ROTATE, TWO: $e.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new M(), this._lastQuaternion = new Qt(), this._lastTargetPosition = new M(), this._quat = new Qt().setFromUnitVectors(e.up, new M(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new li(), this._sphericalDelta = new li(), this._scale = 1, this._panOffset = new M(), this._rotateStart = new fe(), this._rotateEnd = new fe(), this._rotateDelta = new fe(), this._panStart = new fe(), this._panEnd = new fe(), this._panDelta = new fe(), this._dollyStart = new fe(), this._dollyEnd = new fe(), this._dollyDelta = new fe(), this._dollyDirection = new M(), this._mouse = new fe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = dA.bind(this), this._onPointerDown = gA.bind(this), this._onPointerUp = fA.bind(this), this._onContextMenu = EA.bind(this), this._onMouseWheel = CA.bind(this), this._onKeyDown = IA.bind(this), this._onTouchStart = yA.bind(this), this._onTouchMove = wA.bind(this), this._onMouseDown = pA.bind(this), this._onMouseMove = mA.bind(this), this._interceptControlDown = SA.bind(this), this._interceptControlUp = bA.bind(this), this.domElement !== null && this.connect(), this.update();
2929
2931
  }
@@ -3191,7 +3193,7 @@ function dA(n) {
3191
3193
  function fA(n) {
3192
3194
  switch (this._removePointer(n), this._pointers.length) {
3193
3195
  case 0:
3194
- this.domElement.releasePointerCapture(n.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(vo), this.state = ee.NONE;
3196
+ this.domElement.releasePointerCapture(n.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Qo), this.state = ee.NONE;
3195
3197
  break;
3196
3198
  case 1:
3197
3199
  const e = this._pointers[0], t = this._pointerPositions[e];
@@ -3259,7 +3261,7 @@ function mA(n) {
3259
3261
  }
3260
3262
  }
3261
3263
  function CA(n) {
3262
- this.enabled === !1 || this.enableZoom === !1 || this.state !== ee.NONE || (n.preventDefault(), this.dispatchEvent(oi), this._handleMouseWheel(this._customWheelEvent(n)), this.dispatchEvent(vo));
3264
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== ee.NONE || (n.preventDefault(), this.dispatchEvent(oi), this._handleMouseWheel(this._customWheelEvent(n)), this.dispatchEvent(Qo));
3263
3265
  }
3264
3266
  function IA(n) {
3265
3267
  this.enabled !== !1 && this._handleKeyDown(n);
@@ -3330,7 +3332,7 @@ function SA(n) {
3330
3332
  function bA(n) {
3331
3333
  n.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
3332
3334
  }
3333
- class vA extends Qo {
3335
+ class vA extends xo {
3334
3336
  constructor(e) {
3335
3337
  const t = e.camera;
3336
3338
  super(t, e.renderer.domElement);
@@ -3349,13 +3351,13 @@ class vA extends Qo {
3349
3351
  this._quat?.setFromUnitVectors?.(this.object.up, new M(0, 1, 0)), this._quatInverse = this._quat?.clone?.()?.invert?.();
3350
3352
  }
3351
3353
  }
3352
- class QA extends Qo {
3354
+ class QA extends xo {
3353
3355
  constructor(e, t) {
3354
3356
  super(e, t), this.screenSpacePanning = !1, this.mouseButtons = { LEFT: Ve.PAN, MIDDLE: Ve.DOLLY, RIGHT: Ve.ROTATE }, this.touches = { ONE: $e.PAN, TWO: $e.DOLLY_ROTATE };
3355
3357
  }
3356
3358
  }
3357
3359
  const Aa = new Fs(), ln = new M();
3358
- class xo extends rs {
3360
+ class Bo extends rs {
3359
3361
  constructor() {
3360
3362
  super(), this.isLineSegmentsGeometry = !0, this.type = "LineSegmentsGeometry";
3361
3363
  const e = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0], t = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], s = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5];
@@ -3384,7 +3386,7 @@ class xo extends rs {
3384
3386
  return this.setPositions(e.attributes.position.array), this;
3385
3387
  }
3386
3388
  fromMesh(e) {
3387
- return this.fromWireframeGeometry(new Jo(e.geometry)), this;
3389
+ return this.fromWireframeGeometry(new qo(e.geometry)), this;
3388
3390
  }
3389
3391
  fromLineSegments(e) {
3390
3392
  const t = e.geometry;
@@ -3886,7 +3888,7 @@ class Mt extends ma {
3886
3888
  this.defines && (e === !0 !== this.alphaToCoverage && (this.needsUpdate = !0), e === !0 ? this.defines.USE_ALPHA_TO_COVERAGE = "" : delete this.defines.USE_ALPHA_TO_COVERAGE);
3887
3889
  }
3888
3890
  }
3889
- const is = new Ye(), la = new M(), ua = new M(), Ae = new Ye(), le = new Ye(), Le = new Ye(), as = new M(), os = new Je(), ue = new qo(), ha = new M(), un = new Fs(), hn = new ya(), _e = new Ye();
3891
+ const is = new Ye(), la = new M(), ua = new M(), Ae = new Ye(), le = new Ye(), Le = new Ye(), as = new M(), os = new Je(), ue = new jo(), ha = new M(), un = new Fs(), hn = new ya(), _e = new Ye();
3890
3892
  let Ne, lt;
3891
3893
  function ga(n, e, t) {
3892
3894
  return _e.set(0, 0, -e, 1).applyMatrix4(n.projectionMatrix), _e.multiplyScalar(1 / _e.w), _e.x = lt / t.width, _e.y = lt / t.height, _e.applyMatrix4(n.projectionMatrixInverse), _e.multiplyScalar(1 / _e.w), Math.abs(Math.max(_e.x, _e.y));
@@ -3942,7 +3944,7 @@ function BA(n, e, t) {
3942
3944
  }
3943
3945
  }
3944
3946
  class MA extends pe {
3945
- constructor(e = new xo(), t = new Mt({ color: Math.random() * 16777215 })) {
3947
+ constructor(e = new Bo(), t = new Mt({ color: Math.random() * 16777215 })) {
3946
3948
  super(e, t), this.isLineSegments2 = !0, this.type = "LineSegments2";
3947
3949
  }
3948
3950
  // for backwards-compatibility, but could be a method of LineSegmentsGeometry...
@@ -3984,7 +3986,7 @@ class MA extends pe {
3984
3986
  t && t.resolution && (e.getViewport(is), this.material.uniforms.resolution.value.set(is.z, is.w));
3985
3987
  }
3986
3988
  }
3987
- class qt extends xo {
3989
+ class qt extends Bo {
3988
3990
  constructor() {
3989
3991
  super(), this.isLineGeometry = !0, this.type = "LineGeometry";
3990
3992
  }
@@ -4394,7 +4396,7 @@ class ks extends ut {
4394
4396
  e.disposed = !0, e.events.fire(je, e), e.events.fire(O).remove(e), e.events.fire(kt, e), e.geometry.dispose(), e.material.dispose(), document.querySelectorAll(`.${e.data.name}`).forEach((s) => s.parentElement?.removeChild(s)), e.events = null, e.data = null, e.css3dTags = null, e.group = null;
4395
4397
  }
4396
4398
  }
4397
- class Bo extends jt {
4399
+ class Mo extends jt {
4398
4400
  constructor(e, t, s) {
4399
4401
  super(), this.isMark = !0, this.disposed = !1, this.events = e;
4400
4402
  const a = this;
@@ -4682,7 +4684,7 @@ class Ts extends ut {
4682
4684
  e.disposed = !0, e.events.fire(je, e), e.events.fire(O).remove(e), e.events.fire(kt, e), e.geometry.dispose(), e.material.dispose(), document.querySelectorAll(`.${e.data.name}`).forEach((s) => s.parentElement?.removeChild(s)), e.events = null, e.data = null, e.css3dTags = null, e.group = null, e.meshPlans = null, e.css3dMainTag = null, e.css3dAreaTag = null;
4683
4685
  }
4684
4686
  }
4685
- class Mo extends jt {
4687
+ class Do extends jt {
4686
4688
  constructor(e) {
4687
4689
  super(), this.isMark = !0, this.disposed = !1, this.events = e;
4688
4690
  }
@@ -4849,7 +4851,7 @@ function RA(n) {
4849
4851
  }), e(Bi, () => {
4850
4852
  const p = t(O);
4851
4853
  let y;
4852
- p.traverse((B) => B instanceof Pe && (y = B)), y && t(hs, y.fire(so));
4854
+ p.traverse((B) => B instanceof Pe && (y = B)), y && t(hs, y.fire(io));
4853
4855
  }), e(Rn, () => {
4854
4856
  if (!a.size) return;
4855
4857
  const p = t(L);
@@ -4858,7 +4860,7 @@ function RA(n) {
4858
4860
  t(_t), a.clear();
4859
4861
  return;
4860
4862
  }
4861
- a.has("Space") ? (p.bigSceneMode ? t(Bn) : t(Mn), a.clear()) : a.has("KeyR") ? (p.autoRotate ? t(he) : t(di), a.clear()) : a.has("KeyM") ? (t(Wt, !p.markVisible), a.clear()) : a.has("ArrowLeft") ? (t(Si), t(mn, !0), a.clear()) : a.has("ArrowRight") ? (t(bi), t(mn, !0), a.clear()) : a.has("KeyP") ? (t(Kt, !0), a.clear()) : a.has("Equal") ? (t(Js), a.clear()) : a.has("Minus") ? (t(js), a.clear()) : a.has("KeyY") ? (t(qs, !1), t(Is), a.clear()) : a.has("KeyI") ? (t(Za), a.clear()) : a.has("KeyF") ? (t(Bi), a.clear()) : a.has("F2") ? (!p.bigSceneMode && window.open("/editor/index.html?url=" + encodeURIComponent(t(Ke).meta.url)), a.clear()) : a.has("KeyW") ? (UA(t(Z)), a.clear()) : a.has("KeyS") ? (NA(t(Z)), a.clear()) : a.has("KeyA") ? (FA(t(Z)), a.clear()) : a.has("KeyD") ? (PA(t(Z)), a.clear()) : a.has("KeyQ") ? (HA(t(Z)), a.clear()) : a.has("KeyE") ? (zA(t(Z)), a.clear()) : a.has("KeyC") ? (OA(t(Z)), a.clear()) : a.has("KeyZ") && (YA(t(Z)), a.clear());
4863
+ a.has("Space") ? (p.bigSceneMode ? t(Bn) : t(Mn), a.clear()) : a.has("KeyR") ? (p.autoRotate ? t(he) : t(di), a.clear()) : a.has("KeyM") ? (t(Wt, !p.markVisible), a.clear()) : a.has("ArrowLeft") ? (t(Si), t(mn, !0), a.clear()) : a.has("ArrowRight") ? (t(bi), t(mn, !0), a.clear()) : a.has("KeyP") ? (t(Kt, !0), a.clear()) : a.has("Equal") ? (t(Js), a.clear()) : a.has("Minus") ? (t(js), a.clear()) : a.has("KeyY") ? (t(qs, !1), t(Is), a.clear()) : a.has("KeyI") ? (t($a), a.clear()) : a.has("KeyF") ? (t(Bi), a.clear()) : a.has("F2") ? (!p.bigSceneMode && window.open("/editor/index.html?url=" + encodeURIComponent(t(Ke).meta.url)), a.clear()) : a.has("KeyW") ? (UA(t(Z)), a.clear()) : a.has("KeyS") ? (NA(t(Z)), a.clear()) : a.has("KeyA") ? (FA(t(Z)), a.clear()) : a.has("KeyD") ? (PA(t(Z)), a.clear()) : a.has("KeyQ") ? (HA(t(Z)), a.clear()) : a.has("KeyE") ? (zA(t(Z)), a.clear()) : a.has("KeyC") ? (OA(t(Z)), a.clear()) : a.has("KeyZ") && (YA(t(Z)), a.clear());
4862
4864
  }), e(Nt, async (p, y) => {
4863
4865
  if (i.move) return;
4864
4866
  const B = await t(Qn, p, y);
@@ -4913,7 +4915,7 @@ function RA(n) {
4913
4915
  if (i.isDbClick && (d ? Math.abs(p.clientX - i.lastClickX) < 2 && Math.abs(p.clientY - i.lastClickY) < 2 && (d.drawFinish(i.lastClickPointTime > 0), d = null, i.lastMovePoint = null) : m && Math.abs(p.clientX - i.lastClickX) < 2 && Math.abs(p.clientY - i.lastClickY) < 2 && (m.drawFinish(i.lastClickPointTime > 0), m = null, i.lastMovePoint = null)), y.markMode && i.down === 1 && !i.move && Date.now() - i.downTime < 500) {
4914
4916
  if (y.markType === "point") {
4915
4917
  if (await t(Qe, p.clientX, p.clientY)) {
4916
- const S = new Bo(n, await t(Qe, p.clientX, p.clientY));
4918
+ const S = new Mo(n, await t(Qe, p.clientX, p.clientY));
4917
4919
  t(O).add(S), S.drawFinish();
4918
4920
  }
4919
4921
  } else if (y.markType === "distance")
@@ -4954,7 +4956,7 @@ function RA(n) {
4954
4956
  B ? (f.drawFinish(B), f = null) : i.isDbClick && t(_t);
4955
4957
  } else {
4956
4958
  const B = await t(Qe, p.clientX, p.clientY);
4957
- B && (f = new Mo(n), f.drawStart(B), t(O).add(f));
4959
+ B && (f = new Do(n), f.drawStart(B), t(O).add(f));
4958
4960
  }
4959
4961
  i.lastClickX = p.clientX, i.lastClickY = p.clientY;
4960
4962
  }
@@ -5006,19 +5008,19 @@ function NA(n) {
5006
5008
  const e = new M();
5007
5009
  n.object.getWorldDirection(e).negate(), Un(n, e);
5008
5010
  }
5009
- function Do(n, e = 6e-3) {
5011
+ function ko(n, e = 6e-3) {
5010
5012
  const t = n.object.position.clone(), s = n.target.clone(), a = new M().subVectors(s, t), o = n.object.up.clone().normalize(), i = new Qt();
5011
5013
  i.setFromAxisAngle(o, -e), a.applyQuaternion(i);
5012
5014
  const r = new M().addVectors(t, a);
5013
5015
  n.target.copy(r), n.update();
5014
5016
  }
5015
5017
  function HA(n) {
5016
- Do(n, -0.01);
5018
+ ko(n, -0.01);
5017
5019
  }
5018
5020
  function zA(n) {
5019
- Do(n, 0.01);
5021
+ ko(n, 0.01);
5020
5022
  }
5021
- function ko(n, e = 6e-3) {
5023
+ function To(n, e = 6e-3) {
5022
5024
  const t = n.object.position.clone(), s = n.target.clone(), a = new M().subVectors(s, t), o = new M();
5023
5025
  n.object.getWorldDirection(o);
5024
5026
  const i = new M().crossVectors(n.object.up, o).normalize(), r = new Qt();
@@ -5027,13 +5029,13 @@ function ko(n, e = 6e-3) {
5027
5029
  n.target.copy(c), n.update();
5028
5030
  }
5029
5031
  function OA(n, e = 0.01) {
5030
- ko(n, -e);
5032
+ To(n, -e);
5031
5033
  }
5032
5034
  function YA(n, e = 0.01) {
5033
- ko(n, e);
5035
+ To(n, e);
5034
5036
  }
5035
- function To(n) {
5036
- const e = new jo(), t = 5, s = (o, i, r) => n.on(o, i, r), a = (o, ...i) => n.fire(o, ...i);
5037
+ function Lo(n) {
5038
+ const e = new Xo(), t = 5, s = (o, i, r) => n.on(o, i, r), a = (o, ...i) => n.fire(o, ...i);
5037
5039
  s(Qn, async (o, i) => {
5038
5040
  const { width: r, height: c, left: h, top: l } = a(ht), A = new fe();
5039
5041
  A.x = (o - h) / r * 2 - 1, A.y = (l - i) / c * 2 + 1;
@@ -5046,7 +5048,7 @@ function To(n) {
5046
5048
  const Q = e.intersectObjects(C, !0);
5047
5049
  for (let E = 0; E < Q.length; E++)
5048
5050
  m.push({ point: Q[E].point, d: e.ray.distanceToPoint(Q[E].point), p: 1 });
5049
- const x = a(ro), D = d.projectionMatrix.clone().multiply(d.matrixWorldInverse);
5051
+ const x = a(co), D = d.projectionMatrix.clone().multiply(d.matrixWorldInverse);
5050
5052
  for (let E = 0; E < I.length; E++) {
5051
5053
  const p = I[E].fire(ps);
5052
5054
  if (p)
@@ -5091,7 +5093,7 @@ function GA(n) {
5091
5093
  let a;
5092
5094
  const o = [];
5093
5095
  e(hs, (l, A = !1, u) => {
5094
- if (t(Wa, l), !A) {
5096
+ if (t(Ka, l), !A) {
5095
5097
  s.target.copy(l);
5096
5098
  const I = new M().subVectors(l, s.object.position);
5097
5099
  I.length() < 1 && s.object.position.copy(l).sub(I.setLength(1)), I.length() > 50 && s.object.position.copy(l).sub(I.setLength(50)), t(xn), t(Cs);
@@ -5128,7 +5130,7 @@ function WA(n) {
5128
5130
  s.scale.set(r, r, r);
5129
5131
  }), e(an, (i) => {
5130
5132
  t(Wn), s.visible = i > 0.1, s.element.style.opacity = i + "", t(ce);
5131
- }), e(Wa, (i) => {
5133
+ }), e(Ka, (i) => {
5132
5134
  for (s.position.copy(i); a.length; ) a.pop().stop = !0;
5133
5135
  t(an, 1), t(ce);
5134
5136
  }), e(Cs, () => {
@@ -5149,7 +5151,7 @@ function WA(n) {
5149
5151
  return r.element.style.pointerEvents = "none", r.element.style.opacity = "1", r.visible = !1, t(O).add(r), r.onBeforeRender = () => t(Wn), r;
5150
5152
  }
5151
5153
  }
5152
- function Lo(n) {
5154
+ function _o(n) {
5153
5155
  const e = (i, r, c) => n.on(i, r, c), t = (i, ...r) => n.fire(i, ...r), s = /* @__PURE__ */ new Map(), a = document.createElement("div");
5154
5156
  a.classList.add("mark-warp"), document.body.appendChild(a);
5155
5157
  const o = new LA();
@@ -5187,21 +5189,21 @@ function Lo(n) {
5187
5189
  });
5188
5190
  const r = t(Ke).meta || {};
5189
5191
  return i.length ? r.marks = i : delete r.marks, await t(ct, r);
5190
- }), e(Ja, async () => {
5192
+ }), e(qa, async () => {
5191
5193
  const i = t(Ke).meta || {};
5192
5194
  delete i.marks;
5193
5195
  const r = await t(ct, i), c = [];
5194
5196
  return s.forEach((h) => c.push(h)), c.forEach((h) => h.deref()?.dispose?.()), t(ce), r;
5195
- }), e(qa, async () => {
5197
+ }), e(ja, async () => {
5196
5198
  t(O).traverse((r) => {
5197
5199
  r.isMark && r.getMarkData?.();
5198
5200
  });
5199
5201
  const i = t(Ke).meta || {};
5200
- return i.watermark = t(Ka) || "", await t(ct, i);
5202
+ return i.watermark = t(Va) || "", await t(ct, i);
5201
5203
  }), e(ys, (i) => {
5202
5204
  i.meterScale && (t(L).meterScale = i.meterScale, t(se, { scale: `1 : ${t(L).meterScale} m` })), t(Z).updateByOptions({ ...i, ...i.cameraInfo || {} }), (i.marks || []).forEach((c) => {
5203
5205
  if (c.type === "MarkSinglePoint") {
5204
- const h = new Bo(n, c);
5206
+ const h = new Mo(n, c);
5205
5207
  h.visible = !1, t(O).add(h);
5206
5208
  } else if (c.type === "MarkDistanceLine") {
5207
5209
  const h = new Ds(n);
@@ -5213,14 +5215,14 @@ function Lo(n) {
5213
5215
  const h = new Ts(n);
5214
5216
  h.draw(c, !0), h.visible = !1, t(O).add(h);
5215
5217
  } else if (c.type === "MarkCirclePlan") {
5216
- const h = new Mo(n);
5218
+ const h = new Do(n);
5217
5219
  h.draw(c), h.visible = !1, t(O).add(h);
5218
5220
  }
5219
5221
  }), t(Xs, i.flyPositions || []), t(Zs, i.flyTargets || []);
5220
5222
  }), e(st, () => {
5221
5223
  const i = t(L);
5222
5224
  i.markMode = !1, t(Ys), t(ce);
5223
- }), e(Va, (i, r = !0) => {
5225
+ }), e(Ja, (i, r = !0) => {
5224
5226
  const c = i?.meterScale;
5225
5227
  if (c) {
5226
5228
  if (typeof c != "number" || c <= 0) {
@@ -5283,7 +5285,7 @@ function KA(n) {
5283
5285
  }), t(js, () => {
5284
5286
  s.length = 0, a.length = 0;
5285
5287
  }), t(qs, async (u = !0) => {
5286
- const g = e(Ke).meta || e(ao);
5288
+ const g = e(Ke).meta || e(oo);
5287
5289
  if (s.length) {
5288
5290
  const d = [], m = [];
5289
5291
  for (let f = 0, C = s.length; f < C; f++)
@@ -5292,7 +5294,7 @@ function KA(n) {
5292
5294
  } else
5293
5295
  delete g.flyPositions, delete g.flyTargets;
5294
5296
  u && await e(ct, g);
5295
- }), t(Xa, () => {
5297
+ }), t(Za, () => {
5296
5298
  i || (i = !0) && e(Kt, !0);
5297
5299
  });
5298
5300
  let r = 0;
@@ -5330,7 +5332,7 @@ class il {
5330
5332
  const i = new ei();
5331
5333
  e.viewerEvents = i, t.events = i;
5332
5334
  const r = (u, g, d) => i.on(u, g, d), c = (u, ...g) => i.fire(u, ...g);
5333
- r(ro, () => t.metaMatrix), r(L, () => e), r(Dt, () => s.domElement), r(Yt, () => s), r(O, () => a), r(Z, () => o), r(ge, () => o.object), r(Ce, () => e.bigSceneMode), r(Ar, (u) => e.pointcloudMode = u);
5335
+ r(co, () => t.metaMatrix), r(L, () => e), r(Dt, () => s.domElement), r(Yt, () => s), r(O, () => a), r(Z, () => o), r(ge, () => o.object), r(Ce, () => e.bigSceneMode), r(Ar, (u) => e.pointcloudMode = u);
5334
5336
  const h = [];
5335
5337
  r(ce, () => {
5336
5338
  for (t.needUpdate = !0; h.length; ) h.pop().stop = !0;
@@ -5343,7 +5345,7 @@ class il {
5343
5345
  () => !t.disposed && (c(Gs) || !u.stop),
5344
5346
  10
5345
5347
  );
5346
- }), ni(i), sA(i), ai(i), GA(i), Lo(i), RA(i), To(i), WA(i), KA(i), t.splatMesh = new Pe(rA(e)), r(Ke, () => t.splatMesh), a.add(t.splatMesh), uA(i), a.add(new Sa("#ffffff", 2)), s.setAnimationLoop(t.update.bind(t)), r(vi, () => {
5348
+ }), ni(i), sA(i), ai(i), GA(i), _o(i), RA(i), Lo(i), WA(i), KA(i), t.splatMesh = new Pe(rA(e)), r(Ke, () => t.splatMesh), a.add(t.splatMesh), uA(i), a.add(new Sa("#ffffff", 2)), s.setAnimationLoop(t.update.bind(t)), r(vi, () => {
5347
5349
  o.update(), !t.needUpdate && c(Hs) && c(ce);
5348
5350
  }), r(bt, () => c(Rn), !0), r(bt, () => c(vi), !0), r(
5349
5351
  gt,
@@ -5356,18 +5358,18 @@ class il {
5356
5358
  },
5357
5359
  !0
5358
5360
  ), r(Gt, () => {
5359
- }, !0), r(_n, () => t.dispose()), r(Za, () => console.info(JSON.stringify(c(Ke).meta || {}, null, 2)));
5361
+ }, !0), r(_n, () => t.dispose()), r($a, () => console.info(JSON.stringify(c(Ke).meta || {}, null, 2)));
5360
5362
  let l = "";
5361
5363
  r(on, (u = "") => {
5362
5364
  l = u, t.splatMesh.fire(Vs, l, !0);
5363
- }), r(Ka, () => l), c(se, { scale: `1 : ${c(L).meterScale} m` }), t.initGsApi();
5365
+ }), r(Va, () => l), c(se, { scale: `1 : ${c(L).meterScale} m` }), t.initGsApi();
5364
5366
  let A;
5365
5367
  r(Ft, (u = !0, g = 1, d = 2) => {
5366
5368
  A && clearTimeout(A), A = null;
5367
5369
  const m = 16;
5368
5370
  if (d > m && u) return c(Ft, u, m, 1);
5369
5371
  if (d < 1 && !u) return c(Ft, !u, 1, m);
5370
- t.splatMesh.fire(oo, g, d), A = setTimeout(() => c(Ft, u, d, u ? d * 2 : d / 2), 6 * 1e3);
5372
+ t.splatMesh.fire(ro, g, d), A = setTimeout(() => c(Ft, u, d, u ? d * 2 : d / 2), 6 * 1e3);
5371
5373
  });
5372
5374
  }
5373
5375
  /**
@@ -5414,9 +5416,9 @@ class il {
5414
5416
  // 开发调试用临时接口
5415
5417
  fire(e, t, s) {
5416
5418
  const a = this;
5417
- e === 1 && a.splatMesh.fire(gs, t), e === 2 && a.events.fire(Js), e === 3 && a.events.fire(Kt, !0), e === 4 && a.events.fire(js), e === 5 && a.events.fire(qs), e === 6 && a.events.fire(Cn), e === 7 && a.events.fire(Ja), e === 8 && (async () => {
5419
+ e === 1 && a.splatMesh.fire(gs, t), e === 2 && a.events.fire(Js), e === 3 && a.events.fire(Kt, !0), e === 4 && a.events.fire(js), e === 5 && a.events.fire(qs), e === 6 && a.events.fire(Cn), e === 7 && a.events.fire(qa), e === 8 && (async () => {
5418
5420
  let o = await a.splatMesh.fire($s);
5419
- t && (o = a.splatMesh.fire(no) + t), a.splatMesh.fire(Us, o);
5421
+ t && (o = a.splatMesh.fire(so) + t), a.splatMesh.fire(Us, o);
5420
5422
  })();
5421
5423
  }
5422
5424
  /**
@@ -5507,7 +5509,7 @@ class il {
5507
5509
  console.error("unknow format!", i.url);
5508
5510
  return;
5509
5511
  }
5510
- s(ao, () => c), t.metaMatrix = c.transform ? new Je().fromArray(c.transform) : null, a(ys, c), i.format === "obj" ? (this.options({ autoRotate: !1 }), await a(io, i.url)) : (this.splatMesh.addModel(i, c), await a(on, c.watermark)), Se && a(Z)._dollyOut?.(0.75);
5512
+ s(oo, () => c), t.metaMatrix = c.transform ? new Je().fromArray(c.transform) : null, a(ys, c), i.format === "obj" ? (this.options({ autoRotate: !1 }), await a(ao, i.url)) : (this.splatMesh.addModel(i, c), await a(on, c.watermark)), Se && a(Z)._dollyOut?.(0.75);
5511
5513
  }
5512
5514
  /**
5513
5515
  * 根据需要暴露的接口
@@ -5536,10 +5538,10 @@ class il {
5536
5538
  else
5537
5539
  return !1;
5538
5540
  return A.markMode = !0, e(he), !0;
5539
- }, i = async (l) => (setTimeout(() => window.focus()), l ? (e(Ht, l)?.dispose(), e(ce), await e(Cn)) : !1), r = async (l, A = !0) => (e(Va, l, A), e(Ht, l?.name)?.drawUpdate?.(l, A), e(ce), A ? (setTimeout(() => window.focus()), await e(Cn)) : !0), c = (l = !0) => {
5541
+ }, i = async (l) => (setTimeout(() => window.focus()), l ? (e(Ht, l)?.dispose(), e(ce), await e(Cn)) : !1), r = async (l, A = !0) => (e(Ja, l, A), e(Ht, l?.name)?.drawUpdate?.(l, A), e(ce), A ? (setTimeout(() => window.focus()), await e(Cn)) : !0), c = (l = !0) => {
5540
5542
  setTimeout(() => window.focus()), e(gs, !!l);
5541
5543
  }, h = (l, A = !0) => {
5542
- e(on, l), A && e(qa, l);
5544
+ e(on, l), A && e(ja, l);
5543
5545
  };
5544
5546
  window.$api = { switchAutoRotate: t, changePointCloudMode: s, showMark: a, startMark: o, deleteMark: i, updateMark: r, showWaterMark: c, setWaterMark: h };
5545
5547
  }
@@ -5569,14 +5571,14 @@ function VA(n) {
5569
5571
  for (let h = 0; h < c.length; h++)
5570
5572
  c[h].splatMesh.boundBox.visible = h < 1;
5571
5573
  return window.splat = c[0]?.splatMesh, c[0]?.splatMesh;
5572
- }), e(fo, () => {
5574
+ }), e(po, () => {
5573
5575
  const i = t(O), r = t(ge), c = [];
5574
5576
  i?.traverse(function(h) {
5575
5577
  h.isWarpSplatMesh && c.push(h);
5576
5578
  }), c.sort((h, l) => r.position.distanceTo(h.position) - r.position.distanceTo(l.position));
5577
5579
  for (let h = 0; h < c.length; h++)
5578
5580
  c[h].active = h < s, c[h].splatMesh && (c[h].splatMesh.renderOrder = 1e3 - h);
5579
- }), e(po, () => {
5581
+ }), e(mo, () => {
5580
5582
  const i = t(O), r = [];
5581
5583
  i?.traverse((c) => r.push(c)), r.forEach((c) => {
5582
5584
  c.dispose ? c.dispose() : (c.geometry?.dispose?.(), c.material && c.material instanceof Array ? c.material.forEach((h) => h?.dispose?.()) : c.material?.dispose?.());
@@ -5593,7 +5595,7 @@ function VA(n) {
5593
5595
  }), e(pr, (i = 0.01) => {
5594
5596
  const r = t(oe);
5595
5597
  r && r.visible && (r.position.x += i);
5596
- }), e(go, (i = 0.01) => {
5598
+ }), e(fo, (i = 0.01) => {
5597
5599
  const r = t(oe);
5598
5600
  r && r.visible && (r.position.y += i);
5599
5601
  }), e(mr, (i = 0.01) => {
@@ -5612,13 +5614,13 @@ function VA(n) {
5612
5614
  if (!i && (i = t(oe)), !i) return;
5613
5615
  const r = i.meta || {};
5614
5616
  return r.transform = i.matrix.toArray(), await t(ct, JSON.stringify(r), i.meta.url);
5615
- }), e(Ao, () => {
5617
+ }), e(lo, () => {
5616
5618
  const i = t(L).root, r = new Ca({ antialias: !1, logarithmicDepthBuffer: !0, stencil: !0, alpha: !0, precision: "highp" });
5617
5619
  return r.setSize(i.clientWidth, i.clientHeight), r.setPixelRatio(Math.min(devicePixelRatio, 2)), e(Yt, () => r), e(Dt, () => r.domElement), r;
5618
- }), e(lo, () => {
5620
+ }), e(uo, () => {
5619
5621
  const i = t(L), r = new Ea(), c = i.background || "#dbf0ff";
5620
5622
  return r.background = new Rs(c), r.fog = new hi(c, 0), e(O, () => r), r;
5621
- }), e(uo, () => {
5623
+ }), e(ho, () => {
5622
5624
  const r = t(ge), c = t(O), h = t(L), l = new QA(t(ge), h.root);
5623
5625
  l.screenSpacePanning = !1, l.minDistance = 0.1, l.maxDistance = 6e4, l.maxPolarAngle = 1.2, l.enableDamping = !0, l.dampingFactor = 0.07, l.zoomToCursor = !0;
5624
5626
  const A = new M().fromArray(h.minPan || [-2e4, 0.1, -6e4]), u = new M().fromArray(h.maxPan || [5e4, 1e4, 0]), g = new M();
@@ -5626,8 +5628,8 @@ function VA(n) {
5626
5628
  const d = Math.max(l.getPolarAngle(), 0.1), m = Math.max(l.getDistance(), 0.1);
5627
5629
  l.zoomSpeed = Math.max(Math.log(m), 0) + 0.5, r.far = et.clamp(m / d * 8, 100, 1e5), r.near = r.far / 1e3, r.updateProjectionMatrix(), c.fog instanceof hi && (c.fog.density = d / (m + 5) * 1 * 0.25), l.maxPolarAngle = Math.min(Math.pow(1e4 / m, 4), 1.2), g.copy(l.target), l.target.clamp(A, u), g.sub(l.target), r.position.sub(g);
5628
5630
  }), e(Z, () => l), e(Xt, () => r.fov), e(ze, (d = !1) => d ? r.position.clone() : r.position), e(He, (d = !1) => d ? l.target.clone() : l.target), e(Bt, (d = !1) => d ? r.up.clone() : r.up), l;
5629
- }), e(ho, () => {
5630
- const i = new Xo(16777215, 1);
5631
+ }), e(go, () => {
5632
+ const i = new Zo(16777215, 1);
5631
5633
  return i.position.set(0, 2e3, 1e3), i;
5632
5634
  }), window.addEventListener("beforeunload", () => t(_n));
5633
5635
  }
@@ -5693,7 +5695,7 @@ function XA(n) {
5693
5695
  const p = E.meta || {};
5694
5696
  p.transform = E.matrix.toArray();
5695
5697
  }
5696
- } else a.has("KeyQ") ? t(vs, 0.1) : a.has("KeyW") ? t(Qs, 0.1) : a.has("KeyE") ? t(xs, 0.1) : a.has("KeyA") ? t(vs, -0.1) : a.has("KeyS") ? t(Qs, -0.1) : a.has("KeyD") ? t(xs, -0.1) : a.has("KeyY") ? t(go, a.has("ShiftLeft") || a.has("ShiftRight") ? -0.1 : 0.1) : a.has("KeyC") && console.info("position=", t(ze).toArray(), "lookat=", t(He).toArray());
5698
+ } else a.has("KeyQ") ? t(vs, 0.1) : a.has("KeyW") ? t(Qs, 0.1) : a.has("KeyE") ? t(xs, 0.1) : a.has("KeyA") ? t(vs, -0.1) : a.has("KeyS") ? t(Qs, -0.1) : a.has("KeyD") ? t(xs, -0.1) : a.has("KeyY") ? t(fo, a.has("ShiftLeft") || a.has("ShiftRight") ? -0.1 : 0.1) : a.has("KeyC") && console.info("position=", t(ze).toArray(), "lookat=", t(He).toArray());
5697
5699
  });
5698
5700
  const r = (v) => {
5699
5701
  console.info(v.code), v.target.type !== "text" && (o || v.code === "F5" || (v.preventDefault(), a.add(v.code)));
@@ -5930,7 +5932,7 @@ var vt = Object.freeze({
5930
5932
  return (e - n) * t + n;
5931
5933
  }
5932
5934
  }
5933
- }, _o = (
5935
+ }, Ro = (
5934
5936
  /** @class */
5935
5937
  function() {
5936
5938
  function n() {
@@ -5943,7 +5945,7 @@ var vt = Object.freeze({
5943
5945
  /** @class */
5944
5946
  function() {
5945
5947
  function n(e, t) {
5946
- this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = vt.Linear.None, this._interpolationFunction = Ls.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = _o.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1, this._object = e, typeof t == "object" ? (this._group = t, t.add(this)) : t === !0 && (this._group = _s, _s.add(this));
5948
+ this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = vt.Linear.None, this._interpolationFunction = Ls.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = Ro.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1, this._object = e, typeof t == "object" ? (this._group = t, t.add(this)) : t === !0 && (this._group = _s, _s.add(this));
5947
5949
  }
5948
5950
  return n.prototype.getId = function() {
5949
5951
  return this._id;
@@ -6111,7 +6113,7 @@ var vt = Object.freeze({
6111
6113
  }, n.autoStartOnUpdate = !1, n;
6112
6114
  }()
6113
6115
  );
6114
- _o.nextId;
6116
+ Ro.nextId;
6115
6117
  var Ge = _s;
6116
6118
  Ge.getAll.bind(Ge);
6117
6119
  Ge.removeAll.bind(Ge);
@@ -6200,18 +6202,18 @@ class el extends pe {
6200
6202
  e.disposed || (e.disposed = !0, e.opts.scene.remove(e.css3dTag), e.splatMesh?.dispose(), e.meta = null, e.splatMesh = null, e.opts = null, e.css3dTag = null, e.mapViewer = null, e.metaMatrix = null);
6201
6203
  }
6202
6204
  }
6203
- class al extends Zo {
6205
+ class al extends $o {
6204
6206
  constructor(e = {}) {
6205
- console.info("Reall3dMapViewer", Fn), super(), this.clock = new $o(), this.updateTime = 0, this.disposed = !1;
6207
+ console.info("Reall3dMapViewer", Fn), super(), this.clock = new er(), this.updateTime = 0, this.disposed = !1;
6206
6208
  const t = this, s = new ei();
6207
6209
  t.events = s;
6208
6210
  const a = (r, c, h) => s.on(r, c, h), o = (r, ...c) => s.fire(r, ...c);
6209
6211
  t.tileMap = qA();
6210
6212
  const i = JA(e);
6211
- a(L, () => i), ni(s), ai(s), VA(s), To(s), t.camera = new Ia(60, 1, 0.01, 100), a(ge, () => t.camera), t.container = i.root, t.renderer = o(Ao), t.scene = o(lo), t.controls = o(uo), t.ambLight = new Sa(16777215, 1), t.scene.add(t.ambLight), t.dirLight = o(ho), t.scene.add(t.dirLight), t.scene.add(t.tileMap), t.container.appendChild(t.renderer.domElement), Lo(s), XA(s), window.addEventListener("resize", t.resize.bind(t)), t.resize(), t.renderer.setAnimationLoop(t.animate.bind(t)), Se && t.controls._dollyOut?.(0.75), a(_n, () => t.dispose()), a(
6213
+ a(L, () => i), ni(s), ai(s), VA(s), Lo(s), t.camera = new Ia(60, 1, 0.01, 100), a(ge, () => t.camera), t.container = i.root, t.renderer = o(lo), t.scene = o(uo), t.controls = o(ho), t.ambLight = new Sa(16777215, 1), t.scene.add(t.ambLight), t.dirLight = o(go), t.scene.add(t.dirLight), t.scene.add(t.tileMap), t.container.appendChild(t.renderer.domElement), _o(s), XA(s), window.addEventListener("resize", t.resize.bind(t)), t.resize(), t.renderer.setAnimationLoop(t.animate.bind(t)), Se && t.controls._dollyOut?.(0.75), a(_n, () => t.dispose()), a(
6212
6214
  bt,
6213
6215
  () => {
6214
- o(bn), t.controls.update(), o(fo), o(Rn);
6216
+ o(bn), t.controls.update(), o(po), o(Rn);
6215
6217
  },
6216
6218
  !0
6217
6219
  ), a(
@@ -6276,7 +6278,7 @@ class al extends Zo {
6276
6278
  if (e.disposed) return;
6277
6279
  e.disposed = !0;
6278
6280
  const t = e.renderer.domElement;
6279
- e.events.fire(Ks), e.events.fire(po), e.renderer.clear(), e.renderer.dispose(), e.events.clear(), e.scene = null, e.renderer = null, e.camera = null, e.controls = null, e.ambLight = null, e.dirLight = null, e.container.removeChild(t), e.container.classList.add("hidden"), e.container = null, e.clock = null, e.events = null, e.tileMap = null, document.querySelector("#gsviewer .debug.dev-panel")?.classList?.remove("map");
6281
+ e.events.fire(Ks), e.events.fire(mo), e.renderer.clear(), e.renderer.dispose(), e.events.clear(), e.scene = null, e.renderer = null, e.camera = null, e.controls = null, e.ambLight = null, e.dirLight = null, e.container.removeChild(t), e.container.classList.add("hidden"), e.container = null, e.clock = null, e.events = null, e.tileMap = null, document.querySelector("#gsviewer .debug.dev-panel")?.classList?.remove("map");
6280
6282
  }
6281
6283
  }
6282
6284
  export {