@limrun/ui 0.21.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +36 -8
  2. package/dist/BufferGeometryUtils-B2-bJqFj.js +1 -0
  3. package/dist/BufferGeometryUtils-BcXIkYhS.mjs +64 -0
  4. package/dist/{GLTFLoader-D4AITfgZ.mjs → GLTFLoader-BQvr_TBF.mjs} +138 -137
  5. package/dist/GLTFLoader-CsxjkQ8a.js +1 -0
  6. package/dist/components/device-stage.d.ts +61 -0
  7. package/dist/components/device-view.d.ts +29 -0
  8. package/dist/components/duo-frame.d.ts +5 -1
  9. package/dist/components/duo-model.d.ts +2 -1
  10. package/dist/components/macbook-frame.d.ts +30 -0
  11. package/dist/components/macbook-geometry.d.ts +77 -0
  12. package/dist/components/model-source.d.ts +8 -0
  13. package/dist/components/remote-control.d.ts +40 -1
  14. package/dist/components/studio-environment.d.ts +6 -0
  15. package/dist/core/mac-pointer.d.ts +56 -0
  16. package/dist/{core-CRIachT9.mjs → core-nbvkIrvp.mjs} +24 -24
  17. package/dist/core.js +12 -12
  18. package/dist/duo-frame-B04_gIge.js +11 -0
  19. package/dist/duo-frame-CyoWZakh.mjs +748 -0
  20. package/dist/duo-model-BYgtCaCR.mjs +4 -0
  21. package/dist/duo-model-CDWgmLRF.js +1 -0
  22. package/dist/duo-model.d.ts +2 -0
  23. package/dist/duo-view-BHwnQmx_.js +1 -0
  24. package/dist/{duo-view-BeqYIqfQ.mjs → duo-view-DJEQ3Q74.mjs} +84 -86
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.css +1 -1
  27. package/dist/index.js +32 -25
  28. package/dist/lite.cjs +1 -1
  29. package/dist/lite.js +2 -2
  30. package/dist/macbook-frame-Be0dCliH.js +3 -0
  31. package/dist/macbook-frame-DzwIHHCA.mjs +344 -0
  32. package/dist/macbook-model-BiMxLpmf.mjs +4 -0
  33. package/dist/macbook-model-BpUdvtlU.js +1 -0
  34. package/dist/macbook-model.d.ts +2 -0
  35. package/dist/meshopt_decoder.module-C4Z_evpr.mjs +217 -0
  36. package/dist/meshopt_decoder.module-DxJdu6ez.js +1 -0
  37. package/dist/{duo-frame-D1JK_cRk.mjs → model-source-BAZAKTcr.mjs} +6184 -6894
  38. package/dist/model-source-DbYJQWkh.js +4049 -0
  39. package/dist/remote-control-Db6ssV0S.js +1 -0
  40. package/dist/remote-control-PGtDEDgm.mjs +1746 -0
  41. package/package.json +1 -1
  42. package/dist/GLTFLoader-C25N9Y4j.js +0 -1
  43. package/dist/duo-frame-B1NXSk6a.js +0 -4059
  44. package/dist/duo-view-PsR5b045.js +0 -1
  45. package/dist/remote-control-DNr0Pyrx.js +0 -1
  46. package/dist/remote-control-rdm3mDtI.mjs +0 -1299
