@quick-threejs/reactive 0.1.47 → 0.1.48

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,29 +1,29 @@
1
- var fn = Object.defineProperty;
2
- var pn = (s, e, t) => e in s ? fn(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
- var M = (s, e, t) => pn(s, typeof e != "symbol" ? e + "" : e, t);
4
- import { g as mn, r as It, a as gn, b as rt, c as Nt, d as _n, e as bn, f as yn, s as ie, L as oe, i as O, U as pe, K as Tn, P as wn, h as Ft, j as Dt, S as Ht, k as vn, m as ye, l as jt, F as En, n as Pe, o as ot, J as Ut, R as Rn, p as Cn, C as Bt, N as V, D as te, q as at, E as Sn, t as xn } from "./FontLoader-YhZm0TOQ.mjs";
1
+ var pn = Object.defineProperty;
2
+ var mn = (s, e, t) => e in s ? pn(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
3
+ var S = (s, e, t) => mn(s, typeof e != "symbol" ? e + "" : e, t);
4
+ import { g as gn, r as Nt, a as _n, b as rt, c as Ft, d as bn, e as yn, f as Tn, s as ie, L as oe, i as O, U as pe, K as wn, P as vn, h as Dt, j as Ht, S as jt, k as En, m as ye, l as Ut, F as Rn, n as Pe, o as ot, J as Bt, R as Cn, p as xn, C as Wt, N as W, D as te, q as at, t as ct, E as Sn } from "./FontLoader-YhZm0TOQ.mjs";
5
5
  import { A as fi, v as pi, u as mi } from "./FontLoader-YhZm0TOQ.mjs";
6
- import { TrianglesDrawMode as Mn, TriangleFanDrawMode as Ke, TriangleStripDrawMode as Wt, Loader as Gt, FileLoader as we, SRGBColorSpace as G, LinearSRGBColorSpace as F, BufferGeometry as zt, BufferAttribute as me, InterleavedBuffer as $t, InterleavedBufferAttribute as Kt, Color as z, ColorManagement as qe, LoaderUtils as ge, SpotLight as kn, PointLight as Ln, DirectionalLight as An, MeshBasicMaterial as fe, MeshPhysicalMaterial as D, Vector2 as qt, Matrix4 as ve, Vector3 as Z, Quaternion as Vt, InstancedMesh as Pn, InstancedBufferAttribute as On, Object3D as Xt, TextureLoader as In, ImageBitmapLoader as Qt, LinearFilter as Ve, LinearMipmapLinearFilter as Yt, RepeatWrapping as Xe, NearestFilter as Jt, PointsMaterial as Nn, Material as Oe, LineBasicMaterial as Fn, MeshStandardMaterial as Zt, DoubleSide as Dn, PropertyBinding as Hn, SkinnedMesh as jn, Mesh as Un, LineSegments as Bn, Line as Wn, LineLoop as Gn, Points as zn, Group as Ie, PerspectiveCamera as $n, MathUtils as Kn, OrthographicCamera as qn, Skeleton as Vn, AnimationClip as Xn, Bone as Qn, InterpolateLinear as en, NearestMipmapNearestFilter as Yn, LinearMipmapNearestFilter as Jn, NearestMipmapLinearFilter as Zn, ClampToEdgeWrapping as er, MirroredRepeatWrapping as tr, InterpolateDiscrete as nr, FrontSide as rr, Texture as ct, VectorKeyframeTrack as ut, NumberKeyframeTrack as lt, QuaternionKeyframeTrack as dt, Box3 as sr, Sphere as ir, Interpolant as or, LoadingManager as ar, AudioLoader as cr } from "three";
7
- class xe {
6
+ import { TrianglesDrawMode as Mn, TriangleFanDrawMode as Ke, TriangleStripDrawMode as Gt, Loader as zt, FileLoader as we, SRGBColorSpace as z, LinearSRGBColorSpace as F, BufferGeometry as $t, BufferAttribute as me, InterleavedBuffer as Kt, InterleavedBufferAttribute as qt, Color as $, ColorManagement as qe, LoaderUtils as ge, SpotLight as kn, PointLight as Ln, DirectionalLight as An, MeshBasicMaterial as fe, MeshPhysicalMaterial as D, Vector2 as Vt, Matrix4 as ve, Vector3 as Z, Quaternion as Xt, InstancedMesh as Pn, InstancedBufferAttribute as On, Object3D as Qt, TextureLoader as In, ImageBitmapLoader as Yt, LinearFilter as Ve, LinearMipmapLinearFilter as Jt, RepeatWrapping as Xe, NearestFilter as Zt, PointsMaterial as Nn, Material as Oe, LineBasicMaterial as Fn, MeshStandardMaterial as en, DoubleSide as Dn, PropertyBinding as Hn, SkinnedMesh as jn, Mesh as Un, LineSegments as Bn, Line as Wn, LineLoop as Gn, Points as zn, Group as Ie, PerspectiveCamera as $n, MathUtils as Kn, OrthographicCamera as qn, Skeleton as Vn, AnimationClip as Xn, Bone as Qn, InterpolateLinear as tn, NearestMipmapNearestFilter as Yn, LinearMipmapNearestFilter as Jn, NearestMipmapLinearFilter as Zn, ClampToEdgeWrapping as er, MirroredRepeatWrapping as tr, InterpolateDiscrete as nr, FrontSide as rr, Texture as ut, VectorKeyframeTrack as lt, NumberKeyframeTrack as dt, QuaternionKeyframeTrack as ht, Box3 as sr, Sphere as ir, Interpolant as or, LoadingManager as ar, AudioLoader as cr } from "three";
7
+ class Se {
8
8
  constructor() {
9
9
  /**
10
10
  * @description The app worker logic location.
11
11
  *
12
12
  * @required
13
13
  */
14
- M(this, "location");
14
+ S(this, "location");
15
15
  /**
16
16
  * @description Initialize the app on construct.
17
17
  *
18
18
  * @default true
19
19
  */
20
- M(this, "initOnConstruct");
20
+ S(this, "initOnConstruct");
21
21
  /**
22
22
  * @description Initialize the app on main thread.
23
23
  *
24
24
  * @default false
25
25
  */
26
- M(this, "mainThread");
26
+ S(this, "mainThread");
27
27
  /**
28
28
  * @description App `canvas` element reference.
29
29
  *
@@ -31,7 +31,7 @@ class xe {
31
31
  *
32
32
  * @default undefined
33
33
  */
34
- M(this, "canvas");
34
+ S(this, "canvas");
35
35
  /**
36
36
  * @description Wrapper element for the canvas used to set the canvas size.
37
37
  *
@@ -39,13 +39,19 @@ class xe {
39
39
  *
40
40
  * @default undefined
41
41
  */
42
- M(this, "canvasWrapper");
42
+ S(this, "canvasWrapper");
43
43
  /**
44
44
  * @description Use the window size to render the canvas in fullscreen and auto-resize it.
45
45
  *
46
46
  * @default true
47
47
  */
48
- M(this, "fullScreen");
48
+ S(this, "fullScreen");
49
+ /**
50
+ * Initial pixel ratio to use for the renderer.
51
+ *
52
+ * @default `Math.min(window.devicePixelRatio, 2)`
53
+ */
54
+ S(this, "pixelRatio");
49
55
  /**
50
56
  * @description Auto-resize the renderer when the canvas size changes.
51
57
  *
@@ -53,7 +59,7 @@ class xe {
53
59
  *
54
60
  * @default true
55
61
  */
56
- M(this, "autoRenderResize");
62
+ S(this, "autoRenderResize");
57
63
  /**
58
64
  * Default used camera.
59
65
  *
@@ -61,25 +67,25 @@ class xe {
61
67
  *
62
68
  * @default DefaultCameraType.PERSPECTIVE
63
69
  */
64
- M(this, "defaultCamera");
70
+ S(this, "defaultCamera");
65
71
  /**
66
72
  * @description Stepping the timer animation loop on launch.
67
73
  *
68
74
  * @default true
69
75
  */
70
- M(this, "startTimer");
76
+ S(this, "startTimer");
71
77
  /**
72
78
  * @description Resources to load.
73
79
  *
74
80
  * @default []
75
81
  */
76
- M(this, "loaderDataSources", []);
82
+ S(this, "loaderDataSources", []);
77
83
  /**
78
84
  * @description GLTF Draco decoder path.
79
85
  *
80
86
  * @default undefined
81
87
  */
82
- M(this, "loaderDracoDecoderPath");
88
+ S(this, "loaderDracoDecoderPath");
83
89
  /**
84
90
  * @description Will directly load the resources on initialization.
85
91
  *
@@ -87,19 +93,19 @@ class xe {
87
93
  *
88
94
  * @default true
89
95
  */
90
- M(this, "loadResourcesOnInit");
96
+ S(this, "loadResourcesOnInit");
91
97
  /**
92
98
  * @description Debug properties.
93
99
  *
94
100
  * @default undefined
95
101
  */
96
- M(this, "debug");
102
+ S(this, "debug");
97
103
  /**
98
104
  * @description Handler called when the app is ready.
99
105
  *
100
106
  * @default undefined
101
107
  */
102
- M(this, "onReady");
108
+ S(this, "onReady");
103
109
  }
104
110
  }
105
111
  class ci {
@@ -109,15 +115,15 @@ class ci {
109
115
  *
110
116
  * @note Will be used on main-thread strategy only.
111
117
  */
112
- M(this, "canvas");
118
+ S(this, "canvas");
113
119
  /** @description Handler triggered when the app is ready. */
114
- M(this, "onReady");
120
+ S(this, "onReady");
115
121
  }
116
122
  }
117
- var X = {}, Ne = {}, H = {}, Q = {}, ht;
123
+ var X = {}, Ne = {}, H = {}, Q = {}, ft;
118
124
  function ur() {
119
- if (ht) return Q;
120
- ht = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.getBundleURL = Q.getBaseURL = void 0;
125
+ if (ft) return Q;
126
+ ft = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.getBundleURL = Q.getBaseURL = void 0;
121
127
  let s;
122
128
  function e() {
123
129
  return s || (s = t()), s;
@@ -138,10 +144,10 @@ function ur() {
138
144
  }
139
145
  return Q.getBaseURL = n, Q;
140
146
  }
141
- var ft;
142
- function tn() {
143
- if (ft) return H;
144
- ft = 1, Object.defineProperty(H, "__esModule", { value: !0 }), H.isWorkerRuntime = H.getWorkerImplementation = H.defaultPoolSize = void 0;
147
+ var pt;
148
+ function nn() {
149
+ if (pt) return H;
150
+ pt = 1, Object.defineProperty(H, "__esModule", { value: !0 }), H.isWorkerRuntime = H.getWorkerImplementation = H.defaultPoolSize = void 0;
145
151
  const s = /* @__PURE__ */ ur();
146
152
  H.defaultPoolSize = typeof navigator < "u" && navigator.hardwareConcurrency ? navigator.hardwareConcurrency : 4;
147
153
  const e = (c) => /^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(c);
@@ -188,10 +194,10 @@ function tn() {
188
194
  }
189
195
  return H.isWorkerRuntime = o, H;
190
196
  }
191
- var Y = {}, be = { exports: {} }, Fe, pt;
197
+ var Y = {}, be = { exports: {} }, Fe, mt;
192
198
  function lr() {
193
- if (pt) return Fe;
194
- pt = 1;
199
+ if (mt) return Fe;
200
+ mt = 1;
195
201
  var s = 1e3, e = s * 60, t = e * 60, n = t * 24, r = n * 7, i = n * 365.25;
196
202
  Fe = function(u, l) {
197
203
  l = l || {};
@@ -270,10 +276,10 @@ function lr() {
270
276
  }
271
277
  return Fe;
272
278
  }
273
- var De, mt;
279
+ var De, gt;
274
280
  function dr() {
275
- if (mt) return De;
276
- mt = 1;
281
+ if (gt) return De;
282
+ gt = 1;
277
283
  function s(e) {
278
284
  n.debug = n, n.default = n, n.coerce = d, n.disable = o, n.enable = i, n.enabled = c, n.humanize = lr(), n.destroy = u, Object.keys(e).forEach((l) => {
279
285
  n[l] = e[l];
@@ -299,8 +305,8 @@ function dr() {
299
305
  _++;
300
306
  const C = n.formatters[R];
301
307
  if (typeof C == "function") {
302
- const x = p[_];
303
- v = C.call(g, x), p.splice(_, 1), _--;
308
+ const M = p[_];
309
+ v = C.call(g, M), p.splice(_, 1), _--;
304
310
  }
305
311
  return v;
306
312
  }), n.formatArgs.call(g, p), (g.log || n.log).apply(g, p);
@@ -357,9 +363,9 @@ function dr() {
357
363
  }
358
364
  return De = s, De;
359
365
  }
360
- var gt;
366
+ var _t;
361
367
  function st() {
362
- return gt || (gt = 1, function(s, e) {
368
+ return _t || (_t = 1, function(s, e) {
363
369
  e.formatArgs = n, e.save = r, e.load = i, e.useColors = t, e.storage = o(), e.destroy = /* @__PURE__ */ (() => {
364
370
  let a = !1;
365
371
  return () => {
@@ -546,9 +552,9 @@ class Me {
546
552
  this._pendingPromises.add(i);
547
553
  }
548
554
  }
549
- const nn = () => typeof Symbol == "function", _e = (s) => nn() && !!Symbol[s], it = (s) => _e(s) ? Symbol[s] : "@@" + s;
555
+ const rn = () => typeof Symbol == "function", _e = (s) => rn() && !!Symbol[s], it = (s) => _e(s) ? Symbol[s] : "@@" + s;
550
556
  _e("asyncIterator") || (Symbol.asyncIterator = Symbol.asyncIterator || Symbol.for("Symbol.asyncIterator"));
551
- const fr = it("iterator"), Qe = it("observable"), rn = it("species");
557
+ const fr = it("iterator"), Qe = it("observable"), sn = it("species");
552
558
  function Ee(s, e) {
553
559
  const t = s[e];
554
560
  if (t != null) {
@@ -559,7 +565,7 @@ function Ee(s, e) {
559
565
  }
560
566
  function ae(s) {
561
567
  let e = s.constructor;
562
- return e !== void 0 && (e = e[rn], e === null && (e = void 0)), e !== void 0 ? e : A;
568
+ return e !== void 0 && (e = e[sn], e === null && (e = void 0)), e !== void 0 ? e : A;
563
569
  }
564
570
  function pr(s) {
565
571
  return s instanceof A;
@@ -578,7 +584,7 @@ function Te(s) {
578
584
  }
579
585
  });
580
586
  }
581
- function sn(s) {
587
+ function on(s) {
582
588
  const e = s._cleanup;
583
589
  if (e !== void 0 && (s._cleanup = void 0, !!e))
584
590
  try {
@@ -600,11 +606,11 @@ function mr(s) {
600
606
  if (e) {
601
607
  s._queue = void 0, s._state = "ready";
602
608
  for (const t of e)
603
- if (on(s, t.type, t.value), s._state === "closed")
609
+ if (an(s, t.type, t.value), s._state === "closed")
604
610
  break;
605
611
  }
606
612
  }
607
- function on(s, e, t) {
613
+ function an(s, e, t) {
608
614
  s._state = "running";
609
615
  const n = s._observer;
610
616
  try {
@@ -626,7 +632,7 @@ function on(s, e, t) {
626
632
  } catch (r) {
627
633
  se(r);
628
634
  }
629
- s._state === "closed" ? sn(s) : s._state === "running" && (s._state = "ready");
635
+ s._state === "closed" ? on(s) : s._state === "running" && (s._state = "ready");
630
636
  }
631
637
  function He(s, e, t) {
632
638
  if (s._state !== "closed") {
@@ -638,7 +644,7 @@ function He(s, e, t) {
638
644
  s._state = "buffering", s._queue = [{ type: e, value: t }], Te(() => mr(s));
639
645
  return;
640
646
  }
641
- on(s, e, t);
647
+ an(s, e, t);
642
648
  }
643
649
  }
644
650
  class gr {
@@ -656,7 +662,7 @@ class gr {
656
662
  return this._state === "closed";
657
663
  }
658
664
  unsubscribe() {
659
- this._state !== "closed" && (Ye(this), sn(this));
665
+ this._state !== "closed" && (Ye(this), on(this));
660
666
  }
661
667
  }
662
668
  class _r {
@@ -936,11 +942,11 @@ class A {
936
942
  });
937
943
  });
938
944
  }
939
- static get [rn]() {
945
+ static get [sn]() {
940
946
  return this;
941
947
  }
942
948
  }
943
- nn() && Object.defineProperty(A, Symbol("extensions"), {
949
+ rn() && Object.defineProperty(A, Symbol("extensions"), {
944
950
  value: {
945
951
  symbol: Qe,
946
952
  hostReportError: se
@@ -1091,7 +1097,7 @@ function Cr(s) {
1091
1097
  return () => clearInterval(n);
1092
1098
  });
1093
1099
  }
1094
- var Sr = function(s, e, t, n) {
1100
+ var xr = function(s, e, t, n) {
1095
1101
  function r(i) {
1096
1102
  return i instanceof t ? i : new t(function(o) {
1097
1103
  o(i);
@@ -1118,7 +1124,7 @@ var Sr = function(s, e, t, n) {
1118
1124
  d((n = n.apply(s, e || [])).next());
1119
1125
  });
1120
1126
  };
1121
- function xr(s) {
1127
+ function Sr(s) {
1122
1128
  return (e) => new A((t) => {
1123
1129
  const n = new Me(t), r = e.subscribe({
1124
1130
  complete() {
@@ -1128,7 +1134,7 @@ function xr(s) {
1128
1134
  n.error(i);
1129
1135
  },
1130
1136
  next(i) {
1131
- n.schedule((o) => Sr(this, void 0, void 0, function* () {
1137
+ n.schedule((o) => xr(this, void 0, void 0, function* () {
1132
1138
  const c = yield s(i);
1133
1139
  o(c);
1134
1140
  }));
@@ -1156,7 +1162,7 @@ function Mr(...s) {
1156
1162
  return r;
1157
1163
  });
1158
1164
  }
1159
- class an extends A {
1165
+ class cn extends A {
1160
1166
  constructor() {
1161
1167
  super((e) => (this._observers.add(e), () => this._observers.delete(e))), this._observers = /* @__PURE__ */ new Set();
1162
1168
  }
@@ -1174,7 +1180,7 @@ class an extends A {
1174
1180
  }
1175
1181
  }
1176
1182
  function kr(s) {
1177
- const e = new an();
1183
+ const e = new cn();
1178
1184
  let t, n = 0;
1179
1185
  return new A((r) => {
1180
1186
  t || (t = s.subscribe(e));
@@ -1233,20 +1239,20 @@ function Ar(s, e) {
1233
1239
  const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1234
1240
  __proto__: null,
1235
1241
  Observable: A,
1236
- Subject: an,
1242
+ Subject: cn,
1237
1243
  filter: yr,
1238
1244
  flatMap: Rr,
1239
1245
  interval: Cr,
1240
- map: xr,
1246
+ map: Sr,
1241
1247
  merge: Mr,
1242
1248
  multicast: kr,
1243
1249
  scan: Ar,
1244
1250
  unsubscribe: ee
1245
- }, Symbol.toStringTag, { value: "Module" })), ke = /* @__PURE__ */ mn(Pr);
1246
- var ce = {}, _t;
1251
+ }, Symbol.toStringTag, { value: "Module" })), ke = /* @__PURE__ */ gn(Pr);
1252
+ var ce = {}, bt;
1247
1253
  function Or() {
1248
- if (_t) return ce;
1249
- _t = 1, Object.defineProperty(ce, "__esModule", { value: !0 }), ce.allSettled = void 0;
1254
+ if (bt) return ce;
1255
+ bt = 1, Object.defineProperty(ce, "__esModule", { value: !0 }), ce.allSettled = void 0;
1250
1256
  function s(e) {
1251
1257
  return Promise.all(e.map((t) => {
1252
1258
  const n = (o) => ({ status: "fulfilled", value: o }), r = (o) => ({ status: "rejected", reason: o }), i = Promise.resolve(t);
@@ -1259,19 +1265,19 @@ function Or() {
1259
1265
  }
1260
1266
  return ce.allSettled = s, ce;
1261
1267
  }
1262
- var je = {}, bt;
1268
+ var je = {}, yt;
1263
1269
  function Ir() {
1264
- return bt || (bt = 1, function(s) {
1270
+ return yt || (yt = 1, function(s) {
1265
1271
  Object.defineProperty(s, "__esModule", { value: !0 }), s.PoolEventType = void 0, function(e) {
1266
1272
  e.initialized = "initialized", e.taskCanceled = "taskCanceled", e.taskCompleted = "taskCompleted", e.taskFailed = "taskFailed", e.taskQueued = "taskQueued", e.taskQueueDrained = "taskQueueDrained", e.taskStart = "taskStart", e.terminated = "terminated";
1267
1273
  }(s.PoolEventType || (s.PoolEventType = {}));
1268
1274
  }(je)), je;
1269
1275
  }
1270
- var ue = {}, yt;
1271
- function cn() {
1272
- if (yt) return ue;
1273
- yt = 1, Object.defineProperty(ue, "__esModule", { value: !0 }), ue.Thread = void 0;
1274
- const s = /* @__PURE__ */ It();
1276
+ var ue = {}, Tt;
1277
+ function un() {
1278
+ if (Tt) return ue;
1279
+ Tt = 1, Object.defineProperty(ue, "__esModule", { value: !0 }), ue.Thread = void 0;
1280
+ const s = /* @__PURE__ */ Nt();
1275
1281
  function e(t) {
1276
1282
  throw Error(t);
1277
1283
  }
@@ -1290,9 +1296,9 @@ function cn() {
1290
1296
  }
1291
1297
  }, ue;
1292
1298
  }
1293
- var Tt;
1299
+ var wt;
1294
1300
  function Nr() {
1295
- return Tt || (Tt = 1, function(s) {
1301
+ return wt || (wt = 1, function(s) {
1296
1302
  var e = Y && Y.__awaiter || function(p, g, m, b) {
1297
1303
  function _(y) {
1298
1304
  return y instanceof m ? y : new m(function(v) {
@@ -1302,32 +1308,32 @@ function Nr() {
1302
1308
  return new (m || (m = Promise))(function(y, v) {
1303
1309
  function R(k) {
1304
1310
  try {
1305
- x(b.next(k));
1311
+ M(b.next(k));
1306
1312
  } catch (I) {
1307
1313
  v(I);
1308
1314
  }
1309
1315
  }
1310
1316
  function C(k) {
1311
1317
  try {
1312
- x(b.throw(k));
1318
+ M(b.throw(k));
1313
1319
  } catch (I) {
1314
1320
  v(I);
1315
1321
  }
1316
1322
  }
1317
- function x(k) {
1323
+ function M(k) {
1318
1324
  k.done ? y(k.value) : _(k.value).then(R, C);
1319
1325
  }
1320
- x((b = b.apply(p, g || [])).next());
1326
+ M((b = b.apply(p, g || [])).next());
1321
1327
  });
1322
1328
  }, t = Y && Y.__importDefault || function(p) {
1323
1329
  return p && p.__esModule ? p : { default: p };
1324
1330
  };
1325
1331
  Object.defineProperty(s, "__esModule", { value: !0 }), s.Pool = s.Thread = s.PoolEventType = void 0;
1326
- const n = t(st()), r = ke, i = /* @__PURE__ */ Or(), o = /* @__PURE__ */ tn(), c = /* @__PURE__ */ Ir();
1332
+ const n = t(st()), r = ke, i = /* @__PURE__ */ Or(), o = /* @__PURE__ */ nn(), c = /* @__PURE__ */ Ir();
1327
1333
  Object.defineProperty(s, "PoolEventType", { enumerable: !0, get: function() {
1328
1334
  return c.PoolEventType;
1329
1335
  } });
1330
- const a = /* @__PURE__ */ cn();
1336
+ const a = /* @__PURE__ */ un();
1331
1337
  Object.defineProperty(s, "Thread", { enumerable: !0, get: function() {
1332
1338
  return a.Thread;
1333
1339
  } });
@@ -1513,10 +1519,10 @@ This usually happens for one of two reasons: We are either at peak workload righ
1513
1519
  T.EventType = c.PoolEventType, s.Pool = T;
1514
1520
  }(Y)), Y;
1515
1521
  }
1516
- var j = {}, le = {}, wt;
1522
+ var j = {}, le = {}, vt;
1517
1523
  function Fr() {
1518
- if (wt) return le;
1519
- wt = 1, Object.defineProperty(le, "__esModule", { value: !0 }), le.createPromiseWithResolver = void 0;
1524
+ if (vt) return le;
1525
+ vt = 1, Object.defineProperty(le, "__esModule", { value: !0 }), le.createPromiseWithResolver = void 0;
1520
1526
  const s = () => {
1521
1527
  };
1522
1528
  function e() {
@@ -1529,18 +1535,18 @@ function Fr() {
1529
1535
  }
1530
1536
  return le.createPromiseWithResolver = e, le;
1531
1537
  }
1532
- var Ue = {}, vt;
1538
+ var Ue = {}, Et;
1533
1539
  function Dr() {
1534
- return vt || (vt = 1, function(s) {
1540
+ return Et || (Et = 1, function(s) {
1535
1541
  Object.defineProperty(s, "__esModule", { value: !0 }), s.WorkerEventType = void 0, function(e) {
1536
1542
  e.internalError = "internalError", e.message = "message", e.termination = "termination";
1537
1543
  }(s.WorkerEventType || (s.WorkerEventType = {}));
1538
1544
  }(Ue)), Ue;
1539
1545
  }
1540
- var U = {}, de = {}, Et;
1546
+ var U = {}, de = {}, Rt;
1541
1547
  function Hr() {
1542
- if (Et) return de;
1543
- Et = 1, Object.defineProperty(de, "__esModule", { value: !0 }), de.ObservablePromise = void 0;
1548
+ if (Rt) return de;
1549
+ Rt = 1, Object.defineProperty(de, "__esModule", { value: !0 }), de.ObservablePromise = void 0;
1544
1550
  const s = ke, e = () => {
1545
1551
  }, t = (c) => c, n = (c) => Promise.resolve().then(c);
1546
1552
  function r(c) {
@@ -1630,15 +1636,15 @@ function Hr() {
1630
1636
  }
1631
1637
  return de.ObservablePromise = o, de;
1632
1638
  }
1633
- var Rt;
1639
+ var Ct;
1634
1640
  function jr() {
1635
- if (Rt) return U;
1636
- Rt = 1;
1641
+ if (Ct) return U;
1642
+ Ct = 1;
1637
1643
  var s = U && U.__importDefault || function(p) {
1638
1644
  return p && p.__esModule ? p : { default: p };
1639
1645
  };
1640
1646
  Object.defineProperty(U, "__esModule", { value: !0 }), U.createProxyModule = U.createProxyFunction = void 0;
1641
- const e = s(st()), t = ke, n = /* @__PURE__ */ rt(), r = /* @__PURE__ */ Hr(), i = /* @__PURE__ */ Nt(), o = /* @__PURE__ */ gn(), c = e.default("threads:master:messages");
1647
+ const e = s(st()), t = ke, n = /* @__PURE__ */ rt(), r = /* @__PURE__ */ Hr(), i = /* @__PURE__ */ Ft(), o = /* @__PURE__ */ _n(), c = e.default("threads:master:messages");
1642
1648
  let a = 1;
1643
1649
  const d = (p) => Array.from(new Set(p)), u = (p) => p && p.type === o.WorkerMessageType.error, l = (p) => p && p.type === o.WorkerMessageType.result, h = (p) => p && p.type === o.WorkerMessageType.running;
1644
1650
  function f(p, g) {
@@ -1708,33 +1714,33 @@ function jr() {
1708
1714
  }
1709
1715
  return U.createProxyModule = T, U;
1710
1716
  }
1711
- var Ct;
1717
+ var xt;
1712
1718
  function Ur() {
1713
- if (Ct) return j;
1714
- Ct = 1;
1719
+ if (xt) return j;
1720
+ xt = 1;
1715
1721
  var s = j && j.__awaiter || function(_, y, v, R) {
1716
- function C(x) {
1717
- return x instanceof v ? x : new v(function(k) {
1718
- k(x);
1722
+ function C(M) {
1723
+ return M instanceof v ? M : new v(function(k) {
1724
+ k(M);
1719
1725
  });
1720
1726
  }
1721
- return new (v || (v = Promise))(function(x, k) {
1722
- function I(q) {
1727
+ return new (v || (v = Promise))(function(M, k) {
1728
+ function I(V) {
1723
1729
  try {
1724
- Le(R.next(q));
1730
+ Le(R.next(V));
1725
1731
  } catch (Ae) {
1726
1732
  k(Ae);
1727
1733
  }
1728
1734
  }
1729
- function K(q) {
1735
+ function q(V) {
1730
1736
  try {
1731
- Le(R.throw(q));
1737
+ Le(R.throw(V));
1732
1738
  } catch (Ae) {
1733
1739
  k(Ae);
1734
1740
  }
1735
1741
  }
1736
- function Le(q) {
1737
- q.done ? x(q.value) : C(q.value).then(I, K);
1742
+ function Le(V) {
1743
+ V.done ? M(V.value) : C(V.value).then(I, q);
1738
1744
  }
1739
1745
  Le((R = R.apply(_, y || [])).next());
1740
1746
  });
@@ -1742,17 +1748,17 @@ function Ur() {
1742
1748
  return _ && _.__esModule ? _ : { default: _ };
1743
1749
  };
1744
1750
  Object.defineProperty(j, "__esModule", { value: !0 }), j.spawn = void 0;
1745
- const t = e(st()), n = ke, r = /* @__PURE__ */ rt(), i = /* @__PURE__ */ Fr(), o = /* @__PURE__ */ It(), c = /* @__PURE__ */ Dr(), a = /* @__PURE__ */ jr(), d = t.default("threads:master:messages"), u = t.default("threads:master:spawn"), l = t.default("threads:master:thread-utils"), h = (_) => _ && _.type === "init", f = (_) => _ && _.type === "uncaughtError", w = typeof process < "u" && process.env.THREADS_WORKER_INIT_TIMEOUT ? Number.parseInt(process.env.THREADS_WORKER_INIT_TIMEOUT, 10) : 1e4;
1751
+ const t = e(st()), n = ke, r = /* @__PURE__ */ rt(), i = /* @__PURE__ */ Fr(), o = /* @__PURE__ */ Nt(), c = /* @__PURE__ */ Dr(), a = /* @__PURE__ */ jr(), d = t.default("threads:master:messages"), u = t.default("threads:master:spawn"), l = t.default("threads:master:thread-utils"), h = (_) => _ && _.type === "init", f = (_) => _ && _.type === "uncaughtError", w = typeof process < "u" && process.env.THREADS_WORKER_INIT_TIMEOUT ? Number.parseInt(process.env.THREADS_WORKER_INIT_TIMEOUT, 10) : 1e4;
1746
1752
  function E(_, y, v) {
1747
1753
  return s(this, void 0, void 0, function* () {
1748
1754
  let R;
1749
1755
  const C = new Promise((k, I) => {
1750
1756
  R = setTimeout(() => I(Error(v)), y);
1751
- }), x = yield Promise.race([
1757
+ }), M = yield Promise.race([
1752
1758
  _,
1753
1759
  C
1754
1760
  ]);
1755
- return clearTimeout(R), x;
1761
+ return clearTimeout(R), M;
1756
1762
  });
1757
1763
  }
1758
1764
  function T(_) {
@@ -1765,25 +1771,25 @@ function Ur() {
1765
1771
  }
1766
1772
  function p(_, y) {
1767
1773
  return new n.Observable((v) => {
1768
- const R = (x) => {
1774
+ const R = (M) => {
1769
1775
  const k = {
1770
1776
  type: c.WorkerEventType.message,
1771
- data: x.data
1777
+ data: M.data
1772
1778
  };
1773
1779
  v.next(k);
1774
- }, C = (x) => {
1775
- l("Unhandled promise rejection event in thread:", x);
1780
+ }, C = (M) => {
1781
+ l("Unhandled promise rejection event in thread:", M);
1776
1782
  const k = {
1777
1783
  type: c.WorkerEventType.internalError,
1778
- error: Error(x.reason)
1784
+ error: Error(M.reason)
1779
1785
  };
1780
1786
  v.next(k);
1781
1787
  };
1782
1788
  _.addEventListener("message", R), _.addEventListener("unhandledrejection", C), y.then(() => {
1783
- const x = {
1789
+ const M = {
1784
1790
  type: c.WorkerEventType.termination
1785
1791
  };
1786
- _.removeEventListener("message", R), _.removeEventListener("unhandledrejection", C), v.next(x), v.complete();
1792
+ _.removeEventListener("message", R), _.removeEventListener("unhandledrejection", C), v.next(M), v.complete();
1787
1793
  });
1788
1794
  });
1789
1795
  }
@@ -1794,7 +1800,7 @@ function Ur() {
1794
1800
  }), termination: y };
1795
1801
  }
1796
1802
  function m(_, y, v, R) {
1797
- const C = v.filter((x) => x.type === c.WorkerEventType.internalError).map((x) => x.error);
1803
+ const C = v.filter((M) => M.type === c.WorkerEventType.internalError).map((M) => M.error);
1798
1804
  return Object.assign(_, {
1799
1805
  [o.$errors]: C,
1800
1806
  [o.$events]: v,
@@ -1805,16 +1811,16 @@ function Ur() {
1805
1811
  function b(_, y) {
1806
1812
  return s(this, void 0, void 0, function* () {
1807
1813
  u("Initializing new thread");
1808
- const v = y && y.timeout ? y.timeout : w, C = (yield E(T(_), v, `Timeout: Did not receive an init message from worker after ${v}ms. Make sure the worker calls expose().`)).exposed, { termination: x, terminate: k } = g(_), I = p(_, x);
1814
+ const v = y && y.timeout ? y.timeout : w, C = (yield E(T(_), v, `Timeout: Did not receive an init message from worker after ${v}ms. Make sure the worker calls expose().`)).exposed, { termination: M, terminate: k } = g(_), I = p(_, M);
1809
1815
  if (C.type === "function") {
1810
- const K = a.createProxyFunction(_);
1811
- return m(K, _, I, k);
1816
+ const q = a.createProxyFunction(_);
1817
+ return m(q, _, I, k);
1812
1818
  } else if (C.type === "module") {
1813
- const K = a.createProxyModule(_, C.methods);
1814
- return m(K, _, I, k);
1819
+ const q = a.createProxyModule(_, C.methods);
1820
+ return m(q, _, I, k);
1815
1821
  } else {
1816
- const K = C.type;
1817
- throw Error(`Worker init message states unexpected type of expose(): ${K}`);
1822
+ const q = C.type;
1823
+ throw Error(`Worker init message states unexpected type of expose(): ${q}`);
1818
1824
  }
1819
1825
  });
1820
1826
  }
@@ -1824,7 +1830,7 @@ var St;
1824
1830
  function Br() {
1825
1831
  return St || (St = 1, function(s) {
1826
1832
  Object.defineProperty(s, "__esModule", { value: !0 }), s.Worker = s.BlobWorker = s.isWorkerRuntime = s.Thread = s.spawn = s.Pool = void 0;
1827
- const e = /* @__PURE__ */ tn();
1833
+ const e = /* @__PURE__ */ nn();
1828
1834
  Object.defineProperty(s, "isWorkerRuntime", { enumerable: !0, get: function() {
1829
1835
  return e.isWorkerRuntime;
1830
1836
  } });
@@ -1836,15 +1842,15 @@ function Br() {
1836
1842
  Object.defineProperty(s, "spawn", { enumerable: !0, get: function() {
1837
1843
  return n.spawn;
1838
1844
  } });
1839
- var r = /* @__PURE__ */ cn();
1845
+ var r = /* @__PURE__ */ un();
1840
1846
  Object.defineProperty(s, "Thread", { enumerable: !0, get: function() {
1841
1847
  return r.Thread;
1842
1848
  } }), s.BlobWorker = e.getWorkerImplementation().blob, s.Worker = e.getWorkerImplementation().default;
1843
1849
  }(Ne)), Ne;
1844
1850
  }
1845
- var xt;
1851
+ var Mt;
1846
1852
  function Wr() {
1847
- return xt || (xt = 1, function(s) {
1853
+ return Mt || (Mt = 1, function(s) {
1848
1854
  var e = X && X.__createBinding || (Object.create ? function(c, a, d, u) {
1849
1855
  u === void 0 && (u = d), Object.defineProperty(c, u, { enumerable: !0, get: function() {
1850
1856
  return a[d];
@@ -1859,30 +1865,30 @@ function Wr() {
1859
1865
  Object.defineProperty(s, "registerSerializer", { enumerable: !0, get: function() {
1860
1866
  return n.registerSerializer;
1861
1867
  } }), t(/* @__PURE__ */ Br(), s);
1862
- var r = _n();
1868
+ var r = bn();
1863
1869
  Object.defineProperty(s, "expose", { enumerable: !0, get: function() {
1864
1870
  return r.expose;
1865
1871
  } });
1866
- var i = /* @__PURE__ */ bn();
1872
+ var i = /* @__PURE__ */ yn();
1867
1873
  Object.defineProperty(s, "DefaultSerializer", { enumerable: !0, get: function() {
1868
1874
  return i.DefaultSerializer;
1869
1875
  } });
1870
- var o = /* @__PURE__ */ Nt();
1876
+ var o = /* @__PURE__ */ Ft();
1871
1877
  Object.defineProperty(s, "Transfer", { enumerable: !0, get: function() {
1872
1878
  return o.Transfer;
1873
1879
  } });
1874
1880
  }(X)), X;
1875
1881
  }
1876
1882
  var Gr = /* @__PURE__ */ Wr();
1877
- const $ = /* @__PURE__ */ yn(Gr);
1878
- $.registerSerializer;
1879
- const zr = $.spawn;
1880
- $.BlobWorker;
1881
- $.DefaultSerializer;
1882
- $.Pool;
1883
- const $r = $.Thread;
1884
- $.Transfer;
1885
- const Kr = $.Worker;
1883
+ const K = /* @__PURE__ */ Tn(Gr);
1884
+ K.registerSerializer;
1885
+ const zr = K.spawn;
1886
+ K.BlobWorker;
1887
+ K.DefaultSerializer;
1888
+ K.Pool;
1889
+ const $r = K.Thread;
1890
+ K.Transfer;
1891
+ const Kr = K.Worker;
1886
1892
  var qr = Object.defineProperty, Vr = (s, e, t) => e in s ? qr(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, B = (s, e, t) => Vr(s, typeof e != "symbol" ? e + "" : e, t);
1887
1893
  const Xr = () => {
1888
1894
  try {
@@ -2016,11 +2022,11 @@ var ns = Object.defineProperty, rs = Object.getOwnPropertyDescriptor, ss = (s, e
2016
2022
  }, is = (s, e) => (t, n) => e(t, n, s);
2017
2023
  let Re = class {
2018
2024
  constructor(s) {
2019
- M(this, "workerPool");
2020
- M(this, "canvas");
2021
- M(this, "canvasWrapper");
2022
- M(this, "offscreenCanvas");
2023
- M(this, "workerThread");
2025
+ S(this, "workerPool");
2026
+ S(this, "canvas");
2027
+ S(this, "canvasWrapper");
2028
+ S(this, "offscreenCanvas");
2029
+ S(this, "workerThread");
2024
2030
  var e;
2025
2031
  this._props = s, this.workerPool = ts(void 0, !!((e = this._props.debug) != null && e.enabled));
2026
2032
  }
@@ -2084,7 +2090,7 @@ let Re = class {
2084
2090
  };
2085
2091
  }
2086
2092
  keyEventHandler(s) {
2087
- if (Tn.includes(s.code))
2093
+ if (wn.includes(s.code))
2088
2094
  return s.preventDefault(), {
2089
2095
  ...this.getScreenSizes(),
2090
2096
  ...pe(s, ["ctrlKey", "metaKey", "shiftKey", "keyCode"])
@@ -2093,32 +2099,32 @@ let Re = class {
2093
2099
  };
2094
2100
  Re = ss([
2095
2101
  ie(oe.ContainerScoped),
2096
- is(0, O(xe))
2102
+ is(0, O(Se))
2097
2103
  ], Re);
2098
2104
  var os = Object.defineProperty, as = Object.getOwnPropertyDescriptor, cs = (s, e, t, n) => {
2099
2105
  for (var r = n > 1 ? void 0 : n ? as(e, t) : e, i = s.length - 1, o; i >= 0; i--)
2100
2106
  (o = s[i]) && (r = (n ? o(e, t, r) : o(r)) || r);
2101
2107
  return n && r && os(e, t, r), r;
2102
2108
  }, us = (s, e) => (t, n) => e(t, n, s);
2103
- let Je = class extends wn {
2109
+ let Je = class extends vn {
2104
2110
  constructor(s) {
2105
2111
  super(), this._service = s;
2106
2112
  }
2107
2113
  init() {
2108
2114
  let s;
2109
2115
  try {
2110
- s = Ft.resolve("MAIN_THREAD_APP");
2116
+ s = Dt.resolve("MAIN_THREAD_APP");
2111
2117
  } catch {
2112
2118
  s = void 0;
2113
2119
  }
2114
- for (const e of Dt) {
2120
+ for (const e of Ht) {
2115
2121
  const t = e.startsWith("mouse") || e.startsWith("pointer") || e.startsWith("touch") ? this._service.mouseEventHandler.bind(this._service) : e.startsWith("key") ? this._service.keyEventHandler.bind(this._service) : e === "resize" ? this._service.uiEventHandler.bind(this._service) : e === "wheel" ? this._service.wheelEventHandler.bind(this._service) : this._service.preventDefaultHandler.bind(this._service);
2116
- this[`${e}$$`] = new Ht(), vn(
2122
+ this[`${e}$$`] = new jt(), En(
2117
2123
  e === "resize" ? window : this._service.canvas,
2118
2124
  e
2119
2125
  ).pipe(
2120
2126
  ye((n) => t.bind(this)(n)),
2121
- jt((n) => !(e === "keydown" && !n))
2127
+ Ut((n) => !(e === "keydown" && !n))
2122
2128
  ).subscribe((n) => {
2123
2129
  this[`${e}$$`].next(
2124
2130
  n
@@ -2134,10 +2140,10 @@ Je = cs([
2134
2140
  ie(oe.ContainerScoped),
2135
2141
  us(0, O(Re))
2136
2142
  ], Je);
2137
- function Mt(s, e) {
2143
+ function kt(s, e) {
2138
2144
  if (e === Mn)
2139
2145
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), s;
2140
- if (e === Ke || e === Wt) {
2146
+ if (e === Ke || e === Gt) {
2141
2147
  let t = s.getIndex();
2142
2148
  if (t === null) {
2143
2149
  const o = [], c = s.getAttribute("position");
@@ -2162,7 +2168,7 @@ function Mt(s, e) {
2162
2168
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), s;
2163
2169
  }
2164
2170
  const Be = /* @__PURE__ */ new WeakMap();
2165
- class un extends Gt {
2171
+ class ln extends zt {
2166
2172
  /**
2167
2173
  * Constructs a new Draco loader.
2168
2174
  *
@@ -2233,7 +2239,7 @@ class un extends Gt {
2233
2239
  */
2234
2240
  parse(e, t, n = () => {
2235
2241
  }) {
2236
- this.decodeDracoFile(e, t, null, null, G, n).catch(n);
2242
+ this.decodeDracoFile(e, t, null, null, z, n).catch(n);
2237
2243
  }
2238
2244
  //
2239
2245
  decodeDracoFile(e, t, n, r, i = F, o = () => {
@@ -2269,7 +2275,7 @@ class un extends Gt {
2269
2275
  }), c;
2270
2276
  }
2271
2277
  _createGeometry(e) {
2272
- const t = new zt();
2278
+ const t = new $t();
2273
2279
  e.index && t.setIndex(new me(e.index.array, 1));
2274
2280
  for (let n = 0; n < e.attributes.length; n++) {
2275
2281
  const { name: r, array: i, itemSize: o, stride: c, vertexColorSpace: a } = e.attributes[n];
@@ -2277,18 +2283,18 @@ class un extends Gt {
2277
2283
  if (o === c)
2278
2284
  d = new me(i, o);
2279
2285
  else {
2280
- const u = new $t(i, c);
2281
- d = new Kt(u, o, 0);
2286
+ const u = new Kt(i, c);
2287
+ d = new qt(u, o, 0);
2282
2288
  }
2283
2289
  r === "color" && (this._assignVertexColorSpace(d, a), d.normalized = !(i instanceof Float32Array)), t.setAttribute(r, d);
2284
2290
  }
2285
2291
  return t;
2286
2292
  }
2287
2293
  _assignVertexColorSpace(e, t) {
2288
- if (t !== G) return;
2289
- const n = new z();
2294
+ if (t !== z) return;
2295
+ const n = new $();
2290
2296
  for (let r = 0, i = e.count; r < i; r++)
2291
- n.fromBufferAttribute(e, r), qe.colorSpaceToWorking(n, G), e.setXYZ(r, n.r, n.g, n.b);
2297
+ n.fromBufferAttribute(e, r), qe.colorSpaceToWorking(n, z), e.setXYZ(r, n.r, n.g, n.b);
2292
2298
  }
2293
2299
  _loadLibrary(e, t) {
2294
2300
  const n = new we(this.manager);
@@ -2425,8 +2431,8 @@ function ls() {
2425
2431
  y = new u(m / u.BYTES_PER_ELEMENT);
2426
2432
  let v = 0;
2427
2433
  for (let R = 0, C = _.length; R < C; R++) {
2428
- for (let x = 0; x < f; x++)
2429
- y[v + x] = _[R * f + x];
2434
+ for (let M = 0; M < f; M++)
2435
+ y[v + M] = _[R * f + M];
2430
2436
  v += p;
2431
2437
  }
2432
2438
  }
@@ -2459,7 +2465,7 @@ function ls() {
2459
2465
  }
2460
2466
  function ds(s) {
2461
2467
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map(), n = s.clone();
2462
- return ln(s, n, function(r, i) {
2468
+ return dn(s, n, function(r, i) {
2463
2469
  e.set(i, r), t.set(r, i);
2464
2470
  }), n.traverse(function(r) {
2465
2471
  if (!r.isSkinnedMesh) return;
@@ -2469,12 +2475,12 @@ function ds(s) {
2469
2475
  }), i.bind(i.skeleton, i.bindMatrix);
2470
2476
  }), n;
2471
2477
  }
2472
- function ln(s, e, t) {
2478
+ function dn(s, e, t) {
2473
2479
  t(s, e);
2474
2480
  for (let n = 0; n < s.children.length; n++)
2475
- ln(s.children[n], e.children[n], t);
2481
+ dn(s.children[n], e.children[n], t);
2476
2482
  }
2477
- class hs extends Gt {
2483
+ class hs extends zt {
2478
2484
  /**
2479
2485
  * Constructs a new glTF loader.
2480
2486
  *
@@ -2486,7 +2492,7 @@ class hs extends Gt {
2486
2492
  }), this.register(function(t) {
2487
2493
  return new bs(t);
2488
2494
  }), this.register(function(t) {
2489
- return new xs(t);
2495
+ return new Ss(t);
2490
2496
  }), this.register(function(t) {
2491
2497
  return new Ms(t);
2492
2498
  }), this.register(function(t) {
@@ -2506,15 +2512,15 @@ class hs extends Gt {
2506
2512
  }), this.register(function(t) {
2507
2513
  return new ys(t);
2508
2514
  }), this.register(function(t) {
2509
- return new Ss(t);
2515
+ return new xs(t);
2510
2516
  }), this.register(function(t) {
2511
2517
  return new Cs(t);
2512
2518
  }), this.register(function(t) {
2513
2519
  return new ps(t);
2514
2520
  }), this.register(function(t) {
2515
- return new kt(t, S.EXT_MESHOPT_COMPRESSION);
2521
+ return new Lt(t, x.EXT_MESHOPT_COMPRESSION);
2516
2522
  }), this.register(function(t) {
2517
- return new kt(t, S.KHR_MESHOPT_COMPRESSION);
2523
+ return new Lt(t, x.KHR_MESHOPT_COMPRESSION);
2518
2524
  }), this.register(function(t) {
2519
2525
  return new Ls(t);
2520
2526
  });
@@ -2616,14 +2622,14 @@ class hs extends Gt {
2616
2622
  if (typeof e == "string")
2617
2623
  i = JSON.parse(e);
2618
2624
  else if (e instanceof ArrayBuffer)
2619
- if (a.decode(new Uint8Array(e, 0, 4)) === dn) {
2625
+ if (a.decode(new Uint8Array(e, 0, 4)) === hn) {
2620
2626
  try {
2621
- o[S.KHR_BINARY_GLTF] = new As(e);
2627
+ o[x.KHR_BINARY_GLTF] = new As(e);
2622
2628
  } catch (l) {
2623
2629
  r && r(l);
2624
2630
  return;
2625
2631
  }
2626
- i = JSON.parse(o[S.KHR_BINARY_GLTF].content);
2632
+ i = JSON.parse(o[x.KHR_BINARY_GLTF].content);
2627
2633
  } else
2628
2634
  i = JSON.parse(a.decode(e));
2629
2635
  else
@@ -2649,16 +2655,16 @@ class hs extends Gt {
2649
2655
  for (let u = 0; u < i.extensionsUsed.length; ++u) {
2650
2656
  const l = i.extensionsUsed[u], h = i.extensionsRequired || [];
2651
2657
  switch (l) {
2652
- case S.KHR_MATERIALS_UNLIT:
2658
+ case x.KHR_MATERIALS_UNLIT:
2653
2659
  o[l] = new ms();
2654
2660
  break;
2655
- case S.KHR_DRACO_MESH_COMPRESSION:
2661
+ case x.KHR_DRACO_MESH_COMPRESSION:
2656
2662
  o[l] = new Ps(i, this.dracoLoader);
2657
2663
  break;
2658
- case S.KHR_TEXTURE_TRANSFORM:
2664
+ case x.KHR_TEXTURE_TRANSFORM:
2659
2665
  o[l] = new Os();
2660
2666
  break;
2661
- case S.KHR_MESH_QUANTIZATION:
2667
+ case x.KHR_MESH_QUANTIZATION:
2662
2668
  o[l] = new Is();
2663
2669
  break;
2664
2670
  default:
@@ -2703,7 +2709,7 @@ function L(s, e, t) {
2703
2709
  const n = s.json.materials[e];
2704
2710
  return n.extensions && n.extensions[t] ? n.extensions[t] : null;
2705
2711
  }
2706
- const S = {
2712
+ const x = {
2707
2713
  KHR_BINARY_GLTF: "KHR_binary_glTF",
2708
2714
  KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
2709
2715
  KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
@@ -2730,7 +2736,7 @@ const S = {
2730
2736
  };
2731
2737
  class ps {
2732
2738
  constructor(e) {
2733
- this.parser = e, this.name = S.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
2739
+ this.parser = e, this.name = x.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
2734
2740
  }
2735
2741
  _markDefs() {
2736
2742
  const e = this.parser, t = this.parser.json.nodes || [];
@@ -2745,7 +2751,7 @@ class ps {
2745
2751
  if (r) return r;
2746
2752
  const i = t.json, a = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e];
2747
2753
  let d;
2748
- const u = new z(16777215);
2754
+ const u = new $(16777215);
2749
2755
  a.color !== void 0 && u.setRGB(a.color[0], a.color[1], a.color[2], F);
2750
2756
  const l = a.range !== void 0 ? a.range : 0;
2751
2757
  switch (a.type) {
@@ -2776,28 +2782,28 @@ class ps {
2776
2782
  }
2777
2783
  class ms {
2778
2784
  constructor() {
2779
- this.name = S.KHR_MATERIALS_UNLIT;
2785
+ this.name = x.KHR_MATERIALS_UNLIT;
2780
2786
  }
2781
2787
  getMaterialType() {
2782
2788
  return fe;
2783
2789
  }
2784
2790
  extendParams(e, t, n) {
2785
2791
  const r = [];
2786
- e.color = new z(1, 1, 1), e.opacity = 1;
2792
+ e.color = new $(1, 1, 1), e.opacity = 1;
2787
2793
  const i = t.pbrMetallicRoughness;
2788
2794
  if (i) {
2789
2795
  if (Array.isArray(i.baseColorFactor)) {
2790
2796
  const o = i.baseColorFactor;
2791
2797
  e.color.setRGB(o[0], o[1], o[2], F), e.opacity = o[3];
2792
2798
  }
2793
- i.baseColorTexture !== void 0 && r.push(n.assignTexture(e, "map", i.baseColorTexture, G));
2799
+ i.baseColorTexture !== void 0 && r.push(n.assignTexture(e, "map", i.baseColorTexture, z));
2794
2800
  }
2795
2801
  return Promise.all(r);
2796
2802
  }
2797
2803
  }
2798
2804
  class gs {
2799
2805
  constructor(e) {
2800
- this.parser = e, this.name = S.KHR_MATERIALS_EMISSIVE_STRENGTH;
2806
+ this.parser = e, this.name = x.KHR_MATERIALS_EMISSIVE_STRENGTH;
2801
2807
  }
2802
2808
  extendMaterialParams(e, t) {
2803
2809
  const n = L(this.parser, e, this.name);
@@ -2806,7 +2812,7 @@ class gs {
2806
2812
  }
2807
2813
  class _s {
2808
2814
  constructor(e) {
2809
- this.parser = e, this.name = S.KHR_MATERIALS_CLEARCOAT;
2815
+ this.parser = e, this.name = x.KHR_MATERIALS_CLEARCOAT;
2810
2816
  }
2811
2817
  getMaterialType(e) {
2812
2818
  return L(this.parser, e, this.name) !== null ? D : null;
@@ -2817,14 +2823,14 @@ class _s {
2817
2823
  const r = [];
2818
2824
  if (n.clearcoatFactor !== void 0 && (t.clearcoat = n.clearcoatFactor), n.clearcoatTexture !== void 0 && r.push(this.parser.assignTexture(t, "clearcoatMap", n.clearcoatTexture)), n.clearcoatRoughnessFactor !== void 0 && (t.clearcoatRoughness = n.clearcoatRoughnessFactor), n.clearcoatRoughnessTexture !== void 0 && r.push(this.parser.assignTexture(t, "clearcoatRoughnessMap", n.clearcoatRoughnessTexture)), n.clearcoatNormalTexture !== void 0 && (r.push(this.parser.assignTexture(t, "clearcoatNormalMap", n.clearcoatNormalTexture)), n.clearcoatNormalTexture.scale !== void 0)) {
2819
2825
  const i = n.clearcoatNormalTexture.scale;
2820
- t.clearcoatNormalScale = new qt(i, i);
2826
+ t.clearcoatNormalScale = new Vt(i, i);
2821
2827
  }
2822
2828
  return Promise.all(r);
2823
2829
  }
2824
2830
  }
2825
2831
  class bs {
2826
2832
  constructor(e) {
2827
- this.parser = e, this.name = S.KHR_MATERIALS_DISPERSION;
2833
+ this.parser = e, this.name = x.KHR_MATERIALS_DISPERSION;
2828
2834
  }
2829
2835
  getMaterialType(e) {
2830
2836
  return L(this.parser, e, this.name) !== null ? D : null;
@@ -2836,7 +2842,7 @@ class bs {
2836
2842
  }
2837
2843
  class ys {
2838
2844
  constructor(e) {
2839
- this.parser = e, this.name = S.KHR_MATERIALS_IRIDESCENCE;
2845
+ this.parser = e, this.name = x.KHR_MATERIALS_IRIDESCENCE;
2840
2846
  }
2841
2847
  getMaterialType(e) {
2842
2848
  return L(this.parser, e, this.name) !== null ? D : null;
@@ -2850,7 +2856,7 @@ class ys {
2850
2856
  }
2851
2857
  class Ts {
2852
2858
  constructor(e) {
2853
- this.parser = e, this.name = S.KHR_MATERIALS_SHEEN;
2859
+ this.parser = e, this.name = x.KHR_MATERIALS_SHEEN;
2854
2860
  }
2855
2861
  getMaterialType(e) {
2856
2862
  return L(this.parser, e, this.name) !== null ? D : null;
@@ -2859,16 +2865,16 @@ class Ts {
2859
2865
  const n = L(this.parser, e, this.name);
2860
2866
  if (n === null) return Promise.resolve();
2861
2867
  const r = [];
2862
- if (t.sheenColor = new z(0, 0, 0), t.sheenRoughness = 0, t.sheen = 1, n.sheenColorFactor !== void 0) {
2868
+ if (t.sheenColor = new $(0, 0, 0), t.sheenRoughness = 0, t.sheen = 1, n.sheenColorFactor !== void 0) {
2863
2869
  const i = n.sheenColorFactor;
2864
2870
  t.sheenColor.setRGB(i[0], i[1], i[2], F);
2865
2871
  }
2866
- return n.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = n.sheenRoughnessFactor), n.sheenColorTexture !== void 0 && r.push(this.parser.assignTexture(t, "sheenColorMap", n.sheenColorTexture, G)), n.sheenRoughnessTexture !== void 0 && r.push(this.parser.assignTexture(t, "sheenRoughnessMap", n.sheenRoughnessTexture)), Promise.all(r);
2872
+ return n.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = n.sheenRoughnessFactor), n.sheenColorTexture !== void 0 && r.push(this.parser.assignTexture(t, "sheenColorMap", n.sheenColorTexture, z)), n.sheenRoughnessTexture !== void 0 && r.push(this.parser.assignTexture(t, "sheenRoughnessMap", n.sheenRoughnessTexture)), Promise.all(r);
2867
2873
  }
2868
2874
  }
2869
2875
  class ws {
2870
2876
  constructor(e) {
2871
- this.parser = e, this.name = S.KHR_MATERIALS_TRANSMISSION;
2877
+ this.parser = e, this.name = x.KHR_MATERIALS_TRANSMISSION;
2872
2878
  }
2873
2879
  getMaterialType(e) {
2874
2880
  return L(this.parser, e, this.name) !== null ? D : null;
@@ -2882,7 +2888,7 @@ class ws {
2882
2888
  }
2883
2889
  class vs {
2884
2890
  constructor(e) {
2885
- this.parser = e, this.name = S.KHR_MATERIALS_VOLUME;
2891
+ this.parser = e, this.name = x.KHR_MATERIALS_VOLUME;
2886
2892
  }
2887
2893
  getMaterialType(e) {
2888
2894
  return L(this.parser, e, this.name) !== null ? D : null;
@@ -2893,12 +2899,12 @@ class vs {
2893
2899
  const r = [];
2894
2900
  t.thickness = n.thicknessFactor !== void 0 ? n.thicknessFactor : 0, n.thicknessTexture !== void 0 && r.push(this.parser.assignTexture(t, "thicknessMap", n.thicknessTexture)), t.attenuationDistance = n.attenuationDistance || 1 / 0;
2895
2901
  const i = n.attenuationColor || [1, 1, 1];
2896
- return t.attenuationColor = new z().setRGB(i[0], i[1], i[2], F), Promise.all(r);
2902
+ return t.attenuationColor = new $().setRGB(i[0], i[1], i[2], F), Promise.all(r);
2897
2903
  }
2898
2904
  }
2899
2905
  class Es {
2900
2906
  constructor(e) {
2901
- this.parser = e, this.name = S.KHR_MATERIALS_IOR;
2907
+ this.parser = e, this.name = x.KHR_MATERIALS_IOR;
2902
2908
  }
2903
2909
  getMaterialType(e) {
2904
2910
  return L(this.parser, e, this.name) !== null ? D : null;
@@ -2910,7 +2916,7 @@ class Es {
2910
2916
  }
2911
2917
  class Rs {
2912
2918
  constructor(e) {
2913
- this.parser = e, this.name = S.KHR_MATERIALS_SPECULAR;
2919
+ this.parser = e, this.name = x.KHR_MATERIALS_SPECULAR;
2914
2920
  }
2915
2921
  getMaterialType(e) {
2916
2922
  return L(this.parser, e, this.name) !== null ? D : null;
@@ -2921,12 +2927,12 @@ class Rs {
2921
2927
  const r = [];
2922
2928
  t.specularIntensity = n.specularFactor !== void 0 ? n.specularFactor : 1, n.specularTexture !== void 0 && r.push(this.parser.assignTexture(t, "specularIntensityMap", n.specularTexture));
2923
2929
  const i = n.specularColorFactor || [1, 1, 1];
2924
- return t.specularColor = new z().setRGB(i[0], i[1], i[2], F), n.specularColorTexture !== void 0 && r.push(this.parser.assignTexture(t, "specularColorMap", n.specularColorTexture, G)), Promise.all(r);
2930
+ return t.specularColor = new $().setRGB(i[0], i[1], i[2], F), n.specularColorTexture !== void 0 && r.push(this.parser.assignTexture(t, "specularColorMap", n.specularColorTexture, z)), Promise.all(r);
2925
2931
  }
2926
2932
  }
2927
2933
  class Cs {
2928
2934
  constructor(e) {
2929
- this.parser = e, this.name = S.EXT_MATERIALS_BUMP;
2935
+ this.parser = e, this.name = x.EXT_MATERIALS_BUMP;
2930
2936
  }
2931
2937
  getMaterialType(e) {
2932
2938
  return L(this.parser, e, this.name) !== null ? D : null;
@@ -2938,9 +2944,9 @@ class Cs {
2938
2944
  return t.bumpScale = n.bumpFactor !== void 0 ? n.bumpFactor : 1, n.bumpTexture !== void 0 && r.push(this.parser.assignTexture(t, "bumpMap", n.bumpTexture)), Promise.all(r);
2939
2945
  }
2940
2946
  }
2941
- class Ss {
2947
+ class xs {
2942
2948
  constructor(e) {
2943
- this.parser = e, this.name = S.KHR_MATERIALS_ANISOTROPY;
2949
+ this.parser = e, this.name = x.KHR_MATERIALS_ANISOTROPY;
2944
2950
  }
2945
2951
  getMaterialType(e) {
2946
2952
  return L(this.parser, e, this.name) !== null ? D : null;
@@ -2952,9 +2958,9 @@ class Ss {
2952
2958
  return n.anisotropyStrength !== void 0 && (t.anisotropy = n.anisotropyStrength), n.anisotropyRotation !== void 0 && (t.anisotropyRotation = n.anisotropyRotation), n.anisotropyTexture !== void 0 && r.push(this.parser.assignTexture(t, "anisotropyMap", n.anisotropyTexture)), Promise.all(r);
2953
2959
  }
2954
2960
  }
2955
- class xs {
2961
+ class Ss {
2956
2962
  constructor(e) {
2957
- this.parser = e, this.name = S.KHR_TEXTURE_BASISU;
2963
+ this.parser = e, this.name = x.KHR_TEXTURE_BASISU;
2958
2964
  }
2959
2965
  loadTexture(e) {
2960
2966
  const t = this.parser, n = t.json, r = n.textures[e];
@@ -2971,7 +2977,7 @@ class xs {
2971
2977
  }
2972
2978
  class Ms {
2973
2979
  constructor(e) {
2974
- this.parser = e, this.name = S.EXT_TEXTURE_WEBP;
2980
+ this.parser = e, this.name = x.EXT_TEXTURE_WEBP;
2975
2981
  }
2976
2982
  loadTexture(e) {
2977
2983
  const t = this.name, n = this.parser, r = n.json, i = r.textures[e];
@@ -2988,7 +2994,7 @@ class Ms {
2988
2994
  }
2989
2995
  class ks {
2990
2996
  constructor(e) {
2991
- this.parser = e, this.name = S.EXT_TEXTURE_AVIF;
2997
+ this.parser = e, this.name = x.EXT_TEXTURE_AVIF;
2992
2998
  }
2993
2999
  loadTexture(e) {
2994
3000
  const t = this.name, n = this.parser, r = n.json, i = r.textures[e];
@@ -3003,7 +3009,7 @@ class ks {
3003
3009
  return n.loadTextureImage(e, o.source, a);
3004
3010
  }
3005
3011
  }
3006
- class kt {
3012
+ class Lt {
3007
3013
  constructor(e, t) {
3008
3014
  this.name = t, this.parser = e;
3009
3015
  }
@@ -3031,7 +3037,7 @@ class kt {
3031
3037
  }
3032
3038
  class Ls {
3033
3039
  constructor(e) {
3034
- this.name = S.EXT_MESH_GPU_INSTANCING, this.parser = e;
3040
+ this.name = x.EXT_MESH_GPU_INSTANCING, this.parser = e;
3035
3041
  }
3036
3042
  createNodeMesh(e) {
3037
3043
  const t = this.parser.json, n = t.nodes[e];
@@ -3047,7 +3053,7 @@ class Ls {
3047
3053
  return c.length < 1 ? null : (c.push(this.parser.createNodeMesh(e)), Promise.all(c).then((d) => {
3048
3054
  const u = d.pop(), l = u.isGroup ? u.children : [u], h = d[0].count, f = [];
3049
3055
  for (const w of l) {
3050
- const E = new ve(), T = new Z(), p = new Vt(), g = new Z(1, 1, 1), m = new Pn(w.geometry, w.material, h);
3056
+ const E = new ve(), T = new Z(), p = new Xt(), g = new Z(1, 1, 1), m = new Pn(w.geometry, w.material, h);
3051
3057
  for (let b = 0; b < h; b++)
3052
3058
  a.TRANSLATION && T.fromBufferAttribute(a.TRANSLATION, b), a.ROTATION && p.fromBufferAttribute(a.ROTATION, b), a.SCALE && g.fromBufferAttribute(a.SCALE, b), m.setMatrixAt(b, E.compose(T, p, g));
3053
3059
  for (const b in a)
@@ -3055,22 +3061,22 @@ class Ls {
3055
3061
  const _ = a[b];
3056
3062
  m.instanceColor = new On(_.array, _.itemSize, _.normalized);
3057
3063
  } else b !== "TRANSLATION" && b !== "ROTATION" && b !== "SCALE" && w.geometry.setAttribute(b, a[b]);
3058
- Xt.prototype.copy.call(m, w), this.parser.assignFinalMaterial(m), f.push(m);
3064
+ Qt.prototype.copy.call(m, w), this.parser.assignFinalMaterial(m), f.push(m);
3059
3065
  }
3060
3066
  return u.isGroup ? (u.clear(), u.add(...f), u) : f[0];
3061
3067
  }));
3062
3068
  }
3063
3069
  }
3064
- const dn = "glTF", he = 12, Lt = { JSON: 1313821514, BIN: 5130562 };
3070
+ const hn = "glTF", he = 12, At = { JSON: 1313821514, BIN: 5130562 };
3065
3071
  class As {
3066
3072
  constructor(e) {
3067
- this.name = S.KHR_BINARY_GLTF, this.content = null, this.body = null;
3073
+ this.name = x.KHR_BINARY_GLTF, this.content = null, this.body = null;
3068
3074
  const t = new DataView(e, 0, he), n = new TextDecoder();
3069
3075
  if (this.header = {
3070
3076
  magic: n.decode(new Uint8Array(e.slice(0, 4))),
3071
3077
  version: t.getUint32(4, !0),
3072
3078
  length: t.getUint32(8, !0)
3073
- }, this.header.magic !== dn)
3079
+ }, this.header.magic !== hn)
3074
3080
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
3075
3081
  if (this.header.version < 2)
3076
3082
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
@@ -3080,10 +3086,10 @@ class As {
3080
3086
  const c = i.getUint32(o, !0);
3081
3087
  o += 4;
3082
3088
  const a = i.getUint32(o, !0);
3083
- if (o += 4, a === Lt.JSON) {
3089
+ if (o += 4, a === At.JSON) {
3084
3090
  const d = new Uint8Array(e, he + o, c);
3085
3091
  this.content = n.decode(d);
3086
- } else if (a === Lt.BIN) {
3092
+ } else if (a === At.BIN) {
3087
3093
  const d = he + o;
3088
3094
  this.body = e.slice(d, d + c);
3089
3095
  }
@@ -3097,7 +3103,7 @@ class Ps {
3097
3103
  constructor(e, t) {
3098
3104
  if (!t)
3099
3105
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
3100
- this.name = S.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = t, this.dracoLoader.preload();
3106
+ this.name = x.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = t, this.dracoLoader.preload();
3101
3107
  }
3102
3108
  decodePrimitive(e, t) {
3103
3109
  const n = this.json, r = this.dracoLoader, i = e.extensions[this.name].bufferView, o = e.extensions[this.name].attributes, c = {}, a = {}, d = {};
@@ -3127,7 +3133,7 @@ class Ps {
3127
3133
  }
3128
3134
  class Os {
3129
3135
  constructor() {
3130
- this.name = S.KHR_TEXTURE_TRANSFORM;
3136
+ this.name = x.KHR_TEXTURE_TRANSFORM;
3131
3137
  }
3132
3138
  extendTexture(e, t) {
3133
3139
  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;
@@ -3135,10 +3141,10 @@ class Os {
3135
3141
  }
3136
3142
  class Is {
3137
3143
  constructor() {
3138
- this.name = S.KHR_MESH_QUANTIZATION;
3144
+ this.name = x.KHR_MESH_QUANTIZATION;
3139
3145
  }
3140
3146
  }
3141
- class hn extends or {
3147
+ class fn extends or {
3142
3148
  constructor(e, t, n, r) {
3143
3149
  super(e, t, n, r);
3144
3150
  }
@@ -3157,8 +3163,8 @@ class hn extends or {
3157
3163
  return i;
3158
3164
  }
3159
3165
  }
3160
- const Ns = new Vt();
3161
- class Fs extends hn {
3166
+ const Ns = new Xt();
3167
+ class Fs extends fn {
3162
3168
  interpolate_(e, t, n, r) {
3163
3169
  const i = super.interpolate_(e, t, n, r);
3164
3170
  return Ns.fromArray(i).normalize().toArray(i), i;
@@ -3191,14 +3197,14 @@ const P = {
3191
3197
  5123: Uint16Array,
3192
3198
  5125: Uint32Array,
3193
3199
  5126: Float32Array
3194
- }, At = {
3195
- 9728: Jt,
3200
+ }, Pt = {
3201
+ 9728: Zt,
3196
3202
  9729: Ve,
3197
3203
  9984: Yn,
3198
3204
  9985: Jn,
3199
3205
  9986: Zn,
3200
- 9987: Yt
3201
- }, Pt = {
3206
+ 9987: Jt
3207
+ }, Ot = {
3202
3208
  33071: er,
3203
3209
  33648: tr,
3204
3210
  10497: Xe
@@ -3221,7 +3227,7 @@ const P = {
3221
3227
  COLOR_0: "color",
3222
3228
  WEIGHTS_0: "skinWeight",
3223
3229
  JOINTS_0: "skinIndex"
3224
- }, W = {
3230
+ }, G = {
3225
3231
  scale: "scale",
3226
3232
  translation: "position",
3227
3233
  rotation: "quaternion",
@@ -3230,7 +3236,7 @@ const P = {
3230
3236
  CUBICSPLINE: void 0,
3231
3237
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
3232
3238
  // keyframe track will be initialized with a default interpolation type, then modified.
3233
- LINEAR: en,
3239
+ LINEAR: tn,
3234
3240
  STEP: nr
3235
3241
  }, Ge = {
3236
3242
  OPAQUE: "OPAQUE",
@@ -3238,7 +3244,7 @@ const P = {
3238
3244
  BLEND: "BLEND"
3239
3245
  };
3240
3246
  function Hs(s) {
3241
- return s.DefaultMaterial === void 0 && (s.DefaultMaterial = new Zt({
3247
+ return s.DefaultMaterial === void 0 && (s.DefaultMaterial = new en({
3242
3248
  color: 16777215,
3243
3249
  emissive: 0,
3244
3250
  metalness: 1,
@@ -3303,7 +3309,7 @@ function Us(s, e) {
3303
3309
  }
3304
3310
  function Bs(s) {
3305
3311
  let e;
3306
- const t = s.extensions && s.extensions[S.KHR_DRACO_MESH_COMPRESSION];
3312
+ const t = s.extensions && s.extensions[x.KHR_DRACO_MESH_COMPRESSION];
3307
3313
  if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + ze(t.attributes) : e = s.indices + ":" + ze(s.attributes) + ":" + s.mode, s.targets !== void 0)
3308
3314
  for (let n = 0, r = s.targets.length; n < r; n++)
3309
3315
  e += ":" + ze(s.targets[n]);
@@ -3344,7 +3350,7 @@ class zs {
3344
3350
  const a = c.match(/Version\/(\d+)/);
3345
3351
  r = n && a ? parseInt(a[1], 10) : -1, i = c.indexOf("Firefox") > -1, o = i ? c.match(/Firefox\/([0-9]+)\./)[1] : -1;
3346
3352
  }
3347
- typeof createImageBitmap > "u" || n && r < 17 || i && o < 98 ? this.textureLoader = new In(this.options.manager) : this.textureLoader = new Qt(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new we(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
3353
+ typeof createImageBitmap > "u" || n && r < 17 || i && o < 98 ? this.textureLoader = new In(this.options.manager) : this.textureLoader = new Yt(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new we(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
3348
3354
  }
3349
3355
  setExtensions(e) {
3350
3356
  this.extensions = e;
@@ -3552,7 +3558,7 @@ class zs {
3552
3558
  if (t.type && t.type !== "arraybuffer")
3553
3559
  throw new Error("THREE.GLTFLoader: " + t.type + " buffer type is not supported.");
3554
3560
  if (t.uri === void 0 && e === 0)
3555
- return Promise.resolve(this.extensions[S.KHR_BINARY_GLTF].body);
3561
+ return Promise.resolve(this.extensions[x.KHR_BINARY_GLTF].body);
3556
3562
  const r = this.options;
3557
3563
  return new Promise(function(i, o) {
3558
3564
  n.load(ge.resolveURL(t.uri, r.path), i, void 0, function() {
@@ -3594,7 +3600,7 @@ class zs {
3594
3600
  if (f && f !== l) {
3595
3601
  const p = Math.floor(h / f), g = "InterleavedBuffer:" + r.bufferView + ":" + r.componentType + ":" + p + ":" + r.count;
3596
3602
  let m = t.cache.get(g);
3597
- m || (E = new d(c, p * f, r.count * f / u), m = new $t(E, f / u), t.cache.add(g, m)), T = new Kt(m, a, h % f / u, w);
3603
+ m || (E = new d(c, p * f, r.count * f / u), m = new Kt(E, f / u), t.cache.add(g, m)), T = new qt(m, a, h % f / u, w);
3598
3604
  } else
3599
3605
  c === null ? E = new d(r.count * a) : E = new d(c, h, r.count * a), T = new me(E, a, w);
3600
3606
  if (r.sparse !== void 0) {
@@ -3632,7 +3638,7 @@ class zs {
3632
3638
  const d = this.loadImageSource(t, n).then(function(u) {
3633
3639
  u.flipY = !1, u.name = o.name || c.name || "", u.name === "" && typeof c.uri == "string" && c.uri.startsWith("data:image/") === !1 && (u.name = c.uri);
3634
3640
  const h = (i.samplers || {})[o.sampler] || {};
3635
- return u.magFilter = At[h.magFilter] || Ve, u.minFilter = At[h.minFilter] || Yt, u.wrapS = Pt[h.wrapS] || Xe, u.wrapT = Pt[h.wrapT] || Xe, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== Jt && u.minFilter !== Ve, r.associations.set(u, { textures: e }), u;
3641
+ return u.magFilter = Pt[h.magFilter] || Ve, u.minFilter = Pt[h.minFilter] || Jt, u.wrapS = Ot[h.wrapS] || Xe, u.wrapT = Ot[h.wrapT] || Xe, u.generateMipmaps = !u.isCompressedTexture && u.minFilter !== Zt && u.minFilter !== Ve, r.associations.set(u, { textures: e }), u;
3636
3642
  }).catch(function() {
3637
3643
  return null;
3638
3644
  });
@@ -3656,7 +3662,7 @@ class zs {
3656
3662
  return new Promise(function(h, f) {
3657
3663
  let w = h;
3658
3664
  t.isImageBitmapLoader === !0 && (w = function(E) {
3659
- const T = new ct(E);
3665
+ const T = new ut(E);
3660
3666
  T.needsUpdate = !0, h(T);
3661
3667
  }), t.load(ge.resolveURL(l, i.path), w, void 0, f);
3662
3668
  });
@@ -3681,11 +3687,11 @@ class zs {
3681
3687
  const i = this;
3682
3688
  return this.getDependency("texture", n.index).then(function(o) {
3683
3689
  if (!o) return null;
3684
- if (n.texCoord !== void 0 && n.texCoord > 0 && (o = o.clone(), o.channel = n.texCoord), i.extensions[S.KHR_TEXTURE_TRANSFORM]) {
3685
- const c = n.extensions !== void 0 ? n.extensions[S.KHR_TEXTURE_TRANSFORM] : void 0;
3690
+ if (n.texCoord !== void 0 && n.texCoord > 0 && (o = o.clone(), o.channel = n.texCoord), i.extensions[x.KHR_TEXTURE_TRANSFORM]) {
3691
+ const c = n.extensions !== void 0 ? n.extensions[x.KHR_TEXTURE_TRANSFORM] : void 0;
3686
3692
  if (c) {
3687
3693
  const a = i.associations.get(o);
3688
- o = i.extensions[S.KHR_TEXTURE_TRANSFORM].extendTexture(o, c), i.associations.set(o, a);
3694
+ o = i.extensions[x.KHR_TEXTURE_TRANSFORM].extendTexture(o, c), i.associations.set(o, a);
3689
3695
  }
3690
3696
  }
3691
3697
  return r !== void 0 && (o.colorSpace = r), e[t] = o, o;
@@ -3723,7 +3729,7 @@ class zs {
3723
3729
  e.material = n;
3724
3730
  }
3725
3731
  getMaterialType() {
3726
- return Zt;
3732
+ return en;
3727
3733
  }
3728
3734
  /**
3729
3735
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -3736,16 +3742,16 @@ class zs {
3736
3742
  const t = this, n = this.json, r = this.extensions, i = n.materials[e];
3737
3743
  let o;
3738
3744
  const c = {}, a = i.extensions || {}, d = [];
3739
- if (a[S.KHR_MATERIALS_UNLIT]) {
3740
- const l = r[S.KHR_MATERIALS_UNLIT];
3745
+ if (a[x.KHR_MATERIALS_UNLIT]) {
3746
+ const l = r[x.KHR_MATERIALS_UNLIT];
3741
3747
  o = l.getMaterialType(), d.push(l.extendParams(c, i, t));
3742
3748
  } else {
3743
3749
  const l = i.pbrMetallicRoughness || {};
3744
- if (c.color = new z(1, 1, 1), c.opacity = 1, Array.isArray(l.baseColorFactor)) {
3750
+ if (c.color = new $(1, 1, 1), c.opacity = 1, Array.isArray(l.baseColorFactor)) {
3745
3751
  const h = l.baseColorFactor;
3746
3752
  c.color.setRGB(h[0], h[1], h[2], F), c.opacity = h[3];
3747
3753
  }
3748
- l.baseColorTexture !== void 0 && d.push(t.assignTexture(c, "map", l.baseColorTexture, G)), c.metalness = l.metallicFactor !== void 0 ? l.metallicFactor : 1, c.roughness = l.roughnessFactor !== void 0 ? l.roughnessFactor : 1, l.metallicRoughnessTexture !== void 0 && (d.push(t.assignTexture(c, "metalnessMap", l.metallicRoughnessTexture)), d.push(t.assignTexture(c, "roughnessMap", l.metallicRoughnessTexture))), o = this._invokeOne(function(h) {
3754
+ l.baseColorTexture !== void 0 && d.push(t.assignTexture(c, "map", l.baseColorTexture, z)), c.metalness = l.metallicFactor !== void 0 ? l.metallicFactor : 1, c.roughness = l.roughnessFactor !== void 0 ? l.roughnessFactor : 1, l.metallicRoughnessTexture !== void 0 && (d.push(t.assignTexture(c, "metalnessMap", l.metallicRoughnessTexture)), d.push(t.assignTexture(c, "roughnessMap", l.metallicRoughnessTexture))), o = this._invokeOne(function(h) {
3749
3755
  return h.getMaterialType && h.getMaterialType(e);
3750
3756
  }), d.push(Promise.all(this._invokeAll(function(h) {
3751
3757
  return h.extendMaterialParams && h.extendMaterialParams(e, c);
@@ -3753,15 +3759,15 @@ class zs {
3753
3759
  }
3754
3760
  i.doubleSided === !0 && (c.side = Dn);
3755
3761
  const u = i.alphaMode || Ge.OPAQUE;
3756
- if (u === Ge.BLEND ? (c.transparent = !0, c.depthWrite = !1) : (c.transparent = !1, u === Ge.MASK && (c.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== fe && (d.push(t.assignTexture(c, "normalMap", i.normalTexture)), c.normalScale = new qt(1, 1), i.normalTexture.scale !== void 0)) {
3762
+ if (u === Ge.BLEND ? (c.transparent = !0, c.depthWrite = !1) : (c.transparent = !1, u === Ge.MASK && (c.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== fe && (d.push(t.assignTexture(c, "normalMap", i.normalTexture)), c.normalScale = new Vt(1, 1), i.normalTexture.scale !== void 0)) {
3757
3763
  const l = i.normalTexture.scale;
3758
3764
  c.normalScale.set(l, l);
3759
3765
  }
3760
3766
  if (i.occlusionTexture !== void 0 && o !== fe && (d.push(t.assignTexture(c, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (c.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && o !== fe) {
3761
3767
  const l = i.emissiveFactor;
3762
- c.emissive = new z().setRGB(l[0], l[1], l[2], F);
3768
+ c.emissive = new $().setRGB(l[0], l[1], l[2], F);
3763
3769
  }
3764
- return i.emissiveTexture !== void 0 && o !== fe && d.push(t.assignTexture(c, "emissiveMap", i.emissiveTexture, G)), Promise.all(d).then(function() {
3770
+ return i.emissiveTexture !== void 0 && o !== fe && d.push(t.assignTexture(c, "emissiveMap", i.emissiveTexture, z)), Promise.all(d).then(function() {
3765
3771
  const l = new o(c);
3766
3772
  return i.name && (l.name = i.name), N(l, i), t.associations.set(l, { materials: e }), i.extensions && J(r, l, i), l;
3767
3773
  });
@@ -3789,8 +3795,8 @@ class zs {
3789
3795
  loadGeometries(e) {
3790
3796
  const t = this, n = this.extensions, r = this.primitiveCache;
3791
3797
  function i(c) {
3792
- return n[S.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(c, t).then(function(a) {
3793
- return Ot(a, c, t);
3798
+ return n[x.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(c, t).then(function(a) {
3799
+ return It(a, c, t);
3794
3800
  });
3795
3801
  }
3796
3802
  const o = [];
@@ -3800,7 +3806,7 @@ class zs {
3800
3806
  o.push(l.promise);
3801
3807
  else {
3802
3808
  let h;
3803
- d.extensions && d.extensions[S.KHR_DRACO_MESH_COMPRESSION] ? h = i(d) : h = Ot(new zt(), d, t), r[u] = { primitive: d, promise: h }, o.push(h);
3809
+ d.extensions && d.extensions[x.KHR_DRACO_MESH_COMPRESSION] ? h = i(d) : h = It(new $t(), d, t), r[u] = { primitive: d, promise: h }, o.push(h);
3804
3810
  }
3805
3811
  }
3806
3812
  return Promise.all(o);
@@ -3825,7 +3831,7 @@ class zs {
3825
3831
  let p;
3826
3832
  const g = d[f];
3827
3833
  if (T.mode === P.TRIANGLES || T.mode === P.TRIANGLE_STRIP || T.mode === P.TRIANGLE_FAN || T.mode === void 0)
3828
- p = i.isSkinnedMesh === !0 ? new jn(E, g) : new Un(E, g), p.isSkinnedMesh === !0 && p.normalizeSkinWeights(), T.mode === P.TRIANGLE_STRIP ? p.geometry = Mt(p.geometry, Wt) : T.mode === P.TRIANGLE_FAN && (p.geometry = Mt(p.geometry, Ke));
3834
+ p = i.isSkinnedMesh === !0 ? new jn(E, g) : new Un(E, g), p.isSkinnedMesh === !0 && p.normalizeSkinWeights(), T.mode === P.TRIANGLE_STRIP ? p.geometry = kt(p.geometry, Gt) : T.mode === P.TRIANGLE_FAN && (p.geometry = kt(p.geometry, Ke));
3829
3835
  else if (T.mode === P.LINES)
3830
3836
  p = new Bn(E, g);
3831
3837
  else if (T.mode === P.LINE_STRIP)
@@ -3918,10 +3924,10 @@ class zs {
3918
3924
  const _ = h[m], y = f[m], v = w[m], R = E[m], C = T[m];
3919
3925
  if (_ === void 0) continue;
3920
3926
  _.updateMatrix && _.updateMatrix();
3921
- const x = n._createAnimationTracks(_, y, v, R, C);
3922
- if (x)
3923
- for (let k = 0; k < x.length; k++)
3924
- p.push(x[k]);
3927
+ const M = n._createAnimationTracks(_, y, v, R, C);
3928
+ if (M)
3929
+ for (let k = 0; k < M.length; k++)
3930
+ p.push(M[k]);
3925
3931
  }
3926
3932
  const g = new Xn(i, void 0, p);
3927
3933
  return N(g, r), g;
@@ -3985,7 +3991,7 @@ class zs {
3985
3991
  c.push(d);
3986
3992
  }), this.nodeCache[e] = Promise.all(c).then(function(d) {
3987
3993
  let u;
3988
- if (i.isBone === !0 ? u = new Qn() : d.length > 1 ? u = new Ie() : d.length === 1 ? u = d[0] : u = new Xt(), u !== d[0])
3994
+ if (i.isBone === !0 ? u = new Qn() : d.length > 1 ? u = new Ie() : d.length === 1 ? u = d[0] : u = new Qt(), u !== d[0])
3989
3995
  for (let l = 0, h = d.length; l < h; l++)
3990
3996
  u.add(d[l]);
3991
3997
  if (i.name && (u.userData.name = i.name, u.name = o), N(u, i), i.extensions && J(n, u, i), i.matrix !== void 0) {
@@ -4023,7 +4029,7 @@ class zs {
4023
4029
  const d = (u) => {
4024
4030
  const l = /* @__PURE__ */ new Map();
4025
4031
  for (const [h, f] of r.associations)
4026
- (h instanceof Oe || h instanceof ct) && l.set(h, f);
4032
+ (h instanceof Oe || h instanceof ut) && l.set(h, f);
4027
4033
  return u.traverse((h) => {
4028
4034
  const f = r.associations.get(h);
4029
4035
  f != null && l.set(h, f);
@@ -4034,38 +4040,38 @@ class zs {
4034
4040
  }
4035
4041
  _createAnimationTracks(e, t, n, r, i) {
4036
4042
  const o = [], c = e.name ? e.name : e.uuid, a = [];
4037
- W[i.path] === W.weights ? e.traverse(function(h) {
4043
+ G[i.path] === G.weights ? e.traverse(function(h) {
4038
4044
  h.morphTargetInfluences && a.push(h.name ? h.name : h.uuid);
4039
4045
  }) : a.push(c);
4040
4046
  let d;
4041
- switch (W[i.path]) {
4042
- case W.weights:
4043
- d = lt;
4044
- break;
4045
- case W.rotation:
4047
+ switch (G[i.path]) {
4048
+ case G.weights:
4046
4049
  d = dt;
4047
4050
  break;
4048
- case W.translation:
4049
- case W.scale:
4050
- d = ut;
4051
+ case G.rotation:
4052
+ d = ht;
4053
+ break;
4054
+ case G.translation:
4055
+ case G.scale:
4056
+ d = lt;
4051
4057
  break;
4052
4058
  default:
4053
4059
  switch (n.itemSize) {
4054
4060
  case 1:
4055
- d = lt;
4061
+ d = dt;
4056
4062
  break;
4057
4063
  case 2:
4058
4064
  case 3:
4059
4065
  default:
4060
- d = ut;
4066
+ d = lt;
4061
4067
  break;
4062
4068
  }
4063
4069
  break;
4064
4070
  }
4065
- const u = r.interpolation !== void 0 ? Ds[r.interpolation] : en, l = this._getArrayFromAccessor(n);
4071
+ const u = r.interpolation !== void 0 ? Ds[r.interpolation] : tn, l = this._getArrayFromAccessor(n);
4066
4072
  for (let h = 0, f = a.length; h < f; h++) {
4067
4073
  const w = new d(
4068
- a[h] + "." + W[i.path],
4074
+ a[h] + "." + G[i.path],
4069
4075
  t.array,
4070
4076
  l,
4071
4077
  u
@@ -4086,7 +4092,7 @@ class zs {
4086
4092
  }
4087
4093
  _createCubicSplineTrackInterpolant(e) {
4088
4094
  e.createInterpolant = function(n) {
4089
- const r = this instanceof dt ? Fs : hn;
4095
+ const r = this instanceof ht ? Fs : fn;
4090
4096
  return new r(this.times, this.values, this.getValueSize() / 3, n);
4091
4097
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
4092
4098
  }
@@ -4132,7 +4138,7 @@ function $s(s, e, t) {
4132
4138
  const o = new ir();
4133
4139
  r.getCenter(o.center), o.radius = r.min.distanceTo(r.max) / 2, s.boundingSphere = o;
4134
4140
  }
4135
- function Ot(s, e, t) {
4141
+ function It(s, e, t) {
4136
4142
  const n = e.attributes, r = [];
4137
4143
  function i(o, c) {
4138
4144
  return t.getDependency("accessor", o).then(function(a) {
@@ -4160,12 +4166,12 @@ var Ks = Object.defineProperty, qs = Object.getOwnPropertyDescriptor, Vs = (s, e
4160
4166
  };
4161
4167
  let Ce = class {
4162
4168
  constructor() {
4163
- M(this, "loadingManager", new ar());
4164
- M(this, "loaders", {});
4165
- M(this, "sources", []);
4166
- M(this, "loadedResources", {});
4167
- M(this, "toLoadCount", 0);
4168
- M(this, "loadedCount", 0);
4169
+ S(this, "loadingManager", new ar());
4170
+ S(this, "loaders", {});
4171
+ S(this, "sources", []);
4172
+ S(this, "loadedResources", {});
4173
+ S(this, "toLoadCount", 0);
4174
+ S(this, "loadedCount", 0);
4169
4175
  }
4170
4176
  /** @description The video loader. based on {@link HTMLVideoElement}. */
4171
4177
  get videoLoader() {
@@ -4181,7 +4187,7 @@ let Ce = class {
4181
4187
  };
4182
4188
  }
4183
4189
  _initLoaders() {
4184
- this.loaders.dracoLoader = new un(this.loadingManager), this.loaders.audioLoader = new cr(this.loadingManager), this.loaders.fontLoader = new En(this.loadingManager), this.loaders.gltfLoader = new hs(this.loadingManager), this.loaders.imageLoader = new Qt(this.loadingManager), this.loaders.videoLoader = this.videoLoader;
4190
+ this.loaders.dracoLoader = new ln(this.loadingManager), this.loaders.audioLoader = new cr(this.loadingManager), this.loaders.fontLoader = new Rn(this.loadingManager), this.loaders.gltfLoader = new hs(this.loadingManager), this.loaders.imageLoader = new Yt(this.loadingManager), this.loaders.videoLoader = this.videoLoader;
4185
4191
  }
4186
4192
  _initSources(s) {
4187
4193
  this.sources = s, this.toLoadCount = this.sources.length, this.loadedCount = 0;
@@ -4239,10 +4245,10 @@ var Xs = Object.defineProperty, Qs = Object.getOwnPropertyDescriptor, Ys = (s, e
4239
4245
  (o = s[i]) && (r = (n ? o(e, t, r) : o(r)) || r);
4240
4246
  return n && r && Xs(e, t, r), r;
4241
4247
  }, Js = (s, e) => (t, n) => e(t, n, s);
4242
- let Se = class {
4248
+ let xe = class {
4243
4249
  constructor(s) {
4244
- M(this, "load$$", new Ht());
4245
- M(this, "load$", this.load$$.pipe(
4250
+ S(this, "load$$", new jt());
4251
+ S(this, "load$", this.load$$.pipe(
4246
4252
  ye((s) => ({
4247
4253
  ...s,
4248
4254
  loadedCount: s.resource ? this._service.loadedCount + 1 : this._service.loadedCount,
@@ -4250,7 +4256,7 @@ let Se = class {
4250
4256
  })),
4251
4257
  Pe()
4252
4258
  ));
4253
- M(this, "serializedLoad$", this.load$.pipe(
4259
+ S(this, "serializedLoad$", this.load$.pipe(
4254
4260
  ye((s) => {
4255
4261
  var t, n, r;
4256
4262
  let e = s.resource;
@@ -4312,7 +4318,7 @@ let Se = class {
4312
4318
  "width"
4313
4319
  ]),
4314
4320
  buffered: s.resource.buffered.length,
4315
- error: s.resource.error ? Ut(s.resource.error, []) : {},
4321
+ error: s.resource.error ? Bt(s.resource.error, []) : {},
4316
4322
  played: s.resource.played.length,
4317
4323
  seekable: s.resource.seekable.length,
4318
4324
  textTracks: s.resource.textTracks.length
@@ -4323,8 +4329,8 @@ let Se = class {
4323
4329
  }),
4324
4330
  Pe()
4325
4331
  ));
4326
- M(this, "loadCompleted$", this.load$.pipe(
4327
- jt((s) => s.toLoadCount === s.loadedCount),
4332
+ S(this, "loadCompleted$", this.load$.pipe(
4333
+ Ut((s) => s.toLoadCount === s.loadedCount),
4328
4334
  ye(
4329
4335
  () => pe(this._service, [
4330
4336
  "loadedCount",
@@ -4337,10 +4343,10 @@ let Se = class {
4337
4343
  this._service = s;
4338
4344
  }
4339
4345
  };
4340
- Se = Ys([
4346
+ xe = Ys([
4341
4347
  ie(oe.ContainerScoped),
4342
4348
  Js(0, O(Ce))
4343
- ], Se);
4349
+ ], xe);
4344
4350
  var Zs = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, ti = (s, e, t, n) => {
4345
4351
  for (var r = n > 1 ? void 0 : n ? ei(e, t) : e, i = s.length - 1, o; i >= 0; i--)
4346
4352
  (o = s[i]) && (r = (n ? o(e, t, r) : o(r)) || r);
@@ -4348,7 +4354,7 @@ var Zs = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, ti = (s, e
4348
4354
  }, $e = (s, e) => (t, n) => e(t, n, s);
4349
4355
  let tt = class {
4350
4356
  constructor(s, e, t) {
4351
- M(this, "_subscriptions", []);
4357
+ S(this, "_subscriptions", []);
4352
4358
  this._controller = s, this._service = e, this._props = t, this._subscriptions.push(
4353
4359
  this._controller.load$.subscribe(
4354
4360
  this._service.handleLoad.bind(this._service)
@@ -4393,26 +4399,26 @@ let tt = class {
4393
4399
  dispose() {
4394
4400
  this._subscriptions.forEach((s) => s.unsubscribe()), Object.keys(this._service.loaders).forEach((s) => {
4395
4401
  const e = this._service.loaders[s];
4396
- e instanceof un && e.dispose(), this._service.loaders[s] = void 0;
4402
+ e instanceof ln && e.dispose(), this._service.loaders[s] = void 0;
4397
4403
  }), this._controller.load$$.complete();
4398
4404
  }
4399
4405
  };
4400
4406
  tt = ti([
4401
4407
  ie(oe.ContainerScoped),
4402
- $e(0, O(Se)),
4408
+ $e(0, O(xe)),
4403
4409
  $e(1, O(Ce)),
4404
- $e(2, O(xe))
4410
+ $e(2, O(Se))
4405
4411
  ], tt);
4406
4412
  var ni = Object.defineProperty, ri = Object.getOwnPropertyDescriptor, si = (s, e, t, n) => {
4407
4413
  for (var r = n > 1 ? void 0 : n ? ri(e, t) : e, i = s.length - 1, o; i >= 0; i--)
4408
4414
  (o = s[i]) && (r = (n ? o(e, t, r) : o(r)) || r);
4409
4415
  return n && r && ni(e, t, r), r;
4410
4416
  }, ne = (s, e) => (t, n) => e(t, n, s);
4411
- let nt = class extends Rn {
4417
+ let nt = class extends Cn {
4412
4418
  constructor(e, t, n, r, i, o) {
4413
4419
  super();
4414
- M(this, "_subscriptions", []);
4415
- M(this, "_initialized", !1);
4420
+ S(this, "_subscriptions", []);
4421
+ S(this, "_initialized", !1);
4416
4422
  this._service = e, this._controller = t, this._loaderController = n, this.container = r, this.props = i, this.loader = o, this.props.initOnConstruct && this.init();
4417
4423
  }
4418
4424
  get currentWorker() {
@@ -4420,46 +4426,40 @@ let nt = class extends Rn {
4420
4426
  return this.props.mainThread ? self : (e = this._service.workerThread) == null ? void 0 : e.worker;
4421
4427
  }
4422
4428
  async _initCanvas() {
4429
+ var e;
4423
4430
  try {
4424
- if (this.props.canvasWrapper instanceof HTMLElement && (this._service.canvasWrapper = this.props.canvasWrapper), this.props.canvas instanceof HTMLCanvasElement && (this._service.canvas = this.props.canvas), typeof this.props.canvas == "string") {
4425
- const e = document.querySelector(this.props.canvas);
4426
- e instanceof HTMLCanvasElement && (this._service.canvas = e);
4427
- }
4428
- this._service.canvas || (this._service.canvas = document.createElement("canvas"), this._service.canvas.dataset.reactive = "true", document.body.appendChild(this._service.canvas));
4429
- } catch (e) {
4431
+ this._service.canvas = this.props.canvas instanceof HTMLCanvasElement ? this.props.canvas : void 0, this._service.canvas || (this._service.canvas = document.createElement("canvas"), this._service.canvas.dataset.reactive = "true", document.body.appendChild(this._service.canvas)), this._service.canvasWrapper = this.props.canvasWrapper instanceof HTMLElement ? this.props.canvasWrapper : this.props.canvasWrapper === "parent" ? ((e = this.props.canvas) == null ? void 0 : e.parentElement) ?? void 0 : void 0;
4432
+ } catch (t) {
4430
4433
  console.error(
4431
4434
  `🛑 Unable to initialize the canvas:
4432
- ${e instanceof Error ? e.message : "Something went wrong"}`
4435
+ ${t instanceof Error ? t.message : "Something went wrong"}`
4433
4436
  );
4434
4437
  }
4435
4438
  }
4436
4439
  async _initEvents() {
4437
- var n, r;
4438
4440
  if (!this._service.canvas)
4439
4441
  throw new Error("Canvas element is not initialized.");
4440
- this._controller.init();
4441
- const e = this._service.canvas, t = new UIEvent("resize");
4442
- t.width = (e == null ? void 0 : e.width) ?? window.innerWidth, t.height = (e == null ? void 0 : e.height) ?? window.innerHeight, t.wrapperWidth = ((n = this.props.canvasWrapper) == null ? void 0 : n.clientWidth) ?? 0, t.wrapperHeight = ((r = this.props.canvasWrapper) == null ? void 0 : r.clientHeight) ?? 0, t.windowWidth = window.innerWidth, t.windowHeight = window.innerHeight, this.props.mainThread || this._subscriptions.push(
4443
- this._controller.resize$.subscribe((i) => {
4444
- var d, u;
4445
- if (!this.props.autoRenderResize) return;
4446
- const o = this._service.canvas;
4447
- if (!o) return;
4448
- const c = this.props.fullScreen ? i.windowWidth : ((d = this.props.canvasWrapper) == null ? void 0 : d.clientWidth) ?? 0, a = this.props.fullScreen ? i.windowHeight : ((u = this.props.canvasWrapper) == null ? void 0 : u.clientHeight) ?? 0;
4449
- o.style.width = c + "px", o.style.height = a + "px";
4442
+ this._controller.init(), this.props.mainThread || this._subscriptions.push(
4443
+ this._controller.resize$.subscribe((r) => {
4444
+ const i = this._service.canvas;
4445
+ if (!this.props.autoRenderResize || !i) return;
4446
+ const o = this._service.canvasWrapper, c = this.props.fullScreen, a = c ? r.windowWidth : o ? r.wrapperWidth : r.width, d = c ? r.windowHeight : o ? r.wrapperHeight : r.height;
4447
+ i.style.width = a + "px", i.style.height = d + "px";
4450
4448
  })
4451
- ), this._controller.resize$$.next(this._service.uiEventHandler(t));
4449
+ );
4450
+ const e = this._service.canvas, t = this._service.canvasWrapper, n = new UIEvent("resize");
4451
+ n.width = (e == null ? void 0 : e.width) ?? 0, n.height = (e == null ? void 0 : e.height) ?? 0, n.wrapperWidth = (t == null ? void 0 : t.clientWidth) ?? 0, n.wrapperHeight = (t == null ? void 0 : t.clientHeight) ?? 0, n.windowWidth = window.innerWidth, n.windowHeight = window.innerHeight, this._controller.resize$$.next(this._service.uiEventHandler(n));
4452
4452
  }
4453
4453
  async _initCore() {
4454
4454
  const e = {
4455
- ...Ut(this.props, [
4455
+ ...Bt(this.props, [
4456
4456
  "canvas",
4457
4457
  "canvasWrapper",
4458
4458
  "location",
4459
4459
  "onReady",
4460
4460
  "loaderDataSources"
4461
4461
  ]),
4462
- pixelRatio: Math.min(window.devicePixelRatio, 2),
4462
+ pixelRatio: this.props.pixelRatio,
4463
4463
  initApp: !0,
4464
4464
  hasCanvasWrapper: !!this.props.canvasWrapper
4465
4465
  };
@@ -4490,7 +4490,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
4490
4490
  this._service.workerThread = n;
4491
4491
  }
4492
4492
  async _initObservables() {
4493
- Dt.forEach(
4493
+ Ht.forEach(
4494
4494
  (e) => this[`${e}$`] = () => {
4495
4495
  var t;
4496
4496
  return (t = this._controller) == null ? void 0 : t[`${e}$`];
@@ -4509,7 +4509,7 @@ ${e instanceof Error ? e.message : "Something went wrong"}`
4509
4509
  e.resource
4510
4510
  ]);
4511
4511
  (n = this.currentWorker) == null || n.postMessage({
4512
- token: Cn,
4512
+ token: xn,
4513
4513
  payload: e
4514
4514
  });
4515
4515
  })
@@ -4546,9 +4546,9 @@ nt = si([
4546
4546
  ie(oe.ContainerScoped),
4547
4547
  ne(0, O(Re)),
4548
4548
  ne(1, O(Je)),
4549
- ne(2, O(Se)),
4550
- ne(3, O(Bt)),
4551
- ne(4, O(xe)),
4549
+ ne(2, O(xe)),
4550
+ ne(3, O(Wt)),
4551
+ ne(4, O(Se)),
4552
4552
  ne(5, O(tt))
4553
4553
  ], nt);
4554
4554
  const li = (s) => {
@@ -4557,8 +4557,8 @@ const li = (s) => {
4557
4557
  throw new Error(
4558
4558
  "Invalid register props detected. location path is required"
4559
4559
  );
4560
- const e = Ft.createChildContainer();
4561
- s.initOnConstruct = V(s.initOnConstruct) || !te(s.initOnConstruct) ? !0 : s.initOnConstruct, s.defaultCamera = s != null && s.defaultCamera && s.defaultCamera in at ? s.defaultCamera : at.PERSPECTIVE, s.fullScreen = V(s.fullScreen) || !te(s.fullScreen) ? !0 : s.fullScreen, s.autoRenderResize = V(s.autoRenderResize) || !te(s.autoRenderResize) ? !0 : s.autoRenderResize, s.startTimer = V(s.startTimer) || !te(s.startTimer) ? !0 : s.startTimer, s.onReady = Sn(s.onReady) ? s.onReady : void 0, s.debug && (s.debug.withMiniCamera = V((n = s.debug) == null ? void 0 : n.withMiniCamera) || !te(s.debug.withMiniCamera) ? !1 : s.debug.withMiniCamera, s.debug.enableControls = V(s.debug.enableControls) || !te(s.debug.enableControls) ? !1 : s.debug.enableControls, s.debug.axesSizes = V(s.debug.axesSizes) || !xn(s.debug.axesSizes) ? void 0 : s.debug.axesSizes), e.register(Bt, { useValue: e }), e.register(xe, { useValue: s });
4560
+ const e = Dt.createChildContainer();
4561
+ s.initOnConstruct = W(s.initOnConstruct) || !te(s.initOnConstruct) ? !0 : s.initOnConstruct, s.defaultCamera = s != null && s.defaultCamera && s.defaultCamera in at ? s.defaultCamera : at.PERSPECTIVE, s.fullScreen = W(s.fullScreen) || !te(s.fullScreen) ? !0 : s.fullScreen, s.autoRenderResize = W(s.autoRenderResize) || !te(s.autoRenderResize) ? !0 : s.autoRenderResize, s.startTimer = W(s.startTimer) || !te(s.startTimer) ? !0 : s.startTimer, s.pixelRatio = W(s.pixelRatio) || !ct(s.pixelRatio) ? Math.min(window.devicePixelRatio, 2) : s.pixelRatio, s.onReady = Sn(s.onReady) ? s.onReady : void 0, s.debug && (s.debug.withMiniCamera = W((n = s.debug) == null ? void 0 : n.withMiniCamera) || !te(s.debug.withMiniCamera) ? !1 : s.debug.withMiniCamera, s.debug.enableControls = W(s.debug.enableControls) || !te(s.debug.enableControls) ? !1 : s.debug.enableControls, s.debug.axesSizes = W(s.debug.axesSizes) || !ct(s.debug.axesSizes) ? void 0 : s.debug.axesSizes), e.register(Wt, { useValue: e }), e.register(Se, { useValue: s });
4562
4562
  const t = e.resolve(nt);
4563
4563
  return {
4564
4564
  container: e,
@@ -4567,17 +4567,17 @@ const li = (s) => {
4567
4567
  };
4568
4568
  export {
4569
4569
  fi as AppProxyEventHandlersBlueprint,
4570
- Bt as CONTAINER_TOKEN,
4570
+ Wt as CONTAINER_TOKEN,
4571
4571
  at as DefaultCameraType,
4572
- Tn as KEYBOARD_EVENT_CODES,
4573
- Cn as LOADER_SERIALIZED_LOAD_TOKEN,
4572
+ wn as KEYBOARD_EVENT_CODES,
4573
+ xn as LOADER_SERIALIZED_LOAD_TOKEN,
4574
4574
  ci as LaunchAppProps,
4575
- Dt as PROXY_EVENT_LISTENERS,
4576
- wn as ProxyEventHandlersBlueprint,
4575
+ Ht as PROXY_EVENT_LISTENERS,
4576
+ vn as ProxyEventHandlersBlueprint,
4577
4577
  pi as ProxyEventObservablesBlueprint,
4578
4578
  mi as ProxyEventSubjectsBlueprint,
4579
4579
  nt as RegisterModule,
4580
- xe as RegisterPropsBlueprint,
4581
- Rn as RegisterProxyEventHandlersBlueprint,
4580
+ Se as RegisterPropsBlueprint,
4581
+ Cn as RegisterProxyEventHandlersBlueprint,
4582
4582
  li as register
4583
4583
  };