@quick-threejs/reactive 0.1.36 → 0.1.38

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.
package/dist/main.mjs CHANGED
@@ -1,15 +1,10 @@
1
1
  var qe = Object.defineProperty;
2
2
  var Ye = (o, e, t) => e in o ? qe(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
3
  var _ = (o, e, t) => Ye(o, typeof e != "symbol" ? e + "" : e, t);
4
- import { i as Qe, a as Ie, s as z, L as X, C as Je, J as j, K as Ze, P as et, b as Oe, f as tt, m as q, c as Ne, d as b, F as st, S as nt, e as se, W as Re, U as Pe, R as rt, g as it, h as De, A as W, D as $, j as Ee, Q as ot } from "./app.module-C2zKO1QN.mjs";
5
- import { k as tn, o as sn, n as nn, l as rn } from "./app.module-C2zKO1QN.mjs";
6
- import { TrianglesDrawMode as at, TriangleFanDrawMode as le, TriangleStripDrawMode as ke, Loader as Fe, FileLoader as Y, SRGBColorSpace as N, LinearSRGBColorSpace as v, BufferGeometry as He, BufferAttribute as K, Color as P, ColorManagement as he, LoaderUtils as V, SpotLight as ct, PointLight as ut, DirectionalLight as lt, MeshBasicMaterial as B, MeshPhysicalMaterial as S, Vector2 as Ue, Matrix4 as Q, Vector3 as F, Quaternion as Ge, InstancedMesh as ht, InstancedBufferAttribute as dt, Object3D as Be, TextureLoader as ft, ImageBitmapLoader as je, InterleavedBuffer as pt, InterleavedBufferAttribute as mt, LinearFilter as de, LinearMipmapLinearFilter as Ke, RepeatWrapping as fe, NearestFilter as Ve, PointsMaterial as gt, Material as ne, LineBasicMaterial as At, MeshStandardMaterial as ze, DoubleSide as Tt, PropertyBinding as _t, SkinnedMesh as Rt, Mesh as Et, LineSegments as wt, Line as xt, LineLoop as yt, Points as bt, Group as re, PerspectiveCamera as Lt, MathUtils as vt, OrthographicCamera as St, Skeleton as Ct, AnimationClip as Mt, Bone as It, InterpolateLinear as Xe, NearestMipmapNearestFilter as Ot, LinearMipmapNearestFilter as Nt, NearestMipmapLinearFilter as Pt, ClampToEdgeWrapping as Dt, MirroredRepeatWrapping as kt, InterpolateDiscrete as Ft, FrontSide as Ht, Texture as we, VectorKeyframeTrack as xe, NumberKeyframeTrack as ye, QuaternionKeyframeTrack as be, Box3 as Ut, Sphere as Gt, Interpolant as Bt, LoadingManager as jt, AudioLoader as Kt } from "three";
7
- function Vt() {
8
- return function(o) {
9
- Qe()(o), Ie.registerSingleton(o);
10
- };
11
- }
12
- class _e {
4
+ import { s as U, L as G, i as y, C as Qe, J as V, K as Je, P as Ze, a as Ie, f as et, m as q, b as Oe, F as tt, S as st, c as ne, W as Re, U as Ne, R as nt, d as rt, e as Pe, g as it, A as W, D as $, h as Ee, Q as ot } from "./app.module-Cuyp2CTi.mjs";
5
+ import { j as en, n as tn, l as sn, k as nn } from "./app.module-Cuyp2CTi.mjs";
6
+ import { TrianglesDrawMode as at, TriangleFanDrawMode as he, TriangleStripDrawMode as De, Loader as ke, FileLoader as Y, SRGBColorSpace as N, LinearSRGBColorSpace as v, BufferGeometry as Fe, BufferAttribute as z, Color as P, ColorManagement as de, LoaderUtils as X, SpotLight as ct, PointLight as ut, DirectionalLight as lt, MeshBasicMaterial as K, MeshPhysicalMaterial as S, Vector2 as He, Matrix4 as Q, Vector3 as F, Quaternion as Ue, InstancedMesh as ht, InstancedBufferAttribute as dt, Object3D as Ge, TextureLoader as ft, ImageBitmapLoader as Be, InterleavedBuffer as pt, InterleavedBufferAttribute as mt, LinearFilter as fe, LinearMipmapLinearFilter as je, RepeatWrapping as pe, NearestFilter as Ke, PointsMaterial as gt, Material as re, LineBasicMaterial as At, MeshStandardMaterial as Ve, DoubleSide as Tt, PropertyBinding as _t, SkinnedMesh as Rt, Mesh as Et, LineSegments as wt, Line as xt, LineLoop as yt, Points as bt, Group as ie, PerspectiveCamera as Lt, MathUtils as vt, OrthographicCamera as St, Skeleton as Ct, AnimationClip as Mt, Bone as It, InterpolateLinear as ze, NearestMipmapNearestFilter as Ot, LinearMipmapNearestFilter as Nt, NearestMipmapLinearFilter as Pt, ClampToEdgeWrapping as Dt, MirroredRepeatWrapping as kt, InterpolateDiscrete as Ft, FrontSide as Ht, Texture as we, VectorKeyframeTrack as xe, NumberKeyframeTrack as ye, QuaternionKeyframeTrack as be, Box3 as Ut, Sphere as Gt, Interpolant as Bt, LoadingManager as jt, AudioLoader as Kt } from "three";
7
+ class te {
13
8
  constructor() {
14
9
  /**
15
10
  * @description The app worker logic location.
@@ -115,7 +110,7 @@ class _e {
115
110
  _(this, "onReady");
116
111
  }
117
112
  }
118
- class Qs {
113
+ class Ys {
119
114
  constructor() {
120
115
  /** @description Handler triggered when the app is ready. */
121
116
  _(this, "onReady");
@@ -124,7 +119,7 @@ class Qs {
124
119
  function Le(o, e) {
125
120
  if (e === at)
126
121
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), o;
127
- if (e === le || e === ke) {
122
+ if (e === he || e === De) {
128
123
  let t = o.getIndex();
129
124
  if (t === null) {
130
125
  const r = [], a = o.getAttribute("position");
@@ -136,7 +131,7 @@ function Le(o, e) {
136
131
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), o;
137
132
  }
138
133
  const n = t.count - 2, s = [];
139
- if (e === le)
134
+ if (e === he)
140
135
  for (let r = 1; r <= n; r++)
141
136
  s.push(t.getX(0)), s.push(t.getX(r)), s.push(t.getX(r + 1));
142
137
  else
@@ -148,8 +143,8 @@ function Le(o, e) {
148
143
  } else
149
144
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), o;
150
145
  }
151
- const ie = /* @__PURE__ */ new WeakMap();
152
- class zt extends Fe {
146
+ const oe = /* @__PURE__ */ new WeakMap();
147
+ class Xe extends ke {
153
148
  constructor(e) {
154
149
  super(e), this.decoderPath = "", this.decoderConfig = {}, this.decoderBinary = null, this.decoderPending = null, this.workerLimit = 4, this.workerPool = [], this.workerNextTaskID = 1, this.workerSourceURL = "", this.defaultAttributeIDs = {
155
150
  position: "POSITION",
@@ -194,8 +189,8 @@ class zt extends Fe {
194
189
  }
195
190
  decodeGeometry(e, t) {
196
191
  const n = JSON.stringify(t);
197
- if (ie.has(e)) {
198
- const c = ie.get(e);
192
+ if (oe.has(e)) {
193
+ const c = oe.get(e);
199
194
  if (c.key === n)
200
195
  return c.promise;
201
196
  if (e.byteLength === 0)
@@ -209,16 +204,16 @@ class zt extends Fe {
209
204
  }))).then((c) => this._createGeometry(c.geometry));
210
205
  return a.catch(() => !0).then(() => {
211
206
  s && i && this._releaseTask(s, i);
212
- }), ie.set(e, {
207
+ }), oe.set(e, {
213
208
  key: n,
214
209
  promise: a
215
210
  }), a;
216
211
  }
217
212
  _createGeometry(e) {
218
- const t = new He();
219
- e.index && t.setIndex(new K(e.index.array, 1));
213
+ const t = new Fe();
214
+ e.index && t.setIndex(new z(e.index.array, 1));
220
215
  for (let n = 0; n < e.attributes.length; n++) {
221
- const s = e.attributes[n], i = s.name, r = s.array, a = s.itemSize, c = new K(r, a);
216
+ const s = e.attributes[n], i = s.name, r = s.array, a = s.itemSize, c = new z(r, a);
222
217
  i === "color" && (this._assignVertexColorSpace(c, s.vertexColorSpace), c.normalized = !(r instanceof Float32Array)), t.setAttribute(i, c);
223
218
  }
224
219
  return t;
@@ -227,7 +222,7 @@ class zt extends Fe {
227
222
  if (t !== N) return;
228
223
  const n = new P();
229
224
  for (let s = 0, i = e.count; s < i; s++)
230
- n.fromBufferAttribute(e, s), he.toWorkingColorSpace(n, N), e.setXYZ(s, n.r, n.g, n.b);
225
+ n.fromBufferAttribute(e, s), de.toWorkingColorSpace(n, N), e.setXYZ(s, n.r, n.g, n.b);
231
226
  }
232
227
  _loadLibrary(e, t) {
233
228
  const n = new Y(this.manager);
@@ -244,7 +239,7 @@ class zt extends Fe {
244
239
  return e ? t.push(this._loadLibrary("draco_decoder.js", "text")) : (t.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), t.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(t).then((n) => {
245
240
  const s = n[0];
246
241
  e || (this.decoderConfig.wasmBinary = n[1]);
247
- const i = Xt.toString(), r = [
242
+ const i = Vt.toString(), r = [
248
243
  "/* draco decoder */",
249
244
  s,
250
245
  "",
@@ -292,7 +287,7 @@ class zt extends Fe {
292
287
  return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
293
288
  }
294
289
  }
295
- function Xt() {
290
+ function Vt() {
296
291
  let o, e;
297
292
  onmessage = function(r) {
298
293
  const a = r.data;
@@ -382,42 +377,42 @@ function Xt() {
382
377
  }
383
378
  }
384
379
  }
385
- class Wt extends Fe {
380
+ class zt extends ke {
386
381
  constructor(e) {
387
382
  super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(t) {
388
- return new Jt(t);
383
+ return new Yt(t);
389
384
  }), this.register(function(t) {
390
- return new Zt(t);
385
+ return new Qt(t);
386
+ }), this.register(function(t) {
387
+ return new os(t);
388
+ }), this.register(function(t) {
389
+ return new as(t);
391
390
  }), this.register(function(t) {
392
391
  return new cs(t);
393
392
  }), this.register(function(t) {
394
- return new us(t);
393
+ return new Zt(t);
395
394
  }), this.register(function(t) {
396
- return new ls(t);
395
+ return new es(t);
397
396
  }), this.register(function(t) {
398
397
  return new ts(t);
399
398
  }), this.register(function(t) {
400
399
  return new ss(t);
401
400
  }), this.register(function(t) {
402
- return new ns(t);
401
+ return new qt(t);
403
402
  }), this.register(function(t) {
404
- return new rs(t);
403
+ return new ns(t);
405
404
  }), this.register(function(t) {
406
- return new Qt(t);
405
+ return new Jt(t);
407
406
  }), this.register(function(t) {
408
407
  return new is(t);
409
408
  }), this.register(function(t) {
410
- return new es(t);
411
- }), this.register(function(t) {
412
- return new as(t);
413
- }), this.register(function(t) {
414
- return new os(t);
409
+ return new rs(t);
415
410
  }), this.register(function(t) {
416
- return new qt(t);
411
+ return new Wt(t);
417
412
  }), this.register(function(t) {
418
- return new hs(t);
413
+ return new us(t);
419
414
  }), this.register(function(t) {
420
- return new ds(t);
415
+ return new ls(t);
421
416
  });
422
417
  }
423
418
  load(e, t, n, s) {
@@ -426,10 +421,10 @@ class Wt extends Fe {
426
421
  if (this.resourcePath !== "")
427
422
  r = this.resourcePath;
428
423
  else if (this.path !== "") {
429
- const u = V.extractUrlBase(e);
430
- r = V.resolveURL(u, this.path);
424
+ const u = X.extractUrlBase(e);
425
+ r = X.resolveURL(u, this.path);
431
426
  } else
432
- r = V.extractUrlBase(e);
427
+ r = X.extractUrlBase(e);
433
428
  this.manager.itemStart(e);
434
429
  const a = function(u) {
435
430
  s ? s(u) : console.error(u), i.manager.itemError(e), i.manager.itemEnd(e);
@@ -467,7 +462,7 @@ class Wt extends Fe {
467
462
  else if (e instanceof ArrayBuffer)
468
463
  if (c.decode(new Uint8Array(e, 0, 4)) === We) {
469
464
  try {
470
- r[T.KHR_BINARY_GLTF] = new fs(e);
465
+ r[T.KHR_BINARY_GLTF] = new hs(e);
471
466
  } catch (l) {
472
467
  s && s(l);
473
468
  return;
@@ -481,7 +476,7 @@ class Wt extends Fe {
481
476
  s && s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
482
477
  return;
483
478
  }
484
- const u = new Ls(i, {
479
+ const u = new ys(i, {
485
480
  path: t || this.resourcePath || "",
486
481
  crossOrigin: this.crossOrigin,
487
482
  requestHeader: this.requestHeader,
@@ -499,16 +494,16 @@ class Wt extends Fe {
499
494
  const l = i.extensionsUsed[h], d = i.extensionsRequired || [];
500
495
  switch (l) {
501
496
  case T.KHR_MATERIALS_UNLIT:
502
- r[l] = new Yt();
497
+ r[l] = new $t();
503
498
  break;
504
499
  case T.KHR_DRACO_MESH_COMPRESSION:
505
- r[l] = new ps(i, this.dracoLoader);
500
+ r[l] = new ds(i, this.dracoLoader);
506
501
  break;
507
502
  case T.KHR_TEXTURE_TRANSFORM:
508
- r[l] = new ms();
503
+ r[l] = new fs();
509
504
  break;
510
505
  case T.KHR_MESH_QUANTIZATION:
511
- r[l] = new gs();
506
+ r[l] = new ps();
512
507
  break;
513
508
  default:
514
509
  d.indexOf(l) >= 0 && a[l] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + l + '".');
@@ -523,7 +518,7 @@ class Wt extends Fe {
523
518
  });
524
519
  }
525
520
  }
526
- function $t() {
521
+ function Xt() {
527
522
  let o = {};
528
523
  return {
529
524
  get: function(e) {
@@ -564,7 +559,7 @@ const T = {
564
559
  EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
565
560
  EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
566
561
  };
567
- class qt {
562
+ class Wt {
568
563
  constructor(e) {
569
564
  this.parser = e, this.name = T.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
570
565
  }
@@ -610,12 +605,12 @@ class qt {
610
605
  });
611
606
  }
612
607
  }
613
- class Yt {
608
+ class $t {
614
609
  constructor() {
615
610
  this.name = T.KHR_MATERIALS_UNLIT;
616
611
  }
617
612
  getMaterialType() {
618
- return B;
613
+ return K;
619
614
  }
620
615
  extendParams(e, t, n) {
621
616
  const s = [];
@@ -631,7 +626,7 @@ class Yt {
631
626
  return Promise.all(s);
632
627
  }
633
628
  }
634
- class Qt {
629
+ class qt {
635
630
  constructor(e) {
636
631
  this.parser = e, this.name = T.KHR_MATERIALS_EMISSIVE_STRENGTH;
637
632
  }
@@ -643,7 +638,7 @@ class Qt {
643
638
  return i !== void 0 && (t.emissiveIntensity = i), Promise.resolve();
644
639
  }
645
640
  }
646
- class Jt {
641
+ class Yt {
647
642
  constructor(e) {
648
643
  this.parser = e, this.name = T.KHR_MATERIALS_CLEARCOAT;
649
644
  }
@@ -658,12 +653,12 @@ class Jt {
658
653
  const i = [], r = s.extensions[this.name];
659
654
  if (r.clearcoatFactor !== void 0 && (t.clearcoat = r.clearcoatFactor), r.clearcoatTexture !== void 0 && i.push(n.assignTexture(t, "clearcoatMap", r.clearcoatTexture)), r.clearcoatRoughnessFactor !== void 0 && (t.clearcoatRoughness = r.clearcoatRoughnessFactor), r.clearcoatRoughnessTexture !== void 0 && i.push(n.assignTexture(t, "clearcoatRoughnessMap", r.clearcoatRoughnessTexture)), r.clearcoatNormalTexture !== void 0 && (i.push(n.assignTexture(t, "clearcoatNormalMap", r.clearcoatNormalTexture)), r.clearcoatNormalTexture.scale !== void 0)) {
660
655
  const a = r.clearcoatNormalTexture.scale;
661
- t.clearcoatNormalScale = new Ue(a, a);
656
+ t.clearcoatNormalScale = new He(a, a);
662
657
  }
663
658
  return Promise.all(i);
664
659
  }
665
660
  }
666
- class Zt {
661
+ class Qt {
667
662
  constructor(e) {
668
663
  this.parser = e, this.name = T.KHR_MATERIALS_DISPERSION;
669
664
  }
@@ -679,7 +674,7 @@ class Zt {
679
674
  return t.dispersion = i.dispersion !== void 0 ? i.dispersion : 0, Promise.resolve();
680
675
  }
681
676
  }
682
- class es {
677
+ class Jt {
683
678
  constructor(e) {
684
679
  this.parser = e, this.name = T.KHR_MATERIALS_IRIDESCENCE;
685
680
  }
@@ -695,7 +690,7 @@ class es {
695
690
  return r.iridescenceFactor !== void 0 && (t.iridescence = r.iridescenceFactor), r.iridescenceTexture !== void 0 && i.push(n.assignTexture(t, "iridescenceMap", r.iridescenceTexture)), r.iridescenceIor !== void 0 && (t.iridescenceIOR = r.iridescenceIor), t.iridescenceThicknessRange === void 0 && (t.iridescenceThicknessRange = [100, 400]), r.iridescenceThicknessMinimum !== void 0 && (t.iridescenceThicknessRange[0] = r.iridescenceThicknessMinimum), r.iridescenceThicknessMaximum !== void 0 && (t.iridescenceThicknessRange[1] = r.iridescenceThicknessMaximum), r.iridescenceThicknessTexture !== void 0 && i.push(n.assignTexture(t, "iridescenceThicknessMap", r.iridescenceThicknessTexture)), Promise.all(i);
696
691
  }
697
692
  }
698
- class ts {
693
+ class Zt {
699
694
  constructor(e) {
700
695
  this.parser = e, this.name = T.KHR_MATERIALS_SHEEN;
701
696
  }
@@ -717,7 +712,7 @@ class ts {
717
712
  return r.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = r.sheenRoughnessFactor), r.sheenColorTexture !== void 0 && i.push(n.assignTexture(t, "sheenColorMap", r.sheenColorTexture, N)), r.sheenRoughnessTexture !== void 0 && i.push(n.assignTexture(t, "sheenRoughnessMap", r.sheenRoughnessTexture)), Promise.all(i);
718
713
  }
719
714
  }
720
- class ss {
715
+ class es {
721
716
  constructor(e) {
722
717
  this.parser = e, this.name = T.KHR_MATERIALS_TRANSMISSION;
723
718
  }
@@ -733,7 +728,7 @@ class ss {
733
728
  return r.transmissionFactor !== void 0 && (t.transmission = r.transmissionFactor), r.transmissionTexture !== void 0 && i.push(n.assignTexture(t, "transmissionMap", r.transmissionTexture)), Promise.all(i);
734
729
  }
735
730
  }
736
- class ns {
731
+ class ts {
737
732
  constructor(e) {
738
733
  this.parser = e, this.name = T.KHR_MATERIALS_VOLUME;
739
734
  }
@@ -751,7 +746,7 @@ class ns {
751
746
  return t.attenuationColor = new P().setRGB(a[0], a[1], a[2], v), Promise.all(i);
752
747
  }
753
748
  }
754
- class rs {
749
+ class ss {
755
750
  constructor(e) {
756
751
  this.parser = e, this.name = T.KHR_MATERIALS_IOR;
757
752
  }
@@ -767,7 +762,7 @@ class rs {
767
762
  return t.ior = i.ior !== void 0 ? i.ior : 1.5, Promise.resolve();
768
763
  }
769
764
  }
770
- class is {
765
+ class ns {
771
766
  constructor(e) {
772
767
  this.parser = e, this.name = T.KHR_MATERIALS_SPECULAR;
773
768
  }
@@ -785,7 +780,7 @@ class is {
785
780
  return t.specularColor = new P().setRGB(a[0], a[1], a[2], v), r.specularColorTexture !== void 0 && i.push(n.assignTexture(t, "specularColorMap", r.specularColorTexture, N)), Promise.all(i);
786
781
  }
787
782
  }
788
- class os {
783
+ class rs {
789
784
  constructor(e) {
790
785
  this.parser = e, this.name = T.EXT_MATERIALS_BUMP;
791
786
  }
@@ -801,7 +796,7 @@ class os {
801
796
  return t.bumpScale = r.bumpFactor !== void 0 ? r.bumpFactor : 1, r.bumpTexture !== void 0 && i.push(n.assignTexture(t, "bumpMap", r.bumpTexture)), Promise.all(i);
802
797
  }
803
798
  }
804
- class as {
799
+ class is {
805
800
  constructor(e) {
806
801
  this.parser = e, this.name = T.KHR_MATERIALS_ANISOTROPY;
807
802
  }
@@ -817,7 +812,7 @@ class as {
817
812
  return r.anisotropyStrength !== void 0 && (t.anisotropy = r.anisotropyStrength), r.anisotropyRotation !== void 0 && (t.anisotropyRotation = r.anisotropyRotation), r.anisotropyTexture !== void 0 && i.push(n.assignTexture(t, "anisotropyMap", r.anisotropyTexture)), Promise.all(i);
818
813
  }
819
814
  }
820
- class cs {
815
+ class os {
821
816
  constructor(e) {
822
817
  this.parser = e, this.name = T.KHR_TEXTURE_BASISU;
823
818
  }
@@ -834,7 +829,7 @@ class cs {
834
829
  return t.loadTextureImage(e, i.source, r);
835
830
  }
836
831
  }
837
- class us {
832
+ class as {
838
833
  constructor(e) {
839
834
  this.parser = e, this.name = T.EXT_TEXTURE_WEBP, this.isSupported = null;
840
835
  }
@@ -864,7 +859,7 @@ class us {
864
859
  })), this.isSupported;
865
860
  }
866
861
  }
867
- class ls {
862
+ class cs {
868
863
  constructor(e) {
869
864
  this.parser = e, this.name = T.EXT_TEXTURE_AVIF, this.isSupported = null;
870
865
  }
@@ -894,7 +889,7 @@ class ls {
894
889
  })), this.isSupported;
895
890
  }
896
891
  }
897
- class hs {
892
+ class us {
898
893
  constructor(e) {
899
894
  this.name = T.EXT_MESHOPT_COMPRESSION, this.parser = e;
900
895
  }
@@ -920,7 +915,7 @@ class hs {
920
915
  return null;
921
916
  }
922
917
  }
923
- class ds {
918
+ class ls {
924
919
  constructor(e) {
925
920
  this.name = T.EXT_MESH_GPU_INSTANCING, this.parser = e;
926
921
  }
@@ -938,7 +933,7 @@ class ds {
938
933
  return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((u) => {
939
934
  const h = u.pop(), l = h.isGroup ? h.children : [h], d = u[0].count, f = [];
940
935
  for (const p of l) {
941
- const A = new Q(), m = new F(), g = new Ge(), R = new F(1, 1, 1), w = new ht(p.geometry, p.material, d);
936
+ const A = new Q(), m = new F(), g = new Ue(), R = new F(1, 1, 1), w = new ht(p.geometry, p.material, d);
942
937
  for (let E = 0; E < d; E++)
943
938
  c.TRANSLATION && m.fromBufferAttribute(c.TRANSLATION, E), c.ROTATION && g.fromBufferAttribute(c.ROTATION, E), c.SCALE && R.fromBufferAttribute(c.SCALE, E), w.setMatrixAt(E, A.compose(m, g, R));
944
939
  for (const E in c)
@@ -946,17 +941,17 @@ class ds {
946
941
  const L = c[E];
947
942
  w.instanceColor = new dt(L.array, L.itemSize, L.normalized);
948
943
  } else E !== "TRANSLATION" && E !== "ROTATION" && E !== "SCALE" && p.geometry.setAttribute(E, c[E]);
949
- Be.prototype.copy.call(w, p), this.parser.assignFinalMaterial(w), f.push(w);
944
+ Ge.prototype.copy.call(w, p), this.parser.assignFinalMaterial(w), f.push(w);
950
945
  }
951
946
  return h.isGroup ? (h.clear(), h.add(...f), h) : f[0];
952
947
  }));
953
948
  }
954
949
  }
955
- const We = "glTF", G = 12, ve = { JSON: 1313821514, BIN: 5130562 };
956
- class fs {
950
+ const We = "glTF", j = 12, ve = { JSON: 1313821514, BIN: 5130562 };
951
+ class hs {
957
952
  constructor(e) {
958
953
  this.name = T.KHR_BINARY_GLTF, this.content = null, this.body = null;
959
- const t = new DataView(e, 0, G), n = new TextDecoder();
954
+ const t = new DataView(e, 0, j), n = new TextDecoder();
960
955
  if (this.header = {
961
956
  magic: n.decode(new Uint8Array(e.slice(0, 4))),
962
957
  version: t.getUint32(4, !0),
@@ -965,17 +960,17 @@ class fs {
965
960
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
966
961
  if (this.header.version < 2)
967
962
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
968
- const s = this.header.length - G, i = new DataView(e, G);
963
+ const s = this.header.length - j, i = new DataView(e, j);
969
964
  let r = 0;
970
965
  for (; r < s; ) {
971
966
  const a = i.getUint32(r, !0);
972
967
  r += 4;
973
968
  const c = i.getUint32(r, !0);
974
969
  if (r += 4, c === ve.JSON) {
975
- const u = new Uint8Array(e, G + r, a);
970
+ const u = new Uint8Array(e, j + r, a);
976
971
  this.content = n.decode(u);
977
972
  } else if (c === ve.BIN) {
978
- const u = G + r;
973
+ const u = j + r;
979
974
  this.body = e.slice(u, u + a);
980
975
  }
981
976
  r += a;
@@ -984,7 +979,7 @@ class fs {
984
979
  throw new Error("THREE.GLTFLoader: JSON content not found.");
985
980
  }
986
981
  }
987
- class ps {
982
+ class ds {
988
983
  constructor(e, t) {
989
984
  if (!t)
990
985
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
@@ -993,11 +988,11 @@ class ps {
993
988
  decodePrimitive(e, t) {
994
989
  const n = this.json, s = this.dracoLoader, i = e.extensions[this.name].bufferView, r = e.extensions[this.name].attributes, a = {}, c = {}, u = {};
995
990
  for (const h in r) {
996
- const l = pe[h] || h.toLowerCase();
991
+ const l = me[h] || h.toLowerCase();
997
992
  a[l] = r[h];
998
993
  }
999
994
  for (const h in e.attributes) {
1000
- const l = pe[h] || h.toLowerCase();
995
+ const l = me[h] || h.toLowerCase();
1001
996
  if (r[h] !== void 0) {
1002
997
  const d = n.accessors[e.attributes[h]], f = H[d.componentType];
1003
998
  u[l] = f.name, c[l] = d.normalized === !0;
@@ -1016,7 +1011,7 @@ class ps {
1016
1011
  });
1017
1012
  }
1018
1013
  }
1019
- class ms {
1014
+ class fs {
1020
1015
  constructor() {
1021
1016
  this.name = T.KHR_TEXTURE_TRANSFORM;
1022
1017
  }
@@ -1024,7 +1019,7 @@ class ms {
1024
1019
  return (t.texCoord === void 0 || t.texCoord === e.channel) && t.offset === void 0 && t.rotation === void 0 && t.scale === void 0 || (e = e.clone(), t.texCoord !== void 0 && (e.channel = t.texCoord), t.offset !== void 0 && e.offset.fromArray(t.offset), t.rotation !== void 0 && (e.rotation = t.rotation), t.scale !== void 0 && e.repeat.fromArray(t.scale), e.needsUpdate = !0), e;
1025
1020
  }
1026
1021
  }
1027
- class gs {
1022
+ class ps {
1028
1023
  constructor() {
1029
1024
  this.name = T.KHR_MESH_QUANTIZATION;
1030
1025
  }
@@ -1042,17 +1037,17 @@ class $e extends Bt {
1042
1037
  interpolate_(e, t, n, s) {
1043
1038
  const i = this.resultBuffer, r = this.sampleValues, a = this.valueSize, c = a * 2, u = a * 3, h = s - t, l = (n - t) / h, d = l * l, f = d * l, p = e * u, A = p - u, m = -2 * f + 3 * d, g = f - d, R = 1 - m, w = g - d + l;
1044
1039
  for (let E = 0; E !== a; E++) {
1045
- const L = r[A + E + a], M = r[A + E + c] * h, y = r[p + E + a], U = r[p + E] * h;
1046
- i[E] = R * L + w * M + m * y + g * U;
1040
+ const L = r[A + E + a], M = r[A + E + c] * h, b = r[p + E + a], B = r[p + E] * h;
1041
+ i[E] = R * L + w * M + m * b + g * B;
1047
1042
  }
1048
1043
  return i;
1049
1044
  }
1050
1045
  }
1051
- const As = new Ge();
1052
- class Ts extends $e {
1046
+ const ms = new Ue();
1047
+ class gs extends $e {
1053
1048
  interpolate_(e, t, n, s) {
1054
1049
  const i = super.interpolate_(e, t, n, s);
1055
- return As.fromArray(i).normalize().toArray(i), i;
1050
+ return ms.fromArray(i).normalize().toArray(i), i;
1056
1051
  }
1057
1052
  }
1058
1053
  const x = {
@@ -1083,17 +1078,17 @@ const x = {
1083
1078
  5125: Uint32Array,
1084
1079
  5126: Float32Array
1085
1080
  }, Se = {
1086
- 9728: Ve,
1087
- 9729: de,
1081
+ 9728: Ke,
1082
+ 9729: fe,
1088
1083
  9984: Ot,
1089
1084
  9985: Nt,
1090
1085
  9986: Pt,
1091
- 9987: Ke
1086
+ 9987: je
1092
1087
  }, Ce = {
1093
1088
  33071: Dt,
1094
1089
  33648: kt,
1095
- 10497: fe
1096
- }, oe = {
1090
+ 10497: pe
1091
+ }, ae = {
1097
1092
  SCALAR: 1,
1098
1093
  VEC2: 2,
1099
1094
  VEC3: 3,
@@ -1101,7 +1096,7 @@ const x = {
1101
1096
  MAT2: 4,
1102
1097
  MAT3: 9,
1103
1098
  MAT4: 16
1104
- }, pe = {
1099
+ }, me = {
1105
1100
  POSITION: "position",
1106
1101
  NORMAL: "normal",
1107
1102
  TANGENT: "tangent",
@@ -1117,19 +1112,19 @@ const x = {
1117
1112
  translation: "position",
1118
1113
  rotation: "quaternion",
1119
1114
  weights: "morphTargetInfluences"
1120
- }, _s = {
1115
+ }, As = {
1121
1116
  CUBICSPLINE: void 0,
1122
1117
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
1123
1118
  // keyframe track will be initialized with a default interpolation type, then modified.
1124
- LINEAR: Xe,
1119
+ LINEAR: ze,
1125
1120
  STEP: Ft
1126
- }, ae = {
1121
+ }, ce = {
1127
1122
  OPAQUE: "OPAQUE",
1128
1123
  MASK: "MASK",
1129
1124
  BLEND: "BLEND"
1130
1125
  };
1131
- function Rs(o) {
1132
- return o.DefaultMaterial === void 0 && (o.DefaultMaterial = new ze({
1126
+ function Ts(o) {
1127
+ return o.DefaultMaterial === void 0 && (o.DefaultMaterial = new Ve({
1133
1128
  color: 16777215,
1134
1129
  emissive: 0,
1135
1130
  metalness: 1,
@@ -1146,7 +1141,7 @@ function D(o, e, t) {
1146
1141
  function C(o, e) {
1147
1142
  e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(o.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
1148
1143
  }
1149
- function Es(o, e, t) {
1144
+ function _s(o, e, t) {
1150
1145
  let n = !1, s = !1, i = !1;
1151
1146
  for (let u = 0, h = e.length; u < h; u++) {
1152
1147
  const l = e[u];
@@ -1178,7 +1173,7 @@ function Es(o, e, t) {
1178
1173
  return n && (o.morphAttributes.position = h), s && (o.morphAttributes.normal = l), i && (o.morphAttributes.color = d), o.morphTargetsRelative = !0, o;
1179
1174
  });
1180
1175
  }
1181
- function ws(o, e) {
1176
+ function Rs(o, e) {
1182
1177
  if (o.updateMorphTargets(), e.weights !== void 0)
1183
1178
  for (let t = 0, n = e.weights.length; t < n; t++)
1184
1179
  o.morphTargetInfluences[t] = e.weights[t];
@@ -1192,22 +1187,22 @@ function ws(o, e) {
1192
1187
  console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
1193
1188
  }
1194
1189
  }
1195
- function xs(o) {
1190
+ function Es(o) {
1196
1191
  let e;
1197
1192
  const t = o.extensions && o.extensions[T.KHR_DRACO_MESH_COMPRESSION];
1198
- if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + ce(t.attributes) : e = o.indices + ":" + ce(o.attributes) + ":" + o.mode, o.targets !== void 0)
1193
+ if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + ue(t.attributes) : e = o.indices + ":" + ue(o.attributes) + ":" + o.mode, o.targets !== void 0)
1199
1194
  for (let n = 0, s = o.targets.length; n < s; n++)
1200
- e += ":" + ce(o.targets[n]);
1195
+ e += ":" + ue(o.targets[n]);
1201
1196
  return e;
1202
1197
  }
1203
- function ce(o) {
1198
+ function ue(o) {
1204
1199
  let e = "";
1205
1200
  const t = Object.keys(o).sort();
1206
1201
  for (let n = 0, s = t.length; n < s; n++)
1207
1202
  e += t[n] + ":" + o[t[n]] + ";";
1208
1203
  return e;
1209
1204
  }
1210
- function me(o) {
1205
+ function ge(o) {
1211
1206
  switch (o) {
1212
1207
  case Int8Array:
1213
1208
  return 1 / 127;
@@ -1221,13 +1216,13 @@ function me(o) {
1221
1216
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
1222
1217
  }
1223
1218
  }
1224
- function ys(o) {
1219
+ function ws(o) {
1225
1220
  return o.search(/\.jpe?g($|\?)/i) > 0 || o.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : o.search(/\.webp($|\?)/i) > 0 || o.search(/^data\:image\/webp/) === 0 ? "image/webp" : o.search(/\.ktx2($|\?)/i) > 0 || o.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
1226
1221
  }
1227
- const bs = new Q();
1228
- class Ls {
1222
+ const xs = new Q();
1223
+ class ys {
1229
1224
  constructor(e = {}, t = {}) {
1230
- this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new $t(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
1225
+ this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new Xt(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
1231
1226
  let n = !1, s = -1, i = !1, r = -1;
1232
1227
  if (typeof navigator < "u") {
1233
1228
  const a = navigator.userAgent;
@@ -1235,7 +1230,7 @@ class Ls {
1235
1230
  const c = a.match(/Version\/(\d+)/);
1236
1231
  s = n && c ? parseInt(c[1], 10) : -1, i = a.indexOf("Firefox") > -1, r = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
1237
1232
  }
1238
- typeof createImageBitmap > "u" || n && s < 17 || i && r < 98 ? this.textureLoader = new ft(this.options.manager) : this.textureLoader = new je(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Y(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
1233
+ typeof createImageBitmap > "u" || n && s < 17 || i && r < 98 ? this.textureLoader = new ft(this.options.manager) : this.textureLoader = new Be(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Y(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
1239
1234
  }
1240
1235
  setExtensions(e) {
1241
1236
  this.extensions = e;
@@ -1436,7 +1431,7 @@ class Ls {
1436
1431
  return Promise.resolve(this.extensions[T.KHR_BINARY_GLTF].body);
1437
1432
  const s = this.options;
1438
1433
  return new Promise(function(i, r) {
1439
- n.load(V.resolveURL(t.uri, s.path), i, void 0, function() {
1434
+ n.load(X.resolveURL(t.uri, s.path), i, void 0, function() {
1440
1435
  r(new Error('THREE.GLTFLoader: Failed to load buffer "' + t.uri + '".'));
1441
1436
  });
1442
1437
  });
@@ -1461,25 +1456,25 @@ class Ls {
1461
1456
  loadAccessor(e) {
1462
1457
  const t = this, n = this.json, s = this.json.accessors[e];
1463
1458
  if (s.bufferView === void 0 && s.sparse === void 0) {
1464
- const r = oe[s.type], a = H[s.componentType], c = s.normalized === !0, u = new a(s.count * r);
1465
- return Promise.resolve(new K(u, r, c));
1459
+ const r = ae[s.type], a = H[s.componentType], c = s.normalized === !0, u = new a(s.count * r);
1460
+ return Promise.resolve(new z(u, r, c));
1466
1461
  }
1467
1462
  const i = [];
1468
1463
  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(r) {
1469
- const a = r[0], c = oe[s.type], u = H[s.componentType], h = u.BYTES_PER_ELEMENT, l = h * c, d = s.byteOffset || 0, f = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, p = s.normalized === !0;
1464
+ const a = r[0], c = ae[s.type], u = H[s.componentType], h = u.BYTES_PER_ELEMENT, l = h * c, d = s.byteOffset || 0, f = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, p = s.normalized === !0;
1470
1465
  let A, m;
1471
1466
  if (f && f !== l) {
1472
1467
  const g = Math.floor(d / f), R = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + g + ":" + s.count;
1473
1468
  let w = t.cache.get(R);
1474
1469
  w || (A = new u(a, g * f, s.count * f / h), w = new pt(A, f / h), t.cache.add(R, w)), m = new mt(w, c, d % f / h, p);
1475
1470
  } else
1476
- a === null ? A = new u(s.count * c) : A = new u(a, d, s.count * c), m = new K(A, c, p);
1471
+ a === null ? A = new u(s.count * c) : A = new u(a, d, s.count * c), m = new z(A, c, p);
1477
1472
  if (s.sparse !== void 0) {
1478
- const g = oe.SCALAR, R = H[s.sparse.indices.componentType], w = s.sparse.indices.byteOffset || 0, E = s.sparse.values.byteOffset || 0, L = new R(r[1], w, s.sparse.count * g), M = new u(r[2], E, s.sparse.count * c);
1479
- a !== null && (m = new K(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
1480
- for (let y = 0, U = L.length; y < U; y++) {
1481
- const I = L[y];
1482
- if (m.setX(I, M[y * c]), c >= 2 && m.setY(I, M[y * c + 1]), c >= 3 && m.setZ(I, M[y * c + 2]), c >= 4 && m.setW(I, M[y * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1473
+ const g = ae.SCALAR, R = H[s.sparse.indices.componentType], w = s.sparse.indices.byteOffset || 0, E = s.sparse.values.byteOffset || 0, L = new R(r[1], w, s.sparse.count * g), M = new u(r[2], E, s.sparse.count * c);
1474
+ a !== null && (m = new z(m.array.slice(), m.itemSize, m.normalized)), m.normalized = !1;
1475
+ for (let b = 0, B = L.length; b < B; b++) {
1476
+ const I = L[b];
1477
+ if (m.setX(I, M[b * c]), c >= 2 && m.setY(I, M[b * c + 1]), c >= 3 && m.setZ(I, M[b * c + 2]), c >= 4 && m.setW(I, M[b * c + 3]), c >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1483
1478
  }
1484
1479
  m.normalized = p;
1485
1480
  }
@@ -1507,7 +1502,7 @@ class Ls {
1507
1502
  const u = this.loadImageSource(t, n).then(function(h) {
1508
1503
  h.flipY = !1, h.name = r.name || a.name || "", h.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (h.name = a.uri);
1509
1504
  const d = (i.samplers || {})[r.sampler] || {};
1510
- return h.magFilter = Se[d.magFilter] || de, h.minFilter = Se[d.minFilter] || Ke, h.wrapS = Ce[d.wrapS] || fe, h.wrapT = Ce[d.wrapT] || fe, h.generateMipmaps = !h.isCompressedTexture && h.minFilter !== Ve && h.minFilter !== de, s.associations.set(h, { textures: e }), h;
1505
+ return h.magFilter = Se[d.magFilter] || fe, h.minFilter = Se[d.minFilter] || je, h.wrapS = Ce[d.wrapS] || pe, h.wrapT = Ce[d.wrapT] || pe, h.generateMipmaps = !h.isCompressedTexture && h.minFilter !== Ke && h.minFilter !== fe, s.associations.set(h, { textures: e }), h;
1511
1506
  }).catch(function() {
1512
1507
  return null;
1513
1508
  });
@@ -1533,10 +1528,10 @@ class Ls {
1533
1528
  t.isImageBitmapLoader === !0 && (p = function(A) {
1534
1529
  const m = new we(A);
1535
1530
  m.needsUpdate = !0, d(m);
1536
- }), t.load(V.resolveURL(l, i.path), p, void 0, f);
1531
+ }), t.load(X.resolveURL(l, i.path), p, void 0, f);
1537
1532
  });
1538
1533
  }).then(function(l) {
1539
- return u === !0 && a.revokeObjectURL(c), C(l, r), l.userData.mimeType = r.mimeType || ys(r.uri), l;
1534
+ return u === !0 && a.revokeObjectURL(c), C(l, r), l.userData.mimeType = r.mimeType || ws(r.uri), l;
1540
1535
  }).catch(function(l) {
1541
1536
  throw console.error("THREE.GLTFLoader: Couldn't load texture", c), l;
1542
1537
  });
@@ -1580,11 +1575,11 @@ class Ls {
1580
1575
  if (e.isPoints) {
1581
1576
  const a = "PointsMaterial:" + n.uuid;
1582
1577
  let c = this.cache.get(a);
1583
- c || (c = new gt(), ne.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, c.sizeAttenuation = !1, this.cache.add(a, c)), n = c;
1578
+ c || (c = new gt(), re.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, c.sizeAttenuation = !1, this.cache.add(a, c)), n = c;
1584
1579
  } else if (e.isLine) {
1585
1580
  const a = "LineBasicMaterial:" + n.uuid;
1586
1581
  let c = this.cache.get(a);
1587
- c || (c = new At(), ne.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, this.cache.add(a, c)), n = c;
1582
+ c || (c = new At(), re.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, this.cache.add(a, c)), n = c;
1588
1583
  }
1589
1584
  if (s || i || r) {
1590
1585
  let a = "ClonedMaterial:" + n.uuid + ":";
@@ -1595,7 +1590,7 @@ class Ls {
1595
1590
  e.material = n;
1596
1591
  }
1597
1592
  getMaterialType() {
1598
- return ze;
1593
+ return Ve;
1599
1594
  }
1600
1595
  /**
1601
1596
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -1622,16 +1617,16 @@ class Ls {
1622
1617
  })));
1623
1618
  }
1624
1619
  i.doubleSided === !0 && (a.side = Tt);
1625
- const h = i.alphaMode || ae.OPAQUE;
1626
- if (h === ae.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, h === ae.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && r !== B && (u.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new Ue(1, 1), i.normalTexture.scale !== void 0)) {
1620
+ const h = i.alphaMode || ce.OPAQUE;
1621
+ if (h === ce.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, h === ce.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && r !== K && (u.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new He(1, 1), i.normalTexture.scale !== void 0)) {
1627
1622
  const l = i.normalTexture.scale;
1628
1623
  a.normalScale.set(l, l);
1629
1624
  }
1630
- if (i.occlusionTexture !== void 0 && r !== B && (u.push(t.assignTexture(a, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && r !== B) {
1625
+ if (i.occlusionTexture !== void 0 && r !== K && (u.push(t.assignTexture(a, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && r !== K) {
1631
1626
  const l = i.emissiveFactor;
1632
1627
  a.emissive = new P().setRGB(l[0], l[1], l[2], v);
1633
1628
  }
1634
- return i.emissiveTexture !== void 0 && r !== B && u.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture, N)), Promise.all(u).then(function() {
1629
+ return i.emissiveTexture !== void 0 && r !== K && u.push(t.assignTexture(a, "emissiveMap", i.emissiveTexture, N)), Promise.all(u).then(function() {
1635
1630
  const l = new r(a);
1636
1631
  return i.name && (l.name = i.name), C(l, i), t.associations.set(l, { materials: e }), i.extensions && D(s, l, i), l;
1637
1632
  });
@@ -1663,12 +1658,12 @@ class Ls {
1663
1658
  }
1664
1659
  const r = [];
1665
1660
  for (let a = 0, c = e.length; a < c; a++) {
1666
- const u = e[a], h = xs(u), l = s[h];
1661
+ const u = e[a], h = Es(u), l = s[h];
1667
1662
  if (l)
1668
1663
  r.push(l.promise);
1669
1664
  else {
1670
1665
  let d;
1671
- u.extensions && u.extensions[T.KHR_DRACO_MESH_COMPRESSION] ? d = i(u) : d = Me(new He(), u, t), s[h] = { primitive: u, promise: d }, r.push(d);
1666
+ u.extensions && u.extensions[T.KHR_DRACO_MESH_COMPRESSION] ? d = i(u) : d = Me(new Fe(), u, t), s[h] = { primitive: u, promise: d }, r.push(d);
1672
1667
  }
1673
1668
  }
1674
1669
  return Promise.all(r);
@@ -1681,7 +1676,7 @@ class Ls {
1681
1676
  loadMesh(e) {
1682
1677
  const t = this, n = this.json, s = this.extensions, i = n.meshes[e], r = i.primitives, a = [];
1683
1678
  for (let c = 0, u = r.length; c < u; c++) {
1684
- const h = r[c].material === void 0 ? Rs(this.cache) : this.getDependency("material", r[c].material);
1679
+ const h = r[c].material === void 0 ? Ts(this.cache) : this.getDependency("material", r[c].material);
1685
1680
  a.push(h);
1686
1681
  }
1687
1682
  return a.push(t.loadGeometries(r)), Promise.all(a).then(function(c) {
@@ -1691,7 +1686,7 @@ class Ls {
1691
1686
  let g;
1692
1687
  const R = u[f];
1693
1688
  if (m.mode === x.TRIANGLES || m.mode === x.TRIANGLE_STRIP || m.mode === x.TRIANGLE_FAN || m.mode === void 0)
1694
- g = i.isSkinnedMesh === !0 ? new Rt(A, R) : new Et(A, R), g.isSkinnedMesh === !0 && g.normalizeSkinWeights(), m.mode === x.TRIANGLE_STRIP ? g.geometry = Le(g.geometry, ke) : m.mode === x.TRIANGLE_FAN && (g.geometry = Le(g.geometry, le));
1689
+ g = i.isSkinnedMesh === !0 ? new Rt(A, R) : new Et(A, R), g.isSkinnedMesh === !0 && g.normalizeSkinWeights(), m.mode === x.TRIANGLE_STRIP ? g.geometry = Le(g.geometry, De) : m.mode === x.TRIANGLE_FAN && (g.geometry = Le(g.geometry, he));
1695
1690
  else if (m.mode === x.LINES)
1696
1691
  g = new wt(A, R);
1697
1692
  else if (m.mode === x.LINE_STRIP)
@@ -1702,7 +1697,7 @@ class Ls {
1702
1697
  g = new bt(A, R);
1703
1698
  else
1704
1699
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + m.mode);
1705
- Object.keys(g.geometry.morphAttributes).length > 0 && ws(g, i), g.name = t.createUniqueName(i.name || "mesh_" + e), C(g, i), m.extensions && D(s, g, m), t.assignFinalMaterial(g), l.push(g);
1700
+ Object.keys(g.geometry.morphAttributes).length > 0 && Rs(g, i), g.name = t.createUniqueName(i.name || "mesh_" + e), C(g, i), m.extensions && D(s, g, m), t.assignFinalMaterial(g), l.push(g);
1706
1701
  }
1707
1702
  for (let f = 0, p = l.length; f < p; f++)
1708
1703
  t.associations.set(l[f], {
@@ -1711,7 +1706,7 @@ class Ls {
1711
1706
  });
1712
1707
  if (l.length === 1)
1713
1708
  return i.extensions && D(s, l[0], i), l[0];
1714
- const d = new re();
1709
+ const d = new ie();
1715
1710
  i.extensions && D(s, d, i), t.associations.set(d, { meshes: e });
1716
1711
  for (let f = 0, p = l.length; f < p; f++)
1717
1712
  d.add(l[f]);
@@ -1775,13 +1770,13 @@ class Ls {
1775
1770
  ]).then(function(l) {
1776
1771
  const d = l[0], f = l[1], p = l[2], A = l[3], m = l[4], g = [];
1777
1772
  for (let R = 0, w = d.length; R < w; R++) {
1778
- const E = d[R], L = f[R], M = p[R], y = A[R], U = m[R];
1773
+ const E = d[R], L = f[R], M = p[R], b = A[R], B = m[R];
1779
1774
  if (E === void 0) continue;
1780
1775
  E.updateMatrix && E.updateMatrix();
1781
- const I = n._createAnimationTracks(E, L, M, y, U);
1776
+ const I = n._createAnimationTracks(E, L, M, b, B);
1782
1777
  if (I)
1783
- for (let te = 0; te < I.length; te++)
1784
- g.push(I[te]);
1778
+ for (let se = 0; se < I.length; se++)
1779
+ g.push(I[se]);
1785
1780
  }
1786
1781
  return new Mt(i, void 0, g);
1787
1782
  });
@@ -1814,7 +1809,7 @@ class Ls {
1814
1809
  ]).then(function(u) {
1815
1810
  const h = u[0], l = u[1], d = u[2];
1816
1811
  d !== null && h.traverse(function(f) {
1817
- f.isSkinnedMesh && f.bind(d, bs);
1812
+ f.isSkinnedMesh && f.bind(d, xs);
1818
1813
  });
1819
1814
  for (let f = 0, p = l.length; f < p; f++)
1820
1815
  h.add(l[f]);
@@ -1838,7 +1833,7 @@ class Ls {
1838
1833
  a.push(u);
1839
1834
  }), this.nodeCache[e] = Promise.all(a).then(function(u) {
1840
1835
  let h;
1841
- if (i.isBone === !0 ? h = new It() : u.length > 1 ? h = new re() : u.length === 1 ? h = u[0] : h = new Be(), h !== u[0])
1836
+ if (i.isBone === !0 ? h = new It() : u.length > 1 ? h = new ie() : u.length === 1 ? h = u[0] : h = new Ge(), h !== u[0])
1842
1837
  for (let l = 0, d = u.length; l < d; l++)
1843
1838
  h.add(u[l]);
1844
1839
  if (i.name && (h.userData.name = i.name, h.name = r), C(h, i), i.extensions && D(n, h, i), i.matrix !== void 0) {
@@ -1855,7 +1850,7 @@ class Ls {
1855
1850
  * @return {Promise<Group>}
1856
1851
  */
1857
1852
  loadScene(e) {
1858
- const t = this.extensions, n = this.json.scenes[e], s = this, i = new re();
1853
+ const t = this.extensions, n = this.json.scenes[e], s = this, i = new ie();
1859
1854
  n.name && (i.name = s.createUniqueName(n.name)), C(i, n), n.extensions && D(t, i, n);
1860
1855
  const r = n.nodes || [], a = [];
1861
1856
  for (let c = 0, u = r.length; c < u; c++)
@@ -1866,7 +1861,7 @@ class Ls {
1866
1861
  const u = (h) => {
1867
1862
  const l = /* @__PURE__ */ new Map();
1868
1863
  for (const [d, f] of s.associations)
1869
- (d instanceof ne || d instanceof we) && l.set(d, f);
1864
+ (d instanceof re || d instanceof we) && l.set(d, f);
1870
1865
  return h.traverse((d) => {
1871
1866
  const f = s.associations.get(d);
1872
1867
  f != null && l.set(d, f);
@@ -1905,7 +1900,7 @@ class Ls {
1905
1900
  }
1906
1901
  break;
1907
1902
  }
1908
- const h = s.interpolation !== void 0 ? _s[s.interpolation] : Xe, l = this._getArrayFromAccessor(n);
1903
+ const h = s.interpolation !== void 0 ? As[s.interpolation] : ze, l = this._getArrayFromAccessor(n);
1909
1904
  for (let d = 0, f = c.length; d < f; d++) {
1910
1905
  const p = new u(
1911
1906
  c[d] + "." + O[i.path],
@@ -1920,7 +1915,7 @@ class Ls {
1920
1915
  _getArrayFromAccessor(e) {
1921
1916
  let t = e.array;
1922
1917
  if (e.normalized) {
1923
- const n = me(t.constructor), s = new Float32Array(t.length);
1918
+ const n = ge(t.constructor), s = new Float32Array(t.length);
1924
1919
  for (let i = 0, r = t.length; i < r; i++)
1925
1920
  s[i] = t[i] * n;
1926
1921
  t = s;
@@ -1929,12 +1924,12 @@ class Ls {
1929
1924
  }
1930
1925
  _createCubicSplineTrackInterpolant(e) {
1931
1926
  e.createInterpolant = function(n) {
1932
- const s = this instanceof be ? Ts : $e;
1927
+ const s = this instanceof be ? gs : $e;
1933
1928
  return new s(this.times, this.values, this.getValueSize() / 3, n);
1934
1929
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
1935
1930
  }
1936
1931
  }
1937
- function vs(o, e, t) {
1932
+ function bs(o, e, t) {
1938
1933
  const n = e.attributes, s = new Ut();
1939
1934
  if (n.POSITION !== void 0) {
1940
1935
  const a = t.json.accessors[n.POSITION], c = a.min, u = a.max;
@@ -1943,7 +1938,7 @@ function vs(o, e, t) {
1943
1938
  new F(c[0], c[1], c[2]),
1944
1939
  new F(u[0], u[1], u[2])
1945
1940
  ), a.normalized) {
1946
- const h = me(H[a.componentType]);
1941
+ const h = ge(H[a.componentType]);
1947
1942
  s.min.multiplyScalar(h), s.max.multiplyScalar(h);
1948
1943
  }
1949
1944
  } else {
@@ -1961,7 +1956,7 @@ function vs(o, e, t) {
1961
1956
  const d = t.json.accessors[l.POSITION], f = d.min, p = d.max;
1962
1957
  if (f !== void 0 && p !== void 0) {
1963
1958
  if (c.setX(Math.max(Math.abs(f[0]), Math.abs(p[0]))), c.setY(Math.max(Math.abs(f[1]), Math.abs(p[1]))), c.setZ(Math.max(Math.abs(f[2]), Math.abs(p[2]))), d.normalized) {
1964
- const A = me(H[d.componentType]);
1959
+ const A = ge(H[d.componentType]);
1965
1960
  c.multiplyScalar(A);
1966
1961
  }
1967
1962
  a.max(c);
@@ -1983,7 +1978,7 @@ function Me(o, e, t) {
1983
1978
  });
1984
1979
  }
1985
1980
  for (const r in n) {
1986
- const a = pe[r] || r.toLowerCase();
1981
+ const a = me[r] || r.toLowerCase();
1987
1982
  a in o.attributes || s.push(i(n[r], a));
1988
1983
  }
1989
1984
  if (e.indices !== void 0 && !o.index) {
@@ -1992,22 +1987,23 @@ function Me(o, e, t) {
1992
1987
  });
1993
1988
  s.push(r);
1994
1989
  }
1995
- return he.workingColorSpace !== v && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${he.workingColorSpace}" not supported.`), C(o, e), vs(o, e, t), Promise.all(s).then(function() {
1996
- return e.targets !== void 0 ? Es(o, e.targets, t) : o;
1990
+ return de.workingColorSpace !== v && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${de.workingColorSpace}" not supported.`), C(o, e), bs(o, e, t), Promise.all(s).then(function() {
1991
+ return e.targets !== void 0 ? _s(o, e.targets, t) : o;
1997
1992
  });
1998
1993
  }
1999
- var Ss = Object.defineProperty, Cs = Object.getOwnPropertyDescriptor, Ms = (o, e, t, n) => {
2000
- for (var s = n > 1 ? void 0 : n ? Cs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
1994
+ var Ls = Object.defineProperty, vs = Object.getOwnPropertyDescriptor, Ss = (o, e, t, n) => {
1995
+ for (var s = n > 1 ? void 0 : n ? vs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2001
1996
  (r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
2002
- return n && s && Ss(e, t, s), s;
2003
- };
1997
+ return n && s && Ls(e, t, s), s;
1998
+ }, Cs = (o, e) => (t, n) => e(t, n, o);
2004
1999
  let J = class {
2005
- constructor() {
2006
- _(this, "workerPool", Je(void 0, !0));
2000
+ constructor(o) {
2001
+ _(this, "workerPool");
2007
2002
  _(this, "canvas");
2008
2003
  _(this, "offscreenCanvas");
2009
2004
  _(this, "worker");
2010
2005
  _(this, "thread");
2006
+ this._props = o, this.workerPool = Qe(void 0, this._props.enableDebug);
2011
2007
  }
2012
2008
  init(o) {
2013
2009
  this.worker = o.worker, this.thread = o.thread;
@@ -2039,7 +2035,7 @@ let J = class {
2039
2035
  mouseEventHandler(o) {
2040
2036
  return {
2041
2037
  ...this.getScreenSizes(),
2042
- ...j(o, [
2038
+ ...V(o, [
2043
2039
  "ctrlKey",
2044
2040
  "metaKey",
2045
2041
  "shiftKey",
@@ -2066,39 +2062,40 @@ let J = class {
2066
2062
  wheelEventHandler(o) {
2067
2063
  return o.preventDefault(), {
2068
2064
  ...this.getScreenSizes(),
2069
- ...j(o, ["deltaX", "deltaY"])
2065
+ ...V(o, ["deltaX", "deltaY"])
2070
2066
  };
2071
2067
  }
2072
2068
  keyEventHandler(o) {
2073
- if (Ze.includes(o.code))
2069
+ if (Je.includes(o.code))
2074
2070
  return o.preventDefault(), {
2075
2071
  ...this.getScreenSizes(),
2076
- ...j(o, ["ctrlKey", "metaKey", "shiftKey", "keyCode"])
2072
+ ...V(o, ["ctrlKey", "metaKey", "shiftKey", "keyCode"])
2077
2073
  };
2078
2074
  }
2079
2075
  };
2080
- J = Ms([
2081
- z(X.ContainerScoped)
2076
+ J = Ss([
2077
+ U(G.ContainerScoped),
2078
+ Cs(0, y(te))
2082
2079
  ], J);
2083
- var Is = Object.defineProperty, Os = Object.getOwnPropertyDescriptor, Ns = (o, e, t, n) => {
2084
- for (var s = n > 1 ? void 0 : n ? Os(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2080
+ var Ms = Object.defineProperty, Is = Object.getOwnPropertyDescriptor, Os = (o, e, t, n) => {
2081
+ for (var s = n > 1 ? void 0 : n ? Is(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2085
2082
  (r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
2086
- return n && s && Is(e, t, s), s;
2087
- }, Ps = (o, e) => (t, n) => e(t, n, o);
2088
- let ge = class extends et {
2083
+ return n && s && Ms(e, t, s), s;
2084
+ }, Ns = (o, e) => (t, n) => e(t, n, o);
2085
+ let Ae = class extends Ze {
2089
2086
  constructor(o) {
2090
2087
  super(), this._service = o;
2091
2088
  }
2092
2089
  init() {
2093
- for (const o of Oe) {
2090
+ for (const o of Ie) {
2094
2091
  const e = o.startsWith("mouse") || o.startsWith("pointer") || o.startsWith("touch") ? this._service.mouseEventHandler.bind(this._service) : o.startsWith("key") ? this._service.keyEventHandler.bind(this._service) : o === "resize" ? this._service.uiEventHandler.bind(this._service) : o === "wheel" ? this._service.wheelEventHandler.bind(this._service) : this._service.preventDefaultHandler.bind(this._service);
2095
- this[`${o}$`] = tt(
2092
+ this[`${o}$`] = et(
2096
2093
  o === "resize" ? window : this._service.canvas,
2097
2094
  o
2098
2095
  ).pipe(
2099
2096
  // @ts-ignore
2100
2097
  q(e.bind(this)),
2101
- Ne((t) => !(o === "keydown" && !t))
2098
+ Oe((t) => !(o === "keydown" && !t))
2102
2099
  ), this[`${o}$`].subscribe((t) => {
2103
2100
  var n, s;
2104
2101
  (s = (n = this._service.thread) == null ? void 0 : n[o]) == null || s.call(n, t);
@@ -2106,14 +2103,14 @@ let ge = class extends et {
2106
2103
  }
2107
2104
  }
2108
2105
  };
2109
- ge = Ns([
2110
- Vt(),
2111
- Ps(0, b(J))
2112
- ], ge);
2113
- var Ds = Object.defineProperty, ks = Object.getOwnPropertyDescriptor, Fs = (o, e, t, n) => {
2114
- for (var s = n > 1 ? void 0 : n ? ks(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2106
+ Ae = Os([
2107
+ U(G.ContainerScoped),
2108
+ Ns(0, y(J))
2109
+ ], Ae);
2110
+ var Ps = Object.defineProperty, Ds = Object.getOwnPropertyDescriptor, ks = (o, e, t, n) => {
2111
+ for (var s = n > 1 ? void 0 : n ? Ds(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2115
2112
  (r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
2116
- return n && s && Ds(e, t, s), s;
2113
+ return n && s && Ps(e, t, s), s;
2117
2114
  };
2118
2115
  let Z = class {
2119
2116
  constructor() {
@@ -2138,7 +2135,7 @@ let Z = class {
2138
2135
  };
2139
2136
  }
2140
2137
  _initLoaders() {
2141
- this.loaders.dracoLoader = new zt(this.loadingManager), this.loaders.audioLoader = new Kt(this.loadingManager), this.loaders.fontLoader = new st(this.loadingManager), this.loaders.gltfLoader = new Wt(this.loadingManager), this.loaders.imageLoader = new je(this.loadingManager), this.loaders.videoLoader = this.videoLoader;
2138
+ this.loaders.dracoLoader = new Xe(this.loadingManager), this.loaders.audioLoader = new Kt(this.loadingManager), this.loaders.fontLoader = new tt(this.loadingManager), this.loaders.gltfLoader = new zt(this.loadingManager), this.loaders.imageLoader = new Be(this.loadingManager), this.loaders.videoLoader = this.videoLoader;
2142
2139
  }
2143
2140
  _initSources(o) {
2144
2141
  this.sources = o, this.toLoadCount = this.sources.length, this.loadedCount = 0;
@@ -2188,24 +2185,24 @@ let Z = class {
2188
2185
  }
2189
2186
  }
2190
2187
  };
2191
- Z = Fs([
2192
- z(X.ContainerScoped)
2188
+ Z = ks([
2189
+ U(G.ContainerScoped)
2193
2190
  ], Z);
2194
- var Hs = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, Gs = (o, e, t, n) => {
2195
- for (var s = n > 1 ? void 0 : n ? Us(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2191
+ var Fs = Object.defineProperty, Hs = Object.getOwnPropertyDescriptor, Us = (o, e, t, n) => {
2192
+ for (var s = n > 1 ? void 0 : n ? Hs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2196
2193
  (r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
2197
- return n && s && Hs(e, t, s), s;
2198
- }, Bs = (o, e) => (t, n) => e(t, n, o);
2194
+ return n && s && Fs(e, t, s), s;
2195
+ }, Gs = (o, e) => (t, n) => e(t, n, o);
2199
2196
  let ee = class {
2200
2197
  constructor(o) {
2201
- _(this, "load$$", new nt());
2198
+ _(this, "load$$", new st());
2202
2199
  _(this, "load$", this.load$$.pipe(
2203
2200
  q((o) => ({
2204
2201
  ...o,
2205
2202
  loadedCount: o.resource ? this._service.loadedCount + 1 : this._service.loadedCount,
2206
2203
  toLoadCount: this._service.toLoadCount
2207
2204
  })),
2208
- se()
2205
+ ne()
2209
2206
  ));
2210
2207
  _(this, "serializedLoad$", this.load$.pipe(
2211
2208
  q((o) => {
@@ -2235,7 +2232,7 @@ let ee = class {
2235
2232
  sampleRate: o.resource.sampleRate,
2236
2233
  duration: o.resource.duration
2237
2234
  }), ((s = o == null ? void 0 : o.source) == null ? void 0 : s.type) === "video" && o.resource instanceof HTMLVideoElement && (e = {
2238
- ...j(o.resource, [
2235
+ ...V(o.resource, [
2239
2236
  "autoplay",
2240
2237
  "baseURI",
2241
2238
  "controls",
@@ -2269,7 +2266,7 @@ let ee = class {
2269
2266
  "width"
2270
2267
  ]),
2271
2268
  buffered: o.resource.buffered.length,
2272
- error: o.resource.error ? Pe(o.resource.error, []) : {},
2269
+ error: o.resource.error ? Ne(o.resource.error, []) : {},
2273
2270
  played: o.resource.played.length,
2274
2271
  seekable: o.resource.seekable.length,
2275
2272
  textTracks: o.resource.textTracks.length
@@ -2278,32 +2275,32 @@ let ee = class {
2278
2275
  resource: e
2279
2276
  };
2280
2277
  }),
2281
- se()
2278
+ ne()
2282
2279
  ));
2283
2280
  _(this, "loadCompleted$", this.load$.pipe(
2284
- Ne((o) => o.toLoadCount === o.loadedCount),
2281
+ Oe((o) => o.toLoadCount === o.loadedCount),
2285
2282
  q(
2286
- () => j(this._service, [
2283
+ () => V(this._service, [
2287
2284
  "loadedCount",
2288
2285
  "loadedResources",
2289
2286
  "toLoadCount"
2290
2287
  ])
2291
2288
  ),
2292
- se()
2289
+ ne()
2293
2290
  ));
2294
2291
  this._service = o;
2295
2292
  }
2296
2293
  };
2297
- ee = Gs([
2298
- z(X.ContainerScoped),
2299
- Bs(0, b(Z))
2294
+ ee = Us([
2295
+ U(G.ContainerScoped),
2296
+ Gs(0, y(Z))
2300
2297
  ], ee);
2301
- var js = Object.defineProperty, Ks = Object.getOwnPropertyDescriptor, Vs = (o, e, t, n) => {
2302
- for (var s = n > 1 ? void 0 : n ? Ks(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2298
+ var Bs = Object.defineProperty, js = Object.getOwnPropertyDescriptor, Ks = (o, e, t, n) => {
2299
+ for (var s = n > 1 ? void 0 : n ? js(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2303
2300
  (r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
2304
- return n && s && js(e, t, s), s;
2305
- }, ue = (o, e) => (t, n) => e(t, n, o);
2306
- let Ae = class {
2301
+ return n && s && Bs(e, t, s), s;
2302
+ }, le = (o, e) => (t, n) => e(t, n, o);
2303
+ let Te = class {
2307
2304
  constructor(o, e, t) {
2308
2305
  _(this, "_subscriptions", []);
2309
2306
  this._controller = o, this._service = e, this._props = t, this._subscriptions.push(
@@ -2348,21 +2345,24 @@ let Ae = class {
2348
2345
  this._service.setDracoDecoder(o);
2349
2346
  }
2350
2347
  dispose() {
2351
- this._subscriptions.forEach((o) => o.unsubscribe()), this._controller.load$$.complete();
2348
+ this._subscriptions.forEach((o) => o.unsubscribe()), Object.keys(this._service.loaders).forEach((o) => {
2349
+ const e = this._service.loaders[o];
2350
+ e instanceof Xe && e.dispose(), this._service.loaders[o] = void 0;
2351
+ }), this._controller.load$$.complete();
2352
2352
  }
2353
2353
  };
2354
- Ae = Vs([
2355
- z(X.ContainerScoped),
2356
- ue(0, b(ee)),
2357
- ue(1, b(Z)),
2358
- ue(2, b(_e))
2359
- ], Ae);
2360
- var zs = Object.defineProperty, Xs = Object.getOwnPropertyDescriptor, Ws = (o, e, t, n) => {
2361
- for (var s = n > 1 ? void 0 : n ? Xs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2354
+ Te = Ks([
2355
+ U(G.ContainerScoped),
2356
+ le(0, y(ee)),
2357
+ le(1, y(Z)),
2358
+ le(2, y(te))
2359
+ ], Te);
2360
+ var Vs = Object.defineProperty, zs = Object.getOwnPropertyDescriptor, Xs = (o, e, t, n) => {
2361
+ for (var s = n > 1 ? void 0 : n ? zs(e, t) : e, i = o.length - 1, r; i >= 0; i--)
2362
2362
  (r = o[i]) && (s = (n ? r(e, t, s) : r(s)) || s);
2363
- return n && s && zs(e, t, s), s;
2363
+ return n && s && Vs(e, t, s), s;
2364
2364
  }, k = (o, e) => (t, n) => e(t, n, o);
2365
- let Te = class extends rt {
2365
+ let _e = class extends nt {
2366
2366
  constructor(e, t, n, s, i, r) {
2367
2367
  super();
2368
2368
  _(this, "_subscriptions", []);
@@ -2409,7 +2409,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
2409
2409
  payload: {
2410
2410
  path: this.props.location,
2411
2411
  subject: {
2412
- ...Pe(this.props, [
2412
+ ...Ne(this.props, [
2413
2413
  "canvas",
2414
2414
  "location",
2415
2415
  "onReady",
@@ -2419,13 +2419,13 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
2419
2419
  },
2420
2420
  transferSubject: [this._service.offscreenCanvas]
2421
2421
  }
2422
- });
2422
+ }) || [];
2423
2423
  if (!e || t)
2424
2424
  throw new Error("Unable to retrieve the worker-thread info.");
2425
2425
  this._service.worker = e.worker, this._service.thread = e.thread;
2426
2426
  }
2427
2427
  async _initObservableProxyEvents() {
2428
- Oe.forEach(
2428
+ Ie.forEach(
2429
2429
  (e) => this[`${e}$`] = () => {
2430
2430
  var t;
2431
2431
  return (t = this._controller) == null ? void 0 : t[`${e}$`];
@@ -2441,7 +2441,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
2441
2441
  e.resource
2442
2442
  ]);
2443
2443
  (n = this._service.worker) == null || n.postMessage({
2444
- token: it,
2444
+ token: rt,
2445
2445
  payload: e
2446
2446
  });
2447
2447
  })
@@ -2474,42 +2474,42 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
2474
2474
  this._subscriptions.map((t) => t.unsubscribe()), await this._service.workerPool.terminateAll(), ((e = this._service.canvas) == null ? void 0 : e.dataset.reactive) === "true" && (document.body.removeChild(this._service.canvas), this._service.canvas.remove(), this._service.canvas = void 0), this._initialized = !1;
2475
2475
  }
2476
2476
  };
2477
- Te = Ws([
2478
- z(X.ResolutionScoped),
2479
- k(0, b(J)),
2480
- k(1, b(ge)),
2481
- k(2, b(ee)),
2482
- k(3, b(De)),
2483
- k(4, b(_e)),
2484
- k(5, b(Ae))
2485
- ], Te);
2486
- const Js = (o) => {
2477
+ _e = Xs([
2478
+ U(G.ContainerScoped),
2479
+ k(0, y(J)),
2480
+ k(1, y(Ae)),
2481
+ k(2, y(ee)),
2482
+ k(3, y(Pe)),
2483
+ k(4, y(te)),
2484
+ k(5, y(Te))
2485
+ ], _e);
2486
+ const Qs = (o) => {
2487
2487
  if (typeof (o == null ? void 0 : o.location) != "string" && !((o == null ? void 0 : o.location) instanceof URL))
2488
2488
  throw new Error(
2489
2489
  "Invalid register props detected. location path is required"
2490
2490
  );
2491
- const e = Ie.createChildContainer();
2492
- o.initOnConstruct = W(o.initOnConstruct) || !$(o.initOnConstruct) ? !0 : o.initOnConstruct, o.defaultCamera = o != null && o.defaultCamera && o.defaultCamera in Ee ? o.defaultCamera : Ee.PERSPECTIVE, o.withMiniCamera = W(o.withMiniCamera) || !$(o.withMiniCamera) ? !1 : o.withMiniCamera, o.startTimer = W(o.startTimer) || !$(o.startTimer) ? !0 : o.startTimer, o.fullScreen = W(o.fullScreen) || !$(o.fullScreen) ? !0 : o.fullScreen, o.onReady = ot(o.onReady) ? o.onReady : void 0, e.register(De, { useValue: e }), e.register(_e, { useValue: o });
2493
- const t = e.resolve(Te);
2491
+ const e = it.createChildContainer();
2492
+ o.initOnConstruct = W(o.initOnConstruct) || !$(o.initOnConstruct) ? !0 : o.initOnConstruct, o.defaultCamera = o != null && o.defaultCamera && o.defaultCamera in Ee ? o.defaultCamera : Ee.PERSPECTIVE, o.withMiniCamera = W(o.withMiniCamera) || !$(o.withMiniCamera) ? !1 : o.withMiniCamera, o.startTimer = W(o.startTimer) || !$(o.startTimer) ? !0 : o.startTimer, o.fullScreen = W(o.fullScreen) || !$(o.fullScreen) ? !0 : o.fullScreen, o.onReady = ot(o.onReady) ? o.onReady : void 0, e.register(Pe, { useValue: e }), e.register(te, { useValue: o });
2493
+ const t = e.resolve(_e);
2494
2494
  return {
2495
2495
  container: e,
2496
2496
  module: t
2497
2497
  };
2498
2498
  };
2499
2499
  export {
2500
- tn as AppModule,
2501
- sn as AppProxyEventHandlersBlueprint,
2502
- De as CONTAINER_TOKEN,
2500
+ en as AppModule,
2501
+ tn as AppProxyEventHandlersBlueprint,
2502
+ Pe as CONTAINER_TOKEN,
2503
2503
  Ee as DefaultCameraType,
2504
- Ze as KEYBOARD_EVENT_CODES,
2505
- it as LOADER_SERIALIZED_LOAD_TOKEN,
2506
- Qs as LaunchAppProps,
2507
- Oe as PROXY_EVENT_LISTENERS,
2508
- et as ProxyEventHandlersBlueprint,
2509
- nn as ProxyEventObservablesBlueprint,
2510
- rn as ProxyEventSubjectsBlueprint,
2511
- Te as RegisterModule,
2512
- _e as RegisterPropsBlueprint,
2513
- rt as RegisterProxyEventHandlersBlueprint,
2514
- Js as register
2504
+ Je as KEYBOARD_EVENT_CODES,
2505
+ rt as LOADER_SERIALIZED_LOAD_TOKEN,
2506
+ Ys as LaunchAppProps,
2507
+ Ie as PROXY_EVENT_LISTENERS,
2508
+ Ze as ProxyEventHandlersBlueprint,
2509
+ sn as ProxyEventObservablesBlueprint,
2510
+ nn as ProxyEventSubjectsBlueprint,
2511
+ _e as RegisterModule,
2512
+ te as RegisterPropsBlueprint,
2513
+ nt as RegisterProxyEventHandlersBlueprint,
2514
+ Qs as register
2515
2515
  };