shop-components 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- var Vn = Object.defineProperty;
2
- var Gn = (o, e, t) => e in o ? Vn(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
1
+ var Nn = Object.defineProperty;
2
+ var Gn = (o, e, t) => e in o ? Nn(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
3
  var E = (o, e, t) => (Gn(o, typeof e != "symbol" ? e + "" : e, t), t), rr = (o, e, t) => {
4
4
  if (!e.has(o))
5
5
  throw TypeError("Cannot " + t);
@@ -10,26 +10,26 @@ var H = (o, e, t) => (rr(o, e, "read from private field"), t ? t.call(o) : e.get
10
10
  e instanceof WeakSet ? e.add(o) : e.set(o, t);
11
11
  }, Ie = (o, e, t, i) => (rr(o, e, "write to private field"), i ? i.call(o, t) : e.set(o, t), t);
12
12
  import * as k from "three";
13
- import { BufferAttribute as fe, BufferGeometry as le, Matrix4 as K, Matrix3 as cn, Vector3 as b, Vector4 as et, MeshBasicMaterial as ri, Mesh as X, ShaderMaterial as ni, NoBlending as si, WebGLRenderTarget as Be, FloatType as pe, RGBAFormat as te, NearestFilter as ee, Vector2 as z, PerspectiveCamera as Ui, DataUtils as ke, DataTexture as Oe, HalfFloatType as Se, LinearFilter as Te, RepeatWrapping as $e, RedFormat as gs, ClampToEdgeWrapping as He, Source as qn, Quaternion as un, DataArrayTexture as jn, DoubleSide as Hi, BackSide as hn, FrontSide as vs, Color as J, WebGLArrayRenderTarget as Qn, UnsignedByteType as Hs, NoToneMapping as Yn, RGFormat as Zn, NormalBlending as fn, Spherical as Xn, EquirectangularReflectionMapping as Ws, LinearMipMapLinearFilter as Kn, Clock as Wi, Scene as _s, AdditiveBlending as Jn, Box3 as Y, Sphere as Ni, CompressedTexture as $n, Texture as Qe, InterleavedBuffer as eo, InterleavedBufferAttribute as to, TextureLoader as dn, MeshStandardMaterial as io, Group as ge, LineSegments as ys, LineBasicMaterial as nr, Object3D as kt, LineDashedMaterial as xs, RingGeometry as or, BoxGeometry as so, EdgesGeometry as ro, SRGBColorSpace as Fi, AnimationMixer as ar, LoopOnce as no, Plane as Ns, Line3 as ze, Triangle as Xt, MathUtils as Ye, DirectionalLight as oo, NoColorSpace as lr, PlaneGeometry as ws, MeshLambertMaterial as ao, DirectionalLightHelper as lo, PlaneHelper as co, UniformsUtils as uo, WebGLRenderer as ho, OrthographicCamera as bs, Raycaster as fo, MeshPhysicalMaterial as po, PointLight as mo, ACESFilmicToneMapping as go, Euler as vo } from "three";
13
+ import { BufferAttribute as fe, BufferGeometry as le, Matrix4 as K, Matrix3 as cn, Vector3 as b, Vector4 as it, MeshBasicMaterial as ri, Mesh as X, ShaderMaterial as ni, NoBlending as si, WebGLRenderTarget as Be, FloatType as pe, RGBAFormat as te, NearestFilter as ee, Vector2 as z, PerspectiveCamera as Hi, DataUtils as ke, DataTexture as Oe, HalfFloatType as Se, LinearFilter as Te, RepeatWrapping as et, RedFormat as vs, ClampToEdgeWrapping as He, Source as qn, Quaternion as un, DataArrayTexture as jn, DoubleSide as Wi, BackSide as hn, FrontSide as _s, Color as J, WebGLArrayRenderTarget as Qn, UnsignedByteType as Ws, NoToneMapping as Yn, RGFormat as Zn, NormalBlending as fn, Spherical as Xn, EquirectangularReflectionMapping as Vs, LinearMipMapLinearFilter as Kn, Clock as Vi, Scene as ys, AdditiveBlending as Jn, Box3 as Y, Sphere as Ni, CompressedTexture as $n, Texture as Qe, InterleavedBuffer as eo, InterleavedBufferAttribute as to, TextureLoader as dn, MeshStandardMaterial as io, Group as ge, LineSegments as xs, LineBasicMaterial as nr, Object3D as kt, LineDashedMaterial as ws, RingGeometry as or, BoxGeometry as so, EdgesGeometry as ro, SRGBColorSpace as Fi, AnimationMixer as ar, LoopOnce as no, Plane as Ns, Line3 as ze, Triangle as Xt, MathUtils as Ye, DirectionalLight as oo, NoColorSpace as lr, PlaneGeometry as bs, MeshLambertMaterial as ao, DirectionalLightHelper as lo, PlaneHelper as co, UniformsUtils as uo, WebGLRenderer as ho, OrthographicCamera as As, Raycaster as fo, MeshPhysicalMaterial as po, PointLight as mo, ACESFilmicToneMapping as go, Euler as vo } from "three";
14
14
  import { HDRLoader as _o } from "three/examples/jsm/loaders/HDRLoader.js";
15
15
  import { OrbitControls as yo } from "three/examples/jsm/controls/OrbitControls";
16
16
  import { CSS2DObject as Ue, CSS2DRenderer as xo } from "three/examples/jsm/renderers/CSS2DRenderer";
17
17
  import { Font as wo } from "three/examples/jsm/loaders/FontLoader";
18
- import { GLTFLoader as Vs } from "three/examples/jsm/loaders/GLTFLoader.js";
18
+ import { GLTFLoader as Gs } from "three/examples/jsm/loaders/GLTFLoader.js";
19
19
  import { MeshoptDecoder as bo } from "three/examples/jsm/libs/meshopt_decoder.module.js";
20
20
  import { DRACOLoader as Ao } from "three/examples/jsm/loaders/DRACOLoader.js";
21
21
  import { GLTFLoader as To } from "three/examples/jsm/loaders/GLTFLoader";
22
22
  import { DRACOLoader as So } from "three/examples/jsm/loaders/DRACOLoader";
23
23
  import { DRACOExporter as Mo } from "three/examples/jsm/exporters/DRACOExporter";
24
24
  import { GLTFExporter as Co } from "three/examples/jsm/exporters/GLTFExporter";
25
- import * as Yi from "three/examples/jsm/utils/SkeletonUtils.js";
25
+ import * as Zi from "three/examples/jsm/utils/SkeletonUtils.js";
26
26
  import { Line2 as Io } from "three/examples/jsm/lines/Line2.js";
27
27
  import { LineMaterial as Ro } from "three/examples/jsm/lines/LineMaterial.js";
28
28
  import { LineGeometry as cr } from "three/examples/jsm/lines/LineGeometry.js";
29
29
  import { CSS3DObject as Do } from "three/examples/jsm/renderers/CSS3DRenderer";
30
30
  import "three/examples/jsm/utils/BufferGeometryUtils";
31
31
  import { FullScreenQuad as li } from "three/examples/jsm/postprocessing/Pass";
32
- import { SAH as Po, MeshBVH as Eo, FloatVertexAttributeTexture as Lo, MeshBVHUniformStruct as Fo, UIntVertexAttributeTexture as ko, BVHShaderGLSL as Zi } from "three-mesh-bvh";
32
+ import { SAH as Po, MeshBVH as Eo, FloatVertexAttributeTexture as Lo, MeshBVHUniformStruct as Fo, UIntVertexAttributeTexture as ko, BVHShaderGLSL as Xi } from "three-mesh-bvh";
33
33
  import { FullScreenQuad as Et } from "three/examples/jsm/postprocessing/Pass.js";
34
34
  function pn(o, e, t = 0) {
35
35
  if (o.isInterleavedBufferAttribute) {
@@ -156,7 +156,7 @@ function Wo(o, e, t) {
156
156
  }
157
157
  }
158
158
  }
159
- function No(o, e) {
159
+ function Vo(o, e) {
160
160
  if (!o.index) {
161
161
  const t = o.attributes.position.count, i = new Array(t);
162
162
  for (let s = 0; s < t; s++)
@@ -183,7 +183,7 @@ function No(o, e) {
183
183
  i.fill(1), o.setAttribute("color", new fe(i, 4));
184
184
  }
185
185
  }
186
- function Gs(o) {
186
+ function qs(o) {
187
187
  let e = 0;
188
188
  if (o.byteLength !== 0) {
189
189
  const t = new Uint8Array(o);
@@ -207,9 +207,9 @@ function ur(o) {
207
207
  }
208
208
  function hr(o) {
209
209
  const e = o.skeleton;
210
- return e ? (e.boneTexture || e.computeBoneTexture(), `${Gs(e.boneTexture.image.data.buffer)}_${e.boneTexture.uuid}`) : null;
210
+ return e ? (e.boneTexture || e.computeBoneTexture(), `${qs(e.boneTexture.image.data.buffer)}_${e.boneTexture.uuid}`) : null;
211
211
  }
212
- class Vo {
212
+ class No {
213
213
  constructor(e = null) {
214
214
  this.matrixWorld = new K(), this.geometryHash = null, this.skeletonHash = null, this.primitiveCount = -1, e !== null && this.updateFrom(e);
215
215
  }
@@ -222,7 +222,7 @@ class Vo {
222
222
  return !(this.matrixWorld.equals(e.matrixWorld) && this.geometryHash === ur(t) && this.skeletonHash === hr(e) && this.primitiveCount === i);
223
223
  }
224
224
  }
225
- const st = /* @__PURE__ */ new b(), rt = /* @__PURE__ */ new b(), nt = /* @__PURE__ */ new b(), fr = /* @__PURE__ */ new et(), ci = /* @__PURE__ */ new b(), Xi = /* @__PURE__ */ new b(), dr = /* @__PURE__ */ new et(), pr = /* @__PURE__ */ new et(), ui = /* @__PURE__ */ new K(), mr = /* @__PURE__ */ new K();
225
+ const rt = /* @__PURE__ */ new b(), nt = /* @__PURE__ */ new b(), ot = /* @__PURE__ */ new b(), fr = /* @__PURE__ */ new it(), ci = /* @__PURE__ */ new b(), Ki = /* @__PURE__ */ new b(), dr = /* @__PURE__ */ new it(), pr = /* @__PURE__ */ new it(), ui = /* @__PURE__ */ new K(), mr = /* @__PURE__ */ new K();
226
226
  function gr(o, e, t) {
227
227
  const i = o.skeleton, s = o.geometry, a = i.bones, n = i.boneInverses;
228
228
  dr.fromBufferAttribute(s.attributes.skinIndex, e), pr.fromBufferAttribute(s.attributes.skinWeight, e), ui.elements.fill(0);
@@ -235,11 +235,11 @@ function gr(o, e, t) {
235
235
  }
236
236
  return ui.multiply(o.bindMatrix).premultiply(o.bindMatrixInverse), t.transformDirection(ui), t;
237
237
  }
238
- function Ki(o, e, t, i, s) {
238
+ function Ji(o, e, t, i, s) {
239
239
  ci.set(0, 0, 0);
240
240
  for (let a = 0, n = o.length; a < n; a++) {
241
241
  const c = e[a], u = o[a];
242
- c !== 0 && (Xi.fromBufferAttribute(u, i), t ? ci.addScaledVector(Xi, c) : ci.addScaledVector(Xi.sub(s), c));
242
+ c !== 0 && (Ki.fromBufferAttribute(u, i), t ? ci.addScaledVector(Ki, c) : ci.addScaledVector(Ki.sub(s), c));
243
243
  }
244
244
  s.add(ci);
245
245
  }
@@ -279,7 +279,7 @@ function jo(o, e = {}, t = new le()) {
279
279
  const f = c.position, d = a ? c.normal : null, r = n ? c.tangent : null, l = i.morphAttributes.position, h = i.morphAttributes.normal, m = i.morphAttributes.tangent, v = i.morphTargetsRelative, p = o.morphTargetInfluences, g = new cn();
280
280
  g.getNormalMatrix(o.matrixWorld), i.index && t.index.array.set(i.index.array);
281
281
  for (let _ = 0, y = c.position.count; _ < y; _++)
282
- st.fromBufferAttribute(f, _), d && rt.fromBufferAttribute(d, _), r && (fr.fromBufferAttribute(r, _), nt.fromBufferAttribute(r, _)), p && (l && Ki(l, p, v, _, st), h && Ki(h, p, v, _, rt), m && Ki(m, p, v, _, nt)), o.isSkinnedMesh && (o.applyBoneTransform(_, st), d && gr(o, _, rt), r && gr(o, _, nt)), s && st.applyMatrix4(o.matrixWorld), u.position.setXYZ(_, st.x, st.y, st.z), d && (s && rt.applyNormalMatrix(g), u.normal.setXYZ(_, rt.x, rt.y, rt.z)), r && (s && nt.transformDirection(o.matrixWorld), u.tangent.setXYZW(_, nt.x, nt.y, nt.z, fr.w));
282
+ rt.fromBufferAttribute(f, _), d && nt.fromBufferAttribute(d, _), r && (fr.fromBufferAttribute(r, _), ot.fromBufferAttribute(r, _)), p && (l && Ji(l, p, v, _, rt), h && Ji(h, p, v, _, nt), m && Ji(m, p, v, _, ot)), o.isSkinnedMesh && (o.applyBoneTransform(_, rt), d && gr(o, _, nt), r && gr(o, _, ot)), s && rt.applyMatrix4(o.matrixWorld), u.position.setXYZ(_, rt.x, rt.y, rt.z), d && (s && nt.applyNormalMatrix(g), u.normal.setXYZ(_, nt.x, nt.y, nt.z)), r && (s && ot.transformDirection(o.matrixWorld), u.tangent.setXYZW(_, ot.x, ot.y, ot.z, fr.w));
283
283
  for (const _ in e.attributes) {
284
284
  const y = e.attributes[_];
285
285
  y === "position" || y === "tangent" || y === "normal" || !(y in c) || (u[y] || t.setAttribute(y, Kt(c[y])), St(c[y], u[y]), pn(c[y], u[y]));
@@ -288,7 +288,7 @@ function jo(o, e = {}, t = new le()) {
288
288
  }
289
289
  class Qo extends le {
290
290
  constructor() {
291
- super(), this.version = 0, this.hash = null, this._diff = new Vo();
291
+ super(), this.version = 0, this.hash = null, this._diff = new No();
292
292
  }
293
293
  // returns whether the passed mesh is compatible with this baked geometry
294
294
  // such that it can be updated without resizing attributes
@@ -306,7 +306,7 @@ class Qo extends le {
306
306
  return i.didChange(e) ? (jo(e, t, this), i.updateFrom(e), this.version++, this.hash = `${this.uuid}_${this.version}`, !0) : !1;
307
307
  }
308
308
  }
309
- const As = 0, mn = 1, gn = 2;
309
+ const Ts = 0, mn = 1, gn = 2;
310
310
  function Yo(o, e) {
311
311
  for (let t = 0, i = o.length; t < i; t++)
312
312
  o[t].traverseVisible((a) => {
@@ -360,7 +360,7 @@ class Ko {
360
360
  const c = t[a], u = c.uuid;
361
361
  i.delete(u);
362
362
  let f = e.get(u);
363
- (!f || !f.isCompatible(c, this.attributes)) && (f && f.dispose(), f = new Qo(), e.set(u, f)), f.updateFrom(c, s) && this.generateMissingAttributes && No(f, this.attributes);
363
+ (!f || !f.isCompatible(c, this.attributes)) && (f && f.dispose(), f = new Qo(), e.set(u, f)), f.updateFrom(c, s) && this.generateMissingAttributes && Vo(f, this.attributes);
364
364
  }
365
365
  i.forEach((a) => {
366
366
  e.delete(a);
@@ -384,7 +384,7 @@ class Ko {
384
384
  version: l.version,
385
385
  uuid: l.uuid
386
386
  })));
387
- let r = As;
387
+ let r = Ts;
388
388
  return d ? r = gn : c.includes(!1) && (r = mn), {
389
389
  changeType: r,
390
390
  materials: Zo(n),
@@ -444,7 +444,7 @@ class ea {
444
444
  });
445
445
  });
446
446
  const n = t.generate(i), c = n.materials, u = Jo(c), { lights: f, iesTextures: d } = $o(a);
447
- if (n.changeType !== As && Wo(i, c, c), this.generateBVH) {
447
+ if (n.changeType !== Ts && Wo(i, c, c), this.generateBVH) {
448
448
  if (this.bvh instanceof Promise)
449
449
  throw new Error("PathTracingSceneGenerator: BVH is already building asynchronously.");
450
450
  if (n.changeType === gn) {
@@ -460,7 +460,7 @@ class ea {
460
460
  n.changeType === mn && this.bvh.refit();
461
461
  }
462
462
  return {
463
- bvhChanged: n.changeType !== As,
463
+ bvhChanged: n.changeType !== Ts,
464
464
  bvh: this.bvh,
465
465
  lights: f,
466
466
  iesTextures: d,
@@ -471,7 +471,7 @@ class ea {
471
471
  };
472
472
  }
473
473
  }
474
- class qs extends ni {
474
+ class js extends ni {
475
475
  set needsUpdate(e) {
476
476
  super.needsUpdate = !0, this.dispatchEvent({
477
477
  type: "recompilation"
@@ -499,7 +499,7 @@ class qs extends ni {
499
499
  return !1;
500
500
  }
501
501
  }
502
- class ta extends qs {
502
+ class ta extends js {
503
503
  constructor(e) {
504
504
  super({
505
505
  blending: si,
@@ -773,7 +773,7 @@ const vn = (
773
773
 
774
774
  `
775
775
  );
776
- class ra extends qs {
776
+ class ra extends js {
777
777
  constructor() {
778
778
  super({
779
779
  blending: si,
@@ -827,7 +827,7 @@ class na {
827
827
  return a.material.resolution.set(t, t), a.render(e), e.setRenderTarget(s), a.dispose(), i;
828
828
  }
829
829
  }
830
- class oa extends Ui {
830
+ class oa extends Hi {
831
831
  set bokehSize(e) {
832
832
  this.fStop = this.getFocalLength() / e;
833
833
  }
@@ -849,7 +849,7 @@ class aa {
849
849
  e instanceof oa ? (this.bokehSize = e.bokehSize, this.apertureBlades = e.apertureBlades, this.apertureRotation = e.apertureRotation, this.focusDistance = e.focusDistance, this.anamorphicRatio = e.anamorphicRatio) : (this.bokehSize = 0, this.apertureRotation = 0, this.apertureBlades = 0, this.focusDistance = 10, this.anamorphicRatio = 1);
850
850
  }
851
851
  }
852
- function Ji(o) {
852
+ function $i(o) {
853
853
  const e = new Uint16Array(o.length);
854
854
  for (let t = 0, i = o.length; t < i; ++t)
855
855
  e[t] = ke.toHalfFloat(o[t]);
@@ -895,26 +895,26 @@ function ca(o, e = Se) {
895
895
  }
896
896
  class ua {
897
897
  constructor() {
898
- const e = new Oe(Ji(new Float32Array([0, 0, 0, 0])), 1, 1);
899
- e.type = Se, e.format = te, e.minFilter = Te, e.magFilter = Te, e.wrapS = $e, e.wrapT = $e, e.generateMipmaps = !1, e.needsUpdate = !0;
900
- const t = new Oe(Ji(new Float32Array([0, 1])), 1, 2);
901
- t.type = Se, t.format = gs, t.minFilter = Te, t.magFilter = Te, t.generateMipmaps = !1, t.needsUpdate = !0;
902
- const i = new Oe(Ji(new Float32Array([0, 0, 1, 1])), 2, 2);
903
- i.type = Se, i.format = gs, i.minFilter = Te, i.magFilter = Te, i.generateMipmaps = !1, i.needsUpdate = !0, this.map = e, this.marginalWeights = t, this.conditionalWeights = i, this.totalSum = 0;
898
+ const e = new Oe($i(new Float32Array([0, 0, 0, 0])), 1, 1);
899
+ e.type = Se, e.format = te, e.minFilter = Te, e.magFilter = Te, e.wrapS = et, e.wrapT = et, e.generateMipmaps = !1, e.needsUpdate = !0;
900
+ const t = new Oe($i(new Float32Array([0, 1])), 1, 2);
901
+ t.type = Se, t.format = vs, t.minFilter = Te, t.magFilter = Te, t.generateMipmaps = !1, t.needsUpdate = !0;
902
+ const i = new Oe($i(new Float32Array([0, 0, 1, 1])), 2, 2);
903
+ i.type = Se, i.format = vs, i.minFilter = Te, i.magFilter = Te, i.generateMipmaps = !1, i.needsUpdate = !0, this.map = e, this.marginalWeights = t, this.conditionalWeights = i, this.totalSum = 0;
904
904
  }
905
905
  dispose() {
906
906
  this.marginalWeights.dispose(), this.conditionalWeights.dispose(), this.map.dispose();
907
907
  }
908
908
  updateFrom(e) {
909
909
  const t = ca(e);
910
- t.wrapS = $e, t.wrapT = He;
910
+ t.wrapS = et, t.wrapT = He;
911
911
  const { width: i, height: s, data: a } = t.image, n = new Float32Array(i * s), c = new Float32Array(i * s), u = new Float32Array(s), f = new Float32Array(s);
912
912
  let d = 0, r = 0;
913
913
  for (let p = 0; p < s; p++) {
914
914
  let g = 0;
915
915
  for (let _ = 0; _ < i; _++) {
916
- const y = p * i + _, x = ke.fromHalfFloat(a[4 * y + 0]), w = ke.fromHalfFloat(a[4 * y + 1]), A = ke.fromHalfFloat(a[4 * y + 2]), T = la(x, w, A);
917
- g += T, d += T, n[y] = T, c[y] = g;
916
+ const y = p * i + _, x = ke.fromHalfFloat(a[4 * y + 0]), w = ke.fromHalfFloat(a[4 * y + 1]), A = ke.fromHalfFloat(a[4 * y + 2]), S = la(x, w, A);
917
+ g += S, d += S, n[y] = S, c[y] = g;
918
918
  }
919
919
  if (g !== 0)
920
920
  for (let _ = p * i, y = p * i + i; _ < y; _++)
@@ -939,20 +939,20 @@ class ua {
939
939
  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;
940
940
  }
941
941
  }
942
- const $i = 6, ha = 0, fa = 1, da = 2, pa = 3, ma = 4, we = new b(), ne = new b(), _r = new K(), ft = new un(), yr = new b(), dt = new b(), ga = new b(0, 1, 0);
942
+ const es = 6, ha = 0, fa = 1, da = 2, pa = 3, ma = 4, we = new b(), ne = new b(), _r = new K(), ft = new un(), yr = new b(), dt = new b(), ga = new b(0, 1, 0);
943
943
  class va {
944
944
  constructor() {
945
945
  const e = new Oe(new Float32Array(4), 1, 1);
946
946
  e.format = te, e.type = pe, e.wrapS = He, e.wrapT = He, e.generateMipmaps = !1, e.minFilter = ee, e.magFilter = ee, this.tex = e, this.count = 0;
947
947
  }
948
948
  updateFrom(e, t = []) {
949
- const i = this.tex, s = Math.max(e.length * $i, 1), a = Math.ceil(Math.sqrt(s));
949
+ const i = this.tex, s = Math.max(e.length * es, 1), a = Math.ceil(Math.sqrt(s));
950
950
  i.image.width !== a && (i.dispose(), i.image.data = new Float32Array(a * a * 4), i.image.width = a, i.image.height = a);
951
951
  const n = i.image.data;
952
952
  for (let u = 0, f = e.length; u < f; u++) {
953
- const d = e[u], r = u * $i * 4;
953
+ const d = e[u], r = u * es * 4;
954
954
  let l = 0;
955
- for (let m = 0; m < $i * 4; m++)
955
+ for (let m = 0; m < es * 4; m++)
956
956
  n[r + m] = 0;
957
957
  d.getWorldPosition(ne), n[r + l++] = ne.x, n[r + l++] = ne.y, n[r + l++] = ne.z;
958
958
  let h = ha;
@@ -970,7 +970,7 @@ class va {
970
970
  }
971
971
  }
972
972
  this.count = e.length;
973
- const c = Gs(n.buffer);
973
+ const c = qs(n.buffer);
974
974
  return this.hash !== c ? (this.hash = c, i.needsUpdate = !0, !0) : !1;
975
975
  }
976
976
  }
@@ -1053,23 +1053,23 @@ class ya extends _a {
1053
1053
  this.setAttributes([e, t, i, s]);
1054
1054
  }
1055
1055
  }
1056
- function js(o, e) {
1056
+ function Qs(o, e) {
1057
1057
  return o.uuid < e.uuid ? 1 : o.uuid > e.uuid ? -1 : 0;
1058
1058
  }
1059
- function Ts(o) {
1059
+ function Ss(o) {
1060
1060
  return `${o.source.uuid}:${o.colorSpace}`;
1061
1061
  }
1062
1062
  function xa(o) {
1063
1063
  const e = /* @__PURE__ */ new Set(), t = [];
1064
1064
  for (let i = 0, s = o.length; i < s; i++) {
1065
- const a = o[i], n = Ts(a);
1065
+ const a = o[i], n = Ss(a);
1066
1066
  e.has(n) || (e.add(n), t.push(a));
1067
1067
  }
1068
1068
  return t;
1069
1069
  }
1070
1070
  function wa(o) {
1071
1071
  const e = o.map((i) => i.iesMap || null).filter((i) => i), t = new Set(e);
1072
- return Array.from(t).sort(js);
1072
+ return Array.from(t).sort(Qs);
1073
1073
  }
1074
1074
  function ba(o) {
1075
1075
  const e = /* @__PURE__ */ new Set();
@@ -1081,13 +1081,13 @@ function ba(o) {
1081
1081
  }
1082
1082
  }
1083
1083
  const t = Array.from(e);
1084
- return xa(t).sort(js);
1084
+ return xa(t).sort(Qs);
1085
1085
  }
1086
1086
  function Aa(o) {
1087
1087
  const e = [];
1088
1088
  return o.traverse((t) => {
1089
1089
  t.visible && (t.isRectAreaLight || t.isSpotLight || t.isPointLight || t.isDirectionalLight) && e.push(t);
1090
- }), e.sort(js);
1090
+ }), e.sort(Qs);
1091
1091
  }
1092
1092
  const _n = 45, wr = _n * 4;
1093
1093
  class Ta {
@@ -1111,7 +1111,7 @@ class Sa extends Oe {
1111
1111
  updateFrom(e, t) {
1112
1112
  function i(m, v, p = -1) {
1113
1113
  if (v in m && m[v]) {
1114
- const g = Ts(m[v]);
1114
+ const g = Ss(m[v]);
1115
1115
  return r[g];
1116
1116
  } else
1117
1117
  return p;
@@ -1132,7 +1132,7 @@ class Sa extends Oe {
1132
1132
  let n = 0;
1133
1133
  const c = e.length * _n, u = Math.ceil(Math.sqrt(c)) || 1, { image: f, features: d } = this, r = {};
1134
1134
  for (let m = 0, v = t.length; m < v; m++)
1135
- r[Ts(t[m])] = m;
1135
+ r[Ss(t[m])] = m;
1136
1136
  f.width !== u && (this.dispose(), f.data = new Float32Array(u * u * 4), f.width = u, f.height = u);
1137
1137
  const l = f.data;
1138
1138
  d.reset();
@@ -1153,19 +1153,19 @@ class Sa extends Oe {
1153
1153
  l[n++] = 0;
1154
1154
  else
1155
1155
  switch (p.side) {
1156
- case vs:
1156
+ case _s:
1157
1157
  l[n++] = 1;
1158
1158
  break;
1159
1159
  case hn:
1160
1160
  l[n++] = -1;
1161
1161
  break;
1162
- case Hi:
1162
+ case Wi:
1163
1163
  l[n++] = 0;
1164
1164
  break;
1165
1165
  }
1166
1166
  l[n++] = Number(s(p, "matte", !1)), l[n++] = Number(s(p, "castShadow", !0)), l[n++] = Number(p.vertexColors) | Number(p.flatShading) << 1, l[n++] = Number(p.transparent), n += a(p, "map", l, n), n += a(p, "metalnessMap", l, n), n += a(p, "roughnessMap", l, n), n += a(p, "transmissionMap", l, n), n += a(p, "emissiveMap", l, n), n += a(p, "normalMap", l, n), n += a(p, "clearcoatMap", l, n), n += a(p, "clearcoatNormalMap", l, n), n += a(p, "clearcoatRoughnessMap", l, n), n += a(p, "sheenColorMap", l, n), n += a(p, "sheenRoughnessMap", l, n), n += a(p, "iridescenceMap", l, n), n += a(p, "iridescenceThicknessMap", l, n), n += a(p, "specularColorMap", l, n), n += a(p, "specularIntensityMap", l, n);
1167
1167
  }
1168
- const h = Gs(l.buffer);
1168
+ const h = qs(l.buffer);
1169
1169
  return this.hash !== h ? (this.hash = h, this.needsUpdate = !0, !0) : !1;
1170
1170
  }
1171
1171
  }
@@ -1181,11 +1181,11 @@ class Ar extends Qn {
1181
1181
  constructor(e, t, i) {
1182
1182
  const s = {
1183
1183
  format: te,
1184
- type: Hs,
1184
+ type: Ws,
1185
1185
  minFilter: Te,
1186
1186
  magFilter: Te,
1187
- wrapS: $e,
1188
- wrapT: $e,
1187
+ wrapS: et,
1188
+ wrapT: et,
1189
1189
  generateMipmaps: !1,
1190
1190
  ...i
1191
1191
  };
@@ -1473,7 +1473,7 @@ function Oa(o) {
1473
1473
  function za(o) {
1474
1474
  switch (o) {
1475
1475
  case 1:
1476
- return gs;
1476
+ return vs;
1477
1477
  case 2:
1478
1478
  return Zn;
1479
1479
  default:
@@ -1530,7 +1530,7 @@ const Ha = (
1530
1530
  };
1531
1531
 
1532
1532
  `
1533
- ), Na = (
1533
+ ), Va = (
1534
1534
  /* glsl */
1535
1535
  `
1536
1536
 
@@ -1619,7 +1619,7 @@ const Ha = (
1619
1619
  }
1620
1620
 
1621
1621
  `
1622
- ), Va = (
1622
+ ), Na = (
1623
1623
  /* glsl */
1624
1624
  `
1625
1625
 
@@ -4441,7 +4441,7 @@ bool bvhIntersectFogVolumeHit(
4441
4441
 
4442
4442
  `
4443
4443
  );
4444
- class hl extends qs {
4444
+ class hl extends js {
4445
4445
  onBeforeRender() {
4446
4446
  this.setDefine("FEATURE_DOF", this.physicalCamera.bokehSize === 0 ? 0 : 1), this.setDefine("FEATURE_BACKGROUND_MAP", this.backgroundMap ? 1 : 0), this.setDefine("FEATURE_FOG", this.materials.features.isUsed("FOG") ? 1 : 0);
4447
4447
  }
@@ -4538,15 +4538,15 @@ class hl extends qs {
4538
4538
  #include <common>
4539
4539
 
4540
4540
  // bvh intersection
4541
- ${Zi.common_functions}
4542
- ${Zi.bvh_struct_definitions}
4543
- ${Zi.bvh_ray_functions}
4541
+ ${Xi.common_functions}
4542
+ ${Xi.bvh_struct_definitions}
4543
+ ${Xi.bvh_ray_functions}
4544
4544
 
4545
4545
  // uniform structs
4546
4546
  ${Ha}
4547
- ${Na}
4548
- ${Wa}
4549
4547
  ${Va}
4548
+ ${Wa}
4549
+ ${Na}
4550
4550
  ${Ga}
4551
4551
 
4552
4552
  // random
@@ -4997,18 +4997,18 @@ function* fl() {
4997
4997
  _subframe: n,
4998
4998
  alpha: c,
4999
4999
  material: u
5000
- } = this, f = new et(), d = new et(), r = t.material;
5000
+ } = this, f = new it(), d = new it(), r = t.material;
5001
5001
  let [l, h] = s;
5002
5002
  for (; ; ) {
5003
5003
  c ? (r.opacity = this._opacityFactor / (this.samples + 1), u.blending = si, u.opacity = 1) : (u.opacity = this._opacityFactor / (this.samples + 1), u.blending = fn);
5004
5004
  const [m, v, p, g] = n, _ = i.width, y = i.height;
5005
5005
  u.resolution.set(_ * p, y * g), u.sobolTexture = a.texture, u.stratifiedTexture.init(20, u.bounces + u.transmissiveBounces + 5), u.stratifiedTexture.next(), u.seed++;
5006
- const x = this.tiles.x || 1, w = this.tiles.y || 1, A = x * w, T = Math.ceil(_ * p), I = Math.ceil(y * g), M = Math.floor(m * _), C = Math.floor(v * y), D = Math.ceil(T / x), S = Math.ceil(I / w);
5007
- for (let R = 0; R < w; R++)
5006
+ const x = this.tiles.x || 1, w = this.tiles.y || 1, A = x * w, S = Math.ceil(_ * p), C = Math.ceil(y * g), M = Math.floor(m * _), R = Math.floor(v * y), D = Math.ceil(S / x), T = Math.ceil(C / w);
5007
+ for (let I = 0; I < w; I++)
5008
5008
  for (let P = 0; P < x; P++) {
5009
5009
  const L = o.getRenderTarget(), F = o.autoClear, U = o.getScissorTest();
5010
5010
  o.getScissor(f), o.getViewport(d);
5011
- let G = P, Q = R;
5011
+ let G = P, Q = I;
5012
5012
  if (!this.stableTiles) {
5013
5013
  const se = this._currentTile % (x * w);
5014
5014
  G = se % x, Q = ~~(se / x), this._currentTile = se + 1;
@@ -5016,15 +5016,15 @@ function* fl() {
5016
5016
  const ie = w - Q - 1;
5017
5017
  i.scissor.set(
5018
5018
  M + G * D,
5019
- C + ie * S,
5020
- Math.min(D, T - G * D),
5021
- Math.min(S, I - ie * S)
5019
+ R + ie * T,
5020
+ Math.min(D, S - G * D),
5021
+ Math.min(T, C - ie * T)
5022
5022
  ), i.viewport.set(
5023
5023
  M,
5024
- C,
5025
- T,
5026
- I
5027
- ), o.setRenderTarget(i), o.setScissorTest(!0), o.autoClear = !1, e.render(o), o.setViewport(d), o.setScissor(f), o.setScissorTest(U), o.setRenderTarget(L), o.autoClear = F, c && (r.target1 = l.texture, r.target2 = i.texture, o.setRenderTarget(h), t.render(o), o.setRenderTarget(L)), this.samples += 1 / A, P === x - 1 && R === w - 1 && (this.samples = Math.round(this.samples)), yield;
5024
+ R,
5025
+ S,
5026
+ C
5027
+ ), o.setRenderTarget(i), o.setScissorTest(!0), o.autoClear = !1, e.render(o), o.setViewport(d), o.setScissor(f), o.setScissorTest(U), o.setRenderTarget(L), o.autoClear = F, c && (r.target1 = l.texture, r.target2 = i.texture, o.setRenderTarget(h), t.render(o), o.setRenderTarget(L)), this.samples += 1 / A, P === x - 1 && I === w - 1 && (this.samples = Math.round(this.samples)), yield;
5028
5028
  }
5029
5029
  [l, h] = [h, l];
5030
5030
  }
@@ -5050,7 +5050,7 @@ class Cr {
5050
5050
  return !!this._compilePromise;
5051
5051
  }
5052
5052
  constructor(e) {
5053
- this.camera = null, this.tiles = new z(3, 3), this.stableNoise = !1, this.stableTiles = !0, this.samples = 0, this._subframe = new et(0, 0, 1, 1), this._opacityFactor = 1, this._renderer = e, this._alpha = !1, this._fsQuad = new Et(new hl()), this._blendQuad = new Et(new ta()), this._task = null, this._currentTile = 0, this._compilePromise = null, this._sobolTarget = new na().generate(e), this._primaryTarget = new Be(1, 1, {
5053
+ this.camera = null, this.tiles = new z(3, 3), this.stableNoise = !1, this.stableTiles = !0, this.samples = 0, this._subframe = new it(0, 0, 1, 1), this._opacityFactor = 1, this._renderer = e, this._alpha = !1, this._fsQuad = new Et(new hl()), this._blendQuad = new Et(new ta()), this._task = null, this._currentTile = 0, this._compilePromise = null, this._sobolTarget = new na().generate(e), this._primaryTarget = new Be(1, 1, {
5054
5054
  format: te,
5055
5055
  type: pe,
5056
5056
  magFilter: ee,
@@ -5101,7 +5101,7 @@ class Cr {
5101
5101
  this.material.onBeforeRender(), !this.isCompiling && (this._task || (this._task = fl.call(this)), this._task.next());
5102
5102
  }
5103
5103
  }
5104
- const ot = new z(), Ir = new z(), di = new Xn(), pi = new J();
5104
+ const at = new z(), Ir = new z(), di = new Xn(), pi = new J();
5105
5105
  class dl extends Oe {
5106
5106
  constructor(e = 512, t = 512) {
5107
5107
  super(
@@ -5110,8 +5110,8 @@ class dl extends Oe {
5110
5110
  t,
5111
5111
  te,
5112
5112
  pe,
5113
- Ws,
5114
- $e,
5113
+ Vs,
5114
+ et,
5115
5115
  He,
5116
5116
  Te,
5117
5117
  Te
@@ -5122,7 +5122,7 @@ class dl extends Oe {
5122
5122
  const { data: e, width: t, height: i } = this.image;
5123
5123
  for (let s = 0; s < t; s++)
5124
5124
  for (let a = 0; a < i; a++) {
5125
- Ir.set(t, i), ot.set(s / t, a / i), ot.x -= 0.5, ot.y = 1 - ot.y, di.theta = ot.x * 2 * Math.PI, di.phi = ot.y * Math.PI, di.radius = 1, this.generationCallback(di, ot, Ir, pi);
5125
+ Ir.set(t, i), at.set(s / t, a / i), at.x -= 0.5, at.y = 1 - at.y, di.theta = at.x * 2 * Math.PI, di.phi = at.y * Math.PI, di.radius = 1, this.generationCallback(di, at, Ir, pi);
5126
5126
  const c = 4 * (a * t + s);
5127
5127
  e[c + 0] = pi.r, e[c + 1] = pi.g, e[c + 2] = pi.b, e[c + 3] = 1;
5128
5128
  }
@@ -5295,7 +5295,7 @@ class Dr {
5295
5295
  for (let g = 0, _ = v.length; g < _; g++)
5296
5296
  m[g] = ke.toHalfFloat(v[g]);
5297
5297
  const p = new Oe(m, t, i, te, Se);
5298
- return p.minFilter = Kn, p.magFilter = Te, p.wrapS = $e, p.wrapT = $e, p.mapping = Ws, p.needsUpdate = !0, p;
5298
+ return p.minFilter = Kn, p.magFilter = Te, p.wrapS = et, p.wrapT = et, p.mapping = Vs, p.needsUpdate = !0, p;
5299
5299
  }
5300
5300
  dispose() {
5301
5301
  this._quad.dispose();
@@ -5349,7 +5349,7 @@ class _l {
5349
5349
  return !!this._pathTracer.isCompiling;
5350
5350
  }
5351
5351
  constructor(e) {
5352
- this._renderer = e, this._generator = new ea(), this._pathTracer = new Cr(e), this._queueReset = !1, this._clock = new Wi(), this._compilePromise = null, this._lowResPathTracer = new Cr(e), this._lowResPathTracer.tiles.set(1, 1), this._quad = new Et(new ml({
5352
+ this._renderer = e, this._generator = new ea(), this._pathTracer = new Cr(e), this._queueReset = !1, this._clock = new Vi(), this._compilePromise = null, this._lowResPathTracer = new Cr(e), this._lowResPathTracer.tiles.set(1, 1), this._quad = new Et(new ml({
5353
5353
  map: null,
5354
5354
  transparent: !0,
5355
5355
  blending: si,
@@ -5359,7 +5359,7 @@ class _l {
5359
5359
  }, this.renderToCanvasCallback = (t, i, s) => {
5360
5360
  const a = i.autoClear;
5361
5361
  i.autoClear = !1, s.render(i), i.autoClear = a;
5362
- }, this.setScene(new _s(), new Ui());
5362
+ }, this.setScene(new ys(), new Hi());
5363
5363
  }
5364
5364
  setBVHWorker(e) {
5365
5365
  this._generator.setBVHWorker(e);
@@ -5473,8 +5473,8 @@ class _l {
5473
5473
  const yl = "";
5474
5474
  globalThis.GLTF_PROGRESSIVE_VERSION = yl;
5475
5475
  console.debug("[gltf-progressive] version -");
5476
- let Me = "https://www.gstatic.com/draco/versioned/decoders/1.5.7/", Vi = "https://cdn.needle.tools/static/three/0.179.1/basis2/";
5477
- const xl = Me, wl = Vi, xn = new URL(Me + "draco_decoder.js");
5476
+ let Me = "https://www.gstatic.com/draco/versioned/decoders/1.5.7/", Gi = "https://cdn.needle.tools/static/three/0.179.1/basis2/";
5477
+ const xl = Me, wl = Gi, xn = new URL(Me + "draco_decoder.js");
5478
5478
  xn.searchParams.append("range", "true");
5479
5479
  fetch(xn, {
5480
5480
  method: "GET",
@@ -5482,48 +5482,48 @@ fetch(xn, {
5482
5482
  Range: "bytes=0-1"
5483
5483
  }
5484
5484
  }).catch((o) => {
5485
- console.debug(`Failed to fetch remote Draco decoder from ${Me} (offline: ${typeof navigator < "u" ? navigator.onLine : "unknown"})`), Me === xl && Al("./include/draco/"), Vi === wl && Tl("./include/ktx2/");
5485
+ console.debug(`Failed to fetch remote Draco decoder from ${Me} (offline: ${typeof navigator < "u" ? navigator.onLine : "unknown"})`), Me === xl && Al("./include/draco/"), Gi === wl && Tl("./include/ktx2/");
5486
5486
  }).finally(() => {
5487
5487
  bn();
5488
5488
  });
5489
5489
  const bl = () => ({
5490
5490
  dracoDecoderPath: Me,
5491
- ktx2TranscoderPath: Vi
5491
+ ktx2TranscoderPath: Gi
5492
5492
  });
5493
5493
  function Al(o) {
5494
- Me = o, he && he[Ss] != Me ? (console.debug("Updating Draco decoder path to " + o), he[Ss] = Me, he.setDecoderPath(Me), he.preload()) : console.debug("Setting Draco decoder path to " + o);
5494
+ Me = o, he && he[Ms] != Me ? (console.debug("Updating Draco decoder path to " + o), he[Ms] = Me, he.setDecoderPath(Me), he.preload()) : console.debug("Setting Draco decoder path to " + o);
5495
5495
  }
5496
5496
  function Tl(o) {
5497
- Vi = o;
5497
+ Gi = o;
5498
5498
  }
5499
- function Qs(o) {
5499
+ function Ys(o) {
5500
5500
  return bn(), { dracoLoader: he, meshoptDecoder: ki };
5501
5501
  }
5502
5502
  function wn(o) {
5503
5503
  o.dracoLoader || o.setDRACOLoader(he), o.meshoptDecoder || o.setMeshoptDecoder(ki);
5504
5504
  }
5505
- const Ss = Symbol("dracoDecoderPath");
5505
+ const Ms = Symbol("dracoDecoderPath");
5506
5506
  let he, ki;
5507
5507
  function bn() {
5508
- he || (he = new Ao(), he[Ss] = Me, he.setDecoderPath(Me), he.setDecoderConfig({ type: "js" }), he.preload()), ki || (ki = bo);
5508
+ he || (he = new Ao(), he[Ms] = Me, he.setDecoderPath(Me), he.setDecoderConfig({ type: "js" }), he.preload()), ki || (ki = bo);
5509
5509
  }
5510
- const Ms = /* @__PURE__ */ new WeakMap();
5510
+ const Cs = /* @__PURE__ */ new WeakMap();
5511
5511
  function An(o, e) {
5512
- let t = Ms.get(o);
5513
- t ? t = Object.assign(t, e) : t = e, Ms.set(o, t);
5512
+ let t = Cs.get(o);
5513
+ t ? t = Object.assign(t, e) : t = e, Cs.set(o, t);
5514
5514
  }
5515
- const es = Vs.prototype.load;
5515
+ const ts = Gs.prototype.load;
5516
5516
  function Sl(...o) {
5517
- const e = Ms.get(this);
5517
+ const e = Cs.get(this);
5518
5518
  let t = o[0];
5519
5519
  const i = new URL(t, window.location.href);
5520
5520
  if (i.hostname.endsWith("needle.tools")) {
5521
5521
  const a = (e == null ? void 0 : e.progressive) !== void 0 ? e.progressive : !0, n = e != null && e.usecase ? e.usecase : "default";
5522
5522
  a ? this.requestHeader.Accept = `*/*;progressive=allowed;usecase=${n}` : this.requestHeader.Accept = `*/*;usecase=${n}`, t = i.toString();
5523
5523
  }
5524
- return o[0] = t, es == null ? void 0 : es.call(this, ...o);
5524
+ return o[0] = t, ts == null ? void 0 : ts.call(this, ...o);
5525
5525
  }
5526
- Vs.prototype.load = Sl;
5526
+ Gs.prototype.load = Sl;
5527
5527
  ut("debugprogressive");
5528
5528
  function ut(o) {
5529
5529
  if (typeof window > "u")
@@ -5587,14 +5587,14 @@ class Cl {
5587
5587
  }
5588
5588
  }
5589
5589
  }
5590
- const Il = typeof window > "u" && typeof document > "u", Cs = Symbol("needle:raycast-mesh");
5590
+ const Il = typeof window > "u" && typeof document > "u", Is = Symbol("needle:raycast-mesh");
5591
5591
  function oi(o) {
5592
- return (o == null ? void 0 : o[Cs]) instanceof le ? o[Cs] : null;
5592
+ return (o == null ? void 0 : o[Is]) instanceof le ? o[Is] : null;
5593
5593
  }
5594
5594
  function Rl(o, e) {
5595
5595
  if ((o.type === "Mesh" || o.type === "SkinnedMesh") && !oi(o)) {
5596
5596
  const i = Pl(e);
5597
- i.userData = { isRaycastMesh: !0 }, o[Cs] = i;
5597
+ i.userData = { isRaycastMesh: !0 }, o[Is] = i;
5598
5598
  }
5599
5599
  }
5600
5600
  function Dl(o = !0) {
@@ -5621,15 +5621,15 @@ function Pl(o) {
5621
5621
  return e.setIndex(o.getIndex()), e;
5622
5622
  }
5623
5623
  const Ze = new Array(), O = ut("debugprogressive");
5624
- let $t, at = -1;
5624
+ let $t, lt = -1;
5625
5625
  if (O) {
5626
5626
  let o = function() {
5627
- at += 1, at >= e && (at = -1), console.log(`Toggle LOD level [${at}]`);
5627
+ lt += 1, lt >= e && (lt = -1), console.log(`Toggle LOD level [${lt}]`);
5628
5628
  }, e = 6;
5629
5629
  window.addEventListener("keyup", (t) => {
5630
5630
  t.key === "p" && o(), t.key === "w" && ($t = !$t, console.log(`Toggle wireframe [${$t}]`));
5631
5631
  const i = parseInt(t.key);
5632
- !isNaN(i) && i >= 0 && (at = i, console.log(`Set LOD level to [${at}]`));
5632
+ !isNaN(i) && i >= 0 && (lt = i, console.log(`Set LOD level to [${lt}]`));
5633
5633
  });
5634
5634
  }
5635
5635
  function Sn(o) {
@@ -5647,13 +5647,13 @@ function Fl(o) {
5647
5647
  if (Ht.length < Ll) {
5648
5648
  const i = Ht.length;
5649
5649
  O && console.warn(`[Worker] Creating new worker #${i}`);
5650
- const s = Ys.createWorker(o || {});
5650
+ const s = Zs.createWorker(o || {});
5651
5651
  return Ht.push(s), s;
5652
5652
  }
5653
5653
  const e = El++ % Ht.length;
5654
5654
  return Ht[e];
5655
5655
  }
5656
- class Ys {
5656
+ class Zs {
5657
5657
  constructor(e, t) {
5658
5658
  E(this, "_running", []);
5659
5659
  E(this, "_webglRenderer", null);
@@ -5679,7 +5679,7 @@ class Ys {
5679
5679
  const t = new Worker(new URL("" + new URL("assets/loader.worker-fysOIq2s.js", import.meta.url).href, import.meta.url), {
5680
5680
  type: "module"
5681
5681
  });
5682
- return new Ys(t, e);
5682
+ return new Zs(t, e);
5683
5683
  }
5684
5684
  async load(e, t) {
5685
5685
  const i = bl();
@@ -5688,7 +5688,7 @@ class Ys {
5688
5688
  const { WebGLRenderer: f } = await import("three");
5689
5689
  return new f();
5690
5690
  })()), s = await this._webglRenderer);
5691
- const c = Qs().ktx2Loader.workerConfig;
5691
+ const c = Ys().ktx2Loader.workerConfig;
5692
5692
  e instanceof URL ? e = e.toString() : e.startsWith("file:") ? e = URL.createObjectURL(new Blob([e])) : !e.startsWith("blob:") && !e.startsWith("http:") && !e.startsWith("https:") && (e = new URL(e, window.location.href).toString());
5693
5693
  const u = {
5694
5694
  type: "load",
@@ -5711,15 +5711,15 @@ function kl(o) {
5711
5711
  const _ = g.geometry, y = new le();
5712
5712
  if (y.name = _.name || "", _.index) {
5713
5713
  const x = _.index;
5714
- y.setIndex(ts(x));
5714
+ y.setIndex(is(x));
5715
5715
  }
5716
5716
  for (const x in _.attributes) {
5717
- const w = _.attributes[x], A = ts(w);
5717
+ const w = _.attributes[x], A = is(w);
5718
5718
  y.setAttribute(x, A);
5719
5719
  }
5720
5720
  if (_.morphAttributes)
5721
5721
  for (const x in _.morphAttributes) {
5722
- const A = _.morphAttributes[x].map((T) => ts(T));
5722
+ const A = _.morphAttributes[x].map((S) => is(S));
5723
5723
  y.morphAttributes[x] = A;
5724
5724
  }
5725
5725
  if (y.morphTargetsRelative = _.morphTargetsRelative ?? !1, y.boundingBox = new Y(), y.boundingBox.min = new b(
@@ -5782,7 +5782,7 @@ function kl(o) {
5782
5782
  }
5783
5783
  return o;
5784
5784
  }
5785
- function ts(o) {
5785
+ function is(o) {
5786
5786
  let e = o;
5787
5787
  if ("isInterleavedBufferAttribute" in o && o.isInterleavedBufferAttribute) {
5788
5788
  const t = o.data, i = t.array, s = new eo(i, t.stride);
@@ -5791,7 +5791,7 @@ function ts(o) {
5791
5791
  "isBufferAttribute" in o && o.isBufferAttribute && (e = new fe(o.array, o.itemSize, o.normalized), e.usage = o.usage, e.gpuType = o.gpuType, e.updateRanges = o.updateRanges);
5792
5792
  return e;
5793
5793
  }
5794
- const Bl = ut("gltf-progressive-worker"), Ol = ut("gltf-progressive-reduce-mipmaps"), is = Symbol("needle-progressive-texture"), Ee = "NEEDLE_progressive", B = class B {
5794
+ const Bl = ut("gltf-progressive-worker"), Ol = ut("gltf-progressive-reduce-mipmaps"), ss = Symbol("needle-progressive-texture"), Ee = "NEEDLE_progressive", B = class B {
5795
5795
  constructor(e) {
5796
5796
  E(this, "parser");
5797
5797
  E(this, "url");
@@ -6073,7 +6073,7 @@ const Bl = ut("gltf-progressive-worker"), Ol = ut("gltf-progressive-reduce-mipma
6073
6073
  let n;
6074
6074
  if (e.isTexture === !0) {
6075
6075
  const l = e;
6076
- l.source && l.source[is] && (n = l.source[is]);
6076
+ l.source && l.source[ss] && (n = l.source[ss]);
6077
6077
  }
6078
6078
  if (n || (n = B.lodInfos.get(a)), !n)
6079
6079
  O && console.warn(`Can not load LOD ${t}: no LOD info found for "${a}" ${e.name}`, e.type, B.lodInfos);
@@ -6103,84 +6103,84 @@ const Bl = ut("gltf-progressive-worker"), Ol = ut("gltf-progressive-reduce-mipma
6103
6103
  return O && console.log(`LOD ${t} was aborted: ${h}`), null;
6104
6104
  const g = n, _ = new Promise(async (x, w) => {
6105
6105
  if (Bl) {
6106
- const S = await (await Fl({})).load(h);
6107
- if (S.textures.length > 0)
6108
- for (const R of S.textures) {
6109
- let P = R.texture;
6106
+ const T = await (await Fl({})).load(h);
6107
+ if (T.textures.length > 0)
6108
+ for (const I of T.textures) {
6109
+ let P = I.texture;
6110
6110
  return B.assignLODInformation(s.url, P, a, t, void 0), e instanceof Qe && (P = this.copySettings(e, P)), P && (P.guid = g.guid), x(P);
6111
6111
  }
6112
- if (S.geometries.length > 0) {
6113
- const R = new Array();
6114
- for (const P of S.geometries) {
6112
+ if (T.geometries.length > 0) {
6113
+ const I = new Array();
6114
+ for (const P of T.geometries) {
6115
6115
  const L = P.geometry;
6116
- B.assignLODInformation(s.url, L, a, t, P.primitiveIndex), R.push(L);
6116
+ B.assignLODInformation(s.url, L, a, t, P.primitiveIndex), I.push(L);
6117
6117
  }
6118
- return x(R);
6118
+ return x(I);
6119
6119
  }
6120
6120
  return x(null);
6121
6121
  }
6122
- const A = new Vs();
6122
+ const A = new Gs();
6123
6123
  wn(A), O && (await new Promise((D) => setTimeout(D, 1e3)), i && console.warn("Start loading (delayed) " + h, g.guid));
6124
- let T = h;
6124
+ let S = h;
6125
6125
  if (g && Array.isArray(g.lods)) {
6126
6126
  const D = g.lods[t];
6127
- D.hash && (T += "?v=" + D.hash);
6127
+ D.hash && (S += "?v=" + D.hash);
6128
6128
  }
6129
- const I = await A.loadAsync(T).catch((D) => (console.error(`Error loading LOD ${t} from ${h}
6129
+ const C = await A.loadAsync(S).catch((D) => (console.error(`Error loading LOD ${t} from ${h}
6130
6130
  `, D), x(null)));
6131
- if (!I)
6131
+ if (!C)
6132
6132
  return x(null);
6133
- const M = I.parser;
6133
+ const M = C.parser;
6134
6134
  i && console.log("Loading finished " + h, g.guid);
6135
- let C = 0;
6136
- if (I.parser.json.textures) {
6135
+ let R = 0;
6136
+ if (C.parser.json.textures) {
6137
6137
  let D = !1;
6138
- for (const S of I.parser.json.textures) {
6139
- if (S != null && S.extensions) {
6140
- const R = S == null ? void 0 : S.extensions[Ee];
6141
- if (R != null && R.guid && R.guid === g.guid) {
6138
+ for (const T of C.parser.json.textures) {
6139
+ if (T != null && T.extensions) {
6140
+ const I = T == null ? void 0 : T.extensions[Ee];
6141
+ if (I != null && I.guid && I.guid === g.guid) {
6142
6142
  D = !0;
6143
6143
  break;
6144
6144
  }
6145
6145
  }
6146
- C++;
6146
+ R++;
6147
6147
  }
6148
6148
  if (D) {
6149
- let S = await M.getDependency("texture", C);
6150
- return S && B.assignLODInformation(s.url, S, a, t, void 0), i && console.log('change "' + e.name + '" → "' + S.name + '"', h, C, S, m), e instanceof Qe && (S = this.copySettings(e, S)), S && (S.guid = g.guid), x(S);
6149
+ let T = await M.getDependency("texture", R);
6150
+ 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 Qe && (T = this.copySettings(e, T)), T && (T.guid = g.guid), x(T);
6151
6151
  } else
6152
- O && console.warn("Could not find texture with guid", g.guid, I.parser.json);
6152
+ O && console.warn("Could not find texture with guid", g.guid, C.parser.json);
6153
6153
  }
6154
- if (C = 0, I.parser.json.meshes) {
6154
+ if (R = 0, C.parser.json.meshes) {
6155
6155
  let D = !1;
6156
- for (const S of I.parser.json.meshes) {
6157
- if (S != null && S.extensions) {
6158
- const R = S == null ? void 0 : S.extensions[Ee];
6159
- if (R != null && R.guid && R.guid === g.guid) {
6156
+ for (const T of C.parser.json.meshes) {
6157
+ if (T != null && T.extensions) {
6158
+ const I = T == null ? void 0 : T.extensions[Ee];
6159
+ if (I != null && I.guid && I.guid === g.guid) {
6160
6160
  D = !0;
6161
6161
  break;
6162
6162
  }
6163
6163
  }
6164
- C++;
6164
+ R++;
6165
6165
  }
6166
6166
  if (D) {
6167
- const S = await M.getDependency("mesh", C);
6168
- if (i && console.log(`Loaded Mesh "${S.name}"`, h, C, S, m), S.isMesh === !0) {
6169
- const R = S.geometry;
6170
- return B.assignLODInformation(s.url, R, a, t, 0), x(R);
6167
+ const T = await M.getDependency("mesh", R);
6168
+ if (i && console.log(`Loaded Mesh "${T.name}"`, h, R, T, m), T.isMesh === !0) {
6169
+ const I = T.geometry;
6170
+ return B.assignLODInformation(s.url, I, a, t, 0), x(I);
6171
6171
  } else {
6172
- const R = new Array();
6173
- for (let P = 0; P < S.children.length; P++) {
6174
- const L = S.children[P];
6172
+ const I = new Array();
6173
+ for (let P = 0; P < T.children.length; P++) {
6174
+ const L = T.children[P];
6175
6175
  if (L.isMesh === !0) {
6176
6176
  const F = L.geometry;
6177
- B.assignLODInformation(s.url, F, a, t, P), R.push(F);
6177
+ B.assignLODInformation(s.url, F, a, t, P), I.push(F);
6178
6178
  }
6179
6179
  }
6180
- return x(R);
6180
+ return x(I);
6181
6181
  }
6182
6182
  } else
6183
- O && console.warn("Could not find mesh with guid", g.guid, I.parser.json);
6183
+ O && console.warn("Could not find mesh with guid", g.guid, C.parser.json);
6184
6184
  }
6185
6185
  return x(null);
6186
6186
  });
@@ -6224,7 +6224,7 @@ E(B, "registerTexture", (e, t, i, s, a) => {
6224
6224
  const v = ((c = t.image) == null ? void 0 : c.width) || ((f = (u = t.source) == null ? void 0 : u.data) == null ? void 0 : f.width) || 0, p = ((d = t.image) == null ? void 0 : d.height) || ((l = (r = t.source) == null ? void 0 : r.data) == null ? void 0 : l.height) || 0;
6225
6225
  console.log(`> gltf-progressive: register texture[${s}] "${t.name || t.uuid}", Current: ${v}x${p}, Max: ${(h = a.lods[0]) == null ? void 0 : h.width}x${(m = a.lods[0]) == null ? void 0 : m.height}, uuid: ${t.uuid}`, a, t);
6226
6226
  }
6227
- t.source && (t.source[is] = a);
6227
+ t.source && (t.source[ss] = a);
6228
6228
  const n = a.guid;
6229
6229
  B.assignLODInformation(e, t, n, i, s), B.lodInfos.set(n, a), B.lowresCache.set(n, t);
6230
6230
  }), /**
@@ -6337,9 +6337,9 @@ E(Di, "addPromise", (e, t, i, s) => {
6337
6337
  a.add(e, t, i);
6338
6338
  });
6339
6339
  });
6340
- const be = ut("debugprogressive"), Ul = ut("noprogressive"), ss = Symbol("Needle:LODSManager"), rs = Symbol("Needle:LODState"), qe = Symbol("Needle:CurrentLOD"), oe = { mesh_lod: -1, texture_lod: -1 };
6341
- var ue, Le, Oi, Ke, Pt, zi, Fe;
6342
- const N = class N {
6340
+ const be = ut("debugprogressive"), Ul = ut("noprogressive"), rs = Symbol("Needle:LODSManager"), ns = Symbol("Needle:LODState"), qe = Symbol("Needle:CurrentLOD"), oe = { mesh_lod: -1, texture_lod: -1 };
6341
+ var ue, Le, zi, Ke, Pt, Ui, Fe;
6342
+ const V = class V {
6343
6343
  // readonly plugins: NEEDLE_progressive_plugin[] = [];
6344
6344
  constructor(e, t) {
6345
6345
  E(this, "renderer");
@@ -6382,10 +6382,10 @@ const N = class N {
6382
6382
  E(this, "_promiseGroupIds", 0);
6383
6383
  E(this, "_lodchangedlisteners", []);
6384
6384
  Ge(this, Le, void 0);
6385
- Ge(this, Oi, new Wi());
6385
+ Ge(this, zi, new Vi());
6386
6386
  Ge(this, Ke, 0);
6387
6387
  Ge(this, Pt, 0);
6388
- Ge(this, zi, 0);
6388
+ Ge(this, Ui, 0);
6389
6389
  Ge(this, Fe, 0);
6390
6390
  E(this, "_fpsBuffer", [60, 60, 60, 60, 60]);
6391
6391
  // private testIfLODLevelsAreAvailable() {
@@ -6400,7 +6400,7 @@ const N = class N {
6400
6400
  }
6401
6401
  /** @internal */
6402
6402
  static getObjectLODState(e) {
6403
- return e[rs];
6403
+ return e[ns];
6404
6404
  }
6405
6405
  static addPlugin(e) {
6406
6406
  Ze.push(e);
@@ -6415,13 +6415,13 @@ const N = class N {
6415
6415
  * @returns The LODsManager instance.
6416
6416
  */
6417
6417
  static get(e, t) {
6418
- if (e[ss])
6419
- return console.debug("[gltf-progressive] LODsManager already exists for this renderer"), e[ss];
6420
- const i = new N(e, {
6418
+ if (e[rs])
6419
+ return console.debug("[gltf-progressive] LODsManager already exists for this renderer"), e[rs];
6420
+ const i = new V(e, {
6421
6421
  engine: "unknown",
6422
6422
  ...t
6423
6423
  });
6424
- return e[ss] = i, i;
6424
+ return e[rs] = i, i;
6425
6425
  }
6426
6426
  /** @deprecated use static `LODsManager.addPlugin()` method. This getter will be removed in later versions */
6427
6427
  get plugins() {
@@ -6466,9 +6466,9 @@ const N = class N {
6466
6466
  let e = 0;
6467
6467
  Ie(this, Le, this.renderer.render);
6468
6468
  const t = this;
6469
- Qs(this.renderer), this.renderer.render = function(i, s) {
6469
+ Ys(this.renderer), this.renderer.render = function(i, s) {
6470
6470
  const a = t.renderer.getRenderTarget();
6471
- (a == null || "isXRRenderTarget" in a && a.isXRRenderTarget) && (e = 0, Ie(t, Ke, H(t, Ke) + 1), Ie(t, Pt, H(t, Oi).getDelta()), Ie(t, zi, H(t, zi) + H(t, Pt)), t._fpsBuffer.shift(), t._fpsBuffer.push(1 / H(t, Pt)), Ie(t, Fe, t._fpsBuffer.reduce((c, u) => c + u) / t._fpsBuffer.length), be && H(t, Ke) % 200 === 0 && console.log("FPS", Math.round(H(t, Fe)), "Interval:", H(t, ue)));
6471
+ (a == null || "isXRRenderTarget" in a && a.isXRRenderTarget) && (e = 0, Ie(t, Ke, H(t, Ke) + 1), Ie(t, Pt, H(t, zi).getDelta()), Ie(t, Ui, H(t, Ui) + H(t, Pt)), t._fpsBuffer.shift(), t._fpsBuffer.push(1 / H(t, Pt)), Ie(t, Fe, t._fpsBuffer.reduce((c, u) => c + u) / t._fpsBuffer.length), be && H(t, Ke) % 200 === 0 && console.log("FPS", Math.round(H(t, Fe)), "Interval:", H(t, ue)));
6472
6472
  const n = e++;
6473
6473
  H(t, Le).call(this, i, s), t.onAfterRender(i, s, n);
6474
6474
  };
@@ -6539,12 +6539,12 @@ const N = class N {
6539
6539
  updateLODs(e, t, i, s) {
6540
6540
  var c, u;
6541
6541
  i.userData || (i.userData = {});
6542
- let a = i[rs];
6543
- if (a || (a = new Hl(), i[rs] = a), a.frames++ < 2)
6542
+ let a = i[ns];
6543
+ if (a || (a = new Hl(), i[ns] = a), a.frames++ < 2)
6544
6544
  return;
6545
6545
  for (const f of Ze)
6546
6546
  (c = f.onBeforeUpdateLOD) == null || c.call(f, this.renderer, e, t, i);
6547
- const n = this.overrideLodLevel !== void 0 ? this.overrideLodLevel : at;
6547
+ const n = this.overrideLodLevel !== void 0 ? this.overrideLodLevel : lt;
6548
6548
  n >= 0 ? (oe.mesh_lod = n, oe.texture_lod = n) : (this.calculateLodLevel(t, i, a, s, oe), oe.mesh_lod = Math.round(oe.mesh_lod), oe.texture_lod = Math.round(oe.texture_lod)), oe.mesh_lod >= 0 && this.loadProgressiveMeshes(i, oe.mesh_lod), i.material && oe.texture_lod >= 0 && this.loadProgressiveTextures(i.material, oe.texture_lod, n), O && i.material && !i.isGizmo && Sn(i.material);
6549
6549
  for (const f of Ze)
6550
6550
  (u = f.onAfterUpdatedLOD) == null || u.call(f, this.renderer, e, t, i, oe);
@@ -6621,14 +6621,14 @@ const N = class N {
6621
6621
  if (!x.boundingBox)
6622
6622
  x.computeBoundingBox();
6623
6623
  else if (this.skinnedMeshAutoUpdateBoundsInterval > 0) {
6624
- if (!x[N.$skinnedMeshBoundsOffset]) {
6625
- const A = N.skinnedMeshBoundsFrameOffsetCounter++;
6626
- x[N.$skinnedMeshBoundsOffset] = A;
6624
+ if (!x[V.$skinnedMeshBoundsOffset]) {
6625
+ const A = V.skinnedMeshBoundsFrameOffsetCounter++;
6626
+ x[V.$skinnedMeshBoundsOffset] = A;
6627
6627
  }
6628
- const w = x[N.$skinnedMeshBoundsOffset];
6628
+ const w = x[V.$skinnedMeshBoundsOffset];
6629
6629
  if ((i.frames + w) % this.skinnedMeshAutoUpdateBoundsInterval === 0) {
6630
- const A = oi(x), T = x.geometry;
6631
- A && (x.geometry = A), x.computeBoundingBox(), x.geometry = T;
6630
+ const A = oi(x), S = x.geometry;
6631
+ A && (x.geometry = A), x.computeBoundingBox(), x.geometry = S;
6632
6632
  }
6633
6633
  }
6634
6634
  v = x.boundingBox;
@@ -6637,44 +6637,44 @@ const N = class N {
6637
6637
  const x = e;
6638
6638
  if (t.geometry.attributes.color && t.geometry.attributes.color.count < 100 && t.geometry.boundingSphere) {
6639
6639
  this._sphere.copy(t.geometry.boundingSphere), this._sphere.applyMatrix4(t.matrixWorld);
6640
- const R = e.getWorldPosition(this._tempWorldPosition);
6641
- if (this._sphere.containsPoint(R)) {
6640
+ const I = e.getWorldPosition(this._tempWorldPosition);
6641
+ if (this._sphere.containsPoint(I)) {
6642
6642
  a.mesh_lod = 0, a.texture_lod = 0;
6643
6643
  return;
6644
6644
  }
6645
6645
  }
6646
- if (this._tempBox.copy(v), this._tempBox.applyMatrix4(t.matrixWorld), x.isPerspectiveCamera && N.isInside(this._tempBox, this.projectionScreenMatrix)) {
6646
+ if (this._tempBox.copy(v), this._tempBox.applyMatrix4(t.matrixWorld), x.isPerspectiveCamera && V.isInside(this._tempBox, this.projectionScreenMatrix)) {
6647
6647
  a.mesh_lod = 0, a.texture_lod = 0;
6648
6648
  return;
6649
6649
  }
6650
6650
  if (this._tempBox.applyMatrix4(this.projectionScreenMatrix), this.renderer.xr.enabled && x.isPerspectiveCamera && x.fov > 70) {
6651
- const R = this._tempBox.min, P = this._tempBox.max;
6652
- let L = R.x, F = R.y, U = P.x, G = P.y;
6653
- const Q = 2, ie = 1.5, se = (R.x + P.x) * 0.5, W = (R.y + P.y) * 0.5;
6651
+ const I = this._tempBox.min, P = this._tempBox.max;
6652
+ let L = I.x, F = I.y, U = P.x, G = P.y;
6653
+ const Q = 2, ie = 1.5, se = (I.x + P.x) * 0.5, W = (I.y + P.y) * 0.5;
6654
6654
  L = (L - se) * Q + se, F = (F - W) * Q + W, U = (U - se) * Q + se, G = (G - W) * Q + W;
6655
- const q = L < 0 && U > 0 ? 0 : Math.min(Math.abs(R.x), Math.abs(P.x)), me = F < 0 && G > 0 ? 0 : Math.min(Math.abs(R.y), Math.abs(P.y)), ce = Math.max(q, me);
6655
+ const q = L < 0 && U > 0 ? 0 : Math.min(Math.abs(I.x), Math.abs(P.x)), me = F < 0 && G > 0 ? 0 : Math.min(Math.abs(I.y), Math.abs(P.y)), ce = Math.max(q, me);
6656
6656
  i.lastCentrality = (ie - ce) * (ie - ce) * (ie - ce);
6657
6657
  } else
6658
6658
  i.lastCentrality = 1;
6659
6659
  const w = this._tempBox.getSize(this._tempBoxSize);
6660
6660
  w.multiplyScalar(0.5), screen.availHeight > 0 && m > 0 && w.multiplyScalar(m / screen.availHeight), e.isPerspectiveCamera ? w.x *= e.aspect : e.isOrthographicCamera;
6661
- const A = e.matrixWorldInverse, T = this._tempBox2;
6662
- T.copy(v), T.applyMatrix4(t.matrixWorld), T.applyMatrix4(A);
6663
- const I = T.getSize(this._tempBox2Size), M = Math.max(I.x, I.y);
6664
- 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, be && N.debugDrawLine) {
6665
- const R = this.tempMatrix.copy(this.projectionScreenMatrix);
6666
- R.invert();
6667
- const P = N.corner0, L = N.corner1, F = N.corner2, U = N.corner3;
6661
+ const A = e.matrixWorldInverse, S = this._tempBox2;
6662
+ S.copy(v), S.applyMatrix4(t.matrixWorld), S.applyMatrix4(A);
6663
+ const C = S.getSize(this._tempBox2Size), M = Math.max(C.x, C.y);
6664
+ if (Math.max(w.x, w.y) != 0 && M != 0 && (w.z = C.z / Math.max(C.x, C.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, be && V.debugDrawLine) {
6665
+ const I = this.tempMatrix.copy(this.projectionScreenMatrix);
6666
+ I.invert();
6667
+ const P = V.corner0, L = V.corner1, F = V.corner2, U = V.corner3;
6668
6668
  P.copy(this._tempBox.min), L.copy(this._tempBox.max), L.x = P.x, F.copy(this._tempBox.max), F.y = P.y, U.copy(this._tempBox.max);
6669
6669
  const G = (P.z + U.z) * 0.5;
6670
- P.z = L.z = F.z = U.z = G, P.applyMatrix4(R), L.applyMatrix4(R), F.applyMatrix4(R), U.applyMatrix4(R), N.debugDrawLine(P, L, 255), N.debugDrawLine(P, F, 255), N.debugDrawLine(L, U, 255), N.debugDrawLine(F, U, 255);
6670
+ P.z = L.z = F.z = U.z = G, P.applyMatrix4(I), L.applyMatrix4(I), F.applyMatrix4(I), U.applyMatrix4(I), V.debugDrawLine(P, L, 255), V.debugDrawLine(P, F, 255), V.debugDrawLine(L, U, 255), V.debugDrawLine(F, U, 255);
6671
6671
  }
6672
6672
  let D = 999;
6673
6673
  if (f && i.lastScreenCoverage > 0)
6674
- for (let R = 0; R < f.length; R++) {
6675
- const P = f[R], F = (((g = P.densities) == null ? void 0 : g[d]) || P.density || 1e-5) / i.lastScreenCoverage;
6674
+ for (let I = 0; I < f.length; I++) {
6675
+ const P = f[I], F = (((g = P.densities) == null ? void 0 : g[d]) || P.density || 1e-5) / i.lastScreenCoverage;
6676
6676
  if (d > 0 && Pr() && !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.")), F < s) {
6677
- D = R;
6677
+ D = I;
6678
6678
  break;
6679
6679
  }
6680
6680
  }
@@ -6695,15 +6695,15 @@ const N = class N {
6695
6695
  const w = i.lastScreenspaceVolume.x + i.lastScreenspaceVolume.y + i.lastScreenspaceVolume.z;
6696
6696
  let A = i.lastScreenCoverage * 4;
6697
6697
  ((y = this.context) == null ? void 0 : y.engine) === "model-viewer" && (A *= 1.5);
6698
- const I = m / window.devicePixelRatio * A;
6698
+ const C = m / window.devicePixelRatio * A;
6699
6699
  let M = !1;
6700
- for (let C = l.lods.length - 1; C >= 0; C--) {
6701
- const D = l.lods[C];
6702
- if (!(x && D.max_height >= 2048) && !(Tn() && D.max_height > 4096) && (D.max_height > I || !M && C === 0)) {
6703
- if (M = !0, a.texture_lod = C, be && a.texture_lod < i.lastLodLevel_Texture) {
6704
- const S = D.max_height;
6705
- console.log(`Texture LOD changed: ${i.lastLodLevel_Texture} → ${a.texture_lod} = ${S}px
6706
- Screensize: ${I.toFixed(0)}px, Coverage: ${(100 * i.lastScreenCoverage).toFixed(2)}%, Volume ${w.toFixed(1)}
6700
+ for (let R = l.lods.length - 1; R >= 0; R--) {
6701
+ const D = l.lods[R];
6702
+ if (!(x && D.max_height >= 2048) && !(Tn() && D.max_height > 4096) && (D.max_height > C || !M && R === 0)) {
6703
+ if (M = !0, a.texture_lod = R, be && a.texture_lod < i.lastLodLevel_Texture) {
6704
+ const T = D.max_height;
6705
+ console.log(`Texture LOD changed: ${i.lastLodLevel_Texture} → ${a.texture_lod} = ${T}px
6706
+ Screensize: ${C.toFixed(0)}px, Coverage: ${(100 * i.lastScreenCoverage).toFixed(2)}%, Volume ${w.toFixed(1)}
6707
6707
  ${t.name}`);
6708
6708
  }
6709
6709
  break;
@@ -6714,11 +6714,11 @@ ${t.name}`);
6714
6714
  a.texture_lod = 0;
6715
6715
  }
6716
6716
  };
6717
- ue = new WeakMap(), Le = new WeakMap(), Oi = new WeakMap(), Ke = new WeakMap(), Pt = new WeakMap(), zi = new WeakMap(), Fe = new WeakMap(), /**
6717
+ ue = new WeakMap(), Le = new WeakMap(), zi = new WeakMap(), Ke = new WeakMap(), Pt = new WeakMap(), Ui = new WeakMap(), Fe = new WeakMap(), /**
6718
6718
  * 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.
6719
6719
  */
6720
- E(N, "debugDrawLine"), E(N, "corner0", new b()), E(N, "corner1", new b()), E(N, "corner2", new b()), E(N, "corner3", new b()), E(N, "_tempPtInside", new b()), E(N, "skinnedMeshBoundsFrameOffsetCounter", 0), E(N, "$skinnedMeshBoundsOffset", Symbol("gltf-progressive-skinnedMeshBoundsOffset"));
6721
- let Lt = N;
6720
+ E(V, "debugDrawLine"), E(V, "corner0", new b()), E(V, "corner1", new b()), E(V, "corner2", new b()), E(V, "corner3", new b()), E(V, "_tempPtInside", new b()), E(V, "skinnedMeshBoundsFrameOffsetCounter", 0), E(V, "$skinnedMeshBoundsOffset", Symbol("gltf-progressive-skinnedMeshBoundsOffset"));
6721
+ let Lt = V;
6722
6722
  class Hl {
6723
6723
  constructor() {
6724
6724
  E(this, "frames", 0);
@@ -6759,11 +6759,11 @@ function Lr() {
6759
6759
  });
6760
6760
  }
6761
6761
  const Fr = /* @__PURE__ */ new WeakSet();
6762
- let Nl = 0;
6762
+ let Vl = 0;
6763
6763
  function Cn(o) {
6764
6764
  if (!o || Fr.has(o))
6765
6765
  return null;
6766
- Fr.add(o), console.debug("[gltf-progressive] found new model-viewer..." + ++Nl + `
6766
+ Fr.add(o), console.debug("[gltf-progressive] found new model-viewer..." + ++Vl + `
6767
6767
  `, o.getAttribute("src"));
6768
6768
  let e = null, t = null, i = null;
6769
6769
  for (let s = o; s != null; s = Object.getPrototypeOf(s)) {
@@ -6784,7 +6784,7 @@ function Cn(o) {
6784
6784
  };
6785
6785
  console.debug("[gltf-progressive] setup model-viewer");
6786
6786
  const a = Lt.get(e, { engine: "model-viewer" });
6787
- return Lt.addPlugin(new Vl()), a.enable(), a.addEventListener("changed", () => {
6787
+ return Lt.addPlugin(new Nl()), a.enable(), a.addEventListener("changed", () => {
6788
6788
  i == null || i.call(o);
6789
6789
  }), o.addEventListener("model-visibility", (n) => {
6790
6790
  n.detail.visible && (i == null || i.call(o));
@@ -6796,7 +6796,7 @@ function Cn(o) {
6796
6796
  }
6797
6797
  return null;
6798
6798
  }
6799
- class Vl {
6799
+ class Nl {
6800
6800
  constructor() {
6801
6801
  E(this, "_didWarnAboutMissingUrl", !1);
6802
6802
  }
@@ -6883,7 +6883,7 @@ function In(...o) {
6883
6883
  default:
6884
6884
  throw new Error("Invalid arguments");
6885
6885
  }
6886
- Qs(), wn(i), An(i, {
6886
+ Ys(), wn(i), An(i, {
6887
6887
  progressive: !0,
6888
6888
  ...s == null ? void 0 : s.hints
6889
6889
  }), i.register((n) => new Re(n));
@@ -7083,18 +7083,18 @@ var Rt = Object.freeze({
7083
7083
  return !0;
7084
7084
  }, o;
7085
7085
  }()
7086
- ), lt = {
7086
+ ), ct = {
7087
7087
  Linear: function(o, e) {
7088
- var t = o.length - 1, i = t * e, s = Math.floor(i), a = lt.Utils.Linear;
7088
+ var t = o.length - 1, i = t * e, s = Math.floor(i), a = ct.Utils.Linear;
7089
7089
  return e < 0 ? a(o[0], o[1], i) : e > 1 ? a(o[t], o[t - 1], t - i) : a(o[s], o[s + 1 > t ? t : s + 1], i - s);
7090
7090
  },
7091
7091
  Bezier: function(o, e) {
7092
- for (var t = 0, i = o.length - 1, s = Math.pow, a = lt.Utils.Bernstein, n = 0; n <= i; n++)
7092
+ for (var t = 0, i = o.length - 1, s = Math.pow, a = ct.Utils.Bernstein, n = 0; n <= i; n++)
7093
7093
  t += s(1 - e, i - n) * s(e, n) * o[n] * a(i, n);
7094
7094
  return t;
7095
7095
  },
7096
7096
  CatmullRom: function(o, e) {
7097
- var t = o.length - 1, i = t * e, s = Math.floor(i), a = lt.Utils.CatmullRom;
7097
+ var t = o.length - 1, i = t * e, s = Math.floor(i), a = ct.Utils.CatmullRom;
7098
7098
  return o[0] === o[t] ? (e < 0 && (s = Math.floor(i = t * (1 + e))), a(o[(s - 1 + t) % t], o[s], o[(s + 1) % t], o[(s + 2) % t], i - s)) : e < 0 ? o[0] - (a(o[0], o[0], o[1], o[1], -i) - o[0]) : e > 1 ? o[t] - (a(o[t], o[t], o[t - 1], o[t - 1], i - t) - o[t]) : a(o[s ? s - 1 : 0], o[s], o[t < s + 1 ? t : s + 1], o[t < s + 2 ? t : s + 2], i - s);
7099
7099
  },
7100
7100
  Utils: {
@@ -7102,7 +7102,7 @@ var Rt = Object.freeze({
7102
7102
  return (e - o) * t + o;
7103
7103
  },
7104
7104
  Bernstein: function(o, e) {
7105
- var t = lt.Utils.Factorial;
7105
+ var t = ct.Utils.Factorial;
7106
7106
  return t(o) / t(e) / t(o - e);
7107
7107
  },
7108
7108
  Factorial: /* @__PURE__ */ function() {
@@ -7121,7 +7121,7 @@ var Rt = Object.freeze({
7121
7121
  return (2 * e - 2 * t + a + n) * u + (-3 * e + 3 * t - 2 * a - n) * c + a * s + e;
7122
7122
  }
7123
7123
  }
7124
- }, Zs = (
7124
+ }, Xs = (
7125
7125
  /** @class */
7126
7126
  function() {
7127
7127
  function o() {
@@ -7130,11 +7130,11 @@ var Rt = Object.freeze({
7130
7130
  return o._nextId++;
7131
7131
  }, o._nextId = 0, o;
7132
7132
  }()
7133
- ), Is = new Rn(), Xs = (
7133
+ ), Rs = new Rn(), Bi = (
7134
7134
  /** @class */
7135
7135
  function() {
7136
7136
  function o(e, t) {
7137
- t === void 0 && (t = Is), this._object = e, this._group = t, this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = Rt.Linear.None, this._interpolationFunction = lt.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = Zs.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1;
7137
+ t === void 0 && (t = Rs), this._object = e, this._group = t, this._isPaused = !1, this._pauseStart = 0, this._valuesStart = {}, this._valuesEnd = {}, this._valuesStartRepeat = {}, this._duration = 1e3, this._isDynamic = !1, this._initialRepeat = 0, this._repeat = 0, this._yoyo = !1, this._isPlaying = !1, this._reversed = !1, this._delayTime = 0, this._startTime = 0, this._easingFunction = Rt.Linear.None, this._interpolationFunction = ct.Linear, this._chainedTweens = [], this._onStartCallbackFired = !1, this._onEveryStartCallbackFired = !1, this._id = Xs.nextId(), this._isChainStopped = !1, this._propertiesAreSetUp = !1, this._goToEnd = !1;
7138
7138
  }
7139
7139
  return o.prototype.getId = function() {
7140
7140
  return this._id;
@@ -7221,7 +7221,7 @@ var Rt = Object.freeze({
7221
7221
  this._chainedTweens[e].stop();
7222
7222
  return this;
7223
7223
  }, o.prototype.group = function(e) {
7224
- return e === void 0 && (e = Is), this._group = e, this;
7224
+ return e === void 0 && (e = Rs), this._group = e, this;
7225
7225
  }, o.prototype.delay = function(e) {
7226
7226
  return e === void 0 && (e = 0), this._delayTime = e, this;
7227
7227
  }, o.prototype.repeat = function(e) {
@@ -7233,7 +7233,7 @@ var Rt = Object.freeze({
7233
7233
  }, o.prototype.easing = function(e) {
7234
7234
  return e === void 0 && (e = Rt.Linear.None), this._easingFunction = e, this;
7235
7235
  }, o.prototype.interpolation = function(e) {
7236
- return e === void 0 && (e = lt.Linear), this._interpolationFunction = e, this;
7236
+ return e === void 0 && (e = ct.Linear), this._interpolationFunction = e, this;
7237
7237
  }, o.prototype.chain = function() {
7238
7238
  for (var e = [], t = 0; t < arguments.length; t++)
7239
7239
  e[t] = arguments[t];
@@ -7298,21 +7298,21 @@ var Rt = Object.freeze({
7298
7298
  typeof i == "string" ? this._valuesStartRepeat[e] = this._valuesStartRepeat[e] + parseFloat(i) : this._valuesStartRepeat[e] = this._valuesEnd[e], this._valuesEnd[e] = t;
7299
7299
  }, o;
7300
7300
  }()
7301
- ), Gl = "23.1.3", ql = Zs.nextId, De = Is, jl = De.getAll.bind(De), Ql = De.removeAll.bind(De), Yl = De.add.bind(De), Zl = De.remove.bind(De), Xl = De.update.bind(De), ct = {
7301
+ ), Gl = "23.1.3", ql = Xs.nextId, De = Rs, jl = De.getAll.bind(De), Ql = De.removeAll.bind(De), Yl = De.add.bind(De), Zl = De.remove.bind(De), Xl = De.update.bind(De), Je = {
7302
7302
  Easing: Rt,
7303
7303
  Group: Rn,
7304
- Interpolation: lt,
7304
+ Interpolation: ct,
7305
7305
  now: Ct,
7306
- Sequence: Zs,
7306
+ Sequence: Xs,
7307
7307
  nextId: ql,
7308
- Tween: Xs,
7308
+ Tween: Bi,
7309
7309
  VERSION: Gl,
7310
7310
  getAll: jl,
7311
7311
  removeAll: Ql,
7312
7312
  add: Yl,
7313
7313
  remove: Zl,
7314
7314
  update: Xl
7315
- }, Nt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
7315
+ }, Vt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
7316
7316
  function Kl(o) {
7317
7317
  return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
7318
7318
  }
@@ -7841,35 +7841,35 @@ var Pn = {};
7841
7841
  if (m && !g._paused)
7842
7842
  return l || h._loadQueue("play"), g._id;
7843
7843
  h._webAudio && t._autoResume();
7844
- 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;
7844
+ 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;
7845
7845
  g._sprite = r, g._ended = !1;
7846
- var I = function() {
7847
- g._paused = !1, g._seek = y, g._start = A, g._stop = T, g._loop = !!(g._loop || h._sprite[r][2]);
7846
+ var C = function() {
7847
+ g._paused = !1, g._seek = y, g._start = A, g._stop = S, g._loop = !!(g._loop || h._sprite[r][2]);
7848
7848
  };
7849
- if (y >= T) {
7849
+ if (y >= S) {
7850
7850
  h._ended(g);
7851
7851
  return;
7852
7852
  }
7853
7853
  var M = g._node;
7854
7854
  if (h._webAudio) {
7855
- var C = function() {
7856
- h._playLock = !1, I(), h._refreshBuffer(g);
7855
+ var R = function() {
7856
+ h._playLock = !1, C(), h._refreshBuffer(g);
7857
7857
  var P = g._muted || h._muted ? 0 : g._volume;
7858
7858
  M.gain.setValueAtTime(P, 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() {
7859
7859
  h._emit("play", g._id), h._loadQueue();
7860
7860
  }, 0);
7861
7861
  };
7862
- t.state === "running" && t.ctx.state !== "interrupted" ? C() : (h._playLock = !0, h.once("resume", C), h._clearTimer(g._id));
7862
+ t.state === "running" && t.ctx.state !== "interrupted" ? R() : (h._playLock = !0, h.once("resume", R), h._clearTimer(g._id));
7863
7863
  } else {
7864
7864
  var D = function() {
7865
7865
  M.currentTime = y, M.muted = g._muted || h._muted || t._muted || M.muted, M.volume = g._volume * t.volume(), M.playbackRate = g._rate;
7866
7866
  try {
7867
7867
  var P = M.play();
7868
- if (P && typeof Promise < "u" && (P instanceof Promise || typeof P.then == "function") ? (h._playLock = !0, I(), P.then(function() {
7868
+ if (P && typeof Promise < "u" && (P instanceof Promise || typeof P.then == "function") ? (h._playLock = !0, C(), P.then(function() {
7869
7869
  h._playLock = !1, M._unlocked = !0, l ? h._loadQueue() : h._emit("play", g._id);
7870
7870
  }).catch(function() {
7871
7871
  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;
7872
- })) : l || (h._playLock = !1, I(), h._emit("play", g._id)), M.playbackRate = g._rate, M.paused) {
7872
+ })) : l || (h._playLock = !1, C(), h._emit("play", g._id)), M.playbackRate = g._rate, M.paused) {
7873
7873
  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.");
7874
7874
  return;
7875
7875
  }
@@ -7881,15 +7881,15 @@ var Pn = {};
7881
7881
  }
7882
7882
  };
7883
7883
  M.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" && (M.src = h._src, M.load());
7884
- var S = window && window.ejecta || !M.readyState && t._navigator.isCocoonJS;
7885
- if (M.readyState >= 3 || S)
7884
+ var T = window && window.ejecta || !M.readyState && t._navigator.isCocoonJS;
7885
+ if (M.readyState >= 3 || T)
7886
7886
  D();
7887
7887
  else {
7888
7888
  h._playLock = !0, h._state = "loading";
7889
- var R = function() {
7890
- h._state = "loaded", D(), M.removeEventListener(t._canPlayEvent, R, !1);
7889
+ var I = function() {
7890
+ h._state = "loaded", D(), M.removeEventListener(t._canPlayEvent, I, !1);
7891
7891
  };
7892
- M.addEventListener(t._canPlayEvent, R, !1), h._clearTimer(g._id);
7892
+ M.addEventListener(t._canPlayEvent, I, !1), h._clearTimer(g._id);
7893
7893
  }
7894
7894
  }
7895
7895
  return g._id;
@@ -8045,8 +8045,8 @@ var Pn = {};
8045
8045
  _startFadeInterval: function(r, l, h, m, v, p) {
8046
8046
  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();
8047
8047
  r._fadeTo = h, r._interval = setInterval(function() {
8048
- var T = (Date.now() - A) / m;
8049
- 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));
8048
+ var S = (Date.now() - A) / m;
8049
+ 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));
8050
8050
  }, w);
8051
8051
  },
8052
8052
  /**
@@ -8520,7 +8520,7 @@ var Pn = {};
8520
8520
  t.usingWebAudio && (t.masterGain = typeof t.ctx.createGain > "u" ? t.ctx.createGainNode() : t.ctx.createGain(), t.masterGain.gain.setValueAtTime(t._muted ? 0 : t._volume, t.ctx.currentTime), t.masterGain.connect(t.ctx.destination)), t._setup();
8521
8521
  }
8522
8522
  };
8523
- o.Howler = t, o.Howl = i, typeof Nt < "u" ? (Nt.HowlerGlobal = e, Nt.Howler = t, Nt.Howl = i, Nt.Sound = s) : typeof window < "u" && (window.HowlerGlobal = e, window.Howler = t, window.Howl = i, window.Sound = s);
8523
+ o.Howler = t, o.Howl = i, typeof Vt < "u" ? (Vt.HowlerGlobal = e, Vt.Howler = t, Vt.Howl = i, Vt.Sound = s) : typeof window < "u" && (window.HowlerGlobal = e, window.Howler = t, window.Howl = i, window.Sound = s);
8524
8524
  })();
8525
8525
  /*!
8526
8526
  * Spatial Plugin - Adds support for stereo and 3D audio where Web Audio is supported.
@@ -8761,12 +8761,12 @@ function nc(o) {
8761
8761
  _.includes("width") && (t = !0), _.includes("length") && (e = !0), _.includes("height") && (i = !0);
8762
8762
  for (let y = 0; y < v.count; y++) {
8763
8763
  let x = v.getX(y), w = v.getY(y), A = v.getZ(y);
8764
- r = Math.max(w, r), p && g && p.forEach((I, M) => {
8765
- const C = g && g[M] || 0;
8766
- x += I.getX(y) * C, w += I.getY(y) * C, A += I.getZ(y) * C;
8764
+ r = Math.max(w, r), p && g && p.forEach((C, M) => {
8765
+ const R = g && g[M] || 0;
8766
+ x += C.getX(y) * R, w += C.getY(y) * R, A += C.getZ(y) * R;
8767
8767
  }), x < s && (s = x), w < a && (a = w), A < n && (n = A), x > c && (c = x), w > u && (u = w), A > f && (f = A);
8768
- const T = Math.sqrt(x * x + w * w);
8769
- T > d && (d = T);
8768
+ const S = Math.sqrt(x * x + w * w);
8769
+ S > d && (d = S);
8770
8770
  }
8771
8771
  }
8772
8772
  }), { box: new Y(new b(s, a, n), new b(c, u, f)), maxRadius: d, height: r, hasWidth: t, hasLength: e, hasHeight: i };
@@ -8812,7 +8812,7 @@ function lc() {
8812
8812
  }
8813
8813
  return !1;
8814
8814
  }
8815
- const cc = new Co(), Ft = new To(), Gi = new So();
8815
+ const cc = new Co(), Ft = new To(), qi = new So();
8816
8816
  let Dt = "./draco/";
8817
8817
  try {
8818
8818
  Dt = new URL("./draco/", import.meta.url).href;
@@ -8820,10 +8820,10 @@ try {
8820
8820
  Dt = "./draco/";
8821
8821
  }
8822
8822
  typeof window < "u" && window.dracoPath && (Dt = window.dracoPath);
8823
- Gi.setDecoderConfig({ type: "wasm" });
8824
- Gi.setDecoderPath(Dt.endsWith("/") ? Dt : `${Dt}/`);
8825
- Gi.preload();
8826
- Ft.setDRACOLoader(Gi);
8823
+ qi.setDecoderConfig({ type: "wasm" });
8824
+ qi.setDecoderPath(Dt.endsWith("/") ? Dt : `${Dt}/`);
8825
+ qi.preload();
8826
+ Ft.setDRACOLoader(qi);
8827
8827
  const Ih = new Mo(), zr = [115, 103, 108, 98];
8828
8828
  function Rh(o, e, t) {
8829
8829
  const i = JSON.stringify(e), s = new TextEncoder().encode(i), a = new Uint8Array([115, 103, 108, 98]), n = new Uint8Array(2);
@@ -8847,7 +8847,7 @@ function uc(o) {
8847
8847
  const s = new DataView(o, 4, 2).getUint16(0, !1), n = new DataView(o, 6, 4).getUint32(0, !1), c = new Uint8Array(o.slice(10, 10 + n)), u = new TextDecoder().decode(c), f = JSON.parse(u), d = o.slice(10 + n);
8848
8848
  return { version: s, jsonDescription: f, glbContent: d };
8849
8849
  }
8850
- class Rs {
8850
+ class Ds {
8851
8851
  constructor(e) {
8852
8852
  this.props = e, this.cache = /* @__PURE__ */ new Map();
8853
8853
  }
@@ -8915,7 +8915,7 @@ const hc = `*{box-sizing:border-box}.slot-item-container.is-mobile .main{pointer
8915
8915
  '"': "&quot;",
8916
8916
  "'": "&#39;"
8917
8917
  };
8918
- function Vt(o) {
8918
+ function Nt(o) {
8919
8919
  return o == null ? "" : String(o).replace(/[&<>"']/g, (e) => dc[e]);
8920
8920
  }
8921
8921
  function Hr(...o) {
@@ -9081,17 +9081,17 @@ class En extends HTMLElement {
9081
9081
  this._disable && "disable",
9082
9082
  this._filled && "filled"
9083
9083
  ), i = this._functions.map((r) => {
9084
- const l = Vt(r);
9084
+ const l = Nt(r);
9085
9085
  return `<div class="function" data-function="${l}"><span>${l}</span><i class="btn btn-remove" data-action="remove-function" data-function="${l}"></i></div>`;
9086
9086
  }).join(""), s = this._allFunctions.filter((r) => !this._functions.includes(r)), a = this._allFunctions.length ? `<div class="functions">${i}${`<div class="btn btn-add ${this.hasMoreFunctions ? "" : "btn-not-allowed"}" data-action="toggle-dialog">+添加</div>`}</div>` : "", n = s.length ? `<div class="all-functions ${this._showDialog ? "show" : ""}">
9087
9087
  <label>添加功能<i class="btn btn-close" data-action="toggle-dialog"></i></label>
9088
9088
  <div class="functions">
9089
9089
  ${s.map((r) => {
9090
- const l = Vt(r);
9090
+ const l = Nt(r);
9091
9091
  return `<div class="function"><span>${l}</span><i class="btn btn-add" data-action="add-function" data-function="${l}">+</i></div>`;
9092
9092
  }).join("")}
9093
9093
  </div>
9094
- </div>` : "", c = this._deviceLogo ? `<img class="device-logo" src="${Vt(this._deviceLogo)}" alt="device logo">` : "", u = Vt(((d = this._slot) == null ? void 0 : d.name) ?? this._props.name ?? ""), f = Vt(this._deviceName || "待安装");
9094
+ </div>` : "", c = this._deviceLogo ? `<img class="device-logo" src="${Nt(this._deviceLogo)}" alt="device logo">` : "", u = Nt(((d = this._slot) == null ? void 0 : d.name) ?? this._props.name ?? ""), f = Nt(this._deviceName || "待安装");
9095
9095
  this.shadowRoot.innerHTML = `
9096
9096
  <style>${hc}</style>
9097
9097
  <div class="${e}">
@@ -9222,12 +9222,12 @@ class Wr extends Ue {
9222
9222
  }
9223
9223
  }
9224
9224
  async loadGlb(e) {
9225
- const i = await new Rs({ useCache: !0 }).loadAsync(e);
9225
+ const i = await new Ds({ useCache: !0 }).loadAsync(e);
9226
9226
  if (i.glb)
9227
9227
  return i.glb.clone(!0);
9228
9228
  }
9229
9229
  async installBracket(e) {
9230
- const i = await new Rs({ useCache: !0 }).loadAsync(e);
9230
+ const i = await new Ds({ useCache: !0 }).loadAsync(e);
9231
9231
  if (!i.glb)
9232
9232
  return;
9233
9233
  const s = i.glb.clone(!0);
@@ -9427,13 +9427,13 @@ class pc extends Ue {
9427
9427
  }
9428
9428
  class Pi extends ge {
9429
9429
  constructor(e, t = !0, i = !0) {
9430
- super(), this._startWith = e, this._showText = t, this.useStartEnd = i, this._line2Length = 0.01, this._line = new ys(
9430
+ super(), this._startWith = e, this._showText = t, this.useStartEnd = i, this._line2Length = 0.01, this._line = new xs(
9431
9431
  new le(),
9432
9432
  new nr({
9433
9433
  color: "#666",
9434
9434
  linewidth: 2
9435
9435
  })
9436
- ), this._line2 = new ys(
9436
+ ), this._line2 = new xs(
9437
9437
  new le(),
9438
9438
  new nr({
9439
9439
  color: "#666",
@@ -9479,13 +9479,13 @@ class Pi extends ge {
9479
9479
  class Ln extends kt {
9480
9480
  // 上一次的角度
9481
9481
  constructor(e, t) {
9482
- super(), this.radius = e, this._text = new mc(""), this._line = new Pi(void 0, !1, !1), this._box = new X(), this._arc = new Io(), this._previousPosition = null, this._updateTimer = null, this._updateDelay = 300, this._accumulatedAngle = 0, this._lastAngle = null, this._line.updateMaterial(new xs({
9482
+ super(), this.radius = e, this._text = new mc(""), this._line = new Pi(void 0, !1, !1), this._box = new X(), this._arc = new Io(), this._previousPosition = null, this._updateTimer = null, this._updateDelay = 300, this._accumulatedAngle = 0, this._lastAngle = null, this._line.updateMaterial(new ws({
9483
9483
  color: "#555",
9484
9484
  dashSize: 0.06,
9485
9485
  gapSize: 0.06
9486
9486
  })), this._line.renderOrder = 0, this._box.geometry = new or(e, e + 3e-3, 128), this._box.material = new ri({
9487
9487
  color: "#666",
9488
- side: Hi
9488
+ side: Wi
9489
9489
  }), this._arc.geometry = new cr(), this._arc.geometry.setPositions([0, 0, 0, 0, 0, 0]), this._arc.geometry.instanceCount = 0, this._arc.material = new Ro({
9490
9490
  color: "#eee",
9491
9491
  linewidth: 2,
@@ -9505,7 +9505,7 @@ class Ln extends kt {
9505
9505
  }
9506
9506
  update(e) {
9507
9507
  var t;
9508
- this.radius = e, (t = this._box.geometry) == null || t.dispose(), this._box.geometry = new or(e, e + 3e-3, 128), this._line.updateMaterial(new xs({
9508
+ this.radius = e, (t = this._box.geometry) == null || t.dispose(), this._box.geometry = new or(e, e + 3e-3, 128), this._line.updateMaterial(new ws({
9509
9509
  color: "#555",
9510
9510
  dashSize: 0.06 * e,
9511
9511
  gapSize: 0.06 * e
@@ -9568,8 +9568,8 @@ class mc extends Ue {
9568
9568
  this._circle.style.background = e;
9569
9569
  }
9570
9570
  }
9571
- const gc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAUCAYAAADY6P5TAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEvSURBVFiFzZdbFYMwEEQroRKQgAQkVEIlICEOkFAJlRAJSIgEJNx+sPS0nGxIaOhyv3nM7mTmwOViDHAFesADD+BqrakKQAcMwMQ3AWis9e1C3HLASJoAdNZ6sxG3/MZQMZy1dhWgFbfWRzDGlFjAwFlyyXdh5OD5OIqykBgBy1yiF0aMUQaJugLclOcEoP3nULmFgQgeyCwOoJGBYrijByspDM98ZIszJAt8Ks8dag/VUFYYLtetjHdruRz5JZf8WBg1Ae7KcgOluaSsMAKJwqgJ6Vz2WzcvhZHjVlFh1ESG1DQ67SYtyGs8OwujNpTkUtw4nVtbyLK1XDafF3aKW90Z3EpBbi5lE0u9n3qoNTKk9rHh3heZqqwA8Vw6a11VkVwuPK31HALzb5pfovYC2xSs5LCDIUcAAAAASUVORK5CYII=", vc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAKCAYAAACngj4SAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAChSURBVDiNrdJbFYMwEIRhJFQCEpCAhEqIhDhBAlKQgAQkIOHrSziHpmkbLvua7P4zO9s0FYUeM0b0NT2nC9FnLQho7wQ9MOwgQ3K4ZPDrrtGmFcKKkL0HTAXXw2HX6HYuFnR/hMWC6ykX+W1AzJqq1abDGguux6LoPK9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Cxc17nHBrzJDhciS4fqplKY6gMYwIlW04NXFuxfV1LlHsBS+BrHWtJnSbWkVtLfknZVVW1zjQuYit4+1Ejain1oVARGBv4OKG74taSd2PiBn3oBsVb3Jmurw36yzzW2pSIwCuABciPpkwgQLNSZgIj7QZtrbOgQGAXyAGkk/aVux1mr23F2kr5J2rLzYMr8iKVah228UVc97CR9VbeNU0EUhsCYgNDCWqvbwRr/0VZdgOzEDoZChe230SEgpMP2uxUtpkkgMCbKDxds1LWxUpjsddgJW1HGY2Qn3tzUOrRYU/XAdjlRBMaMnAkR6bidtZPU8m4O7+VrDisdt06l43Boq6raZRkgBkdgzJyHSOoXx0X1Vl018l2HxUWCBEe8Yqj9tla3DaX7O3XbTmortVQO80ZgLFCYBFKQfAz39+omgr1obS2GL0KndlLaHtJjMRjSGwuqhgUiMHDkREWyCt+3OoRJqkxa8c6yeP66xttH/5pe3/S67tS9tjtJe4IBEYGBi4UwWek4TFLF0uplhbIPj+9peQ0vhMEqfP0Uvq91/Lq0IhTwGwgMDKb3Lnalw7vY9H0tDw4dqhPpUK1IIVy0wIDxduGpWy3pD70MhpWO/1/uJP2jEA5UfxgKgYFRhQmx1vGk99F/JT6WbvverfXf3aubHJM23E+/27//wqUT6htXPk1jTeoz9//Q6UCIf9/q5X/zd/WqNXGQAkZGYKB4YaLuf43300QsvZy8+9+/9fhrzoVP+8pjMdjiY0eBRiWA0v0fPGR4m68wwtkAAAAASUVORK5CYII=";
9572
- class Vr extends Ue {
9571
+ const gc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAUCAYAAADY6P5TAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEvSURBVFiFzZdbFYMwEEQroRKQgAQkVEIlICEOkFAJlRAJSIgEJNx+sPS0nGxIaOhyv3nM7mTmwOViDHAFesADD+BqrakKQAcMwMQ3AWis9e1C3HLASJoAdNZ6sxG3/MZQMZy1dhWgFbfWRzDGlFjAwFlyyXdh5OD5OIqykBgBy1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DKb3Lnalw7vY9H0tDw4dqhPpUK1IIVy0wIDxduGpWy3pD70MhpWO/1/uJP2jEA5UfxgKgYFRhQmx1vGk99F/JT6WbvverfXf3aubHJM23E+/27//wqUT6htXPk1jTeoz9//Q6UCIf9/q5X/zd/WqNXGQAkZGYKB4YaLuf43300QsvZy8+9+/9fhrzoVP+8pjMdjiY0eBRiWA0v0fPGR4m68wwtkAAAAASUVORK5CYII=";
9572
+ class Nr extends Ue {
9573
9573
  constructor(e, t) {
9574
9574
  const i = document.createElement("div");
9575
9575
  super(i), this.props = e, this.amr = t, this._direction = 1, this._controllingRotate = !1, this._controlling = !1, this._startAt = 0, this._looper = 0, this._initial = 0, this._canRotate = !1, this._emitter = new Bt(), this.addListener = this._emitter.addListener.bind(this._emitter), this.removeListener = this._emitter.removeListener.bind(this._emitter), this._update = () => {
@@ -9591,9 +9591,9 @@ class Vr extends Ue {
9591
9591
  c.name === e.userData.target.name && (this.mechanism = c);
9592
9592
  })), i.style.fontSize = "30px", i.style.color = "#0066FF", i.style.cursor = "pointer", i.style.pointerEvents = "auto";
9593
9593
  const a = document.createElement("div");
9594
- a.style.position = "absolute", a.style.left = "0", a.style.transform = "translateX(-50%) rotate(-180deg)", a.style.marginBottom = "5px", a.style.width = a.style.height = s ? "34px" : "44px", a.style.background = `url(${Nr}) center no-repeat`, a.style.backgroundSize = "100% auto", a.setAttribute("data-direction", "up"), a.style.transition = "all .2s";
9594
+ a.style.position = "absolute", a.style.left = "0", a.style.transform = "translateX(-50%) rotate(-180deg)", a.style.marginBottom = "5px", a.style.width = a.style.height = s ? "34px" : "44px", a.style.background = `url(${Vr}) center no-repeat`, a.style.backgroundSize = "100% auto", a.setAttribute("data-direction", "up"), a.style.transition = "all .2s";
9595
9595
  const n = document.createElement("div");
9596
- if (n.style.position = "absolute", n.style.left = "0", n.style.transform = "translateX(-50%)", a.style.bottom = n.style.top = "8px", n.style.width = n.style.height = a.style.width, n.style.background = `url(${Nr}) center no-repeat`, n.style.backgroundSize = "100% auto", n.style.transition = "all .2s", n.setAttribute("data-direction", "down"), Array.from([a, n]).forEach((c) => {
9596
+ if (n.style.position = "absolute", n.style.left = "0", n.style.transform = "translateX(-50%)", a.style.bottom = n.style.top = "8px", n.style.width = n.style.height = a.style.width, n.style.background = `url(${Vr}) center no-repeat`, n.style.backgroundSize = "100% auto", n.style.transition = "all .2s", n.setAttribute("data-direction", "down"), Array.from([a, n]).forEach((c) => {
9597
9597
  s || c.addEventListener("mousemove", () => {
9598
9598
  c.style.filter = "invert(100%)";
9599
9599
  }), c.addEventListener("mouseleave", () => {
@@ -9626,7 +9626,7 @@ class Vr extends Ue {
9626
9626
  return;
9627
9627
  p.style.filter = "invert(100%)", this._controllingRotate = !0, this._startAt = Date.now(), this._direction = p.getAttribute("data-direction") === "left" ? 1 : -1;
9628
9628
  let g = f / 180 * Math.PI * this._direction + l.rotation.z;
9629
- g > d / 180 * Math.PI ? g = d / 180 * Math.PI : g < r / 180 * Math.PI && (g = r / 180 * Math.PI), this._timer = new Xs(l.rotation).to({
9629
+ g > d / 180 * Math.PI ? g = d / 180 * Math.PI : g < r / 180 * Math.PI && (g = r / 180 * Math.PI), this._timer = new Bi(l.rotation).to({
9630
9630
  z: g
9631
9631
  }).duration(u).start(), this._update();
9632
9632
  }), p.addEventListener("pointerup", () => {
@@ -9787,11 +9787,11 @@ class Gr extends kt {
9787
9787
  })
9788
9788
  );
9789
9789
  s.geometry.translate(0, 0, i / 2);
9790
- const a = new ro(s.geometry), n = new xs({
9790
+ const a = new ro(s.geometry), n = new ws({
9791
9791
  color: new J("#000"),
9792
9792
  dashSize: 0.015,
9793
9793
  gapSize: 0.015
9794
- }), c = new ys(a, n);
9794
+ }), c = new xs(a, n);
9795
9795
  c.computeLineDistances(), this.add(s, c);
9796
9796
  }
9797
9797
  }
@@ -9855,7 +9855,7 @@ const Fn = new dn();
9855
9855
  Fn.crossOrigin = "anonymous";
9856
9856
  class Ac extends kt {
9857
9857
  constructor(e) {
9858
- super(), this._props = e, this._emitter = new Bt(), this.addEventListener = this._emitter.addListener.bind(this._emitter), this._container = new ge(), this.lines = new ge(), this._clips = [], this._actionsMap = /* @__PURE__ */ new Map(), this._animationClock = new Wi(), this.sizeBox = new xc(), this._goodsSize = new ac(0, 0, 0), this._slots = [], this._logos = [], this._skins = [], this._levels = /* @__PURE__ */ new Map(), this._bodyOpacity = 1, this._masts = /* @__PURE__ */ new Map(), this._liftMaxHeight = 0, this._jackMaxHeight = 0, this._forkMaxHeight = 0, this.controllers = [], this.goods = [], this._breathLights = [], this._shelves = /* @__PURE__ */ new Map(), this._shelfMaxLevel = 1, this._url = "", this._showController = !0, this._showSlots = !0, this._shapeKeys = /* @__PURE__ */ new Map(), this._shapeKeyTargets = /* @__PURE__ */ new Map(), this._shapeKeyTimer = 0, this._shapeKeyCache = "", this._materialsCache = /* @__PURE__ */ new Map(), this.opacityCache = void 0, this.actions = [], this._url = e.url || "", this._url && this.load(this._url).then(), this.add(this._container, this.lines), this._props.showSizeBox && this.add(this.sizeBox), this.showController = typeof e.showController == "boolean" ? e.showController : !0, this._showSlots = typeof e.showSlots == "boolean" ? e.showSlots : !0;
9858
+ super(), this._props = e, this._emitter = new Bt(), this.addEventListener = this._emitter.addListener.bind(this._emitter), this._container = new ge(), this.lines = new ge(), this._clips = [], this._actionsMap = /* @__PURE__ */ new Map(), this._animationClock = new Vi(), this.sizeBox = new xc(), this._goodsSize = new ac(0, 0, 0), this._slots = [], this._logos = [], this._skins = [], this._levels = /* @__PURE__ */ new Map(), this._bodyOpacity = 1, this._masts = /* @__PURE__ */ new Map(), this._liftMaxHeight = 0, this._jackMaxHeight = 0, this._forkMaxHeight = 0, this.controllers = [], this.goods = [], this._breathLights = [], this._shelves = /* @__PURE__ */ new Map(), this._shelfMaxLevel = 1, this._url = "", this._showController = !0, this._showSlots = !0, this._shapeKeys = /* @__PURE__ */ new Map(), this._shapeKeyTargets = /* @__PURE__ */ new Map(), this._shapeKeyTimer = 0, this._shapeKeyCache = "", this._materialsCache = /* @__PURE__ */ new Map(), this.opacityCache = void 0, this.actions = [], this._url = e.url || "", this._url && this.load(this._url).then(), this.add(this._container, this.lines), this._props.showSizeBox && this.add(this.sizeBox), this.showController = typeof e.showController == "boolean" ? e.showController : !0, this._showSlots = typeof e.showSlots == "boolean" ? e.showSlots : !0;
9859
9859
  }
9860
9860
  get shapeKeys() {
9861
9861
  return this._shapeKeys;
@@ -9963,13 +9963,13 @@ class Ac extends kt {
9963
9963
  (!a || !n) && console.warn("[Amr.loadAnimation] 在动画或目标模型中未找到 SkinnedMesh,使用原始动画 clip", e), this._mixer || (this._mixer = new ar(this._modelRoot));
9964
9964
  const c = (
9965
9965
  // @ts-ignore SkeletonUtils 可能没有类型定义
9966
- typeof Yi.retargetClip == "function"
9966
+ typeof Zi.retargetClip == "function"
9967
9967
  );
9968
9968
  i.forEach((u) => {
9969
9969
  let f = u;
9970
9970
  if (c && a && n)
9971
9971
  try {
9972
- f = Yi.retargetClip(
9972
+ f = Zi.retargetClip(
9973
9973
  n,
9974
9974
  a,
9975
9975
  u
@@ -9989,12 +9989,12 @@ class Ac extends kt {
9989
9989
  let n = await Ft.loadAsync(e);
9990
9990
  i = n.scene, s = n.animations || [];
9991
9991
  } else {
9992
- const c = await new Rs({ useCache: !0 }).loadAsync(e);
9992
+ const c = await new Ds({ useCache: !0 }).loadAsync(e);
9993
9993
  if (!c.glb)
9994
9994
  return;
9995
9995
  i = c.glb;
9996
9996
  }
9997
- const a = Yi.clone(i);
9997
+ const a = Zi.clone(i);
9998
9998
  this._generateAmr(a, s), i = null, this._emitter.emit("amr-loaded");
9999
9999
  }
10000
10000
  changeSkin(e, t) {
@@ -10044,7 +10044,7 @@ class Ac extends kt {
10044
10044
  else {
10045
10045
  if (i.material.userData.isBreathLight && i.material.emissiveIntensity) {
10046
10046
  i.material.emissive || (i.material.emissive = new J(16777215)), i.material.emissiveIntensity = 2, i.material.toneMapped = !1;
10047
- const a = 1e3, n = new ct.Tween(i.material).to({ emissiveIntensity: 0.2 }).easing(ct.Easing.Quintic.InOut).duration(a), c = new ct.Tween(i.material).to({ emissiveIntensity: 2 }).easing(ct.Easing.Quintic.InOut).duration(a);
10047
+ const a = 1e3, n = new Je.Tween(i.material).to({ emissiveIntensity: 0.2 }).easing(Je.Easing.Quintic.InOut).duration(a), c = new Je.Tween(i.material).to({ emissiveIntensity: 2 }).easing(Je.Easing.Quintic.InOut).duration(a);
10048
10048
  n.onComplete(() => c.start()), c.onComplete(() => n.start()), n.start(), this._breathLights.push(n, c);
10049
10049
  }
10050
10050
  i.material.userData.changeColor && (this.skins.find((a) => a.name === i.material.userData.name) || this.skins.push(new nn({
@@ -10249,7 +10249,7 @@ class Ac extends kt {
10249
10249
  u.name === i && (n = u);
10250
10250
  }), !n)
10251
10251
  return;
10252
- const c = new Vr({
10252
+ const c = new Nr({
10253
10253
  name: "",
10254
10254
  target: i,
10255
10255
  default: 0,
@@ -10264,7 +10264,7 @@ class Ac extends kt {
10264
10264
  u.name === i && (n = u);
10265
10265
  }), !n)
10266
10266
  return;
10267
- const c = new Vr({
10267
+ const c = new Nr({
10268
10268
  name: "",
10269
10269
  userData: e.userData,
10270
10270
  target: e.userData.key,
@@ -10382,7 +10382,7 @@ class Ac extends kt {
10382
10382
  t && (t.paused = !0);
10383
10383
  }
10384
10384
  }
10385
- const kn = 0, Tc = 1, Sc = 2, jr = 2, ns = 1.25, Qr = 1, ti = 6 * 4 + 4 + 4, qi = 65535, Mc = Math.pow(2, -24), os = Symbol("SKIP_GENERATION");
10385
+ const kn = 0, Tc = 1, Sc = 2, jr = 2, os = 1.25, Qr = 1, ti = 6 * 4 + 4 + 4, ji = 65535, Mc = Math.pow(2, -24), as = Symbol("SKIP_GENERATION");
10386
10386
  function Cc(o) {
10387
10387
  return o.index ? o.index.count : o.attributes.position.count;
10388
10388
  }
@@ -10433,15 +10433,15 @@ function Dc(o) {
10433
10433
  let s = 0;
10434
10434
  return t.forEach(({ count: a }) => s += a), e !== s;
10435
10435
  }
10436
- function as(o, e, t, i, s) {
10436
+ function ls(o, e, t, i, s) {
10437
10437
  let a = 1 / 0, n = 1 / 0, c = 1 / 0, u = -1 / 0, f = -1 / 0, d = -1 / 0, r = 1 / 0, l = 1 / 0, h = 1 / 0, m = -1 / 0, v = -1 / 0, p = -1 / 0;
10438
10438
  for (let g = e * 6, _ = (e + t) * 6; g < _; g += 6) {
10439
10439
  const y = o[g + 0], x = o[g + 1], w = y - x, A = y + x;
10440
10440
  w < a && (a = w), A > u && (u = A), y < r && (r = y), y > m && (m = y);
10441
- const T = o[g + 2], I = o[g + 3], M = T - I, C = T + I;
10442
- M < n && (n = M), C > f && (f = C), T < l && (l = T), T > v && (v = T);
10443
- const D = o[g + 4], S = o[g + 5], R = D - S, P = D + S;
10444
- R < c && (c = R), P > d && (d = P), D < h && (h = D), D > p && (p = D);
10441
+ const S = o[g + 2], C = o[g + 3], M = S - C, R = S + C;
10442
+ M < n && (n = M), R > f && (f = R), S < l && (l = S), S > v && (v = S);
10443
+ const D = o[g + 4], T = o[g + 5], I = D - T, P = D + T;
10444
+ I < c && (c = I), P > d && (d = P), D < h && (h = D), D > p && (p = D);
10445
10445
  }
10446
10446
  i[0] = a, i[1] = n, 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;
10447
10447
  }
@@ -10460,12 +10460,12 @@ function Pc(o, e = null, t = null, i = null) {
10460
10460
  for (let y = 0; y < 3; y++) {
10461
10461
  let x, w, A;
10462
10462
  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]);
10463
- let T = x;
10464
- w < T && (T = w), A < T && (T = A);
10465
- let I = x;
10466
- w > I && (I = w), A > I && (I = A);
10467
- const M = (I - T) / 2, C = y * 2;
10468
- u[v + C + 0] = T + M, u[v + C + 1] = M + (Math.abs(T) + M) * Mc;
10463
+ let S = x;
10464
+ w < S && (S = w), A < S && (S = A);
10465
+ let C = x;
10466
+ w > C && (C = w), A > C && (C = A);
10467
+ const M = (C - S) / 2, R = y * 2;
10468
+ u[v + R + 0] = S + M, u[v + R + 1] = M + (Math.abs(S) + M) * Mc;
10469
10469
  }
10470
10470
  }
10471
10471
  return u;
@@ -10516,7 +10516,7 @@ function Lc(o, e, t, i, s, a) {
10516
10516
  n = Yr(o), n !== -1 && (c = Fc(t, i, s, n));
10517
10517
  else if (a === Sc) {
10518
10518
  const u = Gt(o);
10519
- let f = ns * s;
10519
+ let f = os * s;
10520
10520
  const d = i * 6, r = (i + s) * 6;
10521
10521
  for (let l = 0; l < 3; l++) {
10522
10522
  const h = e[l], p = (e[l + 3] - h) / Pe;
@@ -10529,11 +10529,11 @@ function Lc(o, e, t, i, s, a) {
10529
10529
  w.candidate = t[x + 2 * l], w.count = 0;
10530
10530
  const {
10531
10531
  bounds: A,
10532
- leftCacheBounds: T,
10533
- rightCacheBounds: I
10532
+ leftCacheBounds: S,
10533
+ rightCacheBounds: C
10534
10534
  } = w;
10535
10535
  for (let M = 0; M < 3; M++)
10536
- I[M] = 1 / 0, I[M + 3] = -1 / 0, T[M] = 1 / 0, T[M + 3] = -1 / 0, A[M] = 1 / 0, A[M + 3] = -1 / 0;
10536
+ C[M] = 1 / 0, C[M + 3] = -1 / 0, S[M] = 1 / 0, S[M + 3] = -1 / 0, A[M] = 1 / 0, A[M + 3] = -1 / 0;
10537
10537
  gi(x, t, A);
10538
10538
  }
10539
10539
  g.sort(Ec);
@@ -10546,18 +10546,18 @@ function Lc(o, e, t, i, s, a) {
10546
10546
  for (let x = d; x < r; x += 6) {
10547
10547
  const w = t[x + 2 * l];
10548
10548
  for (let A = 0; A < y; A++) {
10549
- const T = g[A];
10550
- w >= T.candidate ? gi(x, t, T.rightCacheBounds) : (gi(x, t, T.leftCacheBounds), T.count++);
10549
+ const S = g[A];
10550
+ w >= S.candidate ? gi(x, t, S.rightCacheBounds) : (gi(x, t, S.leftCacheBounds), S.count++);
10551
10551
  }
10552
10552
  }
10553
10553
  for (let x = 0; x < y; x++) {
10554
- const w = g[x], A = w.count, T = s - w.count, I = w.leftCacheBounds, M = w.rightCacheBounds;
10555
- let C = 0;
10556
- A !== 0 && (C = Gt(I) / u);
10554
+ const w = g[x], A = w.count, S = s - w.count, C = w.leftCacheBounds, M = w.rightCacheBounds;
10555
+ let R = 0;
10556
+ A !== 0 && (R = Gt(C) / u);
10557
10557
  let D = 0;
10558
- T !== 0 && (D = Gt(M) / u);
10559
- const S = Qr + ns * (C * A + D * T);
10560
- S < f && (n = l, f = S, c = w.candidate);
10558
+ S !== 0 && (D = Gt(M) / u);
10559
+ const T = Qr + os * (R * A + D * S);
10560
+ T < f && (n = l, f = T, c = w.candidate);
10561
10561
  }
10562
10562
  } else {
10563
10563
  for (let y = 0; y < Pe; y++) {
@@ -10570,8 +10570,8 @@ function Lc(o, e, t, i, s, a) {
10570
10570
  for (let y = d; y < r; y += 6) {
10571
10571
  let A = ~~((t[y + 2 * l] - h) / p);
10572
10572
  A >= Pe && (A = Pe - 1);
10573
- const T = je[A];
10574
- T.count++, gi(y, t, T.bounds);
10573
+ const S = je[A];
10574
+ S.count++, gi(y, t, S.bounds);
10575
10575
  }
10576
10576
  const g = je[Pe - 1];
10577
10577
  Zr(g.bounds, g.rightCacheBounds);
@@ -10581,14 +10581,14 @@ function Lc(o, e, t, i, s, a) {
10581
10581
  }
10582
10582
  let _ = 0;
10583
10583
  for (let y = 0; y < Pe - 1; y++) {
10584
- const x = je[y], w = x.count, A = x.bounds, I = je[y + 1].rightCacheBounds;
10584
+ const x = je[y], w = x.count, A = x.bounds, C = je[y + 1].rightCacheBounds;
10585
10585
  w !== 0 && (_ === 0 ? Zr(A, vi) : Xr(A, vi, vi)), _ += w;
10586
- let M = 0, C = 0;
10586
+ let M = 0, R = 0;
10587
10587
  _ !== 0 && (M = Gt(vi) / u);
10588
10588
  const D = s - _;
10589
- D !== 0 && (C = Gt(I) / u);
10590
- const S = Qr + ns * (M * _ + C * D);
10591
- S < f && (n = l, f = S, c = x.candidate);
10589
+ D !== 0 && (R = Gt(C) / u);
10590
+ const T = Qr + os * (M * _ + R * D);
10591
+ T < f && (n = l, f = T, c = x.candidate);
10592
10592
  }
10593
10593
  }
10594
10594
  }
@@ -10602,7 +10602,7 @@ function Fc(o, e, t, i) {
10602
10602
  s += o[a * 6 + i * 2];
10603
10603
  return s / t;
10604
10604
  }
10605
- class ls {
10605
+ class cs {
10606
10606
  constructor() {
10607
10607
  this.boundingData = new Float32Array(6);
10608
10608
  }
@@ -10669,13 +10669,13 @@ function zn(o, e) {
10669
10669
  }
10670
10670
  let Un, Jt, Ei, Hn;
10671
10671
  const Oc = Math.pow(2, 32);
10672
- function Ds(o) {
10673
- return "count" in o ? 1 : 1 + Ds(o.left) + Ds(o.right);
10672
+ function Ps(o) {
10673
+ return "count" in o ? 1 : 1 + Ps(o.left) + Ps(o.right);
10674
10674
  }
10675
10675
  function zc(o, e, t) {
10676
- return Un = new Float32Array(t), Jt = new Uint32Array(t), Ei = new Uint16Array(t), Hn = new Uint8Array(t), Ps(o, e);
10676
+ return Un = new Float32Array(t), Jt = new Uint32Array(t), Ei = new Uint16Array(t), Hn = new Uint8Array(t), Es(o, e);
10677
10677
  }
10678
- function Ps(o, e) {
10678
+ function Es(o, e) {
10679
10679
  const t = o / 4, i = o / 2, s = "count" in e, a = e.boundingData;
10680
10680
  for (let n = 0; n < 6; n++)
10681
10681
  Un[t + n] = a[n];
@@ -10690,14 +10690,14 @@ function Ps(o, e) {
10690
10690
  return o + n.byteLength;
10691
10691
  } else {
10692
10692
  const n = e.offset, c = e.count;
10693
- return Jt[t + 6] = n, Ei[i + 14] = c, Ei[i + 15] = qi, o + ti;
10693
+ return Jt[t + 6] = n, Ei[i + 14] = c, Ei[i + 15] = ji, o + ti;
10694
10694
  }
10695
10695
  else {
10696
10696
  const n = e.left, c = e.right, u = e.splitAxis;
10697
10697
  let f;
10698
- if (f = Ps(o + ti, n), f / 4 > Oc)
10698
+ if (f = Es(o + ti, n), f / 4 > Oc)
10699
10699
  throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");
10700
- return Jt[t + 6] = f / 4, f = Ps(f, c), Jt[t + 7] = u, f;
10700
+ return Jt[t + 6] = f / 4, f = Es(f, c), Jt[t + 7] = u, f;
10701
10701
  }
10702
10702
  }
10703
10703
  function Uc(o, e) {
@@ -10716,26 +10716,26 @@ function Hc(o, e, t, i, s) {
10716
10716
  indirect: d
10717
10717
  } = s, r = o._indirectBuffer, l = o.geometry, h = l.index ? l.index.array : null, m = d ? Bc : kc, v = Ot(l), p = new Float32Array(6);
10718
10718
  let g = !1;
10719
- const _ = new ls();
10720
- return as(e, t, i, _.boundingData, p), x(_, t, i, p), _;
10719
+ const _ = new cs();
10720
+ return ls(e, t, i, _.boundingData, p), x(_, t, i, p), _;
10721
10721
  function y(w) {
10722
10722
  f && f(w / v);
10723
10723
  }
10724
- function x(w, A, T, I = null, M = 0) {
10725
- if (!g && M >= a && (g = !0, n && (console.warn(`MeshBVH: Max depth of ${a} reached when generating BVH. Consider increasing maxDepth.`), console.warn(l))), T <= c || M >= a)
10726
- return y(A + T), w.offset = A, w.count = T, w;
10727
- const C = Lc(w.boundingData, I, e, A, T, u);
10728
- if (C.axis === -1)
10729
- return y(A + T), w.offset = A, w.count = T, w;
10730
- const D = m(r, h, e, A, T, C);
10731
- if (D === A || D === A + T)
10732
- y(A + T), w.offset = A, w.count = T;
10724
+ function x(w, A, S, C = null, M = 0) {
10725
+ if (!g && M >= a && (g = !0, n && (console.warn(`MeshBVH: Max depth of ${a} reached when generating BVH. Consider increasing maxDepth.`), console.warn(l))), S <= c || M >= a)
10726
+ return y(A + S), w.offset = A, w.count = S, w;
10727
+ const R = Lc(w.boundingData, C, e, A, S, u);
10728
+ if (R.axis === -1)
10729
+ return y(A + S), w.offset = A, w.count = S, w;
10730
+ const D = m(r, h, e, A, S, R);
10731
+ if (D === A || D === A + S)
10732
+ y(A + S), w.offset = A, w.count = S;
10733
10733
  else {
10734
- w.splitAxis = C.axis;
10735
- const S = new ls(), R = A, P = D - A;
10736
- w.left = S, as(e, R, P, S.boundingData, p), x(S, R, P, p, M + 1);
10737
- const L = new ls(), F = D, U = T - P;
10738
- w.right = L, as(e, F, U, L.boundingData, p), x(L, F, U, p, M + 1);
10734
+ w.splitAxis = R.axis;
10735
+ const T = new cs(), I = A, P = D - A;
10736
+ w.left = T, ls(e, I, P, T.boundingData, p), x(T, I, P, p, M + 1);
10737
+ const L = new cs(), F = D, U = S - P;
10738
+ w.right = L, ls(e, F, U, L.boundingData, p), x(L, F, U, p, M + 1);
10739
10739
  }
10740
10740
  return w;
10741
10741
  }
@@ -10747,11 +10747,11 @@ function Wc(o, e) {
10747
10747
  )), o._indirectBuffer || Rc(t, e);
10748
10748
  const i = e.useSharedArrayBuffer ? SharedArrayBuffer : ArrayBuffer, s = Pc(t), a = e.indirect ? Bn(t) : On(t);
10749
10749
  o._roots = a.map((n) => {
10750
- const c = Hc(o, s, n.offset, n.count, e), u = Ds(c), f = new i(ti * u);
10750
+ const c = Hc(o, s, n.offset, n.count, e), u = Ps(c), f = new i(ti * u);
10751
10751
  return zc(0, c, f), f;
10752
10752
  });
10753
10753
  }
10754
- class Ne {
10754
+ class Ve {
10755
10755
  constructor() {
10756
10756
  this.min = 1 / 0, this.max = -1 / 0;
10757
10757
  }
@@ -10775,7 +10775,7 @@ class Ne {
10775
10775
  return this.min > e.max || e.min > this.max;
10776
10776
  }
10777
10777
  }
10778
- Ne.prototype.setFromBox = function() {
10778
+ Ve.prototype.setFromBox = function() {
10779
10779
  const o = new b();
10780
10780
  return function(t, i) {
10781
10781
  const s = i.min, a = i.max;
@@ -10790,7 +10790,7 @@ Ne.prototype.setFromBox = function() {
10790
10790
  this.min = n, this.max = c;
10791
10791
  };
10792
10792
  }();
10793
- const Nc = function() {
10793
+ const Vc = function() {
10794
10794
  const o = new b(), e = new b(), t = new b();
10795
10795
  return function(s, a, n) {
10796
10796
  const c = s.start, u = o, f = a.start, d = e;
@@ -10802,7 +10802,7 @@ const Nc = function() {
10802
10802
  }(), Js = function() {
10803
10803
  const o = new z(), e = new b(), t = new b();
10804
10804
  return function(s, a, n, c) {
10805
- Nc(s, a, o);
10805
+ Vc(s, a, o);
10806
10806
  let u = o.x, f = o.y;
10807
10807
  if (u >= 0 && u <= 1 && f >= 0 && f <= 1) {
10808
10808
  s.at(u, n), a.at(f, c);
@@ -10828,7 +10828,7 @@ const Nc = function() {
10828
10828
  }
10829
10829
  }
10830
10830
  };
10831
- }(), Vc = function() {
10831
+ }(), Nc = function() {
10832
10832
  const o = new b(), e = new b(), t = new Ns(), i = new ze();
10833
10833
  return function(a, n) {
10834
10834
  const { radius: c, center: u } = a, { a: f, b: d, c: r } = n;
@@ -10843,15 +10843,15 @@ const Nc = function() {
10843
10843
  return !1;
10844
10844
  };
10845
10845
  }(), Gc = 1e-15;
10846
- function cs(o) {
10846
+ function us(o) {
10847
10847
  return Math.abs(o) < Gc;
10848
10848
  }
10849
10849
  class Ce extends Xt {
10850
10850
  constructor(...e) {
10851
- super(...e), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new b()), this.satBounds = new Array(4).fill().map(() => new Ne()), this.points = [this.a, this.b, this.c], this.sphere = new Ni(), this.plane = new Ns(), this.needsUpdate = !0;
10851
+ super(...e), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new b()), this.satBounds = new Array(4).fill().map(() => new Ve()), this.points = [this.a, this.b, this.c], this.sphere = new Ni(), this.plane = new Ns(), this.needsUpdate = !0;
10852
10852
  }
10853
10853
  intersectsSphere(e) {
10854
- return Vc(e, this);
10854
+ return Nc(e, this);
10855
10855
  }
10856
10856
  update() {
10857
10857
  const e = this.a, t = this.b, i = this.c, s = this.points, a = this.satAxes, n = this.satBounds, c = a[0], u = n[0];
@@ -10877,22 +10877,22 @@ Ce.prototype.closestPointToSegment = function() {
10877
10877
  };
10878
10878
  }();
10879
10879
  Ce.prototype.intersectsTriangle = function() {
10880
- const o = new Ce(), e = new Array(3), t = new Array(3), i = new Ne(), s = new Ne(), a = new b(), n = new b(), c = new b(), u = new b(), f = new b(), d = new ze(), r = new ze(), l = new ze(), h = new b();
10880
+ const o = new Ce(), e = new Array(3), t = new Array(3), i = new Ve(), s = new Ve(), a = new b(), n = new b(), c = new b(), u = new b(), f = new b(), d = new ze(), r = new ze(), l = new ze(), h = new b();
10881
10881
  function m(v, p, g) {
10882
10882
  const _ = v.points;
10883
10883
  let y = 0, x = -1;
10884
10884
  for (let w = 0; w < 3; w++) {
10885
- const { start: A, end: T } = d;
10886
- A.copy(_[w]), T.copy(_[(w + 1) % 3]), d.delta(n);
10887
- const I = cs(p.distanceToPoint(A));
10888
- if (cs(p.normal.dot(n)) && I) {
10885
+ const { start: A, end: S } = d;
10886
+ A.copy(_[w]), S.copy(_[(w + 1) % 3]), d.delta(n);
10887
+ const C = us(p.distanceToPoint(A));
10888
+ if (us(p.normal.dot(n)) && C) {
10889
10889
  g.copy(d), y = 2;
10890
10890
  break;
10891
10891
  }
10892
10892
  const M = p.intersectLine(d, h);
10893
- if (!M && I && h.copy(A), (M || I) && !cs(h.distanceTo(T))) {
10893
+ if (!M && C && h.copy(A), (M || C) && !us(h.distanceTo(S))) {
10894
10894
  if (y <= 1)
10895
- (y === 1 ? g.start : g.end).copy(h), I && (x = y);
10895
+ (y === 1 ? g.start : g.end).copy(h), C && (x = y);
10896
10896
  else if (y >= 2) {
10897
10897
  (x === 1 ? g.start : g.end).copy(h), y = 2;
10898
10898
  break;
@@ -10910,22 +10910,22 @@ Ce.prototype.intersectsTriangle = function() {
10910
10910
  const w = this.satBounds, A = this.satAxes;
10911
10911
  t[0] = p.a, t[1] = p.b, t[2] = p.c;
10912
10912
  for (let M = 0; M < 4; M++) {
10913
- const C = w[M], D = A[M];
10914
- if (i.setFromPoints(D, t), C.isSeparated(i))
10913
+ const R = w[M], D = A[M];
10914
+ if (i.setFromPoints(D, t), R.isSeparated(i))
10915
10915
  return !1;
10916
10916
  }
10917
- const T = p.satBounds, I = p.satAxes;
10917
+ const S = p.satBounds, C = p.satAxes;
10918
10918
  e[0] = this.a, e[1] = this.b, e[2] = this.c;
10919
10919
  for (let M = 0; M < 4; M++) {
10920
- const C = T[M], D = I[M];
10921
- if (i.setFromPoints(D, e), C.isSeparated(i))
10920
+ const R = S[M], D = C[M];
10921
+ if (i.setFromPoints(D, e), R.isSeparated(i))
10922
10922
  return !1;
10923
10923
  }
10924
10924
  for (let M = 0; M < 4; M++) {
10925
- const C = A[M];
10925
+ const R = A[M];
10926
10926
  for (let D = 0; D < 4; D++) {
10927
- const S = I[D];
10928
- if (a.crossVectors(C, S), i.setFromPoints(a, e), s.setFromPoints(a, t), i.isSeparated(s))
10927
+ const T = C[D];
10928
+ if (a.crossVectors(R, T), i.setFromPoints(a, e), s.setFromPoints(a, t), i.isSeparated(s))
10929
10929
  return !1;
10930
10930
  }
10931
10931
  }
@@ -10942,11 +10942,11 @@ Ce.prototype.intersectsTriangle = function() {
10942
10942
  if (A !== 2)
10943
10943
  return !1;
10944
10944
  if (r.delta(c), l.delta(u), c.dot(u) < 0) {
10945
- let R = l.start;
10946
- l.start = l.end, l.end = R;
10945
+ let I = l.start;
10946
+ l.start = l.end, l.end = I;
10947
10947
  }
10948
- const T = r.start.dot(c), I = r.end.dot(c), M = l.start.dot(c), C = l.end.dot(c), D = I < M, S = T < C;
10949
- return T !== C && M !== 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);
10948
+ const S = r.start.dot(c), C = r.end.dot(c), M = l.start.dot(c), R = l.end.dot(c), D = C < M, T = S < R;
10949
+ return S !== R && M !== C && D === 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);
10950
10950
  }
10951
10951
  };
10952
10952
  }();
@@ -10985,7 +10985,7 @@ Ce.prototype.distanceToTriangle = function() {
10985
10985
  }();
10986
10986
  class re {
10987
10987
  constructor(e, t, i) {
10988
- this.isOrientedBox = !0, this.min = new b(), this.max = new b(), this.matrix = new K(), this.invMatrix = new K(), 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 Ne()), this.alignedSatBounds = new Array(3).fill().map(() => new Ne()), this.needsUpdate = !1, e && this.min.copy(e), t && this.max.copy(t), i && this.matrix.copy(i);
10988
+ this.isOrientedBox = !0, this.min = new b(), this.max = new b(), this.matrix = new K(), this.invMatrix = new K(), 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 Ve()), this.alignedSatBounds = new Array(3).fill().map(() => new Ve()), this.needsUpdate = !1, e && this.min.copy(e), t && this.max.copy(t), i && this.matrix.copy(i);
10989
10989
  }
10990
10990
  set(e, t, i) {
10991
10991
  this.min.copy(e), this.max.copy(t), this.matrix.copy(i), this.needsUpdate = !0;
@@ -11013,7 +11013,7 @@ re.prototype.update = /* @__PURE__ */ function() {
11013
11013
  };
11014
11014
  }();
11015
11015
  re.prototype.intersectsBox = function() {
11016
- const o = new Ne();
11016
+ const o = new Ve();
11017
11017
  return function(t) {
11018
11018
  this.needsUpdate && this.update();
11019
11019
  const i = t.min, s = t.max, a = this.satBounds, n = this.satAxes, c = this.alignedSatBounds;
@@ -11028,7 +11028,7 @@ re.prototype.intersectsBox = function() {
11028
11028
  };
11029
11029
  }();
11030
11030
  re.prototype.intersectsTriangle = function() {
11031
- const o = new Ce(), e = new Array(3), t = new Ne(), i = new Ne(), s = new b();
11031
+ const o = new Ce(), e = new Array(3), t = new Ve(), i = new Ve(), s = new b();
11032
11032
  return function(n) {
11033
11033
  this.needsUpdate && this.update(), n.isExtendedTriangle ? n.needsUpdate && n.update() : (o.copy(n), o.update(), n = o);
11034
11034
  const c = this.satBounds, u = this.satAxes;
@@ -11084,10 +11084,10 @@ re.prototype.distanceToBox = function() {
11084
11084
  for (let p = 0; p < 3; p++)
11085
11085
  for (let g = 0; g <= 1; g++)
11086
11086
  for (let _ = 0; _ <= 1; _++) {
11087
- 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];
11088
- e[v].set(T, I);
11089
- const C = o[p], D = o[y], S = o[x], R = t[v], P = R.start, L = R.end;
11090
- P[C] = r[C], P[D] = g ? r[D] : l[D], P[S] = _ ? r[S] : l[D], L[C] = l[C], L[D] = g ? r[D] : l[D], L[S] = _ ? r[S] : l[D], v++;
11087
+ const y = (p + 1) % 3, x = (p + 2) % 3, w = g << y | _ << x, A = 1 << p | g << y | _ << x, S = h[w], C = h[A];
11088
+ e[v].set(S, C);
11089
+ const R = o[p], D = o[y], T = o[x], I = t[v], P = I.start, L = I.end;
11090
+ P[R] = r[R], P[D] = g ? r[D] : l[D], P[T] = _ ? r[T] : l[D], L[R] = l[R], L[D] = g ? r[D] : l[D], L[T] = _ ? r[T] : l[D], v++;
11091
11091
  }
11092
11092
  for (let p = 0; p <= 1; p++)
11093
11093
  for (let g = 0; g <= 1; g++)
@@ -11140,51 +11140,51 @@ class jc {
11140
11140
  };
11141
11141
  }
11142
11142
  }
11143
- const V = new jc();
11144
- let Je, It;
11143
+ const N = new jc();
11144
+ let $e, It;
11145
11145
  const mt = [], _i = /* @__PURE__ */ new $s(() => new Y());
11146
11146
  function Qc(o, e, t, i, s, a) {
11147
- Je = _i.getPrimitive(), It = _i.getPrimitive(), mt.push(Je, It), V.setBuffer(o._roots[e]);
11148
- const n = Es(0, o.geometry, t, i, s, a);
11149
- V.clearBuffer(), _i.releasePrimitive(Je), _i.releasePrimitive(It), mt.pop(), mt.pop();
11147
+ $e = _i.getPrimitive(), It = _i.getPrimitive(), mt.push($e, It), N.setBuffer(o._roots[e]);
11148
+ const n = Ls(0, o.geometry, t, i, s, a);
11149
+ N.clearBuffer(), _i.releasePrimitive($e), _i.releasePrimitive(It), mt.pop(), mt.pop();
11150
11150
  const c = mt.length;
11151
- return c > 0 && (It = mt[c - 1], Je = mt[c - 2]), n;
11151
+ return c > 0 && (It = mt[c - 1], $e = mt[c - 2]), n;
11152
11152
  }
11153
- function Es(o, e, t, i, s = null, a = 0, n = 0) {
11154
- const { float32Array: c, uint16Array: u, uint32Array: f } = V;
11153
+ function Ls(o, e, t, i, s = null, a = 0, n = 0) {
11154
+ const { float32Array: c, uint16Array: u, uint32Array: f } = N;
11155
11155
  let d = o * 2;
11156
11156
  if (ae(d, u)) {
11157
11157
  const l = de(o, f), h = ve(d, u);
11158
- return j(o, c, Je), i(l, h, !1, n, a + o, Je);
11158
+ return j(o, c, $e), i(l, h, !1, n, a + o, $e);
11159
11159
  } else {
11160
- let C = function(S) {
11161
- const { uint16Array: R, uint32Array: P } = V;
11162
- let L = S * 2;
11163
- for (; !ae(L, R); )
11164
- S = _e(S), L = S * 2;
11165
- return de(S, P);
11166
- }, D = function(S) {
11167
- const { uint16Array: R, uint32Array: P } = V;
11168
- let L = S * 2;
11169
- for (; !ae(L, R); )
11170
- S = ye(S, P), L = S * 2;
11171
- return de(S, P) + ve(L, R);
11160
+ let R = function(T) {
11161
+ const { uint16Array: I, uint32Array: P } = N;
11162
+ let L = T * 2;
11163
+ for (; !ae(L, I); )
11164
+ T = _e(T), L = T * 2;
11165
+ return de(T, P);
11166
+ }, D = function(T) {
11167
+ const { uint16Array: I, uint32Array: P } = N;
11168
+ let L = T * 2;
11169
+ for (; !ae(L, I); )
11170
+ T = ye(T, P), L = T * 2;
11171
+ return de(T, P) + ve(L, I);
11172
11172
  };
11173
11173
  const l = _e(o), h = ye(o, f);
11174
11174
  let m = l, v = h, p, g, _, y;
11175
- if (s && (_ = Je, y = It, j(m, c, _), j(v, c, y), p = s(_), g = s(y), g < p)) {
11175
+ if (s && (_ = $e, y = It, j(m, c, _), j(v, c, y), p = s(_), g = s(y), g < p)) {
11176
11176
  m = h, v = l;
11177
- const S = p;
11178
- p = g, g = S, _ = y;
11177
+ const T = p;
11178
+ p = g, g = T, _ = y;
11179
11179
  }
11180
- _ || (_ = Je, j(m, c, _));
11180
+ _ || (_ = $e, j(m, c, _));
11181
11181
  const x = ae(m * 2, u), w = t(_, x, p, n + 1, a + m);
11182
11182
  let A;
11183
11183
  if (w === jr) {
11184
- const S = C(m), P = D(m) - S;
11185
- A = i(S, P, !0, n + 1, a + m, _);
11184
+ const T = R(m), P = D(m) - T;
11185
+ A = i(T, P, !0, n + 1, a + m, _);
11186
11186
  } else
11187
- A = w && Es(
11187
+ A = w && Ls(
11188
11188
  m,
11189
11189
  e,
11190
11190
  t,
@@ -11196,13 +11196,13 @@ function Es(o, e, t, i, s = null, a = 0, n = 0) {
11196
11196
  if (A)
11197
11197
  return !0;
11198
11198
  y = It, j(v, c, y);
11199
- const T = ae(v * 2, u), I = t(y, T, g, n + 1, a + v);
11199
+ const S = ae(v * 2, u), C = t(y, S, g, n + 1, a + v);
11200
11200
  let M;
11201
- if (I === jr) {
11202
- const S = C(v), P = D(v) - S;
11203
- M = i(S, P, !0, n + 1, a + v, y);
11201
+ if (C === jr) {
11202
+ const T = R(v), P = D(v) - T;
11203
+ M = i(T, P, !0, n + 1, a + v, y);
11204
11204
  } else
11205
- M = I && Es(
11205
+ M = C && Ls(
11206
11206
  v,
11207
11207
  e,
11208
11208
  t,
@@ -11214,7 +11214,7 @@ function Es(o, e, t, i, s = null, a = 0, n = 0) {
11214
11214
  return !!M;
11215
11215
  }
11216
11216
  }
11217
- const qt = /* @__PURE__ */ new b(), us = /* @__PURE__ */ new b();
11217
+ const qt = /* @__PURE__ */ new b(), hs = /* @__PURE__ */ new b();
11218
11218
  function Yc(o, e, t = {}, i = 0, s = 1 / 0) {
11219
11219
  const a = i * i, n = s * s;
11220
11220
  let c = 1 / 0, u = null;
@@ -11225,18 +11225,18 @@ function Yc(o, e, t = {}, i = 0, s = 1 / 0) {
11225
11225
  intersectsTriangle: (d, r) => {
11226
11226
  d.closestPointToPoint(e, qt);
11227
11227
  const l = e.distanceToSquared(qt);
11228
- return l < c && (us.copy(qt), c = l, u = r), l < a;
11228
+ return l < c && (hs.copy(qt), c = l, u = r), l < a;
11229
11229
  }
11230
11230
  }
11231
11231
  ), c === 1 / 0)
11232
11232
  return null;
11233
11233
  const f = Math.sqrt(c);
11234
- return t.point ? t.point.copy(us) : t.point = us.clone(), t.distance = f, t.faceIndex = u, t;
11234
+ return t.point ? t.point.copy(hs) : t.point = hs.clone(), t.distance = f, t.faceIndex = u, t;
11235
11235
  }
11236
11236
  const gt = /* @__PURE__ */ new b(), vt = /* @__PURE__ */ new b(), _t = /* @__PURE__ */ new b(), yi = /* @__PURE__ */ new z(), xi = /* @__PURE__ */ new z(), wi = /* @__PURE__ */ new z(), Kr = /* @__PURE__ */ new b(), Jr = /* @__PURE__ */ new b(), $r = /* @__PURE__ */ new b(), bi = /* @__PURE__ */ new b();
11237
11237
  function Zc(o, e, t, i, s, a, n, c) {
11238
11238
  let u;
11239
- if (a === hn ? u = o.intersectTriangle(i, t, e, !0, s) : u = o.intersectTriangle(e, t, i, a !== Hi, s), u === null)
11239
+ if (a === hn ? u = o.intersectTriangle(i, t, e, !0, s) : u = o.intersectTriangle(e, t, i, a !== Wi, s), u === null)
11240
11240
  return null;
11241
11241
  const f = o.origin.distanceTo(s);
11242
11242
  return f < n || f > c ? null : {
@@ -11260,7 +11260,7 @@ function Xc(o, e, t, i, s, a, n, c, u, f, d) {
11260
11260
  }
11261
11261
  return r;
11262
11262
  }
11263
- function ji(o, e, t, i, s, a, n) {
11263
+ function Qi(o, e, t, i, s, a, n) {
11264
11264
  const c = i * 3;
11265
11265
  let u = c + 0, f = c + 1, d = c + 2;
11266
11266
  const r = o.index;
@@ -11276,14 +11276,14 @@ function Z(o, e, t, i) {
11276
11276
  function Kc(o, e, t, i, s, a, n, c) {
11277
11277
  const { geometry: u, _indirectBuffer: f } = o;
11278
11278
  for (let d = i, r = i + s; d < r; d++)
11279
- ji(u, e, t, d, a, n, c);
11279
+ Qi(u, e, t, d, a, n, c);
11280
11280
  }
11281
11281
  function Jc(o, e, t, i, s, a, n) {
11282
11282
  const { geometry: c, _indirectBuffer: u } = o;
11283
11283
  let f = 1 / 0, d = null;
11284
11284
  for (let r = i, l = i + s; r < l; r++) {
11285
11285
  let h;
11286
- h = ji(c, e, t, r, null, a, n), h && h.distance < f && (d = h, f = h.distance);
11286
+ h = Qi(c, e, t, r, null, a, n), h && h.distance < f && (d = h, f = h.distance);
11287
11287
  }
11288
11288
  return d;
11289
11289
  }
@@ -11305,35 +11305,35 @@ function eu(o, e = null) {
11305
11305
  a = d[l], n = new Uint32Array(a), c = new Uint16Array(a), u = new Float32Array(a), r(0, f), f += a.byteLength;
11306
11306
  function r(l, h, m = !1) {
11307
11307
  const v = l * 2;
11308
- if (c[v + 15] === qi) {
11308
+ if (c[v + 15] === ji) {
11309
11309
  const g = n[l + 6], _ = c[v + 14];
11310
- let y = 1 / 0, x = 1 / 0, w = 1 / 0, A = -1 / 0, T = -1 / 0, I = -1 / 0;
11311
- for (let M = 3 * g, C = 3 * (g + _); M < C; M++) {
11310
+ let y = 1 / 0, x = 1 / 0, w = 1 / 0, A = -1 / 0, S = -1 / 0, C = -1 / 0;
11311
+ for (let M = 3 * g, R = 3 * (g + _); M < R; M++) {
11312
11312
  let D = i[M];
11313
- const S = s.getX(D), R = s.getY(D), P = s.getZ(D);
11314
- S < y && (y = S), S > A && (A = S), R < x && (x = R), R > T && (T = R), P < w && (w = P), P > I && (I = P);
11313
+ const T = s.getX(D), I = s.getY(D), P = s.getZ(D);
11314
+ T < y && (y = T), T > A && (A = T), I < x && (x = I), I > S && (S = I), P < w && (w = P), P > C && (C = P);
11315
11315
  }
11316
- 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;
11316
+ return u[l + 0] !== y || u[l + 1] !== x || u[l + 2] !== w || u[l + 3] !== A || u[l + 4] !== S || u[l + 5] !== C ? (u[l + 0] = y, u[l + 1] = x, u[l + 2] = w, u[l + 3] = A, u[l + 4] = S, u[l + 5] = C, !0) : !1;
11317
11317
  } else {
11318
11318
  const g = l + 8, _ = n[l + 6], y = g + h, x = _ + h;
11319
- let w = m, A = !1, T = !1;
11320
- e ? w || (A = e.has(y), T = e.has(x), w = !A && !T) : (A = !0, T = !0);
11321
- const I = w || A, M = w || T;
11322
- let C = !1;
11323
- I && (C = r(g, h, w));
11319
+ let w = m, A = !1, S = !1;
11320
+ e ? w || (A = e.has(y), S = e.has(x), w = !A && !S) : (A = !0, S = !0);
11321
+ const C = w || A, M = w || S;
11322
+ let R = !1;
11323
+ C && (R = r(g, h, w));
11324
11324
  let D = !1;
11325
11325
  M && (D = r(_, h, w));
11326
- const S = C || D;
11327
- if (S)
11328
- for (let R = 0; R < 3; R++) {
11329
- const P = g + R, L = _ + R, F = u[P], U = u[P + 3], G = u[L], Q = u[L + 3];
11330
- u[l + R] = F < G ? F : G, u[l + R + 3] = U > Q ? U : Q;
11326
+ const T = R || D;
11327
+ if (T)
11328
+ for (let I = 0; I < 3; I++) {
11329
+ const P = g + I, L = _ + I, F = u[P], U = u[P + 3], G = u[L], Q = u[L + 3];
11330
+ u[l + I] = F < G ? F : G, u[l + I + 3] = U > Q ? U : Q;
11331
11331
  }
11332
- return S;
11332
+ return T;
11333
11333
  }
11334
11334
  }
11335
11335
  }
11336
- function it(o, e, t, i, s) {
11336
+ function st(o, e, t, i, s) {
11337
11337
  let a, n, c, u, f, d;
11338
11338
  const r = 1 / t.direction.x, l = 1 / t.direction.y, h = 1 / t.direction.z, m = t.origin.x, v = t.origin.y, p = t.origin.z;
11339
11339
  let g = e[o], _ = e[o + 3], y = e[o + 1], x = e[o + 3 + 1], w = e[o + 2], A = e[o + 3 + 2];
@@ -11343,7 +11343,7 @@ function tu(o, e, t, i, s, a, n, c) {
11343
11343
  const { geometry: u, _indirectBuffer: f } = o;
11344
11344
  for (let d = i, r = i + s; d < r; d++) {
11345
11345
  let l = f ? f[d] : d;
11346
- ji(u, e, t, l, a, n, c);
11346
+ Qi(u, e, t, l, a, n, c);
11347
11347
  }
11348
11348
  }
11349
11349
  function iu(o, e, t, i, s, a, n) {
@@ -11351,7 +11351,7 @@ function iu(o, e, t, i, s, a, n) {
11351
11351
  let f = 1 / 0, d = null;
11352
11352
  for (let r = i, l = i + s; r < l; r++) {
11353
11353
  let h;
11354
- h = ji(c, e, t, u ? u[r] : r, null, a, n), h && h.distance < f && (d = h, f = h.distance);
11354
+ h = Qi(c, e, t, u ? u[r] : r, null, a, n), h && h.distance < f && (d = h, f = h.distance);
11355
11355
  }
11356
11356
  return d;
11357
11357
  }
@@ -11365,28 +11365,28 @@ function su(o, e, t, i, s, a, n) {
11365
11365
  return !1;
11366
11366
  }
11367
11367
  function ru(o, e, t, i, s, a, n) {
11368
- V.setBuffer(o._roots[e]), Ls(0, o, t, i, s, a, n), V.clearBuffer();
11368
+ N.setBuffer(o._roots[e]), Fs(0, o, t, i, s, a, n), N.clearBuffer();
11369
11369
  }
11370
- function Ls(o, e, t, i, s, a, n) {
11371
- const { float32Array: c, uint16Array: u, uint32Array: f } = V, d = o * 2;
11370
+ function Fs(o, e, t, i, s, a, n) {
11371
+ const { float32Array: c, uint16Array: u, uint32Array: f } = N, d = o * 2;
11372
11372
  if (ae(d, u)) {
11373
11373
  const l = de(o, f), h = ve(d, u);
11374
11374
  Kc(e, t, i, l, h, s, a, n);
11375
11375
  } else {
11376
11376
  const l = _e(o);
11377
- it(l, c, i, a, n) && Ls(l, e, t, i, s, a, n);
11377
+ st(l, c, i, a, n) && Fs(l, e, t, i, s, a, n);
11378
11378
  const h = ye(o, f);
11379
- it(h, c, i, a, n) && Ls(h, e, t, i, s, a, n);
11379
+ st(h, c, i, a, n) && Fs(h, e, t, i, s, a, n);
11380
11380
  }
11381
11381
  }
11382
11382
  const nu = ["x", "y", "z"];
11383
11383
  function ou(o, e, t, i, s, a) {
11384
- V.setBuffer(o._roots[e]);
11385
- const n = Fs(0, o, t, i, s, a);
11386
- return V.clearBuffer(), n;
11384
+ N.setBuffer(o._roots[e]);
11385
+ const n = ks(0, o, t, i, s, a);
11386
+ return N.clearBuffer(), n;
11387
11387
  }
11388
- function Fs(o, e, t, i, s, a) {
11389
- const { float32Array: n, uint16Array: c, uint32Array: u } = V;
11388
+ function ks(o, e, t, i, s, a) {
11389
+ const { float32Array: n, uint16Array: c, uint32Array: u } = N;
11390
11390
  let f = o * 2;
11391
11391
  if (ae(f, c)) {
11392
11392
  const r = de(o, u), l = ve(f, c);
@@ -11395,7 +11395,7 @@ function Fs(o, e, t, i, s, a) {
11395
11395
  const r = zn(o, u), l = nu[r], m = i.direction[l] >= 0;
11396
11396
  let v, p;
11397
11397
  m ? (v = _e(o), p = ye(o, u)) : (v = ye(o, u), p = _e(o));
11398
- const _ = it(v, n, i, s, a) ? Fs(v, e, t, i, s, a) : null;
11398
+ const _ = st(v, n, i, s, a) ? ks(v, e, t, i, s, a) : null;
11399
11399
  if (_) {
11400
11400
  const w = _.point[l];
11401
11401
  if (m ? w <= n[p + r] : (
@@ -11404,18 +11404,18 @@ function Fs(o, e, t, i, s, a) {
11404
11404
  ))
11405
11405
  return _;
11406
11406
  }
11407
- const x = it(p, n, i, s, a) ? Fs(p, e, t, i, s, a) : null;
11407
+ const x = st(p, n, i, s, a) ? ks(p, e, t, i, s, a) : null;
11408
11408
  return _ && x ? _.distance <= x.distance ? _ : x : _ || x || null;
11409
11409
  }
11410
11410
  }
11411
11411
  const Ai = /* @__PURE__ */ new Y(), yt = /* @__PURE__ */ new Ce(), xt = /* @__PURE__ */ new Ce(), jt = /* @__PURE__ */ new K(), en = /* @__PURE__ */ new re(), Ti = /* @__PURE__ */ new re();
11412
11412
  function au(o, e, t, i) {
11413
- V.setBuffer(o._roots[e]);
11414
- const s = ks(0, o, t, i);
11415
- return V.clearBuffer(), s;
11413
+ N.setBuffer(o._roots[e]);
11414
+ const s = Bs(0, o, t, i);
11415
+ return N.clearBuffer(), s;
11416
11416
  }
11417
- function ks(o, e, t, i, s = null) {
11418
- const { float32Array: a, uint16Array: n, uint32Array: c } = V;
11417
+ function Bs(o, e, t, i, s = null) {
11418
+ const { float32Array: a, uint16Array: n, uint32Array: c } = N;
11419
11419
  let u = o * 2;
11420
11420
  if (s === null && (t.boundingBox || t.computeBoundingBox(), en.set(t.boundingBox.min, t.boundingBox.max, i), s = en), ae(u, n)) {
11421
11421
  const d = e.geometry, r = d.index, l = d.attributes.position, h = t.index, m = t.attributes.position, v = de(o, c), p = ve(u, n);
@@ -11438,45 +11438,45 @@ function ks(o, e, t, i, s = null) {
11438
11438
  }
11439
11439
  } else {
11440
11440
  const d = o + 8, r = c[o + 6];
11441
- return j(d, a, Ai), !!(s.intersectsBox(Ai) && ks(d, e, t, i, s) || (j(r, a, Ai), s.intersectsBox(Ai) && ks(r, e, t, i, s)));
11441
+ return j(d, a, Ai), !!(s.intersectsBox(Ai) && Bs(d, e, t, i, s) || (j(r, a, Ai), s.intersectsBox(Ai) && Bs(r, e, t, i, s)));
11442
11442
  }
11443
11443
  }
11444
- const Si = /* @__PURE__ */ new K(), hs = /* @__PURE__ */ new re(), Qt = /* @__PURE__ */ new re(), lu = /* @__PURE__ */ new b(), cu = /* @__PURE__ */ new b(), uu = /* @__PURE__ */ new b(), hu = /* @__PURE__ */ new b();
11444
+ const Si = /* @__PURE__ */ new K(), fs = /* @__PURE__ */ new re(), Qt = /* @__PURE__ */ new re(), lu = /* @__PURE__ */ new b(), cu = /* @__PURE__ */ new b(), uu = /* @__PURE__ */ new b(), hu = /* @__PURE__ */ new b();
11445
11445
  function fu(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
11446
- e.boundingBox || e.computeBoundingBox(), hs.set(e.boundingBox.min, e.boundingBox.max, t), hs.needsUpdate = !0;
11446
+ e.boundingBox || e.computeBoundingBox(), fs.set(e.boundingBox.min, e.boundingBox.max, t), fs.needsUpdate = !0;
11447
11447
  const c = o.geometry, u = c.attributes.position, f = c.index, d = e.attributes.position, r = e.index, l = xe.getPrimitive(), h = xe.getPrimitive();
11448
11448
  let m = lu, v = cu, p = null, g = null;
11449
11449
  s && (p = uu, g = hu);
11450
11450
  let _ = 1 / 0, y = null, x = null;
11451
11451
  return Si.copy(t).invert(), Qt.matrix.copy(Si), o.shapecast(
11452
11452
  {
11453
- boundsTraverseOrder: (w) => hs.distanceToBox(w),
11454
- intersectsBounds: (w, A, T) => T < _ && T < n ? (A && (Qt.min.copy(w.min), Qt.max.copy(w.max), Qt.needsUpdate = !0), !0) : !1,
11453
+ boundsTraverseOrder: (w) => fs.distanceToBox(w),
11454
+ intersectsBounds: (w, A, S) => S < _ && S < n ? (A && (Qt.min.copy(w.min), Qt.max.copy(w.max), Qt.needsUpdate = !0), !0) : !1,
11455
11455
  intersectsRange: (w, A) => {
11456
11456
  if (e.boundsTree)
11457
11457
  return e.boundsTree.shapecast({
11458
- boundsTraverseOrder: (I) => Qt.distanceToBox(I),
11459
- intersectsBounds: (I, M, C) => C < _ && C < n,
11460
- intersectsRange: (I, M) => {
11461
- for (let C = I, D = I + M; C < D; C++) {
11462
- Z(h, 3 * C, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11463
- for (let S = w, R = w + A; S < R; S++) {
11464
- Z(l, 3 * S, f, u), l.needsUpdate = !0;
11458
+ boundsTraverseOrder: (C) => Qt.distanceToBox(C),
11459
+ intersectsBounds: (C, M, R) => R < _ && R < n,
11460
+ intersectsRange: (C, M) => {
11461
+ for (let R = C, D = C + M; R < D; R++) {
11462
+ Z(h, 3 * R, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11463
+ for (let T = w, I = w + A; T < I; T++) {
11464
+ Z(l, 3 * T, f, u), l.needsUpdate = !0;
11465
11465
  const P = l.distanceToTriangle(h, m, p);
11466
- if (P < _ && (v.copy(m), g && g.copy(p), _ = P, y = S, x = C), P < a)
11466
+ if (P < _ && (v.copy(m), g && g.copy(p), _ = P, y = T, x = R), P < a)
11467
11467
  return !0;
11468
11468
  }
11469
11469
  }
11470
11470
  }
11471
11471
  });
11472
11472
  {
11473
- const T = Ot(e);
11474
- for (let I = 0, M = T; I < M; I++) {
11475
- Z(h, 3 * I, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11476
- for (let C = w, D = w + A; C < D; C++) {
11477
- Z(l, 3 * C, f, u), l.needsUpdate = !0;
11478
- const S = l.distanceToTriangle(h, m, p);
11479
- if (S < _ && (v.copy(m), g && g.copy(p), _ = S, y = C, x = I), S < a)
11473
+ const S = Ot(e);
11474
+ for (let C = 0, M = S; C < M; C++) {
11475
+ Z(h, 3 * C, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11476
+ for (let R = w, D = w + A; R < D; R++) {
11477
+ Z(l, 3 * R, f, u), l.needsUpdate = !0;
11478
+ const T = l.distanceToTriangle(h, m, p);
11479
+ if (T < _ && (v.copy(m), g && g.copy(p), _ = T, y = R, x = C), T < a)
11480
11480
  return !0;
11481
11481
  }
11482
11482
  }
@@ -11494,61 +11494,61 @@ function du(o, e = null) {
11494
11494
  a = d[l], n = new Uint32Array(a), c = new Uint16Array(a), u = new Float32Array(a), r(0, f), f += a.byteLength;
11495
11495
  function r(l, h, m = !1) {
11496
11496
  const v = l * 2;
11497
- if (c[v + 15] === qi) {
11497
+ if (c[v + 15] === ji) {
11498
11498
  const g = n[l + 6], _ = c[v + 14];
11499
- let y = 1 / 0, x = 1 / 0, w = 1 / 0, A = -1 / 0, T = -1 / 0, I = -1 / 0;
11500
- for (let M = g, C = g + _; M < C; M++) {
11499
+ let y = 1 / 0, x = 1 / 0, w = 1 / 0, A = -1 / 0, S = -1 / 0, C = -1 / 0;
11500
+ for (let M = g, R = g + _; M < R; M++) {
11501
11501
  const D = 3 * o.resolveTriangleIndex(M);
11502
- for (let S = 0; S < 3; S++) {
11503
- let R = D + S;
11504
- R = i ? i[R] : R;
11505
- const P = s.getX(R), L = s.getY(R), F = s.getZ(R);
11506
- P < y && (y = P), P > A && (A = P), L < x && (x = L), L > T && (T = L), F < w && (w = F), F > I && (I = F);
11502
+ for (let T = 0; T < 3; T++) {
11503
+ let I = D + T;
11504
+ I = i ? i[I] : I;
11505
+ const P = s.getX(I), L = s.getY(I), F = s.getZ(I);
11506
+ P < y && (y = P), P > A && (A = P), L < x && (x = L), L > S && (S = L), F < w && (w = F), F > C && (C = F);
11507
11507
  }
11508
11508
  }
11509
- 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;
11509
+ return u[l + 0] !== y || u[l + 1] !== x || u[l + 2] !== w || u[l + 3] !== A || u[l + 4] !== S || u[l + 5] !== C ? (u[l + 0] = y, u[l + 1] = x, u[l + 2] = w, u[l + 3] = A, u[l + 4] = S, u[l + 5] = C, !0) : !1;
11510
11510
  } else {
11511
11511
  const g = l + 8, _ = n[l + 6], y = g + h, x = _ + h;
11512
- let w = m, A = !1, T = !1;
11513
- e ? w || (A = e.has(y), T = e.has(x), w = !A && !T) : (A = !0, T = !0);
11514
- const I = w || A, M = w || T;
11515
- let C = !1;
11516
- I && (C = r(g, h, w));
11512
+ let w = m, A = !1, S = !1;
11513
+ e ? w || (A = e.has(y), S = e.has(x), w = !A && !S) : (A = !0, S = !0);
11514
+ const C = w || A, M = w || S;
11515
+ let R = !1;
11516
+ C && (R = r(g, h, w));
11517
11517
  let D = !1;
11518
11518
  M && (D = r(_, h, w));
11519
- const S = C || D;
11520
- if (S)
11521
- for (let R = 0; R < 3; R++) {
11522
- const P = g + R, L = _ + R, F = u[P], U = u[P + 3], G = u[L], Q = u[L + 3];
11523
- u[l + R] = F < G ? F : G, u[l + R + 3] = U > Q ? U : Q;
11519
+ const T = R || D;
11520
+ if (T)
11521
+ for (let I = 0; I < 3; I++) {
11522
+ const P = g + I, L = _ + I, F = u[P], U = u[P + 3], G = u[L], Q = u[L + 3];
11523
+ u[l + I] = F < G ? F : G, u[l + I + 3] = U > Q ? U : Q;
11524
11524
  }
11525
- return S;
11525
+ return T;
11526
11526
  }
11527
11527
  }
11528
11528
  }
11529
11529
  function pu(o, e, t, i, s, a, n) {
11530
- V.setBuffer(o._roots[e]), Bs(0, o, t, i, s, a, n), V.clearBuffer();
11530
+ N.setBuffer(o._roots[e]), Os(0, o, t, i, s, a, n), N.clearBuffer();
11531
11531
  }
11532
- function Bs(o, e, t, i, s, a, n) {
11533
- const { float32Array: c, uint16Array: u, uint32Array: f } = V, d = o * 2;
11532
+ function Os(o, e, t, i, s, a, n) {
11533
+ const { float32Array: c, uint16Array: u, uint32Array: f } = N, d = o * 2;
11534
11534
  if (ae(d, u)) {
11535
11535
  const l = de(o, f), h = ve(d, u);
11536
11536
  tu(e, t, i, l, h, s, a, n);
11537
11537
  } else {
11538
11538
  const l = _e(o);
11539
- it(l, c, i, a, n) && Bs(l, e, t, i, s, a, n);
11539
+ st(l, c, i, a, n) && Os(l, e, t, i, s, a, n);
11540
11540
  const h = ye(o, f);
11541
- it(h, c, i, a, n) && Bs(h, e, t, i, s, a, n);
11541
+ st(h, c, i, a, n) && Os(h, e, t, i, s, a, n);
11542
11542
  }
11543
11543
  }
11544
11544
  const mu = ["x", "y", "z"];
11545
11545
  function gu(o, e, t, i, s, a) {
11546
- V.setBuffer(o._roots[e]);
11547
- const n = Os(0, o, t, i, s, a);
11548
- return V.clearBuffer(), n;
11546
+ N.setBuffer(o._roots[e]);
11547
+ const n = zs(0, o, t, i, s, a);
11548
+ return N.clearBuffer(), n;
11549
11549
  }
11550
- function Os(o, e, t, i, s, a) {
11551
- const { float32Array: n, uint16Array: c, uint32Array: u } = V;
11550
+ function zs(o, e, t, i, s, a) {
11551
+ const { float32Array: n, uint16Array: c, uint32Array: u } = N;
11552
11552
  let f = o * 2;
11553
11553
  if (ae(f, c)) {
11554
11554
  const r = de(o, u), l = ve(f, c);
@@ -11557,7 +11557,7 @@ function Os(o, e, t, i, s, a) {
11557
11557
  const r = zn(o, u), l = mu[r], m = i.direction[l] >= 0;
11558
11558
  let v, p;
11559
11559
  m ? (v = _e(o), p = ye(o, u)) : (v = ye(o, u), p = _e(o));
11560
- const _ = it(v, n, i, s, a) ? Os(v, e, t, i, s, a) : null;
11560
+ const _ = st(v, n, i, s, a) ? zs(v, e, t, i, s, a) : null;
11561
11561
  if (_) {
11562
11562
  const w = _.point[l];
11563
11563
  if (m ? w <= n[p + r] : (
@@ -11566,18 +11566,18 @@ function Os(o, e, t, i, s, a) {
11566
11566
  ))
11567
11567
  return _;
11568
11568
  }
11569
- const x = it(p, n, i, s, a) ? Os(p, e, t, i, s, a) : null;
11569
+ const x = st(p, n, i, s, a) ? zs(p, e, t, i, s, a) : null;
11570
11570
  return _ && x ? _.distance <= x.distance ? _ : x : _ || x || null;
11571
11571
  }
11572
11572
  }
11573
11573
  const Mi = /* @__PURE__ */ new Y(), wt = /* @__PURE__ */ new Ce(), bt = /* @__PURE__ */ new Ce(), Yt = /* @__PURE__ */ new K(), tn = /* @__PURE__ */ new re(), Ci = /* @__PURE__ */ new re();
11574
11574
  function vu(o, e, t, i) {
11575
- V.setBuffer(o._roots[e]);
11576
- const s = zs(0, o, t, i);
11577
- return V.clearBuffer(), s;
11575
+ N.setBuffer(o._roots[e]);
11576
+ const s = Us(0, o, t, i);
11577
+ return N.clearBuffer(), s;
11578
11578
  }
11579
- function zs(o, e, t, i, s = null) {
11580
- const { float32Array: a, uint16Array: n, uint32Array: c } = V;
11579
+ function Us(o, e, t, i, s = null) {
11580
+ const { float32Array: a, uint16Array: n, uint32Array: c } = N;
11581
11581
  let u = o * 2;
11582
11582
  if (s === null && (t.boundingBox || t.computeBoundingBox(), tn.set(t.boundingBox.min, t.boundingBox.max, i), s = tn), ae(u, n)) {
11583
11583
  const d = e.geometry, r = d.index, l = d.attributes.position, h = t.index, m = t.attributes.position, v = de(o, c), p = ve(u, n);
@@ -11601,49 +11601,49 @@ function zs(o, e, t, i, s = null) {
11601
11601
  }
11602
11602
  } else {
11603
11603
  const d = o + 8, r = c[o + 6];
11604
- return j(d, a, Mi), !!(s.intersectsBox(Mi) && zs(d, e, t, i, s) || (j(r, a, Mi), s.intersectsBox(Mi) && zs(r, e, t, i, s)));
11604
+ return j(d, a, Mi), !!(s.intersectsBox(Mi) && Us(d, e, t, i, s) || (j(r, a, Mi), s.intersectsBox(Mi) && Us(r, e, t, i, s)));
11605
11605
  }
11606
11606
  }
11607
- const Ii = /* @__PURE__ */ new K(), fs = /* @__PURE__ */ new re(), Zt = /* @__PURE__ */ new re(), _u = /* @__PURE__ */ new b(), yu = /* @__PURE__ */ new b(), xu = /* @__PURE__ */ new b(), wu = /* @__PURE__ */ new b();
11607
+ const Ii = /* @__PURE__ */ new K(), ds = /* @__PURE__ */ new re(), Zt = /* @__PURE__ */ new re(), _u = /* @__PURE__ */ new b(), yu = /* @__PURE__ */ new b(), xu = /* @__PURE__ */ new b(), wu = /* @__PURE__ */ new b();
11608
11608
  function bu(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
11609
- e.boundingBox || e.computeBoundingBox(), fs.set(e.boundingBox.min, e.boundingBox.max, t), fs.needsUpdate = !0;
11609
+ e.boundingBox || e.computeBoundingBox(), ds.set(e.boundingBox.min, e.boundingBox.max, t), ds.needsUpdate = !0;
11610
11610
  const c = o.geometry, u = c.attributes.position, f = c.index, d = e.attributes.position, r = e.index, l = xe.getPrimitive(), h = xe.getPrimitive();
11611
11611
  let m = _u, v = yu, p = null, g = null;
11612
11612
  s && (p = xu, g = wu);
11613
11613
  let _ = 1 / 0, y = null, x = null;
11614
11614
  return Ii.copy(t).invert(), Zt.matrix.copy(Ii), o.shapecast(
11615
11615
  {
11616
- boundsTraverseOrder: (w) => fs.distanceToBox(w),
11617
- intersectsBounds: (w, A, T) => T < _ && T < n ? (A && (Zt.min.copy(w.min), Zt.max.copy(w.max), Zt.needsUpdate = !0), !0) : !1,
11616
+ boundsTraverseOrder: (w) => ds.distanceToBox(w),
11617
+ intersectsBounds: (w, A, S) => S < _ && S < n ? (A && (Zt.min.copy(w.min), Zt.max.copy(w.max), Zt.needsUpdate = !0), !0) : !1,
11618
11618
  intersectsRange: (w, A) => {
11619
11619
  if (e.boundsTree) {
11620
- const T = e.boundsTree;
11621
- return T.shapecast({
11622
- boundsTraverseOrder: (I) => Zt.distanceToBox(I),
11623
- intersectsBounds: (I, M, C) => C < _ && C < n,
11624
- intersectsRange: (I, M) => {
11625
- for (let C = I, D = I + M; C < D; C++) {
11626
- const S = T.resolveTriangleIndex(C);
11627
- Z(h, 3 * S, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11628
- for (let R = w, P = w + A; R < P; R++) {
11629
- const L = o.resolveTriangleIndex(R);
11620
+ const S = e.boundsTree;
11621
+ return S.shapecast({
11622
+ boundsTraverseOrder: (C) => Zt.distanceToBox(C),
11623
+ intersectsBounds: (C, M, R) => R < _ && R < n,
11624
+ intersectsRange: (C, M) => {
11625
+ for (let R = C, D = C + M; R < D; R++) {
11626
+ const T = S.resolveTriangleIndex(R);
11627
+ Z(h, 3 * T, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11628
+ for (let I = w, P = w + A; I < P; I++) {
11629
+ const L = o.resolveTriangleIndex(I);
11630
11630
  Z(l, 3 * L, f, u), l.needsUpdate = !0;
11631
11631
  const F = l.distanceToTriangle(h, m, p);
11632
- if (F < _ && (v.copy(m), g && g.copy(p), _ = F, y = R, x = C), F < a)
11632
+ if (F < _ && (v.copy(m), g && g.copy(p), _ = F, y = I, x = R), F < a)
11633
11633
  return !0;
11634
11634
  }
11635
11635
  }
11636
11636
  }
11637
11637
  });
11638
11638
  } else {
11639
- const T = Ot(e);
11640
- for (let I = 0, M = T; I < M; I++) {
11641
- Z(h, 3 * I, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11642
- for (let C = w, D = w + A; C < D; C++) {
11643
- const S = o.resolveTriangleIndex(C);
11644
- Z(l, 3 * S, f, u), l.needsUpdate = !0;
11645
- const R = l.distanceToTriangle(h, m, p);
11646
- if (R < _ && (v.copy(m), g && g.copy(p), _ = R, y = C, x = I), R < a)
11639
+ const S = Ot(e);
11640
+ for (let C = 0, M = S; C < M; C++) {
11641
+ Z(h, 3 * C, r, d), h.a.applyMatrix4(t), h.b.applyMatrix4(t), h.c.applyMatrix4(t), h.needsUpdate = !0;
11642
+ for (let R = w, D = w + A; R < D; R++) {
11643
+ const T = o.resolveTriangleIndex(R);
11644
+ Z(l, 3 * T, f, u), l.needsUpdate = !0;
11645
+ const I = l.distanceToTriangle(h, m, p);
11646
+ if (I < _ && (v.copy(m), g && g.copy(p), _ = I, y = R, x = C), I < a)
11647
11647
  return !0;
11648
11648
  }
11649
11649
  }
@@ -11655,12 +11655,12 @@ function bu(o, e, t, i = {}, s = {}, a = 0, n = 1 / 0) {
11655
11655
  function Au() {
11656
11656
  return typeof SharedArrayBuffer < "u";
11657
11657
  }
11658
- const ii = new V.constructor(), Bi = new V.constructor(), Xe = new $s(() => new Y()), At = new Y(), Tt = new Y(), ds = new Y(), ps = new Y();
11659
- let ms = !1;
11658
+ const ii = new N.constructor(), Oi = new N.constructor(), Xe = new $s(() => new Y()), At = new Y(), Tt = new Y(), ps = new Y(), ms = new Y();
11659
+ let gs = !1;
11660
11660
  function Tu(o, e, t, i) {
11661
- if (ms)
11661
+ if (gs)
11662
11662
  throw new Error("MeshBVH: Recursive calls to bvhcast not supported.");
11663
- ms = !0;
11663
+ gs = !0;
11664
11664
  const s = o._roots, a = e._roots;
11665
11665
  let n, c = 0, u = 0;
11666
11666
  const f = new K().copy(t).invert();
@@ -11668,7 +11668,7 @@ function Tu(o, e, t, i) {
11668
11668
  ii.setBuffer(s[d]), u = 0;
11669
11669
  const l = Xe.getPrimitive();
11670
11670
  j(0, ii.float32Array, l), l.applyMatrix4(f);
11671
- for (let h = 0, m = a.length; h < m && (Bi.setBuffer(a[d]), n = Ae(
11671
+ for (let h = 0, m = a.length; h < m && (Oi.setBuffer(a[d]), n = Ae(
11672
11672
  0,
11673
11673
  0,
11674
11674
  t,
@@ -11679,20 +11679,20 @@ function Tu(o, e, t, i) {
11679
11679
  0,
11680
11680
  0,
11681
11681
  l
11682
- ), Bi.clearBuffer(), u += a[h].length, !n); h++)
11682
+ ), Oi.clearBuffer(), u += a[h].length, !n); h++)
11683
11683
  ;
11684
11684
  if (Xe.releasePrimitive(l), ii.clearBuffer(), c += s[d].length, n)
11685
11685
  break;
11686
11686
  }
11687
- return ms = !1, n;
11687
+ return gs = !1, n;
11688
11688
  }
11689
11689
  function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
11690
11690
  let r, l;
11691
- d ? (r = Bi, l = ii) : (r = ii, l = Bi);
11691
+ d ? (r = Oi, l = ii) : (r = ii, l = Oi);
11692
11692
  const h = r.float32Array, m = r.uint32Array, v = r.uint16Array, p = l.float32Array, g = l.uint32Array, _ = l.uint16Array, y = o * 2, x = e * 2, w = ae(y, v), A = ae(x, _);
11693
- let T = !1;
11693
+ let S = !1;
11694
11694
  if (A && w)
11695
- d ? T = s(
11695
+ d ? S = s(
11696
11696
  de(e, g),
11697
11697
  ve(e * 2, _),
11698
11698
  de(o, m),
@@ -11701,7 +11701,7 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
11701
11701
  n + e,
11702
11702
  c,
11703
11703
  a + o
11704
- ) : T = s(
11704
+ ) : S = s(
11705
11705
  de(o, m),
11706
11706
  ve(o * 2, v),
11707
11707
  de(e, g),
@@ -11712,12 +11712,12 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
11712
11712
  n + e
11713
11713
  );
11714
11714
  else if (A) {
11715
- const I = Xe.getPrimitive();
11716
- j(e, p, I), I.applyMatrix4(t);
11717
- const M = _e(o), C = ye(o, m);
11718
- j(M, h, At), j(C, h, Tt);
11719
- const D = I.intersectsBox(At), S = I.intersectsBox(Tt);
11720
- T = D && Ae(
11715
+ const C = Xe.getPrimitive();
11716
+ j(e, p, C), C.applyMatrix4(t);
11717
+ const M = _e(o), R = ye(o, m);
11718
+ j(M, h, At), j(R, h, Tt);
11719
+ const D = C.intersectsBox(At), T = C.intersectsBox(Tt);
11720
+ S = D && Ae(
11721
11721
  e,
11722
11722
  M,
11723
11723
  i,
@@ -11727,11 +11727,11 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
11727
11727
  a,
11728
11728
  u,
11729
11729
  c + 1,
11730
- I,
11730
+ C,
11731
11731
  !d
11732
- ) || S && Ae(
11732
+ ) || T && Ae(
11733
11733
  e,
11734
- C,
11734
+ R,
11735
11735
  i,
11736
11736
  t,
11737
11737
  s,
@@ -11739,17 +11739,17 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
11739
11739
  a,
11740
11740
  u,
11741
11741
  c + 1,
11742
- I,
11742
+ C,
11743
11743
  !d
11744
- ), Xe.releasePrimitive(I);
11744
+ ), Xe.releasePrimitive(C);
11745
11745
  } else {
11746
- const I = _e(e), M = ye(e, g);
11747
- j(I, p, ds), j(M, p, ps);
11748
- const C = f.intersectsBox(ds), D = f.intersectsBox(ps);
11749
- if (C && D)
11750
- T = Ae(
11746
+ const C = _e(e), M = ye(e, g);
11747
+ j(C, p, ps), j(M, p, ms);
11748
+ const R = f.intersectsBox(ps), D = f.intersectsBox(ms);
11749
+ if (R && D)
11750
+ S = Ae(
11751
11751
  o,
11752
- I,
11752
+ C,
11753
11753
  t,
11754
11754
  i,
11755
11755
  s,
@@ -11772,11 +11772,11 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
11772
11772
  f,
11773
11773
  d
11774
11774
  );
11775
- else if (C)
11775
+ else if (R)
11776
11776
  if (w)
11777
- T = Ae(
11777
+ S = Ae(
11778
11778
  o,
11779
- I,
11779
+ C,
11780
11780
  t,
11781
11781
  i,
11782
11782
  s,
@@ -11788,14 +11788,14 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
11788
11788
  d
11789
11789
  );
11790
11790
  else {
11791
- const S = Xe.getPrimitive();
11792
- S.copy(ds).applyMatrix4(t);
11793
- const R = _e(o), P = ye(o, m);
11794
- j(R, h, At), j(P, h, Tt);
11795
- const L = S.intersectsBox(At), F = S.intersectsBox(Tt);
11796
- T = L && Ae(
11791
+ const T = Xe.getPrimitive();
11792
+ T.copy(ps).applyMatrix4(t);
11793
+ const I = _e(o), P = ye(o, m);
11794
+ j(I, h, At), j(P, h, Tt);
11795
+ const L = T.intersectsBox(At), F = T.intersectsBox(Tt);
11796
+ S = L && Ae(
11797
+ C,
11797
11798
  I,
11798
- R,
11799
11799
  i,
11800
11800
  t,
11801
11801
  s,
@@ -11803,10 +11803,10 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
11803
11803
  a,
11804
11804
  u,
11805
11805
  c + 1,
11806
- S,
11806
+ T,
11807
11807
  !d
11808
11808
  ) || F && Ae(
11809
- I,
11809
+ C,
11810
11810
  P,
11811
11811
  i,
11812
11812
  t,
@@ -11815,13 +11815,13 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
11815
11815
  a,
11816
11816
  u,
11817
11817
  c + 1,
11818
- S,
11818
+ T,
11819
11819
  !d
11820
- ), Xe.releasePrimitive(S);
11820
+ ), Xe.releasePrimitive(T);
11821
11821
  }
11822
11822
  else if (D)
11823
11823
  if (w)
11824
- T = Ae(
11824
+ S = Ae(
11825
11825
  o,
11826
11826
  M,
11827
11827
  t,
@@ -11835,14 +11835,14 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
11835
11835
  d
11836
11836
  );
11837
11837
  else {
11838
- const S = Xe.getPrimitive();
11839
- S.copy(ps).applyMatrix4(t);
11840
- const R = _e(o), P = ye(o, m);
11841
- j(R, h, At), j(P, h, Tt);
11842
- const L = S.intersectsBox(At), F = S.intersectsBox(Tt);
11843
- T = L && Ae(
11838
+ const T = Xe.getPrimitive();
11839
+ T.copy(ms).applyMatrix4(t);
11840
+ const I = _e(o), P = ye(o, m);
11841
+ j(I, h, At), j(P, h, Tt);
11842
+ const L = T.intersectsBox(At), F = T.intersectsBox(Tt);
11843
+ S = L && Ae(
11844
11844
  M,
11845
- R,
11845
+ I,
11846
11846
  i,
11847
11847
  t,
11848
11848
  s,
@@ -11850,7 +11850,7 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
11850
11850
  a,
11851
11851
  u,
11852
11852
  c + 1,
11853
- S,
11853
+ T,
11854
11854
  !d
11855
11855
  ) || F && Ae(
11856
11856
  M,
@@ -11862,12 +11862,12 @@ function Ae(o, e, t, i, s, a = 0, n = 0, c = 0, u = 0, f = null, d = !1) {
11862
11862
  a,
11863
11863
  u,
11864
11864
  c + 1,
11865
- S,
11865
+ T,
11866
11866
  !d
11867
- ), Xe.releasePrimitive(S);
11867
+ ), Xe.releasePrimitive(T);
11868
11868
  }
11869
11869
  }
11870
- return T;
11870
+ return S;
11871
11871
  }
11872
11872
  const Ri = /* @__PURE__ */ new re(), sn = /* @__PURE__ */ new Y(), Su = {
11873
11873
  strategy: kn,
@@ -11903,7 +11903,7 @@ class er {
11903
11903
  indirect: !!e.indirectBuffer,
11904
11904
  ...i
11905
11905
  };
11906
- const { index: s, roots: a, indirectBuffer: n } = e, c = new er(t, { ...i, [os]: !0 });
11906
+ const { index: s, roots: a, indirectBuffer: n } = e, c = new er(t, { ...i, [as]: !0 });
11907
11907
  if (c._roots = a, c._indirectBuffer = n || null, i.setIndex) {
11908
11908
  const u = t.getIndex();
11909
11909
  if (u === null) {
@@ -11927,10 +11927,10 @@ class er {
11927
11927
  ...Su,
11928
11928
  // undocumented options
11929
11929
  // Whether to skip generating the tree. Used for deserialization.
11930
- [os]: !1
11930
+ [as]: !1
11931
11931
  }, t), t.useSharedArrayBuffer && !Au())
11932
11932
  throw new Error("MeshBVH: SharedArrayBuffer is not available.");
11933
- this.geometry = e, this._roots = null, this._indirectBuffer = null, t[os] || (Wc(this, t), !e.boundingBox && t.setBoundingBox && (e.boundingBox = this.getBoundingBox(new Y()))), this.resolveTriangleIndex = t.indirect ? (i) => this._indirectBuffer[i] : (i) => i;
11933
+ this.geometry = e, this._roots = null, this._indirectBuffer = null, t[as] || (Wc(this, t), !e.boundingBox && t.setBoundingBox && (e.boundingBox = this.getBoundingBox(new Y()))), this.resolveTriangleIndex = t.indirect ? (i) => this._indirectBuffer[i] : (i) => i;
11934
11934
  }
11935
11935
  refit(e = null) {
11936
11936
  return (this.indirect ? du : eu)(this, e);
@@ -11939,7 +11939,7 @@ class er {
11939
11939
  const i = this._roots[t], s = new Uint32Array(i), a = new Uint16Array(i);
11940
11940
  n(0);
11941
11941
  function n(c, u = 0) {
11942
- const f = c * 2, d = a[f + 15] === qi;
11942
+ const f = c * 2, d = a[f + 15] === ji;
11943
11943
  if (d) {
11944
11944
  const r = s[c + 6], l = a[f + 14];
11945
11945
  e(u, d, new Float32Array(i, c * 4, 6), r, l);
@@ -11950,7 +11950,7 @@ class er {
11950
11950
  }
11951
11951
  }
11952
11952
  /* Core Cast Functions */
11953
- raycast(e, t = vs, i = 0, s = 1 / 0) {
11953
+ raycast(e, t = _s, i = 0, s = 1 / 0) {
11954
11954
  const a = this._roots, n = this.geometry, c = [], u = t.isMaterial, f = Array.isArray(t), d = n.groups, r = u ? t.side : t, l = this.indirect ? pu : ru;
11955
11955
  for (let h = 0, m = a.length; h < m; h++) {
11956
11956
  const v = f ? t[d[h].materialIndex].side : r, p = c.length;
@@ -11962,7 +11962,7 @@ class er {
11962
11962
  }
11963
11963
  return c;
11964
11964
  }
11965
- raycastFirst(e, t = vs, i = 0, s = 1 / 0) {
11965
+ raycastFirst(e, t = _s, i = 0, s = 1 / 0) {
11966
11966
  const a = this._roots, n = this.geometry, c = t.isMaterial, u = Array.isArray(t);
11967
11967
  let f = null;
11968
11968
  const d = n.groups, r = c ? t.side : t, l = this.indirect ? gu : ou;
@@ -12020,18 +12020,18 @@ class er {
12020
12020
  };
12021
12021
  if (a) {
12022
12022
  const m = (v, p, g, _, y, x, w, A) => {
12023
- for (let T = g, I = g + _; T < I; T++) {
12024
- h(T), d.a.applyMatrix4(t), d.b.applyMatrix4(t), d.c.applyMatrix4(t), d.needsUpdate = !0;
12025
- for (let M = v, C = v + p; M < C; M++)
12026
- if (f(M), n.needsUpdate = !0, a(n, d, M, T, y, x, w, A))
12023
+ for (let S = g, C = g + _; S < C; S++) {
12024
+ h(S), d.a.applyMatrix4(t), d.b.applyMatrix4(t), d.c.applyMatrix4(t), d.needsUpdate = !0;
12025
+ for (let M = v, R = v + p; M < R; M++)
12026
+ if (f(M), n.needsUpdate = !0, a(n, d, M, S, y, x, w, A))
12027
12027
  return !0;
12028
12028
  }
12029
12029
  return !1;
12030
12030
  };
12031
12031
  if (s) {
12032
12032
  const v = s;
12033
- s = function(p, g, _, y, x, w, A, T) {
12034
- return v(p, g, _, y, x, w, A, T) ? !0 : m(p, g, _, y, x, w, A, T);
12033
+ s = function(p, g, _, y, x, w, A, S) {
12034
+ return v(p, g, _, y, x, w, A, S) ? !0 : m(p, g, _, y, x, w, A, S);
12035
12035
  };
12036
12036
  } else
12037
12037
  s = m;
@@ -12380,7 +12380,7 @@ class Ru {
12380
12380
  transparent: !0,
12381
12381
  opacity: 1
12382
12382
  });
12383
- const v = new ws(c, c);
12383
+ const v = new bs(c, c);
12384
12384
  this.isZUp || v.rotateX(-Math.PI / 2), this.shadowCatcherMesh = new X(v, this.shadowCatcherMaterial), this.isZUp ? this.shadowCatcherMesh.position.z = 1e-3 : this.shadowCatcherMesh.position.y = 1e-3, this.shadowCatcherMesh.name = "shadowCatcherMesh", this.shadowCatcherMesh.receiveShadow = !0, this.progShadowGrp.add(this.shadowCatcherMesh), this.addObjectToShow(this.progShadowGrp), this.addObjectToShow(this.lightGroup), this.addObjectToShow(this.lightOrigin), this.addObjectToShow(this.shadowCatcherMesh), this.rebuildObjectsToShowAncestors(), this.debugHelpersGroup = new ge(), this.targetMat = new ao({ fog: !1 }), this.previousShadowMap = { value: this.progressiveLightMap1.texture }, this.averagingWindow = { value: u }, this.targetMat.onBeforeCompile = (p) => {
12385
12385
  p.vertexShader = `varying vec2 vUv;
12386
12386
  ` + p.vertexShader.slice(0, -1) + "vUv = uv; gl_Position = vec4((uv - 0.5) * 2.0, 1.0, 1.0); }";
@@ -12410,10 +12410,10 @@ vec3 texelOld = texture2D(previousShadowMap, vUv).rgb;
12410
12410
  showDebugHelpers(e) {
12411
12411
  if (!this.debugHelpersGroup.children.length) {
12412
12412
  const t = new X(
12413
- new ws(2, 2),
12413
+ new bs(2, 2),
12414
12414
  new ri({
12415
12415
  map: this.progressiveLightMap1.texture,
12416
- side: Hi
12416
+ side: Wi
12417
12417
  })
12418
12418
  );
12419
12419
  this.isZUp ? t.position.z = this.params.size / 2 : t.position.y = this.params.size / 2;
@@ -12937,24 +12937,24 @@ class Bu {
12937
12937
  let n = !1;
12938
12938
  const c = s.layers.mask;
12939
12939
  if (e) {
12940
- const I = Array.isArray(e) ? e : [e];
12941
- I.length > 0 && (n = !0, this._box.makeEmpty(), I.forEach((M) => {
12940
+ const C = Array.isArray(e) ? e : [e];
12941
+ C.length > 0 && (n = !0, this._box.makeEmpty(), C.forEach((M) => {
12942
12942
  if (!M) {
12943
12943
  console.log(M);
12944
12944
  return;
12945
12945
  }
12946
12946
  try {
12947
- this._box.expandByObject(M), M.traverse((C) => {
12948
- C.layers.enable(this._selectionLayer);
12947
+ this._box.expandByObject(M), M.traverse((R) => {
12948
+ R.layers.enable(this._selectionLayer);
12949
12949
  });
12950
- } catch (C) {
12951
- console.log("eee", C);
12950
+ } catch (R) {
12951
+ console.log("eee", R);
12952
12952
  }
12953
12953
  }), this._box.getBoundingSphere(this._sphere), s.layers.set(this._selectionLayer));
12954
12954
  } else
12955
12955
  this._box.setFromObject(i).getBoundingSphere(this._sphere);
12956
12956
  this.masks[0].setSize(this.targets[0].width, this.targets[0].height), this.masks[1].setSize(this.masks[0].width, this.masks[0].height), i.overrideMaterial = this.maskMaterial, t.setClearColor(0, 0), t.setRenderTarget(this.masks[0]), t.clear(), t.render(i, s), i.overrideMaterial = null, t.setRenderTarget(null);
12957
- for (let I = 0; I < 4; I++)
12957
+ for (let C = 0; C < 4; C++)
12958
12958
  this.expandQuad.material.source = this.masks[0].texture, t.setRenderTarget(this.masks[1]), this.expandQuad.render(t), t.setRenderTarget(null), this.masks.reverse();
12959
12959
  this.masks.reverse(), s.updateMatrixWorld();
12960
12960
  const u = this._sphere.center.clone();
@@ -12976,10 +12976,10 @@ class Bu {
12976
12976
  t.autoClear = !1;
12977
12977
  const w = this.effectQuad.material;
12978
12978
  w.map = this.targets[0].texture;
12979
- const A = this.targets[0].texture.minFilter, T = this.targets[0].texture.magFilter;
12980
- this.targets[0].texture.minFilter = k.LinearFilter, this.targets[0].texture.magFilter = k.LinearFilter, this.targets[0].texture.needsUpdate = !0, w.mask = this.masks[1].texture, w.thickness = a.thickness, w.inside = a.inside, w.color.set(a.color), w.transparent = !0, w.blending = k.NormalBlending, w.depthTest = !1, w.depthWrite = !1, this.effectQuad.render(t), this.targets[0].texture.minFilter = A, this.targets[0].texture.magFilter = T, this.targets[0].texture.needsUpdate = !0, t.autoClear = x, t.setScissorTest(!1), n && e && ((Array.isArray(e) ? e : [e]).forEach((M) => {
12981
- M && M.traverse((C) => {
12982
- C.layers.disable(this._selectionLayer);
12979
+ const A = this.targets[0].texture.minFilter, S = this.targets[0].texture.magFilter;
12980
+ this.targets[0].texture.minFilter = k.LinearFilter, this.targets[0].texture.magFilter = k.LinearFilter, this.targets[0].texture.needsUpdate = !0, w.mask = this.masks[1].texture, w.thickness = a.thickness, w.inside = a.inside, w.color.set(a.color), w.transparent = !0, w.blending = k.NormalBlending, w.depthTest = !1, w.depthWrite = !1, this.effectQuad.render(t), this.targets[0].texture.minFilter = A, this.targets[0].texture.magFilter = S, this.targets[0].texture.needsUpdate = !0, t.autoClear = x, t.setScissorTest(!1), n && e && ((Array.isArray(e) ? e : [e]).forEach((M) => {
12981
+ M && M.traverse((R) => {
12982
+ R.layers.disable(this._selectionLayer);
12983
12983
  });
12984
12984
  }), s.layers.mask = c);
12985
12985
  }
@@ -13003,24 +13003,24 @@ class nn {
13003
13003
  var Uu = /* @__PURE__ */ ((o) => (o[o.DEFAULT = 0] = "DEFAULT", o[o.CAN_INSTALL = 1] = "CAN_INSTALL", o))(Uu || {});
13004
13004
  const on = 0.15;
13005
13005
  kt.DEFAULT_UP.set(0, 0, 1);
13006
- let Mt, Li = 0, Us = 0;
13006
+ let Mt, Li = 0, Hs = 0;
13007
13007
  const Hu = () => {
13008
- Mt = void 0, Li = 0, Us = 0;
13008
+ Mt = void 0, Li = 0, Hs = 0;
13009
13009
  }, Wu = new ri({ colorWrite: !1 });
13010
13010
  class Ph {
13011
13011
  constructor(e) {
13012
- this.props = e, this.stats = new ei(), this.scene = new _s(), this.overlayScene = new _s(), this.renderer = new ho({
13012
+ this.props = e, this.stats = new ei(), this.scene = new ys(), this.overlayScene = new ys(), this.renderer = new ho({
13013
13013
  antialias: !0,
13014
13014
  alpha: !0,
13015
13015
  logarithmicDepthBuffer: !0,
13016
13016
  powerPreference: "high-performance",
13017
13017
  preserveDrawingBuffer: !0
13018
- }), this.css2dRenderer = new xo(), this.mousePos = new z(), this.mouseCoord = new z(), this.offset = new z(), this.size = new z(), this.amr = new Ac({ showSizeBox: !0, showController: !0 }), this._selectedForOutline = [], this._clock = new Wi(!0), this._uiHiddenTime = this._clock.getElapsedTime(), this.camera = new Ui(
13018
+ }), this.css2dRenderer = new xo(), this.mousePos = new z(), this.mouseCoord = new z(), this.offset = new z(), this.size = new z(), this.amr = new Ac({ showSizeBox: !0, showController: !0 }), this._selectedForOutline = [], this._clock = new Vi(!0), this._uiHiddenTime = this._clock.getElapsedTime(), this.camera = new Hi(
13019
13019
  39.6,
13020
13020
  window.innerWidth / window.innerHeight,
13021
13021
  0.1,
13022
13022
  1e4
13023
- ), this.d = 2, this.orthographicCamera = new bs(
13023
+ ), this.d = 2, this.orthographicCamera = new As(
13024
13024
  -this.d * (window.innerWidth / window.innerHeight),
13025
13025
  this.d * (window.innerWidth / window.innerHeight),
13026
13026
  this.d,
@@ -13028,7 +13028,7 @@ class Ph {
13028
13028
  0.1,
13029
13029
  1e3
13030
13030
  ), this._axisMoving = !1, this._container = new ge(), this._raycaster = new fo(), this._selected = [], this._pointerDownTimeout = 0, this._dragging = !1, this.maxSample = 1024 * 2, this.sampleCount = 0, this._usePathTracing = !1, this._fpsCache = [], this._fpsCacheMax = 20, this._emitter = new Bt(), this.sound = new ic(), this._rafId = null, this._destroyed = !1, this._ground = new X(
13031
- new ws(100, 100),
13031
+ new bs(100, 100),
13032
13032
  new po({
13033
13033
  color: new J("#eee"),
13034
13034
  metalness: 0.4,
@@ -13038,7 +13038,7 @@ class Ph {
13038
13038
  })
13039
13039
  ), this.light = new mo(16777215, 10, 30), this._amrRender = new Be(1024, 1024, {
13040
13040
  format: te,
13041
- type: Hs,
13041
+ type: Ws,
13042
13042
  colorSpace: Fi,
13043
13043
  samples: 8
13044
13044
  }), this._lastTarget = new b(), this._shadowMode = !1, this.addEventListener = this._emitter.on.bind(this._emitter), this.removeEventListener = this._emitter.on.bind(this._emitter), this._showSlots = !0, this._showSize = !0, this._showControls = !0, this._drag = (c) => {
@@ -13065,7 +13065,7 @@ class Ph {
13065
13065
  };
13066
13066
  this._pointerDownTimeout = window.setTimeout(u, 200);
13067
13067
  }, this._detectTrackpad = () => {
13068
- Mt || typeof Mt < "u" || (Li === 0 && (Us = performance.now()), Li++, performance.now() - Us > 66 && (Li > 5 ? Mt = !0 : Mt = !1, Mt ? this.controls.zoomSpeed = 0.2 : this.controls.zoomSpeed = 1, setTimeout(Hu, 2e3)));
13068
+ Mt || typeof Mt < "u" || (Li === 0 && (Hs = performance.now()), Li++, performance.now() - Hs > 66 && (Li > 5 ? Mt = !0 : Mt = !1, Mt ? this.controls.zoomSpeed = 0.2 : this.controls.zoomSpeed = 1, setTimeout(Hu, 2e3)));
13069
13069
  }, this.debounceForkHeightChange = oc(() => {
13070
13070
  var c;
13071
13071
  (c = this._progressShadow) == null || c.recalculate();
@@ -13085,24 +13085,24 @@ class Ph {
13085
13085
  v(W);
13086
13086
  return;
13087
13087
  }
13088
- const ce = ((sr = q.morphAttributes) == null ? void 0 : sr.position) || [], tr = W.morphTargetInfluences || [], Nn = ce.length > 0 && tr.length > 0;
13089
- for (let Ve = 0; Ve < me.count; Ve++) {
13088
+ const ce = ((sr = q.morphAttributes) == null ? void 0 : sr.position) || [], tr = W.morphTargetInfluences || [], Vn = ce.length > 0 && tr.length > 0;
13089
+ for (let Ne = 0; Ne < me.count; Ne++) {
13090
13090
  if (r.set(
13091
- me.getX(Ve),
13092
- me.getY(Ve),
13093
- me.getZ(Ve)
13094
- ), Nn) {
13091
+ me.getX(Ne),
13092
+ me.getY(Ne),
13093
+ me.getZ(Ne)
13094
+ ), Vn) {
13095
13095
  l.set(0, 0, 0);
13096
- let Qi = 0;
13096
+ let Yi = 0;
13097
13097
  for (let ht = 0; ht < ce.length; ht++) {
13098
13098
  const ai = tr[ht] || 0;
13099
- ai && (Qi += ai, h.set(
13100
- ce[ht].getX(Ve),
13101
- ce[ht].getY(Ve),
13102
- ce[ht].getZ(Ve)
13099
+ ai && (Yi += ai, h.set(
13100
+ ce[ht].getX(Ne),
13101
+ ce[ht].getY(Ne),
13102
+ ce[ht].getZ(Ne)
13103
13103
  ), q.morphTargetsRelative, l.addScaledVector(h, ai));
13104
13104
  }
13105
- q.morphTargetsRelative ? r.add(l) : Qi > 0 && (r.multiplyScalar(1 - Qi), r.add(l));
13105
+ q.morphTargetsRelative ? r.add(l) : Yi > 0 && (r.multiplyScalar(1 - Yi), r.add(l));
13106
13106
  }
13107
13107
  m.copy(r).applyMatrix4(W.matrixWorld), f.expandByPoint(m);
13108
13108
  }
@@ -13136,63 +13136,70 @@ class Ph {
13136
13136
  new b(-w.x, w.y, -w.z),
13137
13137
  new b(-w.x, -w.y, w.z),
13138
13138
  new b(-w.x, -w.y, -w.z)
13139
- ], T = new b(0, 1, 0);
13140
- Math.abs(x.dot(T)) > 0.99 && T.set(0, 0, 1);
13141
- const I = new b().crossVectors(x, T).normalize(), M = new b().crossVectors(I, x).normalize();
13142
- let C = 0;
13139
+ ], S = new b(0, 1, 0);
13140
+ Math.abs(x.dot(S)) > 0.99 && S.set(0, 0, 1);
13141
+ const C = new b().crossVectors(x, S).normalize(), M = new b().crossVectors(C, x).normalize();
13142
+ let R = 0;
13143
13143
  A.forEach((W) => {
13144
- const q = W.dot(I), me = W.dot(M), ce = Math.sqrt(q * q + me * me);
13145
- C = Math.max(C, ce);
13146
- }), C = C / 2 + 0.4;
13147
- const D = this.camera.fov * Math.PI / 180, S = 2 * Math.atan(Math.tan(D / 2) * this.camera.aspect), R = C / Math.tan(S / 2), P = C / Math.tan(D / 2), L = Math.max(R, P), F = g.clone().add(x.multiplyScalar(L)), U = this.camera.position.clone(), G = this.controls.target.clone();
13144
+ const q = W.dot(C), me = W.dot(M), ce = Math.sqrt(q * q + me * me);
13145
+ R = Math.max(R, ce);
13146
+ }), R = R / 2 + 0.4;
13147
+ const D = this.camera.fov * Math.PI / 180, T = 2 * Math.atan(Math.tan(D / 2) * this.camera.aspect), I = R / Math.tan(T / 2), P = R / Math.tan(D / 2), L = Math.max(I, P), F = g.clone().add(x.multiplyScalar(L)), U = this.camera.position.clone(), G = this.controls.target.clone();
13148
13148
  let Q = 500;
13149
13149
  const ie = U.distanceTo(F) + G.distanceTo(y);
13150
13150
  ie > 1e-3 && (Q = Math.min(1e3, Math.max(450, ie * 45))), this._animateCamera(U, F, G, y, Q);
13151
13151
  }, this.focusSlots = (c) => {
13152
- var I, M;
13153
- if (this.amr.slots.forEach((C) => {
13154
- C.focused = !1, C.hide();
13152
+ var M, R;
13153
+ if (this.amr.slots.forEach((D) => {
13154
+ D.focused = !1, D.hide();
13155
13155
  }), !c.length)
13156
- if (this._lastTarget.set(0, 0, this._lastTarget.z), this.amr.slots.forEach((C) => {
13157
- C.show();
13156
+ if (this._lastTarget.set(0, 0, this._lastTarget.z), this.amr.slots.forEach((D) => {
13157
+ D.show();
13158
13158
  }), this.shadowMode = !1, this._focusRestoreView) {
13159
- const C = this._focusRestoreView;
13159
+ const D = this._focusRestoreView;
13160
13160
  this._focusRestoreView = void 0;
13161
- const D = this.camera.position.clone(), S = this.controls.target.clone(), R = C.position.clone(), P = C.target.clone();
13162
- let L = 500;
13163
- const F = D.distanceTo(R) + S.distanceTo(P);
13164
- F > 1e-3 && (L = Math.min(1e3, Math.max(450, F * 45))), this._animateCamera(D, R, S, P, L, () => {
13165
- this.camera.up.copy(C.up);
13161
+ const T = this.camera.position.clone(), I = this.controls.target.clone(), P = D.position.clone(), L = D.target.clone();
13162
+ let F = 500;
13163
+ const U = T.distanceTo(P) + I.distanceTo(L);
13164
+ U > 1e-3 && (F = Math.min(1e3, Math.max(450, U * 45))), this._animateCamera(T, P, I, L, F, () => {
13165
+ this.camera.up.copy(D.up);
13166
13166
  });
13167
13167
  return;
13168
13168
  } else {
13169
13169
  this.fit();
13170
13170
  return;
13171
13171
  }
13172
- (I = this._fitAnimation) != null && I.isPlaying() || this.shadowMode || (this._focusRestoreView = {
13172
+ (M = this._fitAnimation) != null && M.isPlaying() || this.shadowMode || (this._focusRestoreView = {
13173
13173
  position: this.camera.position.clone(),
13174
13174
  target: new b(0, 0, this.controls.target.z),
13175
13175
  up: this.camera.up.clone()
13176
- }), (M = this._fitAnimation) == null || M.stop(), this.shadowMode = !0;
13177
- const u = c.flatMap((C) => {
13178
- if (C.show(), C.focused = !0, !C.parent)
13176
+ }), (R = this._fitAnimation) == null || R.stop(), this.shadowMode = !0;
13177
+ const u = c.flatMap((D) => {
13178
+ if (D.show(), D.focused = !0, !D.parent)
13179
13179
  return [];
13180
- const D = new b();
13181
- return C.parent.getWorldPosition(D), [D];
13180
+ const T = new b();
13181
+ return D.parent.getWorldPosition(T), [T];
13182
13182
  });
13183
13183
  if (!u.length)
13184
13184
  return;
13185
- const f = u.reduce((C, D) => C.add(D), new b()).multiplyScalar(1 / u.length), d = this.controls.target.clone(), r = this.camera.position.clone().sub(d).normalize();
13185
+ const f = u.reduce((D, T) => D.add(T), new b()).multiplyScalar(1 / u.length), d = this.controls.target.clone(), r = this.camera.position.clone().sub(d).normalize();
13186
13186
  let l = 0;
13187
- for (const C of u) {
13188
- const D = C.clone().sub(f), S = D.dot(r), R = Math.sqrt(Math.max(0, D.lengthSq() - S * S));
13189
- R > l && (l = R);
13187
+ for (const D of u) {
13188
+ const T = D.clone().sub(f), I = T.dot(r), P = Math.sqrt(Math.max(0, T.lengthSq() - I * I));
13189
+ P > l && (l = P);
13190
13190
  }
13191
13191
  l = l + 0.4;
13192
- const h = this.camera.fov * Math.PI / 180, m = 2 * Math.atan(Math.tan(h / 2) * this.camera.aspect), v = l / Math.tan(m / 2), p = l / Math.tan(h / 2), g = Math.max(v, p), _ = f.clone(), y = f.clone().add(r.clone().multiplyScalar(g < 1 ? 1 : g)), x = this.camera.position.clone(), w = d.clone();
13193
- let A = 500;
13194
- const T = x.distanceTo(y) + w.distanceTo(_);
13195
- T > 1e-3 && (A = Math.min(1e3, Math.max(450, T * 45))), this._animateCamera(x, y, w, _, A);
13192
+ const h = this.camera.fov * Math.PI / 180, m = 2 * Math.atan(Math.tan(h / 2) * this.camera.aspect), v = l / Math.tan(m / 2), p = l / Math.tan(h / 2), g = Math.max(v, p), _ = f.clone(), y = f.clone().add(r.clone().multiplyScalar(g < 1 ? 1 : g)), x = this.camera.position.clone(), w = d.clone(), A = { t: 0 };
13193
+ let S = 500;
13194
+ const C = x.distanceTo(y) + w.distanceTo(_);
13195
+ C > 1e-3 && (S = Math.min(1e3, Math.max(450, C * 45))), this._lastTarget = _.clone(), this._fitAnimation = new Bi(A).to({ t: 1 }, S).easing(Je.Easing.Quadratic.InOut).onStart(() => {
13196
+ this.controls.enabled = !1;
13197
+ }).onUpdate(() => {
13198
+ const D = A.t;
13199
+ this.camera.position.lerpVectors(x, y, D), this.controls.target.lerpVectors(w, _, D);
13200
+ }).onComplete(() => {
13201
+ this.controls.enabled = !0;
13202
+ }).start();
13196
13203
  }, this.fit = () => {
13197
13204
  this._focusRestoreView = void 0, new Y().setFromObject(this._container);
13198
13205
  const u = this.amr.sizeBox.size.getSize(new b()), f = u.clone().multiplyScalar(0.5), d = new b(0, 0, f.z);
@@ -13210,20 +13217,20 @@ class Ph {
13210
13217
  new b(-h.x, -h.y, -h.z)
13211
13218
  ];
13212
13219
  let v = 0;
13213
- for (const R of m) {
13214
- const P = R.dot(l), L = Math.sqrt(Math.max(0, R.lengthSq() - P * P));
13220
+ for (const I of m) {
13221
+ const P = I.dot(l), L = Math.sqrt(Math.max(0, I.lengthSq() - P * P));
13215
13222
  L > v && (v = L);
13216
13223
  }
13217
13224
  v = v * 1.05;
13218
13225
  const p = this.camera.fov * Math.PI / 180, g = 2 * Math.atan(Math.tan(p / 2) * this.camera.aspect), _ = v / Math.tan(g / 2), y = v / Math.tan(p / 2), x = Math.max(_, y), w = f.clone();
13219
13226
  let A = u.z / 3;
13220
13227
  u.z < u.x && u.z < u.y && (A = u.x * 0.8), u.z > u.x && u.z > u.y && (A = 0), w.z += A;
13221
- const T = r.clone().normalize().multiplyScalar(x < 1 ? 1 : x).add(w), I = Math.max(u.x * 2, 5);
13222
- this.light.position.set(I, 0, u.z * 2);
13223
- const M = this.camera.position.clone(), C = this.controls.target.clone();
13228
+ const S = r.clone().normalize().multiplyScalar(x < 1 ? 1 : x).add(w), C = Math.max(u.x * 2, 5);
13229
+ this.light.position.set(C, 0, u.z * 2);
13230
+ const M = this.camera.position.clone(), R = this.controls.target.clone();
13224
13231
  let D = 600;
13225
- const S = M.distanceTo(T) + C.distanceTo(d);
13226
- S > 1e-3 && (D = Math.min(800, Math.max(650, S * 45))), this._animateCamera(M, T, C, d, D, () => {
13232
+ const T = M.distanceTo(S) + R.distanceTo(d);
13233
+ T > 1e-3 && (D = Math.min(800, Math.max(650, T * 45))), this._animateCamera(M, S, R, d, D, () => {
13227
13234
  this.shadowMode || (this._progressShadow.visible = !0, this._progressShadow.isFinished || this._progressShadow.recalculate());
13228
13235
  }), this.controls.minDistance = Math.max(0.2, Math.min(x * 0.25, x - 0.1)), this.controls.maxDistance = x * 4;
13229
13236
  }, this.resize = () => {
@@ -13245,7 +13252,7 @@ class Ph {
13245
13252
  const u = this.stats.fps();
13246
13253
  if (this.usePathTracing || (this._fpsCache.length > this._fpsCacheMax && this._fpsCache.shift(), this._fpsCache.push(u)), this.amr.slots.forEach((f) => {
13247
13254
  this._dragging ? f.getCanInstall() && f.render(this) : f.render(this);
13248
- }), ct.update(), this.controls.update(), this._progressShadow.update(this.mainCamera), this.css2dRenderer.render(this.scene, this.mainCamera), this.updatePosition(), this.scene.overrideMaterial = null, this.renderer.render(this.scene, this.mainCamera), this._jumpFlood && this._selectedForOutline.length > 0) {
13255
+ }), Je.update(), this.controls.update(), this._progressShadow.update(this.mainCamera), this.css2dRenderer.render(this.scene, this.mainCamera), this.updatePosition(), this.scene.overrideMaterial = null, this.renderer.render(this.scene, this.mainCamera), this._jumpFlood && this._selectedForOutline.length > 0) {
13249
13256
  const f = this.scene.background;
13250
13257
  this.scene.background = null, this._jumpFlood.render(this._selectedForOutline), this.scene.background = f;
13251
13258
  }
@@ -13314,7 +13321,7 @@ class Ph {
13314
13321
  return this._mainCamera;
13315
13322
  }
13316
13323
  set mainCamera(e) {
13317
- this._mainCamera = e, e instanceof bs ? this.scene.background = null : this.scene.background = this.scene.environment;
13324
+ this._mainCamera = e, e instanceof As ? this.scene.background = null : this.scene.background = this.scene.environment;
13318
13325
  }
13319
13326
  showState() {
13320
13327
  this.stats.dom.style.display = "block";
@@ -13352,7 +13359,7 @@ class Ph {
13352
13359
  }
13353
13360
  _loadEnv() {
13354
13361
  new _o().load(Ou, (t) => {
13355
- t.mapping = Ws, this._usePathTracing || (this.scene.background = t, this.scene.backgroundBlurriness = 1, this.scene.backgroundIntensity = 1, this.scene.backgroundRotation = new vo(Math.PI / 2, 0, Math.PI * 0.98 * 0.8), this.scene.environment = t, this.overlayScene.environment = t, this.scene.environmentRotation = this.scene.backgroundRotation, this.overlayScene.environmentRotation = this.scene.environmentRotation, this.scene.environmentIntensity = 1.4, this.overlayScene.environmentIntensity = this.scene.environmentIntensity), this.pathTracer.updateEnvironment();
13362
+ t.mapping = Vs, this._usePathTracing || (this.scene.background = t, this.scene.backgroundBlurriness = 1, this.scene.backgroundIntensity = 1, this.scene.backgroundRotation = new vo(Math.PI / 2, 0, Math.PI * 0.98 * 0.8), this.scene.environment = t, this.overlayScene.environment = t, this.scene.environmentRotation = this.scene.backgroundRotation, this.overlayScene.environmentRotation = this.scene.environmentRotation, this.scene.environmentIntensity = 1.4, this.overlayScene.environmentIntensity = this.scene.environmentIntensity), this.pathTracer.updateEnvironment();
13356
13363
  }, () => {
13357
13364
  }, () => {
13358
13365
  });
@@ -13411,7 +13418,7 @@ class Ph {
13411
13418
  const t = (e == null ? void 0 : e.subject) ?? this._container;
13412
13419
  (n = this._progressShadow) == null || n.visible;
13413
13420
  const i = this.scene.background, s = this.showSize;
13414
- return new Nu({
13421
+ return new Vu({
13415
13422
  renderer: this.renderer,
13416
13423
  scene: this.scene,
13417
13424
  overlayScene: this.overlayScene,
@@ -13457,7 +13464,7 @@ class Ph {
13457
13464
  _animateCamera(e, t, i, s, a, n) {
13458
13465
  var u;
13459
13466
  const c = { t: 0 };
13460
- (u = this._fitAnimation) == null || u.stop(), this._fitAnimation = new Xs(c).to({ t: 1 }, a).easing(ct.Easing.Quadratic.InOut).onStart(() => {
13467
+ (u = this._fitAnimation) == null || u.stop(), this._fitAnimation = new Bi(c).to({ t: 1 }, a).easing(Je.Easing.Quadratic.InOut).onStart(() => {
13461
13468
  this.controls.enabled = !1;
13462
13469
  }).onUpdate(() => {
13463
13470
  const f = c.t;
@@ -13509,14 +13516,14 @@ class Ph {
13509
13516
  }
13510
13517
  destroy() {
13511
13518
  var t, i, s;
13512
- this._destroyed = !0, this._rafId !== null && (cancelAnimationFrame(this._rafId), this._rafId = null), this._clock.stop(), (t = this._controlsGizmo) == null || t.destroy(), this.amr.destroy(), this.amr.removeFromParent(), this._progressShadow.destroy(), ct.removeAll(), this.stats.dom.remove(), this._emitter.removeAllListeners(), (i = this._fitAnimation) == null || i.stop(), window.removeEventListener("drag", this._drag), document.removeEventListener("wheel", this._detectTrackpad), window.removeEventListener("pointermove", this._pointermove), this.renderer.domElement.removeEventListener("pointerdown", this._pointerdown);
13519
+ this._destroyed = !0, this._rafId !== null && (cancelAnimationFrame(this._rafId), this._rafId = null), this._clock.stop(), (t = this._controlsGizmo) == null || t.destroy(), this.amr.destroy(), this.amr.removeFromParent(), this._progressShadow.destroy(), Je.removeAll(), this.stats.dom.remove(), this._emitter.removeAllListeners(), (i = this._fitAnimation) == null || i.stop(), window.removeEventListener("drag", this._drag), document.removeEventListener("wheel", this._detectTrackpad), window.removeEventListener("pointermove", this._pointermove), this.renderer.domElement.removeEventListener("pointerdown", this._pointerdown);
13513
13520
  const e = this.renderer.domElement.parentElement;
13514
13521
  e && ((s = this._resizeObserver) == null || s.unobserve(e)), this.controls.dispose(), this.renderer.domElement.remove(), this.renderer.dispose(), We(this.scene), this.scene.clear();
13515
13522
  }
13516
13523
  }
13517
- class Nu {
13524
+ class Vu {
13518
13525
  constructor(e) {
13519
- this.deps = e, this.canvas = null, this.pixelBuffer = null, this.orthoCamera = new bs(-1, 1, 1, -1, 0.1, 1e3), this.orthoCamera.position.set(0, 0, 5), this.perspectiveCamera = new Ui(45, 1, 0.1, 2e3);
13526
+ this.deps = e, this.canvas = null, this.pixelBuffer = null, this.orthoCamera = new As(-1, 1, 1, -1, 0.1, 1e3), this.orthoCamera.position.set(0, 0, 5), this.perspectiveCamera = new Hi(45, 1, 0.1, 2e3);
13520
13527
  }
13521
13528
  async capture(e) {
13522
13529
  var m, v, p, g, _, y;
@@ -13527,7 +13534,7 @@ class Nu {
13527
13534
  t.getSize(s);
13528
13535
  const a = ((m = e == null ? void 0 : e.size) == null ? void 0 : m.width) ?? Math.round(s.x), n = ((v = e == null ? void 0 : e.size) == null ? void 0 : v.height) ?? Math.round(s.y), c = (e == null ? void 0 : e.margin) ?? 0.15, u = (e == null ? void 0 : e.includeOverlay) ?? !1, f = a / n || 1, d = this.resolveViews(e == null ? void 0 : e.views), r = new Be(a, n, {
13529
13536
  format: te,
13530
- type: Hs
13537
+ type: Ws
13531
13538
  });
13532
13539
  r.texture.colorSpace = Fi, r.texture.generateMipmaps = !1, r.depthBuffer = !0;
13533
13540
  const l = this.storeRendererState(t), h = {};
@@ -13543,8 +13550,8 @@ class Nu {
13543
13550
  for (const w of d) {
13544
13551
  const A = this.configureCamera(x, w, f, c, a, n);
13545
13552
  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));
13546
- const T = this.readPixels(t, r, a, n);
13547
- h[w.key] = T;
13553
+ const S = this.readPixels(t, r, a, n);
13554
+ h[w.key] = S;
13548
13555
  }
13549
13556
  } finally {
13550
13557
  r.dispose(), this.restoreRendererState(t, l), (y = (_ = this.deps).onAfterCapture) == null || y.call(_);
@@ -13604,23 +13611,23 @@ class Nu {
13604
13611
  c.lengthSq() === 0 && c.set(0, 0, 1);
13605
13612
  const u = t.up.clone().normalize();
13606
13613
  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") {
13607
- const x = this.perspectiveCamera, w = t.fov ?? 45, A = Ye.degToRad(w), T = Math.max(Math.tan(A / 2), 1e-4), I = Math.max(T * (i || 1), 1e-4), M = this.getPerspectiveDirection(t, e.size).normalize(), C = new b().crossVectors(M, u).normalize();
13608
- C.lengthSq() < 1e-6 && C.set(1, 0, 0);
13609
- const D = new b().crossVectors(C, M).normalize(), S = Math.max(e.size.x * 0.5, 1e-4), R = Math.max(e.size.y * 0.5, 1e-4), P = Math.max(e.size.z * 0.5, 1e-4), L = [
13610
- new b(-S, -R, -P),
13611
- new b(-S, -R, P),
13612
- new b(-S, R, -P),
13613
- new b(-S, R, P),
13614
- new b(S, -R, -P),
13615
- new b(S, -R, P),
13616
- new b(S, R, -P),
13617
- new b(S, R, P)
13614
+ const x = this.perspectiveCamera, w = t.fov ?? 45, A = Ye.degToRad(w), S = Math.max(Math.tan(A / 2), 1e-4), C = Math.max(S * (i || 1), 1e-4), M = this.getPerspectiveDirection(t, e.size).normalize(), R = new b().crossVectors(M, u).normalize();
13615
+ R.lengthSq() < 1e-6 && R.set(1, 0, 0);
13616
+ const D = new b().crossVectors(R, M).normalize(), T = Math.max(e.size.x * 0.5, 1e-4), I = Math.max(e.size.y * 0.5, 1e-4), P = Math.max(e.size.z * 0.5, 1e-4), L = [
13617
+ new b(-T, -I, -P),
13618
+ new b(-T, -I, P),
13619
+ new b(-T, I, -P),
13620
+ new b(-T, I, P),
13621
+ new b(T, -I, -P),
13622
+ new b(T, -I, P),
13623
+ new b(T, I, -P),
13624
+ new b(T, I, P)
13618
13625
  ];
13619
13626
  let F = 0, U = -1 / 0;
13620
13627
  for (const ie of L) {
13621
- const se = C.dot(ie), W = D.dot(ie), q = M.dot(ie);
13628
+ const se = R.dot(ie), W = D.dot(ie), q = M.dot(ie);
13622
13629
  U = Math.max(U, q);
13623
- const me = q + Math.abs(se) / I, ce = q + Math.abs(W) / T;
13630
+ const me = q + Math.abs(se) / C, ce = q + Math.abs(W) / S;
13624
13631
  F = Math.max(F, me, ce);
13625
13632
  }
13626
13633
  F = Math.max(F, U + 0.1);
@@ -13651,9 +13658,9 @@ class Nu {
13651
13658
  storeRendererState(e) {
13652
13659
  const t = new z();
13653
13660
  e.getSize(t);
13654
- const i = new et();
13661
+ const i = new it();
13655
13662
  e.getViewport(i);
13656
- const s = new et();
13663
+ const s = new it();
13657
13664
  e.getScissor(s);
13658
13665
  const a = e.getClearColor(new J()), n = e.getClearAlpha();
13659
13666
  return {
@@ -13702,7 +13709,7 @@ class Nu {
13702
13709
  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;
13703
13710
  }
13704
13711
  }
13705
- const Vu = "shop-components", Gu = "0.4.2", qu = "Shop components", ju = "dist/shop-components.umd.js", Qu = "dist/shop-components.mjs", Yu = "dist/main.d.ts", Zu = {
13712
+ const Nu = "shop-components", Gu = "0.4.3", qu = "Shop components", ju = "dist/shop-components.umd.js", Qu = "dist/shop-components.mjs", Yu = "dist/main.d.ts", Zu = {
13706
13713
  dts: "tsc --emitDeclarationOnly & tsc & storybook build -o dist",
13707
13714
  dev: "vite dev",
13708
13715
  build: "vite build",
@@ -13736,7 +13743,7 @@ const Vu = "shop-components", Gu = "0.4.2", qu = "Shop components", ju = "dist/s
13736
13743
  "troika-three-text": "^0.49.1",
13737
13744
  tweakpane: "^4.0.3"
13738
13745
  }, sh = {
13739
- name: Vu,
13746
+ name: Nu,
13740
13747
  version: Gu,
13741
13748
  description: qu,
13742
13749
  main: ju,
@@ -13765,13 +13772,13 @@ try {
13765
13772
  export {
13766
13773
  Ac as Amr,
13767
13774
  qr as Logo,
13768
- Rs as SGLBLoader,
13775
+ Ds as SGLBLoader,
13769
13776
  $ as SLOT_EVENTS,
13770
13777
  Ph as Scene3D,
13771
13778
  nn as Skin,
13772
13779
  Wr as Slot,
13773
13780
  Uu as SlotState,
13774
- Nu as TriViewCapture,
13781
+ Vu as TriViewCapture,
13775
13782
  kr as arrayBufferToUrl,
13776
13783
  $l as calculateArrayAverage,
13777
13784
  Mh as calculateFocalLength,