@@ -1,7 +1,8 @@
1
- import { L as Ae, a as G, F as he, M as w, V as fe, C as F, b, S as U, c as Le, P as Me, D as Se, d as K, e as C, I as ye, Q as de, f as we, O as pe, T as be, g as Ne, B as V, h as Ie, i as me, N as Oe, j as Ce, k as Fe, l as Q, m as ge, R as J, n as Pe, o as ke, p as He, q as z, r as De, s as Te, t as ve, u as v, v as Ge, w as Ue, x as Ke, y as Be, z as ee, A as je, E as Ve, G as ze, H as Xe, J as X, K as qe, U as We, W as Ye, X as Qe, Y as Je, Z as Ze, _ as $e, $ as Re, a0 as en, a1 as ne, a2 as te, a3 as se, a4 as ie, a5 as re, a6 as nn, a7 as tn, a8 as sn, a9 as rn, aa as on, ab as an } from "./duo-frame-D1JK_cRk.mjs";
2
- function cn(f) {
3
- const n = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map(), t = f.clone();
4
- return Ee(f, t, function(s, i) {
1
+ import { o as Ae, p as G, F as fe, f as w, h as he, C as F, q as b, S as U, r as Le, s as Me, t as Se, v as K, d as C, w as ye, Q as de, x as we, O as pe, y as be, z as Ne, j as V, I as Ie, A as me, N as Oe, E as Ce, H as Fe, L as Q, J as ge, K as J, U as Pe, W as ke, X as He, Y as z, Z as De, e as Te, D as ve, M as v, _ as Ge, B as Ue, $ as Ke, b as Be, a0 as je, a1 as Ve, a2 as ze, a3 as Xe, G as X, P as qe, i as We, a4 as Ye, a5 as Qe, a6 as Je, a7 as Ze, a8 as $e, a9 as Re, a as en, T as ee, aa as ne, ab as te, ac as se, ad as ie, ae as nn, af as tn, g as sn, ag as rn, n as on, m as an } from "./model-source-BAZAKTcr.mjs";
2
+ import { t as re } from "./BufferGeometryUtils-BcXIkYhS.mjs";
3
+ function cn(h) {
4
+ const n = /* @__PURE__ */ new Map(), e = /* @__PURE__ */ new Map(), t = h.clone();
5
+ return Ee(h, t, function(s, i) {
5
6
  n.set(i, s), e.set(s, i);
6
7
  }), t.traverse(function(s) {
7
8
  if (!s.isSkinnedMesh) return;
@@ -11,12 +12,12 @@ function cn(f) {
11
12
  }), i.bind(i.skeleton, i.bindMatrix);
12
13
  }), t;
13
14
  }
14
- function Ee(f, n, e) {
15
- e(f, n);
16
- for (let t = 0; t < f.children.length; t++)
17
- Ee(f.children[t], n.children[t], e);
15
+ function Ee(h, n, e) {
16
+ e(h, n);
17
+ for (let t = 0; t < h.children.length; t++)
18
+ Ee(h.children[t], n.children[t], e);
18
19
  }
19
- class jn extends Ae {
20
+ class Vn extends Ae {
20
21
  /**
21
22
  * Constructs a new glTF loader.
22
23
  *
@@ -42,7 +43,7 @@ class jn extends Ae {
42
43
  }), this.register(function(e) {
43
44
  return new En(e);
44
45
  }), this.register(function(e) {
45
- return new fn(e);
46
+ return new hn(e);
46
47
  }), this.register(function(e) {
47
48
  return new xn(e);
48
49
  }), this.register(function(e) {
@@ -83,7 +84,7 @@ class jn extends Ae {
83
84
  this.manager.itemStart(n);
84
85
  const a = function(c) {
85
86
  s ? s(c) : console.error(c), i.manager.itemError(n), i.manager.itemEnd(n);
86
- }, r = new he(this.manager);
87
+ }, r = new fe(this.manager);
87
88
  r.setPath(this.path), r.setResponseType("arraybuffer"), r.setRequestHeader(this.requestHeader), r.setWithCredentials(this.withCredentials), r.load(n, function(c) {
88
89
  try {
89
90
  i.parse(c, o, function(l) {
@@ -189,10 +190,10 @@ class jn extends Ae {
189
190
  }
190
191
  if (i.extensionsUsed)
191
192
  for (let l = 0; l < i.extensionsUsed.length; ++l) {
192
- const u = i.extensionsUsed[l], h = i.extensionsRequired || [];
193
+ const u = i.extensionsUsed[l], f = i.extensionsRequired || [];
193
194
  switch (u) {
194
195
  case g.KHR_MATERIALS_UNLIT:
195
- o[u] = new hn();
196
+ o[u] = new fn();
196
197
  break;
197
198
  case g.KHR_DRACO_MESH_COMPRESSION:
198
199
  o[u] = new bn(i, this.dracoLoader);
@@ -204,7 +205,7 @@ class jn extends Ae {
204
205
  o[u] = new In();
205
206
  break;
206
207
  default:
207
- h.indexOf(u) >= 0 && a[u] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + u + '".');
208
+ f.indexOf(u) >= 0 && a[u] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + u + '".');
208
209
  }
209
210
  }
210
211
  c.setExtensions(o), c.setPlugins(a), c.parse(t, s);
@@ -225,24 +226,24 @@ class jn extends Ae {
225
226
  }
226
227
  }
227
228
  function un() {
228
- let f = {};
229
+ let h = {};
229
230
  return {
230
231
  get: function(n) {
231
- return f[n];
232
+ return h[n];
232
233
  },
233
234
  add: function(n, e) {
234
- f[n] = e;
235
+ h[n] = e;
235
236
  },
236
237
  remove: function(n) {
237
- delete f[n];
238
+ delete h[n];
238
239
  },
239
240
  removeAll: function() {
240
- f = {};
241
+ h = {};
241
242
  }
242
243
  };
243
244
  }
244
- function A(f, n, e) {
245
- const t = f.json.materials[n];
245
+ function A(h, n, e) {
246
+ const t = h.json.materials[n];
246
247
  return t.extensions && t.extensions[e] ? t.extensions[e] : null;
247
248
  }
248
249
  const g = {
@@ -316,7 +317,7 @@ class ln {
316
317
  });
317
318
  }
318
319
  }
319
- class hn {
320
+ class fn {
320
321
  constructor() {
321
322
  this.name = g.KHR_MATERIALS_UNLIT;
322
323
  }
@@ -337,7 +338,7 @@ class hn {
337
338
  return Promise.all(s);
338
339
  }
339
340
  }
340
- class fn {
341
+ class hn {
341
342
  constructor(n) {
342
343
  this.parser = n, this.name = g.KHR_MATERIALS_EMISSIVE_STRENGTH;
343
344
  }
@@ -359,7 +360,7 @@ class dn {
359
360
  const s = [];
360
361
  if (t.clearcoatFactor !== void 0 && (e.clearcoat = t.clearcoatFactor), t.clearcoatTexture !== void 0 && s.push(this.parser.assignTexture(e, "clearcoatMap", t.clearcoatTexture)), t.clearcoatRoughnessFactor !== void 0 && (e.clearcoatRoughness = t.clearcoatRoughnessFactor), t.clearcoatRoughnessTexture !== void 0 && s.push(this.parser.assignTexture(e, "clearcoatRoughnessMap", t.clearcoatRoughnessTexture)), t.clearcoatNormalTexture !== void 0 && (s.push(this.parser.assignTexture(e, "clearcoatNormalMap", t.clearcoatNormalTexture)), t.clearcoatNormalTexture.scale !== void 0)) {
361
362
  const i = t.clearcoatNormalTexture.scale;
362
- e.clearcoatNormalScale = new fe(i, i);
363
+ e.clearcoatNormalScale = new he(i, i);
363
364
  }
364
365
  return Promise.all(s);
365
366
  }
@@ -559,12 +560,12 @@ class oe {
559
560
  return null;
560
561
  }
561
562
  return i.then(function(a) {
562
- const r = s.byteOffset || 0, c = s.byteLength || 0, l = s.count, u = s.byteStride, h = new Uint8Array(a, r, c);
563
- return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(l, u, h, s.mode, s.filter).then(function(d) {
563
+ const r = s.byteOffset || 0, c = s.byteLength || 0, l = s.count, u = s.byteStride, f = new Uint8Array(a, r, c);
564
+ return o.decodeGltfBufferAsync ? o.decodeGltfBufferAsync(l, u, f, s.mode, s.filter).then(function(d) {
564
565
  return d.buffer;
565
566
  }) : o.ready.then(function() {
566
567
  const d = new ArrayBuffer(l * u);
567
- return o.decodeGltfBuffer(new Uint8Array(d), l, u, h, s.mode, s.filter), d;
568
+ return o.decodeGltfBuffer(new Uint8Array(d), l, u, f, s.mode, s.filter), d;
568
569
  });
569
570
  });
570
571
  } else
@@ -587,10 +588,10 @@ class yn {
587
588
  for (const c in o)
588
589
  a.push(this.parser.getDependency("accessor", o[c]).then((l) => (r[c] = l, r[c])));
589
590
  return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(n)), Promise.all(a).then((c) => {
590
- const l = c.pop(), u = l.isGroup ? l.children : [l], h = c[0].count, d = [];
591
+ const l = c.pop(), u = l.isGroup ? l.children : [l], f = c[0].count, d = [];
591
592
  for (const p of u) {
592
- const R = new K(), m = new C(), T = new de(), _ = new C(1, 1, 1), x = new ye(p.geometry, p.material, h);
593
- for (let E = 0; E < h; E++)
593
+ const R = new K(), m = new C(), T = new de(), _ = new C(1, 1, 1), x = new ye(p.geometry, p.material, f);
594
+ for (let E = 0; E < f; E++)
594
595
  r.TRANSLATION && m.fromBufferAttribute(r.TRANSLATION, E), r.ROTATION && T.fromBufferAttribute(r.ROTATION, E), r.SCALE && _.fromBufferAttribute(r.SCALE, E), x.setMatrixAt(E, R.compose(m, T, _));
595
596
  for (const E in r)
596
597
  if (E === "_COLOR_0") {
@@ -650,19 +651,19 @@ class bn {
650
651
  for (const l in n.attributes) {
651
652
  const u = Z[l] || l.toLowerCase();
652
653
  if (o[l] !== void 0) {
653
- const h = t.accessors[n.attributes[l]], d = k[h.componentType];
654
- c[u] = d.name, r[u] = h.normalized === !0;
654
+ const f = t.accessors[n.attributes[l]], d = k[f.componentType];
655
+ c[u] = d.name, r[u] = f.normalized === !0;
655
656
  }
656
657
  }
657
658
  return e.getDependency("bufferView", i).then(function(l) {
658
- return new Promise(function(u, h) {
659
+ return new Promise(function(u, f) {
659
660
  s.decodeDracoFile(l, function(d) {
660
661
  for (const p in d.attributes) {
661
662
  const R = d.attributes[p], m = r[p];
662
663
  m !== void 0 && (R.normalized = m);
663
664
  }
664
665
  u(d);
665
- }, a, c, b, h);
666
+ }, a, c, b, f);
666
667
  });
667
668
  });
668
669
  }
@@ -691,7 +692,7 @@ class _e extends tn {
691
692
  return e;
692
693
  }
693
694
  interpolate_(n, e, t, s) {
694
- const i = this.resultBuffer, o = this.sampleValues, a = this.valueSize, r = a * 2, c = a * 3, l = s - e, u = (t - e) / l, h = u * u, d = h * u, p = n * c, R = p - c, m = -2 * d + 3 * h, T = d - h, _ = 1 - m, x = T - h + u;
695
+ const i = this.resultBuffer, o = this.sampleValues, a = this.valueSize, r = a * 2, c = a * 3, l = s - e, u = (t - e) / l, f = u * u, d = f * u, p = n * c, R = p - c, m = -2 * d + 3 * f, T = d - f, _ = 1 - m, x = T - f + u;
695
696
  for (let E = 0; E !== a; E++) {
696
697
  const L = o[R + E + a], N = o[R + E + r] * l, S = o[p + E + a], H = o[p + E] * l;
697
698
  i[E] = _ * L + x * N + m * S + T * H;
@@ -767,8 +768,8 @@ const M = {
767
768
  MASK: "MASK",
768
769
  BLEND: "BLEND"
769
770
  };
770
- function Pn(f) {
771
- return f.DefaultMaterial === void 0 && (f.DefaultMaterial = new Te({
771
+ function Pn(h) {
772
+ return h.DefaultMaterial === void 0 && (h.DefaultMaterial = new Te({
772
773
  color: 16777215,
773
774
  emissive: 0,
774
775
  metalness: 1,
@@ -776,36 +777,36 @@ function Pn(f) {
776
777
  transparent: !1,
777
778
  depthTest: !0,
778
779
  side: nn
779
- })), f.DefaultMaterial;
780
+ })), h.DefaultMaterial;
780
781
  }
781
- function O(f, n, e) {
782
+ function O(h, n, e) {
782
783
  for (const t in e.extensions)
783
- f[t] === void 0 && (n.userData.gltfExtensions = n.userData.gltfExtensions || {}, n.userData.gltfExtensions[t] = e.extensions[t]);
784
+ h[t] === void 0 && (n.userData.gltfExtensions = n.userData.gltfExtensions || {}, n.userData.gltfExtensions[t] = e.extensions[t]);
784
785
  }
785
- function y(f, n) {
786
- n.extras !== void 0 && (typeof n.extras == "object" ? Object.assign(f.userData, n.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + n.extras));
786
+ function y(h, n) {
787
+ n.extras !== void 0 && (typeof n.extras == "object" ? Object.assign(h.userData, n.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + n.extras));
787
788
  }
788
- function kn(f, n, e) {
789
+ function kn(h, n, e) {
789
790
  let t = !1, s = !1, i = !1;
790
791
  for (let c = 0, l = n.length; c < l; c++) {
791
792
  const u = n[c];
792
793
  if (u.POSITION !== void 0 && (t = !0), u.NORMAL !== void 0 && (s = !0), u.COLOR_0 !== void 0 && (i = !0), t && s && i) break;
793
794
  }
794
- if (!t && !s && !i) return Promise.resolve(f);
795
+ if (!t && !s && !i) return Promise.resolve(h);
795
796
  const o = [], a = [], r = [];
796
797
  for (let c = 0, l = n.length; c < l; c++) {
797
798
  const u = n[c];
798
799
  if (t) {
799
- const h = u.POSITION !== void 0 ? e.getDependency("accessor", u.POSITION) : f.attributes.position;
800
- o.push(h);
800
+ const f = u.POSITION !== void 0 ? e.getDependency("accessor", u.POSITION) : h.attributes.position;
801
+ o.push(f);
801
802
  }
802
803
  if (s) {
803
- const h = u.NORMAL !== void 0 ? e.getDependency("accessor", u.NORMAL) : f.attributes.normal;
804
- a.push(h);
804
+ const f = u.NORMAL !== void 0 ? e.getDependency("accessor", u.NORMAL) : h.attributes.normal;
805
+ a.push(f);
805
806
  }
806
807
  if (i) {
807
- const h = u.COLOR_0 !== void 0 ? e.getDependency("accessor", u.COLOR_0) : f.attributes.color;
808
- r.push(h);
808
+ const f = u.COLOR_0 !== void 0 ? e.getDependency("accessor", u.COLOR_0) : h.attributes.color;
809
+ r.push(f);
809
810
  }
810
811
  }
811
812
  return Promise.all([
@@ -813,41 +814,41 @@ function kn(f, n, e) {
813
814
  Promise.all(a),
814
815
  Promise.all(r)
815
816
  ]).then(function(c) {
816
- const l = c[0], u = c[1], h = c[2];
817
- return t && (f.morphAttributes.position = l), s && (f.morphAttributes.normal = u), i && (f.morphAttributes.color = h), f.morphTargetsRelative = !0, f;
817
+ const l = c[0], u = c[1], f = c[2];
818
+ return t && (h.morphAttributes.position = l), s && (h.morphAttributes.normal = u), i && (h.morphAttributes.color = f), h.morphTargetsRelative = !0, h;
818
819
  });
819
820
  }
820
- function Hn(f, n) {
821
- if (f.updateMorphTargets(), n.weights !== void 0)
821
+ function Hn(h, n) {
822
+ if (h.updateMorphTargets(), n.weights !== void 0)
822
823
  for (let e = 0, t = n.weights.length; e < t; e++)
823
- f.morphTargetInfluences[e] = n.weights[e];
824
+ h.morphTargetInfluences[e] = n.weights[e];
824
825
  if (n.extras && Array.isArray(n.extras.targetNames)) {
825
826
  const e = n.extras.targetNames;
826
- if (f.morphTargetInfluences.length === e.length) {
827
- f.morphTargetDictionary = {};
827
+ if (h.morphTargetInfluences.length === e.length) {
828
+ h.morphTargetDictionary = {};
828
829
  for (let t = 0, s = e.length; t < s; t++)
829
- f.morphTargetDictionary[e[t]] = t;
830
+ h.morphTargetDictionary[e[t]] = t;
830
831
  } else
831
832
  console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
832
833
  }
833
834
  }
834
- function Dn(f) {
835
+ function Dn(h) {
835
836
  let n;
836
- const e = f.extensions && f.extensions[g.KHR_DRACO_MESH_COMPRESSION];
837
- if (e ? n = "draco:" + e.bufferView + ":" + e.indices + ":" + Y(e.attributes) : n = f.indices + ":" + Y(f.attributes) + ":" + f.mode, f.targets !== void 0)
838
- for (let t = 0, s = f.targets.length; t < s; t++)
839
- n += ":" + Y(f.targets[t]);
837
+ const e = h.extensions && h.extensions[g.KHR_DRACO_MESH_COMPRESSION];
838
+ if (e ? n = "draco:" + e.bufferView + ":" + e.indices + ":" + Y(e.attributes) : n = h.indices + ":" + Y(h.attributes) + ":" + h.mode, h.targets !== void 0)
839
+ for (let t = 0, s = h.targets.length; t < s; t++)
840
+ n += ":" + Y(h.targets[t]);
840
841
  return n;
841
842
  }
842
- function Y(f) {
843
+ function Y(h) {
843
844
  let n = "";
844
- const e = Object.keys(f).sort();
845
+ const e = Object.keys(h).sort();
845
846
  for (let t = 0, s = e.length; t < s; t++)
846
- n += e[t] + ":" + f[e[t]] + ";";
847
+ n += e[t] + ":" + h[e[t]] + ";";
847
848
  return n;
848
849
  }
849
- function $(f) {
850
- switch (f) {
850
+ function $(h) {
851
+ switch (h) {
851
852
  case Int8Array:
852
853
  return 1 / 127;
853
854
  case Uint8Array:
@@ -860,8 +861,8 @@ function $(f) {
860
861
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
861
862
  }
862
863
  }
863
- function vn(f) {
864
- return f.search(/\.jpe?g($|\?)/i) > 0 || f.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : f.search(/\.webp($|\?)/i) > 0 || f.search(/^data\:image\/webp/) === 0 ? "image/webp" : f.search(/\.ktx2($|\?)/i) > 0 || f.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
864
+ function vn(h) {
865
+ return h.search(/\.jpe?g($|\?)/i) > 0 || h.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : h.search(/\.webp($|\?)/i) > 0 || h.search(/^data\:image\/webp/) === 0 ? "image/webp" : h.search(/\.ktx2($|\?)/i) > 0 || h.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
865
866
  }
866
867
  const Gn = new K();
867
868
  class Un {
@@ -874,7 +875,7 @@ class Un {
874
875
  const r = a.match(/Version\/(\d+)/);
875
876
  s = t && r ? parseInt(r[1], 10) : -1, i = a.indexOf("Firefox") > -1, o = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
876
877
  }
877
- typeof createImageBitmap > "u" || t && s < 17 || i && o < 98 ? this.textureLoader = new be(this.options.manager) : this.textureLoader = new Ne(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new he(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
878
+ typeof createImageBitmap > "u" || t && s < 17 || i && o < 98 ? this.textureLoader = new be(this.options.manager) : this.textureLoader = new Ne(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new fe(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
878
879
  }
879
880
  setExtensions(n) {
880
881
  this.extensions = n;
@@ -1119,14 +1120,14 @@ class Un {
1119
1120
  }
1120
1121
  const i = [];
1121
1122
  return s.bufferView !== void 0 ? i.push(this.getDependency("bufferView", s.bufferView)) : i.push(null), s.sparse !== void 0 && (i.push(this.getDependency("bufferView", s.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", s.sparse.values.bufferView))), Promise.all(i).then(function(o) {
1122
- const a = o[0], r = q[s.type], c = k[s.componentType], l = c.BYTES_PER_ELEMENT, u = l * r, h = s.byteOffset || 0, d = s.bufferView !== void 0 ? t.bufferViews[s.bufferView].byteStride : void 0, p = s.normalized === !0;
1123
+ const a = o[0], r = q[s.type], c = k[s.componentType], l = c.BYTES_PER_ELEMENT, u = l * r, f = s.byteOffset || 0, d = s.bufferView !== void 0 ? t.bufferViews[s.bufferView].byteStride : void 0, p = s.normalized === !0;
1123
1124
  let R, m;
1124
1125
  if (d && d !== u) {
1125
- const T = Math.floor(h / d), _ = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + T + ":" + s.count;
1126
+ const T = Math.floor(f / d), _ = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + T + ":" + s.count;
1126
1127
  let x = e.cache.get(_);
1127
- x || (R = new c(a, T * d, s.count * d / l), x = new Ie(R, d / l), e.cache.add(_, x)), m = new en(x, r, h % d / l, p);
1128
+ x || (R = new c(a, T * d, s.count * d / l), x = new Ie(R, d / l), e.cache.add(_, x)), m = new en(x, r, f % d / l, p);
1128
1129
  } else
1129
- a === null ? R = new c(s.count * r) : R = new c(a, h, s.count * r), m = new V(R, r, p);
1130
+ a === null ? R = new c(s.count * r) : R = new c(a, f, s.count * r), m = new V(R, r, p);
1130
1131
  if (s.sparse !== void 0) {
1131
1132
  const T = q.SCALAR, _ = k[s.sparse.indices.componentType], x = s.sparse.indices.byteOffset || 0, E = s.sparse.values.byteOffset || 0, L = new _(o[1], x, s.sparse.count * T), N = new c(o[2], E, s.sparse.count * r);
1132
1133
  a !== null && (m = new V(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
@@ -1161,8 +1162,8 @@ class Un {
1161
1162
  return this.textureCache[r];
1162
1163
  const c = this.loadImageSource(e, t).then(function(l) {
1163
1164
  l.flipY = !1, l.name = o.name || a.name || "", l.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (l.name = a.uri);
1164
- const h = (i.samplers || {})[o.sampler] || {};
1165
- return l.magFilter = ce[h.magFilter] || Q, l.minFilter = ce[h.minFilter] || me, l.wrapS = ue[h.wrapS] || J, l.wrapT = ue[h.wrapT] || J, l.generateMipmaps = !l.isCompressedTexture && l.minFilter !== ge && l.minFilter !== Q, s.associations.set(l, { textures: n }), l;
1165
+ const f = (i.samplers || {})[o.sampler] || {};
1166
+ return l.magFilter = ce[f.magFilter] || Q, l.minFilter = ce[f.minFilter] || me, l.wrapS = ue[f.wrapS] || J, l.wrapT = ue[f.wrapT] || J, l.generateMipmaps = !l.isCompressedTexture && l.minFilter !== ge && l.minFilter !== Q, s.associations.set(l, { textures: n }), l;
1166
1167
  }).catch(function() {
1167
1168
  return null;
1168
1169
  });
@@ -1177,17 +1178,17 @@ class Un {
1177
1178
  if (o.bufferView !== void 0)
1178
1179
  r = t.getDependency("bufferView", o.bufferView).then(function(u) {
1179
1180
  c = !0;
1180
- const h = new Blob([u], { type: o.mimeType });
1181
- return r = a.createObjectURL(h), r;
1181
+ const f = new Blob([u], { type: o.mimeType });
1182
+ return r = a.createObjectURL(f), r;
1182
1183
  });
1183
1184
  else if (o.uri === void 0)
1184
1185
  throw new Error("THREE.GLTFLoader: Image " + n + " is missing URI and bufferView");
1185
1186
  const l = Promise.resolve(r).then(function(u) {
1186
- return new Promise(function(h, d) {
1187
- let p = h;
1187
+ return new Promise(function(f, d) {
1188
+ let p = f;
1188
1189
  e.isImageBitmapLoader === !0 && (p = function(R) {
1189
- const m = new ne(R);
1190
- m.needsUpdate = !0, h(m);
1190
+ const m = new ee(R);
1191
+ m.needsUpdate = !0, f(m);
1191
1192
  }), e.load(G.resolveURL(u, i.path), p, void 0, d);
1192
1193
  });
1193
1194
  }).then(function(u) {
@@ -1272,18 +1273,18 @@ class Un {
1272
1273
  } else {
1273
1274
  const u = i.pbrMetallicRoughness || {};
1274
1275
  if (a.color = new F(1, 1, 1), a.opacity = 1, Array.isArray(u.baseColorFactor)) {
1275
- const h = u.baseColorFactor;
1276
- a.color.setRGB(h[0], h[1], h[2], b), a.opacity = h[3];
1276
+ const f = u.baseColorFactor;
1277
+ a.color.setRGB(f[0], f[1], f[2], b), a.opacity = f[3];
1277
1278
  }
1278
- u.baseColorTexture !== void 0 && c.push(e.assignTexture(a, "map", u.baseColorTexture, U)), a.metalness = u.metallicFactor !== void 0 ? u.metallicFactor : 1, a.roughness = u.roughnessFactor !== void 0 ? u.roughnessFactor : 1, u.metallicRoughnessTexture !== void 0 && (c.push(e.assignTexture(a, "metalnessMap", u.metallicRoughnessTexture)), c.push(e.assignTexture(a, "roughnessMap", u.metallicRoughnessTexture))), o = this._invokeOne(function(h) {
1279
- return h.getMaterialType && h.getMaterialType(n);
1280
- }), c.push(Promise.all(this._invokeAll(function(h) {
1281
- return h.extendMaterialParams && h.extendMaterialParams(n, a);
1279
+ u.baseColorTexture !== void 0 && c.push(e.assignTexture(a, "map", u.baseColorTexture, U)), a.metalness = u.metallicFactor !== void 0 ? u.metallicFactor : 1, a.roughness = u.roughnessFactor !== void 0 ? u.roughnessFactor : 1, u.metallicRoughnessTexture !== void 0 && (c.push(e.assignTexture(a, "metalnessMap", u.metallicRoughnessTexture)), c.push(e.assignTexture(a, "roughnessMap", u.metallicRoughnessTexture))), o = this._invokeOne(function(f) {
1280
+ return f.getMaterialType && f.getMaterialType(n);
1281
+ }), c.push(Promise.all(this._invokeAll(function(f) {
1282
+ return f.extendMaterialParams && f.extendMaterialParams(n, a);
1282
1283
  })));
1283
1284
  }
1284
1285
  i.doubleSided === !0 && (a.side = ve);
1285
1286
  const l = i.alphaMode || W.OPAQUE;
1286
- if (l === W.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, l === W.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== v && (c.push(e.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new fe(1, 1), i.normalTexture.scale !== void 0)) {
1287
+ if (l === W.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, l === W.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== v && (c.push(e.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new he(1, 1), i.normalTexture.scale !== void 0)) {
1287
1288
  const u = i.normalTexture.scale;
1288
1289
  a.normalScale.set(u, u);
1289
1290
  }
@@ -1329,8 +1330,8 @@ class Un {
1329
1330
  if (u)
1330
1331
  o.push(u.promise);
1331
1332
  else {
1332
- let h;
1333
- c.extensions && c.extensions[g.KHR_DRACO_MESH_COMPRESSION] ? h = i(c) : h = le(new Ue(), c, e), s[l] = { primitive: c, promise: h }, o.push(h);
1333
+ let f;
1334
+ c.extensions && c.extensions[g.KHR_DRACO_MESH_COMPRESSION] ? f = i(c) : f = le(new Ue(), c, e), s[l] = { primitive: c, promise: f }, o.push(f);
1334
1335
  }
1335
1336
  }
1336
1337
  return Promise.all(o);
@@ -1355,7 +1356,7 @@ class Un {
1355
1356
  let T;
1356
1357
  const _ = c[d];
1357
1358
  if (m.mode === M.TRIANGLES || m.mode === M.TRIANGLE_STRIP || m.mode === M.TRIANGLE_FAN || m.mode === void 0)
1358
- T = i.isSkinnedMesh === !0 ? new Ke(R, _) : new Be(R, _), T.isSkinnedMesh === !0 && T.normalizeSkinWeights(), m.mode === M.TRIANGLE_STRIP ? T.geometry = ee(T.geometry, on) : m.mode === M.TRIANGLE_FAN && (T.geometry = ee(T.geometry, an));
1359
+ T = i.isSkinnedMesh === !0 ? new Ke(R, _) : new Be(R, _), T.isSkinnedMesh === !0 && T.normalizeSkinWeights(), m.mode === M.TRIANGLE_STRIP ? T.geometry = re(T.geometry, on) : m.mode === M.TRIANGLE_FAN && (T.geometry = re(T.geometry, an));
1359
1360
  else if (m.mode === M.LINES)
1360
1361
  T = new je(R, _);
1361
1362
  else if (m.mode === M.LINE_STRIP)
@@ -1375,11 +1376,11 @@ class Un {
1375
1376
  });
1376
1377
  if (u.length === 1)
1377
1378
  return i.extensions && O(s, u[0], i), u[0];
1378
- const h = new X();
1379
- i.extensions && O(s, h, i), e.associations.set(h, { meshes: n });
1379
+ const f = new X();
1380
+ i.extensions && O(s, f, i), e.associations.set(f, { meshes: n });
1380
1381
  for (let d = 0, p = u.length; d < p; d++)
1381
- h.add(u[d]);
1382
- return h;
1382
+ f.add(u[d]);
1383
+ return f;
1383
1384
  });
1384
1385
  }
1385
1386
  /**
@@ -1415,8 +1416,8 @@ class Un {
1415
1416
  const u = o[c];
1416
1417
  if (u) {
1417
1418
  a.push(u);
1418
- const h = new K();
1419
- i !== null && h.fromArray(i.array, c * 16), r.push(h);
1419
+ const f = new K();
1420
+ i !== null && f.fromArray(i.array, c * 16), r.push(f);
1420
1421
  } else
1421
1422
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', e.joints[c]);
1422
1423
  }
@@ -1432,7 +1433,7 @@ class Un {
1432
1433
  */
1433
1434
  loadAnimation(n) {
1434
1435
  const e = this.json, t = this, s = e.animations[n], i = s.name ? s.name : "animation_" + n, o = [], a = [], r = [], c = [], l = [];
1435
- for (let u = 0, h = s.channels.length; u < h; u++) {
1436
+ for (let u = 0, f = s.channels.length; u < f; u++) {
1436
1437
  const d = s.channels[u], p = s.samplers[d.sampler], R = d.target, m = R.node, T = s.parameters !== void 0 ? s.parameters[p.input] : p.input, _ = s.parameters !== void 0 ? s.parameters[p.output] : p.output;
1437
1438
  R.node !== void 0 && (o.push(this.getDependency("node", m)), a.push(this.getDependency("accessor", T)), r.push(this.getDependency("accessor", _)), c.push(p), l.push(R));
1438
1439
  }
@@ -1443,9 +1444,9 @@ class Un {
1443
1444
  Promise.all(c),
1444
1445
  Promise.all(l)
1445
1446
  ]).then(function(u) {
1446
- const h = u[0], d = u[1], p = u[2], R = u[3], m = u[4], T = [];
1447
- for (let x = 0, E = h.length; x < E; x++) {
1448
- const L = h[x], N = d[x], S = p[x], H = R[x], P = m[x];
1447
+ const f = u[0], d = u[1], p = u[2], R = u[3], m = u[4], T = [];
1448
+ for (let x = 0, E = f.length; x < E; x++) {
1449
+ const L = f[x], N = d[x], S = p[x], H = R[x], P = m[x];
1449
1450
  if (L === void 0) continue;
1450
1451
  L.updateMatrix && L.updateMatrix();
1451
1452
  const B = t._createAnimationTracks(L, N, S, H, P);
@@ -1485,9 +1486,9 @@ class Un {
1485
1486
  Promise.all(o),
1486
1487
  r
1487
1488
  ]).then(function(c) {
1488
- const l = c[0], u = c[1], h = c[2];
1489
- h !== null && l.traverse(function(d) {
1490
- d.isSkinnedMesh && d.bind(h, Gn);
1489
+ const l = c[0], u = c[1], f = c[2];
1490
+ f !== null && l.traverse(function(d) {
1491
+ d.isSkinnedMesh && d.bind(f, Gn);
1491
1492
  });
1492
1493
  for (let d = 0, p = u.length; d < p; d++)
1493
1494
  l.add(u[d]);
@@ -1516,7 +1517,7 @@ class Un {
1516
1517
  }), this.nodeCache[n] = Promise.all(a).then(function(c) {
1517
1518
  let l;
1518
1519
  if (i.isBone === !0 ? l = new Ze() : c.length > 1 ? l = new X() : c.length === 1 ? l = c[0] : l = new pe(), l !== c[0])
1519
- for (let u = 0, h = c.length; u < h; u++)
1520
+ for (let u = 0, f = c.length; u < f; u++)
1520
1521
  l.add(c[u]);
1521
1522
  if (i.name && (l.userData.name = i.name, l.name = o), y(l, i), i.extensions && O(t, l, i), i.matrix !== void 0) {
1522
1523
  const u = new K();
@@ -1547,16 +1548,16 @@ class Un {
1547
1548
  a.push(s.getDependency("node", o[r]));
1548
1549
  return Promise.all(a).then(function(r) {
1549
1550
  for (let l = 0, u = r.length; l < u; l++) {
1550
- const h = r[l];
1551
- h.parent !== null ? i.add(cn(h)) : i.add(h);
1551
+ const f = r[l];
1552
+ f.parent !== null ? i.add(cn(f)) : i.add(f);
1552
1553
  }
1553
1554
  const c = (l) => {
1554
1555
  const u = /* @__PURE__ */ new Map();
1555
- for (const [h, d] of s.associations)
1556
- (h instanceof z || h instanceof ne) && u.set(h, d);
1557
- return l.traverse((h) => {
1558
- const d = s.associations.get(h);
1559
- d != null && u.set(h, d);
1556
+ for (const [f, d] of s.associations)
1557
+ (f instanceof z || f instanceof ee) && u.set(f, d);
1558
+ return l.traverse((f) => {
1559
+ const d = s.associations.get(f);
1560
+ d != null && u.set(f, d);
1560
1561
  }), u;
1561
1562
  };
1562
1563
  return s.associations = c(i), i;
@@ -1564,29 +1565,29 @@ class Un {
1564
1565
  }
1565
1566
  _createAnimationTracks(n, e, t, s, i) {
1566
1567
  const o = [], a = n.name ? n.name : n.uuid, r = [];
1567
- I[i.path] === I.weights ? n.traverse(function(h) {
1568
- h.morphTargetInfluences && r.push(h.name ? h.name : h.uuid);
1568
+ I[i.path] === I.weights ? n.traverse(function(f) {
1569
+ f.morphTargetInfluences && r.push(f.name ? f.name : f.uuid);
1569
1570
  }) : r.push(a);
1570
1571
  let c;
1571
1572
  switch (I[i.path]) {
1572
1573
  case I.weights:
1573
- c = se;
1574
+ c = te;
1574
1575
  break;
1575
1576
  case I.rotation:
1576
- c = ie;
1577
+ c = se;
1577
1578
  break;
1578
1579
  case I.translation:
1579
1580
  case I.scale:
1580
- c = te;
1581
+ c = ne;
1581
1582
  break;
1582
1583
  default:
1583
- t.itemSize === 1 ? c = se : c = te;
1584
+ t.itemSize === 1 ? c = te : c = ne;
1584
1585
  break;
1585
1586
  }
1586
1587
  const l = s.interpolation !== void 0 ? Fn[s.interpolation] : Re, u = this._getArrayFromAccessor(t);
1587
- for (let h = 0, d = r.length; h < d; h++) {
1588
+ for (let f = 0, d = r.length; f < d; f++) {
1588
1589
  const p = new c(
1589
- r[h] + "." + I[i.path],
1590
+ r[f] + "." + I[i.path],
1590
1591
  e.array,
1591
1592
  u,
1592
1593
  l
@@ -1607,12 +1608,12 @@ class Un {
1607
1608
  }
1608
1609
  _createCubicSplineTrackInterpolant(n) {
1609
1610
  n.createInterpolant = function(t) {
1610
- const s = this instanceof ie ? Cn : _e;
1611
+ const s = this instanceof se ? Cn : _e;
1611
1612
  return new s(this.times, this.values, this.getValueSize() / 3, t);
1612
1613
  }, n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
1613
1614
  }
1614
1615
  }
1615
- function Kn(f, n, e) {
1616
+ function Kn(h, n, e) {
1616
1617
  const t = n.attributes, s = new sn();
1617
1618
  if (t.POSITION !== void 0) {
1618
1619
  const a = e.json.accessors[t.POSITION], r = a.min, c = a.max;
@@ -1636,10 +1637,10 @@ function Kn(f, n, e) {
1636
1637
  for (let c = 0, l = i.length; c < l; c++) {
1637
1638
  const u = i[c];
1638
1639
  if (u.POSITION !== void 0) {
1639
- const h = e.json.accessors[u.POSITION], d = h.min, p = h.max;
1640
+ const f = e.json.accessors[u.POSITION], d = f.min, p = f.max;
1640
1641
  if (d !== void 0 && p !== void 0) {
1641
- if (r.setX(Math.max(Math.abs(d[0]), Math.abs(p[0]))), r.setY(Math.max(Math.abs(d[1]), Math.abs(p[1]))), r.setZ(Math.max(Math.abs(d[2]), Math.abs(p[2]))), h.normalized) {
1642
- const R = $(k[h.componentType]);
1642
+ if (r.setX(Math.max(Math.abs(d[0]), Math.abs(p[0]))), r.setY(Math.max(Math.abs(d[1]), Math.abs(p[1]))), r.setZ(Math.max(Math.abs(d[2]), Math.abs(p[2]))), f.normalized) {
1643
+ const R = $(k[f.componentType]);
1643
1644
  r.multiplyScalar(R);
1644
1645
  }
1645
1646
  a.max(r);
@@ -1649,31 +1650,31 @@ function Kn(f, n, e) {
1649
1650
  }
1650
1651
  s.expandByVector(a);
1651
1652
  }
1652
- f.boundingBox = s;
1653
+ h.boundingBox = s;
1653
1654
  const o = new rn();
1654
- s.getCenter(o.center), o.radius = s.min.distanceTo(s.max) / 2, f.boundingSphere = o;
1655
+ s.getCenter(o.center), o.radius = s.min.distanceTo(s.max) / 2, h.boundingSphere = o;
1655
1656
  }
1656
- function le(f, n, e) {
1657
+ function le(h, n, e) {
1657
1658
  const t = n.attributes, s = [];
1658
1659
  function i(o, a) {
1659
1660
  return e.getDependency("accessor", o).then(function(r) {
1660
- f.setAttribute(a, r);
1661
+ h.setAttribute(a, r);
1661
1662
  });
1662
1663
  }
1663
1664
  for (const o in t) {
1664
1665
  const a = Z[o] || o.toLowerCase();
1665
- a in f.attributes || s.push(i(t[o], a));
1666
+ a in h.attributes || s.push(i(t[o], a));
1666
1667
  }
1667
- if (n.indices !== void 0 && !f.index) {
1668
+ if (n.indices !== void 0 && !h.index) {
1668
1669
  const o = e.getDependency("accessor", n.indices).then(function(a) {
1669
- f.setIndex(a);
1670
+ h.setIndex(a);
1670
1671
  });
1671
1672
  s.push(o);
1672
1673
  }
1673
- return re.workingColorSpace !== b && "COLOR_0" in t && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${re.workingColorSpace}" not supported.`), y(f, n), Kn(f, n, e), Promise.all(s).then(function() {
1674
- return n.targets !== void 0 ? kn(f, n.targets, e) : f;
1674
+ return ie.workingColorSpace !== b && "COLOR_0" in t && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ie.workingColorSpace}" not supported.`), y(h, n), Kn(h, n, e), Promise.all(s).then(function() {
1675
+ return n.targets !== void 0 ? kn(h, n.targets, e) : h;
1675
1676
  });
1676
1677
  }
1677
1678
  export {
1678
- jn as GLTFLoader
1679
+ Vn as GLTFLoader
1679
1680
  };