iflow-engine-base 3.10.7 → 3.10.9

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.
@@ -1,8 +1,8 @@
1
- import { n as Js, C as st, t as Zs, V as v, b as N, O as $s, W as en, M as J, Q as ge, a as tn, f as qt, j as De, B as sn, h as ft, r as it, aN as Ue, aO as Pt, aP as at, J as Et, aQ as ms, aR as yn, aS as xn, aT as In, aU as Tn, H as wn, aV as Bn, aW as En, l as lt, aX as As, aY as gs, aZ as vn, k as Cs, a_ as Fn, av as Je, as as Ss, D as Kt, ah as Dn, aM as ys, q as bn, v as We, a$ as qe, aA as xs, s as Mn, b0 as Rn, a7 as Pn, b1 as On, b2 as nn, aC as Is, b3 as kn, ad as Ln, b4 as Qe, b5 as mt, p as Hn } from "./three-vendor-CAbFcmaK.js";
2
- import { C as Un, r as zn } from "./sdk-runtime-DTY-QKTD.js";
3
- import { E as _n } from "./engine-2d-DsaDpJPQ.js";
4
- var Ne = /* @__PURE__ */ ((m) => (m.LoadStart = "gaussian-load-start", m.LoadProgress = "gaussian-load-progress", m.Loaded = "gaussian-loaded", m.LoadError = "gaussian-load-error", m.SceneRemoved = "gaussian-scene-removed", m.FpsUpdated = "gaussian-fps-updated", m.ViewChanged = "gaussian-view-changed", m))(Ne || {});
5
- class Qn {
1
+ import { n as Js, C as st, t as Zs, V as B, b as N, O as $s, W as en, M as J, Q as ge, a as tn, f as qt, j as be, B as sn, h as ft, r as it, aN as ze, aO as Pt, aP as at, J as vt, aQ as ms, aR as yn, aS as xn, aT as In, aU as Tn, H as wn, aV as En, aW as vn, l as lt, aX as As, aY as gs, aZ as Bn, k as Cs, a_ as Fn, av as Je, as as Ss, D as Kt, ah as bn, aM as ys, q as Dn, v as We, a$ as qe, aA as xs, s as Mn, b0 as Rn, a7 as Pn, b1 as On, b2 as nn, aC as Is, b3 as kn, ad as Ln, b4 as Ne, b5 as mt, p as Hn } from "./three-vendor-fDCVai2b.js";
2
+ import { C as Un, c as zn, r as _n } from "./sdk-runtime-CUsuUcES.js";
3
+ import { E as Qn } from "./engine-2d-DVhZzZy6.js";
4
+ var De = /* @__PURE__ */ ((m) => (m.LoadStart = "gaussian-load-start", m.LoadProgress = "gaussian-load-progress", m.Loaded = "gaussian-loaded", m.LoadError = "gaussian-load-error", m.SceneRemoved = "gaussian-scene-removed", m.FpsUpdated = "gaussian-fps-updated", m.ViewChanged = "gaussian-view-changed", m))(De || {});
5
+ class Nn {
6
6
  listeners = /* @__PURE__ */ new Map();
7
7
  on(e, s) {
8
8
  const t = String(e);
@@ -32,7 +32,7 @@ class Qn {
32
32
  this.clear();
33
33
  }
34
34
  }
35
- class Nn {
35
+ class Vn {
36
36
  scene;
37
37
  constructor(e) {
38
38
  this.scene = new Js(), e && (this.scene.background = new st(e));
@@ -47,7 +47,7 @@ class Nn {
47
47
  this.scene.clear(), this.scene.background = null, this.scene.environment = null;
48
48
  }
49
49
  }
50
- class Vn {
50
+ class Gn {
51
51
  camera;
52
52
  container;
53
53
  cameraUp;
@@ -57,7 +57,7 @@ class Vn {
57
57
  }
58
58
  createCamera(e) {
59
59
  const s = Math.max(this.container.clientWidth, 1), t = Math.max(this.container.clientHeight, 1), n = new Zs(65, s / t, 0.1, 5e3);
60
- return n.position.fromArray(e), n.up.fromArray(this.cameraUp).normalize(), n.lookAt(new v().fromArray(this.initialLookAt)), n.updateProjectionMatrix(), n;
60
+ return n.position.fromArray(e), n.up.fromArray(this.cameraUp).normalize(), n.lookAt(new B().fromArray(this.initialLookAt)), n.updateProjectionMatrix(), n;
61
61
  }
62
62
  getCamera() {
63
63
  return this.camera;
@@ -66,13 +66,13 @@ class Vn {
66
66
  this.camera.aspect = Math.max(e, 1) / Math.max(s, 1), this.camera.updateProjectionMatrix();
67
67
  }
68
68
  reset(e, s) {
69
- e && this.camera.position.fromArray(e), this.camera.lookAt(new v().fromArray(s ?? this.initialLookAt)), this.camera.updateMatrixWorld(!0);
69
+ e && this.camera.position.fromArray(e), this.camera.lookAt(new B().fromArray(s ?? this.initialLookAt)), this.camera.updateMatrixWorld(!0);
70
70
  }
71
71
  dispose() {
72
72
  this.camera = null;
73
73
  }
74
74
  }
75
- class _e {
75
+ class Qe {
76
76
  static idGen = 0;
77
77
  constructor(e, s) {
78
78
  let t, n;
@@ -84,13 +84,13 @@ class _e {
84
84
  }, a = (l) => {
85
85
  i(l);
86
86
  };
87
- e(o.bind(this), a.bind(this)), this.abortHandler = s, this.id = _e.idGen++;
87
+ e(o.bind(this), a.bind(this)), this.abortHandler = s, this.id = Qe.idGen++;
88
88
  }
89
89
  then(e) {
90
- return new _e((s, t) => {
90
+ return new Qe((s, t) => {
91
91
  this.promise = this.promise.then((...n) => {
92
92
  const r = e(...n);
93
- r instanceof Promise || r instanceof _e ? r.then((...i) => {
93
+ r instanceof Promise || r instanceof Qe ? r.then((...i) => {
94
94
  s(...i);
95
95
  }) : s(r);
96
96
  }).catch((n) => {
@@ -99,7 +99,7 @@ class _e {
99
99
  }, this.abortHandler);
100
100
  }
101
101
  catch(e) {
102
- return new _e((s) => {
102
+ return new Qe((s) => {
103
103
  this.promise = this.promise.then((...t) => {
104
104
  s(...t);
105
105
  }).catch(e);
@@ -129,9 +129,9 @@ const Ot = (function() {
129
129
  return function(s) {
130
130
  return m[0] = s, e[0];
131
131
  };
132
- })(), Gn = function(m, e) {
132
+ })(), Wn = function(m, e) {
133
133
  return m[e] + (m[e + 1] << 8) + (m[e + 2] << 16) + (m[e + 3] << 24);
134
- }, bt = function(m, e, s = !0, t) {
134
+ }, Dt = function(m, e, s = !0, t) {
135
135
  const n = new AbortController(), r = n.signal;
136
136
  let i = !1;
137
137
  const o = (c) => {
@@ -141,7 +141,7 @@ const Ot = (function() {
141
141
  const l = (c, d, u, h) => {
142
142
  e && !a && (e(c, d, u, h), c === 100 && (a = !0));
143
143
  };
144
- return new _e((c, d) => {
144
+ return new Qe((c, d) => {
145
145
  const u = { signal: r };
146
146
  t && (u.headers = t), fetch(m, u).then(async (h) => {
147
147
  if (!h.ok) {
@@ -164,8 +164,8 @@ const Ot = (function() {
164
164
  break;
165
165
  }
166
166
  p += x.length;
167
- let y, B;
168
- C !== void 0 && (y = p / C * 100, B = `${y.toFixed(2)}%`), s && g.push(x), l(y, B, x, C);
167
+ let y, E;
168
+ C !== void 0 && (y = p / C * 100, E = `${y.toFixed(2)}%`), s && g.push(x), l(y, E, x, C);
169
169
  } catch (x) {
170
170
  d(x);
171
171
  return;
@@ -182,7 +182,7 @@ const Ot = (function() {
182
182
  if (m.geometry && (m.geometry.dispose(), m.geometry = null), m.material && (m.material.dispose(), m.material = null), m.children)
183
183
  for (let e of m.children)
184
184
  Xe(e);
185
- }, ve = (m, e) => new Promise((s) => {
185
+ }, Be = (m, e) => new Promise((s) => {
186
186
  window.setTimeout(() => {
187
187
  s(m ? m() : void 0);
188
188
  }, e ? 1 : 50);
@@ -210,14 +210,14 @@ const Ot = (function() {
210
210
  let e, s;
211
211
  return m || (m = () => {
212
212
  }), {
213
- promise: new _e((n, r) => {
213
+ promise: new Qe((n, r) => {
214
214
  e = n, s = r;
215
215
  }, m),
216
216
  resolve: e,
217
217
  reject: s
218
218
  };
219
219
  };
220
- class Wn {
220
+ class qn {
221
221
  constructor(e, s, t) {
222
222
  this.major = e, this.minor = s, this.patch = t;
223
223
  }
@@ -232,7 +232,7 @@ function Yt() {
232
232
  function on() {
233
233
  if (Yt()) {
234
234
  const m = navigator.userAgent.match(/OS (\d+)_(\d+)_?(\d+)?/);
235
- return new Wn(
235
+ return new qn(
236
236
  parseInt(m[1] || 0, 10),
237
237
  parseInt(m[2] || 0, 10),
238
238
  parseInt(m[3] || 0, 10)
@@ -240,7 +240,7 @@ function on() {
240
240
  } else
241
241
  return null;
242
242
  }
243
- const qn = 14;
243
+ const Kn = 14;
244
244
  class P {
245
245
  static OFFSET = {
246
246
  X: 0,
@@ -283,7 +283,7 @@ class P {
283
283
  FRC23: 37
284
284
  };
285
285
  constructor(e = 0) {
286
- this.sphericalHarmonicsDegree = e, this.sphericalHarmonicsCount = $e(this.sphericalHarmonicsDegree), this.componentCount = this.sphericalHarmonicsCount + qn, this.defaultSphericalHarmonics = new Array(this.sphericalHarmonicsCount).fill(0), this.splats = [], this.splatCount = 0;
286
+ this.sphericalHarmonicsDegree = e, this.sphericalHarmonicsCount = $e(this.sphericalHarmonicsDegree), this.componentCount = this.sphericalHarmonicsCount + Kn, this.defaultSphericalHarmonics = new Array(this.sphericalHarmonicsCount).fill(0), this.splats = [], this.splatCount = 0;
287
287
  }
288
288
  static createSplat(e = 0) {
289
289
  const s = [0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0];
@@ -324,7 +324,7 @@ class Y {
324
324
  static ProgressiveLoadSectionDelayDuration = 15;
325
325
  static SphericalHarmonics8BitCompressionRange = 3;
326
326
  }
327
- const Kn = Y.SphericalHarmonics8BitCompressionRange, ze = Kn / 2, Ae = mt.toHalfFloat.bind(mt), Xt = mt.fromHalfFloat.bind(mt), re = (m, e, s = !1, t, n) => {
327
+ const jn = Y.SphericalHarmonics8BitCompressionRange, _e = jn / 2, Ae = mt.toHalfFloat.bind(mt), Xt = mt.fromHalfFloat.bind(mt), re = (m, e, s = !1, t, n) => {
328
328
  if (e === 0)
329
329
  return m;
330
330
  if (e === 1 || e === 2 && !s)
@@ -338,12 +338,12 @@ const Kn = Y.SphericalHarmonics8BitCompressionRange, ze = Kn / 2, Ae = mt.toHalf
338
338
  }, Jt = (m, e, s) => {
339
339
  const t = s - e;
340
340
  return m / 255 * t + e;
341
- }, an = (m, e, s) => ct(Xt(m, e, s)), jn = (m, e, s) => Ae(Jt(m, e, s)), K = (m, e, s, t = !1) => s === 0 ? m.getFloat32(e * 4, !0) : s === 1 || s === 2 && !t ? m.getUint16(e * 2, !0) : m.getUint8(e, !0), Yn = /* @__PURE__ */ (function() {
341
+ }, an = (m, e, s) => ct(Xt(m, e, s)), Yn = (m, e, s) => Ae(Jt(m, e, s)), K = (m, e, s, t = !1) => s === 0 ? m.getFloat32(e * 4, !0) : s === 1 || s === 2 && !t ? m.getUint16(e * 2, !0) : m.getUint8(e, !0), Xn = /* @__PURE__ */ (function() {
342
342
  const m = (e) => e;
343
343
  return function(e, s, t, n = !1) {
344
344
  if (s === t) return e;
345
345
  let r = m;
346
- return s === 2 && n ? t === 1 ? r = jn : t == 0 && (r = Jt) : s === 2 || s === 1 ? t === 0 ? r = Xt : t == 2 && (n ? r = an : r = m) : s === 0 && (t === 1 ? r = Ae : t == 2 && (n ? r = ct : r = Ae)), r(e);
346
+ return s === 2 && n ? t === 1 ? r = Yn : t == 0 && (r = Jt) : s === 2 || s === 1 ? t === 0 ? r = Xt : t == 2 && (n ? r = an : r = m) : s === 0 && (t === 1 ? r = Ae : t == 2 && (n ? r = ct : r = Ae)), r(e);
347
347
  };
348
348
  })(), je = (m, e, s, t, n = 0) => {
349
349
  const r = new Uint8Array(m, e), i = new Uint8Array(s, t);
@@ -468,7 +468,7 @@ class I {
468
468
  t && s.applyMatrix4(t);
469
469
  }
470
470
  getSplatScaleAndRotation = (function() {
471
- const e = new J(), s = new J(), t = new J(), n = new v(), r = new v(), i = new ge();
471
+ const e = new J(), s = new J(), t = new J(), n = new B(), r = new B(), i = new ge();
472
472
  return function(o, a, l, c, d) {
473
473
  const u = this.globalSplatIndexToSectionMap[o], h = this.sections[u], f = o - h.splatCountOffset, p = h.bytesPerSplat * f + I.CompressionLevels[this.compressionLevel].ScaleOffsetBytes, A = new DataView(this.bufferData, h.dataBase + p);
474
474
  r.set(
@@ -495,7 +495,7 @@ class I {
495
495
  fillSplatCenterArray(e, s, t, n, r) {
496
496
  const i = this.splatCount;
497
497
  t = t || 0, n = n || i - 1, r === void 0 && (r = t);
498
- const o = new v();
498
+ const o = new B();
499
499
  for (let a = t; a <= n; a++) {
500
500
  const l = this.globalSplatIndexToSectionMap[a], c = this.sections[l], d = a - c.splatCountOffset, u = (a - t + r) * I.CenterComponentCount, h = c.bytesPerSplat * d, f = new DataView(this.bufferData, c.dataBase + h), p = K(f, 0, this.compressionLevel), A = K(f, 1, this.compressionLevel), C = K(f, 2, this.compressionLevel);
501
501
  if (this.compressionLevel >= 1) {
@@ -507,37 +507,37 @@ class I {
507
507
  }
508
508
  }
509
509
  fillSplatScaleRotationArray = (function() {
510
- const e = new J(), s = new J(), t = new J(), n = new v(), r = new ge(), i = new v(), o = (a) => {
510
+ const e = new J(), s = new J(), t = new J(), n = new B(), r = new ge(), i = new B(), o = (a) => {
511
511
  const l = a.w < 0 ? -1 : 1;
512
512
  a.x *= l, a.y *= l, a.z *= l, a.w *= l;
513
513
  };
514
514
  return function(a, l, c, d, u, h, f, p) {
515
515
  const A = this.splatCount;
516
516
  d = d || 0, u = u || A - 1, h === void 0 && (h = d);
517
- const C = (g, x) => Yn(g, x, f);
517
+ const C = (g, x) => Xn(g, x, f);
518
518
  for (let g = d; g <= u; g++) {
519
- const x = this.globalSplatIndexToSectionMap[g], w = this.sections[x], y = g - w.splatCountOffset, B = w.bytesPerSplat * y + I.CompressionLevels[this.compressionLevel].ScaleOffsetBytes, S = (g - d + h) * I.ScaleComponentCount, E = (g - d + h) * I.RotationComponentCount, F = new DataView(this.bufferData, w.dataBase + B), b = p && p.x !== void 0 ? p.x : K(F, 0, this.compressionLevel), D = p && p.y !== void 0 ? p.y : K(F, 1, this.compressionLevel), R = p && p.z !== void 0 ? p.z : K(F, 2, this.compressionLevel), k = K(F, 3, this.compressionLevel), M = K(F, 4, this.compressionLevel), O = K(F, 5, this.compressionLevel), L = K(F, 6, this.compressionLevel);
519
+ const x = this.globalSplatIndexToSectionMap[g], w = this.sections[x], y = g - w.splatCountOffset, E = w.bytesPerSplat * y + I.CompressionLevels[this.compressionLevel].ScaleOffsetBytes, S = (g - d + h) * I.ScaleComponentCount, v = (g - d + h) * I.RotationComponentCount, F = new DataView(this.bufferData, w.dataBase + E), D = p && p.x !== void 0 ? p.x : K(F, 0, this.compressionLevel), b = p && p.y !== void 0 ? p.y : K(F, 1, this.compressionLevel), R = p && p.z !== void 0 ? p.z : K(F, 2, this.compressionLevel), k = K(F, 3, this.compressionLevel), M = K(F, 4, this.compressionLevel), O = K(F, 5, this.compressionLevel), L = K(F, 6, this.compressionLevel);
520
520
  n.set(
521
- re(b, this.compressionLevel),
522
521
  re(D, this.compressionLevel),
522
+ re(b, this.compressionLevel),
523
523
  re(R, this.compressionLevel)
524
524
  ), r.set(
525
525
  re(M, this.compressionLevel),
526
526
  re(O, this.compressionLevel),
527
527
  re(L, this.compressionLevel),
528
528
  re(k, this.compressionLevel)
529
- ).normalize(), c && (i.set(0, 0, 0), e.makeScale(n.x, n.y, n.z), s.makeRotationFromQuaternion(r), t.identity().premultiply(e).premultiply(s), t.premultiply(c), t.decompose(i, r, n), r.normalize()), o(r), a && (a[S] = C(n.x, 0), a[S + 1] = C(n.y, 0), a[S + 2] = C(n.z, 0)), l && (l[E] = C(r.x, 0), l[E + 1] = C(r.y, 0), l[E + 2] = C(r.z, 0), l[E + 3] = C(r.w, 0));
529
+ ).normalize(), c && (i.set(0, 0, 0), e.makeScale(n.x, n.y, n.z), s.makeRotationFromQuaternion(r), t.identity().premultiply(e).premultiply(s), t.premultiply(c), t.decompose(i, r, n), r.normalize()), o(r), a && (a[S] = C(n.x, 0), a[S + 1] = C(n.y, 0), a[S + 2] = C(n.z, 0)), l && (l[v] = C(r.x, 0), l[v + 1] = C(r.y, 0), l[v + 2] = C(r.z, 0), l[v + 3] = C(r.w, 0));
530
530
  }
531
531
  };
532
532
  })();
533
533
  static computeCovariance = (function() {
534
- const e = new J(), s = new Qe(), t = new Qe(), n = new Qe(), r = new Qe(), i = new Qe(), o = new Qe();
534
+ const e = new J(), s = new Ne(), t = new Ne(), n = new Ne(), r = new Ne(), i = new Ne(), o = new Ne();
535
535
  return function(a, l, c, d, u = 0, h) {
536
536
  e.makeScale(a.x, a.y, a.z), s.setFromMatrix4(e), e.makeRotationFromQuaternion(l), t.setFromMatrix4(e), n.copy(t).multiply(s), r.copy(n).transpose().premultiply(n), c && (i.setFromMatrix4(c), o.copy(i).transpose(), r.multiply(o), r.premultiply(i)), h >= 1 ? (d[u] = Ae(r.elements[0]), d[u + 1] = Ae(r.elements[3]), d[u + 2] = Ae(r.elements[6]), d[u + 3] = Ae(r.elements[4]), d[u + 4] = Ae(r.elements[7]), d[u + 5] = Ae(r.elements[8])) : (d[u] = r.elements[0], d[u + 1] = r.elements[3], d[u + 2] = r.elements[6], d[u + 3] = r.elements[4], d[u + 4] = r.elements[7], d[u + 5] = r.elements[8]);
537
537
  };
538
538
  })();
539
539
  fillSplatCovarianceArray(e, s, t, n, r, i) {
540
- const o = this.splatCount, a = new v(), l = new ge();
540
+ const o = this.splatCount, a = new B(), l = new ge();
541
541
  t = t || 0, n = n || o - 1, r === void 0 && (r = t);
542
542
  for (let c = t; c <= n; c++) {
543
543
  const d = this.globalSplatIndexToSectionMap[c], u = this.sections[d], h = c - u.splatCountOffset, f = (c - t + r) * I.CovarianceComponentCount, p = u.bytesPerSplat * h + I.CompressionLevels[this.compressionLevel].ScaleOffsetBytes, A = new DataView(this.bufferData, u.dataBase + p);
@@ -564,12 +564,12 @@ class I {
564
564
  }
565
565
  fillSphericalHarmonicsArray = (function() {
566
566
  for (let M = 0; M < 15; M++)
567
- new v();
568
- const e = new Qe(), s = new J(), t = new v(), n = new v(), r = new ge(), i = [], o = [], a = [], l = [], c = [], d = [], u = [], h = [], f = [], p = [], A = [], C = [], g = [], x = [], w = [], y = [], B = [], S = [], E = (M) => M, F = (M, O, L, U) => {
567
+ new B();
568
+ const e = new Ne(), s = new J(), t = new B(), n = new B(), r = new ge(), i = [], o = [], a = [], l = [], c = [], d = [], u = [], h = [], f = [], p = [], A = [], C = [], g = [], x = [], w = [], y = [], E = [], S = [], v = (M) => M, F = (M, O, L, U) => {
569
569
  M[0] = O, M[1] = L, M[2] = U;
570
- }, b = (M, O, L, U, _) => {
570
+ }, D = (M, O, L, U, _) => {
571
571
  M[0] = K(O, U, _, !0), M[1] = K(O, U + L, _, !0), M[2] = K(O, U + L + L, _, !0);
572
- }, D = (M, O) => {
572
+ }, b = (M, O) => {
573
573
  O[0] = M[0], O[1] = M[1], O[2] = M[2];
574
574
  }, R = (M, O, L, U) => {
575
575
  O[L] = U(M[0]), O[L + 1] = U(M[1]), O[L + 2] = U(M[2]);
@@ -582,10 +582,10 @@ class I {
582
582
  const Z = this.globalSplatIndexToSectionMap[se], G = this.sections[Z];
583
583
  O = Math.min(O, G.sphericalHarmonicsDegree);
584
584
  const X = $e(O), ce = se - G.splatCountOffset, de = G.bytesPerSplat * ce + I.CompressionLevels[this.compressionLevel].SphericalHarmonicsOffsetBytes, ie = new DataView(this.bufferData, G.dataBase + de), Se = (se - U + H) * X;
585
- let pe = L ? 0 : this.compressionLevel, ne = E;
585
+ let pe = L ? 0 : this.compressionLevel, ne = v;
586
586
  pe !== Q && (pe === 1 ? Q === 0 ? ne = Xt : Q == 2 && (ne = le) : pe === 0 && (Q === 1 ? ne = Ae : Q == 2 && (ne = V)));
587
587
  const fe = this.minSphericalHarmonicsCoeff, $ = this.maxSphericalHarmonicsCoeff;
588
- O >= 1 && (b(f, ie, 3, 0, this.compressionLevel), b(p, ie, 3, 1, this.compressionLevel), b(A, ie, 3, 2, this.compressionLevel), L ? (k(f, f, this.compressionLevel, fe, $), k(p, p, this.compressionLevel, fe, $), k(A, A, this.compressionLevel, fe, $), I.rotateSphericalHarmonics3(f, p, A, i, o, a, x, w, y)) : (D(f, x), D(p, w), D(A, y)), R(x, M, Se, ne), R(w, M, Se + 3, ne), R(y, M, Se + 6, ne), O >= 2 && (b(f, ie, 5, 9, this.compressionLevel), b(p, ie, 5, 10, this.compressionLevel), b(A, ie, 5, 11, this.compressionLevel), b(C, ie, 5, 12, this.compressionLevel), b(g, ie, 5, 13, this.compressionLevel), L ? (k(f, f, this.compressionLevel, fe, $), k(p, p, this.compressionLevel, fe, $), k(A, A, this.compressionLevel, fe, $), k(C, C, this.compressionLevel, fe, $), k(g, g, this.compressionLevel, fe, $), I.rotateSphericalHarmonics5(
588
+ O >= 1 && (D(f, ie, 3, 0, this.compressionLevel), D(p, ie, 3, 1, this.compressionLevel), D(A, ie, 3, 2, this.compressionLevel), L ? (k(f, f, this.compressionLevel, fe, $), k(p, p, this.compressionLevel, fe, $), k(A, A, this.compressionLevel, fe, $), I.rotateSphericalHarmonics3(f, p, A, i, o, a, x, w, y)) : (b(f, x), b(p, w), b(A, y)), R(x, M, Se, ne), R(w, M, Se + 3, ne), R(y, M, Se + 6, ne), O >= 2 && (D(f, ie, 5, 9, this.compressionLevel), D(p, ie, 5, 10, this.compressionLevel), D(A, ie, 5, 11, this.compressionLevel), D(C, ie, 5, 12, this.compressionLevel), D(g, ie, 5, 13, this.compressionLevel), L ? (k(f, f, this.compressionLevel, fe, $), k(p, p, this.compressionLevel, fe, $), k(A, A, this.compressionLevel, fe, $), k(C, C, this.compressionLevel, fe, $), k(g, g, this.compressionLevel, fe, $), I.rotateSphericalHarmonics5(
589
589
  f,
590
590
  p,
591
591
  A,
@@ -602,9 +602,9 @@ class I {
602
602
  x,
603
603
  w,
604
604
  y,
605
- B,
605
+ E,
606
606
  S
607
- )) : (D(f, x), D(p, w), D(A, y), D(C, B), D(g, S)), R(x, M, Se + 9, ne), R(w, M, Se + 12, ne), R(y, M, Se + 15, ne), R(B, M, Se + 18, ne), R(S, M, Se + 21, ne)));
607
+ )) : (b(f, x), b(p, w), b(A, y), b(C, E), b(g, S)), R(x, M, Se + 9, ne), R(w, M, Se + 12, ne), R(y, M, Se + 15, ne), R(E, M, Se + 18, ne), R(S, M, Se + 21, ne)));
608
608
  }
609
609
  };
610
610
  })();
@@ -625,11 +625,11 @@ class I {
625
625
  I.dot3(e, s, t, n, o), I.dot3(e, s, t, r, a), I.dot3(e, s, t, i, l);
626
626
  };
627
627
  static rotateSphericalHarmonics5 = (e, s, t, n, r, i, o, a, l, c, d, u, h, f, p, A, C, g) => {
628
- const x = Math.sqrt(0.25), w = Math.sqrt(3 / 4), y = Math.sqrt(1 / 3), B = Math.sqrt(4 / 3), S = Math.sqrt(1 / 12);
629
- l[0] = x * (a[2] * i[0] + a[0] * i[2] + (i[2] * a[0] + i[0] * a[2])), l[1] = a[1] * i[0] + i[1] * a[0], l[2] = w * (a[1] * i[1] + i[1] * a[1]), l[3] = a[1] * i[2] + i[1] * a[2], l[4] = x * (a[2] * i[2] - a[0] * i[0] + (i[2] * a[2] - i[0] * a[0])), I.dot5(e, s, t, n, r, l, f), c[0] = x * (o[2] * i[0] + o[0] * i[2] + (i[2] * o[0] + i[0] * o[2])), c[1] = o[1] * i[0] + i[1] * o[0], c[2] = w * (o[1] * i[1] + i[1] * o[1]), c[3] = o[1] * i[2] + i[1] * o[2], c[4] = x * (o[2] * i[2] - o[0] * i[0] + (i[2] * o[2] - i[0] * o[0])), I.dot5(e, s, t, n, r, c, p), d[0] = y * (o[2] * o[0] + o[0] * o[2]) + -S * (a[2] * a[0] + a[0] * a[2] + (i[2] * i[0] + i[0] * i[2])), d[1] = B * o[1] * o[0] + -y * (a[1] * a[0] + i[1] * i[0]), d[2] = o[1] * o[1] + -x * (a[1] * a[1] + i[1] * i[1]), d[3] = B * o[1] * o[2] + -y * (a[1] * a[2] + i[1] * i[2]), d[4] = y * (o[2] * o[2] - o[0] * o[0]) + -S * (a[2] * a[2] - a[0] * a[0] + (i[2] * i[2] - i[0] * i[0])), I.dot5(e, s, t, n, r, d, A), u[0] = x * (o[2] * a[0] + o[0] * a[2] + (a[2] * o[0] + a[0] * o[2])), u[1] = o[1] * a[0] + a[1] * o[0], u[2] = w * (o[1] * a[1] + a[1] * o[1]), u[3] = o[1] * a[2] + a[1] * o[2], u[4] = x * (o[2] * a[2] - o[0] * a[0] + (a[2] * o[2] - a[0] * o[0])), I.dot5(e, s, t, n, r, u, C), h[0] = x * (a[2] * a[0] + a[0] * a[2] - (i[2] * i[0] + i[0] * i[2])), h[1] = a[1] * a[0] - i[1] * i[0], h[2] = w * (a[1] * a[1] - i[1] * i[1]), h[3] = a[1] * a[2] - i[1] * i[2], h[4] = x * (a[2] * a[2] - a[0] * a[0] - (i[2] * i[2] - i[0] * i[0])), I.dot5(e, s, t, n, r, h, g);
628
+ const x = Math.sqrt(0.25), w = Math.sqrt(3 / 4), y = Math.sqrt(1 / 3), E = Math.sqrt(4 / 3), S = Math.sqrt(1 / 12);
629
+ l[0] = x * (a[2] * i[0] + a[0] * i[2] + (i[2] * a[0] + i[0] * a[2])), l[1] = a[1] * i[0] + i[1] * a[0], l[2] = w * (a[1] * i[1] + i[1] * a[1]), l[3] = a[1] * i[2] + i[1] * a[2], l[4] = x * (a[2] * i[2] - a[0] * i[0] + (i[2] * a[2] - i[0] * a[0])), I.dot5(e, s, t, n, r, l, f), c[0] = x * (o[2] * i[0] + o[0] * i[2] + (i[2] * o[0] + i[0] * o[2])), c[1] = o[1] * i[0] + i[1] * o[0], c[2] = w * (o[1] * i[1] + i[1] * o[1]), c[3] = o[1] * i[2] + i[1] * o[2], c[4] = x * (o[2] * i[2] - o[0] * i[0] + (i[2] * o[2] - i[0] * o[0])), I.dot5(e, s, t, n, r, c, p), d[0] = y * (o[2] * o[0] + o[0] * o[2]) + -S * (a[2] * a[0] + a[0] * a[2] + (i[2] * i[0] + i[0] * i[2])), d[1] = E * o[1] * o[0] + -y * (a[1] * a[0] + i[1] * i[0]), d[2] = o[1] * o[1] + -x * (a[1] * a[1] + i[1] * i[1]), d[3] = E * o[1] * o[2] + -y * (a[1] * a[2] + i[1] * i[2]), d[4] = y * (o[2] * o[2] - o[0] * o[0]) + -S * (a[2] * a[2] - a[0] * a[0] + (i[2] * i[2] - i[0] * i[0])), I.dot5(e, s, t, n, r, d, A), u[0] = x * (o[2] * a[0] + o[0] * a[2] + (a[2] * o[0] + a[0] * o[2])), u[1] = o[1] * a[0] + a[1] * o[0], u[2] = w * (o[1] * a[1] + a[1] * o[1]), u[3] = o[1] * a[2] + a[1] * o[2], u[4] = x * (o[2] * a[2] - o[0] * a[0] + (a[2] * o[2] - a[0] * o[0])), I.dot5(e, s, t, n, r, u, C), h[0] = x * (a[2] * a[0] + a[0] * a[2] - (i[2] * i[0] + i[0] * i[2])), h[1] = a[1] * a[0] - i[1] * i[0], h[2] = w * (a[1] * a[1] - i[1] * i[1]), h[3] = a[1] * a[2] - i[1] * i[2], h[4] = x * (a[2] * a[2] - a[0] * a[0] - (i[2] * i[2] - i[0] * i[0])), I.dot5(e, s, t, n, r, h, g);
630
630
  };
631
631
  static parseHeader(e) {
632
- const s = new Uint8Array(e, 0, I.HeaderSizeBytes), t = new Uint16Array(e, 0, I.HeaderSizeBytes / 2), n = new Uint32Array(e, 0, I.HeaderSizeBytes / 4), r = new Float32Array(e, 0, I.HeaderSizeBytes / 4), i = s[0], o = s[1], a = n[1], l = n[2], c = n[3], d = n[4], u = t[10], h = new v(r[6], r[7], r[8]), f = r[9] || -ze, p = r[10] || ze;
632
+ const s = new Uint8Array(e, 0, I.HeaderSizeBytes), t = new Uint16Array(e, 0, I.HeaderSizeBytes / 2), n = new Uint32Array(e, 0, I.HeaderSizeBytes / 4), r = new Float32Array(e, 0, I.HeaderSizeBytes / 4), i = s[0], o = s[1], a = n[1], l = n[2], c = n[3], d = n[4], u = t[10], h = new B(r[6], r[7], r[8]), f = r[9] || -_e, p = r[10] || _e;
633
633
  return {
634
634
  versionMajor: i,
635
635
  versionMinor: o,
@@ -649,13 +649,13 @@ class I {
649
649
  }
650
650
  static writeHeaderToBuffer(e, s) {
651
651
  const t = new Uint8Array(s, 0, I.HeaderSizeBytes), n = new Uint16Array(s, 0, I.HeaderSizeBytes / 2), r = new Uint32Array(s, 0, I.HeaderSizeBytes / 4), i = new Float32Array(s, 0, I.HeaderSizeBytes / 4);
652
- t[0] = e.versionMajor, t[1] = e.versionMinor, t[2] = 0, t[3] = 0, r[1] = e.maxSectionCount, r[2] = e.sectionCount, r[3] = e.maxSplatCount, r[4] = e.splatCount, n[10] = e.compressionLevel, i[6] = e.sceneCenter.x, i[7] = e.sceneCenter.y, i[8] = e.sceneCenter.z, i[9] = e.minSphericalHarmonicsCoeff || -ze, i[10] = e.maxSphericalHarmonicsCoeff || ze;
652
+ t[0] = e.versionMajor, t[1] = e.versionMinor, t[2] = 0, t[3] = 0, r[1] = e.maxSectionCount, r[2] = e.sectionCount, r[3] = e.maxSplatCount, r[4] = e.splatCount, n[10] = e.compressionLevel, i[6] = e.sceneCenter.x, i[7] = e.sceneCenter.y, i[8] = e.sceneCenter.z, i[9] = e.minSphericalHarmonicsCoeff || -_e, i[10] = e.maxSphericalHarmonicsCoeff || _e;
653
653
  }
654
654
  static parseSectionHeaders(e, s, t = 0, n) {
655
655
  const r = e.compressionLevel, i = e.maxSectionCount, o = new Uint16Array(s, t, i * I.SectionHeaderSizeBytes / 2), a = new Uint32Array(s, t, i * I.SectionHeaderSizeBytes / 4), l = new Float32Array(s, t, i * I.SectionHeaderSizeBytes / 4), c = [];
656
656
  let d = 0, u = d / 2, h = d / 4, f = I.HeaderSizeBytes + e.maxSectionCount * I.SectionHeaderSizeBytes, p = 0;
657
657
  for (let A = 0; A < i; A++) {
658
- const C = a[h + 1], g = a[h + 2], x = a[h + 3], w = l[h + 4], y = w / 2, B = o[u + 10], S = a[h + 6] || I.CompressionLevels[r].ScaleRange, E = a[h + 8], F = a[h + 9], b = F * 4, D = B * x + b, R = o[u + 20], { bytesPerSplat: k } = I.calculateComponentStorage(r, R), M = k * C, O = M + D, L = {
658
+ const C = a[h + 1], g = a[h + 2], x = a[h + 3], w = l[h + 4], y = w / 2, E = o[u + 10], S = a[h + 6] || I.CompressionLevels[r].ScaleRange, v = a[h + 8], F = a[h + 9], D = F * 4, b = E * x + D, R = o[u + 20], { bytesPerSplat: k } = I.calculateComponentStorage(r, R), M = k * C, O = M + b, L = {
659
659
  bytesPerSplat: k,
660
660
  splatCountOffset: p,
661
661
  splatCount: n ? C : 0,
@@ -664,16 +664,16 @@ class I {
664
664
  bucketCount: x,
665
665
  bucketBlockSize: w,
666
666
  halfBucketBlockSize: y,
667
- bucketStorageSizeBytes: B,
668
- bucketsStorageSizeBytes: D,
667
+ bucketStorageSizeBytes: E,
668
+ bucketsStorageSizeBytes: b,
669
669
  splatDataStorageSizeBytes: M,
670
670
  storageSizeBytes: O,
671
671
  compressionScaleRange: S,
672
672
  compressionScaleFactor: y / S,
673
673
  base: f,
674
- bucketsBase: f + b,
675
- dataBase: f + D,
676
- fullBucketCount: E,
674
+ bucketsBase: f + D,
675
+ dataBase: f + b,
676
+ fullBucketCount: v,
677
677
  partiallyFilledBucketCount: F,
678
678
  sphericalHarmonicsDegree: R
679
679
  };
@@ -692,7 +692,7 @@ class I {
692
692
  constructFromBuffer(e, s) {
693
693
  this.bufferData = e, this.globalSplatIndexToLocalSplatIndexMap = [], this.globalSplatIndexToSectionMap = [];
694
694
  const t = I.parseHeader(this.bufferData);
695
- this.versionMajor = t.versionMajor, this.versionMinor = t.versionMinor, this.maxSectionCount = t.maxSectionCount, this.sectionCount = s ? t.maxSectionCount : 0, this.maxSplatCount = t.maxSplatCount, this.splatCount = s ? t.maxSplatCount : 0, this.compressionLevel = t.compressionLevel, this.sceneCenter = new v().copy(t.sceneCenter), this.minSphericalHarmonicsCoeff = t.minSphericalHarmonicsCoeff, this.maxSphericalHarmonicsCoeff = t.maxSphericalHarmonicsCoeff, this.sections = I.parseSectionHeaders(t, this.bufferData, I.HeaderSizeBytes, s), this.linkBufferArrays(), this.buildMaps();
695
+ this.versionMajor = t.versionMajor, this.versionMinor = t.versionMinor, this.maxSectionCount = t.maxSectionCount, this.sectionCount = s ? t.maxSectionCount : 0, this.maxSplatCount = t.maxSplatCount, this.splatCount = s ? t.maxSplatCount : 0, this.compressionLevel = t.compressionLevel, this.sceneCenter = new B().copy(t.sceneCenter), this.minSphericalHarmonicsCoeff = t.minSphericalHarmonicsCoeff, this.maxSphericalHarmonicsCoeff = t.maxSphericalHarmonicsCoeff, this.sections = I.parseSectionHeaders(t, this.bufferData, I.HeaderSizeBytes, s), this.linkBufferArrays(), this.buildMaps();
696
696
  }
697
697
  static calculateComponentStorage(e, s) {
698
698
  const t = I.CompressionLevels[e].BytesPerCenter, n = I.CompressionLevels[e].BytesPerScale, r = I.CompressionLevels[e].BytesPerRotation, i = I.CompressionLevels[e].BytesPerColor, o = $e(s), a = I.CompressionLevels[e].BytesPerSphericalHarmonicsComponent * o, l = t + n + r + i + a;
@@ -739,7 +739,7 @@ class I {
739
739
  I.writeSectionHeaderSplatCountToBuffer(s, this.bufferData, t), this.sections[e].splatCount = s;
740
740
  }
741
741
  static writeSplatDataToSectionBuffer = (function() {
742
- const e = new ArrayBuffer(12), s = new ArrayBuffer(12), t = new ArrayBuffer(16), n = new ArrayBuffer(4), r = new ArrayBuffer(256), i = new ge(), o = new v(), a = new v(), {
742
+ const e = new ArrayBuffer(12), s = new ArrayBuffer(12), t = new ArrayBuffer(16), n = new ArrayBuffer(4), r = new ArrayBuffer(256), i = new ge(), o = new B(), a = new B(), {
743
743
  X: l,
744
744
  Y: c,
745
745
  Z: d,
@@ -753,85 +753,85 @@ class I {
753
753
  FDC0: x,
754
754
  FDC1: w,
755
755
  FDC2: y,
756
- OPACITY: B,
756
+ OPACITY: E,
757
757
  FRC0: S,
758
- FRC9: E
759
- } = P.OFFSET, F = (b, D, R) => {
758
+ FRC9: v
759
+ } = P.OFFSET, F = (D, b, R) => {
760
760
  const k = R * 2 + 1;
761
- return b = Math.round(b * D) + R, oe(b, 0, k);
761
+ return D = Math.round(D * b) + R, oe(D, 0, k);
762
762
  };
763
- return function(b, D, R, k, M, O, L, U, _ = -ze, H = ze) {
763
+ return function(D, b, R, k, M, O, L, U, _ = -_e, H = _e) {
764
764
  const Q = $e(M), ee = I.CompressionLevels[k].BytesPerCenter, le = I.CompressionLevels[k].BytesPerScale, V = I.CompressionLevels[k].BytesPerRotation, se = I.CompressionLevels[k].BytesPerColor, Z = R, G = Z + ee, X = G + le, ce = X + V, de = ce + se;
765
- if (b[p] !== void 0 ? (i.set(b[p], b[A], b[C], b[g]), i.normalize()) : i.set(1, 0, 0, 0), b[u] !== void 0 ? o.set(
766
- b[u] || 0,
767
- b[h] || 0,
768
- b[f] || 0
765
+ if (D[p] !== void 0 ? (i.set(D[p], D[A], D[C], D[g]), i.normalize()) : i.set(1, 0, 0, 0), D[u] !== void 0 ? o.set(
766
+ D[u] || 0,
767
+ D[h] || 0,
768
+ D[f] || 0
769
769
  ) : o.set(0, 0, 0), k === 0) {
770
- const Se = new Float32Array(D, Z, I.CenterComponentCount), pe = new Float32Array(D, X, I.RotationComponentCount), ne = new Float32Array(D, G, I.ScaleComponentCount);
771
- if (pe.set([i.x, i.y, i.z, i.w]), ne.set([o.x, o.y, o.z]), Se.set([b[l], b[c], b[d]]), M > 0) {
772
- const fe = new Float32Array(D, de, Q);
770
+ const Se = new Float32Array(b, Z, I.CenterComponentCount), pe = new Float32Array(b, X, I.RotationComponentCount), ne = new Float32Array(b, G, I.ScaleComponentCount);
771
+ if (pe.set([i.x, i.y, i.z, i.w]), ne.set([o.x, o.y, o.z]), Se.set([D[l], D[c], D[d]]), M > 0) {
772
+ const fe = new Float32Array(b, de, Q);
773
773
  if (M >= 1) {
774
- for (let $ = 0; $ < 9; $++) fe[$] = b[S + $] || 0;
774
+ for (let $ = 0; $ < 9; $++) fe[$] = D[S + $] || 0;
775
775
  if (M >= 2)
776
- for (let $ = 0; $ < 15; $++) fe[$ + 9] = b[E + $] || 0;
776
+ for (let $ = 0; $ < 15; $++) fe[$ + 9] = D[v + $] || 0;
777
777
  }
778
778
  }
779
779
  } else {
780
780
  const Se = new Uint16Array(e, 0, I.CenterComponentCount), pe = new Uint16Array(t, 0, I.RotationComponentCount), ne = new Uint16Array(s, 0, I.ScaleComponentCount);
781
- if (pe.set([Ae(i.x), Ae(i.y), Ae(i.z), Ae(i.w)]), ne.set([Ae(o.x), Ae(o.y), Ae(o.z)]), a.set(b[l], b[c], b[d]).sub(O), a.x = F(a.x, L, U), a.y = F(a.y, L, U), a.z = F(a.z, L, U), Se.set([a.x, a.y, a.z]), M > 0) {
781
+ if (pe.set([Ae(i.x), Ae(i.y), Ae(i.z), Ae(i.w)]), ne.set([Ae(o.x), Ae(o.y), Ae(o.z)]), a.set(D[l], D[c], D[d]).sub(O), a.x = F(a.x, L, U), a.y = F(a.y, L, U), a.z = F(a.z, L, U), Se.set([a.x, a.y, a.z]), M > 0) {
782
782
  const fe = k === 1 ? Uint16Array : Uint8Array, $ = k === 1 ? 2 : 1, Fe = new fe(r, 0, Q);
783
783
  if (M >= 1) {
784
784
  for (let Ce = 0; Ce < 9; Ce++) {
785
- const we = b[S + Ce] || 0;
785
+ const we = D[S + Ce] || 0;
786
786
  Fe[Ce] = k === 1 ? Ae(we) : ct(we, _, H);
787
787
  }
788
- const be = 9 * $;
789
- if (je(Fe.buffer, 0, D, de, be), M >= 2) {
788
+ const Me = 9 * $;
789
+ if (je(Fe.buffer, 0, b, de, Me), M >= 2) {
790
790
  for (let Ce = 0; Ce < 15; Ce++) {
791
- const we = b[E + Ce] || 0;
791
+ const we = D[v + Ce] || 0;
792
792
  Fe[Ce + 9] = k === 1 ? Ae(we) : ct(we, _, H);
793
793
  }
794
794
  je(
795
795
  Fe.buffer,
796
- be,
797
- D,
798
- de + be,
796
+ Me,
797
+ b,
798
+ de + Me,
799
799
  15 * $
800
800
  );
801
801
  }
802
802
  }
803
803
  }
804
- je(Se.buffer, 0, D, Z, 6), je(ne.buffer, 0, D, G, 6), je(pe.buffer, 0, D, X, 8);
804
+ je(Se.buffer, 0, b, Z, 6), je(ne.buffer, 0, b, G, 6), je(pe.buffer, 0, b, X, 8);
805
805
  }
806
806
  const ie = new Uint8ClampedArray(n, 0, 4);
807
- ie.set([b[x] || 0, b[w] || 0, b[y] || 0]), ie[3] = b[B] || 0, je(ie.buffer, 0, D, ce, 4);
807
+ ie.set([D[x] || 0, D[w] || 0, D[y] || 0]), ie[3] = D[E] || 0, je(ie.buffer, 0, b, ce, 4);
808
808
  };
809
809
  })();
810
810
  static generateFromUncompressedSplatArrays(e, s, t, n, r, i, o = []) {
811
811
  let a = 0;
812
812
  for (let y = 0; y < e.length; y++) {
813
- const B = e[y];
814
- a = Math.max(B.sphericalHarmonicsDegree, a);
813
+ const E = e[y];
814
+ a = Math.max(E.sphericalHarmonicsDegree, a);
815
815
  }
816
816
  let l, c;
817
817
  for (let y = 0; y < e.length; y++) {
818
- const B = e[y];
819
- for (let S = 0; S < B.splats.length; S++) {
820
- const E = B.splats[S];
821
- for (let F = P.OFFSET.FRC0; F < P.OFFSET.FRC23 && F < E.length; F++)
822
- (!l || E[F] < l) && (l = E[F]), (!c || E[F] > c) && (c = E[F]);
818
+ const E = e[y];
819
+ for (let S = 0; S < E.splats.length; S++) {
820
+ const v = E.splats[S];
821
+ for (let F = P.OFFSET.FRC0; F < P.OFFSET.FRC23 && F < v.length; F++)
822
+ (!l || v[F] < l) && (l = v[F]), (!c || v[F] > c) && (c = v[F]);
823
823
  }
824
824
  }
825
- l = l || -ze, c = c || ze;
825
+ l = l || -_e, c = c || _e;
826
826
  const { bytesPerSplat: d } = I.calculateComponentStorage(t, a), u = I.CompressionLevels[t].ScaleRange, h = [], f = [];
827
827
  let p = 0;
828
828
  for (let y = 0; y < e.length; y++) {
829
- const B = e[y], S = new P(a);
830
- for (let Z = 0; Z < B.splatCount; Z++) {
831
- const G = B.splats[Z];
829
+ const E = e[y], S = new P(a);
830
+ for (let Z = 0; Z < E.splatCount; Z++) {
831
+ const G = E.splats[Z];
832
832
  (G[P.OFFSET.OPACITY] || 0) >= s && S.addSplat(G);
833
833
  }
834
- const E = o[y] || {}, F = (E.blockSizeFactor || 1) * (r || I.BucketBlockSize), b = Math.ceil((E.bucketSizeFactor || 1) * (i || I.BucketSize)), D = I.computeBucketsForUncompressedSplatArray(S, F, b), R = D.fullBuckets.length, k = D.partiallyFullBuckets.map((Z) => Z.splats.length), M = k.length, O = [...D.fullBuckets, ...D.partiallyFullBuckets], L = S.splats.length * d, U = M * 4, _ = t >= 1 ? O.length * I.BucketStorageSizeBytes + U : 0, H = L + _, Q = new ArrayBuffer(H), ee = u / (F * 0.5), le = new v();
834
+ const v = o[y] || {}, F = (v.blockSizeFactor || 1) * (r || I.BucketBlockSize), D = Math.ceil((v.bucketSizeFactor || 1) * (i || I.BucketSize)), b = I.computeBucketsForUncompressedSplatArray(S, F, D), R = b.fullBuckets.length, k = b.partiallyFullBuckets.map((Z) => Z.splats.length), M = k.length, O = [...b.fullBuckets, ...b.partiallyFullBuckets], L = S.splats.length * d, U = M * 4, _ = t >= 1 ? O.length * I.BucketStorageSizeBytes + U : 0, H = L + _, Q = new ArrayBuffer(H), ee = u / (F * 0.5), le = new B();
835
835
  let V = 0;
836
836
  for (let Z = 0; Z < O.length; Z++) {
837
837
  const G = O[Z];
@@ -872,7 +872,7 @@ class I {
872
872
  I.writeSectionHeaderToBuffer({
873
873
  maxSplatCount: V,
874
874
  splatCount: V,
875
- bucketSize: b,
875
+ bucketSize: D,
876
876
  bucketCount: O.length,
877
877
  bucketBlockSize: F,
878
878
  compressionScaleRange: u,
@@ -906,7 +906,7 @@ class I {
906
906
  }
907
907
  static computeBucketsForUncompressedSplatArray(e, s, t) {
908
908
  let n = e.splatCount;
909
- const r = s / 2, i = new v(), o = new v();
909
+ const r = s / 2, i = new B(), o = new B();
910
910
  for (let p = 0; p < n; p++) {
911
911
  const A = e.splats[p], C = [
912
912
  A[P.OFFSET.X],
@@ -915,7 +915,7 @@ class I {
915
915
  ];
916
916
  (p === 0 || C[0] < i.x) && (i.x = C[0]), (p === 0 || C[0] > o.x) && (o.x = C[0]), (p === 0 || C[1] < i.y) && (i.y = C[1]), (p === 0 || C[1] > o.y) && (o.y = C[1]), (p === 0 || C[2] < i.z) && (i.z = C[2]), (p === 0 || C[2] > o.z) && (o.z = C[2]);
917
917
  }
918
- const a = new v().copy(o).sub(i), l = Math.ceil(a.y / s), c = Math.ceil(a.z / s), d = new v(), u = [], h = {};
918
+ const a = new B().copy(o).sub(i), l = Math.ceil(a.y / s), c = Math.ceil(a.z / s), d = new B(), u = [], h = {};
919
919
  for (let p = 0; p < n; p++) {
920
920
  const A = e.splats[p], C = [
921
921
  A[P.OFFSET.X],
@@ -924,11 +924,11 @@ class I {
924
924
  ], g = Math.floor((C[0] - i.x) / s), x = Math.floor((C[1] - i.y) / s), w = Math.floor((C[2] - i.z) / s);
925
925
  d.x = g * s + i.x + r, d.y = x * s + i.y + r, d.z = w * s + i.z + r;
926
926
  const y = g * (l * c) + x * c + w;
927
- let B = h[y];
928
- B || (h[y] = B = {
927
+ let E = h[y];
928
+ E || (h[y] = E = {
929
929
  splats: [],
930
930
  center: d.toArray()
931
- }), B.splats.push(p), B.splats.length >= t && (u.push(B), h[y] = null);
931
+ }), E.splats.push(p), E.splats.length >= t && (u.push(E), h[y] = null);
932
932
  }
933
933
  const f = [];
934
934
  for (let p in h)
@@ -951,7 +951,7 @@ class I {
951
951
  maxSplatCount: e,
952
952
  splatCount: e,
953
953
  compressionLevel: 0,
954
- sceneCenter: new v()
954
+ sceneCenter: new B()
955
955
  }, i), I.writeSectionHeaderToBuffer({
956
956
  maxSplatCount: e,
957
957
  splatCount: e,
@@ -978,15 +978,15 @@ const Ts = new Uint8Array([112, 108, 121, 10]), ws = new Uint8Array([10, 101, 11
978
978
  ["uint", Uint32Array],
979
979
  ["float", Float32Array],
980
980
  ["double", Float64Array]
981
- ]), Me = (m, e) => {
981
+ ]), Re = (m, e) => {
982
982
  const s = (1 << e) - 1;
983
983
  return (m & s) / s;
984
- }, Bs = (m, e) => {
985
- m.x = Me(e >>> 21, 11), m.y = Me(e >>> 11, 10), m.z = Me(e, 11);
986
- }, Xn = (m, e) => {
987
- m.x = Me(e >>> 24, 8), m.y = Me(e >>> 16, 8), m.z = Me(e >>> 8, 8), m.w = Me(e, 8);
984
+ }, Es = (m, e) => {
985
+ m.x = Re(e >>> 21, 11), m.y = Re(e >>> 11, 10), m.z = Re(e, 11);
988
986
  }, Jn = (m, e) => {
989
- const s = 1 / (Math.sqrt(2) * 0.5), t = (Me(e >>> 20, 10) - 0.5) * s, n = (Me(e >>> 10, 10) - 0.5) * s, r = (Me(e, 10) - 0.5) * s, i = Math.sqrt(1 - (t * t + n * n + r * r));
987
+ m.x = Re(e >>> 24, 8), m.y = Re(e >>> 16, 8), m.z = Re(e >>> 8, 8), m.w = Re(e, 8);
988
+ }, Zn = (m, e) => {
989
+ const s = 1 / (Math.sqrt(2) * 0.5), t = (Re(e >>> 20, 10) - 0.5) * s, n = (Re(e >>> 10, 10) - 0.5) * s, r = (Re(e, 10) - 0.5) * s, i = Math.sqrt(1 - (t * t + n * n + r * r));
990
990
  switch (e >>> 30) {
991
991
  case 0:
992
992
  m.set(i, t, n, r);
@@ -1001,7 +1001,7 @@ const Ts = new Uint8Array([112, 108, 121, 10]), ws = new Uint8Array([10, 101, 11
1001
1001
  m.set(t, n, r, i);
1002
1002
  break;
1003
1003
  }
1004
- }, Oe = (m, e, s) => m * (1 - s) + e * s, ae = (m, e) => m.properties.find((s) => s.name === e && s.storage)?.storage;
1004
+ }, ke = (m, e, s) => m * (1 - s) + e * s, ae = (m, e) => m.properties.find((s) => s.name === e && s.storage)?.storage;
1005
1005
  class W {
1006
1006
  static decodeHeaderText(e) {
1007
1007
  let s, t, n, r;
@@ -1161,7 +1161,7 @@ class W {
1161
1161
  static getElementStorageArrays(e, s, t) {
1162
1162
  const n = {};
1163
1163
  if (s) {
1164
- const r = ae(e, "min_r"), i = ae(e, "min_g"), o = ae(e, "min_b"), a = ae(e, "max_r"), l = ae(e, "max_g"), c = ae(e, "max_b"), d = ae(e, "min_x"), u = ae(e, "min_y"), h = ae(e, "min_z"), f = ae(e, "max_x"), p = ae(e, "max_y"), A = ae(e, "max_z"), C = ae(e, "min_scale_x"), g = ae(e, "min_scale_y"), x = ae(e, "min_scale_z"), w = ae(e, "max_scale_x"), y = ae(e, "max_scale_y"), B = ae(e, "max_scale_z"), S = ae(s, "packed_position"), E = ae(s, "packed_rotation"), F = ae(s, "packed_scale"), b = ae(s, "packed_color");
1164
+ const r = ae(e, "min_r"), i = ae(e, "min_g"), o = ae(e, "min_b"), a = ae(e, "max_r"), l = ae(e, "max_g"), c = ae(e, "max_b"), d = ae(e, "min_x"), u = ae(e, "min_y"), h = ae(e, "min_z"), f = ae(e, "max_x"), p = ae(e, "max_y"), A = ae(e, "max_z"), C = ae(e, "min_scale_x"), g = ae(e, "min_scale_y"), x = ae(e, "min_scale_z"), w = ae(e, "max_scale_x"), y = ae(e, "max_scale_y"), E = ae(e, "max_scale_z"), S = ae(s, "packed_position"), v = ae(s, "packed_rotation"), F = ae(s, "packed_scale"), D = ae(s, "packed_color");
1165
1165
  n.colorExtremes = {
1166
1166
  minR: r,
1167
1167
  maxR: a,
@@ -1182,8 +1182,8 @@ class W {
1182
1182
  minScaleY: g,
1183
1183
  maxScaleY: y,
1184
1184
  minScaleZ: x,
1185
- maxScaleZ: B
1186
- }, n.position = S, n.rotation = E, n.scale = F, n.color = b;
1185
+ maxScaleZ: E
1186
+ }, n.position = S, n.rotation = v, n.scale = F, n.color = D;
1187
1187
  }
1188
1188
  if (t) {
1189
1189
  const r = {};
@@ -1199,11 +1199,11 @@ class W {
1199
1199
  return n;
1200
1200
  }
1201
1201
  static decompressBaseSplat = (function() {
1202
- const e = new v(), s = new ge(), t = new v(), n = new qt(), r = P.OFFSET;
1202
+ const e = new B(), s = new ge(), t = new B(), n = new qt(), r = P.OFFSET;
1203
1203
  return function(i, o, a, l, c, d, u, h, f, p) {
1204
1204
  p = p || P.createSplat();
1205
1205
  const A = Math.floor((o + i) / 256);
1206
- return Bs(e, a[i]), Jn(s, u[i]), Bs(t, c[i]), Xn(n, f[i]), p[r.X] = Oe(l.minX[A], l.maxX[A], e.x), p[r.Y] = Oe(l.minY[A], l.maxY[A], e.y), p[r.Z] = Oe(l.minZ[A], l.maxZ[A], e.z), p[r.ROTATION0] = s.x, p[r.ROTATION1] = s.y, p[r.ROTATION2] = s.z, p[r.ROTATION3] = s.w, p[r.SCALE0] = Math.exp(Oe(d.minScaleX[A], d.maxScaleX[A], t.x)), p[r.SCALE1] = Math.exp(Oe(d.minScaleY[A], d.maxScaleY[A], t.y)), p[r.SCALE2] = Math.exp(Oe(d.minScaleZ[A], d.maxScaleZ[A], t.z)), h.minR && h.maxR ? p[r.FDC0] = oe(Math.round(Oe(h.minR[A], h.maxR[A], n.x) * 255), 0, 255) : p[r.FDC0] = oe(Math.floor(n.x * 255), 0, 255), h.minG && h.maxG ? p[r.FDC1] = oe(Math.round(Oe(h.minG[A], h.maxG[A], n.y) * 255), 0, 255) : p[r.FDC1] = oe(Math.floor(n.y * 255), 0, 255), h.minB && h.maxB ? p[r.FDC2] = oe(Math.round(Oe(h.minB[A], h.maxB[A], n.z) * 255), 0, 255) : p[r.FDC2] = oe(Math.floor(n.z * 255), 0, 255), p[r.OPACITY] = oe(Math.floor(n.w * 255), 0, 255), p;
1206
+ return Es(e, a[i]), Zn(s, u[i]), Es(t, c[i]), Jn(n, f[i]), p[r.X] = ke(l.minX[A], l.maxX[A], e.x), p[r.Y] = ke(l.minY[A], l.maxY[A], e.y), p[r.Z] = ke(l.minZ[A], l.maxZ[A], e.z), p[r.ROTATION0] = s.x, p[r.ROTATION1] = s.y, p[r.ROTATION2] = s.z, p[r.ROTATION3] = s.w, p[r.SCALE0] = Math.exp(ke(d.minScaleX[A], d.maxScaleX[A], t.x)), p[r.SCALE1] = Math.exp(ke(d.minScaleY[A], d.maxScaleY[A], t.y)), p[r.SCALE2] = Math.exp(ke(d.minScaleZ[A], d.maxScaleZ[A], t.z)), h.minR && h.maxR ? p[r.FDC0] = oe(Math.round(ke(h.minR[A], h.maxR[A], n.x) * 255), 0, 255) : p[r.FDC0] = oe(Math.floor(n.x * 255), 0, 255), h.minG && h.maxG ? p[r.FDC1] = oe(Math.round(ke(h.minG[A], h.maxG[A], n.y) * 255), 0, 255) : p[r.FDC1] = oe(Math.floor(n.y * 255), 0, 255), h.minB && h.maxB ? p[r.FDC2] = oe(Math.round(ke(h.minB[A], h.maxB[A], n.z) * 255), 0, 255) : p[r.FDC2] = oe(Math.floor(n.z * 255), 0, 255), p[r.OPACITY] = oe(Math.floor(n.w * 255), 0, 255), p;
1207
1207
  };
1208
1208
  })();
1209
1209
  static decompressSphericalHarmonics = /* @__PURE__ */ (function() {
@@ -1399,7 +1399,7 @@ const Ie = {
1399
1399
  ts,
1400
1400
  ss,
1401
1401
  ns
1402
- ] = [0, 1, 2, 3, 4, 5, 6], Es = {
1402
+ ] = [0, 1, 2, 3, 4, 5, 6], vs = {
1403
1403
  double: ln,
1404
1404
  int: Zt,
1405
1405
  uint: $t,
@@ -1407,7 +1407,7 @@ const Ie = {
1407
1407
  short: ts,
1408
1408
  ushort: ss,
1409
1409
  uchar: ns
1410
- }, Zn = {
1410
+ }, $n = {
1411
1411
  [ln]: 8,
1412
1412
  [Zt]: 4,
1413
1413
  [$t]: 4,
@@ -1433,8 +1433,8 @@ class q {
1433
1433
  const x = g.split(" ");
1434
1434
  let w = 0;
1435
1435
  for (let y of x) {
1436
- const B = y.trim();
1437
- B.length > 0 && (w++, w === 2 ? l = B : w === 3 && (o = parseInt(B)));
1436
+ const E = y.trim();
1437
+ E.length > 0 && (w++, w === 2 ? l = E : w === 3 && (o = parseInt(E)));
1438
1438
  }
1439
1439
  }
1440
1440
  else if (g.startsWith("property")) {
@@ -1442,10 +1442,10 @@ class q {
1442
1442
  if (x) {
1443
1443
  const w = x[2], y = x[3];
1444
1444
  u.push(y);
1445
- const B = s[y];
1445
+ const E = s[y];
1446
1446
  h[y] = w;
1447
- const S = Es[w];
1448
- B !== void 0 && (c.push(B), d[B] = S);
1447
+ const S = vs[w];
1448
+ E !== void 0 && (c.push(E), d[E] = S);
1449
1449
  }
1450
1450
  }
1451
1451
  if (g === q.HeaderEndToken) {
@@ -1462,7 +1462,7 @@ class q {
1462
1462
  const x = s[C];
1463
1463
  x !== void 0 && (f[x] = p);
1464
1464
  }
1465
- p += Zn[Es[g]];
1465
+ p += $n[vs[g]];
1466
1466
  }
1467
1467
  const A = q.decodeSphericalHarmonicsFromSectionHeader(u, s);
1468
1468
  return {
@@ -1607,9 +1607,8 @@ const cn = [
1607
1607
  "green",
1608
1608
  "blue",
1609
1609
  "f_rest_0"
1610
- ], $n = cn.map((m, e) => e), [
1611
- vs,
1612
- er,
1610
+ ], er = cn.map((m, e) => e), [
1611
+ Bs,
1613
1612
  tr,
1614
1613
  sr,
1615
1614
  nr,
@@ -1618,15 +1617,16 @@ const cn = [
1618
1617
  ir,
1619
1618
  ar,
1620
1619
  lr,
1621
- Fs,
1622
1620
  cr,
1621
+ Fs,
1623
1622
  dr,
1624
- Ds,
1625
- bs,
1626
1623
  hr,
1624
+ bs,
1625
+ Ds,
1627
1626
  ur,
1628
- pr
1629
- ] = $n;
1627
+ pr,
1628
+ fr
1629
+ ] = er;
1630
1630
  class xe {
1631
1631
  static decodeHeaderLines(e) {
1632
1632
  let s = 0;
@@ -1713,21 +1713,21 @@ class xe {
1713
1713
  const s = new ge(), t = P.OFFSET.X, n = P.OFFSET.Y, r = P.OFFSET.Z, i = P.OFFSET.SCALE0, o = P.OFFSET.SCALE1, a = P.OFFSET.SCALE2, l = P.OFFSET.ROTATION0, c = P.OFFSET.ROTATION1, d = P.OFFSET.ROTATION2, u = P.OFFSET.ROTATION3, h = P.OFFSET.FDC0, f = P.OFFSET.FDC1, p = P.OFFSET.FDC2, A = P.OFFSET.OPACITY, C = [];
1714
1714
  for (let g = 0; g < 45; g++)
1715
1715
  C[g] = P.OFFSET.FRC0 + g;
1716
- return function(g, x, w, y = 0, B = 0) {
1717
- B = Math.min(B, w.sphericalHarmonicsDegree), xe.readSplat(g, w, x, y, e);
1718
- const S = P.createSplat(B);
1719
- if (e[vs] !== void 0 ? (S[i] = Math.exp(e[vs]), S[o] = Math.exp(e[er]), S[a] = Math.exp(e[tr])) : (S[i] = 0.01, S[o] = 0.01, S[a] = 0.01), e[Fs] !== void 0) {
1720
- const E = 0.28209479177387814;
1721
- S[h] = (0.5 + E * e[Fs]) * 255, S[f] = (0.5 + E * e[cr]) * 255, S[p] = (0.5 + E * e[dr]) * 255;
1722
- } else e[bs] !== void 0 ? (S[h] = e[bs] * 255, S[f] = e[hr] * 255, S[p] = e[ur] * 255) : (S[h] = 0, S[f] = 0, S[p] = 0);
1723
- if (e[Ds] !== void 0 && (S[A] = 1 / (1 + Math.exp(-e[Ds])) * 255), S[h] = oe(Math.floor(S[h]), 0, 255), S[f] = oe(Math.floor(S[f]), 0, 255), S[p] = oe(Math.floor(S[p]), 0, 255), S[A] = oe(Math.floor(S[A]), 0, 255), B >= 1 && e[pr] !== void 0) {
1724
- for (let E = 0; E < 9; E++)
1725
- S[C[E]] = e[w.sphericalHarmonicsDegree1Fields[E]];
1726
- if (B >= 2)
1727
- for (let E = 0; E < 15; E++)
1728
- S[C[9 + E]] = e[w.sphericalHarmonicsDegree2Fields[E]];
1716
+ return function(g, x, w, y = 0, E = 0) {
1717
+ E = Math.min(E, w.sphericalHarmonicsDegree), xe.readSplat(g, w, x, y, e);
1718
+ const S = P.createSplat(E);
1719
+ if (e[Bs] !== void 0 ? (S[i] = Math.exp(e[Bs]), S[o] = Math.exp(e[tr]), S[a] = Math.exp(e[sr])) : (S[i] = 0.01, S[o] = 0.01, S[a] = 0.01), e[Fs] !== void 0) {
1720
+ const v = 0.28209479177387814;
1721
+ S[h] = (0.5 + v * e[Fs]) * 255, S[f] = (0.5 + v * e[dr]) * 255, S[p] = (0.5 + v * e[hr]) * 255;
1722
+ } else e[Ds] !== void 0 ? (S[h] = e[Ds] * 255, S[f] = e[ur] * 255, S[p] = e[pr] * 255) : (S[h] = 0, S[f] = 0, S[p] = 0);
1723
+ if (e[bs] !== void 0 && (S[A] = 1 / (1 + Math.exp(-e[bs])) * 255), S[h] = oe(Math.floor(S[h]), 0, 255), S[f] = oe(Math.floor(S[f]), 0, 255), S[p] = oe(Math.floor(S[p]), 0, 255), S[A] = oe(Math.floor(S[A]), 0, 255), E >= 1 && e[fr] !== void 0) {
1724
+ for (let v = 0; v < 9; v++)
1725
+ S[C[v]] = e[w.sphericalHarmonicsDegree1Fields[v]];
1726
+ if (E >= 2)
1727
+ for (let v = 0; v < 15; v++)
1728
+ S[C[9 + v]] = e[w.sphericalHarmonicsDegree2Fields[v]];
1729
1729
  }
1730
- return s.set(e[sr], e[nr], e[rr], e[or]), s.normalize(), S[l] = s.x, S[c] = s.y, S[d] = s.z, S[u] = s.w, S[t] = e[ir], S[n] = e[ar], S[r] = e[lr], S;
1730
+ return s.set(e[nr], e[rr], e[or], e[ir]), s.normalize(), S[l] = s.x, S[c] = s.y, S[d] = s.z, S[u] = s.w, S[t] = e[ar], S[n] = e[lr], S[r] = e[cr], S;
1731
1731
  };
1732
1732
  })();
1733
1733
  static readSplat(e, s, t, n, r) {
@@ -1773,11 +1773,11 @@ const dn = [
1773
1773
  "rotation_im"
1774
1774
  ], St = dn.map((m, e) => e), [
1775
1775
  yt,
1776
- fr,
1777
1776
  mr,
1777
+ Ar,
1778
1778
  Rs,
1779
1779
  xt,
1780
- Ar,
1780
+ gr,
1781
1781
  Ut
1782
1782
  ] = [0, 1, 4, 16, 17, 18, 19], hn = [
1783
1783
  "scale_0",
@@ -1845,7 +1845,6 @@ const dn = [
1845
1845
  "f_rest_45"
1846
1846
  ], Gt = hn.map((m, e) => e), [
1847
1847
  Ps,
1848
- gr,
1849
1848
  Cr,
1850
1849
  Sr,
1851
1850
  yr,
@@ -1853,16 +1852,17 @@ const dn = [
1853
1852
  Ir,
1854
1853
  Tr,
1855
1854
  wr,
1856
- Br,
1855
+ Er,
1856
+ vr,
1857
1857
  Wt,
1858
1858
  un,
1859
1859
  pn,
1860
1860
  Os
1861
- ] = Gt, ks = Wt, Er = un, vr = pn, It = (m) => {
1861
+ ] = Gt, ks = Wt, Br = un, Fr = pn, It = (m) => {
1862
1862
  const e = (31744 & m) >> 10, s = 1023 & m;
1863
1863
  return (m >> 15 ? -1 : 1) * (e ? e === 31 ? s ? NaN : 1 / 0 : Math.pow(2, e - 15) * (1 + s / 1024) : s / 1024 * 6103515625e-14);
1864
1864
  };
1865
- class Ee {
1865
+ class ve {
1866
1866
  static decodeSectionHeadersFromHeaderLines(e) {
1867
1867
  const s = Gt.reduce((c, d) => (c[hn[d]] = d, c), {}), t = St.reduce((c, d) => (c[dn[d]] = d, c), {}), n = q.getHeaderSectionNames(e);
1868
1868
  let r;
@@ -1879,7 +1879,7 @@ class Ee {
1879
1879
  }
1880
1880
  static decodeSectionHeadersFromHeaderText(e) {
1881
1881
  const s = q.convertHeaderTextToLines(e);
1882
- return Ee.decodeSectionHeadersFromHeaderLines(s);
1882
+ return ve.decodeSectionHeadersFromHeaderLines(s);
1883
1883
  }
1884
1884
  static getSplatCountFromSectionHeaders(e) {
1885
1885
  let s = 0;
@@ -1888,7 +1888,7 @@ class Ee {
1888
1888
  return s;
1889
1889
  }
1890
1890
  static decodeHeaderFromHeaderText(e) {
1891
- const s = e.indexOf(q.HeaderEndToken) + q.HeaderEndToken.length + 1, t = Ee.decodeSectionHeadersFromHeaderText(e), n = Ee.getSplatCountFromSectionHeaders(t);
1891
+ const s = e.indexOf(q.HeaderEndToken) + q.HeaderEndToken.length + 1, t = ve.decodeSectionHeadersFromHeaderText(e), n = ve.getSplatCountFromSectionHeaders(t);
1892
1892
  return {
1893
1893
  headerSizeBytes: s,
1894
1894
  sectionHeaders: t,
@@ -1897,7 +1897,7 @@ class Ee {
1897
1897
  }
1898
1898
  static decodeHeaderFromBuffer(e) {
1899
1899
  const s = q.readHeaderFromBuffer(e);
1900
- return Ee.decodeHeaderFromHeaderText(s);
1900
+ return ve.decodeHeaderFromHeaderText(s);
1901
1901
  }
1902
1902
  static findVertexData(e, s, t) {
1903
1903
  let n = s.headerSizeBytes;
@@ -1930,7 +1930,7 @@ class Ee {
1930
1930
  r = Math.min(r, t.sphericalHarmonicsDegree);
1931
1931
  const i = new P(r);
1932
1932
  for (let o = 0; o < s; o++) {
1933
- const a = Ee.parseToUncompressedSplat(
1933
+ const a = ve.parseToUncompressedSplat(
1934
1934
  e,
1935
1935
  o,
1936
1936
  t,
@@ -1947,41 +1947,41 @@ class Ee {
1947
1947
  const s = new ge(), t = P.OFFSET.X, n = P.OFFSET.Y, r = P.OFFSET.Z, i = P.OFFSET.SCALE0, o = P.OFFSET.SCALE1, a = P.OFFSET.SCALE2, l = P.OFFSET.ROTATION0, c = P.OFFSET.ROTATION1, d = P.OFFSET.ROTATION2, u = P.OFFSET.ROTATION3, h = P.OFFSET.FDC0, f = P.OFFSET.FDC1, p = P.OFFSET.FDC2, A = P.OFFSET.OPACITY, C = [];
1948
1948
  for (let g = 0; g < 45; g++)
1949
1949
  C[g] = P.OFFSET.FRC0 + g;
1950
- return function(g, x, w, y, B = 0, S = 0) {
1951
- S = Math.min(S, w.sphericalHarmonicsDegree), Ee.readSplat(g, w, x, B, e);
1952
- const E = P.createSplat(S);
1953
- if (e[Ps] !== void 0 ? (E[i] = y[xt][e[Ps]], E[o] = y[xt][e[gr]], E[a] = y[xt][e[Cr]]) : (E[i] = 0.01, E[o] = 0.01, E[a] = 0.01), e[Wt] !== void 0 ? (E[h] = y[yt][e[Wt]], E[f] = y[yt][e[un]], E[p] = y[yt][e[pn]]) : e[ks] !== void 0 ? (E[h] = e[ks] * 255, E[f] = e[Er] * 255, E[p] = e[vr] * 255) : (E[h] = 0, E[f] = 0, E[p] = 0), e[Os] !== void 0 && (E[A] = y[Rs][e[Os]]), E[h] = oe(Math.floor(E[h]), 0, 255), E[f] = oe(Math.floor(E[f]), 0, 255), E[p] = oe(Math.floor(E[p]), 0, 255), E[A] = oe(Math.floor(E[A]), 0, 255), S >= 1 && w.sphericalHarmonicsDegree >= 1) {
1950
+ return function(g, x, w, y, E = 0, S = 0) {
1951
+ S = Math.min(S, w.sphericalHarmonicsDegree), ve.readSplat(g, w, x, E, e);
1952
+ const v = P.createSplat(S);
1953
+ if (e[Ps] !== void 0 ? (v[i] = y[xt][e[Ps]], v[o] = y[xt][e[Cr]], v[a] = y[xt][e[Sr]]) : (v[i] = 0.01, v[o] = 0.01, v[a] = 0.01), e[Wt] !== void 0 ? (v[h] = y[yt][e[Wt]], v[f] = y[yt][e[un]], v[p] = y[yt][e[pn]]) : e[ks] !== void 0 ? (v[h] = e[ks] * 255, v[f] = e[Br] * 255, v[p] = e[Fr] * 255) : (v[h] = 0, v[f] = 0, v[p] = 0), e[Os] !== void 0 && (v[A] = y[Rs][e[Os]]), v[h] = oe(Math.floor(v[h]), 0, 255), v[f] = oe(Math.floor(v[f]), 0, 255), v[p] = oe(Math.floor(v[p]), 0, 255), v[A] = oe(Math.floor(v[A]), 0, 255), S >= 1 && w.sphericalHarmonicsDegree >= 1) {
1954
1954
  for (let k = 0; k < 9; k++) {
1955
- const M = y[fr + k % 3];
1956
- E[C[k]] = M[e[w.sphericalHarmonicsDegree1Fields[k]]];
1955
+ const M = y[mr + k % 3];
1956
+ v[C[k]] = M[e[w.sphericalHarmonicsDegree1Fields[k]]];
1957
1957
  }
1958
1958
  if (S >= 2 && w.sphericalHarmonicsDegree >= 2)
1959
1959
  for (let k = 0; k < 15; k++) {
1960
- const M = y[mr + k % 5];
1961
- E[C[9 + k]] = M[e[w.sphericalHarmonicsDegree2Fields[k]]];
1960
+ const M = y[Ar + k % 5];
1961
+ v[C[9 + k]] = M[e[w.sphericalHarmonicsDegree2Fields[k]]];
1962
1962
  }
1963
1963
  }
1964
- const F = y[Ar][e[Sr]], b = y[Ut][e[yr]], D = y[Ut][e[xr]], R = y[Ut][e[Ir]];
1965
- return s.set(F, b, D, R), s.normalize(), E[l] = s.x, E[c] = s.y, E[d] = s.z, E[u] = s.w, E[t] = It(e[Tr]), E[n] = It(e[wr]), E[r] = It(e[Br]), E;
1964
+ const F = y[gr][e[yr]], D = y[Ut][e[xr]], b = y[Ut][e[Ir]], R = y[Ut][e[Tr]];
1965
+ return s.set(F, D, b, R), s.normalize(), v[l] = s.x, v[c] = s.y, v[d] = s.z, v[u] = s.w, v[t] = It(e[wr]), v[n] = It(e[Er]), v[r] = It(e[vr]), v;
1966
1966
  };
1967
1967
  })();
1968
1968
  static readSplat(e, s, t, n, r) {
1969
1969
  return q.readVertex(e, s, t, n, Gt, r, !1);
1970
1970
  }
1971
1971
  static parseToUncompressedSplatArray(e, s = 0) {
1972
- const t = [], n = Ee.decodeHeaderFromBuffer(e, s);
1972
+ const t = [], n = ve.decodeHeaderFromBuffer(e, s);
1973
1973
  let r;
1974
1974
  for (let o = 0; o < n.sectionHeaders.length; o++) {
1975
1975
  const a = n.sectionHeaders[o];
1976
1976
  if (a.sectionName === "codebook_centers") {
1977
- const l = Ee.findVertexData(e, n, o);
1978
- r = Ee.decodeCodeBook(l, a);
1977
+ const l = ve.findVertexData(e, n, o);
1978
+ r = ve.decodeCodeBook(l, a);
1979
1979
  }
1980
1980
  }
1981
1981
  for (let o = 0; o < n.sectionHeaders.length; o++) {
1982
1982
  const a = n.sectionHeaders[o];
1983
1983
  if (a.sectionName !== "codebook_centers") {
1984
- const l = a.vertexCount, c = Ee.findVertexData(e, n, o), d = Ee.decodeSectionSplatData(
1984
+ const l = a.vertexCount, c = ve.findVertexData(e, n, o), d = ve.decodeSectionSplatData(
1985
1985
  c,
1986
1986
  l,
1987
1987
  a,
@@ -2006,7 +2006,7 @@ class Ls {
2006
2006
  if (t === Ie.INRIAV1)
2007
2007
  return xe.parseToUncompressedSplatArray(e, s);
2008
2008
  if (t === Ie.INRIAV2)
2009
- return Ee.parseToUncompressedSplatArray(e, s);
2009
+ return ve.parseToUncompressedSplatArray(e, s);
2010
2010
  }
2011
2011
  static parseToUncompressedSplatBuffer(e, s = 0) {
2012
2012
  const t = q.determineHeaderFormatFromPlyBuffer(e);
@@ -2041,11 +2041,11 @@ class rs {
2041
2041
  parameters: s
2042
2042
  };
2043
2043
  }
2044
- static getStandardPartitioner(e = 0, s = new v(), t = I.BucketBlockSize, n = I.BucketSize) {
2044
+ static getStandardPartitioner(e = 0, s = new B(), t = I.BucketBlockSize, n = I.BucketSize) {
2045
2045
  const r = (i) => {
2046
2046
  const o = P.OFFSET.X, a = P.OFFSET.Y, l = P.OFFSET.Z;
2047
2047
  e <= 0 && (e = i.splatCount);
2048
- const c = new v(), d = 0.5, u = (C) => {
2048
+ const c = new B(), d = 0.5, u = (C) => {
2049
2049
  C.x = Math.floor(C.x / d) * d, C.y = Math.floor(C.y / d) * d, C.z = Math.floor(C.z / d) * d;
2050
2050
  };
2051
2051
  i.splats.forEach((C) => {
@@ -2076,7 +2076,7 @@ class rs {
2076
2076
  }
2077
2077
  class At {
2078
2078
  constructor(e, s, t, n, r, i, o) {
2079
- this.splatPartitioner = e, this.alphaRemovalThreshold = s, this.compressionLevel = t, this.sectionSize = n, this.sceneCenter = r ? new v().copy(r) : void 0, this.blockSize = i, this.bucketSize = o;
2079
+ this.splatPartitioner = e, this.alphaRemovalThreshold = s, this.compressionLevel = t, this.sectionSize = n, this.sceneCenter = r ? new B().copy(r) : void 0, this.blockSize = i, this.bucketSize = o;
2080
2080
  }
2081
2081
  generateFromUncompressedSplatArray(e) {
2082
2082
  const s = this.splatPartitioner.partitionUncompressedSplatArray(e);
@@ -2090,7 +2090,7 @@ class At {
2090
2090
  s.parameters
2091
2091
  );
2092
2092
  }
2093
- static getStandardGenerator(e = 1, s = 1, t = 0, n = new v(), r = I.BucketBlockSize, i = I.BucketSize) {
2093
+ static getStandardGenerator(e = 1, s = 1, t = 0, n = new B(), r = I.BucketBlockSize, i = I.BucketSize) {
2094
2094
  const o = rs.getStandardPartitioner(t, n, r, i);
2095
2095
  return new At(
2096
2096
  o,
@@ -2108,7 +2108,7 @@ const ue = {
2108
2108
  Processing: 1,
2109
2109
  Done: 2
2110
2110
  };
2111
- class vt extends Error {
2111
+ class Bt extends Error {
2112
2112
  constructor(e) {
2113
2113
  super(e);
2114
2114
  }
@@ -2135,14 +2135,14 @@ function Us(m, e, s, t, n, r, i, o) {
2135
2135
  r,
2136
2136
  i,
2137
2137
  o
2138
- ).generateFromUncompressedSplatArray(m) : I.generateFromUncompressedSplatArrays([m], s, 0, new v());
2138
+ ).generateFromUncompressedSplatArray(m) : I.generateFromUncompressedSplatArrays([m], s, 0, new B());
2139
2139
  }
2140
2140
  class os {
2141
2141
  static loadFromURL(e, s, t, n, r, i, o = !0, a = 0, l, c, d, u, h) {
2142
2142
  let f;
2143
2143
  !t && !o ? f = te.DownloadBeforeProcessing : o ? f = te.ProgressiveToSplatArray : f = te.ProgressiveToSplatBuffer;
2144
2144
  const p = Y.ProgressiveLoadSectionSize, A = I.HeaderSizeBytes + I.SectionHeaderSizeBytes, C = 1;
2145
- let g, x, w, y, B, S = 0, E = 0, F = 0, b = !1, D = !1, R = !1;
2145
+ let g, x, w, y, E, S = 0, v = 0, F = 0, D = !1, b = !1, R = !1;
2146
2146
  const k = jt();
2147
2147
  let M = 0, O = 0, L = 0, U = 0, _ = "", H = null, Q = [], ee;
2148
2148
  const le = new TextDecoder(), V = (se, Z, G) => {
@@ -2155,27 +2155,27 @@ class os {
2155
2155
  }), L += G.byteLength), f === te.DownloadBeforeProcessing)
2156
2156
  X && k.resolve(Q);
2157
2157
  else {
2158
- if (b) {
2159
- if (g === Ie.PlayCanvasCompressed && !D) {
2158
+ if (D) {
2159
+ if (g === Ie.PlayCanvasCompressed && !b) {
2160
2160
  const ce = H.headerSizeBytes + H.chunkElement.storageSizeBytes;
2161
- B = Hs(Q, B), B.byteLength >= ce && (W.readElementData(
2161
+ E = Hs(Q, E), E.byteLength >= ce && (W.readElementData(
2162
2162
  H.chunkElement,
2163
- B,
2163
+ E,
2164
2164
  H.headerSizeBytes
2165
- ), M = ce, O = ce, D = !0);
2165
+ ), M = ce, O = ce, b = !0);
2166
2166
  }
2167
2167
  } else if (_ += le.decode(G), q.checkTextForEndHeader(_)) {
2168
2168
  if (g = q.determineHeaderFormatFromHeaderText(_), g === Ie.INRIAV1)
2169
- H = xe.decodeHeaderText(_), a = Math.min(a, H.sphericalHarmonicsDegree), S = H.splatCount, D = !0, U = H.headerSizeBytes + H.bytesPerSplat * S;
2169
+ H = xe.decodeHeaderText(_), a = Math.min(a, H.sphericalHarmonicsDegree), S = H.splatCount, b = !0, U = H.headerSizeBytes + H.bytesPerSplat * S;
2170
2170
  else if (g === Ie.PlayCanvasCompressed) {
2171
2171
  if (H = W.decodeHeaderText(_), a = Math.min(a, H.sphericalHarmonicsDegree), f === te.ProgressiveToSplatBuffer && a > 0)
2172
- throw new vt(
2172
+ throw new Bt(
2173
2173
  "PlyLoader.loadFromURL() -> Selected PLY format has spherical harmonics data that cannot be progressively loaded."
2174
2174
  );
2175
2175
  S = H.vertexElement.count, U = H.headerSizeBytes + H.bytesPerSplat * S + H.chunkElement.storageSizeBytes;
2176
2176
  } else {
2177
2177
  if (f === te.ProgressiveToSplatBuffer)
2178
- throw new vt(
2178
+ throw new Bt(
2179
2179
  "PlyLoader.loadFromURL() -> Selected PLY format cannot be progressively loaded."
2180
2180
  );
2181
2181
  f = te.DownloadBeforeProcessing;
@@ -2191,13 +2191,13 @@ class os {
2191
2191
  maxSplatCount: S,
2192
2192
  splatCount: 0,
2193
2193
  compressionLevel: 0,
2194
- sceneCenter: new v()
2194
+ sceneCenter: new B()
2195
2195
  }, w);
2196
2196
  } else
2197
2197
  ee = new P(a);
2198
- M = H.headerSizeBytes, O = H.headerSizeBytes, b = !0;
2198
+ M = H.headerSizeBytes, O = H.headerSizeBytes, D = !0;
2199
2199
  }
2200
- if (b && D && Q.length > 0 && (x = Hs(Q, x), L - M > p || L >= U && !R || X)) {
2200
+ if (D && b && Q.length > 0 && (x = Hs(Q, x), L - M > p || L >= U && !R || X)) {
2201
2201
  const de = R ? H.sphericalHarmonicsPerSplat : H.bytesPerSplat, Se = (R ? L : Math.min(U, L)) - O, pe = Math.floor(Se / de), ne = pe * de, fe = L - O - ne, $ = O - Q[0].startBytes, Fe = new DataView(x, $, ne);
2202
2202
  if (R)
2203
2203
  g === Ie.PlayCanvasCompressed && f === te.ProgressiveToSplatArray && (W.parseSphericalHarmonicsToUncompressedSplatArraySection(
@@ -2213,13 +2213,13 @@ class os {
2213
2213
  ), F += pe);
2214
2214
  else {
2215
2215
  if (f === te.ProgressiveToSplatBuffer) {
2216
- const be = I.CompressionLevels[0].SphericalHarmonicsDegrees[a], Ce = E * be.BytesPerSplat + A;
2216
+ const Me = I.CompressionLevels[0].SphericalHarmonicsDegrees[a], Ce = v * Me.BytesPerSplat + A;
2217
2217
  g === Ie.PlayCanvasCompressed ? W.parseToUncompressedSplatBufferSection(
2218
2218
  H.chunkElement,
2219
2219
  H.vertexElement,
2220
2220
  0,
2221
2221
  pe - 1,
2222
- E,
2222
+ v,
2223
2223
  Fe,
2224
2224
  w,
2225
2225
  Ce
@@ -2239,7 +2239,7 @@ class os {
2239
2239
  H.vertexElement,
2240
2240
  0,
2241
2241
  pe - 1,
2242
- E,
2242
+ v,
2243
2243
  Fe,
2244
2244
  ee
2245
2245
  ) : xe.parseToUncompressedSplatArraySection(
@@ -2251,9 +2251,9 @@ class os {
2251
2251
  ee,
2252
2252
  a
2253
2253
  );
2254
- E += pe, f === te.ProgressiveToSplatBuffer && (y || (I.writeSectionHeaderToBuffer({
2254
+ v += pe, f === te.ProgressiveToSplatBuffer && (y || (I.writeSectionHeaderToBuffer({
2255
2255
  maxSplatCount: S,
2256
- splatCount: E,
2256
+ splatCount: v,
2257
2257
  bucketSize: 0,
2258
2258
  bucketCount: 0,
2259
2259
  bucketBlockSize: 0,
@@ -2262,17 +2262,17 @@ class os {
2262
2262
  fullBucketCount: 0,
2263
2263
  partiallyFilledBucketCount: 0,
2264
2264
  sphericalHarmonicsDegree: a
2265
- }, 0, w, I.HeaderSizeBytes), y = new I(w, !1)), y.updateLoadedCounts(1, E)), L >= U && (R = !0);
2265
+ }, 0, w, I.HeaderSizeBytes), y = new I(w, !1)), y.updateLoadedCounts(1, v)), L >= U && (R = !0);
2266
2266
  }
2267
2267
  if (fe === 0)
2268
2268
  Q = [];
2269
2269
  else {
2270
- let be = [], Ce = 0;
2270
+ let Me = [], Ce = 0;
2271
2271
  for (let we = Q.length - 1; we >= 0; we--) {
2272
- const Le = Q[we];
2273
- if (Ce += Le.sizeBytes, be.unshift(Le), Ce >= fe) break;
2272
+ const He = Q[we];
2273
+ if (Ce += He.sizeBytes, Me.unshift(He), Ce >= fe) break;
2274
2274
  }
2275
- Q = be;
2275
+ Q = Me;
2276
2276
  }
2277
2277
  M += p, O += ne;
2278
2278
  }
@@ -2280,7 +2280,7 @@ class os {
2280
2280
  }
2281
2281
  s && s(se, Z, ue.Downloading);
2282
2282
  };
2283
- return s && s(0, "0%", ue.Downloading), bt(e, V, !1, l).then(() => (s && s(0, "0%", ue.Processing), k.promise.then((se) => {
2283
+ return s && s(0, "0%", ue.Downloading), Dt(e, V, !1, l).then(() => (s && s(0, "0%", ue.Processing), k.promise.then((se) => {
2284
2284
  if (s && s(100, "100%", ue.Done), f === te.DownloadBeforeProcessing) {
2285
2285
  const Z = Q.map((G) => G.data);
2286
2286
  return new Blob(Z).arrayBuffer().then((G) => os.loadFromFileData(
@@ -2294,7 +2294,7 @@ class os {
2294
2294
  u,
2295
2295
  h
2296
2296
  ));
2297
- } else return f === te.ProgressiveToSplatBuffer ? se : ve(() => Us(
2297
+ } else return f === te.ProgressiveToSplatBuffer ? se : Be(() => Us(
2298
2298
  se,
2299
2299
  o,
2300
2300
  r,
@@ -2307,7 +2307,7 @@ class os {
2307
2307
  })));
2308
2308
  }
2309
2309
  static loadFromFileData(e, s, t, n, r = 0, i, o, a, l) {
2310
- return n ? ve(() => Ls.parseToUncompressedSplatArray(e, r)).then((c) => Us(
2310
+ return n ? Be(() => Ls.parseToUncompressedSplatArray(e, r)).then((c) => Us(
2311
2311
  c,
2312
2312
  n,
2313
2313
  s,
@@ -2316,33 +2316,33 @@ class os {
2316
2316
  o,
2317
2317
  a,
2318
2318
  l
2319
- )) : ve(() => Ls.parseToUncompressedSplatBuffer(e, r));
2319
+ )) : Be(() => Ls.parseToUncompressedSplatBuffer(e, r));
2320
2320
  }
2321
2321
  }
2322
- const Fr = (m) => new ReadableStream({
2322
+ const br = (m) => new ReadableStream({
2323
2323
  async start(e) {
2324
2324
  e.enqueue(m), e.close();
2325
2325
  }
2326
2326
  });
2327
2327
  async function Dr(m) {
2328
2328
  try {
2329
- const e = Fr(m);
2329
+ const e = br(m);
2330
2330
  if (!e) throw new Error("Failed to create stream from data");
2331
- return await br(e);
2331
+ return await Mr(e);
2332
2332
  } catch (e) {
2333
2333
  throw console.error("Error decompressing gzipped data:", e), e;
2334
2334
  }
2335
2335
  }
2336
- async function br(m) {
2336
+ async function Mr(m) {
2337
2337
  const e = m.pipeThrough(new DecompressionStream("gzip")), t = await new Response(e).arrayBuffer();
2338
2338
  return new Uint8Array(t);
2339
2339
  }
2340
- const Mr = 1347635022, Rr = 1, Pr = 0.15;
2341
- function Or(m) {
2340
+ const Rr = 1347635022, Pr = 1, Or = 0.15;
2341
+ function kr(m) {
2342
2342
  const e = m >> 15 & 1, s = m >> 10 & 31, t = m & 1023, n = e === 1 ? -1 : 1;
2343
2343
  return s === 0 ? n * Math.pow(2, -14) * t / 1024 : s === 31 ? t !== 0 ? NaN : n * (1 / 0) : n * Math.pow(2, s - 15) * (1 + t / 1024);
2344
2344
  }
2345
- function kr(m) {
2345
+ function Lr(m) {
2346
2346
  return (m - 128) / 128;
2347
2347
  }
2348
2348
  function Ve(m) {
@@ -2359,7 +2359,7 @@ function Ve(m) {
2359
2359
  return console.error(`[SPZ: ERROR] Unsupported SH degree: ${m}`), 0;
2360
2360
  }
2361
2361
  }
2362
- const Lr = (function() {
2362
+ const Hr = (function() {
2363
2363
  let m = [];
2364
2364
  const e = new ge(), s = P.OFFSET.X, t = P.OFFSET.Y, n = P.OFFSET.Z, r = P.OFFSET.SCALE0, i = P.OFFSET.SCALE1, o = P.OFFSET.SCALE2, a = P.OFFSET.ROTATION0, l = P.OFFSET.ROTATION1, c = P.OFFSET.ROTATION2, d = P.OFFSET.ROTATION3, u = P.OFFSET.FDC0, h = P.OFFSET.FDC1, f = P.OFFSET.FDC2, p = P.OFFSET.OPACITY, A = [Ve(0), Ve(1), Ve(2), Ve(3)], C = [
2365
2365
  0,
@@ -2412,22 +2412,22 @@ const Lr = (function() {
2412
2412
  w = Math.min(x, w);
2413
2413
  const y = P.createSplat(w);
2414
2414
  g.scale[0] !== void 0 ? (y[r] = g.scale[0], y[i] = g.scale[1], y[o] = g.scale[2]) : (y[r] = 0.01, y[i] = 0.01, y[o] = 0.01), g.color[0] !== void 0 ? (y[u] = g.color[0], y[h] = g.color[1], y[f] = g.color[2]) : m[RED] !== void 0 ? (y[u] = m[RED] * 255, y[h] = m[GREEN] * 255, y[f] = m[BLUE] * 255) : (y[u] = 0, y[h] = 0, y[f] = 0), g.alpha !== void 0 && (y[p] = g.alpha), y[u] = oe(Math.floor(y[u]), 0, 255), y[h] = oe(Math.floor(y[h]), 0, 255), y[f] = oe(Math.floor(y[f]), 0, 255), y[p] = oe(Math.floor(y[p]), 0, 255);
2415
- let B = A[w], S = A[x];
2416
- for (let E = 0; E < 3; ++E)
2415
+ let E = A[w], S = A[x];
2416
+ for (let v = 0; v < 3; ++v)
2417
2417
  for (let F = 0; F < 15; ++F) {
2418
- const b = C[E * 15 + F];
2419
- F < B && F < S && (y[P.OFFSET.FRC0 + b] = g.sh[E * S + F]);
2418
+ const D = C[v * 15 + F];
2419
+ F < E && F < S && (y[P.OFFSET.FRC0 + D] = g.sh[v * S + F]);
2420
2420
  }
2421
2421
  return e.set(g.rotation[3], g.rotation[0], g.rotation[1], g.rotation[2]), e.normalize(), y[a] = e.x, y[l] = e.y, y[c] = e.z, y[d] = e.w, y[s] = g.position[0], y[t] = g.position[1], y[n] = g.position[2], y;
2422
2422
  };
2423
2423
  })();
2424
- function Hr(m, e, s, t) {
2424
+ function Ur(m, e, s, t) {
2425
2425
  return !(m.positions.length !== e * 3 * (t ? 2 : 3) || m.scales.length !== e * 3 || m.rotations.length !== e * 3 || m.alphas.length !== e || m.colors.length !== e * 3 || m.sh.length !== e * s * 3);
2426
2426
  }
2427
2427
  function zs(m, e, s, t, n) {
2428
2428
  e = Math.min(e, m.shDegree);
2429
2429
  const r = m.numPoints, i = Ve(m.shDegree), o = m.positions.length === r * 3 * 2;
2430
- if (!Hr(m, r, i, o))
2430
+ if (!Ur(m, r, i, o))
2431
2431
  return null;
2432
2432
  const a = {
2433
2433
  position: [],
@@ -2443,7 +2443,7 @@ function zs(m, e, s, t, n) {
2443
2443
  for (let h = 0; h < r; h++) {
2444
2444
  if (o)
2445
2445
  for (let g = 0; g < 3; g++)
2446
- a.position[g] = Or(l[h * 3 + g]);
2446
+ a.position[g] = kr(l[h * 3 + g]);
2447
2447
  else
2448
2448
  for (let g = 0; g < 3; g++) {
2449
2449
  const x = h * 9 + g * 3;
@@ -2461,11 +2461,11 @@ function zs(m, e, s, t, n) {
2461
2461
  const A = p[0] * p[0] + p[1] * p[1] + p[2] * p[2];
2462
2462
  a.rotation[3] = Math.sqrt(Math.max(0, 1 - A)), a.alpha = Math.floor(m.alphas[h]);
2463
2463
  for (let g = 0; g < 3; g++)
2464
- a.color[g] = Math.floor(((m.colors[h * 3 + g] / 255 - 0.5) / Pr * u + 0.5) * 255);
2464
+ a.color[g] = Math.floor(((m.colors[h * 3 + g] / 255 - 0.5) / Or * u + 0.5) * 255);
2465
2465
  for (let g = 0; g < 3; g++)
2466
2466
  for (let x = 0; x < d; x++)
2467
- a.sh[g * d + x] = kr(m.sh[d * 3 * h + x * 3 + g]);
2468
- const C = Lr(a, m.shDegree, e);
2467
+ a.sh[g * d + x] = Lr(m.sh[d * 3 * h + x * 3 + g]);
2468
+ const C = Hr(a, m.shDegree, e);
2469
2469
  if (s) {
2470
2470
  const g = I.CompressionLevels[0].SphericalHarmonicsDegrees[e].BytesPerSplat, x = h * g + n;
2471
2471
  I.writeSplatDataToSectionBuffer(C, t, x, 0, e);
@@ -2473,8 +2473,8 @@ function zs(m, e, s, t, n) {
2473
2473
  t.addSplat(C);
2474
2474
  }
2475
2475
  }
2476
- const Ur = 16, zr = 1e7;
2477
- function _r(m) {
2476
+ const zr = 16, _r = 1e7;
2477
+ function Qr(m) {
2478
2478
  const e = new DataView(m);
2479
2479
  let s = 0;
2480
2480
  const t = {
@@ -2486,11 +2486,11 @@ function _r(m) {
2486
2486
  flags: e.getUint8(s + 14),
2487
2487
  reserved: e.getUint8(s + 15)
2488
2488
  };
2489
- if (s += Ur, t.magic !== Mr)
2489
+ if (s += zr, t.magic !== Rr)
2490
2490
  return console.error("[SPZ ERROR] deserializePackedGaussians: header not found"), null;
2491
2491
  if (t.version < 1 || t.version > 2)
2492
2492
  return console.error(`[SPZ ERROR] deserializePackedGaussians: version not supported: ${t.version}`), null;
2493
- if (t.numPoints > zr)
2493
+ if (t.numPoints > _r)
2494
2494
  return console.error(`[SPZ ERROR] deserializePackedGaussians: Too many points: ${t.numPoints}`), null;
2495
2495
  if (t.shDegree > 3)
2496
2496
  return console.error(`[SPZ ERROR] deserializePackedGaussians: Unsupported SH degree: ${t.shDegree}`), null;
@@ -2498,7 +2498,7 @@ function _r(m) {
2498
2498
  numPoints: n,
2499
2499
  shDegree: t.shDegree,
2500
2500
  fractionalBits: t.fractionalBits,
2501
- antialiased: (t.flags & Rr) !== 0,
2501
+ antialiased: (t.flags & Pr) !== 0,
2502
2502
  positions: new Uint8Array(n * 3 * (i ? 2 : 3)),
2503
2503
  scales: new Uint8Array(n * 3),
2504
2504
  rotations: new Uint8Array(n * 3),
@@ -2516,17 +2516,17 @@ function _r(m) {
2516
2516
  }
2517
2517
  return o;
2518
2518
  }
2519
- async function Qr(m) {
2519
+ async function Nr(m) {
2520
2520
  try {
2521
2521
  const e = await Dr(m);
2522
- return _r(e.buffer);
2522
+ return Qr(e.buffer);
2523
2523
  } catch (e) {
2524
2524
  return console.error("[SPZ ERROR] loadSpzPacked: decompression error", e), null;
2525
2525
  }
2526
2526
  }
2527
2527
  class is {
2528
2528
  static loadFromURL(e, s, t, n, r = !0, i = 0, o, a, l, c, d) {
2529
- return s && s(0, "0%", ue.Downloading), bt(e, s, !0, o).then((u) => (s && s(0, "0%", ue.Processing), is.loadFromFileData(
2529
+ return s && s(0, "0%", ue.Downloading), Dt(e, s, !0, o).then((u) => (s && s(0, "0%", ue.Processing), is.loadFromFileData(
2530
2530
  u,
2531
2531
  t,
2532
2532
  n,
@@ -2539,8 +2539,8 @@ class is {
2539
2539
  )));
2540
2540
  }
2541
2541
  static async loadFromFileData(e, s, t, n, r = 0, i, o, a, l) {
2542
- await ve();
2543
- const c = await Qr(e);
2542
+ await Be();
2543
+ const c = await Nr(e);
2544
2544
  r = Math.min(c.shDegree, r);
2545
2545
  const d = new P(r);
2546
2546
  if (n)
@@ -2577,8 +2577,8 @@ class j {
2577
2577
  (A[0] - 128) / 128
2578
2578
  );
2579
2579
  C.normalize();
2580
- const g = d * c + i, x = new Float32Array(r, g, 3), w = new Float32Array(r, g + o, 3), y = new Float32Array(r, g + o + a, 4), B = new Uint8Array(r, g + o + a + l, 4);
2581
- x[0] = h[0], x[1] = h[1], x[2] = h[2], w[0] = f[0], w[1] = f[1], w[2] = f[2], y[0] = C.w, y[1] = C.x, y[2] = C.y, y[3] = C.z, B[0] = p[0], B[1] = p[1], B[2] = p[2], B[3] = p[3];
2580
+ const g = d * c + i, x = new Float32Array(r, g, 3), w = new Float32Array(r, g + o, 3), y = new Float32Array(r, g + o + a, 4), E = new Uint8Array(r, g + o + a + l, 4);
2581
+ x[0] = h[0], x[1] = h[1], x[2] = h[2], w[0] = f[0], w[1] = f[1], w[2] = f[2], y[0] = C.w, y[1] = C.x, y[2] = C.y, y[3] = C.z, E[0] = p[0], E[1] = p[1], E[2] = p[2], E[3] = p[3];
2582
2582
  }
2583
2583
  }
2584
2584
  static parseToUncompressedSplatArraySection(e, s, t, n, r) {
@@ -2644,25 +2644,25 @@ function _s(m, e, s, t, n, r, i, o) {
2644
2644
  r,
2645
2645
  i,
2646
2646
  o
2647
- ).generateFromUncompressedSplatArray(m) : I.generateFromUncompressedSplatArrays([m], s, 0, new v());
2647
+ ).generateFromUncompressedSplatArray(m) : I.generateFromUncompressedSplatArrays([m], s, 0, new B());
2648
2648
  }
2649
2649
  class as {
2650
2650
  static loadFromURL(e, s, t, n, r, i, o = !0, a, l, c, d, u) {
2651
2651
  let h = t ? te.ProgressiveToSplatBuffer : te.ProgressiveToSplatArray;
2652
2652
  o && (h = te.ProgressiveToSplatArray);
2653
2653
  const f = I.HeaderSizeBytes + I.SectionHeaderSizeBytes, p = Y.ProgressiveLoadSectionSize, A = 1;
2654
- let C, g, x, w = 0, y = 0, B;
2654
+ let C, g, x, w = 0, y = 0, E;
2655
2655
  const S = jt();
2656
- let E = 0, F = 0, b = [];
2657
- const D = (R, k, M, O) => {
2656
+ let v = 0, F = 0, D = [];
2657
+ const b = (R, k, M, O) => {
2658
2658
  const L = R >= 100;
2659
- if (M && b.push(M), h === te.DownloadBeforeProcessing) {
2660
- L && S.resolve(b);
2659
+ if (M && D.push(M), h === te.DownloadBeforeProcessing) {
2660
+ L && S.resolve(D);
2661
2661
  return;
2662
2662
  }
2663
2663
  if (!O) {
2664
2664
  if (t)
2665
- throw new vt("Cannon directly load .splat because no file size info is available.");
2665
+ throw new Bt("Cannon directly load .splat because no file size info is available.");
2666
2666
  h = te.DownloadBeforeProcessing;
2667
2667
  return;
2668
2668
  }
@@ -2677,12 +2677,12 @@ class as {
2677
2677
  maxSplatCount: w,
2678
2678
  splatCount: y,
2679
2679
  compressionLevel: 0,
2680
- sceneCenter: new v()
2681
- }, g)) : B = new P(0);
2680
+ sceneCenter: new B()
2681
+ }, g)) : E = new P(0);
2682
2682
  }
2683
2683
  if (M) {
2684
2684
  new Uint8Array(C, F, M.byteLength).set(new Uint8Array(M)), F += M.byteLength;
2685
- const U = F - E;
2685
+ const U = F - v;
2686
2686
  if (U > p || L) {
2687
2687
  const H = (L ? U : p) / j.RowSizeBytes, Q = y + H;
2688
2688
  h === te.ProgressiveToSplatBuffer ? j.parseToUncompressedSplatBufferSection(
@@ -2697,7 +2697,7 @@ class as {
2697
2697
  Q - 1,
2698
2698
  C,
2699
2699
  0,
2700
- B
2700
+ E
2701
2701
  ), y = Q, h === te.ProgressiveToSplatBuffer && (x || (I.writeSectionHeaderToBuffer({
2702
2702
  maxSplatCount: w,
2703
2703
  splatCount: y,
@@ -2708,12 +2708,12 @@ class as {
2708
2708
  storageSizeBytes: 0,
2709
2709
  fullBucketCount: 0,
2710
2710
  partiallyFilledBucketCount: 0
2711
- }, 0, g, I.HeaderSizeBytes), x = new I(g, !1)), x.updateLoadedCounts(1, y), n && n(x, L)), E += p;
2711
+ }, 0, g, I.HeaderSizeBytes), x = new I(g, !1)), x.updateLoadedCounts(1, y), n && n(x, L)), v += p;
2712
2712
  }
2713
2713
  }
2714
- L && (h === te.ProgressiveToSplatBuffer ? S.resolve(x) : S.resolve(B)), s && s(R, k, ue.Downloading);
2714
+ L && (h === te.ProgressiveToSplatBuffer ? S.resolve(x) : S.resolve(E)), s && s(R, k, ue.Downloading);
2715
2715
  };
2716
- return s && s(0, "0%", ue.Downloading), bt(e, D, !1, a).then(() => (s && s(0, "0%", ue.Processing), S.promise.then((R) => (s && s(100, "100%", ue.Done), h === te.DownloadBeforeProcessing ? new Blob(b).arrayBuffer().then((k) => as.loadFromFileData(
2716
+ return s && s(0, "0%", ue.Downloading), Dt(e, b, !1, a).then(() => (s && s(0, "0%", ue.Processing), S.promise.then((R) => (s && s(100, "100%", ue.Done), h === te.DownloadBeforeProcessing ? new Blob(D).arrayBuffer().then((k) => as.loadFromFileData(
2717
2717
  k,
2718
2718
  r,
2719
2719
  i,
@@ -2722,7 +2722,7 @@ class as {
2722
2722
  c,
2723
2723
  d,
2724
2724
  u
2725
- )) : h === te.ProgressiveToSplatBuffer ? R : ve(() => _s(
2725
+ )) : h === te.ProgressiveToSplatBuffer ? R : Be(() => _s(
2726
2726
  R,
2727
2727
  o,
2728
2728
  r,
@@ -2734,7 +2734,7 @@ class as {
2734
2734
  ))))));
2735
2735
  }
2736
2736
  static loadFromFileData(e, s, t, n, r, i, o, a) {
2737
- return ve(() => {
2737
+ return Be(() => {
2738
2738
  const l = j.parseStandardSplatToUncompressedSplatArray(e);
2739
2739
  return _s(
2740
2740
  l,
@@ -2757,22 +2757,22 @@ class dt {
2757
2757
  throw new Error(`KSplat version not supported: v${n.versionMajor}.${n.versionMinor}. Minimum required: v${s}.${t}`);
2758
2758
  }
2759
2759
  static loadFromURL(e, s, t, n, r) {
2760
- let i, o, a, l, c = !1, d = !1, u, h = [], f = !1, p = !1, A = 0, C = 0, g = 0, x = !1, w = !1, y = !1, B = [];
2761
- const S = jt(), E = () => {
2762
- !c && !d && A >= I.HeaderSizeBytes && (d = !0, new Blob(B).arrayBuffer().then((O) => {
2760
+ let i, o, a, l, c = !1, d = !1, u, h = [], f = !1, p = !1, A = 0, C = 0, g = 0, x = !1, w = !1, y = !1, E = [];
2761
+ const S = jt(), v = () => {
2762
+ !c && !d && A >= I.HeaderSizeBytes && (d = !0, new Blob(E).arrayBuffer().then((O) => {
2763
2763
  a = new ArrayBuffer(I.HeaderSizeBytes), new Uint8Array(a).set(new Uint8Array(O, 0, I.HeaderSizeBytes)), dt.checkVersion(a), d = !1, c = !0, l = I.parseHeader(a), window.setTimeout(() => {
2764
- D();
2764
+ b();
2765
2765
  }, 1);
2766
2766
  }));
2767
2767
  };
2768
2768
  let F = 0;
2769
- const b = () => {
2769
+ const D = () => {
2770
2770
  F === 0 && (F++, window.setTimeout(() => {
2771
2771
  F--, R();
2772
2772
  }, 1));
2773
- }, D = () => {
2773
+ }, b = () => {
2774
2774
  const M = () => {
2775
- p = !0, new Blob(B).arrayBuffer().then((L) => {
2775
+ p = !0, new Blob(E).arrayBuffer().then((L) => {
2776
2776
  p = !1, f = !0, u = new ArrayBuffer(l.maxSectionCount * I.SectionHeaderSizeBytes), new Uint8Array(u).set(new Uint8Array(
2777
2777
  L,
2778
2778
  I.HeaderSizeBytes,
@@ -2785,15 +2785,15 @@ class dt {
2785
2785
  if (!i) {
2786
2786
  i = new ArrayBuffer(_);
2787
2787
  let H = 0;
2788
- for (let Q = 0; Q < B.length; Q++) {
2789
- const ee = B[Q];
2788
+ for (let Q = 0; Q < E.length; Q++) {
2789
+ const ee = E[Q];
2790
2790
  new Uint8Array(i, H, ee.byteLength).set(new Uint8Array(ee)), H += ee.byteLength;
2791
2791
  }
2792
2792
  }
2793
2793
  g = I.HeaderSizeBytes + I.SectionHeaderSizeBytes * l.maxSectionCount;
2794
2794
  for (let H = 0; H <= h.length && H < l.maxSectionCount; H++)
2795
2795
  g += h[H].storageSizeBytes;
2796
- b();
2796
+ D();
2797
2797
  });
2798
2798
  };
2799
2799
  !p && !f && c && A >= I.HeaderSizeBytes + I.SectionHeaderSizeBytes * l.maxSectionCount && M();
@@ -2826,12 +2826,12 @@ class dt {
2826
2826
  };
2827
2827
  window.setTimeout(M, Y.ProgressiveLoadSectionDelayDuration);
2828
2828
  };
2829
- return bt(e, (M, O, L) => {
2830
- L && (B.push(L), i && new Uint8Array(i, A, L.byteLength).set(new Uint8Array(L)), A += L.byteLength), t ? (E(), D(), R()) : s && s(M, O, ue.Downloading);
2829
+ return Dt(e, (M, O, L) => {
2830
+ L && (E.push(L), i && new Uint8Array(i, A, L.byteLength).set(new Uint8Array(L)), A += L.byteLength), t ? (v(), b(), R()) : s && s(M, O, ue.Downloading);
2831
2831
  }, !t, r).then((M) => (s && s(0, "0%", ue.Processing), (t ? S.promise : dt.loadFromFileData(M)).then((L) => (s && s(100, "100%", ue.Done), L))));
2832
2832
  }
2833
2833
  static loadFromFileData(e) {
2834
- return ve(() => (dt.checkVersion(e), new I(e)));
2834
+ return Be(() => (dt.checkVersion(e), new I(e)));
2835
2835
  }
2836
2836
  static downloadFile = /* @__PURE__ */ (function() {
2837
2837
  let e;
@@ -2848,10 +2848,10 @@ const Te = {
2848
2848
  KSplat: 1,
2849
2849
  Ply: 2,
2850
2850
  Spz: 3
2851
- }, Qs = (m) => m.endsWith(".ply") ? Te.Ply : m.endsWith(".splat") ? Te.Splat : m.endsWith(".ksplat") ? Te.KSplat : m.endsWith(".spz") ? Te.Spz : null, Ns = { type: "change" }, zt = { type: "start" }, Vs = { type: "end" }, Tt = new kn(), Gs = new Ln(), Nr = Math.cos(70 * tn.DEG2RAD);
2852
- class wt extends bn {
2851
+ }, Qs = (m) => m.endsWith(".ply") ? Te.Ply : m.endsWith(".splat") ? Te.Splat : m.endsWith(".ksplat") ? Te.KSplat : m.endsWith(".spz") ? Te.Spz : null, Ns = { type: "change" }, zt = { type: "start" }, Vs = { type: "end" }, Tt = new kn(), Gs = new Ln(), Vr = Math.cos(70 * tn.DEG2RAD);
2852
+ class wt extends Dn {
2853
2853
  constructor(e, s) {
2854
- super(), this.object = e, this.domElement = s, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new v(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 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: "KeyA", UP: "KeyW", RIGHT: "KeyD", BOTTOM: "KeyS" }, this.mouseButtons = { LEFT: We.ROTATE, MIDDLE: We.DOLLY, RIGHT: We.PAN }, this.touches = { ONE: qe.ROTATE, TWO: qe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2854
+ super(), this.object = e, this.domElement = s, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new B(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 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: "KeyA", UP: "KeyW", RIGHT: "KeyD", BOTTOM: "KeyS" }, this.mouseButtons = { LEFT: We.ROTATE, MIDDLE: We.DOLLY, RIGHT: We.PAN }, this.touches = { ONE: qe.ROTATE, TWO: qe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2855
2855
  return o.phi;
2856
2856
  }, this.getAzimuthalAngle = function() {
2857
2857
  return o.theta;
@@ -2870,15 +2870,15 @@ class wt extends bn {
2870
2870
  }, this.clearDampedPan = function() {
2871
2871
  c.set(0, 0, 0);
2872
2872
  }, this.update = (function() {
2873
- const T = new v(), z = new ge().setFromUnitVectors(e.up, new v(0, 1, 0)), he = z.clone().invert(), me = new v(), Be = new ge(), Ge = new v(), He = 2 * Math.PI;
2873
+ const T = new B(), z = new ge().setFromUnitVectors(e.up, new B(0, 1, 0)), he = z.clone().invert(), me = new B(), Ee = new ge(), Ge = new B(), Ue = 2 * Math.PI;
2874
2874
  return function() {
2875
- z.setFromUnitVectors(e.up, new v(0, 1, 0)), he.copy(z).invert();
2875
+ z.setFromUnitVectors(e.up, new B(0, 1, 0)), he.copy(z).invert();
2876
2876
  const fs = t.object.position;
2877
- T.copy(fs).sub(t.target), T.applyQuaternion(z), o.setFromVector3(T), t.autoRotate && r === n.NONE && D(F()), t.enableDamping ? (o.theta += a.theta * t.dampingFactor, o.phi += a.phi * t.dampingFactor) : (o.theta += a.theta, o.phi += a.phi);
2878
- let Re = t.minAzimuthAngle, Pe = t.maxAzimuthAngle;
2879
- isFinite(Re) && isFinite(Pe) && (Re < -Math.PI ? Re += He : Re > Math.PI && (Re -= He), Pe < -Math.PI ? Pe += He : Pe > Math.PI && (Pe -= He), Re <= Pe ? o.theta = Math.max(Re, Math.min(Pe, o.theta)) : o.theta = o.theta > (Re + Pe) / 2 ? Math.max(Re, o.theta) : Math.min(Pe, o.theta)), o.phi = Math.max(t.minPolarAngle, Math.min(t.maxPolarAngle, o.phi)), o.makeSafe(), t.enableDamping === !0 ? t.target.addScaledVector(c, t.dampingFactor) : t.target.add(c), t.zoomToCursor && B || t.object.isOrthographicCamera ? o.radius = H(o.radius) : o.radius = H(o.radius * l), T.setFromSpherical(o), T.applyQuaternion(he), fs.copy(t.target).add(T), t.object.lookAt(t.target), t.enableDamping === !0 ? (a.theta *= 1 - t.dampingFactor, a.phi *= 1 - t.dampingFactor, c.multiplyScalar(1 - t.dampingFactor)) : (a.set(0, 0, 0), c.set(0, 0, 0));
2877
+ T.copy(fs).sub(t.target), T.applyQuaternion(z), o.setFromVector3(T), t.autoRotate && r === n.NONE && b(F()), t.enableDamping ? (o.theta += a.theta * t.dampingFactor, o.phi += a.phi * t.dampingFactor) : (o.theta += a.theta, o.phi += a.phi);
2878
+ let Pe = t.minAzimuthAngle, Oe = t.maxAzimuthAngle;
2879
+ isFinite(Pe) && isFinite(Oe) && (Pe < -Math.PI ? Pe += Ue : Pe > Math.PI && (Pe -= Ue), Oe < -Math.PI ? Oe += Ue : Oe > Math.PI && (Oe -= Ue), Pe <= Oe ? o.theta = Math.max(Pe, Math.min(Oe, o.theta)) : o.theta = o.theta > (Pe + Oe) / 2 ? Math.max(Pe, o.theta) : Math.min(Oe, o.theta)), o.phi = Math.max(t.minPolarAngle, Math.min(t.maxPolarAngle, o.phi)), o.makeSafe(), t.enableDamping === !0 ? t.target.addScaledVector(c, t.dampingFactor) : t.target.add(c), t.zoomToCursor && E || t.object.isOrthographicCamera ? o.radius = H(o.radius) : o.radius = H(o.radius * l), T.setFromSpherical(o), T.applyQuaternion(he), fs.copy(t.target).add(T), t.object.lookAt(t.target), t.enableDamping === !0 ? (a.theta *= 1 - t.dampingFactor, a.phi *= 1 - t.dampingFactor, c.multiplyScalar(1 - t.dampingFactor)) : (a.set(0, 0, 0), c.set(0, 0, 0));
2880
2880
  let gt = !1;
2881
- if (t.zoomToCursor && B) {
2881
+ if (t.zoomToCursor && E) {
2882
2882
  let rt = null;
2883
2883
  if (t.object.isPerspectiveCamera) {
2884
2884
  const ot = T.length();
@@ -2886,18 +2886,18 @@ class wt extends bn {
2886
2886
  const Ct = ot - rt;
2887
2887
  t.object.position.addScaledVector(w, Ct), t.object.updateMatrixWorld();
2888
2888
  } else if (t.object.isOrthographicCamera) {
2889
- const ot = new v(y.x, y.y, 0);
2889
+ const ot = new B(y.x, y.y, 0);
2890
2890
  ot.unproject(t.object), t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / l)), t.object.updateProjectionMatrix(), gt = !0;
2891
- const Ct = new v(y.x, y.y, 0);
2891
+ const Ct = new B(y.x, y.y, 0);
2892
2892
  Ct.unproject(t.object), t.object.position.sub(Ct).add(ot), t.object.updateMatrixWorld(), rt = T.length();
2893
2893
  } else
2894
2894
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), t.zoomToCursor = !1;
2895
- rt !== null && (this.screenSpacePanning ? t.target.set(0, 0, -1).transformDirection(t.object.matrix).multiplyScalar(rt).add(t.object.position) : (Tt.origin.copy(t.object.position), Tt.direction.set(0, 0, -1).transformDirection(t.object.matrix), Math.abs(t.object.up.dot(Tt.direction)) < Nr ? e.lookAt(t.target) : (Gs.setFromNormalAndCoplanarPoint(t.object.up, t.target), Tt.intersectPlane(Gs, t.target))));
2895
+ rt !== null && (this.screenSpacePanning ? t.target.set(0, 0, -1).transformDirection(t.object.matrix).multiplyScalar(rt).add(t.object.position) : (Tt.origin.copy(t.object.position), Tt.direction.set(0, 0, -1).transformDirection(t.object.matrix), Math.abs(t.object.up.dot(Tt.direction)) < Vr ? e.lookAt(t.target) : (Gs.setFromNormalAndCoplanarPoint(t.object.up, t.target), Tt.intersectPlane(Gs, t.target))));
2896
2896
  } else t.object.isOrthographicCamera && (t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / l)), t.object.updateProjectionMatrix(), gt = !0);
2897
- return l = 1, B = !1, gt || me.distanceToSquared(t.object.position) > i || 8 * (1 - Be.dot(t.object.quaternion)) > i || Ge.distanceToSquared(t.target) > 0 ? (t.dispatchEvent(Ns), me.copy(t.object.position), Be.copy(t.object.quaternion), Ge.copy(t.target), gt = !1, !0) : !1;
2897
+ return l = 1, E = !1, gt || me.distanceToSquared(t.object.position) > i || 8 * (1 - Ee.dot(t.object.quaternion)) > i || Ge.distanceToSquared(t.target) > 0 ? (t.dispatchEvent(Ns), me.copy(t.object.position), Ee.copy(t.object.quaternion), Ge.copy(t.target), gt = !1, !0) : !1;
2898
2898
  };
2899
2899
  })(), this.dispose = function() {
2900
- t.domElement.removeEventListener("contextmenu", us), t.domElement.removeEventListener("pointerdown", Ce), t.domElement.removeEventListener("pointercancel", Le), t.domElement.removeEventListener("wheel", hs), t.domElement.removeEventListener("pointermove", we), t.domElement.removeEventListener("pointerup", Le), t._domElementKeyEvents !== null && (t._domElementKeyEvents.removeEventListener("keydown", Mt), t._domElementKeyEvents = null);
2900
+ t.domElement.removeEventListener("contextmenu", us), t.domElement.removeEventListener("pointerdown", Ce), t.domElement.removeEventListener("pointercancel", He), t.domElement.removeEventListener("wheel", hs), t.domElement.removeEventListener("pointermove", we), t.domElement.removeEventListener("pointerup", He), t._domElementKeyEvents !== null && (t._domElementKeyEvents.removeEventListener("keydown", Mt), t._domElementKeyEvents = null);
2901
2901
  };
2902
2902
  const t = this, n = {
2903
2903
  NONE: -1,
@@ -2912,41 +2912,41 @@ class wt extends bn {
2912
2912
  let r = n.NONE;
2913
2913
  const i = 1e-6, o = new xs(), a = new xs();
2914
2914
  let l = 1;
2915
- const c = new v(), d = new N(), u = new N(), h = new N(), f = new N(), p = new N(), A = new N(), C = new N(), g = new N(), x = new N(), w = new v(), y = new N();
2916
- let B = !1;
2917
- const S = [], E = {};
2915
+ const c = new B(), d = new N(), u = new N(), h = new N(), f = new N(), p = new N(), A = new N(), C = new N(), g = new N(), x = new N(), w = new B(), y = new N();
2916
+ let E = !1;
2917
+ const S = [], v = {};
2918
2918
  function F() {
2919
2919
  return 2 * Math.PI / 60 / 60 * t.autoRotateSpeed;
2920
2920
  }
2921
- function b() {
2921
+ function D() {
2922
2922
  return Math.pow(0.95, t.zoomSpeed);
2923
2923
  }
2924
- function D(T) {
2924
+ function b(T) {
2925
2925
  a.theta -= T;
2926
2926
  }
2927
2927
  function R(T) {
2928
2928
  a.phi -= T;
2929
2929
  }
2930
2930
  const k = (function() {
2931
- const T = new v();
2931
+ const T = new B();
2932
2932
  return function(he, me) {
2933
2933
  T.setFromMatrixColumn(me, 0), T.multiplyScalar(-he), c.add(T);
2934
2934
  };
2935
2935
  })(), M = (function() {
2936
- const T = new v();
2936
+ const T = new B();
2937
2937
  return function(he, me) {
2938
2938
  t.screenSpacePanning === !0 ? T.setFromMatrixColumn(me, 1) : (T.setFromMatrixColumn(me, 0), T.crossVectors(t.object.up, T)), T.multiplyScalar(he), c.add(T);
2939
2939
  };
2940
2940
  })(), O = (function() {
2941
- const T = new v();
2941
+ const T = new B();
2942
2942
  return function(he, me) {
2943
- const Be = t.domElement;
2943
+ const Ee = t.domElement;
2944
2944
  if (t.object.isPerspectiveCamera) {
2945
2945
  const Ge = t.object.position;
2946
2946
  T.copy(Ge).sub(t.target);
2947
- let He = T.length();
2948
- He *= Math.tan(t.object.fov / 2 * Math.PI / 180), k(2 * he * He / Be.clientHeight, t.object.matrix), M(2 * me * He / Be.clientHeight, t.object.matrix);
2949
- } else t.object.isOrthographicCamera ? (k(he * (t.object.right - t.object.left) / t.object.zoom / Be.clientWidth, t.object.matrix), M(me * (t.object.top - t.object.bottom) / t.object.zoom / Be.clientHeight, t.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), t.enablePan = !1);
2947
+ let Ue = T.length();
2948
+ Ue *= Math.tan(t.object.fov / 2 * Math.PI / 180), k(2 * he * Ue / Ee.clientHeight, t.object.matrix), M(2 * me * Ue / Ee.clientHeight, t.object.matrix);
2949
+ } else t.object.isOrthographicCamera ? (k(he * (t.object.right - t.object.left) / t.object.zoom / Ee.clientWidth, t.object.matrix), M(me * (t.object.top - t.object.bottom) / t.object.zoom / Ee.clientHeight, t.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), t.enablePan = !1);
2950
2950
  };
2951
2951
  })();
2952
2952
  function L(T) {
@@ -2958,9 +2958,9 @@ class wt extends bn {
2958
2958
  function _(T) {
2959
2959
  if (!t.zoomToCursor)
2960
2960
  return;
2961
- B = !0;
2962
- const z = t.domElement.getBoundingClientRect(), he = T.clientX - z.left, me = T.clientY - z.top, Be = z.width, Ge = z.height;
2963
- y.x = he / Be * 2 - 1, y.y = -(me / Ge) * 2 + 1, w.set(y.x, y.y, 1).unproject(e).sub(e.position).normalize();
2961
+ E = !0;
2962
+ const z = t.domElement.getBoundingClientRect(), he = T.clientX - z.left, me = T.clientY - z.top, Ee = z.width, Ge = z.height;
2963
+ y.x = he / Ee * 2 - 1, y.y = -(me / Ge) * 2 + 1, w.set(y.x, y.y, 1).unproject(e).sub(e.position).normalize();
2964
2964
  }
2965
2965
  function H(T) {
2966
2966
  return Math.max(t.minDistance, Math.min(t.maxDistance, T));
@@ -2977,16 +2977,16 @@ class wt extends bn {
2977
2977
  function V(T) {
2978
2978
  u.set(T.clientX, T.clientY), h.subVectors(u, d).multiplyScalar(t.rotateSpeed);
2979
2979
  const z = t.domElement;
2980
- D(2 * Math.PI * h.x / z.clientHeight), R(2 * Math.PI * h.y / z.clientHeight), d.copy(u), t.update();
2980
+ b(2 * Math.PI * h.x / z.clientHeight), R(2 * Math.PI * h.y / z.clientHeight), d.copy(u), t.update();
2981
2981
  }
2982
2982
  function se(T) {
2983
- g.set(T.clientX, T.clientY), x.subVectors(g, C), x.y > 0 ? L(b()) : x.y < 0 && U(b()), C.copy(g), t.update();
2983
+ g.set(T.clientX, T.clientY), x.subVectors(g, C), x.y > 0 ? L(D()) : x.y < 0 && U(D()), C.copy(g), t.update();
2984
2984
  }
2985
2985
  function Z(T) {
2986
2986
  p.set(T.clientX, T.clientY), A.subVectors(p, f).multiplyScalar(t.panSpeed), O(A.x, A.y), f.copy(p), t.update();
2987
2987
  }
2988
2988
  function G(T) {
2989
- _(T), T.deltaY < 0 ? U(b()) : T.deltaY > 0 && L(b()), t.update();
2989
+ _(T), T.deltaY < 0 ? U(D()) : T.deltaY > 0 && L(D()), t.update();
2990
2990
  }
2991
2991
  function X(T) {
2992
2992
  let z = !1;
@@ -2998,10 +2998,10 @@ class wt extends bn {
2998
2998
  T.ctrlKey || T.metaKey || T.shiftKey ? R(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : O(0, -t.keyPanSpeed), z = !0;
2999
2999
  break;
3000
3000
  case t.keys.LEFT:
3001
- T.ctrlKey || T.metaKey || T.shiftKey ? D(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : O(t.keyPanSpeed, 0), z = !0;
3001
+ T.ctrlKey || T.metaKey || T.shiftKey ? b(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : O(t.keyPanSpeed, 0), z = !0;
3002
3002
  break;
3003
3003
  case t.keys.RIGHT:
3004
- T.ctrlKey || T.metaKey || T.shiftKey ? D(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : O(-t.keyPanSpeed, 0), z = !0;
3004
+ T.ctrlKey || T.metaKey || T.shiftKey ? b(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : O(-t.keyPanSpeed, 0), z = !0;
3005
3005
  break;
3006
3006
  }
3007
3007
  z && (T.preventDefault(), t.update());
@@ -3036,12 +3036,12 @@ class wt extends bn {
3036
3036
  if (S.length == 1)
3037
3037
  u.set(T.pageX, T.pageY);
3038
3038
  else {
3039
- const he = Rt(T), me = 0.5 * (T.pageX + he.x), Be = 0.5 * (T.pageY + he.y);
3040
- u.set(me, Be);
3039
+ const he = Rt(T), me = 0.5 * (T.pageX + he.x), Ee = 0.5 * (T.pageY + he.y);
3040
+ u.set(me, Ee);
3041
3041
  }
3042
3042
  h.subVectors(u, d).multiplyScalar(t.rotateSpeed);
3043
3043
  const z = t.domElement;
3044
- D(2 * Math.PI * h.x / z.clientHeight), R(2 * Math.PI * h.y / z.clientHeight), d.copy(u);
3044
+ b(2 * Math.PI * h.x / z.clientHeight), R(2 * Math.PI * h.y / z.clientHeight), d.copy(u);
3045
3045
  }
3046
3046
  function fe(T) {
3047
3047
  if (S.length === 1)
@@ -3053,23 +3053,23 @@ class wt extends bn {
3053
3053
  A.subVectors(p, f).multiplyScalar(t.panSpeed), O(A.x, A.y), f.copy(p);
3054
3054
  }
3055
3055
  function $(T) {
3056
- const z = Rt(T), he = T.pageX - z.x, me = T.pageY - z.y, Be = Math.sqrt(he * he + me * me);
3057
- g.set(0, Be), x.set(0, Math.pow(g.y / C.y, t.zoomSpeed)), L(x.y), C.copy(g);
3056
+ const z = Rt(T), he = T.pageX - z.x, me = T.pageY - z.y, Ee = Math.sqrt(he * he + me * me);
3057
+ g.set(0, Ee), x.set(0, Math.pow(g.y / C.y, t.zoomSpeed)), L(x.y), C.copy(g);
3058
3058
  }
3059
3059
  function Fe(T) {
3060
3060
  t.enableZoom && $(T), t.enablePan && fe(T);
3061
3061
  }
3062
- function be(T) {
3062
+ function Me(T) {
3063
3063
  t.enableZoom && $(T), t.enableRotate && ne(T);
3064
3064
  }
3065
3065
  function Ce(T) {
3066
- t.enabled !== !1 && (S.length === 0 && (t.domElement.setPointerCapture(T.pointerId), t.domElement.addEventListener("pointermove", we), t.domElement.addEventListener("pointerup", Le)), Cn(T), T.pointerType === "touch" ? An(T) : fn(T));
3066
+ t.enabled !== !1 && (S.length === 0 && (t.domElement.setPointerCapture(T.pointerId), t.domElement.addEventListener("pointermove", we), t.domElement.addEventListener("pointerup", He)), Cn(T), T.pointerType === "touch" ? An(T) : fn(T));
3067
3067
  }
3068
3068
  function we(T) {
3069
3069
  t.enabled !== !1 && (T.pointerType === "touch" ? gn(T) : mn(T));
3070
3070
  }
3071
- function Le(T) {
3072
- Sn(T), S.length === 0 && (t.domElement.releasePointerCapture(T.pointerId), t.domElement.removeEventListener("pointermove", we), t.domElement.removeEventListener("pointerup", Le)), t.dispatchEvent(Vs), r = n.NONE;
3071
+ function He(T) {
3072
+ Sn(T), S.length === 0 && (t.domElement.releasePointerCapture(T.pointerId), t.domElement.removeEventListener("pointermove", we), t.domElement.removeEventListener("pointerup", He)), t.dispatchEvent(Vs), r = n.NONE;
3073
3073
  }
3074
3074
  function fn(T) {
3075
3075
  let z;
@@ -3187,7 +3187,7 @@ class wt extends bn {
3187
3187
  break;
3188
3188
  case n.TOUCH_DOLLY_ROTATE:
3189
3189
  if (t.enableZoom === !1 && t.enableRotate === !1) return;
3190
- be(T), t.update();
3190
+ Me(T), t.update();
3191
3191
  break;
3192
3192
  default:
3193
3193
  r = n.NONE;
@@ -3200,7 +3200,7 @@ class wt extends bn {
3200
3200
  S.push(T);
3201
3201
  }
3202
3202
  function Sn(T) {
3203
- delete E[T.pointerId];
3203
+ delete v[T.pointerId];
3204
3204
  for (let z = 0; z < S.length; z++)
3205
3205
  if (S[z].pointerId == T.pointerId) {
3206
3206
  S.splice(z, 1);
@@ -3208,17 +3208,17 @@ class wt extends bn {
3208
3208
  }
3209
3209
  }
3210
3210
  function ps(T) {
3211
- let z = E[T.pointerId];
3212
- z === void 0 && (z = new N(), E[T.pointerId] = z), z.set(T.pageX, T.pageY);
3211
+ let z = v[T.pointerId];
3212
+ z === void 0 && (z = new N(), v[T.pointerId] = z), z.set(T.pageX, T.pageY);
3213
3213
  }
3214
3214
  function Rt(T) {
3215
3215
  const z = T.pointerId === S[0].pointerId ? S[1] : S[0];
3216
- return E[z.pointerId];
3216
+ return v[z.pointerId];
3217
3217
  }
3218
- t.domElement.addEventListener("contextmenu", us), t.domElement.addEventListener("pointerdown", Ce), t.domElement.addEventListener("pointercancel", Le), t.domElement.addEventListener("wheel", hs, { passive: !1 }), this.update();
3218
+ t.domElement.addEventListener("contextmenu", us), t.domElement.addEventListener("pointerdown", Ce), t.domElement.addEventListener("pointercancel", He), t.domElement.addEventListener("wheel", hs, { passive: !1 }), this.update();
3219
3219
  }
3220
3220
  }
3221
- const Vr = (m, e, s, t, n) => {
3221
+ const Gr = (m, e, s, t, n) => {
3222
3222
  const r = performance.now();
3223
3223
  let i = m.style.display === "none" ? 0 : parseFloat(m.style.opacity);
3224
3224
  isNaN(i) && (i = 1);
@@ -3230,7 +3230,7 @@ const Vr = (m, e, s, t, n) => {
3230
3230
  e ? (d = (1 - c) * i, d < 1e-4 && (d = 0)) : d = (1 - i) * c + i, d > 0 ? (m.style.display = s, m.style.opacity = d) : m.style.display = "none", c >= 1 && (n && n(), window.clearInterval(o));
3231
3231
  }, 16);
3232
3232
  return o;
3233
- }, Gr = 500;
3233
+ }, Wr = 500;
3234
3234
  class ls {
3235
3235
  static elementIDGen = 0;
3236
3236
  constructor(e, s) {
@@ -3382,7 +3382,7 @@ class ls {
3382
3382
  }
3383
3383
  setMinimized(e, s) {
3384
3384
  const t = (n, r, i, o, a) => {
3385
- i ? n.style.display = r ? o : "none" : this.fadeTransitions[a] = Vr(n, !r, o, Gr, () => {
3385
+ i ? n.style.display = r ? o : "none" : this.fadeTransitions[a] = Gr(n, !r, o, Wr, () => {
3386
3386
  this.fadeTransitions[a] = null;
3387
3387
  });
3388
3388
  };
@@ -3392,7 +3392,7 @@ class ls {
3392
3392
  this.messageContainerPrimary.innerHTML = e, this.messageContainerMin.innerHTML = e;
3393
3393
  }
3394
3394
  }
3395
- class Wr {
3395
+ class qr {
3396
3396
  constructor(e) {
3397
3397
  this.idGen = 0, this.tasks = [], this.container = e || document.body, this.progressBarContainerOuter = document.createElement("div"), this.progressBarContainerOuter.className = "progressBarOuterContainer", this.progressBarContainerOuter.style.display = "none", this.progressBarBox = document.createElement("div"), this.progressBarBox.className = "progressBarBox", this.progressBarBackground = document.createElement("div"), this.progressBarBackground.className = "progressBarBackground", this.progressBar = document.createElement("div"), this.progressBar.className = "progressBar", this.progressBarBackground.appendChild(this.progressBar), this.progressBarBox.appendChild(this.progressBarBackground), this.progressBarContainerOuter.appendChild(this.progressBarBox);
3398
3398
  const s = document.createElement("style");
@@ -3456,7 +3456,7 @@ class Wr {
3456
3456
  this.container && this.progressBarContainerOuter.parentElement === this.container && this.container.removeChild(this.progressBarContainerOuter), e && (this.container = e, this.container.appendChild(this.progressBarContainerOuter), this.progressBarContainerOuter.style.zIndex = this.container.style.zIndex + 1);
3457
3457
  }
3458
3458
  }
3459
- class qr {
3459
+ class Kr {
3460
3460
  constructor(e) {
3461
3461
  this.container = e || document.body, this.infoCells = {};
3462
3462
  const s = [
@@ -3545,14 +3545,14 @@ class qr {
3545
3545
  this.infoPanelContainer.style.display = "none", this.visible = !1;
3546
3546
  }
3547
3547
  }
3548
- const Ws = new v();
3549
- class Kr extends Je {
3550
- constructor(e = new v(0, 0, 1), s = new v(0, 0, 0), t = 1, n = 0.1, r = 16776960, i = t * 0.2, o = i * 0.2) {
3548
+ const Ws = new B();
3549
+ class jr extends Je {
3550
+ constructor(e = new B(0, 0, 1), s = new B(0, 0, 0), t = 1, n = 0.1, r = 16776960, i = t * 0.2, o = i * 0.2) {
3551
3551
  super(), this.type = "ArrowHelper";
3552
3552
  const a = new Is(n, n, t, 32);
3553
3553
  a.translate(0, t / 2, 0);
3554
3554
  const l = new Is(0, o, i, 32);
3555
- l.translate(0, t, 0), this.position.copy(s), this.line = new De(a, new ft({ color: r, toneMapped: !1 })), this.line.matrixAutoUpdate = !1, this.add(this.line), this.cone = new De(l, new ft({ color: r, toneMapped: !1 })), this.cone.matrixAutoUpdate = !1, this.add(this.cone), this.setDirection(e);
3555
+ l.translate(0, t, 0), this.position.copy(s), this.line = new be(a, new ft({ color: r, toneMapped: !1 })), this.line.matrixAutoUpdate = !1, this.add(this.line), this.cone = new be(l, new ft({ color: r, toneMapped: !1 })), this.cone.matrixAutoUpdate = !1, this.add(this.cone), this.setDirection(e);
3556
3556
  }
3557
3557
  setDirection(e) {
3558
3558
  if (e.y > 0.99999)
@@ -3581,10 +3581,10 @@ class ht {
3581
3581
  }
3582
3582
  updateSplatRenderTargetForRenderDimensions(e, s) {
3583
3583
  this.destroySplatRendertarget(), this.splatRenderTarget = new wn(e, s, {
3584
- format: Et,
3584
+ format: vt,
3585
3585
  stencilBuffer: !1,
3586
3586
  depthBuffer: !0
3587
- }), this.splatRenderTarget.depthTexture = new Bn(e, s), this.splatRenderTarget.depthTexture.format = En, this.splatRenderTarget.depthTexture.type = at;
3587
+ }), this.splatRenderTarget.depthTexture = new En(e, s), this.splatRenderTarget.depthTexture.format = vn, this.splatRenderTarget.depthTexture.type = at;
3588
3588
  }
3589
3589
  destroySplatRendertarget() {
3590
3590
  this.splatRenderTarget && (this.splatRenderTarget = null);
@@ -3624,26 +3624,26 @@ class ht {
3624
3624
  depthWrite: !1,
3625
3625
  depthTest: !1,
3626
3626
  transparent: !0,
3627
- blending: vn,
3627
+ blending: Bn,
3628
3628
  blendSrc: gs,
3629
3629
  blendSrcAlpha: gs,
3630
3630
  blendDst: As,
3631
3631
  blendDstAlpha: As
3632
3632
  });
3633
- s.extensions.fragDepth = !0, this.renderTargetCopyQuad = new De(new Cs(2, 2), s), this.renderTargetCopyCamera = new $s(-1, 1, 1, -1, 0, 1);
3633
+ s.extensions.fragDepth = !0, this.renderTargetCopyQuad = new be(new Cs(2, 2), s), this.renderTargetCopyCamera = new $s(-1, 1, 1, -1, 0, 1);
3634
3634
  }
3635
3635
  destroyRenderTargetCopyObjects() {
3636
3636
  this.renderTargetCopyQuad && (Xe(this.renderTargetCopyQuad), this.renderTargetCopyQuad = null);
3637
3637
  }
3638
3638
  setupMeshCursor() {
3639
3639
  if (!this.meshCursor) {
3640
- const e = new Fn(0.5, 1.5, 32), s = new ft({ color: 16777215 }), t = new De(e, s);
3640
+ const e = new Fn(0.5, 1.5, 32), s = new ft({ color: 16777215 }), t = new be(e, s);
3641
3641
  t.rotation.set(0, 0, Math.PI), t.position.set(0, 1, 0);
3642
- const n = new De(e, s);
3642
+ const n = new be(e, s);
3643
3643
  n.position.set(0, -1, 0);
3644
- const r = new De(e, s);
3644
+ const r = new be(e, s);
3645
3645
  r.rotation.set(0, 0, Math.PI / 2), r.position.set(1, 0, 0);
3646
- const i = new De(e, s);
3646
+ const i = new be(e, s);
3647
3647
  i.rotation.set(0, 0, -Math.PI / 2), i.position.set(-1, 0, 0), this.meshCursor = new Je(), this.meshCursor.add(t), this.meshCursor.add(n), this.meshCursor.add(r), this.meshCursor.add(i), this.meshCursor.scale.set(0.1, 0.1, 0.1), this.threeScene.add(this.meshCursor), this.meshCursor.visible = !1;
3648
3648
  }
3649
3649
  }
@@ -3665,14 +3665,14 @@ class ht {
3665
3665
  setupFocusMarker() {
3666
3666
  if (!this.focusMarker) {
3667
3667
  const e = new Ss(0.5, 32, 32), s = ht.buildFocusMarkerMaterial();
3668
- s.depthTest = !1, s.depthWrite = !1, s.transparent = !0, this.focusMarker = new De(e, s);
3668
+ s.depthTest = !1, s.depthWrite = !1, s.transparent = !0, this.focusMarker = new be(e, s);
3669
3669
  }
3670
3670
  }
3671
3671
  destroyFocusMarker() {
3672
3672
  this.focusMarker && (Xe(this.focusMarker), this.focusMarker = null);
3673
3673
  }
3674
3674
  updateFocusMarker = (function() {
3675
- const e = new v(), s = new J(), t = new v();
3675
+ const e = new B(), s = new J(), t = new B();
3676
3676
  return function(n, r, i) {
3677
3677
  s.copy(r.matrixWorld).invert(), e.copy(n).applyMatrix4(s), e.normalize().multiplyScalar(10), e.applyMatrix4(r.matrixWorld), t.copy(r.position).sub(n);
3678
3678
  const o = t.length();
@@ -3694,9 +3694,9 @@ class ht {
3694
3694
  e.rotateX(-Math.PI / 2);
3695
3695
  const s = new ft({ color: 16777215 });
3696
3696
  s.transparent = !0, s.opacity = 0.6, s.depthTest = !1, s.depthWrite = !1, s.side = Kt;
3697
- const t = new De(e, s), n = new v(0, 1, 0);
3697
+ const t = new be(e, s), n = new B(0, 1, 0);
3698
3698
  n.normalize();
3699
- const r = new v(0, 0, 0), i = 0.5, o = 0.01, a = 56576, l = new Kr(n, r, i, o, a, 0.1, 0.03);
3699
+ const r = new B(0, 0, 0), i = 0.5, o = 0.01, a = 56576, l = new jr(n, r, i, o, a, 0.1, 0.03);
3700
3700
  this.controlPlane = new Je(), this.controlPlane.add(t), this.controlPlane.add(l);
3701
3701
  }
3702
3702
  }
@@ -3707,7 +3707,7 @@ class ht {
3707
3707
  this.controlPlane.visible = e;
3708
3708
  }
3709
3709
  positionAndOrientControlPlane = (function() {
3710
- const e = new ge(), s = new v(0, 1, 0);
3710
+ const e = new ge(), s = new B(0, 1, 0);
3711
3711
  return function(t, n) {
3712
3712
  e.setFromUnitVectors(s, n), this.controlPlane.position.copy(t), this.controlPlane.quaternion.copy(e);
3713
3713
  };
@@ -3722,16 +3722,16 @@ class ht {
3722
3722
  }
3723
3723
  createDebugMeshes(e) {
3724
3724
  const s = new Ss(1, 32, 32), t = new Je(), n = (r, i) => {
3725
- let o = new De(s, ht.buildDebugMaterial(r));
3725
+ let o = new be(s, ht.buildDebugMaterial(r));
3726
3726
  o.renderOrder = e, t.add(o), o.position.fromArray(i);
3727
3727
  };
3728
3728
  return n(16711680, [-50, 0, 0]), n(16711680, [50, 0, 0]), n(65280, [0, 0, -50]), n(65280, [0, 0, 50]), n(16755200, [5, 0, 5]), t;
3729
3729
  }
3730
3730
  createSecondaryDebugMeshes(e) {
3731
- const s = new Dn(3, 3, 3), t = new Je();
3731
+ const s = new bn(3, 3, 3), t = new Je();
3732
3732
  let n = 12303291;
3733
3733
  const r = (o) => {
3734
- let a = new De(s, ht.buildDebugMaterial(n));
3734
+ let a = new be(s, ht.buildDebugMaterial(n));
3735
3735
  a.renderOrder = e, t.add(a), a.position.fromArray(o);
3736
3736
  };
3737
3737
  let i = 10;
@@ -3838,7 +3838,7 @@ class ht {
3838
3838
  },
3839
3839
  realFocusPosition: {
3840
3840
  type: "v3",
3841
- value: new v()
3841
+ value: new B()
3842
3842
  },
3843
3843
  viewport: {
3844
3844
  type: "v2",
@@ -3862,10 +3862,10 @@ class ht {
3862
3862
  this.destroyMeshCursor(), this.destroyFocusMarker(), this.destroyDebugMeshes(), this.destroyControlPlane(), this.destroyRenderTargetCopyObjects(), this.destroySplatRendertarget();
3863
3863
  }
3864
3864
  }
3865
- const jr = new v(1, 0, 0), Yr = new v(0, 1, 0), Xr = new v(0, 0, 1);
3865
+ const Yr = new B(1, 0, 0), Xr = new B(0, 1, 0), Jr = new B(0, 0, 1);
3866
3866
  class _t {
3867
- constructor(e = new v(), s = new v()) {
3868
- this.origin = new v(), this.direction = new v(), this.setParameters(e, s);
3867
+ constructor(e = new B(), s = new B()) {
3868
+ this.origin = new B(), this.direction = new B(), this.setParameters(e, s);
3869
3869
  }
3870
3870
  setParameters(e, s) {
3871
3871
  this.origin.copy(e), this.direction.copy(s).normalize();
@@ -3874,13 +3874,13 @@ class _t {
3874
3874
  return !(s.x < e.min.x - t || s.x > e.max.x + t || s.y < e.min.y - t || s.y > e.max.y + t || s.z < e.min.z - t || s.z > e.max.z + t);
3875
3875
  }
3876
3876
  intersectBox = (function() {
3877
- const e = new v(), s = [], t = [], n = [];
3877
+ const e = new B(), s = [], t = [], n = [];
3878
3878
  return function(r, i) {
3879
3879
  if (t[0] = this.origin.x, t[1] = this.origin.y, t[2] = this.origin.z, n[0] = this.direction.x, n[1] = this.direction.y, n[2] = this.direction.z, this.boxContainsPoint(r, this.origin, 1e-4))
3880
3880
  return i && (i.origin.copy(this.origin), i.normal.set(0, 0, 0), i.distance = -1), !0;
3881
3881
  for (let o = 0; o < 3; o++) {
3882
3882
  if (n[o] == 0) continue;
3883
- const a = o == 0 ? jr : o == 1 ? Yr : Xr, l = n[o] < 0 ? r.max : r.min;
3883
+ const a = o == 0 ? Yr : o == 1 ? Xr : Jr, l = n[o] < 0 ? r.max : r.min;
3884
3884
  let c = -Math.sign(n[o]);
3885
3885
  s[0] = o == 0 ? l.x : o == 1 ? l.y : l.z;
3886
3886
  let d = s[0] - t[o];
@@ -3898,7 +3898,7 @@ class _t {
3898
3898
  };
3899
3899
  })();
3900
3900
  intersectSphere = (function() {
3901
- const e = new v();
3901
+ const e = new B();
3902
3902
  return function(s, t, n) {
3903
3903
  e.copy(s).sub(this.origin);
3904
3904
  const r = e.dot(this.direction), i = r * r, a = e.dot(e) - i, l = t * t;
@@ -3912,7 +3912,7 @@ class _t {
3912
3912
  }
3913
3913
  class cs {
3914
3914
  constructor() {
3915
- this.origin = new v(), this.normal = new v(), this.distance = 0, this.splatIndex = 0;
3915
+ this.origin = new B(), this.normal = new B(), this.distance = 0, this.splatIndex = 0;
3916
3916
  }
3917
3917
  set(e, s, t, n) {
3918
3918
  this.origin.copy(e), this.normal.copy(s), this.distance = t, this.splatIndex = n;
@@ -3922,11 +3922,11 @@ class cs {
3922
3922
  return e.origin.copy(this.origin), e.normal.copy(this.normal), e.distance = this.distance, e.splatIndex = this.splatIndex, e;
3923
3923
  }
3924
3924
  }
3925
- const ke = {
3925
+ const Le = {
3926
3926
  ThreeD: 0,
3927
3927
  TwoD: 1
3928
3928
  };
3929
- class Jr {
3929
+ class Zr {
3930
3930
  constructor(e, s, t = !1) {
3931
3931
  this.ray = new _t(e, s), this.raycastAgainstTrueSplatEllipsoid = t;
3932
3932
  }
@@ -3946,7 +3946,7 @@ class Jr {
3946
3946
  };
3947
3947
  })();
3948
3948
  intersectSplatMesh = (function() {
3949
- const e = new J(), s = new J(), t = new J(), n = new _t(), r = new v();
3949
+ const e = new J(), s = new J(), t = new J(), n = new _t(), r = new B();
3950
3950
  return function(i, o = []) {
3951
3951
  const a = i.getSplatTree();
3952
3952
  if (a) {
@@ -3963,25 +3963,25 @@ class Jr {
3963
3963
  };
3964
3964
  })();
3965
3965
  castRayAtSplatTreeNode = (function() {
3966
- const e = new qt(), s = new v(), t = new v(), n = new ge(), r = new cs(), i = 1e-7, o = new v(0, 0, 0), a = new J(), l = new J(), c = new J(), d = new J(), u = new J(), h = new _t();
3966
+ const e = new qt(), s = new B(), t = new B(), n = new ge(), r = new cs(), i = 1e-7, o = new B(0, 0, 0), a = new J(), l = new J(), c = new J(), d = new J(), u = new J(), h = new _t();
3967
3967
  return function(f, p, A, C = []) {
3968
3968
  if (f.intersectBox(A.boundingBox)) {
3969
3969
  if (A.data && A.data.indexes && A.data.indexes.length > 0)
3970
3970
  for (let g = 0; g < A.data.indexes.length; g++) {
3971
3971
  const x = A.data.indexes[g], w = p.splatMesh.getSceneIndexForSplat(x);
3972
- if (p.splatMesh.getScene(w).visible && (p.splatMesh.getSplatColor(x, e), p.splatMesh.getSplatCenter(x, s), p.splatMesh.getSplatScaleAndRotation(x, t, n), !(t.x <= i || t.y <= i || p.splatMesh.splatRenderMode === ke.ThreeD && t.z <= i)))
3972
+ if (p.splatMesh.getScene(w).visible && (p.splatMesh.getSplatColor(x, e), p.splatMesh.getSplatCenter(x, s), p.splatMesh.getSplatScaleAndRotation(x, t, n), !(t.x <= i || t.y <= i || p.splatMesh.splatRenderMode === Le.ThreeD && t.z <= i)))
3973
3973
  if (this.raycastAgainstTrueSplatEllipsoid) {
3974
3974
  l.makeScale(t.x, t.y, t.z), c.makeRotationFromQuaternion(n);
3975
- const B = Math.log10(e.w) * 2;
3976
- if (a.makeScale(B, B, B), u.copy(a).multiply(c).multiply(l), d.copy(u).invert(), h.origin.copy(f.origin).sub(s).applyMatrix4(d), h.direction.copy(f.origin).add(f.direction).sub(s), h.direction.applyMatrix4(d).sub(h.origin).normalize(), h.intersectSphere(o, 1, r)) {
3975
+ const E = Math.log10(e.w) * 2;
3976
+ if (a.makeScale(E, E, E), u.copy(a).multiply(c).multiply(l), d.copy(u).invert(), h.origin.copy(f.origin).sub(s).applyMatrix4(d), h.direction.copy(f.origin).add(f.direction).sub(s), h.direction.applyMatrix4(d).sub(h.origin).normalize(), h.intersectSphere(o, 1, r)) {
3977
3977
  const S = r.clone();
3978
3978
  S.splatIndex = x, S.origin.applyMatrix4(u).add(s), C.push(S);
3979
3979
  }
3980
3980
  } else {
3981
- let B = t.x + t.y, S = 2;
3982
- if (p.splatMesh.splatRenderMode === ke.ThreeD && (B += t.z, S = 3), B = B / S, f.intersectSphere(s, B, r)) {
3983
- const E = r.clone();
3984
- E.splatIndex = x, C.push(E);
3981
+ let E = t.x + t.y, S = 2;
3982
+ if (p.splatMesh.splatRenderMode === Le.ThreeD && (E += t.z, S = 3), E = E / S, f.intersectSphere(s, E, r)) {
3983
+ const v = r.clone();
3984
+ v.splatIndex = x, C.push(v);
3985
3985
  }
3986
3986
  }
3987
3987
  }
@@ -4282,7 +4282,7 @@ class et {
4282
4282
  const i = {
4283
4283
  sceneCenter: {
4284
4284
  type: "v3",
4285
- value: new v()
4285
+ value: new B()
4286
4286
  },
4287
4287
  fadeInComplete: {
4288
4288
  type: "i",
@@ -4659,7 +4659,7 @@ class Ft {
4659
4659
  `, e;
4660
4660
  }
4661
4661
  }
4662
- class Dt {
4662
+ class bt {
4663
4663
  /**
4664
4664
  * Build the Three.js material that is used to render the splats.
4665
4665
  * @param {number} dynamicMode If true, it means the scene geometry represented by this splat mesh is not stationary or
@@ -4684,8 +4684,8 @@ class Dt {
4684
4684
  varying vec2 vFragCoord;
4685
4685
  `
4686
4686
  );
4687
- o += Dt.buildVertexShaderProjection();
4688
- const a = Dt.buildFragmentShader(), l = et.getUniforms(
4687
+ o += bt.buildVertexShaderProjection();
4688
+ const a = bt.buildFragmentShader(), l = et.getUniforms(
4689
4689
  e,
4690
4690
  s,
4691
4691
  r,
@@ -4872,7 +4872,7 @@ class Dt {
4872
4872
  `;
4873
4873
  }
4874
4874
  }
4875
- class Zr {
4875
+ class $r {
4876
4876
  /**
4877
4877
  * Build the Three.js geometry that will be used to render the splats. The geometry is instanced and is made up of
4878
4878
  * vertices for a single quad as well as an attribute buffer for the splat indexes.
@@ -4888,8 +4888,8 @@ class Zr {
4888
4888
  return o.setUsage(On), r.setAttribute("splatIndex", o), r.instanceCount = 0, r;
4889
4889
  }
4890
4890
  }
4891
- class $r extends Je {
4892
- constructor(e, s = new v(), t = new ge(), n = new v(1, 1, 1), r = 1, i = 1, o = !0) {
4891
+ class eo extends Je {
4892
+ constructor(e, s = new B(), t = new ge(), n = new B(1, 1, 1), r = 1, i = 1, o = !0) {
4893
4893
  super(), this.splatBuffer = e, this.position.copy(s), this.quaternion.copy(t), this.scale.copy(n), this.transform = new J(), this.minimumAlpha = r, this.opacity = i, this.visible = o;
4894
4894
  }
4895
4895
  copyTransformData(e) {
@@ -4902,15 +4902,15 @@ class $r extends Je {
4902
4902
  class ds {
4903
4903
  static idGen = 0;
4904
4904
  constructor(e, s, t, n) {
4905
- this.min = new v().copy(e), this.max = new v().copy(s), this.boundingBox = new it(this.min, this.max), this.center = new v().copy(this.max).sub(this.min).multiplyScalar(0.5).add(this.min), this.depth = t, this.children = [], this.data = null, this.id = n || ds.idGen++;
4905
+ this.min = new B().copy(e), this.max = new B().copy(s), this.boundingBox = new it(this.min, this.max), this.center = new B().copy(this.max).sub(this.min).multiplyScalar(0.5).add(this.min), this.depth = t, this.children = [], this.data = null, this.id = n || ds.idGen++;
4906
4906
  }
4907
4907
  }
4908
4908
  class ut {
4909
4909
  constructor(e, s) {
4910
- this.maxDepth = e, this.maxCentersPerNode = s, this.sceneDimensions = new v(), this.sceneMin = new v(), this.sceneMax = new v(), this.rootNode = null, this.nodesWithIndexes = [], this.splatMesh = null;
4910
+ this.maxDepth = e, this.maxCentersPerNode = s, this.sceneDimensions = new B(), this.sceneMin = new B(), this.sceneMax = new B(), this.rootNode = null, this.nodesWithIndexes = [], this.splatMesh = null;
4911
4911
  }
4912
4912
  static convertWorkerSubTreeNode(e) {
4913
- const s = new v().fromArray(e.min), t = new v().fromArray(e.max), n = new ds(s, t, e.depth, e.id);
4913
+ const s = new B().fromArray(e.min), t = new B().fromArray(e.max), n = new ds(s, t, e.depth, e.id);
4914
4914
  if (e.data.indexes) {
4915
4915
  n.data = {
4916
4916
  indexes: []
@@ -4925,7 +4925,7 @@ class ut {
4925
4925
  }
4926
4926
  static convertWorkerSubTree(e, s) {
4927
4927
  const t = new ut(e.maxDepth, e.maxCentersPerNode);
4928
- t.sceneMin = new v().fromArray(e.sceneMin), t.sceneMax = new v().fromArray(e.sceneMax), t.splatMesh = s, t.rootNode = ut.convertWorkerSubTreeNode(e.rootNode);
4928
+ t.sceneMin = new B().fromArray(e.sceneMin), t.sceneMax = new B().fromArray(e.sceneMax), t.splatMesh = s, t.rootNode = ut.convertWorkerSubTreeNode(e.rootNode);
4929
4929
  const n = (r, i) => {
4930
4930
  r.children.length === 0 && i(r);
4931
4931
  for (let o of r.children)
@@ -4936,7 +4936,7 @@ class ut {
4936
4936
  }), t;
4937
4937
  }
4938
4938
  }
4939
- function eo(m) {
4939
+ function to(m) {
4940
4940
  let e = 0;
4941
4941
  class s {
4942
4942
  constructor(a, l) {
@@ -5069,7 +5069,7 @@ function eo(m) {
5069
5069
  o.data.process && i(o.data.process.centers, o.data.process.maxDepth, o.data.process.maxCentersPerNode);
5070
5070
  };
5071
5071
  }
5072
- function to(m, e, s, t, n) {
5072
+ function so(m, e, s, t, n) {
5073
5073
  m.postMessage({
5074
5074
  process: {
5075
5075
  centers: e,
@@ -5078,16 +5078,16 @@ function to(m, e, s, t, n) {
5078
5078
  }
5079
5079
  }, s);
5080
5080
  }
5081
- function so() {
5081
+ function no() {
5082
5082
  return new Worker(
5083
5083
  URL.createObjectURL(
5084
- new Blob(["(", eo.toString(), ")(self)"], {
5084
+ new Blob(["(", to.toString(), ")(self)"], {
5085
5085
  type: "application/javascript"
5086
5086
  })
5087
5087
  )
5088
5088
  );
5089
5089
  }
5090
- class no {
5090
+ class ro {
5091
5091
  constructor(e, s) {
5092
5092
  this.maxDepth = e, this.maxCentersPerNode = s, this.subTrees = [], this.splatMesh = null;
5093
5093
  }
@@ -5109,8 +5109,8 @@ class no {
5109
5109
  * @return {undefined}
5110
5110
  */
5111
5111
  processSplatMesh = function(e, s = () => !0, t, n) {
5112
- this.splatTreeWorker || (this.splatTreeWorker = so()), this.splatMesh = e, this.subTrees = [];
5113
- const r = new v(), i = (o, a) => {
5112
+ this.splatTreeWorker || (this.splatTreeWorker = no()), this.splatMesh = e, this.subTrees = [];
5113
+ const r = new B(), i = (o, a) => {
5114
5114
  const l = new Float32Array(a * 4);
5115
5115
  let c = 0;
5116
5116
  for (let d = 0; d < a; d++) {
@@ -5125,7 +5125,7 @@ class no {
5125
5125
  };
5126
5126
  return new Promise((o) => {
5127
5127
  const a = () => this.disposed ? (this.diposeSplatTreeWorker(), o(), !0) : !1;
5128
- t && t(!1), ve(() => {
5128
+ t && t(!1), Be(() => {
5129
5129
  if (a()) return;
5130
5130
  const l = [];
5131
5131
  if (e.dynamicMode) {
@@ -5139,22 +5139,22 @@ class no {
5139
5139
  l.push(c);
5140
5140
  }
5141
5141
  this.splatTreeWorker.onmessage = (c) => {
5142
- a() || c.data.subTrees && (n && n(!1), ve(() => {
5142
+ a() || c.data.subTrees && (n && n(!1), Be(() => {
5143
5143
  if (!a()) {
5144
5144
  for (let d of c.data.subTrees) {
5145
5145
  const u = ut.convertWorkerSubTree(d, e);
5146
5146
  this.subTrees.push(u);
5147
5147
  }
5148
- this.diposeSplatTreeWorker(), n && n(!0), ve(() => {
5148
+ this.diposeSplatTreeWorker(), n && n(!0), Be(() => {
5149
5149
  o();
5150
5150
  });
5151
5151
  }
5152
5152
  }));
5153
- }, ve(() => {
5153
+ }, Be(() => {
5154
5154
  if (a()) return;
5155
5155
  t && t(!0);
5156
5156
  const c = l.map((d) => d.buffer);
5157
- to(this.splatTreeWorker, l, c, this.maxDepth, this.maxCentersPerNode);
5157
+ so(this.splatTreeWorker, l, c, this.maxDepth, this.maxCentersPerNode);
5158
5158
  });
5159
5159
  });
5160
5160
  });
@@ -5175,7 +5175,7 @@ class no {
5175
5175
  s(t.rootNode, e);
5176
5176
  }
5177
5177
  }
5178
- function ro(m) {
5178
+ function oo(m) {
5179
5179
  const e = {};
5180
5180
  function s(t) {
5181
5181
  if (e[t] !== void 0)
@@ -5212,7 +5212,7 @@ function ro(m) {
5212
5212
  }
5213
5213
  };
5214
5214
  }
5215
- function oo(m, e, s) {
5215
+ function io(m, e, s) {
5216
5216
  let t;
5217
5217
  function n() {
5218
5218
  if (t !== void 0) return t;
@@ -5235,7 +5235,7 @@ function oo(m, e, s) {
5235
5235
  let o = s.precision !== void 0 ? s.precision : "highp";
5236
5236
  const a = r(o);
5237
5237
  a !== o && (console.warn("THREE.WebGLRenderer:", o, "not supported, using", a, "instead."), o = a);
5238
- const l = i || e.has("WEBGL_draw_buffers"), c = s.logarithmicDepthBuffer === !0, d = m.getParameter(m.MAX_TEXTURE_IMAGE_UNITS), u = m.getParameter(m.MAX_VERTEX_TEXTURE_IMAGE_UNITS), h = m.getParameter(m.MAX_TEXTURE_SIZE), f = m.getParameter(m.MAX_CUBE_MAP_TEXTURE_SIZE), p = m.getParameter(m.MAX_VERTEX_ATTRIBS), A = m.getParameter(m.MAX_VERTEX_UNIFORM_VECTORS), C = m.getParameter(m.MAX_VARYING_VECTORS), g = m.getParameter(m.MAX_FRAGMENT_UNIFORM_VECTORS), x = u > 0, w = i || e.has("OES_texture_float"), y = x && w, B = i ? m.getParameter(m.MAX_SAMPLES) : 0;
5238
+ const l = i || e.has("WEBGL_draw_buffers"), c = s.logarithmicDepthBuffer === !0, d = m.getParameter(m.MAX_TEXTURE_IMAGE_UNITS), u = m.getParameter(m.MAX_VERTEX_TEXTURE_IMAGE_UNITS), h = m.getParameter(m.MAX_TEXTURE_SIZE), f = m.getParameter(m.MAX_CUBE_MAP_TEXTURE_SIZE), p = m.getParameter(m.MAX_VERTEX_ATTRIBS), A = m.getParameter(m.MAX_VERTEX_UNIFORM_VECTORS), C = m.getParameter(m.MAX_VARYING_VECTORS), g = m.getParameter(m.MAX_FRAGMENT_UNIFORM_VECTORS), x = u > 0, w = i || e.has("OES_texture_float"), y = x && w, E = i ? m.getParameter(m.MAX_SAMPLES) : 0;
5239
5239
  return {
5240
5240
  isWebGL2: i,
5241
5241
  drawBuffers: l,
@@ -5254,7 +5254,7 @@ function oo(m, e, s) {
5254
5254
  vertexTextures: x,
5255
5255
  floatFragmentTextures: w,
5256
5256
  floatVertexTextures: y,
5257
- maxSamples: B
5257
+ maxSamples: E
5258
5258
  };
5259
5259
  }
5260
5260
  const pt = {
@@ -5263,10 +5263,10 @@ const pt = {
5263
5263
  }, tt = {
5264
5264
  None: 0,
5265
5265
  Info: 3
5266
- }, qs = new sn(), io = new ft(), Bt = 6, ao = 4, lo = 4, co = 4, ho = 6, uo = 8, Qt = 4, Nt = 4, Ks = 1, po = 0.012, fo = 3e-3, js = 1, Ys = 16777216;
5267
- class ye extends De {
5268
- constructor(e = ke.ThreeD, s = !1, t = !1, n = !1, r = 1, i = !0, o = !1, a = !1, l = 1024, c = tt.None, d = 0, u = 1, h = 0.3) {
5269
- super(qs, io), this.renderer = void 0, this.splatRenderMode = e, this.dynamicMode = s, this.enableOptionalEffects = t, this.halfPrecisionCovariancesOnGPU = n, this.devicePixelRatio = r, this.enableDistancesComputationOnGPU = i, this.integerBasedDistancesComputation = o, this.antialiased = a, this.kernel2DSize = h, this.maxScreenSpaceSplatSize = l, this.logLevel = c, this.sphericalHarmonicsDegree = d, this.minSphericalHarmonicsDegree = 0, this.sceneFadeInRateMultiplier = u, this.scenes = [], this.splatTree = null, this.baseSplatTree = null, this.splatDataTextures = {}, this.distancesTransformFeedback = {
5266
+ }, qs = new sn(), ao = new ft(), Et = 6, lo = 4, co = 4, ho = 4, uo = 6, po = 8, Qt = 4, Nt = 4, Ks = 1, fo = 0.012, mo = 3e-3, js = 1, Ys = 16777216;
5267
+ class ye extends be {
5268
+ constructor(e = Le.ThreeD, s = !1, t = !1, n = !1, r = 1, i = !0, o = !1, a = !1, l = 1024, c = tt.None, d = 0, u = 1, h = 0.3) {
5269
+ super(qs, ao), this.renderer = void 0, this.splatRenderMode = e, this.dynamicMode = s, this.enableOptionalEffects = t, this.halfPrecisionCovariancesOnGPU = n, this.devicePixelRatio = r, this.enableDistancesComputationOnGPU = i, this.integerBasedDistancesComputation = o, this.antialiased = a, this.kernel2DSize = h, this.maxScreenSpaceSplatSize = l, this.logLevel = c, this.sphericalHarmonicsDegree = d, this.minSphericalHarmonicsDegree = 0, this.sceneFadeInRateMultiplier = u, this.scenes = [], this.splatTree = null, this.baseSplatTree = null, this.splatDataTextures = {}, this.distancesTransformFeedback = {
5270
5270
  id: null,
5271
5271
  vertexShader: null,
5272
5272
  fragmentShader: null,
@@ -5278,7 +5278,7 @@ class ye extends De {
5278
5278
  modelViewProjLoc: -1,
5279
5279
  sceneIndexesLoc: -1,
5280
5280
  transformsLocs: []
5281
- }, this.globalSplatIndexToLocalSplatIndexMap = [], this.globalSplatIndexToSceneIndexMap = [], this.lastBuildSplatCount = 0, this.lastBuildScenes = [], this.lastBuildMaxSplatCount = 0, this.lastBuildSceneCount = 0, this.firstRenderTime = -1, this.finalBuild = !1, this.webGLUtils = null, this.boundingBox = new it(), this.calculatedSceneCenter = new v(), this.maxSplatDistanceFromSceneCenter = 0, this.visibleRegionBufferRadius = 0, this.visibleRegionRadius = 0, this.visibleRegionFadeStartRadius = 0, this.visibleRegionChanging = !1, this.splatScale = 1, this.pointCloudModeEnabled = !1, this.disposed = !1, this.lastRenderer = null, this.visible = !1;
5281
+ }, this.globalSplatIndexToLocalSplatIndexMap = [], this.globalSplatIndexToSceneIndexMap = [], this.lastBuildSplatCount = 0, this.lastBuildScenes = [], this.lastBuildMaxSplatCount = 0, this.lastBuildSceneCount = 0, this.firstRenderTime = -1, this.finalBuild = !1, this.webGLUtils = null, this.boundingBox = new it(), this.calculatedSceneCenter = new B(), this.maxSplatDistanceFromSceneCenter = 0, this.visibleRegionBufferRadius = 0, this.visibleRegionRadius = 0, this.visibleRegionFadeStartRadius = 0, this.visibleRegionChanging = !1, this.splatScale = 1, this.pointCloudModeEnabled = !1, this.disposed = !1, this.lastRenderer = null, this.visible = !1;
5282
5282
  }
5283
5283
  /**
5284
5284
  * Build a container for each scene managed by this splat mesh based on an instance of SplatBuffer, along with optional
@@ -5300,7 +5300,7 @@ class ye extends De {
5300
5300
  for (let r = 0; r < s.length; r++) {
5301
5301
  const i = s[r], o = t[r] || {};
5302
5302
  let a = o.position || [0, 0, 0], l = o.rotation || [0, 0, 0, 1], c = o.scale || [1, 1, 1];
5303
- const d = new v().fromArray(a), u = new ge().fromArray(l), h = new v().fromArray(c), f = ye.createScene(
5303
+ const d = new B().fromArray(a), u = new ge().fromArray(l), h = new B().fromArray(c), f = ye.createScene(
5304
5304
  i,
5305
5305
  d,
5306
5306
  u,
@@ -5314,7 +5314,7 @@ class ye extends De {
5314
5314
  return n;
5315
5315
  }
5316
5316
  static createScene(e, s, t, n, r, i = 1, o = !0) {
5317
- return new $r(e, s, t, n, r, i, o);
5317
+ return new eo(e, s, t, n, r, i, o);
5318
5318
  }
5319
5319
  /**
5320
5320
  * Build data structures that map global splat indexes (based on a unified index across all splat buffers) to
@@ -5346,7 +5346,7 @@ class ye extends De {
5346
5346
  */
5347
5347
  buildSplatTree = function(e = [], s, t) {
5348
5348
  return new Promise((n) => {
5349
- this.disposeSplatTree(), this.baseSplatTree = new no(8, 1e3);
5349
+ this.disposeSplatTree(), this.baseSplatTree = new ro(8, 1e3);
5350
5350
  const r = performance.now(), i = new qt();
5351
5351
  this.baseSplatTree.processSplatMesh(this, (o) => {
5352
5352
  this.getSplatColor(o, i);
@@ -5417,7 +5417,7 @@ class ye extends De {
5417
5417
  }
5418
5418
  let u = !0;
5419
5419
  if ((this.scenes.length !== 1 || this.lastBuildSceneCount !== this.scenes.length || this.lastBuildMaxSplatCount !== a || d) && (u = !1), !u) {
5420
- this.boundingBox = new it(), o || (this.maxSplatDistanceFromSceneCenter = 0, this.visibleRegionBufferRadius = 0, this.visibleRegionRadius = 0, this.visibleRegionFadeStartRadius = 0, this.firstRenderTime = -1), this.lastBuildScenes = [], this.lastBuildSplatCount = 0, this.lastBuildMaxSplatCount = 0, this.disposeMeshData(), this.geometry = Zr.build(a), this.splatRenderMode === ke.ThreeD ? this.material = Ft.build(
5420
+ this.boundingBox = new it(), o || (this.maxSplatDistanceFromSceneCenter = 0, this.visibleRegionBufferRadius = 0, this.visibleRegionRadius = 0, this.visibleRegionFadeStartRadius = 0, this.firstRenderTime = -1), this.lastBuildScenes = [], this.lastBuildSplatCount = 0, this.lastBuildMaxSplatCount = 0, this.disposeMeshData(), this.geometry = $r.build(a), this.splatRenderMode === Le.ThreeD ? this.material = Ft.build(
5421
5421
  this.dynamicMode,
5422
5422
  this.enableOptionalEffects,
5423
5423
  this.antialiased,
@@ -5426,7 +5426,7 @@ class ye extends De {
5426
5426
  this.pointCloudModeEnabled,
5427
5427
  this.minSphericalHarmonicsDegree,
5428
5428
  this.kernel2DSize
5429
- ) : this.material = Dt.build(
5429
+ ) : this.material = bt.build(
5430
5430
  this.dynamicMode,
5431
5431
  this.enableOptionalEffects,
5432
5432
  this.splatScale,
@@ -5483,7 +5483,7 @@ class ye extends De {
5483
5483
  modelViewProjLoc: -1,
5484
5484
  sceneIndexesLoc: -1,
5485
5485
  transformsLocs: []
5486
- }, this.renderer = null, this.globalSplatIndexToLocalSplatIndexMap = [], this.globalSplatIndexToSceneIndexMap = [], this.lastBuildSplatCount = 0, this.lastBuildScenes = [], this.lastBuildMaxSplatCount = 0, this.lastBuildSceneCount = 0, this.firstRenderTime = -1, this.finalBuild = !1, this.webGLUtils = null, this.boundingBox = new it(), this.calculatedSceneCenter = new v(), this.maxSplatDistanceFromSceneCenter = 0, this.visibleRegionBufferRadius = 0, this.visibleRegionRadius = 0, this.visibleRegionFadeStartRadius = 0, this.visibleRegionChanging = !1, this.splatScale = 1, this.pointCloudModeEnabled = !1, this.disposed = !0, this.lastRenderer = null, this.visible = !1;
5486
+ }, this.renderer = null, this.globalSplatIndexToLocalSplatIndexMap = [], this.globalSplatIndexToSceneIndexMap = [], this.lastBuildSplatCount = 0, this.lastBuildScenes = [], this.lastBuildMaxSplatCount = 0, this.lastBuildSceneCount = 0, this.firstRenderTime = -1, this.finalBuild = !1, this.webGLUtils = null, this.boundingBox = new it(), this.calculatedSceneCenter = new B(), this.maxSplatDistanceFromSceneCenter = 0, this.visibleRegionBufferRadius = 0, this.visibleRegionRadius = 0, this.visibleRegionFadeStartRadius = 0, this.visibleRegionChanging = !1, this.splatScale = 1, this.pointCloudModeEnabled = !1, this.disposed = !0, this.lastRenderer = null, this.visible = !1;
5487
5487
  }
5488
5488
  /**
5489
5489
  * Dispose of only the Three.js mesh resources (geometry, material, and texture)
@@ -5560,20 +5560,20 @@ class ye extends De {
5560
5560
  setupDataTextures() {
5561
5561
  const e = this.getMaxSplatCount(), s = this.getSplatCount(!0);
5562
5562
  this.disposeTextures();
5563
- const t = (S, E) => {
5563
+ const t = (S, v) => {
5564
5564
  const F = new N(4096, 1024);
5565
- for (; F.x * F.y * S < e * E; ) F.y *= 2;
5565
+ for (; F.x * F.y * S < e * v; ) F.y *= 2;
5566
5566
  return F;
5567
- }, n = (S) => S >= 1 ? ho : lo, r = (S) => {
5568
- const E = n(S), F = t(E, 6);
5569
- return { elementsPerTexelStored: E, texSize: F };
5567
+ }, n = (S) => S >= 1 ? uo : co, r = (S) => {
5568
+ const v = n(S), F = t(v, 6);
5569
+ return { elementsPerTexelStored: v, texSize: F };
5570
5570
  };
5571
5571
  let i = this.getTargetCovarianceCompressionLevel();
5572
5572
  const o = 0, a = this.getTargetSphericalHarmonicsCompressionLevel();
5573
5573
  let l, c, d;
5574
- if (this.splatRenderMode === ke.ThreeD) {
5574
+ if (this.splatRenderMode === Le.ThreeD) {
5575
5575
  const S = r(i);
5576
- S.texSize.x * S.texSize.y > Ys && i === 0 && (i = 1), l = new Float32Array(e * Bt);
5576
+ S.texSize.x * S.texSize.y > Ys && i === 0 && (i = 1), l = new Float32Array(e * Et);
5577
5577
  } else
5578
5578
  c = new Float32Array(e * 3), d = new Float32Array(e * 4);
5579
5579
  const u = new Float32Array(e * 3), h = new Uint8Array(e * 4);
@@ -5581,7 +5581,7 @@ class ye extends De {
5581
5581
  a === 1 ? f = Uint16Array : a === 2 && (f = Uint8Array);
5582
5582
  const p = $e(this.minSphericalHarmonicsDegree), A = this.minSphericalHarmonicsDegree ? new f(e * p) : void 0, C = t(Nt, 4), g = new Uint32Array(C.x * C.y * Nt);
5583
5583
  ye.updateCenterColorsPaddedData(0, s - 1, u, h, g);
5584
- const x = new Ue(
5584
+ const x = new ze(
5585
5585
  g,
5586
5586
  C.x,
5587
5587
  C.y,
@@ -5602,14 +5602,14 @@ class ye extends De {
5602
5602
  texture: x,
5603
5603
  size: C
5604
5604
  }
5605
- }, this.splatRenderMode === ke.ThreeD) {
5606
- const S = r(i), E = S.elementsPerTexelStored, F = S.texSize;
5607
- let b = i >= 1 ? Uint32Array : Float32Array;
5608
- const D = i >= 1 ? uo : co, R = new b(F.x * F.y * D);
5605
+ }, this.splatRenderMode === Le.ThreeD) {
5606
+ const S = r(i), v = S.elementsPerTexelStored, F = S.texSize;
5607
+ let D = i >= 1 ? Uint32Array : Float32Array;
5608
+ const b = i >= 1 ? po : ho, R = new D(F.x * F.y * b);
5609
5609
  i === 0 ? R.set(l) : ye.updatePaddedCompressedCovariancesTextureData(l, R, 0, 0, l.length);
5610
5610
  let k;
5611
5611
  if (i >= 1)
5612
- k = new Ue(
5612
+ k = new ze(
5613
5613
  R,
5614
5614
  F.x,
5615
5615
  F.y,
@@ -5617,8 +5617,8 @@ class ye extends De {
5617
5617
  at
5618
5618
  ), k.internalFormat = "RGBA32UI", this.material.uniforms.covariancesTextureHalfFloat.value = k;
5619
5619
  else {
5620
- k = new Ue(R, F.x, F.y, Et, ms), this.material.uniforms.covariancesTexture.value = k;
5621
- const M = new Ue(new Uint32Array(32), 2, 2, Pt, at);
5620
+ k = new ze(R, F.x, F.y, vt, ms), this.material.uniforms.covariancesTexture.value = k;
5621
+ const M = new ze(new Uint32Array(32), 2, 2, Pt, at);
5622
5622
  M.internalFormat = "RGBA32UI", this.material.uniforms.covariancesTextureHalfFloat.value = M, M.needsUpdate = !0;
5623
5623
  }
5624
5624
  k.needsUpdate = !0, this.material.uniforms.covariancesAreHalfFloat.value = i >= 1 ? 1 : 0, this.material.uniforms.covariancesTextureSize.value.copy(F), this.splatDataTextures.covariances = {
@@ -5626,56 +5626,56 @@ class ye extends De {
5626
5626
  texture: k,
5627
5627
  size: F,
5628
5628
  compressionLevel: i,
5629
- elementsPerTexelStored: E,
5630
- elementsPerTexelAllocated: D
5629
+ elementsPerTexelStored: v,
5630
+ elementsPerTexelAllocated: b
5631
5631
  };
5632
5632
  } else {
5633
- const E = t(Qt, 6);
5634
- let F = Float32Array, b = ms;
5635
- const D = new F(E.x * E.y * Qt);
5636
- ye.updateScaleRotationsPaddedData(0, s - 1, c, d, D);
5637
- const R = new Ue(
5638
- D,
5639
- E.x,
5640
- E.y,
5641
- Et,
5642
- b
5633
+ const v = t(Qt, 6);
5634
+ let F = Float32Array, D = ms;
5635
+ const b = new F(v.x * v.y * Qt);
5636
+ ye.updateScaleRotationsPaddedData(0, s - 1, c, d, b);
5637
+ const R = new ze(
5638
+ b,
5639
+ v.x,
5640
+ v.y,
5641
+ vt,
5642
+ D
5643
5643
  );
5644
- R.needsUpdate = !0, this.material.uniforms.scaleRotationsTexture.value = R, this.material.uniforms.scaleRotationsTextureSize.value.copy(E), this.splatDataTextures.scaleRotations = {
5645
- data: D,
5644
+ R.needsUpdate = !0, this.material.uniforms.scaleRotationsTexture.value = R, this.material.uniforms.scaleRotationsTextureSize.value.copy(v), this.splatDataTextures.scaleRotations = {
5645
+ data: b,
5646
5646
  texture: R,
5647
- size: E,
5647
+ size: v,
5648
5648
  compressionLevel: o
5649
5649
  };
5650
5650
  }
5651
5651
  if (A) {
5652
5652
  const S = a === 2 ? yn : xn;
5653
- let E = p;
5654
- E % 2 !== 0 && E++;
5655
- const F = 4, b = Et;
5656
- let D = t(F, E);
5657
- if (D.x * D.y <= Ys) {
5658
- const R = D.x * D.y * F, k = new f(R);
5653
+ let v = p;
5654
+ v % 2 !== 0 && v++;
5655
+ const F = 4, D = vt;
5656
+ let b = t(F, v);
5657
+ if (b.x * b.y <= Ys) {
5658
+ const R = b.x * b.y * F, k = new f(R);
5659
5659
  for (let O = 0; O < s; O++) {
5660
- const L = p * O, U = E * O;
5660
+ const L = p * O, U = v * O;
5661
5661
  for (let _ = 0; _ < p; _++)
5662
5662
  k[U + _] = A[L + _];
5663
5663
  }
5664
- const M = new Ue(k, D.x, D.y, b, S);
5664
+ const M = new ze(k, b.x, b.y, D, S);
5665
5665
  M.needsUpdate = !0, this.material.uniforms.sphericalHarmonicsTexture.value = M, this.splatDataTextures.sphericalHarmonics = {
5666
5666
  componentCount: p,
5667
- paddedComponentCount: E,
5667
+ paddedComponentCount: v,
5668
5668
  data: k,
5669
5669
  textureCount: 1,
5670
5670
  texture: M,
5671
- size: D,
5671
+ size: b,
5672
5672
  compressionLevel: a,
5673
5673
  elementsPerTexel: F
5674
5674
  };
5675
5675
  } else {
5676
5676
  const R = p / 3;
5677
- E = R, E % 2 !== 0 && E++, D = t(F, E);
5678
- const k = D.x * D.y * F, M = [
5677
+ v = R, v % 2 !== 0 && v++, b = t(F, v);
5678
+ const k = b.x * b.y * F, M = [
5679
5679
  this.material.uniforms.sphericalHarmonicsTextureR,
5680
5680
  this.material.uniforms.sphericalHarmonicsTextureG,
5681
5681
  this.material.uniforms.sphericalHarmonicsTextureB
@@ -5684,29 +5684,29 @@ class ye extends De {
5684
5684
  const _ = new f(k);
5685
5685
  O.push(_);
5686
5686
  for (let Q = 0; Q < s; Q++) {
5687
- const ee = p * Q, le = E * Q;
5687
+ const ee = p * Q, le = v * Q;
5688
5688
  if (R >= 3) {
5689
5689
  for (let V = 0; V < 3; V++) _[le + V] = A[ee + U * 3 + V];
5690
5690
  if (R >= 8)
5691
5691
  for (let V = 0; V < 5; V++) _[le + 3 + V] = A[ee + 9 + U * 5 + V];
5692
5692
  }
5693
5693
  }
5694
- const H = new Ue(_, D.x, D.y, b, S);
5694
+ const H = new ze(_, b.x, b.y, D, S);
5695
5695
  L.push(H), H.needsUpdate = !0, M[U].value = H;
5696
5696
  }
5697
5697
  this.material.uniforms.sphericalHarmonicsMultiTextureMode.value = 1, this.splatDataTextures.sphericalHarmonics = {
5698
5698
  componentCount: p,
5699
5699
  componentCountPerChannel: R,
5700
- paddedComponentCount: E,
5700
+ paddedComponentCount: v,
5701
5701
  data: O,
5702
5702
  textureCount: 3,
5703
5703
  textures: L,
5704
- size: D,
5704
+ size: b,
5705
5705
  compressionLevel: a,
5706
5706
  elementsPerTexel: F
5707
5707
  };
5708
5708
  }
5709
- this.material.uniforms.sphericalHarmonicsTextureSize.value.copy(D), this.material.uniforms.sphericalHarmonics8BitMode.value = a === 2 ? 1 : 0;
5709
+ this.material.uniforms.sphericalHarmonicsTextureSize.value.copy(b), this.material.uniforms.sphericalHarmonics8BitMode.value = a === 2 ? 1 : 0;
5710
5710
  for (let R = 0; R < this.scenes.length; R++) {
5711
5711
  const k = this.scenes[R].splatBuffer;
5712
5712
  this.material.uniforms.sphericalHarmonics8BitCompressionRangeMin.value[R] = k.minSphericalHarmonicsCoeff, this.material.uniforms.sphericalHarmonics8BitCompressionRangeMax.value[R] = k.maxSphericalHarmonicsCoeff;
@@ -5715,16 +5715,16 @@ class ye extends De {
5715
5715
  }
5716
5716
  const w = t(Ks, 4), y = new Uint32Array(w.x * w.y * Ks);
5717
5717
  for (let S = 0; S < s; S++) y[S] = this.globalSplatIndexToSceneIndexMap[S];
5718
- const B = new Ue(
5718
+ const E = new ze(
5719
5719
  y,
5720
5720
  w.x,
5721
5721
  w.y,
5722
5722
  In,
5723
5723
  at
5724
5724
  );
5725
- B.internalFormat = "R32UI", B.needsUpdate = !0, this.material.uniforms.sceneIndexesTexture.value = B, this.material.uniforms.sceneIndexesTextureSize.value.copy(w), this.material.uniformsNeedUpdate = !0, this.splatDataTextures.sceneIndexes = {
5725
+ E.internalFormat = "R32UI", E.needsUpdate = !0, this.material.uniforms.sceneIndexesTexture.value = E, this.material.uniforms.sceneIndexesTextureSize.value.copy(w), this.material.uniformsNeedUpdate = !0, this.splatDataTextures.sceneIndexes = {
5726
5726
  data: y,
5727
- texture: B,
5727
+ texture: E,
5728
5728
  size: w
5729
5729
  }, this.material.uniforms.sceneCount.value = this.scenes.length;
5730
5730
  }
@@ -5762,16 +5762,16 @@ class ye extends De {
5762
5762
  l.size,
5763
5763
  u,
5764
5764
  Nt,
5765
- ao,
5765
+ lo,
5766
5766
  4,
5767
5767
  e,
5768
5768
  s
5769
5769
  ), t) {
5770
- const g = t.texture, x = e * Bt, w = s * Bt;
5770
+ const g = t.texture, x = e * Et, w = s * Et;
5771
5771
  if (n === 0)
5772
- for (let B = x; B <= w; B++) {
5773
- const S = this.splatDataTextures.baseData.covariances[B];
5774
- t.data[B] = S;
5772
+ for (let E = x; E <= w; E++) {
5773
+ const S = this.splatDataTextures.baseData.covariances[E];
5774
+ t.data[E] = S;
5775
5775
  }
5776
5776
  else
5777
5777
  ye.updatePaddedCompressedCovariancesTextureData(
@@ -5788,7 +5788,7 @@ class ye extends De {
5788
5788
  t.size,
5789
5789
  y,
5790
5790
  t.elementsPerTexelStored,
5791
- Bt,
5791
+ Et,
5792
5792
  4,
5793
5793
  e,
5794
5794
  s
@@ -5813,12 +5813,12 @@ class ye extends De {
5813
5813
  this.splatDataTextures.baseData.rotations,
5814
5814
  g
5815
5815
  );
5816
- const B = this.renderer ? this.renderer.properties.get(x) : null;
5817
- !B || !B.__webglTexture ? x.needsUpdate = !0 : this.updateDataTexture(
5816
+ const E = this.renderer ? this.renderer.properties.get(x) : null;
5817
+ !E || !E.__webglTexture ? x.needsUpdate = !0 : this.updateDataTexture(
5818
5818
  g,
5819
5819
  r.texture,
5820
5820
  r.size,
5821
- B,
5821
+ E,
5822
5822
  Qt,
5823
5823
  w,
5824
5824
  y,
@@ -5830,51 +5830,51 @@ class ye extends De {
5830
5830
  if (h) {
5831
5831
  let g = 4;
5832
5832
  a === 1 ? g = 2 : a === 2 && (g = 1);
5833
- const x = (B, S, E, F, b) => {
5834
- const D = this.renderer ? this.renderer.properties.get(B) : null;
5835
- !D || !D.__webglTexture ? B.needsUpdate = !0 : this.updateDataTexture(
5833
+ const x = (E, S, v, F, D) => {
5834
+ const b = this.renderer ? this.renderer.properties.get(E) : null;
5835
+ !b || !b.__webglTexture ? E.needsUpdate = !0 : this.updateDataTexture(
5836
5836
  F,
5837
- B,
5838
- S,
5839
- D,
5840
5837
  E,
5838
+ S,
5841
5839
  b,
5840
+ v,
5841
+ D,
5842
5842
  g,
5843
5843
  e,
5844
5844
  s
5845
5845
  );
5846
5846
  }, w = o.componentCount, y = o.paddedComponentCount;
5847
5847
  if (o.textureCount === 1) {
5848
- const B = o.data;
5848
+ const E = o.data;
5849
5849
  for (let S = e; S <= s; S++) {
5850
- const E = w * S, F = y * S;
5851
- for (let b = 0; b < w; b++)
5852
- B[F + b] = h[E + b];
5850
+ const v = w * S, F = y * S;
5851
+ for (let D = 0; D < w; D++)
5852
+ E[F + D] = h[v + D];
5853
5853
  }
5854
5854
  x(
5855
5855
  o.texture,
5856
5856
  o.size,
5857
5857
  o.elementsPerTexel,
5858
- B,
5858
+ E,
5859
5859
  y
5860
5860
  );
5861
5861
  } else {
5862
- const B = o.componentCountPerChannel;
5862
+ const E = o.componentCountPerChannel;
5863
5863
  for (let S = 0; S < 3; S++) {
5864
- const E = o.data[S];
5864
+ const v = o.data[S];
5865
5865
  for (let F = e; F <= s; F++) {
5866
- const b = w * F, D = y * F;
5867
- if (B >= 3) {
5868
- for (let R = 0; R < 3; R++) E[D + R] = h[b + S * 3 + R];
5869
- if (B >= 8)
5870
- for (let R = 0; R < 5; R++) E[D + 3 + R] = h[b + 9 + S * 5 + R];
5866
+ const D = w * F, b = y * F;
5867
+ if (E >= 3) {
5868
+ for (let R = 0; R < 3; R++) v[b + R] = h[D + S * 3 + R];
5869
+ if (E >= 8)
5870
+ for (let R = 0; R < 5; R++) v[b + 3 + R] = h[D + 9 + S * 5 + R];
5871
5871
  }
5872
5872
  }
5873
5873
  x(
5874
5874
  o.textures[S],
5875
5875
  o.size,
5876
5876
  o.elementsPerTexel,
5877
- E,
5877
+ v,
5878
5878
  y
5879
5879
  );
5880
5880
  }
@@ -5953,7 +5953,7 @@ class ye extends De {
5953
5953
  static updateCenterColorsPaddedData(e, s, t, n, r) {
5954
5954
  for (let i = e; i <= s; i++) {
5955
5955
  const o = i * 4, a = i * 3, l = i * 4;
5956
- r[l] = Gn(n, o), r[l + 1] = Ot(t[a]), r[l + 2] = Ot(t[a + 1]), r[l + 3] = Ot(t[a + 2]);
5956
+ r[l] = Wn(n, o), r[l + 1] = Ot(t[a]), r[l + 2] = Ot(t[a + 1]), r[l + 3] = Ot(t[a + 2]);
5957
5957
  }
5958
5958
  }
5959
5959
  static updateScaleRotationsPaddedData(e, s, t, n, r) {
@@ -5963,9 +5963,9 @@ class ye extends De {
5963
5963
  }
5964
5964
  }
5965
5965
  updateVisibleRegion(e) {
5966
- const s = this.getSplatCount(!0), t = new v();
5966
+ const s = this.getSplatCount(!0), t = new B();
5967
5967
  if (!e) {
5968
- const r = new v();
5968
+ const r = new B();
5969
5969
  this.scenes.forEach((i) => {
5970
5970
  r.add(i.splatBuffer.sceneCenter);
5971
5971
  }), r.multiplyScalar(1 / this.scenes.length), this.calculatedSceneCenter.copy(r), this.material.uniforms.sceneCenter.value.copy(this.calculatedSceneCenter), this.material.uniformsNeedUpdate = !0;
@@ -5979,7 +5979,7 @@ class ye extends De {
5979
5979
  this.maxSplatDistanceFromSceneCenter - this.visibleRegionBufferRadius > js && (this.visibleRegionBufferRadius = this.maxSplatDistanceFromSceneCenter, this.visibleRegionRadius = Math.max(this.visibleRegionBufferRadius - js, 0)), this.finalBuild && (this.visibleRegionRadius = this.visibleRegionBufferRadius = this.maxSplatDistanceFromSceneCenter), this.updateVisibleRegionFadeDistance();
5980
5980
  }
5981
5981
  updateVisibleRegionFadeDistance(e = pt.Default) {
5982
- const s = po * this.sceneFadeInRateMultiplier, t = fo * this.sceneFadeInRateMultiplier, n = this.finalBuild ? s : t, r = e === pt.Default ? n : t;
5982
+ const s = fo * this.sceneFadeInRateMultiplier, t = mo * this.sceneFadeInRateMultiplier, n = this.finalBuild ? s : t, r = e === pt.Default ? n : t;
5983
5983
  this.visibleRegionFadeStartRadius = (this.visibleRegionRadius - this.visibleRegionFadeStartRadius) * r + this.visibleRegionFadeStartRadius;
5984
5984
  const o = (this.visibleRegionBufferRadius > 0 ? this.visibleRegionFadeStartRadius / this.visibleRegionBufferRadius : 0) > 0.99, a = o || e === pt.Instant ? 1 : 0;
5985
5985
  this.material.uniforms.visibleRegionFadeStartRadius.value = this.visibleRegionFadeStartRadius, this.material.uniforms.visibleRegionRadius.value = this.visibleRegionRadius, this.material.uniforms.firstRenderTime.value = this.firstRenderTime, this.material.uniforms.currentTime.value = performance.now(), this.material.uniforms.fadeInComplete.value = a, this.material.uniformsNeedUpdate = !0, this.visibleRegionChanging = !o;
@@ -6079,7 +6079,7 @@ class ye extends De {
6079
6079
  setRenderer(e) {
6080
6080
  if (e !== this.renderer) {
6081
6081
  this.renderer = e;
6082
- const s = this.renderer.getContext(), t = new ro(s), n = new oo(s, t, {});
6082
+ const s = this.renderer.getContext(), t = new oo(s), n = new io(s, t, {});
6083
6083
  if (t.init(n), this.webGLUtils = new Tn(s, t), this.enableDistancesComputationOnGPU && this.getSplatCount() > 0) {
6084
6084
  this.setupDistancesComputationTransformFeedback();
6085
6085
  const { centers: r, sceneIndexes: i } = this.getDataForDistancesComputation(0, this.getSplatCount() - 1);
@@ -6310,22 +6310,22 @@ class ye extends De {
6310
6310
  * @param {number} destStart The start location from which to write data
6311
6311
  */
6312
6312
  fillSplatDataArrays(e, s, t, n, r, i, o, a = 0, l = 0, c = 1, d, u, h = 0, f) {
6313
- const p = new v();
6314
- p.x = void 0, p.y = void 0, this.splatRenderMode === ke.ThreeD ? p.z = void 0 : p.z = 1;
6313
+ const p = new B();
6314
+ p.x = void 0, p.y = void 0, this.splatRenderMode === Le.ThreeD ? p.z = void 0 : p.z = 1;
6315
6315
  const A = new J();
6316
6316
  let C = 0, g = this.scenes.length - 1;
6317
6317
  f != null && f >= 0 && f <= this.scenes.length && (C = f, g = f);
6318
6318
  for (let x = C; x <= g; x++) {
6319
6319
  o == null && (o = !this.dynamicMode);
6320
6320
  const w = this.getScene(x), y = w.splatBuffer;
6321
- let B;
6322
- if (o && (this.getSceneTransform(x, A), B = A), e && y.fillSplatCovarianceArray(e, B, d, u, h, a), s || t) {
6321
+ let E;
6322
+ if (o && (this.getSceneTransform(x, A), E = A), e && y.fillSplatCovarianceArray(e, E, d, u, h, a), s || t) {
6323
6323
  if (!s || !t)
6324
6324
  throw new Error('SplatMesh::fillSplatDataArrays() -> "scales" and "rotations" must both be valid.');
6325
6325
  y.fillSplatScaleRotationArray(
6326
6326
  s,
6327
6327
  t,
6328
- B,
6328
+ E,
6329
6329
  d,
6330
6330
  u,
6331
6331
  h,
@@ -6333,10 +6333,10 @@ class ye extends De {
6333
6333
  p
6334
6334
  );
6335
6335
  }
6336
- n && y.fillSplatCenterArray(n, B, d, u, h), r && y.fillSplatColorArray(r, w.minimumAlpha, d, u, h), i && y.fillSphericalHarmonicsArray(
6336
+ n && y.fillSplatCenterArray(n, E, d, u, h), r && y.fillSplatColorArray(r, w.minimumAlpha, d, u, h), i && y.fillSphericalHarmonicsArray(
6337
6337
  i,
6338
6338
  this.minSphericalHarmonicsDegree,
6339
- B,
6339
+ E,
6340
6340
  d,
6341
6341
  u,
6342
6342
  h,
@@ -6409,9 +6409,9 @@ class ye extends De {
6409
6409
  * the default behavior will apply.
6410
6410
  */
6411
6411
  getSplatScaleAndRotation = (function() {
6412
- const e = {}, s = new v();
6412
+ const e = {}, s = new B();
6413
6413
  return function(t, n, r, i) {
6414
- this.getLocalSplatParameters(t, e, i), s.x = void 0, s.y = void 0, s.z = void 0, this.splatRenderMode === ke.TwoD && (s.z = 0), e.splatBuffer.getSplatScaleAndRotation(
6414
+ this.getLocalSplatParameters(t, e, i), s.x = void 0, s.y = void 0, s.z = void 0, this.splatRenderMode === Le.TwoD && (s.z = 0), e.splatBuffer.getSplatScaleAndRotation(
6415
6415
  e.localIndex,
6416
6416
  n,
6417
6417
  r,
@@ -6493,7 +6493,7 @@ class ye extends De {
6493
6493
  void 0,
6494
6494
  s
6495
6495
  );
6496
- const r = new v(), i = new v();
6496
+ const r = new B(), i = new B();
6497
6497
  for (let o = 0; o < t; o++) {
6498
6498
  const a = o * 3, l = n[a], c = n[a + 1], d = n[a + 2];
6499
6499
  (o === 0 || l < r.x) && (r.x = l), (o === 0 || c < r.y) && (r.y = c), (o === 0 || d < r.z) && (r.z = d), (o === 0 || l > i.x) && (i.x = l), (o === 0 || c > i.y) && (i.y = c), (o === 0 || d > i.z) && (i.z = d);
@@ -6501,24 +6501,24 @@ class ye extends De {
6501
6501
  return new it(r, i);
6502
6502
  }
6503
6503
  }
6504
- var mo = "AGFzbQEAAAAADwhkeWxpbmsuMAEEAAAAAAEbA2AAAGAQf39/f39/f39/f39/f39/fwBgAAF/AhIBA2VudgZtZW1vcnkCAwCAgAQDBAMAAQIHVAQRX193YXNtX2NhbGxfY3RvcnMAABhfX3dhc21fYXBwbHlfZGF0YV9yZWxvY3MAAAtzb3J0SW5kZXhlcwABE2Vtc2NyaXB0ZW5fdGxzX2luaXQAAgqWEAMDAAELihAEAXwDewN/A30gCyAKayEMAkACQCAOBEAgDQRAQfj///8HIQpBiICAgHghDSALIAxNDQMgDCEBA0AgAyABQQJ0IgVqIAIgACAFaigCAEECdGooAgAiBTYCACAFIAogBSAKSBshCiAFIA0gBSANShshDSABQQFqIgEgC0cNAAsMAwsgDwRAIAsgDE0NAkF/IQ9B+P///wchCkGIgICAeCENIAwhAgNAIA8gByAAIAJBAnQiFWooA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yADIBhqAn8gFSABIBlBAnRqIg4qAgyUIBYgDioCCJQgESAOKgIAlCAXIA4qAgSUkpKSu0QAAAAAAACwQKIiEJlEAAAAAAAA4EFjBEAgEKoMAQtBgICAgHgLIg42AgAgCiAOIAogDkgbIQogDSAOIA0gDkobIQ0gAkEBaiICIAtHDQALDAELQYiAgIB4IQ1B+P///wchCgsgCyAMSwRAIAlBAWuzIA2yIAqyk5UhESAMIQ0DQAJ/IBEgAyANQQJ0aiIBKAIAIAprspQiEotDAAAAT10EQCASqAwBC0GAgICAeAshDiABIA42AgAgBCAOQQJ0aiIBIAEoAgBBAWo2AgAgDUEBaiINIAtHDQALCyAJQQJPBEAgBCgCACENQQEhCgNAIAQgCkECdGoiASABKAIAIA1qIg02AgAgCkEBaiIKIAlHDQALCyAMQQBKBEAgDCEKA0AgBiAKQQFrIgFBAnQiAmogACACaigCADYCACAKQQFLIAEhCg0ACwsgCyAMSgRAIAshCgNAIAYgCyAEIAMgCkEBayIKQQJ0IgFqKAIAQQJ0aiICKAIAIgVrQQJ0aiAAIAFqKAIANgIAIAIgBUEBazYCACAKIAxKDQALCws=";
6505
+ function So(m) {
6506
6506
  let e, s, t, n, r, i, o, a, l, c, d, u, h, f, p, A, C, g, x, w;
6507
- function y(B, S, E, F, b, D, R) {
6507
+ function y(E, S, v, F, D, b, R) {
6508
6508
  const k = performance.now();
6509
- if (!t && (new Uint32Array(s, o, b.byteLength / w.BytesPerInt).set(b), new Float32Array(s, c, R.byteLength / w.BytesPerFloat).set(R), F)) {
6509
+ if (!t && (new Uint32Array(s, o, D.byteLength / w.BytesPerInt).set(D), new Float32Array(s, c, R.byteLength / w.BytesPerFloat).set(R), F)) {
6510
6510
  let _;
6511
6511
  n ? _ = new Int32Array(
6512
6512
  s,
6513
6513
  d,
6514
- D.byteLength / w.BytesPerInt
6514
+ b.byteLength / w.BytesPerInt
6515
6515
  ) : _ = new Float32Array(
6516
6516
  s,
6517
6517
  d,
6518
- D.byteLength / w.BytesPerFloat
6519
- ), _.set(D);
6518
+ b.byteLength / w.BytesPerFloat
6519
+ ), _.set(b);
6520
6520
  }
6521
- A || (A = new Uint32Array(g)), new Float32Array(s, p, 16).set(E), new Uint32Array(s, h, g).set(A), e.exports.sortIndexes(
6521
+ A || (A = new Uint32Array(g)), new Float32Array(s, p, 16).set(v), new Uint32Array(s, h, g).set(A), e.exports.sortIndexes(
6522
6522
  o,
6523
6523
  f,
6524
6524
  d,
@@ -6529,7 +6529,7 @@ function Co(m) {
6529
6529
  l,
6530
6530
  c,
6531
6531
  g,
6532
- B,
6532
+ E,
6533
6533
  S,
6534
6534
  i,
6535
6535
  F,
@@ -6538,7 +6538,7 @@ function Co(m) {
6538
6538
  );
6539
6539
  const M = {
6540
6540
  sortDone: !0,
6541
- splatSortCount: B,
6541
+ splatSortCount: E,
6542
6542
  splatRenderCount: S,
6543
6543
  sortTime: 0
6544
6544
  };
@@ -6549,36 +6549,36 @@ function Co(m) {
6549
6549
  const O = performance.now();
6550
6550
  M.sortTime = O - k, m.postMessage(M);
6551
6551
  }
6552
- m.onmessage = (B) => {
6553
- if (B.data.centers)
6554
- centers = B.data.centers, sceneIndexes = B.data.sceneIndexes, n ? new Int32Array(
6552
+ m.onmessage = (E) => {
6553
+ if (E.data.centers)
6554
+ centers = E.data.centers, sceneIndexes = E.data.sceneIndexes, n ? new Int32Array(
6555
6555
  s,
6556
- f + B.data.range.from * w.BytesPerInt * 4,
6557
- B.data.range.count * 4
6556
+ f + E.data.range.from * w.BytesPerInt * 4,
6557
+ E.data.range.count * 4
6558
6558
  ).set(new Int32Array(centers)) : new Float32Array(
6559
6559
  s,
6560
- f + B.data.range.from * w.BytesPerFloat * 4,
6561
- B.data.range.count * 4
6560
+ f + E.data.range.from * w.BytesPerFloat * 4,
6561
+ E.data.range.count * 4
6562
6562
  ).set(new Float32Array(centers)), r && new Uint32Array(
6563
6563
  s,
6564
- l + B.data.range.from * 4,
6565
- B.data.range.count
6566
- ).set(new Uint32Array(sceneIndexes)), x = B.data.range.from + B.data.range.count;
6567
- else if (B.data.sort) {
6568
- const S = Math.min(B.data.sort.splatRenderCount || 0, x), E = Math.min(B.data.sort.splatSortCount || 0, x), F = B.data.sort.usePrecomputedDistances;
6569
- let b, D, R;
6570
- t || (b = B.data.sort.indexesToSort, R = B.data.sort.transforms, F && (D = B.data.sort.precomputedDistances)), y(
6571
- E,
6564
+ l + E.data.range.from * 4,
6565
+ E.data.range.count
6566
+ ).set(new Uint32Array(sceneIndexes)), x = E.data.range.from + E.data.range.count;
6567
+ else if (E.data.sort) {
6568
+ const S = Math.min(E.data.sort.splatRenderCount || 0, x), v = Math.min(E.data.sort.splatSortCount || 0, x), F = E.data.sort.usePrecomputedDistances;
6569
+ let D, b, R;
6570
+ t || (D = E.data.sort.indexesToSort, R = E.data.sort.transforms, F && (b = E.data.sort.precomputedDistances)), y(
6571
+ v,
6572
6572
  S,
6573
- B.data.sort.modelViewProj,
6573
+ E.data.sort.modelViewProj,
6574
6574
  F,
6575
- b,
6576
6575
  D,
6576
+ b,
6577
6577
  R
6578
6578
  );
6579
- } else if (B.data.init) {
6580
- w = B.data.init.Constants, i = B.data.init.splatCount, t = B.data.init.useSharedMemory, n = B.data.init.integerBasedSort, r = B.data.init.dynamicMode, g = B.data.init.distanceMapRange, x = 0;
6581
- const S = n ? w.BytesPerInt * 4 : w.BytesPerFloat * 4, E = new Uint8Array(B.data.init.sorterWasmBytes), F = 16 * w.BytesPerFloat, b = i * w.BytesPerInt, D = i * S, R = F, k = n ? i * w.BytesPerInt : i * w.BytesPerFloat, M = i * w.BytesPerInt, O = i * w.BytesPerInt, L = n ? g * w.BytesPerInt * 2 : g * w.BytesPerFloat * 2, U = r ? i * w.BytesPerInt : 0, _ = r ? w.MaxScenes * F : 0, H = w.MemoryPageSize * 32, Q = b + D + R + k + M + L + O + U + _ + H, ee = Math.floor(Q / w.MemoryPageSize) + 1, le = {
6579
+ } else if (E.data.init) {
6580
+ w = E.data.init.Constants, i = E.data.init.splatCount, t = E.data.init.useSharedMemory, n = E.data.init.integerBasedSort, r = E.data.init.dynamicMode, g = E.data.init.distanceMapRange, x = 0;
6581
+ const S = n ? w.BytesPerInt * 4 : w.BytesPerFloat * 4, v = new Uint8Array(E.data.init.sorterWasmBytes), F = 16 * w.BytesPerFloat, D = i * w.BytesPerInt, b = i * S, R = F, k = n ? i * w.BytesPerInt : i * w.BytesPerFloat, M = i * w.BytesPerInt, O = i * w.BytesPerInt, L = n ? g * w.BytesPerInt * 2 : g * w.BytesPerFloat * 2, U = r ? i * w.BytesPerInt : 0, _ = r ? w.MaxScenes * F : 0, H = w.MemoryPageSize * 32, Q = D + b + R + k + M + L + O + U + _ + H, ee = Math.floor(Q / w.MemoryPageSize) + 1, le = {
6582
6582
  module: {},
6583
6583
  env: {
6584
6584
  memory: new WebAssembly.Memory({
@@ -6588,8 +6588,8 @@ function Co(m) {
6588
6588
  })
6589
6589
  }
6590
6590
  };
6591
- WebAssembly.compile(E).then((V) => WebAssembly.instantiate(V, le)).then((V) => {
6592
- e = V, o = 0, f = o + b, p = f + D, d = p + R, u = d + k, h = u + M, a = h + L, l = a + O, c = l + U, s = le.env.memory.buffer, t ? m.postMessage({
6591
+ WebAssembly.compile(v).then((V) => WebAssembly.instantiate(V, le)).then((V) => {
6592
+ e = V, o = 0, f = o + D, p = f + b, d = p + R, u = d + k, h = u + M, a = h + L, l = a + O, c = l + U, s = le.env.memory.buffer, t ? m.postMessage({
6593
6593
  sortSetupPhase1Complete: !0,
6594
6594
  indexesToSortBuffer: s,
6595
6595
  indexesToSortOffset: o,
@@ -6606,17 +6606,17 @@ function Co(m) {
6606
6606
  }
6607
6607
  };
6608
6608
  }
6609
- function So(m, e, s, t, n, r = Y.DefaultSplatSortDistanceMapPrecision) {
6609
+ function yo(m, e, s, t, n, r = Y.DefaultSplatSortDistanceMapPrecision) {
6610
6610
  const i = new Worker(
6611
6611
  URL.createObjectURL(
6612
- new Blob(["(", Co.toString(), ")(self)"], {
6612
+ new Blob(["(", So.toString(), ")(self)"], {
6613
6613
  type: "application/javascript"
6614
6614
  })
6615
6615
  )
6616
6616
  );
6617
- let o = mo;
6617
+ let o = Ao;
6618
6618
  const a = Yt() ? on() : null;
6619
- !s && !e ? (o = Xs, a && a.major <= 16 && a.minor < 4 && (o = go)) : s ? e || a && a.major <= 16 && a.minor < 4 && (o = Ao) : o = Xs;
6619
+ !s && !e ? (o = Xs, a && a.major <= 16 && a.minor < 4 && (o = Co)) : s ? e || a && a.major <= 16 && a.minor < 4 && (o = go) : o = Xs;
6620
6620
  const l = atob(o), c = new Uint8Array(l.length);
6621
6621
  for (let d = 0; d < l.length; d++)
6622
6622
  c[d] = l.charCodeAt(d);
@@ -6708,7 +6708,7 @@ class nt {
6708
6708
  }
6709
6709
  nt.xrSessionIsGranted = !1;
6710
6710
  nt.registerSessionGrantedListener();
6711
- class yo {
6711
+ class xo {
6712
6712
  static createButton(e, s = {}) {
6713
6713
  const t = document.createElement("button");
6714
6714
  function n() {
@@ -6766,16 +6766,16 @@ class yo {
6766
6766
  const Vt = {
6767
6767
  Always: 0,
6768
6768
  Never: 2
6769
- }, xo = 50, Io = 0.75, To = 15e5, wo = 10, Bo = 2.5, Eo = 60;
6769
+ }, Io = 50, To = 0.75, wo = 15e5, Eo = 10, vo = 2.5, Bo = 60;
6770
6770
  class Ze {
6771
6771
  constructor(e = {}) {
6772
- if (e.cameraUp || (e.cameraUp = [0, 1, 0]), this.cameraUp = new v().fromArray(e.cameraUp), e.initialCameraPosition || (e.initialCameraPosition = [0, 10, 15]), this.initialCameraPosition = new v().fromArray(e.initialCameraPosition), e.initialCameraLookAt || (e.initialCameraLookAt = [0, 0, 0]), this.initialCameraLookAt = new v().fromArray(e.initialCameraLookAt), this.dropInMode = e.dropInMode || !1, (e.selfDrivenMode === void 0 || e.selfDrivenMode === null) && (e.selfDrivenMode = !0), this.selfDrivenMode = e.selfDrivenMode && !this.dropInMode, this.selfDrivenUpdateFunc = this.selfDrivenUpdate.bind(this), e.useBuiltInControls === void 0 && (e.useBuiltInControls = !0), this.useBuiltInControls = e.useBuiltInControls, this.rootElement = e.rootElement, this.ignoreDevicePixelRatio = e.ignoreDevicePixelRatio || !1, this.devicePixelRatio = this.ignoreDevicePixelRatio ? 1 : window.devicePixelRatio || 1, this.halfPrecisionCovariancesOnGPU = e.halfPrecisionCovariancesOnGPU || !1, this.threeScene = e.threeScene, this.renderer = e.renderer, this.camera = e.camera, this.gpuAcceleratedSort = e.gpuAcceleratedSort || !1, (e.integerBasedSort === void 0 || e.integerBasedSort === null) && (e.integerBasedSort = !0), this.integerBasedSort = e.integerBasedSort, (e.sharedMemoryForWorkers === void 0 || e.sharedMemoryForWorkers === null) && (e.sharedMemoryForWorkers = !0), this.sharedMemoryForWorkers = e.sharedMemoryForWorkers, this.dynamicScene = !!e.dynamicScene, this.antialiased = e.antialiased || !1, this.kernel2DSize = e.kernel2DSize === void 0 ? 0.3 : e.kernel2DSize, this.webXRMode = e.webXRMode || Ye.None, this.webXRMode !== Ye.None && (this.gpuAcceleratedSort = !1), this.webXRActive = !1, this.webXRSessionInit = e.webXRSessionInit || {}, this.renderMode = e.renderMode || Vt.Always, this.sceneRevealMode = e.sceneRevealMode || pt.Default, this.focalAdjustment = e.focalAdjustment || 1, this.maxScreenSpaceSplatSize = e.maxScreenSpaceSplatSize || 1024, this.logLevel = e.logLevel || tt.None, this.sphericalHarmonicsDegree = e.sphericalHarmonicsDegree || 0, this.enableOptionalEffects = e.enableOptionalEffects || !1, (e.enableSIMDInSort === void 0 || e.enableSIMDInSort === null) && (e.enableSIMDInSort = !0), this.enableSIMDInSort = e.enableSIMDInSort, (e.inMemoryCompressionLevel === void 0 || e.inMemoryCompressionLevel === null) && (e.inMemoryCompressionLevel = 0), this.inMemoryCompressionLevel = e.inMemoryCompressionLevel, (e.optimizeSplatData === void 0 || e.optimizeSplatData === null) && (e.optimizeSplatData = !0), this.optimizeSplatData = e.optimizeSplatData, (e.freeIntermediateSplatData === void 0 || e.freeIntermediateSplatData === null) && (e.freeIntermediateSplatData = !1), this.freeIntermediateSplatData = e.freeIntermediateSplatData, Yt()) {
6772
+ if (e.cameraUp || (e.cameraUp = [0, 1, 0]), this.cameraUp = new B().fromArray(e.cameraUp), e.initialCameraPosition || (e.initialCameraPosition = [0, 10, 15]), this.initialCameraPosition = new B().fromArray(e.initialCameraPosition), e.initialCameraLookAt || (e.initialCameraLookAt = [0, 0, 0]), this.initialCameraLookAt = new B().fromArray(e.initialCameraLookAt), this.dropInMode = e.dropInMode || !1, (e.selfDrivenMode === void 0 || e.selfDrivenMode === null) && (e.selfDrivenMode = !0), this.selfDrivenMode = e.selfDrivenMode && !this.dropInMode, this.selfDrivenUpdateFunc = this.selfDrivenUpdate.bind(this), e.useBuiltInControls === void 0 && (e.useBuiltInControls = !0), this.useBuiltInControls = e.useBuiltInControls, this.rootElement = e.rootElement, this.ignoreDevicePixelRatio = e.ignoreDevicePixelRatio || !1, this.devicePixelRatio = this.ignoreDevicePixelRatio ? 1 : window.devicePixelRatio || 1, this.halfPrecisionCovariancesOnGPU = e.halfPrecisionCovariancesOnGPU || !1, this.threeScene = e.threeScene, this.renderer = e.renderer, this.camera = e.camera, this.gpuAcceleratedSort = e.gpuAcceleratedSort || !1, (e.integerBasedSort === void 0 || e.integerBasedSort === null) && (e.integerBasedSort = !0), this.integerBasedSort = e.integerBasedSort, (e.sharedMemoryForWorkers === void 0 || e.sharedMemoryForWorkers === null) && (e.sharedMemoryForWorkers = !0), this.sharedMemoryForWorkers = e.sharedMemoryForWorkers, this.dynamicScene = !!e.dynamicScene, this.antialiased = e.antialiased || !1, this.kernel2DSize = e.kernel2DSize === void 0 ? 0.3 : e.kernel2DSize, this.webXRMode = e.webXRMode || Ye.None, this.webXRMode !== Ye.None && (this.gpuAcceleratedSort = !1), this.webXRActive = !1, this.webXRSessionInit = e.webXRSessionInit || {}, this.renderMode = e.renderMode || Vt.Always, this.sceneRevealMode = e.sceneRevealMode || pt.Default, this.focalAdjustment = e.focalAdjustment || 1, this.maxScreenSpaceSplatSize = e.maxScreenSpaceSplatSize || 1024, this.logLevel = e.logLevel || tt.None, this.sphericalHarmonicsDegree = e.sphericalHarmonicsDegree || 0, this.enableOptionalEffects = e.enableOptionalEffects || !1, (e.enableSIMDInSort === void 0 || e.enableSIMDInSort === null) && (e.enableSIMDInSort = !0), this.enableSIMDInSort = e.enableSIMDInSort, (e.inMemoryCompressionLevel === void 0 || e.inMemoryCompressionLevel === null) && (e.inMemoryCompressionLevel = 0), this.inMemoryCompressionLevel = e.inMemoryCompressionLevel, (e.optimizeSplatData === void 0 || e.optimizeSplatData === null) && (e.optimizeSplatData = !0), this.optimizeSplatData = e.optimizeSplatData, (e.freeIntermediateSplatData === void 0 || e.freeIntermediateSplatData === null) && (e.freeIntermediateSplatData = !1), this.freeIntermediateSplatData = e.freeIntermediateSplatData, Yt()) {
6773
6773
  const t = on();
6774
6774
  t.major < 17 && (this.enableSIMDInSort = !1), t.major < 16 && (this.sharedMemoryForWorkers = !1);
6775
6775
  }
6776
- (e.splatRenderMode === void 0 || e.splatRenderMode === null) && (e.splatRenderMode = ke.ThreeD), this.splatRenderMode = e.splatRenderMode, this.sceneFadeInRateMultiplier = e.sceneFadeInRateMultiplier || 1, this.splatSortDistanceMapPrecision = e.splatSortDistanceMapPrecision || Y.DefaultSplatSortDistanceMapPrecision;
6776
+ (e.splatRenderMode === void 0 || e.splatRenderMode === null) && (e.splatRenderMode = Le.ThreeD), this.splatRenderMode = e.splatRenderMode, this.sceneFadeInRateMultiplier = e.sceneFadeInRateMultiplier || 1, this.splatSortDistanceMapPrecision = e.splatSortDistanceMapPrecision || Y.DefaultSplatSortDistanceMapPrecision;
6777
6777
  const s = this.integerBasedSort ? 20 : 24;
6778
- this.splatSortDistanceMapPrecision = oe(this.splatSortDistanceMapPrecision, 10, s), this.onSplatMeshChangedCallback = null, this.createSplatMesh(), this.controls = null, this.perspectiveControls = null, this.orthographicControls = null, this.orthographicCamera = null, this.perspectiveCamera = null, this.showMeshCursor = !1, this.showControlPlane = !1, this.showInfo = !1, this.sceneHelper = null, this.sortWorker = null, this.sortRunning = !1, this.splatRenderCount = 0, this.splatSortCount = 0, this.lastSplatSortCount = 0, this.sortWorkerIndexesToSort = null, this.sortWorkerSortedIndexes = null, this.sortWorkerPrecomputedDistances = null, this.sortWorkerTransforms = null, this.preSortMessages = [], this.runAfterNextSort = [], this.selfDrivenModeRunning = !1, this.splatRenderReady = !1, this.raycaster = new Jr(), this.infoPanel = null, this.startInOrthographicMode = !1, this.currentFPS = 0, this.lastSortTime = 0, this.consecutiveRenderFrames = 0, this.previousCameraTarget = new v(), this.nextCameraTarget = new v(), this.mousePosition = new N(), this.mouseDownPosition = new N(), this.mouseDownTime = null, this.resizeObserver = null, this.mouseMoveListener = null, this.mouseDownListener = null, this.mouseUpListener = null, this.keyDownListener = null, this.sortPromise = null, this.sortPromiseResolver = null, this.splatSceneDownloadPromises = {}, this.splatSceneDownloadAndBuildPromise = null, this.splatSceneRemovalPromise = null, this.loadingSpinner = new ls(null, this.rootElement || document.body), this.loadingSpinner.hide(), this.loadingProgressBar = new Wr(this.rootElement || document.body), this.loadingProgressBar.hide(), this.infoPanel = new qr(this.rootElement || document.body), this.infoPanel.hide(), this.usingExternalCamera = !!(this.dropInMode || this.camera), this.usingExternalRenderer = !!(this.dropInMode || this.renderer), this.initialized = !1, this.disposing = !1, this.disposed = !1, this.disposePromise = null, this.dropInMode || this.init();
6778
+ this.splatSortDistanceMapPrecision = oe(this.splatSortDistanceMapPrecision, 10, s), this.onSplatMeshChangedCallback = null, this.createSplatMesh(), this.controls = null, this.perspectiveControls = null, this.orthographicControls = null, this.orthographicCamera = null, this.perspectiveCamera = null, this.showMeshCursor = !1, this.showControlPlane = !1, this.showInfo = !1, this.sceneHelper = null, this.sortWorker = null, this.sortRunning = !1, this.splatRenderCount = 0, this.splatSortCount = 0, this.lastSplatSortCount = 0, this.sortWorkerIndexesToSort = null, this.sortWorkerSortedIndexes = null, this.sortWorkerPrecomputedDistances = null, this.sortWorkerTransforms = null, this.preSortMessages = [], this.runAfterNextSort = [], this.selfDrivenModeRunning = !1, this.splatRenderReady = !1, this.raycaster = new Zr(), this.infoPanel = null, this.startInOrthographicMode = !1, this.currentFPS = 0, this.lastSortTime = 0, this.consecutiveRenderFrames = 0, this.previousCameraTarget = new B(), this.nextCameraTarget = new B(), this.mousePosition = new N(), this.mouseDownPosition = new N(), this.mouseDownTime = null, this.resizeObserver = null, this.mouseMoveListener = null, this.mouseDownListener = null, this.mouseUpListener = null, this.keyDownListener = null, this.sortPromise = null, this.sortPromiseResolver = null, this.splatSceneDownloadPromises = {}, this.splatSceneDownloadAndBuildPromise = null, this.splatSceneRemovalPromise = null, this.loadingSpinner = new ls(null, this.rootElement || document.body), this.loadingSpinner.hide(), this.loadingProgressBar = new qr(this.rootElement || document.body), this.loadingProgressBar.hide(), this.infoPanel = new Kr(this.rootElement || document.body), this.infoPanel.hide(), this.usingExternalCamera = !!(this.dropInMode || this.camera), this.usingExternalRenderer = !!(this.dropInMode || this.renderer), this.initialized = !1, this.disposing = !1, this.disposed = !1, this.disposePromise = null, this.dropInMode || this.init();
6779
6779
  }
6780
6780
  createSplatMesh() {
6781
6781
  this.splatMesh = new ye(
@@ -6800,7 +6800,7 @@ class Ze {
6800
6800
  setupCamera() {
6801
6801
  if (!this.usingExternalCamera) {
6802
6802
  const e = new N();
6803
- this.getRenderDimensions(e), this.perspectiveCamera = new Zs(xo, e.x / e.y, 0.1, 1e3), this.orthographicCamera = new $s(
6803
+ this.getRenderDimensions(e), this.perspectiveCamera = new Zs(Io, e.x / e.y, 0.1, 1e3), this.orthographicCamera = new $s(
6804
6804
  e.x / -2,
6805
6805
  e.x / 2,
6806
6806
  e.y / 2,
@@ -6822,7 +6822,7 @@ class Ze {
6822
6822
  }
6823
6823
  }
6824
6824
  setupWebXR(e) {
6825
- this.webXRMode && (this.webXRMode === Ye.VR ? this.rootElement.appendChild(nt.createButton(this.renderer, e)) : this.webXRMode === Ye.AR && this.rootElement.appendChild(yo.createButton(this.renderer, e)), this.renderer.xr.addEventListener("sessionstart", (s) => {
6825
+ this.webXRMode && (this.webXRMode === Ye.VR ? this.rootElement.appendChild(nt.createButton(this.renderer, e)) : this.webXRMode === Ye.AR && this.rootElement.appendChild(xo.createButton(this.renderer, e)), this.renderer.xr.addEventListener("sessionstart", (s) => {
6826
6826
  this.webXRActive = !0;
6827
6827
  }), this.renderer.xr.addEventListener("sessionend", (s) => {
6828
6828
  this.webXRActive = !1;
@@ -6852,7 +6852,7 @@ class Ze {
6852
6852
  this.onSplatMeshChangedCallback = e;
6853
6853
  }
6854
6854
  onKeyDown = (function() {
6855
- const e = new v(), s = new J(), t = new J();
6855
+ const e = new B(), s = new J(), t = new J();
6856
6856
  return function(n) {
6857
6857
  switch (e.set(0, 0, -1), e.transformDirection(this.camera.matrixWorld), s.makeRotationAxis(e, Math.PI / 128), t.makeRotationAxis(e, -Math.PI / 128), n.code) {
6858
6858
  case "KeyG":
@@ -6907,11 +6907,11 @@ class Ze {
6907
6907
  this.mousePosition.set(e.offsetX, e.offsetY), this.checkForFocalPointChange();
6908
6908
  }
6909
6909
  checkForFocalPointChange = (function() {
6910
- const e = new N(), s = new v(), t = [];
6910
+ const e = new N(), s = new B(), t = [];
6911
6911
  return function() {
6912
6912
  if (!this.transitioningCameraTarget && (this.getRenderDimensions(e), t.length = 0, this.raycaster.setFromCameraAndScreenPosition(this.camera, this.mousePosition, e), this.raycaster.intersectSplatMesh(this.splatMesh, t), t.length > 0)) {
6913
6913
  const r = t[0].origin;
6914
- s.copy(r).sub(this.camera.position), s.length() > Io && (this.previousCameraTarget.copy(this.controls.target), this.nextCameraTarget.copy(r), this.transitioningCameraTarget = !0, this.transitioningCameraTargetStartTime = Ke());
6914
+ s.copy(r).sub(this.camera.position), s.length() > To && (this.previousCameraTarget.copy(this.controls.target), this.nextCameraTarget.copy(r), this.transitioningCameraTarget = !0, this.transitioningCameraTargetStartTime = Ke());
6915
6915
  }
6916
6916
  };
6917
6917
  })();
@@ -6929,14 +6929,14 @@ class Ze {
6929
6929
  }
6930
6930
  }
6931
6931
  static setCameraPositionFromZoom = (function() {
6932
- const e = new v();
6932
+ const e = new B();
6933
6933
  return function(s, t, n) {
6934
6934
  const r = 1 / (t.zoom * 1e-3);
6935
6935
  e.copy(n.target).sub(s.position).normalize().multiplyScalar(r).negate(), s.position.copy(n.target).add(e);
6936
6936
  };
6937
6937
  })();
6938
6938
  static setCameraZoomFromPosition = (function() {
6939
- const e = new v();
6939
+ const e = new B();
6940
6940
  return function(s, t, n) {
6941
6941
  const r = e.copy(n.target).sub(t.position).length();
6942
6942
  s.zoom = 1 / (r * 1e-3);
@@ -7114,7 +7114,7 @@ class Ze {
7114
7114
  l = !0;
7115
7115
  const A = c.shift();
7116
7116
  n(A.splatBuffer, A.firstBuild, A.finalBuild).then(() => {
7117
- l = !1, A.firstBuild ? f.resolve() : A.finalBuild && (p.resolve(), this.clearSplatSceneDownloadAndBuildPromise()), c.length > 0 && ve(() => d());
7117
+ l = !1, A.firstBuild ? f.resolve() : A.finalBuild && (p.resolve(), this.clearSplatSceneDownloadAndBuildPromise()), c.length > 0 && Be(() => d());
7118
7118
  });
7119
7119
  }
7120
7120
  }, u = (A, C) => {
@@ -7190,7 +7190,7 @@ class Ze {
7190
7190
  );
7191
7191
  a.push(f), l.push(f.promise);
7192
7192
  }
7193
- const c = new _e((d, u) => {
7193
+ const c = new Qe((d, u) => {
7194
7194
  Promise.all(l).then((h) => {
7195
7195
  s && this.loadingSpinner.removeTask(i), t && t(0, "0%", ue.Processing), this.addSplatBuffers(h, e, !0, s, s, !1, !1).then(() => {
7196
7196
  t && t(100, "100%", ue.Processing), this.clearSplatSceneDownloadAndBuildPromise(), d();
@@ -7278,7 +7278,7 @@ class Ze {
7278
7278
  l !== null && (this.loadingSpinner.removeTask(l), l = null);
7279
7279
  };
7280
7280
  return this.splatRenderReady = !1, new Promise((d) => {
7281
- n && (l = this.loadingSpinner.addTask("Processing splats...")), ve(() => {
7281
+ n && (l = this.loadingSpinner.addTask("Processing splats...")), Be(() => {
7282
7282
  if (this.isDisposingOrDisposed())
7283
7283
  d();
7284
7284
  else {
@@ -7341,7 +7341,7 @@ class Ze {
7341
7341
  const c = (h) => {
7342
7342
  if (this.isDisposingOrDisposed()) return;
7343
7343
  const f = this.splatMesh.getSplatCount();
7344
- r && f >= To && !h && !e && (this.loadingSpinner.setMinimized(!0, !0), e = this.loadingSpinner.addTask("Optimizing data structures..."));
7344
+ r && f >= wo && !h && !e && (this.loadingSpinner.setMinimized(!0, !0), e = this.loadingSpinner.addTask("Optimizing data structures..."));
7345
7345
  }, d = (h) => {
7346
7346
  this.isDisposingOrDisposed() || h && e && (this.loadingSpinner.removeTask(e), e = null);
7347
7347
  }, u = this.splatMesh.build(
@@ -7365,7 +7365,7 @@ class Ze {
7365
7365
  if (!this.isDisposingOrDisposed())
7366
7366
  return new Promise((s) => {
7367
7367
  const t = this.integerBasedSort ? Int32Array : Float32Array, n = e.getSplatCount(), r = e.getMaxSplatCount();
7368
- this.sortWorker = So(
7368
+ this.sortWorker = yo(
7369
7369
  r,
7370
7370
  this.sharedMemoryForWorkers,
7371
7371
  this.enableSIMDInSort,
@@ -7415,7 +7415,7 @@ class Ze {
7415
7415
  });
7416
7416
  }
7417
7417
  updateError(e, s) {
7418
- return e instanceof rn ? e : e instanceof vt ? new Error("File type or server does not support progressive loading.") : s ? new Error(s) : e;
7418
+ return e instanceof rn ? e : e instanceof Bt ? new Error("File type or server does not support progressive loading.") : s ? new Error(s) : e;
7419
7419
  }
7420
7420
  disposeSortWorker() {
7421
7421
  this.sortWorker && this.sortWorker.terminate(), this.sortWorker = null, this.sortPromise = null, this.sortPromiseResolver && (this.sortPromiseResolver(), this.sortPromiseResolver = null), this.preSortMessages = [], this.sortRunning = !1;
@@ -7514,7 +7514,7 @@ class Ze {
7514
7514
  }
7515
7515
  shouldRender = (function() {
7516
7516
  let e = 0;
7517
- const s = new v(), t = new ge(), n = 1e-4;
7517
+ const s = new B(), t = new ge(), n = 1e-4;
7518
7518
  return function() {
7519
7519
  if (!this.initialized || !this.splatRenderReady || this.isDisposingOrDisposed()) return !1;
7520
7520
  let r = !1, i = !1;
@@ -7545,7 +7545,7 @@ class Ze {
7545
7545
  updateFPS = (function() {
7546
7546
  let e = Ke(), s = 0;
7547
7547
  return function() {
7548
- if (this.consecutiveRenderFrames > Eo) {
7548
+ if (this.consecutiveRenderFrames > Bo) {
7549
7549
  const t = Ke();
7550
7550
  t - e >= 1 ? (this.currentFPS = s, s = 0, e = t) : s++;
7551
7551
  } else
@@ -7569,7 +7569,7 @@ class Ze {
7569
7569
  };
7570
7570
  })();
7571
7571
  updateCameraTransition = (function() {
7572
- let e = new v(), s = new v(), t = new v();
7572
+ let e = new B(), s = new B(), t = new B();
7573
7573
  return function(n) {
7574
7574
  if (this.transitioningCameraTarget) {
7575
7575
  s.copy(this.previousCameraTarget).sub(this.camera.position).normalize(), t.copy(this.nextCameraTarget).sub(this.camera.position).normalize();
@@ -7585,13 +7585,13 @@ class Ze {
7585
7585
  if (this.getRenderDimensions(e), this.transitioningCameraTarget) {
7586
7586
  this.sceneHelper.setFocusMarkerVisibility(!0);
7587
7587
  const n = Math.max(this.sceneHelper.getFocusMarkerOpacity(), 0);
7588
- let r = Math.min(n + wo * t, 1);
7588
+ let r = Math.min(n + Eo * t, 1);
7589
7589
  this.sceneHelper.setFocusMarkerOpacity(r), this.sceneHelper.updateFocusMarker(this.nextCameraTarget, this.camera, e), s = !0, this.forceRenderNextFrame();
7590
7590
  } else {
7591
7591
  let n;
7592
7592
  if (s ? n = 1 : n = Math.min(this.sceneHelper.getFocusMarkerOpacity(), 1), n > 0) {
7593
7593
  this.sceneHelper.updateFocusMarker(this.nextCameraTarget, this.camera, e);
7594
- let r = Math.max(n - Bo * t, 0);
7594
+ let r = Math.max(n - vo * t, 0);
7595
7595
  this.sceneHelper.setFocusMarkerOpacity(r), r === 0 && this.sceneHelper.setFocusMarkerVisibility(!1);
7596
7596
  }
7597
7597
  n > 0 && this.forceRenderNextFrame(), s = !1;
@@ -7633,7 +7633,7 @@ class Ze {
7633
7633
  this.showControlPlane ? (this.sceneHelper.setControlPlaneVisibility(!0), this.sceneHelper.positionAndOrientControlPlane(this.controls.target, this.camera.up)) : this.sceneHelper.setControlPlaneVisibility(!1);
7634
7634
  }
7635
7635
  runSplatSort = (function() {
7636
- const e = new J(), s = [], t = new v(0, 0, -1), n = new v(0, 0, -1), r = new v(), i = new v(), o = [], a = [
7636
+ const e = new J(), s = [], t = new B(0, 0, -1), n = new B(0, 0, -1), r = new B(), i = new B(), o = [], a = [
7637
7637
  {
7638
7638
  angleThreshold: 0.55,
7639
7639
  sortFractions: [0.125, 0.33333, 0.75]
@@ -7668,8 +7668,8 @@ class Ze {
7668
7668
  else {
7669
7669
  for (let y of a)
7670
7670
  if (d < y.angleThreshold) {
7671
- for (let B of y.sortFractions)
7672
- o.push(Math.floor(this.splatRenderCount * B));
7671
+ for (let E of y.sortFractions)
7672
+ o.push(Math.floor(this.splatRenderCount * E));
7673
7673
  break;
7674
7674
  }
7675
7675
  o.push(this.splatRenderCount);
@@ -7699,7 +7699,7 @@ class Ze {
7699
7699
  gatherSceneNodesForSort = (function() {
7700
7700
  const e = [];
7701
7701
  let s = null;
7702
- const t = new v(), n = new v(), r = new v(), i = new J(), o = new J(), a = new J(), l = new v(), c = new v(0, 0, -1), d = new v(), u = (h) => d.copy(h.max).sub(h.min).length();
7702
+ const t = new B(), n = new B(), r = new B(), i = new J(), o = new J(), a = new J(), l = new B(), c = new B(0, 0, -1), d = new B(), u = (h) => d.copy(h.max).sub(h.min).length();
7703
7703
  return function(h = !1) {
7704
7704
  this.getRenderDimensions(l);
7705
7705
  const f = l.y / 2 / Math.tan(this.camera.fov / 2 * tn.DEG2RAD), p = Math.atan(l.x / 2 / f), A = Math.atan(l.y / 2 / f), C = Math.cos(p), g = Math.cos(A), x = this.splatMesh.getSplatTree();
@@ -7707,28 +7707,28 @@ class Ze {
7707
7707
  o.copy(this.camera.matrixWorld).invert(), this.splatMesh.dynamicMode || o.multiply(this.splatMesh.matrixWorld);
7708
7708
  let w = 0, y = 0;
7709
7709
  for (let S = 0; S < x.subTrees.length; S++) {
7710
- const E = x.subTrees[S];
7710
+ const v = x.subTrees[S];
7711
7711
  i.copy(o), this.splatMesh.dynamicMode && (this.splatMesh.getSceneTransform(S, a), i.multiply(a));
7712
- const F = E.nodesWithIndexes.length;
7713
- for (let b = 0; b < F; b++) {
7714
- const D = E.nodesWithIndexes[b];
7715
- if (!D.data || !D.data.indexes || D.data.indexes.length === 0) continue;
7716
- r.copy(D.center).applyMatrix4(i);
7712
+ const F = v.nodesWithIndexes.length;
7713
+ for (let D = 0; D < F; D++) {
7714
+ const b = v.nodesWithIndexes[D];
7715
+ if (!b.data || !b.data.indexes || b.data.indexes.length === 0) continue;
7716
+ r.copy(b.center).applyMatrix4(i);
7717
7717
  const R = r.length();
7718
7718
  r.normalize(), t.copy(r).setX(0).normalize(), n.copy(r).setY(0).normalize();
7719
- const k = c.dot(n), M = c.dot(t), O = u(D), L = M < g - 0.6, U = k < C - 0.6;
7720
- !h && (U || L) && R > O || (y += D.data.indexes.length, e[w] = D, D.data.distanceToNode = R, w++);
7719
+ const k = c.dot(n), M = c.dot(t), O = u(b), L = M < g - 0.6, U = k < C - 0.6;
7720
+ !h && (U || L) && R > O || (y += b.data.indexes.length, e[w] = b, b.data.distanceToNode = R, w++);
7721
7721
  }
7722
7722
  }
7723
- e.length = w, e.sort((S, E) => S.data.distanceToNode < E.data.distanceToNode ? -1 : 1);
7724
- let B = y * Y.BytesPerInt;
7723
+ e.length = w, e.sort((S, v) => S.data.distanceToNode < v.data.distanceToNode ? -1 : 1);
7724
+ let E = y * Y.BytesPerInt;
7725
7725
  for (let S = 0; S < w; S++) {
7726
- const E = e[S], F = E.data.indexes.length, b = F * Y.BytesPerInt;
7726
+ const v = e[S], F = v.data.indexes.length, D = F * Y.BytesPerInt;
7727
7727
  new Uint32Array(
7728
7728
  this.sortWorkerIndexesToSort.buffer,
7729
- B - b,
7729
+ E - D,
7730
7730
  F
7731
- ).set(E.data.indexes), B -= b;
7731
+ ).set(v.data.indexes), E -= D;
7732
7732
  }
7733
7733
  return {
7734
7734
  splatRenderCount: y,
@@ -7766,7 +7766,7 @@ class Ze {
7766
7766
  return navigator.userAgent.includes("Mobi");
7767
7767
  }
7768
7768
  }
7769
- class vo {
7769
+ class Fo {
7770
7770
  renderer;
7771
7771
  viewer;
7772
7772
  container;
@@ -7869,7 +7869,7 @@ class vo {
7869
7869
  this.pauseRendering(), await this.viewer.dispose(), this.container.contains(this.renderer.domElement) && this.container.removeChild(this.renderer.domElement), this.watermark.dispose(), this.renderer.dispose(), this.renderer.forceContextLoss();
7870
7870
  }
7871
7871
  }
7872
- const Fo = {
7872
+ const bo = {
7873
7873
  identity: [0, 0, 0, 1],
7874
7874
  "x-90": [-0.7071068, 0, 0, 0.7071068],
7875
7875
  x90: [0.7071068, 0, 0, 0.7071068],
@@ -7892,7 +7892,7 @@ class Do {
7892
7892
  return this.orientationPreset;
7893
7893
  }
7894
7894
  getOrientationRotation() {
7895
- return [...Fo[this.orientationPreset]];
7895
+ return [...bo[this.orientationPreset]];
7896
7896
  }
7897
7897
  active() {
7898
7898
  }
@@ -7903,13 +7903,14 @@ class Do {
7903
7903
  dispose() {
7904
7904
  }
7905
7905
  }
7906
- function bo(m, e) {
7906
+ function Mo(m, e) {
7907
7907
  return `${m}#${e}`;
7908
7908
  }
7909
- class Mo {
7909
+ class Ro {
7910
7910
  viewer;
7911
7911
  getDefaultRotation;
7912
7912
  scenes = /* @__PURE__ */ new Map();
7913
+ localSceneResources = /* @__PURE__ */ new Map();
7913
7914
  constructor(e, s) {
7914
7915
  this.viewer = e, this.getDefaultRotation = s;
7915
7916
  }
@@ -7924,7 +7925,7 @@ class Mo {
7924
7925
  };
7925
7926
  await this.viewer.addSplatScene(e, n);
7926
7927
  const r = {
7927
- id: n.id ?? bo(e, t),
7928
+ id: n.id ?? Mo(e, t),
7928
7929
  name: n.name ?? e.split(/[\\/]/).pop() ?? e,
7929
7930
  url: e,
7930
7931
  index: t,
@@ -7932,6 +7933,22 @@ class Mo {
7932
7933
  };
7933
7934
  return this.scenes.set(r.id, r), r;
7934
7935
  }
7936
+ async loadModelFile(e, s = {}) {
7937
+ if (e.length === 0)
7938
+ throw new Error("LoaderModuleGaussian: no file selected");
7939
+ if (e.length > 1)
7940
+ throw new Error("LoaderModuleGaussian: only a single local point cloud file is supported");
7941
+ const t = zn(e[0]);
7942
+ try {
7943
+ const n = await this.loadModel(t.url, {
7944
+ ...s,
7945
+ name: s.name ?? e[0].name
7946
+ });
7947
+ return this.localSceneResources.set(n.id, t), n;
7948
+ } catch (n) {
7949
+ throw t.revoke(), n;
7950
+ }
7951
+ }
7935
7952
  async loadModels(e) {
7936
7953
  const s = [];
7937
7954
  for (const t of e)
@@ -7940,7 +7957,7 @@ class Mo {
7940
7957
  }
7941
7958
  async unloadModel(e, s = !0) {
7942
7959
  const t = this.scenes.get(e);
7943
- t && (await this.viewer.removeSplatScene(t.index, s), this.scenes.delete(e), this.reindexScenesAfterRemove(t.index));
7960
+ t && (await this.viewer.removeSplatScene(t.index, s), this.scenes.delete(e), this.localSceneResources.get(e)?.revoke(), this.localSceneResources.delete(e), this.reindexScenesAfterRemove(t.index));
7944
7961
  }
7945
7962
  getModel(e) {
7946
7963
  return this.scenes.get(e);
@@ -7954,7 +7971,7 @@ class Mo {
7954
7971
  }
7955
7972
  async clear(e = !1) {
7956
7973
  const s = this.getAllModels().map((t) => t.index);
7957
- s.length > 0 && await this.viewer.removeSplatScenes(s, e), this.scenes.clear();
7974
+ s.length > 0 && await this.viewer.removeSplatScenes(s, e), this.scenes.clear(), this.localSceneResources.forEach((t) => t.revoke()), this.localSceneResources.clear();
7958
7975
  }
7959
7976
  reindexScenesAfterRemove(e) {
7960
7977
  this.scenes.forEach((s) => {
@@ -7962,7 +7979,7 @@ class Mo {
7962
7979
  });
7963
7980
  }
7964
7981
  }
7965
- class Lo {
7982
+ class Ho {
7966
7983
  eventModule;
7967
7984
  sceneModule;
7968
7985
  cameraModule;
@@ -7971,7 +7988,7 @@ class Lo {
7971
7988
  loaderModule;
7972
7989
  isInitialized = !1;
7973
7990
  options;
7974
- version = _n;
7991
+ version = Qn;
7975
7992
  constructor(e) {
7976
7993
  this.options = e, this.initialize(e);
7977
7994
  }
@@ -7992,38 +8009,38 @@ class Lo {
7992
8009
  }, t = document.getElementById(s.containerId);
7993
8010
  if (!t)
7994
8011
  throw new Error(`Container with id "${s.containerId}" not found`);
7995
- this.eventModule = new Qn(), this.sceneModule = new Nn(s.backgroundColor), this.cameraModule = new Vn(
8012
+ this.eventModule = new Nn(), this.sceneModule = new Vn(s.backgroundColor), this.cameraModule = new Gn(
7996
8013
  t,
7997
8014
  s.cameraUp,
7998
8015
  s.initialCameraPosition,
7999
8016
  s.initialCameraLookAt
8000
- ), this.controlModule = new Do(s.orientationPreset), this.renderModule = new vo(
8017
+ ), this.controlModule = new Do(s.orientationPreset), this.renderModule = new Fo(
8001
8018
  t,
8002
8019
  this.sceneModule.getScene(),
8003
8020
  this.cameraModule.getCamera(),
8004
8021
  s
8005
- ), this.loaderModule = new Mo(
8022
+ ), this.loaderModule = new Ro(
8006
8023
  this.renderModule.getViewer(),
8007
8024
  () => this.controlModule.getOrientationRotation()
8008
8025
  ), this.renderModule.setOnBeforeRender(() => {
8009
8026
  this.controlModule.update();
8010
8027
  }), this.renderModule.setOnFpsUpdated((n) => {
8011
- this.eventModule.trigger(Ne.FpsUpdated, n);
8028
+ this.eventModule.trigger(De.FpsUpdated, n);
8012
8029
  }), this.renderModule.startRenderLoop(), this.isInitialized = !0;
8013
8030
  }
8014
8031
  async loadModel(e, s = {}) {
8015
- this.checkInitialized(), this.eventModule.trigger(Ne.LoadStart, { url: e, name: s.name });
8032
+ this.checkInitialized(), this.eventModule.trigger(De.LoadStart, { url: e, name: s.name });
8016
8033
  try {
8017
8034
  const t = await this.loaderModule.loadModel(e, {
8018
8035
  showLoadingUI: !0,
8019
8036
  ...s,
8020
8037
  onProgress: (n, r, i) => {
8021
- this.eventModule.trigger(Ne.LoadProgress, { url: e, name: s.name, progress: n }), s.onProgress?.(n, r, i);
8038
+ this.eventModule.trigger(De.LoadProgress, { url: e, name: s.name, progress: n }), s.onProgress?.(n, r, i);
8022
8039
  }
8023
8040
  });
8024
- return this.eventModule.trigger(Ne.Loaded, { url: e, name: t.name, progress: 100 }), t;
8041
+ return this.eventModule.trigger(De.Loaded, { url: e, name: t.name, progress: 100 }), t;
8025
8042
  } catch (t) {
8026
- throw this.eventModule.trigger(Ne.LoadError, {
8043
+ throw this.eventModule.trigger(De.LoadError, {
8027
8044
  url: e,
8028
8045
  name: s.name,
8029
8046
  error: t instanceof Error ? t : new Error(String(t))
@@ -8033,8 +8050,29 @@ class Lo {
8033
8050
  /**
8034
8051
  * 通过 viewToken 解析 Gaussian 资源地址,再复用现有 URL 加载逻辑。
8035
8052
  */
8053
+ async loadModelFile(e, s = {}) {
8054
+ this.checkInitialized();
8055
+ const t = e[0]?.name ?? "local-file";
8056
+ this.eventModule.trigger(De.LoadStart, { url: t, name: s.name ?? t });
8057
+ try {
8058
+ const n = await this.loaderModule.loadModelFile(e, {
8059
+ showLoadingUI: !0,
8060
+ ...s,
8061
+ onProgress: (r, i, o) => {
8062
+ this.eventModule.trigger(De.LoadProgress, { url: t, name: s.name ?? t, progress: r }), s.onProgress?.(r, i, o);
8063
+ }
8064
+ });
8065
+ return this.eventModule.trigger(De.Loaded, { url: t, name: n.name, progress: 100 }), n;
8066
+ } catch (n) {
8067
+ throw this.eventModule.trigger(De.LoadError, {
8068
+ url: t,
8069
+ name: s.name ?? t,
8070
+ error: n instanceof Error ? n : new Error(String(n))
8071
+ }), n;
8072
+ }
8073
+ }
8036
8074
  async loadModelByViewToken(e, s = {}) {
8037
- const t = await zn(
8075
+ const t = await _n(
8038
8076
  this.options,
8039
8077
  e,
8040
8078
  "gaussian"
@@ -8044,7 +8082,7 @@ class Lo {
8044
8082
  return this.loadModel(t.url, s);
8045
8083
  }
8046
8084
  async unloadModel(e) {
8047
- this.checkInitialized(), await this.loaderModule.unloadModel(e, !1), this.eventModule.trigger(Ne.SceneRemoved, { id: e });
8085
+ this.checkInitialized(), await this.loaderModule.unloadModel(e, !1), this.eventModule.trigger(De.SceneRemoved, { id: e });
8048
8086
  }
8049
8087
  setOrientationPreset(e) {
8050
8088
  this.checkInitialized(), this.controlModule.setOrientationPreset(e);
@@ -8087,5 +8125,5 @@ class Lo {
8087
8125
  }
8088
8126
  }
8089
8127
  export {
8090
- Lo as EngineKernelGaussian
8128
+ Ho as EngineKernelGaussian
8091
8129
  };