shop-components 0.3.2 → 0.3.4

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.
@@ -9,7 +9,7 @@ var U = (n, e, t) => (Qs(n, e, "read from private field"), t ? t.call(n) : e.get
9
9
  throw TypeError("Cannot add the same private member more than once");
10
10
  e instanceof WeakSet ? e.add(n) : e.set(n, t);
11
11
  }, Ae = (n, e, t, i) => (Qs(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
12
- import { BufferAttribute as oe, BufferGeometry as se, Matrix4 as Q, Matrix3 as $r, Vector3 as b, Vector4 as Xe, MeshBasicMaterial as Pt, Mesh as j, ShaderMaterial as si, NoBlending as ti, WebGLRenderTarget as Le, FloatType as le, RGBAFormat as J, NearestFilter as K, Vector2 as F, PerspectiveCamera as Bi, DataUtils as De, DataTexture as ke, HalfFloatType as xe, LinearFilter as ye, RepeatWrapping as Ze, RedFormat as hs, ClampToEdgeWrapping as Oe, Source as kn, Quaternion as Fn, DataArrayTexture as Bn, DoubleSide as ri, BackSide as en, FrontSide as fs, Color as Z, WebGLArrayRenderTarget as On, UnsignedByteType as ks, NoToneMapping as zn, RGFormat as Un, NormalBlending as tn, Spherical as Hn, EquirectangularReflectionMapping as Fs, LinearMipMapLinearFilter as Nn, Clock as Oi, Scene as ds, AdditiveBlending as Wn, Box3 as Y, Sphere as zi, CompressedTexture as Vn, Texture as Ve, InterleavedBuffer as Gn, InterleavedBufferAttribute as qn, TextureLoader as sn, MeshStandardMaterial as jn, Group as he, LineSegments as ps, LineBasicMaterial as Zs, Object3D as Rt, LineDashedMaterial as ms, RingGeometry as Xs, BoxGeometry as Yn, EdgesGeometry as Qn, SRGBColorSpace as wt, AnimationMixer as Zn, LoopOnce as Xn, Plane as Bs, Line3 as Fe, Triangle as Yt, MathUtils as Ge, DirectionalLight as Kn, NoColorSpace as Ks, PlaneGeometry as Di, MeshLambertMaterial as Jn, DirectionalLightHelper as $n, PlaneHelper as eo, UniformsUtils as to, WebGLRenderer as io, OrthographicCamera as gs, Raycaster as so, MeshPhysicalMaterial as ro, PointLight as no, ACESFilmicToneMapping as oo, ShaderChunk as Js, Euler as ao } from "three";
12
+ import { BufferAttribute as le, BufferGeometry as ne, Matrix4 as Q, Matrix3 as $r, Vector3 as b, Vector4 as Xe, MeshBasicMaterial as Pt, Mesh as j, ShaderMaterial as si, NoBlending as ti, WebGLRenderTarget as Le, FloatType as ue, RGBAFormat as J, NearestFilter as K, Vector2 as F, PerspectiveCamera as Bi, DataUtils as De, DataTexture as ke, HalfFloatType as xe, LinearFilter as ye, RepeatWrapping as Ze, RedFormat as hs, ClampToEdgeWrapping as Oe, Source as kn, Quaternion as Fn, DataArrayTexture as Bn, DoubleSide as ri, BackSide as en, FrontSide as fs, Color as Z, WebGLArrayRenderTarget as On, UnsignedByteType as ks, NoToneMapping as zn, RGFormat as Un, NormalBlending as tn, Spherical as Hn, EquirectangularReflectionMapping as Fs, LinearMipMapLinearFilter as Nn, Clock as Oi, Scene as ds, AdditiveBlending as Wn, Box3 as Y, Sphere as zi, CompressedTexture as Vn, Texture as Ve, InterleavedBuffer as Gn, InterleavedBufferAttribute as qn, TextureLoader as sn, MeshStandardMaterial as jn, Group as he, LineSegments as ps, LineBasicMaterial as Zs, Object3D as Rt, LineDashedMaterial as ms, RingGeometry as Xs, BoxGeometry as Yn, EdgesGeometry as Qn, SRGBColorSpace as wt, AnimationMixer as Zn, LoopOnce as Xn, Plane as Bs, Line3 as Fe, Triangle as Yt, MathUtils as Ge, DirectionalLight as Kn, NoColorSpace as Ks, PlaneGeometry as Di, MeshLambertMaterial as Jn, DirectionalLightHelper as $n, PlaneHelper as eo, UniformsUtils as to, WebGLRenderer as io, OrthographicCamera as gs, Raycaster as so, MeshPhysicalMaterial as ro, PointLight as no, ACESFilmicToneMapping as oo, ShaderChunk as Js, Euler as ao } from "three";
13
13
  import { HDRLoader as lo } from "three/examples/jsm/loaders/HDRLoader.js";
14
14
  import { RenderPass as $s } from "three/examples/jsm/postprocessing/RenderPass";
15
15
  import { OutlinePass as er } from "three/examples/jsm/postprocessing/OutlinePass";
@@ -50,7 +50,7 @@ function rn(n, e, t = 0) {
50
50
  }
51
51
  function Qt(n, e = null) {
52
52
  const t = n.array.constructor, i = n.normalized, s = n.itemSize, a = e === null ? n.count : e;
53
- return new oe(new t(s * a), s, i);
53
+ return new le(new t(s * a), s, i);
54
54
  }
55
55
  function yt(n, e) {
56
56
  if (!n && !e)
@@ -96,7 +96,7 @@ function Bo(n, e, t) {
96
96
  for (const s in i)
97
97
  i[s].count !== t && n.deleteAttribute(s);
98
98
  }
99
- function Oo(n, e = {}, t = new se()) {
99
+ function Oo(n, e = {}, t = new ne()) {
100
100
  const {
101
101
  useGroups: i = !1,
102
102
  forceUpdate: s = !1,
@@ -115,7 +115,7 @@ function Oo(n, e = {}, t = new se()) {
115
115
  }
116
116
  if (c) {
117
117
  let r = !1;
118
- if (t.index || (t.setIndex(new oe(new Uint32Array(u), 1, !1)), r = !0), r || o) {
118
+ if (t.index || (t.setIndex(new le(new Uint32Array(u), 1, !1)), r = !0), r || o) {
119
119
  let l = 0, h = 0;
120
120
  const m = t.getIndex();
121
121
  for (let v = 0, p = n.length; v < p; v++) {
@@ -150,7 +150,7 @@ function zo(n, e, t) {
150
150
  let u = n.getAttribute("materialIndex");
151
151
  if (!u || u.count !== a) {
152
152
  let d;
153
- t.length <= 255 ? d = new Uint8Array(a) : d = new Uint16Array(a), u = new oe(d, 1, !1), n.deleteAttribute("materialIndex"), n.setAttribute("materialIndex", u);
153
+ t.length <= 255 ? d = new Uint8Array(a) : d = new Uint16Array(a), u = new le(d, 1, !1), n.deleteAttribute("materialIndex"), n.setAttribute("materialIndex", u);
154
154
  }
155
155
  const f = u.array;
156
156
  for (let d = 0; d < c.length; d++) {
@@ -170,22 +170,22 @@ function Uo(n, e) {
170
170
  }
171
171
  if (!n.attributes.normal && e && e.includes("normal") && n.computeVertexNormals(), !n.attributes.uv && e && e.includes("uv")) {
172
172
  const t = n.attributes.position.count;
173
- n.setAttribute("uv", new oe(new Float32Array(t * 2), 2, !1));
173
+ n.setAttribute("uv", new le(new Float32Array(t * 2), 2, !1));
174
174
  }
175
175
  if (!n.attributes.uv2 && e && e.includes("uv2")) {
176
176
  const t = n.attributes.position.count;
177
- n.setAttribute("uv2", new oe(new Float32Array(t * 2), 2, !1));
177
+ n.setAttribute("uv2", new le(new Float32Array(t * 2), 2, !1));
178
178
  }
179
179
  if (!n.attributes.tangent && e && e.includes("tangent"))
180
180
  if (n.attributes.uv && n.attributes.normal)
181
181
  n.computeTangents();
182
182
  else {
183
183
  const t = n.attributes.position.count;
184
- n.setAttribute("tangent", new oe(new Float32Array(t * 4), 4, !1));
184
+ n.setAttribute("tangent", new le(new Float32Array(t * 4), 4, !1));
185
185
  }
186
186
  if (!n.attributes.color && e && e.includes("color")) {
187
187
  const t = n.attributes.position.count, i = new Float32Array(t * 4);
188
- i.fill(1), n.setAttribute("color", new oe(i, 4));
188
+ i.fill(1), n.setAttribute("color", new le(i, 4));
189
189
  }
190
190
  }
191
191
  function zs(n) {
@@ -271,7 +271,7 @@ function Wo(n) {
271
271
  }
272
272
  return n;
273
273
  }
274
- function Vo(n, e = {}, t = new se()) {
274
+ function Vo(n, e = {}, t = new ne()) {
275
275
  e = {
276
276
  applyWorldTransforms: !0,
277
277
  attributes: [],
@@ -291,7 +291,7 @@ function Vo(n, e = {}, t = new se()) {
291
291
  }
292
292
  return n.matrixWorld.determinant() < 0 && Wo(t), t;
293
293
  }
294
- class Go extends se {
294
+ class Go extends ne {
295
295
  constructor() {
296
296
  super(), this.version = 0, this.hash = null, this._diff = new Ho();
297
297
  }
@@ -333,7 +333,7 @@ function Yo(n, e, t) {
333
333
  for (const s in i)
334
334
  e.deleteAttribute(s);
335
335
  for (const s in t.attributes)
336
- e.setAttribute(t.attributes[s], new oe(new Float32Array(0), 4, !1));
336
+ e.setAttribute(t.attributes[s], new le(new Float32Array(0), 4, !1));
337
337
  } else
338
338
  Oo(n, t, e);
339
339
  for (const i in e.attributes)
@@ -345,8 +345,8 @@ class Qo {
345
345
  }
346
346
  _getDummyMesh() {
347
347
  if (!this._dummyMesh) {
348
- const e = new Pt(), t = new se();
349
- t.setAttribute("position", new oe(new Float32Array(9), 3)), this._dummyMesh = new j(t, e);
348
+ const e = new Pt(), t = new ne();
349
+ t.setAttribute("position", new le(new Float32Array(9), 3)), this._dummyMesh = new j(t, e);
350
350
  }
351
351
  return this._dummyMesh;
352
352
  }
@@ -374,7 +374,7 @@ class Qo {
374
374
  setObjects(e) {
375
375
  Array.isArray(e) ? this.objects = [...e] : this.objects = [e];
376
376
  }
377
- generate(e = new se()) {
377
+ generate(e = new ne()) {
378
378
  const { useGroups: t, overwriteIndex: i, _intermediateGeometry: s, _geometryMergeSets: a } = this, o = this._getMeshes(), c = [], u = [], f = a.get(e) || [];
379
379
  this._updateIntermediateGeometries();
380
380
  let d = !1;
@@ -422,7 +422,7 @@ class Ko {
422
422
  return !!this.bvh;
423
423
  }
424
424
  constructor(e) {
425
- this.bvhOptions = {}, this.attributes = ["position", "normal", "tangent", "color", "uv", "uv2"], this.generateBVH = !0, this.bvh = null, this.geometry = new se(), this.staticGeometryGenerator = new Qo(e), this._bvhWorker = null, this._pendingGenerate = null, this._buildAsync = !1;
425
+ this.bvhOptions = {}, this.attributes = ["position", "normal", "tangent", "color", "uv", "uv2"], this.generateBVH = !0, this.bvh = null, this.geometry = new ne(), this.staticGeometryGenerator = new Qo(e), this._bvhWorker = null, this._pendingGenerate = null, this._buildAsync = !1;
426
426
  }
427
427
  setObjects(e) {
428
428
  this.staticGeometryGenerator.setObjects(e);
@@ -821,7 +821,7 @@ class ta extends Us {
821
821
  class ia {
822
822
  generate(e, t = 256) {
823
823
  const i = new Le(t, t, {
824
- type: le,
824
+ type: ue,
825
825
  format: J,
826
826
  minFilter: K,
827
827
  magFilter: K,
@@ -882,7 +882,7 @@ function oa(n, e = xe) {
882
882
  a instanceof Int8Array || a instanceof Int16Array || a instanceof Int32Array ? c = 2 ** (8 * a.BYTES_PER_ELEMENT - 1) - 1 : c = 2 ** (8 * a.BYTES_PER_ELEMENT) - 1;
883
883
  for (let u = 0, f = a.length; u < f; u++) {
884
884
  let d = a[u];
885
- t.type === xe && (d = De.fromHalfFloat(a[u])), t.type !== le && t.type !== xe && (d /= c), e === xe && (o[u] = De.toHalfFloat(d));
885
+ t.type === xe && (d = De.fromHalfFloat(a[u])), t.type !== ue && t.type !== xe && (d /= c), e === xe && (o[u] = De.toHalfFloat(d));
886
886
  }
887
887
  t.image.data = o, t.type = e;
888
888
  }
@@ -918,8 +918,8 @@ class aa {
918
918
  for (let p = 0; p < s; p++) {
919
919
  let g = 0;
920
920
  for (let _ = 0; _ < i; _++) {
921
- const y = p * i + _, x = De.fromHalfFloat(a[4 * y + 0]), w = De.fromHalfFloat(a[4 * y + 1]), A = De.fromHalfFloat(a[4 * y + 2]), S = na(x, w, A);
922
- g += S, d += S, o[y] = S, c[y] = g;
921
+ const y = p * i + _, x = De.fromHalfFloat(a[4 * y + 0]), w = De.fromHalfFloat(a[4 * y + 1]), A = De.fromHalfFloat(a[4 * y + 2]), T = na(x, w, A);
922
+ g += T, d += T, o[y] = T, c[y] = g;
923
923
  }
924
924
  if (g !== 0)
925
925
  for (let _ = p * i, y = p * i + i; _ < y; _++)
@@ -944,11 +944,11 @@ class aa {
944
944
  m.image = { width: s, height: 1, data: l }, m.needsUpdate = !0, v.image = { width: i, height: s, data: h }, v.needsUpdate = !0, this.totalSum = d, this.map = t;
945
945
  }
946
946
  }
947
- const Qi = 6, la = 0, ca = 1, ua = 2, ha = 3, fa = 4, ge = new b(), ee = new b(), ur = new Q(), ot = new Fn(), hr = new b(), at = new b(), da = new b(0, 1, 0);
947
+ const Qi = 6, la = 0, ca = 1, ua = 2, ha = 3, fa = 4, ge = new b(), ie = new b(), ur = new Q(), ot = new Fn(), hr = new b(), at = new b(), da = new b(0, 1, 0);
948
948
  class pa {
949
949
  constructor() {
950
950
  const e = new ke(new Float32Array(4), 1, 1);
951
- e.format = J, e.type = le, e.wrapS = Oe, e.wrapT = Oe, e.generateMipmaps = !1, e.minFilter = K, e.magFilter = K, this.tex = e, this.count = 0;
951
+ e.format = J, e.type = ue, e.wrapS = Oe, e.wrapT = Oe, e.generateMipmaps = !1, e.minFilter = K, e.magFilter = K, this.tex = e, this.count = 0;
952
952
  }
953
953
  updateFrom(e, t = []) {
954
954
  const i = this.tex, s = Math.max(e.length * Qi, 1), a = Math.ceil(Math.sqrt(s));
@@ -959,18 +959,18 @@ class pa {
959
959
  let l = 0;
960
960
  for (let m = 0; m < Qi * 4; m++)
961
961
  o[r + m] = 0;
962
- d.getWorldPosition(ee), o[r + l++] = ee.x, o[r + l++] = ee.y, o[r + l++] = ee.z;
962
+ d.getWorldPosition(ie), o[r + l++] = ie.x, o[r + l++] = ie.y, o[r + l++] = ie.z;
963
963
  let h = la;
964
964
  if (d.isRectAreaLight && d.isCircular ? h = ca : d.isSpotLight ? h = ua : d.isDirectionalLight ? h = ha : d.isPointLight && (h = fa), o[r + l++] = h, o[r + l++] = d.color.r, o[r + l++] = d.color.g, o[r + l++] = d.color.b, o[r + l++] = d.intensity, d.getWorldQuaternion(ot), d.isRectAreaLight)
965
- ge.set(d.width, 0, 0).applyQuaternion(ot), o[r + l++] = ge.x, o[r + l++] = ge.y, o[r + l++] = ge.z, l++, ee.set(0, d.height, 0).applyQuaternion(ot), o[r + l++] = ee.x, o[r + l++] = ee.y, o[r + l++] = ee.z, o[r + l++] = ge.cross(ee).length() * (d.isCircular ? Math.PI / 4 : 1);
965
+ ge.set(d.width, 0, 0).applyQuaternion(ot), o[r + l++] = ge.x, o[r + l++] = ge.y, o[r + l++] = ge.z, l++, ie.set(0, d.height, 0).applyQuaternion(ot), o[r + l++] = ie.x, o[r + l++] = ie.y, o[r + l++] = ie.z, o[r + l++] = ge.cross(ie).length() * (d.isCircular ? Math.PI / 4 : 1);
966
966
  else if (d.isSpotLight) {
967
967
  const m = d.radius || 0;
968
- hr.setFromMatrixPosition(d.matrixWorld), at.setFromMatrixPosition(d.target.matrixWorld), ur.lookAt(hr, at, da), ot.setFromRotationMatrix(ur), ge.set(1, 0, 0).applyQuaternion(ot), o[r + l++] = ge.x, o[r + l++] = ge.y, o[r + l++] = ge.z, l++, ee.set(0, 1, 0).applyQuaternion(ot), o[r + l++] = ee.x, o[r + l++] = ee.y, o[r + l++] = ee.z, o[r + l++] = Math.PI * m * m, o[r + l++] = m, o[r + l++] = d.decay, o[r + l++] = d.distance, o[r + l++] = Math.cos(d.angle), o[r + l++] = Math.cos(d.angle * (1 - d.penumbra)), o[r + l++] = d.iesMap ? t.indexOf(d.iesMap) : -1;
968
+ hr.setFromMatrixPosition(d.matrixWorld), at.setFromMatrixPosition(d.target.matrixWorld), ur.lookAt(hr, at, da), ot.setFromRotationMatrix(ur), ge.set(1, 0, 0).applyQuaternion(ot), o[r + l++] = ge.x, o[r + l++] = ge.y, o[r + l++] = ge.z, l++, ie.set(0, 1, 0).applyQuaternion(ot), o[r + l++] = ie.x, o[r + l++] = ie.y, o[r + l++] = ie.z, o[r + l++] = Math.PI * m * m, o[r + l++] = m, o[r + l++] = d.decay, o[r + l++] = d.distance, o[r + l++] = Math.cos(d.angle), o[r + l++] = Math.cos(d.angle * (1 - d.penumbra)), o[r + l++] = d.iesMap ? t.indexOf(d.iesMap) : -1;
969
969
  } else if (d.isPointLight) {
970
970
  const m = ge.setFromMatrixPosition(d.matrixWorld);
971
971
  o[r + l++] = m.x, o[r + l++] = m.y, o[r + l++] = m.z, l++, l += 4, l += 1, o[r + l++] = d.decay, o[r + l++] = d.distance;
972
972
  } else if (d.isDirectionalLight) {
973
- const m = ge.setFromMatrixPosition(d.matrixWorld), v = ee.setFromMatrixPosition(d.target.matrixWorld);
973
+ const m = ge.setFromMatrixPosition(d.matrixWorld), v = ie.setFromMatrixPosition(d.target.matrixWorld);
974
974
  at.subVectors(m, v).normalize(), o[r + l++] = at.x, o[r + l++] = at.y, o[r + l++] = at.z;
975
975
  }
976
976
  }
@@ -1004,7 +1004,7 @@ function fr(n, e, t, i, s) {
1004
1004
  }
1005
1005
  class ma extends Bn {
1006
1006
  constructor() {
1007
- super(), this._textures = [], this.type = le, this.format = J, this.internalFormat = "RGBA32F";
1007
+ super(), this._textures = [], this.type = ue, this.format = J, this.internalFormat = "RGBA32F";
1008
1008
  }
1009
1009
  updateAttribute(e, t) {
1010
1010
  const i = this._textures[e];
@@ -1111,7 +1111,7 @@ class wa {
1111
1111
  }
1112
1112
  class ba extends ke {
1113
1113
  constructor() {
1114
- super(new Float32Array(4), 1, 1), this.format = J, this.type = le, this.wrapS = Oe, this.wrapT = Oe, this.minFilter = K, this.magFilter = K, this.generateMipmaps = !1, this.features = new wa();
1114
+ super(new Float32Array(4), 1, 1), this.format = J, this.type = ue, this.wrapS = Oe, this.wrapT = Oe, this.minFilter = K, this.magFilter = K, this.generateMipmaps = !1, this.features = new wa();
1115
1115
  }
1116
1116
  updateFrom(e, t) {
1117
1117
  function i(m, v, p = -1) {
@@ -1322,7 +1322,7 @@ class Pa {
1322
1322
  }
1323
1323
  class Ra extends ke {
1324
1324
  constructor(e = 1, t = 1, i = 8) {
1325
- super(new Float32Array(1), 1, 1, J, le), this.minFilter = K, this.magFilter = K, this.strata = i, this.sampler = null, this.generator = new Pa(), this.stableNoise = !1, this.random = () => this.stableNoise ? this.generator.nextFloat() : Math.random(), this.init(e, t, i);
1325
+ super(new Float32Array(1), 1, 1, J, ue), this.minFilter = K, this.magFilter = K, this.strata = i, this.sampler = null, this.generator = new Pa(), this.stableNoise = !1, this.random = () => this.stableNoise ? this.generator.nextFloat() : Math.random(), this.init(e, t, i);
1326
1326
  }
1327
1327
  init(e = this.image.height, t = this.image.width, i = this.strata) {
1328
1328
  const { image: s } = this;
@@ -1487,7 +1487,7 @@ function Fa(n) {
1487
1487
  }
1488
1488
  class Ba extends ke {
1489
1489
  constructor(e = 64, t = 1) {
1490
- super(new Float32Array(4), 1, 1, J, le), this.minFilter = K, this.magFilter = K, this.size = e, this.channels = t, this.update();
1490
+ super(new Float32Array(4), 1, 1, J, ue), this.minFilter = K, this.magFilter = K, this.size = e, this.channels = t, this.update();
1491
1491
  }
1492
1492
  update() {
1493
1493
  const e = this.channels, t = this.size, i = new La();
@@ -5008,28 +5008,28 @@ function* cl() {
5008
5008
  c ? (r.opacity = this._opacityFactor / (this.samples + 1), u.blending = ti, u.opacity = 1) : (u.opacity = this._opacityFactor / (this.samples + 1), u.blending = tn);
5009
5009
  const [m, v, p, g] = o, _ = i.width, y = i.height;
5010
5010
  u.resolution.set(_ * p, y * g), u.sobolTexture = a.texture, u.stratifiedTexture.init(20, u.bounces + u.transmissiveBounces + 5), u.stratifiedTexture.next(), u.seed++;
5011
- const x = this.tiles.x || 1, w = this.tiles.y || 1, A = x * w, S = Math.ceil(_ * p), I = Math.ceil(y * g), M = Math.floor(m * _), R = Math.floor(v * y), P = Math.ceil(S / x), T = Math.ceil(I / w);
5012
- for (let C = 0; C < w; C++)
5013
- for (let D = 0; D < x; D++) {
5011
+ const x = this.tiles.x || 1, w = this.tiles.y || 1, A = x * w, T = Math.ceil(_ * p), I = Math.ceil(y * g), C = Math.floor(m * _), R = Math.floor(v * y), D = Math.ceil(T / x), S = Math.ceil(I / w);
5012
+ for (let M = 0; M < w; M++)
5013
+ for (let P = 0; P < x; P++) {
5014
5014
  const L = n.getRenderTarget(), k = n.autoClear, z = n.getScissorTest();
5015
5015
  n.getScissor(f), n.getViewport(d);
5016
- let W = D, G = C;
5016
+ let W = P, G = M;
5017
5017
  if (!this.stableTiles) {
5018
- const ue = this._currentTile % (x * w);
5019
- W = ue % x, G = ~~(ue / x), this._currentTile = ue + 1;
5018
+ const ee = this._currentTile % (x * w);
5019
+ W = ee % x, G = ~~(ee / x), this._currentTile = ee + 1;
5020
5020
  }
5021
- const ce = w - G - 1;
5021
+ const $ = w - G - 1;
5022
5022
  i.scissor.set(
5023
- M + W * P,
5024
- R + ce * T,
5025
- Math.min(P, S - W * P),
5026
- Math.min(T, I - ce * T)
5023
+ C + W * D,
5024
+ R + $ * S,
5025
+ Math.min(D, T - W * D),
5026
+ Math.min(S, I - $ * S)
5027
5027
  ), i.viewport.set(
5028
- M,
5028
+ C,
5029
5029
  R,
5030
- S,
5030
+ T,
5031
5031
  I
5032
- ), n.setRenderTarget(i), n.setScissorTest(!0), n.autoClear = !1, e.render(n), n.setViewport(d), n.setScissor(f), n.setScissorTest(z), n.setRenderTarget(L), n.autoClear = k, c && (r.target1 = l.texture, r.target2 = i.texture, n.setRenderTarget(h), t.render(n), n.setRenderTarget(L)), this.samples += 1 / A, D === x - 1 && C === w - 1 && (this.samples = Math.round(this.samples)), yield;
5032
+ ), n.setRenderTarget(i), n.setScissorTest(!0), n.autoClear = !1, e.render(n), n.setViewport(d), n.setScissor(f), n.setScissorTest(z), n.setRenderTarget(L), n.autoClear = k, c && (r.target1 = l.texture, r.target2 = i.texture, n.setRenderTarget(h), t.render(n), n.setRenderTarget(L)), this.samples += 1 / A, P === x - 1 && M === w - 1 && (this.samples = Math.round(this.samples)), yield;
5033
5033
  }
5034
5034
  [l, h] = [h, l];
5035
5035
  }
@@ -5057,19 +5057,19 @@ class yr {
5057
5057
  constructor(e) {
5058
5058
  this.camera = null, this.tiles = new F(3, 3), this.stableNoise = !1, this.stableTiles = !0, this.samples = 0, this._subframe = new Xe(0, 0, 1, 1), this._opacityFactor = 1, this._renderer = e, this._alpha = !1, this._fsQuad = new Ct(new ll()), this._blendQuad = new Ct(new Jo()), this._task = null, this._currentTile = 0, this._compilePromise = null, this._sobolTarget = new ia().generate(e), this._primaryTarget = new Le(1, 1, {
5059
5059
  format: J,
5060
- type: le,
5060
+ type: ue,
5061
5061
  magFilter: K,
5062
5062
  minFilter: K
5063
5063
  }), this._blendTargets = [
5064
5064
  new Le(1, 1, {
5065
5065
  format: J,
5066
- type: le,
5066
+ type: ue,
5067
5067
  magFilter: K,
5068
5068
  minFilter: K
5069
5069
  }),
5070
5070
  new Le(1, 1, {
5071
5071
  format: J,
5072
- type: le,
5072
+ type: ue,
5073
5073
  magFilter: K,
5074
5074
  minFilter: K
5075
5075
  })
@@ -5114,7 +5114,7 @@ class ul extends ke {
5114
5114
  e,
5115
5115
  t,
5116
5116
  J,
5117
- le,
5117
+ ue,
5118
5118
  Fs,
5119
5119
  Ze,
5120
5120
  Oe,
@@ -5289,7 +5289,7 @@ class br {
5289
5289
  const s = e.images[0], a = this._renderer, o = this._quad;
5290
5290
  t === null && (t = 4 * s.height), i === null && (i = 2 * s.height);
5291
5291
  const c = new Le(t, i, {
5292
- type: le,
5292
+ type: ue,
5293
5293
  colorSpace: s.colorSpace
5294
5294
  }), u = s.height, f = Math.log2(u) - 2, d = 1 / u, r = 1 / (3 * Math.max(Math.pow(2, f), 7 * 16));
5295
5295
  o.material.defines.CUBEUV_MAX_MIP = `${f}.0`, o.material.defines.CUBEUV_TEXEL_WIDTH = r, o.material.defines.CUBEUV_TEXEL_HEIGHT = d, o.material.uniforms.envMap.value = e, o.material.uniforms.flipEnvMap.value = e.isRenderTargetTexture ? 1 : -1, o.material.needsUpdate = !0;
@@ -5496,21 +5496,21 @@ const yl = () => ({
5496
5496
  ktx2TranscoderPath: Ui
5497
5497
  });
5498
5498
  function xl(n) {
5499
- we = n, ne && ne[ys] != we ? (console.debug("Updating Draco decoder path to " + n), ne[ys] = we, ne.setDecoderPath(we), ne.preload()) : console.debug("Setting Draco decoder path to " + n);
5499
+ we = n, ae && ae[ys] != we ? (console.debug("Updating Draco decoder path to " + n), ae[ys] = we, ae.setDecoderPath(we), ae.preload()) : console.debug("Setting Draco decoder path to " + n);
5500
5500
  }
5501
5501
  function wl(n) {
5502
5502
  Ui = n;
5503
5503
  }
5504
5504
  function Ns(n) {
5505
- return fn(), { dracoLoader: ne, meshoptDecoder: Ei };
5505
+ return fn(), { dracoLoader: ae, meshoptDecoder: Ei };
5506
5506
  }
5507
5507
  function hn(n) {
5508
- n.dracoLoader || n.setDRACOLoader(ne), n.meshoptDecoder || n.setMeshoptDecoder(Ei);
5508
+ n.dracoLoader || n.setDRACOLoader(ae), n.meshoptDecoder || n.setMeshoptDecoder(Ei);
5509
5509
  }
5510
5510
  const ys = Symbol("dracoDecoderPath");
5511
- let ne, Ei;
5511
+ let ae, Ei;
5512
5512
  function fn() {
5513
- ne || (ne = new yo(), ne[ys] = we, ne.setDecoderPath(we), ne.setDecoderConfig({ type: "js" }), ne.preload()), Ei || (Ei = _o);
5513
+ ae || (ae = new yo(), ae[ys] = we, ae.setDecoderPath(we), ae.setDecoderConfig({ type: "js" }), ae.preload()), Ei || (Ei = _o);
5514
5514
  }
5515
5515
  const xs = /* @__PURE__ */ new WeakMap();
5516
5516
  function dn(n, e) {
@@ -5594,7 +5594,7 @@ class Tl {
5594
5594
  }
5595
5595
  const Sl = typeof window > "u" && typeof document > "u", ws = Symbol("needle:raycast-mesh");
5596
5596
  function ni(n) {
5597
- return (n == null ? void 0 : n[ws]) instanceof se ? n[ws] : null;
5597
+ return (n == null ? void 0 : n[ws]) instanceof ne ? n[ws] : null;
5598
5598
  }
5599
5599
  function Ml(n, e) {
5600
5600
  if ((n.type === "Mesh" || n.type === "SkinnedMesh") && !ni(n)) {
@@ -5620,7 +5620,7 @@ function Cl(n = !0) {
5620
5620
  }
5621
5621
  let Bt = null;
5622
5622
  function Il(n) {
5623
- const e = new se();
5623
+ const e = new ne();
5624
5624
  for (const t in n.attributes)
5625
5625
  e.setAttribute(t, n.getAttribute(t));
5626
5626
  return e.setIndex(n.getIndex()), e;
@@ -5713,7 +5713,7 @@ class Ws {
5713
5713
  function El(n) {
5714
5714
  var e, t, i, s, a, o, c, u, f, d, r, l, h, m, v, p;
5715
5715
  for (const g of n.geometries) {
5716
- const _ = g.geometry, y = new se();
5716
+ const _ = g.geometry, y = new ne();
5717
5717
  if (y.name = _.name || "", _.index) {
5718
5718
  const x = _.index;
5719
5719
  y.setIndex(Xi(x));
@@ -5724,7 +5724,7 @@ function El(n) {
5724
5724
  }
5725
5725
  if (_.morphAttributes)
5726
5726
  for (const x in _.morphAttributes) {
5727
- const A = _.morphAttributes[x].map((S) => Xi(S));
5727
+ const A = _.morphAttributes[x].map((T) => Xi(T));
5728
5728
  y.morphAttributes[x] = A;
5729
5729
  }
5730
5730
  if (y.morphTargetsRelative = _.morphTargetsRelative ?? !1, y.boundingBox = new Y(), y.boundingBox.min = new b(
@@ -5793,7 +5793,7 @@ function Xi(n) {
5793
5793
  const t = n.data, i = t.array, s = new Gn(i, t.stride);
5794
5794
  e = new qn(s, n.itemSize, i.byteOffset, n.normalized), e.offset = n.offset;
5795
5795
  } else
5796
- "isBufferAttribute" in n && n.isBufferAttribute && (e = new oe(n.array, n.itemSize, n.normalized), e.usage = n.usage, e.gpuType = n.gpuType, e.updateRanges = n.updateRanges);
5796
+ "isBufferAttribute" in n && n.isBufferAttribute && (e = new le(n.array, n.itemSize, n.normalized), e.usage = n.usage, e.gpuType = n.gpuType, e.updateRanges = n.updateRanges);
5797
5797
  return e;
5798
5798
  }
5799
5799
  const Ll = nt("gltf-progressive-worker"), kl = nt("gltf-progressive-reduce-mipmaps"), Ki = Symbol("needle-progressive-texture"), Ie = "NEEDLE_progressive", B = class B {
@@ -6101,88 +6101,88 @@ const Ll = nt("gltf-progressive-worker"), kl = nt("gltf-progressive-reduce-mipma
6101
6101
  i && console.log(`LOD ${t} was already loading/loaded: ${m}`);
6102
6102
  let x = await p.catch((A) => (console.error(`Error loading LOD ${t} from ${h}
6103
6103
  `, A), null)), w = !1;
6104
- if (x == null || (x instanceof Ve && e instanceof Ve ? (f = x.image) != null && f.data || (d = x.source) != null && d.data ? x = this.copySettings(e, x) : (w = !0, this.previouslyLoaded.delete(m)) : x instanceof se && e instanceof se && ((r = x.attributes.position) != null && r.array || (w = !0, this.previouslyLoaded.delete(m)))), !w)
6104
+ if (x == null || (x instanceof Ve && e instanceof Ve ? (f = x.image) != null && f.data || (d = x.source) != null && d.data ? x = this.copySettings(e, x) : (w = !0, this.previouslyLoaded.delete(m)) : x instanceof ne && e instanceof ne && ((r = x.attributes.position) != null && r.array || (w = !0, this.previouslyLoaded.delete(m)))), !w)
6105
6105
  return x;
6106
6106
  }
6107
6107
  if (!v.use)
6108
6108
  return O && console.log(`LOD ${t} was aborted: ${h}`), null;
6109
6109
  const g = o, _ = new Promise(async (x, w) => {
6110
6110
  if (Ll) {
6111
- const T = await (await Dl({})).load(h);
6112
- if (T.textures.length > 0)
6113
- for (const C of T.textures) {
6114
- let D = C.texture;
6115
- return B.assignLODInformation(s.url, D, a, t, void 0), e instanceof Ve && (D = this.copySettings(e, D)), D && (D.guid = g.guid), x(D);
6111
+ const S = await (await Dl({})).load(h);
6112
+ if (S.textures.length > 0)
6113
+ for (const M of S.textures) {
6114
+ let P = M.texture;
6115
+ return B.assignLODInformation(s.url, P, a, t, void 0), e instanceof Ve && (P = this.copySettings(e, P)), P && (P.guid = g.guid), x(P);
6116
6116
  }
6117
- if (T.geometries.length > 0) {
6118
- const C = new Array();
6119
- for (const D of T.geometries) {
6120
- const L = D.geometry;
6121
- B.assignLODInformation(s.url, L, a, t, D.primitiveIndex), C.push(L);
6117
+ if (S.geometries.length > 0) {
6118
+ const M = new Array();
6119
+ for (const P of S.geometries) {
6120
+ const L = P.geometry;
6121
+ B.assignLODInformation(s.url, L, a, t, P.primitiveIndex), M.push(L);
6122
6122
  }
6123
- return x(C);
6123
+ return x(M);
6124
6124
  }
6125
6125
  return x(null);
6126
6126
  }
6127
6127
  const A = new Os();
6128
- hn(A), O && (await new Promise((P) => setTimeout(P, 1e3)), i && console.warn("Start loading (delayed) " + h, g.guid));
6129
- let S = h;
6128
+ hn(A), O && (await new Promise((D) => setTimeout(D, 1e3)), i && console.warn("Start loading (delayed) " + h, g.guid));
6129
+ let T = h;
6130
6130
  if (g && Array.isArray(g.lods)) {
6131
- const P = g.lods[t];
6132
- P.hash && (S += "?v=" + P.hash);
6131
+ const D = g.lods[t];
6132
+ D.hash && (T += "?v=" + D.hash);
6133
6133
  }
6134
- const I = await A.loadAsync(S).catch((P) => (console.error(`Error loading LOD ${t} from ${h}
6135
- `, P), x(null)));
6134
+ const I = await A.loadAsync(T).catch((D) => (console.error(`Error loading LOD ${t} from ${h}
6135
+ `, D), x(null)));
6136
6136
  if (!I)
6137
6137
  return x(null);
6138
- const M = I.parser;
6138
+ const C = I.parser;
6139
6139
  i && console.log("Loading finished " + h, g.guid);
6140
6140
  let R = 0;
6141
6141
  if (I.parser.json.textures) {
6142
- let P = !1;
6143
- for (const T of I.parser.json.textures) {
6144
- if (T != null && T.extensions) {
6145
- const C = T == null ? void 0 : T.extensions[Ie];
6146
- if (C != null && C.guid && C.guid === g.guid) {
6147
- P = !0;
6142
+ let D = !1;
6143
+ for (const S of I.parser.json.textures) {
6144
+ if (S != null && S.extensions) {
6145
+ const M = S == null ? void 0 : S.extensions[Ie];
6146
+ if (M != null && M.guid && M.guid === g.guid) {
6147
+ D = !0;
6148
6148
  break;
6149
6149
  }
6150
6150
  }
6151
6151
  R++;
6152
6152
  }
6153
- if (P) {
6154
- let T = await M.getDependency("texture", R);
6155
- return T && B.assignLODInformation(s.url, T, a, t, void 0), i && console.log('change "' + e.name + '" → "' + T.name + '"', h, R, T, m), e instanceof Ve && (T = this.copySettings(e, T)), T && (T.guid = g.guid), x(T);
6153
+ if (D) {
6154
+ let S = await C.getDependency("texture", R);
6155
+ return S && B.assignLODInformation(s.url, S, a, t, void 0), i && console.log('change "' + e.name + '" → "' + S.name + '"', h, R, S, m), e instanceof Ve && (S = this.copySettings(e, S)), S && (S.guid = g.guid), x(S);
6156
6156
  } else
6157
6157
  O && console.warn("Could not find texture with guid", g.guid, I.parser.json);
6158
6158
  }
6159
6159
  if (R = 0, I.parser.json.meshes) {
6160
- let P = !1;
6161
- for (const T of I.parser.json.meshes) {
6162
- if (T != null && T.extensions) {
6163
- const C = T == null ? void 0 : T.extensions[Ie];
6164
- if (C != null && C.guid && C.guid === g.guid) {
6165
- P = !0;
6160
+ let D = !1;
6161
+ for (const S of I.parser.json.meshes) {
6162
+ if (S != null && S.extensions) {
6163
+ const M = S == null ? void 0 : S.extensions[Ie];
6164
+ if (M != null && M.guid && M.guid === g.guid) {
6165
+ D = !0;
6166
6166
  break;
6167
6167
  }
6168
6168
  }
6169
6169
  R++;
6170
6170
  }
6171
- if (P) {
6172
- const T = await M.getDependency("mesh", R);
6173
- if (i && console.log(`Loaded Mesh "${T.name}"`, h, R, T, m), T.isMesh === !0) {
6174
- const C = T.geometry;
6175
- return B.assignLODInformation(s.url, C, a, t, 0), x(C);
6171
+ if (D) {
6172
+ const S = await C.getDependency("mesh", R);
6173
+ if (i && console.log(`Loaded Mesh "${S.name}"`, h, R, S, m), S.isMesh === !0) {
6174
+ const M = S.geometry;
6175
+ return B.assignLODInformation(s.url, M, a, t, 0), x(M);
6176
6176
  } else {
6177
- const C = new Array();
6178
- for (let D = 0; D < T.children.length; D++) {
6179
- const L = T.children[D];
6177
+ const M = new Array();
6178
+ for (let P = 0; P < S.children.length; P++) {
6179
+ const L = S.children[P];
6180
6180
  if (L.isMesh === !0) {
6181
6181
  const k = L.geometry;
6182
- B.assignLODInformation(s.url, k, a, t, D), C.push(k);
6182
+ B.assignLODInformation(s.url, k, a, t, P), M.push(k);
6183
6183
  }
6184
6184
  }
6185
- return x(C);
6185
+ return x(M);
6186
6186
  }
6187
6187
  } else
6188
6188
  O && console.warn("Could not find mesh with guid", g.guid, I.parser.json);
@@ -6342,8 +6342,8 @@ E(Ci, "addPromise", (e, t, i, s) => {
6342
6342
  a.add(e, t, i);
6343
6343
  });
6344
6344
  });
6345
- const ve = nt("debugprogressive"), Bl = nt("noprogressive"), Ji = Symbol("Needle:LODSManager"), $i = Symbol("Needle:LODState"), Ne = Symbol("Needle:CurrentLOD"), te = { mesh_lod: -1, texture_lod: -1 };
6346
- var re, Pe, ki, Ye, Mt, Fi, Re;
6345
+ const ve = nt("debugprogressive"), Bl = nt("noprogressive"), Ji = Symbol("Needle:LODSManager"), $i = Symbol("Needle:LODState"), Ne = Symbol("Needle:CurrentLOD"), se = { mesh_lod: -1, texture_lod: -1 };
6346
+ var oe, Pe, ki, Ye, Mt, Fi, Re;
6347
6347
  const H = class H {
6348
6348
  // readonly plugins: NEEDLE_progressive_plugin[] = [];
6349
6349
  constructor(e, t) {
@@ -6371,7 +6371,7 @@ const H = class H {
6371
6371
  * @default "auto"
6372
6372
  */
6373
6373
  E(this, "updateInterval", "auto");
6374
- He(this, re, 1);
6374
+ He(this, oe, 1);
6375
6375
  /**
6376
6376
  * If set to true, the LODsManager will not update the LODs.
6377
6377
  * @default false
@@ -6473,7 +6473,7 @@ const H = class H {
6473
6473
  const t = this;
6474
6474
  Ns(this.renderer), this.renderer.render = function(i, s) {
6475
6475
  const a = t.renderer.getRenderTarget();
6476
- (a == null || "isXRRenderTarget" in a && a.isXRRenderTarget) && (e = 0, Ae(t, Ye, U(t, Ye) + 1), Ae(t, Mt, U(t, ki).getDelta()), Ae(t, Fi, U(t, Fi) + U(t, Mt)), t._fpsBuffer.shift(), t._fpsBuffer.push(1 / U(t, Mt)), Ae(t, Re, t._fpsBuffer.reduce((c, u) => c + u) / t._fpsBuffer.length), ve && U(t, Ye) % 200 === 0 && console.log("FPS", Math.round(U(t, Re)), "Interval:", U(t, re)));
6476
+ (a == null || "isXRRenderTarget" in a && a.isXRRenderTarget) && (e = 0, Ae(t, Ye, U(t, Ye) + 1), Ae(t, Mt, U(t, ki).getDelta()), Ae(t, Fi, U(t, Fi) + U(t, Mt)), t._fpsBuffer.shift(), t._fpsBuffer.push(1 / U(t, Mt)), Ae(t, Re, t._fpsBuffer.reduce((c, u) => c + u) / t._fpsBuffer.length), ve && U(t, Ye) % 200 === 0 && console.log("FPS", Math.round(U(t, Re)), "Interval:", U(t, oe)));
6477
6477
  const o = e++;
6478
6478
  U(t, Pe).call(this, i, s), t.onAfterRender(i, s, o);
6479
6479
  };
@@ -6494,7 +6494,7 @@ const H = class H {
6494
6494
  (c.name === "EffectMaterial" || c.name === "CopyShader") && (o = !1);
6495
6495
  }
6496
6496
  if ((t.parent && t.parent.type === "CubeCamera" || i >= 1 && t.type === "OrthographicCamera") && (o = !1), o) {
6497
- if (Bl || (this.updateInterval === "auto" ? U(this, Re) < 40 && U(this, re) < 10 ? (Ae(this, re, U(this, re) + 1), ve && console.warn("↓ Reducing LOD updates", U(this, re), U(this, Re).toFixed(0))) : U(this, Re) >= 60 && U(this, re) > 1 && (Ae(this, re, U(this, re) - 1), ve && console.warn("↑ Increasing LOD updates", U(this, re), U(this, Re).toFixed(0))) : Ae(this, re, this.updateInterval), U(this, re) > 0 && U(this, Ye) % U(this, re) != 0))
6497
+ if (Bl || (this.updateInterval === "auto" ? U(this, Re) < 40 && U(this, oe) < 10 ? (Ae(this, oe, U(this, oe) + 1), ve && console.warn("↓ Reducing LOD updates", U(this, oe), U(this, Re).toFixed(0))) : U(this, Re) >= 60 && U(this, oe) > 1 && (Ae(this, oe, U(this, oe) - 1), ve && console.warn("↑ Increasing LOD updates", U(this, oe), U(this, Re).toFixed(0))) : Ae(this, oe, this.updateInterval), U(this, oe) > 0 && U(this, Ye) % U(this, oe) != 0))
6498
6498
  return;
6499
6499
  this.internalUpdate(e, t), this._postprocessPromiseGroups();
6500
6500
  }
@@ -6550,10 +6550,10 @@ const H = class H {
6550
6550
  for (const f of qe)
6551
6551
  (c = f.onBeforeUpdateLOD) == null || c.call(f, this.renderer, e, t, i);
6552
6552
  const o = this.overrideLodLevel !== void 0 ? this.overrideLodLevel : st;
6553
- o >= 0 ? (te.mesh_lod = o, te.texture_lod = o) : (this.calculateLodLevel(t, i, a, s, te), te.mesh_lod = Math.round(te.mesh_lod), te.texture_lod = Math.round(te.texture_lod)), te.mesh_lod >= 0 && this.loadProgressiveMeshes(i, te.mesh_lod), i.material && te.texture_lod >= 0 && this.loadProgressiveTextures(i.material, te.texture_lod, o), O && i.material && !i.isGizmo && mn(i.material);
6553
+ o >= 0 ? (se.mesh_lod = o, se.texture_lod = o) : (this.calculateLodLevel(t, i, a, s, se), se.mesh_lod = Math.round(se.mesh_lod), se.texture_lod = Math.round(se.texture_lod)), se.mesh_lod >= 0 && this.loadProgressiveMeshes(i, se.mesh_lod), i.material && se.texture_lod >= 0 && this.loadProgressiveTextures(i.material, se.texture_lod, o), O && i.material && !i.isGizmo && mn(i.material);
6554
6554
  for (const f of qe)
6555
- (u = f.onAfterUpdatedLOD) == null || u.call(f, this.renderer, e, t, i, te);
6556
- a.lastLodLevel_Mesh = te.mesh_lod, a.lastLodLevel_Texture = te.texture_lod;
6555
+ (u = f.onAfterUpdatedLOD) == null || u.call(f, this.renderer, e, t, i, se);
6556
+ a.lastLodLevel_Mesh = se.mesh_lod, a.lastLodLevel_Texture = se.texture_lod;
6557
6557
  }
6558
6558
  /** Load progressive textures for the given material
6559
6559
  * @param material the material to load the textures for
@@ -6632,8 +6632,8 @@ const H = class H {
6632
6632
  }
6633
6633
  const w = x[H.$skinnedMeshBoundsOffset];
6634
6634
  if ((i.frames + w) % this.skinnedMeshAutoUpdateBoundsInterval === 0) {
6635
- const A = ni(x), S = x.geometry;
6636
- A && (x.geometry = A), x.computeBoundingBox(), x.geometry = S;
6635
+ const A = ni(x), T = x.geometry;
6636
+ A && (x.geometry = A), x.computeBoundingBox(), x.geometry = T;
6637
6637
  }
6638
6638
  }
6639
6639
  v = x.boundingBox;
@@ -6642,8 +6642,8 @@ const H = class H {
6642
6642
  const x = e;
6643
6643
  if (t.geometry.attributes.color && t.geometry.attributes.color.count < 100 && t.geometry.boundingSphere) {
6644
6644
  this._sphere.copy(t.geometry.boundingSphere), this._sphere.applyMatrix4(t.matrixWorld);
6645
- const C = e.getWorldPosition(this._tempWorldPosition);
6646
- if (this._sphere.containsPoint(C)) {
6645
+ const M = e.getWorldPosition(this._tempWorldPosition);
6646
+ if (this._sphere.containsPoint(M)) {
6647
6647
  a.mesh_lod = 0, a.texture_lod = 0;
6648
6648
  return;
6649
6649
  }
@@ -6653,37 +6653,37 @@ const H = class H {
6653
6653
  return;
6654
6654
  }
6655
6655
  if (this._tempBox.applyMatrix4(this.projectionScreenMatrix), this.renderer.xr.enabled && x.isPerspectiveCamera && x.fov > 70) {
6656
- const C = this._tempBox.min, D = this._tempBox.max;
6657
- let L = C.x, k = C.y, z = D.x, W = D.y;
6658
- const G = 2, ce = 1.5, ue = (C.x + D.x) * 0.5, Me = (C.y + D.y) * 0.5;
6659
- L = (L - ue) * G + ue, k = (k - Me) * G + Me, z = (z - ue) * G + ue, W = (W - Me) * G + Me;
6660
- const Lt = L < 0 && z > 0 ? 0 : Math.min(Math.abs(C.x), Math.abs(D.x)), Vi = k < 0 && W > 0 ? 0 : Math.min(Math.abs(C.y), Math.abs(D.y)), kt = Math.max(Lt, Vi);
6661
- i.lastCentrality = (ce - kt) * (ce - kt) * (ce - kt);
6656
+ const M = this._tempBox.min, P = this._tempBox.max;
6657
+ let L = M.x, k = M.y, z = P.x, W = P.y;
6658
+ const G = 2, $ = 1.5, ee = (M.x + P.x) * 0.5, Me = (M.y + P.y) * 0.5;
6659
+ L = (L - ee) * G + ee, k = (k - Me) * G + Me, z = (z - ee) * G + ee, W = (W - Me) * G + Me;
6660
+ const Lt = L < 0 && z > 0 ? 0 : Math.min(Math.abs(M.x), Math.abs(P.x)), Vi = k < 0 && W > 0 ? 0 : Math.min(Math.abs(M.y), Math.abs(P.y)), kt = Math.max(Lt, Vi);
6661
+ i.lastCentrality = ($ - kt) * ($ - kt) * ($ - kt);
6662
6662
  } else
6663
6663
  i.lastCentrality = 1;
6664
6664
  const w = this._tempBox.getSize(this._tempBoxSize);
6665
6665
  w.multiplyScalar(0.5), screen.availHeight > 0 && m > 0 && w.multiplyScalar(m / screen.availHeight), e.isPerspectiveCamera ? w.x *= e.aspect : e.isOrthographicCamera;
6666
- const A = e.matrixWorldInverse, S = this._tempBox2;
6667
- S.copy(v), S.applyMatrix4(t.matrixWorld), S.applyMatrix4(A);
6668
- const I = S.getSize(this._tempBox2Size), M = Math.max(I.x, I.y);
6669
- if (Math.max(w.x, w.y) != 0 && M != 0 && (w.z = I.z / Math.max(I.x, I.y) * Math.max(w.x, w.y)), i.lastScreenCoverage = Math.max(w.x, w.y, w.z), i.lastScreenspaceVolume.copy(w), i.lastScreenCoverage *= i.lastCentrality, ve && H.debugDrawLine) {
6670
- const C = this.tempMatrix.copy(this.projectionScreenMatrix);
6671
- C.invert();
6672
- const D = H.corner0, L = H.corner1, k = H.corner2, z = H.corner3;
6673
- D.copy(this._tempBox.min), L.copy(this._tempBox.max), L.x = D.x, k.copy(this._tempBox.max), k.y = D.y, z.copy(this._tempBox.max);
6674
- const W = (D.z + z.z) * 0.5;
6675
- D.z = L.z = k.z = z.z = W, D.applyMatrix4(C), L.applyMatrix4(C), k.applyMatrix4(C), z.applyMatrix4(C), H.debugDrawLine(D, L, 255), H.debugDrawLine(D, k, 255), H.debugDrawLine(L, z, 255), H.debugDrawLine(k, z, 255);
6666
+ const A = e.matrixWorldInverse, T = this._tempBox2;
6667
+ T.copy(v), T.applyMatrix4(t.matrixWorld), T.applyMatrix4(A);
6668
+ const I = T.getSize(this._tempBox2Size), C = Math.max(I.x, I.y);
6669
+ if (Math.max(w.x, w.y) != 0 && C != 0 && (w.z = I.z / Math.max(I.x, I.y) * Math.max(w.x, w.y)), i.lastScreenCoverage = Math.max(w.x, w.y, w.z), i.lastScreenspaceVolume.copy(w), i.lastScreenCoverage *= i.lastCentrality, ve && H.debugDrawLine) {
6670
+ const M = this.tempMatrix.copy(this.projectionScreenMatrix);
6671
+ M.invert();
6672
+ const P = H.corner0, L = H.corner1, k = H.corner2, z = H.corner3;
6673
+ P.copy(this._tempBox.min), L.copy(this._tempBox.max), L.x = P.x, k.copy(this._tempBox.max), k.y = P.y, z.copy(this._tempBox.max);
6674
+ const W = (P.z + z.z) * 0.5;
6675
+ P.z = L.z = k.z = z.z = W, P.applyMatrix4(M), L.applyMatrix4(M), k.applyMatrix4(M), z.applyMatrix4(M), H.debugDrawLine(P, L, 255), H.debugDrawLine(P, k, 255), H.debugDrawLine(L, z, 255), H.debugDrawLine(k, z, 255);
6676
6676
  }
6677
- let P = 999;
6677
+ let D = 999;
6678
6678
  if (f && i.lastScreenCoverage > 0)
6679
- for (let C = 0; C < f.length; C++) {
6680
- const D = f[C], k = (((g = D.densities) == null ? void 0 : g[d]) || D.density || 1e-5) / i.lastScreenCoverage;
6681
- if (d > 0 && Ar() && !D.densities && !globalThis["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"] && (window["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"] = !0, console.warn("[Needle Progressive] Detected usage of mesh without primitive densities. This might cause incorrect LOD level selection: Consider re-optimizing your model by updating your Needle Integration, Needle glTF Pipeline or running optimization again on Needle Cloud.")), k < s) {
6682
- P = C;
6679
+ for (let M = 0; M < f.length; M++) {
6680
+ const P = f[M], k = (((g = P.densities) == null ? void 0 : g[d]) || P.density || 1e-5) / i.lastScreenCoverage;
6681
+ if (d > 0 && Ar() && !P.densities && !globalThis["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"] && (window["NEEDLE:MISSING_LOD_PRIMITIVE_DENSITIES"] = !0, console.warn("[Needle Progressive] Detected usage of mesh without primitive densities. This might cause incorrect LOD level selection: Consider re-optimizing your model by updating your Needle Integration, Needle glTF Pipeline or running optimization again on Needle Cloud.")), k < s) {
6682
+ D = M;
6683
6683
  break;
6684
6684
  }
6685
6685
  }
6686
- P < c && (c = P, u = !0);
6686
+ D < c && (c = D, u = !0);
6687
6687
  }
6688
6688
  if (u ? a.mesh_lod = c : a.mesh_lod = i.lastLodLevel_Mesh, ve && a.mesh_lod != i.lastLodLevel_Mesh) {
6689
6689
  const w = f == null ? void 0 : f[a.mesh_lod];
@@ -6701,13 +6701,13 @@ const H = class H {
6701
6701
  let A = i.lastScreenCoverage * 4;
6702
6702
  ((y = this.context) == null ? void 0 : y.engine) === "model-viewer" && (A *= 1.5);
6703
6703
  const I = m / window.devicePixelRatio * A;
6704
- let M = !1;
6704
+ let C = !1;
6705
6705
  for (let R = l.lods.length - 1; R >= 0; R--) {
6706
- const P = l.lods[R];
6707
- if (!(x && P.max_height >= 2048) && !(pn() && P.max_height > 4096) && (P.max_height > I || !M && R === 0)) {
6708
- if (M = !0, a.texture_lod = R, ve && a.texture_lod < i.lastLodLevel_Texture) {
6709
- const T = P.max_height;
6710
- console.log(`Texture LOD changed: ${i.lastLodLevel_Texture} → ${a.texture_lod} = ${T}px
6706
+ const D = l.lods[R];
6707
+ if (!(x && D.max_height >= 2048) && !(pn() && D.max_height > 4096) && (D.max_height > I || !C && R === 0)) {
6708
+ if (C = !0, a.texture_lod = R, ve && a.texture_lod < i.lastLodLevel_Texture) {
6709
+ const S = D.max_height;
6710
+ console.log(`Texture LOD changed: ${i.lastLodLevel_Texture} → ${a.texture_lod} = ${S}px
6711
6711
  Screensize: ${I.toFixed(0)}px, Coverage: ${(100 * i.lastScreenCoverage).toFixed(2)}%, Volume ${w.toFixed(1)}
6712
6712
  ${t.name}`);
6713
6713
  }
@@ -6719,7 +6719,7 @@ ${t.name}`);
6719
6719
  a.texture_lod = 0;
6720
6720
  }
6721
6721
  };
6722
- re = new WeakMap(), Pe = new WeakMap(), ki = new WeakMap(), Ye = new WeakMap(), Mt = new WeakMap(), Fi = new WeakMap(), Re = new WeakMap(), /**
6722
+ oe = new WeakMap(), Pe = new WeakMap(), ki = new WeakMap(), Ye = new WeakMap(), Mt = new WeakMap(), Fi = new WeakMap(), Re = new WeakMap(), /**
6723
6723
  * Assign a function to draw debug lines for the LODs. This function will be called with the start and end position of the line and the color of the line when the `debugprogressive` query parameter is set.
6724
6724
  */
6725
6725
  E(H, "debugDrawLine"), E(H, "corner0", new b()), E(H, "corner1", new b()), E(H, "corner2", new b()), E(H, "corner3", new b()), E(H, "_tempPtInside", new b()), E(H, "skinnedMeshBoundsFrameOffsetCounter", 0), E(H, "$skinnedMeshBoundsOffset", Symbol("gltf-progressive-skinnedMeshBoundsOffset"));
@@ -7846,55 +7846,55 @@ var wn = {};
7846
7846
  if (m && !g._paused)
7847
7847
  return l || h._loadQueue("play"), g._id;
7848
7848
  h._webAudio && t._autoResume();
7849
- var y = Math.max(0, g._seek > 0 ? g._seek : h._sprite[r][0] / 1e3), x = Math.max(0, (h._sprite[r][0] + h._sprite[r][1]) / 1e3 - y), w = x * 1e3 / Math.abs(g._rate), A = h._sprite[r][0] / 1e3, S = (h._sprite[r][0] + h._sprite[r][1]) / 1e3;
7849
+ var y = Math.max(0, g._seek > 0 ? g._seek : h._sprite[r][0] / 1e3), x = Math.max(0, (h._sprite[r][0] + h._sprite[r][1]) / 1e3 - y), w = x * 1e3 / Math.abs(g._rate), A = h._sprite[r][0] / 1e3, T = (h._sprite[r][0] + h._sprite[r][1]) / 1e3;
7850
7850
  g._sprite = r, g._ended = !1;
7851
7851
  var I = function() {
7852
- g._paused = !1, g._seek = y, g._start = A, g._stop = S, g._loop = !!(g._loop || h._sprite[r][2]);
7852
+ g._paused = !1, g._seek = y, g._start = A, g._stop = T, g._loop = !!(g._loop || h._sprite[r][2]);
7853
7853
  };
7854
- if (y >= S) {
7854
+ if (y >= T) {
7855
7855
  h._ended(g);
7856
7856
  return;
7857
7857
  }
7858
- var M = g._node;
7858
+ var C = g._node;
7859
7859
  if (h._webAudio) {
7860
7860
  var R = function() {
7861
7861
  h._playLock = !1, I(), h._refreshBuffer(g);
7862
- var D = g._muted || h._muted ? 0 : g._volume;
7863
- M.gain.setValueAtTime(D, t.ctx.currentTime), g._playStart = t.ctx.currentTime, typeof M.bufferSource.start > "u" ? g._loop ? M.bufferSource.noteGrainOn(0, y, 86400) : M.bufferSource.noteGrainOn(0, y, x) : g._loop ? M.bufferSource.start(0, y, 86400) : M.bufferSource.start(0, y, x), w !== 1 / 0 && (h._endTimers[g._id] = setTimeout(h._ended.bind(h, g), w)), l || setTimeout(function() {
7862
+ var P = g._muted || h._muted ? 0 : g._volume;
7863
+ C.gain.setValueAtTime(P, t.ctx.currentTime), g._playStart = t.ctx.currentTime, typeof C.bufferSource.start > "u" ? g._loop ? C.bufferSource.noteGrainOn(0, y, 86400) : C.bufferSource.noteGrainOn(0, y, x) : g._loop ? C.bufferSource.start(0, y, 86400) : C.bufferSource.start(0, y, x), w !== 1 / 0 && (h._endTimers[g._id] = setTimeout(h._ended.bind(h, g), w)), l || setTimeout(function() {
7864
7864
  h._emit("play", g._id), h._loadQueue();
7865
7865
  }, 0);
7866
7866
  };
7867
7867
  t.state === "running" && t.ctx.state !== "interrupted" ? R() : (h._playLock = !0, h.once("resume", R), h._clearTimer(g._id));
7868
7868
  } else {
7869
- var P = function() {
7870
- M.currentTime = y, M.muted = g._muted || h._muted || t._muted || M.muted, M.volume = g._volume * t.volume(), M.playbackRate = g._rate;
7869
+ var D = function() {
7870
+ C.currentTime = y, C.muted = g._muted || h._muted || t._muted || C.muted, C.volume = g._volume * t.volume(), C.playbackRate = g._rate;
7871
7871
  try {
7872
- var D = M.play();
7873
- if (D && typeof Promise < "u" && (D instanceof Promise || typeof D.then == "function") ? (h._playLock = !0, I(), D.then(function() {
7874
- h._playLock = !1, M._unlocked = !0, l ? h._loadQueue() : h._emit("play", g._id);
7872
+ var P = C.play();
7873
+ if (P && typeof Promise < "u" && (P instanceof Promise || typeof P.then == "function") ? (h._playLock = !0, I(), P.then(function() {
7874
+ h._playLock = !1, C._unlocked = !0, l ? h._loadQueue() : h._emit("play", g._id);
7875
7875
  }).catch(function() {
7876
7876
  h._playLock = !1, h._emit("playerror", g._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction."), g._ended = !0, g._paused = !0;
7877
- })) : l || (h._playLock = !1, I(), h._emit("play", g._id)), M.playbackRate = g._rate, M.paused) {
7877
+ })) : l || (h._playLock = !1, I(), h._emit("play", g._id)), C.playbackRate = g._rate, C.paused) {
7878
7878
  h._emit("playerror", g._id, "Playback was unable to start. This is most commonly an issue on mobile devices and Chrome where playback was not within a user interaction.");
7879
7879
  return;
7880
7880
  }
7881
7881
  r !== "__default" || g._loop ? h._endTimers[g._id] = setTimeout(h._ended.bind(h, g), w) : (h._endTimers[g._id] = function() {
7882
- h._ended(g), M.removeEventListener("ended", h._endTimers[g._id], !1);
7883
- }, M.addEventListener("ended", h._endTimers[g._id], !1));
7882
+ h._ended(g), C.removeEventListener("ended", h._endTimers[g._id], !1);
7883
+ }, C.addEventListener("ended", h._endTimers[g._id], !1));
7884
7884
  } catch (L) {
7885
7885
  h._emit("playerror", g._id, L);
7886
7886
  }
7887
7887
  };
7888
- M.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" && (M.src = h._src, M.load());
7889
- var T = window && window.ejecta || !M.readyState && t._navigator.isCocoonJS;
7890
- if (M.readyState >= 3 || T)
7891
- P();
7888
+ C.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" && (C.src = h._src, C.load());
7889
+ var S = window && window.ejecta || !C.readyState && t._navigator.isCocoonJS;
7890
+ if (C.readyState >= 3 || S)
7891
+ D();
7892
7892
  else {
7893
7893
  h._playLock = !0, h._state = "loading";
7894
- var C = function() {
7895
- h._state = "loaded", P(), M.removeEventListener(t._canPlayEvent, C, !1);
7894
+ var M = function() {
7895
+ h._state = "loaded", D(), C.removeEventListener(t._canPlayEvent, M, !1);
7896
7896
  };
7897
- M.addEventListener(t._canPlayEvent, C, !1), h._clearTimer(g._id);
7897
+ C.addEventListener(t._canPlayEvent, M, !1), h._clearTimer(g._id);
7898
7898
  }
7899
7899
  }
7900
7900
  return g._id;
@@ -8050,8 +8050,8 @@ var wn = {};
8050
8050
  _startFadeInterval: function(r, l, h, m, v, p) {
8051
8051
  var g = this, _ = l, y = h - l, x = Math.abs(y / 0.01), w = Math.max(4, x > 0 ? m / x : m), A = Date.now();
8052
8052
  r._fadeTo = h, r._interval = setInterval(function() {
8053
- var S = (Date.now() - A) / m;
8054
- A = Date.now(), _ += y * S, _ = Math.round(_ * 100) / 100, y < 0 ? _ = Math.max(h, _) : _ = Math.min(h, _), g._webAudio ? r._volume = _ : g.volume(_, r._id, !0), p && (g._volume = _), (h < l && _ <= h || h > l && _ >= h) && (clearInterval(r._interval), r._interval = null, r._fadeTo = null, g.volume(h, r._id), g._emit("fade", r._id));
8053
+ var T = (Date.now() - A) / m;
8054
+ A = Date.now(), _ += y * T, _ = Math.round(_ * 100) / 100, y < 0 ? _ = Math.max(h, _) : _ = Math.min(h, _), g._webAudio ? r._volume = _ : g.volume(_, r._id, !0), p && (g._volume = _), (h < l && _ <= h || h > l && _ >= h) && (clearInterval(r._interval), r._interval = null, r._fadeTo = null, g.volume(h, r._id), g._emit("fade", r._id));
8055
8055
  }, w);
8056
8056
  },
8057
8057
  /**
@@ -8766,12 +8766,12 @@ function ic(n) {
8766
8766
  _.includes("width") && (t = !0), _.includes("length") && (e = !0), _.includes("height") && (i = !0);
8767
8767
  for (let y = 0; y < v.count; y++) {
8768
8768
  let x = v.getX(y), w = v.getY(y), A = v.getZ(y);
8769
- r = Math.max(w, r), p && g && p.forEach((I, M) => {
8770
- const R = g && g[M] || 0;
8769
+ r = Math.max(w, r), p && g && p.forEach((I, C) => {
8770
+ const R = g && g[C] || 0;
8771
8771
  x += I.getX(y) * R, w += I.getY(y) * R, A += I.getZ(y) * R;
8772
8772
  }), x < s && (s = x), w < a && (a = w), A < o && (o = A), x > c && (c = x), w > u && (u = w), A > f && (f = A);
8773
- const S = Math.sqrt(x * x + w * w);
8774
- S > d && (d = S);
8773
+ const T = Math.sqrt(x * x + w * w);
8774
+ T > d && (d = T);
8775
8775
  }
8776
8776
  }
8777
8777
  }), { box: new Y(new b(s, a, o), new b(c, u, f)), maxRadius: d, height: r, hasWidth: t, hasLength: e, hasHeight: i };
@@ -9417,13 +9417,13 @@ class hc extends Be {
9417
9417
  class Ii extends he {
9418
9418
  constructor(e, t = !0, i = !0) {
9419
9419
  super(), this._startWith = e, this._showText = t, this.useStartEnd = i, this._line2Length = 0.01, this._line = new ps(
9420
- new se(),
9420
+ new ne(),
9421
9421
  new Zs({
9422
9422
  color: "#666",
9423
9423
  linewidth: 2
9424
9424
  })
9425
9425
  ), this._line2 = new ps(
9426
- new se(),
9426
+ new ne(),
9427
9427
  new Zs({
9428
9428
  color: "#666",
9429
9429
  linewidth: 2
@@ -9448,7 +9448,7 @@ class Ii extends he {
9448
9448
  let o;
9449
9449
  Math.abs(a.z) > Math.abs(a.x) && Math.abs(a.z) > Math.abs(a.y) ? o = new b(-a.y, a.x, 0) : Math.abs(a.y) > Math.abs(a.x) ? o = new b(1, 0, 0) : o = new b(0, 1, 0), o.length() < 1e-3 && (Math.abs(a.x) < 0.9 ? o = new b(1, 0, 0) : o = new b(0, 1, 0)), o.normalize();
9450
9450
  const c = new b().addVectors(e, o.clone().multiplyScalar(s)), u = new b().addVectors(e, o.clone().multiplyScalar(-s)), f = new b().addVectors(t, o.clone().multiplyScalar(s)), d = new b().addVectors(t, o.clone().multiplyScalar(-s));
9451
- (m = this._line2.geometry) == null || m.dispose(), this._line2.geometry = new se(), this._line2.geometry.setFromPoints([
9451
+ (m = this._line2.geometry) == null || m.dispose(), this._line2.geometry = new ne(), this._line2.geometry.setFromPoints([
9452
9452
  c,
9453
9453
  u,
9454
9454
  // First line segment at start
@@ -10324,7 +10324,7 @@ function Sc(n, e = ArrayBuffer) {
10324
10324
  function Mc(n, e) {
10325
10325
  if (!n.index) {
10326
10326
  const t = n.attributes.position.count, i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s = Sc(t, i);
10327
- n.setIndex(new oe(s, 1));
10327
+ n.setIndex(new le(s, 1));
10328
10328
  for (let a = 0; a < t; a++)
10329
10329
  s[a] = a;
10330
10330
  }
@@ -10367,10 +10367,10 @@ function is(n, e, t, i, s) {
10367
10367
  for (let g = e * 6, _ = (e + t) * 6; g < _; g += 6) {
10368
10368
  const y = n[g + 0], x = n[g + 1], w = y - x, A = y + x;
10369
10369
  w < a && (a = w), A > u && (u = A), y < r && (r = y), y > m && (m = y);
10370
- const S = n[g + 2], I = n[g + 3], M = S - I, R = S + I;
10371
- M < o && (o = M), R > f && (f = R), S < l && (l = S), S > v && (v = S);
10372
- const P = n[g + 4], T = n[g + 5], C = P - T, D = P + T;
10373
- C < c && (c = C), D > d && (d = D), P < h && (h = P), P > p && (p = P);
10370
+ const T = n[g + 2], I = n[g + 3], C = T - I, R = T + I;
10371
+ C < o && (o = C), R > f && (f = R), T < l && (l = T), T > v && (v = T);
10372
+ const D = n[g + 4], S = n[g + 5], M = D - S, P = D + S;
10373
+ M < c && (c = M), P > d && (d = P), D < h && (h = D), D > p && (p = D);
10374
10374
  }
10375
10375
  i[0] = a, i[1] = o, i[2] = c, i[3] = u, i[4] = f, i[5] = d, s[0] = r, s[1] = l, s[2] = h, s[3] = m, s[4] = v, s[5] = p;
10376
10376
  }
@@ -10389,12 +10389,12 @@ function Ic(n, e = null, t = null, i = null) {
10389
10389
  for (let y = 0; y < 3; y++) {
10390
10390
  let x, w, A;
10391
10391
  c ? (x = s[l[y]](p), w = s[l[y]](g), A = s[l[y]](_)) : (x = f[p + y], w = f[g + y], A = f[_ + y]);
10392
- let S = x;
10393
- w < S && (S = w), A < S && (S = A);
10392
+ let T = x;
10393
+ w < T && (T = w), A < T && (T = A);
10394
10394
  let I = x;
10395
10395
  w > I && (I = w), A > I && (I = A);
10396
- const M = (I - S) / 2, R = y * 2;
10397
- u[v + R + 0] = S + M, u[v + R + 1] = M + (Math.abs(S) + M) * Ac;
10396
+ const C = (I - T) / 2, R = y * 2;
10397
+ u[v + R + 0] = T + C, u[v + R + 1] = C + (Math.abs(T) + C) * Ac;
10398
10398
  }
10399
10399
  }
10400
10400
  return u;
@@ -10458,11 +10458,11 @@ function Rc(n, e, t, i, s, a) {
10458
10458
  w.candidate = t[x + 2 * l], w.count = 0;
10459
10459
  const {
10460
10460
  bounds: A,
10461
- leftCacheBounds: S,
10461
+ leftCacheBounds: T,
10462
10462
  rightCacheBounds: I
10463
10463
  } = w;
10464
- for (let M = 0; M < 3; M++)
10465
- I[M] = 1 / 0, I[M + 3] = -1 / 0, S[M] = 1 / 0, S[M + 3] = -1 / 0, A[M] = 1 / 0, A[M + 3] = -1 / 0;
10464
+ for (let C = 0; C < 3; C++)
10465
+ I[C] = 1 / 0, I[C + 3] = -1 / 0, T[C] = 1 / 0, T[C + 3] = -1 / 0, A[C] = 1 / 0, A[C + 3] = -1 / 0;
10466
10466
  di(x, t, A);
10467
10467
  }
10468
10468
  g.sort(Pc);
@@ -10475,18 +10475,18 @@ function Rc(n, e, t, i, s, a) {
10475
10475
  for (let x = d; x < r; x += 6) {
10476
10476
  const w = t[x + 2 * l];
10477
10477
  for (let A = 0; A < y; A++) {
10478
- const S = g[A];
10479
- w >= S.candidate ? di(x, t, S.rightCacheBounds) : (di(x, t, S.leftCacheBounds), S.count++);
10478
+ const T = g[A];
10479
+ w >= T.candidate ? di(x, t, T.rightCacheBounds) : (di(x, t, T.leftCacheBounds), T.count++);
10480
10480
  }
10481
10481
  }
10482
10482
  for (let x = 0; x < y; x++) {
10483
- const w = g[x], A = w.count, S = s - w.count, I = w.leftCacheBounds, M = w.rightCacheBounds;
10483
+ const w = g[x], A = w.count, T = s - w.count, I = w.leftCacheBounds, C = w.rightCacheBounds;
10484
10484
  let R = 0;
10485
10485
  A !== 0 && (R = Nt(I) / u);
10486
- let P = 0;
10487
- S !== 0 && (P = Nt(M) / u);
10488
- const T = Ur + es * (R * A + P * S);
10489
- T < f && (o = l, f = T, c = w.candidate);
10486
+ let D = 0;
10487
+ T !== 0 && (D = Nt(C) / u);
10488
+ const S = Ur + es * (R * A + D * T);
10489
+ S < f && (o = l, f = S, c = w.candidate);
10490
10490
  }
10491
10491
  } else {
10492
10492
  for (let y = 0; y < Ce; y++) {
@@ -10499,8 +10499,8 @@ function Rc(n, e, t, i, s, a) {
10499
10499
  for (let y = d; y < r; y += 6) {
10500
10500
  let A = ~~((t[y + 2 * l] - h) / p);
10501
10501
  A >= Ce && (A = Ce - 1);
10502
- const S = We[A];
10503
- S.count++, di(y, t, S.bounds);
10502
+ const T = We[A];
10503
+ T.count++, di(y, t, T.bounds);
10504
10504
  }
10505
10505
  const g = We[Ce - 1];
10506
10506
  Nr(g.bounds, g.rightCacheBounds);
@@ -10512,12 +10512,12 @@ function Rc(n, e, t, i, s, a) {
10512
10512
  for (let y = 0; y < Ce - 1; y++) {
10513
10513
  const x = We[y], w = x.count, A = x.bounds, I = We[y + 1].rightCacheBounds;
10514
10514
  w !== 0 && (_ === 0 ? Nr(A, pi) : Wr(A, pi, pi)), _ += w;
10515
- let M = 0, R = 0;
10516
- _ !== 0 && (M = Nt(pi) / u);
10517
- const P = s - _;
10518
- P !== 0 && (R = Nt(I) / u);
10519
- const T = Ur + es * (M * _ + R * P);
10520
- T < f && (o = l, f = T, c = x.candidate);
10515
+ let C = 0, R = 0;
10516
+ _ !== 0 && (C = Nt(pi) / u);
10517
+ const D = s - _;
10518
+ D !== 0 && (R = Nt(I) / u);
10519
+ const S = Ur + es * (C * _ + R * D);
10520
+ S < f && (o = l, f = S, c = x.candidate);
10521
10521
  }
10522
10522
  }
10523
10523
  }
@@ -10578,10 +10578,10 @@ function Lc(n, e, t, i, s, a) {
10578
10578
  return o;
10579
10579
  }
10580
10580
  }
10581
- function ie(n, e) {
10581
+ function re(n, e) {
10582
10582
  return e[n + 15] === 65535;
10583
10583
  }
10584
- function ae(n, e) {
10584
+ function ce(n, e) {
10585
10585
  return e[n + 6];
10586
10586
  }
10587
10587
  function fe(n, e) {
@@ -10614,7 +10614,7 @@ function Ss(n, e) {
10614
10614
  Rn.set(new Uint8Array(o), n);
10615
10615
  for (let c = n, u = n + o.byteLength; c < u; c += $t) {
10616
10616
  const f = c / 2;
10617
- ie(f, Pi) || (Zt[c / 4 + 6] += t);
10617
+ re(f, Pi) || (Zt[c / 4 + 6] += t);
10618
10618
  }
10619
10619
  return n + o.byteLength;
10620
10620
  } else {
@@ -10650,21 +10650,21 @@ function Oc(n, e, t, i, s) {
10650
10650
  function y(w) {
10651
10651
  f && f(w / v);
10652
10652
  }
10653
- function x(w, A, S, I = null, M = 0) {
10654
- if (!g && M >= a && (g = !0, o && (console.warn(`MeshBVH: Max depth of ${a} reached when generating BVH. Consider increasing maxDepth.`), console.warn(l))), S <= c || M >= a)
10655
- return y(A + S), w.offset = A, w.count = S, w;
10656
- const R = Rc(w.boundingData, I, e, A, S, u);
10653
+ function x(w, A, T, I = null, C = 0) {
10654
+ if (!g && C >= a && (g = !0, o && (console.warn(`MeshBVH: Max depth of ${a} reached when generating BVH. Consider increasing maxDepth.`), console.warn(l))), T <= c || C >= a)
10655
+ return y(A + T), w.offset = A, w.count = T, w;
10656
+ const R = Rc(w.boundingData, I, e, A, T, u);
10657
10657
  if (R.axis === -1)
10658
- return y(A + S), w.offset = A, w.count = S, w;
10659
- const P = m(r, h, e, A, S, R);
10660
- if (P === A || P === A + S)
10661
- y(A + S), w.offset = A, w.count = S;
10658
+ return y(A + T), w.offset = A, w.count = T, w;
10659
+ const D = m(r, h, e, A, T, R);
10660
+ if (D === A || D === A + T)
10661
+ y(A + T), w.offset = A, w.count = T;
10662
10662
  else {
10663
10663
  w.splitAxis = R.axis;
10664
- const T = new ss(), C = A, D = P - A;
10665
- w.left = T, is(e, C, D, T.boundingData, p), x(T, C, D, p, M + 1);
10666
- const L = new ss(), k = P, z = S - D;
10667
- w.right = L, is(e, k, z, L.boundingData, p), x(L, k, z, p, M + 1);
10664
+ const S = new ss(), M = A, P = D - A;
10665
+ w.left = S, is(e, M, P, S.boundingData, p), x(S, M, P, p, C + 1);
10666
+ const L = new ss(), k = D, z = T - P;
10667
+ w.right = L, is(e, k, z, L.boundingData, p), x(L, k, z, p, C + 1);
10668
10668
  }
10669
10669
  return w;
10670
10670
  }
@@ -10811,15 +10811,15 @@ be.prototype.intersectsTriangle = function() {
10811
10811
  const _ = v.points;
10812
10812
  let y = 0, x = -1;
10813
10813
  for (let w = 0; w < 3; w++) {
10814
- const { start: A, end: S } = d;
10815
- A.copy(_[w]), S.copy(_[(w + 1) % 3]), d.delta(o);
10814
+ const { start: A, end: T } = d;
10815
+ A.copy(_[w]), T.copy(_[(w + 1) % 3]), d.delta(o);
10816
10816
  const I = rs(p.distanceToPoint(A));
10817
10817
  if (rs(p.normal.dot(o)) && I) {
10818
10818
  g.copy(d), y = 2;
10819
10819
  break;
10820
10820
  }
10821
- const M = p.intersectLine(d, h);
10822
- if (!M && I && h.copy(A), (M || I) && !rs(h.distanceTo(S))) {
10821
+ const C = p.intersectLine(d, h);
10822
+ if (!C && I && h.copy(A), (C || I) && !rs(h.distanceTo(T))) {
10823
10823
  if (y <= 1)
10824
10824
  (y === 1 ? g.start : g.end).copy(h), I && (x = y);
10825
10825
  else if (y >= 2) {
@@ -10838,23 +10838,23 @@ be.prototype.intersectsTriangle = function() {
10838
10838
  if (Math.abs(y.normal.dot(x.normal)) > 1 - 1e-10) {
10839
10839
  const w = this.satBounds, A = this.satAxes;
10840
10840
  t[0] = p.a, t[1] = p.b, t[2] = p.c;
10841
- for (let M = 0; M < 4; M++) {
10842
- const R = w[M], P = A[M];
10843
- if (i.setFromPoints(P, t), R.isSeparated(i))
10841
+ for (let C = 0; C < 4; C++) {
10842
+ const R = w[C], D = A[C];
10843
+ if (i.setFromPoints(D, t), R.isSeparated(i))
10844
10844
  return !1;
10845
10845
  }
10846
- const S = p.satBounds, I = p.satAxes;
10846
+ const T = p.satBounds, I = p.satAxes;
10847
10847
  e[0] = this.a, e[1] = this.b, e[2] = this.c;
10848
- for (let M = 0; M < 4; M++) {
10849
- const R = S[M], P = I[M];
10850
- if (i.setFromPoints(P, e), R.isSeparated(i))
10848
+ for (let C = 0; C < 4; C++) {
10849
+ const R = T[C], D = I[C];
10850
+ if (i.setFromPoints(D, e), R.isSeparated(i))
10851
10851
  return !1;
10852
10852
  }
10853
- for (let M = 0; M < 4; M++) {
10854
- const R = A[M];
10855
- for (let P = 0; P < 4; P++) {
10856
- const T = I[P];
10857
- if (a.crossVectors(R, T), i.setFromPoints(a, e), s.setFromPoints(a, t), i.isSeparated(s))
10853
+ for (let C = 0; C < 4; C++) {
10854
+ const R = A[C];
10855
+ for (let D = 0; D < 4; D++) {
10856
+ const S = I[D];
10857
+ if (a.crossVectors(R, S), i.setFromPoints(a, e), s.setFromPoints(a, t), i.isSeparated(s))
10858
10858
  return !1;
10859
10859
  }
10860
10860
  }
@@ -10871,11 +10871,11 @@ be.prototype.intersectsTriangle = function() {
10871
10871
  if (A !== 2)
10872
10872
  return !1;
10873
10873
  if (r.delta(c), l.delta(u), c.dot(u) < 0) {
10874
- let C = l.start;
10875
- l.start = l.end, l.end = C;
10874
+ let M = l.start;
10875
+ l.start = l.end, l.end = M;
10876
10876
  }
10877
- const S = r.start.dot(c), I = r.end.dot(c), M = l.start.dot(c), R = l.end.dot(c), P = I < M, T = S < R;
10878
- return S !== R && M !== I && P === T ? !1 : (g && (f.subVectors(r.start, l.start), f.dot(c) > 0 ? g.start.copy(r.start) : g.start.copy(l.start), f.subVectors(r.end, l.end), f.dot(c) < 0 ? g.end.copy(r.end) : g.end.copy(l.end)), !0);
10877
+ const T = r.start.dot(c), I = r.end.dot(c), C = l.start.dot(c), R = l.end.dot(c), D = I < C, S = T < R;
10878
+ return T !== R && C !== I && D === S ? !1 : (g && (f.subVectors(r.start, l.start), f.dot(c) > 0 ? g.start.copy(r.start) : g.start.copy(l.start), f.subVectors(r.end, l.end), f.dot(c) < 0 ? g.end.copy(r.end) : g.end.copy(l.end)), !0);
10879
10879
  }
10880
10880
  };
10881
10881
  }();
@@ -10912,7 +10912,7 @@ be.prototype.distanceToTriangle = function() {
10912
10912
  return Math.sqrt(d);
10913
10913
  };
10914
10914
  }();
10915
- class $ {
10915
+ class te {
10916
10916
  constructor(e, t, i) {
10917
10917
  this.isOrientedBox = !0, this.min = new b(), this.max = new b(), this.matrix = new Q(), this.invMatrix = new Q(), this.points = new Array(8).fill().map(() => new b()), this.satAxes = new Array(3).fill().map(() => new b()), this.satBounds = new Array(3).fill().map(() => new Ue()), this.alignedSatBounds = new Array(3).fill().map(() => new Ue()), this.needsUpdate = !1, e && this.min.copy(e), t && this.max.copy(t), i && this.matrix.copy(i);
10918
10918
  }
@@ -10923,7 +10923,7 @@ class $ {
10923
10923
  this.min.copy(e.min), this.max.copy(e.max), this.matrix.copy(e.matrix), this.needsUpdate = !0;
10924
10924
  }
10925
10925
  }
10926
- $.prototype.update = /* @__PURE__ */ function() {
10926
+ te.prototype.update = /* @__PURE__ */ function() {
10927
10927
  return function() {
10928
10928
  const e = this.matrix, t = this.min, i = this.max, s = this.points;
10929
10929
  for (let f = 0; f <= 1; f++)
@@ -10941,7 +10941,7 @@ $.prototype.update = /* @__PURE__ */ function() {
10941
10941
  u[0].setFromPointsField(s, "x"), u[1].setFromPointsField(s, "y"), u[2].setFromPointsField(s, "z"), this.invMatrix.copy(this.matrix).invert(), this.needsUpdate = !1;
10942
10942
  };
10943
10943
  }();
10944
- $.prototype.intersectsBox = function() {
10944
+ te.prototype.intersectsBox = function() {
10945
10945
  const n = new Ue();
10946
10946
  return function(t) {
10947
10947
  this.needsUpdate && this.update();
@@ -10956,7 +10956,7 @@ $.prototype.intersectsBox = function() {
10956
10956
  return !0;
10957
10957
  };
10958
10958
  }();
10959
- $.prototype.intersectsTriangle = function() {
10959
+ te.prototype.intersectsTriangle = function() {
10960
10960
  const n = new be(), e = new Array(3), t = new Ue(), i = new Ue(), s = new b();
10961
10961
  return function(o) {
10962
10962
  this.needsUpdate && this.update(), o.isExtendedTriangle ? o.needsUpdate && o.update() : (n.copy(o), n.update(), o = n);
@@ -10984,18 +10984,18 @@ $.prototype.intersectsTriangle = function() {
10984
10984
  return !0;
10985
10985
  };
10986
10986
  }();
10987
- $.prototype.closestPointToPoint = /* @__PURE__ */ function() {
10987
+ te.prototype.closestPointToPoint = /* @__PURE__ */ function() {
10988
10988
  return function(e, t) {
10989
10989
  return this.needsUpdate && this.update(), t.copy(e).applyMatrix4(this.invMatrix).clamp(this.min, this.max).applyMatrix4(this.matrix), t;
10990
10990
  };
10991
10991
  }();
10992
- $.prototype.distanceToPoint = function() {
10992
+ te.prototype.distanceToPoint = function() {
10993
10993
  const n = new b();
10994
10994
  return function(t) {
10995
10995
  return this.closestPointToPoint(t, n), t.distanceTo(n);
10996
10996
  };
10997
10997
  }();
10998
- $.prototype.distanceToBox = function() {
10998
+ te.prototype.distanceToBox = function() {
10999
10999
  const n = ["x", "y", "z"], e = new Array(12).fill().map(() => new Fe()), t = new Array(12).fill().map(() => new Fe()), i = new b(), s = new b();
11000
11000
  return function(o, c = 0, u = null, f = null) {
11001
11001
  if (this.needsUpdate && this.update(), this.intersectsBox(o))
@@ -11013,10 +11013,10 @@ $.prototype.distanceToBox = function() {
11013
11013
  for (let p = 0; p < 3; p++)
11014
11014
  for (let g = 0; g <= 1; g++)
11015
11015
  for (let _ = 0; _ <= 1; _++) {
11016
- const y = (p + 1) % 3, x = (p + 2) % 3, w = g << y | _ << x, A = 1 << p | g << y | _ << x, S = h[w], I = h[A];
11017
- e[v].set(S, I);
11018
- const R = n[p], P = n[y], T = n[x], C = t[v], D = C.start, L = C.end;
11019
- D[R] = r[R], D[P] = g ? r[P] : l[P], D[T] = _ ? r[T] : l[P], L[R] = l[R], L[P] = g ? r[P] : l[P], L[T] = _ ? r[T] : l[P], v++;
11016
+ const y = (p + 1) % 3, x = (p + 2) % 3, w = g << y | _ << x, A = 1 << p | g << y | _ << x, T = h[w], I = h[A];
11017
+ e[v].set(T, I);
11018
+ const R = n[p], D = n[y], S = n[x], M = t[v], P = M.start, L = M.end;
11019
+ P[R] = r[R], P[D] = g ? r[D] : l[D], P[S] = _ ? r[S] : l[D], L[R] = l[R], L[D] = g ? r[D] : l[D], L[S] = _ ? r[S] : l[D], v++;
11020
11020
  }
11021
11021
  for (let p = 0; p <= 1; p++)
11022
11022
  for (let g = 0; g <= 1; g++)
@@ -11082,36 +11082,36 @@ function Gc(n, e, t, i, s, a) {
11082
11082
  function Ms(n, e, t, i, s = null, a = 0, o = 0) {
11083
11083
  const { float32Array: c, uint16Array: u, uint32Array: f } = N;
11084
11084
  let d = n * 2;
11085
- if (ie(d, u)) {
11086
- const l = ae(n, f), h = fe(d, u);
11085
+ if (re(d, u)) {
11086
+ const l = ce(n, f), h = fe(d, u);
11087
11087
  return V(n, c, Qe), i(l, h, !1, o, a + n, Qe);
11088
11088
  } else {
11089
- let R = function(T) {
11090
- const { uint16Array: C, uint32Array: D } = N;
11091
- let L = T * 2;
11092
- for (; !ie(L, C); )
11093
- T = de(T), L = T * 2;
11094
- return ae(T, D);
11095
- }, P = function(T) {
11096
- const { uint16Array: C, uint32Array: D } = N;
11097
- let L = T * 2;
11098
- for (; !ie(L, C); )
11099
- T = pe(T, D), L = T * 2;
11100
- return ae(T, D) + fe(L, C);
11089
+ let R = function(S) {
11090
+ const { uint16Array: M, uint32Array: P } = N;
11091
+ let L = S * 2;
11092
+ for (; !re(L, M); )
11093
+ S = de(S), L = S * 2;
11094
+ return ce(S, P);
11095
+ }, D = function(S) {
11096
+ const { uint16Array: M, uint32Array: P } = N;
11097
+ let L = S * 2;
11098
+ for (; !re(L, M); )
11099
+ S = pe(S, P), L = S * 2;
11100
+ return ce(S, P) + fe(L, M);
11101
11101
  };
11102
11102
  const l = de(n), h = pe(n, f);
11103
11103
  let m = l, v = h, p, g, _, y;
11104
11104
  if (s && (_ = Qe, y = At, V(m, c, _), V(v, c, y), p = s(_), g = s(y), g < p)) {
11105
11105
  m = h, v = l;
11106
- const T = p;
11107
- p = g, g = T, _ = y;
11106
+ const S = p;
11107
+ p = g, g = S, _ = y;
11108
11108
  }
11109
11109
  _ || (_ = Qe, V(m, c, _));
11110
- const x = ie(m * 2, u), w = t(_, x, p, o + 1, a + m);
11110
+ const x = re(m * 2, u), w = t(_, x, p, o + 1, a + m);
11111
11111
  let A;
11112
11112
  if (w === zr) {
11113
- const T = R(m), D = P(m) - T;
11114
- A = i(T, D, !0, o + 1, a + m, _);
11113
+ const S = R(m), P = D(m) - S;
11114
+ A = i(S, P, !0, o + 1, a + m, _);
11115
11115
  } else
11116
11116
  A = w && Ms(
11117
11117
  m,
@@ -11125,13 +11125,13 @@ function Ms(n, e, t, i, s = null, a = 0, o = 0) {
11125
11125
  if (A)
11126
11126
  return !0;
11127
11127
  y = At, V(v, c, y);
11128
- const S = ie(v * 2, u), I = t(y, S, g, o + 1, a + v);
11129
- let M;
11128
+ const T = re(v * 2, u), I = t(y, T, g, o + 1, a + v);
11129
+ let C;
11130
11130
  if (I === zr) {
11131
- const T = R(v), D = P(v) - T;
11132
- M = i(T, D, !0, o + 1, a + v, y);
11131
+ const S = R(v), P = D(v) - S;
11132
+ C = i(S, P, !0, o + 1, a + v, y);
11133
11133
  } else
11134
- M = I && Ms(
11134
+ C = I && Ms(
11135
11135
  v,
11136
11136
  e,
11137
11137
  t,
@@ -11140,7 +11140,7 @@ function Ms(n, e, t, i, s = null, a = 0, o = 0) {
11140
11140
  a,
11141
11141
  o + 1
11142
11142
  );
11143
- return !!M;
11143
+ return !!C;
11144
11144
  }
11145
11145
  }
11146
11146
  const Wt = /* @__PURE__ */ new b(), ns = /* @__PURE__ */ new b();
@@ -11236,29 +11236,29 @@ function Kc(n, e = null) {
11236
11236
  const v = l * 2;
11237
11237
  if (c[v + 15] === Ni) {
11238
11238
  const g = o[l + 6], _ = c[v + 14];
11239
- let y = 1 / 0, x = 1 / 0, w = 1 / 0, A = -1 / 0, S = -1 / 0, I = -1 / 0;
11240
- for (let M = 3 * g, R = 3 * (g + _); M < R; M++) {
11241
- let P = i[M];
11242
- const T = s.getX(P), C = s.getY(P), D = s.getZ(P);
11243
- T < y && (y = T), T > A && (A = T), C < x && (x = C), C > S && (S = C), D < w && (w = D), D > I && (I = D);
11239
+ let y = 1 / 0, x = 1 / 0, w = 1 / 0, A = -1 / 0, T = -1 / 0, I = -1 / 0;
11240
+ for (let C = 3 * g, R = 3 * (g + _); C < R; C++) {
11241
+ let D = i[C];
11242
+ const S = s.getX(D), M = s.getY(D), P = s.getZ(D);
11243
+ S < y && (y = S), S > A && (A = S), M < x && (x = M), M > T && (T = M), P < w && (w = P), P > I && (I = P);
11244
11244
  }
11245
- return u[l + 0] !== y || u[l + 1] !== x || u[l + 2] !== w || u[l + 3] !== A || u[l + 4] !== S || u[l + 5] !== I ? (u[l + 0] = y, u[l + 1] = x, u[l + 2] = w, u[l + 3] = A, u[l + 4] = S, u[l + 5] = I, !0) : !1;
11245
+ return u[l + 0] !== y || u[l + 1] !== x || u[l + 2] !== w || u[l + 3] !== A || u[l + 4] !== T || u[l + 5] !== I ? (u[l + 0] = y, u[l + 1] = x, u[l + 2] = w, u[l + 3] = A, u[l + 4] = T, u[l + 5] = I, !0) : !1;
11246
11246
  } else {
11247
11247
  const g = l + 8, _ = o[l + 6], y = g + h, x = _ + h;
11248
- let w = m, A = !1, S = !1;
11249
- e ? w || (A = e.has(y), S = e.has(x), w = !A && !S) : (A = !0, S = !0);
11250
- const I = w || A, M = w || S;
11248
+ let w = m, A = !1, T = !1;
11249
+ e ? w || (A = e.has(y), T = e.has(x), w = !A && !T) : (A = !0, T = !0);
11250
+ const I = w || A, C = w || T;
11251
11251
  let R = !1;
11252
11252
  I && (R = r(g, h, w));
11253
- let P = !1;
11254
- M && (P = r(_, h, w));
11255
- const T = R || P;
11256
- if (T)
11257
- for (let C = 0; C < 3; C++) {
11258
- const D = g + C, L = _ + C, k = u[D], z = u[D + 3], W = u[L], G = u[L + 3];
11259
- u[l + C] = k < W ? k : W, u[l + C + 3] = z > G ? z : G;
11253
+ let D = !1;
11254
+ C && (D = r(_, h, w));
11255
+ const S = R || D;
11256
+ if (S)
11257
+ for (let M = 0; M < 3; M++) {
11258
+ const P = g + M, L = _ + M, k = u[P], z = u[P + 3], W = u[L], G = u[L + 3];
11259
+ u[l + M] = k < W ? k : W, u[l + M + 3] = z > G ? z : G;
11260
11260
  }
11261
- return T;
11261
+ return S;
11262
11262
  }
11263
11263
  }
11264
11264
  }
@@ -11298,8 +11298,8 @@ function tu(n, e, t, i, s, a, o) {
11298
11298
  }
11299
11299
  function Cs(n, e, t, i, s, a, o) {
11300
11300
  const { float32Array: c, uint16Array: u, uint32Array: f } = N, d = n * 2;
11301
- if (ie(d, u)) {
11302
- const l = ae(n, f), h = fe(d, u);
11301
+ if (re(d, u)) {
11302
+ const l = ce(n, f), h = fe(d, u);
11303
11303
  Qc(e, t, i, l, h, s, a, o);
11304
11304
  } else {
11305
11305
  const l = de(n);
@@ -11317,8 +11317,8 @@ function su(n, e, t, i, s, a) {
11317
11317
  function Is(n, e, t, i, s, a) {
11318
11318
  const { float32Array: o, uint16Array: c, uint32Array: u } = N;
11319
11319
  let f = n * 2;
11320
- if (ie(f, c)) {
11321
- const r = ae(n, u), l = fe(f, c);
11320
+ if (re(f, c)) {
11321
+ const r = ce(n, u), l = fe(f, c);
11322
11322
  return Zc(e, t, i, r, l, s, a);
11323
11323
  } else {
11324
11324
  const r = In(n, u), l = iu[r], m = i.direction[l] >= 0;
@@ -11337,7 +11337,7 @@ function Is(n, e, t, i, s, a) {
11337
11337
  return _ && x ? _.distance <= x.distance ? _ : x : _ || x || null;
11338
11338
  }
11339
11339
  }
11340
- const xi = /* @__PURE__ */ new Y(), dt = /* @__PURE__ */ new be(), pt = /* @__PURE__ */ new be(), Vt = /* @__PURE__ */ new Q(), jr = /* @__PURE__ */ new $(), wi = /* @__PURE__ */ new $();
11340
+ const xi = /* @__PURE__ */ new Y(), dt = /* @__PURE__ */ new be(), pt = /* @__PURE__ */ new be(), Vt = /* @__PURE__ */ new Q(), jr = /* @__PURE__ */ new te(), wi = /* @__PURE__ */ new te();
11341
11341
  function ru(n, e, t, i) {
11342
11342
  N.setBuffer(n._roots[e]);
11343
11343
  const s = Ps(0, n, t, i);
@@ -11346,8 +11346,8 @@ function ru(n, e, t, i) {
11346
11346
  function Ps(n, e, t, i, s = null) {
11347
11347
  const { float32Array: a, uint16Array: o, uint32Array: c } = N;
11348
11348
  let u = n * 2;
11349
- if (s === null && (t.boundingBox || t.computeBoundingBox(), jr.set(t.boundingBox.min, t.boundingBox.max, i), s = jr), ie(u, o)) {
11350
- const d = e.geometry, r = d.index, l = d.attributes.position, h = t.index, m = t.attributes.position, v = ae(n, c), p = fe(u, o);
11349
+ if (s === null && (t.boundingBox || t.computeBoundingBox(), jr.set(t.boundingBox.min, t.boundingBox.max, i), s = jr), re(u, o)) {
11350
+ const d = e.geometry, r = d.index, l = d.attributes.position, h = t.index, m = t.attributes.position, v = ce(n, c), p = fe(u, o);
11351
11351
  if (Vt.copy(i).invert(), t.boundsTree)
11352
11352
  return V(n, a, wi), wi.matrix.copy(Vt), wi.needsUpdate = !0, t.boundsTree.shapecast({
11353
11353
  intersectsBounds: (_) => wi.intersectsBox(_),
@@ -11370,7 +11370,7 @@ function Ps(n, e, t, i, s = null) {
11370
11370
  return V(d, a, xi), !!(s.intersectsBox(xi) && Ps(d, e, t, i, s) || (V(r, a, xi), s.intersectsBox(xi) && Ps(r, e, t, i, s)));
11371
11371
  }
11372
11372
  }
11373
- const bi = /* @__PURE__ */ new Q(), os = /* @__PURE__ */ new $(), Gt = /* @__PURE__ */ new $(), nu = /* @__PURE__ */ new b(), ou = /* @__PURE__ */ new b(), au = /* @__PURE__ */ new b(), lu = /* @__PURE__ */ new b();
11373
+ const bi = /* @__PURE__ */ new Q(), os = /* @__PURE__ */ new te(), Gt = /* @__PURE__ */ new te(), nu = /* @__PURE__ */ new b(), ou = /* @__PURE__ */ new b(), au = /* @__PURE__ */ new b(), lu = /* @__PURE__ */ new b();
11374
11374
  function cu(n, e, t, i = {}, s = {}, a = 0, o = 1 / 0) {
11375
11375
  e.boundingBox || e.computeBoundingBox(), os.set(e.boundingBox.min, e.boundingBox.max, t), os.needsUpdate = !0;
11376
11376
  const c = n.geometry, u = c.attributes.position, f = c.index, d = e.attributes.position, r = e.index, l = me.getPrimitive(), h = me.getPrimitive();
@@ -11380,32 +11380,32 @@ function cu(n, e, t, i = {}, s = {}, a = 0, o = 1 / 0) {
11380
11380
  return bi.copy(t).invert(), Gt.matrix.copy(bi), n.shapecast(
11381
11381
  {
11382
11382
  boundsTraverseOrder: (w) => os.distanceToBox(w),
11383
- intersectsBounds: (w, A, S) => S < _ && S < o ? (A && (Gt.min.copy(w.min), Gt.max.copy(w.max), Gt.needsUpdate = !0), !0) : !1,
11383
+ intersectsBounds: (w, A, T) => T < _ && T < o ? (A && (Gt.min.copy(w.min), Gt.max.copy(w.max), Gt.needsUpdate = !0), !0) : !1,
11384
11384
  intersectsRange: (w, A) => {
11385
11385
  if (e.boundsTree)
11386
11386
  return e.boundsTree.shapecast({
11387
11387
  boundsTraverseOrder: (I) => Gt.distanceToBox(I),
11388
- intersectsBounds: (I, M, R) => R < _ && R < o,
11389
- intersectsRange: (I, M) => {
11390
- for (let R = I, P = I + M; R < P; R++) {
11388
+ intersectsBounds: (I, C, R) => R < _ && R < o,
11389
+ intersectsRange: (I, C) => {
11390
+ for (let R = I, D = I + C; R < D; R++) {
11391
11391
  q(h, 3 * R, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11392
- for (let T = w, C = w + A; T < C; T++) {
11393
- q(l, 3 * T, f, u), l.needsUpdate = !0;
11394
- const D = l.distanceToTriangle(h, m, p);
11395
- if (D < _ && (v.copy(m), g && g.copy(p), _ = D, y = T, x = R), D < a)
11392
+ for (let S = w, M = w + A; S < M; S++) {
11393
+ q(l, 3 * S, f, u), l.needsUpdate = !0;
11394
+ const P = l.distanceToTriangle(h, m, p);
11395
+ if (P < _ && (v.copy(m), g && g.copy(p), _ = P, y = S, x = R), P < a)
11396
11396
  return !0;
11397
11397
  }
11398
11398
  }
11399
11399
  }
11400
11400
  });
11401
11401
  {
11402
- const S = Et(e);
11403
- for (let I = 0, M = S; I < M; I++) {
11402
+ const T = Et(e);
11403
+ for (let I = 0, C = T; I < C; I++) {
11404
11404
  q(h, 3 * I, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11405
- for (let R = w, P = w + A; R < P; R++) {
11405
+ for (let R = w, D = w + A; R < D; R++) {
11406
11406
  q(l, 3 * R, f, u), l.needsUpdate = !0;
11407
- const T = l.distanceToTriangle(h, m, p);
11408
- if (T < _ && (v.copy(m), g && g.copy(p), _ = T, y = R, x = I), T < a)
11407
+ const S = l.distanceToTriangle(h, m, p);
11408
+ if (S < _ && (v.copy(m), g && g.copy(p), _ = S, y = R, x = I), S < a)
11409
11409
  return !0;
11410
11410
  }
11411
11411
  }
@@ -11425,33 +11425,33 @@ function uu(n, e = null) {
11425
11425
  const v = l * 2;
11426
11426
  if (c[v + 15] === Ni) {
11427
11427
  const g = o[l + 6], _ = c[v + 14];
11428
- let y = 1 / 0, x = 1 / 0, w = 1 / 0, A = -1 / 0, S = -1 / 0, I = -1 / 0;
11429
- for (let M = g, R = g + _; M < R; M++) {
11430
- const P = 3 * n.resolveTriangleIndex(M);
11431
- for (let T = 0; T < 3; T++) {
11432
- let C = P + T;
11433
- C = i ? i[C] : C;
11434
- const D = s.getX(C), L = s.getY(C), k = s.getZ(C);
11435
- D < y && (y = D), D > A && (A = D), L < x && (x = L), L > S && (S = L), k < w && (w = k), k > I && (I = k);
11428
+ let y = 1 / 0, x = 1 / 0, w = 1 / 0, A = -1 / 0, T = -1 / 0, I = -1 / 0;
11429
+ for (let C = g, R = g + _; C < R; C++) {
11430
+ const D = 3 * n.resolveTriangleIndex(C);
11431
+ for (let S = 0; S < 3; S++) {
11432
+ let M = D + S;
11433
+ M = i ? i[M] : M;
11434
+ const P = s.getX(M), L = s.getY(M), k = s.getZ(M);
11435
+ P < y && (y = P), P > A && (A = P), L < x && (x = L), L > T && (T = L), k < w && (w = k), k > I && (I = k);
11436
11436
  }
11437
11437
  }
11438
- return u[l + 0] !== y || u[l + 1] !== x || u[l + 2] !== w || u[l + 3] !== A || u[l + 4] !== S || u[l + 5] !== I ? (u[l + 0] = y, u[l + 1] = x, u[l + 2] = w, u[l + 3] = A, u[l + 4] = S, u[l + 5] = I, !0) : !1;
11438
+ return u[l + 0] !== y || u[l + 1] !== x || u[l + 2] !== w || u[l + 3] !== A || u[l + 4] !== T || u[l + 5] !== I ? (u[l + 0] = y, u[l + 1] = x, u[l + 2] = w, u[l + 3] = A, u[l + 4] = T, u[l + 5] = I, !0) : !1;
11439
11439
  } else {
11440
11440
  const g = l + 8, _ = o[l + 6], y = g + h, x = _ + h;
11441
- let w = m, A = !1, S = !1;
11442
- e ? w || (A = e.has(y), S = e.has(x), w = !A && !S) : (A = !0, S = !0);
11443
- const I = w || A, M = w || S;
11441
+ let w = m, A = !1, T = !1;
11442
+ e ? w || (A = e.has(y), T = e.has(x), w = !A && !T) : (A = !0, T = !0);
11443
+ const I = w || A, C = w || T;
11444
11444
  let R = !1;
11445
11445
  I && (R = r(g, h, w));
11446
- let P = !1;
11447
- M && (P = r(_, h, w));
11448
- const T = R || P;
11449
- if (T)
11450
- for (let C = 0; C < 3; C++) {
11451
- const D = g + C, L = _ + C, k = u[D], z = u[D + 3], W = u[L], G = u[L + 3];
11452
- u[l + C] = k < W ? k : W, u[l + C + 3] = z > G ? z : G;
11446
+ let D = !1;
11447
+ C && (D = r(_, h, w));
11448
+ const S = R || D;
11449
+ if (S)
11450
+ for (let M = 0; M < 3; M++) {
11451
+ const P = g + M, L = _ + M, k = u[P], z = u[P + 3], W = u[L], G = u[L + 3];
11452
+ u[l + M] = k < W ? k : W, u[l + M + 3] = z > G ? z : G;
11453
11453
  }
11454
- return T;
11454
+ return S;
11455
11455
  }
11456
11456
  }
11457
11457
  }
@@ -11460,8 +11460,8 @@ function hu(n, e, t, i, s, a, o) {
11460
11460
  }
11461
11461
  function Rs(n, e, t, i, s, a, o) {
11462
11462
  const { float32Array: c, uint16Array: u, uint32Array: f } = N, d = n * 2;
11463
- if (ie(d, u)) {
11464
- const l = ae(n, f), h = fe(d, u);
11463
+ if (re(d, u)) {
11464
+ const l = ce(n, f), h = fe(d, u);
11465
11465
  Jc(e, t, i, l, h, s, a, o);
11466
11466
  } else {
11467
11467
  const l = de(n);
@@ -11479,8 +11479,8 @@ function du(n, e, t, i, s, a) {
11479
11479
  function Ds(n, e, t, i, s, a) {
11480
11480
  const { float32Array: o, uint16Array: c, uint32Array: u } = N;
11481
11481
  let f = n * 2;
11482
- if (ie(f, c)) {
11483
- const r = ae(n, u), l = fe(f, c);
11482
+ if (re(f, c)) {
11483
+ const r = ce(n, u), l = fe(f, c);
11484
11484
  return $c(e, t, i, r, l, s, a);
11485
11485
  } else {
11486
11486
  const r = In(n, u), l = fu[r], m = i.direction[l] >= 0;
@@ -11499,7 +11499,7 @@ function Ds(n, e, t, i, s, a) {
11499
11499
  return _ && x ? _.distance <= x.distance ? _ : x : _ || x || null;
11500
11500
  }
11501
11501
  }
11502
- const Ai = /* @__PURE__ */ new Y(), mt = /* @__PURE__ */ new be(), gt = /* @__PURE__ */ new be(), qt = /* @__PURE__ */ new Q(), Yr = /* @__PURE__ */ new $(), Ti = /* @__PURE__ */ new $();
11502
+ const Ai = /* @__PURE__ */ new Y(), mt = /* @__PURE__ */ new be(), gt = /* @__PURE__ */ new be(), qt = /* @__PURE__ */ new Q(), Yr = /* @__PURE__ */ new te(), Ti = /* @__PURE__ */ new te();
11503
11503
  function pu(n, e, t, i) {
11504
11504
  N.setBuffer(n._roots[e]);
11505
11505
  const s = Es(0, n, t, i);
@@ -11508,8 +11508,8 @@ function pu(n, e, t, i) {
11508
11508
  function Es(n, e, t, i, s = null) {
11509
11509
  const { float32Array: a, uint16Array: o, uint32Array: c } = N;
11510
11510
  let u = n * 2;
11511
- if (s === null && (t.boundingBox || t.computeBoundingBox(), Yr.set(t.boundingBox.min, t.boundingBox.max, i), s = Yr), ie(u, o)) {
11512
- const d = e.geometry, r = d.index, l = d.attributes.position, h = t.index, m = t.attributes.position, v = ae(n, c), p = fe(u, o);
11511
+ if (s === null && (t.boundingBox || t.computeBoundingBox(), Yr.set(t.boundingBox.min, t.boundingBox.max, i), s = Yr), re(u, o)) {
11512
+ const d = e.geometry, r = d.index, l = d.attributes.position, h = t.index, m = t.attributes.position, v = ce(n, c), p = fe(u, o);
11513
11513
  if (qt.copy(i).invert(), t.boundsTree)
11514
11514
  return V(n, a, Ti), Ti.matrix.copy(qt), Ti.needsUpdate = !0, t.boundsTree.shapecast({
11515
11515
  intersectsBounds: (_) => Ti.intersectsBox(_),
@@ -11533,7 +11533,7 @@ function Es(n, e, t, i, s = null) {
11533
11533
  return V(d, a, Ai), !!(s.intersectsBox(Ai) && Es(d, e, t, i, s) || (V(r, a, Ai), s.intersectsBox(Ai) && Es(r, e, t, i, s)));
11534
11534
  }
11535
11535
  }
11536
- const Si = /* @__PURE__ */ new Q(), as = /* @__PURE__ */ new $(), jt = /* @__PURE__ */ new $(), mu = /* @__PURE__ */ new b(), gu = /* @__PURE__ */ new b(), vu = /* @__PURE__ */ new b(), _u = /* @__PURE__ */ new b();
11536
+ const Si = /* @__PURE__ */ new Q(), as = /* @__PURE__ */ new te(), jt = /* @__PURE__ */ new te(), mu = /* @__PURE__ */ new b(), gu = /* @__PURE__ */ new b(), vu = /* @__PURE__ */ new b(), _u = /* @__PURE__ */ new b();
11537
11537
  function yu(n, e, t, i = {}, s = {}, a = 0, o = 1 / 0) {
11538
11538
  e.boundingBox || e.computeBoundingBox(), as.set(e.boundingBox.min, e.boundingBox.max, t), as.needsUpdate = !0;
11539
11539
  const c = n.geometry, u = c.attributes.position, f = c.index, d = e.attributes.position, r = e.index, l = me.getPrimitive(), h = me.getPrimitive();
@@ -11543,36 +11543,36 @@ function yu(n, e, t, i = {}, s = {}, a = 0, o = 1 / 0) {
11543
11543
  return Si.copy(t).invert(), jt.matrix.copy(Si), n.shapecast(
11544
11544
  {
11545
11545
  boundsTraverseOrder: (w) => as.distanceToBox(w),
11546
- intersectsBounds: (w, A, S) => S < _ && S < o ? (A && (jt.min.copy(w.min), jt.max.copy(w.max), jt.needsUpdate = !0), !0) : !1,
11546
+ intersectsBounds: (w, A, T) => T < _ && T < o ? (A && (jt.min.copy(w.min), jt.max.copy(w.max), jt.needsUpdate = !0), !0) : !1,
11547
11547
  intersectsRange: (w, A) => {
11548
11548
  if (e.boundsTree) {
11549
- const S = e.boundsTree;
11550
- return S.shapecast({
11549
+ const T = e.boundsTree;
11550
+ return T.shapecast({
11551
11551
  boundsTraverseOrder: (I) => jt.distanceToBox(I),
11552
- intersectsBounds: (I, M, R) => R < _ && R < o,
11553
- intersectsRange: (I, M) => {
11554
- for (let R = I, P = I + M; R < P; R++) {
11555
- const T = S.resolveTriangleIndex(R);
11556
- q(h, 3 * T, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11557
- for (let C = w, D = w + A; C < D; C++) {
11558
- const L = n.resolveTriangleIndex(C);
11552
+ intersectsBounds: (I, C, R) => R < _ && R < o,
11553
+ intersectsRange: (I, C) => {
11554
+ for (let R = I, D = I + C; R < D; R++) {
11555
+ const S = T.resolveTriangleIndex(R);
11556
+ q(h, 3 * S, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11557
+ for (let M = w, P = w + A; M < P; M++) {
11558
+ const L = n.resolveTriangleIndex(M);
11559
11559
  q(l, 3 * L, f, u), l.needsUpdate = !0;
11560
11560
  const k = l.distanceToTriangle(h, m, p);
11561
- if (k < _ && (v.copy(m), g && g.copy(p), _ = k, y = C, x = R), k < a)
11561
+ if (k < _ && (v.copy(m), g && g.copy(p), _ = k, y = M, x = R), k < a)
11562
11562
  return !0;
11563
11563
  }
11564
11564
  }
11565
11565
  }
11566
11566
  });
11567
11567
  } else {
11568
- const S = Et(e);
11569
- for (let I = 0, M = S; I < M; I++) {
11568
+ const T = Et(e);
11569
+ for (let I = 0, C = T; I < C; I++) {
11570
11570
  q(h, 3 * I, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11571
- for (let R = w, P = w + A; R < P; R++) {
11572
- const T = n.resolveTriangleIndex(R);
11573
- q(l, 3 * T, f, u), l.needsUpdate = !0;
11574
- const C = l.distanceToTriangle(h, m, p);
11575
- if (C < _ && (v.copy(m), g && g.copy(p), _ = C, y = R, x = I), C < a)
11571
+ for (let R = w, D = w + A; R < D; R++) {
11572
+ const S = n.resolveTriangleIndex(R);
11573
+ q(l, 3 * S, f, u), l.needsUpdate = !0;
11574
+ const M = l.distanceToTriangle(h, m, p);
11575
+ if (M < _ && (v.copy(m), g && g.copy(p), _ = M, y = R, x = I), M < a)
11576
11576
  return !0;
11577
11577
  }
11578
11578
  }
@@ -11618,22 +11618,22 @@ function wu(n, e, t, i) {
11618
11618
  function _e(n, e, t, i, s, a = 0, o = 0, c = 0, u = 0, f = null, d = !1) {
11619
11619
  let r, l;
11620
11620
  d ? (r = Li, l = ei) : (r = ei, l = Li);
11621
- const h = r.float32Array, m = r.uint32Array, v = r.uint16Array, p = l.float32Array, g = l.uint32Array, _ = l.uint16Array, y = n * 2, x = e * 2, w = ie(y, v), A = ie(x, _);
11622
- let S = !1;
11621
+ const h = r.float32Array, m = r.uint32Array, v = r.uint16Array, p = l.float32Array, g = l.uint32Array, _ = l.uint16Array, y = n * 2, x = e * 2, w = re(y, v), A = re(x, _);
11622
+ let T = !1;
11623
11623
  if (A && w)
11624
- d ? S = s(
11625
- ae(e, g),
11624
+ d ? T = s(
11625
+ ce(e, g),
11626
11626
  fe(e * 2, _),
11627
- ae(n, m),
11627
+ ce(n, m),
11628
11628
  fe(n * 2, v),
11629
11629
  u,
11630
11630
  o + e,
11631
11631
  c,
11632
11632
  a + n
11633
- ) : S = s(
11634
- ae(n, m),
11633
+ ) : T = s(
11634
+ ce(n, m),
11635
11635
  fe(n * 2, v),
11636
- ae(e, g),
11636
+ ce(e, g),
11637
11637
  fe(e * 2, _),
11638
11638
  c,
11639
11639
  a + n,
@@ -11643,12 +11643,12 @@ function _e(n, e, t, i, s, a = 0, o = 0, c = 0, u = 0, f = null, d = !1) {
11643
11643
  else if (A) {
11644
11644
  const I = je.getPrimitive();
11645
11645
  V(e, p, I), I.applyMatrix4(t);
11646
- const M = de(n), R = pe(n, m);
11647
- V(M, h, vt), V(R, h, _t);
11648
- const P = I.intersectsBox(vt), T = I.intersectsBox(_t);
11649
- S = P && _e(
11646
+ const C = de(n), R = pe(n, m);
11647
+ V(C, h, vt), V(R, h, _t);
11648
+ const D = I.intersectsBox(vt), S = I.intersectsBox(_t);
11649
+ T = D && _e(
11650
11650
  e,
11651
- M,
11651
+ C,
11652
11652
  i,
11653
11653
  t,
11654
11654
  s,
@@ -11658,7 +11658,7 @@ function _e(n, e, t, i, s, a = 0, o = 0, c = 0, u = 0, f = null, d = !1) {
11658
11658
  c + 1,
11659
11659
  I,
11660
11660
  !d
11661
- ) || T && _e(
11661
+ ) || S && _e(
11662
11662
  e,
11663
11663
  R,
11664
11664
  i,
@@ -11672,11 +11672,11 @@ function _e(n, e, t, i, s, a = 0, o = 0, c = 0, u = 0, f = null, d = !1) {
11672
11672
  !d
11673
11673
  ), je.releasePrimitive(I);
11674
11674
  } else {
11675
- const I = de(e), M = pe(e, g);
11676
- V(I, p, ls), V(M, p, cs);
11677
- const R = f.intersectsBox(ls), P = f.intersectsBox(cs);
11678
- if (R && P)
11679
- S = _e(
11675
+ const I = de(e), C = pe(e, g);
11676
+ V(I, p, ls), V(C, p, cs);
11677
+ const R = f.intersectsBox(ls), D = f.intersectsBox(cs);
11678
+ if (R && D)
11679
+ T = _e(
11680
11680
  n,
11681
11681
  I,
11682
11682
  t,
@@ -11690,7 +11690,7 @@ function _e(n, e, t, i, s, a = 0, o = 0, c = 0, u = 0, f = null, d = !1) {
11690
11690
  d
11691
11691
  ) || _e(
11692
11692
  n,
11693
- M,
11693
+ C,
11694
11694
  t,
11695
11695
  i,
11696
11696
  s,
@@ -11703,7 +11703,7 @@ function _e(n, e, t, i, s, a = 0, o = 0, c = 0, u = 0, f = null, d = !1) {
11703
11703
  );
11704
11704
  else if (R)
11705
11705
  if (w)
11706
- S = _e(
11706
+ T = _e(
11707
11707
  n,
11708
11708
  I,
11709
11709
  t,
@@ -11717,14 +11717,14 @@ function _e(n, e, t, i, s, a = 0, o = 0, c = 0, u = 0, f = null, d = !1) {
11717
11717
  d
11718
11718
  );
11719
11719
  else {
11720
- const T = je.getPrimitive();
11721
- T.copy(ls).applyMatrix4(t);
11722
- const C = de(n), D = pe(n, m);
11723
- V(C, h, vt), V(D, h, _t);
11724
- const L = T.intersectsBox(vt), k = T.intersectsBox(_t);
11725
- S = L && _e(
11720
+ const S = je.getPrimitive();
11721
+ S.copy(ls).applyMatrix4(t);
11722
+ const M = de(n), P = pe(n, m);
11723
+ V(M, h, vt), V(P, h, _t);
11724
+ const L = S.intersectsBox(vt), k = S.intersectsBox(_t);
11725
+ T = L && _e(
11726
11726
  I,
11727
- C,
11727
+ M,
11728
11728
  i,
11729
11729
  t,
11730
11730
  s,
@@ -11732,11 +11732,11 @@ function _e(n, e, t, i, s, a = 0, o = 0, c = 0, u = 0, f = null, d = !1) {
11732
11732
  a,
11733
11733
  u,
11734
11734
  c + 1,
11735
- T,
11735
+ S,
11736
11736
  !d
11737
11737
  ) || k && _e(
11738
11738
  I,
11739
- D,
11739
+ P,
11740
11740
  i,
11741
11741
  t,
11742
11742
  s,
@@ -11744,15 +11744,15 @@ function _e(n, e, t, i, s, a = 0, o = 0, c = 0, u = 0, f = null, d = !1) {
11744
11744
  a,
11745
11745
  u,
11746
11746
  c + 1,
11747
- T,
11747
+ S,
11748
11748
  !d
11749
- ), je.releasePrimitive(T);
11749
+ ), je.releasePrimitive(S);
11750
11750
  }
11751
- else if (P)
11751
+ else if (D)
11752
11752
  if (w)
11753
- S = _e(
11753
+ T = _e(
11754
11754
  n,
11755
- M,
11755
+ C,
11756
11756
  t,
11757
11757
  i,
11758
11758
  s,
@@ -11764,14 +11764,14 @@ function _e(n, e, t, i, s, a = 0, o = 0, c = 0, u = 0, f = null, d = !1) {
11764
11764
  d
11765
11765
  );
11766
11766
  else {
11767
- const T = je.getPrimitive();
11768
- T.copy(cs).applyMatrix4(t);
11769
- const C = de(n), D = pe(n, m);
11770
- V(C, h, vt), V(D, h, _t);
11771
- const L = T.intersectsBox(vt), k = T.intersectsBox(_t);
11772
- S = L && _e(
11773
- M,
11767
+ const S = je.getPrimitive();
11768
+ S.copy(cs).applyMatrix4(t);
11769
+ const M = de(n), P = pe(n, m);
11770
+ V(M, h, vt), V(P, h, _t);
11771
+ const L = S.intersectsBox(vt), k = S.intersectsBox(_t);
11772
+ T = L && _e(
11774
11773
  C,
11774
+ M,
11775
11775
  i,
11776
11776
  t,
11777
11777
  s,
@@ -11779,11 +11779,11 @@ function _e(n, e, t, i, s, a = 0, o = 0, c = 0, u = 0, f = null, d = !1) {
11779
11779
  a,
11780
11780
  u,
11781
11781
  c + 1,
11782
- T,
11782
+ S,
11783
11783
  !d
11784
11784
  ) || k && _e(
11785
- M,
11786
- D,
11785
+ C,
11786
+ P,
11787
11787
  i,
11788
11788
  t,
11789
11789
  s,
@@ -11791,14 +11791,14 @@ function _e(n, e, t, i, s, a = 0, o = 0, c = 0, u = 0, f = null, d = !1) {
11791
11791
  a,
11792
11792
  u,
11793
11793
  c + 1,
11794
- T,
11794
+ S,
11795
11795
  !d
11796
- ), je.releasePrimitive(T);
11796
+ ), je.releasePrimitive(S);
11797
11797
  }
11798
11798
  }
11799
- return S;
11799
+ return T;
11800
11800
  }
11801
- const Mi = /* @__PURE__ */ new $(), Qr = /* @__PURE__ */ new Y(), bu = {
11801
+ const Mi = /* @__PURE__ */ new te(), Qr = /* @__PURE__ */ new Y(), bu = {
11802
11802
  strategy: Sn,
11803
11803
  maxDepth: 40,
11804
11804
  maxLeafTris: 10,
@@ -11836,7 +11836,7 @@ class Ys {
11836
11836
  if (c._roots = a, c._indirectBuffer = o || null, i.setIndex) {
11837
11837
  const u = t.getIndex();
11838
11838
  if (u === null) {
11839
- const f = new oe(e.index, 1, !1);
11839
+ const f = new le(e.index, 1, !1);
11840
11840
  t.setIndex(f);
11841
11841
  } else
11842
11842
  u.array !== s && (u.array.set(s), u.needsUpdate = !0);
@@ -11949,18 +11949,18 @@ class Ys {
11949
11949
  };
11950
11950
  if (a) {
11951
11951
  const m = (v, p, g, _, y, x, w, A) => {
11952
- for (let S = g, I = g + _; S < I; S++) {
11953
- h(S), d.a.applyMatrix4(t), d.b.applyMatrix4(t), d.c.applyMatrix4(t), d.needsUpdate = !0;
11954
- for (let M = v, R = v + p; M < R; M++)
11955
- if (f(M), o.needsUpdate = !0, a(o, d, M, S, y, x, w, A))
11952
+ for (let T = g, I = g + _; T < I; T++) {
11953
+ h(T), d.a.applyMatrix4(t), d.b.applyMatrix4(t), d.c.applyMatrix4(t), d.needsUpdate = !0;
11954
+ for (let C = v, R = v + p; C < R; C++)
11955
+ if (f(C), o.needsUpdate = !0, a(o, d, C, T, y, x, w, A))
11956
11956
  return !0;
11957
11957
  }
11958
11958
  return !1;
11959
11959
  };
11960
11960
  if (s) {
11961
11961
  const v = s;
11962
- s = function(p, g, _, y, x, w, A, S) {
11963
- return v(p, g, _, y, x, w, A, S) ? !0 : m(p, g, _, y, x, w, A, S);
11962
+ s = function(p, g, _, y, x, w, A, T) {
11963
+ return v(p, g, _, y, x, w, A, T) ? !0 : m(p, g, _, y, x, w, A, T);
11964
11964
  };
11965
11965
  } else
11966
11966
  s = m;
@@ -12056,7 +12056,7 @@ class Tu extends Au {
12056
12056
  if (t.index)
12057
12057
  t.index.array = r.index;
12058
12058
  else {
12059
- const v = new oe(r.index, 1, !1);
12059
+ const v = new le(r.index, 1, !1);
12060
12060
  t.setIndex(v);
12061
12061
  }
12062
12062
  m.setBoundingBox && (t.boundingBox = h.getBoundingBox(new Y())), i.onProgress && i.onProgress(d.progress), s(h), e.onmessage = null;
@@ -12303,7 +12303,7 @@ class Mu {
12303
12303
  const g = new Kn(16777215, h / o);
12304
12304
  g.name = "dir_light_" + p, g.castShadow = !0, g.shadow.bias = a, g.shadow.camera.near = 0.1, g.shadow.camera.far = 50, g.shadow.camera.right = c / 2, g.shadow.camera.left = -c / 2, g.shadow.camera.top = c / 2, g.shadow.camera.bottom = -c / 2, g.shadow.mapSize.width = s, g.shadow.mapSize.height = s, this.dirLights.push(g), this.lightGroup.add(g);
12305
12305
  }
12306
- const m = /(Android|iPad|iPhone|iPod)/g.test(navigator == null ? void 0 : navigator.userAgent) ? xe : le;
12306
+ const m = /(Android|iPad|iPhone|iPod)/g.test(navigator == null ? void 0 : navigator.userAgent) ? xe : ue;
12307
12307
  this.progressiveLightMap1 = new Le(i, i, { type: m }), this.progressiveLightMap2 = new Le(i, i, { type: m }), this.progressiveLightMap1.texture.colorSpace = Ks, this.progressiveLightMap2.texture.colorSpace = Ks, this.shadowCatcherMaterial = new Cu({
12308
12308
  map: this.progressiveLightMap2.texture,
12309
12309
  transparent: !0,
@@ -12650,65 +12650,66 @@ class Rh {
12650
12650
  var u;
12651
12651
  (u = this._progressShadow) == null || u.recalculate();
12652
12652
  }, 300), this.focusSlots = (u) => {
12653
- var R;
12654
- if (this.amr.slots.forEach((P) => {
12655
- P.focused = !1, P.hide();
12653
+ var R, D, S;
12654
+ if (this.amr.slots.forEach((M) => {
12655
+ M.focused = !1, M.hide();
12656
12656
  }), !u.length)
12657
- if (this._lastTarget.set(0, 0, this._lastTarget.z), this.amr.slots.forEach((P) => {
12658
- P.show();
12659
- }), this._focusRestoreView) {
12660
- const P = this._focusRestoreView;
12657
+ if (this._lastTarget.set(0, 0, this._lastTarget.z), this.amr.slots.forEach((M) => {
12658
+ M.show();
12659
+ }), this.shadowMode = !1, this._focusRestoreView) {
12660
+ const M = this._focusRestoreView;
12661
12661
  this._focusRestoreView = void 0;
12662
- const T = this.camera.position.clone(), C = this.controls.target.clone(), D = P.position.clone(), L = P.target.clone(), k = { t: 0 };
12663
- let z = 500;
12664
- const W = T.distanceTo(D) + C.distanceTo(L);
12665
- W > 1e-3 && (z = Math.min(1e3, Math.max(450, W * 45))), (R = this._fitAnimation) == null || R.stop(), this._fitAnimation = new Kt(k).to({ t: 1 }, z).easing(Ee.Easing.Quadratic.InOut).onStart(() => {
12662
+ const P = this.camera.position.clone(), L = this.controls.target.clone(), k = M.position.clone(), z = M.target.clone(), W = { t: 0 };
12663
+ let G = 500;
12664
+ const $ = P.distanceTo(k) + L.distanceTo(z);
12665
+ $ > 1e-3 && (G = Math.min(1e3, Math.max(450, $ * 45))), (R = this._fitAnimation) == null || R.stop(), this._fitAnimation = new Kt(W).to({ t: 1 }, G).easing(Ee.Easing.Quadratic.InOut).onStart(() => {
12666
12666
  this.controls.enabled = !1;
12667
12667
  }).onUpdate(() => {
12668
- const G = k.t;
12669
- this.camera.position.lerpVectors(T, D, G), this.controls.target.lerpVectors(C, L, G);
12668
+ const ee = W.t;
12669
+ this.camera.position.lerpVectors(P, k, ee), this.controls.target.lerpVectors(L, z, ee);
12670
12670
  }).onComplete(() => {
12671
- this.controls.enabled = !0, this.camera.up.copy(P.up);
12671
+ this.controls.enabled = !0, this.camera.up.copy(M.up);
12672
12672
  }).start();
12673
12673
  return;
12674
12674
  } else {
12675
12675
  this.fit();
12676
12676
  return;
12677
12677
  }
12678
- this._focusRestoreView = {
12678
+ (D = this._fitAnimation) != null && D.isPlaying() || this.shadowMode || (this._focusRestoreView = {
12679
12679
  position: this.camera.position.clone(),
12680
12680
  target: new b(0, 0, this.controls.target.z),
12681
12681
  up: this.camera.up.clone()
12682
- };
12683
- const f = u.flatMap((P) => {
12684
- if (P.show(), P.focused = !0, !P.parent)
12682
+ }), (S = this._fitAnimation) == null || S.stop(), this.shadowMode = !0;
12683
+ const f = u.flatMap((M) => {
12684
+ if (M.show(), M.focused = !0, !M.parent)
12685
12685
  return [];
12686
- const T = new b();
12687
- return P.parent.getWorldPosition(T), [T];
12686
+ const P = new b();
12687
+ return M.parent.getWorldPosition(P), [P];
12688
12688
  });
12689
12689
  if (!f.length)
12690
12690
  return;
12691
- const d = f.reduce((P, T) => P.add(T), new b()).multiplyScalar(1 / f.length), r = this.controls.target.clone(), l = this.camera.position.clone().sub(r).normalize();
12691
+ const d = f.reduce((M, P) => M.add(P), new b()).multiplyScalar(1 / f.length), r = this.controls.target.clone(), l = this.camera.position.clone().sub(r).normalize();
12692
12692
  let h = 0;
12693
- for (const P of f) {
12694
- const T = P.clone().sub(d), C = T.dot(l), D = Math.sqrt(Math.max(0, T.lengthSq() - C * C));
12695
- D > h && (h = D);
12693
+ for (const M of f) {
12694
+ const P = M.clone().sub(d), L = P.dot(l), k = Math.sqrt(Math.max(0, P.lengthSq() - L * L));
12695
+ k > h && (h = k);
12696
12696
  }
12697
12697
  h = h + 0.4;
12698
- const m = this.camera.fov * Math.PI / 180, v = 2 * Math.atan(Math.tan(m / 2) * this.camera.aspect), p = h / Math.tan(v / 2), g = h / Math.tan(m / 2), _ = Math.max(p, g), y = d.clone(), x = d.clone().add(l.clone().multiplyScalar(_ < 1 ? 1 : _)), w = this.camera.position.clone(), A = r.clone(), S = { t: 0 };
12698
+ const m = this.camera.fov * Math.PI / 180, v = 2 * Math.atan(Math.tan(m / 2) * this.camera.aspect), p = h / Math.tan(v / 2), g = h / Math.tan(m / 2), _ = Math.max(p, g), y = d.clone(), x = d.clone().add(l.clone().multiplyScalar(_ < 1 ? 1 : _)), w = this.camera.position.clone(), A = r.clone(), T = { t: 0 };
12699
12699
  let I = 500;
12700
- const M = w.distanceTo(x) + A.distanceTo(y);
12701
- M > 1e-3 && (I = Math.min(1e3, Math.max(450, M * 45))), this._lastTarget = y.clone(), this._fitAnimation = new Kt(S).to({ t: 1 }, I).easing(Ee.Easing.Quadratic.InOut).onStart(() => {
12700
+ const C = w.distanceTo(x) + A.distanceTo(y);
12701
+ C > 1e-3 && (I = Math.min(1e3, Math.max(450, C * 45))), this._lastTarget = y.clone(), this._fitAnimation = new Kt(T).to({ t: 1 }, I).easing(Ee.Easing.Quadratic.InOut).onStart(() => {
12702
12702
  this.controls.enabled = !1;
12703
12703
  }).onUpdate(() => {
12704
- const P = S.t;
12705
- this.camera.position.lerpVectors(w, x, P), this.controls.target.lerpVectors(A, y, P);
12704
+ const M = T.t;
12705
+ this.camera.position.lerpVectors(w, x, M), this.controls.target.lerpVectors(A, y, M);
12706
12706
  }).onComplete(() => {
12707
12707
  this.controls.enabled = !0;
12708
12708
  }).start();
12709
12709
  }, this.fit = () => {
12710
- new Y().setFromObject(this._container);
12710
+ this._focusRestoreView = void 0, new Y().setFromObject(this._container);
12711
12711
  const f = this.amr.sizeBox.size.getSize(new b()), d = f.clone().multiplyScalar(0.5), r = new b(0, 0, d.z);
12712
+ this._lastTarget.copy(r);
12712
12713
  let l = d.clone().sub(r);
12713
12714
  l.lengthSq() < 1e-6 && (l = new b(1, 0, 0));
12714
12715
  const h = l.clone().normalize(), m = f.clone().multiplyScalar(0.5), v = [
@@ -12728,18 +12729,18 @@ class Rh {
12728
12729
  }
12729
12730
  p = p * 1.05;
12730
12731
  const g = this.camera.fov * Math.PI / 180, _ = 2 * Math.atan(Math.tan(g / 2) * this.camera.aspect), y = p / Math.tan(_ / 2), x = p / Math.tan(g / 2), w = Math.max(y, x), A = d.clone();
12731
- let S = f.z / 3;
12732
- f.z < f.x && f.z < f.y && (S = f.x * 0.8), f.z > f.x && f.z > f.y && (S = 0), A.z += S;
12733
- const I = l.clone().normalize().multiplyScalar(w < 1 ? 1 : w).add(A), M = Math.max(f.x * 2, 5);
12734
- this.light.position.set(M, 0, f.z * 2);
12735
- const R = this.camera.position.clone(), P = this.controls.target.clone(), T = { t: 0 };
12736
- let C = 600;
12737
- const D = R.distanceTo(I) + P.distanceTo(r);
12738
- D > 1e-3 && (C = Math.min(800, Math.max(650, D * 45))), this._fitAnimation = new Kt(T).to({ t: 1 }, C).easing(Ee.Easing.Quadratic.InOut).onStart(() => {
12732
+ let T = f.z / 3;
12733
+ f.z < f.x && f.z < f.y && (T = f.x * 0.8), f.z > f.x && f.z > f.y && (T = 0), A.z += T;
12734
+ const I = l.clone().normalize().multiplyScalar(w < 1 ? 1 : w).add(A), C = Math.max(f.x * 2, 5);
12735
+ this.light.position.set(C, 0, f.z * 2);
12736
+ const R = this.camera.position.clone(), D = this.controls.target.clone(), S = { t: 0 };
12737
+ let M = 600;
12738
+ const P = R.distanceTo(I) + D.distanceTo(r);
12739
+ P > 1e-3 && (M = Math.min(800, Math.max(650, P * 45))), this._fitAnimation = new Kt(S).to({ t: 1 }, M).easing(Ee.Easing.Quadratic.InOut).onStart(() => {
12739
12740
  this.controls.enabled = !1;
12740
12741
  }).onUpdate(() => {
12741
- const L = T.t;
12742
- this.camera.position.lerpVectors(R, I, L), this.controls.target.lerpVectors(P, r, L);
12742
+ const L = S.t;
12743
+ this.camera.position.lerpVectors(R, I, L), this.controls.target.lerpVectors(D, r, L);
12743
12744
  }).onComplete(() => {
12744
12745
  this.controls.enabled = !0, !this.shadowMode && (this._progressShadow.visible = !0, this._progressShadow.isFinished || this._progressShadow.recalculate());
12745
12746
  }).start(), this.controls.minDistance = Math.max(0.2, Math.min(w * 0.25, w - 0.1)), this.controls.maxDistance = w * 4;
@@ -12830,7 +12831,7 @@ class Rh {
12830
12831
  bubbleSizePrimary: 18,
12831
12832
  bubbleSizeSecondary: 14
12832
12833
  }), this._controlsGizmo.addListener("axis-select-start", () => {
12833
- this._lastTarget = this.controls.target.clone(), this._axisMoving = !0, this.mainCamera = this.orthographicCamera, this.usePathTracing && this.generateBVH().then();
12834
+ this._axisMoving = !0, this.mainCamera = this.orthographicCamera, this.usePathTracing && this.generateBVH().then();
12834
12835
  }), this._controlsGizmo.addListener("axis-select-end", () => {
12835
12836
  this._axisMoving = !1;
12836
12837
  })), this.test = new j(new Di(2, 2), new Pt({
@@ -13060,8 +13061,8 @@ class Fu {
13060
13061
  for (const w of d) {
13061
13062
  const A = this.configureCamera(x, w, f, c, a, o);
13062
13063
  t.setRenderTarget(r), t.clear(!0, !0, !0), t.render(this.deps.scene, A), u && this.deps.overlayScene && (t.clearDepth(), t.render(this.deps.overlayScene, A));
13063
- const S = this.readPixels(t, r, a, o);
13064
- h[w.key] = S;
13064
+ const T = this.readPixels(t, r, a, o);
13065
+ h[w.key] = T;
13065
13066
  }
13066
13067
  } finally {
13067
13068
  r.dispose(), this.restoreRendererState(t, l), (y = (_ = this.deps).onAfterCapture) == null || y.call(_);
@@ -13121,33 +13122,33 @@ class Fu {
13121
13122
  c.lengthSq() === 0 && c.set(0, 0, 1);
13122
13123
  const u = t.up.clone().normalize();
13123
13124
  if (Math.abs(u.dot(c)) > 0.999 && (u.set(0, 0, 1), Math.abs(u.dot(c)) > 0.999 && u.set(0, 1, 0)), (t.mode ?? "orthographic") === "perspective") {
13124
- const x = this.perspectiveCamera, w = t.fov ?? 45, A = Ge.degToRad(w), S = Math.max(Math.tan(A / 2), 1e-4), I = Math.max(S * (i || 1), 1e-4), M = this.getPerspectiveDirection(t, e.size).normalize(), R = new b().crossVectors(M, u).normalize();
13125
+ const x = this.perspectiveCamera, w = t.fov ?? 45, A = Ge.degToRad(w), T = Math.max(Math.tan(A / 2), 1e-4), I = Math.max(T * (i || 1), 1e-4), C = this.getPerspectiveDirection(t, e.size).normalize(), R = new b().crossVectors(C, u).normalize();
13125
13126
  R.lengthSq() < 1e-6 && R.set(1, 0, 0);
13126
- const P = new b().crossVectors(R, M).normalize(), T = Math.max(e.size.x * 0.5, 1e-4), C = Math.max(e.size.y * 0.5, 1e-4), D = Math.max(e.size.z * 0.5, 1e-4), L = [
13127
- new b(-T, -C, -D),
13128
- new b(-T, -C, D),
13129
- new b(-T, C, -D),
13130
- new b(-T, C, D),
13131
- new b(T, -C, -D),
13132
- new b(T, -C, D),
13133
- new b(T, C, -D),
13134
- new b(T, C, D)
13127
+ const D = new b().crossVectors(R, C).normalize(), S = Math.max(e.size.x * 0.5, 1e-4), M = Math.max(e.size.y * 0.5, 1e-4), P = Math.max(e.size.z * 0.5, 1e-4), L = [
13128
+ new b(-S, -M, -P),
13129
+ new b(-S, -M, P),
13130
+ new b(-S, M, -P),
13131
+ new b(-S, M, P),
13132
+ new b(S, -M, -P),
13133
+ new b(S, -M, P),
13134
+ new b(S, M, -P),
13135
+ new b(S, M, P)
13135
13136
  ];
13136
13137
  let k = 0, z = -1 / 0;
13137
- for (const ce of L) {
13138
- const ue = R.dot(ce), Me = P.dot(ce), Lt = M.dot(ce);
13138
+ for (const $ of L) {
13139
+ const ee = R.dot($), Me = D.dot($), Lt = C.dot($);
13139
13140
  z = Math.max(z, Lt);
13140
- const Vi = Lt + Math.abs(ue) / I, kt = Lt + Math.abs(Me) / S;
13141
+ const Vi = Lt + Math.abs(ee) / I, kt = Lt + Math.abs(Me) / T;
13141
13142
  k = Math.max(k, Vi, kt);
13142
13143
  }
13143
13144
  k = Math.max(k, z + 0.1);
13144
13145
  const W = k * (1 + s);
13145
13146
  let G = 1 / 0;
13146
- for (const ce of L) {
13147
- const ue = M.dot(ce), Me = W - ue;
13147
+ for (const $ of L) {
13148
+ const ee = C.dot($), Me = W - ee;
13148
13149
  Me > 1e-3 && (G = Math.min(G, Me));
13149
13150
  }
13150
- return x.fov = w, x.aspect = i || a / Math.max(o, 1), x.near = Math.max(0.1, Number.isFinite(G) ? G * 0.5 : W * 0.1), x.far = Math.max(x.near + 1, W + e.sphere.radius * 3), x.position.copy(e.center).add(M.clone().multiplyScalar(W)), x.up.copy(P), x.lookAt(e.center), x.updateProjectionMatrix(), x.updateMatrixWorld(!0), x;
13151
+ return x.fov = w, x.aspect = i || a / Math.max(o, 1), x.near = Math.max(0.1, Number.isFinite(G) ? G * 0.5 : W * 0.1), x.far = Math.max(x.near + 1, W + e.sphere.radius * 3), x.position.copy(e.center).add(C.clone().multiplyScalar(W)), x.up.copy(D), x.lookAt(e.center), x.updateProjectionMatrix(), x.updateMatrixWorld(!0), x;
13151
13152
  }
13152
13153
  const d = this.orthoCamera, r = e.size, l = e.center, h = Math.max(r[t.plane.width] * 0.5, 0.01), m = Math.max(r[t.plane.height] * 0.5, 0.01), v = Math.max(r[t.plane.depth] * 0.5, 0.01);
13153
13154
  let p = h * (1 + s), g = m * (1 + s);
@@ -13219,14 +13220,11 @@ class Fu {
13219
13220
  return this.canvas || (this.canvas = document.createElement("canvas")), (this.canvas.width !== e || this.canvas.height !== t) && (this.canvas.width = e, this.canvas.height = t), this.canvas;
13220
13221
  }
13221
13222
  }
13222
- const Bu = "shop-components", Ou = "0.3.2", zu = "Shop components", Uu = "dist/shop-components.umd.js", Hu = "dist/shop-components.mjs", Nu = "dist/main.d.ts", Wu = {
13223
+ const Bu = "shop-components", Ou = "0.3.4", zu = "Shop components", Uu = "dist/shop-components.umd.js", Hu = "dist/shop-components.mjs", Nu = "dist/main.d.ts", Wu = {
13223
13224
  dts: "tsc --emitDeclarationOnly & tsc & storybook build -o dist",
13224
- test: 'echo "Error: no test specified" && exit 1',
13225
13225
  dev: "vite dev",
13226
- storybook: "storybook dev -p 6006",
13227
- build: "storybook build -o dist",
13228
- vite: "vite build",
13229
- version: "auto-changelog -p && git add CHANGELOG.md"
13226
+ build: "vite build",
13227
+ v: "auto-changelog -p && git add CHANGELOG.md"
13230
13228
  }, Vu = [
13231
13229
  "dist",
13232
13230
  "package.json"